@sisense/sdk-ui-preact 2.3.0 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai.cjs +1 -1
- package/dist/ai.js +1 -1
- package/dist/index.cjs +19 -19
- package/dist/index.js +2648 -2639
- package/dist/{use-common-filters-BC4Vg9wu-fc414cf1.cjs → use-common-filters-CSwVz8Hy-0a5669e5.cjs} +3 -3
- package/dist/{use-common-filters-BC4Vg9wu-ac7b626e.js → use-common-filters-CSwVz8Hy-eb072672.js} +9 -6
- package/package.json +3 -3
package/dist/{use-common-filters-BC4Vg9wu-fc414cf1.cjs → use-common-filters-CSwVz8Hy-0a5669e5.cjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var bg,De,m6,Xc,H3,g6,v6,y6,RA,T2,M2,b6,pm={},x6=[],KQ=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,xg=Array.isArray;function fs(t,e){for(var o in e)t[o]=e[o];return t}function IA(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function Re(t,e,o){var n,i,r,a={};for(r in e)r=="key"?n=e[r]:r=="ref"?i=e[r]:a[r]=e[r];if(arguments.length>2&&(a.children=arguments.length>3?bg.call(arguments,2):o),typeof t=="function"&&t.defaultProps!=null)for(r in t.defaultProps)a[r]===void 0&&(a[r]=t.defaultProps[r]);return Hf(t,a,n,i,null)}function Hf(t,e,o,n,i){var r={type:t,props:e,key:o,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++m6,__i:-1,__u:0};return i==null&&De.vnode!=null&&De.vnode(r),r}function a1(){return{current:null}}function lo(t){return t.children}function ii(t,e){this.props=t,this.context=e}function sp(t,e){if(e==null)return t.__?sp(t.__,t.__i+1):null;for(var o;e<t.__k.length;e++)if((o=t.__k[e])!=null&&o.__e!=null)return o.__e;return typeof t.type=="function"?sp(t):null}function w6(t){var e,o;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((o=t.__k[e])!=null&&o.__e!=null){t.__e=t.__c.base=o.__e;break}return w6(t)}}function k2(t){(!t.__d&&(t.__d=!0)&&Xc.push(t)&&!Dy.__r++||H3!=De.debounceRendering)&&((H3=De.debounceRendering)||g6)(Dy)}function Dy(){for(var t,e,o,n,i,r,a,s=1;Xc.length;)Xc.length>s&&Xc.sort(v6),t=Xc.shift(),s=Xc.length,t.__d&&(o=void 0,i=(n=(e=t).__v).__e,r=[],a=[],e.__P&&((o=fs({},n)).__v=n.__v+1,De.vnode&&De.vnode(o),jA(e.__P,o,n,e.__n,e.__P.namespaceURI,32&n.__u?[i]:null,r,i??sp(n),!!(32&n.__u),a),o.__v=n.__v,o.__.__k[o.__i]=o,C6(r,o,a),o.__e!=i&&w6(o)));Dy.__r=0}function _6(t,e,o,n,i,r,a,s,l,d,b){var C,u,j,A,p,I,W=n&&n.__k||x6,q=e.length;for(l=JQ(o,e,W,l,q),C=0;C<q;C++)(j=o.__k[C])!=null&&(u=j.__i==-1?pm:W[j.__i]||pm,j.__i=C,I=jA(t,j,u,i,r,a,s,l,d,b),A=j.__e,j.ref&&u.ref!=j.ref&&(u.ref&&$A(u.ref,null,j),b.push(j.ref,j.__c||A,j)),p==null&&A!=null&&(p=A),4&j.__u||u.__k===j.__k?l=S6(j,l,t):typeof j.type=="function"&&I!==void 0?l=I:A&&(l=A.nextSibling),j.__u&=-7);return o.__e=p,l}function JQ(t,e,o,n,i){var r,a,s,l,d,b=o.length,C=b,u=0;for(t.__k=new Array(i),r=0;r<i;r++)(a=e[r])!=null&&typeof a!="boolean"&&typeof a!="function"?(l=r+u,(a=t.__k[r]=typeof a=="string"||typeof a=="number"||typeof a=="bigint"||a.constructor==String?Hf(null,a,null,null,null):xg(a)?Hf(lo,{children:a},null,null,null):a.constructor==null&&a.__b>0?Hf(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):a).__=t,a.__b=t.__b+1,s=null,(d=a.__i=QQ(a,o,l,C))!=-1&&(C--,(s=o[d])&&(s.__u|=2)),s==null||s.__v==null?(d==-1&&(i>b?u--:i<b&&u++),typeof a.type!="function"&&(a.__u|=4)):d!=l&&(d==l-1?u--:d==l+1?u++:(d>l?u--:u++,a.__u|=4))):t.__k[r]=null;if(C)for(r=0;r<b;r++)(s=o[r])!=null&&!(2&s.__u)&&(s.__e==n&&(n=sp(s)),M6(s,s));return n}function S6(t,e,o){var n,i;if(typeof t.type=="function"){for(n=t.__k,i=0;n&&i<n.length;i++)n[i]&&(n[i].__=t,e=S6(n[i],e,o));return e}t.__e!=e&&(e&&t.type&&!o.contains(e)&&(e=sp(t)),o.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function tl(t,e){return e=e||[],t==null||typeof t=="boolean"||(xg(t)?t.some(function(o){tl(o,e)}):e.push(t)),e}function QQ(t,e,o,n){var i,r,a=t.key,s=t.type,l=e[o];if(l===null&&t.key==null||l&&a==l.key&&s==l.type&&!(2&l.__u))return o;if(n>(l!=null&&!(2&l.__u)?1:0))for(i=o-1,r=o+1;i>=0||r<e.length;){if(i>=0){if((l=e[i])&&!(2&l.__u)&&a==l.key&&s==l.type)return i;i--}if(r<e.length){if((l=e[r])&&!(2&l.__u)&&a==l.key&&s==l.type)return r;r++}}return-1}function W3(t,e,o){e[0]=="-"?t.setProperty(e,o??""):t[e]=o==null?"":typeof o!="number"||KQ.test(e)?o:o+"px"}function R0(t,e,o,n,i){var r,a;t:if(e=="style")if(typeof o=="string")t.style.cssText=o;else{if(typeof n=="string"&&(t.style.cssText=n=""),n)for(e in n)o&&e in o||W3(t.style,e,"");if(o)for(e in o)n&&o[e]==n[e]||W3(t.style,e,o[e])}else if(e[0]=="o"&&e[1]=="n")r=e!=(e=e.replace(y6,"$1")),a=e.toLowerCase(),e=a in t||e=="onFocusOut"||e=="onFocusIn"?a.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+r]=o,o?n?o.u=n.u:(o.u=RA,t.addEventListener(e,r?M2:T2,r)):t.removeEventListener(e,r?M2:T2,r);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=o??"";break t}catch{}typeof o=="function"||(o==null||o===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&o==1?"":o))}}function V3(t){return function(e){if(this.l){var o=this.l[e.type+t];if(e.t==null)e.t=RA++;else if(e.t<o.u)return;return o(De.event?De.event(e):e)}}}function jA(t,e,o,n,i,r,a,s,l,d){var b,C,u,j,A,p,I,W,q,X,H,D,$,z,N,V,E,x=e.type;if(e.constructor!=null)return null;128&o.__u&&(l=!!(32&o.__u),r=[s=e.__e=o.__e]),(b=De.__b)&&b(e);t:if(typeof x=="function")try{if(W=e.props,q="prototype"in x&&x.prototype.render,X=(b=x.contextType)&&n[b.__c],H=b?X?X.props.value:b.__:n,o.__c?I=(C=e.__c=o.__c).__=C.__E:(q?e.__c=C=new x(W,H):(e.__c=C=new ii(W,H),C.constructor=x,C.render=ett),X&&X.sub(C),C.props=W,C.state||(C.state={}),C.context=H,C.__n=n,u=C.__d=!0,C.__h=[],C._sb=[]),q&&C.__s==null&&(C.__s=C.state),q&&x.getDerivedStateFromProps!=null&&(C.__s==C.state&&(C.__s=fs({},C.__s)),fs(C.__s,x.getDerivedStateFromProps(W,C.__s))),j=C.props,A=C.state,C.__v=e,u)q&&x.getDerivedStateFromProps==null&&C.componentWillMount!=null&&C.componentWillMount(),q&&C.componentDidMount!=null&&C.__h.push(C.componentDidMount);else{if(q&&x.getDerivedStateFromProps==null&&W!==j&&C.componentWillReceiveProps!=null&&C.componentWillReceiveProps(W,H),!C.__e&&C.shouldComponentUpdate!=null&&C.shouldComponentUpdate(W,C.__s,H)===!1||e.__v==o.__v){for(e.__v!=o.__v&&(C.props=W,C.state=C.__s,C.__d=!1),e.__e=o.__e,e.__k=o.__k,e.__k.some(function(g){g&&(g.__=e)}),D=0;D<C._sb.length;D++)C.__h.push(C._sb[D]);C._sb=[],C.__h.length&&a.push(C);break t}C.componentWillUpdate!=null&&C.componentWillUpdate(W,C.__s,H),q&&C.componentDidUpdate!=null&&C.__h.push(function(){C.componentDidUpdate(j,A,p)})}if(C.context=H,C.props=W,C.__P=t,C.__e=!1,$=De.__r,z=0,q){for(C.state=C.__s,C.__d=!1,$&&$(e),b=C.render(C.props,C.state,C.context),N=0;N<C._sb.length;N++)C.__h.push(C._sb[N]);C._sb=[]}else do C.__d=!1,$&&$(e),b=C.render(C.props,C.state,C.context),C.state=C.__s;while(C.__d&&++z<25);C.state=C.__s,C.getChildContext!=null&&(n=fs(fs({},n),C.getChildContext())),q&&!u&&C.getSnapshotBeforeUpdate!=null&&(p=C.getSnapshotBeforeUpdate(j,A)),V=b,b!=null&&b.type===lo&&b.key==null&&(V=T6(b.props.children)),s=_6(t,xg(V)?V:[V],e,o,n,i,r,a,s,l,d),C.base=e.__e,e.__u&=-161,C.__h.length&&a.push(C),I&&(C.__E=C.__=null)}catch(g){if(e.__v=null,l||r!=null)if(g.then){for(e.__u|=l?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;r[r.indexOf(s)]=null,e.__e=s}else for(E=r.length;E--;)IA(r[E]);else e.__e=o.__e,e.__k=o.__k;De.__e(g,e,o)}else r==null&&e.__v==o.__v?(e.__k=o.__k,e.__e=o.__e):s=e.__e=ttt(o.__e,e,o,n,i,r,a,l,d);return(b=De.diffed)&&b(e),128&e.__u?void 0:s}function C6(t,e,o){for(var n=0;n<o.length;n++)$A(o[n],o[++n],o[++n]);De.__c&&De.__c(e,t),t.some(function(i){try{t=i.__h,i.__h=[],t.some(function(r){r.call(i)})}catch(r){De.__e(r,i.__v)}})}function T6(t){return typeof t!="object"||t==null||t.__b&&t.__b>0?t:xg(t)?t.map(T6):fs({},t)}function ttt(t,e,o,n,i,r,a,s,l){var d,b,C,u,j,A,p,I=o.props,W=e.props,q=e.type;if(q=="svg"?i="http://www.w3.org/2000/svg":q=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),r!=null){for(d=0;d<r.length;d++)if((j=r[d])&&"setAttribute"in j==!!q&&(q?j.localName==q:j.nodeType==3)){t=j,r[d]=null;break}}if(t==null){if(q==null)return document.createTextNode(W);t=document.createElementNS(i,q,W.is&&W),s&&(De.__m&&De.__m(e,r),s=!1),r=null}if(q==null)I===W||s&&t.data==W||(t.data=W);else{if(r=r&&bg.call(t.childNodes),I=o.props||pm,!s&&r!=null)for(I={},d=0;d<t.attributes.length;d++)I[(j=t.attributes[d]).name]=j.value;for(d in I)if(j=I[d],d!="children"){if(d=="dangerouslySetInnerHTML")C=j;else if(!(d in W)){if(d=="value"&&"defaultValue"in W||d=="checked"&&"defaultChecked"in W)continue;R0(t,d,null,j,i)}}for(d in W)j=W[d],d=="children"?u=j:d=="dangerouslySetInnerHTML"?b=j:d=="value"?A=j:d=="checked"?p=j:s&&typeof j!="function"||I[d]===j||R0(t,d,j,I[d],i);if(b)s||C&&(b.__html==C.__html||b.__html==t.innerHTML)||(t.innerHTML=b.__html),e.__k=[];else if(C&&(t.innerHTML=""),_6(e.type=="template"?t.content:t,xg(u)?u:[u],e,o,n,q=="foreignObject"?"http://www.w3.org/1999/xhtml":i,r,a,r?r[0]:o.__k&&sp(o,0),s,l),r!=null)for(d=r.length;d--;)IA(r[d]);s||(d="value",q=="progress"&&A==null?t.removeAttribute("value"):A!=null&&(A!==t[d]||q=="progress"&&!A||q=="option"&&A!=I[d])&&R0(t,d,A,I[d],i),d="checked",p!=null&&p!=t[d]&&R0(t,d,p,I[d],i))}return t}function $A(t,e,o){try{if(typeof t=="function"){var n=typeof t.__u=="function";n&&t.__u(),n&&e==null||(t.__u=t(e))}else t.current=e}catch(i){De.__e(i,o)}}function M6(t,e,o){var n,i;if(De.unmount&&De.unmount(t),(n=t.ref)&&(n.current&&n.current!=t.__e||$A(n,null,e)),(n=t.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(r){De.__e(r,e)}n.base=n.__P=null}if(n=t.__k)for(i=0;i<n.length;i++)n[i]&&M6(n[i],e,o||typeof t.type!="function");o||IA(t.__e),t.__c=t.__=t.__e=void 0}function ett(t,e,o){return this.constructor(t,o)}function lp(t,e,o){var n,i,r,a;e==document&&(e=document.documentElement),De.__&&De.__(t,e),i=(n=typeof o=="function")?null:o&&o.__k||e.__k,r=[],a=[],jA(e,t=(!n&&o||e).__k=Re(lo,null,[t]),i||pm,pm,e.namespaceURI,!n&&o?[o]:i?null:e.firstChild?bg.call(e.childNodes):null,r,!n&&o?o:i?i.__e:e.firstChild,n,a),C6(r,t,a)}function k6(t,e){lp(t,e,k6)}function ott(t,e,o){var n,i,r,a,s=fs({},t.props);for(r in t.type&&t.type.defaultProps&&(a=t.type.defaultProps),e)r=="key"?n=e[r]:r=="ref"?i=e[r]:s[r]=e[r]===void 0&&a!=null?a[r]:e[r];return arguments.length>2&&(s.children=arguments.length>3?bg.call(arguments,2):o),Hf(t.type,s,n||t.key,i||t.ref,null)}function uo(t){function e(o){var n,i;return this.getChildContext||(n=new Set,(i={})[e.__c]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(r){this.props.value!=r.value&&n.forEach(function(a){a.__e=!0,k2(a)})},this.sub=function(r){n.add(r);var a=r.componentWillUnmount;r.componentWillUnmount=function(){n&&n.delete(r),a&&a.call(r)}}),o.children}return e.__c="__cC"+b6++,e.__=t,e.Provider=e.__l=(e.Consumer=function(o,n){return o.children(n)}).contextType=e,e}bg=x6.slice,De={__e:function(t,e,o,n){for(var i,r,a;e=e.__;)if((i=e.__c)&&!i.__)try{if((r=i.constructor)&&r.getDerivedStateFromError!=null&&(i.setState(r.getDerivedStateFromError(t)),a=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,n||{}),a=i.__d),a)return i.__E=i}catch(s){t=s}throw t}},m6=0,ii.prototype.setState=function(t,e){var o;o=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=fs({},this.state),typeof t=="function"&&(t=t(fs({},o),this.props)),t&&fs(o,t),t!=null&&this.__v&&(e&&this._sb.push(e),k2(this))},ii.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),k2(this))},ii.prototype.render=lo,Xc=[],g6=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,v6=function(t,e){return t.__v.__b-e.__v.__b},Dy.__r=0,y6=/(PointerCapture)$|Capture$/i,RA=0,T2=V3(!1),M2=V3(!0),b6=0;var al,Qo,S_,U3,cp=0,A6=[],Mn=De,G3=Mn.__b,Y3=Mn.__r,X3=Mn.diffed,q3=Mn.__c,Z3=Mn.unmount,K3=Mn.__;function Mu(t,e){Mn.__h&&Mn.__h(Qo,t,cp||e),cp=0;var o=Qo.__H||(Qo.__H={__:[],__h:[]});return t>=o.__.length&&o.__.push({}),o.__[t]}function le(t){return cp=1,ku(E6,t)}function ku(t,e,o){var n=Mu(al++,2);if(n.t=t,!n.__c&&(n.__=[o?o(e):E6(void 0,e),function(s){var l=n.__N?n.__N[0]:n.__[0],d=n.t(l,s);l!==d&&(n.__N=[d,n.__[1]],n.__c.setState({}))}],n.__c=Qo,!Qo.__f)){var i=function(s,l,d){if(!n.__c.__H)return!0;var b=n.__c.__H.__.filter(function(u){return!!u.__c});if(b.every(function(u){return!u.__N}))return!r||r.call(this,s,l,d);var C=n.__c.props!==s;return b.forEach(function(u){if(u.__N){var j=u.__[0];u.__=u.__N,u.__N=void 0,j!==u.__[0]&&(C=!0)}}),r&&r.call(this,s,l,d)||C};Qo.__f=!0;var r=Qo.shouldComponentUpdate,a=Qo.componentWillUpdate;Qo.componentWillUpdate=function(s,l,d){if(this.__e){var b=r;r=void 0,i(s,l,d),r=b}a&&a.call(this,s,l,d)},Qo.shouldComponentUpdate=i}return n.__N||n.__}function ae(t,e){var o=Mu(al++,3);!Mn.__s&&BA(o.__H,e)&&(o.__=t,o.u=e,Qo.__H.__h.push(o))}function Pi(t,e){var o=Mu(al++,4);!Mn.__s&&BA(o.__H,e)&&(o.__=t,o.u=e,Qo.__h.push(o))}function Yt(t){return cp=5,he(function(){return{current:t}},[])}function fi(t,e,o){cp=6,Pi(function(){if(typeof t=="function"){var n=t(e());return function(){t(null),n&&typeof n=="function"&&n()}}if(t)return t.current=e(),function(){return t.current=null}},o==null?o:o.concat(t))}function he(t,e){var o=Mu(al++,7);return BA(o.__H,e)&&(o.__=t(),o.__H=e,o.__h=t),o.__}function me(t,e){return cp=8,he(function(){return t},e)}function eo(t){var e=Qo.context[t.__c],o=Mu(al++,9);return o.c=t,e?(o.__==null&&(o.__=!0,e.sub(Qo)),e.props.value):t.__}function Wp(t,e){Mn.useDebugValue&&Mn.useDebugValue(e?e(t):t)}function ntt(t){var e=Mu(al++,10),o=le();return e.__=t,Qo.componentDidCatch||(Qo.componentDidCatch=function(n,i){e.__&&e.__(n,i),o[1](n)}),[o[0],function(){o[1](void 0)}]}function zA(){var t=Mu(al++,11);if(!t.__){for(var e=Qo.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var o=e.__m||(e.__m=[0,0]);t.__="P"+o[0]+"-"+o[1]++}return t.__}function itt(){for(var t;t=A6.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Xv),t.__H.__h.forEach(A2),t.__H.__h=[]}catch(e){t.__H.__h=[],Mn.__e(e,t.__v)}}Mn.__b=function(t){Qo=null,G3&&G3(t)},Mn.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),K3&&K3(t,e)},Mn.__r=function(t){Y3&&Y3(t),al=0;var e=(Qo=t.__c).__H;e&&(S_===Qo?(e.__h=[],Qo.__h=[],e.__.forEach(function(o){o.__N&&(o.__=o.__N),o.u=o.__N=void 0})):(e.__h.forEach(Xv),e.__h.forEach(A2),e.__h=[],al=0)),S_=Qo},Mn.diffed=function(t){X3&&X3(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(A6.push(e)!==1&&U3===Mn.requestAnimationFrame||((U3=Mn.requestAnimationFrame)||rtt)(itt)),e.__H.__.forEach(function(o){o.u&&(o.__H=o.u),o.u=void 0})),S_=Qo=null},Mn.__c=function(t,e){e.some(function(o){try{o.__h.forEach(Xv),o.__h=o.__h.filter(function(n){return!n.__||A2(n)})}catch(n){e.some(function(i){i.__h&&(i.__h=[])}),e=[],Mn.__e(n,o.__v)}}),q3&&q3(t,e)},Mn.unmount=function(t){Z3&&Z3(t);var e,o=t.__c;o&&o.__H&&(o.__H.__.forEach(function(n){try{Xv(n)}catch(i){e=i}}),o.__H=void 0,e&&Mn.__e(e,o.__v))};var J3=typeof requestAnimationFrame=="function";function rtt(t){var e,o=function(){clearTimeout(n),J3&&cancelAnimationFrame(e),setTimeout(t)},n=setTimeout(o,35);J3&&(e=requestAnimationFrame(o))}function Xv(t){var e=Qo,o=t.__c;typeof o=="function"&&(t.__c=void 0,o()),Qo=e}function A2(t){var e=Qo;t.__c=t.__(),Qo=e}function BA(t,e){return!t||t.length!==e.length||e.some(function(o,n){return o!==t[n]})}function E6(t,e){return typeof e=="function"?e(t):e}var att=0;function At(t,e,o,n,i,r){e||(e={});var a,s,l=e;if("ref"in l)for(s in l={},e)s=="ref"?a=e[s]:l[s]=e[s];var d={type:t,props:l,key:o,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--att,__i:-1,__u:0,__source:i,__self:r};if(typeof t=="function"&&(a=t.defaultProps))for(s in a)l[s]===void 0&&(l[s]=a[s]);return De.vnode&&De.vnode(d),d}function P6(t,e){for(var o in e)t[o]=e[o];return t}function E2(t,e){for(var o in t)if(o!=="__source"&&!(o in e))return!0;for(var n in e)if(n!=="__source"&&t[n]!==e[n])return!0;return!1}function FA(t,e){var o=e(),n=le({t:{__:o,u:e}}),i=n[0].t,r=n[1];return Pi(function(){i.__=o,i.u=e,C_(i)&&r({t:i})},[t,o,e]),ae(function(){return C_(i)&&r({t:i}),t(function(){C_(i)&&r({t:i})})},[t]),o}function C_(t){var e,o,n=t.u,i=t.__;try{var r=n();return!((e=i)===(o=r)&&(e!==0||1/e==1/o)||e!=e&&o!=o)}catch{return!0}}function HA(t){t()}function WA(t){return t}function VA(){return[!1,HA]}var UA=Pi;function Or(t,e){this.props=t,this.context=e}function Au(t,e){function o(i){var r=this.props.ref,a=r==i.ref;return!a&&r&&(r.call?r(null):r.current=null),e?!e(this.props,i)||!a:E2(this.props,i)}function n(i){return this.shouldComponentUpdate=o,Re(t,i)}return n.displayName="Memo("+(t.displayName||t.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(Or.prototype=new ii).isPureReactComponent=!0,Or.prototype.shouldComponentUpdate=function(t,e){return E2(this.props,t)||E2(this.state,e)};var Q3=De.__b;De.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),Q3&&Q3(t)};var stt=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ye(t){function e(o){var n=P6({},o);return delete n.ref,t(n,o.ref||null)}return e.$$typeof=stt,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var tN=function(t,e){return t==null?null:tl(tl(t).map(e))},ki={map:tN,forEach:tN,count:function(t){return t?tl(t).length:0},only:function(t){var e=tl(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:tl},ltt=De.__e;De.__e=function(t,e,o,n){if(t.then){for(var i,r=e;r=r.__;)if((i=r.__c)&&i.__c)return e.__e==null&&(e.__e=o.__e,e.__k=o.__k),i.__c(t,e)}ltt(t,e,o,n)};var eN=De.unmount;function O6(t,e,o){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),t.__c.__H=null),(t=P6({},t)).__c!=null&&(t.__c.__P===o&&(t.__c.__P=e),t.__c.__e=!0,t.__c=null),t.__k=t.__k&&t.__k.map(function(n){return O6(n,e,o)})),t}function L6(t,e,o){return t&&o&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(n){return L6(n,e,o)}),t.__c&&t.__c.__P===e&&(t.__e&&o.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=o)),t}function Wf(){this.__u=0,this.o=null,this.__b=null}function N6(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function D6(t){var e,o,n;function i(r){if(e||(e=t()).then(function(a){o=a.default||a},function(a){n=a}),n)throw n;if(!o)throw e;return Re(o,r)}return i.displayName="Lazy",i.__f=!0,i}function jd(){this.i=null,this.l=null}De.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),eN&&eN(t)},(Wf.prototype=new ii).__c=function(t,e){var o=e.__c,n=this;n.o==null&&(n.o=[]),n.o.push(o);var i=N6(n.__v),r=!1,a=function(){r||(r=!0,o.__R=null,i?i(s):s())};o.__R=a;var s=function(){if(!--n.__u){if(n.state.__a){var l=n.state.__a;n.__v.__k[0]=L6(l,l.__c.__P,l.__c.__O)}var d;for(n.setState({__a:n.__b=null});d=n.o.pop();)d.forceUpdate()}};n.__u++||32&e.__u||n.setState({__a:n.__b=n.__v.__k[0]}),t.then(a,a)},Wf.prototype.componentWillUnmount=function(){this.o=[]},Wf.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var o=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=O6(this.__b,o,n.__O=n.__P)}this.__b=null}var i=e.__a&&Re(lo,null,t.fallback);return i&&(i.__u&=-33),[Re(lo,null,e.__a?null:t.children),i]};var oN=function(t,e,o){if(++o[1]===o[0]&&t.l.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.l.size))for(o=t.i;o;){for(;o.length>3;)o.pop()();if(o[1]<o[0])break;t.i=o=o[2]}};function ctt(t){return this.getChildContext=function(){return t.context},t.children}function utt(t){var e=this,o=t.h;if(e.componentWillUnmount=function(){lp(null,e.v),e.v=null,e.h=null},e.h&&e.h!==o&&e.componentWillUnmount(),!e.v){for(var n=e.__v;n!==null&&!n.__m&&n.__!==null;)n=n.__;e.h=o,e.v={nodeType:1,parentNode:o,childNodes:[],__k:{__m:n.__m},contains:function(){return!0},insertBefore:function(i,r){this.childNodes.push(i),e.h.insertBefore(i,r)},removeChild:function(i){this.childNodes.splice(this.childNodes.indexOf(i)>>>1,1),e.h.removeChild(i)}}}lp(Re(ctt,{context:e.context},t.__v),e.v)}function Vp(t,e){var o=Re(utt,{__v:t,h:e});return o.containerInfo=e,o}(jd.prototype=new ii).__a=function(t){var e=this,o=N6(e.__v),n=e.l.get(t);return n[0]++,function(i){var r=function(){e.props.revealOrder?(n.push(i),oN(e,t,n)):i()};o?o(r):r()}},jd.prototype.render=function(t){this.i=null,this.l=new Map;var e=tl(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var o=e.length;o--;)this.l.set(e[o],this.i=[1,0,this.i]);return t.children},jd.prototype.componentDidUpdate=jd.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,o){oN(t,o,e)})};var R6=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,dtt=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,ptt=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,htt=/[A-Z0-9]/g,ftt=typeof document<"u",mtt=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function I6(t,e,o){return e.__k==null&&(e.textContent=""),lp(t,e),typeof o=="function"&&o(),t?t.__c:null}function j6(t,e,o){return k6(t,e),typeof o=="function"&&o(),t?t.__c:null}ii.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(ii.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var nN=De.event;function gtt(){}function vtt(){return this.cancelBubble}function ytt(){return this.defaultPrevented}De.event=function(t){return nN&&(t=nN(t)),t.persist=gtt,t.isPropagationStopped=vtt,t.isDefaultPrevented=ytt,t.nativeEvent=t};var GA,btt={enumerable:!1,configurable:!0,get:function(){return this.class}},iN=De.vnode;De.vnode=function(t){typeof t.type=="string"&&function(e){var o=e.props,n=e.type,i={},r=n.indexOf("-")===-1;for(var a in o){var s=o[a];if(!(a==="value"&&"defaultValue"in o&&s==null||ftt&&a==="children"&&n==="noscript"||a==="class"||a==="className")){var l=a.toLowerCase();a==="defaultValue"&&"value"in o&&o.value==null?a="value":a==="download"&&s===!0?s="":l==="translate"&&s==="no"?s=!1:l[0]==="o"&&l[1]==="n"?l==="ondoubleclick"?a="ondblclick":l!=="onchange"||n!=="input"&&n!=="textarea"||mtt(o.type)?l==="onfocus"?a="onfocusin":l==="onblur"?a="onfocusout":ptt.test(a)&&(a=l):l=a="oninput":r&&dtt.test(a)?a=a.replace(htt,"-$&").toLowerCase():s===null&&(s=void 0),l==="oninput"&&i[a=l]&&(a="oninputCapture"),i[a]=s}}n=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=tl(o.children).forEach(function(d){d.props.selected=i.value.indexOf(d.props.value)!=-1})),n=="select"&&i.defaultValue!=null&&(i.value=tl(o.children).forEach(function(d){d.props.selected=i.multiple?i.defaultValue.indexOf(d.props.value)!=-1:i.defaultValue==d.props.value})),o.class&&!o.className?(i.class=o.class,Object.defineProperty(i,"className",btt)):(o.className&&!o.class||o.class&&o.className)&&(i.class=i.className=o.className),e.props=i}(t),t.$$typeof=R6,iN&&iN(t)};var rN=De.__r;De.__r=function(t){rN&&rN(t),GA=t.__c};var aN=De.diffed;De.diffed=function(t){aN&&aN(t);var e=t.props,o=t.__e;o!=null&&t.type==="textarea"&&"value"in e&&e.value!==o.value&&(o.value=e.value==null?"":e.value),GA=null};var $6={ReactCurrentDispatcher:{current:{readContext:function(t){return GA.__n[t.__c].props.value},useCallback:me,useContext:eo,useDebugValue:Wp,useDeferredValue:WA,useEffect:ae,useId:zA,useImperativeHandle:fi,useInsertionEffect:UA,useLayoutEffect:Pi,useMemo:he,useReducer:ku,useRef:Yt,useState:le,useSyncExternalStore:FA,useTransition:VA}}},s1="18.3.1";function z6(t){return Re.bind(null,t)}function io(t){return!!t&&t.$$typeof===R6}function B6(t){return io(t)&&t.type===lo}function F6(t){return!!t&&!!t.displayName&&(typeof t.displayName=="string"||t.displayName instanceof String)&&t.displayName.startsWith("Memo(")}function fo(t){return io(t)?ott.apply(null,arguments):t}function H6(t){return!!t.__k&&(lp(null,t),!0)}function W6(t){return t&&(t.base||t.nodeType===1&&t)||null}var YA=function(t,e){return t(e)},XA=function(t,e){return t(e)},V6=lo,U6=io,Kt={useState:le,useId:zA,useReducer:ku,useEffect:ae,useLayoutEffect:Pi,useInsertionEffect:UA,useTransition:VA,useDeferredValue:WA,useSyncExternalStore:FA,startTransition:HA,useRef:Yt,useImperativeHandle:fi,useMemo:he,useCallback:me,useContext:eo,useDebugValue:Wp,version:"18.3.1",Children:ki,render:I6,hydrate:j6,unmountComponentAtNode:H6,createPortal:Vp,createElement:Re,createContext:uo,createFactory:z6,cloneElement:fo,createRef:a1,Fragment:lo,isValidElement:io,isElement:U6,isFragment:B6,isMemo:F6,findDOMNode:W6,Component:ii,PureComponent:Or,memo:Au,forwardRef:ye,flushSync:XA,unstable_batchedUpdates:YA,StrictMode:V6,Suspense:Wf,SuspenseList:jd,lazy:D6,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:$6};const Kl=Object.freeze(Object.defineProperty({__proto__:null,Children:ki,Component:ii,Fragment:lo,PureComponent:Or,StrictMode:V6,Suspense:Wf,SuspenseList:jd,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:$6,cloneElement:fo,createContext:uo,createElement:Re,createFactory:z6,createPortal:Vp,createRef:a1,default:Kt,findDOMNode:W6,flushSync:XA,forwardRef:ye,hydrate:j6,isElement:U6,isFragment:B6,isMemo:F6,isValidElement:io,lazy:D6,memo:Au,render:I6,startTransition:HA,unmountComponentAtNode:H6,unstable_batchedUpdates:YA,useCallback:me,useContext:eo,useDebugValue:Wp,useDeferredValue:WA,useEffect:ae,useErrorBoundary:ntt,useId:zA,useImperativeHandle:fi,useInsertionEffect:UA,useLayoutEffect:Pi,useMemo:he,useReducer:ku,useRef:Yt,useState:le,useSyncExternalStore:FA,useTransition:VA,version:s1},Symbol.toStringTag,{value:"Module"}));var sN=/[\s\n\\/='"\0<>]/,lN=/^(xlink|xmlns|xml)([A-Z])/,xtt=/^(?:accessK|auto[A-Z]|cell|ch|col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|popoverT|readO|rowS|src[A-Z]|tabI|useM|item[A-Z])/,wtt=/^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/,_tt=new Set(["draggable","spellcheck"]),Stt=/["&<]/;function I0(t){if(t.length===0||Stt.test(t)===!1)return t;for(var e=0,o=0,n="",i="";o<t.length;o++){switch(t.charCodeAt(o)){case 34:i=""";break;case 38:i="&";break;case 60:i="<";break;default:continue}o!==e&&(n+=t.slice(e,o)),n+=i,e=o+1}return o!==e&&(n+=t.slice(e,o)),n}var cN={},Ctt=new Set(["animation-iteration-count","border-image-outset","border-image-slice","border-image-width","box-flex","box-flex-group","box-ordinal-group","column-count","fill-opacity","flex","flex-grow","flex-negative","flex-order","flex-positive","flex-shrink","flood-opacity","font-weight","grid-column","grid-row","line-clamp","line-height","opacity","order","orphans","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","widows","z-index","zoom"]),Ttt=/[A-Z]/g;function Mtt(t){var e="";for(var o in t){var n=t[o];if(n!=null&&n!==""){var i=o[0]=="-"?o:cN[o]||(cN[o]=o.replace(Ttt,"-$&").toLowerCase()),r=";";typeof n!="number"||i.startsWith("--")||Ctt.has(i)||(r="px;"),e=e+i+":"+n+r}}return e||void 0}function uN(){this.__d=!0}function ktt(t,e){return{__v:t,context:e,props:t.props,setState:uN,forceUpdate:uN,__d:!0,__h:new Array(0)}}var P2,Bc,hm,yf,qA={},dN=[],bf=Array.isArray,O2=Object.assign,Yi="";function pN(t,e,o){var n=De.__s;De.__s=!0,P2=De.__b,Bc=De.diffed,hm=De.__r,yf=De.unmount;var i=Re(lo,null);i.__k=[t];try{var r=Qa(t,e||qA,!1,void 0,i,!1,o);return bf(r)?r.join(Yi):r}catch(a){throw a.then?new Error('Use "renderToStringAsync" for suspenseful rendering.'):a}finally{De.__c&&De.__c(t,dN),De.__s=n,dN.length=0}}function hN(t,e){var o,n=t.type,i=!0;return t.__c?(i=!1,(o=t.__c).state=o.__s):o=new n(t.props,e),t.__c=o,o.__v=t,o.props=t.props,o.context=e,o.__d=!0,o.state==null&&(o.state=qA),o.__s==null&&(o.__s=o.state),n.getDerivedStateFromProps?o.state=O2({},o.state,n.getDerivedStateFromProps(o.props,o.state)):i&&o.componentWillMount?(o.componentWillMount(),o.state=o.__s!==o.state?o.__s:o.state):!i&&o.componentWillUpdate&&o.componentWillUpdate(),hm&&hm(t),o.render(o.props,o.state,e)}function Qa(t,e,o,n,i,r,a){if(t==null||t===!0||t===!1||t===Yi)return Yi;var s=typeof t;if(s!="object")return s=="function"?Yi:s=="string"?I0(t):t+Yi;if(bf(t)){var l,d=Yi;i.__k=t;for(var b=t.length,C=0;C<b;C++){var u=t[C];if(u!=null&&typeof u!="boolean"){var j,A=Qa(u,e,o,n,i,r,a);typeof A=="string"?d+=A:(l||(l=new Array(b)),d&&l.push(d),d=Yi,bf(A)?(j=l).push.apply(j,A):l.push(A))}}return l?(d&&l.push(d),l):d}if(t.constructor!==void 0)return Yi;t.__=i,P2&&P2(t);var p=t.type,I=t.props;if(typeof p=="function"){var W,q,X,H=e;if(p===lo){if("tpl"in I){for(var D=Yi,$=0;$<I.tpl.length;$++)if(D+=I.tpl[$],I.exprs&&$<I.exprs.length){var z=I.exprs[$];if(z==null)continue;typeof z!="object"||z.constructor!==void 0&&!bf(z)?D+=z:D+=Qa(z,e,o,n,t,r,a)}return D}if("UNSTABLE_comment"in I)return"<!--"+I0(I.UNSTABLE_comment)+"-->";q=I.children}else{if((W=p.contextType)!=null){var N=e[W.__c];H=N?N.props.value:W.__}var V=p.prototype&&typeof p.prototype.render=="function";if(V)q=hN(t,H),X=t.__c;else{t.__c=X=ktt(t,H);for(var E=0;X.__d&&E++<25;)X.__d=!1,hm&&hm(t),q=p.call(X,I,H);X.__d=!0}if(X.getChildContext!=null&&(e=O2({},e,X.getChildContext())),V&&De.errorBoundaries&&(p.getDerivedStateFromError||X.componentDidCatch)){q=q!=null&&q.type===lo&&q.key==null&&q.props.tpl==null?q.props.children:q;try{return Qa(q,e,o,n,t,r,a)}catch(y){return p.getDerivedStateFromError&&(X.__s=p.getDerivedStateFromError(y)),X.componentDidCatch&&X.componentDidCatch(y,qA),X.__d?(q=hN(t,e),(X=t.__c).getChildContext!=null&&(e=O2({},e,X.getChildContext())),Qa(q=q!=null&&q.type===lo&&q.key==null&&q.props.tpl==null?q.props.children:q,e,o,n,t,r,a)):Yi}finally{Bc&&Bc(t),yf&&yf(t)}}}q=q!=null&&q.type===lo&&q.key==null&&q.props.tpl==null?q.props.children:q;try{var x=Qa(q,e,o,n,t,r,a);return Bc&&Bc(t),De.unmount&&De.unmount(t),x}catch(y){if(!r&&a&&a.onError){var g=a.onError(y,t,function(v,c){return Qa(v,e,o,n,c,r,a)});if(g!==void 0)return g;var S=De.__e;return S&&S(y,t),Yi}if(!r||!y||typeof y.then!="function")throw y;return y.then(function v(){try{return Qa(q,e,o,n,t,r,a)}catch(c){if(!c||typeof c.then!="function")throw c;return c.then(function(){return Qa(q,e,o,n,t,r,a)},v)}})}}var w,P="<"+p,U=Yi;for(var Z in I){var B=I[Z];if(typeof B!="function"||Z==="class"||Z==="className"){switch(Z){case"children":w=B;continue;case"key":case"ref":case"__self":case"__source":continue;case"htmlFor":if("for"in I)continue;Z="for";break;case"className":if("class"in I)continue;Z="class";break;case"defaultChecked":Z="checked";break;case"defaultSelected":Z="selected";break;case"defaultValue":case"value":switch(Z="value",p){case"textarea":w=B;continue;case"select":n=B;continue;case"option":n!=B||"selected"in I||(P+=" selected")}break;case"dangerouslySetInnerHTML":U=B&&B.__html;continue;case"style":typeof B=="object"&&(B=Mtt(B));break;case"acceptCharset":Z="accept-charset";break;case"httpEquiv":Z="http-equiv";break;default:if(lN.test(Z))Z=Z.replace(lN,"$1:$2").toLowerCase();else{if(sN.test(Z))continue;Z[4]!=="-"&&!_tt.has(Z)||B==null?o?wtt.test(Z)&&(Z=Z==="panose1"?"panose-1":Z.replace(/([A-Z])/g,"-$1").toLowerCase()):xtt.test(Z)&&(Z=Z.toLowerCase()):B+=Yi}}B!=null&&B!==!1&&(P=B===!0||B===Yi?P+" "+Z:P+" "+Z+'="'+(typeof B=="string"?I0(B):B+Yi)+'"')}}if(sN.test(p))throw new Error(p+" is not a valid HTML tag name in "+P+">");if(U||(typeof w=="string"?U=I0(w):w!=null&&w!==!1&&w!==!0&&(U=Qa(w,e,p==="svg"||p!=="foreignObject"&&o,n,t,r,a))),Bc&&Bc(t),yf&&yf(t),!U&&Att.has(p))return P+"/>";var k="</"+p+">",M=P+">";return bf(U)?[M].concat(U,[k]):typeof U!="string"?[M,U,k]:M+U+k}var Att=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);const G6={renderToString:pN,renderToStaticMarkup:pN};var Ett=Object.defineProperty,Ptt=Object.defineProperties,Ott=Object.getOwnPropertyDescriptors,Ry=Object.getOwnPropertySymbols,Y6=Object.prototype.hasOwnProperty,X6=Object.prototype.propertyIsEnumerable,xe=Math.pow,L2=(t,e,o)=>e in t?Ett(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,jt=(t,e)=>{for(var o in e||(e={}))Y6.call(e,o)&&L2(t,o,e[o]);if(Ry)for(var o of Ry(e))X6.call(e,o)&&L2(t,o,e[o]);return t},Zt=(t,e)=>Ptt(t,Ott(e)),ja=(t,e)=>{var o={};for(var n in t)Y6.call(t,n)&&e.indexOf(n)<0&&(o[n]=t[n]);if(t!=null&&Ry)for(var n of Ry(t))e.indexOf(n)<0&&X6.call(t,n)&&(o[n]=t[n]);return o},fN=(t,e,o)=>(L2(t,typeof e!="symbol"?e+"":e,o),o),$d=(t,e,o)=>new Promise((n,i)=>{var r=l=>{try{s(o.next(l))}catch(d){i(d)}},a=l=>{try{s(o.throw(l))}catch(d){i(d)}},s=l=>l.done?n(l.value):Promise.resolve(l.value).then(r,a);s((o=o.apply(t,e)).next())});const Ltt={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console&&console[t]&&console[t].apply(console,e)}};let Ntt=class N2{constructor(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,o)}init(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=o.prefix||"i18next:",this.logger=e||Ltt,this.options=o,this.debug=o.debug}log(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return this.forward(o,"log","",!0)}warn(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return this.forward(o,"warn","",!0)}error(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return this.forward(o,"error","")}deprecate(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return this.forward(o,"warn","WARNING DEPRECATED: ",!0)}forward(e,o,n,i){return i&&!this.debug?null:(typeof e[0]=="string"&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[o](e))}create(e){return new N2(this.logger,jt({prefix:`${this.prefix}:${e}:`},this.options))}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new N2(this.logger,e)}};var ms=new Ntt;class l1{constructor(){this.observers={}}on(e,o){return e.split(" ").forEach(n=>{this.observers[n]=this.observers[n]||[],this.observers[n].push(o)}),this}off(e,o){if(this.observers[e]){if(!o){delete this.observers[e];return}this.observers[e]=this.observers[e].filter(n=>n!==o)}}emit(e){for(var o=arguments.length,n=new Array(o>1?o-1:0),i=1;i<o;i++)n[i-1]=arguments[i];this.observers[e]&&[].concat(this.observers[e]).forEach(r=>{r(...n)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(r=>{r.apply(r,[e,...n])})}}function Nh(){let t,e;const o=new Promise((n,i)=>{t=n,e=i});return o.resolve=t,o.reject=e,o}function mN(t){return t==null?"":""+t}function Dtt(t,e,o){t.forEach(n=>{e[n]&&(o[n]=e[n])})}function ZA(t,e,o){function n(a){return a&&a.indexOf("###")>-1?a.replace(/###/g,"."):a}function i(){return!t||typeof t=="string"}const r=typeof e!="string"?[].concat(e):e.split(".");for(;r.length>1;){if(i())return{};const a=n(r.shift());!t[a]&&o&&(t[a]=new o),Object.prototype.hasOwnProperty.call(t,a)?t=t[a]:t={}}return i()?{}:{obj:t,k:n(r.shift())}}function gN(t,e,o){const{obj:n,k:i}=ZA(t,e,Object);n[i]=o}function Rtt(t,e,o,n){const{obj:i,k:r}=ZA(t,e,Object);i[r]=i[r]||[],i[r].push(o)}function Iy(t,e){const{obj:o,k:n}=ZA(t,e);if(o)return o[n]}function Itt(t,e,o){const n=Iy(t,o);return n!==void 0?n:Iy(e,o)}function q6(t,e,o){for(const n in e)n!=="__proto__"&&n!=="constructor"&&(n in t?typeof t[n]=="string"||t[n]instanceof String||typeof e[n]=="string"||e[n]instanceof String?o&&(t[n]=e[n]):q6(t[n],e[n],o):t[n]=e[n]);return t}function od(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var jtt={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function $tt(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,e=>jtt[e]):t}const ztt=[" ",",","?","!",";"];function Btt(t,e,o){e=e||"",o=o||"";const n=ztt.filter(a=>e.indexOf(a)<0&&o.indexOf(a)<0);if(n.length===0)return!0;const i=new RegExp(`(${n.map(a=>a==="?"?"\\?":a).join("|")})`);let r=!i.test(t);if(!r){const a=t.indexOf(o);a>0&&!i.test(t.substring(0,a))&&(r=!0)}return r}function jy(t,e){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[e])return t[e];const n=e.split(o);let i=t;for(let r=0;r<n.length;++r){if(!i||typeof i[n[r]]=="string"&&r+1<n.length)return;if(i[n[r]]===void 0){let a=2,s=n.slice(r,r+a).join(o),l=i[s];for(;l===void 0&&n.length>r+a;)a++,s=n.slice(r,r+a).join(o),l=i[s];if(l===void 0)return;if(l===null)return null;if(e.endsWith(s)){if(typeof l=="string")return l;if(s&&typeof l[s]=="string")return l[s]}const d=n.slice(r+a).join(o);return d?jy(l,d,o):void 0}i=i[n[r]]}return i}function $y(t){return t&&t.indexOf("_")>0?t.replace("_","-"):t}let vN=class extends l1{constructor(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=o,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const o=this.options.ns.indexOf(e);o>-1&&this.options.ns.splice(o,1)}getResource(e,o,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const r=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,a=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let s=[e,o];n&&typeof n!="string"&&(s=s.concat(n)),n&&typeof n=="string"&&(s=s.concat(r?n.split(r):n)),e.indexOf(".")>-1&&(s=e.split("."));const l=Iy(this.data,s);return l||!a||typeof n!="string"?l:jy(this.data&&this.data[e]&&this.data[e][o],n,r)}addResource(e,o,n,i){let r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let s=[e,o];n&&(s=s.concat(a?n.split(a):n)),e.indexOf(".")>-1&&(s=e.split("."),i=o,o=s[1]),this.addNamespaces(o),gN(this.data,s,i),r.silent||this.emit("added",e,o,n,i)}addResources(e,o,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const r in n)(typeof n[r]=="string"||Object.prototype.toString.apply(n[r])==="[object Array]")&&this.addResource(e,o,r,n[r],{silent:!0});i.silent||this.emit("added",e,o,n)}addResourceBundle(e,o,n,i,r){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},s=[e,o];e.indexOf(".")>-1&&(s=e.split("."),i=n,n=o,o=s[1]),this.addNamespaces(o);let l=Iy(this.data,s)||{};i?q6(l,n,r):l=jt(jt({},l),n),gN(this.data,s,l),a.silent||this.emit("added",e,o,n)}removeResourceBundle(e,o){this.hasResourceBundle(e,o)&&delete this.data[e][o],this.removeNamespaces(o),this.emit("removed",e,o)}hasResourceBundle(e,o){return this.getResource(e,o)!==void 0}getResourceBundle(e,o){return o||(o=this.options.defaultNS),this.options.compatibilityAPI==="v1"?jt({},this.getResource(e,o)):this.getResource(e,o)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const o=this.getDataByLanguage(e);return!!(o&&Object.keys(o)||[]).find(n=>o[n]&&Object.keys(o[n]).length>0)}toJSON(){return this.data}};var Z6={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,o,n,i){return t.forEach(r=>{this.processors[r]&&(e=this.processors[r].process(e,o,n,i))}),e}};const yN={};let bN=class K6 extends l1{constructor(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Dtt(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=o,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ms.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const n=this.resolve(e,o);return n&&n.res!==void 0}extractFromKey(e,o){let n=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let r=o.ns||this.options.defaultNS||[];const a=n&&e.indexOf(n)>-1,s=!this.options.userDefinedKeySeparator&&!o.keySeparator&&!this.options.userDefinedNsSeparator&&!o.nsSeparator&&!Btt(e,n,i);if(a&&!s){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:r};const d=e.split(n);(n!==i||n===i&&this.options.ns.indexOf(d[0])>-1)&&(r=d.shift()),e=d.join(i)}return typeof r=="string"&&(r=[r]),{key:e,namespaces:r}}translate(e,o,n){if(typeof o!="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),typeof o=="object"&&(o=jt({},o)),o||(o={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const i=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,r=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(e[e.length-1],o),l=s[s.length-1],d=o.lng||this.language,b=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&d.toLowerCase()==="cimode"){if(b){const X=o.nsSeparator||this.options.nsSeparator;return i?{res:`${l}${X}${a}`,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:l}:`${l}${X}${a}`}return i?{res:a,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:l}:a}const C=this.resolve(e,o);let u=C&&C.res;const j=C&&C.usedKey||a,A=C&&C.exactUsedKey||a,p=Object.prototype.toString.apply(u),I=["[object Number]","[object Function]","[object RegExp]"],W=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,q=!this.i18nFormat||this.i18nFormat.handleAsObject;if(q&&u&&typeof u!="string"&&typeof u!="boolean"&&typeof u!="number"&&I.indexOf(p)<0&&!(typeof W=="string"&&p==="[object Array]")){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const X=this.options.returnedObjectHandler?this.options.returnedObjectHandler(j,u,Zt(jt({},o),{ns:s})):`key '${a} (${this.language})' returned an object instead of string.`;return i?(C.res=X,C):X}if(r){const X=p==="[object Array]",H=X?[]:{},D=X?A:j;for(const $ in u)if(Object.prototype.hasOwnProperty.call(u,$)){const z=`${D}${r}${$}`;H[$]=this.translate(z,Zt(jt({},o),{joinArrays:!1,ns:s})),H[$]===z&&(H[$]=u[$])}u=H}}else if(q&&typeof W=="string"&&p==="[object Array]")u=u.join(W),u&&(u=this.extendTranslation(u,e,o,n));else{let X=!1,H=!1;const D=o.count!==void 0&&typeof o.count!="string",$=K6.hasDefaultValue(o),z=D?this.pluralResolver.getSuffix(d,o.count,o):"",N=o.ordinal&&D?this.pluralResolver.getSuffix(d,o.count,{ordinal:!1}):"",V=o[`defaultValue${z}`]||o[`defaultValue${N}`]||o.defaultValue;!this.isValidLookup(u)&&$&&(X=!0,u=V),this.isValidLookup(u)||(H=!0,u=a);const E=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&H?void 0:u,x=$&&V!==u&&this.options.updateMissing;if(H||X||x){if(this.logger.log(x?"updateKey":"missingKey",d,l,a,x?V:u),r){const P=this.resolve(a,Zt(jt({},o),{keySeparator:!1}));P&&P.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let g=[];const S=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&S&&S[0])for(let P=0;P<S.length;P++)g.push(S[P]);else this.options.saveMissingTo==="all"?g=this.languageUtils.toResolveHierarchy(o.lng||this.language):g.push(o.lng||this.language);const w=(P,U,Z)=>{const B=$&&Z!==u?Z:E;this.options.missingKeyHandler?this.options.missingKeyHandler(P,l,U,B,x,o):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(P,l,U,B,x,o),this.emit("missingKey",P,l,U,u)};this.options.saveMissing&&(this.options.saveMissingPlurals&&D?g.forEach(P=>{this.pluralResolver.getSuffixes(P,o).forEach(U=>{w([P],a+U,o[`defaultValue${U}`]||V)})}):w(g,a,V))}u=this.extendTranslation(u,e,o,C,n),H&&u===a&&this.options.appendNamespaceToMissingKey&&(u=`${l}:${a}`),(H||X)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?u=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${a}`:a,X?u:void 0):u=this.options.parseMissingKeyHandler(u))}return i?(C.res=u,C):u}extendTranslation(e,o,n,i,r){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,jt(jt({},this.options.interpolation.defaultVariables),n),i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(Zt(jt({},n),{interpolation:jt(jt({},this.options.interpolation),n.interpolation)}));const d=typeof e=="string"&&(n&&n.interpolation&&n.interpolation.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let b;if(d){const u=e.match(this.interpolator.nestingRegexp);b=u&&u.length}let C=n.replace&&typeof n.replace!="string"?n.replace:n;if(this.options.interpolation.defaultVariables&&(C=jt(jt({},this.options.interpolation.defaultVariables),C)),e=this.interpolator.interpolate(e,C,n.lng||this.language,n),d){const u=e.match(this.interpolator.nestingRegexp),j=u&&u.length;b<j&&(n.nest=!1)}!n.lng&&this.options.compatibilityAPI!=="v1"&&i&&i.res&&(n.lng=i.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var u=arguments.length,j=new Array(u),A=0;A<u;A++)j[A]=arguments[A];return r&&r[0]===j[0]&&!n.context?(a.logger.warn(`It seems you are nesting recursively key: ${j[0]} in key: ${o[0]}`),null):a.translate(...j,o)},n)),n.interpolation&&this.interpolator.reset()}const s=n.postProcess||this.options.postProcess,l=typeof s=="string"?[s]:s;return e!=null&&l&&l.length&&n.applyPostProcessor!==!1&&(e=Z6.handle(l,e,o,this.options&&this.options.postProcessPassResolved?jt({i18nResolved:i},n):n,this)),e}resolve(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,i,r,a,s;return typeof e=="string"&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(n))return;const d=this.extractFromKey(l,o),b=d.key;i=b;let C=d.namespaces;this.options.fallbackNS&&(C=C.concat(this.options.fallbackNS));const u=o.count!==void 0&&typeof o.count!="string",j=u&&!o.ordinal&&o.count===0&&this.pluralResolver.shouldUseIntlApi(),A=o.context!==void 0&&(typeof o.context=="string"||typeof o.context=="number")&&o.context!=="",p=o.lngs?o.lngs:this.languageUtils.toResolveHierarchy(o.lng||this.language,o.fallbackLng);C.forEach(I=>{this.isValidLookup(n)||(s=I,!yN[`${p[0]}-${I}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(s)&&(yN[`${p[0]}-${I}`]=!0,this.logger.warn(`key "${i}" for languages "${p.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach(W=>{if(this.isValidLookup(n))return;a=W;const q=[b];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(q,b,W,I,o);else{let H;u&&(H=this.pluralResolver.getSuffix(W,o.count,o));const D=`${this.options.pluralSeparator}zero`,$=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(q.push(b+H),o.ordinal&&H.indexOf($)===0&&q.push(b+H.replace($,this.options.pluralSeparator)),j&&q.push(b+D)),A){const z=`${b}${this.options.contextSeparator}${o.context}`;q.push(z),u&&(q.push(z+H),o.ordinal&&H.indexOf($)===0&&q.push(z+H.replace($,this.options.pluralSeparator)),j&&q.push(z+D))}}let X;for(;X=q.pop();)this.isValidLookup(n)||(r=X,n=this.getResource(W,I,X,o))}))})}),{res:n,usedKey:i,exactUsedKey:r,usedLng:a,usedNS:s}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,o,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,o,n,i):this.resourceStore.getResource(e,o,n,i)}static hasDefaultValue(e){const o="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&o===n.substring(0,o.length)&&e[n]!==void 0)return!0;return!1}};function T_(t){return t.charAt(0).toUpperCase()+t.slice(1)}let xN=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ms.create("languageUtils")}getScriptPartFromCode(e){if(e=$y(e),!e||e.indexOf("-")<0)return null;const o=e.split("-");return o.length===2||(o.pop(),o[o.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(o.join("-"))}getLanguagePartFromCode(e){if(e=$y(e),!e||e.indexOf("-")<0)return e;const o=e.split("-");return this.formatLanguageCode(o[0])}formatLanguageCode(e){if(typeof e=="string"&&e.indexOf("-")>-1){const o=["hans","hant","latn","cyrl","cans","mong","arab"];let n=e.split("-");return this.options.lowerCaseLng?n=n.map(i=>i.toLowerCase()):n.length===2?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),o.indexOf(n[1].toLowerCase())>-1&&(n[1]=T_(n[1].toLowerCase()))):n.length===3&&(n[0]=n[0].toLowerCase(),n[1].length===2&&(n[1]=n[1].toUpperCase()),n[0]!=="sgn"&&n[2].length===2&&(n[2]=n[2].toUpperCase()),o.indexOf(n[1].toLowerCase())>-1&&(n[1]=T_(n[1].toLowerCase())),o.indexOf(n[2].toLowerCase())>-1&&(n[2]=T_(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let o;return e.forEach(n=>{if(o)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(o=i)}),!o&&this.options.supportedLngs&&e.forEach(n=>{if(o)return;const i=this.getLanguagePartFromCode(n);if(this.isSupportedCode(i))return o=i;o=this.options.supportedLngs.find(r=>{if(r===i||!(r.indexOf("-")<0&&i.indexOf("-")<0)&&r.indexOf(i)===0)return r})}),o||(o=this.getFallbackCodes(this.options.fallbackLng)[0]),o}getFallbackCodes(e,o){if(!e)return[];if(typeof e=="function"&&(e=e(o)),typeof e=="string"&&(e=[e]),Object.prototype.toString.apply(e)==="[object Array]")return e;if(!o)return e.default||[];let n=e[o];return n||(n=e[this.getScriptPartFromCode(o)]),n||(n=e[this.formatLanguageCode(o)]),n||(n=e[this.getLanguagePartFromCode(o)]),n||(n=e.default),n||[]}toResolveHierarchy(e,o){const n=this.getFallbackCodes(o||this.options.fallbackLng||[],e),i=[],r=a=>{a&&(this.isSupportedCode(a)?i.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return typeof e=="string"&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&r(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&r(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&r(this.getLanguagePartFromCode(e))):typeof e=="string"&&r(this.formatLanguageCode(e)),n.forEach(a=>{i.indexOf(a)<0&&r(this.formatLanguageCode(a))}),i}},Ftt=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Htt={1:function(t){return+(t>1)},2:function(t){return+(t!=1)},3:function(t){return 0},4:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},5:function(t){return t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5},6:function(t){return t==1?0:t>=2&&t<=4?1:2},7:function(t){return t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},8:function(t){return t==1?0:t==2?1:t!=8&&t!=11?2:3},9:function(t){return+(t>=2)},10:function(t){return t==1?0:t==2?1:t<7?2:t<11?3:4},11:function(t){return t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3},12:function(t){return+(t%10!=1||t%100==11)},13:function(t){return+(t!==0)},14:function(t){return t==1?0:t==2?1:t==3?2:3},15:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2},16:function(t){return t%10==1&&t%100!=11?0:t!==0?1:2},17:function(t){return t==1||t%10==1&&t%100!=11?0:1},18:function(t){return t==0?0:t==1?1:2},19:function(t){return t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3},20:function(t){return t==1?0:t==0||t%100>0&&t%100<20?1:2},21:function(t){return t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0},22:function(t){return t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3}};const Wtt=["v1","v2","v3"],Vtt=["v4"],wN={zero:0,one:1,two:2,few:3,many:4,other:5};function Utt(){const t={};return Ftt.forEach(e=>{e.lngs.forEach(o=>{t[o]={numbers:e.nr,plurals:Htt[e.fc]}})}),t}let Gtt=class{constructor(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=o,this.logger=ms.create("pluralResolver"),(!this.options.compatibilityJSON||Vtt.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Utt()}addRule(e,o){this.rules[e]=o}getRule(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules($y(e),{type:o.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(e,o);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,o){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,n).map(i=>`${o}${i}`)}getSuffixes(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(e,o);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((i,r)=>wN[i]-wN[r]).map(i=>`${this.options.prepend}${o.ordinal?`ordinal${this.options.prepend}`:""}${i}`):n.numbers.map(i=>this.getSuffix(e,i,o)):[]}getSuffix(e,o){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(e,n);return i?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(o)}`:this.getSuffixRetroCompatible(i,o):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,o){const n=e.noAbs?e.plurals(o):e.plurals(Math.abs(o));let i=e.numbers[n];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const r=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:r():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?r():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!Wtt.includes(this.options.compatibilityJSON)}};function _N(t,e,o){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,r=Itt(t,e,o);return!r&&i&&typeof o=="string"&&(r=jy(t,o,n),r===void 0&&(r=jy(e,o,n))),r}let Ytt=class{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ms.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(o=>o),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const o=e.interpolation;this.escape=o.escape!==void 0?o.escape:$tt,this.escapeValue=o.escapeValue!==void 0?o.escapeValue:!0,this.useRawValueToEscape=o.useRawValueToEscape!==void 0?o.useRawValueToEscape:!1,this.prefix=o.prefix?od(o.prefix):o.prefixEscaped||"{{",this.suffix=o.suffix?od(o.suffix):o.suffixEscaped||"}}",this.formatSeparator=o.formatSeparator?o.formatSeparator:o.formatSeparator||",",this.unescapePrefix=o.unescapeSuffix?"":o.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":o.unescapeSuffix||"",this.nestingPrefix=o.nestingPrefix?od(o.nestingPrefix):o.nestingPrefixEscaped||od("$t("),this.nestingSuffix=o.nestingSuffix?od(o.nestingSuffix):o.nestingSuffixEscaped||od(")"),this.nestingOptionsSeparator=o.nestingOptionsSeparator?o.nestingOptionsSeparator:o.nestingOptionsSeparator||",",this.maxReplaces=o.maxReplaces?o.maxReplaces:1e3,this.alwaysFormat=o.alwaysFormat!==void 0?o.alwaysFormat:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=`${this.prefix}(.+?)${this.suffix}`;this.regexp=new RegExp(e,"g");const o=`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;this.regexpUnescape=new RegExp(o,"g");const n=`${this.nestingPrefix}(.+?)${this.nestingSuffix}`;this.nestingRegexp=new RegExp(n,"g")}interpolate(e,o,n,i){let r,a,s;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function d(j){return j.replace(/\$/g,"$$$$")}const b=j=>{if(j.indexOf(this.formatSeparator)<0){const W=_N(o,l,j,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(W,void 0,n,Zt(jt(jt({},i),o),{interpolationkey:j})):W}const A=j.split(this.formatSeparator),p=A.shift().trim(),I=A.join(this.formatSeparator).trim();return this.format(_N(o,l,p,this.options.keySeparator,this.options.ignoreJSONStructure),I,n,Zt(jt(jt({},i),o),{interpolationkey:p}))};this.resetRegExp();const C=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,u=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:j=>d(j)},{regex:this.regexp,safeValue:j=>this.escapeValue?d(this.escape(j)):d(j)}].forEach(j=>{for(s=0;r=j.regex.exec(e);){const A=r[1].trim();if(a=b(A),a===void 0)if(typeof C=="function"){const I=C(e,r,i);a=typeof I=="string"?I:""}else if(i&&Object.prototype.hasOwnProperty.call(i,A))a="";else if(u){a=r[0];continue}else this.logger.warn(`missed to pass in variable ${A} for interpolating ${e}`),a="";else typeof a!="string"&&!this.useRawValueToEscape&&(a=mN(a));const p=j.safeValue(a);if(e=e.replace(r[0],p),u?(j.regex.lastIndex+=a.length,j.regex.lastIndex-=r[0].length):j.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),e}nest(e,o){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,r,a;function s(l,d){const b=this.nestingOptionsSeparator;if(l.indexOf(b)<0)return l;const C=l.split(new RegExp(`${b}[ ]*{`));let u=`{${C[1]}`;l=C[0],u=this.interpolate(u,a);const j=u.match(/'/g),A=u.match(/"/g);(j&&j.length%2===0&&!A||A.length%2!==0)&&(u=u.replace(/'/g,'"'));try{a=JSON.parse(u),d&&(a=jt(jt({},d),a))}catch(p){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,p),`${l}${b}${u}`}return delete a.defaultValue,l}for(;i=this.nestingRegexp.exec(e);){let l=[];a=jt({},n),a=a.replace&&typeof a.replace!="string"?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let d=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const b=i[1].split(this.formatSeparator).map(C=>C.trim());i[1]=b.shift(),l=b,d=!0}if(r=o(s.call(this,i[1].trim(),a),a),r&&i[0]===e&&typeof r!="string")return r;typeof r!="string"&&(r=mN(r)),r||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),r=""),d&&(r=l.reduce((b,C)=>this.format(b,C,n.lng,Zt(jt({},n),{interpolationkey:i[1].trim()})),r.trim())),e=e.replace(i[0],r),this.regexp.lastIndex=0}return e}};function Xtt(t){let e=t.toLowerCase().trim();const o={};if(t.indexOf("(")>-1){const n=t.split("(");e=n[0].toLowerCase().trim();const i=n[1].substring(0,n[1].length-1);e==="currency"&&i.indexOf(":")<0?o.currency||(o.currency=i.trim()):e==="relativetime"&&i.indexOf(":")<0?o.range||(o.range=i.trim()):i.split(";").forEach(r=>{if(!r)return;const[a,...s]=r.split(":"),l=s.join(":").trim().replace(/^'+|'+$/g,"");o[a.trim()]||(o[a.trim()]=l),l==="false"&&(o[a.trim()]=!1),l==="true"&&(o[a.trim()]=!0),isNaN(l)||(o[a.trim()]=parseInt(l,10))})}return{formatName:e,formatOptions:o}}function nd(t){const e={};return function(o,n,i){const r=n+JSON.stringify(i);let a=e[r];return a||(a=t($y(n),i),e[r]=a),a(o)}}let qtt=class{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ms.create("formatter"),this.options=e,this.formats={number:nd((o,n)=>{const i=new Intl.NumberFormat(o,jt({},n));return r=>i.format(r)}),currency:nd((o,n)=>{const i=new Intl.NumberFormat(o,Zt(jt({},n),{style:"currency"}));return r=>i.format(r)}),datetime:nd((o,n)=>{const i=new Intl.DateTimeFormat(o,jt({},n));return r=>i.format(r)}),relativetime:nd((o,n)=>{const i=new Intl.RelativeTimeFormat(o,jt({},n));return r=>i.format(r,n.range||"day")}),list:nd((o,n)=>{const i=new Intl.ListFormat(o,jt({},n));return r=>i.format(r)})},this.init(e)}init(e){const o=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=o.formatSeparator?o.formatSeparator:o.formatSeparator||","}add(e,o){this.formats[e.toLowerCase().trim()]=o}addCached(e,o){this.formats[e.toLowerCase().trim()]=nd(o)}format(e,o,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return o.split(this.formatSeparator).reduce((r,a)=>{const{formatName:s,formatOptions:l}=Xtt(a);if(this.formats[s]){let d=r;try{const b=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},C=b.locale||b.lng||i.locale||i.lng||n;d=this.formats[s](r,C,jt(jt(jt({},l),i),b))}catch(b){this.logger.warn(b)}return d}else this.logger.warn(`there was no format function for ${s}`);return r},e)}};function Ztt(t,e){t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)}let Ktt=class extends l1{constructor(e,o,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=o,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=ms.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,i.backend,i)}queueLoad(e,o,n,i){const r={},a={},s={},l={};return e.forEach(d=>{let b=!0;o.forEach(C=>{const u=`${d}|${C}`;!n.reload&&this.store.hasResourceBundle(d,C)?this.state[u]=2:this.state[u]<0||(this.state[u]===1?a[u]===void 0&&(a[u]=!0):(this.state[u]=1,b=!1,a[u]===void 0&&(a[u]=!0),r[u]===void 0&&(r[u]=!0),l[C]===void 0&&(l[C]=!0)))}),b||(s[d]=!0)}),(Object.keys(r).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(r),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}loaded(e,o,n){const i=e.split("|"),r=i[0],a=i[1];o&&this.emit("failedLoading",r,a,o),n&&this.store.addResourceBundle(r,a,n),this.state[e]=o?-1:2;const s={};this.queue.forEach(l=>{Rtt(l.loaded,[r],a),Ztt(l,e),o&&l.errors.push(o),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(d=>{s[d]||(s[d]={});const b=l.loaded[d];b.length&&b.forEach(C=>{s[d][C]===void 0&&(s[d][C]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(l=>!l.done)}read(e,o,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:o,fcName:n,tried:i,wait:r,callback:a});return}this.readingCalls++;const s=(d,b)=>{if(this.readingCalls--,this.waitingReads.length>0){const C=this.waitingReads.shift();this.read(C.lng,C.ns,C.fcName,C.tried,C.wait,C.callback)}if(d&&b&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,e,o,n,i+1,r*2,a)},r);return}a(d,b)},l=this.backend[n].bind(this.backend);if(l.length===2){try{const d=l(e,o);d&&typeof d.then=="function"?d.then(b=>s(null,b)).catch(s):s(null,d)}catch(d){s(d)}return}return l(e,o,s)}prepareLoading(e,o){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();typeof e=="string"&&(e=this.languageUtils.toResolveHierarchy(e)),typeof o=="string"&&(o=[o]);const r=this.queueLoad(e,o,n,i);if(!r.toLoad.length)return r.pending.length||i(),null;r.toLoad.forEach(a=>{this.loadOne(a)})}load(e,o,n){this.prepareLoading(e,o,{},n)}reload(e,o,n){this.prepareLoading(e,o,{reload:!0},n)}loadOne(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const n=e.split("|"),i=n[0],r=n[1];this.read(i,r,"read",void 0,void 0,(a,s)=>{a&&this.logger.warn(`${o}loading namespace ${r} for language ${i} failed`,a),!a&&s&&this.logger.log(`${o}loaded namespace ${r} for language ${i}`,s),this.loaded(e,a,s)})}saveMissing(e,o,n,i,r){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(o)){this.logger.warn(`did not save key "${n}" as the namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if(this.backend&&this.backend.create){const l=Zt(jt({},a),{isUpdate:r}),d=this.backend.create.bind(this.backend);if(d.length<6)try{let b;d.length===5?b=d(e,o,n,i,l):b=d(e,o,n,i),b&&typeof b.then=="function"?b.then(C=>s(null,C)).catch(s):s(null,b)}catch(b){s(b)}else d(e,o,n,i,s,l)}!e||!e[0]||this.store.addResource(e[0],o,n,i)}}};function SN(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){let e={};if(typeof t[1]=="object"&&(e=t[1]),typeof t[1]=="string"&&(e.defaultValue=t[1]),typeof t[2]=="string"&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const o=t[3]||t[2];Object.keys(o).forEach(n=>{e[n]=o[n]})}return e},interpolation:{escapeValue:!0,format:(t,e,o,n)=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function CN(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function j0(){}function Jtt(t){Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(e=>{typeof t[e]=="function"&&(t[e]=t[e].bind(t))})}let J6=class D2 extends l1{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(super(),this.options=CN(e),this.services={},this.logger=ms,this.modules={external:[]},Jtt(this),o&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,o),this;setTimeout(()=>{this.init(e,o)},0)}}init(){var e=this;let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;typeof o=="function"&&(n=o,o={}),!o.defaultNS&&o.defaultNS!==!1&&o.ns&&(typeof o.ns=="string"?o.defaultNS=o.ns:o.ns.indexOf("translation")<0&&(o.defaultNS=o.ns[0]));const i=SN();this.options=jt(jt(jt({},i),this.options),CN(o)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=jt(jt({},i.interpolation),this.options.interpolation)),o.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=o.keySeparator),o.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=o.nsSeparator);function r(l){return l?typeof l=="function"?new l:l:null}if(!this.options.isClone){this.modules.logger?ms.init(r(this.modules.logger),this.options):ms.init(null,this.options);let l;this.modules.formatter?l=this.modules.formatter:typeof Intl<"u"&&(l=qtt);const d=new xN(this.options);this.store=new vN(this.options.resources,this.options);const b=this.services;b.logger=ms,b.resourceStore=this.store,b.languageUtils=d,b.pluralResolver=new Gtt(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),l&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(b.formatter=r(l),b.formatter.init(b,this.options),this.options.interpolation.format=b.formatter.format.bind(b.formatter)),b.interpolator=new Ytt(this.options),b.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},b.backendConnector=new Ktt(r(this.modules.backend),b.resourceStore,b,this.options),b.backendConnector.on("*",function(C){for(var u=arguments.length,j=new Array(u>1?u-1:0),A=1;A<u;A++)j[A-1]=arguments[A];e.emit(C,...j)}),this.modules.languageDetector&&(b.languageDetector=r(this.modules.languageDetector),b.languageDetector.init&&b.languageDetector.init(b,this.options.detection,this.options)),this.modules.i18nFormat&&(b.i18nFormat=r(this.modules.i18nFormat),b.i18nFormat.init&&b.i18nFormat.init(this)),this.translator=new bN(this.services,this.options),this.translator.on("*",function(C){for(var u=arguments.length,j=new Array(u>1?u-1:0),A=1;A<u;A++)j[A-1]=arguments[A];e.emit(C,...j)}),this.modules.external.forEach(C=>{C.init&&C.init(this)})}if(this.format=this.options.interpolation.format,n||(n=j0),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&l[0]!=="dev"&&(this.options.lng=l[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(l=>{this[l]=function(){return e.store[l](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(l=>{this[l]=function(){return e.store[l](...arguments),e}});const a=Nh(),s=()=>{const l=(d,b)=>{this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(b),n(d,b)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return l(null,this.t.bind(this));this.changeLanguage(this.options.lng,l)};return this.options.resources||!this.options.initImmediate?s():setTimeout(s,0),a}loadResources(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:j0;const n=typeof e=="string"?e:this.language;if(typeof e=="function"&&(o=e),!this.options.resources||this.options.partialBundledLanguages){if(n&&n.toLowerCase()==="cimode")return o();const i=[],r=a=>{a&&this.services.languageUtils.toResolveHierarchy(a).forEach(s=>{i.indexOf(s)<0&&i.push(s)})};n?r(n):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(a=>r(a)),this.options.preload&&this.options.preload.forEach(a=>r(a)),this.services.backendConnector.load(i,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),o(a)})}else o(null)}reloadResources(e,o,n){const i=Nh();return e||(e=this.languages),o||(o=this.options.ns),n||(n=j0),this.services.backendConnector.reload(e,o,r=>{i.resolve(),n(r)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&Z6.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let o=0;o<this.languages.length;o++){const n=this.languages[o];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(e,o){var n=this;this.isLanguageChangingTo=e;const i=Nh();this.emit("languageChanging",e);const r=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},a=(l,d)=>{d?(r(d),this.translator.changeLanguage(d),this.isLanguageChangingTo=void 0,this.emit("languageChanged",d),this.logger.log("languageChanged",d)):this.isLanguageChangingTo=void 0,i.resolve(function(){return n.t(...arguments)}),o&&o(l,function(){return n.t(...arguments)})},s=l=>{!e&&!l&&this.services.languageDetector&&(l=[]);const d=typeof l=="string"?l:this.services.languageUtils.getBestMatchFromCodes(l);d&&(this.language||r(d),this.translator.language||this.translator.changeLanguage(d),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(d)),this.loadResources(d,b=>{a(b,d)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(e),i}getFixedT(e,o,n){var i=this;const r=function(a,s){let l;if(typeof s!="object"){for(var d=arguments.length,b=new Array(d>2?d-2:0),C=2;C<d;C++)b[C-2]=arguments[C];l=i.options.overloadTranslationOptionHandler([a,s].concat(b))}else l=jt({},s);l.lng=l.lng||r.lng,l.lngs=l.lngs||r.lngs,l.ns=l.ns||r.ns,l.keyPrefix=l.keyPrefix||n||r.keyPrefix;const u=i.options.keySeparator||".";let j;return l.keyPrefix&&Array.isArray(a)?j=a.map(A=>`${l.keyPrefix}${u}${A}`):j=l.keyPrefix?`${l.keyPrefix}${u}${a}`:a,i.t(j,l)};return typeof e=="string"?r.lng=e:r.lngs=e,r.ns=o,r.keyPrefix=n,r}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=o.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,r=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const a=(s,l)=>{const d=this.services.backendConnector.state[`${s}|${l}`];return d===-1||d===2};if(o.precheck){const s=o.precheck(this,a);if(s!==void 0)return s}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!i||a(r,e)))}loadNamespaces(e,o){const n=Nh();return this.options.ns?(typeof e=="string"&&(e=[e]),e.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),o&&o(i)}),n):(o&&o(),Promise.resolve())}loadLanguages(e,o){const n=Nh();typeof e=="string"&&(e=[e]);const i=this.options.preload||[],r=e.filter(a=>i.indexOf(a)<0);return r.length?(this.options.preload=i.concat(r),this.loadResources(a=>{n.resolve(),o&&o(a)}),n):(o&&o(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const o=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=this.services&&this.services.languageUtils||new xN(SN());return o.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;return new D2(e,o)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:j0;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const i=Zt(jt(jt({},this.options),e),{isClone:!0}),r=new D2(i);return(e.debug!==void 0||e.prefix!==void 0)&&(r.logger=r.logger.clone(e)),["store","services","language"].forEach(a=>{r[a]=this[a]}),r.services=jt({},this.services),r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},n&&(r.store=new vN(this.store.data,i),r.services.resourceStore=r.store),r.translator=new bN(r.services,i),r.translator.on("*",function(a){for(var s=arguments.length,l=new Array(s>1?s-1:0),d=1;d<s;d++)l[d-1]=arguments[d];r.emit(a,...l)}),r.init(i,o),r.translator.options=i,r.translator.backendConnector.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}};const Q6=J6.createInstance();Q6.createInstance=J6.createInstance;const Qtt={error:"Error"},tet={error:"Помилка"},TN="common",eet={en:Qtt,uk:tet},os=Q6.createInstance({defaultNS:TN,resources:oet(eet,TN),lng:"en",fallbackLng:"en"}),KA={i18nextInstance:os,initPromise:os.init().then(()=>os)},qv=new Map;qv.set("common",KA);const JA=t=>{if(qv.has(t.namespace))return qv.get(t.namespace);if(t.plugins)for(const r of t.plugins)os.use(r);Object.keys(t.resource).forEach(r=>{os.addResourceBundle(r,t.namespace,t.resource[r])});const e=os.cloneInstance({defaultNS:t.namespace});let o=KA.initPromise.then(()=>e);e.on("languageChanged",r=>{os.language!==r&&os.changeLanguage(r)}),os.on("languageChanged",r=>{e.language!==r&&e.changeLanguage(r)});const n=t.language||"en";os.language!==n&&(o=o.then(()=>e.changeLanguage(n)).then(()=>e));const i={initPromise:o,i18nextInstance:e};return qv.set(t.namespace,i),i};function oet(t,e){return Object.keys(t).reduce((o,n)=>(o[n]={[e]:t[n]},o),{})}let c1=class extends Error{constructor(e,o,n){const{key:i,interpolationOptions:r}=o,a=n||KA.i18nextInstance.t,s=Object.assign(Object.assign({},r),{ns:e}),l=a(i,Object.assign(Object.assign({},s),{lng:"en"}));super(l),this.key=i,this.namespace=e,this.interpolationOptions=s}};function tH(t){return t&&t.replace(new RegExp("(?<!\\\\)'","g"),"\\'")}function zy(){return zy=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n])}return t},zy.apply(this,arguments)}var Zc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fa(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function net(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var o=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};o.prototype=e.prototype}else o={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(o,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),o}function iet(){if(console&&console.warn){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];typeof e[0]=="string"&&(e[0]=`react-i18next:: ${e[0]}`),console.warn(...e)}}const MN={};function R2(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];typeof e[0]=="string"&&MN[e[0]]||(typeof e[0]=="string"&&(MN[e[0]]=new Date),iet(...e))}const eH=(t,e)=>()=>{if(t.isInitialized)e();else{const o=()=>{setTimeout(()=>{t.off("initialized",o)},0),e()};t.on("initialized",o)}};function kN(t,e,o){t.loadNamespaces(e,eH(t,o))}function AN(t,e,o,n){typeof o=="string"&&(o=[o]),o.forEach(i=>{t.options.ns.indexOf(i)<0&&t.options.ns.push(i)}),t.loadLanguages(e,eH(t,n))}function ret(t,e){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=e.languages[0],i=e.options?e.options.fallbackLng:!1,r=e.languages[e.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const a=(s,l)=>{const d=e.services.backendConnector.state[`${s}|${l}`];return d===-1||d===2};return o.bindI18n&&o.bindI18n.indexOf("languageChanging")>-1&&e.services.backendConnector.backend&&e.isLanguageChangingTo&&!a(e.isLanguageChangingTo,t)?!1:!!(e.hasResourceBundle(n,t)||!e.services.backendConnector.backend||e.options.resources&&!e.options.partialBundledLanguages||a(n,t)&&(!i||a(r,t)))}function aet(t,e){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!e.languages||!e.languages.length?(R2("i18n.languages were undefined or empty",e.languages),!0):e.options.ignoreJSONStructure!==void 0?e.hasLoadedNamespace(t,{lng:o.lng,precheck:(n,i)=>{if(o.bindI18n&&o.bindI18n.indexOf("languageChanging")>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!i(n.isLanguageChangingTo,t))return!1}}):ret(t,e,o)}const set=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,cet={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},uet=t=>cet[t],det=t=>t.replace(set,uet);let I2={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:det};function pet(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};I2=jt(jt({},I2),t)}function het(){return I2}let oH;function fet(t){oH=t}function met(){return oH}const get={type:"3rdParty",init(t){pet(t.options.react),fet(t)}},nH=uo();let vet=class{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(o=>{this.usedNamespaces[o]||(this.usedNamespaces[o]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}};const yet=(t,e)=>{const o=Yt();return ae(()=>{o.current=t},[t,e]),o.current};function Fi(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:o}=e,{i18n:n,defaultNS:i}=eo(nH)||{},r=o||n||met();if(r&&!r.reportNamespaces&&(r.reportNamespaces=new vet),!r){R2("You will need to pass in an i18next instance by using initReactI18next");const X=(D,$)=>typeof $=="string"?$:$&&typeof $=="object"&&typeof $.defaultValue=="string"?$.defaultValue:Array.isArray(D)?D[D.length-1]:D,H=[X,{},!1];return H.t=X,H.i18n={},H.ready=!1,H}r.options.react&&r.options.react.wait!==void 0&&R2("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a=jt(jt(jt({},het()),r.options.react),e),{useSuspense:s,keyPrefix:l}=a;let d=i||r.options&&r.options.defaultNS;d=typeof d=="string"?[d]:d||["translation"],r.reportNamespaces.addUsedNamespaces&&r.reportNamespaces.addUsedNamespaces(d);const b=(r.isInitialized||r.initializedStoreOnce)&&d.every(X=>aet(X,r,a));function C(){return r.getFixedT(e.lng||null,a.nsMode==="fallback"?d:d[0],l)}const[u,j]=le(C);let A=d.join();e.lng&&(A=`${e.lng}${A}`);const p=yet(A),I=Yt(!0);ae(()=>{const{bindI18n:X,bindI18nStore:H}=a;I.current=!0,!b&&!s&&(e.lng?AN(r,e.lng,d,()=>{I.current&&j(C)}):kN(r,d,()=>{I.current&&j(C)})),b&&p&&p!==A&&I.current&&j(C);function D(){I.current&&j(C)}return X&&r&&r.on(X,D),H&&r&&r.store.on(H,D),()=>{I.current=!1,X&&r&&X.split(" ").forEach($=>r.off($,D)),H&&r&&H.split(" ").forEach($=>r.store.off($,D))}},[r,A]);const W=Yt(!0);ae(()=>{I.current&&!W.current&&j(C),W.current=!1},[r,l]);const q=[u,r,b];if(q.t=u,q.i18n=r,q.ready=b,b||!b&&!s)return q;throw new Promise(X=>{e.lng?AN(r,e.lng,d,()=>X()):kN(r,d,()=>X())})}const bet={errors:{noSisenseContext:"Sisense context is not initialized",restApiNotReady:"Rest API is not initialized",componentRenderError:"Unable to render the component",sisenseContextNoAuthentication:"Authentication method is not specified",chartNoSisenseContext:"Sisense Context for Chart not found. To fix, add a dataSet to the Chart or wrap the component inside a Sisense context provider.",widgetByIdNoSisenseContext:"Sisense Context for Dashboard Widget not found. To fix, wrap the component inside a Sisense context provider.",widgetByIdInvalidIdentifier:"Failed to retrieve widget. Please make sure the dashboard widget exists and is accessible.",dashboardWidgetsInvalidIdentifiers:"Failed to retrieve dashboard widgets. Please make sure the dashboard exists and is accessible.",executeQueryNoSisenseContext:"Sisense Context for query execution not found. To fix, wrap the component inside a Sisense context provider.",executeQueryNoDataSource:"No dataSource provided to execute query",dataOptions:{noDimensionsAndMeasures:"Neither dimensions nor measures found. Data options should have at least one dimension or measure.",attributeNotFound:'Attribute "{{attributeName}}" not found in the data',measureNotFound:'Measure "{{measureName}}" not found in the data',filterAttributeNotFound:'Filter attribute "{{attributeName}}" not found in the data',highlightAttributeNotFound:'Highlight attribute "{{attributeName}}" not found in the data'},optionsTranslation:{invalidStyleOptions:"Invalid style options for '{{chartType}}' chart",invalidInternalDataOptions:"Data options are not correctly converted for '{{chartType}}' chart"},themeNotFound:"Theme with oid {{themeOid}} not found in the Sisense instance",paletteNotFound:"Palette '{{paletteName}}' not found in the Sisense instance",chartTypeNotSupported:"Chart type {{chartType}} is not supported",chartInvalidProps:"Invalid chart props",unsupportedWidgetType:"Can't extract props for unsupported widget type - {{widgetType}}",sisenseContextNotFound:"Sisense Context not found. Please ensure it is provided.",dashboardInvalidIdentifier:"Failed to retrieve dashboard. Please make sure the dashboard exists and is accessible.",sharedFormula:{identifierExpected:"Failed to identify shared formula. Please provide oid or both name and datasource",failedToFetch:"Failed to fetch shared formula"},widgetModel:{incomleteWidget:"Widget can not be transformed to DTO because of incomplete property ({{prop}})",unsupportedWidgetTypeDto:"Saving the widget of type {{chartType}} is not supported",pivotWidgetNotSupported:"Pivot widget is not supported for method {{methodName}}",textWidgetNotSupported:"Text widget is not supported for method {{methodName}}",onlyTableWidgetSupported:"Only table widget is supported for method {{methodName}}",onlyPivotWidgetSupported:"Only pivot widget is supported for method {{methodName}}",onlyTextWidgetSupported:"Only text widget is supported for method {{methodName}}",onlyPluginWidgetSupported:"Only plugin widget is supported for method {{methodName}}",unsupportedWidgetType:"Unsupported widget type: {{widgetType}}",unsupportedFusionWidgetType:"Unsupported Fusion widget type: {{widgetType}}"},unknownFilterInFilterRelations:"Filter relations contain unknown filter",filterRelationsNotSupported:"Filter relations not supported yet",invalidFilterType:"Invalid filter type",secondsDateTimeLevelSupportedOnlyForLive:"Seconds datetime level is supported only for the 'live' datasource",missingMenuRoot:"Missing initialized menu root",missingModalRoot:"Missing initialized modal root",missingDataSource:"The 'dataSource' value is missing. It must be provided explicitly, or a 'defaultDataSource' should be specified in the Sisense context provider.",incorrectOnDataReadyHandler:"'onDataReady' handler must return a valid data object",undefinedDataSource:"Data source is not defined",emptyModel:"Empty model",missingMetadata:"Missing metadata",missingModelTitle:"Missing model title",httpClientNotFound:"HttpClient not found.",serverSettingsNotLoaded:"Failed to load server settings",requiredColumnMissing:"Missing required column",unexpectedChartType:"Unexpected chart type: {{chartType}}",noRowNumColumn:"Data has no row num column",ticIntervalCalculationFailed:"Unable to calculate tic interval. Try specifying datetime granularity.",polarChartDesignOptionsExpected:"Polar chart design options expected for polar chart",polarChartDesignOptionsNotExpected:"Polar chart design options not expected for non-polar chart",indicatorInvalidRelativeSize:"Invalid relative size options",unsupportedMapType:"Unsupported map type: {{mapType}}",mapLoadingFailed:"Failed loading map",cascadingFilterOriginalNotFound:"Error in cascading filters reassembling. Original cascading filter not found",dashboardLoadFailed:"Failed to load Dashboard. {{error}}",widgetLoadFailed:"Failed to load Widget. {{error}}",dashboardWithOidNotFound:"Dashboard with oid {{dashboardOid}} not found",failedToAddWidget:"Failed to add widget to dashboard",widgetWithOidNotFound:"Widget with oid {{widgetOid}} not found",widgetWithOidNotFoundInDashboard:"Widget with oid {{widgetOid}} not found in dashboard with oid {{dashboardOid}}",widgetEmptyResponse:"Empty response for widget with oid {{widgetOid}}",dateFilterIncorrectOperator:"Incorrect operator: {{operator}}",synchronizedFilterInvalidProps:"`useSynchronizedFilter` hook must take at least one of [non-null `filterFromProps`] or [`createEmptyFilter` function]",methodNotImplemented:"Method not implemented.",noPivotClient:"Pivot client not initialized",unexpectedCacheValue:"Unexpected cache value",notAMembersFilter:"Filter is not a MembersFilter",drilldownNoInitialDimension:"Initial dimension has to be specified to use drilldown with custom components",otherWidgetTypesNotSupported:"Other widget types are not supported yet",dataBrowser:{dimensionNotFound:"Dimension with id {{dimensionId}} not found",attributeNotFound:"Attribute with id {{attributeId}} not found"},addFilterPopover:{noDataSources:"No data sources available. Try to define `dataSource` in widgets or `defaultDataSource` on the dashboard level."},tabberInvalidConfiguration:"Tabber widget configuration is invalid"},errorBoxText:"$t(common:error): {{errorMessage}}",chartNoData:"No Results",filters:"Filters",widgetDetails:"Widget Details",cancel:"Cancel",includeAll:"Include all",formatting:{number:{abbreviations:{thousand:"K",million:"M",billion:"B",trillion:"T"}}},criteriaFilter:{displayModePrefix:"All items",equals:"Equals {{val}}",notEquals:"Does not equal {{val}}",lessThan:"Less than {{val}}",lessThanOrEqual:"Less than or equal to {{val}}",greaterThan:"Greater than {{val}}",greaterThanOrEqual:"Greater than or equal to {{val}}",between:"Between {{valA}} and {{valB}}",notBetween:"Not between {{valA}} and {{valB}}",top:"Top {{valA}} by {{valB}}",bottom:"Last {{valA}} by {{valB}}",is:"Is {{val}}",isNot:"Is not {{val}}",contains:"Contains {{val}}",notContains:"Doesn't contain {{val}}",startsWith:"Starts with {{val}}",notStartsWith:"Doesn't start with {{val}}",endsWith:"Ends with {{val}}",notEndsWith:"Doesn't end with {{val}}",like:"Is like {{val}}",byMeasure:"By measure",by:"by"},dateFilter:{last:"Last",next:"Next",from:"From",to:"To",count:"Count",select:"Select",today:"Today",days:"Days",weeks:"Weeks",months:"Months",quarters:"Quarters",years:"Years",earliestDate:"Earliest Date",latestDate:"Latest Date",todayOutOfRange:"Today is out of available date range",dateRange:{fromTo:"{{from}} to {{to}}",from:"From {{val}}",to:"To {{val}}"}},boxplot:{tooltip:{whiskers:"Whiskers",box:"Box",min:"Min",median:"Median",max:"Max"}},treemap:{tooltip:{ofTotal:"of total",of:"of"}},advanced:{tooltip:{min:"Lower Bound",max:"Upper Bound",forecastValue:"Forecast Value",forecast:"Forecast",trend:"Trend",trendLocalValue:"Local Value",confidenceInterval:"Confidence Interval",trendType:"Type",trendDataKey:"Trend Data",trendData:{min:"Min",max:"Max",median:"Median",average:"Average"}}},arearange:{tooltip:{min:"Min",max:"Max"}},unsupportedFilterMessage:"Unsupported Filter (applied to the data query)",unsupportedFilter:"Unsupported filter {{filter}}",commonFilter:{clearSelectionButton:"Clear Selection",selectMenuItem:"Select",unselectMenuItem:"Un-Select"},customFilterTileMessage:"filtered with custom filter",filterRelations:{and:"AND",or:"OR",andOrFormulaApplied:"AND/OR Formula applied"},drilldown:{drillMenuItem:"Drill",breadcrumbsAllSuffix:"All",breadcrumbsPrev:"Prev",breadcrumbsNext:"Next",popover:{members:"Members",table:"Table",column:"Column"}},widgetHeader:{info:{details:"Widget Details",tooltip:"Click to view full details"}},plugins:{registerPrompt:"Unknown plugin type: {{pluginType}}. Please register this plugin so it can be rendered."},ai:{analyticsChatbot:"Analytics Chatbot",dataTopics:"Data Topics",chatbotDescription:"Analytics Chatbot is designed to help you interact with your data using natural language.",topicSelectPrompt:"Pick a topic you would like to explore:",preview:"Preview",clearHistoryPrompt:"Do you want to clear this chat?",config:{inputPromptText:'Ask a question or type "/" for ideas',welcomeText:"Welcome to the Analytics Assistant! I can help you explore and gain insights from your data.",suggestionsWelcomeText:"Some questions you may have:"},buttons:{insights:"Insights",correctResponse:"Correct response",incorrectResponse:"Incorrect response",clearChat:"Clear chat",refresh:"Refresh",readMore:"Read more",collapse:"Collapse",yes:"Yes",no:"No",seeMore:"See more"},disclaimer:{poweredByAi:"Content is powered by AI, so surprises and mistakes are possible.",rateRequest:"Please rate responses so we can improve!"},errors:{chatUnavailable:"Chat unavailable. Please try again later.",fetchHistory:"Something went wrong and we were unable to retrieve the chat thread. Let's start over!",recommendationsNotAvailable:"Recommendations aren't available right now. Try again in a few minutes.",insightsNotAvailable:"No insights available.",VectorDBEmptyResponseError:"The AI configuration is not ready, please wait a few minutes and try again.",LlmBadConfigurationError:"The LLM configuration is wrong. Reach out to your Admin to update the LLM provider configuration.",ChartTypeUnsupportedError:"Requested chart type is not supported.",BlockedByLlmContentFiltering:"This question is blocked by our content management policy. Please try asking a different question.",LlmContextLengthExceedsLimitError:"Looks like you've reached the message length limit, please clear this conversation.",UserPromptExeedsLimitError:"The prompt exceeds the limit. Rephrase your question and use shorter prompt.",unexpectedChatResponse:"Oh snap, something went wrong. Please try again later or try asking a different question.",unexpected:"Oh snap, something went wrong. Please try again later.",unknownResponse:"Received unknown responseType, raw response=",invalidInput:"Invalid input",noAvailableDataTopics:"None of the provided data models or perspectives are available"}},attribute:{datetimeName:{years:"Years in {{columnName}}",quarters:"Quarters in {{columnName}}",months:"Months in {{columnName}}",weeks:"Weeks in {{columnName}}",days:"Days in {{columnName}}",hours:"Hours in {{columnName}}",minutes:"Minutes in {{columnName}}"}},filterEditor:{buttons:{apply:"Apply",cancel:"Cancel",selectAll:"Select All",clearAll:"Clear All"},labels:{includeAll:"Include all (no filter applied)",allowMultiSelection:"Allow multiselect for lists",from:"From",to:"To",includeCurrent:"Including current"},placeholders:{selectFromList:"Select from list",enterEntry:"Type your entry...",enterValue:"Enter value...",select:"Select"},conditions:{exclude:"Is not",contains:"Contains",notContain:"Does not contain",startsWith:"Starts with",notStartsWith:"Does not start with",endsWith:"Ends with",notEndsWith:"Does not end with",equals:"Equals",notEquals:"Does not equal",isEmpty:"Is empty",isNotEmpty:"Is not empty",lessThan:"Smaller than",lessThanOrEqual:"Equals or smaller than",greaterThan:"Greater than",greaterThanOrEqual:"Equals or greater than",isWithin:"Is within"},validationErrors:{invalidNumber:"Numbers only",invalidNumericRange:'"To" must be greater than "From"'},datetimeLevels:{year:"Year",quarter:"Quarter",month:"Month",week:"Week",day:"Day",aggrigatedHour:"Hour (aggregated)",aggrigatedMinutesRoundTo15:"15-min (aggregated)"},relativeTypes:{last:"Last",this:"This",next:"Next"},datetimePositions:{before:"Before",after:"After"}},dataBrowser:{addFilter:"Add Filter",selectField:"Select Field",configureFilter:"Configure Filter",noResults:"No results",searchPlaceholder:"Search"},pivotTable:{grandTotal:"Grand Total",subTotal:"{{value}} Total"},dashboard:{toolbar:{undo:"Undo",redo:"Redo",cancel:"Cancel",apply:"Apply",editLayout:"Edit Layout"}},jumpToDashboard:{defaultCaption:"Jump to"}},xet={errors:{noSisenseContext:"Контекст Sisense не ініціалізовано",restApiNotReady:"Rest API не ініціалізовано",componentRenderError:"Не вдалося відобразити компонент",sisenseContextNoAuthentication:"Не вказано метод аутентифікації",chartNoSisenseContext:"Контекст Sisense для діаграми не знайдено. Щоб виправити, додайте набір даних до Chart або оберніть компонент у SisenseContextProvider.",widgetByIdNoSisenseContext:"Контекст Sisense для віджета дашборди не знайдено. Щоб виправити, оберніть компонент у SisenseContextProvider.",widgetByIdInvalidIdentifier:"Не вдалося отримати віджет. Переконайтеся, що віджет дашборди існує і доступний.",dashboardWidgetsInvalidIdentifiers:"Не вдалося отримати віджети дашборди. Переконайтеся, що дашборда існує і доступна.",executeQueryNoSisenseContext:"Контекст Sisense для виконання запиту не знайдено. Щоб виправити, оберніть компонент у SisenseContextProvider.",executeQueryNoDataSource:"Не надано dataSource для виконання запиту",dataOptions:{noDimensionsAndMeasures:"Не знайдено ні dimension-ів, ні measure-ів. Параметри даних повинні мати щонайменше один dimension або measure.",attributeNotFound:'Атрибут "{{attributeName}}" не знайдено в даних',measureNotFound:'Measure "{{measureName}}" не знайдено в даних',filterAttributeNotFound:'Атрибут фільтра "{{attributeName}}" не знайдено в даних',highlightAttributeNotFound:'Атрибут виділення "{{attributeName}}" не знайдено в даних'},optionsTranslation:{invalidStyleOptions:"Недійсні параметри `styleOptions` для діаграми '{{chartType}}'",invalidInternalDataOptions:"Параметри `dataOptions` некоректно перетворені для діаграми '{{chartType}}'"},themeNotFound:"Тему з oid {{themeOid}} не знайдено на Sisense-сервері",paletteNotFound:'Палітру "{{paletteName}}" не знайдено на Sisense-сервері',chartTypeNotSupported:"Тип діаграми {{chartType}} не підтримується",chartInvalidProps:"Недійсні параметри діаграми",unsupportedWidgetType:"Неможливо отримати властивості для непідтримуваного типу віджета - {{widgetType}}",sisenseContextNotFound:"Контекст Sisense не знайдено. Переконайтеся, що він наданий.",dashboardInvalidIdentifier:"Не вдалося отримати дашборд. Переконайтеся, що дашборд існує і доступний.",sharedFormula:{identifierExpected:"Не вдалося ідентифікувати загальну формулу. Будь ласка, надайте oid або пару name та datasource",failedToFetch:"Не вдалося отримати спільну формулу"},widgetModel:{incomleteWidget:"Неможливо створити DTO віджету через неповноту властивості ({{prop}})",unsupportedWidgetTypeDto:"Сберігання віджету типу {{chartType}} не підтримується",pivotWidgetNotSupported:"Метод {{methodName}} не підтримується для півот віджету",textWidgetNotSupported:"Метод {{methodName}} не підтримується для текстового віджету",onlyTableWidgetSupported:"Метод {{methodName}} підтримується тільки для табличних віджетів",onlyPivotWidgetSupported:"Метод {{methodName}} підтримується тільки для півот віджетів",onlyTextWidgetSupported:"Метод {{methodName}} підтримується тільки для текстових віджетів",onlyPluginWidgetSupported:"Метод {{methodName}} підтримується тільки для плагінних віджетів",unsupportedWidgetType:"Тип віджету {{widgetType}} не підтримується",unsupportedFusionWidgetType:"Тип Fusion віджету {{widgetType}} не підтримується"},unknownFilterInFilterRelations:"Логічні відношення фільтрів містять невідомий фільтр",filterRelationsNotSupported:"Відносини фільтрів ще не підтримуються",invalidFilterType:"Недійсний тип фільтра",secondsDateTimeLevelSupportedOnlyForLive:"Рівень часу в секундах підтримується лише для 'live' джерела даних",missingMenuRoot:"Відсутній ініціалізований корінь меню",missingModalRoot:"Відсутній ініціалізований корінь модального вікна",missingDataSource:"Значення 'dataSource' відсутнє. Воно має бути передано явно, або 'defaultDataSource' має бути вказано в SisenseContextProvider.",incorrectOnDataReadyHandler:"'onDataReady' має повертати дійсний об'єкт даних",undefinedDataSource:"Не задане джерело даних",emptyModel:"Пуста модель",missingMetadata:"Поле metadata відсутнє",missingModelTitle:"Не знайдено заголовоку моделі",httpClientNotFound:"HttpClient не знайдено",serverSettingsNotLoaded:"Failed to load server settings",requiredColumnMissing:"Відсутній обов’язковий стовпець",unexpectedChartType:"Невідомий тип графіка: {{chartType}}",noRowNumColumn:"Дані не містять row num column",ticIntervalCalculationFailed:"Неможливо обрахувати tic interval. Спробуйте задати datetime granularity.",polarChartDesignOptionsExpected:"Polar chart design options очікуються для polar chart",polarChartDesignOptionsNotExpected:"Polar chart design options не очікуються для non-polar chart",indicatorInvalidRelativeSize:"Невірні опції relative size",unsupportedMapType:"Непідтримуваний тип мапи: {{mapType}}",mapLoadingFailed:"Не вдалося завантажити мапу",cascadingFilterOriginalNotFound:"Помилка при реструктуризації каскадних фільтрів. Оригінальний фільтр не знайдено",dashboardLoadFailed:"Не вдалося завантажити Dashboard. {{error}}",widgetLoadFailed:"Не вдалося завантажити віджет. {{error}}",dashboardWithOidNotFound:"Dashboard з oid {{dashboardOid}} не знайдено",failedToAddWidget:"Не вдалося додати віджет",widgetWithOidNotFound:"Віджет з oid {{widgetOid}} не знайдено",widgetWithOidNotFoundInDashboard:"Віджет з oid {{widgetOid}} не знайдено в Dashboard з oid {{dashboardOid}}",widgetEmptyResponse:"Пуста відповідь для віджета з oid {{widgetOid}}",dateFilterIncorrectOperator:"Некорректний оператор: {{operator}}",synchronizedFilterInvalidProps:"`useSynchronizedFilter` хук потребує одне з [non-null `filterFromProps`] чи [`createEmptyFilter` function]",methodNotImplemented:"Метод не реалізовано.",noPivotClient:"Pivot client не ініціалізовано",unexpectedCacheValue:"Неочікуване значення кешу",notAMembersFilter:"Фільтр не є MembersFilter",drilldownNoInitialDimension:"Initial dimension має бути задано щоб використовувати drilldown з користувацькими компонентами",otherWidgetTypesNotSupported:"Інші типи віджетів поки що не підтримуються",dataBrowser:{dimensionNotFound:"Dimension з id {{dimensionId}} не знайдено",attributeNotFound:"Attribute з id {{attributeId}} не знайдено"},addFilterPopover:{noDataSources:"Не знайдено жодного джерела даних. Спробуйте задати `dataSource` у віджетах або `defaultDataSource` на рівні дашборди."},tabberInvalidConfiguration:"Конфігурація Tabber віджета невірна"},errorBoxText:"$t(common:error): {{errorMessage}}",chartNoData:"Результатів немає",filters:"Фільтри",widgetDetails:"Деталі віджета",cancel:"Відміна",includeAll:"Всі елементи",formatting:{number:{abbreviations:{thousand:"Тис.",million:"Млн",billion:"Млрд",trillion:"Трлн"}}},criteriaFilter:{displayModePrefix:"Всі елементи",equals:"Дорівнює {{val}}",notEquals:"Не дорівнює {{val}}",lessThan:"Менше ніж {{val}}",lessThanOrEqual:"Менше або дорівнює {{val}}",greaterThan:"Більше ніж {{val}}",greaterThanOrEqual:"Більше або дорівнює {{val}}",between:"Між {{valA}} та {{valB}}",notBetween:"Не між {{valA}} та {{valB}}",top:"Перші {{valA}} за {{valB}}",bottom:"Останні {{valA}} за {{valB}}",is:"Є {{val}}",isNot:"Не є {{val}}",contains:"Містить {{val}}",notContains:"Не містить {{val}}",startsWith:"Починається з {{val}}",notStartsWith:"Не починається з {{val}}",endsWith:"Закінчується на {{val}}",notEndsWith:"Не закінчується на {{val}}",like:"Схоже на {{val}}",byMeasure:"By measure",by:"by"},dateFilter:{last:"Останній",next:"Наступний",from:"Від",to:"До",count:"Кількість",select:"Вибрати",today:"Сьогодні",days:"Дні",weeks:"Тижні",months:"Місяці",quarters:"Квартали",years:"Роки",earliestDate:"Найбільш Рання Дата",latestDate:"Найбільш Пізня Дата",todayOutOfRange:"Сьогоднішній день поза доступним діапазоном дат",dateRange:{fromTo:"{{from}} до {{to}}",from:"Від {{val}}",to:"До {{val}}"}},boxplot:{tooltip:{whiskers:"Вуса",box:"Коробка",min:"Мінімум",median:"Медіана",max:"Максимум"}},treemap:{tooltip:{ofTotal:"загальної кількості",of:"з"}},advanced:{tooltip:{min:"Lower Bound",max:"Upper Bound",forecastValue:"Forecast Value",forecast:"Forecast",trend:"Trend",trendLocalValue:"Local Value",confidenceInterval:"Confidence Interval",trendType:"Type",trendDataKey:"Trend Data",trendData:{min:"Min",max:"Max",median:"Median",average:"Average"}}},arearange:{tooltip:{min:"Мінімум",max:"Максимум"}},dashboard:{toolbar:{undo:"Скасувати",redo:"Повторити",cancel:"Відмінити",apply:"Застосувати",editLayout:"Редагувати макет"}},unsupportedFilterMessage:"Непідтримуваний Фільтр (застосовано до запиту даних)",unsupportedFilter:"Непідтримуваний фільтр {{filter}}",commonFilter:{clearSelectionButton:"Очистити виділення",selectMenuItem:"Вибрати",unselectMenuItem:"Cкасувати вибір"},customFilterTileMessage:"застосовано користувацький фільтр",drilldown:{drillMenuItem:"Деталізація",breadcrumbsAllSuffix:"Все",breadcrumbsPrev:"Попередній",breadcrumbsNext:"Наступний",popover:{members:"Учасники",table:"Таблиця",column:"Колонка"}},widgetHeader:{info:{details:"Деталі віджета",tooltip:"Натисніть щоб побачити повну інформацію"}},plugins:{registerPrompt:"Невідомий плагін: {{pluginType}}. Будь ласка зареєструйте цей плагін щоб він міг бути відображений."},ai:{analyticsChatbot:"Аналітичний чат-бот",dataTopics:"Теми Даних",chatbotDescription:"Аналітичний чат-бот розроблено, щоб допомогти вам взаємодіяти з вашими даними за допомогою розмовної мови.",topicSelectPrompt:"Виберіть тему, яку б ви хотіли дослідити:",preview:"Попередній перегляд",clearHistoryPrompt:"Ви дійсно хочете очистити чат?",config:{inputPromptText:"Поставте запитання або введіть «/» для отримання ідей",welcomeText:"Вітаємо в Аналітичному помічнику! Я можу допомогти вам досліджувати та зрозуміти ваші дані.",suggestionsWelcomeText:"Деякі запитання, які у вас можуть виникнути:"},buttons:{insights:"Інсайти",correctResponse:"Коректна відповідь",incorrectResponse:"Некоректна відповідь",clearChat:"Очистити чат",refresh:"Оновити",readMore:"Читати ще",collapse:"Згорнути",yes:"Так",no:"Ні",seeMore:"Більше"},disclaimer:{poweredByAi:"Вміст створено за допомогою ШІ, тому можливі несподіванки та помилки.",rateRequest:" Будь ласка, оцінюйте відповіді, щоб ми могли покращити продукт!"},errors:{chatUnavailable:"Чат недоступний. Спробуйте пізніше.",fetchHistory:"Щось пішло не так, і ми не змогли відновити історію чату. Почнімо спочатку!",recommendationsNotAvailable:"Наразі рекомендації недоступні. Спробуйте ще раз через кілька хвилин.",insightsNotAvailable:"Немає доступних інсайтів.",VectorDBEmptyResponseError:"AI ще конфігурується, будь ласка зачекайте та спробуйте ще раз за хвилинку чи дві.",LlmBadConfigurationError:"Схоже що LLM невірно сконфігурований. Зверніться до вашого Адміністратора щоб він оновив конфігурацію LLM провайдера.",ChartTypeUnsupportedError:"Графік такого типу покищо не підтримується.",BlockedByLlmContentFiltering:"Це питання заблоковано нашою політикою керування вмістом. Будь ласка спробуйте поставити інше запитання.",LlmContextLengthExceedsLimitError:"Схоже ви досягли ліміту кількості сповіщеннь, будь ласка очистіть поточний чат аби розпочати новий.",UserPromptExeedsLimitError:"Цей запит перевищює максимально дозволений ліміт. Будь ласка перефразуйте та зробіть запит коротше.",unexpectedChatResponse:"Ой, щось пішло не так. Повторіть спробу пізніше або спробуйте поставити інше запитання.",unexpected:"Ой, лихо! Шось йому стало. Спробуйте трохи пізніше.",unknownResponse:"Отримано невідомий тип відповіді, необроблена відповідь=",invalidInput:"Недійсне введення",noAvailableDataTopics:"Жодне з наданих моделей даних або перспектив доступне"}},filterRelations:{and:"І",or:"АБО",andOrFormulaApplied:"Застосовано формулу І/АБО"},attribute:{datetimeName:{years:"Роки в {{columnName}}",quarters:"Квартали в {{columnName}}",months:"Місяці в {{columnName}}",weeks:"Тижні в {{columnName}}",days:"Дні в {{columnName}}",hours:"Години в {{columnName}}",minutes:"Хвилини в {{columnName}}"}},filterEditor:{buttons:{apply:"Застосувати",cancel:"Відміна",selectAll:"Обрати всі",clearAll:"Очистити всі"},labels:{includeAll:"Обрати всі (фільтр не використовується)",allowMultiSelection:"Дозволити вибір кількох значень для списків",from:"Від",to:"До",includeCurrent:"Включаючи поточний"},placeholders:{selectFromList:"Виберіть зі списку",enterEntry:"Введіть значення...",enterValue:"Введіть значення...",select:"Вибрати"},conditions:{exclude:"Не є",contains:"Mістить",notContain:"Не містить",startsWith:"Починається з",notStartsWith:"Не починається з",endsWith:"Закінчується на",notEndsWith:"Не закінчується на",equals:"Дорівнює",notEquals:"Не дорівнює",isEmpty:"Порожній",isNotEmpty:"Не порожній",lessThan:"Менше ніж",lessThanOrEqual:"Менше або дорівнює",greaterThan:"Більше ніж",greaterThanOrEqual:"Більше або дорівнює",isWithin:"В межах"},validationErrors:{invalidNumber:"Тільки цифри",invalidNumericRange:'"До" має бути більше, ніж "Від"'},datetimeLevels:{year:"Year",quarter:"Quarter",month:"Month",week:"Week",day:"Day",aggrigatedHour:"Hour (aggregated)",aggrigatedMinutesRoundTo15:"15-min (aggregated)"},relativeTypes:{last:"Останній",this:"Поточний",next:"Наступний"},datetimePositions:{before:"Перед",after:"Після"}},pivotTable:{grandTotal:"Загальний підсумок",subTotal:"Усього {{value}}"},dataBrowser:{addFilter:"Додати фільтр",selectField:"Вибрати поле",configureFilter:"Налаштувати фільтр",noResults:"Немає результатів",searchPlaceholder:"Пошук"},jumpToDashboard:{defaultCaption:"Перейти до"}},QA="sdkUi",wet={en:bet,uk:xet};function iH(){return JA({resource:wet,plugins:[get],language:"en",namespace:QA})}const{i18nextInstance:rH}=iH(),_et={errors:{measure:{unsupportedType:"Unsupported measure type",dimensionalCalculatedMeasure:{noContext:"DimensionalCalculatedMeasure must have 'context' property"},dimensionalBaseMeasure:{noAttributeDimExpression:"DimensionalBaseMeasure must have 'attribute'/'dim'/'expression' property",noAggAggregation:"DimensionalBaseMeasure must have 'agg' or 'aggregation' property"},notAFormula:"Jaql is not a formula"},dataModelConfig:{noName:"'name' must be specified in config for DataModel",noMetadata:"'metadata' must be specified in config for DataModel"},filter:{unsupportedType:"Unsupported filter type: {{filterType}}",unsupportedDatetimeLevel:'Filters do not support the next "datetime" levels: Hours, MinutesRoundTo30, MinutesRoundTo15, Minutes, Seconds',membersFilterNullMember:"MembersFilter of {{attributeId}} - member cannot be null",unsupportedConditionFilter:"Jaql contains unsupported condition filter: {{filter}}",formulaFiltersNotSupported:"Formula-based filter not supported yet: {{filter}}"},unsupportedDimensionalElement:"Unsupported dimensional element type"}},Cet={errors:{measure:{unsupportedType:"Непідтримуваний тип measure",dimensionalCalculatedMeasure:{noContext:"DimensionalCalculatedMeasure має мати властивість 'context'"},dimensionalBaseMeasure:{noAttributeDimExpression:"DimensionalBaseMeasure має мати властивість 'attribute'/'dim'/'expression'",noAggAggregation:"DimensionalBaseMeasure має мати властивість 'agg' або 'aggregation'"},notAFormula:"Jaql не формула"},dataModelConfig:{noName:"'name' має бути вказано в конфігурації для DataModel",noMetadata:"'metadata' має бути вказано в конфігурації для DataModel"},filter:{unsupportedType:"Непідтримуваний тип фільтра: {{filterType}}",unsupportedDatetimeLevel:'Фільтри не підтримують наступні рівні "datetime": Hours, MinutesRoundTo30, MinutesRoundTo15, Minutes, Seconds',membersFilterNullMember:"MembersFilter у {{attributeId}} - member не може бути нульовим",unsupportedConditionFilter:"Jaql містить непідтримуваний condition фільтр: {{filter}}",formulaFiltersNotSupported:"Фільтри, що містять формули наразі не підтримуються: {{filter}}"},unsupportedDimensionalElement:"Непідтримуваний тип елемента"}},aH="sdkData",Tet={en:_et,uk:Cet};function Met(){return JA({resource:Tet,language:"en",namespace:aH})}const{i18nextInstance:ket}=Met();function Aet(){this.__data__=[],this.size=0}function wg(t,e){return t===e||t!==t&&e!==e}function u1(t,e){for(var o=t.length;o--;)if(wg(t[o][0],e))return o;return-1}var Eet=Array.prototype,Pet=Eet.splice;function Oet(t){var e=this.__data__,o=u1(e,t);if(o<0)return!1;var n=e.length-1;return o==n?e.pop():Pet.call(e,o,1),--this.size,!0}function Let(t){var e=this.__data__,o=u1(e,t);return o<0?void 0:e[o][1]}function Net(t){return u1(this.__data__,t)>-1}function Det(t,e){var o=this.__data__,n=u1(o,t);return n<0?(++this.size,o.push([t,e])):o[n][1]=e,this}function bl(t){var e=-1,o=t==null?0:t.length;for(this.clear();++e<o;){var n=t[e];this.set(n[0],n[1])}}bl.prototype.clear=Aet;bl.prototype.delete=Oet;bl.prototype.get=Let;bl.prototype.has=Net;bl.prototype.set=Det;function Ret(){this.__data__=new bl,this.size=0}function Iet(t){var e=this.__data__,o=e.delete(t);return this.size=e.size,o}function jet(t){return this.__data__.get(t)}function $et(t){return this.__data__.has(t)}var sH=typeof global=="object"&&global&&global.Object===Object&&global,zet=typeof self=="object"&&self&&self.Object===Object&&self,Hi=sH||zet||Function("return this")(),ca=Hi.Symbol,lH=Object.prototype,Bet=lH.hasOwnProperty,Fet=lH.toString,Dh=ca?ca.toStringTag:void 0;function Het(t){var e=Bet.call(t,Dh),o=t[Dh];try{t[Dh]=void 0;var n=!0}catch{}var i=Fet.call(t);return n&&(e?t[Dh]=o:delete t[Dh]),i}var Wet=Object.prototype,Vet=Wet.toString;function Uet(t){return Vet.call(t)}var Get="[object Null]",Yet="[object Undefined]",EN=ca?ca.toStringTag:void 0;function $a(t){return t==null?t===void 0?Yet:Get:EN&&EN in Object(t)?Het(t):Uet(t)}function Ai(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Xet="[object AsyncFunction]",qet="[object Function]",Zet="[object GeneratorFunction]",Ket="[object Proxy]";function sl(t){if(!Ai(t))return!1;var e=$a(t);return e==qet||e==Zet||e==Xet||e==Ket}var M_=Hi["__core-js_shared__"],PN=function(){var t=/[^.]+$/.exec(M_&&M_.keys&&M_.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Jet(t){return!!PN&&PN in t}var Qet=Function.prototype,tot=Qet.toString;function Eu(t){if(t!=null){try{return tot.call(t)}catch{}try{return t+""}catch{}}return""}var eot=/[\\^$.*+?()[\]{}|]/g,oot=/^\[object .+?Constructor\]$/,not=Function.prototype,iot=Object.prototype,rot=not.toString,aot=iot.hasOwnProperty,sot=RegExp("^"+rot.call(aot).replace(eot,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function lot(t){if(!Ai(t)||Jet(t))return!1;var e=sl(t)?sot:oot;return e.test(Eu(t))}function cot(t,e){return t==null?void 0:t[e]}function Pu(t,e){var o=cot(t,e);return lot(o)?o:void 0}var fm=Pu(Hi,"Map"),mm=Pu(Object,"create");function uot(){this.__data__=mm?mm(null):{},this.size=0}function dot(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var pot="__lodash_hash_undefined__",hot=Object.prototype,fot=hot.hasOwnProperty;function mot(t){var e=this.__data__;if(mm){var o=e[t];return o===pot?void 0:o}return fot.call(e,t)?e[t]:void 0}var got=Object.prototype,vot=got.hasOwnProperty;function yot(t){var e=this.__data__;return mm?e[t]!==void 0:vot.call(e,t)}var bot="__lodash_hash_undefined__";function xot(t,e){var o=this.__data__;return this.size+=this.has(t)?0:1,o[t]=mm&&e===void 0?bot:e,this}function du(t){var e=-1,o=t==null?0:t.length;for(this.clear();++e<o;){var n=t[e];this.set(n[0],n[1])}}du.prototype.clear=uot;du.prototype.delete=dot;du.prototype.get=mot;du.prototype.has=yot;du.prototype.set=xot;function wot(){this.size=0,this.__data__={hash:new du,map:new(fm||bl),string:new du}}function _ot(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function d1(t,e){var o=t.__data__;return _ot(e)?o[typeof e=="string"?"string":"hash"]:o.map}function Sot(t){var e=d1(this,t).delete(t);return this.size-=e?1:0,e}function Cot(t){return d1(this,t).get(t)}function Tot(t){return d1(this,t).has(t)}function Mot(t,e){var o=d1(this,t),n=o.size;return o.set(t,e),this.size+=o.size==n?0:1,this}function xl(t){var e=-1,o=t==null?0:t.length;for(this.clear();++e<o;){var n=t[e];this.set(n[0],n[1])}}xl.prototype.clear=wot;xl.prototype.delete=Sot;xl.prototype.get=Cot;xl.prototype.has=Tot;xl.prototype.set=Mot;var kot=200;function Aot(t,e){var o=this.__data__;if(o instanceof bl){var n=o.__data__;if(!fm||n.length<kot-1)return n.push([t,e]),this.size=++o.size,this;o=this.__data__=new xl(n)}return o.set(t,e),this.size=o.size,this}function Pa(t){var e=this.__data__=new bl(t);this.size=e.size}Pa.prototype.clear=Ret;Pa.prototype.delete=Iet;Pa.prototype.get=jet;Pa.prototype.has=$et;Pa.prototype.set=Aot;function cH(t,e){for(var o=-1,n=t==null?0:t.length;++o<n&&e(t[o],o,t)!==!1;);return t}var By=function(){try{var t=Pu(Object,"defineProperty");return t({},"",{}),t}catch{}}();function _g(t,e,o){e=="__proto__"&&By?By(t,e,{configurable:!0,enumerable:!0,value:o,writable:!0}):t[e]=o}var Eot=Object.prototype,Pot=Eot.hasOwnProperty;function tE(t,e,o){var n=t[e];(!(Pot.call(t,e)&&wg(n,o))||o===void 0&&!(e in t))&&_g(t,e,o)}function Up(t,e,o,n){var i=!o;o||(o={});for(var r=-1,a=e.length;++r<a;){var s=e[r],l=void 0;l===void 0&&(l=t[s]),i?_g(o,s,l):tE(o,s,l)}return o}function Oot(t,e){for(var o=-1,n=Array(t);++o<t;)n[o]=e(o);return n}function er(t){return t!=null&&typeof t=="object"}var Lot="[object Arguments]";function ON(t){return er(t)&&$a(t)==Lot}var uH=Object.prototype,Not=uH.hasOwnProperty,Dot=uH.propertyIsEnumerable,gm=ON(function(){return arguments}())?ON:function(t){return er(t)&&Not.call(t,"callee")&&!Dot.call(t,"callee")},Ho=Array.isArray;function Rot(){return!1}var dH=typeof exports=="object"&&exports&&!exports.nodeType&&exports,LN=dH&&typeof module=="object"&&module&&!module.nodeType&&module,Iot=LN&&LN.exports===dH,NN=Iot?Hi.Buffer:void 0,jot=NN?NN.isBuffer:void 0,vm=jot||Rot,$ot=9007199254740991,zot=/^(?:0|[1-9]\d*)$/;function Sg(t,e){var o=typeof t;return e=e??$ot,!!e&&(o=="number"||o!="symbol"&&zot.test(t))&&t>-1&&t%1==0&&t<e}var Bot=9007199254740991;function eE(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Bot}var Fot="[object Arguments]",Hot="[object Array]",Wot="[object Boolean]",Vot="[object Date]",Uot="[object Error]",Got="[object Function]",Yot="[object Map]",Xot="[object Number]",qot="[object Object]",Zot="[object RegExp]",Kot="[object Set]",Jot="[object String]",Qot="[object WeakMap]",tnt="[object ArrayBuffer]",ent="[object DataView]",ont="[object Float32Array]",nnt="[object Float64Array]",int="[object Int8Array]",rnt="[object Int16Array]",ant="[object Int32Array]",snt="[object Uint8Array]",lnt="[object Uint8ClampedArray]",cnt="[object Uint16Array]",unt="[object Uint32Array]",pn={};pn[ont]=pn[nnt]=pn[int]=pn[rnt]=pn[ant]=pn[snt]=pn[lnt]=pn[cnt]=pn[unt]=!0;pn[Fot]=pn[Hot]=pn[tnt]=pn[Wot]=pn[ent]=pn[Vot]=pn[Uot]=pn[Got]=pn[Yot]=pn[Xot]=pn[qot]=pn[Zot]=pn[Kot]=pn[Jot]=pn[Qot]=!1;function dnt(t){return er(t)&&eE(t.length)&&!!pn[$a(t)]}function Cg(t){return function(e){return t(e)}}var pH=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Vf=pH&&typeof module=="object"&&module&&!module.nodeType&&module,pnt=Vf&&Vf.exports===pH,k_=pnt&&sH.process,Jl=function(){try{var t=Vf&&Vf.require&&Vf.require("util").types;return t||k_&&k_.binding&&k_.binding("util")}catch{}}(),DN=Jl&&Jl.isTypedArray,oE=DN?Cg(DN):dnt,hnt=Object.prototype,fnt=hnt.hasOwnProperty;function hH(t,e){var o=Ho(t),n=!o&&gm(t),i=!o&&!n&&vm(t),r=!o&&!n&&!i&&oE(t),a=o||n||i||r,s=a?Oot(t.length,String):[],l=s.length;for(var d in t)(e||fnt.call(t,d))&&!(a&&(d=="length"||i&&(d=="offset"||d=="parent")||r&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||Sg(d,l)))&&s.push(d);return s}var mnt=Object.prototype;function nE(t){var e=t&&t.constructor,o=typeof e=="function"&&e.prototype||mnt;return t===o}function fH(t,e){return function(o){return t(e(o))}}var gnt=fH(Object.keys,Object),vnt=Object.prototype,ynt=vnt.hasOwnProperty;function bnt(t){if(!nE(t))return gnt(t);var e=[];for(var o in Object(t))ynt.call(t,o)&&o!="constructor"&&e.push(o);return e}function Tg(t){return t!=null&&eE(t.length)&&!sl(t)}function Mg(t){return Tg(t)?hH(t):bnt(t)}function xnt(t,e){return t&&Up(e,Mg(e),t)}function wnt(t){var e=[];if(t!=null)for(var o in Object(t))e.push(o);return e}var _nt=Object.prototype,Snt=_nt.hasOwnProperty;function Cnt(t){if(!Ai(t))return wnt(t);var e=nE(t),o=[];for(var n in t)n=="constructor"&&(e||!Snt.call(t,n))||o.push(n);return o}function kg(t){return Tg(t)?hH(t,!0):Cnt(t)}function Tnt(t,e){return t&&Up(e,kg(e),t)}var mH=typeof exports=="object"&&exports&&!exports.nodeType&&exports,RN=mH&&typeof module=="object"&&module&&!module.nodeType&&module,Mnt=RN&&RN.exports===mH,IN=Mnt?Hi.Buffer:void 0,jN=IN?IN.allocUnsafe:void 0;function gH(t,e){if(e)return t.slice();var o=t.length,n=jN?jN(o):new t.constructor(o);return t.copy(n),n}function p1(t,e){var o=-1,n=t.length;for(e||(e=Array(n));++o<n;)e[o]=t[o];return e}function knt(t,e){for(var o=-1,n=t==null?0:t.length,i=0,r=[];++o<n;){var a=t[o];e(a,o,t)&&(r[i++]=a)}return r}function vH(){return[]}var Ant=Object.prototype,Ent=Ant.propertyIsEnumerable,$N=Object.getOwnPropertySymbols,iE=$N?function(t){return t==null?[]:(t=Object(t),knt($N(t),function(e){return Ent.call(t,e)}))}:vH;function Pnt(t,e){return Up(t,iE(t),e)}function rE(t,e){for(var o=-1,n=e.length,i=t.length;++o<n;)t[i+o]=e[o];return t}var aE=fH(Object.getPrototypeOf,Object),Ont=Object.getOwnPropertySymbols,yH=Ont?function(t){for(var e=[];t;)rE(e,iE(t)),t=aE(t);return e}:vH;function Lnt(t,e){return Up(t,yH(t),e)}function bH(t,e,o){var n=e(t);return Ho(t)?n:rE(n,o(t))}function j2(t){return bH(t,Mg,iE)}function sE(t){return bH(t,kg,yH)}var $2=Pu(Hi,"DataView"),z2=Pu(Hi,"Promise"),Yd=Pu(Hi,"Set"),ym=Pu(Hi,"WeakMap"),zN="[object Map]",Nnt="[object Object]",BN="[object Promise]",FN="[object Set]",HN="[object WeakMap]",WN="[object DataView]",Dnt=Eu($2),Rnt=Eu(fm),Int=Eu(z2),jnt=Eu(Yd),$nt=Eu(ym),ka=$a;($2&&ka(new $2(new ArrayBuffer(1)))!=WN||fm&&ka(new fm)!=zN||z2&&ka(z2.resolve())!=BN||Yd&&ka(new Yd)!=FN||ym&&ka(new ym)!=HN)&&(ka=function(t){var e=$a(t),o=e==Nnt?t.constructor:void 0,n=o?Eu(o):"";if(n)switch(n){case Dnt:return WN;case Rnt:return zN;case Int:return BN;case jnt:return FN;case $nt:return HN}return e});var znt=Object.prototype,Bnt=znt.hasOwnProperty;function Fnt(t){var e=t.length,o=new t.constructor(e);return e&&typeof t[0]=="string"&&Bnt.call(t,"index")&&(o.index=t.index,o.input=t.input),o}var Fy=Hi.Uint8Array;function lE(t){var e=new t.constructor(t.byteLength);return new Fy(e).set(new Fy(t)),e}function Hnt(t,e){var o=e?lE(t.buffer):t.buffer;return new t.constructor(o,t.byteOffset,t.byteLength)}var Wnt=/\w*$/;function Vnt(t){var e=new t.constructor(t.source,Wnt.exec(t));return e.lastIndex=t.lastIndex,e}var VN=ca?ca.prototype:void 0,UN=VN?VN.valueOf:void 0;function Unt(t){return UN?Object(UN.call(t)):{}}function xH(t,e){var o=e?lE(t.buffer):t.buffer;return new t.constructor(o,t.byteOffset,t.length)}var Gnt="[object Boolean]",Ynt="[object Date]",Xnt="[object Map]",qnt="[object Number]",Znt="[object RegExp]",Knt="[object Set]",Jnt="[object String]",Qnt="[object Symbol]",tit="[object ArrayBuffer]",eit="[object DataView]",oit="[object Float32Array]",nit="[object Float64Array]",iit="[object Int8Array]",rit="[object Int16Array]",ait="[object Int32Array]",sit="[object Uint8Array]",lit="[object Uint8ClampedArray]",cit="[object Uint16Array]",uit="[object Uint32Array]";function dit(t,e,o){var n=t.constructor;switch(e){case tit:return lE(t);case Gnt:case Ynt:return new n(+t);case eit:return Hnt(t,o);case oit:case nit:case iit:case rit:case ait:case sit:case lit:case cit:case uit:return xH(t,o);case Xnt:return new n;case qnt:case Jnt:return new n(t);case Znt:return Vnt(t);case Knt:return new n;case Qnt:return Unt(t)}}var GN=Object.create,h1=function(){function t(){}return function(e){if(!Ai(e))return{};if(GN)return GN(e);t.prototype=e;var o=new t;return t.prototype=void 0,o}}();function wH(t){return typeof t.constructor=="function"&&!nE(t)?h1(aE(t)):{}}var pit="[object Map]";function hit(t){return er(t)&&ka(t)==pit}var YN=Jl&&Jl.isMap,fit=YN?Cg(YN):hit,mit="[object Set]";function git(t){return er(t)&&ka(t)==mit}var XN=Jl&&Jl.isSet,vit=XN?Cg(XN):git,yit=1,bit=2,xit=4,_H="[object Arguments]",wit="[object Array]",_it="[object Boolean]",Sit="[object Date]",Cit="[object Error]",SH="[object Function]",Tit="[object GeneratorFunction]",Mit="[object Map]",kit="[object Number]",CH="[object Object]",Ait="[object RegExp]",Eit="[object Set]",Pit="[object String]",Oit="[object Symbol]",Lit="[object WeakMap]",Nit="[object ArrayBuffer]",Dit="[object DataView]",Rit="[object Float32Array]",Iit="[object Float64Array]",jit="[object Int8Array]",$it="[object Int16Array]",zit="[object Int32Array]",Bit="[object Uint8Array]",Fit="[object Uint8ClampedArray]",Hit="[object Uint16Array]",Wit="[object Uint32Array]",rn={};rn[_H]=rn[wit]=rn[Nit]=rn[Dit]=rn[_it]=rn[Sit]=rn[Rit]=rn[Iit]=rn[jit]=rn[$it]=rn[zit]=rn[Mit]=rn[kit]=rn[CH]=rn[Ait]=rn[Eit]=rn[Pit]=rn[Oit]=rn[Bit]=rn[Fit]=rn[Hit]=rn[Wit]=!0;rn[Cit]=rn[SH]=rn[Lit]=!1;function Xd(t,e,o,n,i,r){var a,s=e&yit,l=e&bit,d=e&xit;if(o&&(a=i?o(t,n,i,r):o(t)),a!==void 0)return a;if(!Ai(t))return t;var b=Ho(t);if(b){if(a=Fnt(t),!s)return p1(t,a)}else{var C=ka(t),u=C==SH||C==Tit;if(vm(t))return gH(t,s);if(C==CH||C==_H||u&&!i){if(a=l||u?{}:wH(t),!s)return l?Lnt(t,Tnt(a,t)):Pnt(t,xnt(a,t))}else{if(!rn[C])return i?t:{};a=dit(t,C,s)}}r||(r=new Pa);var j=r.get(t);if(j)return j;r.set(t,a),vit(t)?t.forEach(function(I){a.add(Xd(I,e,o,I,t,r))}):fit(t)&&t.forEach(function(I,W){a.set(W,Xd(I,e,o,W,t,r))});var A=d?l?sE:j2:l?kg:Mg,p=b?void 0:A(t);return cH(p||t,function(I,W){p&&(W=I,I=t[W]),tE(a,W,Xd(I,e,o,W,t,r))}),a}var Vit=1,Uit=4;function xr(t){return Xd(t,Vit|Uit)}function Git(t){return function(e,o,n){for(var i=-1,r=Object(e),a=n(e),s=a.length;s--;){var l=a[++i];if(o(r[l],l,r)===!1)break}return e}}var TH=Git();function cE(t,e){return t&&TH(t,e,Mg)}var Yit="__lodash_hash_undefined__";function Xit(t){return this.__data__.set(t,Yit),this}function qit(t){return this.__data__.has(t)}function bm(t){var e=-1,o=t==null?0:t.length;for(this.__data__=new xl;++e<o;)this.add(t[e])}bm.prototype.add=bm.prototype.push=Xit;bm.prototype.has=qit;function Zit(t,e){for(var o=-1,n=t==null?0:t.length;++o<n;)if(e(t[o],o,t))return!0;return!1}function MH(t,e){return t.has(e)}var Kit=1,Jit=2;function kH(t,e,o,n,i,r){var a=o&Kit,s=t.length,l=e.length;if(s!=l&&!(a&&l>s))return!1;var d=r.get(t),b=r.get(e);if(d&&b)return d==e&&b==t;var C=-1,u=!0,j=o&Jit?new bm:void 0;for(r.set(t,e),r.set(e,t);++C<s;){var A=t[C],p=e[C];if(n)var I=a?n(p,A,C,e,t,r):n(A,p,C,t,e,r);if(I!==void 0){if(I)continue;u=!1;break}if(j){if(!Zit(e,function(W,q){if(!MH(j,q)&&(A===W||i(A,W,o,n,r)))return j.push(q)})){u=!1;break}}else if(!(A===p||i(A,p,o,n,r))){u=!1;break}}return r.delete(t),r.delete(e),u}function Qit(t){var e=-1,o=Array(t.size);return t.forEach(function(n,i){o[++e]=[i,n]}),o}function uE(t){var e=-1,o=Array(t.size);return t.forEach(function(n){o[++e]=n}),o}var trt=1,ert=2,ort="[object Boolean]",nrt="[object Date]",irt="[object Error]",rrt="[object Map]",art="[object Number]",srt="[object RegExp]",lrt="[object Set]",crt="[object String]",urt="[object Symbol]",drt="[object ArrayBuffer]",prt="[object DataView]",qN=ca?ca.prototype:void 0,A_=qN?qN.valueOf:void 0;function hrt(t,e,o,n,i,r,a){switch(o){case prt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case drt:return!(t.byteLength!=e.byteLength||!r(new Fy(t),new Fy(e)));case ort:case nrt:case art:return wg(+t,+e);case irt:return t.name==e.name&&t.message==e.message;case srt:case crt:return t==e+"";case rrt:var s=Qit;case lrt:var l=n&trt;if(s||(s=uE),t.size!=e.size&&!l)return!1;var d=a.get(t);if(d)return d==e;n|=ert,a.set(t,e);var b=kH(s(t),s(e),n,i,r,a);return a.delete(t),b;case urt:if(A_)return A_.call(t)==A_.call(e)}return!1}var frt=1,mrt=Object.prototype,grt=mrt.hasOwnProperty;function vrt(t,e,o,n,i,r){var a=o&frt,s=j2(t),l=s.length,d=j2(e),b=d.length;if(l!=b&&!a)return!1;for(var C=l;C--;){var u=s[C];if(!(a?u in e:grt.call(e,u)))return!1}var j=r.get(t),A=r.get(e);if(j&&A)return j==e&&A==t;var p=!0;r.set(t,e),r.set(e,t);for(var I=a;++C<l;){u=s[C];var W=t[u],q=e[u];if(n)var X=a?n(q,W,u,e,t,r):n(W,q,u,t,e,r);if(!(X===void 0?W===q||i(W,q,o,n,r):X)){p=!1;break}I||(I=u=="constructor")}if(p&&!I){var H=t.constructor,D=e.constructor;H!=D&&"constructor"in t&&"constructor"in e&&!(typeof H=="function"&&H instanceof H&&typeof D=="function"&&D instanceof D)&&(p=!1)}return r.delete(t),r.delete(e),p}var yrt=1,ZN="[object Arguments]",KN="[object Array]",$0="[object Object]",brt=Object.prototype,JN=brt.hasOwnProperty;function xrt(t,e,o,n,i,r){var a=Ho(t),s=Ho(e),l=a?KN:ka(t),d=s?KN:ka(e);l=l==ZN?$0:l,d=d==ZN?$0:d;var b=l==$0,C=d==$0,u=l==d;if(u&&vm(t)){if(!vm(e))return!1;a=!0,b=!1}if(u&&!b)return r||(r=new Pa),a||oE(t)?kH(t,e,o,n,i,r):hrt(t,e,l,o,n,i,r);if(!(o&yrt)){var j=b&&JN.call(t,"__wrapped__"),A=C&&JN.call(e,"__wrapped__");if(j||A){var p=j?t.value():t,I=A?e.value():e;return r||(r=new Pa),i(p,I,o,n,r)}}return u?(r||(r=new Pa),vrt(t,e,o,n,i,r)):!1}function Ag(t,e,o,n,i){return t===e?!0:t==null||e==null||!er(t)&&!er(e)?t!==t&&e!==e:xrt(t,e,o,n,Ag,i)}var wrt=1,_rt=2;function Srt(t,e,o,n){var i=o.length,r=i;if(t==null)return!r;for(t=Object(t);i--;){var a=o[i];if(a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++i<r;){a=o[i];var s=a[0],l=t[s],d=a[1];if(a[2]){if(l===void 0&&!(s in t))return!1}else{var b=new Pa,C;if(!(C===void 0?Ag(d,l,wrt|_rt,n,b):C))return!1}}return!0}function AH(t){return t===t&&!Ai(t)}function Crt(t){for(var e=Mg(t),o=e.length;o--;){var n=e[o],i=t[n];e[o]=[n,i,AH(i)]}return e}function EH(t,e){return function(o){return o==null?!1:o[t]===e&&(e!==void 0||t in Object(o))}}function Trt(t){var e=Crt(t);return e.length==1&&e[0][2]?EH(e[0][0],e[0][1]):function(o){return o===t||Srt(o,t,e)}}var Mrt="[object Symbol]";function f1(t){return typeof t=="symbol"||er(t)&&$a(t)==Mrt}var krt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Art=/^\w*$/;function dE(t,e){if(Ho(t))return!1;var o=typeof t;return o=="number"||o=="symbol"||o=="boolean"||t==null||f1(t)?!0:Art.test(t)||!krt.test(t)||e!=null&&t in Object(e)}var Ert="Expected a function";function pE(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Ert);var o=function(){var n=arguments,i=e?e.apply(this,n):n[0],r=o.cache;if(r.has(i))return r.get(i);var a=t.apply(this,n);return o.cache=r.set(i,a)||r,a};return o.cache=new(pE.Cache||xl),o}pE.Cache=xl;var Prt=500;function Ort(t){var e=pE(t,function(n){return o.size===Prt&&o.clear(),n}),o=e.cache;return e}var Lrt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Nrt=/\\(\\)?/g,Drt=Ort(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Lrt,function(o,n,i,r){e.push(i?r.replace(Nrt,"$1"):n||o)}),e});function Eg(t,e){for(var o=-1,n=t==null?0:t.length,i=Array(n);++o<n;)i[o]=e(t[o],o,t);return i}var Rrt=1/0,QN=ca?ca.prototype:void 0,tD=QN?QN.toString:void 0;function hE(t){if(typeof t=="string")return t;if(Ho(t))return Eg(t,hE)+"";if(f1(t))return tD?tD.call(t):"";var e=t+"";return e=="0"&&1/t==-Rrt?"-0":e}function Ql(t){return t==null?"":hE(t)}function Gp(t,e){return Ho(t)?t:dE(t,e)?[t]:Drt(Ql(t))}var Irt=1/0;function Yp(t){if(typeof t=="string"||f1(t))return t;var e=t+"";return e=="0"&&1/t==-Irt?"-0":e}function m1(t,e){e=Gp(e,t);for(var o=0,n=e.length;t!=null&&o<n;)t=t[Yp(e[o++])];return o&&o==n?t:void 0}function tc(t,e,o){var n=t==null?void 0:m1(t,e);return n===void 0?o:n}function jrt(t,e){return t!=null&&e in Object(t)}function $rt(t,e,o){e=Gp(e,t);for(var n=-1,i=e.length,r=!1;++n<i;){var a=Yp(e[n]);if(!(r=t!=null&&o(t,a)))break;t=t[a]}return r||++n!=i?r:(i=t==null?0:t.length,!!i&&eE(i)&&Sg(a,i)&&(Ho(t)||gm(t)))}function PH(t,e){return t!=null&&$rt(t,e,jrt)}var zrt=1,Brt=2;function Frt(t,e){return dE(t)&&AH(e)?EH(Yp(t),e):function(o){var n=tc(o,t);return n===void 0&&n===e?PH(o,t):Ag(e,n,zrt|Brt)}}function g1(t){return t}function Hrt(t){return function(e){return e==null?void 0:e[t]}}function Wrt(t){return function(e){return m1(e,t)}}function Vrt(t){return dE(t)?Hrt(Yp(t)):Wrt(t)}function v1(t){return typeof t=="function"?t:t==null?g1:typeof t=="object"?Ho(t)?Frt(t[0],t[1]):Trt(t):Vrt(t)}function Urt(t,e){var o={};return e=v1(e),cE(t,function(n,i,r){_g(o,i,e(n,i,r))}),o}function Grt(t){for(var e=t.length,o=5381,n=52711,i;e--;)i=t.charCodeAt(e),o=o*33^i,n=n*33^i;return(o>>>0)*4096+(n>>>0)}var xm="|",Yrt=/\[object ([HTML|SVG](.*)Element)\]/,Xrt={"[object Arguments]":0,"[object Array]":1,"[object ArrayBuffer]":2,"[object AsyncFunction]":3,"[object AsyncGeneratorFunction]":4,"[object BigInt]":5,"[object BigInt64Array]":6,"[object BigUint64Array]":7,"[object Boolean]":8,"[object DataView]":9,"[object Date]":10,"[object DocumentFragment]":11,"[object Error]":12,"[object Event]":13,"[object Float32Array]":14,"[object Float64Array]":15,"[object Function]":16,"[object Generator]":17,"[object GeneratorFunction]":18,"[object Int8Array]":19,"[object Int16Array]":20,"[object Map]":21,"[object Number]":22,"[object Object]":23,"[object Promise]":24,"[object RegExp]":25,"[object Set]":26,"[object SharedArrayBuffer]":27,"[object String]":28,"[object Uint8Array]":29,"[object Uint8ClampedArray]":30,"[object Uint16Array]":31,"[object Uint32Array]":32,"[object WeakMap]":33,"[object WeakRef]":34,"[object WeakSet]":35,CUSTOM:36,ELEMENT:37},qrt={"[object Arguments]":1,"[object Array]":2},OH={"[object Generator]":1,"[object Promise]":2,"[object WeakMap]":3,"[object WeakRef]":4,"[object WeakSet]":5},Zrt={"[object AsyncFunction]":1,"[object AsyncGeneratorFunction]":2,"[object Boolean]":3,"[object Function]":4,"[object GeneratorFunction]":5,"[object Number]":6,"[object String]":7},Krt={"[object BigInt64Array]":1,"[object BigUint64Array]":2,"[object Float32Array]":3,"[object Float64Array]":4,"[object Int8Array]":5,"[object Int16Array]":6,"[object Uint8Array]":7,"[object Uint8ClampedArray]":8,"[object Uint16Array]":9,"[object Uint32Array]":10},Jrt={"[object Arguments]":1,"[object Array]":2,"[object ArrayBuffer]":3,"[object BigInt64Array]":4,"[object BigUint64Array]":5,"[object DataView]":6,"[object Float32Array]":7,"[object Float64Array]":8,"[object Int8Array]":9,"[object Int16Array]":10,"[object Map]":11,"[object Object]":12,"[object Set]":13,"[object SharedArrayBuffer]":14,"[object Uint8Array]":15,"[object Uint8ClampedArray]":16,"[object Uint16Array]":17,"[object Uint32Array]":18,CUSTOM:19},xf={bigint:"i",boolean:"b",empty:"e",function:"g",number:"n",object:"o",string:"s",symbol:"s"};function Qrt(t,e){return t[0]>e[0]}function LH(t,e){return t>e}function fE(t,e){for(var o,n,i=0;i<t.length;++i){for(n=t[i],o=i-1;~o&&e(t[o],n);--o)t[o+1]=t[o];t[o+1]=n}return t}function _i(t,e){return xf.object+xm+Xrt[t]+xm+e}var eD=new WeakMap,tat=0;function B2(t,e){var o=eD.get(t);if(o)return o;var n=_i(e,"NOT_ENUMERABLE"+xm+tat++);return eD.set(t,n),n}var eat=Object.prototype.toString;function oat(t,e,o){if(Jrt[e])return oD(e,t,o);if(e==="[object Date]")return _i(e,t.getTime());if(e==="[object RegExp]")return _i(e,t.toString());if(e==="[object Event]")return _i(e,[t.bubbles,t.cancelBubble,t.cancelable,t.composed,t.currentTarget,t.defaultPrevented,t.eventPhase,t.isTrusted,t.returnValue,t.target,t.type].join());if(e==="[object Error]")return _i(e,t.message+xm+t.stack);if(e==="[object DocumentFragment]")return _i(e,sat(t));var n=e.match(Yrt);return n?_i("ELEMENT",n[1]+xm+t.outerHTML):OH[e]?B2(t,e):Zrt[e]?_i(e,t.toString()):oD("CUSTOM",t,o)}function oD(t,e,o){var n=o.cache.get(e);return n?_i(t,"RECURSIVE~"+n):(o.cache.set(e,++o.id),t==="[object Object]"?e[Symbol.iterator]?B2(e,t):_i(t,iD(e,o)):qrt[t]?_i(t,nat(e,o)):t==="[object Map]"?_i(t,lat(e,o)):t==="[object Set]"?_i(t,cat(e,o)):Krt[t]?_i(t,e.join()):t==="[object ArrayBuffer]"?_i(t,nD(e)):t==="[object DataView]"?_i(t,nD(e.buffer)):OH[t]?B2(e,t):_i("CUSTOM",iD(e,o)))}function nat(t,e){for(var o=t.length,n=new Array(o);--o>=0;)n[o]=up(t[o],e);return n.join()}function iat(t){return Buffer.from(t).toString("utf8")}function rat(t){return String.fromCharCode.apply(null,new Uint16Array(t))}function aat(){return"UNSUPPORTED"}function sat(t){for(var e=t.children,o=e.length,n=new Array(o);--o>=0;)n[o]=e[o].outerHTML;return n.join()}var nD=typeof Buffer<"u"&&typeof Buffer.from=="function"?iat:typeof Uint16Array=="function"?rat:aat;function lat(t,e){var o=new Array(t.size),n=0;for(t.forEach(function(i,r){o[n++]=[up(r,e),up(i,e)]}),fE(o,Qrt);--n>=0;)o[n]="["+o[n][0]+","+o[n][1]+"]";return"["+o.join()+"]"}function iD(t,e){for(var o=fE(Object.getOwnPropertyNames(t),LH),n=o.length,i=new Array(n),r=n;--r>=0;)i[r]=o[r]+":"+up(t[o[r]],e);return"{"+i.join()+"}"}function cat(t,e){var o=new Array(t.size),n=0;return t.forEach(function(i){o[n++]=up(i,e)}),"["+fE(o,LH).join()+"]"}function up(t,e){var o=typeof t;return t==null||o==="undefined"?xf.empty+t:o==="object"?oat(t,eat.call(t),e||{cache:new WeakMap,id:1}):o==="function"||o==="symbol"?xf[o]+t.toString():o==="boolean"?xf.boolean+ +t:xf[o]+t}function NH(t){return Grt(up(t,void 0))}function F2(t,e,o){(o!==void 0&&!wg(t[e],o)||o===void 0&&!(e in t))&&_g(t,e,o)}function DH(t){return er(t)&&Tg(t)}var uat="[object Object]",dat=Function.prototype,pat=Object.prototype,RH=dat.toString,hat=pat.hasOwnProperty,fat=RH.call(Object);function IH(t){if(!er(t)||$a(t)!=uat)return!1;var e=aE(t);if(e===null)return!0;var o=hat.call(e,"constructor")&&e.constructor;return typeof o=="function"&&o instanceof o&&RH.call(o)==fat}function H2(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function mat(t){return Up(t,kg(t))}function gat(t,e,o,n,i,r,a){var s=H2(t,o),l=H2(e,o),d=a.get(l);if(d){F2(t,o,d);return}var b=r?r(s,l,o+"",t,e,a):void 0,C=b===void 0;if(C){var u=Ho(l),j=!u&&vm(l),A=!u&&!j&&oE(l);b=l,u||j||A?Ho(s)?b=s:DH(s)?b=p1(s):j?(C=!1,b=gH(l,!0)):A?(C=!1,b=xH(l,!0)):b=[]:IH(l)||gm(l)?(b=s,gm(s)?b=mat(s):(!Ai(s)||sl(s))&&(b=wH(l))):C=!1}C&&(a.set(l,b),i(b,l,n,r,a),a.delete(l)),F2(t,o,b)}function mE(t,e,o,n,i){t!==e&&TH(e,function(r,a){if(i||(i=new Pa),Ai(r))gat(t,e,a,o,mE,n,i);else{var s=n?n(H2(t,a),r,a+"",t,e,i):void 0;s===void 0&&(s=r),F2(t,a,s)}},kg)}function y1(t,e,o){switch(o.length){case 0:return t.call(e);case 1:return t.call(e,o[0]);case 2:return t.call(e,o[0],o[1]);case 3:return t.call(e,o[0],o[1],o[2])}return t.apply(e,o)}var rD=Math.max;function jH(t,e,o){return e=rD(e===void 0?t.length-1:e,0),function(){for(var n=arguments,i=-1,r=rD(n.length-e,0),a=Array(r);++i<r;)a[i]=n[e+i];i=-1;for(var s=Array(e+1);++i<e;)s[i]=n[i];return s[e]=o(a),y1(t,this,s)}}function vat(t){return function(){return t}}var yat=By?function(t,e){return By(t,"toString",{configurable:!0,enumerable:!1,value:vat(e),writable:!0})}:g1,bat=800,xat=16,wat=Date.now;function $H(t){var e=0,o=0;return function(){var n=wat(),i=xat-(n-o);if(o=n,i>0){if(++e>=bat)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var gE=$H(yat);function b1(t,e){return gE(jH(t,e,g1),t+"")}function zH(t,e,o){if(!Ai(o))return!1;var n=typeof e;return(n=="number"?Tg(o)&&Sg(e,o.length):n=="string"&&e in o)?wg(o[e],t):!1}function BH(t){return b1(function(e,o){var n=-1,i=o.length,r=i>1?o[i-1]:void 0,a=i>2?o[2]:void 0;for(r=t.length>3&&typeof r=="function"?(i--,r):void 0,a&&zH(o[0],o[1],a)&&(r=i<3?void 0:r,i=1),e=Object(e);++n<i;){var s=o[n];s&&t(e,s,n,r)}return e})}var vE=BH(function(t,e,o){mE(t,e,o)});function yE(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}function FH(t,e,o){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),o=o>i?i:o,o<0&&(o+=i),i=e>o?0:o-e>>>0,e>>>=0;for(var r=Array(i);++n<i;)r[n]=t[n+e];return r}function _at(t,e){return e.length<2?t:m1(t,FH(e,0,-1))}function Sat(t,e){return e=Gp(e,t),t=_at(t,e),t==null||delete t[Yp(yE(e))]}function Cat(t){return IH(t)?void 0:t}var aD=ca?ca.isConcatSpreadable:void 0;function Tat(t){return Ho(t)||gm(t)||!!(aD&&t&&t[aD])}function HH(t,e,o,n,i){var r=-1,a=t.length;for(o||(o=Tat),i||(i=[]);++r<a;){var s=t[r];o(s)?rE(i,s):n||(i[i.length]=s)}return i}function Mat(t){var e=t==null?0:t.length;return e?HH(t):[]}function x1(t){return gE(jH(t,void 0,Mat),t+"")}var kat=1,Aat=2,Eat=4,w1=x1(function(t,e){var o={};if(t==null)return o;var n=!1;e=Eg(e,function(r){return r=Gp(r,t),n||(n=r.length>1),r}),Up(t,sE(t),o),n&&(o=Xd(o,kat|Aat|Eat,Cat));for(var i=e.length;i--;)Sat(o,e[i]);return o});let Pg=class extends c1{constructor(e,o){super(aH,{key:e,interpolationOptions:o},ket.t)}},_1=class{constructor(e,o,n,i,r){this._name=e,this.type=o,this.description=n||"",i&&(this._dataSource=i),r&&(this.composeCode=r)}get name(){return this._name}set name(e){this._name=e}get dataSource(){return this._dataSource}serialize(){return{name:this.name,type:this.type,description:this.description,dataSource:this.dataSource,composeCode:this.composeCode,__serializable:"DimensionalElement"}}toJSON(){return this.serialize()}toString(){return this.jaql()}};function Bl(t){let e=t.replace(/[^a-zA-Z0-9_.]/g,"").replace(/\./g,"_");return e.charAt(0).match(/[0-9]/)&&(e="_"+e),e}const bE="DM",no={Sum:"sum",Average:"avg",Min:"min",Max:"max",Count:"count",CountDistinct:"countDistinct",Median:"median",Variance:"var",StandardDeviation:"stdev"};exports.Li=void 0;(function(t){t[t.None=0]="None",t[t.Ascending=1]="Ascending",t[t.Descending=2]="Descending"})(exports.Li=exports.Li||(exports.Li={}));const qe={Measure:"measure",MeasureTemplate:"measuretemplate",BaseMeasure:"basemeasure",CalculatedMeasure:"calculatedmeasure",Dimension:"dimension",DateDimension:"datedimension",TextDimension:"textdimension",NumericDimension:"numericdimension",DateLevel:"datelevel",Attribute:"attribute",TextAttribute:"text-attribute",NumericAttribute:"numeric-attribute",Filter:"filter",DimensionFilter:"dimensionfilter",MeasureFilter:"measurefilter",isMetadata(t){return qe.isMeasure(t)||qe.isDimension(t)||qe.isAttribute(t)||qe.isFilter(t)},isMeasureTemplate(t){return t?typeof t=="string"?t.toLowerCase()===qe.MeasureTemplate:t.agg==="*"||t.aggregation==="*"||t.type&&t.type.toLowerCase()===qe.MeasureTemplate:!1},isBaseMeasure(t){return t?typeof t=="string"?t.toLowerCase()===qe.BaseMeasure:(t.agg||t.aggregation)&&(t.attribute||t.jaql)&&!this.isMeasureTemplate(t):!1},isMeasure(t){if(!t)return!1;if(typeof t=="string"){const e=t;return e.toLowerCase()===qe.Measure||e.toLowerCase()===qe.BaseMeasure||e.toLowerCase()===qe.MeasureTemplate||e.toLowerCase()===qe.CalculatedMeasure}return this.isBaseMeasure(t)||this.isCalculatedMeasure(t)||this.isMeasureTemplate(t)},isCalculatedMeasure(t){return t?typeof t=="string"?t.toLowerCase()===qe.CalculatedMeasure:(t.expression||t.formula)&&t.context:!1},isDateDimension(t){return t?typeof t=="string"?t.toLowerCase()===qe.DateDimension:(t.dim||t.expression)&&t.level:!1},isTextDimension(t){return t&&typeof t=="string"?t.toLowerCase()===qe.TextDimension:!1},isNumericDimension(t){return t&&typeof t=="string"?t.toLowerCase()===qe.NumericDimension:!1},isDimension(t){if(t&&typeof t=="object"&&(t=t.type),typeof t=="string"){const e=t;return e.toLowerCase()===qe.DateDimension||e.toLowerCase()===qe.Dimension||e.toLowerCase()===qe.TextDimension||e.toLowerCase()===qe.NumericDimension}return!1},isAttribute(t){if(typeof t=="string"){const e=t;return e.toLowerCase()===qe.Attribute||e.toLowerCase()===qe.TextAttribute||e.toLowerCase()===qe.NumericAttribute||e.toLowerCase()===qe.DateLevel}return t&&t.type?this.isAttribute(t.type):!1},isFilter(t){if(t&&typeof t=="object"&&(t=t.type),typeof t=="string"){const e=t;return e.toLowerCase()===qe.Filter||e.toLowerCase()===qe.DimensionFilter||e.toLowerCase()===qe.MeasureFilter}return!1}},pe={Years:"Years",Quarters:"Quarters",Months:"Months",Weeks:"Weeks",Days:"Days",Hours:"Hours",MinutesRoundTo30:"MinutesRoundTo30",MinutesRoundTo15:"MinutesRoundTo15",Minutes:"Minutes",Seconds:"Seconds",AggHours:"AggHours",AggMinutesRoundTo30:"AggMinutesRoundTo30",AggMinutesRoundTo15:"AggMinutesRoundTo15",AggMinutesRoundTo1:"AggMinutesRoundTo1",get all(){return[pe.Years,pe.Quarters,pe.Months,pe.Weeks,pe.Days,pe.Hours,pe.MinutesRoundTo30,pe.MinutesRoundTo15,pe.Minutes,pe.Seconds,pe.AggHours,pe.AggMinutesRoundTo30,pe.AggMinutesRoundTo15,pe.AggMinutesRoundTo1]}};var Zv;(function(t){t.TEXT="text",t.NUMERIC="numeric",t.DATETIME="datetime"})(Zv=Zv||(Zv={}));var Uf;(function(t){t.ASC="asc",t.DESC="desc"})(Uf=Uf||(Uf={}));var E_;(function(t){t.PRE="pre",t.POST="post"})(E_=E_||(E_={}));function W2(t,e=[]){try{return t==null?String(t):typeof t=="string"?`'${tH(t)}'`:typeof t=="number"||typeof t=="boolean"?String(t):t instanceof Date?`new Date('${t.toISOString()}')`:Array.isArray(t)?`[${t.map(o=>W2(o,e)).join(", ")}]`:typeof t=="object"&&t!==null?"composeCode"in t?t.composeCode:`{ ${Object.entries(t).filter(([o])=>!e.includes(o)).map(([o,n])=>`${/[^a-zA-Z0-9_$]/.test(o)?`'${o}'`:o}: ${W2(n,e)}`).join(", ")} }`:JSON.stringify(t)}catch(o){return console.error(o,JSON.stringify(t,null,2)),JSON.stringify(t)}}function Pat(t){let e=t.length;for(;e>0&&t[e-1]===void 0;)e--;return t.slice(0,e)}function S1(t,e){return function(o){return function(...n){const i=Pat(n),r=i.length,a=i.map(d=>W2(d,["guid"])).filter((d,b)=>!(["","{ }","[]","undefined","null"].includes(d)&&b===r-1)).join(", "),s=`${t}.${e??o.name}(${a})`,l=o(...n);return l.composeCode=s,l}}}function mo(t,e){return S1("filterFactory",e)(t)}function sD(t,e){return S1("filterFactory.logic",e)(t)}function WH(t,e){return S1("analyticsFactory",e)(t)}function za(t,e){return S1("measureFactory",e)(t)}function Oat(t,e,o){if(typeof o=="number")t.push(o.toString());else if(o&&qe.isMeasureTemplate(o.type)){o=o.sum();const n=`[${Bl(o.name)}]`;t.push(n),e[n]=o}else if(o&&qe.isMeasure(o.type)){const n=`[${Bl(o.name)}]`;t.push(n),e[n]=o}else if(o&&qe.isFilter(o.type)){const n=`[${Bl(o.name)}]`;t.push(n),e[n]=o}else if(o&&qe.isAttribute(o.type)){const n=`[${Bl(o.name)}]`;t.push(n),e[n]=o}}function VH(t,e,o,n){const i={},r=[o+"("];return Oat(r,i,t),n&&r.push(`, ${n}`),r.push(")"),new qH(e,r.join(""),i)}const ji=za((t,e,o)=>{const n=Object.fromEntries(Object.entries(o).map(([i,r])=>[i.startsWith("[")?i:`[${i}]`,r]));return new qH(t,e,n)},"customFormula"),ll=za((t,e,o,n)=>new C1(o??`${e.toString()} ${t.name}`,t,e,n),"aggregate"),lD=za((t,e,o)=>ll(t,no.Sum,e,o),"sum"),Lat=za((t,e,o)=>ll(t,no.Average,e,o),"avg"),UH=za((t,e,o)=>ll(t,no.Min,e,o),"min"),GH=za((t,e,o)=>ll(t,no.Max,e,o),"max"),Nat=za((t,e,o)=>ll(t,no.Median,e,o),"median"),Dat=za((t,e,o)=>ll(t,no.Count,e,o),"count"),YH=za((t,e,o)=>ll(t,no.CountDistinct,e,o),"countDistinct"),Rat=za((t,e,o)=>{let n;const i=r=>r.replace("advancedSmoothing","smooth").replace("localEstimates","local");return o&&(n=Object.entries(o).map(r=>i(`"${r[0]}=${r[1]}"`)).join(",")),VH(t,e??t.name+" Trend","trend",n)},"trend"),Iat=za((t,e,o)=>{let n;if(o){const i=Object.assign({forecastHorizon:3},o);if(i.startDate){const r=new Date(i.startDate);i.startDate=r.toISOString().replace(/.\d+Z$/g,"")}if(i.endDate){const r=new Date(i.endDate);i.endDate=r.toISOString().replace(/.\d+Z$/g,"")}n=Object.entries(i).map(r=>`"${r[0]}=${r[1]}"`).join(",")}else n='"forecastHorizon=3"';return VH(t,e??t.name+" Forecast","forecast",n)},"forecast");let XH=class extends _1{constructor(e,o,n,i,r,a,s){super(e,o,i,a,s),this._sort=exports.Li.None,this._format="#,#.00",this._format=n,this._sort=r||exports.Li.None}getSort(){return this._sort}getFormat(){return this._format}serialize(){const e=super.serialize();return this.getFormat()!==void 0&&(e.format=this.getFormat()),this.getSort()!==void 0&&(e.sort=this.getSort()),e}},C1=class Kv extends XH{constructor(e,o,n,i,r,a,s,l){super(e,qe.BaseMeasure,i,r,a,s,l),this.attribute=o,this.aggregation=n}static aggregationFromJAQL(e){switch(e){case"sum":return no.Sum;case"avg":return no.Average;case"min":return no.Min;case"max":return no.Max;case"countduplicates":return no.Count;case"median":return no.Median;case"count":return no.CountDistinct;case"var":return no.Variance;case"stdev":return no.StandardDeviation}return no.Sum}static aggregationToJAQL(e){switch(e){case no.Sum:return"sum";case no.Average:return"avg";case no.Min:return"min";case no.Max:return"max";case no.Count:return"countduplicates";case no.CountDistinct:return"count";case no.Median:return"median";case no.Variance:return"var";case no.StandardDeviation:return"stdev"}return no.Sum}sort(e){return new Kv(this.name,this.attribute,this.aggregation,this._format,this.description,e,this.dataSource,this.composeCode)}format(e){return new Kv(this.name,this.attribute,this.aggregation,e,this.description,this._sort,this.dataSource,this.composeCode)}get id(){return`${this.attribute.expression}_${this.aggregation}`}serialize(){const e=super.serialize();return e.__serializable="DimensionalBaseMeasure",e.aggregation=this.aggregation,e.attribute=this.attribute.serialize(),e}jaql(e){const o=this.attribute.jaql(!0),n={jaql:Object.assign(Object.assign({},o),{title:this.name,agg:Kv.aggregationToJAQL(this.aggregation)})};return this._format&&(n.format={number:this._format}),this._sort!=exports.Li.None&&(n.jaql.sort=this._sort==exports.Li.Ascending?"asc":"desc"),e===!0?n.jaql:n}},qH=class V2 extends XH{constructor(e,o,n,i,r,a,s,l){super(e,qe.CalculatedMeasure,i,r,a,s,l),this.expression=o,this.context=n}sort(e){return new V2(this.name,this.expression,this.context,this._format,this.description,e,this.dataSource,this.composeCode)}format(e){return new V2(this.name,this.expression,this.context,e,this.description,this._sort,this.dataSource,this.composeCode)}get id(){return this.expression}serialize(){const e=super.serialize();return e.__serializable="DimensionalCalculatedMeasure",e.expression=this.expression,e.context=Object.fromEntries(Object.entries(this.context).map(([o,n])=>[o,n.serialize?n.serialize(n):n])),e}jaql(e){const o={jaql:{title:this.name,formula:this.expression}},n={};return Object.getOwnPropertyNames(this.context).forEach(i=>n[i]=this.context[i].jaql(!0)),o.jaql.context=n,this._format&&(o.format={number:this._format}),this._sort!=exports.Li.None&&(o.jaql.sort=this._sort==exports.Li.Ascending?"asc":"desc"),e===!0?o.jaql:o}};function cl(t,e){return Ag(t,e)}const T1=()=>({guid:S8(13),disabled:!1,locked:!1}),ZH=()=>Object.assign(Object.assign({},T1()),{excludeMembers:!1,enableMultiSelection:!0,deactivatedMembers:[]});function jat(t){return"excludeMembers"in t}const KH=t=>{const e=jat(t)?ZH():T1();return Object.fromEntries(Object.entries(t).filter(([o,n])=>!cl(n,e[o])))},Ls={Contains:"contains",StartsWith:"startsWith",EndsWith:"endsWith",Equals:"equals",DoesntEqual:"doesntEqual",DoesntStartWith:"doesntStartWith",DoesntContain:"doesntContain",DoesntEndWith:"doesntEndWith",Like:"like"},Bi={Equals:"equals",DoesntEqual:"doesntEqual",From:"from",FromNotEqual:"fromNotEqual",To:"to",ToNotEqual:"toNotEqual"},dp={From:"from",To:"to",Last:"last",Next:"next",Anchor:"Anchor"},JH={Union:"or",Intersection:"and",Exclude:"exclude"},xE={Top:"top",Bottom:"bottom"},Gn={logicalAttribute:"logicalAttribute",members:"members",exclude:"exclude",measure:"measure",ranking:"ranking",text:"text",numeric:"numeric",dateRange:"dateRange",relativeDate:"relativeDate",cascading:"cascading",advanced:"advanced"};let Ts=class U2 extends _1{constructor(e,o,n,i){super("filter",qe.Filter,void 0,void 0,i),this.filterType=o,this.isScope=!0,U2.checkAttributeSupport(e),this.attribute=e,this.config=vE({},T1(),n??{})}get name(){return NH(this.jaql()).toString(16)}serialize(){const e=super.serialize();return e.__serializable="AbstractFilter",e.filterType=this.filterType,e.attribute=this.attribute.serialize(),this.config&&(e.config=this.config),e.composeCode=this.composeCode,e}jaql(e){if(this.config.disabled)return U2.disabledJaql(e);const o=this.attribute.jaql(!1),n=this.attribute;if(n.getFormat&&n.getFormat()!==void 0){const i=n.translateGranularityToJaql();o.format={mask:{[i.level]:n.getFormat()}}}return o.jaql.filter=this.filterJaql(),this.attribute.dataSource&&(o.jaql.datasource=this.attribute.dataSource),this.isScope&&(o.panel="scope"),e===!0?o.jaql:o}static checkAttributeSupport(e){const{granularity:o}=e;if(o===pe.Hours||o===pe.MinutesRoundTo30||o===pe.MinutesRoundTo15||o===pe.Minutes||o===pe.Seconds)throw new Pg("errors.filter.unsupportedDatetimeLevel")}static disabledJaql(e){return e?{filter:{}}:{jaql:{filter:{}}}}},QH=class extends Ts{constructor(e,o,n,i){super(e[0].attribute,Gn.logicalAttribute,n,i),this.operator=o,this.filters=e}get id(){return`${this.operator}_${this.filters.map(e=>e.id).join()}`}serialize(){const e=super.serialize();return e.__serializable="LogicalAttributeFilter",e.operator=this.operator,e.filters=this.filters.map(o=>o.serialize()),e}filterJaql(){const e={};return e[this.operator]=this.filters.map(o=>o.filterJaql()),e}},$at=class extends Ts{constructor(e,o,n,i){if(super(e,Gn.members,void 0,i),this.members=o??[],this.members.filter(r=>r==null).length>0)throw new Pg("errors.filter.membersFilterNullMember",{attributeId:e.id});this.config=vE({},ZH(),n??{})}get id(){return`${this.attribute.id}_${this.members.map(e=>e.toString()).join()}`}get name(){return NH([this.jaql(),w1(this.config,["guid","originalFilterJaql"])]).toString(16)}serialize(){const e=super.serialize();return e.__serializable="MembersFilter",this.config&&(e.config=this.config.backgroundFilter?Object.assign(Object.assign({},this.config),{backgroundFilter:this.config.backgroundFilter.serialize()}):this.config),e.members=this.members,e}filterJaql(){const e={members:this.members.map(n=>n.toString())},o=this.config.excludeMembers?{exclude:e}:e;return this.config.backgroundFilter?{and:[o,this.config.backgroundFilter.filterJaql()]}:o}},t8=class extends Ts{constructor(e,o,n){super(e[0].attribute,Gn.cascading,o,n),this._filters=e}get filters(){const{disabled:e,locked:o}=this.config;return this._filters.map(n=>(n.config=Object.assign(Object.assign({},n.config),{disabled:e,locked:o}),n))}get id(){return`${this.filterType}_${this._filters.map(e=>e.id).join()}`}serialize(){const e=super.serialize();return e.__serializable="CascadingFilter",e._filters=this.filters.map(o=>o.serialize()),e}filterJaql(){return{}}jaql(e){return this.config.disabled?Ts.disabledJaql(e):this.filters.map(o=>(o.isScope=!0,o.jaql(e)))}},zat=class extends Ts{constructor(e,o,n,i){super(e.attribute,Gn.exclude,n,i),this.input=o,this.filter=e}get id(){let e=`exclude_${this.filter.id}`;return this.input&&(e+="_from_"+this.input.id),e}serialize(){const e=super.serialize();return e.__serializable="ExcludeFilter",e.filter=this.filter.serialize(),this.input&&(e.input=this.input.serialize()),e}filterJaql(){const e={},o=this.filter.filterJaql();return this.input?(e.filter=this.input.filterJaql(),e.filter.filter={exclude:o}):e.exclude=o,e}},M1=class extends Ts{constructor(e,o,n,i,r,a,s,l){super(e,o,s,l),n&&i!==void 0&&(this.valueA=i,this.operatorA=n),r&&a!==void 0&&(this.operatorB=r,this.valueB=a)}get id(){let e=`${this.attribute.id}`;return this.operatorA&&this.valueA!==void 0&&(e+=`_${this.operatorA}:${this.valueA}`),this.operatorB&&this.valueB!==void 0&&(e+=`_${this.operatorB}:${this.valueB}`),e}serialize(){const e=super.serialize();return e.__serializable="DoubleOperatorFilter",this.operatorA&&(e.operatorA=this.operatorA),this.operatorB&&(e.operatorB=this.operatorB),this.valueA!==void 0&&(e.valueA=this.valueA),this.valueB!==void 0&&(e.valueB=this.valueB),e}filterJaql(){const e={};return this.operatorA&&this.valueA!==void 0&&(e[this.operatorA]=this.valueA),this.operatorB&&this.valueB!==void 0&&(e[this.operatorB]=this.valueB),e}},Bat=class extends M1{constructor(e,o,n,i,r,a,s,l){super(e,Gn.measure,n,i,r,a,s,l),this.measure=o}get id(){let e=`${this.attribute.id}_${this.measure.id}`;return this.operatorA&&this.valueA!==void 0&&(e+=`_${this.operatorA}:${this.valueA}`),this.operatorB&&this.valueB!==void 0&&(e+=`_${this.operatorB}${this.valueB}`),e}serialize(){const e=super.serialize();return e.__serializable="MeasureFilter",e.measure=this.measure.serialize(),e}jaql(e){if(this.config.disabled)return Ts.disabledJaql(e);const o=super.jaql(e);return this.measure instanceof C1&&Object.entries(this.measure.jaql().jaql).forEach(([n,i])=>{o.jaql[n]=i}),o}},e8=class extends Ts{constructor(e,o,n,i,r,a){super(e,Gn.ranking,r,a),this.count=i,this.operator=n,this.measure=o}get id(){return`${this.operator}_${this.count}_${this.attribute.id}_by_${this.measure.id}`}serialize(){const e=super.serialize();return e.__serializable="RankingFilter",e.count=this.count,e.operator=this.operator,e.measure=this.measure.serialize(),e}filterJaql(){const e={};return e[this.operator]=this.count,e.by=this.measure.jaql(!0),e}},Fat=class extends M1{constructor(e,o,n,i,r,a,s){super(e,Gn.numeric,o,n,i,r,a,s)}serialize(){const e=super.serialize();return e.__serializable="NumericFilter",e}},wl=class extends M1{constructor(e,o,n,i,r){super(e,Gn.text,o,n,void 0,void 0,i,r)}serialize(){const e=super.serialize();return e.__serializable="TextFilter",e}},Hat=class extends M1{constructor(e,o,n,i,r){super(e,Gn.dateRange,dp.From,o,dp.To,n,i,r),typeof o=="object"&&(this.valueA=o.toISOString()),typeof n=="object"&&(this.valueB=n.toISOString())}get level(){return this.attribute}get from(){return this.valueA}get to(){return this.valueB}filterJaql(){return super.filterJaql()}serialize(){const e=super.serialize();return e.__serializable="DateRangeFilter",e}},wE=class extends Ts{constructor(e,o,n,i,r,a,s){super(e,Gn.relativeDate,a,s),i||(i=dp.Next),this.anchor=r,this.operator=i,this.offset=o,this.count=n}get level(){return this.attribute}get id(){let e=`${this.level.id}_${this.operator}_${this.offset}_${this.count}`;return this.anchor&&(typeof this.anchor=="string"?e+=`_${this.anchor}`:typeof this.anchor=="object"&&(e+=`_${this.anchor.toISOString()}`)),e}serialize(){const e=super.serialize();return e.__serializable="RelativeDateFilter",e.offset=this.offset,e.count=this.count,e.operator=this.operator,this.anchor&&(e.anchor=typeof this.anchor=="string"?this.anchor:this.anchor.toISOString()),e}filterJaql(){const e={};return e[this.operator]={offset:this.offset,count:this.count},this.anchor&&(typeof this.anchor=="string"?e[this.operator].anchor=this.anchor:typeof this.anchor=="object"&&(e[this.operator].anchor=this.anchor.toISOString())),e}},Wat=class extends Ts{constructor(e,o,n,i){super(e,Gn.advanced,n,i),delete o.filterType,this.jaqlExpression=o}get id(){return`custom_${this.attribute.id}_${this.config.guid}`}filterJaql(){return this.jaqlExpression}serialize(){const e=super.serialize();return e.__serializable="CustomFilter",e.jaqlExpression=this.jaqlExpression,e}};function Vat(t){return"filterType"in t&&t.filterType===Gn.advanced}function k1(t){return"filterType"in t&&t.filterType===Gn.members}function Uat(t){return"filterType"in t&&t.filterType===Gn.numeric}function Gat(t){return"filterType"in t&&t.filterType===Gn.ranking}function Yat(t){return"filterType"in t&&t.filterType===Gn.measure}function vc(t){return"filterType"in t&&t.filterType===Gn.cascading}function Xat(t){return"filterType"in t&&t.filterType===Gn.relativeDate}function qat(t){return"filterType"in t&&t.filterType===Gn.text}function Zat(t){return"filterType"in t&&t.filterType===Gn.dateRange}const Kat=mo((t,e)=>new QH(t,JH.Union,e),"union"),Jat=mo((t,e)=>new QH(t,JH.Intersection,e),"intersection"),_E=mo((t,e,o)=>new zat(t,e,o),"exclude"),o8=mo((t,e,o)=>new wl(t,Ls.DoesntContain,e,o),"doesntContain"),n8=mo((t,e,o)=>new wl(t,Ls.DoesntEndWith,e,o),"doesntEndWith"),i8=mo((t,e,o)=>new wl(t,Ls.DoesntStartWith,e,o),"doesntStartWith"),r8=mo((t,e,o)=>new wl(t,Ls.Contains,e,o),"contains"),a8=mo((t,e,o)=>new wl(t,Ls.EndsWith,e,o),"endsWith"),s8=mo((t,e,o)=>new wl(t,Ls.StartsWith,e,o),"startsWith"),Qat=mo((t,e,o)=>new wl(t,Ls.Like,e,o),"like"),l8=mo((t,e,o)=>typeof e=="string"?new wl(t,Ls.DoesntEqual,e,o):Ou(t,Bi.DoesntEqual,e,void 0,void 0,o),"doesntEqual"),c8=mo((t,e,o)=>typeof e=="string"?new wl(t,Ls.Equals,e,o):Ou(t,Bi.Equals,e,void 0,void 0,o),"equals"),u8=mo((t,e,o)=>Ou(t,Bi.FromNotEqual,e,void 0,void 0,o),"greaterThan"),d8=mo((t,e,o)=>Ou(t,Bi.From,e,void 0,void 0,o),"greaterThanOrEqual"),p8=mo((t,e,o)=>Ou(t,Bi.ToNotEqual,e,void 0,void 0,o),"lessThan"),h8=mo((t,e,o)=>Ou(t,Bi.To,e,void 0,void 0,o),"lessThanOrEqual"),Hy=mo((t,e,o,n)=>Ou(t,Bi.From,e,Bi.To,o,n),"between"),Ou=mo((t,e,o,n,i,r)=>new Fat(t,e,o,n,i,r),"numeric"),yc=mo((t,e,o)=>new $at(t,e,o),"members"),f8=mo((t,e,o,n)=>new Hat(t,e,o,n),"dateRange"),tst=mo((t,e,o,n,i)=>new wE(t,e,o,void 0,n,i),"dateRelative"),m8=mo((t,e,o,n,i)=>new wE(t,e,o,dp.Next,n,i),"dateRelativeFrom"),g8=mo((t,e,o,n,i)=>new wE(t,e,o,dp.Last,n,i),"dateRelativeTo");function Xp(t,e,o,n,i,r,a){return new Bat(t,e,o,n,i,r,a)}const est=mo((t,e,o)=>Xp(t.attribute,t,Bi.Equals,e,void 0,void 0,o),"measureEquals"),ost=mo((t,e,o)=>Xp(t.attribute,t,Bi.FromNotEqual,e,void 0,void 0,o),"measureGreaterThan"),nst=mo((t,e,o)=>Xp(t.attribute,t,Bi.From,e,void 0,void 0,o),"measureGreaterThanOrEqual"),ist=mo((t,e,o)=>Xp(t.attribute,t,Bi.To,e,void 0,void 0,o),"measureLessThanOrEqual"),rst=mo((t,e,o)=>Xp(t.attribute,t,Bi.ToNotEqual,e,void 0,void 0,o),"measureLessThan"),cD=mo((t,e,o,n)=>Xp(t.attribute,t,Bi.From,e,Bi.To,o,n),"measureBetween"),v8=mo((t,e,o,n)=>new e8(t,e,xE.Top,o,n),"topRanking"),y8=mo((t,e,o,n)=>new e8(t,e,xE.Bottom,o,n),"bottomRanking"),Kc=t=>{if(Array.isArray(t)){const[e,...o]=t;return o.length===0?Kc(e):{operator:"AND",left:Kc(e),right:Kc(o)}}return t},b8=mo((t,e)=>new t8(t,e),"cascading");var Gf;(function(t){t.and=sD((e,o)=>({operator:"AND",left:Kc(e),right:Kc(o)}),"and"),t.or=sD((e,o)=>({operator:"OR",left:Kc(e),right:Kc(o)}),"or")})(Gf=Gf||(Gf={}));const ast=mo((t,e,o)=>new Wat(t,e,o),"customFilter"),sst=t=>{const{dim:e,datatype:o,title:n,datasource:i}=t;return P1({expression:e,dataType:o,granularity:wm(t),title:n,dataSource:i})},lst=t=>{const{dim:e,title:o,datatype:n,agg:i,datasource:r}=t;if(i)return O1({expression:e,dataType:n,agg:i,granularity:wm(t),format:void 0,sort:void 0,title:o,dataSource:r})},uD=(t,e)=>{if("formula"in t)return AE(t);const{dim:o,datatype:n,agg:i}=t;return O1({expression:o,granularity:wm(t),dataType:n,agg:i,format:void 0,sort:void 0,title:e})};var Jv;(function(t){t.INCLUDE_ALL="INCLUDE_ALL",t.ADVANCED="ADVANCED",t.INVALID="INVALID",t.CONDITION="CONDITION",t.SPECIFIC_ITEMS="SPECIFIC_ITEMS"})(Jv=Jv||(Jv={}));var Qv;(function(t){t.PERIOD="PERIOD",t.DATE_RANGE="DATE_RANGE"})(Qv=Qv||(Qv={}));var ty;(function(t){t.NUMERIC_RANGE="NUMERIC_RANGE"})(ty=ty||(ty={}));var Gl;(function(t){t.YEARS="years",t.QUARTERS="quarters",t.MONTHS="months",t.WEEKS="weeks",t.DAYS="days",t.HOURS="hours",t.MINUTES="minutes"})(Gl=Gl||(Gl={}));var qd;(function(t){t.DATE_TIME="datetime",t.NUMERIC="numeric",t.TEXT="text"})(qd=qd||(qd={}));const cst=["1","30"],Lo=Object.assign(Object.assign(Object.assign({},Jv),Qv),ty),ust={[Lo.INCLUDE_ALL]:{all:!0,filterType:Lo.INCLUDE_ALL},[Lo.PERIOD]:{last:{count:1,offset:1},isNotCurrentPeriod:!0,filterType:Lo.PERIOD},[Lo.DATE_RANGE]:{filterType:Lo.DATE_RANGE},[Lo.NUMERIC_RANGE]:{filterType:Lo.NUMERIC_RANGE},[Lo.CONDITION]:{explicit:!1,multiSelection:!0,exclude:{members:[]},filterType:Lo.CONDITION},[Lo.SPECIFIC_ITEMS]:{explicit:!0,multiSelection:!0,members:[],filterType:Lo.SPECIFIC_ITEMS}},dst={filter:ust.INCLUDE_ALL,level:Gl.YEARS};exports.st=void 0;(function(t){t.IS="members",t.IS_NOT="exclude",t.IS_WITHIN="isWithin",t.TOP="top",t.BOTTOM="bottom",t.AFTER="after",t.BEFORE="before",t.STARTS_WITH="startsWith",t.DOESNT_START_WITH="doesntStartWith",t.ENDS_WITH="endsWith",t.DOESNT_END_WITH="doesntEndWith",t.CONTAINS="contains",t.DOESNT_CONTAIN="doesntContain",t.EQUALS="equals",t.DOESNT_EQUAL="doesntEqual",t.IS_EMPTY="isEmpty",t.IS_NOT_EMPTY="isNotEmpty",t.GREATER_THAN="fromNotEqual",t.GREATER_THAN_OR_EQUAL="from",t.LESS_THAN="toNotEqual",t.LESS_THAN_OR_EQUAL="to",t.BETWEEN="between",t.IS_NOT_BETWEEN="isNotBetween",t.MULTIPLE_CONDITION="multipleCondition",t.NONE="none"})(exports.st=exports.st||(exports.st={}));const pst=t=>t.top!==void 0,hst=t=>t.bottom!==void 0,fst=t=>{var e;return!!(!((e=t.exclude)===null||e===void 0)&&e.members)},mst=t=>!!t.members&&!!t.isCondition,gst=t=>{var e,o;return((e=t.last)===null||e===void 0?void 0:e.anchor)!==void 0||((o=t.next)===null||o===void 0?void 0:o.anchor)!==void 0},vst=t=>t.fromNotEqual!==void 0,yst=t=>t.from!==void 0&&!t.isBetween,bst=t=>t.toNotEqual!==void 0,xst=t=>t.to!==void 0&&!t.isBetween,wst=t=>t.equals!==void 0,_st=t=>t.doesntEqual!==void 0,Sst=t=>!!(t.equals===""&&t.isEmpty),Cst=t=>!!(t.doesntEqual===""&&t.isEmpty),Tst=t=>t.contains!==void 0,Mst=t=>t.doesntContain!==void 0,kst=t=>t.startsWith!==void 0,Ast=t=>t.doesntStartWith!==void 0,Est=t=>t.endsWith!==void 0,Pst=t=>t.doesntEndWith!==void 0,Ost=t=>t.from!==void 0&&t.to!==void 0,Lst=t=>{var e,o;return((e=t.exclude)===null||e===void 0?void 0:e.from)!==void 0&&((o=t.exclude)===null||o===void 0?void 0:o.to)!==void 0},Nst=t=>!!(t.or||t.and),A1=t=>hst(t)?exports.st.BOTTOM:pst(t)?exports.st.TOP:fst(t)?exports.st.IS_NOT:gst(t)?exports.st.IS_WITHIN:vst(t)?exports.st.GREATER_THAN:bst(t)?exports.st.LESS_THAN:wst(t)?exports.st.EQUALS:_st(t)?exports.st.DOESNT_EQUAL:Sst(t)?exports.st.IS_EMPTY:Cst(t)?exports.st.IS_NOT_EMPTY:Tst(t)?exports.st.CONTAINS:Mst(t)?exports.st.DOESNT_CONTAIN:Pst(t)?exports.st.DOESNT_END_WITH:Ast(t)?exports.st.DOESNT_START_WITH:Est(t)?exports.st.ENDS_WITH:kst(t)?exports.st.STARTS_WITH:Lst(t)?exports.st.IS_NOT_BETWEEN:mst(t)?exports.st.IS:Nst(t)?exports.st.MULTIPLE_CONDITION:Ost(t)?exports.st.BETWEEN:yst(t)?exports.st.GREATER_THAN_OR_EQUAL:xst(t)?exports.st.LESS_THAN_OR_EQUAL:exports.st.NONE,G2=(t,e,o)=>{var n,i,r,a,s,l,d;switch(A1(e)){case exports.st.BOTTOM:if(e.by)return y8(t,uD(e.by,e.rankingMessage),e[exports.st.BOTTOM],{guid:o});break;case exports.st.EQUALS:return c8(t,e[exports.st.EQUALS],{guid:o});case exports.st.DOESNT_EQUAL:return l8(t,e[exports.st.DOESNT_EQUAL],{guid:o});case exports.st.GREATER_THAN:return u8(t,e[exports.st.GREATER_THAN],{guid:o});case exports.st.GREATER_THAN_OR_EQUAL:return d8(t,e[exports.st.GREATER_THAN_OR_EQUAL],{guid:o});case exports.st.TOP:if(e.by)return v8(t,uD(e.by,e.rankingMessage),e[exports.st.TOP],{guid:o});break;case exports.st.STARTS_WITH:return s8(t,e[exports.st.STARTS_WITH],{guid:o});case exports.st.DOESNT_START_WITH:return i8(t,e[exports.st.DOESNT_START_WITH],{guid:o});case exports.st.ENDS_WITH:return a8(t,e[exports.st.ENDS_WITH],{guid:o});case exports.st.DOESNT_END_WITH:return n8(t,e[exports.st.DOESNT_END_WITH],{guid:o});case exports.st.CONTAINS:return r8(t,e[exports.st.CONTAINS],{guid:o});case exports.st.DOESNT_CONTAIN:return o8(t,e[exports.st.DOESNT_CONTAIN],{guid:o});case exports.st.LESS_THAN:return p8(t,e[exports.st.LESS_THAN],{guid:o});case exports.st.LESS_THAN_OR_EQUAL:return h8(t,e[exports.st.LESS_THAN_OR_EQUAL],{guid:o});case exports.st.BETWEEN:return Hy(t,e.from,e.to,{guid:o});case exports.st.IS_NOT_BETWEEN:return _E(Hy(t,(n=e.exclude)===null||n===void 0?void 0:n.from,(i=e.exclude)===null||i===void 0?void 0:i.to,{guid:o}),void 0,{guid:o});case exports.st.MULTIPLE_CONDITION:if(e.and)return Jat(e.and.map(b=>G2(t,b,o)),{guid:o});if(e.or)return Kat(e.or.map(b=>G2(t,b,o)),{guid:o});break;case exports.st.IS_NOT:{const b=((r=e.filter)===null||r===void 0?void 0:r.turnedOff)&&((a=e.filter.exclude)===null||a===void 0?void 0:a.members)||[],C=((l=(s=e.exclude)===null||s===void 0?void 0:s.members)===null||l===void 0?void 0:l.filter(j=>!b.includes(j)))||[],u=KH({guid:o,excludeMembers:!0,enableMultiSelection:(d=e.multiSelection)!==null&&d!==void 0?d:!0,deactivatedMembers:b});return yc(t,C,u)}}throw new Pg("errors.filter.unsupportedConditionFilter",{filter:JSON.stringify(e)})},Dst=(t,e,o)=>{var n,i;switch(A1(e)){case exports.st.EQUALS:return est(t,e[exports.st.EQUALS],{guid:o});case exports.st.GREATER_THAN:return ost(t,e[exports.st.GREATER_THAN],{guid:o});case exports.st.GREATER_THAN_OR_EQUAL:return nst(t,e[exports.st.GREATER_THAN_OR_EQUAL],{guid:o});case exports.st.LESS_THAN:return rst(t,e[exports.st.LESS_THAN],{guid:o});case exports.st.LESS_THAN_OR_EQUAL:return ist(t,e[exports.st.LESS_THAN_OR_EQUAL],{guid:o});case exports.st.BETWEEN:return cD(t,e.from,e.to,{guid:o});case exports.st.IS_NOT_BETWEEN:return _E(cD(t,(n=e.exclude)===null||n===void 0?void 0:n.from,(i=e.exclude)===null||i===void 0?void 0:i.to,{guid:o}),void 0,{guid:o})}throw new Pg("errors.filter.unsupportedConditionFilter",{filter:JSON.stringify(e)})},Rst=(t,e)=>{let o=t?t.toLocaleLowerCase():Gl.YEARS;return o===Gl.MINUTES&&e==="60"&&(o=Gl.HOURS),o},Ist=t=>t==null?void 0:t.all,jst=t=>t.last?t.last:t.next,$st=t=>{var e;return((e=jst(t))===null||e===void 0?void 0:e.offset)<2},x8=t=>{var e;return((e=t==null?void 0:t.members)===null||e===void 0?void 0:e.length)>=0},zst=(t,e)=>t&&typeof t=="string"||e&&typeof e=="string",Bst=(t,e)=>t===""&&e==="",Fst=(t,e)=>{const{from:o,to:n}=t;return e!==qd.DATE_TIME?!1:zst(o,n)?!0:Bst(o,n)},Hst=t=>{const{from:e,to:o}=t;return e!==void 0&&o!==void 0&&!t.isBetween},w8=t=>A1(t)!==exports.st.NONE,Wst=t=>Object.keys(t).includes("isAdvanced"),Vst=t=>!!(t.level&&t.bucket&&t.level===Gl.MINUTES&&cst.includes(t.bucket)),Ust=t=>t.filterType===Lo.INVALID,dD=(t,e=qd.DATE_TIME,o)=>o&&Vst(o)||Wst(t)?Lo.ADVANCED:Ist(t)?Lo.INCLUDE_ALL:$st(t)?Lo.PERIOD:x8(t)?Lo.SPECIFIC_ITEMS:Fst(t,e)?Lo.DATE_RANGE:Hst(t)?Lo.NUMERIC_RANGE:w8(t)?Lo.CONDITION:(Ust(t),Lo.INVALID),Gst=(t,e)=>{const{level:o,filter:n,bucket:i}=t,r=n||dst.filter,a={filter:Object.assign(Object.assign({},r),{filterType:dD(r,e)})};if(e===qd.DATE_TIME){const s=r,l=(s==null?void 0:s.level)||o;a.level=Rst(l,i),a.filter.filterType=dD(r,e,{level:l,bucket:i})}return a},pD=(t,e)=>{const o={config:Object.assign(Object.assign({},T1()),{guid:e,originalFilterJaql:t}),jaql:n=>n?t:{jaql:t,panel:"scope"},attribute:{id:t.dim},type:"filter"};return Object.assign({},o)},Yst=(t,e)=>yc(t,[],{guid:e,excludeMembers:!0}),Xst=(t,e,o,n)=>{const i=qst(e),r=Zst(e,i),a=KH({guid:o,excludeMembers:!1,enableMultiSelection:n??!0,deactivatedMembers:i});return yc(t,r,a)};function qst(t){var e,o,n,i;return!((e=t.filter)===null||e===void 0)&&e.turnedOff?(i=(n=(o=t.filter)===null||o===void 0?void 0:o.exclude)===null||n===void 0?void 0:n.members)!==null&&i!==void 0?i:[]:[]}function Zst(t,e){const o=t.members;return e?o.filter(n=>!e.includes(n)):o}const Kst=(t,e,o)=>f8(t,e.from,e.to,{guid:o}),Jst=(t,e,o)=>Hy(t,e.from,e.to,{guid:o}),Qst=(t,e,o)=>e.last?g8(t,e.last.offset,e.last.count,e.last.anchor,{guid:o}):m8(t,e.next.offset,e.next.count,e.next.anchor,{guid:o}),tlt=(t,e,o)=>ast(t,e,{guid:o}),hD=(t,e)=>{try{if("formula"in t)throw new Pg("errors.filter.formulaFiltersNotSupported",{filter:JSON.stringify(t)});const o=Gst(t,t.datatype),{filter:n}=o,{filterType:i}=n,r=sst(t),a=lst(t);switch(i){case Lo.INCLUDE_ALL:return Yst(r,e);case Lo.SPECIFIC_ITEMS:return Xst(r,n,e,n.multiSelection);case Lo.CONDITION:return a?Dst(a,n,e):G2(r,n,e);case Lo.DATE_RANGE:return Kst(r,n,e);case Lo.PERIOD:return Qst(r,n,e);case Lo.NUMERIC_RANGE:return Jst(r,n,e);case Lo.ADVANCED:return tlt(r,n,e);case Lo.INVALID:return pD(t,e)}}catch(o){console.debug("Fall back to generic pass-through JAQL filter due to filter translation error:",o)}return pD(t,e)},elt=t=>["__int4","__int8","int","tinyint","bigint","int2","int4","int8","smallint","mediumint","serial","integer","byteint","int64"].includes(t.toLowerCase()),olt=t=>["basemeasure","calculatedmeasure","float","float4","float8","double precision","double","numeric","decimal","real","number","float64"].includes(t.toLowerCase()),kn=t=>elt(t)||olt(t)||t==="numeric-attribute",SE=t=>["textdimension","string","varchar","text","ntext","char","character","character varying","smalltext","nchar","nvarchar","json","jsonb","object","text-attribute"].includes(t.toLowerCase()),Lr=t=>["datelevel","date","time","datetime","timestamp without time zone","timestamp","timestamp with time zone","timestamp(6)","timestamp_tz","timestamp_ntz","timestamp_ltz","timestampltz","timestampntz","timestamptz","datetime64[ns]","timewithtimezone","timestampwithtimezone","timestamp_with_timezone"].includes(t.toLowerCase()),_8=t=>["bool","boolean","bit","logical"].includes(t.toLowerCase()),CE=t=>kn(t)?"number":Lr(t)?"datetime":SE(t)?"text":_8(t)?"boolean":"text",S8=function(t){t||(t=20);const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),o=new Array(t);let n=0,i;for(let r=0;r<t;r+=1){if(r>0&&r%5==0){o[r]="-";continue}n<=2&&(n=33554432+Math.random()*16777216|0),i=n&15,n=n>>4,o[r]=e[r==19?i&3|8:i]}return o.join("")},E1=t=>{if(!t)return{filters:void 0,relations:void 0};if(Array.isArray(t))return{filters:t,relations:void 0};const e=new Set;function o(a){const[s,...l]=a;if(e.add(s),!l.length)return n({instanceid:s.config.guid});const d=n(s),b=o(l);return{left:d,right:b,operator:"AND"}}function n(a){return a&&(nlt(a)?vc(a)?o(a.filters):(e.add(a),{instanceid:a.config.guid}):("left"in a&&(a.left=n(a.left)),"right"in a&&(a.right=n(a.right)),"composeCode"in a&&delete a.composeCode,a))}const i=xr(t),r=n(i);return{filters:Array.from(e),relations:r}};function nlt(t){return"config"in t&&"guid"in t.config}function TE(t){return typeof t=="string"?t:t.title}function ME(t){return typeof t=="object"&&"type"in t&&"title"in t}function ilt(t){return{id:t.id,address:t.address,title:t.title,type:t.live?"live":"elasticube"}}function kE(t){return ME(t)?{title:t.title,live:t.type==="live"}:{title:t,live:!1}}function rlt(t){var e;return ME(t)?{title:t.title,live:t.type==="live",id:(e=t.id)!==null&&e!==void 0?e:"",address:t.address}:{title:t,id:""}}function alt(t){return t?t==="asc"?exports.Li.Ascending:exports.Li.Descending:exports.Li.None}function slt(t){switch(t){case"sortAsc":return exports.Li.Ascending;case"sortDesc":return exports.Li.Descending;default:return exports.Li.None}}const C8=(t,e,o=!1,n=!1)=>{const i=t.filter.filter&&!("turnedOff"in t.filter.filter),r=e||S8(),a=hD(t,r);if(i){const s=hD(Object.assign(Object.assign({},t),{filter:t.filter.filter}),`${e}-bg`),l=a.config;return a.config=Object.assign(Object.assign({},l),{backgroundFilter:s}),a}return a.config=Object.assign(Object.assign({},a.config),{originalFilterJaql:t,disabled:o,locked:n}),a};function Lu(t){const[e,o]=t.slice(1,-1).split(".");return{table:e,column:o?o.replace("(Calendar)","").trim():""}}function T8(t){return Lu(t.expression).table}function M8(t){return Lu(t.expression).column}function llt(t){switch(t){case Uf.ASC:return"sortAsc";case Uf.DESC:return"sortDesc";default:return"sortNone"}}const P1=({expression:t,dataType:e,granularity:o,format:n,sort:i,title:r,panel:a,dataSource:s})=>{const l=Lu(t).column,d=alt(i);if(e===Zv.DATETIME)return new pp(r??l,t,o||pe.Years,n||pp.getDefaultFormatForGranularity(o||pe.Years),void 0,d,s,void 0,a);const b=!e||kn(e)?qe.NumericAttribute:qe.TextAttribute;return new L1(r??l,t,b,void 0,d,s,void 0,a)},O1=({expression:t,dataType:e,agg:o,granularity:n,format:i,sort:r,title:a,dataSource:s})=>{const l=P1({expression:t,dataType:e,granularity:n,format:i,sort:r,title:a,dataSource:s}),d=C1.aggregationFromJAQL(o),b=Lu(t).column,C=a??`${d} ${b}`;switch(d){case no.Sum:return lD(l,C,i);case no.Average:return Lat(l,C,i);case no.Min:return UH(l,C,i);case no.Max:return GH(l,C,i);case no.Count:return Dat(l,C,i);case no.CountDistinct:return YH(l,C,i);case no.Median:return Nat(l,C,i);case no.Variance:return ll(l,no.Variance,C,i);case no.StandardDeviation:return ll(l,no.StandardDeviation,C,i);default:return lD(l,C,i)}},AE=t=>{var e;const o=Urt((e=t.context)!==null&&e!==void 0?e:{},n=>typeof n=="string"?n:n&&EE(n));return ji(t.title,t.formula,o)};function EE(t,e,o){if("filter"in t)return C8(t);if("formula"in t)return AE(t);const n="datasource"in t?t.datasource:void 0;return t.agg?O1({expression:t.dim,dataType:t.datatype,agg:t.agg||"",granularity:wm(t),format:e,sort:t.sort,title:t.title,dataSource:n}):P1({expression:t.dim,dataType:t.datatype,granularity:wm(t),format:e,sort:t.sort,title:t.title,panel:o,dataSource:n})}function wm(t){return t!=null&&t.datatype&&Lr(t.datatype)?pp.translateJaqlToGranularity(t):void 0}const PE=t=>CE(t).replace("number","numeric");let L1=class k8 extends _1{constructor(e,o,n,i,r,a,s,l){if(super(e,n||qe.Attribute,i,a,s),this._sort=exports.Li.None,this.expression=o,!s&&o){const{table:d,column:b}=Lu(o);this.composeCode=OE(d,b,"",bE)}l==="columns"&&(this.panel=l),this._sort=r||exports.Li.None}get id(){return this.expression}getSort(){return this._sort}sort(e){return new k8(this.name,this.expression,this.type,this.description,e,this.dataSource,this.composeCode,this.panel)}jaql(e){const o={jaql:{title:this.name,dim:this.expression,datatype:PE(this.type)}};return this.panel&&(o.panel=this.panel),this._sort!=exports.Li.None&&(o.jaql.sort=this._sort==exports.Li.Ascending?"asc":"desc"),e===!0?o.jaql:o}serialize(){const e=super.serialize();return e.__serializable="DimensionalAttribute",e.expression=this.expression,this.getSort()!==exports.Li.None&&(e.sort=this.getSort()),e}},pp=class ey extends L1{constructor(e,o,n,i,r,a,s,l,d){if(super(e,o,qe.DateLevel,r,a,s,l),this._format=i,this.granularity=n,!l&&o){const{table:b,column:C}=Lu(o);this.composeCode=OE(b,C,n,bE)}d==="columns"&&(this.panel=d)}get id(){let e=`${this.expression}`;const{level:o="",dateTimeLevel:n="",bucket:i}=this.translateGranularityToJaql();return e+=`_${(o||n).toLowerCase()}`,i&&(e+=`_${i}`),e}getSort(){return this._sort}sort(e){return new ey(this.name,this.expression,this.granularity,this._format,this.description,e,this.dataSource,this.composeCode)}getFormat(){return this._format}format(e){return new ey(this.name,this.expression,this.granularity,e,this.description,this._sort,this.dataSource,this.composeCode)}setGranularity(e){return new ey(this.name,this.expression,e,this._format,this.description,this._sort,this.dataSource,this.composeCode)}serialize(){const e=super.serialize();return e.__serializable="DimensionalLevelAttribute",e.granularity=this.granularity,this.getFormat()!==void 0&&(e.format=this.getFormat()),e}jaql(e){const o={jaql:Object.assign({title:this.name,dim:this.expression,datatype:PE(this.type)},this.translateGranularityToJaql())};if(this.panel&&(o.panel=this.panel),this._format!==void 0){const n=o.jaql.dateTimeLevel||o.jaql.level;o.format={mask:{}},o.format.mask[n]=this._format}return this._sort!=exports.Li.None&&(o.jaql.sort=this._sort==exports.Li.Ascending?"asc":"desc"),e===!0?o.jaql:o}translateGranularityToJaql(){const e="minutes",o="seconds";switch(this.granularity){case pe.Years:case pe.Quarters:case pe.Months:case pe.Weeks:case pe.Days:return{level:this.granularity.toLowerCase()};case pe.Hours:return{dateTimeLevel:e,bucket:"60"};case pe.MinutesRoundTo30:return{dateTimeLevel:e,bucket:"30"};case pe.MinutesRoundTo15:return{dateTimeLevel:e,bucket:"15"};case pe.Minutes:return{dateTimeLevel:e,bucket:"1"};case pe.Seconds:return{dateTimeLevel:o,bucket:"0"};case pe.AggHours:return{level:e,bucket:"60"};case pe.AggMinutesRoundTo30:return{level:e,bucket:"30"};case pe.AggMinutesRoundTo15:return{level:e,bucket:"15"};case pe.AggMinutesRoundTo1:return{level:e,bucket:"1"};default:return console.warn("Unsupported level"),{level:this.granularity}}}static translateJaqlToGranularity(e){const o=n=>(console.warn("Unsupported granularity",n),n);if(e.dateTimeLevel){if(e.dateTimeLevel!=="minutes"&&e.dateTimeLevel!=="seconds")return o(e.dateTimeLevel);switch(e.bucket){case"60":return pe.Hours;case"30":return pe.MinutesRoundTo30;case"15":return pe.MinutesRoundTo15;case"1":return pe.Minutes;case"0":return pe.Seconds;default:return o(e.dateTimeLevel)}}switch(e.level){case"years":return pe.Years;case"quarters":return pe.Quarters;case"months":return pe.Months;case"weeks":return pe.Weeks;case"days":return pe.Days;case"minutes":switch(e.bucket){case"60":return pe.AggHours;case"30":return pe.AggMinutesRoundTo30;case"15":return pe.AggMinutesRoundTo15;case"1":return pe.AggMinutesRoundTo1;default:return o(e.level)}default:return o(e.level)}}static getDefaultFormatForGranularity(e){switch(e){case pe.Years:return"yyyy";case pe.Quarters:return"Q yyyy";case pe.Months:return"yyyy-MM";case pe.Weeks:return"ww yyyy";case pe.Days:return"yyyy-MM-dd";case pe.Hours:return"yyyy-MM-dd HH:mm";case pe.MinutesRoundTo30:return"yyyy-MM-dd HH:mm";case pe.MinutesRoundTo15:return"yyyy-MM-dd HH:mm";case pe.Minutes:return"yyyy-MM-dd HH:mm";case pe.Seconds:return"yyyy-MM-dd HH:mm:ss";case pe.AggHours:return"HH:mm";case pe.AggMinutesRoundTo30:return"HH:mm";case pe.AggMinutesRoundTo15:return"HH:mm";case pe.AggMinutesRoundTo1:return"HH:mm";default:return""}}};function A8(t){return t.granularity?clt(t):new L1(t.name||t.title,t.attribute||t.expression||t.dim,t.type,t.desc||t.description,t.sort,t.dataSource)}function clt(t){return new pp(t.name||t.title,t.attribute||t.expression||t.dim,t.granularity,t.format,t.desc||t.description,t.sort,t.dataSource)}function OE(t,e,o,n){return(n.length>0?n+".":"")+Bl(t)+"."+Bl(e)+(o&&o.length>0?"."+o:"")}function P_(t){return"attribute"in t}function ult(t){return"measure"in t}const dlt={rows:!1,columns:!1},fD=t=>{if(typeof t=="object"&&t!==null){if(typeof Object.getPrototypeOf=="function"){const e=Object.getPrototypeOf(t);return e===Object.prototype||e===null}return Object.prototype.toString.call(t)==="[object Object]"}return!1},zn=(...t)=>t.reduce((e,o)=>{if(Array.isArray(o))throw new TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");return Object.keys(o).forEach(n=>{["__proto__","constructor","prototype"].includes(n)||(Array.isArray(e[n])&&Array.isArray(o[n])?e[n]=zn.options.mergeArrays?Array.from(new Set(e[n].concat(o[n]))):o[n]:fD(e[n])&&fD(o[n])?e[n]=zn(e[n],o[n]):e[n]=o[n])}),e},{}),E8={mergeArrays:!0};zn.options=E8;zn.withOptions=(t,...e)=>{zn.options=Object.assign({mergeArrays:!0},t);const o=zn(...e);return zn.options=E8,o};let z0;const plt=new Uint8Array(16);function hlt(){if(!z0&&(z0=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!z0))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return z0(plt)}const yi=[];for(let t=0;t<256;++t)yi.push((t+256).toString(16).slice(1));function flt(t,e=0){return yi[t[e+0]]+yi[t[e+1]]+yi[t[e+2]]+yi[t[e+3]]+"-"+yi[t[e+4]]+yi[t[e+5]]+"-"+yi[t[e+6]]+yi[t[e+7]]+"-"+yi[t[e+8]]+yi[t[e+9]]+"-"+yi[t[e+10]]+yi[t[e+11]]+yi[t[e+12]]+yi[t[e+13]]+yi[t[e+14]]+yi[t[e+15]]}const mlt=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),mD={randomUUID:mlt};function P8(t,e,o){if(mD.randomUUID&&!e&&!t)return mD.randomUUID();t=t||{};const n=t.random||(t.rng||hlt)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,flt(n)}function glt(t,e){const o=e==null?void 0:e.find(n=>O8(t)===n.attribute.id);return o&&!o.config.disabled&&(o.isScope&&(o.isScope=!1),t.jaql.in={selected:o.jaql()}),t}function vlt(t,e){const o=[],n=[];return e.forEach(i=>{t.some(r=>O8(r)===i.attribute.id)?o.push(i):n.push(i)}),[o,n]}function O8(t){const{dim:e,level:o,dateTimeLevel:n,bucket:i}=t.jaql;let r=`${e}`;return(o||n)&&(r+=`_${o||n}`),i&&(r+=`_${i}`),r}var ylt=function(t,e){var o={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(o[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(o[n[i]]=t[n[i]]);return o};function blt(t,e,o){return{rowsCount:t.length,columnsCount:e.length,measuresCount:o.length}}function xlt(t){switch(t){case"sortAsc":return"asc";case"sortDesc":return"desc";default:return"none"}}function wlt(t,e,o){const n=xlt(t.direction),i=e===o.rowsCount-1,r={dir:n,initialized:!0,field:t.by&&"valuesIndex"in t.by?o.rowsCount+o.columnsCount+t.by.valuesIndex:e};return i&&(r.sortingLastDimension=!0),t.by&&(r.measurePath=(t.by.columnsMembersPath||[]).reduce((a,s,l)=>Object.assign(Object.assign({},a),{[o.rowsCount+l]:s}),{})),{sort:n,sortDetails:r}}function _lt(t,e){if(e.rowsCount===0)return;const o=e.rowsCount-1,n=t[o],i=n.jaql,{sortDetails:r,sort:a}=i,s=ylt(i,["sortDetails","sort"]);if(r&&r.field!==o&&r.field<t.length){const l=t[r.field];l.jaql.sortDetails=r,l.jaql.sort=a,n.jaql=s}}const oy="ComposeSDK";function L8(t,e){const{attributes:o,measures:n,filters:i,filterRelations:r,highlights:a,dataSource:s,count:l,offset:d,ungroup:b}=t,C=b&&n.length===0,u=Object.assign({metadata:Clt({attributes:o,measures:n,filters:i,filterRelations:r,highlights:a},e)},Tlt(s,l,d,C));return r?Object.assign(Object.assign({},u),{filterRelations:r}):u}function N8(t,e,o,n,i){const[r,a]=vlt(t,n);t.forEach(d=>glt(d,r));const s=d=>{const b=d.jaql();return o?Array.isArray(b)?b.map(C=>Object.assign(Object.assign({},C),{instanceid:d.config.guid})):Object.assign(Object.assign({},b),{instanceid:d.config.guid}):b},l=(i?e.flatMap(d=>s(d)):[...e,...a].flatMap(d=>s(d))).filter(d=>Object.keys(d.jaql.filter||{}).length!==0);return i&&a.length>0&&console.warn(`The following highlight filters were not applied due to missing attributes: [${a.map(d=>d.attribute.name).join(", ")}].`),l}function Slt(t){var e,o;const n=(e=t.jaql)===null||e===void 0?void 0:e.formula;if(!n||!n.includes("trend")&&!n.includes("forecast"))return t;const i=structuredClone(t),r=(o=i.jaql)===null||o===void 0?void 0:o.context;if(r)for(const a in r){const s=r[a];s.datatype==="text"&&s.agg==="count"&&(s.datatype="numeric")}return i}function Clt(t,e){const{attributes:o,measures:n,filters:i,filterRelations:r,highlights:a}=t,s=o.map(b=>b.jaql()),l=n.map(b=>Slt(b.jaql())),d=N8(s,i,r,a,e);return[...s,...l,...d]}function Tlt(t,e,o,n){return Object.assign(Object.assign(Object.assign({datasource:kE(t),by:oy,queryGuid:P8()},n?{ungroup:!0}:{}),e?{count:e}:{}),o?{offset:o}:{})}function Mlt(t,e){const{rowsAttributes:o,columnsAttributes:n,measures:i,filters:r,filterRelations:a,grandTotals:s,highlights:l,dataSource:d,count:b,offset:C}=t,u=Object.assign({metadata:Alt({rowsAttributes:o,columnsAttributes:n,measures:i,filters:r,highlights:l,filterRelations:a},e)},Elt(d,s,b,C));return a?Object.assign(Object.assign({},u),{filterRelations:a}):u}function gD(t,e,o,n){const i=e==="rows"&&P_(t)&&t.sort&&t.sort.direction!=="sortNone",r=Object.assign(Object.assign({},P_(t)?t.attribute.jaql(!0):t.jaql(!0)),i&&wlt(t.sort,o,n));return Object.assign(Object.assign({jaql:r},P_(t)&&t.includeSubTotals?{format:{subtotal:!0}}:{}),{panel:e,field:{index:o,id:`${e}-${o}`}})}function klt(t,e,o){return Object.assign(Object.assign({},ult(t)?zn(t.measure.jaql(),{jaql:{subtotalAgg:t.totalsCalculation},format:Object.assign({databars:t.dataBars||!1},t.shouldRequestMinMax&&{color:{type:"range"}})}):t.jaql()),{panel:e,field:{index:o,id:`${e}-${o}`}})}function Alt(t,e){const{rowsAttributes:o,columnsAttributes:n,measures:i,filters:r,filterRelations:a,highlights:s}=t,l=blt(o,n,i);let d=0;const b=o.map((I,W)=>gD(I,"rows",W+d,l));d=d+o.length;const C=n.map((I,W)=>gD(I,"columns",W+d,l));d=d+n.length;const u=[...b,...C],j=i.map((I,W)=>klt(I,"measures",W+d)),A=N8(u,r,a,s,e),p=[...u,...j,...A];return _lt(p,l),p}function Elt(t,e,o,n){return Object.assign(Object.assign(Object.assign({datasource:kE(t),by:oy,queryGuid:P8(),dashboard:oy,widget:oy,format:"pivot"},o?{count:o}:{}),n?{offset:n}:{}),{grandTotals:Object.assign(Object.assign({},dlt),e)})}var Plt=!1;function Olt(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function Llt(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var Nlt=function(){function t(o){var n=this;this._insertTag=function(i){var r;n.tags.length===0?n.insertionPoint?r=n.insertionPoint.nextSibling:n.prepend?r=n.container.firstChild:r=n.before:r=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(i,r),n.tags.push(i)},this.isSpeedy=o.speedy===void 0?!Plt:o.speedy,this.tags=[],this.ctr=0,this.nonce=o.nonce,this.key=o.key,this.container=o.container,this.prepend=o.prepend,this.insertionPoint=o.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(o){o.forEach(this._insertTag)},e.insert=function(o){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(Llt(this));var n=this.tags[this.tags.length-1];if(this.isSpeedy){var i=Olt(n);try{i.insertRule(o,i.cssRules.length)}catch{}}else n.appendChild(document.createTextNode(o));this.ctr++},e.flush=function(){this.tags.forEach(function(o){var n;return(n=o.parentNode)==null?void 0:n.removeChild(o)}),this.tags=[],this.ctr=0},t}(),Ni="-ms-",Wy="-moz-",go="-webkit-",D8="comm",LE="rule",NE="decl",Dlt="@import",R8="@keyframes",Rlt="@layer",Ilt=Math.abs,N1=String.fromCharCode,jlt=Object.assign;function $lt(t,e){return Si(t,0)^45?(((e<<2^Si(t,0))<<2^Si(t,1))<<2^Si(t,2))<<2^Si(t,3):0}function I8(t){return t.trim()}function zlt(t,e){return(t=e.exec(t))?t[0]:t}function vo(t,e,o){return t.replace(e,o)}function Y2(t,e){return t.indexOf(e)}function Si(t,e){return t.charCodeAt(e)|0}function _m(t,e,o){return t.slice(e,o)}function is(t){return t.length}function DE(t){return t.length}function B0(t,e){return e.push(t),t}function Blt(t,e){return t.map(e).join("")}var D1=1,hp=1,j8=0,br=0,ei=0,qp="";function R1(t,e,o,n,i,r,a){return{value:t,root:e,parent:o,type:n,props:i,children:r,line:D1,column:hp,length:a,return:""}}function Rh(t,e){return jlt(R1("",null,null,"",null,null,0),t,{length:-t.length},e)}function Flt(){return ei}function Hlt(){return ei=br>0?Si(qp,--br):0,hp--,ei===10&&(hp=1,D1--),ei}function Er(){return ei=br<j8?Si(qp,br++):0,hp++,ei===10&&(hp=1,D1++),ei}function ys(){return Si(qp,br)}function ny(){return br}function Og(t,e){return _m(qp,t,e)}function Sm(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function $8(t){return D1=hp=1,j8=is(qp=t),br=0,[]}function z8(t){return qp="",t}function iy(t){return I8(Og(br-1,X2(t===91?t+2:t===40?t+1:t)))}function Wlt(t){for(;(ei=ys())&&ei<33;)Er();return Sm(t)>2||Sm(ei)>3?"":" "}function Vlt(t,e){for(;--e&&Er()&&!(ei<48||ei>102||ei>57&&ei<65||ei>70&&ei<97););return Og(t,ny()+(e<6&&ys()==32&&Er()==32))}function X2(t){for(;Er();)switch(ei){case t:return br;case 34:case 39:t!==34&&t!==39&&X2(ei);break;case 40:t===41&&X2(t);break;case 92:Er();break}return br}function Ult(t,e){for(;Er()&&t+ei!==57&&!(t+ei===84&&ys()===47););return"/*"+Og(e,br-1)+"*"+N1(t===47?t:Er())}function Glt(t){for(;!Sm(ys());)Er();return Og(t,br)}function Ylt(t){return z8(ry("",null,null,null,[""],t=$8(t),0,[0],t))}function ry(t,e,o,n,i,r,a,s,l){for(var d=0,b=0,C=a,u=0,j=0,A=0,p=1,I=1,W=1,q=0,X="",H=i,D=r,$=n,z=X;I;)switch(A=q,q=Er()){case 40:if(A!=108&&Si(z,C-1)==58){Y2(z+=vo(iy(q),"&","&\f"),"&\f")!=-1&&(W=-1);break}case 34:case 39:case 91:z+=iy(q);break;case 9:case 10:case 13:case 32:z+=Wlt(A);break;case 92:z+=Vlt(ny()-1,7);continue;case 47:switch(ys()){case 42:case 47:B0(Xlt(Ult(Er(),ny()),e,o),l);break;default:z+="/"}break;case 123*p:s[d++]=is(z)*W;case 125*p:case 59:case 0:switch(q){case 0:case 125:I=0;case 59+b:W==-1&&(z=vo(z,/\f/g,"")),j>0&&is(z)-C&&B0(j>32?yD(z+";",n,o,C-1):yD(vo(z," ","")+";",n,o,C-2),l);break;case 59:z+=";";default:if(B0($=vD(z,e,o,d,b,i,s,X,H=[],D=[],C),r),q===123)if(b===0)ry(z,e,$,$,H,r,C,s,D);else switch(u===99&&Si(z,3)===110?100:u){case 100:case 108:case 109:case 115:ry(t,$,$,n&&B0(vD(t,$,$,0,0,i,s,X,i,H=[],C),D),i,D,C,s,n?H:D);break;default:ry(z,$,$,$,[""],D,0,s,D)}}d=b=j=0,p=W=1,X=z="",C=a;break;case 58:C=1+is(z),j=A;default:if(p<1){if(q==123)--p;else if(q==125&&p++==0&&Hlt()==125)continue}switch(z+=N1(q),q*p){case 38:W=b>0?1:(z+="\f",-1);break;case 44:s[d++]=(is(z)-1)*W,W=1;break;case 64:ys()===45&&(z+=iy(Er())),u=ys(),b=C=is(X=z+=Glt(ny())),q++;break;case 45:A===45&&is(z)==2&&(p=0)}}return r}function vD(t,e,o,n,i,r,a,s,l,d,b){for(var C=i-1,u=i===0?r:[""],j=DE(u),A=0,p=0,I=0;A<n;++A)for(var W=0,q=_m(t,C+1,C=Ilt(p=a[A])),X=t;W<j;++W)(X=I8(p>0?u[W]+" "+q:vo(q,/&\f/g,u[W])))&&(l[I++]=X);return R1(t,e,o,i===0?LE:s,l,d,b)}function Xlt(t,e,o){return R1(t,e,o,D8,N1(Flt()),_m(t,2,-2),0)}function yD(t,e,o,n){return R1(t,e,o,NE,_m(t,0,n),_m(t,n+1,-1),n)}function Zd(t,e){for(var o="",n=DE(t),i=0;i<n;i++)o+=e(t[i],i,t,e)||"";return o}function qlt(t,e,o,n){switch(t.type){case Rlt:if(t.children.length)break;case Dlt:case NE:return t.return=t.return||t.value;case D8:return"";case R8:return t.return=t.value+"{"+Zd(t.children,n)+"}";case LE:t.value=t.props.join(",")}return is(o=Zd(t.children,n))?t.return=t.value+"{"+o+"}":""}function Zlt(t){var e=DE(t);return function(o,n,i,r){for(var a="",s=0;s<e;s++)a+=t[s](o,n,i,r)||"";return a}}function Klt(t){return function(e){e.root||(e=e.return)&&t(e)}}function B8(t){var e=Object.create(null);return function(o){return e[o]===void 0&&(e[o]=t(o)),e[o]}}var Jlt=function(t,e,o){for(var n=0,i=0;n=i,i=ys(),n===38&&i===12&&(e[o]=1),!Sm(i);)Er();return Og(t,br)},Qlt=function(t,e){var o=-1,n=44;do switch(Sm(n)){case 0:n===38&&ys()===12&&(e[o]=1),t[o]+=Jlt(br-1,e,o);break;case 2:t[o]+=iy(n);break;case 4:if(n===44){t[++o]=ys()===58?"&\f":"",e[o]=t[o].length;break}default:t[o]+=N1(n)}while(n=Er());return t},tct=function(t,e){return z8(Qlt($8(t),e))},bD=new WeakMap,ect=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var e=t.value,o=t.parent,n=t.column===o.column&&t.line===o.line;o.type!=="rule";)if(o=o.parent,!o)return;if(!(t.props.length===1&&e.charCodeAt(0)!==58&&!bD.get(o))&&!n){bD.set(t,!0);for(var i=[],r=tct(e,i),a=o.props,s=0,l=0;s<r.length;s++)for(var d=0;d<a.length;d++,l++)t.props[l]=i[s]?r[s].replace(/&\f/g,a[d]):a[d]+" "+r[s]}}},oct=function(t){if(t.type==="decl"){var e=t.value;e.charCodeAt(0)===108&&e.charCodeAt(2)===98&&(t.return="",t.value="")}};function F8(t,e){switch($lt(t,e)){case 5103:return go+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return go+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return go+t+Wy+t+Ni+t+t;case 6828:case 4268:return go+t+Ni+t+t;case 6165:return go+t+Ni+"flex-"+t+t;case 5187:return go+t+vo(t,/(\w+).+(:[^]+)/,go+"box-$1$2"+Ni+"flex-$1$2")+t;case 5443:return go+t+Ni+"flex-item-"+vo(t,/flex-|-self/,"")+t;case 4675:return go+t+Ni+"flex-line-pack"+vo(t,/align-content|flex-|-self/,"")+t;case 5548:return go+t+Ni+vo(t,"shrink","negative")+t;case 5292:return go+t+Ni+vo(t,"basis","preferred-size")+t;case 6060:return go+"box-"+vo(t,"-grow","")+go+t+Ni+vo(t,"grow","positive")+t;case 4554:return go+vo(t,/([^-])(transform)/g,"$1"+go+"$2")+t;case 6187:return vo(vo(vo(t,/(zoom-|grab)/,go+"$1"),/(image-set)/,go+"$1"),t,"")+t;case 5495:case 3959:return vo(t,/(image-set\([^]*)/,go+"$1$`$1");case 4968:return vo(vo(t,/(.+:)(flex-)?(.*)/,go+"box-pack:$3"+Ni+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+go+t+t;case 4095:case 3583:case 4068:case 2532:return vo(t,/(.+)-inline(.+)/,go+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(is(t)-1-e>6)switch(Si(t,e+1)){case 109:if(Si(t,e+4)!==45)break;case 102:return vo(t,/(.+:)(.+)-([^]+)/,"$1"+go+"$2-$3$1"+Wy+(Si(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~Y2(t,"stretch")?F8(vo(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(Si(t,e+1)!==115)break;case 6444:switch(Si(t,is(t)-3-(~Y2(t,"!important")&&10))){case 107:return vo(t,":",":"+go)+t;case 101:return vo(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+go+(Si(t,14)===45?"inline-":"")+"box$3$1"+go+"$2$3$1"+Ni+"$2box$3")+t}break;case 5936:switch(Si(t,e+11)){case 114:return go+t+Ni+vo(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return go+t+Ni+vo(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return go+t+Ni+vo(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return go+t+Ni+t+t}return t}var nct=function(t,e,o,n){if(t.length>-1&&!t.return)switch(t.type){case NE:t.return=F8(t.value,t.length);break;case R8:return Zd([Rh(t,{value:vo(t.value,"@","@"+go)})],n);case LE:if(t.length)return Blt(t.props,function(i){switch(zlt(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Zd([Rh(t,{props:[vo(i,/:(read-\w+)/,":"+Wy+"$1")]})],n);case"::placeholder":return Zd([Rh(t,{props:[vo(i,/:(plac\w+)/,":"+go+"input-$1")]}),Rh(t,{props:[vo(i,/:(plac\w+)/,":"+Wy+"$1")]}),Rh(t,{props:[vo(i,/:(plac\w+)/,Ni+"input-$1")]})],n)}return""})}},ict=[nct],I1=function(t){var e=t.key;if(e==="css"){var o=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(o,function(A){var p=A.getAttribute("data-emotion");p.indexOf(" ")!==-1&&(document.head.appendChild(A),A.setAttribute("data-s",""))})}var n=t.stylisPlugins||ict,i={},r,a=[];r=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+e+' "]'),function(A){for(var p=A.getAttribute("data-emotion").split(" "),I=1;I<p.length;I++)i[p[I]]=!0;a.push(A)});var s,l=[ect,oct];{var d,b=[qlt,Klt(function(A){d.insert(A)})],C=Zlt(l.concat(n,b)),u=function(A){return Zd(Ylt(A),C)};s=function(A,p,I,W){d=I,u(A?A+"{"+p.styles+"}":p.styles),W&&(j.inserted[p.name]=!0)}}var j={key:e,sheet:new Nlt({key:e,container:r,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:i,registered:{},insert:s};return j.sheet.hydrate(a),j},rct=!0;function H8(t,e,o){var n="";return o.split(" ").forEach(function(i){t[i]!==void 0?e.push(t[i]+";"):i&&(n+=i+" ")}),n}var RE=function(t,e,o){var n=t.key+"-"+e.name;(o===!1||rct===!1)&&t.registered[n]===void 0&&(t.registered[n]=e.styles)},IE=function(t,e,o){RE(t,e,o);var n=t.key+"-"+e.name;if(t.inserted[e.name]===void 0){var i=e;do t.insert(e===i?"."+n:"",i,t.sheet,!0),i=i.next;while(i!==void 0)}};function act(t){for(var e=0,o,n=0,i=t.length;i>=4;++n,i-=4)o=t.charCodeAt(n)&255|(t.charCodeAt(++n)&255)<<8|(t.charCodeAt(++n)&255)<<16|(t.charCodeAt(++n)&255)<<24,o=(o&65535)*1540483477+((o>>>16)*59797<<16),o^=o>>>24,e=(o&65535)*1540483477+((o>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(n+2)&255)<<16;case 2:e^=(t.charCodeAt(n+1)&255)<<8;case 1:e^=t.charCodeAt(n)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var sct={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},lct=!1,cct=/[A-Z]|^ms/g,uct=/_EMO_([^_]+?)_([^]*?)_EMO_/g,W8=function(t){return t.charCodeAt(1)===45},xD=function(t){return t!=null&&typeof t!="boolean"},O_=B8(function(t){return W8(t)?t:t.replace(cct,"-$&").toLowerCase()}),wD=function(t,e){switch(t){case"animation":case"animationName":if(typeof e=="string")return e.replace(uct,function(o,n,i){return rs={name:n,styles:i,next:rs},n})}return sct[t]!==1&&!W8(t)&&typeof e=="number"&&e!==0?e+"px":e},dct="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Cm(t,e,o){if(o==null)return"";var n=o;if(n.__emotion_styles!==void 0)return n;switch(typeof o){case"boolean":return"";case"object":{var i=o;if(i.anim===1)return rs={name:i.name,styles:i.styles,next:rs},i.name;var r=o;if(r.styles!==void 0){var a=r.next;if(a!==void 0)for(;a!==void 0;)rs={name:a.name,styles:a.styles,next:rs},a=a.next;var s=r.styles+";";return s}return pct(t,e,o)}case"function":{if(t!==void 0){var l=rs,d=o(t);return rs=l,Cm(t,e,d)}break}}var b=o;if(e==null)return b;var C=e[b];return C!==void 0?C:b}function pct(t,e,o){var n="";if(Array.isArray(o))for(var i=0;i<o.length;i++)n+=Cm(t,e,o[i])+";";else for(var r in o){var a=o[r];if(typeof a!="object"){var s=a;e!=null&&e[s]!==void 0?n+=r+"{"+e[s]+"}":xD(s)&&(n+=O_(r)+":"+wD(r,s)+";")}else{if(r==="NO_COMPONENT_SELECTOR"&&lct)throw new Error(dct);if(Array.isArray(a)&&typeof a[0]=="string"&&(e==null||e[a[0]]===void 0))for(var l=0;l<a.length;l++)xD(a[l])&&(n+=O_(r)+":"+wD(r,a[l])+";");else{var d=Cm(t,e,a);switch(r){case"animation":case"animationName":{n+=O_(r)+":"+d+";";break}default:n+=r+"{"+d+"}"}}}}return n}var _D=/label:\s*([^\s;{]+)\s*(;|$)/g,rs;function Zp(t,e,o){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var n=!0,i="";rs=void 0;var r=t[0];if(r==null||r.raw===void 0)n=!1,i+=Cm(o,e,r);else{var a=r;i+=a[0]}for(var s=1;s<t.length;s++)if(i+=Cm(o,e,t[s]),n){var l=r;i+=l[s]}_D.lastIndex=0;for(var d="",b;(b=_D.exec(i))!==null;)d+="-"+b[1];var C=act(i)+d;return{name:C,styles:i,next:rs}}var hct=function(t){return t()},V8=Kl[`useInsertionEffect${Math.random()}`.slice(0,18)]?Kl[`useInsertionEffect${Math.random()}`.slice(0,18)]:!1,fct=V8||hct,SD=V8||Pi,mct=!1,U8=uo(typeof HTMLElement<"u"?I1({key:"css"}):null),jE=U8.Provider,$E=function(t){return ye(function(e,o){var n=eo(U8);return t(e,n,o)})},Kp=uo({}),Lg={}.hasOwnProperty,q2="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",zE=function(t,e){var o={};for(var n in e)Lg.call(e,n)&&(o[n]=e[n]);return o[q2]=t,o},gct=function(t){var e=t.cache,o=t.serialized,n=t.isStringTag;return RE(e,o,n),fct(function(){return IE(e,o,n)}),null},vct=$E(function(t,e,o){var n=t.css;typeof n=="string"&&e.registered[n]!==void 0&&(n=e.registered[n]);var i=t[q2],r=[n],a="";typeof t.className=="string"?a=H8(e.registered,r,t.className):t.className!=null&&(a=t.className+" ");var s=Zp(r,void 0,eo(Kp));a+=e.key+"-"+s.name;var l={};for(var d in t)Lg.call(t,d)&&d!=="css"&&d!==q2&&!mct&&(l[d]=t[d]);return l.className=a,o&&(l.ref=o),Re(lo,null,Re(gct,{cache:e,serialized:s,isStringTag:typeof i=="string"}),Re(i,l))}),BE=vct;exports.iC=function(t,e){var o=arguments;if(e==null||!Lg.call(e,"css"))return Re.apply(void 0,o);var n=o.length,i=new Array(n);i[0]=BE,i[1]=zE(t,e);for(var r=2;r<n;r++)i[r]=o[r];return Re.apply(null,i)};(function(t){var e;e||(e=t.JSX||(t.JSX={}))})(exports.iC||(exports.iC={}));var yct=$E(function(t,e){var o=t.styles,n=Zp([o],void 0,eo(Kp)),i=Yt();return SD(function(){var r=e.key+"-global",a=new e.sheet.constructor({key:r,nonce:e.sheet.nonce,container:e.sheet.container,speedy:e.sheet.isSpeedy}),s=!1,l=document.querySelector('style[data-emotion="'+r+" "+n.name+'"]');return e.sheet.tags.length&&(a.before=e.sheet.tags[0]),l!==null&&(s=!0,l.setAttribute("data-emotion",r),a.hydrate([l])),i.current=[a,s],function(){a.flush()}},[e]),SD(function(){var r=i.current,a=r[0],s=r[1];if(s){r[1]=!1;return}if(n.next!==void 0&&IE(e,n.next,!0),a.tags.length){var l=a.tags[a.tags.length-1].nextElementSibling;a.before=l,a.flush()}e.insert("",n,a,!1)},[e,n.name]),null});function Kr(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return Zp(e)}function Ns(){var t=Kr.apply(void 0,arguments),e="animation-"+t.name;return{name:e,styles:"@keyframes "+e+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var bct=function(t){return t()},xct=Kl[`useInsertionEffect${Math.random()}`.slice(0,18)]?Kl[`useInsertionEffect${Math.random()}`.slice(0,18)]:!1,wct=xct||bct,_ct=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Sct=B8(function(t){return _ct.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91}),Cct=!1,Tct=Sct,Mct=function(t){return t!=="theme"},CD=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?Tct:Mct},TD=function(t,e,o){var n;if(e){var i=e.shouldForwardProp;n=t.__emotion_forwardProp&&i?function(r){return t.__emotion_forwardProp(r)&&i(r)}:i}return typeof n!="function"&&o&&(n=t.__emotion_forwardProp),n},kct=function(t){var e=t.cache,o=t.serialized,n=t.isStringTag;return RE(e,o,n),wct(function(){return IE(e,o,n)}),null},Act=function t(e,o){var n=e.__emotion_real===e,i=n&&e.__emotion_base||e,r,a;o!==void 0&&(r=o.label,a=o.target);var s=TD(e,o,n),l=s||CD(i),d=!l("as");return function(){var b=arguments,C=n&&e.__emotion_styles!==void 0?e.__emotion_styles.slice(0):[];if(r!==void 0&&C.push("label:"+r+";"),b[0]==null||b[0].raw===void 0)C.push.apply(C,b);else{var u=b[0];C.push(u[0]);for(var j=b.length,A=1;A<j;A++)C.push(b[A],u[A])}var p=$E(function(I,W,q){var X=d&&I.as||i,H="",D=[],$=I;if(I.theme==null){$={};for(var z in I)$[z]=I[z];$.theme=eo(Kp)}typeof I.className=="string"?H=H8(W.registered,D,I.className):I.className!=null&&(H=I.className+" ");var N=Zp(C.concat(D),W.registered,$);H+=W.key+"-"+N.name,a!==void 0&&(H+=" "+a);var V=d&&s===void 0?CD(X):l,E={};for(var x in I)d&&x==="as"||V(x)&&(E[x]=I[x]);return E.className=H,q&&(E.ref=q),Re(lo,null,Re(kct,{cache:W,serialized:N,isStringTag:typeof X=="string"}),Re(X,E))});return p.displayName=r!==void 0?r:"Styled("+(typeof i=="string"?i:i.displayName||i.name||"Component")+")",p.defaultProps=e.defaultProps,p.__emotion_real=p,p.__emotion_base=i,p.__emotion_styles=C,p.__emotion_forwardProp=s,Object.defineProperty(p,"toString",{value:function(){return a===void 0&&Cct?"NO_COMPONENT_SELECTOR":"."+a}}),p.withComponent=function(I,W){var q=t(I,zy({},o,W,{shouldForwardProp:TD(p,W,!0)}));return q.apply(void 0,C)},p}},Ect=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],Mi=Act.bind(null);Ect.forEach(function(t){Mi[t]=Mi(t)});var Pct=Object.defineProperty,Oct=Object.defineProperties,Lct=Object.getOwnPropertyDescriptors,Vy=Object.getOwnPropertySymbols,G8=Object.prototype.hasOwnProperty,Y8=Object.prototype.propertyIsEnumerable,Fl=Math.pow,Z2=(t,e,o)=>e in t?Pct(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,_t=(t,e)=>{for(var o in e||(e={}))G8.call(e,o)&&Z2(t,o,e[o]);if(Vy)for(var o of Vy(e))Y8.call(e,o)&&Z2(t,o,e[o]);return t},Ht=(t,e)=>Oct(t,Lct(e)),K2=t=>typeof t=="symbol"?t:t+"",ge=(t,e)=>{var o={};for(var n in t)G8.call(t,n)&&e.indexOf(n)<0&&(o[n]=t[n]);if(t!=null&&Vy)for(var n of Vy(t))e.indexOf(n)<0&&Y8.call(t,n)&&(o[n]=t[n]);return o},Dt=(t,e,o)=>(Z2(t,typeof e!="symbol"?e+"":e,o),o),X8=(t,e,o)=>new Promise((n,i)=>{var r=l=>{try{s(o.next(l))}catch(d){i(d)}},a=l=>{try{s(o.throw(l))}catch(d){i(d)}},s=l=>l.done?n(l.value):Promise.resolve(l.value).then(r,a);s((o=o.apply(t,e)).next())});const Nct={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console&&console[t]&&console[t].apply(console,e)}};let Dct=class J2{constructor(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,o)}init(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=o.prefix||"i18next:",this.logger=e||Nct,this.options=o,this.debug=o.debug}log(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return this.forward(o,"log","",!0)}warn(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return this.forward(o,"warn","",!0)}error(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return this.forward(o,"error","")}deprecate(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return this.forward(o,"warn","WARNING DEPRECATED: ",!0)}forward(e,o,n,i){return i&&!this.debug?null:(typeof e[0]=="string"&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[o](e))}create(e){return new J2(this.logger,_t({prefix:`${this.prefix}:${e}:`},this.options))}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new J2(this.logger,e)}};var gs=new Dct;let j1=class{constructor(){this.observers={}}on(e,o){return e.split(" ").forEach(n=>{this.observers[n]=this.observers[n]||[],this.observers[n].push(o)}),this}off(e,o){if(this.observers[e]){if(!o){delete this.observers[e];return}this.observers[e]=this.observers[e].filter(n=>n!==o)}}emit(e){for(var o=arguments.length,n=new Array(o>1?o-1:0),i=1;i<o;i++)n[i-1]=arguments[i];this.observers[e]&&[].concat(this.observers[e]).forEach(r=>{r(...n)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(r=>{r.apply(r,[e,...n])})}};function Ih(){let t,e;const o=new Promise((n,i)=>{t=n,e=i});return o.resolve=t,o.reject=e,o}function MD(t){return t==null?"":""+t}function Rct(t,e,o){t.forEach(n=>{e[n]&&(o[n]=e[n])})}function FE(t,e,o){function n(a){return a&&a.indexOf("###")>-1?a.replace(/###/g,"."):a}function i(){return!t||typeof t=="string"}const r=typeof e!="string"?[].concat(e):e.split(".");for(;r.length>1;){if(i())return{};const a=n(r.shift());!t[a]&&o&&(t[a]=new o),Object.prototype.hasOwnProperty.call(t,a)?t=t[a]:t={}}return i()?{}:{obj:t,k:n(r.shift())}}function kD(t,e,o){const{obj:n,k:i}=FE(t,e,Object);n[i]=o}function Ict(t,e,o,n){const{obj:i,k:r}=FE(t,e,Object);i[r]=i[r]||[],i[r].push(o)}function Uy(t,e){const{obj:o,k:n}=FE(t,e);if(o)return o[n]}function jct(t,e,o){const n=Uy(t,o);return n!==void 0?n:Uy(e,o)}function q8(t,e,o){for(const n in e)n!=="__proto__"&&n!=="constructor"&&(n in t?typeof t[n]=="string"||t[n]instanceof String||typeof e[n]=="string"||e[n]instanceof String?o&&(t[n]=e[n]):q8(t[n],e[n],o):t[n]=e[n]);return t}function id(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var $ct={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function zct(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,e=>$ct[e]):t}const Bct=[" ",",","?","!",";"];function Fct(t,e,o){e=e||"",o=o||"";const n=Bct.filter(a=>e.indexOf(a)<0&&o.indexOf(a)<0);if(n.length===0)return!0;const i=new RegExp(`(${n.map(a=>a==="?"?"\\?":a).join("|")})`);let r=!i.test(t);if(!r){const a=t.indexOf(o);a>0&&!i.test(t.substring(0,a))&&(r=!0)}return r}function Gy(t,e){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[e])return t[e];const n=e.split(o);let i=t;for(let r=0;r<n.length;++r){if(!i||typeof i[n[r]]=="string"&&r+1<n.length)return;if(i[n[r]]===void 0){let a=2,s=n.slice(r,r+a).join(o),l=i[s];for(;l===void 0&&n.length>r+a;)a++,s=n.slice(r,r+a).join(o),l=i[s];if(l===void 0)return;if(l===null)return null;if(e.endsWith(s)){if(typeof l=="string")return l;if(s&&typeof l[s]=="string")return l[s]}const d=n.slice(r+a).join(o);return d?Gy(l,d,o):void 0}i=i[n[r]]}return i}function Yy(t){return t&&t.indexOf("_")>0?t.replace("_","-"):t}let AD=class extends j1{constructor(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=o,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const o=this.options.ns.indexOf(e);o>-1&&this.options.ns.splice(o,1)}getResource(e,o,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const r=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,a=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let s=[e,o];n&&typeof n!="string"&&(s=s.concat(n)),n&&typeof n=="string"&&(s=s.concat(r?n.split(r):n)),e.indexOf(".")>-1&&(s=e.split("."));const l=Uy(this.data,s);return l||!a||typeof n!="string"?l:Gy(this.data&&this.data[e]&&this.data[e][o],n,r)}addResource(e,o,n,i){let r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let s=[e,o];n&&(s=s.concat(a?n.split(a):n)),e.indexOf(".")>-1&&(s=e.split("."),i=o,o=s[1]),this.addNamespaces(o),kD(this.data,s,i),r.silent||this.emit("added",e,o,n,i)}addResources(e,o,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const r in n)(typeof n[r]=="string"||Object.prototype.toString.apply(n[r])==="[object Array]")&&this.addResource(e,o,r,n[r],{silent:!0});i.silent||this.emit("added",e,o,n)}addResourceBundle(e,o,n,i,r){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},s=[e,o];e.indexOf(".")>-1&&(s=e.split("."),i=n,n=o,o=s[1]),this.addNamespaces(o);let l=Uy(this.data,s)||{};i?q8(l,n,r):l=_t(_t({},l),n),kD(this.data,s,l),a.silent||this.emit("added",e,o,n)}removeResourceBundle(e,o){this.hasResourceBundle(e,o)&&delete this.data[e][o],this.removeNamespaces(o),this.emit("removed",e,o)}hasResourceBundle(e,o){return this.getResource(e,o)!==void 0}getResourceBundle(e,o){return o||(o=this.options.defaultNS),this.options.compatibilityAPI==="v1"?_t({},this.getResource(e,o)):this.getResource(e,o)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const o=this.getDataByLanguage(e);return!!(o&&Object.keys(o)||[]).find(n=>o[n]&&Object.keys(o[n]).length>0)}toJSON(){return this.data}};var Z8={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,o,n,i){return t.forEach(r=>{this.processors[r]&&(e=this.processors[r].process(e,o,n,i))}),e}};const ED={};let PD=class K8 extends j1{constructor(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Rct(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=o,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=gs.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const n=this.resolve(e,o);return n&&n.res!==void 0}extractFromKey(e,o){let n=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let r=o.ns||this.options.defaultNS||[];const a=n&&e.indexOf(n)>-1,s=!this.options.userDefinedKeySeparator&&!o.keySeparator&&!this.options.userDefinedNsSeparator&&!o.nsSeparator&&!Fct(e,n,i);if(a&&!s){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:r};const d=e.split(n);(n!==i||n===i&&this.options.ns.indexOf(d[0])>-1)&&(r=d.shift()),e=d.join(i)}return typeof r=="string"&&(r=[r]),{key:e,namespaces:r}}translate(e,o,n){if(typeof o!="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),typeof o=="object"&&(o=_t({},o)),o||(o={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const i=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,r=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(e[e.length-1],o),l=s[s.length-1],d=o.lng||this.language,b=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&d.toLowerCase()==="cimode"){if(b){const X=o.nsSeparator||this.options.nsSeparator;return i?{res:`${l}${X}${a}`,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:l}:`${l}${X}${a}`}return i?{res:a,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:l}:a}const C=this.resolve(e,o);let u=C&&C.res;const j=C&&C.usedKey||a,A=C&&C.exactUsedKey||a,p=Object.prototype.toString.apply(u),I=["[object Number]","[object Function]","[object RegExp]"],W=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,q=!this.i18nFormat||this.i18nFormat.handleAsObject;if(q&&u&&typeof u!="string"&&typeof u!="boolean"&&typeof u!="number"&&I.indexOf(p)<0&&!(typeof W=="string"&&p==="[object Array]")){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const X=this.options.returnedObjectHandler?this.options.returnedObjectHandler(j,u,Ht(_t({},o),{ns:s})):`key '${a} (${this.language})' returned an object instead of string.`;return i?(C.res=X,C):X}if(r){const X=p==="[object Array]",H=X?[]:{},D=X?A:j;for(const $ in u)if(Object.prototype.hasOwnProperty.call(u,$)){const z=`${D}${r}${$}`;H[$]=this.translate(z,Ht(_t({},o),{joinArrays:!1,ns:s})),H[$]===z&&(H[$]=u[$])}u=H}}else if(q&&typeof W=="string"&&p==="[object Array]")u=u.join(W),u&&(u=this.extendTranslation(u,e,o,n));else{let X=!1,H=!1;const D=o.count!==void 0&&typeof o.count!="string",$=K8.hasDefaultValue(o),z=D?this.pluralResolver.getSuffix(d,o.count,o):"",N=o.ordinal&&D?this.pluralResolver.getSuffix(d,o.count,{ordinal:!1}):"",V=o[`defaultValue${z}`]||o[`defaultValue${N}`]||o.defaultValue;!this.isValidLookup(u)&&$&&(X=!0,u=V),this.isValidLookup(u)||(H=!0,u=a);const E=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&H?void 0:u,x=$&&V!==u&&this.options.updateMissing;if(H||X||x){if(this.logger.log(x?"updateKey":"missingKey",d,l,a,x?V:u),r){const P=this.resolve(a,Ht(_t({},o),{keySeparator:!1}));P&&P.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let g=[];const S=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&S&&S[0])for(let P=0;P<S.length;P++)g.push(S[P]);else this.options.saveMissingTo==="all"?g=this.languageUtils.toResolveHierarchy(o.lng||this.language):g.push(o.lng||this.language);const w=(P,U,Z)=>{const B=$&&Z!==u?Z:E;this.options.missingKeyHandler?this.options.missingKeyHandler(P,l,U,B,x,o):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(P,l,U,B,x,o),this.emit("missingKey",P,l,U,u)};this.options.saveMissing&&(this.options.saveMissingPlurals&&D?g.forEach(P=>{this.pluralResolver.getSuffixes(P,o).forEach(U=>{w([P],a+U,o[`defaultValue${U}`]||V)})}):w(g,a,V))}u=this.extendTranslation(u,e,o,C,n),H&&u===a&&this.options.appendNamespaceToMissingKey&&(u=`${l}:${a}`),(H||X)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?u=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${a}`:a,X?u:void 0):u=this.options.parseMissingKeyHandler(u))}return i?(C.res=u,C):u}extendTranslation(e,o,n,i,r){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,_t(_t({},this.options.interpolation.defaultVariables),n),i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(Ht(_t({},n),{interpolation:_t(_t({},this.options.interpolation),n.interpolation)}));const d=typeof e=="string"&&(n&&n.interpolation&&n.interpolation.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let b;if(d){const u=e.match(this.interpolator.nestingRegexp);b=u&&u.length}let C=n.replace&&typeof n.replace!="string"?n.replace:n;if(this.options.interpolation.defaultVariables&&(C=_t(_t({},this.options.interpolation.defaultVariables),C)),e=this.interpolator.interpolate(e,C,n.lng||this.language,n),d){const u=e.match(this.interpolator.nestingRegexp),j=u&&u.length;b<j&&(n.nest=!1)}!n.lng&&this.options.compatibilityAPI!=="v1"&&i&&i.res&&(n.lng=i.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var u=arguments.length,j=new Array(u),A=0;A<u;A++)j[A]=arguments[A];return r&&r[0]===j[0]&&!n.context?(a.logger.warn(`It seems you are nesting recursively key: ${j[0]} in key: ${o[0]}`),null):a.translate(...j,o)},n)),n.interpolation&&this.interpolator.reset()}const s=n.postProcess||this.options.postProcess,l=typeof s=="string"?[s]:s;return e!=null&&l&&l.length&&n.applyPostProcessor!==!1&&(e=Z8.handle(l,e,o,this.options&&this.options.postProcessPassResolved?_t({i18nResolved:i},n):n,this)),e}resolve(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,i,r,a,s;return typeof e=="string"&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(n))return;const d=this.extractFromKey(l,o),b=d.key;i=b;let C=d.namespaces;this.options.fallbackNS&&(C=C.concat(this.options.fallbackNS));const u=o.count!==void 0&&typeof o.count!="string",j=u&&!o.ordinal&&o.count===0&&this.pluralResolver.shouldUseIntlApi(),A=o.context!==void 0&&(typeof o.context=="string"||typeof o.context=="number")&&o.context!=="",p=o.lngs?o.lngs:this.languageUtils.toResolveHierarchy(o.lng||this.language,o.fallbackLng);C.forEach(I=>{this.isValidLookup(n)||(s=I,!ED[`${p[0]}-${I}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(s)&&(ED[`${p[0]}-${I}`]=!0,this.logger.warn(`key "${i}" for languages "${p.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach(W=>{if(this.isValidLookup(n))return;a=W;const q=[b];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(q,b,W,I,o);else{let H;u&&(H=this.pluralResolver.getSuffix(W,o.count,o));const D=`${this.options.pluralSeparator}zero`,$=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(q.push(b+H),o.ordinal&&H.indexOf($)===0&&q.push(b+H.replace($,this.options.pluralSeparator)),j&&q.push(b+D)),A){const z=`${b}${this.options.contextSeparator}${o.context}`;q.push(z),u&&(q.push(z+H),o.ordinal&&H.indexOf($)===0&&q.push(z+H.replace($,this.options.pluralSeparator)),j&&q.push(z+D))}}let X;for(;X=q.pop();)this.isValidLookup(n)||(r=X,n=this.getResource(W,I,X,o))}))})}),{res:n,usedKey:i,exactUsedKey:r,usedLng:a,usedNS:s}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,o,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,o,n,i):this.resourceStore.getResource(e,o,n,i)}static hasDefaultValue(e){const o="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&o===n.substring(0,o.length)&&e[n]!==void 0)return!0;return!1}};function L_(t){return t.charAt(0).toUpperCase()+t.slice(1)}let OD=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=gs.create("languageUtils")}getScriptPartFromCode(e){if(e=Yy(e),!e||e.indexOf("-")<0)return null;const o=e.split("-");return o.length===2||(o.pop(),o[o.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(o.join("-"))}getLanguagePartFromCode(e){if(e=Yy(e),!e||e.indexOf("-")<0)return e;const o=e.split("-");return this.formatLanguageCode(o[0])}formatLanguageCode(e){if(typeof e=="string"&&e.indexOf("-")>-1){const o=["hans","hant","latn","cyrl","cans","mong","arab"];let n=e.split("-");return this.options.lowerCaseLng?n=n.map(i=>i.toLowerCase()):n.length===2?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),o.indexOf(n[1].toLowerCase())>-1&&(n[1]=L_(n[1].toLowerCase()))):n.length===3&&(n[0]=n[0].toLowerCase(),n[1].length===2&&(n[1]=n[1].toUpperCase()),n[0]!=="sgn"&&n[2].length===2&&(n[2]=n[2].toUpperCase()),o.indexOf(n[1].toLowerCase())>-1&&(n[1]=L_(n[1].toLowerCase())),o.indexOf(n[2].toLowerCase())>-1&&(n[2]=L_(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let o;return e.forEach(n=>{if(o)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(o=i)}),!o&&this.options.supportedLngs&&e.forEach(n=>{if(o)return;const i=this.getLanguagePartFromCode(n);if(this.isSupportedCode(i))return o=i;o=this.options.supportedLngs.find(r=>{if(r===i||!(r.indexOf("-")<0&&i.indexOf("-")<0)&&r.indexOf(i)===0)return r})}),o||(o=this.getFallbackCodes(this.options.fallbackLng)[0]),o}getFallbackCodes(e,o){if(!e)return[];if(typeof e=="function"&&(e=e(o)),typeof e=="string"&&(e=[e]),Object.prototype.toString.apply(e)==="[object Array]")return e;if(!o)return e.default||[];let n=e[o];return n||(n=e[this.getScriptPartFromCode(o)]),n||(n=e[this.formatLanguageCode(o)]),n||(n=e[this.getLanguagePartFromCode(o)]),n||(n=e.default),n||[]}toResolveHierarchy(e,o){const n=this.getFallbackCodes(o||this.options.fallbackLng||[],e),i=[],r=a=>{a&&(this.isSupportedCode(a)?i.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return typeof e=="string"&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&r(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&r(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&r(this.getLanguagePartFromCode(e))):typeof e=="string"&&r(this.formatLanguageCode(e)),n.forEach(a=>{i.indexOf(a)<0&&r(this.formatLanguageCode(a))}),i}},Hct=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Wct={1:function(t){return+(t>1)},2:function(t){return+(t!=1)},3:function(t){return 0},4:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},5:function(t){return t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5},6:function(t){return t==1?0:t>=2&&t<=4?1:2},7:function(t){return t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},8:function(t){return t==1?0:t==2?1:t!=8&&t!=11?2:3},9:function(t){return+(t>=2)},10:function(t){return t==1?0:t==2?1:t<7?2:t<11?3:4},11:function(t){return t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3},12:function(t){return+(t%10!=1||t%100==11)},13:function(t){return+(t!==0)},14:function(t){return t==1?0:t==2?1:t==3?2:3},15:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2},16:function(t){return t%10==1&&t%100!=11?0:t!==0?1:2},17:function(t){return t==1||t%10==1&&t%100!=11?0:1},18:function(t){return t==0?0:t==1?1:2},19:function(t){return t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3},20:function(t){return t==1?0:t==0||t%100>0&&t%100<20?1:2},21:function(t){return t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0},22:function(t){return t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3}};const Vct=["v1","v2","v3"],Uct=["v4"],LD={zero:0,one:1,two:2,few:3,many:4,other:5};function Gct(){const t={};return Hct.forEach(e=>{e.lngs.forEach(o=>{t[o]={numbers:e.nr,plurals:Wct[e.fc]}})}),t}let Yct=class{constructor(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=o,this.logger=gs.create("pluralResolver"),(!this.options.compatibilityJSON||Uct.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Gct()}addRule(e,o){this.rules[e]=o}getRule(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(Yy(e),{type:o.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(e,o);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,o){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,n).map(i=>`${o}${i}`)}getSuffixes(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(e,o);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((i,r)=>LD[i]-LD[r]).map(i=>`${this.options.prepend}${o.ordinal?`ordinal${this.options.prepend}`:""}${i}`):n.numbers.map(i=>this.getSuffix(e,i,o)):[]}getSuffix(e,o){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(e,n);return i?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(o)}`:this.getSuffixRetroCompatible(i,o):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,o){const n=e.noAbs?e.plurals(o):e.plurals(Math.abs(o));let i=e.numbers[n];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const r=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:r():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?r():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!Vct.includes(this.options.compatibilityJSON)}};function ND(t,e,o){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,r=jct(t,e,o);return!r&&i&&typeof o=="string"&&(r=Gy(t,o,n),r===void 0&&(r=Gy(e,o,n))),r}let Xct=class{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=gs.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(o=>o),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const o=e.interpolation;this.escape=o.escape!==void 0?o.escape:zct,this.escapeValue=o.escapeValue!==void 0?o.escapeValue:!0,this.useRawValueToEscape=o.useRawValueToEscape!==void 0?o.useRawValueToEscape:!1,this.prefix=o.prefix?id(o.prefix):o.prefixEscaped||"{{",this.suffix=o.suffix?id(o.suffix):o.suffixEscaped||"}}",this.formatSeparator=o.formatSeparator?o.formatSeparator:o.formatSeparator||",",this.unescapePrefix=o.unescapeSuffix?"":o.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":o.unescapeSuffix||"",this.nestingPrefix=o.nestingPrefix?id(o.nestingPrefix):o.nestingPrefixEscaped||id("$t("),this.nestingSuffix=o.nestingSuffix?id(o.nestingSuffix):o.nestingSuffixEscaped||id(")"),this.nestingOptionsSeparator=o.nestingOptionsSeparator?o.nestingOptionsSeparator:o.nestingOptionsSeparator||",",this.maxReplaces=o.maxReplaces?o.maxReplaces:1e3,this.alwaysFormat=o.alwaysFormat!==void 0?o.alwaysFormat:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=`${this.prefix}(.+?)${this.suffix}`;this.regexp=new RegExp(e,"g");const o=`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;this.regexpUnescape=new RegExp(o,"g");const n=`${this.nestingPrefix}(.+?)${this.nestingSuffix}`;this.nestingRegexp=new RegExp(n,"g")}interpolate(e,o,n,i){let r,a,s;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function d(j){return j.replace(/\$/g,"$$$$")}const b=j=>{if(j.indexOf(this.formatSeparator)<0){const W=ND(o,l,j,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(W,void 0,n,Ht(_t(_t({},i),o),{interpolationkey:j})):W}const A=j.split(this.formatSeparator),p=A.shift().trim(),I=A.join(this.formatSeparator).trim();return this.format(ND(o,l,p,this.options.keySeparator,this.options.ignoreJSONStructure),I,n,Ht(_t(_t({},i),o),{interpolationkey:p}))};this.resetRegExp();const C=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,u=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:j=>d(j)},{regex:this.regexp,safeValue:j=>this.escapeValue?d(this.escape(j)):d(j)}].forEach(j=>{for(s=0;r=j.regex.exec(e);){const A=r[1].trim();if(a=b(A),a===void 0)if(typeof C=="function"){const I=C(e,r,i);a=typeof I=="string"?I:""}else if(i&&Object.prototype.hasOwnProperty.call(i,A))a="";else if(u){a=r[0];continue}else this.logger.warn(`missed to pass in variable ${A} for interpolating ${e}`),a="";else typeof a!="string"&&!this.useRawValueToEscape&&(a=MD(a));const p=j.safeValue(a);if(e=e.replace(r[0],p),u?(j.regex.lastIndex+=a.length,j.regex.lastIndex-=r[0].length):j.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),e}nest(e,o){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,r,a;function s(l,d){const b=this.nestingOptionsSeparator;if(l.indexOf(b)<0)return l;const C=l.split(new RegExp(`${b}[ ]*{`));let u=`{${C[1]}`;l=C[0],u=this.interpolate(u,a);const j=u.match(/'/g),A=u.match(/"/g);(j&&j.length%2===0&&!A||A.length%2!==0)&&(u=u.replace(/'/g,'"'));try{a=JSON.parse(u),d&&(a=_t(_t({},d),a))}catch(p){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,p),`${l}${b}${u}`}return delete a.defaultValue,l}for(;i=this.nestingRegexp.exec(e);){let l=[];a=_t({},n),a=a.replace&&typeof a.replace!="string"?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let d=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const b=i[1].split(this.formatSeparator).map(C=>C.trim());i[1]=b.shift(),l=b,d=!0}if(r=o(s.call(this,i[1].trim(),a),a),r&&i[0]===e&&typeof r!="string")return r;typeof r!="string"&&(r=MD(r)),r||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),r=""),d&&(r=l.reduce((b,C)=>this.format(b,C,n.lng,Ht(_t({},n),{interpolationkey:i[1].trim()})),r.trim())),e=e.replace(i[0],r),this.regexp.lastIndex=0}return e}};function qct(t){let e=t.toLowerCase().trim();const o={};if(t.indexOf("(")>-1){const n=t.split("(");e=n[0].toLowerCase().trim();const i=n[1].substring(0,n[1].length-1);e==="currency"&&i.indexOf(":")<0?o.currency||(o.currency=i.trim()):e==="relativetime"&&i.indexOf(":")<0?o.range||(o.range=i.trim()):i.split(";").forEach(r=>{if(!r)return;const[a,...s]=r.split(":"),l=s.join(":").trim().replace(/^'+|'+$/g,"");o[a.trim()]||(o[a.trim()]=l),l==="false"&&(o[a.trim()]=!1),l==="true"&&(o[a.trim()]=!0),isNaN(l)||(o[a.trim()]=parseInt(l,10))})}return{formatName:e,formatOptions:o}}function rd(t){const e={};return function(o,n,i){const r=n+JSON.stringify(i);let a=e[r];return a||(a=t(Yy(n),i),e[r]=a),a(o)}}let Zct=class{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=gs.create("formatter"),this.options=e,this.formats={number:rd((o,n)=>{const i=new Intl.NumberFormat(o,_t({},n));return r=>i.format(r)}),currency:rd((o,n)=>{const i=new Intl.NumberFormat(o,Ht(_t({},n),{style:"currency"}));return r=>i.format(r)}),datetime:rd((o,n)=>{const i=new Intl.DateTimeFormat(o,_t({},n));return r=>i.format(r)}),relativetime:rd((o,n)=>{const i=new Intl.RelativeTimeFormat(o,_t({},n));return r=>i.format(r,n.range||"day")}),list:rd((o,n)=>{const i=new Intl.ListFormat(o,_t({},n));return r=>i.format(r)})},this.init(e)}init(e){const o=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=o.formatSeparator?o.formatSeparator:o.formatSeparator||","}add(e,o){this.formats[e.toLowerCase().trim()]=o}addCached(e,o){this.formats[e.toLowerCase().trim()]=rd(o)}format(e,o,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return o.split(this.formatSeparator).reduce((r,a)=>{const{formatName:s,formatOptions:l}=qct(a);if(this.formats[s]){let d=r;try{const b=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},C=b.locale||b.lng||i.locale||i.lng||n;d=this.formats[s](r,C,_t(_t(_t({},l),i),b))}catch(b){this.logger.warn(b)}return d}else this.logger.warn(`there was no format function for ${s}`);return r},e)}};function Kct(t,e){t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)}let Jct=class extends j1{constructor(e,o,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=o,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=gs.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,i.backend,i)}queueLoad(e,o,n,i){const r={},a={},s={},l={};return e.forEach(d=>{let b=!0;o.forEach(C=>{const u=`${d}|${C}`;!n.reload&&this.store.hasResourceBundle(d,C)?this.state[u]=2:this.state[u]<0||(this.state[u]===1?a[u]===void 0&&(a[u]=!0):(this.state[u]=1,b=!1,a[u]===void 0&&(a[u]=!0),r[u]===void 0&&(r[u]=!0),l[C]===void 0&&(l[C]=!0)))}),b||(s[d]=!0)}),(Object.keys(r).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(r),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}loaded(e,o,n){const i=e.split("|"),r=i[0],a=i[1];o&&this.emit("failedLoading",r,a,o),n&&this.store.addResourceBundle(r,a,n),this.state[e]=o?-1:2;const s={};this.queue.forEach(l=>{Ict(l.loaded,[r],a),Kct(l,e),o&&l.errors.push(o),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(d=>{s[d]||(s[d]={});const b=l.loaded[d];b.length&&b.forEach(C=>{s[d][C]===void 0&&(s[d][C]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(l=>!l.done)}read(e,o,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:o,fcName:n,tried:i,wait:r,callback:a});return}this.readingCalls++;const s=(d,b)=>{if(this.readingCalls--,this.waitingReads.length>0){const C=this.waitingReads.shift();this.read(C.lng,C.ns,C.fcName,C.tried,C.wait,C.callback)}if(d&&b&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,e,o,n,i+1,r*2,a)},r);return}a(d,b)},l=this.backend[n].bind(this.backend);if(l.length===2){try{const d=l(e,o);d&&typeof d.then=="function"?d.then(b=>s(null,b)).catch(s):s(null,d)}catch(d){s(d)}return}return l(e,o,s)}prepareLoading(e,o){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();typeof e=="string"&&(e=this.languageUtils.toResolveHierarchy(e)),typeof o=="string"&&(o=[o]);const r=this.queueLoad(e,o,n,i);if(!r.toLoad.length)return r.pending.length||i(),null;r.toLoad.forEach(a=>{this.loadOne(a)})}load(e,o,n){this.prepareLoading(e,o,{},n)}reload(e,o,n){this.prepareLoading(e,o,{reload:!0},n)}loadOne(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const n=e.split("|"),i=n[0],r=n[1];this.read(i,r,"read",void 0,void 0,(a,s)=>{a&&this.logger.warn(`${o}loading namespace ${r} for language ${i} failed`,a),!a&&s&&this.logger.log(`${o}loaded namespace ${r} for language ${i}`,s),this.loaded(e,a,s)})}saveMissing(e,o,n,i,r){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(o)){this.logger.warn(`did not save key "${n}" as the namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if(this.backend&&this.backend.create){const l=Ht(_t({},a),{isUpdate:r}),d=this.backend.create.bind(this.backend);if(d.length<6)try{let b;d.length===5?b=d(e,o,n,i,l):b=d(e,o,n,i),b&&typeof b.then=="function"?b.then(C=>s(null,C)).catch(s):s(null,b)}catch(b){s(b)}else d(e,o,n,i,s,l)}!e||!e[0]||this.store.addResource(e[0],o,n,i)}}};function DD(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){let e={};if(typeof t[1]=="object"&&(e=t[1]),typeof t[1]=="string"&&(e.defaultValue=t[1]),typeof t[2]=="string"&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const o=t[3]||t[2];Object.keys(o).forEach(n=>{e[n]=o[n]})}return e},interpolation:{escapeValue:!0,format:(t,e,o,n)=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function RD(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function F0(){}function Qct(t){Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(e=>{typeof t[e]=="function"&&(t[e]=t[e].bind(t))})}class Tm extends j1{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(super(),this.options=RD(e),this.services={},this.logger=gs,this.modules={external:[]},Qct(this),o&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,o),this;setTimeout(()=>{this.init(e,o)},0)}}init(){var e=this;let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;typeof o=="function"&&(n=o,o={}),!o.defaultNS&&o.defaultNS!==!1&&o.ns&&(typeof o.ns=="string"?o.defaultNS=o.ns:o.ns.indexOf("translation")<0&&(o.defaultNS=o.ns[0]));const i=DD();this.options=_t(_t(_t({},i),this.options),RD(o)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=_t(_t({},i.interpolation),this.options.interpolation)),o.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=o.keySeparator),o.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=o.nsSeparator);function r(l){return l?typeof l=="function"?new l:l:null}if(!this.options.isClone){this.modules.logger?gs.init(r(this.modules.logger),this.options):gs.init(null,this.options);let l;this.modules.formatter?l=this.modules.formatter:typeof Intl<"u"&&(l=Zct);const d=new OD(this.options);this.store=new AD(this.options.resources,this.options);const b=this.services;b.logger=gs,b.resourceStore=this.store,b.languageUtils=d,b.pluralResolver=new Yct(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),l&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(b.formatter=r(l),b.formatter.init(b,this.options),this.options.interpolation.format=b.formatter.format.bind(b.formatter)),b.interpolator=new Xct(this.options),b.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},b.backendConnector=new Jct(r(this.modules.backend),b.resourceStore,b,this.options),b.backendConnector.on("*",function(C){for(var u=arguments.length,j=new Array(u>1?u-1:0),A=1;A<u;A++)j[A-1]=arguments[A];e.emit(C,...j)}),this.modules.languageDetector&&(b.languageDetector=r(this.modules.languageDetector),b.languageDetector.init&&b.languageDetector.init(b,this.options.detection,this.options)),this.modules.i18nFormat&&(b.i18nFormat=r(this.modules.i18nFormat),b.i18nFormat.init&&b.i18nFormat.init(this)),this.translator=new PD(this.services,this.options),this.translator.on("*",function(C){for(var u=arguments.length,j=new Array(u>1?u-1:0),A=1;A<u;A++)j[A-1]=arguments[A];e.emit(C,...j)}),this.modules.external.forEach(C=>{C.init&&C.init(this)})}if(this.format=this.options.interpolation.format,n||(n=F0),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&l[0]!=="dev"&&(this.options.lng=l[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(l=>{this[l]=function(){return e.store[l](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(l=>{this[l]=function(){return e.store[l](...arguments),e}});const a=Ih(),s=()=>{const l=(d,b)=>{this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(b),n(d,b)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return l(null,this.t.bind(this));this.changeLanguage(this.options.lng,l)};return this.options.resources||!this.options.initImmediate?s():setTimeout(s,0),a}loadResources(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:F0;const n=typeof e=="string"?e:this.language;if(typeof e=="function"&&(o=e),!this.options.resources||this.options.partialBundledLanguages){if(n&&n.toLowerCase()==="cimode")return o();const i=[],r=a=>{a&&this.services.languageUtils.toResolveHierarchy(a).forEach(s=>{i.indexOf(s)<0&&i.push(s)})};n?r(n):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(a=>r(a)),this.options.preload&&this.options.preload.forEach(a=>r(a)),this.services.backendConnector.load(i,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),o(a)})}else o(null)}reloadResources(e,o,n){const i=Ih();return e||(e=this.languages),o||(o=this.options.ns),n||(n=F0),this.services.backendConnector.reload(e,o,r=>{i.resolve(),n(r)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&Z8.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let o=0;o<this.languages.length;o++){const n=this.languages[o];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(e,o){var n=this;this.isLanguageChangingTo=e;const i=Ih();this.emit("languageChanging",e);const r=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},a=(l,d)=>{d?(r(d),this.translator.changeLanguage(d),this.isLanguageChangingTo=void 0,this.emit("languageChanged",d),this.logger.log("languageChanged",d)):this.isLanguageChangingTo=void 0,i.resolve(function(){return n.t(...arguments)}),o&&o(l,function(){return n.t(...arguments)})},s=l=>{!e&&!l&&this.services.languageDetector&&(l=[]);const d=typeof l=="string"?l:this.services.languageUtils.getBestMatchFromCodes(l);d&&(this.language||r(d),this.translator.language||this.translator.changeLanguage(d),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(d)),this.loadResources(d,b=>{a(b,d)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(e),i}getFixedT(e,o,n){var i=this;const r=function(a,s){let l;if(typeof s!="object"){for(var d=arguments.length,b=new Array(d>2?d-2:0),C=2;C<d;C++)b[C-2]=arguments[C];l=i.options.overloadTranslationOptionHandler([a,s].concat(b))}else l=_t({},s);l.lng=l.lng||r.lng,l.lngs=l.lngs||r.lngs,l.ns=l.ns||r.ns,l.keyPrefix=l.keyPrefix||n||r.keyPrefix;const u=i.options.keySeparator||".";let j;return l.keyPrefix&&Array.isArray(a)?j=a.map(A=>`${l.keyPrefix}${u}${A}`):j=l.keyPrefix?`${l.keyPrefix}${u}${a}`:a,i.t(j,l)};return typeof e=="string"?r.lng=e:r.lngs=e,r.ns=o,r.keyPrefix=n,r}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=o.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,r=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const a=(s,l)=>{const d=this.services.backendConnector.state[`${s}|${l}`];return d===-1||d===2};if(o.precheck){const s=o.precheck(this,a);if(s!==void 0)return s}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!i||a(r,e)))}loadNamespaces(e,o){const n=Ih();return this.options.ns?(typeof e=="string"&&(e=[e]),e.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),o&&o(i)}),n):(o&&o(),Promise.resolve())}loadLanguages(e,o){const n=Ih();typeof e=="string"&&(e=[e]);const i=this.options.preload||[],r=e.filter(a=>i.indexOf(a)<0);return r.length?(this.options.preload=i.concat(r),this.loadResources(a=>{n.resolve(),o&&o(a)}),n):(o&&o(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const o=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=this.services&&this.services.languageUtils||new OD(DD());return o.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;return new Tm(e,o)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:F0;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const i=Ht(_t(_t({},this.options),e),{isClone:!0}),r=new Tm(i);return(e.debug!==void 0||e.prefix!==void 0)&&(r.logger=r.logger.clone(e)),["store","services","language"].forEach(a=>{r[a]=this[a]}),r.services=_t({},this.services),r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},n&&(r.store=new AD(this.store.data,i),r.services.resourceStore=r.store),r.translator=new PD(r.services,i),r.translator.on("*",function(a){for(var s=arguments.length,l=new Array(s>1?s-1:0),d=1;d<s;d++)l[d-1]=arguments[d];r.emit(a,...l)}),r.init(i,o),r.translator.options=i,r.translator.backendConnector.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const J8=Tm.createInstance();J8.createInstance=Tm.createInstance;const tut={error:"Error"},eut={error:"Помилка"},ID="common",out={en:tut,uk:eut},ns=J8.createInstance({defaultNS:ID,resources:nut(out,ID),lng:"en",fallbackLng:"en"}),Q8={i18nextInstance:ns,initPromise:ns.init().then(()=>ns)},ay=new Map;ay.set("common",Q8);const t9=t=>{if(ay.has(t.namespace))return ay.get(t.namespace);if(t.plugins)for(const r of t.plugins)ns.use(r);Object.keys(t.resource).forEach(r=>{ns.addResourceBundle(r,t.namespace,t.resource[r])});const e=ns.cloneInstance({defaultNS:t.namespace});let o=Q8.initPromise.then(()=>e);e.on("languageChanged",r=>{ns.language!==r&&ns.changeLanguage(r)}),ns.on("languageChanged",r=>{e.language!==r&&e.changeLanguage(r)});const n=t.language||"en";ns.language!==n&&(o=o.then(()=>e.changeLanguage(n)).then(()=>e));const i={initPromise:o,i18nextInstance:e};return ay.set(t.namespace,i),i};function nut(t,e){return Object.keys(t).reduce((o,n)=>(o[n]={[e]:t[n]},o),{})}function iut(t){return t&&t.replace(new RegExp("(?<!\\\\)'","g"),"\\'")}function rut(t){return t.endsWith("/")?t:`${t}/`}var e9=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Nu(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function aut(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var o=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};o.prototype=e.prototype}else o={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(o,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),o}var H0={exports:{}},jD;function sut(){if(jD)return H0.exports;jD=1;var t=typeof Reflect=="object"?Reflect:null,e=t&&typeof t.apply=="function"?t.apply:function(H,D,$){return Function.prototype.apply.call(H,D,$)},o;t&&typeof t.ownKeys=="function"?o=t.ownKeys:Object.getOwnPropertySymbols?o=function(H){return Object.getOwnPropertyNames(H).concat(Object.getOwnPropertySymbols(H))}:o=function(H){return Object.getOwnPropertyNames(H)};function n(H){console&&console.warn&&console.warn(H)}var i=Number.isNaN||function(H){return H!==H};function r(){r.init.call(this)}H0.exports=r,H0.exports.once=W,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._eventsCount=0,r.prototype._maxListeners=void 0;var a=10;function s(H){if(typeof H!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof H)}Object.defineProperty(r,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(H){if(typeof H!="number"||H<0||i(H))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+H+".");a=H}}),r.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},r.prototype.setMaxListeners=function(H){if(typeof H!="number"||H<0||i(H))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+H+".");return this._maxListeners=H,this};function l(H){return H._maxListeners===void 0?r.defaultMaxListeners:H._maxListeners}r.prototype.getMaxListeners=function(){return l(this)},r.prototype.emit=function(H){for(var D=[],$=1;$<arguments.length;$++)D.push(arguments[$]);var z=H==="error",N=this._events;if(N!==void 0)z=z&&N.error===void 0;else if(!z)return!1;if(z){var V;if(D.length>0&&(V=D[0]),V instanceof Error)throw V;var E=new Error("Unhandled error."+(V?" ("+V.message+")":""));throw E.context=V,E}var x=N[H];if(x===void 0)return!1;if(typeof x=="function")e(x,this,D);else for(var g=x.length,S=A(x,g),$=0;$<g;++$)e(S[$],this,D);return!0};function d(H,D,$,z){var N,V,E;if(s($),V=H._events,V===void 0?(V=H._events=Object.create(null),H._eventsCount=0):(V.newListener!==void 0&&(H.emit("newListener",D,$.listener?$.listener:$),V=H._events),E=V[D]),E===void 0)E=V[D]=$,++H._eventsCount;else if(typeof E=="function"?E=V[D]=z?[$,E]:[E,$]:z?E.unshift($):E.push($),N=l(H),N>0&&E.length>N&&!E.warned){E.warned=!0;var x=new Error("Possible EventEmitter memory leak detected. "+E.length+" "+String(D)+" listeners added. Use emitter.setMaxListeners() to increase limit");x.name="MaxListenersExceededWarning",x.emitter=H,x.type=D,x.count=E.length,n(x)}return H}r.prototype.addListener=function(H,D){return d(this,H,D,!1)},r.prototype.on=r.prototype.addListener,r.prototype.prependListener=function(H,D){return d(this,H,D,!0)};function b(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function C(H,D,$){var z={fired:!1,wrapFn:void 0,target:H,type:D,listener:$},N=b.bind(z);return N.listener=$,z.wrapFn=N,N}r.prototype.once=function(H,D){return s(D),this.on(H,C(this,H,D)),this},r.prototype.prependOnceListener=function(H,D){return s(D),this.prependListener(H,C(this,H,D)),this},r.prototype.removeListener=function(H,D){var $,z,N,V,E;if(s(D),z=this._events,z===void 0)return this;if($=z[H],$===void 0)return this;if($===D||$.listener===D)--this._eventsCount===0?this._events=Object.create(null):(delete z[H],z.removeListener&&this.emit("removeListener",H,$.listener||D));else if(typeof $!="function"){for(N=-1,V=$.length-1;V>=0;V--)if($[V]===D||$[V].listener===D){E=$[V].listener,N=V;break}if(N<0)return this;N===0?$.shift():p($,N),$.length===1&&(z[H]=$[0]),z.removeListener!==void 0&&this.emit("removeListener",H,E||D)}return this},r.prototype.off=r.prototype.removeListener,r.prototype.removeAllListeners=function(H){var D,$,z;if($=this._events,$===void 0)return this;if($.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):$[H]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete $[H]),this;if(arguments.length===0){var N=Object.keys($),V;for(z=0;z<N.length;++z)V=N[z],V!=="removeListener"&&this.removeAllListeners(V);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(D=$[H],typeof D=="function")this.removeListener(H,D);else if(D!==void 0)for(z=D.length-1;z>=0;z--)this.removeListener(H,D[z]);return this};function u(H,D,$){var z=H._events;if(z===void 0)return[];var N=z[D];return N===void 0?[]:typeof N=="function"?$?[N.listener||N]:[N]:$?I(N):A(N,N.length)}r.prototype.listeners=function(H){return u(this,H,!0)},r.prototype.rawListeners=function(H){return u(this,H,!1)},r.listenerCount=function(H,D){return typeof H.listenerCount=="function"?H.listenerCount(D):j.call(H,D)},r.prototype.listenerCount=j;function j(H){var D=this._events;if(D!==void 0){var $=D[H];if(typeof $=="function")return 1;if($!==void 0)return $.length}return 0}r.prototype.eventNames=function(){return this._eventsCount>0?o(this._events):[]};function A(H,D){for(var $=new Array(D),z=0;z<D;++z)$[z]=H[z];return $}function p(H,D){for(;D+1<H.length;D++)H[D]=H[D+1];H.pop()}function I(H){for(var D=new Array(H.length),$=0;$<D.length;++$)D[$]=H[$].listener||H[$];return D}function W(H,D){return new Promise(function($,z){function N(E){H.removeListener(D,V),z(E)}function V(){typeof H.removeListener=="function"&&H.removeListener("error",N),$([].slice.call(arguments))}X(H,D,V,{once:!0}),D!=="error"&&q(H,N,{once:!0})})}function q(H,D,$){typeof H.on=="function"&&X(H,"error",D,$)}function X(H,D,$,z){if(typeof H.on=="function")z.once?H.once(D,$):H.on(D,$);else if(typeof H.addEventListener=="function")H.addEventListener(D,function N(V){z.once&&H.removeEventListener(D,N),$(V)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof H)}return H0.exports}var lut=sut();const Ng=Nu(lut);function cut(){this.__data__=[],this.size=0}function o9(t,e){return t===e||t!==t&&e!==e}function $1(t,e){for(var o=t.length;o--;)if(o9(t[o][0],e))return o;return-1}var uut=Array.prototype,dut=uut.splice;function put(t){var e=this.__data__,o=$1(e,t);if(o<0)return!1;var n=e.length-1;return o==n?e.pop():dut.call(e,o,1),--this.size,!0}function hut(t){var e=this.__data__,o=$1(e,t);return o<0?void 0:e[o][1]}function fut(t){return $1(this.__data__,t)>-1}function mut(t,e){var o=this.__data__,n=$1(o,t);return n<0?(++this.size,o.push([t,e])):o[n][1]=e,this}function _l(t){var e=-1,o=t==null?0:t.length;for(this.clear();++e<o;){var n=t[e];this.set(n[0],n[1])}}_l.prototype.clear=cut;_l.prototype.delete=put;_l.prototype.get=hut;_l.prototype.has=fut;_l.prototype.set=mut;function gut(){this.__data__=new _l,this.size=0}function vut(t){var e=this.__data__,o=e.delete(t);return this.size=e.size,o}function yut(t){return this.__data__.get(t)}function but(t){return this.__data__.has(t)}var xut=typeof global=="object"&&global&&global.Object===Object&&global;const n9=xut;var wut=typeof self=="object"&&self&&self.Object===Object&&self,_ut=n9||wut||Function("return this")();const Ds=_ut;var Sut=Ds.Symbol;const fp=Sut;var i9=Object.prototype,Cut=i9.hasOwnProperty,Tut=i9.toString,jh=fp?fp.toStringTag:void 0;function Mut(t){var e=Cut.call(t,jh),o=t[jh];try{t[jh]=void 0;var n=!0}catch{}var i=Tut.call(t);return n&&(e?t[jh]=o:delete t[jh]),i}var kut=Object.prototype,Aut=kut.toString;function Eut(t){return Aut.call(t)}var Put="[object Null]",Out="[object Undefined]",$D=fp?fp.toStringTag:void 0;function Jp(t){return t==null?t===void 0?Out:Put:$D&&$D in Object(t)?Mut(t):Eut(t)}function Mm(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Lut="[object AsyncFunction]",Nut="[object Function]",Dut="[object GeneratorFunction]",Rut="[object Proxy]";function r9(t){if(!Mm(t))return!1;var e=Jp(t);return e==Nut||e==Dut||e==Lut||e==Rut}var Iut=Ds["__core-js_shared__"];const N_=Iut;var zD=function(){var t=/[^.]+$/.exec(N_&&N_.keys&&N_.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function jut(t){return!!zD&&zD in t}var $ut=Function.prototype,zut=$ut.toString;function Du(t){if(t!=null){try{return zut.call(t)}catch{}try{return t+""}catch{}}return""}var But=/[\\^$.*+?()[\]{}|]/g,Fut=/^\[object .+?Constructor\]$/,Hut=Function.prototype,Wut=Object.prototype,Vut=Hut.toString,Uut=Wut.hasOwnProperty,Gut=RegExp("^"+Vut.call(Uut).replace(But,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Yut(t){if(!Mm(t)||jut(t))return!1;var e=r9(t)?Gut:Fut;return e.test(Du(t))}function Xut(t,e){return t==null?void 0:t[e]}function Qp(t,e){var o=Xut(t,e);return Yut(o)?o:void 0}var qut=Qp(Ds,"Map");const km=qut;var Zut=Qp(Object,"create");const Am=Zut;function Kut(){this.__data__=Am?Am(null):{},this.size=0}function Jut(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Qut="__lodash_hash_undefined__",tdt=Object.prototype,edt=tdt.hasOwnProperty;function odt(t){var e=this.__data__;if(Am){var o=e[t];return o===Qut?void 0:o}return edt.call(e,t)?e[t]:void 0}var ndt=Object.prototype,idt=ndt.hasOwnProperty;function rdt(t){var e=this.__data__;return Am?e[t]!==void 0:idt.call(e,t)}var adt="__lodash_hash_undefined__";function sdt(t,e){var o=this.__data__;return this.size+=this.has(t)?0:1,o[t]=Am&&e===void 0?adt:e,this}function pu(t){var e=-1,o=t==null?0:t.length;for(this.clear();++e<o;){var n=t[e];this.set(n[0],n[1])}}pu.prototype.clear=Kut;pu.prototype.delete=Jut;pu.prototype.get=odt;pu.prototype.has=rdt;pu.prototype.set=sdt;function ldt(){this.size=0,this.__data__={hash:new pu,map:new(km||_l),string:new pu}}function cdt(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function z1(t,e){var o=t.__data__;return cdt(e)?o[typeof e=="string"?"string":"hash"]:o.map}function udt(t){var e=z1(this,t).delete(t);return this.size-=e?1:0,e}function ddt(t){return z1(this,t).get(t)}function pdt(t){return z1(this,t).has(t)}function hdt(t,e){var o=z1(this,t),n=o.size;return o.set(t,e),this.size+=o.size==n?0:1,this}function Ru(t){var e=-1,o=t==null?0:t.length;for(this.clear();++e<o;){var n=t[e];this.set(n[0],n[1])}}Ru.prototype.clear=ldt;Ru.prototype.delete=udt;Ru.prototype.get=ddt;Ru.prototype.has=pdt;Ru.prototype.set=hdt;var fdt=200;function mdt(t,e){var o=this.__data__;if(o instanceof _l){var n=o.__data__;if(!km||n.length<fdt-1)return n.push([t,e]),this.size=++o.size,this;o=this.__data__=new Ru(n)}return o.set(t,e),this.size=o.size,this}function Yl(t){var e=this.__data__=new _l(t);this.size=e.size}Yl.prototype.clear=gut;Yl.prototype.delete=vut;Yl.prototype.get=yut;Yl.prototype.has=but;Yl.prototype.set=mdt;var gdt="__lodash_hash_undefined__";function vdt(t){return this.__data__.set(t,gdt),this}function ydt(t){return this.__data__.has(t)}function Xy(t){var e=-1,o=t==null?0:t.length;for(this.__data__=new Ru;++e<o;)this.add(t[e])}Xy.prototype.add=Xy.prototype.push=vdt;Xy.prototype.has=ydt;function bdt(t,e){for(var o=-1,n=t==null?0:t.length;++o<n;)if(e(t[o],o,t))return!0;return!1}function xdt(t,e){return t.has(e)}var wdt=1,_dt=2;function a9(t,e,o,n,i,r){var a=o&wdt,s=t.length,l=e.length;if(s!=l&&!(a&&l>s))return!1;var d=r.get(t),b=r.get(e);if(d&&b)return d==e&&b==t;var C=-1,u=!0,j=o&_dt?new Xy:void 0;for(r.set(t,e),r.set(e,t);++C<s;){var A=t[C],p=e[C];if(n)var I=a?n(p,A,C,e,t,r):n(A,p,C,t,e,r);if(I!==void 0){if(I)continue;u=!1;break}if(j){if(!bdt(e,function(W,q){if(!xdt(j,q)&&(A===W||i(A,W,o,n,r)))return j.push(q)})){u=!1;break}}else if(!(A===p||i(A,p,o,n,r))){u=!1;break}}return r.delete(t),r.delete(e),u}var Sdt=Ds.Uint8Array;const BD=Sdt;function Cdt(t){var e=-1,o=Array(t.size);return t.forEach(function(n,i){o[++e]=[i,n]}),o}function Tdt(t){var e=-1,o=Array(t.size);return t.forEach(function(n){o[++e]=n}),o}var Mdt=1,kdt=2,Adt="[object Boolean]",Edt="[object Date]",Pdt="[object Error]",Odt="[object Map]",Ldt="[object Number]",Ndt="[object RegExp]",Ddt="[object Set]",Rdt="[object String]",Idt="[object Symbol]",jdt="[object ArrayBuffer]",$dt="[object DataView]",FD=fp?fp.prototype:void 0,D_=FD?FD.valueOf:void 0;function zdt(t,e,o,n,i,r,a){switch(o){case $dt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case jdt:return!(t.byteLength!=e.byteLength||!r(new BD(t),new BD(e)));case Adt:case Edt:case Ldt:return o9(+t,+e);case Pdt:return t.name==e.name&&t.message==e.message;case Ndt:case Rdt:return t==e+"";case Odt:var s=Cdt;case Ddt:var l=n&Mdt;if(s||(s=Tdt),t.size!=e.size&&!l)return!1;var d=a.get(t);if(d)return d==e;n|=kdt,a.set(t,e);var b=a9(s(t),s(e),n,i,r,a);return a.delete(t),b;case Idt:if(D_)return D_.call(t)==D_.call(e)}return!1}function Bdt(t,e){for(var o=-1,n=e.length,i=t.length;++o<n;)t[i+o]=e[o];return t}var Fdt=Array.isArray;const qy=Fdt;function Hdt(t,e,o){var n=e(t);return qy(t)?n:Bdt(n,o(t))}function Wdt(t,e){for(var o=-1,n=t==null?0:t.length,i=0,r=[];++o<n;){var a=t[o];e(a,o,t)&&(r[i++]=a)}return r}function Vdt(){return[]}var Udt=Object.prototype,Gdt=Udt.propertyIsEnumerable,HD=Object.getOwnPropertySymbols,Ydt=HD?function(t){return t==null?[]:(t=Object(t),Wdt(HD(t),function(e){return Gdt.call(t,e)}))}:Vdt;const Xdt=Ydt;function qdt(t,e){for(var o=-1,n=Array(t);++o<t;)n[o]=e(o);return n}function mp(t){return t!=null&&typeof t=="object"}var Zdt="[object Arguments]";function WD(t){return mp(t)&&Jp(t)==Zdt}var s9=Object.prototype,Kdt=s9.hasOwnProperty,Jdt=s9.propertyIsEnumerable,Qdt=WD(function(){return arguments}())?WD:function(t){return mp(t)&&Kdt.call(t,"callee")&&!Jdt.call(t,"callee")};const tpt=Qdt;function ept(){return!1}var l9=typeof exports=="object"&&exports&&!exports.nodeType&&exports,VD=l9&&typeof module=="object"&&module&&!module.nodeType&&module,opt=VD&&VD.exports===l9,UD=opt?Ds.Buffer:void 0,npt=UD?UD.isBuffer:void 0,ipt=npt||ept;const Q2=ipt;var rpt=9007199254740991,apt=/^(?:0|[1-9]\d*)$/;function spt(t,e){var o=typeof t;return e=e??rpt,!!e&&(o=="number"||o!="symbol"&&apt.test(t))&&t>-1&&t%1==0&&t<e}var lpt=9007199254740991;function c9(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=lpt}var cpt="[object Arguments]",upt="[object Array]",dpt="[object Boolean]",ppt="[object Date]",hpt="[object Error]",fpt="[object Function]",mpt="[object Map]",gpt="[object Number]",vpt="[object Object]",ypt="[object RegExp]",bpt="[object Set]",xpt="[object String]",wpt="[object WeakMap]",_pt="[object ArrayBuffer]",Spt="[object DataView]",Cpt="[object Float32Array]",Tpt="[object Float64Array]",Mpt="[object Int8Array]",kpt="[object Int16Array]",Apt="[object Int32Array]",Ept="[object Uint8Array]",Ppt="[object Uint8ClampedArray]",Opt="[object Uint16Array]",Lpt="[object Uint32Array]",hn={};hn[Cpt]=hn[Tpt]=hn[Mpt]=hn[kpt]=hn[Apt]=hn[Ept]=hn[Ppt]=hn[Opt]=hn[Lpt]=!0;hn[cpt]=hn[upt]=hn[_pt]=hn[dpt]=hn[Spt]=hn[ppt]=hn[hpt]=hn[fpt]=hn[mpt]=hn[gpt]=hn[vpt]=hn[ypt]=hn[bpt]=hn[xpt]=hn[wpt]=!1;function Npt(t){return mp(t)&&c9(t.length)&&!!hn[Jp(t)]}function Dpt(t){return function(e){return t(e)}}var u9=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Yf=u9&&typeof module=="object"&&module&&!module.nodeType&&module,Rpt=Yf&&Yf.exports===u9,R_=Rpt&&n9.process,Ipt=function(){try{var t=Yf&&Yf.require&&Yf.require("util").types;return t||R_&&R_.binding&&R_.binding("util")}catch{}}();const GD=Ipt;var YD=GD&&GD.isTypedArray,jpt=YD?Dpt(YD):Npt;const d9=jpt;var $pt=Object.prototype,zpt=$pt.hasOwnProperty;function Bpt(t,e){var o=qy(t),n=!o&&tpt(t),i=!o&&!n&&Q2(t),r=!o&&!n&&!i&&d9(t),a=o||n||i||r,s=a?qdt(t.length,String):[],l=s.length;for(var d in t)zpt.call(t,d)&&!(a&&(d=="length"||i&&(d=="offset"||d=="parent")||r&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||spt(d,l)))&&s.push(d);return s}var Fpt=Object.prototype;function Hpt(t){var e=t&&t.constructor,o=typeof e=="function"&&e.prototype||Fpt;return t===o}function Wpt(t,e){return function(o){return t(e(o))}}var Vpt=Wpt(Object.keys,Object);const Upt=Vpt;var Gpt=Object.prototype,Ypt=Gpt.hasOwnProperty;function Xpt(t){if(!Hpt(t))return Upt(t);var e=[];for(var o in Object(t))Ypt.call(t,o)&&o!="constructor"&&e.push(o);return e}function qpt(t){return t!=null&&c9(t.length)&&!r9(t)}function Zpt(t){return qpt(t)?Bpt(t):Xpt(t)}function XD(t){return Hdt(t,Zpt,Xdt)}var Kpt=1,Jpt=Object.prototype,Qpt=Jpt.hasOwnProperty;function tht(t,e,o,n,i,r){var a=o&Kpt,s=XD(t),l=s.length,d=XD(e),b=d.length;if(l!=b&&!a)return!1;for(var C=l;C--;){var u=s[C];if(!(a?u in e:Qpt.call(e,u)))return!1}var j=r.get(t),A=r.get(e);if(j&&A)return j==e&&A==t;var p=!0;r.set(t,e),r.set(e,t);for(var I=a;++C<l;){u=s[C];var W=t[u],q=e[u];if(n)var X=a?n(q,W,u,e,t,r):n(W,q,u,t,e,r);if(!(X===void 0?W===q||i(W,q,o,n,r):X)){p=!1;break}I||(I=u=="constructor")}if(p&&!I){var H=t.constructor,D=e.constructor;H!=D&&"constructor"in t&&"constructor"in e&&!(typeof H=="function"&&H instanceof H&&typeof D=="function"&&D instanceof D)&&(p=!1)}return r.delete(t),r.delete(e),p}var eht=Qp(Ds,"DataView");const tT=eht;var oht=Qp(Ds,"Promise");const eT=oht;var nht=Qp(Ds,"Set");const oT=nht;var iht=Qp(Ds,"WeakMap");const nT=iht;var qD="[object Map]",rht="[object Object]",ZD="[object Promise]",KD="[object Set]",JD="[object WeakMap]",QD="[object DataView]",aht=Du(tT),sht=Du(km),lht=Du(eT),cht=Du(oT),uht=Du(nT),Fc=Jp;(tT&&Fc(new tT(new ArrayBuffer(1)))!=QD||km&&Fc(new km)!=qD||eT&&Fc(eT.resolve())!=ZD||oT&&Fc(new oT)!=KD||nT&&Fc(new nT)!=JD)&&(Fc=function(t){var e=Jp(t),o=e==rht?t.constructor:void 0,n=o?Du(o):"";if(n)switch(n){case aht:return QD;case sht:return qD;case lht:return ZD;case cht:return KD;case uht:return JD}return e});const t5=Fc;var dht=1,e5="[object Arguments]",o5="[object Array]",W0="[object Object]",pht=Object.prototype,n5=pht.hasOwnProperty;function hht(t,e,o,n,i,r){var a=qy(t),s=qy(e),l=a?o5:t5(t),d=s?o5:t5(e);l=l==e5?W0:l,d=d==e5?W0:d;var b=l==W0,C=d==W0,u=l==d;if(u&&Q2(t)){if(!Q2(e))return!1;a=!0,b=!1}if(u&&!b)return r||(r=new Yl),a||d9(t)?a9(t,e,o,n,i,r):zdt(t,e,l,o,n,i,r);if(!(o&dht)){var j=b&&n5.call(t,"__wrapped__"),A=C&&n5.call(e,"__wrapped__");if(j||A){var p=j?t.value():t,I=A?e.value():e;return r||(r=new Yl),i(p,I,o,n,r)}}return u?(r||(r=new Yl),tht(t,e,o,n,i,r)):!1}function p9(t,e,o,n,i){return t===e?!0:t==null||e==null||!mp(t)&&!mp(e)?t!==t&&e!==e:hht(t,e,o,n,p9,i)}function iT(t,e){return p9(t,e)}const Ye={HEADERS:"headers",METADATA:"metadata",DATA:"data",GRAND:"grand",FINISH:"finish",ERROR:"error",TOTAL_ROWS:"totalRows",DATA_FINISH:"dataFinish",DATABARS:"dataBars",RANGE_MIN_MAX:"rangeMinMax"},fht=[Ye.ERROR,Ye.HEADERS,Ye.GRAND,Ye.METADATA,Ye.DATA,Ye.DATA_FINISH,Ye.TOTAL_ROWS,Ye.DATABARS,Ye.RANGE_MIN_MAX,Ye.FINISH],He={ROWS:"rows",COLUMNS:"columns",MEASURES:"measures",SCOPE:"scope"},Bn={ASC:"asc",DESC:"desc"},Fo={SUB_TOTAL:"subTotal",GRAND_TOTAL:"grandTotal",MEASURE_TOP:"measureTop",MEASURE_BOTTOM:"measureBottom",CORNER:"corner"},i5={COLOR:"color",CONDITION:"condition"},Zs={DATETIME:"datetime",TEXT:"text",NUMERIC:"numeric"},ad={MEMBER:"member",VALUE:"value",SUB_TOTAL:"subtotal",GRAND_TOTAL:"grandtotal"},Hl={MEMBER:"member",INDEX:"index",TITLE:"title",NAME:"name",AGG:"agg",DIM:"dim"};let mht=class{constructor(e,o,n,i){Dt(this,"rowIndex"),Dt(this,"colIndex"),Dt(this,"node"),Dt(this,"parent"),Dt(this,"childColCells",[]),Dt(this,"childRowCells",[]),Dt(this,"indexInParent",-1),Dt(this,"siblingCount",0),this.rowIndex=e,this.colIndex=o,this.node=n,this.parent=i}isChild(){return!this.node}hasChildren(){return!!(this.childColCells.length||this.childRowCells.length)}hasColCell(){return this.childColCells.length>0}addColCell(e){this.childColCells.push(e)}getColCell(){return this.childColCells||[]}hasRowCell(){return this.childRowCells.length>0}addRowCell(e){this.childRowCells.push(e)}getRowCell(){return this.childRowCells||[]}getStopRowIndex(){return this.hasRowCell()?this.rowIndex+this.getRowCell().length:this.rowIndex}getStopColIndex(){return this.hasColCell()?this.colIndex+this.getColCell().length:this.colIndex}setIndexInParent(e,o){this.indexInParent=e,this.siblingCount=o}getIndexInParent(){return{indexInParent:this.indexInParent,siblingCount:this.siblingCount}}getParenPosition(){if(!this.parent)return;const e=(this.parent||"").match(/\d+/g)||[];return[Number(e[0]),Number(e[1])]}};const Zy=["S&PManager","Cache"],Ky=["null"];class Em{constructor(e=""){Dt(this,"name"),Dt(this,"log"),Dt(this,"warn"),Dt(this,"error"),Dt(this,"console"),this.name=e,this.log=()=>{},this.warn=()=>{},this.error=()=>{},this.console=Em.createMockConsole(),this.createLogFn()}setName(e){this.name=e,this.createLogFn()}getName(){return this.name}createLogFn(){this.log=()=>{},this.warn=()=>{},this.error=()=>{}}isExcludedName(){return Ky.length&&!this.hasNamePartsInList(Ky)?!0:Zy.length?this.hasNamePartsInList(Zy):!1}hasNamePartsInList(e){const o=this.name.toLowerCase();return e.some(n=>o.includes(n.toLowerCase()))}static createMockConsole(){return{log:()=>{},warn:()=>{},error:()=>{}}}static createMock(){const e=Em.createMockConsole();return Ht(_t({setName:()=>{},getName:()=>""},e),{console:e})}}const ght=t=>new Em(t),vht=(t="")=>{Zy.push(t.toLowerCase())},yht=(t="")=>{Ky.push(t.toLowerCase())},bht=()=>{Zy.length=0,Ky.length=0},bc={Logger:Em,create:ght,excludeLogs:vht,includeLogs:yht,clearIncludeExclude:bht},h9=[Date,Error,RegExp,Promise];function f9(t,e=h9){return e.some(o=>t instanceof o)}function r5(t,e=[]){let o=!1;return e.forEach(n=>{t.includes(n)&&(o=!0)}),o}function m9(t=[],e,o){const n=[];return o&&t.forEach(i=>{n.push(`${i}.$`)}),t.length?t.forEach(i=>{n.push(`${i}.${e}`)}):n.push(e),n}function Xf(t){return!(t===null||typeof t>"u"||typeof t!="object")}function xht(t,e){return Xf(t)&&t?Array.isArray(t)?!t.length:f9(t,e)?!1:!Object.keys(t).length:t==null}function wht(t=""){const e=t.split(".");return e.length>1?(e.pop(),e.join(".")):e[0]}function a5(t,e,o){return t.length?r5(t,o):e.length?!r5(e,o):!0}function g9(t,e=[],o=[],n=[],i={},r={},a=[],s=[]){if(!Xf(t))return{commonIncludeKeys:[],commonExcludeKeys:[]};const l=a.indexOf(t);if(l!==-1)return s[l];a.push(t);const d=Object.keys(t),b=Array.isArray(t);let C=[],u=[];const j=[],A=[];if(d.forEach(p=>{const I=t[p],W=m9(n,p,b),q=n[0]||"&";i[q]=i[q]||[],r[q]=r[q]||[],W.forEach(X=>{(e||[]).includes(X)&&(i[q].push(X),C.push(X)),(e||[]).forEach(H=>{const D=wht(H);(`${D}.$`===q||D===q)&&(i[q].includes(H)||i[q].push(H),C.includes(H)||C.push(H))}),(o||[]).includes(X)&&(r[q].push(X),u.push(X))}),Xf(I)&&g9(I,e,o,W,i,r,a,s)}),Xf(t)){let p=n[0]||"&";Array.isArray(t)&&(p=`${p}.$`),i[p]=(i[p]||[]).concat(j),C=C.concat(j),r[p]=(r[p]||[]).concat(A),u=C.concat(A)}return s.push({commonIncludeKeys:C,commonExcludeKeys:u}),{commonIncludeKeys:C,commonExcludeKeys:u}}function v9(t,e,o=new WeakMap){const{includeKeys:n,includeKeysObj:i,excludeKeys:r,excludeKeysObj:a,parentKeys:s=[],excludeEmpty:l,referenceClone:d}=e||{};if(!Xf(t)||f9(t,d))return t;if(o.has(t))return o.get(t);const b=Object.keys(t),C=Array.isArray(t),u=C?[]:{};o.set(t,u);const j=s[0]||"&",A=(i||{})[j]||[],p=(a||{})[j]||[];return b.forEach(I=>{const W=t[I];let q=[],X=!0;if(n||r?X=a5(n||[],r||[],[I]):(i||a)&&(q=m9(s,I,C),X=a5(A,p,q)),X){const H=v9(W,Ht(_t({},e),{parentKeys:q}),o);(!l||!xht(H,d))&&(C?u.push(H):u[I]=H)}}),u}function dr(t,e){const o=e||{},{include:n,exclude:i}=o,r=ge(o,["include","exclude"]);let a,s;(n||i)&&(a={},s={},g9(t,n,i,[],a,s));const l=Ht(_t({},r),{includeKeysObj:a,excludeKeysObj:s});return v9(t,l)}dr.REFERENCE_CLONE_TYPES=h9;const I_=t=>e=>t.replace(/{{(\w+)}}/g,(o,n)=>typeof e[n]<"u"?e[n]:n),y9=(t,e)=>{let o,n,i=null;const r=(...a)=>{o?i=a:(t(...a),o=!0,i=null,n=setTimeout(()=>{o=!1,i&&(t(...i),i=null)},e))};return r.cancel=()=>{clearTimeout(n),o=!1},r},b9=(t,e)=>{const o={};return Object.keys(t).forEach(n=>{t[n]!==e[n]&&(o[n]=e[n])}),Object.keys(e).forEach(n=>{typeof o[n]>"u"&&t[n]!==e[n]&&(o[n]=e[n])}),o};function rT(t=!0){let e={},o=null;return({callback:n,indices:i})=>{const r=Object.keys(i),a=!t||r.every(l=>{const d=i[l];return Array.isArray(d)?d.length>0:d>=0}),s=r.length!==Object.keys(e).length||r.some(l=>{const d=e[l],b=i[l];return Array.isArray(b)?d.join(",")!==b.join(","):d!==b});return e=i,a&&s&&(o=n(i)),o}}function s5(t,e,o=0){for(let n=o;n<t.length;n+=1){const i=t[n];if(e(i,n,t))return n}return-1}const Pm="$*$root$*$";function _ht(t,e,o,n){const i={value:t};return e&&(i.children=e),o&&(i.data=o),typeof n<"u"&&(i.index=n),i}function B1(t){return!!(t&&t.children&&t.children.length)}function Oa(t){return t&&t.children||[]}function aT(t,e){t&&e&&Array.isArray(e)&&(t.children=e)}function Sht(t,e){t&&(t.level=e)}function Cht(t){return t&&typeof t.level<"u"?t.level||0:-1}function Ed(t){if(!t)return;if(t&&!Array.isArray(t)&&t.value===Pm)return t;const e={value:Pm,children:[]};return Array.isArray(t)?e.children=t:(e.children||[])[0]=t,e}function x9(t,e,o=0){let n;if(!t||!e)return n;if(e(t,o)&&(n=t),B1(t)){const i=Oa(t),r=i.length;for(let a=0;a<r;a+=1){const s=x9(i[a],e,o+1);if(s){n=s;break}}}return n}function Tht(t,e){if(!t&&!e)return;if(!t&&e)return Ed(e);if(t&&!e)return Ed(t);const o=Ed(t),n=Ed(e),i=o&&o.children||[],r=n&&n.children||[],a=i.concat(r);return Ed(a)}const w9=(t,e=0)=>{if(!t||!t.isPart)return;t.level=e;const o=Oa(t),n=o[o.length-1];return n&&w9(n,e+1)||t},_9=(t,e,o=0)=>{if(!t||!t.isPart)return;if(t.level=o,t&&e&&t.value===e.value&&t.level===e.level)return t;const n=Oa(t)[0];return n&&_9(n,e,o+1)||t};function Mht(t,e){let o=w9(t),n=_9(e,o);o&&o.children&&Array.isArray(o.children)&&n&&n.children&&Array.isArray(n.children)&&n.children.length>0&&(o.children=o.children.concat(n.children),n.isHandled=!0);let i=!1;for(o=t,n=e;o&&o.children&&Array.isArray(o.children)&&n&&n.children&&Array.isArray(n.children)&&!n.isHandled;){const r=o.children;o=o.children[o.children.length-1];let a=0;for(n.children[0]&&!i&&(i=!Oa(n.children[0]).some(s=>s.isPart),a=1);a<n.children.length;)r.push(n.children[a]),a+=1;n=n.children[0]}return t}function S9(t,e,o){!t||!e||t.forEach(n=>{e(n,o),B1(n)&&S9(Oa(n),e,n)})}function C9(t,e=[],o=0,n={maxLevel:0}){return t.forEach(i=>{n.maxLevel<o&&(n.maxLevel=o),B1(i)?C9(Oa(i),e,o+1,n):e.push(i)}),e}function F1(t,e={}){if(e||(e={}),typeof e.callCount!="number"?e.callCount=1:e.callCount+=1,!t)return 0;let o=e.clearCache||!1;!Array.isArray(t)&&t.value===Pm&&(o=!0);let n=1,i=[];return Array.isArray(t)?(n=0,i=t):t.children&&(i=Oa(t)),i&&i.length&&(!o&&!Array.isArray(t)&&typeof t.childCount=="number"?n=t.childCount:(n=0,i.forEach(r=>{n+=F1(r,e)}),Array.isArray(t)||(t.childCount=n))),n}function T9(t,e={}){if(e||(e={}),typeof e.callCount!="number"?e.callCount=1:e.callCount+=1,!t)return 0;let o=e.clearCache||!1;!Array.isArray(t)&&t.value===Pm&&(o=!0);let n=0,i=[];if(t&&!Array.isArray(t)&&typeof t.value<"u"&&(n=1),Array.isArray(t)?(n=0,i=t):t.children&&(i=Oa(t)),i&&i.length)if(!o&&!Array.isArray(t)&&typeof t.childDeep=="number")n+=t.childDeep;else{let r=0;i.forEach(a=>{const s=T9(a,e);s>r&&(r=s)}),n+=r,Array.isArray(t)||(t.childDeep=r)}return n}function M9(t=[],e=0,o){const n=[];let i=0,r=-1,a=-1;const s=t.length;if(typeof e=="number"&&typeof o=="number"&&e>o)throw new Error('Wrong "getNodesByChildCount" diapason');if(typeof e=="number"&&e<0)throw new Error('Wrong "from" index for "getNodesByChildCount"');for(let l=0;l<s;l+=1){const d=t[l],b=F1(d);if(i+b>e&&(r<0&&(r=i),n.push(d),typeof o=="number"&&i+b>=o)){a=i+b;break}a=i+b,i+=b}return{nodes:n,start:r,stop:a}}function kht(t){t.isMapped!==void 0&&(t.isMapped=void 0),t.minLevel!==void 0&&(t.minLevel=void 0),t.childCount!==void 0&&(t.childCount=void 0),t.childDeep!==void 0&&(t.childDeep=void 0)}function sT(t=[],e=0,o,n){const{cloneFn:i=dr}=n||{},r=[],{nodes:a,start:s,stop:l}=M9(t,e,o),d=a.length;let b,C,u=!0;if(s<e){const j=a[0]||{},A=e-s;let p;d===1&&typeof o=="number"&&(p=o-s,u=!1),b=i(j,!0);const I=sT(Oa(j),A,p,n);aT(b,I)}if(typeof o=="number"&&l>o&&u){const j=a[d-1]||{},A=0,p=F1(j)-(l-o);C=i(j,!0);const I=sT(Oa(j),A,p,n);aT(C,I)}return a.forEach((j,A)=>{if(b&&A===0)r.push(b);else if(C&&A===d-1)r.push(C);else{const p=i(j);r.push(p)}}),r}const _e={ROOT:Pm,create:_ht,hasChildren:B1,getChildren:Oa,setChildren:aT,setLevel:Sht,getLevel:Cht,getLastLevelNodes:C9,iterateThroughTree:S9,wrapInRootNode:Ed,findNode:x9,merge:Tht,deepMerge:Mht,getChildLength:F1,getDeepLength:T9,getNodesByChildCount:M9,getCutNodesByChildCount:sT,clearNodeCache:kht},wi={FIRST:"first",LAST:"last",EVEN:"even",ODD:"odd"},sd=(t,e)=>`${t}-${e}`;let Aht=class{constructor(e,o=!1,n){Dt(this,"tree"),Dt(this,"hasGrandTotals",!1),Dt(this,"isVertical",!1),Dt(this,"deep"),Dt(this,"columns",[]),Dt(this,"lastLevel",[]),Dt(this,"map",{}),Dt(this,"metadataCache",{}),Dt(this,"valueNode"),Dt(this,"grid"),this.isVertical=o,this.deep=n,e&&(this.tree=e,this.columns=this.cacheLevels(_e.getChildren(this.tree)))}destroy(){this.tree=void 0,this.columns=[],this.lastLevel=[],this.map={},this.metadataCache={},this.valueNode=void 0,this.grid=void 0}getMainCellWidth(e,o,n,i,r={offsetTop:-1,columnsOffset:0}){const{columnsOffset:a=0}=r,s=this.getItem(e,o),l=s&&s.hasChildren()&&s.hasColCell();let d=Number.NaN,b=!0;if(s&&l){const C=s.getColCell(),u=n({index:o+a});d=C.reduce((j,A)=>{const p=n({index:A.colIndex+a});return p||(b=!1),j+p},u),d-=i,d=Math.ceil(d)}return b?d:Number.NaN}extend(e){e&&(this.grid=void 0,this.tree=_e.merge(this.tree,e),this.columns=this.cacheLevels(_e.getChildren(e),this.columns))}getGrid(){if(this.grid)return this.grid;let e=this.getTreeDeepsLength(),o=this.getTreeChildLength();return this.isVertical?([e,o]=[o,e],this.map=this.fillMapVertical(_e.getChildren(this.tree),o,this.map)):this.map=this.fillMap(_e.getChildren(this.tree),e,this.map),this.grid=Array.from(Array(e)).map((n,i)=>Array.from(Array(o)).map((r,a)=>{const s=sd(i,a),l=this.map[s];if(!l)throw new Error(`Key "${s}" does not found in TreeService`);return l.node?l.node:l.parent})),this.grid}getPartialGrid(e,o){if(!this.isVertical)throw new Error('"getPartialGrid" can only be used for "vertical" tree');const n=this.getTreeDeepsLength(),i=_e.getChildren(this.tree),{nodes:r,start:a,stop:s}=_e.getNodesByChildCount(i,e,o);this.fillMapVertical(r,n,this.map,{parentRowIndex:a,parentColIndex:0,prevChildren:0,parentKey:""});const l=Math.max(a,e),d=Math.min(s,o),b=Math.max(0,d-e);return Array.from(Array(b)).map((C,u)=>Array.from(Array(n)).map((j,A)=>{const p=l+u,I=sd(p,A),W=this.map[I];if(!W)throw new Error(`Key "${I}" does not found in TreeService`);return W.node?W.node:W.parent||""}))}getPartialTree(e,o,n){const i=_e.getChildren(this.tree);return _e.getCutNodesByChildCount(i,e,o,n)}getTreeNode(e,o){const n=this.getItem(e,o);if(n&&n.node)return n.node}isChildren(e,o){const n=this.getItem(e,o);if(n)return n.isChild();if(typeof this.deep=="number"&&(this.isVertical?o:e)<this.deep)return!0;throw new Error(`Item "${e}-${o}" does not found in TreeService`)}hasChildren(e,o){const n=this.getItem(e,o);if(n)return n.hasChildren();throw new Error(`Item "${e}-${o}" does not found in TreeService`)}getMainCellSpans(e,o){const n={},i=this.getItem(e,o);return i&&i.hasColCell()&&(n.colSpan=i.getColCell().length+1),i&&i.hasRowCell()&&(n.rowSpan=i.getRowCell().length+1),n}alignStartIndex(e,o=!1){let n=0,i=e;if(o&&(n=e,i=0),this.isVertical===o){let r=this.getItem(n,i);if(r&&r.isChild()&&(r=this.getItemByKey(r.parent||"")),r)return o?r.rowIndex:r.colIndex}return e}alignStopIndex(e,o=!1){let n=0,i=e;if(o&&(n=e,i=0),this.isVertical===o){let r=this.getItem(n,i);if(r&&r.isChild()&&(r=this.getItemByKey(r.parent||"")),r)return o?r.getStopRowIndex():r.getStopColIndex()}return e}getTreeChildLength(e=_e.getChildren(this.tree),o){return _e.getChildLength(e,o)}getTreeDeepsLength(e=_e.getChildren(this.tree),o){return typeof this.deep<"u"&&this.deep!==void 0?this.deep:_e.getDeepLength(e,o)}getLastLevelNodes(){return this.lastLevel}extractData(e){if(!e)return[];const o=e.getLastLevelNodes().map(n=>n.index);return this.getLastLevelNodes().map(n=>typeof n.data>"u"?[n.data]:o?o.map(i=>{let r;return typeof i<"u"&&n.data&&(r=n.data[i]),r}):n.data)}getMetadata(e,o,n){const i=this.getTreeDeepsLength();e===1/0&&(e=i&&i-1),o===1/0&&(o=i&&i-1);const r=`${e}-${o}`;if(this.metadataCache[r])return this.metadataCache[r];let a=this.getItemByKey(r);if(!a)throw new Error(`Can not find metadata info for ${r} cell`);let s=a?a.node:void 0;if(s||(a=this.getItemByKey(a.parent||"")),!a)throw new Error(`Can not find metadata info for parent ${r} cell`);s=a?a.node:void 0;const l=this.getItemByKey(`${e+1}-${o}`),d=l?l.node:void 0,b=s&&s.level||0,C=this.isVertical?a.getStopColIndex():a.getStopRowIndex();let{indexInParent:u,siblingCount:j}=a.getIndexInParent(),A=u;if(b===0&&(j=this.getTreeChildLength(),u=this.isVertical?a.rowIndex:a.colIndex,A=u+(this.isVertical?a.getRowCell().length:a.getColCell().length)),n){const q=n.to-n.from;j<=q&&A>q-1&&(A=q-1)}const p={levels:[],siblings:[],root:void 0,parent:void 0,valueNode:this.valueNode,nextNode:d},{indexDivergence:I}=s||{};if(typeof I=="number"){const q=I===0?wi.EVEN:wi.ODD;p.siblings.push(q)}if(b===0&&p.levels.push(wi.FIRST),C===i-1&&p.levels.push(wi.LAST),u===0&&p.siblings.push(wi.FIRST),A===j-1&&p.siblings.push(wi.LAST),s&&b!==0){const q=this.isVertical?e:0,X=this.isVertical?0:o;p.root=this.getMetadata(q,X,n)}const W=this.getItemByKey(a.parent||"");if(W&&b!==0&&(p.parent=this.getMetadata(W.rowIndex,W.colIndex,n)),n){const q=this.isVertical?a.rowIndex:a.colIndex,X=this.isVertical?a.getStopRowIndex():a.getStopColIndex();let H;W&&(H=this.isVertical?W.getStopRowIndex():W.getStopColIndex()),H!==void 0&&H>=n.to-n.from&&X>=n.to-n.from-1&&!p.siblings.includes(wi.LAST)&&p.siblings.push(wi.LAST),q===0&&!p.siblings.includes(wi.FIRST)&&p.siblings.push(wi.FIRST)}return this.metadataCache[r]=p,p}setValueNode(e){typeof e=="object"&&(this.valueNode=e)}cacheLevels(e,o=[],n={level:0}){const{level:i}=n;return e.forEach(r=>{if(o[i]||(o[i]=[]),_e.setLevel(r,i),o[i].push(r),_e.hasChildren(r)){const a=i+1;this.cacheLevels(_e.getChildren(r),o,{level:a})}else this.lastLevel.push(r)}),o}fillMap(e,o,n={},i){const r=i||{parentRowIndex:0,parentColIndex:0,prevChildren:0,parentKey:""},a=e.length;return e.forEach((s,l)=>{const{parentRowIndex:d,parentColIndex:b,prevChildren:C,parentKey:u}=r,j=_e.getLevel(s)+d,A=l+b+C,p=sd(j,A),I=this.createTreeCellMap({rowIndex:j,colIndex:A,node:s,parent:u});I.setIndexInParent(l,a),n[p]=I;let W=0,q=0;if(_e.hasChildren(s)?(W=this.getTreeChildLength(s),typeof s.minLevel=="number"&&(q=s.minLevel+1-j||0)):q=(o||0)-(j||0),(W>1||q>1)&&this.fillChildMap(n,p,j,A,q,W),_e.hasChildren(s)){const X=Ht(_t({},r),{parentRowIndex:q>1?q-1:0,parentColIndex:l+b,parentKey:p});this.fillMap(_e.getChildren(s),o,n,X),W>1&&(r.prevChildren+=W-1)}}),n}fillMapVertical(e,o,n={},i){const r=i||{parentRowIndex:0,parentColIndex:0,prevChildren:0,parentKey:""},a=e.length;return e.forEach((s,l)=>{if(s.isMapped){r.parentRowIndex+=_e.getChildLength(s)-1;return}s.isMapped=!0;const{parentRowIndex:d,prevChildren:b,parentKey:C}=r,u=_e.getLevel(s),j=l+d+b,A=sd(j,u),p=this.createTreeCellMap({rowIndex:j,colIndex:u,node:s,parent:C});p.setIndexInParent(l,a),n[A]=p;let I=0,W=0;if(_e.hasChildren(s)?W=this.getTreeChildLength(s):I=(o||0)-(u||0),(I>1||W>1)&&this.fillChildMap(n,A,j,u,W,I),_e.hasChildren(s)){const q=Ht(_t({},r),{parentRowIndex:l+d,parentKey:A});this.fillMapVertical(_e.getChildren(s),o,n,q),W>1&&(r.prevChildren+=W-1)}}),n}fillChildMap(e,o,n,i,r,a){const s=e[o],l=Math.max(1,r),d=Math.max(1,a);Array.from(Array(l)).forEach((b,C)=>{Array.from(Array(d)).forEach((u,j)=>{if(C===0&&j===0)return;const A=n+C,p=i+j,I=sd(A,p),W=this.createTreeCellMap({rowIndex:A,colIndex:p,parent:o});e[I]=W,!(C!==0&&j!==0)&&(j===0&&s.addRowCell(W),C===0&&s.addColCell(W))})})}createTreeCellMap({rowIndex:e,colIndex:o,node:n,parent:i}){return new mht(e,o,n,i)}getItemByKey(e){return this.map[e]}getItem(e,o){const n=sd(e,o);return this.getItemByKey(n)}},Dc=class extends Aht{},zd=class extends Error{constructor(e="Loading canceled"){super(e),this.name="LoadingCanceledError";const o=new.target.prototype;Object.setPrototypeOf&&Object.setPrototypeOf(this,o)}},l5=class{constructor(e=[],o){Dt(this,"divergence",0);const n=o?o.getDivergence():0,i=_e.getLastLevelNodes(e);this.divergence=(n+i.length)%2;for(let r=0;r<i.length;r+=1)i[r].indexDivergence=(r+n)%2}getDivergence(){return this.divergence}};function H1(t=[]){const e={};return t.forEach(o=>{const{index:n=1/0}=o.field||{},i=`${n}`;e[i]=o.jaql.datatype||Zs.TEXT}),e}function lT(t,e){if(t&&e===Zs.DATETIME)try{return new Date(t).toISOString()}catch{return t}return t}function c5(t){if(t!==null&&!iT(t,{}))return t}function Jy(t,e,o={}){const n=c5(t),i=c5(e);let r=!1;if(typeof n=="object"&&n!==null&&typeof i=="object"&&i!==null){r=!0;const a=Object.keys(n),s=Object.keys(i);a.length!==s.length?r=!1:a.forEach(l=>{const d=o[l]||"";let b=(n||{})[l],C=(i||{})[l];if(typeof b>"u"||typeof C>"u"){r=!1;return}d===Zs.DATETIME&&(b=lT(b,d),C=lT(C,d)),b!==C&&(r=!1)})}else r=n===i;return r}function k9(t,e,o=lT){if(!t||typeof t!="object")return t;const n={};return Object.keys(t).forEach(i=>{const r=e[i],a=(t||{})[i],s=o(a,r);n[i]=s}),n}const ul=(t,e)=>{let o=t&&t.metadata||[];return e&&(o=o.filter(n=>n.panel===e)),o.sort((n,i)=>{const r={index:1/0},a=n.field||r,s=i.field||r;return a.index-s.index}),o},Dg=(t,e,o)=>typeof e>"u"?void 0:ul(t,o).filter(n=>(n.field||{index:1/0}).index===e)[0],Eht=(t,e)=>{const o=t.field||{index:1/0};if(t.panel===He.MEASURES)return!0;if(t.panel===He.ROWS){const n=ul(e,He.ROWS),i=(n[n.length-1]||{}).field||{index:1/0};if(n.length&&i.index===o.index)return!0;n.length||console.error("Missing rows panel in jaql!")}return!1};function Pht(t,e){return!t||typeof t.field!="number"?!1:t.field!==e}const Oht=(t,e=He.ROWS)=>{const o=ul(t,e).map((n,i)=>{const r=_e.create(n.jaql.title,void 0,void 0,i),a=Ti(r,e);switch(a.jaqlIndex=n.field?n.field.index:void 0,e){case He.ROWS:{a.measurePath=void 0;const s=Pht(n.jaql.sortDetails,a.jaqlIndex);n.jaql.sort&&!s?a.dir=n.jaql.sort:a.dir=null;break}case He.MEASURES:a.databars=n.format?n.format.databars:!1,a.measureJaqlIndex=a.jaqlIndex,ul(t,He.COLUMNS).length||(a.measurePath=void 0,n.jaql.sortDetails&&n.jaql.sortDetails.measurePath===null?a.dir=n.jaql.sortDetails.dir:a.dir=null);break}return a});return _e.wrapInRootNode(o)},A9=t=>{(t&&t.metadata?t.metadata:[]).forEach(e=>{e&&e.jaql&&e.jaql.sort&&e.jaql.sortDetails&&e.jaql.sortDetails.sortingLastDimension&&(e.jaql.sort=null,delete e.jaql.sortDetails)})},E9=t=>{t&&t.jaql&&(t.jaql.sort=null,delete t.jaql.sortDetails)},P9=t=>{(t&&t.metadata?t.metadata:[]).forEach(e=>E9(e))},Lht=t=>(t.metadata||[]).reverse().find(e=>!!e.jaql.sortDetails),Nht=t=>(t.metadata||[]).find(e=>!!(e.jaql.sortDetails&&e.jaql.sortDetails.isLastApplied)),Dht=t=>{const e=Nht(t)||Lht(t);if(!e)return;const o=e.field&&e.field.index;(t.metadata||[]).forEach(n=>{(n.field&&n.field.index)!==o&&E9(n)})},O9=(t,e)=>{t.metadata.forEach(o=>{const n=o.field&&o.field.index;if(e.field===n){o.jaql.sortDetails=o.jaql.sortDetails||e,o.jaql.sortDetails.isLastApplied=!0;return}o.jaql.sortDetails&&o.jaql.sortDetails&&delete o.jaql.sortDetails.isLastApplied})},Rht=(t,e,o)=>{const{isSingleRowTree:n=!1,formatter:i}=o||{};if(!e){console.warn("jaql is undefined or null!");return}const r=Dg(e,t.field);if(r&&r.panel===He.COLUMNS){console.warn('Should not be sorted by "COLUMN" type panels!');return}if(!r)return;const a=Eht(r,e);switch(n?P9(e):a&&A9(e),t.dir){case Bn.DESC:case null:r.jaql.sort=Bn.ASC;break;case Bn.ASC:r.jaql.sort=Bn.DESC;break;default:r.jaql.sort=void 0}const s=r.field||{index:1/0};if(r.jaql.sort){let{measurePath:l}=t;if(l){const d=ul(e),b=H1(d);l=k9(l,b,i)}r.jaql.sortDetails={field:s.index,dir:r.jaql.sort,sortingLastDimension:a,measurePath:l,initialized:!0}}else r.jaql.sortDetails=void 0;e&&e.metadata&&s.index!==void 0&&(e.metadata[s.index]=r),O9(e,t)},Iht=(t,e,o)=>{if(!t)return;const n=Dg(t,e);n&&(n.format=n.format||{},n.format.width=o)},jht=t=>{const e={};return t&&ul(t).forEach(o=>{const n=o.field||{index:1/0};o.format&&typeof o.format.width<"u"&&typeof n.index<"u"&&(e[n.index]=o.format.width)}),e},$ht=(t,e)=>{if(typeof e.measureJaqlIndex<"u"){const o=ul(t),n=H1(o),i=o.filter(a=>a.panel===He.ROWS).find(a=>{const s=a.jaql.sortDetails;return!s||s.field!==e.measureJaqlIndex?!1:!!Jy(e.measurePath,s.measurePath,n)});if(i){e.dir=i.jaql.sort?i.jaql.sort:null;return}const r=Dg(t,e.measureJaqlIndex);if(r&&r.jaql.sortDetails){const a=r.jaql.sortDetails.measurePath,s=e.measurePath;if(Jy(a,s,n)){e.dir=r.jaql.sort||null;return}}}e.dir=null};function zht(t,e,o,n){const{isSingleRowTree:i,formatter:r}=n;i&&P9(t),t.metadata.forEach(a=>{a.jaql.sortDetails&&delete a.jaql.sortDetails.isLastApplied}),e.forEach((a,s)=>{let l;s===e.length-1?(a.selected&&A9(t),l=o.field):l=a.indexInJaql;const d=Dg(t,l);if(!d){console.warn(new Error("Panel not found"));return}a.selected&&!a.direction&&console.warn(new Error("Direction should be defined and equal to 'asc' or 'desc'"));const b=ul(t),C=H1(b);if(!a.direction||!a.selected){const{sortDetails:u}=d.jaql;u&&o.field===u.field&&Jy(o.measurePath,u.measurePath,C)&&(delete d.jaql.sort,delete d.jaql.sortDetails)}if(a.selected&&a.direction){d.jaql.sort=a.direction;let{measurePath:u}=o;u&&(u=k9(u,C,r)),o.measurePath===void 0&&d.field&&d.panel==="rows"&&o.field!==d.field.index&&(u={}),d.jaql.sortDetails={field:o.field,dir:a.direction,sortingLastDimension:!1,measurePath:u,isLastApplied:!0,initialized:!0}}})}function Bht(t,e,o,n){return t.jaql.sortDetails?!1:o?Fn.isMeasurePathEqual(e.measurePath,o.measurePath,n):!1}function cT(t){const e=t&&t.dir;switch(e){case"asc":case"desc":return e;default:return null}}function Fht(t,e){var o,n;const i=t.metadata.filter(A=>A.panel==="rows"),r=Fn.getMetadataPanelByIndex(t,e.field),a=r.jaql.datatype,s=r.jaql.sortDetails,l=Fn.getDataTypes(Fn.getMetadataPanels(t)),d=[];for(let A=0;A<i.length-1;A+=1){const p=i[A],I=!!(p.jaql.sortDetails&&p.jaql.sortDetails.field===e.field&&Fn.isMeasurePathEqual(e.measurePath,p.jaql.sortDetails.measurePath,l)),W=cT(p.jaql.sortDetails);d.push({title:p.jaql.title,datatype:a,selected:I,direction:W,indexInJaql:(o=p.field)==null?void 0:o.index})}const b=i[i.length-1],C=Bht(b,e,s,l),u=cT(s),j={title:b.jaql.title,datatype:a,selected:C,direction:u,indexInJaql:(n=r.field)==null?void 0:n.index};return d.push(j),d}function Hht(t,e,o){return t.filter(n=>n.field&&e.field===n.field.index).map(n=>{const{sortDetails:i}=n.jaql,r=!!(i&&Fn.isMeasurePathEqual(e.measurePath,i.measurePath,o)),a=r?cT(i):null;return{title:n.jaql.title,datatype:n.jaql.datatype,selected:r,direction:a}})[0]}const Fn={isMeasurePathEqual:Jy,getDataTypes:H1,updatePanelsSortingMetadata:Rht,getMetadataTree:Oht,getMetadataPanels:ul,getMetadataPanelByIndex:Dg,setResizeWidthToJaql:Iht,getResizeWidthFromJaql:jht,markSortedNode:$ht,normalizeSingleBranchTreeSortDetails:Dht,updateLastAppliedSortingFlag:O9,handleComplexSortingSettingsUpdate:zht,mapWidgetJaqlToSimpleSortingSettings:Hht,mapWidgetJaqlToComplexSortingSettings:Fht};function L9(t,e){if(!_e.hasChildren(t))return!1;let o=!1;e===He.COLUMNS&&t&&t.isPart&&(o=!0);const n=_e.getChildren(t);if(n.length>1||o)return!0;const[i]=n;return L9(i)}function Wht(t){return t==null}const HE=(t,e,o,n,i)=>{const r=[];return t.forEach(a=>{if(r.push(a),_e.hasChildren(a)){const s=_e.getChildren(a),l=HE(s,e,o,n,i);_e.setChildren(a,l);let d=!1;if((i||L9(a,o))&&(o===He.COLUMNS?typeof a.index<"u"&&a.index>-1&&(d=!0):o===He.ROWS&&typeof a.data<"u"&&(d=!0)),d){const{value:b,index:C,data:u,jaqlIndex:j,measurePath:A}=a;let p;if(o===He.COLUMNS?p=_e.create(b,void 0,void 0,C):o===He.ROWS&&(p=_e.create(b,void 0,u)),p){const I=Ti(p,o);I.userType=Fo.SUB_TOTAL,I.jaqlIndex=j,I.measurePath=A,I.master=a,r.push(I)}}}}),r},N9=(t,e)=>{t.userType===Fo.SUB_TOTAL&&t.master&&(t.measurePath=t.master.measurePath)},D9=(t,e,o,n)=>{const i=t;if(o===He.COLUMNS&&e){const r=Ti(e);if(typeof r.index=="number"){const a=Fn.getMetadataTree(n,He.MEASURES);_e.getChildren(a).forEach((s,l)=>{const d=Ht(_t({},s),{index:(r.index||0)+l}),b=Ti(d,o);b.userType=Fo.GRAND_TOTAL,b.measureJaqlIndex=b.jaqlIndex,i.push(b)})}}return i},R9=(t,e)=>{t.userType===Fo.GRAND_TOTAL&&(t.measurePath=void 0,t.metadataType===He.ROWS&&(t.parent=void 0,t.jaqlIndex=0))},I9=(t,e,o,n)=>{let i=t;if(o===He.COLUMNS){const r=Fn.getMetadataTree(n,He.MEASURES),a=_e.getChildLength(r),s={maxLevel:0},l=_e.getLastLevelNodes(i,[],0,s);if(a>1)l.forEach(d=>{if(d.userType===Fo.GRAND_TOTAL)return;const b=_e.getChildren(r),C=[];for(let u=0;u<b.length;u+=1){if(typeof d.maxChilds=="number"&&u>=d.maxChilds)continue;const j=Ht(_t({},b[u]),{index:(d.index||0)+u,measurePath:d.measurePath}),A=Ti(j,He.MEASURES);A.userType=Fo.MEASURE_BOTTOM,A.measureJaqlIndex=A.jaqlIndex,C.push(A)}d.minLevel=s.maxLevel,_e.setChildren(d,C)});else if(a===1){const d=_e.getChildren(r)[0];if(d){const b=_t({},d),C=Ti(b,He.MEASURES);C.userType=Fo.MEASURE_TOP,_e.setChildren(C,i),i=[C],l.forEach(u=>{u.measureJaqlIndex=d.jaqlIndex})}}}return i},j9=(t,e)=>{!_e.hasChildren(t)&&typeof t.measureJaqlIndex<"u"&&Fn.markSortedNode(e,t)},Vht=(t,e,o,n)=>{let i={};if(e.userType===Fo.SUB_TOTAL||e.userType===Fo.GRAND_TOTAL||o.userType===Fo.SUB_TOTAL||o.userType===Fo.GRAND_TOTAL||o.parent&&o.parent.userType===Fo.SUB_TOTAL||o.parent&&o.parent.userType===Fo.GRAND_TOTAL)return;const r=n&&n.format&&n.format.color||null;if(!r)return;const{value:a,cf:s=-1}=t;if(r.type===i5.COLOR&&r.color&&r.color!=="transparent"&&(i.backgroundColor=r.color),r.type===i5.CONDITION&&r.conditions&&r.conditions.length)for(let l=0,d=r.conditions.length;l<d&&!Wht(a);l+=1){const b=r.conditions||[],{color:C}=b[l]||{};if(C&&s===l){i.backgroundColor=C;break}}Object.keys(i).length>0&&(t.style=t.style||{},Object.assign(t.style,i)),i=void 0},$9=(t,e,o,n)=>{const i=[],{level:r=0,measurePath:a={}}=n||{};let s;Array.isArray(t)?s=t:s=_e.getChildren(t);const l=Fn.getMetadataPanels(o,e)[r],d=l?(l.field||{index:1/0}).index:void 0;return s.forEach(b=>{const C=Ti(b,e);if(C.jaqlIndex=d,typeof d<"u"&&(C.measurePath=Ht(_t({},a),{[d]:C.value})),i.push(C),_e.hasChildren(C)){const u=_e.getChildren(C),j={level:r+1,measurePath:C.measurePath},A=$9(u,e,o,j);_e.setChildren(C,A)}}),i},z9=(t,e,o)=>{const{skipFormatEvent:n=!1,onlyFormatEvents:i=!1,iterateFn:r,emitFn:a}=o||{};t.forEach(s=>{if(r&&r(s),(n||!i)&&(N9(s),R9(s),j9(s,e)),a&&(i||!n)){const l=Fn.getMetadataPanelByIndex(e,s.jaqlIndex,s.metadataType||"");a(s,l,e)}if(_e.hasChildren(s)){const l=_e.getChildren(s);z9(l,e,o)}})},Uht=(t,e,o,n)=>{const{originalData:i,applyIndexDivergence:r,subtotalsForSingleRow:a}=n||{};r&&r(t);let s=HE(t,i,e,o,a);return s=D9(s,i,e,o),s=I9(s,i,e,o),_e.iterateThroughTree(s,(l,d)=>{l.parent=d}),s},$h={insertSubTotals:HE,postProcessSubTotal:N9,insertGrandTotals:D9,postProcessGrandTotal:R9,insertMeasureNodes:I9,postProcessMeasureNode:j9,applyColorFormatting:Vht,preProcessTree:$9,modifyTree:Uht,postProcessTree:z9},Ti=(t,e)=>{const o=t;return e&&(o.metadataType=e),o};function Kd(t,e,o){return!e||!e.length?!1:e.some(n=>{let i=!0;return o&&o.fields&&o.fields.length&&o.fields.forEach(r=>{t[r]!==void 0&&n[r]===void 0?i=!1:t[r]!==void 0&&n[r]!==void 0&&(Array.isArray(t[r])?i=i&&t[r].indexOf(n[r])!==-1:i=i&&t[r]===n[r])}),i})}const Ght=(t,e=[])=>{let o=!1;return!e||!e.length?!1:t.length===0?!0:(t.forEach(n=>{e.includes(n)&&(o=!0)}),o)},u5=(t,e)=>{let o=!0;return!e||!e.length?o=!1:t.forEach(n=>{if(n.index){const i=e[e.length-1];o=o&&Kd(n,[i],{fields:[Hl.INDEX]})}if(n.dim&&(n.name=n.dim,n.members&&(n.member=n.members),o=o&&Kd(n,e,{fields:[Hl.NAME,Hl.MEMBER]})),n.title){const i=e[e.length-1];o=o&&Kd(n,[i],{fields:[Hl.TITLE]})}}),o},Yht=(t,e)=>{let o=!0;return!e||!e.length?o=!1:t.forEach(n=>{n.index&&(o=o&&Kd(n,e,{fields:[Hl.INDEX]})),n.dim&&(n.name=n.dim,o=o&&Kd(n,e,{fields:[Hl.DIM,Hl.AGG]})),n.title&&(o=o&&Kd(n,e,{fields:[Hl.TITLE]}))}),o},Xht=(t,e)=>{let o=!0;if(t.type&&o&&(o=o&&Ght(t.type,e.type)),t.rows&&t.rows.length&&o){const n=e.rows?e.rows:[];o=o&&u5(t.rows,n)}if(t.columns&&o){const n=e.columns?e.columns:[];o=o&&u5(t.columns,n)}if(t.values&&o){const n=e.measure?[e.measure]:[];o=o&&Yht(t.values,n)}return o},qht=(t,e)=>t.metadata.find(o=>o.field&&o.field.index===e),sy=(t,e,o=[],n=[])=>{if(!e||!t||typeof t.jaqlIndex>"u")return{dimensionsMeta:o,type:n};const i=qht(e,t.jaqlIndex);if(i&&i.jaql&&t.metadataType!==He.MEASURES&&o.unshift({title:i.jaql.title,name:i.jaql.dim,member:t.value,index:t.jaqlIndex}),t&&t.userType&&(t.userType===Fo.SUB_TOTAL||t.userType===Fo.GRAND_TOTAL)){const r=t.userType.toLowerCase();n.push(r)}return t.parent&&t.parent.metadataType!==He.MEASURES?sy(t.parent,e,o,n):{dimensionsMeta:o,type:n}},d5=t=>{let e={};if(t){const o=t.jaql;e=ge(o,["type","datatype","table","column"]),t.field&&(e.index=t.field.index)}return e},Ci={CORNER:"corner",COLUMNS:"columns",ROWS:"rows",DATA:"data"};function j_(t,e="",o=""){let n="";return t&&(t.levels.length&&t.levels.forEach(i=>{n+=` ${e}--${o?`${o}-`:""}level-${i}`}),t.siblings.length&&t.siblings.forEach(i=>{n+=` ${e}--${o?`${o}-`:""}sibling-${i}`}),t.root&&t.root.siblings&&t.root.siblings.length&&t.root.siblings.forEach(i=>{n+=` ${e}--${o?`${o}-root-`:"root-"}sibling-${i}`}),t.parent&&t.parent.siblings&&t.parent.siblings.length&&t.parent.siblings.forEach(i=>{n+=` ${e}--${o?`${o}-parent-`:"parent-"}sibling-${i}`})),n}function Zht(t,e){const{metadata:o,rowMetadata:n,rowTreeNode:i,columnTreeNode:r,merge:a}=e||{},s={t:!0,r:!0,b:!0,l:!0};if(t===Ci.CORNER||t===Ci.COLUMNS)return s;if(t===Ci.ROWS){const l=a&&a.colSpan,d=o&&o.nextNode&&o.nextNode.userType===Fo.GRAND_TOTAL;o&&o.levels.includes(wi.LAST)&&!o.siblings.includes(wi.LAST)&&!l&&!d&&(s.b=!1),o&&o.levels.includes(wi.FIRST)&&o.levels.includes(wi.LAST)&&!o.siblings.includes(wi.LAST)&&!l&&!d&&(s.b=!1)}if(t===Ci.DATA){const l=i&&i.userType===Fo.SUB_TOTAL,d=r&&r.userType===Fo.SUB_TOTAL,b=r&&r.userType===Fo.GRAND_TOTAL,C=n&&n.nextNode&&n.nextNode.userType===Fo.GRAND_TOTAL;n&&n.levels.includes(wi.LAST)&&!n.siblings.includes(wi.LAST)&&!l&&!d&&!b&&!C&&(s.b=!1)}return s}function $_(t,e="",o=""){let n="";return t&&t.userType&&(n=`${e}--${o?`${o}-`:""}user-type-${t.userType}`),n}function z_(t,e="",o=""){let n="";return t&&t.colSpan&&(n=`${e}--${o?`${o}-`:""}merged-columns`),t&&t.rowSpan&&(n=` ${e}--${o?`${o}-`:""}merged-rows`),n}function B_(t){return t&&t.colSpan?t.colSpan-1:0}function p5(t,e){if(t===void 0)return t;let o=typeof t=="number"?t:parseInt(t,10);return o-=e||1,o}function zh(t){const{isDataCell:e,dataNode:o,treeNode:n}=t,i=e?o:n;return i&&i.style||{}}const Kht=t=>{const e={};return Object.keys(t).forEach(o=>{(!o.startsWith("border")||o==="borderColor")&&(e[o]=t[o])}),e},Jht=t=>{const e={};return Object.keys(t).forEach(o=>{(!o.startsWith("color")&&!o.startsWith("padding")&&!o.startsWith("border")&&!o.startsWith("font")&&!o.startsWith("lineHeight")&&!o.startsWith("databarColor")||o==="borderColor")&&(e[o]=t[o])}),e},Qht=t=>{const e={};return Object.keys(t).forEach(o=>{(o.startsWith("color")||o.startsWith("padding")||o.startsWith("font")||o.startsWith("lineHeight"))&&(e[o]=t[o])}),e},tft=t=>{const e={};return t.databarColor&&(e.backgroundColor=t.databarColor),e},eft=(t,e,o=0)=>e&&t&&e.offsetWidth+o>=t.offsetWidth&&e.textContent||"",oft=(t,e,o)=>{if(!t||!e||!o||o.measureJaqlIndex===void 0)return;const[n,i]=t[o.measureJaqlIndex]||[];if(n==null)return;const r=e&&e.store&&e.store.compileRange,a=e&&e.store&&e.store.compileRangeContext,s=e&&e.store&&e.store.compileRangeArgs;if(!r||!s||!a||!e||!e.value)return;const l=Ht(_t({},s),{minvalue:n,midvalue:n+(i-n)/2,maxvalue:i});let d,b;return l.min===void 0&&(l.maxvalue<=0&&(b=!0),l.min=l.minDef),l.max===void 0&&(l.minvalue>=0&&(d=!0),l.max=l.maxDef),b&&(l.max=l.maxGray),d&&(l.min=l.minGray),r.call(a,l)(e.value)},Bh="text";let nft=class B9{constructor(e,o,n){Dt(this,"plugins",[]),Dt(this,"globalStyles"),Dt(this,"jaql"),Dt(this,"indexHelper"),Dt(this,"columnsMetadata",[]),Dt(this,"metadataCache",new Map),this.plugins=e,this.jaql=o,this.globalStyles=n,this.indexHelper={measuresLevel:this.getMeasuresLevel(),columnStartFrom:0,rowStartFrom:0},this.globalStyles&&(this.globalStyles=Kht(this.globalStyles))}getJaqlPanels(e){if(!this.jaql)throw new Error("No Jaql in Plugin service!");return this.jaql.metadata.filter(o=>o.panel===e)}getMeasuresLevel(){const e=this.getJaqlPanels(He.COLUMNS);return this.getJaqlPanels(He.MEASURES).length>1?e.length:0}getRowsColumnLength(){return this.getJaqlPanels(He.ROWS).length}getTotalTypes(e){const o=e.filter(n=>n===ad.SUB_TOTAL||n===ad.GRAND_TOTAL);return o&&o.length?o.filter((n,i,r)=>r.indexOf(n)===i):[]}getMeasureMetaByIndex(e){const o=this.getJaqlPanels(He.MEASURES);if(o.length===1)return d5(o[0]);const n=e%o.length;return d5(o[n])}resetRowStartFrom(){this.indexHelper.rowStartFrom=1}applyToColumns(e){e.length!==0&&(this.indexHelper.columnStartFrom===0&&(this.indexHelper.columnStartFrom=this.getRowsColumnLength()),this._applyToColumns(e,{row:-1}))}_applyToColumns(e,o){e.forEach((n,i)=>{const{dimensionsMeta:r,type:a}=sy(n,this.jaql);a.push(ad.MEMBER);let s=o.row>=0?o.row+1:0;s>=this.indexHelper.rowStartFrom&&(this.indexHelper.rowStartFrom=s+1),n.metadataType===He.MEASURES&&(s=this.indexHelper.measuresLevel);let l=i===0?0:1;l+=this.indexHelper.columnStartFrom;const d={type:a,rowIndex:s,colIndex:l,index:n.jaqlIndex,columns:r};n.metadataType===He.MEASURES&&(d.measure=this.getMeasureMetaByIndex(n.index||0));const b={value:n.value||"",content:n.content||"",contentType:n.contentType||Bh,style:n.style||{},store:n.store||{},state:n.state};if(this.applyGlobal(b),this.apply(d,b),this.addToMetadata(d,b,d.rowIndex,d.colIndex),Object.assign(n,b),this.indexHelper.columnStartFrom=l,n.children){const C={row:s,column:l};this._applyToColumns(n.children,C)}else this.columnsMetadata.push({type:a,metadata:r});return!0})}applyToHeaders(e){!e||!e.children||e.children.length===0||e.children.forEach(o=>{const{dimensionsMeta:n}=sy(o,this.jaql),i={type:[ad.MEMBER],rowIndex:0,colIndex:o.index||0,index:o.jaqlIndex,rows:n},r={value:o.value,content:o.content||"",contentType:o.contentType||Bh,style:o.style?o.style:{},store:o.store||{},state:o.state};this.applyGlobal(r),this.apply(i,r),this.addToMetadata(i,r,i.rowIndex,i.colIndex),Object.assign(o,r)})}applyToRows(e){if(e.length===0)return;const o=this.getJaqlPanels(He.ROWS),n=this.getJaqlPanels(He.MEASURES),i=this.getJaqlPanels(He.COLUMNS);this.indexHelper.rowStartFrom=B9.getRowStartFromForPage(o.length,n.length,i.length),this._applyToRows(e)}static getRowStartFromForPage(e,o,n){if(e===0&&n===0)return 0;const i=n+(o===0?0:1);return i===0?1:i}_applyToRows(e){e.forEach((o,n)=>{const{dimensionsMeta:i,type:r}=sy(o,this.jaql);r.push(ad.MEMBER);const a=o.level?o.level:0,s=n===0?this.indexHelper.rowStartFrom:this.indexHelper.rowStartFrom+1,l={type:r,rowIndex:s,colIndex:a,index:o.jaqlIndex,rows:i},d={value:o.value,content:o.content||"",contentType:o.contentType||Bh,style:o.style||{},store:o.store||{},state:o.state};return this.applyGlobal(d),this.apply(l,d),this.addToMetadata(l,d,l.rowIndex,l.colIndex),this.indexHelper.rowStartFrom=s,o.children?this._applyToRows(o.children):o.data&&o.data.length&&this.applyToValues(o.data,{type:r,metadata:i},{rowIndex:s,colIndex:this.getRowsColumnLength()}),Object.assign(o,d),!0})}applyToValues(e,o,n){e.length&&e.forEach((i,r)=>{const a=[ad.VALUE],s=this.columnsMetadata[r];if(!s)return;const l=this.getTotalTypes([...o.type,...s.type]),d=this.getMeasureMetaByIndex(r),b={type:a.concat(l),rows:o.metadata,columns:s.metadata,measure:d,colIndex:r+n.colIndex,rowIndex:n.rowIndex,index:d&&d.index?d.index:0};let C={value:i,content:i,contentType:Bh,style:{},store:i&&i.store||{},state:i&&i.state||void 0};i!=null&&typeof i=="object"&&(C={value:i.value?i.value:null,content:i.content||"",contentType:i.contentType||Bh,style:i.style||{},store:i.store||{},state:i.state}),this.applyGlobal(C),this.apply(b,C),this.addToMetadata(b,C,b.rowIndex,b.colIndex),e[r]=C})}addToMetadata(e,o,n,i){const r=_t({cellData:{value:o.value,content:o.content}},e);this.metadataCache.set(`${n}-${i}`,r)}applyGlobal(e){const{globalStyles:o}=this;o&&(e.style=_t(_t({},e.style),o))}apply(e,o){this.plugins&&this.plugins.length&&this.plugins.forEach(n=>{if(Xht(n.target,e)){const i=n.handler;i(e,o)}})}};const F_=(t,e)=>{const o=t||{metadata:[],grandTotals:null};let{metadata:n}=o;return n=n.map(i=>{const r=i.field||{},a=e.find(({field:l})=>l&&l.index===r.index),s=a?a.format:null;return s?Ht(_t({},i),{format:s}):i}),Ht(_t({},o),{metadata:n})},h5=100,ift="dataLoad",uT="dataChunkLoaded",rft="dataBarChunkLoaded",aft="rangeMinMaxChunkLoaded",dT="grandChunkLoaded",sft="dataFinishChunkLoaded",lft="finishChunkLoaded",ly="progressError",pT="headerCellFormat",F9="dataCellFormat",hT="totalRowsCountLoaded",fT="totalColumnsCountLoaded",f5=1e3,cft=0,uft={throttle:y9,throttleTime:cft,PluginService:nft,skipInternalColorFormatting:!1,subtotalsForSingleRow:!1};let H9=class Yr{constructor(e,o,n,i){Dt(this,"logger"),Dt(this,"events"),Dt(this,"loadService"),Dt(this,"options"),Dt(this,"tempDataChunks",[]),Dt(this,"lastNotHandledChunkIndex",0),Dt(this,"lastReadyNotHandledChunkIndex",0),Dt(this,"rowsGrand"),Dt(this,"rowsTreeService"),Dt(this,"columnsTreeService"),Dt(this,"cornerTreeService"),Dt(this,"pageSize",h5),Dt(this,"isPaginated",!1),Dt(this,"loadedPagesCount",0),Dt(this,"isLoadInProgress",!1),Dt(this,"loadPromiseResolve"),Dt(this,"loadPromiseReject"),Dt(this,"loadPromiseCache"),Dt(this,"loadAllPromise"),Dt(this,"loadAllPromiseResolve"),Dt(this,"loadAllPromiseReject"),Dt(this,"isWholeDataLoaded",!1),Dt(this,"hasDataFinishEvent",!1),Dt(this,"isDataHandlerThrottled",!1),Dt(this,"onDataHandlerThrottle"),Dt(this,"metadata",[]),Dt(this,"dataBars"),Dt(this,"rangeMinMax"),Dt(this,"divergenceComparator",new l5),Dt(this,"pluginService"),Dt(this,"rawJaql"),Dt(this,"triggeredEventsData",{}),Dt(this,"callPlugins",[]),Dt(this,"globalStyles"),Dt(this,"columnsCount"),Dt(this,"totalColumnsCount"),Dt(this,"rowsCount"),Dt(this,"totalRowsCount"),Dt(this,"totalRecordsCount"),Dt(this,"limitReached"),Dt(this,"onMetadataHandler",()=>{const r={metadata:this.getMetadata()};this.isSingleRowTree()&&Fn.normalizeSingleBranchTreeSortDetails(r)}),Dt(this,"onHeadersHandler",r=>{const a=this.getJaql.bind(this),s=this.getRawJaql.bind(this),l=this.applyIndexDivergence.bind(this),d=(j,A,p)=>this.emit(pT,j,A,p,this.options),b=Yr.createColumnsTreeServiceBuilder({getJaql:a,getRawJaql:s,pluginService:this.pluginService,applyIndexDivergence:l},{emitHeaderCellFormatEvent:d})(r);this.columnsTreeService=b.columnsTreeService,this.columnsCount=b.columnsCount,this.totalColumnsCount=b.totalColumnsCount,this.emit(fT,{columnsCount:this.columnsCount||0,totalColumnsCount:this.totalColumnsCount||0});const C=Yr.createCornerTreeServiceBuilder({getJaql:a,getRawJaql:s,pluginService:this.pluginService,columnsTreeService:this.columnsTreeService},{emitHeaderCellFormatEvent:d}),{cornerTreeService:u}=C();this.cornerTreeService=u}),Dt(this,"onDataHandler",r=>{this.tempDataChunks=this.tempDataChunks||[],Array.isArray(r)?(r||[]).forEach(a=>{Yr.fillDataChunks(this.tempDataChunks,a,this.pageSize)}):Yr.fillDataChunks(this.tempDataChunks,r,this.pageSize),this.tempDataChunks.length&&(this.isDataHandlerThrottled=!0,this.onDataHandlerThrottle())}),Dt(this,"onGrandHandler",r=>{const a=this.preProcessTree([r],He.ROWS)[0],s="Rows grand total",l=a?a.data:[],d=_e.create(s,void 0,l),b=Ti(d,He.ROWS);b.userType=Fo.GRAND_TOTAL,this.postProcessTree([b]),this.postProcessData([b]),this.rowsGrand=b,this.emit(dT,_e.wrapInRootNode(this.rowsGrand))}),Dt(this,"onFinishHandler",()=>{this.emit(lft,{totalRows:typeof this.totalRowsCount=="number"?this.totalRowsCount:this.getTotalItemsCount(),totalColumns:typeof this.totalColumnsCount=="number"?this.totalColumnsCount:this.getLoadedColumnsCount()})}),Dt(this,"onTotalRowsHandler",r=>{const{rowsCount:a,queryRowsCount:s,limitReached:l}=r||{};this.totalRowsCount=a,this.totalRecordsCount=s,this.limitReached=l,this.emit(hT,r)}),Dt(this,"onDataBarsHandler",r=>{const{data:a=[]}=r;let s=0;this.cornerTreeService&&(s=this.cornerTreeService.getTreeChildLength()),this.dataBars=[...Array(s),...a],this.emit(rft,this.dataBars)}),Dt(this,"onRangeMinMaxHandler",r=>{const{data:a=[]}=r,s=this.getJaql(),l=Fn.getMetadataTree(s,He.MEASURES),d=_e.getChildren(l),b=[];d.forEach((C,u)=>{b[C.measureJaqlIndex||0]=a[u]}),this.rangeMinMax=b,this.emit(aft,this.rangeMinMax)}),Dt(this,"onDataFinishHandler",({rowsCount:r}={})=>{if(this.finishRequest(),this.rowsCount=r,this.tempDataChunks.length){const a=this.tempDataChunks[this.tempDataChunks.length-1];a.ready=!0}this.onDataHandlerThrottle(),this.checkLoadPromise(),this.emit(sft,{limitedRows:this.rowsCount,limitedColumns:this.columnsCount})}),Dt(this,"onErrorHandler",r=>{process.env.NODE_ENV!=="production"&&this.logger.console.warn(`${this.logger.getName()} data loading error "${JSON.stringify(r)}"`),!this.isLoadInProgress&&!this.isWholeDataLoaded&&!(r instanceof zd)&&this.emit(ly,r)}),this.loadService=e,this.events=o||new Ng,this.logger=i||bc.create("DataService"),this.options=_t(_t({},uft),n),this.attachEvent(),this.onDataHandlerThrottle=this.options.throttle(()=>{const r=s5(this.tempDataChunks,C=>C.ready&&!C.handled,this.lastReadyNotHandledChunkIndex);if(r===-1)return;this.lastReadyNotHandledChunkIndex=r;const a=this.tempDataChunks[r],s=this.preProcessTree(a.list,He.ROWS),l=this.modifyTree(s,He.ROWS);this.postProcessTree(l,{skipFormatEvent:!0}),this.postProcessData(l,{skipFormatEvent:!0});const d=_e.wrapInRootNode(l);this.rowsTreeService?this.rowsTreeService.extend(d):this.rowsTreeService=new Dc(d,!0),this.emit(uT,this.getLoadedElementsCount()),a.handled=!0;const b=s5(this.tempDataChunks,C=>!C.handled,this.lastNotHandledChunkIndex);if(b!==-1?(this.lastNotHandledChunkIndex=b,this.onDataHandlerThrottle()):this.isDataHandlerThrottled=!1,this.hasDataFinishEvent&&this.tempDataChunks.length){const C=this.tempDataChunks[this.tempDataChunks.length-1];C.ready=!0}this.hasDataFinishEvent&&b===-1?(this.finishRequest(),this.checkLoadPromise()):this.checkLoadPromise()},this.options.throttleTime)}destroy(){this.detachEvent(),this.rowsGrand=void 0,this.rowsTreeService=void 0,this.columnsTreeService=void 0,this.cornerTreeService=void 0,this.tempDataChunks=[],this.lastNotHandledChunkIndex=0,this.lastReadyNotHandledChunkIndex=0,this.events.removeAllListeners()}on(e,o){this.events.on(e,o),this.triggeredEventsData[e]&&(this.triggeredEventsData[e].forEach(n=>{this.events.emit(e,...n)}),delete this.triggeredEventsData[e])}emit(e,...o){this.events.listeners(e).length===0?(this.triggeredEventsData[e]=this.triggeredEventsData[e]||[],this.triggeredEventsData[e].push(o)):this.events.emit(e,...o)}off(e,o){this.events.removeListener(e,o),this.triggeredEventsData[e]&&delete this.triggeredEventsData[e]}loadData(e,o){const{pageSize:n=h5,isPaginated:i=!1,cacheResult:r=!1,metadata:a}=o||{},s=this.pageSize===n;if(this.clearLoadAllPromise(),e&&this.clearCache(),this.pageSize=n,this.isPaginated=i,this.emit(ift),this.loadPromiseCache&&s){const d=Promise.resolve(this.loadPromiseCache);return this.loadPromiseCache=void 0,d}this.isLoadInProgress=!0,e&&(this.metadata=a||[],this.rawJaql=F_(e,this.metadata),this.initPluginService(this.rawJaql),this.loadService.load(e).then(d=>{if(d==null)return;const b=!("data"in d);if(d.dataFinish[0]&&b)throw{error:{error:!0,details:"metadata undefined."}}}).catch(d=>{this.loadPromiseReject&&this.loadPromiseReject(d.error)}));const l=new Promise((d,b)=>{this.loadPromiseResolve=d,this.loadPromiseReject=b}).then(d=>this.sendInitPage(d)).then(d=>(r&&(this.loadPromiseCache=d),this.loadedPagesCount=1,d)).catch(d=>{throw d instanceof zd&&this.clearLoadPromise(),d});return this.checkLoadPromise(),l}loadAllData(){if(this.isWholeDataLoaded){const e={loadedRowsCount:this.getLoadedElementsCount(),totalItemsCount:typeof this.totalRowsCount=="number"?this.totalRowsCount:this.getTotalItemsCount(),totalRecordsCount:this.totalRecordsCount,limitReached:this.limitReached,dataBars:this.dataBars,rangeMinMax:this.rangeMinMax};return this.columnsCount!==0&&this.totalColumnsCount!==0&&(e.columnsCount=this.columnsCount,e.totalColumnsCount=this.totalColumnsCount),Promise.resolve(e)}return this.loadAllPromise||(this.loadAllPromise=new Promise((e,o)=>{this.loadAllPromiseResolve=e,this.loadAllPromiseReject=o}).then(()=>({loadedRowsCount:this.getLoadedElementsCount(),totalItemsCount:typeof this.totalRowsCount=="number"?this.totalRowsCount:this.getTotalItemsCount(),totalRecordsCount:this.totalRecordsCount,limitReached:this.limitReached,dataBars:this.dataBars,rangeMinMax:this.rangeMinMax})).catch(e=>{throw e instanceof zd&&this.clearLoadAllPromise(),e})),this.loadAllPromise}getSelectedPageData(e,o){return Promise.resolve(this.sendPaginatedPage(e,o))}getIndexedPageData(e,o,n=!1){return Promise.resolve(this.sendPartialPage(e,o,n))}getJaql(){return this.loadService.getJaql()||{metadata:[],grandTotals:null}}isSingleRowTree(){return this.loadService.isSingleRowTree()}setPluginHandlers(e){this.callPlugins=e}setGlobalStyles(e){this.globalStyles=e}getRawJaql(){return this.rawJaql||this.getJaql()}getMetadata(){return this.metadata.length>0?this.metadata:this.getJaql().metadata}preProcessTree(e,o,n){return $h.preProcessTree(e,o,this.getJaql(),n)}postProcessTree(e,o){const n=(r,a,s)=>this.emit(pT,r,a,s,this.options),i=Ht(_t({},o||{}),{emitFn:n});return $h.postProcessTree(e,this.getRawJaql(),i)}postProcessData(e,o){const{skipFormatEvent:n=!1,onlyFormatEvents:i=!1}=o||{},r=this.columnsTreeService?this.columnsTreeService.getLastLevelNodes():[],a=_e.getLastLevelNodes(e),s=this.getRawJaql();n||a.forEach(l=>{const d=Ti(l);r.forEach(b=>{const C=Ti(b),u=Fn.getMetadataPanelByIndex(s,C.measureJaqlIndex,He.MEASURES);if(typeof d.data<"u"&&typeof C.index<"u"){const{data:j=[]}=d,{index:A}=C,p=j[A],I=typeof p=="object"&&p!==null&&p!==void 0?p:{value:p};if(j[A]=I,i||!n){const{skipInternalColorFormatting:W=!1}=this.options;W||$h.applyColorFormatting(I,d,C,u),this.emit(F9,I,d,C,u,s,this.options)}}})})}modifyTree(e,o,n){const i=this.getJaql();return $h.modifyTree(e,o,i,{originalData:n,applyIndexDivergence:this.applyIndexDivergence.bind(this),subtotalsForSingleRow:this.options.subtotalsForSingleRow})}applyIndexDivergence(e){this.divergenceComparator=new l5(e,this.divergenceComparator)}initPluginService(e){this.pluginService=new this.options.PluginService(this.callPlugins,e,this.globalStyles)}cancelLoading(){const e=new zd;this.loadPromiseReject&&typeof this.loadPromiseReject=="function"&&this.loadPromiseReject(e),this.loadAllPromiseReject&&typeof this.loadAllPromiseReject=="function"&&this.loadAllPromiseReject(e),this.detachEvent()}getPageSize(){return this.pageSize}sendInitPage(e){if(this.loadService.hasError()||!this.loadService.hasData())return Yr.getEmptyPage();let o,n;const i=this.getPageSize();if(this.rowsTreeService){const a=i>e?e:i,s=Yr.cloneTreeNode,l=this.rowsTreeService.getPartialTree(0,a,{cloneFn:s});this.rowsGrand&&l.push(dr(this.rowsGrand)),this.postProcessTree(l,{onlyFormatEvents:!0,iterateFn:_e.clearNodeCache}),this.postProcessData(l,{onlyFormatEvents:!0});const d=this.rowsTreeService?this.rowsTreeService.getTreeDeepsLength():0,b=_e.wrapInRootNode(l);this.pluginService&&b&&b.children&&(this.pluginService.applyToRows(b.children),n=this.pluginService.metadataCache),o=new Dc(b,!0,d),o.hasGrandTotals=!!this.rowsGrand}const r=this.isWholeDataLoaded&&i>=e;return{rowsTreeService:o,columnsTreeService:this.columnsTreeService,cornerTreeService:this.cornerTreeService,isLastPage:r,cellsMetadata:n}}sendPaginatedPage(e,o){if(this.loadService.hasError()||!this.loadService.hasData())return Yr.getEmptyPage();o&&(this.pageSize=o);const n=this.getPageSize(),i=this.getLoadedElementsCount();if(e*n>=i)throw new Error("Selected page is out of elements range!");if(e<0)throw new Error("Selected page must be >= 0");let r,a;if(this.rowsTreeService){const s=e>=0?e*n:0,l=(e+1)*n>i?i:(e+1)*n,d=Yr.cloneTreeNode,b=this.rowsTreeService.getPartialTree(s,l,{cloneFn:d});this.rowsGrand&&b.push(dr(this.rowsGrand)),this.postProcessTree(b,{onlyFormatEvents:!0,iterateFn:_e.clearNodeCache}),this.postProcessData(b,{onlyFormatEvents:!0});const C=this.rowsTreeService?this.rowsTreeService.getTreeDeepsLength():0,u=_e.wrapInRootNode(b);this.pluginService&&u&&u.children&&(this.pluginService.applyToRows(u.children),a=this.pluginService.metadataCache),r=new Dc(u,!0,C),r.hasGrandTotals=!!this.rowsGrand}return{rowsTreeService:r,columnsTreeService:this.columnsTreeService,cornerTreeService:this.cornerTreeService,isLastPage:!0,cellsMetadata:a}}sendPartialPage(e,o,n){if(this.loadService.hasError()||!this.loadService.hasData())return Yr.getEmptyPage();const i=this.getLoadedElementsCount();let[r,a]=[Math.min(e,o),Math.max(e,o)];r=r>=0?r:0,a=a>=0?a:0,a=a<i?a:i;let s,l;if(r>i)s=void 0;else{let d;if(this.rowsTreeService){const u=Yr.cloneTreeNode;d=this.rowsTreeService.getPartialTree(r,a,{cloneFn:u}),n&&this.rowsGrand&&d.push(dr(this.rowsGrand)),this.postProcessTree(d,{onlyFormatEvents:!0,iterateFn:_e.clearNodeCache}),this.postProcessData(d,{onlyFormatEvents:!0})}const b=this.rowsTreeService?this.rowsTreeService.getTreeDeepsLength():0,C=_e.wrapInRootNode(d);this.pluginService&&C&&C.children&&(this.pluginService.applyToRows(C.children),l=this.pluginService.metadataCache),s=new Dc(C,!0,b),s.hasGrandTotals=!!(n&&this.rowsGrand)}return{rowsTreeService:s,columnsTreeService:this.columnsTreeService,cornerTreeService:this.cornerTreeService,isLastPage:!0,cellsMetadata:l}}getLoadedElementsCount(){return this.rowsTreeService?this.rowsTreeService.getTreeChildLength():0}getTotalItemsCount(){return this.loadService.getTotalItemsCount()}getLoadedColumnsCount(){return this.columnsTreeService?this.columnsTreeService.getTreeChildLength():0}attachEvent(){this.loadService.listenerCount(Ye.HEADERS)&&this.loadService.offAll(Ye.HEADERS),this.loadService.on(Ye.HEADERS,this.onHeadersHandler),this.loadService.on(Ye.METADATA,this.onMetadataHandler),this.loadService.on(Ye.DATA,this.onDataHandler),this.loadService.on(Ye.GRAND,this.onGrandHandler),this.loadService.on(Ye.DATA_FINISH,this.onDataFinishHandler),this.loadService.on(Ye.TOTAL_ROWS,this.onTotalRowsHandler),this.loadService.on(Ye.DATABARS,this.onDataBarsHandler),this.loadService.on(Ye.RANGE_MIN_MAX,this.onRangeMinMaxHandler),this.loadService.on(Ye.FINISH,this.onFinishHandler),this.loadService.on(Ye.ERROR,this.onErrorHandler)}detachEvent(){this.loadService.off(Ye.HEADERS,this.onHeadersHandler),this.loadService.off(Ye.METADATA,this.onMetadataHandler),this.loadService.off(Ye.DATA,this.onDataHandler),this.loadService.off(Ye.GRAND,this.onGrandHandler),this.loadService.off(Ye.DATA_FINISH,this.onDataFinishHandler),this.loadService.off(Ye.TOTAL_ROWS,this.onTotalRowsHandler),this.loadService.off(Ye.DATABARS,this.onDataBarsHandler),this.loadService.off(Ye.RANGE_MIN_MAX,this.onRangeMinMaxHandler),this.loadService.off(Ye.FINISH,this.onFinishHandler),this.loadService.off(Ye.ERROR,this.onErrorHandler)}checkLoadPromise(){if(!this.isLoadInProgress)return;const e=this.getLoadedElementsCount();(e>=this.getPageSize()||this.isWholeDataLoaded)&&(this.isLoadInProgress=!1,typeof this.loadPromiseResolve=="function"&&(this.loadPromiseResolve(e),this.clearLoadPromise()))}clearLoadAllPromise(){this.loadAllPromise=void 0,this.loadAllPromiseReject=void 0,this.loadAllPromiseResolve=void 0}clearLoadPromise(){this.loadPromiseReject=void 0,this.loadPromiseResolve=void 0}finishRequest(){this.logger.log("finishRequest"),this.hasDataFinishEvent=!0,!this.isDataHandlerThrottled&&(this.isWholeDataLoaded=!0,this.loadAllPromiseResolve&&typeof this.loadAllPromiseResolve=="function"&&(this.loadAllPromiseResolve(),this.clearLoadAllPromise()))}clearCache(){this.rowsGrand=void 0,this.rowsTreeService=void 0,this.columnsTreeService=void 0,this.loadedPagesCount=0,this.hasDataFinishEvent=!1,this.isWholeDataLoaded=!1,this.isLoadInProgress=!1,this.tempDataChunks=[],this.lastNotHandledChunkIndex=0,this.lastReadyNotHandledChunkIndex=0,this.isDataHandlerThrottled=!1}static getEmptyPage(){return{isLastPage:!0}}static fillDataChunks(e,o,n=f5,i=f5){const r=e.length<2?n:i;let a=e[Math.max(0,e.length-1)],s,l=!a;if(!o||typeof o.children>"u"&&typeof o.value>"u"&&o.data&&!o.data.length){a&&(a.ready=!0);return}if(a){const d=Math.max(0,a.list.length-1);s=a.list[d];const b=a.size?`${a.size}`:"0",C=parseInt(b,10)+(o.size||1);(a.handled||C>r&&!(s.isPart&&s.value===o.value))&&(l=!0)}o&&o.isPart&&s&&(!s.isPart||s.value!==o.value)&&(l=!0,s.value!==o.value&&(s=void 0)),l&&(a&&(a.ready=!0),a={list:[],size:0,ready:!1,handled:!1},e.push(a)),a&&(s&&s.isPart&&o&&o.isPart?(_e.deepMerge(s,o),a.size+=o.size||1):(a.list.push(o),a.size+=o.size||1))}static cloneTreeNode(e,o){const n=e,{children:i,isMapped:r,minLevel:a,childCount:s,childDeep:l,parent:d,master:b,data:C,state:u,style:j,store:A}=n,p=ge(n,["children","isMapped","minLevel","childCount","childDeep","parent","master","data","state","style","store"]),I=dr(p);return d&&(I.parent=d),b&&(I.master=b),C&&(I.data=dr(C)),u&&(I.state=dr(u)),j&&(I.style=dr(j)),A&&(I.store=dr(A)),!o&&i&&(I.children=i.map(W=>{const q=Yr.cloneTreeNode(W);return q.parent=I,q})),I}static createColumnsTreeServiceBuilder(e,o){return n=>{const i=e.getJaql(),r=e.getRawJaql?e.getRawJaql():F_(i,i.metadata||[]),a=Fn.getMetadataTree(i,He.MEASURES),s=_e.getChildren(a),{preProcessTree:l,modifyTree:d,postProcessTree:b}=$h;let C,u,j=0,A=0;if(_e.hasChildren(n)){n.columnsCount&&n.totalColumnsCount&&(j=n.columnsCount,A=n.totalColumnsCount);const p=l(n,He.COLUMNS,i),I=d(p,He.COLUMNS,i,{originalData:n,applyIndexDivergence:e.applyIndexDivergence});b(I,r,{emitFn:o&&o.emitHeaderCellFormatEvent});const W=_e.wrapInRootNode(I);e.pluginService&&W&&W.children&&e.pluginService.applyToColumns(W.children),C=W,u=new Dc(W),s.length===1&&u.setValueNode(s[0])}else _e.hasChildren(a)?(n.columnsCount&&n.totalColumnsCount&&(j=n.columnsCount,A=n.totalColumnsCount),typeof n.maxChilds=="number"&&(j=n.maxChilds,a.children=_e.getChildren(a).filter((p,I)=>I<n.maxChilds)),e.pluginService&&a.children&&e.pluginService.applyToColumns(a.children),b(_e.getChildren(a),r,{emitFn:o&&o.emitHeaderCellFormatEvent}),C=a,u=new Dc(a)):(e.pluginService&&e.pluginService.resetRowStartFrom(),C=void 0,u=void 0,j=0,A=0);return{columnsTree:C,columnsTreeService:u,columnsCount:j,totalColumnsCount:A}}}static createCornerTreeServiceBuilder(e,o){return()=>{const n=e.getJaql(),i=e.getRawJaql?e.getRawJaql():F_(n,n.metadata||[]),r=Fn.getMetadataTree(n,He.ROWS);let a;if(_e.hasChildren(r)){_e.iterateThroughTree(_e.getChildren(r),l=>{l.userType=Fo.CORNER;const d=Fn.getMetadataPanelByIndex(i,l.jaqlIndex,l.metadataType||"");o&&o.emitHeaderCellFormatEvent&&o.emitHeaderCellFormatEvent(l,d,i)});let s;e.columnsTreeService&&(s=e.columnsTreeService.getTreeDeepsLength()),e.pluginService&&e.pluginService.applyToHeaders(r),a=new Dc(r,!1,s)}return{cornerTree:r,cornerTreeService:a}}}};var m5={exports:{}};/*!
|
|
1
|
+
"use strict";var bg,De,m6,Xc,H3,g6,v6,y6,RA,T2,M2,b6,pm={},x6=[],KQ=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,xg=Array.isArray;function fs(t,e){for(var o in e)t[o]=e[o];return t}function IA(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function Re(t,e,o){var n,i,r,a={};for(r in e)r=="key"?n=e[r]:r=="ref"?i=e[r]:a[r]=e[r];if(arguments.length>2&&(a.children=arguments.length>3?bg.call(arguments,2):o),typeof t=="function"&&t.defaultProps!=null)for(r in t.defaultProps)a[r]===void 0&&(a[r]=t.defaultProps[r]);return Hf(t,a,n,i,null)}function Hf(t,e,o,n,i){var r={type:t,props:e,key:o,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++m6,__i:-1,__u:0};return i==null&&De.vnode!=null&&De.vnode(r),r}function a1(){return{current:null}}function lo(t){return t.children}function ii(t,e){this.props=t,this.context=e}function sp(t,e){if(e==null)return t.__?sp(t.__,t.__i+1):null;for(var o;e<t.__k.length;e++)if((o=t.__k[e])!=null&&o.__e!=null)return o.__e;return typeof t.type=="function"?sp(t):null}function w6(t){var e,o;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((o=t.__k[e])!=null&&o.__e!=null){t.__e=t.__c.base=o.__e;break}return w6(t)}}function k2(t){(!t.__d&&(t.__d=!0)&&Xc.push(t)&&!Dy.__r++||H3!=De.debounceRendering)&&((H3=De.debounceRendering)||g6)(Dy)}function Dy(){for(var t,e,o,n,i,r,a,s=1;Xc.length;)Xc.length>s&&Xc.sort(v6),t=Xc.shift(),s=Xc.length,t.__d&&(o=void 0,i=(n=(e=t).__v).__e,r=[],a=[],e.__P&&((o=fs({},n)).__v=n.__v+1,De.vnode&&De.vnode(o),jA(e.__P,o,n,e.__n,e.__P.namespaceURI,32&n.__u?[i]:null,r,i??sp(n),!!(32&n.__u),a),o.__v=n.__v,o.__.__k[o.__i]=o,C6(r,o,a),o.__e!=i&&w6(o)));Dy.__r=0}function _6(t,e,o,n,i,r,a,s,l,d,b){var C,u,j,A,p,I,W=n&&n.__k||x6,q=e.length;for(l=JQ(o,e,W,l,q),C=0;C<q;C++)(j=o.__k[C])!=null&&(u=j.__i==-1?pm:W[j.__i]||pm,j.__i=C,I=jA(t,j,u,i,r,a,s,l,d,b),A=j.__e,j.ref&&u.ref!=j.ref&&(u.ref&&$A(u.ref,null,j),b.push(j.ref,j.__c||A,j)),p==null&&A!=null&&(p=A),4&j.__u||u.__k===j.__k?l=S6(j,l,t):typeof j.type=="function"&&I!==void 0?l=I:A&&(l=A.nextSibling),j.__u&=-7);return o.__e=p,l}function JQ(t,e,o,n,i){var r,a,s,l,d,b=o.length,C=b,u=0;for(t.__k=new Array(i),r=0;r<i;r++)(a=e[r])!=null&&typeof a!="boolean"&&typeof a!="function"?(l=r+u,(a=t.__k[r]=typeof a=="string"||typeof a=="number"||typeof a=="bigint"||a.constructor==String?Hf(null,a,null,null,null):xg(a)?Hf(lo,{children:a},null,null,null):a.constructor==null&&a.__b>0?Hf(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):a).__=t,a.__b=t.__b+1,s=null,(d=a.__i=QQ(a,o,l,C))!=-1&&(C--,(s=o[d])&&(s.__u|=2)),s==null||s.__v==null?(d==-1&&(i>b?u--:i<b&&u++),typeof a.type!="function"&&(a.__u|=4)):d!=l&&(d==l-1?u--:d==l+1?u++:(d>l?u--:u++,a.__u|=4))):t.__k[r]=null;if(C)for(r=0;r<b;r++)(s=o[r])!=null&&!(2&s.__u)&&(s.__e==n&&(n=sp(s)),M6(s,s));return n}function S6(t,e,o){var n,i;if(typeof t.type=="function"){for(n=t.__k,i=0;n&&i<n.length;i++)n[i]&&(n[i].__=t,e=S6(n[i],e,o));return e}t.__e!=e&&(e&&t.type&&!o.contains(e)&&(e=sp(t)),o.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function tl(t,e){return e=e||[],t==null||typeof t=="boolean"||(xg(t)?t.some(function(o){tl(o,e)}):e.push(t)),e}function QQ(t,e,o,n){var i,r,a=t.key,s=t.type,l=e[o];if(l===null&&t.key==null||l&&a==l.key&&s==l.type&&!(2&l.__u))return o;if(n>(l!=null&&!(2&l.__u)?1:0))for(i=o-1,r=o+1;i>=0||r<e.length;){if(i>=0){if((l=e[i])&&!(2&l.__u)&&a==l.key&&s==l.type)return i;i--}if(r<e.length){if((l=e[r])&&!(2&l.__u)&&a==l.key&&s==l.type)return r;r++}}return-1}function W3(t,e,o){e[0]=="-"?t.setProperty(e,o??""):t[e]=o==null?"":typeof o!="number"||KQ.test(e)?o:o+"px"}function R0(t,e,o,n,i){var r,a;t:if(e=="style")if(typeof o=="string")t.style.cssText=o;else{if(typeof n=="string"&&(t.style.cssText=n=""),n)for(e in n)o&&e in o||W3(t.style,e,"");if(o)for(e in o)n&&o[e]==n[e]||W3(t.style,e,o[e])}else if(e[0]=="o"&&e[1]=="n")r=e!=(e=e.replace(y6,"$1")),a=e.toLowerCase(),e=a in t||e=="onFocusOut"||e=="onFocusIn"?a.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+r]=o,o?n?o.u=n.u:(o.u=RA,t.addEventListener(e,r?M2:T2,r)):t.removeEventListener(e,r?M2:T2,r);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=o??"";break t}catch{}typeof o=="function"||(o==null||o===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&o==1?"":o))}}function V3(t){return function(e){if(this.l){var o=this.l[e.type+t];if(e.t==null)e.t=RA++;else if(e.t<o.u)return;return o(De.event?De.event(e):e)}}}function jA(t,e,o,n,i,r,a,s,l,d){var b,C,u,j,A,p,I,W,q,X,H,D,$,z,N,V,E,x=e.type;if(e.constructor!=null)return null;128&o.__u&&(l=!!(32&o.__u),r=[s=e.__e=o.__e]),(b=De.__b)&&b(e);t:if(typeof x=="function")try{if(W=e.props,q="prototype"in x&&x.prototype.render,X=(b=x.contextType)&&n[b.__c],H=b?X?X.props.value:b.__:n,o.__c?I=(C=e.__c=o.__c).__=C.__E:(q?e.__c=C=new x(W,H):(e.__c=C=new ii(W,H),C.constructor=x,C.render=ett),X&&X.sub(C),C.props=W,C.state||(C.state={}),C.context=H,C.__n=n,u=C.__d=!0,C.__h=[],C._sb=[]),q&&C.__s==null&&(C.__s=C.state),q&&x.getDerivedStateFromProps!=null&&(C.__s==C.state&&(C.__s=fs({},C.__s)),fs(C.__s,x.getDerivedStateFromProps(W,C.__s))),j=C.props,A=C.state,C.__v=e,u)q&&x.getDerivedStateFromProps==null&&C.componentWillMount!=null&&C.componentWillMount(),q&&C.componentDidMount!=null&&C.__h.push(C.componentDidMount);else{if(q&&x.getDerivedStateFromProps==null&&W!==j&&C.componentWillReceiveProps!=null&&C.componentWillReceiveProps(W,H),!C.__e&&C.shouldComponentUpdate!=null&&C.shouldComponentUpdate(W,C.__s,H)===!1||e.__v==o.__v){for(e.__v!=o.__v&&(C.props=W,C.state=C.__s,C.__d=!1),e.__e=o.__e,e.__k=o.__k,e.__k.some(function(g){g&&(g.__=e)}),D=0;D<C._sb.length;D++)C.__h.push(C._sb[D]);C._sb=[],C.__h.length&&a.push(C);break t}C.componentWillUpdate!=null&&C.componentWillUpdate(W,C.__s,H),q&&C.componentDidUpdate!=null&&C.__h.push(function(){C.componentDidUpdate(j,A,p)})}if(C.context=H,C.props=W,C.__P=t,C.__e=!1,$=De.__r,z=0,q){for(C.state=C.__s,C.__d=!1,$&&$(e),b=C.render(C.props,C.state,C.context),N=0;N<C._sb.length;N++)C.__h.push(C._sb[N]);C._sb=[]}else do C.__d=!1,$&&$(e),b=C.render(C.props,C.state,C.context),C.state=C.__s;while(C.__d&&++z<25);C.state=C.__s,C.getChildContext!=null&&(n=fs(fs({},n),C.getChildContext())),q&&!u&&C.getSnapshotBeforeUpdate!=null&&(p=C.getSnapshotBeforeUpdate(j,A)),V=b,b!=null&&b.type===lo&&b.key==null&&(V=T6(b.props.children)),s=_6(t,xg(V)?V:[V],e,o,n,i,r,a,s,l,d),C.base=e.__e,e.__u&=-161,C.__h.length&&a.push(C),I&&(C.__E=C.__=null)}catch(g){if(e.__v=null,l||r!=null)if(g.then){for(e.__u|=l?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;r[r.indexOf(s)]=null,e.__e=s}else for(E=r.length;E--;)IA(r[E]);else e.__e=o.__e,e.__k=o.__k;De.__e(g,e,o)}else r==null&&e.__v==o.__v?(e.__k=o.__k,e.__e=o.__e):s=e.__e=ttt(o.__e,e,o,n,i,r,a,l,d);return(b=De.diffed)&&b(e),128&e.__u?void 0:s}function C6(t,e,o){for(var n=0;n<o.length;n++)$A(o[n],o[++n],o[++n]);De.__c&&De.__c(e,t),t.some(function(i){try{t=i.__h,i.__h=[],t.some(function(r){r.call(i)})}catch(r){De.__e(r,i.__v)}})}function T6(t){return typeof t!="object"||t==null||t.__b&&t.__b>0?t:xg(t)?t.map(T6):fs({},t)}function ttt(t,e,o,n,i,r,a,s,l){var d,b,C,u,j,A,p,I=o.props,W=e.props,q=e.type;if(q=="svg"?i="http://www.w3.org/2000/svg":q=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),r!=null){for(d=0;d<r.length;d++)if((j=r[d])&&"setAttribute"in j==!!q&&(q?j.localName==q:j.nodeType==3)){t=j,r[d]=null;break}}if(t==null){if(q==null)return document.createTextNode(W);t=document.createElementNS(i,q,W.is&&W),s&&(De.__m&&De.__m(e,r),s=!1),r=null}if(q==null)I===W||s&&t.data==W||(t.data=W);else{if(r=r&&bg.call(t.childNodes),I=o.props||pm,!s&&r!=null)for(I={},d=0;d<t.attributes.length;d++)I[(j=t.attributes[d]).name]=j.value;for(d in I)if(j=I[d],d!="children"){if(d=="dangerouslySetInnerHTML")C=j;else if(!(d in W)){if(d=="value"&&"defaultValue"in W||d=="checked"&&"defaultChecked"in W)continue;R0(t,d,null,j,i)}}for(d in W)j=W[d],d=="children"?u=j:d=="dangerouslySetInnerHTML"?b=j:d=="value"?A=j:d=="checked"?p=j:s&&typeof j!="function"||I[d]===j||R0(t,d,j,I[d],i);if(b)s||C&&(b.__html==C.__html||b.__html==t.innerHTML)||(t.innerHTML=b.__html),e.__k=[];else if(C&&(t.innerHTML=""),_6(e.type=="template"?t.content:t,xg(u)?u:[u],e,o,n,q=="foreignObject"?"http://www.w3.org/1999/xhtml":i,r,a,r?r[0]:o.__k&&sp(o,0),s,l),r!=null)for(d=r.length;d--;)IA(r[d]);s||(d="value",q=="progress"&&A==null?t.removeAttribute("value"):A!=null&&(A!==t[d]||q=="progress"&&!A||q=="option"&&A!=I[d])&&R0(t,d,A,I[d],i),d="checked",p!=null&&p!=t[d]&&R0(t,d,p,I[d],i))}return t}function $A(t,e,o){try{if(typeof t=="function"){var n=typeof t.__u=="function";n&&t.__u(),n&&e==null||(t.__u=t(e))}else t.current=e}catch(i){De.__e(i,o)}}function M6(t,e,o){var n,i;if(De.unmount&&De.unmount(t),(n=t.ref)&&(n.current&&n.current!=t.__e||$A(n,null,e)),(n=t.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(r){De.__e(r,e)}n.base=n.__P=null}if(n=t.__k)for(i=0;i<n.length;i++)n[i]&&M6(n[i],e,o||typeof t.type!="function");o||IA(t.__e),t.__c=t.__=t.__e=void 0}function ett(t,e,o){return this.constructor(t,o)}function lp(t,e,o){var n,i,r,a;e==document&&(e=document.documentElement),De.__&&De.__(t,e),i=(n=typeof o=="function")?null:o&&o.__k||e.__k,r=[],a=[],jA(e,t=(!n&&o||e).__k=Re(lo,null,[t]),i||pm,pm,e.namespaceURI,!n&&o?[o]:i?null:e.firstChild?bg.call(e.childNodes):null,r,!n&&o?o:i?i.__e:e.firstChild,n,a),C6(r,t,a)}function k6(t,e){lp(t,e,k6)}function ott(t,e,o){var n,i,r,a,s=fs({},t.props);for(r in t.type&&t.type.defaultProps&&(a=t.type.defaultProps),e)r=="key"?n=e[r]:r=="ref"?i=e[r]:s[r]=e[r]===void 0&&a!=null?a[r]:e[r];return arguments.length>2&&(s.children=arguments.length>3?bg.call(arguments,2):o),Hf(t.type,s,n||t.key,i||t.ref,null)}function uo(t){function e(o){var n,i;return this.getChildContext||(n=new Set,(i={})[e.__c]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(r){this.props.value!=r.value&&n.forEach(function(a){a.__e=!0,k2(a)})},this.sub=function(r){n.add(r);var a=r.componentWillUnmount;r.componentWillUnmount=function(){n&&n.delete(r),a&&a.call(r)}}),o.children}return e.__c="__cC"+b6++,e.__=t,e.Provider=e.__l=(e.Consumer=function(o,n){return o.children(n)}).contextType=e,e}bg=x6.slice,De={__e:function(t,e,o,n){for(var i,r,a;e=e.__;)if((i=e.__c)&&!i.__)try{if((r=i.constructor)&&r.getDerivedStateFromError!=null&&(i.setState(r.getDerivedStateFromError(t)),a=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,n||{}),a=i.__d),a)return i.__E=i}catch(s){t=s}throw t}},m6=0,ii.prototype.setState=function(t,e){var o;o=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=fs({},this.state),typeof t=="function"&&(t=t(fs({},o),this.props)),t&&fs(o,t),t!=null&&this.__v&&(e&&this._sb.push(e),k2(this))},ii.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),k2(this))},ii.prototype.render=lo,Xc=[],g6=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,v6=function(t,e){return t.__v.__b-e.__v.__b},Dy.__r=0,y6=/(PointerCapture)$|Capture$/i,RA=0,T2=V3(!1),M2=V3(!0),b6=0;var al,Qo,S_,U3,cp=0,A6=[],Mn=De,G3=Mn.__b,Y3=Mn.__r,X3=Mn.diffed,q3=Mn.__c,Z3=Mn.unmount,K3=Mn.__;function Mu(t,e){Mn.__h&&Mn.__h(Qo,t,cp||e),cp=0;var o=Qo.__H||(Qo.__H={__:[],__h:[]});return t>=o.__.length&&o.__.push({}),o.__[t]}function le(t){return cp=1,ku(E6,t)}function ku(t,e,o){var n=Mu(al++,2);if(n.t=t,!n.__c&&(n.__=[o?o(e):E6(void 0,e),function(s){var l=n.__N?n.__N[0]:n.__[0],d=n.t(l,s);l!==d&&(n.__N=[d,n.__[1]],n.__c.setState({}))}],n.__c=Qo,!Qo.__f)){var i=function(s,l,d){if(!n.__c.__H)return!0;var b=n.__c.__H.__.filter(function(u){return!!u.__c});if(b.every(function(u){return!u.__N}))return!r||r.call(this,s,l,d);var C=n.__c.props!==s;return b.forEach(function(u){if(u.__N){var j=u.__[0];u.__=u.__N,u.__N=void 0,j!==u.__[0]&&(C=!0)}}),r&&r.call(this,s,l,d)||C};Qo.__f=!0;var r=Qo.shouldComponentUpdate,a=Qo.componentWillUpdate;Qo.componentWillUpdate=function(s,l,d){if(this.__e){var b=r;r=void 0,i(s,l,d),r=b}a&&a.call(this,s,l,d)},Qo.shouldComponentUpdate=i}return n.__N||n.__}function ae(t,e){var o=Mu(al++,3);!Mn.__s&&BA(o.__H,e)&&(o.__=t,o.u=e,Qo.__H.__h.push(o))}function Pi(t,e){var o=Mu(al++,4);!Mn.__s&&BA(o.__H,e)&&(o.__=t,o.u=e,Qo.__h.push(o))}function Yt(t){return cp=5,he(function(){return{current:t}},[])}function fi(t,e,o){cp=6,Pi(function(){if(typeof t=="function"){var n=t(e());return function(){t(null),n&&typeof n=="function"&&n()}}if(t)return t.current=e(),function(){return t.current=null}},o==null?o:o.concat(t))}function he(t,e){var o=Mu(al++,7);return BA(o.__H,e)&&(o.__=t(),o.__H=e,o.__h=t),o.__}function me(t,e){return cp=8,he(function(){return t},e)}function eo(t){var e=Qo.context[t.__c],o=Mu(al++,9);return o.c=t,e?(o.__==null&&(o.__=!0,e.sub(Qo)),e.props.value):t.__}function Wp(t,e){Mn.useDebugValue&&Mn.useDebugValue(e?e(t):t)}function ntt(t){var e=Mu(al++,10),o=le();return e.__=t,Qo.componentDidCatch||(Qo.componentDidCatch=function(n,i){e.__&&e.__(n,i),o[1](n)}),[o[0],function(){o[1](void 0)}]}function zA(){var t=Mu(al++,11);if(!t.__){for(var e=Qo.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var o=e.__m||(e.__m=[0,0]);t.__="P"+o[0]+"-"+o[1]++}return t.__}function itt(){for(var t;t=A6.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Xv),t.__H.__h.forEach(A2),t.__H.__h=[]}catch(e){t.__H.__h=[],Mn.__e(e,t.__v)}}Mn.__b=function(t){Qo=null,G3&&G3(t)},Mn.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),K3&&K3(t,e)},Mn.__r=function(t){Y3&&Y3(t),al=0;var e=(Qo=t.__c).__H;e&&(S_===Qo?(e.__h=[],Qo.__h=[],e.__.forEach(function(o){o.__N&&(o.__=o.__N),o.u=o.__N=void 0})):(e.__h.forEach(Xv),e.__h.forEach(A2),e.__h=[],al=0)),S_=Qo},Mn.diffed=function(t){X3&&X3(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(A6.push(e)!==1&&U3===Mn.requestAnimationFrame||((U3=Mn.requestAnimationFrame)||rtt)(itt)),e.__H.__.forEach(function(o){o.u&&(o.__H=o.u),o.u=void 0})),S_=Qo=null},Mn.__c=function(t,e){e.some(function(o){try{o.__h.forEach(Xv),o.__h=o.__h.filter(function(n){return!n.__||A2(n)})}catch(n){e.some(function(i){i.__h&&(i.__h=[])}),e=[],Mn.__e(n,o.__v)}}),q3&&q3(t,e)},Mn.unmount=function(t){Z3&&Z3(t);var e,o=t.__c;o&&o.__H&&(o.__H.__.forEach(function(n){try{Xv(n)}catch(i){e=i}}),o.__H=void 0,e&&Mn.__e(e,o.__v))};var J3=typeof requestAnimationFrame=="function";function rtt(t){var e,o=function(){clearTimeout(n),J3&&cancelAnimationFrame(e),setTimeout(t)},n=setTimeout(o,35);J3&&(e=requestAnimationFrame(o))}function Xv(t){var e=Qo,o=t.__c;typeof o=="function"&&(t.__c=void 0,o()),Qo=e}function A2(t){var e=Qo;t.__c=t.__(),Qo=e}function BA(t,e){return!t||t.length!==e.length||e.some(function(o,n){return o!==t[n]})}function E6(t,e){return typeof e=="function"?e(t):e}var att=0;function At(t,e,o,n,i,r){e||(e={});var a,s,l=e;if("ref"in l)for(s in l={},e)s=="ref"?a=e[s]:l[s]=e[s];var d={type:t,props:l,key:o,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--att,__i:-1,__u:0,__source:i,__self:r};if(typeof t=="function"&&(a=t.defaultProps))for(s in a)l[s]===void 0&&(l[s]=a[s]);return De.vnode&&De.vnode(d),d}function P6(t,e){for(var o in e)t[o]=e[o];return t}function E2(t,e){for(var o in t)if(o!=="__source"&&!(o in e))return!0;for(var n in e)if(n!=="__source"&&t[n]!==e[n])return!0;return!1}function FA(t,e){var o=e(),n=le({t:{__:o,u:e}}),i=n[0].t,r=n[1];return Pi(function(){i.__=o,i.u=e,C_(i)&&r({t:i})},[t,o,e]),ae(function(){return C_(i)&&r({t:i}),t(function(){C_(i)&&r({t:i})})},[t]),o}function C_(t){var e,o,n=t.u,i=t.__;try{var r=n();return!((e=i)===(o=r)&&(e!==0||1/e==1/o)||e!=e&&o!=o)}catch{return!0}}function HA(t){t()}function WA(t){return t}function VA(){return[!1,HA]}var UA=Pi;function Or(t,e){this.props=t,this.context=e}function Au(t,e){function o(i){var r=this.props.ref,a=r==i.ref;return!a&&r&&(r.call?r(null):r.current=null),e?!e(this.props,i)||!a:E2(this.props,i)}function n(i){return this.shouldComponentUpdate=o,Re(t,i)}return n.displayName="Memo("+(t.displayName||t.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(Or.prototype=new ii).isPureReactComponent=!0,Or.prototype.shouldComponentUpdate=function(t,e){return E2(this.props,t)||E2(this.state,e)};var Q3=De.__b;De.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),Q3&&Q3(t)};var stt=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ye(t){function e(o){var n=P6({},o);return delete n.ref,t(n,o.ref||null)}return e.$$typeof=stt,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var tN=function(t,e){return t==null?null:tl(tl(t).map(e))},ki={map:tN,forEach:tN,count:function(t){return t?tl(t).length:0},only:function(t){var e=tl(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:tl},ltt=De.__e;De.__e=function(t,e,o,n){if(t.then){for(var i,r=e;r=r.__;)if((i=r.__c)&&i.__c)return e.__e==null&&(e.__e=o.__e,e.__k=o.__k),i.__c(t,e)}ltt(t,e,o,n)};var eN=De.unmount;function O6(t,e,o){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),t.__c.__H=null),(t=P6({},t)).__c!=null&&(t.__c.__P===o&&(t.__c.__P=e),t.__c.__e=!0,t.__c=null),t.__k=t.__k&&t.__k.map(function(n){return O6(n,e,o)})),t}function L6(t,e,o){return t&&o&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(n){return L6(n,e,o)}),t.__c&&t.__c.__P===e&&(t.__e&&o.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=o)),t}function Wf(){this.__u=0,this.o=null,this.__b=null}function N6(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function D6(t){var e,o,n;function i(r){if(e||(e=t()).then(function(a){o=a.default||a},function(a){n=a}),n)throw n;if(!o)throw e;return Re(o,r)}return i.displayName="Lazy",i.__f=!0,i}function jd(){this.i=null,this.l=null}De.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),eN&&eN(t)},(Wf.prototype=new ii).__c=function(t,e){var o=e.__c,n=this;n.o==null&&(n.o=[]),n.o.push(o);var i=N6(n.__v),r=!1,a=function(){r||(r=!0,o.__R=null,i?i(s):s())};o.__R=a;var s=function(){if(!--n.__u){if(n.state.__a){var l=n.state.__a;n.__v.__k[0]=L6(l,l.__c.__P,l.__c.__O)}var d;for(n.setState({__a:n.__b=null});d=n.o.pop();)d.forceUpdate()}};n.__u++||32&e.__u||n.setState({__a:n.__b=n.__v.__k[0]}),t.then(a,a)},Wf.prototype.componentWillUnmount=function(){this.o=[]},Wf.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var o=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=O6(this.__b,o,n.__O=n.__P)}this.__b=null}var i=e.__a&&Re(lo,null,t.fallback);return i&&(i.__u&=-33),[Re(lo,null,e.__a?null:t.children),i]};var oN=function(t,e,o){if(++o[1]===o[0]&&t.l.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.l.size))for(o=t.i;o;){for(;o.length>3;)o.pop()();if(o[1]<o[0])break;t.i=o=o[2]}};function ctt(t){return this.getChildContext=function(){return t.context},t.children}function utt(t){var e=this,o=t.h;if(e.componentWillUnmount=function(){lp(null,e.v),e.v=null,e.h=null},e.h&&e.h!==o&&e.componentWillUnmount(),!e.v){for(var n=e.__v;n!==null&&!n.__m&&n.__!==null;)n=n.__;e.h=o,e.v={nodeType:1,parentNode:o,childNodes:[],__k:{__m:n.__m},contains:function(){return!0},insertBefore:function(i,r){this.childNodes.push(i),e.h.insertBefore(i,r)},removeChild:function(i){this.childNodes.splice(this.childNodes.indexOf(i)>>>1,1),e.h.removeChild(i)}}}lp(Re(ctt,{context:e.context},t.__v),e.v)}function Vp(t,e){var o=Re(utt,{__v:t,h:e});return o.containerInfo=e,o}(jd.prototype=new ii).__a=function(t){var e=this,o=N6(e.__v),n=e.l.get(t);return n[0]++,function(i){var r=function(){e.props.revealOrder?(n.push(i),oN(e,t,n)):i()};o?o(r):r()}},jd.prototype.render=function(t){this.i=null,this.l=new Map;var e=tl(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var o=e.length;o--;)this.l.set(e[o],this.i=[1,0,this.i]);return t.children},jd.prototype.componentDidUpdate=jd.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,o){oN(t,o,e)})};var R6=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,dtt=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,ptt=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,htt=/[A-Z0-9]/g,ftt=typeof document<"u",mtt=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function I6(t,e,o){return e.__k==null&&(e.textContent=""),lp(t,e),typeof o=="function"&&o(),t?t.__c:null}function j6(t,e,o){return k6(t,e),typeof o=="function"&&o(),t?t.__c:null}ii.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(ii.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var nN=De.event;function gtt(){}function vtt(){return this.cancelBubble}function ytt(){return this.defaultPrevented}De.event=function(t){return nN&&(t=nN(t)),t.persist=gtt,t.isPropagationStopped=vtt,t.isDefaultPrevented=ytt,t.nativeEvent=t};var GA,btt={enumerable:!1,configurable:!0,get:function(){return this.class}},iN=De.vnode;De.vnode=function(t){typeof t.type=="string"&&function(e){var o=e.props,n=e.type,i={},r=n.indexOf("-")===-1;for(var a in o){var s=o[a];if(!(a==="value"&&"defaultValue"in o&&s==null||ftt&&a==="children"&&n==="noscript"||a==="class"||a==="className")){var l=a.toLowerCase();a==="defaultValue"&&"value"in o&&o.value==null?a="value":a==="download"&&s===!0?s="":l==="translate"&&s==="no"?s=!1:l[0]==="o"&&l[1]==="n"?l==="ondoubleclick"?a="ondblclick":l!=="onchange"||n!=="input"&&n!=="textarea"||mtt(o.type)?l==="onfocus"?a="onfocusin":l==="onblur"?a="onfocusout":ptt.test(a)&&(a=l):l=a="oninput":r&&dtt.test(a)?a=a.replace(htt,"-$&").toLowerCase():s===null&&(s=void 0),l==="oninput"&&i[a=l]&&(a="oninputCapture"),i[a]=s}}n=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=tl(o.children).forEach(function(d){d.props.selected=i.value.indexOf(d.props.value)!=-1})),n=="select"&&i.defaultValue!=null&&(i.value=tl(o.children).forEach(function(d){d.props.selected=i.multiple?i.defaultValue.indexOf(d.props.value)!=-1:i.defaultValue==d.props.value})),o.class&&!o.className?(i.class=o.class,Object.defineProperty(i,"className",btt)):(o.className&&!o.class||o.class&&o.className)&&(i.class=i.className=o.className),e.props=i}(t),t.$$typeof=R6,iN&&iN(t)};var rN=De.__r;De.__r=function(t){rN&&rN(t),GA=t.__c};var aN=De.diffed;De.diffed=function(t){aN&&aN(t);var e=t.props,o=t.__e;o!=null&&t.type==="textarea"&&"value"in e&&e.value!==o.value&&(o.value=e.value==null?"":e.value),GA=null};var $6={ReactCurrentDispatcher:{current:{readContext:function(t){return GA.__n[t.__c].props.value},useCallback:me,useContext:eo,useDebugValue:Wp,useDeferredValue:WA,useEffect:ae,useId:zA,useImperativeHandle:fi,useInsertionEffect:UA,useLayoutEffect:Pi,useMemo:he,useReducer:ku,useRef:Yt,useState:le,useSyncExternalStore:FA,useTransition:VA}}},s1="18.3.1";function z6(t){return Re.bind(null,t)}function io(t){return!!t&&t.$$typeof===R6}function B6(t){return io(t)&&t.type===lo}function F6(t){return!!t&&!!t.displayName&&(typeof t.displayName=="string"||t.displayName instanceof String)&&t.displayName.startsWith("Memo(")}function fo(t){return io(t)?ott.apply(null,arguments):t}function H6(t){return!!t.__k&&(lp(null,t),!0)}function W6(t){return t&&(t.base||t.nodeType===1&&t)||null}var YA=function(t,e){return t(e)},XA=function(t,e){return t(e)},V6=lo,U6=io,Kt={useState:le,useId:zA,useReducer:ku,useEffect:ae,useLayoutEffect:Pi,useInsertionEffect:UA,useTransition:VA,useDeferredValue:WA,useSyncExternalStore:FA,startTransition:HA,useRef:Yt,useImperativeHandle:fi,useMemo:he,useCallback:me,useContext:eo,useDebugValue:Wp,version:"18.3.1",Children:ki,render:I6,hydrate:j6,unmountComponentAtNode:H6,createPortal:Vp,createElement:Re,createContext:uo,createFactory:z6,cloneElement:fo,createRef:a1,Fragment:lo,isValidElement:io,isElement:U6,isFragment:B6,isMemo:F6,findDOMNode:W6,Component:ii,PureComponent:Or,memo:Au,forwardRef:ye,flushSync:XA,unstable_batchedUpdates:YA,StrictMode:V6,Suspense:Wf,SuspenseList:jd,lazy:D6,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:$6};const Kl=Object.freeze(Object.defineProperty({__proto__:null,Children:ki,Component:ii,Fragment:lo,PureComponent:Or,StrictMode:V6,Suspense:Wf,SuspenseList:jd,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:$6,cloneElement:fo,createContext:uo,createElement:Re,createFactory:z6,createPortal:Vp,createRef:a1,default:Kt,findDOMNode:W6,flushSync:XA,forwardRef:ye,hydrate:j6,isElement:U6,isFragment:B6,isMemo:F6,isValidElement:io,lazy:D6,memo:Au,render:I6,startTransition:HA,unmountComponentAtNode:H6,unstable_batchedUpdates:YA,useCallback:me,useContext:eo,useDebugValue:Wp,useDeferredValue:WA,useEffect:ae,useErrorBoundary:ntt,useId:zA,useImperativeHandle:fi,useInsertionEffect:UA,useLayoutEffect:Pi,useMemo:he,useReducer:ku,useRef:Yt,useState:le,useSyncExternalStore:FA,useTransition:VA,version:s1},Symbol.toStringTag,{value:"Module"}));var sN=/[\s\n\\/='"\0<>]/,lN=/^(xlink|xmlns|xml)([A-Z])/,xtt=/^(?:accessK|auto[A-Z]|cell|ch|col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|popoverT|readO|rowS|src[A-Z]|tabI|useM|item[A-Z])/,wtt=/^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/,_tt=new Set(["draggable","spellcheck"]),Stt=/["&<]/;function I0(t){if(t.length===0||Stt.test(t)===!1)return t;for(var e=0,o=0,n="",i="";o<t.length;o++){switch(t.charCodeAt(o)){case 34:i=""";break;case 38:i="&";break;case 60:i="<";break;default:continue}o!==e&&(n+=t.slice(e,o)),n+=i,e=o+1}return o!==e&&(n+=t.slice(e,o)),n}var cN={},Ctt=new Set(["animation-iteration-count","border-image-outset","border-image-slice","border-image-width","box-flex","box-flex-group","box-ordinal-group","column-count","fill-opacity","flex","flex-grow","flex-negative","flex-order","flex-positive","flex-shrink","flood-opacity","font-weight","grid-column","grid-row","line-clamp","line-height","opacity","order","orphans","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","widows","z-index","zoom"]),Ttt=/[A-Z]/g;function Mtt(t){var e="";for(var o in t){var n=t[o];if(n!=null&&n!==""){var i=o[0]=="-"?o:cN[o]||(cN[o]=o.replace(Ttt,"-$&").toLowerCase()),r=";";typeof n!="number"||i.startsWith("--")||Ctt.has(i)||(r="px;"),e=e+i+":"+n+r}}return e||void 0}function uN(){this.__d=!0}function ktt(t,e){return{__v:t,context:e,props:t.props,setState:uN,forceUpdate:uN,__d:!0,__h:new Array(0)}}var P2,Bc,hm,yf,qA={},dN=[],bf=Array.isArray,O2=Object.assign,Yi="";function pN(t,e,o){var n=De.__s;De.__s=!0,P2=De.__b,Bc=De.diffed,hm=De.__r,yf=De.unmount;var i=Re(lo,null);i.__k=[t];try{var r=Qa(t,e||qA,!1,void 0,i,!1,o);return bf(r)?r.join(Yi):r}catch(a){throw a.then?new Error('Use "renderToStringAsync" for suspenseful rendering.'):a}finally{De.__c&&De.__c(t,dN),De.__s=n,dN.length=0}}function hN(t,e){var o,n=t.type,i=!0;return t.__c?(i=!1,(o=t.__c).state=o.__s):o=new n(t.props,e),t.__c=o,o.__v=t,o.props=t.props,o.context=e,o.__d=!0,o.state==null&&(o.state=qA),o.__s==null&&(o.__s=o.state),n.getDerivedStateFromProps?o.state=O2({},o.state,n.getDerivedStateFromProps(o.props,o.state)):i&&o.componentWillMount?(o.componentWillMount(),o.state=o.__s!==o.state?o.__s:o.state):!i&&o.componentWillUpdate&&o.componentWillUpdate(),hm&&hm(t),o.render(o.props,o.state,e)}function Qa(t,e,o,n,i,r,a){if(t==null||t===!0||t===!1||t===Yi)return Yi;var s=typeof t;if(s!="object")return s=="function"?Yi:s=="string"?I0(t):t+Yi;if(bf(t)){var l,d=Yi;i.__k=t;for(var b=t.length,C=0;C<b;C++){var u=t[C];if(u!=null&&typeof u!="boolean"){var j,A=Qa(u,e,o,n,i,r,a);typeof A=="string"?d+=A:(l||(l=new Array(b)),d&&l.push(d),d=Yi,bf(A)?(j=l).push.apply(j,A):l.push(A))}}return l?(d&&l.push(d),l):d}if(t.constructor!==void 0)return Yi;t.__=i,P2&&P2(t);var p=t.type,I=t.props;if(typeof p=="function"){var W,q,X,H=e;if(p===lo){if("tpl"in I){for(var D=Yi,$=0;$<I.tpl.length;$++)if(D+=I.tpl[$],I.exprs&&$<I.exprs.length){var z=I.exprs[$];if(z==null)continue;typeof z!="object"||z.constructor!==void 0&&!bf(z)?D+=z:D+=Qa(z,e,o,n,t,r,a)}return D}if("UNSTABLE_comment"in I)return"<!--"+I0(I.UNSTABLE_comment)+"-->";q=I.children}else{if((W=p.contextType)!=null){var N=e[W.__c];H=N?N.props.value:W.__}var V=p.prototype&&typeof p.prototype.render=="function";if(V)q=hN(t,H),X=t.__c;else{t.__c=X=ktt(t,H);for(var E=0;X.__d&&E++<25;)X.__d=!1,hm&&hm(t),q=p.call(X,I,H);X.__d=!0}if(X.getChildContext!=null&&(e=O2({},e,X.getChildContext())),V&&De.errorBoundaries&&(p.getDerivedStateFromError||X.componentDidCatch)){q=q!=null&&q.type===lo&&q.key==null&&q.props.tpl==null?q.props.children:q;try{return Qa(q,e,o,n,t,r,a)}catch(y){return p.getDerivedStateFromError&&(X.__s=p.getDerivedStateFromError(y)),X.componentDidCatch&&X.componentDidCatch(y,qA),X.__d?(q=hN(t,e),(X=t.__c).getChildContext!=null&&(e=O2({},e,X.getChildContext())),Qa(q=q!=null&&q.type===lo&&q.key==null&&q.props.tpl==null?q.props.children:q,e,o,n,t,r,a)):Yi}finally{Bc&&Bc(t),yf&&yf(t)}}}q=q!=null&&q.type===lo&&q.key==null&&q.props.tpl==null?q.props.children:q;try{var x=Qa(q,e,o,n,t,r,a);return Bc&&Bc(t),De.unmount&&De.unmount(t),x}catch(y){if(!r&&a&&a.onError){var g=a.onError(y,t,function(v,c){return Qa(v,e,o,n,c,r,a)});if(g!==void 0)return g;var S=De.__e;return S&&S(y,t),Yi}if(!r||!y||typeof y.then!="function")throw y;return y.then(function v(){try{return Qa(q,e,o,n,t,r,a)}catch(c){if(!c||typeof c.then!="function")throw c;return c.then(function(){return Qa(q,e,o,n,t,r,a)},v)}})}}var w,P="<"+p,U=Yi;for(var Z in I){var B=I[Z];if(typeof B!="function"||Z==="class"||Z==="className"){switch(Z){case"children":w=B;continue;case"key":case"ref":case"__self":case"__source":continue;case"htmlFor":if("for"in I)continue;Z="for";break;case"className":if("class"in I)continue;Z="class";break;case"defaultChecked":Z="checked";break;case"defaultSelected":Z="selected";break;case"defaultValue":case"value":switch(Z="value",p){case"textarea":w=B;continue;case"select":n=B;continue;case"option":n!=B||"selected"in I||(P+=" selected")}break;case"dangerouslySetInnerHTML":U=B&&B.__html;continue;case"style":typeof B=="object"&&(B=Mtt(B));break;case"acceptCharset":Z="accept-charset";break;case"httpEquiv":Z="http-equiv";break;default:if(lN.test(Z))Z=Z.replace(lN,"$1:$2").toLowerCase();else{if(sN.test(Z))continue;Z[4]!=="-"&&!_tt.has(Z)||B==null?o?wtt.test(Z)&&(Z=Z==="panose1"?"panose-1":Z.replace(/([A-Z])/g,"-$1").toLowerCase()):xtt.test(Z)&&(Z=Z.toLowerCase()):B+=Yi}}B!=null&&B!==!1&&(P=B===!0||B===Yi?P+" "+Z:P+" "+Z+'="'+(typeof B=="string"?I0(B):B+Yi)+'"')}}if(sN.test(p))throw new Error(p+" is not a valid HTML tag name in "+P+">");if(U||(typeof w=="string"?U=I0(w):w!=null&&w!==!1&&w!==!0&&(U=Qa(w,e,p==="svg"||p!=="foreignObject"&&o,n,t,r,a))),Bc&&Bc(t),yf&&yf(t),!U&&Att.has(p))return P+"/>";var k="</"+p+">",M=P+">";return bf(U)?[M].concat(U,[k]):typeof U!="string"?[M,U,k]:M+U+k}var Att=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);const G6={renderToString:pN,renderToStaticMarkup:pN};var Ett=Object.defineProperty,Ptt=Object.defineProperties,Ott=Object.getOwnPropertyDescriptors,Ry=Object.getOwnPropertySymbols,Y6=Object.prototype.hasOwnProperty,X6=Object.prototype.propertyIsEnumerable,xe=Math.pow,L2=(t,e,o)=>e in t?Ett(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,jt=(t,e)=>{for(var o in e||(e={}))Y6.call(e,o)&&L2(t,o,e[o]);if(Ry)for(var o of Ry(e))X6.call(e,o)&&L2(t,o,e[o]);return t},Zt=(t,e)=>Ptt(t,Ott(e)),ja=(t,e)=>{var o={};for(var n in t)Y6.call(t,n)&&e.indexOf(n)<0&&(o[n]=t[n]);if(t!=null&&Ry)for(var n of Ry(t))e.indexOf(n)<0&&X6.call(t,n)&&(o[n]=t[n]);return o},fN=(t,e,o)=>(L2(t,typeof e!="symbol"?e+"":e,o),o),$d=(t,e,o)=>new Promise((n,i)=>{var r=l=>{try{s(o.next(l))}catch(d){i(d)}},a=l=>{try{s(o.throw(l))}catch(d){i(d)}},s=l=>l.done?n(l.value):Promise.resolve(l.value).then(r,a);s((o=o.apply(t,e)).next())});const Ltt={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console&&console[t]&&console[t].apply(console,e)}};let Ntt=class N2{constructor(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,o)}init(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=o.prefix||"i18next:",this.logger=e||Ltt,this.options=o,this.debug=o.debug}log(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return this.forward(o,"log","",!0)}warn(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return this.forward(o,"warn","",!0)}error(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return this.forward(o,"error","")}deprecate(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return this.forward(o,"warn","WARNING DEPRECATED: ",!0)}forward(e,o,n,i){return i&&!this.debug?null:(typeof e[0]=="string"&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[o](e))}create(e){return new N2(this.logger,jt({prefix:`${this.prefix}:${e}:`},this.options))}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new N2(this.logger,e)}};var ms=new Ntt;class l1{constructor(){this.observers={}}on(e,o){return e.split(" ").forEach(n=>{this.observers[n]=this.observers[n]||[],this.observers[n].push(o)}),this}off(e,o){if(this.observers[e]){if(!o){delete this.observers[e];return}this.observers[e]=this.observers[e].filter(n=>n!==o)}}emit(e){for(var o=arguments.length,n=new Array(o>1?o-1:0),i=1;i<o;i++)n[i-1]=arguments[i];this.observers[e]&&[].concat(this.observers[e]).forEach(r=>{r(...n)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(r=>{r.apply(r,[e,...n])})}}function Nh(){let t,e;const o=new Promise((n,i)=>{t=n,e=i});return o.resolve=t,o.reject=e,o}function mN(t){return t==null?"":""+t}function Dtt(t,e,o){t.forEach(n=>{e[n]&&(o[n]=e[n])})}function ZA(t,e,o){function n(a){return a&&a.indexOf("###")>-1?a.replace(/###/g,"."):a}function i(){return!t||typeof t=="string"}const r=typeof e!="string"?[].concat(e):e.split(".");for(;r.length>1;){if(i())return{};const a=n(r.shift());!t[a]&&o&&(t[a]=new o),Object.prototype.hasOwnProperty.call(t,a)?t=t[a]:t={}}return i()?{}:{obj:t,k:n(r.shift())}}function gN(t,e,o){const{obj:n,k:i}=ZA(t,e,Object);n[i]=o}function Rtt(t,e,o,n){const{obj:i,k:r}=ZA(t,e,Object);i[r]=i[r]||[],i[r].push(o)}function Iy(t,e){const{obj:o,k:n}=ZA(t,e);if(o)return o[n]}function Itt(t,e,o){const n=Iy(t,o);return n!==void 0?n:Iy(e,o)}function q6(t,e,o){for(const n in e)n!=="__proto__"&&n!=="constructor"&&(n in t?typeof t[n]=="string"||t[n]instanceof String||typeof e[n]=="string"||e[n]instanceof String?o&&(t[n]=e[n]):q6(t[n],e[n],o):t[n]=e[n]);return t}function od(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var jtt={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function $tt(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,e=>jtt[e]):t}const ztt=[" ",",","?","!",";"];function Btt(t,e,o){e=e||"",o=o||"";const n=ztt.filter(a=>e.indexOf(a)<0&&o.indexOf(a)<0);if(n.length===0)return!0;const i=new RegExp(`(${n.map(a=>a==="?"?"\\?":a).join("|")})`);let r=!i.test(t);if(!r){const a=t.indexOf(o);a>0&&!i.test(t.substring(0,a))&&(r=!0)}return r}function jy(t,e){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[e])return t[e];const n=e.split(o);let i=t;for(let r=0;r<n.length;++r){if(!i||typeof i[n[r]]=="string"&&r+1<n.length)return;if(i[n[r]]===void 0){let a=2,s=n.slice(r,r+a).join(o),l=i[s];for(;l===void 0&&n.length>r+a;)a++,s=n.slice(r,r+a).join(o),l=i[s];if(l===void 0)return;if(l===null)return null;if(e.endsWith(s)){if(typeof l=="string")return l;if(s&&typeof l[s]=="string")return l[s]}const d=n.slice(r+a).join(o);return d?jy(l,d,o):void 0}i=i[n[r]]}return i}function $y(t){return t&&t.indexOf("_")>0?t.replace("_","-"):t}let vN=class extends l1{constructor(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=o,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const o=this.options.ns.indexOf(e);o>-1&&this.options.ns.splice(o,1)}getResource(e,o,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const r=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,a=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let s=[e,o];n&&typeof n!="string"&&(s=s.concat(n)),n&&typeof n=="string"&&(s=s.concat(r?n.split(r):n)),e.indexOf(".")>-1&&(s=e.split("."));const l=Iy(this.data,s);return l||!a||typeof n!="string"?l:jy(this.data&&this.data[e]&&this.data[e][o],n,r)}addResource(e,o,n,i){let r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let s=[e,o];n&&(s=s.concat(a?n.split(a):n)),e.indexOf(".")>-1&&(s=e.split("."),i=o,o=s[1]),this.addNamespaces(o),gN(this.data,s,i),r.silent||this.emit("added",e,o,n,i)}addResources(e,o,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const r in n)(typeof n[r]=="string"||Object.prototype.toString.apply(n[r])==="[object Array]")&&this.addResource(e,o,r,n[r],{silent:!0});i.silent||this.emit("added",e,o,n)}addResourceBundle(e,o,n,i,r){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},s=[e,o];e.indexOf(".")>-1&&(s=e.split("."),i=n,n=o,o=s[1]),this.addNamespaces(o);let l=Iy(this.data,s)||{};i?q6(l,n,r):l=jt(jt({},l),n),gN(this.data,s,l),a.silent||this.emit("added",e,o,n)}removeResourceBundle(e,o){this.hasResourceBundle(e,o)&&delete this.data[e][o],this.removeNamespaces(o),this.emit("removed",e,o)}hasResourceBundle(e,o){return this.getResource(e,o)!==void 0}getResourceBundle(e,o){return o||(o=this.options.defaultNS),this.options.compatibilityAPI==="v1"?jt({},this.getResource(e,o)):this.getResource(e,o)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const o=this.getDataByLanguage(e);return!!(o&&Object.keys(o)||[]).find(n=>o[n]&&Object.keys(o[n]).length>0)}toJSON(){return this.data}};var Z6={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,o,n,i){return t.forEach(r=>{this.processors[r]&&(e=this.processors[r].process(e,o,n,i))}),e}};const yN={};let bN=class K6 extends l1{constructor(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Dtt(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=o,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ms.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const n=this.resolve(e,o);return n&&n.res!==void 0}extractFromKey(e,o){let n=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let r=o.ns||this.options.defaultNS||[];const a=n&&e.indexOf(n)>-1,s=!this.options.userDefinedKeySeparator&&!o.keySeparator&&!this.options.userDefinedNsSeparator&&!o.nsSeparator&&!Btt(e,n,i);if(a&&!s){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:r};const d=e.split(n);(n!==i||n===i&&this.options.ns.indexOf(d[0])>-1)&&(r=d.shift()),e=d.join(i)}return typeof r=="string"&&(r=[r]),{key:e,namespaces:r}}translate(e,o,n){if(typeof o!="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),typeof o=="object"&&(o=jt({},o)),o||(o={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const i=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,r=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(e[e.length-1],o),l=s[s.length-1],d=o.lng||this.language,b=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&d.toLowerCase()==="cimode"){if(b){const X=o.nsSeparator||this.options.nsSeparator;return i?{res:`${l}${X}${a}`,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:l}:`${l}${X}${a}`}return i?{res:a,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:l}:a}const C=this.resolve(e,o);let u=C&&C.res;const j=C&&C.usedKey||a,A=C&&C.exactUsedKey||a,p=Object.prototype.toString.apply(u),I=["[object Number]","[object Function]","[object RegExp]"],W=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,q=!this.i18nFormat||this.i18nFormat.handleAsObject;if(q&&u&&typeof u!="string"&&typeof u!="boolean"&&typeof u!="number"&&I.indexOf(p)<0&&!(typeof W=="string"&&p==="[object Array]")){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const X=this.options.returnedObjectHandler?this.options.returnedObjectHandler(j,u,Zt(jt({},o),{ns:s})):`key '${a} (${this.language})' returned an object instead of string.`;return i?(C.res=X,C):X}if(r){const X=p==="[object Array]",H=X?[]:{},D=X?A:j;for(const $ in u)if(Object.prototype.hasOwnProperty.call(u,$)){const z=`${D}${r}${$}`;H[$]=this.translate(z,Zt(jt({},o),{joinArrays:!1,ns:s})),H[$]===z&&(H[$]=u[$])}u=H}}else if(q&&typeof W=="string"&&p==="[object Array]")u=u.join(W),u&&(u=this.extendTranslation(u,e,o,n));else{let X=!1,H=!1;const D=o.count!==void 0&&typeof o.count!="string",$=K6.hasDefaultValue(o),z=D?this.pluralResolver.getSuffix(d,o.count,o):"",N=o.ordinal&&D?this.pluralResolver.getSuffix(d,o.count,{ordinal:!1}):"",V=o[`defaultValue${z}`]||o[`defaultValue${N}`]||o.defaultValue;!this.isValidLookup(u)&&$&&(X=!0,u=V),this.isValidLookup(u)||(H=!0,u=a);const E=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&H?void 0:u,x=$&&V!==u&&this.options.updateMissing;if(H||X||x){if(this.logger.log(x?"updateKey":"missingKey",d,l,a,x?V:u),r){const P=this.resolve(a,Zt(jt({},o),{keySeparator:!1}));P&&P.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let g=[];const S=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&S&&S[0])for(let P=0;P<S.length;P++)g.push(S[P]);else this.options.saveMissingTo==="all"?g=this.languageUtils.toResolveHierarchy(o.lng||this.language):g.push(o.lng||this.language);const w=(P,U,Z)=>{const B=$&&Z!==u?Z:E;this.options.missingKeyHandler?this.options.missingKeyHandler(P,l,U,B,x,o):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(P,l,U,B,x,o),this.emit("missingKey",P,l,U,u)};this.options.saveMissing&&(this.options.saveMissingPlurals&&D?g.forEach(P=>{this.pluralResolver.getSuffixes(P,o).forEach(U=>{w([P],a+U,o[`defaultValue${U}`]||V)})}):w(g,a,V))}u=this.extendTranslation(u,e,o,C,n),H&&u===a&&this.options.appendNamespaceToMissingKey&&(u=`${l}:${a}`),(H||X)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?u=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${a}`:a,X?u:void 0):u=this.options.parseMissingKeyHandler(u))}return i?(C.res=u,C):u}extendTranslation(e,o,n,i,r){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,jt(jt({},this.options.interpolation.defaultVariables),n),i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(Zt(jt({},n),{interpolation:jt(jt({},this.options.interpolation),n.interpolation)}));const d=typeof e=="string"&&(n&&n.interpolation&&n.interpolation.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let b;if(d){const u=e.match(this.interpolator.nestingRegexp);b=u&&u.length}let C=n.replace&&typeof n.replace!="string"?n.replace:n;if(this.options.interpolation.defaultVariables&&(C=jt(jt({},this.options.interpolation.defaultVariables),C)),e=this.interpolator.interpolate(e,C,n.lng||this.language,n),d){const u=e.match(this.interpolator.nestingRegexp),j=u&&u.length;b<j&&(n.nest=!1)}!n.lng&&this.options.compatibilityAPI!=="v1"&&i&&i.res&&(n.lng=i.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var u=arguments.length,j=new Array(u),A=0;A<u;A++)j[A]=arguments[A];return r&&r[0]===j[0]&&!n.context?(a.logger.warn(`It seems you are nesting recursively key: ${j[0]} in key: ${o[0]}`),null):a.translate(...j,o)},n)),n.interpolation&&this.interpolator.reset()}const s=n.postProcess||this.options.postProcess,l=typeof s=="string"?[s]:s;return e!=null&&l&&l.length&&n.applyPostProcessor!==!1&&(e=Z6.handle(l,e,o,this.options&&this.options.postProcessPassResolved?jt({i18nResolved:i},n):n,this)),e}resolve(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,i,r,a,s;return typeof e=="string"&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(n))return;const d=this.extractFromKey(l,o),b=d.key;i=b;let C=d.namespaces;this.options.fallbackNS&&(C=C.concat(this.options.fallbackNS));const u=o.count!==void 0&&typeof o.count!="string",j=u&&!o.ordinal&&o.count===0&&this.pluralResolver.shouldUseIntlApi(),A=o.context!==void 0&&(typeof o.context=="string"||typeof o.context=="number")&&o.context!=="",p=o.lngs?o.lngs:this.languageUtils.toResolveHierarchy(o.lng||this.language,o.fallbackLng);C.forEach(I=>{this.isValidLookup(n)||(s=I,!yN[`${p[0]}-${I}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(s)&&(yN[`${p[0]}-${I}`]=!0,this.logger.warn(`key "${i}" for languages "${p.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach(W=>{if(this.isValidLookup(n))return;a=W;const q=[b];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(q,b,W,I,o);else{let H;u&&(H=this.pluralResolver.getSuffix(W,o.count,o));const D=`${this.options.pluralSeparator}zero`,$=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(q.push(b+H),o.ordinal&&H.indexOf($)===0&&q.push(b+H.replace($,this.options.pluralSeparator)),j&&q.push(b+D)),A){const z=`${b}${this.options.contextSeparator}${o.context}`;q.push(z),u&&(q.push(z+H),o.ordinal&&H.indexOf($)===0&&q.push(z+H.replace($,this.options.pluralSeparator)),j&&q.push(z+D))}}let X;for(;X=q.pop();)this.isValidLookup(n)||(r=X,n=this.getResource(W,I,X,o))}))})}),{res:n,usedKey:i,exactUsedKey:r,usedLng:a,usedNS:s}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,o,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,o,n,i):this.resourceStore.getResource(e,o,n,i)}static hasDefaultValue(e){const o="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&o===n.substring(0,o.length)&&e[n]!==void 0)return!0;return!1}};function T_(t){return t.charAt(0).toUpperCase()+t.slice(1)}let xN=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ms.create("languageUtils")}getScriptPartFromCode(e){if(e=$y(e),!e||e.indexOf("-")<0)return null;const o=e.split("-");return o.length===2||(o.pop(),o[o.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(o.join("-"))}getLanguagePartFromCode(e){if(e=$y(e),!e||e.indexOf("-")<0)return e;const o=e.split("-");return this.formatLanguageCode(o[0])}formatLanguageCode(e){if(typeof e=="string"&&e.indexOf("-")>-1){const o=["hans","hant","latn","cyrl","cans","mong","arab"];let n=e.split("-");return this.options.lowerCaseLng?n=n.map(i=>i.toLowerCase()):n.length===2?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),o.indexOf(n[1].toLowerCase())>-1&&(n[1]=T_(n[1].toLowerCase()))):n.length===3&&(n[0]=n[0].toLowerCase(),n[1].length===2&&(n[1]=n[1].toUpperCase()),n[0]!=="sgn"&&n[2].length===2&&(n[2]=n[2].toUpperCase()),o.indexOf(n[1].toLowerCase())>-1&&(n[1]=T_(n[1].toLowerCase())),o.indexOf(n[2].toLowerCase())>-1&&(n[2]=T_(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let o;return e.forEach(n=>{if(o)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(o=i)}),!o&&this.options.supportedLngs&&e.forEach(n=>{if(o)return;const i=this.getLanguagePartFromCode(n);if(this.isSupportedCode(i))return o=i;o=this.options.supportedLngs.find(r=>{if(r===i||!(r.indexOf("-")<0&&i.indexOf("-")<0)&&r.indexOf(i)===0)return r})}),o||(o=this.getFallbackCodes(this.options.fallbackLng)[0]),o}getFallbackCodes(e,o){if(!e)return[];if(typeof e=="function"&&(e=e(o)),typeof e=="string"&&(e=[e]),Object.prototype.toString.apply(e)==="[object Array]")return e;if(!o)return e.default||[];let n=e[o];return n||(n=e[this.getScriptPartFromCode(o)]),n||(n=e[this.formatLanguageCode(o)]),n||(n=e[this.getLanguagePartFromCode(o)]),n||(n=e.default),n||[]}toResolveHierarchy(e,o){const n=this.getFallbackCodes(o||this.options.fallbackLng||[],e),i=[],r=a=>{a&&(this.isSupportedCode(a)?i.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return typeof e=="string"&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&r(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&r(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&r(this.getLanguagePartFromCode(e))):typeof e=="string"&&r(this.formatLanguageCode(e)),n.forEach(a=>{i.indexOf(a)<0&&r(this.formatLanguageCode(a))}),i}},Ftt=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Htt={1:function(t){return+(t>1)},2:function(t){return+(t!=1)},3:function(t){return 0},4:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},5:function(t){return t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5},6:function(t){return t==1?0:t>=2&&t<=4?1:2},7:function(t){return t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},8:function(t){return t==1?0:t==2?1:t!=8&&t!=11?2:3},9:function(t){return+(t>=2)},10:function(t){return t==1?0:t==2?1:t<7?2:t<11?3:4},11:function(t){return t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3},12:function(t){return+(t%10!=1||t%100==11)},13:function(t){return+(t!==0)},14:function(t){return t==1?0:t==2?1:t==3?2:3},15:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2},16:function(t){return t%10==1&&t%100!=11?0:t!==0?1:2},17:function(t){return t==1||t%10==1&&t%100!=11?0:1},18:function(t){return t==0?0:t==1?1:2},19:function(t){return t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3},20:function(t){return t==1?0:t==0||t%100>0&&t%100<20?1:2},21:function(t){return t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0},22:function(t){return t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3}};const Wtt=["v1","v2","v3"],Vtt=["v4"],wN={zero:0,one:1,two:2,few:3,many:4,other:5};function Utt(){const t={};return Ftt.forEach(e=>{e.lngs.forEach(o=>{t[o]={numbers:e.nr,plurals:Htt[e.fc]}})}),t}let Gtt=class{constructor(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=o,this.logger=ms.create("pluralResolver"),(!this.options.compatibilityJSON||Vtt.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Utt()}addRule(e,o){this.rules[e]=o}getRule(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules($y(e),{type:o.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(e,o);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,o){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,n).map(i=>`${o}${i}`)}getSuffixes(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(e,o);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((i,r)=>wN[i]-wN[r]).map(i=>`${this.options.prepend}${o.ordinal?`ordinal${this.options.prepend}`:""}${i}`):n.numbers.map(i=>this.getSuffix(e,i,o)):[]}getSuffix(e,o){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(e,n);return i?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(o)}`:this.getSuffixRetroCompatible(i,o):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,o){const n=e.noAbs?e.plurals(o):e.plurals(Math.abs(o));let i=e.numbers[n];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const r=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:r():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?r():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!Wtt.includes(this.options.compatibilityJSON)}};function _N(t,e,o){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,r=Itt(t,e,o);return!r&&i&&typeof o=="string"&&(r=jy(t,o,n),r===void 0&&(r=jy(e,o,n))),r}let Ytt=class{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ms.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(o=>o),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const o=e.interpolation;this.escape=o.escape!==void 0?o.escape:$tt,this.escapeValue=o.escapeValue!==void 0?o.escapeValue:!0,this.useRawValueToEscape=o.useRawValueToEscape!==void 0?o.useRawValueToEscape:!1,this.prefix=o.prefix?od(o.prefix):o.prefixEscaped||"{{",this.suffix=o.suffix?od(o.suffix):o.suffixEscaped||"}}",this.formatSeparator=o.formatSeparator?o.formatSeparator:o.formatSeparator||",",this.unescapePrefix=o.unescapeSuffix?"":o.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":o.unescapeSuffix||"",this.nestingPrefix=o.nestingPrefix?od(o.nestingPrefix):o.nestingPrefixEscaped||od("$t("),this.nestingSuffix=o.nestingSuffix?od(o.nestingSuffix):o.nestingSuffixEscaped||od(")"),this.nestingOptionsSeparator=o.nestingOptionsSeparator?o.nestingOptionsSeparator:o.nestingOptionsSeparator||",",this.maxReplaces=o.maxReplaces?o.maxReplaces:1e3,this.alwaysFormat=o.alwaysFormat!==void 0?o.alwaysFormat:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=`${this.prefix}(.+?)${this.suffix}`;this.regexp=new RegExp(e,"g");const o=`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;this.regexpUnescape=new RegExp(o,"g");const n=`${this.nestingPrefix}(.+?)${this.nestingSuffix}`;this.nestingRegexp=new RegExp(n,"g")}interpolate(e,o,n,i){let r,a,s;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function d(j){return j.replace(/\$/g,"$$$$")}const b=j=>{if(j.indexOf(this.formatSeparator)<0){const W=_N(o,l,j,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(W,void 0,n,Zt(jt(jt({},i),o),{interpolationkey:j})):W}const A=j.split(this.formatSeparator),p=A.shift().trim(),I=A.join(this.formatSeparator).trim();return this.format(_N(o,l,p,this.options.keySeparator,this.options.ignoreJSONStructure),I,n,Zt(jt(jt({},i),o),{interpolationkey:p}))};this.resetRegExp();const C=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,u=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:j=>d(j)},{regex:this.regexp,safeValue:j=>this.escapeValue?d(this.escape(j)):d(j)}].forEach(j=>{for(s=0;r=j.regex.exec(e);){const A=r[1].trim();if(a=b(A),a===void 0)if(typeof C=="function"){const I=C(e,r,i);a=typeof I=="string"?I:""}else if(i&&Object.prototype.hasOwnProperty.call(i,A))a="";else if(u){a=r[0];continue}else this.logger.warn(`missed to pass in variable ${A} for interpolating ${e}`),a="";else typeof a!="string"&&!this.useRawValueToEscape&&(a=mN(a));const p=j.safeValue(a);if(e=e.replace(r[0],p),u?(j.regex.lastIndex+=a.length,j.regex.lastIndex-=r[0].length):j.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),e}nest(e,o){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,r,a;function s(l,d){const b=this.nestingOptionsSeparator;if(l.indexOf(b)<0)return l;const C=l.split(new RegExp(`${b}[ ]*{`));let u=`{${C[1]}`;l=C[0],u=this.interpolate(u,a);const j=u.match(/'/g),A=u.match(/"/g);(j&&j.length%2===0&&!A||A.length%2!==0)&&(u=u.replace(/'/g,'"'));try{a=JSON.parse(u),d&&(a=jt(jt({},d),a))}catch(p){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,p),`${l}${b}${u}`}return delete a.defaultValue,l}for(;i=this.nestingRegexp.exec(e);){let l=[];a=jt({},n),a=a.replace&&typeof a.replace!="string"?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let d=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const b=i[1].split(this.formatSeparator).map(C=>C.trim());i[1]=b.shift(),l=b,d=!0}if(r=o(s.call(this,i[1].trim(),a),a),r&&i[0]===e&&typeof r!="string")return r;typeof r!="string"&&(r=mN(r)),r||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),r=""),d&&(r=l.reduce((b,C)=>this.format(b,C,n.lng,Zt(jt({},n),{interpolationkey:i[1].trim()})),r.trim())),e=e.replace(i[0],r),this.regexp.lastIndex=0}return e}};function Xtt(t){let e=t.toLowerCase().trim();const o={};if(t.indexOf("(")>-1){const n=t.split("(");e=n[0].toLowerCase().trim();const i=n[1].substring(0,n[1].length-1);e==="currency"&&i.indexOf(":")<0?o.currency||(o.currency=i.trim()):e==="relativetime"&&i.indexOf(":")<0?o.range||(o.range=i.trim()):i.split(";").forEach(r=>{if(!r)return;const[a,...s]=r.split(":"),l=s.join(":").trim().replace(/^'+|'+$/g,"");o[a.trim()]||(o[a.trim()]=l),l==="false"&&(o[a.trim()]=!1),l==="true"&&(o[a.trim()]=!0),isNaN(l)||(o[a.trim()]=parseInt(l,10))})}return{formatName:e,formatOptions:o}}function nd(t){const e={};return function(o,n,i){const r=n+JSON.stringify(i);let a=e[r];return a||(a=t($y(n),i),e[r]=a),a(o)}}let qtt=class{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ms.create("formatter"),this.options=e,this.formats={number:nd((o,n)=>{const i=new Intl.NumberFormat(o,jt({},n));return r=>i.format(r)}),currency:nd((o,n)=>{const i=new Intl.NumberFormat(o,Zt(jt({},n),{style:"currency"}));return r=>i.format(r)}),datetime:nd((o,n)=>{const i=new Intl.DateTimeFormat(o,jt({},n));return r=>i.format(r)}),relativetime:nd((o,n)=>{const i=new Intl.RelativeTimeFormat(o,jt({},n));return r=>i.format(r,n.range||"day")}),list:nd((o,n)=>{const i=new Intl.ListFormat(o,jt({},n));return r=>i.format(r)})},this.init(e)}init(e){const o=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=o.formatSeparator?o.formatSeparator:o.formatSeparator||","}add(e,o){this.formats[e.toLowerCase().trim()]=o}addCached(e,o){this.formats[e.toLowerCase().trim()]=nd(o)}format(e,o,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return o.split(this.formatSeparator).reduce((r,a)=>{const{formatName:s,formatOptions:l}=Xtt(a);if(this.formats[s]){let d=r;try{const b=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},C=b.locale||b.lng||i.locale||i.lng||n;d=this.formats[s](r,C,jt(jt(jt({},l),i),b))}catch(b){this.logger.warn(b)}return d}else this.logger.warn(`there was no format function for ${s}`);return r},e)}};function Ztt(t,e){t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)}let Ktt=class extends l1{constructor(e,o,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=o,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=ms.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,i.backend,i)}queueLoad(e,o,n,i){const r={},a={},s={},l={};return e.forEach(d=>{let b=!0;o.forEach(C=>{const u=`${d}|${C}`;!n.reload&&this.store.hasResourceBundle(d,C)?this.state[u]=2:this.state[u]<0||(this.state[u]===1?a[u]===void 0&&(a[u]=!0):(this.state[u]=1,b=!1,a[u]===void 0&&(a[u]=!0),r[u]===void 0&&(r[u]=!0),l[C]===void 0&&(l[C]=!0)))}),b||(s[d]=!0)}),(Object.keys(r).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(r),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}loaded(e,o,n){const i=e.split("|"),r=i[0],a=i[1];o&&this.emit("failedLoading",r,a,o),n&&this.store.addResourceBundle(r,a,n),this.state[e]=o?-1:2;const s={};this.queue.forEach(l=>{Rtt(l.loaded,[r],a),Ztt(l,e),o&&l.errors.push(o),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(d=>{s[d]||(s[d]={});const b=l.loaded[d];b.length&&b.forEach(C=>{s[d][C]===void 0&&(s[d][C]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(l=>!l.done)}read(e,o,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:o,fcName:n,tried:i,wait:r,callback:a});return}this.readingCalls++;const s=(d,b)=>{if(this.readingCalls--,this.waitingReads.length>0){const C=this.waitingReads.shift();this.read(C.lng,C.ns,C.fcName,C.tried,C.wait,C.callback)}if(d&&b&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,e,o,n,i+1,r*2,a)},r);return}a(d,b)},l=this.backend[n].bind(this.backend);if(l.length===2){try{const d=l(e,o);d&&typeof d.then=="function"?d.then(b=>s(null,b)).catch(s):s(null,d)}catch(d){s(d)}return}return l(e,o,s)}prepareLoading(e,o){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();typeof e=="string"&&(e=this.languageUtils.toResolveHierarchy(e)),typeof o=="string"&&(o=[o]);const r=this.queueLoad(e,o,n,i);if(!r.toLoad.length)return r.pending.length||i(),null;r.toLoad.forEach(a=>{this.loadOne(a)})}load(e,o,n){this.prepareLoading(e,o,{},n)}reload(e,o,n){this.prepareLoading(e,o,{reload:!0},n)}loadOne(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const n=e.split("|"),i=n[0],r=n[1];this.read(i,r,"read",void 0,void 0,(a,s)=>{a&&this.logger.warn(`${o}loading namespace ${r} for language ${i} failed`,a),!a&&s&&this.logger.log(`${o}loaded namespace ${r} for language ${i}`,s),this.loaded(e,a,s)})}saveMissing(e,o,n,i,r){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(o)){this.logger.warn(`did not save key "${n}" as the namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if(this.backend&&this.backend.create){const l=Zt(jt({},a),{isUpdate:r}),d=this.backend.create.bind(this.backend);if(d.length<6)try{let b;d.length===5?b=d(e,o,n,i,l):b=d(e,o,n,i),b&&typeof b.then=="function"?b.then(C=>s(null,C)).catch(s):s(null,b)}catch(b){s(b)}else d(e,o,n,i,s,l)}!e||!e[0]||this.store.addResource(e[0],o,n,i)}}};function SN(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){let e={};if(typeof t[1]=="object"&&(e=t[1]),typeof t[1]=="string"&&(e.defaultValue=t[1]),typeof t[2]=="string"&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const o=t[3]||t[2];Object.keys(o).forEach(n=>{e[n]=o[n]})}return e},interpolation:{escapeValue:!0,format:(t,e,o,n)=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function CN(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function j0(){}function Jtt(t){Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(e=>{typeof t[e]=="function"&&(t[e]=t[e].bind(t))})}let J6=class D2 extends l1{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(super(),this.options=CN(e),this.services={},this.logger=ms,this.modules={external:[]},Jtt(this),o&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,o),this;setTimeout(()=>{this.init(e,o)},0)}}init(){var e=this;let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;typeof o=="function"&&(n=o,o={}),!o.defaultNS&&o.defaultNS!==!1&&o.ns&&(typeof o.ns=="string"?o.defaultNS=o.ns:o.ns.indexOf("translation")<0&&(o.defaultNS=o.ns[0]));const i=SN();this.options=jt(jt(jt({},i),this.options),CN(o)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=jt(jt({},i.interpolation),this.options.interpolation)),o.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=o.keySeparator),o.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=o.nsSeparator);function r(l){return l?typeof l=="function"?new l:l:null}if(!this.options.isClone){this.modules.logger?ms.init(r(this.modules.logger),this.options):ms.init(null,this.options);let l;this.modules.formatter?l=this.modules.formatter:typeof Intl<"u"&&(l=qtt);const d=new xN(this.options);this.store=new vN(this.options.resources,this.options);const b=this.services;b.logger=ms,b.resourceStore=this.store,b.languageUtils=d,b.pluralResolver=new Gtt(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),l&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(b.formatter=r(l),b.formatter.init(b,this.options),this.options.interpolation.format=b.formatter.format.bind(b.formatter)),b.interpolator=new Ytt(this.options),b.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},b.backendConnector=new Ktt(r(this.modules.backend),b.resourceStore,b,this.options),b.backendConnector.on("*",function(C){for(var u=arguments.length,j=new Array(u>1?u-1:0),A=1;A<u;A++)j[A-1]=arguments[A];e.emit(C,...j)}),this.modules.languageDetector&&(b.languageDetector=r(this.modules.languageDetector),b.languageDetector.init&&b.languageDetector.init(b,this.options.detection,this.options)),this.modules.i18nFormat&&(b.i18nFormat=r(this.modules.i18nFormat),b.i18nFormat.init&&b.i18nFormat.init(this)),this.translator=new bN(this.services,this.options),this.translator.on("*",function(C){for(var u=arguments.length,j=new Array(u>1?u-1:0),A=1;A<u;A++)j[A-1]=arguments[A];e.emit(C,...j)}),this.modules.external.forEach(C=>{C.init&&C.init(this)})}if(this.format=this.options.interpolation.format,n||(n=j0),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&l[0]!=="dev"&&(this.options.lng=l[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(l=>{this[l]=function(){return e.store[l](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(l=>{this[l]=function(){return e.store[l](...arguments),e}});const a=Nh(),s=()=>{const l=(d,b)=>{this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(b),n(d,b)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return l(null,this.t.bind(this));this.changeLanguage(this.options.lng,l)};return this.options.resources||!this.options.initImmediate?s():setTimeout(s,0),a}loadResources(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:j0;const n=typeof e=="string"?e:this.language;if(typeof e=="function"&&(o=e),!this.options.resources||this.options.partialBundledLanguages){if(n&&n.toLowerCase()==="cimode")return o();const i=[],r=a=>{a&&this.services.languageUtils.toResolveHierarchy(a).forEach(s=>{i.indexOf(s)<0&&i.push(s)})};n?r(n):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(a=>r(a)),this.options.preload&&this.options.preload.forEach(a=>r(a)),this.services.backendConnector.load(i,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),o(a)})}else o(null)}reloadResources(e,o,n){const i=Nh();return e||(e=this.languages),o||(o=this.options.ns),n||(n=j0),this.services.backendConnector.reload(e,o,r=>{i.resolve(),n(r)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&Z6.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let o=0;o<this.languages.length;o++){const n=this.languages[o];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(e,o){var n=this;this.isLanguageChangingTo=e;const i=Nh();this.emit("languageChanging",e);const r=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},a=(l,d)=>{d?(r(d),this.translator.changeLanguage(d),this.isLanguageChangingTo=void 0,this.emit("languageChanged",d),this.logger.log("languageChanged",d)):this.isLanguageChangingTo=void 0,i.resolve(function(){return n.t(...arguments)}),o&&o(l,function(){return n.t(...arguments)})},s=l=>{!e&&!l&&this.services.languageDetector&&(l=[]);const d=typeof l=="string"?l:this.services.languageUtils.getBestMatchFromCodes(l);d&&(this.language||r(d),this.translator.language||this.translator.changeLanguage(d),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(d)),this.loadResources(d,b=>{a(b,d)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(e),i}getFixedT(e,o,n){var i=this;const r=function(a,s){let l;if(typeof s!="object"){for(var d=arguments.length,b=new Array(d>2?d-2:0),C=2;C<d;C++)b[C-2]=arguments[C];l=i.options.overloadTranslationOptionHandler([a,s].concat(b))}else l=jt({},s);l.lng=l.lng||r.lng,l.lngs=l.lngs||r.lngs,l.ns=l.ns||r.ns,l.keyPrefix=l.keyPrefix||n||r.keyPrefix;const u=i.options.keySeparator||".";let j;return l.keyPrefix&&Array.isArray(a)?j=a.map(A=>`${l.keyPrefix}${u}${A}`):j=l.keyPrefix?`${l.keyPrefix}${u}${a}`:a,i.t(j,l)};return typeof e=="string"?r.lng=e:r.lngs=e,r.ns=o,r.keyPrefix=n,r}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=o.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,r=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const a=(s,l)=>{const d=this.services.backendConnector.state[`${s}|${l}`];return d===-1||d===2};if(o.precheck){const s=o.precheck(this,a);if(s!==void 0)return s}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!i||a(r,e)))}loadNamespaces(e,o){const n=Nh();return this.options.ns?(typeof e=="string"&&(e=[e]),e.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),o&&o(i)}),n):(o&&o(),Promise.resolve())}loadLanguages(e,o){const n=Nh();typeof e=="string"&&(e=[e]);const i=this.options.preload||[],r=e.filter(a=>i.indexOf(a)<0);return r.length?(this.options.preload=i.concat(r),this.loadResources(a=>{n.resolve(),o&&o(a)}),n):(o&&o(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const o=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=this.services&&this.services.languageUtils||new xN(SN());return o.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;return new D2(e,o)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:j0;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const i=Zt(jt(jt({},this.options),e),{isClone:!0}),r=new D2(i);return(e.debug!==void 0||e.prefix!==void 0)&&(r.logger=r.logger.clone(e)),["store","services","language"].forEach(a=>{r[a]=this[a]}),r.services=jt({},this.services),r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},n&&(r.store=new vN(this.store.data,i),r.services.resourceStore=r.store),r.translator=new bN(r.services,i),r.translator.on("*",function(a){for(var s=arguments.length,l=new Array(s>1?s-1:0),d=1;d<s;d++)l[d-1]=arguments[d];r.emit(a,...l)}),r.init(i,o),r.translator.options=i,r.translator.backendConnector.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}};const Q6=J6.createInstance();Q6.createInstance=J6.createInstance;const Qtt={error:"Error"},tet={error:"Помилка"},TN="common",eet={en:Qtt,uk:tet},os=Q6.createInstance({defaultNS:TN,resources:oet(eet,TN),lng:"en",fallbackLng:"en"}),KA={i18nextInstance:os,initPromise:os.init().then(()=>os)},qv=new Map;qv.set("common",KA);const JA=t=>{if(qv.has(t.namespace))return qv.get(t.namespace);if(t.plugins)for(const r of t.plugins)os.use(r);Object.keys(t.resource).forEach(r=>{os.addResourceBundle(r,t.namespace,t.resource[r])});const e=os.cloneInstance({defaultNS:t.namespace});let o=KA.initPromise.then(()=>e);e.on("languageChanged",r=>{os.language!==r&&os.changeLanguage(r)}),os.on("languageChanged",r=>{e.language!==r&&e.changeLanguage(r)});const n=t.language||"en";os.language!==n&&(o=o.then(()=>e.changeLanguage(n)).then(()=>e));const i={initPromise:o,i18nextInstance:e};return qv.set(t.namespace,i),i};function oet(t,e){return Object.keys(t).reduce((o,n)=>(o[n]={[e]:t[n]},o),{})}let c1=class extends Error{constructor(e,o,n){const{key:i,interpolationOptions:r}=o,a=n||KA.i18nextInstance.t,s=Object.assign(Object.assign({},r),{ns:e}),l=a(i,Object.assign(Object.assign({},s),{lng:"en"}));super(l),this.key=i,this.namespace=e,this.interpolationOptions=s}};function tH(t){return t&&t.replace(new RegExp("(?<!\\\\)'","g"),"\\'")}function zy(){return zy=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n])}return t},zy.apply(this,arguments)}var Zc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fa(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function net(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var o=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};o.prototype=e.prototype}else o={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(o,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),o}function iet(){if(console&&console.warn){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];typeof e[0]=="string"&&(e[0]=`react-i18next:: ${e[0]}`),console.warn(...e)}}const MN={};function R2(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];typeof e[0]=="string"&&MN[e[0]]||(typeof e[0]=="string"&&(MN[e[0]]=new Date),iet(...e))}const eH=(t,e)=>()=>{if(t.isInitialized)e();else{const o=()=>{setTimeout(()=>{t.off("initialized",o)},0),e()};t.on("initialized",o)}};function kN(t,e,o){t.loadNamespaces(e,eH(t,o))}function AN(t,e,o,n){typeof o=="string"&&(o=[o]),o.forEach(i=>{t.options.ns.indexOf(i)<0&&t.options.ns.push(i)}),t.loadLanguages(e,eH(t,n))}function ret(t,e){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=e.languages[0],i=e.options?e.options.fallbackLng:!1,r=e.languages[e.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const a=(s,l)=>{const d=e.services.backendConnector.state[`${s}|${l}`];return d===-1||d===2};return o.bindI18n&&o.bindI18n.indexOf("languageChanging")>-1&&e.services.backendConnector.backend&&e.isLanguageChangingTo&&!a(e.isLanguageChangingTo,t)?!1:!!(e.hasResourceBundle(n,t)||!e.services.backendConnector.backend||e.options.resources&&!e.options.partialBundledLanguages||a(n,t)&&(!i||a(r,t)))}function aet(t,e){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!e.languages||!e.languages.length?(R2("i18n.languages were undefined or empty",e.languages),!0):e.options.ignoreJSONStructure!==void 0?e.hasLoadedNamespace(t,{lng:o.lng,precheck:(n,i)=>{if(o.bindI18n&&o.bindI18n.indexOf("languageChanging")>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!i(n.isLanguageChangingTo,t))return!1}}):ret(t,e,o)}const set=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,cet={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},uet=t=>cet[t],det=t=>t.replace(set,uet);let I2={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:det};function pet(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};I2=jt(jt({},I2),t)}function het(){return I2}let oH;function fet(t){oH=t}function met(){return oH}const get={type:"3rdParty",init(t){pet(t.options.react),fet(t)}},nH=uo();let vet=class{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(o=>{this.usedNamespaces[o]||(this.usedNamespaces[o]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}};const yet=(t,e)=>{const o=Yt();return ae(()=>{o.current=t},[t,e]),o.current};function Fi(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:o}=e,{i18n:n,defaultNS:i}=eo(nH)||{},r=o||n||met();if(r&&!r.reportNamespaces&&(r.reportNamespaces=new vet),!r){R2("You will need to pass in an i18next instance by using initReactI18next");const X=(D,$)=>typeof $=="string"?$:$&&typeof $=="object"&&typeof $.defaultValue=="string"?$.defaultValue:Array.isArray(D)?D[D.length-1]:D,H=[X,{},!1];return H.t=X,H.i18n={},H.ready=!1,H}r.options.react&&r.options.react.wait!==void 0&&R2("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a=jt(jt(jt({},het()),r.options.react),e),{useSuspense:s,keyPrefix:l}=a;let d=i||r.options&&r.options.defaultNS;d=typeof d=="string"?[d]:d||["translation"],r.reportNamespaces.addUsedNamespaces&&r.reportNamespaces.addUsedNamespaces(d);const b=(r.isInitialized||r.initializedStoreOnce)&&d.every(X=>aet(X,r,a));function C(){return r.getFixedT(e.lng||null,a.nsMode==="fallback"?d:d[0],l)}const[u,j]=le(C);let A=d.join();e.lng&&(A=`${e.lng}${A}`);const p=yet(A),I=Yt(!0);ae(()=>{const{bindI18n:X,bindI18nStore:H}=a;I.current=!0,!b&&!s&&(e.lng?AN(r,e.lng,d,()=>{I.current&&j(C)}):kN(r,d,()=>{I.current&&j(C)})),b&&p&&p!==A&&I.current&&j(C);function D(){I.current&&j(C)}return X&&r&&r.on(X,D),H&&r&&r.store.on(H,D),()=>{I.current=!1,X&&r&&X.split(" ").forEach($=>r.off($,D)),H&&r&&H.split(" ").forEach($=>r.store.off($,D))}},[r,A]);const W=Yt(!0);ae(()=>{I.current&&!W.current&&j(C),W.current=!1},[r,l]);const q=[u,r,b];if(q.t=u,q.i18n=r,q.ready=b,b||!b&&!s)return q;throw new Promise(X=>{e.lng?AN(r,e.lng,d,()=>X()):kN(r,d,()=>X())})}const bet={errors:{noSisenseContext:"Sisense context is not initialized",restApiNotReady:"Rest API is not initialized",componentRenderError:"Unable to render the component",sisenseContextNoAuthentication:"Authentication method is not specified",chartNoSisenseContext:"Sisense Context for Chart not found. To fix, add a dataSet to the Chart or wrap the component inside a Sisense context provider.",widgetByIdNoSisenseContext:"Sisense Context for Dashboard Widget not found. To fix, wrap the component inside a Sisense context provider.",widgetByIdInvalidIdentifier:"Failed to retrieve widget. Please make sure the dashboard widget exists and is accessible.",dashboardWidgetsInvalidIdentifiers:"Failed to retrieve dashboard widgets. Please make sure the dashboard exists and is accessible.",executeQueryNoSisenseContext:"Sisense Context for query execution not found. To fix, wrap the component inside a Sisense context provider.",executeQueryNoDataSource:"No dataSource provided to execute query",dataOptions:{noDimensionsAndMeasures:"Neither dimensions nor measures found. Data options should have at least one dimension or measure.",attributeNotFound:'Attribute "{{attributeName}}" not found in the data',measureNotFound:'Measure "{{measureName}}" not found in the data',filterAttributeNotFound:'Filter attribute "{{attributeName}}" not found in the data',highlightAttributeNotFound:'Highlight attribute "{{attributeName}}" not found in the data'},optionsTranslation:{invalidStyleOptions:"Invalid style options for '{{chartType}}' chart",invalidInternalDataOptions:"Data options are not correctly converted for '{{chartType}}' chart"},themeNotFound:"Theme with oid {{themeOid}} not found in the Sisense instance",paletteNotFound:"Palette '{{paletteName}}' not found in the Sisense instance",chartTypeNotSupported:"Chart type {{chartType}} is not supported",chartInvalidProps:"Invalid chart props",unsupportedWidgetType:"Can't extract props for unsupported widget type - {{widgetType}}",sisenseContextNotFound:"Sisense Context not found. Please ensure it is provided.",dashboardInvalidIdentifier:"Failed to retrieve dashboard. Please make sure the dashboard exists and is accessible.",sharedFormula:{identifierExpected:"Failed to identify shared formula. Please provide oid or both name and datasource",failedToFetch:"Failed to fetch shared formula"},widgetModel:{incomleteWidget:"Widget can not be transformed to DTO because of incomplete property ({{prop}})",unsupportedWidgetTypeDto:"Saving the widget of type {{chartType}} is not supported",pivotWidgetNotSupported:"Pivot widget is not supported for method {{methodName}}",textWidgetNotSupported:"Text widget is not supported for method {{methodName}}",onlyTableWidgetSupported:"Only table widget is supported for method {{methodName}}",onlyPivotWidgetSupported:"Only pivot widget is supported for method {{methodName}}",onlyTextWidgetSupported:"Only text widget is supported for method {{methodName}}",onlyPluginWidgetSupported:"Only plugin widget is supported for method {{methodName}}",unsupportedWidgetType:"Unsupported widget type: {{widgetType}}",unsupportedFusionWidgetType:"Unsupported Fusion widget type: {{widgetType}}"},unknownFilterInFilterRelations:"Filter relations contain unknown filter",filterRelationsNotSupported:"Filter relations not supported yet",invalidFilterType:"Invalid filter type",secondsDateTimeLevelSupportedOnlyForLive:"Seconds datetime level is supported only for the 'live' datasource",missingMenuRoot:"Missing initialized menu root",missingModalRoot:"Missing initialized modal root",missingDataSource:"The 'dataSource' value is missing. It must be provided explicitly, or a 'defaultDataSource' should be specified in the Sisense context provider.",incorrectOnDataReadyHandler:"'onDataReady' handler must return a valid data object",undefinedDataSource:"Data source is not defined",emptyModel:"Empty model",missingMetadata:"Missing metadata",missingModelTitle:"Missing model title",httpClientNotFound:"HttpClient not found.",serverSettingsNotLoaded:"Failed to load server settings",requiredColumnMissing:"Missing required column",unexpectedChartType:"Unexpected chart type: {{chartType}}",noRowNumColumn:"Data has no row num column",ticIntervalCalculationFailed:"Unable to calculate tic interval. Try specifying datetime granularity.",polarChartDesignOptionsExpected:"Polar chart design options expected for polar chart",polarChartDesignOptionsNotExpected:"Polar chart design options not expected for non-polar chart",indicatorInvalidRelativeSize:"Invalid relative size options",unsupportedMapType:"Unsupported map type: {{mapType}}",mapLoadingFailed:"Failed loading map",cascadingFilterOriginalNotFound:"Error in cascading filters reassembling. Original cascading filter not found",dashboardLoadFailed:"Failed to load Dashboard. {{error}}",widgetLoadFailed:"Failed to load Widget. {{error}}",dashboardWithOidNotFound:"Dashboard with oid {{dashboardOid}} not found",failedToAddWidget:"Failed to add widget to dashboard",widgetWithOidNotFound:"Widget with oid {{widgetOid}} not found",widgetWithOidNotFoundInDashboard:"Widget with oid {{widgetOid}} not found in dashboard with oid {{dashboardOid}}",widgetEmptyResponse:"Empty response for widget with oid {{widgetOid}}",dateFilterIncorrectOperator:"Incorrect operator: {{operator}}",synchronizedFilterInvalidProps:"`useSynchronizedFilter` hook must take at least one of [non-null `filterFromProps`] or [`createEmptyFilter` function]",methodNotImplemented:"Method not implemented.",noPivotClient:"Pivot client not initialized",unexpectedCacheValue:"Unexpected cache value",notAMembersFilter:"Filter is not a MembersFilter",drilldownNoInitialDimension:"Initial dimension has to be specified to use drilldown with custom components",otherWidgetTypesNotSupported:"Other widget types are not supported yet",dataBrowser:{dimensionNotFound:"Dimension with id {{dimensionId}} not found",attributeNotFound:"Attribute with id {{attributeId}} not found"},addFilterPopover:{noDataSources:"No data sources available. Try to define `dataSource` in widgets or `defaultDataSource` on the dashboard level."},tabberInvalidConfiguration:"Tabber widget configuration is invalid"},errorBoxText:"$t(common:error): {{errorMessage}}",chartNoData:"No Results",filters:"Filters",widgetDetails:"Widget Details",cancel:"Cancel",includeAll:"Include all",formatting:{number:{abbreviations:{thousand:"K",million:"M",billion:"B",trillion:"T"}}},criteriaFilter:{displayModePrefix:"All items",equals:"Equals {{val}}",notEquals:"Does not equal {{val}}",lessThan:"Less than {{val}}",lessThanOrEqual:"Less than or equal to {{val}}",greaterThan:"Greater than {{val}}",greaterThanOrEqual:"Greater than or equal to {{val}}",between:"Between {{valA}} and {{valB}}",notBetween:"Not between {{valA}} and {{valB}}",top:"Top {{valA}} by {{valB}}",bottom:"Last {{valA}} by {{valB}}",is:"Is {{val}}",isNot:"Is not {{val}}",contains:"Contains {{val}}",notContains:"Doesn't contain {{val}}",startsWith:"Starts with {{val}}",notStartsWith:"Doesn't start with {{val}}",endsWith:"Ends with {{val}}",notEndsWith:"Doesn't end with {{val}}",like:"Is like {{val}}",byMeasure:"By measure",by:"by"},dateFilter:{last:"Last",next:"Next",from:"From",to:"To",count:"Count",select:"Select",today:"Today",days:"Days",weeks:"Weeks",months:"Months",quarters:"Quarters",years:"Years",earliestDate:"Earliest Date",latestDate:"Latest Date",todayOutOfRange:"Today is out of available date range",dateRange:{fromTo:"{{from}} to {{to}}",from:"From {{val}}",to:"To {{val}}"}},boxplot:{tooltip:{whiskers:"Whiskers",box:"Box",min:"Min",median:"Median",max:"Max"}},treemap:{tooltip:{ofTotal:"of total",of:"of"}},advanced:{tooltip:{min:"Lower Bound",max:"Upper Bound",forecastValue:"Forecast Value",forecast:"Forecast",trend:"Trend",trendLocalValue:"Local Value",confidenceInterval:"Confidence Interval",trendType:"Type",trendDataKey:"Trend Data",trendData:{min:"Min",max:"Max",median:"Median",average:"Average"}}},arearange:{tooltip:{min:"Min",max:"Max"}},unsupportedFilterMessage:"Unsupported Filter (applied to the data query)",unsupportedFilter:"Unsupported filter {{filter}}",commonFilter:{clearSelectionButton:"Clear Selection",selectMenuItem:"Select",unselectMenuItem:"Un-Select"},customFilterTileMessage:"filtered with custom filter",filterRelations:{and:"AND",or:"OR",andOrFormulaApplied:"AND/OR Formula applied"},drilldown:{drillMenuItem:"Drill",breadcrumbsAllSuffix:"All",breadcrumbsPrev:"Prev",breadcrumbsNext:"Next",popover:{members:"Members",table:"Table",column:"Column"}},widgetHeader:{info:{details:"Widget Details",tooltip:"Click to view full details"}},plugins:{registerPrompt:"Unknown plugin type: {{pluginType}}. Please register this plugin so it can be rendered."},ai:{analyticsChatbot:"Analytics Chatbot",dataTopics:"Data Topics",chatbotDescription:"Analytics Chatbot is designed to help you interact with your data using natural language.",topicSelectPrompt:"Pick a topic you would like to explore:",preview:"Preview",clearHistoryPrompt:"Do you want to clear this chat?",config:{inputPromptText:'Ask a question or type "/" for ideas',welcomeText:"Welcome to the Analytics Assistant! I can help you explore and gain insights from your data.",suggestionsWelcomeText:"Some questions you may have:"},buttons:{insights:"Insights",correctResponse:"Correct response",incorrectResponse:"Incorrect response",clearChat:"Clear chat",refresh:"Refresh",readMore:"Read more",collapse:"Collapse",yes:"Yes",no:"No",seeMore:"See more"},disclaimer:{poweredByAi:"Content is powered by AI, so surprises and mistakes are possible.",rateRequest:"Please rate responses so we can improve!"},errors:{chatUnavailable:"Chat unavailable. Please try again later.",fetchHistory:"Something went wrong and we were unable to retrieve the chat thread. Let's start over!",recommendationsNotAvailable:"Recommendations aren't available right now. Try again in a few minutes.",insightsNotAvailable:"No insights available.",VectorDBEmptyResponseError:"The AI configuration is not ready, please wait a few minutes and try again.",LlmBadConfigurationError:"The LLM configuration is wrong. Reach out to your Admin to update the LLM provider configuration.",ChartTypeUnsupportedError:"Requested chart type is not supported.",BlockedByLlmContentFiltering:"This question is blocked by our content management policy. Please try asking a different question.",LlmContextLengthExceedsLimitError:"Looks like you've reached the message length limit, please clear this conversation.",UserPromptExeedsLimitError:"The prompt exceeds the limit. Rephrase your question and use shorter prompt.",unexpectedChatResponse:"Oh snap, something went wrong. Please try again later or try asking a different question.",unexpected:"Oh snap, something went wrong. Please try again later.",unknownResponse:"Received unknown responseType, raw response=",invalidInput:"Invalid input",noAvailableDataTopics:"None of the provided data models or perspectives are available"}},attribute:{datetimeName:{years:"Years in {{columnName}}",quarters:"Quarters in {{columnName}}",months:"Months in {{columnName}}",weeks:"Weeks in {{columnName}}",days:"Days in {{columnName}}",hours:"Hours in {{columnName}}",minutes:"Minutes in {{columnName}}"}},filterEditor:{buttons:{apply:"Apply",cancel:"Cancel",selectAll:"Select All",clearAll:"Clear All"},labels:{includeAll:"Include all (no filter applied)",allowMultiSelection:"Allow multiselect for lists",from:"From",to:"To",includeCurrent:"Including current"},placeholders:{selectFromList:"Select from list",enterEntry:"Type your entry...",enterValue:"Enter value...",select:"Select"},conditions:{exclude:"Is not",contains:"Contains",notContain:"Does not contain",startsWith:"Starts with",notStartsWith:"Does not start with",endsWith:"Ends with",notEndsWith:"Does not end with",equals:"Equals",notEquals:"Does not equal",isEmpty:"Is empty",isNotEmpty:"Is not empty",lessThan:"Smaller than",lessThanOrEqual:"Equals or smaller than",greaterThan:"Greater than",greaterThanOrEqual:"Equals or greater than",isWithin:"Is within"},validationErrors:{invalidNumber:"Numbers only",invalidNumericRange:'"To" must be greater than "From"'},datetimeLevels:{year:"Year",quarter:"Quarter",month:"Month",week:"Week",day:"Day",aggrigatedHour:"Hour (aggregated)",aggrigatedMinutesRoundTo15:"15-min (aggregated)"},relativeTypes:{last:"Last",this:"This",next:"Next"},datetimePositions:{before:"Before",after:"After"}},dataBrowser:{addFilter:"Add Filter",selectField:"Select Field",configureFilter:"Configure Filter",noResults:"No results",searchPlaceholder:"Search"},pivotTable:{grandTotal:"Grand Total",subTotal:"{{value}} Total"},dashboard:{toolbar:{undo:"Undo",redo:"Redo",cancel:"Cancel",apply:"Apply",editLayout:"Edit Layout"}},jumpToDashboard:{defaultCaption:"Jump to"}},xet={errors:{noSisenseContext:"Контекст Sisense не ініціалізовано",restApiNotReady:"Rest API не ініціалізовано",componentRenderError:"Не вдалося відобразити компонент",sisenseContextNoAuthentication:"Не вказано метод аутентифікації",chartNoSisenseContext:"Контекст Sisense для діаграми не знайдено. Щоб виправити, додайте набір даних до Chart або оберніть компонент у SisenseContextProvider.",widgetByIdNoSisenseContext:"Контекст Sisense для віджета дашборди не знайдено. Щоб виправити, оберніть компонент у SisenseContextProvider.",widgetByIdInvalidIdentifier:"Не вдалося отримати віджет. Переконайтеся, що віджет дашборди існує і доступний.",dashboardWidgetsInvalidIdentifiers:"Не вдалося отримати віджети дашборди. Переконайтеся, що дашборда існує і доступна.",executeQueryNoSisenseContext:"Контекст Sisense для виконання запиту не знайдено. Щоб виправити, оберніть компонент у SisenseContextProvider.",executeQueryNoDataSource:"Не надано dataSource для виконання запиту",dataOptions:{noDimensionsAndMeasures:"Не знайдено ні dimension-ів, ні measure-ів. Параметри даних повинні мати щонайменше один dimension або measure.",attributeNotFound:'Атрибут "{{attributeName}}" не знайдено в даних',measureNotFound:'Measure "{{measureName}}" не знайдено в даних',filterAttributeNotFound:'Атрибут фільтра "{{attributeName}}" не знайдено в даних',highlightAttributeNotFound:'Атрибут виділення "{{attributeName}}" не знайдено в даних'},optionsTranslation:{invalidStyleOptions:"Недійсні параметри `styleOptions` для діаграми '{{chartType}}'",invalidInternalDataOptions:"Параметри `dataOptions` некоректно перетворені для діаграми '{{chartType}}'"},themeNotFound:"Тему з oid {{themeOid}} не знайдено на Sisense-сервері",paletteNotFound:'Палітру "{{paletteName}}" не знайдено на Sisense-сервері',chartTypeNotSupported:"Тип діаграми {{chartType}} не підтримується",chartInvalidProps:"Недійсні параметри діаграми",unsupportedWidgetType:"Неможливо отримати властивості для непідтримуваного типу віджета - {{widgetType}}",sisenseContextNotFound:"Контекст Sisense не знайдено. Переконайтеся, що він наданий.",dashboardInvalidIdentifier:"Не вдалося отримати дашборд. Переконайтеся, що дашборд існує і доступний.",sharedFormula:{identifierExpected:"Не вдалося ідентифікувати загальну формулу. Будь ласка, надайте oid або пару name та datasource",failedToFetch:"Не вдалося отримати спільну формулу"},widgetModel:{incomleteWidget:"Неможливо створити DTO віджету через неповноту властивості ({{prop}})",unsupportedWidgetTypeDto:"Сберігання віджету типу {{chartType}} не підтримується",pivotWidgetNotSupported:"Метод {{methodName}} не підтримується для півот віджету",textWidgetNotSupported:"Метод {{methodName}} не підтримується для текстового віджету",onlyTableWidgetSupported:"Метод {{methodName}} підтримується тільки для табличних віджетів",onlyPivotWidgetSupported:"Метод {{methodName}} підтримується тільки для півот віджетів",onlyTextWidgetSupported:"Метод {{methodName}} підтримується тільки для текстових віджетів",onlyPluginWidgetSupported:"Метод {{methodName}} підтримується тільки для плагінних віджетів",unsupportedWidgetType:"Тип віджету {{widgetType}} не підтримується",unsupportedFusionWidgetType:"Тип Fusion віджету {{widgetType}} не підтримується"},unknownFilterInFilterRelations:"Логічні відношення фільтрів містять невідомий фільтр",filterRelationsNotSupported:"Відносини фільтрів ще не підтримуються",invalidFilterType:"Недійсний тип фільтра",secondsDateTimeLevelSupportedOnlyForLive:"Рівень часу в секундах підтримується лише для 'live' джерела даних",missingMenuRoot:"Відсутній ініціалізований корінь меню",missingModalRoot:"Відсутній ініціалізований корінь модального вікна",missingDataSource:"Значення 'dataSource' відсутнє. Воно має бути передано явно, або 'defaultDataSource' має бути вказано в SisenseContextProvider.",incorrectOnDataReadyHandler:"'onDataReady' має повертати дійсний об'єкт даних",undefinedDataSource:"Не задане джерело даних",emptyModel:"Пуста модель",missingMetadata:"Поле metadata відсутнє",missingModelTitle:"Не знайдено заголовоку моделі",httpClientNotFound:"HttpClient не знайдено",serverSettingsNotLoaded:"Failed to load server settings",requiredColumnMissing:"Відсутній обов’язковий стовпець",unexpectedChartType:"Невідомий тип графіка: {{chartType}}",noRowNumColumn:"Дані не містять row num column",ticIntervalCalculationFailed:"Неможливо обрахувати tic interval. Спробуйте задати datetime granularity.",polarChartDesignOptionsExpected:"Polar chart design options очікуються для polar chart",polarChartDesignOptionsNotExpected:"Polar chart design options не очікуються для non-polar chart",indicatorInvalidRelativeSize:"Невірні опції relative size",unsupportedMapType:"Непідтримуваний тип мапи: {{mapType}}",mapLoadingFailed:"Не вдалося завантажити мапу",cascadingFilterOriginalNotFound:"Помилка при реструктуризації каскадних фільтрів. Оригінальний фільтр не знайдено",dashboardLoadFailed:"Не вдалося завантажити Dashboard. {{error}}",widgetLoadFailed:"Не вдалося завантажити віджет. {{error}}",dashboardWithOidNotFound:"Dashboard з oid {{dashboardOid}} не знайдено",failedToAddWidget:"Не вдалося додати віджет",widgetWithOidNotFound:"Віджет з oid {{widgetOid}} не знайдено",widgetWithOidNotFoundInDashboard:"Віджет з oid {{widgetOid}} не знайдено в Dashboard з oid {{dashboardOid}}",widgetEmptyResponse:"Пуста відповідь для віджета з oid {{widgetOid}}",dateFilterIncorrectOperator:"Некорректний оператор: {{operator}}",synchronizedFilterInvalidProps:"`useSynchronizedFilter` хук потребує одне з [non-null `filterFromProps`] чи [`createEmptyFilter` function]",methodNotImplemented:"Метод не реалізовано.",noPivotClient:"Pivot client не ініціалізовано",unexpectedCacheValue:"Неочікуване значення кешу",notAMembersFilter:"Фільтр не є MembersFilter",drilldownNoInitialDimension:"Initial dimension має бути задано щоб використовувати drilldown з користувацькими компонентами",otherWidgetTypesNotSupported:"Інші типи віджетів поки що не підтримуються",dataBrowser:{dimensionNotFound:"Dimension з id {{dimensionId}} не знайдено",attributeNotFound:"Attribute з id {{attributeId}} не знайдено"},addFilterPopover:{noDataSources:"Не знайдено жодного джерела даних. Спробуйте задати `dataSource` у віджетах або `defaultDataSource` на рівні дашборди."},tabberInvalidConfiguration:"Конфігурація Tabber віджета невірна"},errorBoxText:"$t(common:error): {{errorMessage}}",chartNoData:"Результатів немає",filters:"Фільтри",widgetDetails:"Деталі віджета",cancel:"Відміна",includeAll:"Всі елементи",formatting:{number:{abbreviations:{thousand:"Тис.",million:"Млн",billion:"Млрд",trillion:"Трлн"}}},criteriaFilter:{displayModePrefix:"Всі елементи",equals:"Дорівнює {{val}}",notEquals:"Не дорівнює {{val}}",lessThan:"Менше ніж {{val}}",lessThanOrEqual:"Менше або дорівнює {{val}}",greaterThan:"Більше ніж {{val}}",greaterThanOrEqual:"Більше або дорівнює {{val}}",between:"Між {{valA}} та {{valB}}",notBetween:"Не між {{valA}} та {{valB}}",top:"Перші {{valA}} за {{valB}}",bottom:"Останні {{valA}} за {{valB}}",is:"Є {{val}}",isNot:"Не є {{val}}",contains:"Містить {{val}}",notContains:"Не містить {{val}}",startsWith:"Починається з {{val}}",notStartsWith:"Не починається з {{val}}",endsWith:"Закінчується на {{val}}",notEndsWith:"Не закінчується на {{val}}",like:"Схоже на {{val}}",byMeasure:"By measure",by:"by"},dateFilter:{last:"Останній",next:"Наступний",from:"Від",to:"До",count:"Кількість",select:"Вибрати",today:"Сьогодні",days:"Дні",weeks:"Тижні",months:"Місяці",quarters:"Квартали",years:"Роки",earliestDate:"Найбільш Рання Дата",latestDate:"Найбільш Пізня Дата",todayOutOfRange:"Сьогоднішній день поза доступним діапазоном дат",dateRange:{fromTo:"{{from}} до {{to}}",from:"Від {{val}}",to:"До {{val}}"}},boxplot:{tooltip:{whiskers:"Вуса",box:"Коробка",min:"Мінімум",median:"Медіана",max:"Максимум"}},treemap:{tooltip:{ofTotal:"загальної кількості",of:"з"}},advanced:{tooltip:{min:"Lower Bound",max:"Upper Bound",forecastValue:"Forecast Value",forecast:"Forecast",trend:"Trend",trendLocalValue:"Local Value",confidenceInterval:"Confidence Interval",trendType:"Type",trendDataKey:"Trend Data",trendData:{min:"Min",max:"Max",median:"Median",average:"Average"}}},arearange:{tooltip:{min:"Мінімум",max:"Максимум"}},dashboard:{toolbar:{undo:"Скасувати",redo:"Повторити",cancel:"Відмінити",apply:"Застосувати",editLayout:"Редагувати макет"}},unsupportedFilterMessage:"Непідтримуваний Фільтр (застосовано до запиту даних)",unsupportedFilter:"Непідтримуваний фільтр {{filter}}",commonFilter:{clearSelectionButton:"Очистити виділення",selectMenuItem:"Вибрати",unselectMenuItem:"Cкасувати вибір"},customFilterTileMessage:"застосовано користувацький фільтр",drilldown:{drillMenuItem:"Деталізація",breadcrumbsAllSuffix:"Все",breadcrumbsPrev:"Попередній",breadcrumbsNext:"Наступний",popover:{members:"Учасники",table:"Таблиця",column:"Колонка"}},widgetHeader:{info:{details:"Деталі віджета",tooltip:"Натисніть щоб побачити повну інформацію"}},plugins:{registerPrompt:"Невідомий плагін: {{pluginType}}. Будь ласка зареєструйте цей плагін щоб він міг бути відображений."},ai:{analyticsChatbot:"Аналітичний чат-бот",dataTopics:"Теми Даних",chatbotDescription:"Аналітичний чат-бот розроблено, щоб допомогти вам взаємодіяти з вашими даними за допомогою розмовної мови.",topicSelectPrompt:"Виберіть тему, яку б ви хотіли дослідити:",preview:"Попередній перегляд",clearHistoryPrompt:"Ви дійсно хочете очистити чат?",config:{inputPromptText:"Поставте запитання або введіть «/» для отримання ідей",welcomeText:"Вітаємо в Аналітичному помічнику! Я можу допомогти вам досліджувати та зрозуміти ваші дані.",suggestionsWelcomeText:"Деякі запитання, які у вас можуть виникнути:"},buttons:{insights:"Інсайти",correctResponse:"Коректна відповідь",incorrectResponse:"Некоректна відповідь",clearChat:"Очистити чат",refresh:"Оновити",readMore:"Читати ще",collapse:"Згорнути",yes:"Так",no:"Ні",seeMore:"Більше"},disclaimer:{poweredByAi:"Вміст створено за допомогою ШІ, тому можливі несподіванки та помилки.",rateRequest:" Будь ласка, оцінюйте відповіді, щоб ми могли покращити продукт!"},errors:{chatUnavailable:"Чат недоступний. Спробуйте пізніше.",fetchHistory:"Щось пішло не так, і ми не змогли відновити історію чату. Почнімо спочатку!",recommendationsNotAvailable:"Наразі рекомендації недоступні. Спробуйте ще раз через кілька хвилин.",insightsNotAvailable:"Немає доступних інсайтів.",VectorDBEmptyResponseError:"AI ще конфігурується, будь ласка зачекайте та спробуйте ще раз за хвилинку чи дві.",LlmBadConfigurationError:"Схоже що LLM невірно сконфігурований. Зверніться до вашого Адміністратора щоб він оновив конфігурацію LLM провайдера.",ChartTypeUnsupportedError:"Графік такого типу покищо не підтримується.",BlockedByLlmContentFiltering:"Це питання заблоковано нашою політикою керування вмістом. Будь ласка спробуйте поставити інше запитання.",LlmContextLengthExceedsLimitError:"Схоже ви досягли ліміту кількості сповіщеннь, будь ласка очистіть поточний чат аби розпочати новий.",UserPromptExeedsLimitError:"Цей запит перевищює максимально дозволений ліміт. Будь ласка перефразуйте та зробіть запит коротше.",unexpectedChatResponse:"Ой, щось пішло не так. Повторіть спробу пізніше або спробуйте поставити інше запитання.",unexpected:"Ой, лихо! Шось йому стало. Спробуйте трохи пізніше.",unknownResponse:"Отримано невідомий тип відповіді, необроблена відповідь=",invalidInput:"Недійсне введення",noAvailableDataTopics:"Жодне з наданих моделей даних або перспектив доступне"}},filterRelations:{and:"І",or:"АБО",andOrFormulaApplied:"Застосовано формулу І/АБО"},attribute:{datetimeName:{years:"Роки в {{columnName}}",quarters:"Квартали в {{columnName}}",months:"Місяці в {{columnName}}",weeks:"Тижні в {{columnName}}",days:"Дні в {{columnName}}",hours:"Години в {{columnName}}",minutes:"Хвилини в {{columnName}}"}},filterEditor:{buttons:{apply:"Застосувати",cancel:"Відміна",selectAll:"Обрати всі",clearAll:"Очистити всі"},labels:{includeAll:"Обрати всі (фільтр не використовується)",allowMultiSelection:"Дозволити вибір кількох значень для списків",from:"Від",to:"До",includeCurrent:"Включаючи поточний"},placeholders:{selectFromList:"Виберіть зі списку",enterEntry:"Введіть значення...",enterValue:"Введіть значення...",select:"Вибрати"},conditions:{exclude:"Не є",contains:"Mістить",notContain:"Не містить",startsWith:"Починається з",notStartsWith:"Не починається з",endsWith:"Закінчується на",notEndsWith:"Не закінчується на",equals:"Дорівнює",notEquals:"Не дорівнює",isEmpty:"Порожній",isNotEmpty:"Не порожній",lessThan:"Менше ніж",lessThanOrEqual:"Менше або дорівнює",greaterThan:"Більше ніж",greaterThanOrEqual:"Більше або дорівнює",isWithin:"В межах"},validationErrors:{invalidNumber:"Тільки цифри",invalidNumericRange:'"До" має бути більше, ніж "Від"'},datetimeLevels:{year:"Year",quarter:"Quarter",month:"Month",week:"Week",day:"Day",aggrigatedHour:"Hour (aggregated)",aggrigatedMinutesRoundTo15:"15-min (aggregated)"},relativeTypes:{last:"Останній",this:"Поточний",next:"Наступний"},datetimePositions:{before:"Перед",after:"Після"}},pivotTable:{grandTotal:"Загальний підсумок",subTotal:"Усього {{value}}"},dataBrowser:{addFilter:"Додати фільтр",selectField:"Вибрати поле",configureFilter:"Налаштувати фільтр",noResults:"Немає результатів",searchPlaceholder:"Пошук"},jumpToDashboard:{defaultCaption:"Перейти до"}},QA="sdkUi",wet={en:bet,uk:xet};function iH(){return JA({resource:wet,plugins:[get],language:"en",namespace:QA})}const{i18nextInstance:rH}=iH(),_et={errors:{measure:{unsupportedType:"Unsupported measure type",dimensionalCalculatedMeasure:{noContext:"DimensionalCalculatedMeasure must have 'context' property"},dimensionalBaseMeasure:{noAttributeDimExpression:"DimensionalBaseMeasure must have 'attribute'/'dim'/'expression' property",noAggAggregation:"DimensionalBaseMeasure must have 'agg' or 'aggregation' property"},notAFormula:"Jaql is not a formula"},dataModelConfig:{noName:"'name' must be specified in config for DataModel",noMetadata:"'metadata' must be specified in config for DataModel"},filter:{unsupportedType:"Unsupported filter type: {{filterType}}",unsupportedDatetimeLevel:'Filters do not support the next "datetime" levels: Hours, MinutesRoundTo30, MinutesRoundTo15, Minutes, Seconds',membersFilterNullMember:"MembersFilter of {{attributeId}} - member cannot be null",unsupportedConditionFilter:"Jaql contains unsupported condition filter: {{filter}}",formulaFiltersNotSupported:"Formula-based filter not supported yet: {{filter}}"},unsupportedDimensionalElement:"Unsupported dimensional element type"}},Cet={errors:{measure:{unsupportedType:"Непідтримуваний тип measure",dimensionalCalculatedMeasure:{noContext:"DimensionalCalculatedMeasure має мати властивість 'context'"},dimensionalBaseMeasure:{noAttributeDimExpression:"DimensionalBaseMeasure має мати властивість 'attribute'/'dim'/'expression'",noAggAggregation:"DimensionalBaseMeasure має мати властивість 'agg' або 'aggregation'"},notAFormula:"Jaql не формула"},dataModelConfig:{noName:"'name' має бути вказано в конфігурації для DataModel",noMetadata:"'metadata' має бути вказано в конфігурації для DataModel"},filter:{unsupportedType:"Непідтримуваний тип фільтра: {{filterType}}",unsupportedDatetimeLevel:'Фільтри не підтримують наступні рівні "datetime": Hours, MinutesRoundTo30, MinutesRoundTo15, Minutes, Seconds',membersFilterNullMember:"MembersFilter у {{attributeId}} - member не може бути нульовим",unsupportedConditionFilter:"Jaql містить непідтримуваний condition фільтр: {{filter}}",formulaFiltersNotSupported:"Фільтри, що містять формули наразі не підтримуються: {{filter}}"},unsupportedDimensionalElement:"Непідтримуваний тип елемента"}},aH="sdkData",Tet={en:_et,uk:Cet};function Met(){return JA({resource:Tet,language:"en",namespace:aH})}const{i18nextInstance:ket}=Met();function Aet(){this.__data__=[],this.size=0}function wg(t,e){return t===e||t!==t&&e!==e}function u1(t,e){for(var o=t.length;o--;)if(wg(t[o][0],e))return o;return-1}var Eet=Array.prototype,Pet=Eet.splice;function Oet(t){var e=this.__data__,o=u1(e,t);if(o<0)return!1;var n=e.length-1;return o==n?e.pop():Pet.call(e,o,1),--this.size,!0}function Let(t){var e=this.__data__,o=u1(e,t);return o<0?void 0:e[o][1]}function Net(t){return u1(this.__data__,t)>-1}function Det(t,e){var o=this.__data__,n=u1(o,t);return n<0?(++this.size,o.push([t,e])):o[n][1]=e,this}function bl(t){var e=-1,o=t==null?0:t.length;for(this.clear();++e<o;){var n=t[e];this.set(n[0],n[1])}}bl.prototype.clear=Aet;bl.prototype.delete=Oet;bl.prototype.get=Let;bl.prototype.has=Net;bl.prototype.set=Det;function Ret(){this.__data__=new bl,this.size=0}function Iet(t){var e=this.__data__,o=e.delete(t);return this.size=e.size,o}function jet(t){return this.__data__.get(t)}function $et(t){return this.__data__.has(t)}var sH=typeof global=="object"&&global&&global.Object===Object&&global,zet=typeof self=="object"&&self&&self.Object===Object&&self,Hi=sH||zet||Function("return this")(),ca=Hi.Symbol,lH=Object.prototype,Bet=lH.hasOwnProperty,Fet=lH.toString,Dh=ca?ca.toStringTag:void 0;function Het(t){var e=Bet.call(t,Dh),o=t[Dh];try{t[Dh]=void 0;var n=!0}catch{}var i=Fet.call(t);return n&&(e?t[Dh]=o:delete t[Dh]),i}var Wet=Object.prototype,Vet=Wet.toString;function Uet(t){return Vet.call(t)}var Get="[object Null]",Yet="[object Undefined]",EN=ca?ca.toStringTag:void 0;function $a(t){return t==null?t===void 0?Yet:Get:EN&&EN in Object(t)?Het(t):Uet(t)}function Ai(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Xet="[object AsyncFunction]",qet="[object Function]",Zet="[object GeneratorFunction]",Ket="[object Proxy]";function sl(t){if(!Ai(t))return!1;var e=$a(t);return e==qet||e==Zet||e==Xet||e==Ket}var M_=Hi["__core-js_shared__"],PN=function(){var t=/[^.]+$/.exec(M_&&M_.keys&&M_.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Jet(t){return!!PN&&PN in t}var Qet=Function.prototype,tot=Qet.toString;function Eu(t){if(t!=null){try{return tot.call(t)}catch{}try{return t+""}catch{}}return""}var eot=/[\\^$.*+?()[\]{}|]/g,oot=/^\[object .+?Constructor\]$/,not=Function.prototype,iot=Object.prototype,rot=not.toString,aot=iot.hasOwnProperty,sot=RegExp("^"+rot.call(aot).replace(eot,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function lot(t){if(!Ai(t)||Jet(t))return!1;var e=sl(t)?sot:oot;return e.test(Eu(t))}function cot(t,e){return t==null?void 0:t[e]}function Pu(t,e){var o=cot(t,e);return lot(o)?o:void 0}var fm=Pu(Hi,"Map"),mm=Pu(Object,"create");function uot(){this.__data__=mm?mm(null):{},this.size=0}function dot(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var pot="__lodash_hash_undefined__",hot=Object.prototype,fot=hot.hasOwnProperty;function mot(t){var e=this.__data__;if(mm){var o=e[t];return o===pot?void 0:o}return fot.call(e,t)?e[t]:void 0}var got=Object.prototype,vot=got.hasOwnProperty;function yot(t){var e=this.__data__;return mm?e[t]!==void 0:vot.call(e,t)}var bot="__lodash_hash_undefined__";function xot(t,e){var o=this.__data__;return this.size+=this.has(t)?0:1,o[t]=mm&&e===void 0?bot:e,this}function du(t){var e=-1,o=t==null?0:t.length;for(this.clear();++e<o;){var n=t[e];this.set(n[0],n[1])}}du.prototype.clear=uot;du.prototype.delete=dot;du.prototype.get=mot;du.prototype.has=yot;du.prototype.set=xot;function wot(){this.size=0,this.__data__={hash:new du,map:new(fm||bl),string:new du}}function _ot(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function d1(t,e){var o=t.__data__;return _ot(e)?o[typeof e=="string"?"string":"hash"]:o.map}function Sot(t){var e=d1(this,t).delete(t);return this.size-=e?1:0,e}function Cot(t){return d1(this,t).get(t)}function Tot(t){return d1(this,t).has(t)}function Mot(t,e){var o=d1(this,t),n=o.size;return o.set(t,e),this.size+=o.size==n?0:1,this}function xl(t){var e=-1,o=t==null?0:t.length;for(this.clear();++e<o;){var n=t[e];this.set(n[0],n[1])}}xl.prototype.clear=wot;xl.prototype.delete=Sot;xl.prototype.get=Cot;xl.prototype.has=Tot;xl.prototype.set=Mot;var kot=200;function Aot(t,e){var o=this.__data__;if(o instanceof bl){var n=o.__data__;if(!fm||n.length<kot-1)return n.push([t,e]),this.size=++o.size,this;o=this.__data__=new xl(n)}return o.set(t,e),this.size=o.size,this}function Pa(t){var e=this.__data__=new bl(t);this.size=e.size}Pa.prototype.clear=Ret;Pa.prototype.delete=Iet;Pa.prototype.get=jet;Pa.prototype.has=$et;Pa.prototype.set=Aot;function cH(t,e){for(var o=-1,n=t==null?0:t.length;++o<n&&e(t[o],o,t)!==!1;);return t}var By=function(){try{var t=Pu(Object,"defineProperty");return t({},"",{}),t}catch{}}();function _g(t,e,o){e=="__proto__"&&By?By(t,e,{configurable:!0,enumerable:!0,value:o,writable:!0}):t[e]=o}var Eot=Object.prototype,Pot=Eot.hasOwnProperty;function tE(t,e,o){var n=t[e];(!(Pot.call(t,e)&&wg(n,o))||o===void 0&&!(e in t))&&_g(t,e,o)}function Up(t,e,o,n){var i=!o;o||(o={});for(var r=-1,a=e.length;++r<a;){var s=e[r],l=void 0;l===void 0&&(l=t[s]),i?_g(o,s,l):tE(o,s,l)}return o}function Oot(t,e){for(var o=-1,n=Array(t);++o<t;)n[o]=e(o);return n}function er(t){return t!=null&&typeof t=="object"}var Lot="[object Arguments]";function ON(t){return er(t)&&$a(t)==Lot}var uH=Object.prototype,Not=uH.hasOwnProperty,Dot=uH.propertyIsEnumerable,gm=ON(function(){return arguments}())?ON:function(t){return er(t)&&Not.call(t,"callee")&&!Dot.call(t,"callee")},Ho=Array.isArray;function Rot(){return!1}var dH=typeof exports=="object"&&exports&&!exports.nodeType&&exports,LN=dH&&typeof module=="object"&&module&&!module.nodeType&&module,Iot=LN&&LN.exports===dH,NN=Iot?Hi.Buffer:void 0,jot=NN?NN.isBuffer:void 0,vm=jot||Rot,$ot=9007199254740991,zot=/^(?:0|[1-9]\d*)$/;function Sg(t,e){var o=typeof t;return e=e??$ot,!!e&&(o=="number"||o!="symbol"&&zot.test(t))&&t>-1&&t%1==0&&t<e}var Bot=9007199254740991;function eE(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Bot}var Fot="[object Arguments]",Hot="[object Array]",Wot="[object Boolean]",Vot="[object Date]",Uot="[object Error]",Got="[object Function]",Yot="[object Map]",Xot="[object Number]",qot="[object Object]",Zot="[object RegExp]",Kot="[object Set]",Jot="[object String]",Qot="[object WeakMap]",tnt="[object ArrayBuffer]",ent="[object DataView]",ont="[object Float32Array]",nnt="[object Float64Array]",int="[object Int8Array]",rnt="[object Int16Array]",ant="[object Int32Array]",snt="[object Uint8Array]",lnt="[object Uint8ClampedArray]",cnt="[object Uint16Array]",unt="[object Uint32Array]",pn={};pn[ont]=pn[nnt]=pn[int]=pn[rnt]=pn[ant]=pn[snt]=pn[lnt]=pn[cnt]=pn[unt]=!0;pn[Fot]=pn[Hot]=pn[tnt]=pn[Wot]=pn[ent]=pn[Vot]=pn[Uot]=pn[Got]=pn[Yot]=pn[Xot]=pn[qot]=pn[Zot]=pn[Kot]=pn[Jot]=pn[Qot]=!1;function dnt(t){return er(t)&&eE(t.length)&&!!pn[$a(t)]}function Cg(t){return function(e){return t(e)}}var pH=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Vf=pH&&typeof module=="object"&&module&&!module.nodeType&&module,pnt=Vf&&Vf.exports===pH,k_=pnt&&sH.process,Jl=function(){try{var t=Vf&&Vf.require&&Vf.require("util").types;return t||k_&&k_.binding&&k_.binding("util")}catch{}}(),DN=Jl&&Jl.isTypedArray,oE=DN?Cg(DN):dnt,hnt=Object.prototype,fnt=hnt.hasOwnProperty;function hH(t,e){var o=Ho(t),n=!o&&gm(t),i=!o&&!n&&vm(t),r=!o&&!n&&!i&&oE(t),a=o||n||i||r,s=a?Oot(t.length,String):[],l=s.length;for(var d in t)(e||fnt.call(t,d))&&!(a&&(d=="length"||i&&(d=="offset"||d=="parent")||r&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||Sg(d,l)))&&s.push(d);return s}var mnt=Object.prototype;function nE(t){var e=t&&t.constructor,o=typeof e=="function"&&e.prototype||mnt;return t===o}function fH(t,e){return function(o){return t(e(o))}}var gnt=fH(Object.keys,Object),vnt=Object.prototype,ynt=vnt.hasOwnProperty;function bnt(t){if(!nE(t))return gnt(t);var e=[];for(var o in Object(t))ynt.call(t,o)&&o!="constructor"&&e.push(o);return e}function Tg(t){return t!=null&&eE(t.length)&&!sl(t)}function Mg(t){return Tg(t)?hH(t):bnt(t)}function xnt(t,e){return t&&Up(e,Mg(e),t)}function wnt(t){var e=[];if(t!=null)for(var o in Object(t))e.push(o);return e}var _nt=Object.prototype,Snt=_nt.hasOwnProperty;function Cnt(t){if(!Ai(t))return wnt(t);var e=nE(t),o=[];for(var n in t)n=="constructor"&&(e||!Snt.call(t,n))||o.push(n);return o}function kg(t){return Tg(t)?hH(t,!0):Cnt(t)}function Tnt(t,e){return t&&Up(e,kg(e),t)}var mH=typeof exports=="object"&&exports&&!exports.nodeType&&exports,RN=mH&&typeof module=="object"&&module&&!module.nodeType&&module,Mnt=RN&&RN.exports===mH,IN=Mnt?Hi.Buffer:void 0,jN=IN?IN.allocUnsafe:void 0;function gH(t,e){if(e)return t.slice();var o=t.length,n=jN?jN(o):new t.constructor(o);return t.copy(n),n}function p1(t,e){var o=-1,n=t.length;for(e||(e=Array(n));++o<n;)e[o]=t[o];return e}function knt(t,e){for(var o=-1,n=t==null?0:t.length,i=0,r=[];++o<n;){var a=t[o];e(a,o,t)&&(r[i++]=a)}return r}function vH(){return[]}var Ant=Object.prototype,Ent=Ant.propertyIsEnumerable,$N=Object.getOwnPropertySymbols,iE=$N?function(t){return t==null?[]:(t=Object(t),knt($N(t),function(e){return Ent.call(t,e)}))}:vH;function Pnt(t,e){return Up(t,iE(t),e)}function rE(t,e){for(var o=-1,n=e.length,i=t.length;++o<n;)t[i+o]=e[o];return t}var aE=fH(Object.getPrototypeOf,Object),Ont=Object.getOwnPropertySymbols,yH=Ont?function(t){for(var e=[];t;)rE(e,iE(t)),t=aE(t);return e}:vH;function Lnt(t,e){return Up(t,yH(t),e)}function bH(t,e,o){var n=e(t);return Ho(t)?n:rE(n,o(t))}function j2(t){return bH(t,Mg,iE)}function sE(t){return bH(t,kg,yH)}var $2=Pu(Hi,"DataView"),z2=Pu(Hi,"Promise"),Yd=Pu(Hi,"Set"),ym=Pu(Hi,"WeakMap"),zN="[object Map]",Nnt="[object Object]",BN="[object Promise]",FN="[object Set]",HN="[object WeakMap]",WN="[object DataView]",Dnt=Eu($2),Rnt=Eu(fm),Int=Eu(z2),jnt=Eu(Yd),$nt=Eu(ym),ka=$a;($2&&ka(new $2(new ArrayBuffer(1)))!=WN||fm&&ka(new fm)!=zN||z2&&ka(z2.resolve())!=BN||Yd&&ka(new Yd)!=FN||ym&&ka(new ym)!=HN)&&(ka=function(t){var e=$a(t),o=e==Nnt?t.constructor:void 0,n=o?Eu(o):"";if(n)switch(n){case Dnt:return WN;case Rnt:return zN;case Int:return BN;case jnt:return FN;case $nt:return HN}return e});var znt=Object.prototype,Bnt=znt.hasOwnProperty;function Fnt(t){var e=t.length,o=new t.constructor(e);return e&&typeof t[0]=="string"&&Bnt.call(t,"index")&&(o.index=t.index,o.input=t.input),o}var Fy=Hi.Uint8Array;function lE(t){var e=new t.constructor(t.byteLength);return new Fy(e).set(new Fy(t)),e}function Hnt(t,e){var o=e?lE(t.buffer):t.buffer;return new t.constructor(o,t.byteOffset,t.byteLength)}var Wnt=/\w*$/;function Vnt(t){var e=new t.constructor(t.source,Wnt.exec(t));return e.lastIndex=t.lastIndex,e}var VN=ca?ca.prototype:void 0,UN=VN?VN.valueOf:void 0;function Unt(t){return UN?Object(UN.call(t)):{}}function xH(t,e){var o=e?lE(t.buffer):t.buffer;return new t.constructor(o,t.byteOffset,t.length)}var Gnt="[object Boolean]",Ynt="[object Date]",Xnt="[object Map]",qnt="[object Number]",Znt="[object RegExp]",Knt="[object Set]",Jnt="[object String]",Qnt="[object Symbol]",tit="[object ArrayBuffer]",eit="[object DataView]",oit="[object Float32Array]",nit="[object Float64Array]",iit="[object Int8Array]",rit="[object Int16Array]",ait="[object Int32Array]",sit="[object Uint8Array]",lit="[object Uint8ClampedArray]",cit="[object Uint16Array]",uit="[object Uint32Array]";function dit(t,e,o){var n=t.constructor;switch(e){case tit:return lE(t);case Gnt:case Ynt:return new n(+t);case eit:return Hnt(t,o);case oit:case nit:case iit:case rit:case ait:case sit:case lit:case cit:case uit:return xH(t,o);case Xnt:return new n;case qnt:case Jnt:return new n(t);case Znt:return Vnt(t);case Knt:return new n;case Qnt:return Unt(t)}}var GN=Object.create,h1=function(){function t(){}return function(e){if(!Ai(e))return{};if(GN)return GN(e);t.prototype=e;var o=new t;return t.prototype=void 0,o}}();function wH(t){return typeof t.constructor=="function"&&!nE(t)?h1(aE(t)):{}}var pit="[object Map]";function hit(t){return er(t)&&ka(t)==pit}var YN=Jl&&Jl.isMap,fit=YN?Cg(YN):hit,mit="[object Set]";function git(t){return er(t)&&ka(t)==mit}var XN=Jl&&Jl.isSet,vit=XN?Cg(XN):git,yit=1,bit=2,xit=4,_H="[object Arguments]",wit="[object Array]",_it="[object Boolean]",Sit="[object Date]",Cit="[object Error]",SH="[object Function]",Tit="[object GeneratorFunction]",Mit="[object Map]",kit="[object Number]",CH="[object Object]",Ait="[object RegExp]",Eit="[object Set]",Pit="[object String]",Oit="[object Symbol]",Lit="[object WeakMap]",Nit="[object ArrayBuffer]",Dit="[object DataView]",Rit="[object Float32Array]",Iit="[object Float64Array]",jit="[object Int8Array]",$it="[object Int16Array]",zit="[object Int32Array]",Bit="[object Uint8Array]",Fit="[object Uint8ClampedArray]",Hit="[object Uint16Array]",Wit="[object Uint32Array]",rn={};rn[_H]=rn[wit]=rn[Nit]=rn[Dit]=rn[_it]=rn[Sit]=rn[Rit]=rn[Iit]=rn[jit]=rn[$it]=rn[zit]=rn[Mit]=rn[kit]=rn[CH]=rn[Ait]=rn[Eit]=rn[Pit]=rn[Oit]=rn[Bit]=rn[Fit]=rn[Hit]=rn[Wit]=!0;rn[Cit]=rn[SH]=rn[Lit]=!1;function Xd(t,e,o,n,i,r){var a,s=e&yit,l=e&bit,d=e&xit;if(o&&(a=i?o(t,n,i,r):o(t)),a!==void 0)return a;if(!Ai(t))return t;var b=Ho(t);if(b){if(a=Fnt(t),!s)return p1(t,a)}else{var C=ka(t),u=C==SH||C==Tit;if(vm(t))return gH(t,s);if(C==CH||C==_H||u&&!i){if(a=l||u?{}:wH(t),!s)return l?Lnt(t,Tnt(a,t)):Pnt(t,xnt(a,t))}else{if(!rn[C])return i?t:{};a=dit(t,C,s)}}r||(r=new Pa);var j=r.get(t);if(j)return j;r.set(t,a),vit(t)?t.forEach(function(I){a.add(Xd(I,e,o,I,t,r))}):fit(t)&&t.forEach(function(I,W){a.set(W,Xd(I,e,o,W,t,r))});var A=d?l?sE:j2:l?kg:Mg,p=b?void 0:A(t);return cH(p||t,function(I,W){p&&(W=I,I=t[W]),tE(a,W,Xd(I,e,o,W,t,r))}),a}var Vit=1,Uit=4;function xr(t){return Xd(t,Vit|Uit)}function Git(t){return function(e,o,n){for(var i=-1,r=Object(e),a=n(e),s=a.length;s--;){var l=a[++i];if(o(r[l],l,r)===!1)break}return e}}var TH=Git();function cE(t,e){return t&&TH(t,e,Mg)}var Yit="__lodash_hash_undefined__";function Xit(t){return this.__data__.set(t,Yit),this}function qit(t){return this.__data__.has(t)}function bm(t){var e=-1,o=t==null?0:t.length;for(this.__data__=new xl;++e<o;)this.add(t[e])}bm.prototype.add=bm.prototype.push=Xit;bm.prototype.has=qit;function Zit(t,e){for(var o=-1,n=t==null?0:t.length;++o<n;)if(e(t[o],o,t))return!0;return!1}function MH(t,e){return t.has(e)}var Kit=1,Jit=2;function kH(t,e,o,n,i,r){var a=o&Kit,s=t.length,l=e.length;if(s!=l&&!(a&&l>s))return!1;var d=r.get(t),b=r.get(e);if(d&&b)return d==e&&b==t;var C=-1,u=!0,j=o&Jit?new bm:void 0;for(r.set(t,e),r.set(e,t);++C<s;){var A=t[C],p=e[C];if(n)var I=a?n(p,A,C,e,t,r):n(A,p,C,t,e,r);if(I!==void 0){if(I)continue;u=!1;break}if(j){if(!Zit(e,function(W,q){if(!MH(j,q)&&(A===W||i(A,W,o,n,r)))return j.push(q)})){u=!1;break}}else if(!(A===p||i(A,p,o,n,r))){u=!1;break}}return r.delete(t),r.delete(e),u}function Qit(t){var e=-1,o=Array(t.size);return t.forEach(function(n,i){o[++e]=[i,n]}),o}function uE(t){var e=-1,o=Array(t.size);return t.forEach(function(n){o[++e]=n}),o}var trt=1,ert=2,ort="[object Boolean]",nrt="[object Date]",irt="[object Error]",rrt="[object Map]",art="[object Number]",srt="[object RegExp]",lrt="[object Set]",crt="[object String]",urt="[object Symbol]",drt="[object ArrayBuffer]",prt="[object DataView]",qN=ca?ca.prototype:void 0,A_=qN?qN.valueOf:void 0;function hrt(t,e,o,n,i,r,a){switch(o){case prt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case drt:return!(t.byteLength!=e.byteLength||!r(new Fy(t),new Fy(e)));case ort:case nrt:case art:return wg(+t,+e);case irt:return t.name==e.name&&t.message==e.message;case srt:case crt:return t==e+"";case rrt:var s=Qit;case lrt:var l=n&trt;if(s||(s=uE),t.size!=e.size&&!l)return!1;var d=a.get(t);if(d)return d==e;n|=ert,a.set(t,e);var b=kH(s(t),s(e),n,i,r,a);return a.delete(t),b;case urt:if(A_)return A_.call(t)==A_.call(e)}return!1}var frt=1,mrt=Object.prototype,grt=mrt.hasOwnProperty;function vrt(t,e,o,n,i,r){var a=o&frt,s=j2(t),l=s.length,d=j2(e),b=d.length;if(l!=b&&!a)return!1;for(var C=l;C--;){var u=s[C];if(!(a?u in e:grt.call(e,u)))return!1}var j=r.get(t),A=r.get(e);if(j&&A)return j==e&&A==t;var p=!0;r.set(t,e),r.set(e,t);for(var I=a;++C<l;){u=s[C];var W=t[u],q=e[u];if(n)var X=a?n(q,W,u,e,t,r):n(W,q,u,t,e,r);if(!(X===void 0?W===q||i(W,q,o,n,r):X)){p=!1;break}I||(I=u=="constructor")}if(p&&!I){var H=t.constructor,D=e.constructor;H!=D&&"constructor"in t&&"constructor"in e&&!(typeof H=="function"&&H instanceof H&&typeof D=="function"&&D instanceof D)&&(p=!1)}return r.delete(t),r.delete(e),p}var yrt=1,ZN="[object Arguments]",KN="[object Array]",$0="[object Object]",brt=Object.prototype,JN=brt.hasOwnProperty;function xrt(t,e,o,n,i,r){var a=Ho(t),s=Ho(e),l=a?KN:ka(t),d=s?KN:ka(e);l=l==ZN?$0:l,d=d==ZN?$0:d;var b=l==$0,C=d==$0,u=l==d;if(u&&vm(t)){if(!vm(e))return!1;a=!0,b=!1}if(u&&!b)return r||(r=new Pa),a||oE(t)?kH(t,e,o,n,i,r):hrt(t,e,l,o,n,i,r);if(!(o&yrt)){var j=b&&JN.call(t,"__wrapped__"),A=C&&JN.call(e,"__wrapped__");if(j||A){var p=j?t.value():t,I=A?e.value():e;return r||(r=new Pa),i(p,I,o,n,r)}}return u?(r||(r=new Pa),vrt(t,e,o,n,i,r)):!1}function Ag(t,e,o,n,i){return t===e?!0:t==null||e==null||!er(t)&&!er(e)?t!==t&&e!==e:xrt(t,e,o,n,Ag,i)}var wrt=1,_rt=2;function Srt(t,e,o,n){var i=o.length,r=i;if(t==null)return!r;for(t=Object(t);i--;){var a=o[i];if(a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++i<r;){a=o[i];var s=a[0],l=t[s],d=a[1];if(a[2]){if(l===void 0&&!(s in t))return!1}else{var b=new Pa,C;if(!(C===void 0?Ag(d,l,wrt|_rt,n,b):C))return!1}}return!0}function AH(t){return t===t&&!Ai(t)}function Crt(t){for(var e=Mg(t),o=e.length;o--;){var n=e[o],i=t[n];e[o]=[n,i,AH(i)]}return e}function EH(t,e){return function(o){return o==null?!1:o[t]===e&&(e!==void 0||t in Object(o))}}function Trt(t){var e=Crt(t);return e.length==1&&e[0][2]?EH(e[0][0],e[0][1]):function(o){return o===t||Srt(o,t,e)}}var Mrt="[object Symbol]";function f1(t){return typeof t=="symbol"||er(t)&&$a(t)==Mrt}var krt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Art=/^\w*$/;function dE(t,e){if(Ho(t))return!1;var o=typeof t;return o=="number"||o=="symbol"||o=="boolean"||t==null||f1(t)?!0:Art.test(t)||!krt.test(t)||e!=null&&t in Object(e)}var Ert="Expected a function";function pE(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Ert);var o=function(){var n=arguments,i=e?e.apply(this,n):n[0],r=o.cache;if(r.has(i))return r.get(i);var a=t.apply(this,n);return o.cache=r.set(i,a)||r,a};return o.cache=new(pE.Cache||xl),o}pE.Cache=xl;var Prt=500;function Ort(t){var e=pE(t,function(n){return o.size===Prt&&o.clear(),n}),o=e.cache;return e}var Lrt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Nrt=/\\(\\)?/g,Drt=Ort(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Lrt,function(o,n,i,r){e.push(i?r.replace(Nrt,"$1"):n||o)}),e});function Eg(t,e){for(var o=-1,n=t==null?0:t.length,i=Array(n);++o<n;)i[o]=e(t[o],o,t);return i}var Rrt=1/0,QN=ca?ca.prototype:void 0,tD=QN?QN.toString:void 0;function hE(t){if(typeof t=="string")return t;if(Ho(t))return Eg(t,hE)+"";if(f1(t))return tD?tD.call(t):"";var e=t+"";return e=="0"&&1/t==-Rrt?"-0":e}function Ql(t){return t==null?"":hE(t)}function Gp(t,e){return Ho(t)?t:dE(t,e)?[t]:Drt(Ql(t))}var Irt=1/0;function Yp(t){if(typeof t=="string"||f1(t))return t;var e=t+"";return e=="0"&&1/t==-Irt?"-0":e}function m1(t,e){e=Gp(e,t);for(var o=0,n=e.length;t!=null&&o<n;)t=t[Yp(e[o++])];return o&&o==n?t:void 0}function tc(t,e,o){var n=t==null?void 0:m1(t,e);return n===void 0?o:n}function jrt(t,e){return t!=null&&e in Object(t)}function $rt(t,e,o){e=Gp(e,t);for(var n=-1,i=e.length,r=!1;++n<i;){var a=Yp(e[n]);if(!(r=t!=null&&o(t,a)))break;t=t[a]}return r||++n!=i?r:(i=t==null?0:t.length,!!i&&eE(i)&&Sg(a,i)&&(Ho(t)||gm(t)))}function PH(t,e){return t!=null&&$rt(t,e,jrt)}var zrt=1,Brt=2;function Frt(t,e){return dE(t)&&AH(e)?EH(Yp(t),e):function(o){var n=tc(o,t);return n===void 0&&n===e?PH(o,t):Ag(e,n,zrt|Brt)}}function g1(t){return t}function Hrt(t){return function(e){return e==null?void 0:e[t]}}function Wrt(t){return function(e){return m1(e,t)}}function Vrt(t){return dE(t)?Hrt(Yp(t)):Wrt(t)}function v1(t){return typeof t=="function"?t:t==null?g1:typeof t=="object"?Ho(t)?Frt(t[0],t[1]):Trt(t):Vrt(t)}function Urt(t,e){var o={};return e=v1(e),cE(t,function(n,i,r){_g(o,i,e(n,i,r))}),o}function Grt(t){for(var e=t.length,o=5381,n=52711,i;e--;)i=t.charCodeAt(e),o=o*33^i,n=n*33^i;return(o>>>0)*4096+(n>>>0)}var xm="|",Yrt=/\[object ([HTML|SVG](.*)Element)\]/,Xrt={"[object Arguments]":0,"[object Array]":1,"[object ArrayBuffer]":2,"[object AsyncFunction]":3,"[object AsyncGeneratorFunction]":4,"[object BigInt]":5,"[object BigInt64Array]":6,"[object BigUint64Array]":7,"[object Boolean]":8,"[object DataView]":9,"[object Date]":10,"[object DocumentFragment]":11,"[object Error]":12,"[object Event]":13,"[object Float32Array]":14,"[object Float64Array]":15,"[object Function]":16,"[object Generator]":17,"[object GeneratorFunction]":18,"[object Int8Array]":19,"[object Int16Array]":20,"[object Map]":21,"[object Number]":22,"[object Object]":23,"[object Promise]":24,"[object RegExp]":25,"[object Set]":26,"[object SharedArrayBuffer]":27,"[object String]":28,"[object Uint8Array]":29,"[object Uint8ClampedArray]":30,"[object Uint16Array]":31,"[object Uint32Array]":32,"[object WeakMap]":33,"[object WeakRef]":34,"[object WeakSet]":35,CUSTOM:36,ELEMENT:37},qrt={"[object Arguments]":1,"[object Array]":2},OH={"[object Generator]":1,"[object Promise]":2,"[object WeakMap]":3,"[object WeakRef]":4,"[object WeakSet]":5},Zrt={"[object AsyncFunction]":1,"[object AsyncGeneratorFunction]":2,"[object Boolean]":3,"[object Function]":4,"[object GeneratorFunction]":5,"[object Number]":6,"[object String]":7},Krt={"[object BigInt64Array]":1,"[object BigUint64Array]":2,"[object Float32Array]":3,"[object Float64Array]":4,"[object Int8Array]":5,"[object Int16Array]":6,"[object Uint8Array]":7,"[object Uint8ClampedArray]":8,"[object Uint16Array]":9,"[object Uint32Array]":10},Jrt={"[object Arguments]":1,"[object Array]":2,"[object ArrayBuffer]":3,"[object BigInt64Array]":4,"[object BigUint64Array]":5,"[object DataView]":6,"[object Float32Array]":7,"[object Float64Array]":8,"[object Int8Array]":9,"[object Int16Array]":10,"[object Map]":11,"[object Object]":12,"[object Set]":13,"[object SharedArrayBuffer]":14,"[object Uint8Array]":15,"[object Uint8ClampedArray]":16,"[object Uint16Array]":17,"[object Uint32Array]":18,CUSTOM:19},xf={bigint:"i",boolean:"b",empty:"e",function:"g",number:"n",object:"o",string:"s",symbol:"s"};function Qrt(t,e){return t[0]>e[0]}function LH(t,e){return t>e}function fE(t,e){for(var o,n,i=0;i<t.length;++i){for(n=t[i],o=i-1;~o&&e(t[o],n);--o)t[o+1]=t[o];t[o+1]=n}return t}function _i(t,e){return xf.object+xm+Xrt[t]+xm+e}var eD=new WeakMap,tat=0;function B2(t,e){var o=eD.get(t);if(o)return o;var n=_i(e,"NOT_ENUMERABLE"+xm+tat++);return eD.set(t,n),n}var eat=Object.prototype.toString;function oat(t,e,o){if(Jrt[e])return oD(e,t,o);if(e==="[object Date]")return _i(e,t.getTime());if(e==="[object RegExp]")return _i(e,t.toString());if(e==="[object Event]")return _i(e,[t.bubbles,t.cancelBubble,t.cancelable,t.composed,t.currentTarget,t.defaultPrevented,t.eventPhase,t.isTrusted,t.returnValue,t.target,t.type].join());if(e==="[object Error]")return _i(e,t.message+xm+t.stack);if(e==="[object DocumentFragment]")return _i(e,sat(t));var n=e.match(Yrt);return n?_i("ELEMENT",n[1]+xm+t.outerHTML):OH[e]?B2(t,e):Zrt[e]?_i(e,t.toString()):oD("CUSTOM",t,o)}function oD(t,e,o){var n=o.cache.get(e);return n?_i(t,"RECURSIVE~"+n):(o.cache.set(e,++o.id),t==="[object Object]"?e[Symbol.iterator]?B2(e,t):_i(t,iD(e,o)):qrt[t]?_i(t,nat(e,o)):t==="[object Map]"?_i(t,lat(e,o)):t==="[object Set]"?_i(t,cat(e,o)):Krt[t]?_i(t,e.join()):t==="[object ArrayBuffer]"?_i(t,nD(e)):t==="[object DataView]"?_i(t,nD(e.buffer)):OH[t]?B2(e,t):_i("CUSTOM",iD(e,o)))}function nat(t,e){for(var o=t.length,n=new Array(o);--o>=0;)n[o]=up(t[o],e);return n.join()}function iat(t){return Buffer.from(t).toString("utf8")}function rat(t){return String.fromCharCode.apply(null,new Uint16Array(t))}function aat(){return"UNSUPPORTED"}function sat(t){for(var e=t.children,o=e.length,n=new Array(o);--o>=0;)n[o]=e[o].outerHTML;return n.join()}var nD=typeof Buffer<"u"&&typeof Buffer.from=="function"?iat:typeof Uint16Array=="function"?rat:aat;function lat(t,e){var o=new Array(t.size),n=0;for(t.forEach(function(i,r){o[n++]=[up(r,e),up(i,e)]}),fE(o,Qrt);--n>=0;)o[n]="["+o[n][0]+","+o[n][1]+"]";return"["+o.join()+"]"}function iD(t,e){for(var o=fE(Object.getOwnPropertyNames(t),LH),n=o.length,i=new Array(n),r=n;--r>=0;)i[r]=o[r]+":"+up(t[o[r]],e);return"{"+i.join()+"}"}function cat(t,e){var o=new Array(t.size),n=0;return t.forEach(function(i){o[n++]=up(i,e)}),"["+fE(o,LH).join()+"]"}function up(t,e){var o=typeof t;return t==null||o==="undefined"?xf.empty+t:o==="object"?oat(t,eat.call(t),e||{cache:new WeakMap,id:1}):o==="function"||o==="symbol"?xf[o]+t.toString():o==="boolean"?xf.boolean+ +t:xf[o]+t}function NH(t){return Grt(up(t,void 0))}function F2(t,e,o){(o!==void 0&&!wg(t[e],o)||o===void 0&&!(e in t))&&_g(t,e,o)}function DH(t){return er(t)&&Tg(t)}var uat="[object Object]",dat=Function.prototype,pat=Object.prototype,RH=dat.toString,hat=pat.hasOwnProperty,fat=RH.call(Object);function IH(t){if(!er(t)||$a(t)!=uat)return!1;var e=aE(t);if(e===null)return!0;var o=hat.call(e,"constructor")&&e.constructor;return typeof o=="function"&&o instanceof o&&RH.call(o)==fat}function H2(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function mat(t){return Up(t,kg(t))}function gat(t,e,o,n,i,r,a){var s=H2(t,o),l=H2(e,o),d=a.get(l);if(d){F2(t,o,d);return}var b=r?r(s,l,o+"",t,e,a):void 0,C=b===void 0;if(C){var u=Ho(l),j=!u&&vm(l),A=!u&&!j&&oE(l);b=l,u||j||A?Ho(s)?b=s:DH(s)?b=p1(s):j?(C=!1,b=gH(l,!0)):A?(C=!1,b=xH(l,!0)):b=[]:IH(l)||gm(l)?(b=s,gm(s)?b=mat(s):(!Ai(s)||sl(s))&&(b=wH(l))):C=!1}C&&(a.set(l,b),i(b,l,n,r,a),a.delete(l)),F2(t,o,b)}function mE(t,e,o,n,i){t!==e&&TH(e,function(r,a){if(i||(i=new Pa),Ai(r))gat(t,e,a,o,mE,n,i);else{var s=n?n(H2(t,a),r,a+"",t,e,i):void 0;s===void 0&&(s=r),F2(t,a,s)}},kg)}function y1(t,e,o){switch(o.length){case 0:return t.call(e);case 1:return t.call(e,o[0]);case 2:return t.call(e,o[0],o[1]);case 3:return t.call(e,o[0],o[1],o[2])}return t.apply(e,o)}var rD=Math.max;function jH(t,e,o){return e=rD(e===void 0?t.length-1:e,0),function(){for(var n=arguments,i=-1,r=rD(n.length-e,0),a=Array(r);++i<r;)a[i]=n[e+i];i=-1;for(var s=Array(e+1);++i<e;)s[i]=n[i];return s[e]=o(a),y1(t,this,s)}}function vat(t){return function(){return t}}var yat=By?function(t,e){return By(t,"toString",{configurable:!0,enumerable:!1,value:vat(e),writable:!0})}:g1,bat=800,xat=16,wat=Date.now;function $H(t){var e=0,o=0;return function(){var n=wat(),i=xat-(n-o);if(o=n,i>0){if(++e>=bat)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var gE=$H(yat);function b1(t,e){return gE(jH(t,e,g1),t+"")}function zH(t,e,o){if(!Ai(o))return!1;var n=typeof e;return(n=="number"?Tg(o)&&Sg(e,o.length):n=="string"&&e in o)?wg(o[e],t):!1}function BH(t){return b1(function(e,o){var n=-1,i=o.length,r=i>1?o[i-1]:void 0,a=i>2?o[2]:void 0;for(r=t.length>3&&typeof r=="function"?(i--,r):void 0,a&&zH(o[0],o[1],a)&&(r=i<3?void 0:r,i=1),e=Object(e);++n<i;){var s=o[n];s&&t(e,s,n,r)}return e})}var vE=BH(function(t,e,o){mE(t,e,o)});function yE(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}function FH(t,e,o){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),o=o>i?i:o,o<0&&(o+=i),i=e>o?0:o-e>>>0,e>>>=0;for(var r=Array(i);++n<i;)r[n]=t[n+e];return r}function _at(t,e){return e.length<2?t:m1(t,FH(e,0,-1))}function Sat(t,e){return e=Gp(e,t),t=_at(t,e),t==null||delete t[Yp(yE(e))]}function Cat(t){return IH(t)?void 0:t}var aD=ca?ca.isConcatSpreadable:void 0;function Tat(t){return Ho(t)||gm(t)||!!(aD&&t&&t[aD])}function HH(t,e,o,n,i){var r=-1,a=t.length;for(o||(o=Tat),i||(i=[]);++r<a;){var s=t[r];o(s)?rE(i,s):n||(i[i.length]=s)}return i}function Mat(t){var e=t==null?0:t.length;return e?HH(t):[]}function x1(t){return gE(jH(t,void 0,Mat),t+"")}var kat=1,Aat=2,Eat=4,w1=x1(function(t,e){var o={};if(t==null)return o;var n=!1;e=Eg(e,function(r){return r=Gp(r,t),n||(n=r.length>1),r}),Up(t,sE(t),o),n&&(o=Xd(o,kat|Aat|Eat,Cat));for(var i=e.length;i--;)Sat(o,e[i]);return o});let Pg=class extends c1{constructor(e,o){super(aH,{key:e,interpolationOptions:o},ket.t)}},_1=class{constructor(e,o,n,i,r){this._name=e,this.type=o,this.description=n||"",i&&(this._dataSource=i),r&&(this.composeCode=r)}get name(){return this._name}set name(e){this._name=e}get dataSource(){return this._dataSource}serialize(){return{name:this.name,type:this.type,description:this.description,dataSource:this.dataSource,composeCode:this.composeCode,__serializable:"DimensionalElement"}}toJSON(){return this.serialize()}toString(){return this.jaql()}};function Bl(t){let e=t.replace(/[^a-zA-Z0-9_.]/g,"").replace(/\./g,"_");return e.charAt(0).match(/[0-9]/)&&(e="_"+e),e}const bE="DM",no={Sum:"sum",Average:"avg",Min:"min",Max:"max",Count:"count",CountDistinct:"countDistinct",Median:"median",Variance:"var",StandardDeviation:"stdev"};exports.Li=void 0;(function(t){t[t.None=0]="None",t[t.Ascending=1]="Ascending",t[t.Descending=2]="Descending"})(exports.Li=exports.Li||(exports.Li={}));const qe={Measure:"measure",MeasureTemplate:"measuretemplate",BaseMeasure:"basemeasure",CalculatedMeasure:"calculatedmeasure",Dimension:"dimension",DateDimension:"datedimension",TextDimension:"textdimension",NumericDimension:"numericdimension",DateLevel:"datelevel",Attribute:"attribute",TextAttribute:"text-attribute",NumericAttribute:"numeric-attribute",Filter:"filter",DimensionFilter:"dimensionfilter",MeasureFilter:"measurefilter",isMetadata(t){return qe.isMeasure(t)||qe.isDimension(t)||qe.isAttribute(t)||qe.isFilter(t)},isMeasureTemplate(t){return t?typeof t=="string"?t.toLowerCase()===qe.MeasureTemplate:t.agg==="*"||t.aggregation==="*"||t.type&&t.type.toLowerCase()===qe.MeasureTemplate:!1},isBaseMeasure(t){return t?typeof t=="string"?t.toLowerCase()===qe.BaseMeasure:(t.agg||t.aggregation)&&(t.attribute||t.jaql)&&!this.isMeasureTemplate(t):!1},isMeasure(t){if(!t)return!1;if(typeof t=="string"){const e=t;return e.toLowerCase()===qe.Measure||e.toLowerCase()===qe.BaseMeasure||e.toLowerCase()===qe.MeasureTemplate||e.toLowerCase()===qe.CalculatedMeasure}return this.isBaseMeasure(t)||this.isCalculatedMeasure(t)||this.isMeasureTemplate(t)},isCalculatedMeasure(t){return t?typeof t=="string"?t.toLowerCase()===qe.CalculatedMeasure:(t.expression||t.formula)&&t.context:!1},isDateDimension(t){return t?typeof t=="string"?t.toLowerCase()===qe.DateDimension:(t.dim||t.expression)&&t.level:!1},isTextDimension(t){return t&&typeof t=="string"?t.toLowerCase()===qe.TextDimension:!1},isNumericDimension(t){return t&&typeof t=="string"?t.toLowerCase()===qe.NumericDimension:!1},isDimension(t){if(t&&typeof t=="object"&&(t=t.type),typeof t=="string"){const e=t;return e.toLowerCase()===qe.DateDimension||e.toLowerCase()===qe.Dimension||e.toLowerCase()===qe.TextDimension||e.toLowerCase()===qe.NumericDimension}return!1},isAttribute(t){if(typeof t=="string"){const e=t;return e.toLowerCase()===qe.Attribute||e.toLowerCase()===qe.TextAttribute||e.toLowerCase()===qe.NumericAttribute||e.toLowerCase()===qe.DateLevel}return t&&t.type?this.isAttribute(t.type):!1},isFilter(t){if(t&&typeof t=="object"&&(t=t.type),typeof t=="string"){const e=t;return e.toLowerCase()===qe.Filter||e.toLowerCase()===qe.DimensionFilter||e.toLowerCase()===qe.MeasureFilter}return!1}},pe={Years:"Years",Quarters:"Quarters",Months:"Months",Weeks:"Weeks",Days:"Days",Hours:"Hours",MinutesRoundTo30:"MinutesRoundTo30",MinutesRoundTo15:"MinutesRoundTo15",Minutes:"Minutes",Seconds:"Seconds",AggHours:"AggHours",AggMinutesRoundTo30:"AggMinutesRoundTo30",AggMinutesRoundTo15:"AggMinutesRoundTo15",AggMinutesRoundTo1:"AggMinutesRoundTo1",get all(){return[pe.Years,pe.Quarters,pe.Months,pe.Weeks,pe.Days,pe.Hours,pe.MinutesRoundTo30,pe.MinutesRoundTo15,pe.Minutes,pe.Seconds,pe.AggHours,pe.AggMinutesRoundTo30,pe.AggMinutesRoundTo15,pe.AggMinutesRoundTo1]}};var Zv;(function(t){t.TEXT="text",t.NUMERIC="numeric",t.DATETIME="datetime"})(Zv=Zv||(Zv={}));var Uf;(function(t){t.ASC="asc",t.DESC="desc"})(Uf=Uf||(Uf={}));var E_;(function(t){t.PRE="pre",t.POST="post"})(E_=E_||(E_={}));function W2(t,e=[]){try{return t==null?String(t):typeof t=="string"?`'${tH(t)}'`:typeof t=="number"||typeof t=="boolean"?String(t):t instanceof Date?`new Date('${t.toISOString()}')`:Array.isArray(t)?`[${t.map(o=>W2(o,e)).join(", ")}]`:typeof t=="object"&&t!==null?"composeCode"in t?t.composeCode:`{ ${Object.entries(t).filter(([o])=>!e.includes(o)).map(([o,n])=>`${/[^a-zA-Z0-9_$]/.test(o)?`'${o}'`:o}: ${W2(n,e)}`).join(", ")} }`:JSON.stringify(t)}catch(o){return console.error(o,JSON.stringify(t,null,2)),JSON.stringify(t)}}function Pat(t){let e=t.length;for(;e>0&&t[e-1]===void 0;)e--;return t.slice(0,e)}function S1(t,e){return function(o){return function(...n){const i=Pat(n),r=i.length,a=i.map(d=>W2(d,["guid"])).filter((d,b)=>!(["","{ }","[]","undefined","null"].includes(d)&&b===r-1)).join(", "),s=`${t}.${e??o.name}(${a})`,l=o(...n);return l.composeCode=s,l}}}function mo(t,e){return S1("filterFactory",e)(t)}function sD(t,e){return S1("filterFactory.logic",e)(t)}function WH(t,e){return S1("analyticsFactory",e)(t)}function za(t,e){return S1("measureFactory",e)(t)}function Oat(t,e,o){if(typeof o=="number")t.push(o.toString());else if(o&&qe.isMeasureTemplate(o.type)){o=o.sum();const n=`[${Bl(o.name)}]`;t.push(n),e[n]=o}else if(o&&qe.isMeasure(o.type)){const n=`[${Bl(o.name)}]`;t.push(n),e[n]=o}else if(o&&qe.isFilter(o.type)){const n=`[${Bl(o.name)}]`;t.push(n),e[n]=o}else if(o&&qe.isAttribute(o.type)){const n=`[${Bl(o.name)}]`;t.push(n),e[n]=o}}function VH(t,e,o,n){const i={},r=[o+"("];return Oat(r,i,t),n&&r.push(`, ${n}`),r.push(")"),new qH(e,r.join(""),i)}const ji=za((t,e,o)=>{const n=Object.fromEntries(Object.entries(o).map(([i,r])=>[i.startsWith("[")?i:`[${i}]`,r]));return new qH(t,e,n)},"customFormula"),ll=za((t,e,o,n)=>new C1(o??`${e.toString()} ${t.name}`,t,e,n),"aggregate"),lD=za((t,e,o)=>ll(t,no.Sum,e,o),"sum"),Lat=za((t,e,o)=>ll(t,no.Average,e,o),"avg"),UH=za((t,e,o)=>ll(t,no.Min,e,o),"min"),GH=za((t,e,o)=>ll(t,no.Max,e,o),"max"),Nat=za((t,e,o)=>ll(t,no.Median,e,o),"median"),Dat=za((t,e,o)=>ll(t,no.Count,e,o),"count"),YH=za((t,e,o)=>ll(t,no.CountDistinct,e,o),"countDistinct"),Rat=za((t,e,o)=>{let n;const i=r=>r.replace("advancedSmoothing","smooth").replace("localEstimates","local");return o&&(n=Object.entries(o).map(r=>i(`"${r[0]}=${r[1]}"`)).join(",")),VH(t,e??t.name+" Trend","trend",n)},"trend"),Iat=za((t,e,o)=>{let n;if(o){const i=Object.assign({forecastHorizon:3},o);if(i.startDate){const r=new Date(i.startDate);i.startDate=r.toISOString().replace(/.\d+Z$/g,"")}if(i.endDate){const r=new Date(i.endDate);i.endDate=r.toISOString().replace(/.\d+Z$/g,"")}n=Object.entries(i).map(r=>`"${r[0]}=${r[1]}"`).join(",")}else n='"forecastHorizon=3"';return VH(t,e??t.name+" Forecast","forecast",n)},"forecast");let XH=class extends _1{constructor(e,o,n,i,r,a,s){super(e,o,i,a,s),this._sort=exports.Li.None,this._format="#,#.00",this._format=n,this._sort=r||exports.Li.None}getSort(){return this._sort}getFormat(){return this._format}serialize(){const e=super.serialize();return this.getFormat()!==void 0&&(e.format=this.getFormat()),this.getSort()!==void 0&&(e.sort=this.getSort()),e}},C1=class Kv extends XH{constructor(e,o,n,i,r,a,s,l){super(e,qe.BaseMeasure,i,r,a,s,l),this.attribute=o,this.aggregation=n}static aggregationFromJAQL(e){switch(e){case"sum":return no.Sum;case"avg":return no.Average;case"min":return no.Min;case"max":return no.Max;case"countduplicates":return no.Count;case"median":return no.Median;case"count":return no.CountDistinct;case"var":return no.Variance;case"stdev":return no.StandardDeviation}return no.Sum}static aggregationToJAQL(e){switch(e){case no.Sum:return"sum";case no.Average:return"avg";case no.Min:return"min";case no.Max:return"max";case no.Count:return"countduplicates";case no.CountDistinct:return"count";case no.Median:return"median";case no.Variance:return"var";case no.StandardDeviation:return"stdev"}return no.Sum}sort(e){return new Kv(this.name,this.attribute,this.aggregation,this._format,this.description,e,this.dataSource,this.composeCode)}format(e){return new Kv(this.name,this.attribute,this.aggregation,e,this.description,this._sort,this.dataSource,this.composeCode)}get id(){return`${this.attribute.expression}_${this.aggregation}`}serialize(){const e=super.serialize();return e.__serializable="DimensionalBaseMeasure",e.aggregation=this.aggregation,e.attribute=this.attribute.serialize(),e}jaql(e){const o=this.attribute.jaql(!0),n={jaql:Object.assign(Object.assign({},o),{title:this.name,agg:Kv.aggregationToJAQL(this.aggregation)})};return this._format&&(n.format={number:this._format}),this._sort!=exports.Li.None&&(n.jaql.sort=this._sort==exports.Li.Ascending?"asc":"desc"),e===!0?n.jaql:n}},qH=class V2 extends XH{constructor(e,o,n,i,r,a,s,l){super(e,qe.CalculatedMeasure,i,r,a,s,l),this.expression=o,this.context=n}sort(e){return new V2(this.name,this.expression,this.context,this._format,this.description,e,this.dataSource,this.composeCode)}format(e){return new V2(this.name,this.expression,this.context,e,this.description,this._sort,this.dataSource,this.composeCode)}get id(){return this.expression}serialize(){const e=super.serialize();return e.__serializable="DimensionalCalculatedMeasure",e.expression=this.expression,e.context=Object.fromEntries(Object.entries(this.context).map(([o,n])=>[o,n.serialize?n.serialize(n):n])),e}jaql(e){const o={jaql:{title:this.name,formula:this.expression}},n={};return Object.getOwnPropertyNames(this.context).forEach(i=>n[i]=this.context[i].jaql(!0)),o.jaql.context=n,this._format&&(o.format={number:this._format}),this._sort!=exports.Li.None&&(o.jaql.sort=this._sort==exports.Li.Ascending?"asc":"desc"),e===!0?o.jaql:o}};function cl(t,e){return Ag(t,e)}const T1=()=>({guid:S8(13),disabled:!1,locked:!1}),ZH=()=>Object.assign(Object.assign({},T1()),{excludeMembers:!1,enableMultiSelection:!0,deactivatedMembers:[]});function jat(t){return"excludeMembers"in t}const KH=t=>{const e=jat(t)?ZH():T1();return Object.fromEntries(Object.entries(t).filter(([o,n])=>!cl(n,e[o])))},Ls={Contains:"contains",StartsWith:"startsWith",EndsWith:"endsWith",Equals:"equals",DoesntEqual:"doesntEqual",DoesntStartWith:"doesntStartWith",DoesntContain:"doesntContain",DoesntEndWith:"doesntEndWith",Like:"like"},Bi={Equals:"equals",DoesntEqual:"doesntEqual",From:"from",FromNotEqual:"fromNotEqual",To:"to",ToNotEqual:"toNotEqual"},dp={From:"from",To:"to",Last:"last",Next:"next",Anchor:"Anchor"},JH={Union:"or",Intersection:"and",Exclude:"exclude"},xE={Top:"top",Bottom:"bottom"},Gn={logicalAttribute:"logicalAttribute",members:"members",exclude:"exclude",measure:"measure",ranking:"ranking",text:"text",numeric:"numeric",dateRange:"dateRange",relativeDate:"relativeDate",cascading:"cascading",advanced:"advanced"};let Ts=class U2 extends _1{constructor(e,o,n,i){super("filter",qe.Filter,void 0,void 0,i),this.filterType=o,this.isScope=!0,U2.checkAttributeSupport(e),this.attribute=e,this.config=vE({},T1(),n??{})}get name(){return NH(this.jaql()).toString(16)}serialize(){const e=super.serialize();return e.__serializable="AbstractFilter",e.filterType=this.filterType,e.attribute=this.attribute.serialize(),this.config&&(e.config=this.config),e.composeCode=this.composeCode,e}jaql(e){if(this.config.disabled)return U2.disabledJaql(e);const o=this.attribute.jaql(!1),n=this.attribute;if(n.getFormat&&n.getFormat()!==void 0){const i=n.translateGranularityToJaql();o.format={mask:{[i.level]:n.getFormat()}}}return o.jaql.filter=this.filterJaql(),this.attribute.dataSource&&(o.jaql.datasource=this.attribute.dataSource),this.isScope&&(o.panel="scope"),e===!0?o.jaql:o}static checkAttributeSupport(e){const{granularity:o}=e;if(o===pe.Hours||o===pe.MinutesRoundTo30||o===pe.MinutesRoundTo15||o===pe.Minutes||o===pe.Seconds)throw new Pg("errors.filter.unsupportedDatetimeLevel")}static disabledJaql(e){return e?{filter:{}}:{jaql:{filter:{}}}}},QH=class extends Ts{constructor(e,o,n,i){super(e[0].attribute,Gn.logicalAttribute,n,i),this.operator=o,this.filters=e}get id(){return`${this.operator}_${this.filters.map(e=>e.id).join()}`}serialize(){const e=super.serialize();return e.__serializable="LogicalAttributeFilter",e.operator=this.operator,e.filters=this.filters.map(o=>o.serialize()),e}filterJaql(){const e={};return e[this.operator]=this.filters.map(o=>o.filterJaql()),e}},$at=class extends Ts{constructor(e,o,n,i){if(super(e,Gn.members,void 0,i),this.members=o??[],this.members.filter(r=>r==null).length>0)throw new Pg("errors.filter.membersFilterNullMember",{attributeId:e.id});this.config=vE({},ZH(),n??{})}get id(){return`${this.attribute.id}_${this.members.map(e=>e.toString()).join()}`}get name(){return NH([this.jaql(),w1(this.config,["guid","originalFilterJaql"])]).toString(16)}serialize(){const e=super.serialize();return e.__serializable="MembersFilter",this.config&&(e.config=this.config.backgroundFilter?Object.assign(Object.assign({},this.config),{backgroundFilter:this.config.backgroundFilter.serialize()}):this.config),e.members=this.members,e}filterJaql(){const e={members:this.members.map(n=>n.toString())},o=this.config.excludeMembers?{exclude:e}:e;return this.config.backgroundFilter?{and:[o,this.config.backgroundFilter.filterJaql()]}:o}},t8=class extends Ts{constructor(e,o,n){super(e[0].attribute,Gn.cascading,o,n),this._filters=e}get filters(){const{disabled:e,locked:o}=this.config;return this._filters.map(n=>(n.config=Object.assign(Object.assign({},n.config),{disabled:e,locked:o}),n))}get id(){return`${this.filterType}_${this._filters.map(e=>e.id).join()}`}serialize(){const e=super.serialize();return e.__serializable="CascadingFilter",e._filters=this.filters.map(o=>o.serialize()),e}filterJaql(){return{}}jaql(e){return this.config.disabled?Ts.disabledJaql(e):this.filters.map(o=>(o.isScope=!0,o.jaql(e)))}},zat=class extends Ts{constructor(e,o,n,i){super(e.attribute,Gn.exclude,n,i),this.input=o,this.filter=e}get id(){let e=`exclude_${this.filter.id}`;return this.input&&(e+="_from_"+this.input.id),e}serialize(){const e=super.serialize();return e.__serializable="ExcludeFilter",e.filter=this.filter.serialize(),this.input&&(e.input=this.input.serialize()),e}filterJaql(){const e={},o=this.filter.filterJaql();return this.input?(e.filter=this.input.filterJaql(),e.filter.filter={exclude:o}):e.exclude=o,e}},M1=class extends Ts{constructor(e,o,n,i,r,a,s,l){super(e,o,s,l),n&&i!==void 0&&(this.valueA=i,this.operatorA=n),r&&a!==void 0&&(this.operatorB=r,this.valueB=a)}get id(){let e=`${this.attribute.id}`;return this.operatorA&&this.valueA!==void 0&&(e+=`_${this.operatorA}:${this.valueA}`),this.operatorB&&this.valueB!==void 0&&(e+=`_${this.operatorB}:${this.valueB}`),e}serialize(){const e=super.serialize();return e.__serializable="DoubleOperatorFilter",this.operatorA&&(e.operatorA=this.operatorA),this.operatorB&&(e.operatorB=this.operatorB),this.valueA!==void 0&&(e.valueA=this.valueA),this.valueB!==void 0&&(e.valueB=this.valueB),e}filterJaql(){const e={};return this.operatorA&&this.valueA!==void 0&&(e[this.operatorA]=this.valueA),this.operatorB&&this.valueB!==void 0&&(e[this.operatorB]=this.valueB),e}},Bat=class extends M1{constructor(e,o,n,i,r,a,s,l){super(e,Gn.measure,n,i,r,a,s,l),this.measure=o}get id(){let e=`${this.attribute.id}_${this.measure.id}`;return this.operatorA&&this.valueA!==void 0&&(e+=`_${this.operatorA}:${this.valueA}`),this.operatorB&&this.valueB!==void 0&&(e+=`_${this.operatorB}${this.valueB}`),e}serialize(){const e=super.serialize();return e.__serializable="MeasureFilter",e.measure=this.measure.serialize(),e}jaql(e){if(this.config.disabled)return Ts.disabledJaql(e);const o=super.jaql(e);return this.measure instanceof C1&&Object.entries(this.measure.jaql().jaql).forEach(([n,i])=>{o.jaql[n]=i}),o}},e8=class extends Ts{constructor(e,o,n,i,r,a){super(e,Gn.ranking,r,a),this.count=i,this.operator=n,this.measure=o}get id(){return`${this.operator}_${this.count}_${this.attribute.id}_by_${this.measure.id}`}serialize(){const e=super.serialize();return e.__serializable="RankingFilter",e.count=this.count,e.operator=this.operator,e.measure=this.measure.serialize(),e}filterJaql(){const e={};return e[this.operator]=this.count,e.by=this.measure.jaql(!0),e}},Fat=class extends M1{constructor(e,o,n,i,r,a,s){super(e,Gn.numeric,o,n,i,r,a,s)}serialize(){const e=super.serialize();return e.__serializable="NumericFilter",e}},wl=class extends M1{constructor(e,o,n,i,r){super(e,Gn.text,o,n,void 0,void 0,i,r)}serialize(){const e=super.serialize();return e.__serializable="TextFilter",e}},Hat=class extends M1{constructor(e,o,n,i,r){super(e,Gn.dateRange,dp.From,o,dp.To,n,i,r),typeof o=="object"&&(this.valueA=o.toISOString()),typeof n=="object"&&(this.valueB=n.toISOString())}get level(){return this.attribute}get from(){return this.valueA}get to(){return this.valueB}filterJaql(){return super.filterJaql()}serialize(){const e=super.serialize();return e.__serializable="DateRangeFilter",e}},wE=class extends Ts{constructor(e,o,n,i,r,a,s){super(e,Gn.relativeDate,a,s),i||(i=dp.Next),this.anchor=r,this.operator=i,this.offset=o,this.count=n}get level(){return this.attribute}get id(){let e=`${this.level.id}_${this.operator}_${this.offset}_${this.count}`;return this.anchor&&(typeof this.anchor=="string"?e+=`_${this.anchor}`:typeof this.anchor=="object"&&(e+=`_${this.anchor.toISOString()}`)),e}serialize(){const e=super.serialize();return e.__serializable="RelativeDateFilter",e.offset=this.offset,e.count=this.count,e.operator=this.operator,this.anchor&&(e.anchor=typeof this.anchor=="string"?this.anchor:this.anchor.toISOString()),e}filterJaql(){const e={};return e[this.operator]={offset:this.offset,count:this.count},this.anchor&&(typeof this.anchor=="string"?e[this.operator].anchor=this.anchor:typeof this.anchor=="object"&&(e[this.operator].anchor=this.anchor.toISOString())),e}},Wat=class extends Ts{constructor(e,o,n,i){super(e,Gn.advanced,n,i),delete o.filterType,this.jaqlExpression=o}get id(){return`custom_${this.attribute.id}_${this.config.guid}`}filterJaql(){return this.jaqlExpression}serialize(){const e=super.serialize();return e.__serializable="CustomFilter",e.jaqlExpression=this.jaqlExpression,e}};function Vat(t){return"filterType"in t&&t.filterType===Gn.advanced}function k1(t){return"filterType"in t&&t.filterType===Gn.members}function Uat(t){return"filterType"in t&&t.filterType===Gn.numeric}function Gat(t){return"filterType"in t&&t.filterType===Gn.ranking}function Yat(t){return"filterType"in t&&t.filterType===Gn.measure}function vc(t){return"filterType"in t&&t.filterType===Gn.cascading}function Xat(t){return"filterType"in t&&t.filterType===Gn.relativeDate}function qat(t){return"filterType"in t&&t.filterType===Gn.text}function Zat(t){return"filterType"in t&&t.filterType===Gn.dateRange}const Kat=mo((t,e)=>new QH(t,JH.Union,e),"union"),Jat=mo((t,e)=>new QH(t,JH.Intersection,e),"intersection"),_E=mo((t,e,o)=>new zat(t,e,o),"exclude"),o8=mo((t,e,o)=>new wl(t,Ls.DoesntContain,e,o),"doesntContain"),n8=mo((t,e,o)=>new wl(t,Ls.DoesntEndWith,e,o),"doesntEndWith"),i8=mo((t,e,o)=>new wl(t,Ls.DoesntStartWith,e,o),"doesntStartWith"),r8=mo((t,e,o)=>new wl(t,Ls.Contains,e,o),"contains"),a8=mo((t,e,o)=>new wl(t,Ls.EndsWith,e,o),"endsWith"),s8=mo((t,e,o)=>new wl(t,Ls.StartsWith,e,o),"startsWith"),Qat=mo((t,e,o)=>new wl(t,Ls.Like,e,o),"like"),l8=mo((t,e,o)=>typeof e=="string"?new wl(t,Ls.DoesntEqual,e,o):Ou(t,Bi.DoesntEqual,e,void 0,void 0,o),"doesntEqual"),c8=mo((t,e,o)=>typeof e=="string"?new wl(t,Ls.Equals,e,o):Ou(t,Bi.Equals,e,void 0,void 0,o),"equals"),u8=mo((t,e,o)=>Ou(t,Bi.FromNotEqual,e,void 0,void 0,o),"greaterThan"),d8=mo((t,e,o)=>Ou(t,Bi.From,e,void 0,void 0,o),"greaterThanOrEqual"),p8=mo((t,e,o)=>Ou(t,Bi.ToNotEqual,e,void 0,void 0,o),"lessThan"),h8=mo((t,e,o)=>Ou(t,Bi.To,e,void 0,void 0,o),"lessThanOrEqual"),Hy=mo((t,e,o,n)=>Ou(t,Bi.From,e,Bi.To,o,n),"between"),Ou=mo((t,e,o,n,i,r)=>new Fat(t,e,o,n,i,r),"numeric"),yc=mo((t,e,o)=>new $at(t,e,o),"members"),f8=mo((t,e,o,n)=>new Hat(t,e,o,n),"dateRange"),tst=mo((t,e,o,n,i)=>new wE(t,e,o,void 0,n,i),"dateRelative"),m8=mo((t,e,o,n,i)=>new wE(t,e,o,dp.Next,n,i),"dateRelativeFrom"),g8=mo((t,e,o,n,i)=>new wE(t,e,o,dp.Last,n,i),"dateRelativeTo");function Xp(t,e,o,n,i,r,a){return new Bat(t,e,o,n,i,r,a)}const est=mo((t,e,o)=>Xp(t.attribute,t,Bi.Equals,e,void 0,void 0,o),"measureEquals"),ost=mo((t,e,o)=>Xp(t.attribute,t,Bi.FromNotEqual,e,void 0,void 0,o),"measureGreaterThan"),nst=mo((t,e,o)=>Xp(t.attribute,t,Bi.From,e,void 0,void 0,o),"measureGreaterThanOrEqual"),ist=mo((t,e,o)=>Xp(t.attribute,t,Bi.To,e,void 0,void 0,o),"measureLessThanOrEqual"),rst=mo((t,e,o)=>Xp(t.attribute,t,Bi.ToNotEqual,e,void 0,void 0,o),"measureLessThan"),cD=mo((t,e,o,n)=>Xp(t.attribute,t,Bi.From,e,Bi.To,o,n),"measureBetween"),v8=mo((t,e,o,n)=>new e8(t,e,xE.Top,o,n),"topRanking"),y8=mo((t,e,o,n)=>new e8(t,e,xE.Bottom,o,n),"bottomRanking"),Kc=t=>{if(Array.isArray(t)){const[e,...o]=t;return o.length===0?Kc(e):{operator:"AND",left:Kc(e),right:Kc(o)}}return t},b8=mo((t,e)=>new t8(t,e),"cascading");var Gf;(function(t){t.and=sD((e,o)=>({operator:"AND",left:Kc(e),right:Kc(o)}),"and"),t.or=sD((e,o)=>({operator:"OR",left:Kc(e),right:Kc(o)}),"or")})(Gf=Gf||(Gf={}));const ast=mo((t,e,o)=>new Wat(t,e,o),"customFilter"),sst=t=>{const{dim:e,datatype:o,title:n,datasource:i}=t;return P1({expression:e,dataType:o,granularity:wm(t),title:n,dataSource:i})},lst=t=>{const{dim:e,title:o,datatype:n,agg:i,datasource:r}=t;if(i)return O1({expression:e,dataType:n,agg:i,granularity:wm(t),format:void 0,sort:void 0,title:o,dataSource:r})},uD=(t,e)=>{if("formula"in t)return AE(t);const{dim:o,datatype:n,agg:i}=t;return O1({expression:o,granularity:wm(t),dataType:n,agg:i,format:void 0,sort:void 0,title:e})};var Jv;(function(t){t.INCLUDE_ALL="INCLUDE_ALL",t.ADVANCED="ADVANCED",t.INVALID="INVALID",t.CONDITION="CONDITION",t.SPECIFIC_ITEMS="SPECIFIC_ITEMS"})(Jv=Jv||(Jv={}));var Qv;(function(t){t.PERIOD="PERIOD",t.DATE_RANGE="DATE_RANGE"})(Qv=Qv||(Qv={}));var ty;(function(t){t.NUMERIC_RANGE="NUMERIC_RANGE"})(ty=ty||(ty={}));var Gl;(function(t){t.YEARS="years",t.QUARTERS="quarters",t.MONTHS="months",t.WEEKS="weeks",t.DAYS="days",t.HOURS="hours",t.MINUTES="minutes"})(Gl=Gl||(Gl={}));var qd;(function(t){t.DATE_TIME="datetime",t.NUMERIC="numeric",t.TEXT="text"})(qd=qd||(qd={}));const cst=["1","30"],Lo=Object.assign(Object.assign(Object.assign({},Jv),Qv),ty),ust={[Lo.INCLUDE_ALL]:{all:!0,filterType:Lo.INCLUDE_ALL},[Lo.PERIOD]:{last:{count:1,offset:1},isNotCurrentPeriod:!0,filterType:Lo.PERIOD},[Lo.DATE_RANGE]:{filterType:Lo.DATE_RANGE},[Lo.NUMERIC_RANGE]:{filterType:Lo.NUMERIC_RANGE},[Lo.CONDITION]:{explicit:!1,multiSelection:!0,exclude:{members:[]},filterType:Lo.CONDITION},[Lo.SPECIFIC_ITEMS]:{explicit:!0,multiSelection:!0,members:[],filterType:Lo.SPECIFIC_ITEMS}},dst={filter:ust.INCLUDE_ALL,level:Gl.YEARS};exports.st=void 0;(function(t){t.IS="members",t.IS_NOT="exclude",t.IS_WITHIN="isWithin",t.TOP="top",t.BOTTOM="bottom",t.AFTER="after",t.BEFORE="before",t.STARTS_WITH="startsWith",t.DOESNT_START_WITH="doesntStartWith",t.ENDS_WITH="endsWith",t.DOESNT_END_WITH="doesntEndWith",t.CONTAINS="contains",t.DOESNT_CONTAIN="doesntContain",t.EQUALS="equals",t.DOESNT_EQUAL="doesntEqual",t.IS_EMPTY="isEmpty",t.IS_NOT_EMPTY="isNotEmpty",t.GREATER_THAN="fromNotEqual",t.GREATER_THAN_OR_EQUAL="from",t.LESS_THAN="toNotEqual",t.LESS_THAN_OR_EQUAL="to",t.BETWEEN="between",t.IS_NOT_BETWEEN="isNotBetween",t.MULTIPLE_CONDITION="multipleCondition",t.NONE="none"})(exports.st=exports.st||(exports.st={}));const pst=t=>t.top!==void 0,hst=t=>t.bottom!==void 0,fst=t=>{var e;return!!(!((e=t.exclude)===null||e===void 0)&&e.members)},mst=t=>!!t.members&&!!t.isCondition,gst=t=>{var e,o;return((e=t.last)===null||e===void 0?void 0:e.anchor)!==void 0||((o=t.next)===null||o===void 0?void 0:o.anchor)!==void 0},vst=t=>t.fromNotEqual!==void 0,yst=t=>t.from!==void 0&&!t.isBetween,bst=t=>t.toNotEqual!==void 0,xst=t=>t.to!==void 0&&!t.isBetween,wst=t=>t.equals!==void 0,_st=t=>t.doesntEqual!==void 0,Sst=t=>!!(t.equals===""&&t.isEmpty),Cst=t=>!!(t.doesntEqual===""&&t.isEmpty),Tst=t=>t.contains!==void 0,Mst=t=>t.doesntContain!==void 0,kst=t=>t.startsWith!==void 0,Ast=t=>t.doesntStartWith!==void 0,Est=t=>t.endsWith!==void 0,Pst=t=>t.doesntEndWith!==void 0,Ost=t=>t.from!==void 0&&t.to!==void 0,Lst=t=>{var e,o;return((e=t.exclude)===null||e===void 0?void 0:e.from)!==void 0&&((o=t.exclude)===null||o===void 0?void 0:o.to)!==void 0},Nst=t=>!!(t.or||t.and),A1=t=>hst(t)?exports.st.BOTTOM:pst(t)?exports.st.TOP:fst(t)?exports.st.IS_NOT:gst(t)?exports.st.IS_WITHIN:vst(t)?exports.st.GREATER_THAN:bst(t)?exports.st.LESS_THAN:wst(t)?exports.st.EQUALS:_st(t)?exports.st.DOESNT_EQUAL:Sst(t)?exports.st.IS_EMPTY:Cst(t)?exports.st.IS_NOT_EMPTY:Tst(t)?exports.st.CONTAINS:Mst(t)?exports.st.DOESNT_CONTAIN:Pst(t)?exports.st.DOESNT_END_WITH:Ast(t)?exports.st.DOESNT_START_WITH:Est(t)?exports.st.ENDS_WITH:kst(t)?exports.st.STARTS_WITH:Lst(t)?exports.st.IS_NOT_BETWEEN:mst(t)?exports.st.IS:Nst(t)?exports.st.MULTIPLE_CONDITION:Ost(t)?exports.st.BETWEEN:yst(t)?exports.st.GREATER_THAN_OR_EQUAL:xst(t)?exports.st.LESS_THAN_OR_EQUAL:exports.st.NONE,G2=(t,e,o)=>{var n,i,r,a,s,l,d;switch(A1(e)){case exports.st.BOTTOM:if(e.by)return y8(t,uD(e.by,e.rankingMessage),e[exports.st.BOTTOM],{guid:o});break;case exports.st.EQUALS:return c8(t,e[exports.st.EQUALS],{guid:o});case exports.st.DOESNT_EQUAL:return l8(t,e[exports.st.DOESNT_EQUAL],{guid:o});case exports.st.GREATER_THAN:return u8(t,e[exports.st.GREATER_THAN],{guid:o});case exports.st.GREATER_THAN_OR_EQUAL:return d8(t,e[exports.st.GREATER_THAN_OR_EQUAL],{guid:o});case exports.st.TOP:if(e.by)return v8(t,uD(e.by,e.rankingMessage),e[exports.st.TOP],{guid:o});break;case exports.st.STARTS_WITH:return s8(t,e[exports.st.STARTS_WITH],{guid:o});case exports.st.DOESNT_START_WITH:return i8(t,e[exports.st.DOESNT_START_WITH],{guid:o});case exports.st.ENDS_WITH:return a8(t,e[exports.st.ENDS_WITH],{guid:o});case exports.st.DOESNT_END_WITH:return n8(t,e[exports.st.DOESNT_END_WITH],{guid:o});case exports.st.CONTAINS:return r8(t,e[exports.st.CONTAINS],{guid:o});case exports.st.DOESNT_CONTAIN:return o8(t,e[exports.st.DOESNT_CONTAIN],{guid:o});case exports.st.LESS_THAN:return p8(t,e[exports.st.LESS_THAN],{guid:o});case exports.st.LESS_THAN_OR_EQUAL:return h8(t,e[exports.st.LESS_THAN_OR_EQUAL],{guid:o});case exports.st.BETWEEN:return Hy(t,e.from,e.to,{guid:o});case exports.st.IS_NOT_BETWEEN:return _E(Hy(t,(n=e.exclude)===null||n===void 0?void 0:n.from,(i=e.exclude)===null||i===void 0?void 0:i.to,{guid:o}),void 0,{guid:o});case exports.st.MULTIPLE_CONDITION:if(e.and)return Jat(e.and.map(b=>G2(t,b,o)),{guid:o});if(e.or)return Kat(e.or.map(b=>G2(t,b,o)),{guid:o});break;case exports.st.IS_NOT:{const b=((r=e.filter)===null||r===void 0?void 0:r.turnedOff)&&((a=e.filter.exclude)===null||a===void 0?void 0:a.members)||[],C=((l=(s=e.exclude)===null||s===void 0?void 0:s.members)===null||l===void 0?void 0:l.filter(j=>!b.includes(j)))||[],u=KH({guid:o,excludeMembers:!0,enableMultiSelection:(d=e.multiSelection)!==null&&d!==void 0?d:!0,deactivatedMembers:b});return yc(t,C,u)}}throw new Pg("errors.filter.unsupportedConditionFilter",{filter:JSON.stringify(e)})},Dst=(t,e,o)=>{var n,i;switch(A1(e)){case exports.st.EQUALS:return est(t,e[exports.st.EQUALS],{guid:o});case exports.st.GREATER_THAN:return ost(t,e[exports.st.GREATER_THAN],{guid:o});case exports.st.GREATER_THAN_OR_EQUAL:return nst(t,e[exports.st.GREATER_THAN_OR_EQUAL],{guid:o});case exports.st.LESS_THAN:return rst(t,e[exports.st.LESS_THAN],{guid:o});case exports.st.LESS_THAN_OR_EQUAL:return ist(t,e[exports.st.LESS_THAN_OR_EQUAL],{guid:o});case exports.st.BETWEEN:return cD(t,e.from,e.to,{guid:o});case exports.st.IS_NOT_BETWEEN:return _E(cD(t,(n=e.exclude)===null||n===void 0?void 0:n.from,(i=e.exclude)===null||i===void 0?void 0:i.to,{guid:o}),void 0,{guid:o})}throw new Pg("errors.filter.unsupportedConditionFilter",{filter:JSON.stringify(e)})},Rst=(t,e)=>{let o=t?t.toLocaleLowerCase():Gl.YEARS;return o===Gl.MINUTES&&e==="60"&&(o=Gl.HOURS),o},Ist=t=>t==null?void 0:t.all,jst=t=>t.last?t.last:t.next,$st=t=>{var e;return((e=jst(t))===null||e===void 0?void 0:e.offset)<2},x8=t=>{var e;return((e=t==null?void 0:t.members)===null||e===void 0?void 0:e.length)>=0},zst=(t,e)=>t&&typeof t=="string"||e&&typeof e=="string",Bst=(t,e)=>t===""&&e==="",Fst=(t,e)=>{const{from:o,to:n}=t;return e!==qd.DATE_TIME?!1:zst(o,n)?!0:Bst(o,n)},Hst=t=>{const{from:e,to:o}=t;return e!==void 0&&o!==void 0&&!t.isBetween},w8=t=>A1(t)!==exports.st.NONE,Wst=t=>Object.keys(t).includes("isAdvanced"),Vst=t=>!!(t.level&&t.bucket&&t.level===Gl.MINUTES&&cst.includes(t.bucket)),Ust=t=>t.filterType===Lo.INVALID,dD=(t,e=qd.DATE_TIME,o)=>o&&Vst(o)||Wst(t)?Lo.ADVANCED:Ist(t)?Lo.INCLUDE_ALL:$st(t)?Lo.PERIOD:x8(t)?Lo.SPECIFIC_ITEMS:Fst(t,e)?Lo.DATE_RANGE:Hst(t)?Lo.NUMERIC_RANGE:w8(t)?Lo.CONDITION:(Ust(t),Lo.INVALID),Gst=(t,e)=>{const{level:o,filter:n,bucket:i}=t,r=n||dst.filter,a={filter:Object.assign(Object.assign({},r),{filterType:dD(r,e)})};if(e===qd.DATE_TIME){const s=r,l=(s==null?void 0:s.level)||o;a.level=Rst(l,i),a.filter.filterType=dD(r,e,{level:l,bucket:i})}return a},pD=(t,e)=>{const o={config:Object.assign(Object.assign({},T1()),{guid:e,originalFilterJaql:t}),jaql:n=>n?t:{jaql:t,panel:"scope"},attribute:{id:t.dim},type:"filter"};return Object.assign({},o)},Yst=(t,e)=>yc(t,[],{guid:e,excludeMembers:!0}),Xst=(t,e,o,n)=>{const i=qst(e),r=Zst(e,i),a=KH({guid:o,excludeMembers:!1,enableMultiSelection:n??!0,deactivatedMembers:i});return yc(t,r,a)};function qst(t){var e,o,n,i;return!((e=t.filter)===null||e===void 0)&&e.turnedOff?(i=(n=(o=t.filter)===null||o===void 0?void 0:o.exclude)===null||n===void 0?void 0:n.members)!==null&&i!==void 0?i:[]:[]}function Zst(t,e){const o=t.members;return e?o.filter(n=>!e.includes(n)):o}const Kst=(t,e,o)=>f8(t,e.from,e.to,{guid:o}),Jst=(t,e,o)=>Hy(t,e.from,e.to,{guid:o}),Qst=(t,e,o)=>e.last?g8(t,e.last.offset,e.last.count,e.last.anchor,{guid:o}):m8(t,e.next.offset,e.next.count,e.next.anchor,{guid:o}),tlt=(t,e,o)=>ast(t,e,{guid:o}),hD=(t,e)=>{try{if("formula"in t)throw new Pg("errors.filter.formulaFiltersNotSupported",{filter:JSON.stringify(t)});const o=Gst(t,t.datatype),{filter:n}=o,{filterType:i}=n,r=sst(t),a=lst(t);switch(i){case Lo.INCLUDE_ALL:return Yst(r,e);case Lo.SPECIFIC_ITEMS:return Xst(r,n,e,n.multiSelection);case Lo.CONDITION:return a?Dst(a,n,e):G2(r,n,e);case Lo.DATE_RANGE:return Kst(r,n,e);case Lo.PERIOD:return Qst(r,n,e);case Lo.NUMERIC_RANGE:return Jst(r,n,e);case Lo.ADVANCED:return tlt(r,n,e);case Lo.INVALID:return pD(t,e)}}catch(o){console.debug("Fall back to generic pass-through JAQL filter due to filter translation error:",o)}return pD(t,e)},elt=t=>["__int4","__int8","int","tinyint","bigint","int2","int4","int8","smallint","mediumint","serial","integer","byteint","int64"].includes(t.toLowerCase()),olt=t=>["basemeasure","calculatedmeasure","float","float4","float8","double precision","double","numeric","decimal","real","number","float64"].includes(t.toLowerCase()),kn=t=>elt(t)||olt(t)||t==="numeric-attribute",SE=t=>["textdimension","string","varchar","text","ntext","char","character","character varying","smalltext","nchar","nvarchar","json","jsonb","object","text-attribute"].includes(t.toLowerCase()),Lr=t=>["datelevel","date","time","datetime","timestamp without time zone","timestamp","timestamp with time zone","timestamp(6)","timestamp_tz","timestamp_ntz","timestamp_ltz","timestampltz","timestampntz","timestamptz","datetime64[ns]","timewithtimezone","timestampwithtimezone","timestamp_with_timezone"].includes(t.toLowerCase()),_8=t=>["bool","boolean","bit","logical"].includes(t.toLowerCase()),CE=t=>kn(t)?"number":Lr(t)?"datetime":SE(t)?"text":_8(t)?"boolean":"text",S8=function(t){t||(t=20);const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),o=new Array(t);let n=0,i;for(let r=0;r<t;r+=1){if(r>0&&r%5==0){o[r]="-";continue}n<=2&&(n=33554432+Math.random()*16777216|0),i=n&15,n=n>>4,o[r]=e[r==19?i&3|8:i]}return o.join("")},E1=t=>{if(!t)return{filters:void 0,relations:void 0};if(Array.isArray(t))return{filters:t,relations:void 0};const e=new Set;function o(a){const[s,...l]=a;if(e.add(s),!l.length)return n({instanceid:s.config.guid});const d=n(s),b=o(l);return{left:d,right:b,operator:"AND"}}function n(a){return a&&(nlt(a)?vc(a)?o(a.filters):(e.add(a),{instanceid:a.config.guid}):("left"in a&&(a.left=n(a.left)),"right"in a&&(a.right=n(a.right)),"composeCode"in a&&delete a.composeCode,a))}const i=xr(t),r=n(i);return{filters:Array.from(e),relations:r}};function nlt(t){return"config"in t&&"guid"in t.config}function TE(t){return typeof t=="string"?t:t.title}function ME(t){return typeof t=="object"&&"type"in t&&"title"in t}function ilt(t){return{id:t.id,address:t.address,title:t.title,type:t.live?"live":"elasticube"}}function kE(t){return ME(t)?{title:t.title,live:t.type==="live"}:{title:t,live:!1}}function rlt(t){var e;return ME(t)?{title:t.title,live:t.type==="live",id:(e=t.id)!==null&&e!==void 0?e:"",address:t.address}:{title:t,id:""}}function alt(t){return t?t==="asc"?exports.Li.Ascending:exports.Li.Descending:exports.Li.None}function slt(t){switch(t){case"sortAsc":return exports.Li.Ascending;case"sortDesc":return exports.Li.Descending;default:return exports.Li.None}}const C8=(t,e,o=!1,n=!1)=>{const i=t.filter.filter&&!("turnedOff"in t.filter.filter),r=e||S8(),a=hD(t,r);if(i){const s=hD(Object.assign(Object.assign({},t),{filter:t.filter.filter}),`${e}-bg`),l=a.config;return a.config=Object.assign(Object.assign({},l),{backgroundFilter:s}),a}return a.config=Object.assign(Object.assign({},a.config),{originalFilterJaql:t,disabled:o,locked:n}),a};function Lu(t){const[e,o]=t.slice(1,-1).split(".");return{table:e,column:o?o.replace("(Calendar)","").trim():""}}function T8(t){return Lu(t.expression).table}function M8(t){return Lu(t.expression).column}function llt(t){switch(t){case Uf.ASC:return"sortAsc";case Uf.DESC:return"sortDesc";default:return"sortNone"}}const P1=({expression:t,dataType:e,granularity:o,format:n,sort:i,title:r,panel:a,dataSource:s})=>{const l=Lu(t).column,d=alt(i);if(e===Zv.DATETIME)return new pp(r??l,t,o||pe.Years,n||pp.getDefaultFormatForGranularity(o||pe.Years),void 0,d,s,void 0,a);const b=!e||kn(e)?qe.NumericAttribute:qe.TextAttribute;return new L1(r??l,t,b,void 0,d,s,void 0,a)},O1=({expression:t,dataType:e,agg:o,granularity:n,format:i,sort:r,title:a,dataSource:s})=>{const l=P1({expression:t,dataType:e,granularity:n,format:i,sort:r,title:a,dataSource:s}),d=C1.aggregationFromJAQL(o),b=Lu(t).column,C=a??`${d} ${b}`;switch(d){case no.Sum:return lD(l,C,i);case no.Average:return Lat(l,C,i);case no.Min:return UH(l,C,i);case no.Max:return GH(l,C,i);case no.Count:return Dat(l,C,i);case no.CountDistinct:return YH(l,C,i);case no.Median:return Nat(l,C,i);case no.Variance:return ll(l,no.Variance,C,i);case no.StandardDeviation:return ll(l,no.StandardDeviation,C,i);default:return lD(l,C,i)}},AE=t=>{var e;const o=Urt((e=t.context)!==null&&e!==void 0?e:{},n=>typeof n=="string"?n:n&&EE(n));return ji(t.title,t.formula,o)};function EE(t,e,o){if("filter"in t)return C8(t);if("formula"in t)return AE(t);const n="datasource"in t?t.datasource:void 0;return t.agg?O1({expression:t.dim,dataType:t.datatype,agg:t.agg||"",granularity:wm(t),format:e,sort:t.sort,title:t.title,dataSource:n}):P1({expression:t.dim,dataType:t.datatype,granularity:wm(t),format:e,sort:t.sort,title:t.title,panel:o,dataSource:n})}function wm(t){return t!=null&&t.datatype&&Lr(t.datatype)?pp.translateJaqlToGranularity(t):void 0}const PE=t=>CE(t).replace("number","numeric");let L1=class k8 extends _1{constructor(e,o,n,i,r,a,s,l){if(super(e,n||qe.Attribute,i,a,s),this._sort=exports.Li.None,this.expression=o,!s&&o){const{table:d,column:b}=Lu(o);this.composeCode=OE(d,b,"",bE)}l==="columns"&&(this.panel=l),this._sort=r||exports.Li.None}get id(){return this.expression}getSort(){return this._sort}sort(e){return new k8(this.name,this.expression,this.type,this.description,e,this.dataSource,this.composeCode,this.panel)}jaql(e){const o={jaql:{title:this.name,dim:this.expression,datatype:PE(this.type)}};return this.panel&&(o.panel=this.panel),this._sort!=exports.Li.None&&(o.jaql.sort=this._sort==exports.Li.Ascending?"asc":"desc"),e===!0?o.jaql:o}serialize(){const e=super.serialize();return e.__serializable="DimensionalAttribute",e.expression=this.expression,this.getSort()!==exports.Li.None&&(e.sort=this.getSort()),e}},pp=class ey extends L1{constructor(e,o,n,i,r,a,s,l,d){if(super(e,o,qe.DateLevel,r,a,s,l),this._format=i,this.granularity=n,!l&&o){const{table:b,column:C}=Lu(o);this.composeCode=OE(b,C,n,bE)}d==="columns"&&(this.panel=d)}get id(){let e=`${this.expression}`;const{level:o="",dateTimeLevel:n="",bucket:i}=this.translateGranularityToJaql();return e+=`_${(o||n).toLowerCase()}`,i&&(e+=`_${i}`),e}getSort(){return this._sort}sort(e){return new ey(this.name,this.expression,this.granularity,this._format,this.description,e,this.dataSource,this.composeCode)}getFormat(){return this._format}format(e){return new ey(this.name,this.expression,this.granularity,e,this.description,this._sort,this.dataSource,this.composeCode)}setGranularity(e){return new ey(this.name,this.expression,e,this._format,this.description,this._sort,this.dataSource,this.composeCode)}serialize(){const e=super.serialize();return e.__serializable="DimensionalLevelAttribute",e.granularity=this.granularity,this.getFormat()!==void 0&&(e.format=this.getFormat()),e}jaql(e){const o={jaql:Object.assign({title:this.name,dim:this.expression,datatype:PE(this.type)},this.translateGranularityToJaql())};if(this.panel&&(o.panel=this.panel),this._format!==void 0){const n=o.jaql.dateTimeLevel||o.jaql.level;o.format={mask:{}},o.format.mask[n]=this._format}return this._sort!=exports.Li.None&&(o.jaql.sort=this._sort==exports.Li.Ascending?"asc":"desc"),e===!0?o.jaql:o}translateGranularityToJaql(){const e="minutes",o="seconds";switch(this.granularity){case pe.Years:case pe.Quarters:case pe.Months:case pe.Weeks:case pe.Days:return{level:this.granularity.toLowerCase()};case pe.Hours:return{dateTimeLevel:e,bucket:"60"};case pe.MinutesRoundTo30:return{dateTimeLevel:e,bucket:"30"};case pe.MinutesRoundTo15:return{dateTimeLevel:e,bucket:"15"};case pe.Minutes:return{dateTimeLevel:e,bucket:"1"};case pe.Seconds:return{dateTimeLevel:o,bucket:"0"};case pe.AggHours:return{level:e,bucket:"60"};case pe.AggMinutesRoundTo30:return{level:e,bucket:"30"};case pe.AggMinutesRoundTo15:return{level:e,bucket:"15"};case pe.AggMinutesRoundTo1:return{level:e,bucket:"1"};default:return console.warn("Unsupported level"),{level:this.granularity}}}static translateJaqlToGranularity(e){const o=n=>(console.warn("Unsupported granularity",n),n);if(e.dateTimeLevel){if(e.dateTimeLevel!=="minutes"&&e.dateTimeLevel!=="seconds")return o(e.dateTimeLevel);switch(e.bucket){case"60":return pe.Hours;case"30":return pe.MinutesRoundTo30;case"15":return pe.MinutesRoundTo15;case"1":return pe.Minutes;case"0":return pe.Seconds;default:return o(e.dateTimeLevel)}}switch(e.level){case"years":return pe.Years;case"quarters":return pe.Quarters;case"months":return pe.Months;case"weeks":return pe.Weeks;case"days":return pe.Days;case"minutes":switch(e.bucket){case"60":return pe.AggHours;case"30":return pe.AggMinutesRoundTo30;case"15":return pe.AggMinutesRoundTo15;case"1":return pe.AggMinutesRoundTo1;default:return o(e.level)}default:return o(e.level)}}static getDefaultFormatForGranularity(e){switch(e){case pe.Years:return"yyyy";case pe.Quarters:return"Q yyyy";case pe.Months:return"yyyy-MM";case pe.Weeks:return"ww yyyy";case pe.Days:return"yyyy-MM-dd";case pe.Hours:return"yyyy-MM-dd HH:mm";case pe.MinutesRoundTo30:return"yyyy-MM-dd HH:mm";case pe.MinutesRoundTo15:return"yyyy-MM-dd HH:mm";case pe.Minutes:return"yyyy-MM-dd HH:mm";case pe.Seconds:return"yyyy-MM-dd HH:mm:ss";case pe.AggHours:return"HH:mm";case pe.AggMinutesRoundTo30:return"HH:mm";case pe.AggMinutesRoundTo15:return"HH:mm";case pe.AggMinutesRoundTo1:return"HH:mm";default:return""}}};function A8(t){return t.granularity?clt(t):new L1(t.name||t.title,t.attribute||t.expression||t.dim,t.type,t.desc||t.description,t.sort,t.dataSource)}function clt(t){return new pp(t.name||t.title,t.attribute||t.expression||t.dim,t.granularity,t.format,t.desc||t.description,t.sort,t.dataSource)}function OE(t,e,o,n){return(n.length>0?n+".":"")+Bl(t)+"."+Bl(e)+(o&&o.length>0?"."+o:"")}function P_(t){return"attribute"in t}function ult(t){return"measure"in t}const dlt={rows:!1,columns:!1},fD=t=>{if(typeof t=="object"&&t!==null){if(typeof Object.getPrototypeOf=="function"){const e=Object.getPrototypeOf(t);return e===Object.prototype||e===null}return Object.prototype.toString.call(t)==="[object Object]"}return!1},zn=(...t)=>t.reduce((e,o)=>{if(Array.isArray(o))throw new TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");return Object.keys(o).forEach(n=>{["__proto__","constructor","prototype"].includes(n)||(Array.isArray(e[n])&&Array.isArray(o[n])?e[n]=zn.options.mergeArrays?Array.from(new Set(e[n].concat(o[n]))):o[n]:fD(e[n])&&fD(o[n])?e[n]=zn(e[n],o[n]):e[n]=o[n])}),e},{}),E8={mergeArrays:!0};zn.options=E8;zn.withOptions=(t,...e)=>{zn.options=Object.assign({mergeArrays:!0},t);const o=zn(...e);return zn.options=E8,o};let z0;const plt=new Uint8Array(16);function hlt(){if(!z0&&(z0=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!z0))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return z0(plt)}const yi=[];for(let t=0;t<256;++t)yi.push((t+256).toString(16).slice(1));function flt(t,e=0){return yi[t[e+0]]+yi[t[e+1]]+yi[t[e+2]]+yi[t[e+3]]+"-"+yi[t[e+4]]+yi[t[e+5]]+"-"+yi[t[e+6]]+yi[t[e+7]]+"-"+yi[t[e+8]]+yi[t[e+9]]+"-"+yi[t[e+10]]+yi[t[e+11]]+yi[t[e+12]]+yi[t[e+13]]+yi[t[e+14]]+yi[t[e+15]]}const mlt=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),mD={randomUUID:mlt};function P8(t,e,o){if(mD.randomUUID&&!e&&!t)return mD.randomUUID();t=t||{};const n=t.random||(t.rng||hlt)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,flt(n)}function glt(t,e){const o=e==null?void 0:e.find(n=>O8(t)===n.attribute.id);return o&&!o.config.disabled&&(o.isScope&&(o.isScope=!1),t.jaql.in={selected:o.jaql()}),t}function vlt(t,e){const o=[],n=[];return e.forEach(i=>{t.some(r=>O8(r)===i.attribute.id)?o.push(i):n.push(i)}),[o,n]}function O8(t){const{dim:e,level:o,dateTimeLevel:n,bucket:i}=t.jaql;let r=`${e}`;return(o||n)&&(r+=`_${o||n}`),i&&(r+=`_${i}`),r}var ylt=function(t,e){var o={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(o[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(o[n[i]]=t[n[i]]);return o};function blt(t,e,o){return{rowsCount:t.length,columnsCount:e.length,measuresCount:o.length}}function xlt(t){switch(t){case"sortAsc":return"asc";case"sortDesc":return"desc";default:return"none"}}function wlt(t,e,o){const n=xlt(t.direction),i=e===o.rowsCount-1,r={dir:n,initialized:!0,field:t.by&&"valuesIndex"in t.by?o.rowsCount+o.columnsCount+t.by.valuesIndex:e};return i&&(r.sortingLastDimension=!0),t.by&&(r.measurePath=(t.by.columnsMembersPath||[]).reduce((a,s,l)=>Object.assign(Object.assign({},a),{[o.rowsCount+l]:s}),{})),{sort:n,sortDetails:r}}function _lt(t,e){if(e.rowsCount===0)return;const o=e.rowsCount-1,n=t[o],i=n.jaql,{sortDetails:r,sort:a}=i,s=ylt(i,["sortDetails","sort"]);if(r&&r.field!==o&&r.field<t.length){const l=t[r.field];l.jaql.sortDetails=r,l.jaql.sort=a,n.jaql=s}}const oy="ComposeSDK";function L8(t,e){const{attributes:o,measures:n,filters:i,filterRelations:r,highlights:a,dataSource:s,count:l,offset:d,ungroup:b}=t,C=b&&n.length===0,u=Object.assign({metadata:Clt({attributes:o,measures:n,filters:i,filterRelations:r,highlights:a},e)},Tlt(s,l,d,C));return r?Object.assign(Object.assign({},u),{filterRelations:r}):u}function N8(t,e,o,n,i){const[r,a]=vlt(t,n);t.forEach(d=>glt(d,r));const s=d=>{const b=d.jaql();return o?Array.isArray(b)?b.map(C=>Object.assign(Object.assign({},C),{instanceid:d.config.guid})):Object.assign(Object.assign({},b),{instanceid:d.config.guid}):b},l=(i?e.flatMap(d=>s(d)):[...e,...a].flatMap(d=>s(d))).filter(d=>Object.keys(d.jaql.filter||{}).length!==0);return i&&a.length>0&&console.warn(`The following highlight filters were not applied due to missing attributes: [${a.map(d=>d.attribute.name).join(", ")}].`),l}function Slt(t){var e,o;const n=(e=t.jaql)===null||e===void 0?void 0:e.formula;if(!n||!n.includes("trend")&&!n.includes("forecast"))return t;const i=structuredClone(t),r=(o=i.jaql)===null||o===void 0?void 0:o.context;if(r)for(const a in r){const s=r[a];s.datatype==="text"&&s.agg==="count"&&(s.datatype="numeric")}return i}function Clt(t,e){const{attributes:o,measures:n,filters:i,filterRelations:r,highlights:a}=t,s=o.map(b=>b.jaql()),l=n.map(b=>Slt(b.jaql())),d=N8(s,i,r,a,e);return[...s,...l,...d]}function Tlt(t,e,o,n){return Object.assign(Object.assign(Object.assign({datasource:kE(t),by:oy,queryGuid:P8()},n?{ungroup:!0}:{}),e?{count:e}:{}),o?{offset:o}:{})}function Mlt(t,e){const{rowsAttributes:o,columnsAttributes:n,measures:i,filters:r,filterRelations:a,grandTotals:s,highlights:l,dataSource:d,count:b,offset:C}=t,u=Object.assign({metadata:Alt({rowsAttributes:o,columnsAttributes:n,measures:i,filters:r,highlights:l,filterRelations:a},e)},Elt(d,s,b,C));return a?Object.assign(Object.assign({},u),{filterRelations:a}):u}function gD(t,e,o,n){const i=e==="rows"&&P_(t)&&t.sort&&t.sort.direction!=="sortNone",r=Object.assign(Object.assign({},P_(t)?t.attribute.jaql(!0):t.jaql(!0)),i&&wlt(t.sort,o,n));return Object.assign(Object.assign({jaql:r},P_(t)&&t.includeSubTotals?{format:{subtotal:!0}}:{}),{panel:e,field:{index:o,id:`${e}-${o}`}})}function klt(t,e,o){return Object.assign(Object.assign({},ult(t)?zn(t.measure.jaql(),{jaql:{subtotalAgg:t.totalsCalculation},format:Object.assign({databars:t.dataBars||!1},t.shouldRequestMinMax&&{color:{type:"range"}})}):t.jaql()),{panel:e,field:{index:o,id:`${e}-${o}`}})}function Alt(t,e){const{rowsAttributes:o,columnsAttributes:n,measures:i,filters:r,filterRelations:a,highlights:s}=t,l=blt(o,n,i);let d=0;const b=o.map((I,W)=>gD(I,"rows",W+d,l));d=d+o.length;const C=n.map((I,W)=>gD(I,"columns",W+d,l));d=d+n.length;const u=[...b,...C],j=i.map((I,W)=>klt(I,"measures",W+d)),A=N8(u,r,a,s,e),p=[...u,...j,...A];return _lt(p,l),p}function Elt(t,e,o,n){return Object.assign(Object.assign(Object.assign({datasource:kE(t),by:oy,queryGuid:P8(),dashboard:oy,widget:oy,format:"pivot"},o?{count:o}:{}),n?{offset:n}:{}),{grandTotals:Object.assign(Object.assign({},dlt),e)})}var Plt=!1;function Olt(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function Llt(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var Nlt=function(){function t(o){var n=this;this._insertTag=function(i){var r;n.tags.length===0?n.insertionPoint?r=n.insertionPoint.nextSibling:n.prepend?r=n.container.firstChild:r=n.before:r=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(i,r),n.tags.push(i)},this.isSpeedy=o.speedy===void 0?!Plt:o.speedy,this.tags=[],this.ctr=0,this.nonce=o.nonce,this.key=o.key,this.container=o.container,this.prepend=o.prepend,this.insertionPoint=o.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(o){o.forEach(this._insertTag)},e.insert=function(o){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(Llt(this));var n=this.tags[this.tags.length-1];if(this.isSpeedy){var i=Olt(n);try{i.insertRule(o,i.cssRules.length)}catch{}}else n.appendChild(document.createTextNode(o));this.ctr++},e.flush=function(){this.tags.forEach(function(o){var n;return(n=o.parentNode)==null?void 0:n.removeChild(o)}),this.tags=[],this.ctr=0},t}(),Ni="-ms-",Wy="-moz-",go="-webkit-",D8="comm",LE="rule",NE="decl",Dlt="@import",R8="@keyframes",Rlt="@layer",Ilt=Math.abs,N1=String.fromCharCode,jlt=Object.assign;function $lt(t,e){return Si(t,0)^45?(((e<<2^Si(t,0))<<2^Si(t,1))<<2^Si(t,2))<<2^Si(t,3):0}function I8(t){return t.trim()}function zlt(t,e){return(t=e.exec(t))?t[0]:t}function vo(t,e,o){return t.replace(e,o)}function Y2(t,e){return t.indexOf(e)}function Si(t,e){return t.charCodeAt(e)|0}function _m(t,e,o){return t.slice(e,o)}function is(t){return t.length}function DE(t){return t.length}function B0(t,e){return e.push(t),t}function Blt(t,e){return t.map(e).join("")}var D1=1,hp=1,j8=0,br=0,ei=0,qp="";function R1(t,e,o,n,i,r,a){return{value:t,root:e,parent:o,type:n,props:i,children:r,line:D1,column:hp,length:a,return:""}}function Rh(t,e){return jlt(R1("",null,null,"",null,null,0),t,{length:-t.length},e)}function Flt(){return ei}function Hlt(){return ei=br>0?Si(qp,--br):0,hp--,ei===10&&(hp=1,D1--),ei}function Er(){return ei=br<j8?Si(qp,br++):0,hp++,ei===10&&(hp=1,D1++),ei}function ys(){return Si(qp,br)}function ny(){return br}function Og(t,e){return _m(qp,t,e)}function Sm(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function $8(t){return D1=hp=1,j8=is(qp=t),br=0,[]}function z8(t){return qp="",t}function iy(t){return I8(Og(br-1,X2(t===91?t+2:t===40?t+1:t)))}function Wlt(t){for(;(ei=ys())&&ei<33;)Er();return Sm(t)>2||Sm(ei)>3?"":" "}function Vlt(t,e){for(;--e&&Er()&&!(ei<48||ei>102||ei>57&&ei<65||ei>70&&ei<97););return Og(t,ny()+(e<6&&ys()==32&&Er()==32))}function X2(t){for(;Er();)switch(ei){case t:return br;case 34:case 39:t!==34&&t!==39&&X2(ei);break;case 40:t===41&&X2(t);break;case 92:Er();break}return br}function Ult(t,e){for(;Er()&&t+ei!==57&&!(t+ei===84&&ys()===47););return"/*"+Og(e,br-1)+"*"+N1(t===47?t:Er())}function Glt(t){for(;!Sm(ys());)Er();return Og(t,br)}function Ylt(t){return z8(ry("",null,null,null,[""],t=$8(t),0,[0],t))}function ry(t,e,o,n,i,r,a,s,l){for(var d=0,b=0,C=a,u=0,j=0,A=0,p=1,I=1,W=1,q=0,X="",H=i,D=r,$=n,z=X;I;)switch(A=q,q=Er()){case 40:if(A!=108&&Si(z,C-1)==58){Y2(z+=vo(iy(q),"&","&\f"),"&\f")!=-1&&(W=-1);break}case 34:case 39:case 91:z+=iy(q);break;case 9:case 10:case 13:case 32:z+=Wlt(A);break;case 92:z+=Vlt(ny()-1,7);continue;case 47:switch(ys()){case 42:case 47:B0(Xlt(Ult(Er(),ny()),e,o),l);break;default:z+="/"}break;case 123*p:s[d++]=is(z)*W;case 125*p:case 59:case 0:switch(q){case 0:case 125:I=0;case 59+b:W==-1&&(z=vo(z,/\f/g,"")),j>0&&is(z)-C&&B0(j>32?yD(z+";",n,o,C-1):yD(vo(z," ","")+";",n,o,C-2),l);break;case 59:z+=";";default:if(B0($=vD(z,e,o,d,b,i,s,X,H=[],D=[],C),r),q===123)if(b===0)ry(z,e,$,$,H,r,C,s,D);else switch(u===99&&Si(z,3)===110?100:u){case 100:case 108:case 109:case 115:ry(t,$,$,n&&B0(vD(t,$,$,0,0,i,s,X,i,H=[],C),D),i,D,C,s,n?H:D);break;default:ry(z,$,$,$,[""],D,0,s,D)}}d=b=j=0,p=W=1,X=z="",C=a;break;case 58:C=1+is(z),j=A;default:if(p<1){if(q==123)--p;else if(q==125&&p++==0&&Hlt()==125)continue}switch(z+=N1(q),q*p){case 38:W=b>0?1:(z+="\f",-1);break;case 44:s[d++]=(is(z)-1)*W,W=1;break;case 64:ys()===45&&(z+=iy(Er())),u=ys(),b=C=is(X=z+=Glt(ny())),q++;break;case 45:A===45&&is(z)==2&&(p=0)}}return r}function vD(t,e,o,n,i,r,a,s,l,d,b){for(var C=i-1,u=i===0?r:[""],j=DE(u),A=0,p=0,I=0;A<n;++A)for(var W=0,q=_m(t,C+1,C=Ilt(p=a[A])),X=t;W<j;++W)(X=I8(p>0?u[W]+" "+q:vo(q,/&\f/g,u[W])))&&(l[I++]=X);return R1(t,e,o,i===0?LE:s,l,d,b)}function Xlt(t,e,o){return R1(t,e,o,D8,N1(Flt()),_m(t,2,-2),0)}function yD(t,e,o,n){return R1(t,e,o,NE,_m(t,0,n),_m(t,n+1,-1),n)}function Zd(t,e){for(var o="",n=DE(t),i=0;i<n;i++)o+=e(t[i],i,t,e)||"";return o}function qlt(t,e,o,n){switch(t.type){case Rlt:if(t.children.length)break;case Dlt:case NE:return t.return=t.return||t.value;case D8:return"";case R8:return t.return=t.value+"{"+Zd(t.children,n)+"}";case LE:t.value=t.props.join(",")}return is(o=Zd(t.children,n))?t.return=t.value+"{"+o+"}":""}function Zlt(t){var e=DE(t);return function(o,n,i,r){for(var a="",s=0;s<e;s++)a+=t[s](o,n,i,r)||"";return a}}function Klt(t){return function(e){e.root||(e=e.return)&&t(e)}}function B8(t){var e=Object.create(null);return function(o){return e[o]===void 0&&(e[o]=t(o)),e[o]}}var Jlt=function(t,e,o){for(var n=0,i=0;n=i,i=ys(),n===38&&i===12&&(e[o]=1),!Sm(i);)Er();return Og(t,br)},Qlt=function(t,e){var o=-1,n=44;do switch(Sm(n)){case 0:n===38&&ys()===12&&(e[o]=1),t[o]+=Jlt(br-1,e,o);break;case 2:t[o]+=iy(n);break;case 4:if(n===44){t[++o]=ys()===58?"&\f":"",e[o]=t[o].length;break}default:t[o]+=N1(n)}while(n=Er());return t},tct=function(t,e){return z8(Qlt($8(t),e))},bD=new WeakMap,ect=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var e=t.value,o=t.parent,n=t.column===o.column&&t.line===o.line;o.type!=="rule";)if(o=o.parent,!o)return;if(!(t.props.length===1&&e.charCodeAt(0)!==58&&!bD.get(o))&&!n){bD.set(t,!0);for(var i=[],r=tct(e,i),a=o.props,s=0,l=0;s<r.length;s++)for(var d=0;d<a.length;d++,l++)t.props[l]=i[s]?r[s].replace(/&\f/g,a[d]):a[d]+" "+r[s]}}},oct=function(t){if(t.type==="decl"){var e=t.value;e.charCodeAt(0)===108&&e.charCodeAt(2)===98&&(t.return="",t.value="")}};function F8(t,e){switch($lt(t,e)){case 5103:return go+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return go+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return go+t+Wy+t+Ni+t+t;case 6828:case 4268:return go+t+Ni+t+t;case 6165:return go+t+Ni+"flex-"+t+t;case 5187:return go+t+vo(t,/(\w+).+(:[^]+)/,go+"box-$1$2"+Ni+"flex-$1$2")+t;case 5443:return go+t+Ni+"flex-item-"+vo(t,/flex-|-self/,"")+t;case 4675:return go+t+Ni+"flex-line-pack"+vo(t,/align-content|flex-|-self/,"")+t;case 5548:return go+t+Ni+vo(t,"shrink","negative")+t;case 5292:return go+t+Ni+vo(t,"basis","preferred-size")+t;case 6060:return go+"box-"+vo(t,"-grow","")+go+t+Ni+vo(t,"grow","positive")+t;case 4554:return go+vo(t,/([^-])(transform)/g,"$1"+go+"$2")+t;case 6187:return vo(vo(vo(t,/(zoom-|grab)/,go+"$1"),/(image-set)/,go+"$1"),t,"")+t;case 5495:case 3959:return vo(t,/(image-set\([^]*)/,go+"$1$`$1");case 4968:return vo(vo(t,/(.+:)(flex-)?(.*)/,go+"box-pack:$3"+Ni+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+go+t+t;case 4095:case 3583:case 4068:case 2532:return vo(t,/(.+)-inline(.+)/,go+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(is(t)-1-e>6)switch(Si(t,e+1)){case 109:if(Si(t,e+4)!==45)break;case 102:return vo(t,/(.+:)(.+)-([^]+)/,"$1"+go+"$2-$3$1"+Wy+(Si(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~Y2(t,"stretch")?F8(vo(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(Si(t,e+1)!==115)break;case 6444:switch(Si(t,is(t)-3-(~Y2(t,"!important")&&10))){case 107:return vo(t,":",":"+go)+t;case 101:return vo(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+go+(Si(t,14)===45?"inline-":"")+"box$3$1"+go+"$2$3$1"+Ni+"$2box$3")+t}break;case 5936:switch(Si(t,e+11)){case 114:return go+t+Ni+vo(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return go+t+Ni+vo(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return go+t+Ni+vo(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return go+t+Ni+t+t}return t}var nct=function(t,e,o,n){if(t.length>-1&&!t.return)switch(t.type){case NE:t.return=F8(t.value,t.length);break;case R8:return Zd([Rh(t,{value:vo(t.value,"@","@"+go)})],n);case LE:if(t.length)return Blt(t.props,function(i){switch(zlt(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Zd([Rh(t,{props:[vo(i,/:(read-\w+)/,":"+Wy+"$1")]})],n);case"::placeholder":return Zd([Rh(t,{props:[vo(i,/:(plac\w+)/,":"+go+"input-$1")]}),Rh(t,{props:[vo(i,/:(plac\w+)/,":"+Wy+"$1")]}),Rh(t,{props:[vo(i,/:(plac\w+)/,Ni+"input-$1")]})],n)}return""})}},ict=[nct],I1=function(t){var e=t.key;if(e==="css"){var o=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(o,function(A){var p=A.getAttribute("data-emotion");p.indexOf(" ")!==-1&&(document.head.appendChild(A),A.setAttribute("data-s",""))})}var n=t.stylisPlugins||ict,i={},r,a=[];r=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+e+' "]'),function(A){for(var p=A.getAttribute("data-emotion").split(" "),I=1;I<p.length;I++)i[p[I]]=!0;a.push(A)});var s,l=[ect,oct];{var d,b=[qlt,Klt(function(A){d.insert(A)})],C=Zlt(l.concat(n,b)),u=function(A){return Zd(Ylt(A),C)};s=function(A,p,I,W){d=I,u(A?A+"{"+p.styles+"}":p.styles),W&&(j.inserted[p.name]=!0)}}var j={key:e,sheet:new Nlt({key:e,container:r,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:i,registered:{},insert:s};return j.sheet.hydrate(a),j},rct=!0;function H8(t,e,o){var n="";return o.split(" ").forEach(function(i){t[i]!==void 0?e.push(t[i]+";"):i&&(n+=i+" ")}),n}var RE=function(t,e,o){var n=t.key+"-"+e.name;(o===!1||rct===!1)&&t.registered[n]===void 0&&(t.registered[n]=e.styles)},IE=function(t,e,o){RE(t,e,o);var n=t.key+"-"+e.name;if(t.inserted[e.name]===void 0){var i=e;do t.insert(e===i?"."+n:"",i,t.sheet,!0),i=i.next;while(i!==void 0)}};function act(t){for(var e=0,o,n=0,i=t.length;i>=4;++n,i-=4)o=t.charCodeAt(n)&255|(t.charCodeAt(++n)&255)<<8|(t.charCodeAt(++n)&255)<<16|(t.charCodeAt(++n)&255)<<24,o=(o&65535)*1540483477+((o>>>16)*59797<<16),o^=o>>>24,e=(o&65535)*1540483477+((o>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(n+2)&255)<<16;case 2:e^=(t.charCodeAt(n+1)&255)<<8;case 1:e^=t.charCodeAt(n)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var sct={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},lct=!1,cct=/[A-Z]|^ms/g,uct=/_EMO_([^_]+?)_([^]*?)_EMO_/g,W8=function(t){return t.charCodeAt(1)===45},xD=function(t){return t!=null&&typeof t!="boolean"},O_=B8(function(t){return W8(t)?t:t.replace(cct,"-$&").toLowerCase()}),wD=function(t,e){switch(t){case"animation":case"animationName":if(typeof e=="string")return e.replace(uct,function(o,n,i){return rs={name:n,styles:i,next:rs},n})}return sct[t]!==1&&!W8(t)&&typeof e=="number"&&e!==0?e+"px":e},dct="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Cm(t,e,o){if(o==null)return"";var n=o;if(n.__emotion_styles!==void 0)return n;switch(typeof o){case"boolean":return"";case"object":{var i=o;if(i.anim===1)return rs={name:i.name,styles:i.styles,next:rs},i.name;var r=o;if(r.styles!==void 0){var a=r.next;if(a!==void 0)for(;a!==void 0;)rs={name:a.name,styles:a.styles,next:rs},a=a.next;var s=r.styles+";";return s}return pct(t,e,o)}case"function":{if(t!==void 0){var l=rs,d=o(t);return rs=l,Cm(t,e,d)}break}}var b=o;if(e==null)return b;var C=e[b];return C!==void 0?C:b}function pct(t,e,o){var n="";if(Array.isArray(o))for(var i=0;i<o.length;i++)n+=Cm(t,e,o[i])+";";else for(var r in o){var a=o[r];if(typeof a!="object"){var s=a;e!=null&&e[s]!==void 0?n+=r+"{"+e[s]+"}":xD(s)&&(n+=O_(r)+":"+wD(r,s)+";")}else{if(r==="NO_COMPONENT_SELECTOR"&&lct)throw new Error(dct);if(Array.isArray(a)&&typeof a[0]=="string"&&(e==null||e[a[0]]===void 0))for(var l=0;l<a.length;l++)xD(a[l])&&(n+=O_(r)+":"+wD(r,a[l])+";");else{var d=Cm(t,e,a);switch(r){case"animation":case"animationName":{n+=O_(r)+":"+d+";";break}default:n+=r+"{"+d+"}"}}}}return n}var _D=/label:\s*([^\s;{]+)\s*(;|$)/g,rs;function Zp(t,e,o){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var n=!0,i="";rs=void 0;var r=t[0];if(r==null||r.raw===void 0)n=!1,i+=Cm(o,e,r);else{var a=r;i+=a[0]}for(var s=1;s<t.length;s++)if(i+=Cm(o,e,t[s]),n){var l=r;i+=l[s]}_D.lastIndex=0;for(var d="",b;(b=_D.exec(i))!==null;)d+="-"+b[1];var C=act(i)+d;return{name:C,styles:i,next:rs}}var hct=function(t){return t()},V8=Kl[`useInsertionEffect${Math.random()}`.slice(0,18)]?Kl[`useInsertionEffect${Math.random()}`.slice(0,18)]:!1,fct=V8||hct,SD=V8||Pi,mct=!1,U8=uo(typeof HTMLElement<"u"?I1({key:"css"}):null),jE=U8.Provider,$E=function(t){return ye(function(e,o){var n=eo(U8);return t(e,n,o)})},Kp=uo({}),Lg={}.hasOwnProperty,q2="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",zE=function(t,e){var o={};for(var n in e)Lg.call(e,n)&&(o[n]=e[n]);return o[q2]=t,o},gct=function(t){var e=t.cache,o=t.serialized,n=t.isStringTag;return RE(e,o,n),fct(function(){return IE(e,o,n)}),null},vct=$E(function(t,e,o){var n=t.css;typeof n=="string"&&e.registered[n]!==void 0&&(n=e.registered[n]);var i=t[q2],r=[n],a="";typeof t.className=="string"?a=H8(e.registered,r,t.className):t.className!=null&&(a=t.className+" ");var s=Zp(r,void 0,eo(Kp));a+=e.key+"-"+s.name;var l={};for(var d in t)Lg.call(t,d)&&d!=="css"&&d!==q2&&!mct&&(l[d]=t[d]);return l.className=a,o&&(l.ref=o),Re(lo,null,Re(gct,{cache:e,serialized:s,isStringTag:typeof i=="string"}),Re(i,l))}),BE=vct;exports.iC=function(t,e){var o=arguments;if(e==null||!Lg.call(e,"css"))return Re.apply(void 0,o);var n=o.length,i=new Array(n);i[0]=BE,i[1]=zE(t,e);for(var r=2;r<n;r++)i[r]=o[r];return Re.apply(null,i)};(function(t){var e;e||(e=t.JSX||(t.JSX={}))})(exports.iC||(exports.iC={}));var yct=$E(function(t,e){var o=t.styles,n=Zp([o],void 0,eo(Kp)),i=Yt();return SD(function(){var r=e.key+"-global",a=new e.sheet.constructor({key:r,nonce:e.sheet.nonce,container:e.sheet.container,speedy:e.sheet.isSpeedy}),s=!1,l=document.querySelector('style[data-emotion="'+r+" "+n.name+'"]');return e.sheet.tags.length&&(a.before=e.sheet.tags[0]),l!==null&&(s=!0,l.setAttribute("data-emotion",r),a.hydrate([l])),i.current=[a,s],function(){a.flush()}},[e]),SD(function(){var r=i.current,a=r[0],s=r[1];if(s){r[1]=!1;return}if(n.next!==void 0&&IE(e,n.next,!0),a.tags.length){var l=a.tags[a.tags.length-1].nextElementSibling;a.before=l,a.flush()}e.insert("",n,a,!1)},[e,n.name]),null});function Kr(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return Zp(e)}function Ns(){var t=Kr.apply(void 0,arguments),e="animation-"+t.name;return{name:e,styles:"@keyframes "+e+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var bct=function(t){return t()},xct=Kl[`useInsertionEffect${Math.random()}`.slice(0,18)]?Kl[`useInsertionEffect${Math.random()}`.slice(0,18)]:!1,wct=xct||bct,_ct=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Sct=B8(function(t){return _ct.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91}),Cct=!1,Tct=Sct,Mct=function(t){return t!=="theme"},CD=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?Tct:Mct},TD=function(t,e,o){var n;if(e){var i=e.shouldForwardProp;n=t.__emotion_forwardProp&&i?function(r){return t.__emotion_forwardProp(r)&&i(r)}:i}return typeof n!="function"&&o&&(n=t.__emotion_forwardProp),n},kct=function(t){var e=t.cache,o=t.serialized,n=t.isStringTag;return RE(e,o,n),wct(function(){return IE(e,o,n)}),null},Act=function t(e,o){var n=e.__emotion_real===e,i=n&&e.__emotion_base||e,r,a;o!==void 0&&(r=o.label,a=o.target);var s=TD(e,o,n),l=s||CD(i),d=!l("as");return function(){var b=arguments,C=n&&e.__emotion_styles!==void 0?e.__emotion_styles.slice(0):[];if(r!==void 0&&C.push("label:"+r+";"),b[0]==null||b[0].raw===void 0)C.push.apply(C,b);else{var u=b[0];C.push(u[0]);for(var j=b.length,A=1;A<j;A++)C.push(b[A],u[A])}var p=$E(function(I,W,q){var X=d&&I.as||i,H="",D=[],$=I;if(I.theme==null){$={};for(var z in I)$[z]=I[z];$.theme=eo(Kp)}typeof I.className=="string"?H=H8(W.registered,D,I.className):I.className!=null&&(H=I.className+" ");var N=Zp(C.concat(D),W.registered,$);H+=W.key+"-"+N.name,a!==void 0&&(H+=" "+a);var V=d&&s===void 0?CD(X):l,E={};for(var x in I)d&&x==="as"||V(x)&&(E[x]=I[x]);return E.className=H,q&&(E.ref=q),Re(lo,null,Re(kct,{cache:W,serialized:N,isStringTag:typeof X=="string"}),Re(X,E))});return p.displayName=r!==void 0?r:"Styled("+(typeof i=="string"?i:i.displayName||i.name||"Component")+")",p.defaultProps=e.defaultProps,p.__emotion_real=p,p.__emotion_base=i,p.__emotion_styles=C,p.__emotion_forwardProp=s,Object.defineProperty(p,"toString",{value:function(){return a===void 0&&Cct?"NO_COMPONENT_SELECTOR":"."+a}}),p.withComponent=function(I,W){var q=t(I,zy({},o,W,{shouldForwardProp:TD(p,W,!0)}));return q.apply(void 0,C)},p}},Ect=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],Mi=Act.bind(null);Ect.forEach(function(t){Mi[t]=Mi(t)});var Pct=Object.defineProperty,Oct=Object.defineProperties,Lct=Object.getOwnPropertyDescriptors,Vy=Object.getOwnPropertySymbols,G8=Object.prototype.hasOwnProperty,Y8=Object.prototype.propertyIsEnumerable,Fl=Math.pow,Z2=(t,e,o)=>e in t?Pct(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,_t=(t,e)=>{for(var o in e||(e={}))G8.call(e,o)&&Z2(t,o,e[o]);if(Vy)for(var o of Vy(e))Y8.call(e,o)&&Z2(t,o,e[o]);return t},Ht=(t,e)=>Oct(t,Lct(e)),K2=t=>typeof t=="symbol"?t:t+"",ge=(t,e)=>{var o={};for(var n in t)G8.call(t,n)&&e.indexOf(n)<0&&(o[n]=t[n]);if(t!=null&&Vy)for(var n of Vy(t))e.indexOf(n)<0&&Y8.call(t,n)&&(o[n]=t[n]);return o},Dt=(t,e,o)=>(Z2(t,typeof e!="symbol"?e+"":e,o),o),X8=(t,e,o)=>new Promise((n,i)=>{var r=l=>{try{s(o.next(l))}catch(d){i(d)}},a=l=>{try{s(o.throw(l))}catch(d){i(d)}},s=l=>l.done?n(l.value):Promise.resolve(l.value).then(r,a);s((o=o.apply(t,e)).next())});const Nct={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console&&console[t]&&console[t].apply(console,e)}};let Dct=class J2{constructor(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,o)}init(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=o.prefix||"i18next:",this.logger=e||Nct,this.options=o,this.debug=o.debug}log(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return this.forward(o,"log","",!0)}warn(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return this.forward(o,"warn","",!0)}error(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return this.forward(o,"error","")}deprecate(){for(var e=arguments.length,o=new Array(e),n=0;n<e;n++)o[n]=arguments[n];return this.forward(o,"warn","WARNING DEPRECATED: ",!0)}forward(e,o,n,i){return i&&!this.debug?null:(typeof e[0]=="string"&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[o](e))}create(e){return new J2(this.logger,_t({prefix:`${this.prefix}:${e}:`},this.options))}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new J2(this.logger,e)}};var gs=new Dct;let j1=class{constructor(){this.observers={}}on(e,o){return e.split(" ").forEach(n=>{this.observers[n]=this.observers[n]||[],this.observers[n].push(o)}),this}off(e,o){if(this.observers[e]){if(!o){delete this.observers[e];return}this.observers[e]=this.observers[e].filter(n=>n!==o)}}emit(e){for(var o=arguments.length,n=new Array(o>1?o-1:0),i=1;i<o;i++)n[i-1]=arguments[i];this.observers[e]&&[].concat(this.observers[e]).forEach(r=>{r(...n)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(r=>{r.apply(r,[e,...n])})}};function Ih(){let t,e;const o=new Promise((n,i)=>{t=n,e=i});return o.resolve=t,o.reject=e,o}function MD(t){return t==null?"":""+t}function Rct(t,e,o){t.forEach(n=>{e[n]&&(o[n]=e[n])})}function FE(t,e,o){function n(a){return a&&a.indexOf("###")>-1?a.replace(/###/g,"."):a}function i(){return!t||typeof t=="string"}const r=typeof e!="string"?[].concat(e):e.split(".");for(;r.length>1;){if(i())return{};const a=n(r.shift());!t[a]&&o&&(t[a]=new o),Object.prototype.hasOwnProperty.call(t,a)?t=t[a]:t={}}return i()?{}:{obj:t,k:n(r.shift())}}function kD(t,e,o){const{obj:n,k:i}=FE(t,e,Object);n[i]=o}function Ict(t,e,o,n){const{obj:i,k:r}=FE(t,e,Object);i[r]=i[r]||[],i[r].push(o)}function Uy(t,e){const{obj:o,k:n}=FE(t,e);if(o)return o[n]}function jct(t,e,o){const n=Uy(t,o);return n!==void 0?n:Uy(e,o)}function q8(t,e,o){for(const n in e)n!=="__proto__"&&n!=="constructor"&&(n in t?typeof t[n]=="string"||t[n]instanceof String||typeof e[n]=="string"||e[n]instanceof String?o&&(t[n]=e[n]):q8(t[n],e[n],o):t[n]=e[n]);return t}function id(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var $ct={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function zct(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,e=>$ct[e]):t}const Bct=[" ",",","?","!",";"];function Fct(t,e,o){e=e||"",o=o||"";const n=Bct.filter(a=>e.indexOf(a)<0&&o.indexOf(a)<0);if(n.length===0)return!0;const i=new RegExp(`(${n.map(a=>a==="?"?"\\?":a).join("|")})`);let r=!i.test(t);if(!r){const a=t.indexOf(o);a>0&&!i.test(t.substring(0,a))&&(r=!0)}return r}function Gy(t,e){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[e])return t[e];const n=e.split(o);let i=t;for(let r=0;r<n.length;++r){if(!i||typeof i[n[r]]=="string"&&r+1<n.length)return;if(i[n[r]]===void 0){let a=2,s=n.slice(r,r+a).join(o),l=i[s];for(;l===void 0&&n.length>r+a;)a++,s=n.slice(r,r+a).join(o),l=i[s];if(l===void 0)return;if(l===null)return null;if(e.endsWith(s)){if(typeof l=="string")return l;if(s&&typeof l[s]=="string")return l[s]}const d=n.slice(r+a).join(o);return d?Gy(l,d,o):void 0}i=i[n[r]]}return i}function Yy(t){return t&&t.indexOf("_")>0?t.replace("_","-"):t}let AD=class extends j1{constructor(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=o,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const o=this.options.ns.indexOf(e);o>-1&&this.options.ns.splice(o,1)}getResource(e,o,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const r=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,a=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let s=[e,o];n&&typeof n!="string"&&(s=s.concat(n)),n&&typeof n=="string"&&(s=s.concat(r?n.split(r):n)),e.indexOf(".")>-1&&(s=e.split("."));const l=Uy(this.data,s);return l||!a||typeof n!="string"?l:Gy(this.data&&this.data[e]&&this.data[e][o],n,r)}addResource(e,o,n,i){let r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let s=[e,o];n&&(s=s.concat(a?n.split(a):n)),e.indexOf(".")>-1&&(s=e.split("."),i=o,o=s[1]),this.addNamespaces(o),kD(this.data,s,i),r.silent||this.emit("added",e,o,n,i)}addResources(e,o,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const r in n)(typeof n[r]=="string"||Object.prototype.toString.apply(n[r])==="[object Array]")&&this.addResource(e,o,r,n[r],{silent:!0});i.silent||this.emit("added",e,o,n)}addResourceBundle(e,o,n,i,r){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},s=[e,o];e.indexOf(".")>-1&&(s=e.split("."),i=n,n=o,o=s[1]),this.addNamespaces(o);let l=Uy(this.data,s)||{};i?q8(l,n,r):l=_t(_t({},l),n),kD(this.data,s,l),a.silent||this.emit("added",e,o,n)}removeResourceBundle(e,o){this.hasResourceBundle(e,o)&&delete this.data[e][o],this.removeNamespaces(o),this.emit("removed",e,o)}hasResourceBundle(e,o){return this.getResource(e,o)!==void 0}getResourceBundle(e,o){return o||(o=this.options.defaultNS),this.options.compatibilityAPI==="v1"?_t({},this.getResource(e,o)):this.getResource(e,o)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const o=this.getDataByLanguage(e);return!!(o&&Object.keys(o)||[]).find(n=>o[n]&&Object.keys(o[n]).length>0)}toJSON(){return this.data}};var Z8={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,o,n,i){return t.forEach(r=>{this.processors[r]&&(e=this.processors[r].process(e,o,n,i))}),e}};const ED={};let PD=class K8 extends j1{constructor(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Rct(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=o,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=gs.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const n=this.resolve(e,o);return n&&n.res!==void 0}extractFromKey(e,o){let n=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let r=o.ns||this.options.defaultNS||[];const a=n&&e.indexOf(n)>-1,s=!this.options.userDefinedKeySeparator&&!o.keySeparator&&!this.options.userDefinedNsSeparator&&!o.nsSeparator&&!Fct(e,n,i);if(a&&!s){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:r};const d=e.split(n);(n!==i||n===i&&this.options.ns.indexOf(d[0])>-1)&&(r=d.shift()),e=d.join(i)}return typeof r=="string"&&(r=[r]),{key:e,namespaces:r}}translate(e,o,n){if(typeof o!="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),typeof o=="object"&&(o=_t({},o)),o||(o={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const i=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,r=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(e[e.length-1],o),l=s[s.length-1],d=o.lng||this.language,b=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&d.toLowerCase()==="cimode"){if(b){const X=o.nsSeparator||this.options.nsSeparator;return i?{res:`${l}${X}${a}`,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:l}:`${l}${X}${a}`}return i?{res:a,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:l}:a}const C=this.resolve(e,o);let u=C&&C.res;const j=C&&C.usedKey||a,A=C&&C.exactUsedKey||a,p=Object.prototype.toString.apply(u),I=["[object Number]","[object Function]","[object RegExp]"],W=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,q=!this.i18nFormat||this.i18nFormat.handleAsObject;if(q&&u&&typeof u!="string"&&typeof u!="boolean"&&typeof u!="number"&&I.indexOf(p)<0&&!(typeof W=="string"&&p==="[object Array]")){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const X=this.options.returnedObjectHandler?this.options.returnedObjectHandler(j,u,Ht(_t({},o),{ns:s})):`key '${a} (${this.language})' returned an object instead of string.`;return i?(C.res=X,C):X}if(r){const X=p==="[object Array]",H=X?[]:{},D=X?A:j;for(const $ in u)if(Object.prototype.hasOwnProperty.call(u,$)){const z=`${D}${r}${$}`;H[$]=this.translate(z,Ht(_t({},o),{joinArrays:!1,ns:s})),H[$]===z&&(H[$]=u[$])}u=H}}else if(q&&typeof W=="string"&&p==="[object Array]")u=u.join(W),u&&(u=this.extendTranslation(u,e,o,n));else{let X=!1,H=!1;const D=o.count!==void 0&&typeof o.count!="string",$=K8.hasDefaultValue(o),z=D?this.pluralResolver.getSuffix(d,o.count,o):"",N=o.ordinal&&D?this.pluralResolver.getSuffix(d,o.count,{ordinal:!1}):"",V=o[`defaultValue${z}`]||o[`defaultValue${N}`]||o.defaultValue;!this.isValidLookup(u)&&$&&(X=!0,u=V),this.isValidLookup(u)||(H=!0,u=a);const E=(o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&H?void 0:u,x=$&&V!==u&&this.options.updateMissing;if(H||X||x){if(this.logger.log(x?"updateKey":"missingKey",d,l,a,x?V:u),r){const P=this.resolve(a,Ht(_t({},o),{keySeparator:!1}));P&&P.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let g=[];const S=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&S&&S[0])for(let P=0;P<S.length;P++)g.push(S[P]);else this.options.saveMissingTo==="all"?g=this.languageUtils.toResolveHierarchy(o.lng||this.language):g.push(o.lng||this.language);const w=(P,U,Z)=>{const B=$&&Z!==u?Z:E;this.options.missingKeyHandler?this.options.missingKeyHandler(P,l,U,B,x,o):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(P,l,U,B,x,o),this.emit("missingKey",P,l,U,u)};this.options.saveMissing&&(this.options.saveMissingPlurals&&D?g.forEach(P=>{this.pluralResolver.getSuffixes(P,o).forEach(U=>{w([P],a+U,o[`defaultValue${U}`]||V)})}):w(g,a,V))}u=this.extendTranslation(u,e,o,C,n),H&&u===a&&this.options.appendNamespaceToMissingKey&&(u=`${l}:${a}`),(H||X)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?u=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${a}`:a,X?u:void 0):u=this.options.parseMissingKeyHandler(u))}return i?(C.res=u,C):u}extendTranslation(e,o,n,i,r){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,_t(_t({},this.options.interpolation.defaultVariables),n),i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(Ht(_t({},n),{interpolation:_t(_t({},this.options.interpolation),n.interpolation)}));const d=typeof e=="string"&&(n&&n.interpolation&&n.interpolation.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let b;if(d){const u=e.match(this.interpolator.nestingRegexp);b=u&&u.length}let C=n.replace&&typeof n.replace!="string"?n.replace:n;if(this.options.interpolation.defaultVariables&&(C=_t(_t({},this.options.interpolation.defaultVariables),C)),e=this.interpolator.interpolate(e,C,n.lng||this.language,n),d){const u=e.match(this.interpolator.nestingRegexp),j=u&&u.length;b<j&&(n.nest=!1)}!n.lng&&this.options.compatibilityAPI!=="v1"&&i&&i.res&&(n.lng=i.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var u=arguments.length,j=new Array(u),A=0;A<u;A++)j[A]=arguments[A];return r&&r[0]===j[0]&&!n.context?(a.logger.warn(`It seems you are nesting recursively key: ${j[0]} in key: ${o[0]}`),null):a.translate(...j,o)},n)),n.interpolation&&this.interpolator.reset()}const s=n.postProcess||this.options.postProcess,l=typeof s=="string"?[s]:s;return e!=null&&l&&l.length&&n.applyPostProcessor!==!1&&(e=Z8.handle(l,e,o,this.options&&this.options.postProcessPassResolved?_t({i18nResolved:i},n):n,this)),e}resolve(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,i,r,a,s;return typeof e=="string"&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(n))return;const d=this.extractFromKey(l,o),b=d.key;i=b;let C=d.namespaces;this.options.fallbackNS&&(C=C.concat(this.options.fallbackNS));const u=o.count!==void 0&&typeof o.count!="string",j=u&&!o.ordinal&&o.count===0&&this.pluralResolver.shouldUseIntlApi(),A=o.context!==void 0&&(typeof o.context=="string"||typeof o.context=="number")&&o.context!=="",p=o.lngs?o.lngs:this.languageUtils.toResolveHierarchy(o.lng||this.language,o.fallbackLng);C.forEach(I=>{this.isValidLookup(n)||(s=I,!ED[`${p[0]}-${I}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(s)&&(ED[`${p[0]}-${I}`]=!0,this.logger.warn(`key "${i}" for languages "${p.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach(W=>{if(this.isValidLookup(n))return;a=W;const q=[b];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(q,b,W,I,o);else{let H;u&&(H=this.pluralResolver.getSuffix(W,o.count,o));const D=`${this.options.pluralSeparator}zero`,$=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(q.push(b+H),o.ordinal&&H.indexOf($)===0&&q.push(b+H.replace($,this.options.pluralSeparator)),j&&q.push(b+D)),A){const z=`${b}${this.options.contextSeparator}${o.context}`;q.push(z),u&&(q.push(z+H),o.ordinal&&H.indexOf($)===0&&q.push(z+H.replace($,this.options.pluralSeparator)),j&&q.push(z+D))}}let X;for(;X=q.pop();)this.isValidLookup(n)||(r=X,n=this.getResource(W,I,X,o))}))})}),{res:n,usedKey:i,exactUsedKey:r,usedLng:a,usedNS:s}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,o,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,o,n,i):this.resourceStore.getResource(e,o,n,i)}static hasDefaultValue(e){const o="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&o===n.substring(0,o.length)&&e[n]!==void 0)return!0;return!1}};function L_(t){return t.charAt(0).toUpperCase()+t.slice(1)}let OD=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=gs.create("languageUtils")}getScriptPartFromCode(e){if(e=Yy(e),!e||e.indexOf("-")<0)return null;const o=e.split("-");return o.length===2||(o.pop(),o[o.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(o.join("-"))}getLanguagePartFromCode(e){if(e=Yy(e),!e||e.indexOf("-")<0)return e;const o=e.split("-");return this.formatLanguageCode(o[0])}formatLanguageCode(e){if(typeof e=="string"&&e.indexOf("-")>-1){const o=["hans","hant","latn","cyrl","cans","mong","arab"];let n=e.split("-");return this.options.lowerCaseLng?n=n.map(i=>i.toLowerCase()):n.length===2?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),o.indexOf(n[1].toLowerCase())>-1&&(n[1]=L_(n[1].toLowerCase()))):n.length===3&&(n[0]=n[0].toLowerCase(),n[1].length===2&&(n[1]=n[1].toUpperCase()),n[0]!=="sgn"&&n[2].length===2&&(n[2]=n[2].toUpperCase()),o.indexOf(n[1].toLowerCase())>-1&&(n[1]=L_(n[1].toLowerCase())),o.indexOf(n[2].toLowerCase())>-1&&(n[2]=L_(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let o;return e.forEach(n=>{if(o)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(o=i)}),!o&&this.options.supportedLngs&&e.forEach(n=>{if(o)return;const i=this.getLanguagePartFromCode(n);if(this.isSupportedCode(i))return o=i;o=this.options.supportedLngs.find(r=>{if(r===i||!(r.indexOf("-")<0&&i.indexOf("-")<0)&&r.indexOf(i)===0)return r})}),o||(o=this.getFallbackCodes(this.options.fallbackLng)[0]),o}getFallbackCodes(e,o){if(!e)return[];if(typeof e=="function"&&(e=e(o)),typeof e=="string"&&(e=[e]),Object.prototype.toString.apply(e)==="[object Array]")return e;if(!o)return e.default||[];let n=e[o];return n||(n=e[this.getScriptPartFromCode(o)]),n||(n=e[this.formatLanguageCode(o)]),n||(n=e[this.getLanguagePartFromCode(o)]),n||(n=e.default),n||[]}toResolveHierarchy(e,o){const n=this.getFallbackCodes(o||this.options.fallbackLng||[],e),i=[],r=a=>{a&&(this.isSupportedCode(a)?i.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return typeof e=="string"&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&r(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&r(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&r(this.getLanguagePartFromCode(e))):typeof e=="string"&&r(this.formatLanguageCode(e)),n.forEach(a=>{i.indexOf(a)<0&&r(this.formatLanguageCode(a))}),i}},Hct=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Wct={1:function(t){return+(t>1)},2:function(t){return+(t!=1)},3:function(t){return 0},4:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},5:function(t){return t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5},6:function(t){return t==1?0:t>=2&&t<=4?1:2},7:function(t){return t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},8:function(t){return t==1?0:t==2?1:t!=8&&t!=11?2:3},9:function(t){return+(t>=2)},10:function(t){return t==1?0:t==2?1:t<7?2:t<11?3:4},11:function(t){return t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3},12:function(t){return+(t%10!=1||t%100==11)},13:function(t){return+(t!==0)},14:function(t){return t==1?0:t==2?1:t==3?2:3},15:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2},16:function(t){return t%10==1&&t%100!=11?0:t!==0?1:2},17:function(t){return t==1||t%10==1&&t%100!=11?0:1},18:function(t){return t==0?0:t==1?1:2},19:function(t){return t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3},20:function(t){return t==1?0:t==0||t%100>0&&t%100<20?1:2},21:function(t){return t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0},22:function(t){return t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3}};const Vct=["v1","v2","v3"],Uct=["v4"],LD={zero:0,one:1,two:2,few:3,many:4,other:5};function Gct(){const t={};return Hct.forEach(e=>{e.lngs.forEach(o=>{t[o]={numbers:e.nr,plurals:Wct[e.fc]}})}),t}let Yct=class{constructor(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=o,this.logger=gs.create("pluralResolver"),(!this.options.compatibilityJSON||Uct.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Gct()}addRule(e,o){this.rules[e]=o}getRule(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(Yy(e),{type:o.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(e,o);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,o){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,n).map(i=>`${o}${i}`)}getSuffixes(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(e,o);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((i,r)=>LD[i]-LD[r]).map(i=>`${this.options.prepend}${o.ordinal?`ordinal${this.options.prepend}`:""}${i}`):n.numbers.map(i=>this.getSuffix(e,i,o)):[]}getSuffix(e,o){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(e,n);return i?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(o)}`:this.getSuffixRetroCompatible(i,o):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,o){const n=e.noAbs?e.plurals(o):e.plurals(Math.abs(o));let i=e.numbers[n];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const r=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:r():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?r():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!Vct.includes(this.options.compatibilityJSON)}};function ND(t,e,o){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,r=jct(t,e,o);return!r&&i&&typeof o=="string"&&(r=Gy(t,o,n),r===void 0&&(r=Gy(e,o,n))),r}let Xct=class{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=gs.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(o=>o),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const o=e.interpolation;this.escape=o.escape!==void 0?o.escape:zct,this.escapeValue=o.escapeValue!==void 0?o.escapeValue:!0,this.useRawValueToEscape=o.useRawValueToEscape!==void 0?o.useRawValueToEscape:!1,this.prefix=o.prefix?id(o.prefix):o.prefixEscaped||"{{",this.suffix=o.suffix?id(o.suffix):o.suffixEscaped||"}}",this.formatSeparator=o.formatSeparator?o.formatSeparator:o.formatSeparator||",",this.unescapePrefix=o.unescapeSuffix?"":o.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":o.unescapeSuffix||"",this.nestingPrefix=o.nestingPrefix?id(o.nestingPrefix):o.nestingPrefixEscaped||id("$t("),this.nestingSuffix=o.nestingSuffix?id(o.nestingSuffix):o.nestingSuffixEscaped||id(")"),this.nestingOptionsSeparator=o.nestingOptionsSeparator?o.nestingOptionsSeparator:o.nestingOptionsSeparator||",",this.maxReplaces=o.maxReplaces?o.maxReplaces:1e3,this.alwaysFormat=o.alwaysFormat!==void 0?o.alwaysFormat:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=`${this.prefix}(.+?)${this.suffix}`;this.regexp=new RegExp(e,"g");const o=`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;this.regexpUnescape=new RegExp(o,"g");const n=`${this.nestingPrefix}(.+?)${this.nestingSuffix}`;this.nestingRegexp=new RegExp(n,"g")}interpolate(e,o,n,i){let r,a,s;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function d(j){return j.replace(/\$/g,"$$$$")}const b=j=>{if(j.indexOf(this.formatSeparator)<0){const W=ND(o,l,j,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(W,void 0,n,Ht(_t(_t({},i),o),{interpolationkey:j})):W}const A=j.split(this.formatSeparator),p=A.shift().trim(),I=A.join(this.formatSeparator).trim();return this.format(ND(o,l,p,this.options.keySeparator,this.options.ignoreJSONStructure),I,n,Ht(_t(_t({},i),o),{interpolationkey:p}))};this.resetRegExp();const C=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,u=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:j=>d(j)},{regex:this.regexp,safeValue:j=>this.escapeValue?d(this.escape(j)):d(j)}].forEach(j=>{for(s=0;r=j.regex.exec(e);){const A=r[1].trim();if(a=b(A),a===void 0)if(typeof C=="function"){const I=C(e,r,i);a=typeof I=="string"?I:""}else if(i&&Object.prototype.hasOwnProperty.call(i,A))a="";else if(u){a=r[0];continue}else this.logger.warn(`missed to pass in variable ${A} for interpolating ${e}`),a="";else typeof a!="string"&&!this.useRawValueToEscape&&(a=MD(a));const p=j.safeValue(a);if(e=e.replace(r[0],p),u?(j.regex.lastIndex+=a.length,j.regex.lastIndex-=r[0].length):j.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),e}nest(e,o){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,r,a;function s(l,d){const b=this.nestingOptionsSeparator;if(l.indexOf(b)<0)return l;const C=l.split(new RegExp(`${b}[ ]*{`));let u=`{${C[1]}`;l=C[0],u=this.interpolate(u,a);const j=u.match(/'/g),A=u.match(/"/g);(j&&j.length%2===0&&!A||A.length%2!==0)&&(u=u.replace(/'/g,'"'));try{a=JSON.parse(u),d&&(a=_t(_t({},d),a))}catch(p){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,p),`${l}${b}${u}`}return delete a.defaultValue,l}for(;i=this.nestingRegexp.exec(e);){let l=[];a=_t({},n),a=a.replace&&typeof a.replace!="string"?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let d=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const b=i[1].split(this.formatSeparator).map(C=>C.trim());i[1]=b.shift(),l=b,d=!0}if(r=o(s.call(this,i[1].trim(),a),a),r&&i[0]===e&&typeof r!="string")return r;typeof r!="string"&&(r=MD(r)),r||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),r=""),d&&(r=l.reduce((b,C)=>this.format(b,C,n.lng,Ht(_t({},n),{interpolationkey:i[1].trim()})),r.trim())),e=e.replace(i[0],r),this.regexp.lastIndex=0}return e}};function qct(t){let e=t.toLowerCase().trim();const o={};if(t.indexOf("(")>-1){const n=t.split("(");e=n[0].toLowerCase().trim();const i=n[1].substring(0,n[1].length-1);e==="currency"&&i.indexOf(":")<0?o.currency||(o.currency=i.trim()):e==="relativetime"&&i.indexOf(":")<0?o.range||(o.range=i.trim()):i.split(";").forEach(r=>{if(!r)return;const[a,...s]=r.split(":"),l=s.join(":").trim().replace(/^'+|'+$/g,"");o[a.trim()]||(o[a.trim()]=l),l==="false"&&(o[a.trim()]=!1),l==="true"&&(o[a.trim()]=!0),isNaN(l)||(o[a.trim()]=parseInt(l,10))})}return{formatName:e,formatOptions:o}}function rd(t){const e={};return function(o,n,i){const r=n+JSON.stringify(i);let a=e[r];return a||(a=t(Yy(n),i),e[r]=a),a(o)}}let Zct=class{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=gs.create("formatter"),this.options=e,this.formats={number:rd((o,n)=>{const i=new Intl.NumberFormat(o,_t({},n));return r=>i.format(r)}),currency:rd((o,n)=>{const i=new Intl.NumberFormat(o,Ht(_t({},n),{style:"currency"}));return r=>i.format(r)}),datetime:rd((o,n)=>{const i=new Intl.DateTimeFormat(o,_t({},n));return r=>i.format(r)}),relativetime:rd((o,n)=>{const i=new Intl.RelativeTimeFormat(o,_t({},n));return r=>i.format(r,n.range||"day")}),list:rd((o,n)=>{const i=new Intl.ListFormat(o,_t({},n));return r=>i.format(r)})},this.init(e)}init(e){const o=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=o.formatSeparator?o.formatSeparator:o.formatSeparator||","}add(e,o){this.formats[e.toLowerCase().trim()]=o}addCached(e,o){this.formats[e.toLowerCase().trim()]=rd(o)}format(e,o,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return o.split(this.formatSeparator).reduce((r,a)=>{const{formatName:s,formatOptions:l}=qct(a);if(this.formats[s]){let d=r;try{const b=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},C=b.locale||b.lng||i.locale||i.lng||n;d=this.formats[s](r,C,_t(_t(_t({},l),i),b))}catch(b){this.logger.warn(b)}return d}else this.logger.warn(`there was no format function for ${s}`);return r},e)}};function Kct(t,e){t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)}let Jct=class extends j1{constructor(e,o,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=o,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=gs.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,i.backend,i)}queueLoad(e,o,n,i){const r={},a={},s={},l={};return e.forEach(d=>{let b=!0;o.forEach(C=>{const u=`${d}|${C}`;!n.reload&&this.store.hasResourceBundle(d,C)?this.state[u]=2:this.state[u]<0||(this.state[u]===1?a[u]===void 0&&(a[u]=!0):(this.state[u]=1,b=!1,a[u]===void 0&&(a[u]=!0),r[u]===void 0&&(r[u]=!0),l[C]===void 0&&(l[C]=!0)))}),b||(s[d]=!0)}),(Object.keys(r).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(r),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}loaded(e,o,n){const i=e.split("|"),r=i[0],a=i[1];o&&this.emit("failedLoading",r,a,o),n&&this.store.addResourceBundle(r,a,n),this.state[e]=o?-1:2;const s={};this.queue.forEach(l=>{Ict(l.loaded,[r],a),Kct(l,e),o&&l.errors.push(o),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(d=>{s[d]||(s[d]={});const b=l.loaded[d];b.length&&b.forEach(C=>{s[d][C]===void 0&&(s[d][C]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(l=>!l.done)}read(e,o,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:o,fcName:n,tried:i,wait:r,callback:a});return}this.readingCalls++;const s=(d,b)=>{if(this.readingCalls--,this.waitingReads.length>0){const C=this.waitingReads.shift();this.read(C.lng,C.ns,C.fcName,C.tried,C.wait,C.callback)}if(d&&b&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,e,o,n,i+1,r*2,a)},r);return}a(d,b)},l=this.backend[n].bind(this.backend);if(l.length===2){try{const d=l(e,o);d&&typeof d.then=="function"?d.then(b=>s(null,b)).catch(s):s(null,d)}catch(d){s(d)}return}return l(e,o,s)}prepareLoading(e,o){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();typeof e=="string"&&(e=this.languageUtils.toResolveHierarchy(e)),typeof o=="string"&&(o=[o]);const r=this.queueLoad(e,o,n,i);if(!r.toLoad.length)return r.pending.length||i(),null;r.toLoad.forEach(a=>{this.loadOne(a)})}load(e,o,n){this.prepareLoading(e,o,{},n)}reload(e,o,n){this.prepareLoading(e,o,{reload:!0},n)}loadOne(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const n=e.split("|"),i=n[0],r=n[1];this.read(i,r,"read",void 0,void 0,(a,s)=>{a&&this.logger.warn(`${o}loading namespace ${r} for language ${i} failed`,a),!a&&s&&this.logger.log(`${o}loaded namespace ${r} for language ${i}`,s),this.loaded(e,a,s)})}saveMissing(e,o,n,i,r){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(o)){this.logger.warn(`did not save key "${n}" as the namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if(this.backend&&this.backend.create){const l=Ht(_t({},a),{isUpdate:r}),d=this.backend.create.bind(this.backend);if(d.length<6)try{let b;d.length===5?b=d(e,o,n,i,l):b=d(e,o,n,i),b&&typeof b.then=="function"?b.then(C=>s(null,C)).catch(s):s(null,b)}catch(b){s(b)}else d(e,o,n,i,s,l)}!e||!e[0]||this.store.addResource(e[0],o,n,i)}}};function DD(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){let e={};if(typeof t[1]=="object"&&(e=t[1]),typeof t[1]=="string"&&(e.defaultValue=t[1]),typeof t[2]=="string"&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const o=t[3]||t[2];Object.keys(o).forEach(n=>{e[n]=o[n]})}return e},interpolation:{escapeValue:!0,format:(t,e,o,n)=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function RD(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function F0(){}function Qct(t){Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(e=>{typeof t[e]=="function"&&(t[e]=t[e].bind(t))})}class Tm extends j1{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(super(),this.options=RD(e),this.services={},this.logger=gs,this.modules={external:[]},Qct(this),o&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,o),this;setTimeout(()=>{this.init(e,o)},0)}}init(){var e=this;let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;typeof o=="function"&&(n=o,o={}),!o.defaultNS&&o.defaultNS!==!1&&o.ns&&(typeof o.ns=="string"?o.defaultNS=o.ns:o.ns.indexOf("translation")<0&&(o.defaultNS=o.ns[0]));const i=DD();this.options=_t(_t(_t({},i),this.options),RD(o)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=_t(_t({},i.interpolation),this.options.interpolation)),o.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=o.keySeparator),o.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=o.nsSeparator);function r(l){return l?typeof l=="function"?new l:l:null}if(!this.options.isClone){this.modules.logger?gs.init(r(this.modules.logger),this.options):gs.init(null,this.options);let l;this.modules.formatter?l=this.modules.formatter:typeof Intl<"u"&&(l=Zct);const d=new OD(this.options);this.store=new AD(this.options.resources,this.options);const b=this.services;b.logger=gs,b.resourceStore=this.store,b.languageUtils=d,b.pluralResolver=new Yct(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),l&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(b.formatter=r(l),b.formatter.init(b,this.options),this.options.interpolation.format=b.formatter.format.bind(b.formatter)),b.interpolator=new Xct(this.options),b.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},b.backendConnector=new Jct(r(this.modules.backend),b.resourceStore,b,this.options),b.backendConnector.on("*",function(C){for(var u=arguments.length,j=new Array(u>1?u-1:0),A=1;A<u;A++)j[A-1]=arguments[A];e.emit(C,...j)}),this.modules.languageDetector&&(b.languageDetector=r(this.modules.languageDetector),b.languageDetector.init&&b.languageDetector.init(b,this.options.detection,this.options)),this.modules.i18nFormat&&(b.i18nFormat=r(this.modules.i18nFormat),b.i18nFormat.init&&b.i18nFormat.init(this)),this.translator=new PD(this.services,this.options),this.translator.on("*",function(C){for(var u=arguments.length,j=new Array(u>1?u-1:0),A=1;A<u;A++)j[A-1]=arguments[A];e.emit(C,...j)}),this.modules.external.forEach(C=>{C.init&&C.init(this)})}if(this.format=this.options.interpolation.format,n||(n=F0),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&l[0]!=="dev"&&(this.options.lng=l[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(l=>{this[l]=function(){return e.store[l](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(l=>{this[l]=function(){return e.store[l](...arguments),e}});const a=Ih(),s=()=>{const l=(d,b)=>{this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(b),n(d,b)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return l(null,this.t.bind(this));this.changeLanguage(this.options.lng,l)};return this.options.resources||!this.options.initImmediate?s():setTimeout(s,0),a}loadResources(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:F0;const n=typeof e=="string"?e:this.language;if(typeof e=="function"&&(o=e),!this.options.resources||this.options.partialBundledLanguages){if(n&&n.toLowerCase()==="cimode")return o();const i=[],r=a=>{a&&this.services.languageUtils.toResolveHierarchy(a).forEach(s=>{i.indexOf(s)<0&&i.push(s)})};n?r(n):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(a=>r(a)),this.options.preload&&this.options.preload.forEach(a=>r(a)),this.services.backendConnector.load(i,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),o(a)})}else o(null)}reloadResources(e,o,n){const i=Ih();return e||(e=this.languages),o||(o=this.options.ns),n||(n=F0),this.services.backendConnector.reload(e,o,r=>{i.resolve(),n(r)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&Z8.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let o=0;o<this.languages.length;o++){const n=this.languages[o];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(e,o){var n=this;this.isLanguageChangingTo=e;const i=Ih();this.emit("languageChanging",e);const r=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},a=(l,d)=>{d?(r(d),this.translator.changeLanguage(d),this.isLanguageChangingTo=void 0,this.emit("languageChanged",d),this.logger.log("languageChanged",d)):this.isLanguageChangingTo=void 0,i.resolve(function(){return n.t(...arguments)}),o&&o(l,function(){return n.t(...arguments)})},s=l=>{!e&&!l&&this.services.languageDetector&&(l=[]);const d=typeof l=="string"?l:this.services.languageUtils.getBestMatchFromCodes(l);d&&(this.language||r(d),this.translator.language||this.translator.changeLanguage(d),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(d)),this.loadResources(d,b=>{a(b,d)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(e),i}getFixedT(e,o,n){var i=this;const r=function(a,s){let l;if(typeof s!="object"){for(var d=arguments.length,b=new Array(d>2?d-2:0),C=2;C<d;C++)b[C-2]=arguments[C];l=i.options.overloadTranslationOptionHandler([a,s].concat(b))}else l=_t({},s);l.lng=l.lng||r.lng,l.lngs=l.lngs||r.lngs,l.ns=l.ns||r.ns,l.keyPrefix=l.keyPrefix||n||r.keyPrefix;const u=i.options.keySeparator||".";let j;return l.keyPrefix&&Array.isArray(a)?j=a.map(A=>`${l.keyPrefix}${u}${A}`):j=l.keyPrefix?`${l.keyPrefix}${u}${a}`:a,i.t(j,l)};return typeof e=="string"?r.lng=e:r.lngs=e,r.ns=o,r.keyPrefix=n,r}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=o.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,r=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const a=(s,l)=>{const d=this.services.backendConnector.state[`${s}|${l}`];return d===-1||d===2};if(o.precheck){const s=o.precheck(this,a);if(s!==void 0)return s}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!i||a(r,e)))}loadNamespaces(e,o){const n=Ih();return this.options.ns?(typeof e=="string"&&(e=[e]),e.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),o&&o(i)}),n):(o&&o(),Promise.resolve())}loadLanguages(e,o){const n=Ih();typeof e=="string"&&(e=[e]);const i=this.options.preload||[],r=e.filter(a=>i.indexOf(a)<0);return r.length?(this.options.preload=i.concat(r),this.loadResources(a=>{n.resolve(),o&&o(a)}),n):(o&&o(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const o=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=this.services&&this.services.languageUtils||new OD(DD());return o.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;return new Tm(e,o)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:F0;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const i=Ht(_t(_t({},this.options),e),{isClone:!0}),r=new Tm(i);return(e.debug!==void 0||e.prefix!==void 0)&&(r.logger=r.logger.clone(e)),["store","services","language"].forEach(a=>{r[a]=this[a]}),r.services=_t({},this.services),r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},n&&(r.store=new AD(this.store.data,i),r.services.resourceStore=r.store),r.translator=new PD(r.services,i),r.translator.on("*",function(a){for(var s=arguments.length,l=new Array(s>1?s-1:0),d=1;d<s;d++)l[d-1]=arguments[d];r.emit(a,...l)}),r.init(i,o),r.translator.options=i,r.translator.backendConnector.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const J8=Tm.createInstance();J8.createInstance=Tm.createInstance;const tut={error:"Error"},eut={error:"Помилка"},ID="common",out={en:tut,uk:eut},ns=J8.createInstance({defaultNS:ID,resources:nut(out,ID),lng:"en",fallbackLng:"en"}),Q8={i18nextInstance:ns,initPromise:ns.init().then(()=>ns)},ay=new Map;ay.set("common",Q8);const t9=t=>{if(ay.has(t.namespace))return ay.get(t.namespace);if(t.plugins)for(const r of t.plugins)ns.use(r);Object.keys(t.resource).forEach(r=>{ns.addResourceBundle(r,t.namespace,t.resource[r])});const e=ns.cloneInstance({defaultNS:t.namespace});let o=Q8.initPromise.then(()=>e);e.on("languageChanged",r=>{ns.language!==r&&ns.changeLanguage(r)}),ns.on("languageChanged",r=>{e.language!==r&&e.changeLanguage(r)});const n=t.language||"en";ns.language!==n&&(o=o.then(()=>e.changeLanguage(n)).then(()=>e));const i={initPromise:o,i18nextInstance:e};return ay.set(t.namespace,i),i};function nut(t,e){return Object.keys(t).reduce((o,n)=>(o[n]={[e]:t[n]},o),{})}function iut(t){return t&&t.replace(new RegExp("(?<!\\\\)'","g"),"\\'")}function rut(t,e){if(!t||typeof t!="string")return t;const o=new URL(t);return o.origin+(o.pathname.endsWith("/")?o.pathname:o.pathname+"/")+""}var e9=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Nu(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function aut(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var o=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};o.prototype=e.prototype}else o={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(o,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),o}var H0={exports:{}},jD;function sut(){if(jD)return H0.exports;jD=1;var t=typeof Reflect=="object"?Reflect:null,e=t&&typeof t.apply=="function"?t.apply:function(H,D,$){return Function.prototype.apply.call(H,D,$)},o;t&&typeof t.ownKeys=="function"?o=t.ownKeys:Object.getOwnPropertySymbols?o=function(H){return Object.getOwnPropertyNames(H).concat(Object.getOwnPropertySymbols(H))}:o=function(H){return Object.getOwnPropertyNames(H)};function n(H){console&&console.warn&&console.warn(H)}var i=Number.isNaN||function(H){return H!==H};function r(){r.init.call(this)}H0.exports=r,H0.exports.once=W,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._eventsCount=0,r.prototype._maxListeners=void 0;var a=10;function s(H){if(typeof H!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof H)}Object.defineProperty(r,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(H){if(typeof H!="number"||H<0||i(H))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+H+".");a=H}}),r.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},r.prototype.setMaxListeners=function(H){if(typeof H!="number"||H<0||i(H))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+H+".");return this._maxListeners=H,this};function l(H){return H._maxListeners===void 0?r.defaultMaxListeners:H._maxListeners}r.prototype.getMaxListeners=function(){return l(this)},r.prototype.emit=function(H){for(var D=[],$=1;$<arguments.length;$++)D.push(arguments[$]);var z=H==="error",N=this._events;if(N!==void 0)z=z&&N.error===void 0;else if(!z)return!1;if(z){var V;if(D.length>0&&(V=D[0]),V instanceof Error)throw V;var E=new Error("Unhandled error."+(V?" ("+V.message+")":""));throw E.context=V,E}var x=N[H];if(x===void 0)return!1;if(typeof x=="function")e(x,this,D);else for(var g=x.length,S=A(x,g),$=0;$<g;++$)e(S[$],this,D);return!0};function d(H,D,$,z){var N,V,E;if(s($),V=H._events,V===void 0?(V=H._events=Object.create(null),H._eventsCount=0):(V.newListener!==void 0&&(H.emit("newListener",D,$.listener?$.listener:$),V=H._events),E=V[D]),E===void 0)E=V[D]=$,++H._eventsCount;else if(typeof E=="function"?E=V[D]=z?[$,E]:[E,$]:z?E.unshift($):E.push($),N=l(H),N>0&&E.length>N&&!E.warned){E.warned=!0;var x=new Error("Possible EventEmitter memory leak detected. "+E.length+" "+String(D)+" listeners added. Use emitter.setMaxListeners() to increase limit");x.name="MaxListenersExceededWarning",x.emitter=H,x.type=D,x.count=E.length,n(x)}return H}r.prototype.addListener=function(H,D){return d(this,H,D,!1)},r.prototype.on=r.prototype.addListener,r.prototype.prependListener=function(H,D){return d(this,H,D,!0)};function b(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function C(H,D,$){var z={fired:!1,wrapFn:void 0,target:H,type:D,listener:$},N=b.bind(z);return N.listener=$,z.wrapFn=N,N}r.prototype.once=function(H,D){return s(D),this.on(H,C(this,H,D)),this},r.prototype.prependOnceListener=function(H,D){return s(D),this.prependListener(H,C(this,H,D)),this},r.prototype.removeListener=function(H,D){var $,z,N,V,E;if(s(D),z=this._events,z===void 0)return this;if($=z[H],$===void 0)return this;if($===D||$.listener===D)--this._eventsCount===0?this._events=Object.create(null):(delete z[H],z.removeListener&&this.emit("removeListener",H,$.listener||D));else if(typeof $!="function"){for(N=-1,V=$.length-1;V>=0;V--)if($[V]===D||$[V].listener===D){E=$[V].listener,N=V;break}if(N<0)return this;N===0?$.shift():p($,N),$.length===1&&(z[H]=$[0]),z.removeListener!==void 0&&this.emit("removeListener",H,E||D)}return this},r.prototype.off=r.prototype.removeListener,r.prototype.removeAllListeners=function(H){var D,$,z;if($=this._events,$===void 0)return this;if($.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):$[H]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete $[H]),this;if(arguments.length===0){var N=Object.keys($),V;for(z=0;z<N.length;++z)V=N[z],V!=="removeListener"&&this.removeAllListeners(V);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(D=$[H],typeof D=="function")this.removeListener(H,D);else if(D!==void 0)for(z=D.length-1;z>=0;z--)this.removeListener(H,D[z]);return this};function u(H,D,$){var z=H._events;if(z===void 0)return[];var N=z[D];return N===void 0?[]:typeof N=="function"?$?[N.listener||N]:[N]:$?I(N):A(N,N.length)}r.prototype.listeners=function(H){return u(this,H,!0)},r.prototype.rawListeners=function(H){return u(this,H,!1)},r.listenerCount=function(H,D){return typeof H.listenerCount=="function"?H.listenerCount(D):j.call(H,D)},r.prototype.listenerCount=j;function j(H){var D=this._events;if(D!==void 0){var $=D[H];if(typeof $=="function")return 1;if($!==void 0)return $.length}return 0}r.prototype.eventNames=function(){return this._eventsCount>0?o(this._events):[]};function A(H,D){for(var $=new Array(D),z=0;z<D;++z)$[z]=H[z];return $}function p(H,D){for(;D+1<H.length;D++)H[D]=H[D+1];H.pop()}function I(H){for(var D=new Array(H.length),$=0;$<D.length;++$)D[$]=H[$].listener||H[$];return D}function W(H,D){return new Promise(function($,z){function N(E){H.removeListener(D,V),z(E)}function V(){typeof H.removeListener=="function"&&H.removeListener("error",N),$([].slice.call(arguments))}X(H,D,V,{once:!0}),D!=="error"&&q(H,N,{once:!0})})}function q(H,D,$){typeof H.on=="function"&&X(H,"error",D,$)}function X(H,D,$,z){if(typeof H.on=="function")z.once?H.once(D,$):H.on(D,$);else if(typeof H.addEventListener=="function")H.addEventListener(D,function N(V){z.once&&H.removeEventListener(D,N),$(V)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof H)}return H0.exports}var lut=sut();const Ng=Nu(lut);function cut(){this.__data__=[],this.size=0}function o9(t,e){return t===e||t!==t&&e!==e}function $1(t,e){for(var o=t.length;o--;)if(o9(t[o][0],e))return o;return-1}var uut=Array.prototype,dut=uut.splice;function put(t){var e=this.__data__,o=$1(e,t);if(o<0)return!1;var n=e.length-1;return o==n?e.pop():dut.call(e,o,1),--this.size,!0}function hut(t){var e=this.__data__,o=$1(e,t);return o<0?void 0:e[o][1]}function fut(t){return $1(this.__data__,t)>-1}function mut(t,e){var o=this.__data__,n=$1(o,t);return n<0?(++this.size,o.push([t,e])):o[n][1]=e,this}function _l(t){var e=-1,o=t==null?0:t.length;for(this.clear();++e<o;){var n=t[e];this.set(n[0],n[1])}}_l.prototype.clear=cut;_l.prototype.delete=put;_l.prototype.get=hut;_l.prototype.has=fut;_l.prototype.set=mut;function gut(){this.__data__=new _l,this.size=0}function vut(t){var e=this.__data__,o=e.delete(t);return this.size=e.size,o}function yut(t){return this.__data__.get(t)}function but(t){return this.__data__.has(t)}var xut=typeof global=="object"&&global&&global.Object===Object&&global;const n9=xut;var wut=typeof self=="object"&&self&&self.Object===Object&&self,_ut=n9||wut||Function("return this")();const Ds=_ut;var Sut=Ds.Symbol;const fp=Sut;var i9=Object.prototype,Cut=i9.hasOwnProperty,Tut=i9.toString,jh=fp?fp.toStringTag:void 0;function Mut(t){var e=Cut.call(t,jh),o=t[jh];try{t[jh]=void 0;var n=!0}catch{}var i=Tut.call(t);return n&&(e?t[jh]=o:delete t[jh]),i}var kut=Object.prototype,Aut=kut.toString;function Eut(t){return Aut.call(t)}var Put="[object Null]",Out="[object Undefined]",$D=fp?fp.toStringTag:void 0;function Jp(t){return t==null?t===void 0?Out:Put:$D&&$D in Object(t)?Mut(t):Eut(t)}function Mm(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Lut="[object AsyncFunction]",Nut="[object Function]",Dut="[object GeneratorFunction]",Rut="[object Proxy]";function r9(t){if(!Mm(t))return!1;var e=Jp(t);return e==Nut||e==Dut||e==Lut||e==Rut}var Iut=Ds["__core-js_shared__"];const N_=Iut;var zD=function(){var t=/[^.]+$/.exec(N_&&N_.keys&&N_.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function jut(t){return!!zD&&zD in t}var $ut=Function.prototype,zut=$ut.toString;function Du(t){if(t!=null){try{return zut.call(t)}catch{}try{return t+""}catch{}}return""}var But=/[\\^$.*+?()[\]{}|]/g,Fut=/^\[object .+?Constructor\]$/,Hut=Function.prototype,Wut=Object.prototype,Vut=Hut.toString,Uut=Wut.hasOwnProperty,Gut=RegExp("^"+Vut.call(Uut).replace(But,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Yut(t){if(!Mm(t)||jut(t))return!1;var e=r9(t)?Gut:Fut;return e.test(Du(t))}function Xut(t,e){return t==null?void 0:t[e]}function Qp(t,e){var o=Xut(t,e);return Yut(o)?o:void 0}var qut=Qp(Ds,"Map");const km=qut;var Zut=Qp(Object,"create");const Am=Zut;function Kut(){this.__data__=Am?Am(null):{},this.size=0}function Jut(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Qut="__lodash_hash_undefined__",tdt=Object.prototype,edt=tdt.hasOwnProperty;function odt(t){var e=this.__data__;if(Am){var o=e[t];return o===Qut?void 0:o}return edt.call(e,t)?e[t]:void 0}var ndt=Object.prototype,idt=ndt.hasOwnProperty;function rdt(t){var e=this.__data__;return Am?e[t]!==void 0:idt.call(e,t)}var adt="__lodash_hash_undefined__";function sdt(t,e){var o=this.__data__;return this.size+=this.has(t)?0:1,o[t]=Am&&e===void 0?adt:e,this}function pu(t){var e=-1,o=t==null?0:t.length;for(this.clear();++e<o;){var n=t[e];this.set(n[0],n[1])}}pu.prototype.clear=Kut;pu.prototype.delete=Jut;pu.prototype.get=odt;pu.prototype.has=rdt;pu.prototype.set=sdt;function ldt(){this.size=0,this.__data__={hash:new pu,map:new(km||_l),string:new pu}}function cdt(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function z1(t,e){var o=t.__data__;return cdt(e)?o[typeof e=="string"?"string":"hash"]:o.map}function udt(t){var e=z1(this,t).delete(t);return this.size-=e?1:0,e}function ddt(t){return z1(this,t).get(t)}function pdt(t){return z1(this,t).has(t)}function hdt(t,e){var o=z1(this,t),n=o.size;return o.set(t,e),this.size+=o.size==n?0:1,this}function Ru(t){var e=-1,o=t==null?0:t.length;for(this.clear();++e<o;){var n=t[e];this.set(n[0],n[1])}}Ru.prototype.clear=ldt;Ru.prototype.delete=udt;Ru.prototype.get=ddt;Ru.prototype.has=pdt;Ru.prototype.set=hdt;var fdt=200;function mdt(t,e){var o=this.__data__;if(o instanceof _l){var n=o.__data__;if(!km||n.length<fdt-1)return n.push([t,e]),this.size=++o.size,this;o=this.__data__=new Ru(n)}return o.set(t,e),this.size=o.size,this}function Yl(t){var e=this.__data__=new _l(t);this.size=e.size}Yl.prototype.clear=gut;Yl.prototype.delete=vut;Yl.prototype.get=yut;Yl.prototype.has=but;Yl.prototype.set=mdt;var gdt="__lodash_hash_undefined__";function vdt(t){return this.__data__.set(t,gdt),this}function ydt(t){return this.__data__.has(t)}function Xy(t){var e=-1,o=t==null?0:t.length;for(this.__data__=new Ru;++e<o;)this.add(t[e])}Xy.prototype.add=Xy.prototype.push=vdt;Xy.prototype.has=ydt;function bdt(t,e){for(var o=-1,n=t==null?0:t.length;++o<n;)if(e(t[o],o,t))return!0;return!1}function xdt(t,e){return t.has(e)}var wdt=1,_dt=2;function a9(t,e,o,n,i,r){var a=o&wdt,s=t.length,l=e.length;if(s!=l&&!(a&&l>s))return!1;var d=r.get(t),b=r.get(e);if(d&&b)return d==e&&b==t;var C=-1,u=!0,j=o&_dt?new Xy:void 0;for(r.set(t,e),r.set(e,t);++C<s;){var A=t[C],p=e[C];if(n)var I=a?n(p,A,C,e,t,r):n(A,p,C,t,e,r);if(I!==void 0){if(I)continue;u=!1;break}if(j){if(!bdt(e,function(W,q){if(!xdt(j,q)&&(A===W||i(A,W,o,n,r)))return j.push(q)})){u=!1;break}}else if(!(A===p||i(A,p,o,n,r))){u=!1;break}}return r.delete(t),r.delete(e),u}var Sdt=Ds.Uint8Array;const BD=Sdt;function Cdt(t){var e=-1,o=Array(t.size);return t.forEach(function(n,i){o[++e]=[i,n]}),o}function Tdt(t){var e=-1,o=Array(t.size);return t.forEach(function(n){o[++e]=n}),o}var Mdt=1,kdt=2,Adt="[object Boolean]",Edt="[object Date]",Pdt="[object Error]",Odt="[object Map]",Ldt="[object Number]",Ndt="[object RegExp]",Ddt="[object Set]",Rdt="[object String]",Idt="[object Symbol]",jdt="[object ArrayBuffer]",$dt="[object DataView]",FD=fp?fp.prototype:void 0,D_=FD?FD.valueOf:void 0;function zdt(t,e,o,n,i,r,a){switch(o){case $dt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case jdt:return!(t.byteLength!=e.byteLength||!r(new BD(t),new BD(e)));case Adt:case Edt:case Ldt:return o9(+t,+e);case Pdt:return t.name==e.name&&t.message==e.message;case Ndt:case Rdt:return t==e+"";case Odt:var s=Cdt;case Ddt:var l=n&Mdt;if(s||(s=Tdt),t.size!=e.size&&!l)return!1;var d=a.get(t);if(d)return d==e;n|=kdt,a.set(t,e);var b=a9(s(t),s(e),n,i,r,a);return a.delete(t),b;case Idt:if(D_)return D_.call(t)==D_.call(e)}return!1}function Bdt(t,e){for(var o=-1,n=e.length,i=t.length;++o<n;)t[i+o]=e[o];return t}var Fdt=Array.isArray;const qy=Fdt;function Hdt(t,e,o){var n=e(t);return qy(t)?n:Bdt(n,o(t))}function Wdt(t,e){for(var o=-1,n=t==null?0:t.length,i=0,r=[];++o<n;){var a=t[o];e(a,o,t)&&(r[i++]=a)}return r}function Vdt(){return[]}var Udt=Object.prototype,Gdt=Udt.propertyIsEnumerable,HD=Object.getOwnPropertySymbols,Ydt=HD?function(t){return t==null?[]:(t=Object(t),Wdt(HD(t),function(e){return Gdt.call(t,e)}))}:Vdt;const Xdt=Ydt;function qdt(t,e){for(var o=-1,n=Array(t);++o<t;)n[o]=e(o);return n}function mp(t){return t!=null&&typeof t=="object"}var Zdt="[object Arguments]";function WD(t){return mp(t)&&Jp(t)==Zdt}var s9=Object.prototype,Kdt=s9.hasOwnProperty,Jdt=s9.propertyIsEnumerable,Qdt=WD(function(){return arguments}())?WD:function(t){return mp(t)&&Kdt.call(t,"callee")&&!Jdt.call(t,"callee")};const tpt=Qdt;function ept(){return!1}var l9=typeof exports=="object"&&exports&&!exports.nodeType&&exports,VD=l9&&typeof module=="object"&&module&&!module.nodeType&&module,opt=VD&&VD.exports===l9,UD=opt?Ds.Buffer:void 0,npt=UD?UD.isBuffer:void 0,ipt=npt||ept;const Q2=ipt;var rpt=9007199254740991,apt=/^(?:0|[1-9]\d*)$/;function spt(t,e){var o=typeof t;return e=e??rpt,!!e&&(o=="number"||o!="symbol"&&apt.test(t))&&t>-1&&t%1==0&&t<e}var lpt=9007199254740991;function c9(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=lpt}var cpt="[object Arguments]",upt="[object Array]",dpt="[object Boolean]",ppt="[object Date]",hpt="[object Error]",fpt="[object Function]",mpt="[object Map]",gpt="[object Number]",vpt="[object Object]",ypt="[object RegExp]",bpt="[object Set]",xpt="[object String]",wpt="[object WeakMap]",_pt="[object ArrayBuffer]",Spt="[object DataView]",Cpt="[object Float32Array]",Tpt="[object Float64Array]",Mpt="[object Int8Array]",kpt="[object Int16Array]",Apt="[object Int32Array]",Ept="[object Uint8Array]",Ppt="[object Uint8ClampedArray]",Opt="[object Uint16Array]",Lpt="[object Uint32Array]",hn={};hn[Cpt]=hn[Tpt]=hn[Mpt]=hn[kpt]=hn[Apt]=hn[Ept]=hn[Ppt]=hn[Opt]=hn[Lpt]=!0;hn[cpt]=hn[upt]=hn[_pt]=hn[dpt]=hn[Spt]=hn[ppt]=hn[hpt]=hn[fpt]=hn[mpt]=hn[gpt]=hn[vpt]=hn[ypt]=hn[bpt]=hn[xpt]=hn[wpt]=!1;function Npt(t){return mp(t)&&c9(t.length)&&!!hn[Jp(t)]}function Dpt(t){return function(e){return t(e)}}var u9=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Yf=u9&&typeof module=="object"&&module&&!module.nodeType&&module,Rpt=Yf&&Yf.exports===u9,R_=Rpt&&n9.process,Ipt=function(){try{var t=Yf&&Yf.require&&Yf.require("util").types;return t||R_&&R_.binding&&R_.binding("util")}catch{}}();const GD=Ipt;var YD=GD&&GD.isTypedArray,jpt=YD?Dpt(YD):Npt;const d9=jpt;var $pt=Object.prototype,zpt=$pt.hasOwnProperty;function Bpt(t,e){var o=qy(t),n=!o&&tpt(t),i=!o&&!n&&Q2(t),r=!o&&!n&&!i&&d9(t),a=o||n||i||r,s=a?qdt(t.length,String):[],l=s.length;for(var d in t)zpt.call(t,d)&&!(a&&(d=="length"||i&&(d=="offset"||d=="parent")||r&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||spt(d,l)))&&s.push(d);return s}var Fpt=Object.prototype;function Hpt(t){var e=t&&t.constructor,o=typeof e=="function"&&e.prototype||Fpt;return t===o}function Wpt(t,e){return function(o){return t(e(o))}}var Vpt=Wpt(Object.keys,Object);const Upt=Vpt;var Gpt=Object.prototype,Ypt=Gpt.hasOwnProperty;function Xpt(t){if(!Hpt(t))return Upt(t);var e=[];for(var o in Object(t))Ypt.call(t,o)&&o!="constructor"&&e.push(o);return e}function qpt(t){return t!=null&&c9(t.length)&&!r9(t)}function Zpt(t){return qpt(t)?Bpt(t):Xpt(t)}function XD(t){return Hdt(t,Zpt,Xdt)}var Kpt=1,Jpt=Object.prototype,Qpt=Jpt.hasOwnProperty;function tht(t,e,o,n,i,r){var a=o&Kpt,s=XD(t),l=s.length,d=XD(e),b=d.length;if(l!=b&&!a)return!1;for(var C=l;C--;){var u=s[C];if(!(a?u in e:Qpt.call(e,u)))return!1}var j=r.get(t),A=r.get(e);if(j&&A)return j==e&&A==t;var p=!0;r.set(t,e),r.set(e,t);for(var I=a;++C<l;){u=s[C];var W=t[u],q=e[u];if(n)var X=a?n(q,W,u,e,t,r):n(W,q,u,t,e,r);if(!(X===void 0?W===q||i(W,q,o,n,r):X)){p=!1;break}I||(I=u=="constructor")}if(p&&!I){var H=t.constructor,D=e.constructor;H!=D&&"constructor"in t&&"constructor"in e&&!(typeof H=="function"&&H instanceof H&&typeof D=="function"&&D instanceof D)&&(p=!1)}return r.delete(t),r.delete(e),p}var eht=Qp(Ds,"DataView");const tT=eht;var oht=Qp(Ds,"Promise");const eT=oht;var nht=Qp(Ds,"Set");const oT=nht;var iht=Qp(Ds,"WeakMap");const nT=iht;var qD="[object Map]",rht="[object Object]",ZD="[object Promise]",KD="[object Set]",JD="[object WeakMap]",QD="[object DataView]",aht=Du(tT),sht=Du(km),lht=Du(eT),cht=Du(oT),uht=Du(nT),Fc=Jp;(tT&&Fc(new tT(new ArrayBuffer(1)))!=QD||km&&Fc(new km)!=qD||eT&&Fc(eT.resolve())!=ZD||oT&&Fc(new oT)!=KD||nT&&Fc(new nT)!=JD)&&(Fc=function(t){var e=Jp(t),o=e==rht?t.constructor:void 0,n=o?Du(o):"";if(n)switch(n){case aht:return QD;case sht:return qD;case lht:return ZD;case cht:return KD;case uht:return JD}return e});const t5=Fc;var dht=1,e5="[object Arguments]",o5="[object Array]",W0="[object Object]",pht=Object.prototype,n5=pht.hasOwnProperty;function hht(t,e,o,n,i,r){var a=qy(t),s=qy(e),l=a?o5:t5(t),d=s?o5:t5(e);l=l==e5?W0:l,d=d==e5?W0:d;var b=l==W0,C=d==W0,u=l==d;if(u&&Q2(t)){if(!Q2(e))return!1;a=!0,b=!1}if(u&&!b)return r||(r=new Yl),a||d9(t)?a9(t,e,o,n,i,r):zdt(t,e,l,o,n,i,r);if(!(o&dht)){var j=b&&n5.call(t,"__wrapped__"),A=C&&n5.call(e,"__wrapped__");if(j||A){var p=j?t.value():t,I=A?e.value():e;return r||(r=new Yl),i(p,I,o,n,r)}}return u?(r||(r=new Yl),tht(t,e,o,n,i,r)):!1}function p9(t,e,o,n,i){return t===e?!0:t==null||e==null||!mp(t)&&!mp(e)?t!==t&&e!==e:hht(t,e,o,n,p9,i)}function iT(t,e){return p9(t,e)}const Ye={HEADERS:"headers",METADATA:"metadata",DATA:"data",GRAND:"grand",FINISH:"finish",ERROR:"error",TOTAL_ROWS:"totalRows",DATA_FINISH:"dataFinish",DATABARS:"dataBars",RANGE_MIN_MAX:"rangeMinMax"},fht=[Ye.ERROR,Ye.HEADERS,Ye.GRAND,Ye.METADATA,Ye.DATA,Ye.DATA_FINISH,Ye.TOTAL_ROWS,Ye.DATABARS,Ye.RANGE_MIN_MAX,Ye.FINISH],He={ROWS:"rows",COLUMNS:"columns",MEASURES:"measures",SCOPE:"scope"},Bn={ASC:"asc",DESC:"desc"},Fo={SUB_TOTAL:"subTotal",GRAND_TOTAL:"grandTotal",MEASURE_TOP:"measureTop",MEASURE_BOTTOM:"measureBottom",CORNER:"corner"},i5={COLOR:"color",CONDITION:"condition"},Zs={DATETIME:"datetime",TEXT:"text",NUMERIC:"numeric"},ad={MEMBER:"member",VALUE:"value",SUB_TOTAL:"subtotal",GRAND_TOTAL:"grandtotal"},Hl={MEMBER:"member",INDEX:"index",TITLE:"title",NAME:"name",AGG:"agg",DIM:"dim"};let mht=class{constructor(e,o,n,i){Dt(this,"rowIndex"),Dt(this,"colIndex"),Dt(this,"node"),Dt(this,"parent"),Dt(this,"childColCells",[]),Dt(this,"childRowCells",[]),Dt(this,"indexInParent",-1),Dt(this,"siblingCount",0),this.rowIndex=e,this.colIndex=o,this.node=n,this.parent=i}isChild(){return!this.node}hasChildren(){return!!(this.childColCells.length||this.childRowCells.length)}hasColCell(){return this.childColCells.length>0}addColCell(e){this.childColCells.push(e)}getColCell(){return this.childColCells||[]}hasRowCell(){return this.childRowCells.length>0}addRowCell(e){this.childRowCells.push(e)}getRowCell(){return this.childRowCells||[]}getStopRowIndex(){return this.hasRowCell()?this.rowIndex+this.getRowCell().length:this.rowIndex}getStopColIndex(){return this.hasColCell()?this.colIndex+this.getColCell().length:this.colIndex}setIndexInParent(e,o){this.indexInParent=e,this.siblingCount=o}getIndexInParent(){return{indexInParent:this.indexInParent,siblingCount:this.siblingCount}}getParenPosition(){if(!this.parent)return;const e=(this.parent||"").match(/\d+/g)||[];return[Number(e[0]),Number(e[1])]}};const Zy=["S&PManager","Cache"],Ky=["null"];class Em{constructor(e=""){Dt(this,"name"),Dt(this,"log"),Dt(this,"warn"),Dt(this,"error"),Dt(this,"console"),this.name=e,this.log=()=>{},this.warn=()=>{},this.error=()=>{},this.console=Em.createMockConsole(),this.createLogFn()}setName(e){this.name=e,this.createLogFn()}getName(){return this.name}createLogFn(){this.log=()=>{},this.warn=()=>{},this.error=()=>{}}isExcludedName(){return Ky.length&&!this.hasNamePartsInList(Ky)?!0:Zy.length?this.hasNamePartsInList(Zy):!1}hasNamePartsInList(e){const o=this.name.toLowerCase();return e.some(n=>o.includes(n.toLowerCase()))}static createMockConsole(){return{log:()=>{},warn:()=>{},error:()=>{}}}static createMock(){const e=Em.createMockConsole();return Ht(_t({setName:()=>{},getName:()=>""},e),{console:e})}}const ght=t=>new Em(t),vht=(t="")=>{Zy.push(t.toLowerCase())},yht=(t="")=>{Ky.push(t.toLowerCase())},bht=()=>{Zy.length=0,Ky.length=0},bc={Logger:Em,create:ght,excludeLogs:vht,includeLogs:yht,clearIncludeExclude:bht},h9=[Date,Error,RegExp,Promise];function f9(t,e=h9){return e.some(o=>t instanceof o)}function r5(t,e=[]){let o=!1;return e.forEach(n=>{t.includes(n)&&(o=!0)}),o}function m9(t=[],e,o){const n=[];return o&&t.forEach(i=>{n.push(`${i}.$`)}),t.length?t.forEach(i=>{n.push(`${i}.${e}`)}):n.push(e),n}function Xf(t){return!(t===null||typeof t>"u"||typeof t!="object")}function xht(t,e){return Xf(t)&&t?Array.isArray(t)?!t.length:f9(t,e)?!1:!Object.keys(t).length:t==null}function wht(t=""){const e=t.split(".");return e.length>1?(e.pop(),e.join(".")):e[0]}function a5(t,e,o){return t.length?r5(t,o):e.length?!r5(e,o):!0}function g9(t,e=[],o=[],n=[],i={},r={},a=[],s=[]){if(!Xf(t))return{commonIncludeKeys:[],commonExcludeKeys:[]};const l=a.indexOf(t);if(l!==-1)return s[l];a.push(t);const d=Object.keys(t),b=Array.isArray(t);let C=[],u=[];const j=[],A=[];if(d.forEach(p=>{const I=t[p],W=m9(n,p,b),q=n[0]||"&";i[q]=i[q]||[],r[q]=r[q]||[],W.forEach(X=>{(e||[]).includes(X)&&(i[q].push(X),C.push(X)),(e||[]).forEach(H=>{const D=wht(H);(`${D}.$`===q||D===q)&&(i[q].includes(H)||i[q].push(H),C.includes(H)||C.push(H))}),(o||[]).includes(X)&&(r[q].push(X),u.push(X))}),Xf(I)&&g9(I,e,o,W,i,r,a,s)}),Xf(t)){let p=n[0]||"&";Array.isArray(t)&&(p=`${p}.$`),i[p]=(i[p]||[]).concat(j),C=C.concat(j),r[p]=(r[p]||[]).concat(A),u=C.concat(A)}return s.push({commonIncludeKeys:C,commonExcludeKeys:u}),{commonIncludeKeys:C,commonExcludeKeys:u}}function v9(t,e,o=new WeakMap){const{includeKeys:n,includeKeysObj:i,excludeKeys:r,excludeKeysObj:a,parentKeys:s=[],excludeEmpty:l,referenceClone:d}=e||{};if(!Xf(t)||f9(t,d))return t;if(o.has(t))return o.get(t);const b=Object.keys(t),C=Array.isArray(t),u=C?[]:{};o.set(t,u);const j=s[0]||"&",A=(i||{})[j]||[],p=(a||{})[j]||[];return b.forEach(I=>{const W=t[I];let q=[],X=!0;if(n||r?X=a5(n||[],r||[],[I]):(i||a)&&(q=m9(s,I,C),X=a5(A,p,q)),X){const H=v9(W,Ht(_t({},e),{parentKeys:q}),o);(!l||!xht(H,d))&&(C?u.push(H):u[I]=H)}}),u}function dr(t,e){const o=e||{},{include:n,exclude:i}=o,r=ge(o,["include","exclude"]);let a,s;(n||i)&&(a={},s={},g9(t,n,i,[],a,s));const l=Ht(_t({},r),{includeKeysObj:a,excludeKeysObj:s});return v9(t,l)}dr.REFERENCE_CLONE_TYPES=h9;const I_=t=>e=>t.replace(/{{(\w+)}}/g,(o,n)=>typeof e[n]<"u"?e[n]:n),y9=(t,e)=>{let o,n,i=null;const r=(...a)=>{o?i=a:(t(...a),o=!0,i=null,n=setTimeout(()=>{o=!1,i&&(t(...i),i=null)},e))};return r.cancel=()=>{clearTimeout(n),o=!1},r},b9=(t,e)=>{const o={};return Object.keys(t).forEach(n=>{t[n]!==e[n]&&(o[n]=e[n])}),Object.keys(e).forEach(n=>{typeof o[n]>"u"&&t[n]!==e[n]&&(o[n]=e[n])}),o};function rT(t=!0){let e={},o=null;return({callback:n,indices:i})=>{const r=Object.keys(i),a=!t||r.every(l=>{const d=i[l];return Array.isArray(d)?d.length>0:d>=0}),s=r.length!==Object.keys(e).length||r.some(l=>{const d=e[l],b=i[l];return Array.isArray(b)?d.join(",")!==b.join(","):d!==b});return e=i,a&&s&&(o=n(i)),o}}function s5(t,e,o=0){for(let n=o;n<t.length;n+=1){const i=t[n];if(e(i,n,t))return n}return-1}const Pm="$*$root$*$";function _ht(t,e,o,n){const i={value:t};return e&&(i.children=e),o&&(i.data=o),typeof n<"u"&&(i.index=n),i}function B1(t){return!!(t&&t.children&&t.children.length)}function Oa(t){return t&&t.children||[]}function aT(t,e){t&&e&&Array.isArray(e)&&(t.children=e)}function Sht(t,e){t&&(t.level=e)}function Cht(t){return t&&typeof t.level<"u"?t.level||0:-1}function Ed(t){if(!t)return;if(t&&!Array.isArray(t)&&t.value===Pm)return t;const e={value:Pm,children:[]};return Array.isArray(t)?e.children=t:(e.children||[])[0]=t,e}function x9(t,e,o=0){let n;if(!t||!e)return n;if(e(t,o)&&(n=t),B1(t)){const i=Oa(t),r=i.length;for(let a=0;a<r;a+=1){const s=x9(i[a],e,o+1);if(s){n=s;break}}}return n}function Tht(t,e){if(!t&&!e)return;if(!t&&e)return Ed(e);if(t&&!e)return Ed(t);const o=Ed(t),n=Ed(e),i=o&&o.children||[],r=n&&n.children||[],a=i.concat(r);return Ed(a)}const w9=(t,e=0)=>{if(!t||!t.isPart)return;t.level=e;const o=Oa(t),n=o[o.length-1];return n&&w9(n,e+1)||t},_9=(t,e,o=0)=>{if(!t||!t.isPart)return;if(t.level=o,t&&e&&t.value===e.value&&t.level===e.level)return t;const n=Oa(t)[0];return n&&_9(n,e,o+1)||t};function Mht(t,e){let o=w9(t),n=_9(e,o);o&&o.children&&Array.isArray(o.children)&&n&&n.children&&Array.isArray(n.children)&&n.children.length>0&&(o.children=o.children.concat(n.children),n.isHandled=!0);let i=!1;for(o=t,n=e;o&&o.children&&Array.isArray(o.children)&&n&&n.children&&Array.isArray(n.children)&&!n.isHandled;){const r=o.children;o=o.children[o.children.length-1];let a=0;for(n.children[0]&&!i&&(i=!Oa(n.children[0]).some(s=>s.isPart),a=1);a<n.children.length;)r.push(n.children[a]),a+=1;n=n.children[0]}return t}function S9(t,e,o){!t||!e||t.forEach(n=>{e(n,o),B1(n)&&S9(Oa(n),e,n)})}function C9(t,e=[],o=0,n={maxLevel:0}){return t.forEach(i=>{n.maxLevel<o&&(n.maxLevel=o),B1(i)?C9(Oa(i),e,o+1,n):e.push(i)}),e}function F1(t,e={}){if(e||(e={}),typeof e.callCount!="number"?e.callCount=1:e.callCount+=1,!t)return 0;let o=e.clearCache||!1;!Array.isArray(t)&&t.value===Pm&&(o=!0);let n=1,i=[];return Array.isArray(t)?(n=0,i=t):t.children&&(i=Oa(t)),i&&i.length&&(!o&&!Array.isArray(t)&&typeof t.childCount=="number"?n=t.childCount:(n=0,i.forEach(r=>{n+=F1(r,e)}),Array.isArray(t)||(t.childCount=n))),n}function T9(t,e={}){if(e||(e={}),typeof e.callCount!="number"?e.callCount=1:e.callCount+=1,!t)return 0;let o=e.clearCache||!1;!Array.isArray(t)&&t.value===Pm&&(o=!0);let n=0,i=[];if(t&&!Array.isArray(t)&&typeof t.value<"u"&&(n=1),Array.isArray(t)?(n=0,i=t):t.children&&(i=Oa(t)),i&&i.length)if(!o&&!Array.isArray(t)&&typeof t.childDeep=="number")n+=t.childDeep;else{let r=0;i.forEach(a=>{const s=T9(a,e);s>r&&(r=s)}),n+=r,Array.isArray(t)||(t.childDeep=r)}return n}function M9(t=[],e=0,o){const n=[];let i=0,r=-1,a=-1;const s=t.length;if(typeof e=="number"&&typeof o=="number"&&e>o)throw new Error('Wrong "getNodesByChildCount" diapason');if(typeof e=="number"&&e<0)throw new Error('Wrong "from" index for "getNodesByChildCount"');for(let l=0;l<s;l+=1){const d=t[l],b=F1(d);if(i+b>e&&(r<0&&(r=i),n.push(d),typeof o=="number"&&i+b>=o)){a=i+b;break}a=i+b,i+=b}return{nodes:n,start:r,stop:a}}function kht(t){t.isMapped!==void 0&&(t.isMapped=void 0),t.minLevel!==void 0&&(t.minLevel=void 0),t.childCount!==void 0&&(t.childCount=void 0),t.childDeep!==void 0&&(t.childDeep=void 0)}function sT(t=[],e=0,o,n){const{cloneFn:i=dr}=n||{},r=[],{nodes:a,start:s,stop:l}=M9(t,e,o),d=a.length;let b,C,u=!0;if(s<e){const j=a[0]||{},A=e-s;let p;d===1&&typeof o=="number"&&(p=o-s,u=!1),b=i(j,!0);const I=sT(Oa(j),A,p,n);aT(b,I)}if(typeof o=="number"&&l>o&&u){const j=a[d-1]||{},A=0,p=F1(j)-(l-o);C=i(j,!0);const I=sT(Oa(j),A,p,n);aT(C,I)}return a.forEach((j,A)=>{if(b&&A===0)r.push(b);else if(C&&A===d-1)r.push(C);else{const p=i(j);r.push(p)}}),r}const _e={ROOT:Pm,create:_ht,hasChildren:B1,getChildren:Oa,setChildren:aT,setLevel:Sht,getLevel:Cht,getLastLevelNodes:C9,iterateThroughTree:S9,wrapInRootNode:Ed,findNode:x9,merge:Tht,deepMerge:Mht,getChildLength:F1,getDeepLength:T9,getNodesByChildCount:M9,getCutNodesByChildCount:sT,clearNodeCache:kht},wi={FIRST:"first",LAST:"last",EVEN:"even",ODD:"odd"},sd=(t,e)=>`${t}-${e}`;let Aht=class{constructor(e,o=!1,n){Dt(this,"tree"),Dt(this,"hasGrandTotals",!1),Dt(this,"isVertical",!1),Dt(this,"deep"),Dt(this,"columns",[]),Dt(this,"lastLevel",[]),Dt(this,"map",{}),Dt(this,"metadataCache",{}),Dt(this,"valueNode"),Dt(this,"grid"),this.isVertical=o,this.deep=n,e&&(this.tree=e,this.columns=this.cacheLevels(_e.getChildren(this.tree)))}destroy(){this.tree=void 0,this.columns=[],this.lastLevel=[],this.map={},this.metadataCache={},this.valueNode=void 0,this.grid=void 0}getMainCellWidth(e,o,n,i,r={offsetTop:-1,columnsOffset:0}){const{columnsOffset:a=0}=r,s=this.getItem(e,o),l=s&&s.hasChildren()&&s.hasColCell();let d=Number.NaN,b=!0;if(s&&l){const C=s.getColCell(),u=n({index:o+a});d=C.reduce((j,A)=>{const p=n({index:A.colIndex+a});return p||(b=!1),j+p},u),d-=i,d=Math.ceil(d)}return b?d:Number.NaN}extend(e){e&&(this.grid=void 0,this.tree=_e.merge(this.tree,e),this.columns=this.cacheLevels(_e.getChildren(e),this.columns))}getGrid(){if(this.grid)return this.grid;let e=this.getTreeDeepsLength(),o=this.getTreeChildLength();return this.isVertical?([e,o]=[o,e],this.map=this.fillMapVertical(_e.getChildren(this.tree),o,this.map)):this.map=this.fillMap(_e.getChildren(this.tree),e,this.map),this.grid=Array.from(Array(e)).map((n,i)=>Array.from(Array(o)).map((r,a)=>{const s=sd(i,a),l=this.map[s];if(!l)throw new Error(`Key "${s}" does not found in TreeService`);return l.node?l.node:l.parent})),this.grid}getPartialGrid(e,o){if(!this.isVertical)throw new Error('"getPartialGrid" can only be used for "vertical" tree');const n=this.getTreeDeepsLength(),i=_e.getChildren(this.tree),{nodes:r,start:a,stop:s}=_e.getNodesByChildCount(i,e,o);this.fillMapVertical(r,n,this.map,{parentRowIndex:a,parentColIndex:0,prevChildren:0,parentKey:""});const l=Math.max(a,e),d=Math.min(s,o),b=Math.max(0,d-e);return Array.from(Array(b)).map((C,u)=>Array.from(Array(n)).map((j,A)=>{const p=l+u,I=sd(p,A),W=this.map[I];if(!W)throw new Error(`Key "${I}" does not found in TreeService`);return W.node?W.node:W.parent||""}))}getPartialTree(e,o,n){const i=_e.getChildren(this.tree);return _e.getCutNodesByChildCount(i,e,o,n)}getTreeNode(e,o){const n=this.getItem(e,o);if(n&&n.node)return n.node}isChildren(e,o){const n=this.getItem(e,o);if(n)return n.isChild();if(typeof this.deep=="number"&&(this.isVertical?o:e)<this.deep)return!0;throw new Error(`Item "${e}-${o}" does not found in TreeService`)}hasChildren(e,o){const n=this.getItem(e,o);if(n)return n.hasChildren();throw new Error(`Item "${e}-${o}" does not found in TreeService`)}getMainCellSpans(e,o){const n={},i=this.getItem(e,o);return i&&i.hasColCell()&&(n.colSpan=i.getColCell().length+1),i&&i.hasRowCell()&&(n.rowSpan=i.getRowCell().length+1),n}alignStartIndex(e,o=!1){let n=0,i=e;if(o&&(n=e,i=0),this.isVertical===o){let r=this.getItem(n,i);if(r&&r.isChild()&&(r=this.getItemByKey(r.parent||"")),r)return o?r.rowIndex:r.colIndex}return e}alignStopIndex(e,o=!1){let n=0,i=e;if(o&&(n=e,i=0),this.isVertical===o){let r=this.getItem(n,i);if(r&&r.isChild()&&(r=this.getItemByKey(r.parent||"")),r)return o?r.getStopRowIndex():r.getStopColIndex()}return e}getTreeChildLength(e=_e.getChildren(this.tree),o){return _e.getChildLength(e,o)}getTreeDeepsLength(e=_e.getChildren(this.tree),o){return typeof this.deep<"u"&&this.deep!==void 0?this.deep:_e.getDeepLength(e,o)}getLastLevelNodes(){return this.lastLevel}extractData(e){if(!e)return[];const o=e.getLastLevelNodes().map(n=>n.index);return this.getLastLevelNodes().map(n=>typeof n.data>"u"?[n.data]:o?o.map(i=>{let r;return typeof i<"u"&&n.data&&(r=n.data[i]),r}):n.data)}getMetadata(e,o,n){const i=this.getTreeDeepsLength();e===1/0&&(e=i&&i-1),o===1/0&&(o=i&&i-1);const r=`${e}-${o}`;if(this.metadataCache[r])return this.metadataCache[r];let a=this.getItemByKey(r);if(!a)throw new Error(`Can not find metadata info for ${r} cell`);let s=a?a.node:void 0;if(s||(a=this.getItemByKey(a.parent||"")),!a)throw new Error(`Can not find metadata info for parent ${r} cell`);s=a?a.node:void 0;const l=this.getItemByKey(`${e+1}-${o}`),d=l?l.node:void 0,b=s&&s.level||0,C=this.isVertical?a.getStopColIndex():a.getStopRowIndex();let{indexInParent:u,siblingCount:j}=a.getIndexInParent(),A=u;if(b===0&&(j=this.getTreeChildLength(),u=this.isVertical?a.rowIndex:a.colIndex,A=u+(this.isVertical?a.getRowCell().length:a.getColCell().length)),n){const q=n.to-n.from;j<=q&&A>q-1&&(A=q-1)}const p={levels:[],siblings:[],root:void 0,parent:void 0,valueNode:this.valueNode,nextNode:d},{indexDivergence:I}=s||{};if(typeof I=="number"){const q=I===0?wi.EVEN:wi.ODD;p.siblings.push(q)}if(b===0&&p.levels.push(wi.FIRST),C===i-1&&p.levels.push(wi.LAST),u===0&&p.siblings.push(wi.FIRST),A===j-1&&p.siblings.push(wi.LAST),s&&b!==0){const q=this.isVertical?e:0,X=this.isVertical?0:o;p.root=this.getMetadata(q,X,n)}const W=this.getItemByKey(a.parent||"");if(W&&b!==0&&(p.parent=this.getMetadata(W.rowIndex,W.colIndex,n)),n){const q=this.isVertical?a.rowIndex:a.colIndex,X=this.isVertical?a.getStopRowIndex():a.getStopColIndex();let H;W&&(H=this.isVertical?W.getStopRowIndex():W.getStopColIndex()),H!==void 0&&H>=n.to-n.from&&X>=n.to-n.from-1&&!p.siblings.includes(wi.LAST)&&p.siblings.push(wi.LAST),q===0&&!p.siblings.includes(wi.FIRST)&&p.siblings.push(wi.FIRST)}return this.metadataCache[r]=p,p}setValueNode(e){typeof e=="object"&&(this.valueNode=e)}cacheLevels(e,o=[],n={level:0}){const{level:i}=n;return e.forEach(r=>{if(o[i]||(o[i]=[]),_e.setLevel(r,i),o[i].push(r),_e.hasChildren(r)){const a=i+1;this.cacheLevels(_e.getChildren(r),o,{level:a})}else this.lastLevel.push(r)}),o}fillMap(e,o,n={},i){const r=i||{parentRowIndex:0,parentColIndex:0,prevChildren:0,parentKey:""},a=e.length;return e.forEach((s,l)=>{const{parentRowIndex:d,parentColIndex:b,prevChildren:C,parentKey:u}=r,j=_e.getLevel(s)+d,A=l+b+C,p=sd(j,A),I=this.createTreeCellMap({rowIndex:j,colIndex:A,node:s,parent:u});I.setIndexInParent(l,a),n[p]=I;let W=0,q=0;if(_e.hasChildren(s)?(W=this.getTreeChildLength(s),typeof s.minLevel=="number"&&(q=s.minLevel+1-j||0)):q=(o||0)-(j||0),(W>1||q>1)&&this.fillChildMap(n,p,j,A,q,W),_e.hasChildren(s)){const X=Ht(_t({},r),{parentRowIndex:q>1?q-1:0,parentColIndex:l+b,parentKey:p});this.fillMap(_e.getChildren(s),o,n,X),W>1&&(r.prevChildren+=W-1)}}),n}fillMapVertical(e,o,n={},i){const r=i||{parentRowIndex:0,parentColIndex:0,prevChildren:0,parentKey:""},a=e.length;return e.forEach((s,l)=>{if(s.isMapped){r.parentRowIndex+=_e.getChildLength(s)-1;return}s.isMapped=!0;const{parentRowIndex:d,prevChildren:b,parentKey:C}=r,u=_e.getLevel(s),j=l+d+b,A=sd(j,u),p=this.createTreeCellMap({rowIndex:j,colIndex:u,node:s,parent:C});p.setIndexInParent(l,a),n[A]=p;let I=0,W=0;if(_e.hasChildren(s)?W=this.getTreeChildLength(s):I=(o||0)-(u||0),(I>1||W>1)&&this.fillChildMap(n,A,j,u,W,I),_e.hasChildren(s)){const q=Ht(_t({},r),{parentRowIndex:l+d,parentKey:A});this.fillMapVertical(_e.getChildren(s),o,n,q),W>1&&(r.prevChildren+=W-1)}}),n}fillChildMap(e,o,n,i,r,a){const s=e[o],l=Math.max(1,r),d=Math.max(1,a);Array.from(Array(l)).forEach((b,C)=>{Array.from(Array(d)).forEach((u,j)=>{if(C===0&&j===0)return;const A=n+C,p=i+j,I=sd(A,p),W=this.createTreeCellMap({rowIndex:A,colIndex:p,parent:o});e[I]=W,!(C!==0&&j!==0)&&(j===0&&s.addRowCell(W),C===0&&s.addColCell(W))})})}createTreeCellMap({rowIndex:e,colIndex:o,node:n,parent:i}){return new mht(e,o,n,i)}getItemByKey(e){return this.map[e]}getItem(e,o){const n=sd(e,o);return this.getItemByKey(n)}},Dc=class extends Aht{},zd=class extends Error{constructor(e="Loading canceled"){super(e),this.name="LoadingCanceledError";const o=new.target.prototype;Object.setPrototypeOf&&Object.setPrototypeOf(this,o)}},l5=class{constructor(e=[],o){Dt(this,"divergence",0);const n=o?o.getDivergence():0,i=_e.getLastLevelNodes(e);this.divergence=(n+i.length)%2;for(let r=0;r<i.length;r+=1)i[r].indexDivergence=(r+n)%2}getDivergence(){return this.divergence}};function H1(t=[]){const e={};return t.forEach(o=>{const{index:n=1/0}=o.field||{},i=`${n}`;e[i]=o.jaql.datatype||Zs.TEXT}),e}function lT(t,e){if(t&&e===Zs.DATETIME)try{return new Date(t).toISOString()}catch{return t}return t}function c5(t){if(t!==null&&!iT(t,{}))return t}function Jy(t,e,o={}){const n=c5(t),i=c5(e);let r=!1;if(typeof n=="object"&&n!==null&&typeof i=="object"&&i!==null){r=!0;const a=Object.keys(n),s=Object.keys(i);a.length!==s.length?r=!1:a.forEach(l=>{const d=o[l]||"";let b=(n||{})[l],C=(i||{})[l];if(typeof b>"u"||typeof C>"u"){r=!1;return}d===Zs.DATETIME&&(b=lT(b,d),C=lT(C,d)),b!==C&&(r=!1)})}else r=n===i;return r}function k9(t,e,o=lT){if(!t||typeof t!="object")return t;const n={};return Object.keys(t).forEach(i=>{const r=e[i],a=(t||{})[i],s=o(a,r);n[i]=s}),n}const ul=(t,e)=>{let o=t&&t.metadata||[];return e&&(o=o.filter(n=>n.panel===e)),o.sort((n,i)=>{const r={index:1/0},a=n.field||r,s=i.field||r;return a.index-s.index}),o},Dg=(t,e,o)=>typeof e>"u"?void 0:ul(t,o).filter(n=>(n.field||{index:1/0}).index===e)[0],Eht=(t,e)=>{const o=t.field||{index:1/0};if(t.panel===He.MEASURES)return!0;if(t.panel===He.ROWS){const n=ul(e,He.ROWS),i=(n[n.length-1]||{}).field||{index:1/0};if(n.length&&i.index===o.index)return!0;n.length||console.error("Missing rows panel in jaql!")}return!1};function Pht(t,e){return!t||typeof t.field!="number"?!1:t.field!==e}const Oht=(t,e=He.ROWS)=>{const o=ul(t,e).map((n,i)=>{const r=_e.create(n.jaql.title,void 0,void 0,i),a=Ti(r,e);switch(a.jaqlIndex=n.field?n.field.index:void 0,e){case He.ROWS:{a.measurePath=void 0;const s=Pht(n.jaql.sortDetails,a.jaqlIndex);n.jaql.sort&&!s?a.dir=n.jaql.sort:a.dir=null;break}case He.MEASURES:a.databars=n.format?n.format.databars:!1,a.measureJaqlIndex=a.jaqlIndex,ul(t,He.COLUMNS).length||(a.measurePath=void 0,n.jaql.sortDetails&&n.jaql.sortDetails.measurePath===null?a.dir=n.jaql.sortDetails.dir:a.dir=null);break}return a});return _e.wrapInRootNode(o)},A9=t=>{(t&&t.metadata?t.metadata:[]).forEach(e=>{e&&e.jaql&&e.jaql.sort&&e.jaql.sortDetails&&e.jaql.sortDetails.sortingLastDimension&&(e.jaql.sort=null,delete e.jaql.sortDetails)})},E9=t=>{t&&t.jaql&&(t.jaql.sort=null,delete t.jaql.sortDetails)},P9=t=>{(t&&t.metadata?t.metadata:[]).forEach(e=>E9(e))},Lht=t=>(t.metadata||[]).reverse().find(e=>!!e.jaql.sortDetails),Nht=t=>(t.metadata||[]).find(e=>!!(e.jaql.sortDetails&&e.jaql.sortDetails.isLastApplied)),Dht=t=>{const e=Nht(t)||Lht(t);if(!e)return;const o=e.field&&e.field.index;(t.metadata||[]).forEach(n=>{(n.field&&n.field.index)!==o&&E9(n)})},O9=(t,e)=>{t.metadata.forEach(o=>{const n=o.field&&o.field.index;if(e.field===n){o.jaql.sortDetails=o.jaql.sortDetails||e,o.jaql.sortDetails.isLastApplied=!0;return}o.jaql.sortDetails&&o.jaql.sortDetails&&delete o.jaql.sortDetails.isLastApplied})},Rht=(t,e,o)=>{const{isSingleRowTree:n=!1,formatter:i}=o||{};if(!e){console.warn("jaql is undefined or null!");return}const r=Dg(e,t.field);if(r&&r.panel===He.COLUMNS){console.warn('Should not be sorted by "COLUMN" type panels!');return}if(!r)return;const a=Eht(r,e);switch(n?P9(e):a&&A9(e),t.dir){case Bn.DESC:case null:r.jaql.sort=Bn.ASC;break;case Bn.ASC:r.jaql.sort=Bn.DESC;break;default:r.jaql.sort=void 0}const s=r.field||{index:1/0};if(r.jaql.sort){let{measurePath:l}=t;if(l){const d=ul(e),b=H1(d);l=k9(l,b,i)}r.jaql.sortDetails={field:s.index,dir:r.jaql.sort,sortingLastDimension:a,measurePath:l,initialized:!0}}else r.jaql.sortDetails=void 0;e&&e.metadata&&s.index!==void 0&&(e.metadata[s.index]=r),O9(e,t)},Iht=(t,e,o)=>{if(!t)return;const n=Dg(t,e);n&&(n.format=n.format||{},n.format.width=o)},jht=t=>{const e={};return t&&ul(t).forEach(o=>{const n=o.field||{index:1/0};o.format&&typeof o.format.width<"u"&&typeof n.index<"u"&&(e[n.index]=o.format.width)}),e},$ht=(t,e)=>{if(typeof e.measureJaqlIndex<"u"){const o=ul(t),n=H1(o),i=o.filter(a=>a.panel===He.ROWS).find(a=>{const s=a.jaql.sortDetails;return!s||s.field!==e.measureJaqlIndex?!1:!!Jy(e.measurePath,s.measurePath,n)});if(i){e.dir=i.jaql.sort?i.jaql.sort:null;return}const r=Dg(t,e.measureJaqlIndex);if(r&&r.jaql.sortDetails){const a=r.jaql.sortDetails.measurePath,s=e.measurePath;if(Jy(a,s,n)){e.dir=r.jaql.sort||null;return}}}e.dir=null};function zht(t,e,o,n){const{isSingleRowTree:i,formatter:r}=n;i&&P9(t),t.metadata.forEach(a=>{a.jaql.sortDetails&&delete a.jaql.sortDetails.isLastApplied}),e.forEach((a,s)=>{let l;s===e.length-1?(a.selected&&A9(t),l=o.field):l=a.indexInJaql;const d=Dg(t,l);if(!d){console.warn(new Error("Panel not found"));return}a.selected&&!a.direction&&console.warn(new Error("Direction should be defined and equal to 'asc' or 'desc'"));const b=ul(t),C=H1(b);if(!a.direction||!a.selected){const{sortDetails:u}=d.jaql;u&&o.field===u.field&&Jy(o.measurePath,u.measurePath,C)&&(delete d.jaql.sort,delete d.jaql.sortDetails)}if(a.selected&&a.direction){d.jaql.sort=a.direction;let{measurePath:u}=o;u&&(u=k9(u,C,r)),o.measurePath===void 0&&d.field&&d.panel==="rows"&&o.field!==d.field.index&&(u={}),d.jaql.sortDetails={field:o.field,dir:a.direction,sortingLastDimension:!1,measurePath:u,isLastApplied:!0,initialized:!0}}})}function Bht(t,e,o,n){return t.jaql.sortDetails?!1:o?Fn.isMeasurePathEqual(e.measurePath,o.measurePath,n):!1}function cT(t){const e=t&&t.dir;switch(e){case"asc":case"desc":return e;default:return null}}function Fht(t,e){var o,n;const i=t.metadata.filter(A=>A.panel==="rows"),r=Fn.getMetadataPanelByIndex(t,e.field),a=r.jaql.datatype,s=r.jaql.sortDetails,l=Fn.getDataTypes(Fn.getMetadataPanels(t)),d=[];for(let A=0;A<i.length-1;A+=1){const p=i[A],I=!!(p.jaql.sortDetails&&p.jaql.sortDetails.field===e.field&&Fn.isMeasurePathEqual(e.measurePath,p.jaql.sortDetails.measurePath,l)),W=cT(p.jaql.sortDetails);d.push({title:p.jaql.title,datatype:a,selected:I,direction:W,indexInJaql:(o=p.field)==null?void 0:o.index})}const b=i[i.length-1],C=Bht(b,e,s,l),u=cT(s),j={title:b.jaql.title,datatype:a,selected:C,direction:u,indexInJaql:(n=r.field)==null?void 0:n.index};return d.push(j),d}function Hht(t,e,o){return t.filter(n=>n.field&&e.field===n.field.index).map(n=>{const{sortDetails:i}=n.jaql,r=!!(i&&Fn.isMeasurePathEqual(e.measurePath,i.measurePath,o)),a=r?cT(i):null;return{title:n.jaql.title,datatype:n.jaql.datatype,selected:r,direction:a}})[0]}const Fn={isMeasurePathEqual:Jy,getDataTypes:H1,updatePanelsSortingMetadata:Rht,getMetadataTree:Oht,getMetadataPanels:ul,getMetadataPanelByIndex:Dg,setResizeWidthToJaql:Iht,getResizeWidthFromJaql:jht,markSortedNode:$ht,normalizeSingleBranchTreeSortDetails:Dht,updateLastAppliedSortingFlag:O9,handleComplexSortingSettingsUpdate:zht,mapWidgetJaqlToSimpleSortingSettings:Hht,mapWidgetJaqlToComplexSortingSettings:Fht};function L9(t,e){if(!_e.hasChildren(t))return!1;let o=!1;e===He.COLUMNS&&t&&t.isPart&&(o=!0);const n=_e.getChildren(t);if(n.length>1||o)return!0;const[i]=n;return L9(i)}function Wht(t){return t==null}const HE=(t,e,o,n,i)=>{const r=[];return t.forEach(a=>{if(r.push(a),_e.hasChildren(a)){const s=_e.getChildren(a),l=HE(s,e,o,n,i);_e.setChildren(a,l);let d=!1;if((i||L9(a,o))&&(o===He.COLUMNS?typeof a.index<"u"&&a.index>-1&&(d=!0):o===He.ROWS&&typeof a.data<"u"&&(d=!0)),d){const{value:b,index:C,data:u,jaqlIndex:j,measurePath:A}=a;let p;if(o===He.COLUMNS?p=_e.create(b,void 0,void 0,C):o===He.ROWS&&(p=_e.create(b,void 0,u)),p){const I=Ti(p,o);I.userType=Fo.SUB_TOTAL,I.jaqlIndex=j,I.measurePath=A,I.master=a,r.push(I)}}}}),r},N9=(t,e)=>{t.userType===Fo.SUB_TOTAL&&t.master&&(t.measurePath=t.master.measurePath)},D9=(t,e,o,n)=>{const i=t;if(o===He.COLUMNS&&e){const r=Ti(e);if(typeof r.index=="number"){const a=Fn.getMetadataTree(n,He.MEASURES);_e.getChildren(a).forEach((s,l)=>{const d=Ht(_t({},s),{index:(r.index||0)+l}),b=Ti(d,o);b.userType=Fo.GRAND_TOTAL,b.measureJaqlIndex=b.jaqlIndex,i.push(b)})}}return i},R9=(t,e)=>{t.userType===Fo.GRAND_TOTAL&&(t.measurePath=void 0,t.metadataType===He.ROWS&&(t.parent=void 0,t.jaqlIndex=0))},I9=(t,e,o,n)=>{let i=t;if(o===He.COLUMNS){const r=Fn.getMetadataTree(n,He.MEASURES),a=_e.getChildLength(r),s={maxLevel:0},l=_e.getLastLevelNodes(i,[],0,s);if(a>1)l.forEach(d=>{if(d.userType===Fo.GRAND_TOTAL)return;const b=_e.getChildren(r),C=[];for(let u=0;u<b.length;u+=1){if(typeof d.maxChilds=="number"&&u>=d.maxChilds)continue;const j=Ht(_t({},b[u]),{index:(d.index||0)+u,measurePath:d.measurePath}),A=Ti(j,He.MEASURES);A.userType=Fo.MEASURE_BOTTOM,A.measureJaqlIndex=A.jaqlIndex,C.push(A)}d.minLevel=s.maxLevel,_e.setChildren(d,C)});else if(a===1){const d=_e.getChildren(r)[0];if(d){const b=_t({},d),C=Ti(b,He.MEASURES);C.userType=Fo.MEASURE_TOP,_e.setChildren(C,i),i=[C],l.forEach(u=>{u.measureJaqlIndex=d.jaqlIndex})}}}return i},j9=(t,e)=>{!_e.hasChildren(t)&&typeof t.measureJaqlIndex<"u"&&Fn.markSortedNode(e,t)},Vht=(t,e,o,n)=>{let i={};if(e.userType===Fo.SUB_TOTAL||e.userType===Fo.GRAND_TOTAL||o.userType===Fo.SUB_TOTAL||o.userType===Fo.GRAND_TOTAL||o.parent&&o.parent.userType===Fo.SUB_TOTAL||o.parent&&o.parent.userType===Fo.GRAND_TOTAL)return;const r=n&&n.format&&n.format.color||null;if(!r)return;const{value:a,cf:s=-1}=t;if(r.type===i5.COLOR&&r.color&&r.color!=="transparent"&&(i.backgroundColor=r.color),r.type===i5.CONDITION&&r.conditions&&r.conditions.length)for(let l=0,d=r.conditions.length;l<d&&!Wht(a);l+=1){const b=r.conditions||[],{color:C}=b[l]||{};if(C&&s===l){i.backgroundColor=C;break}}Object.keys(i).length>0&&(t.style=t.style||{},Object.assign(t.style,i)),i=void 0},$9=(t,e,o,n)=>{const i=[],{level:r=0,measurePath:a={}}=n||{};let s;Array.isArray(t)?s=t:s=_e.getChildren(t);const l=Fn.getMetadataPanels(o,e)[r],d=l?(l.field||{index:1/0}).index:void 0;return s.forEach(b=>{const C=Ti(b,e);if(C.jaqlIndex=d,typeof d<"u"&&(C.measurePath=Ht(_t({},a),{[d]:C.value})),i.push(C),_e.hasChildren(C)){const u=_e.getChildren(C),j={level:r+1,measurePath:C.measurePath},A=$9(u,e,o,j);_e.setChildren(C,A)}}),i},z9=(t,e,o)=>{const{skipFormatEvent:n=!1,onlyFormatEvents:i=!1,iterateFn:r,emitFn:a}=o||{};t.forEach(s=>{if(r&&r(s),(n||!i)&&(N9(s),R9(s),j9(s,e)),a&&(i||!n)){const l=Fn.getMetadataPanelByIndex(e,s.jaqlIndex,s.metadataType||"");a(s,l,e)}if(_e.hasChildren(s)){const l=_e.getChildren(s);z9(l,e,o)}})},Uht=(t,e,o,n)=>{const{originalData:i,applyIndexDivergence:r,subtotalsForSingleRow:a}=n||{};r&&r(t);let s=HE(t,i,e,o,a);return s=D9(s,i,e,o),s=I9(s,i,e,o),_e.iterateThroughTree(s,(l,d)=>{l.parent=d}),s},$h={insertSubTotals:HE,postProcessSubTotal:N9,insertGrandTotals:D9,postProcessGrandTotal:R9,insertMeasureNodes:I9,postProcessMeasureNode:j9,applyColorFormatting:Vht,preProcessTree:$9,modifyTree:Uht,postProcessTree:z9},Ti=(t,e)=>{const o=t;return e&&(o.metadataType=e),o};function Kd(t,e,o){return!e||!e.length?!1:e.some(n=>{let i=!0;return o&&o.fields&&o.fields.length&&o.fields.forEach(r=>{t[r]!==void 0&&n[r]===void 0?i=!1:t[r]!==void 0&&n[r]!==void 0&&(Array.isArray(t[r])?i=i&&t[r].indexOf(n[r])!==-1:i=i&&t[r]===n[r])}),i})}const Ght=(t,e=[])=>{let o=!1;return!e||!e.length?!1:t.length===0?!0:(t.forEach(n=>{e.includes(n)&&(o=!0)}),o)},u5=(t,e)=>{let o=!0;return!e||!e.length?o=!1:t.forEach(n=>{if(n.index){const i=e[e.length-1];o=o&&Kd(n,[i],{fields:[Hl.INDEX]})}if(n.dim&&(n.name=n.dim,n.members&&(n.member=n.members),o=o&&Kd(n,e,{fields:[Hl.NAME,Hl.MEMBER]})),n.title){const i=e[e.length-1];o=o&&Kd(n,[i],{fields:[Hl.TITLE]})}}),o},Yht=(t,e)=>{let o=!0;return!e||!e.length?o=!1:t.forEach(n=>{n.index&&(o=o&&Kd(n,e,{fields:[Hl.INDEX]})),n.dim&&(n.name=n.dim,o=o&&Kd(n,e,{fields:[Hl.DIM,Hl.AGG]})),n.title&&(o=o&&Kd(n,e,{fields:[Hl.TITLE]}))}),o},Xht=(t,e)=>{let o=!0;if(t.type&&o&&(o=o&&Ght(t.type,e.type)),t.rows&&t.rows.length&&o){const n=e.rows?e.rows:[];o=o&&u5(t.rows,n)}if(t.columns&&o){const n=e.columns?e.columns:[];o=o&&u5(t.columns,n)}if(t.values&&o){const n=e.measure?[e.measure]:[];o=o&&Yht(t.values,n)}return o},qht=(t,e)=>t.metadata.find(o=>o.field&&o.field.index===e),sy=(t,e,o=[],n=[])=>{if(!e||!t||typeof t.jaqlIndex>"u")return{dimensionsMeta:o,type:n};const i=qht(e,t.jaqlIndex);if(i&&i.jaql&&t.metadataType!==He.MEASURES&&o.unshift({title:i.jaql.title,name:i.jaql.dim,member:t.value,index:t.jaqlIndex}),t&&t.userType&&(t.userType===Fo.SUB_TOTAL||t.userType===Fo.GRAND_TOTAL)){const r=t.userType.toLowerCase();n.push(r)}return t.parent&&t.parent.metadataType!==He.MEASURES?sy(t.parent,e,o,n):{dimensionsMeta:o,type:n}},d5=t=>{let e={};if(t){const o=t.jaql;e=ge(o,["type","datatype","table","column"]),t.field&&(e.index=t.field.index)}return e},Ci={CORNER:"corner",COLUMNS:"columns",ROWS:"rows",DATA:"data"};function j_(t,e="",o=""){let n="";return t&&(t.levels.length&&t.levels.forEach(i=>{n+=` ${e}--${o?`${o}-`:""}level-${i}`}),t.siblings.length&&t.siblings.forEach(i=>{n+=` ${e}--${o?`${o}-`:""}sibling-${i}`}),t.root&&t.root.siblings&&t.root.siblings.length&&t.root.siblings.forEach(i=>{n+=` ${e}--${o?`${o}-root-`:"root-"}sibling-${i}`}),t.parent&&t.parent.siblings&&t.parent.siblings.length&&t.parent.siblings.forEach(i=>{n+=` ${e}--${o?`${o}-parent-`:"parent-"}sibling-${i}`})),n}function Zht(t,e){const{metadata:o,rowMetadata:n,rowTreeNode:i,columnTreeNode:r,merge:a}=e||{},s={t:!0,r:!0,b:!0,l:!0};if(t===Ci.CORNER||t===Ci.COLUMNS)return s;if(t===Ci.ROWS){const l=a&&a.colSpan,d=o&&o.nextNode&&o.nextNode.userType===Fo.GRAND_TOTAL;o&&o.levels.includes(wi.LAST)&&!o.siblings.includes(wi.LAST)&&!l&&!d&&(s.b=!1),o&&o.levels.includes(wi.FIRST)&&o.levels.includes(wi.LAST)&&!o.siblings.includes(wi.LAST)&&!l&&!d&&(s.b=!1)}if(t===Ci.DATA){const l=i&&i.userType===Fo.SUB_TOTAL,d=r&&r.userType===Fo.SUB_TOTAL,b=r&&r.userType===Fo.GRAND_TOTAL,C=n&&n.nextNode&&n.nextNode.userType===Fo.GRAND_TOTAL;n&&n.levels.includes(wi.LAST)&&!n.siblings.includes(wi.LAST)&&!l&&!d&&!b&&!C&&(s.b=!1)}return s}function $_(t,e="",o=""){let n="";return t&&t.userType&&(n=`${e}--${o?`${o}-`:""}user-type-${t.userType}`),n}function z_(t,e="",o=""){let n="";return t&&t.colSpan&&(n=`${e}--${o?`${o}-`:""}merged-columns`),t&&t.rowSpan&&(n=` ${e}--${o?`${o}-`:""}merged-rows`),n}function B_(t){return t&&t.colSpan?t.colSpan-1:0}function p5(t,e){if(t===void 0)return t;let o=typeof t=="number"?t:parseInt(t,10);return o-=e||1,o}function zh(t){const{isDataCell:e,dataNode:o,treeNode:n}=t,i=e?o:n;return i&&i.style||{}}const Kht=t=>{const e={};return Object.keys(t).forEach(o=>{(!o.startsWith("border")||o==="borderColor")&&(e[o]=t[o])}),e},Jht=t=>{const e={};return Object.keys(t).forEach(o=>{(!o.startsWith("color")&&!o.startsWith("padding")&&!o.startsWith("border")&&!o.startsWith("font")&&!o.startsWith("lineHeight")&&!o.startsWith("databarColor")||o==="borderColor")&&(e[o]=t[o])}),e},Qht=t=>{const e={};return Object.keys(t).forEach(o=>{(o.startsWith("color")||o.startsWith("padding")||o.startsWith("font")||o.startsWith("lineHeight"))&&(e[o]=t[o])}),e},tft=t=>{const e={};return t.databarColor&&(e.backgroundColor=t.databarColor),e},eft=(t,e,o=0)=>e&&t&&e.offsetWidth+o>=t.offsetWidth&&e.textContent||"",oft=(t,e,o)=>{if(!t||!e||!o||o.measureJaqlIndex===void 0)return;const[n,i]=t[o.measureJaqlIndex]||[];if(n==null)return;const r=e&&e.store&&e.store.compileRange,a=e&&e.store&&e.store.compileRangeContext,s=e&&e.store&&e.store.compileRangeArgs;if(!r||!s||!a||!e||!e.value)return;const l=Ht(_t({},s),{minvalue:n,midvalue:n+(i-n)/2,maxvalue:i});let d,b;return l.min===void 0&&(l.maxvalue<=0&&(b=!0),l.min=l.minDef),l.max===void 0&&(l.minvalue>=0&&(d=!0),l.max=l.maxDef),b&&(l.max=l.maxGray),d&&(l.min=l.minGray),r.call(a,l)(e.value)},Bh="text";let nft=class B9{constructor(e,o,n){Dt(this,"plugins",[]),Dt(this,"globalStyles"),Dt(this,"jaql"),Dt(this,"indexHelper"),Dt(this,"columnsMetadata",[]),Dt(this,"metadataCache",new Map),this.plugins=e,this.jaql=o,this.globalStyles=n,this.indexHelper={measuresLevel:this.getMeasuresLevel(),columnStartFrom:0,rowStartFrom:0},this.globalStyles&&(this.globalStyles=Kht(this.globalStyles))}getJaqlPanels(e){if(!this.jaql)throw new Error("No Jaql in Plugin service!");return this.jaql.metadata.filter(o=>o.panel===e)}getMeasuresLevel(){const e=this.getJaqlPanels(He.COLUMNS);return this.getJaqlPanels(He.MEASURES).length>1?e.length:0}getRowsColumnLength(){return this.getJaqlPanels(He.ROWS).length}getTotalTypes(e){const o=e.filter(n=>n===ad.SUB_TOTAL||n===ad.GRAND_TOTAL);return o&&o.length?o.filter((n,i,r)=>r.indexOf(n)===i):[]}getMeasureMetaByIndex(e){const o=this.getJaqlPanels(He.MEASURES);if(o.length===1)return d5(o[0]);const n=e%o.length;return d5(o[n])}resetRowStartFrom(){this.indexHelper.rowStartFrom=1}applyToColumns(e){e.length!==0&&(this.indexHelper.columnStartFrom===0&&(this.indexHelper.columnStartFrom=this.getRowsColumnLength()),this._applyToColumns(e,{row:-1}))}_applyToColumns(e,o){e.forEach((n,i)=>{const{dimensionsMeta:r,type:a}=sy(n,this.jaql);a.push(ad.MEMBER);let s=o.row>=0?o.row+1:0;s>=this.indexHelper.rowStartFrom&&(this.indexHelper.rowStartFrom=s+1),n.metadataType===He.MEASURES&&(s=this.indexHelper.measuresLevel);let l=i===0?0:1;l+=this.indexHelper.columnStartFrom;const d={type:a,rowIndex:s,colIndex:l,index:n.jaqlIndex,columns:r};n.metadataType===He.MEASURES&&(d.measure=this.getMeasureMetaByIndex(n.index||0));const b={value:n.value||"",content:n.content||"",contentType:n.contentType||Bh,style:n.style||{},store:n.store||{},state:n.state};if(this.applyGlobal(b),this.apply(d,b),this.addToMetadata(d,b,d.rowIndex,d.colIndex),Object.assign(n,b),this.indexHelper.columnStartFrom=l,n.children){const C={row:s,column:l};this._applyToColumns(n.children,C)}else this.columnsMetadata.push({type:a,metadata:r});return!0})}applyToHeaders(e){!e||!e.children||e.children.length===0||e.children.forEach(o=>{const{dimensionsMeta:n}=sy(o,this.jaql),i={type:[ad.MEMBER],rowIndex:0,colIndex:o.index||0,index:o.jaqlIndex,rows:n},r={value:o.value,content:o.content||"",contentType:o.contentType||Bh,style:o.style?o.style:{},store:o.store||{},state:o.state};this.applyGlobal(r),this.apply(i,r),this.addToMetadata(i,r,i.rowIndex,i.colIndex),Object.assign(o,r)})}applyToRows(e){if(e.length===0)return;const o=this.getJaqlPanels(He.ROWS),n=this.getJaqlPanels(He.MEASURES),i=this.getJaqlPanels(He.COLUMNS);this.indexHelper.rowStartFrom=B9.getRowStartFromForPage(o.length,n.length,i.length),this._applyToRows(e)}static getRowStartFromForPage(e,o,n){if(e===0&&n===0)return 0;const i=n+(o===0?0:1);return i===0?1:i}_applyToRows(e){e.forEach((o,n)=>{const{dimensionsMeta:i,type:r}=sy(o,this.jaql);r.push(ad.MEMBER);const a=o.level?o.level:0,s=n===0?this.indexHelper.rowStartFrom:this.indexHelper.rowStartFrom+1,l={type:r,rowIndex:s,colIndex:a,index:o.jaqlIndex,rows:i},d={value:o.value,content:o.content||"",contentType:o.contentType||Bh,style:o.style||{},store:o.store||{},state:o.state};return this.applyGlobal(d),this.apply(l,d),this.addToMetadata(l,d,l.rowIndex,l.colIndex),this.indexHelper.rowStartFrom=s,o.children?this._applyToRows(o.children):o.data&&o.data.length&&this.applyToValues(o.data,{type:r,metadata:i},{rowIndex:s,colIndex:this.getRowsColumnLength()}),Object.assign(o,d),!0})}applyToValues(e,o,n){e.length&&e.forEach((i,r)=>{const a=[ad.VALUE],s=this.columnsMetadata[r];if(!s)return;const l=this.getTotalTypes([...o.type,...s.type]),d=this.getMeasureMetaByIndex(r),b={type:a.concat(l),rows:o.metadata,columns:s.metadata,measure:d,colIndex:r+n.colIndex,rowIndex:n.rowIndex,index:d&&d.index?d.index:0};let C={value:i,content:i,contentType:Bh,style:{},store:i&&i.store||{},state:i&&i.state||void 0};i!=null&&typeof i=="object"&&(C={value:i.value?i.value:null,content:i.content||"",contentType:i.contentType||Bh,style:i.style||{},store:i.store||{},state:i.state}),this.applyGlobal(C),this.apply(b,C),this.addToMetadata(b,C,b.rowIndex,b.colIndex),e[r]=C})}addToMetadata(e,o,n,i){const r=_t({cellData:{value:o.value,content:o.content}},e);this.metadataCache.set(`${n}-${i}`,r)}applyGlobal(e){const{globalStyles:o}=this;o&&(e.style=_t(_t({},e.style),o))}apply(e,o){this.plugins&&this.plugins.length&&this.plugins.forEach(n=>{if(Xht(n.target,e)){const i=n.handler;i(e,o)}})}};const F_=(t,e)=>{const o=t||{metadata:[],grandTotals:null};let{metadata:n}=o;return n=n.map(i=>{const r=i.field||{},a=e.find(({field:l})=>l&&l.index===r.index),s=a?a.format:null;return s?Ht(_t({},i),{format:s}):i}),Ht(_t({},o),{metadata:n})},h5=100,ift="dataLoad",uT="dataChunkLoaded",rft="dataBarChunkLoaded",aft="rangeMinMaxChunkLoaded",dT="grandChunkLoaded",sft="dataFinishChunkLoaded",lft="finishChunkLoaded",ly="progressError",pT="headerCellFormat",F9="dataCellFormat",hT="totalRowsCountLoaded",fT="totalColumnsCountLoaded",f5=1e3,cft=0,uft={throttle:y9,throttleTime:cft,PluginService:nft,skipInternalColorFormatting:!1,subtotalsForSingleRow:!1};let H9=class Yr{constructor(e,o,n,i){Dt(this,"logger"),Dt(this,"events"),Dt(this,"loadService"),Dt(this,"options"),Dt(this,"tempDataChunks",[]),Dt(this,"lastNotHandledChunkIndex",0),Dt(this,"lastReadyNotHandledChunkIndex",0),Dt(this,"rowsGrand"),Dt(this,"rowsTreeService"),Dt(this,"columnsTreeService"),Dt(this,"cornerTreeService"),Dt(this,"pageSize",h5),Dt(this,"isPaginated",!1),Dt(this,"loadedPagesCount",0),Dt(this,"isLoadInProgress",!1),Dt(this,"loadPromiseResolve"),Dt(this,"loadPromiseReject"),Dt(this,"loadPromiseCache"),Dt(this,"loadAllPromise"),Dt(this,"loadAllPromiseResolve"),Dt(this,"loadAllPromiseReject"),Dt(this,"isWholeDataLoaded",!1),Dt(this,"hasDataFinishEvent",!1),Dt(this,"isDataHandlerThrottled",!1),Dt(this,"onDataHandlerThrottle"),Dt(this,"metadata",[]),Dt(this,"dataBars"),Dt(this,"rangeMinMax"),Dt(this,"divergenceComparator",new l5),Dt(this,"pluginService"),Dt(this,"rawJaql"),Dt(this,"triggeredEventsData",{}),Dt(this,"callPlugins",[]),Dt(this,"globalStyles"),Dt(this,"columnsCount"),Dt(this,"totalColumnsCount"),Dt(this,"rowsCount"),Dt(this,"totalRowsCount"),Dt(this,"totalRecordsCount"),Dt(this,"limitReached"),Dt(this,"onMetadataHandler",()=>{const r={metadata:this.getMetadata()};this.isSingleRowTree()&&Fn.normalizeSingleBranchTreeSortDetails(r)}),Dt(this,"onHeadersHandler",r=>{const a=this.getJaql.bind(this),s=this.getRawJaql.bind(this),l=this.applyIndexDivergence.bind(this),d=(j,A,p)=>this.emit(pT,j,A,p,this.options),b=Yr.createColumnsTreeServiceBuilder({getJaql:a,getRawJaql:s,pluginService:this.pluginService,applyIndexDivergence:l},{emitHeaderCellFormatEvent:d})(r);this.columnsTreeService=b.columnsTreeService,this.columnsCount=b.columnsCount,this.totalColumnsCount=b.totalColumnsCount,this.emit(fT,{columnsCount:this.columnsCount||0,totalColumnsCount:this.totalColumnsCount||0});const C=Yr.createCornerTreeServiceBuilder({getJaql:a,getRawJaql:s,pluginService:this.pluginService,columnsTreeService:this.columnsTreeService},{emitHeaderCellFormatEvent:d}),{cornerTreeService:u}=C();this.cornerTreeService=u}),Dt(this,"onDataHandler",r=>{this.tempDataChunks=this.tempDataChunks||[],Array.isArray(r)?(r||[]).forEach(a=>{Yr.fillDataChunks(this.tempDataChunks,a,this.pageSize)}):Yr.fillDataChunks(this.tempDataChunks,r,this.pageSize),this.tempDataChunks.length&&(this.isDataHandlerThrottled=!0,this.onDataHandlerThrottle())}),Dt(this,"onGrandHandler",r=>{const a=this.preProcessTree([r],He.ROWS)[0],s="Rows grand total",l=a?a.data:[],d=_e.create(s,void 0,l),b=Ti(d,He.ROWS);b.userType=Fo.GRAND_TOTAL,this.postProcessTree([b]),this.postProcessData([b]),this.rowsGrand=b,this.emit(dT,_e.wrapInRootNode(this.rowsGrand))}),Dt(this,"onFinishHandler",()=>{this.emit(lft,{totalRows:typeof this.totalRowsCount=="number"?this.totalRowsCount:this.getTotalItemsCount(),totalColumns:typeof this.totalColumnsCount=="number"?this.totalColumnsCount:this.getLoadedColumnsCount()})}),Dt(this,"onTotalRowsHandler",r=>{const{rowsCount:a,queryRowsCount:s,limitReached:l}=r||{};this.totalRowsCount=a,this.totalRecordsCount=s,this.limitReached=l,this.emit(hT,r)}),Dt(this,"onDataBarsHandler",r=>{const{data:a=[]}=r;let s=0;this.cornerTreeService&&(s=this.cornerTreeService.getTreeChildLength()),this.dataBars=[...Array(s),...a],this.emit(rft,this.dataBars)}),Dt(this,"onRangeMinMaxHandler",r=>{const{data:a=[]}=r,s=this.getJaql(),l=Fn.getMetadataTree(s,He.MEASURES),d=_e.getChildren(l),b=[];d.forEach((C,u)=>{b[C.measureJaqlIndex||0]=a[u]}),this.rangeMinMax=b,this.emit(aft,this.rangeMinMax)}),Dt(this,"onDataFinishHandler",({rowsCount:r}={})=>{if(this.finishRequest(),this.rowsCount=r,this.tempDataChunks.length){const a=this.tempDataChunks[this.tempDataChunks.length-1];a.ready=!0}this.onDataHandlerThrottle(),this.checkLoadPromise(),this.emit(sft,{limitedRows:this.rowsCount,limitedColumns:this.columnsCount})}),Dt(this,"onErrorHandler",r=>{process.env.NODE_ENV!=="production"&&this.logger.console.warn(`${this.logger.getName()} data loading error "${JSON.stringify(r)}"`),!this.isLoadInProgress&&!this.isWholeDataLoaded&&!(r instanceof zd)&&this.emit(ly,r)}),this.loadService=e,this.events=o||new Ng,this.logger=i||bc.create("DataService"),this.options=_t(_t({},uft),n),this.attachEvent(),this.onDataHandlerThrottle=this.options.throttle(()=>{const r=s5(this.tempDataChunks,C=>C.ready&&!C.handled,this.lastReadyNotHandledChunkIndex);if(r===-1)return;this.lastReadyNotHandledChunkIndex=r;const a=this.tempDataChunks[r],s=this.preProcessTree(a.list,He.ROWS),l=this.modifyTree(s,He.ROWS);this.postProcessTree(l,{skipFormatEvent:!0}),this.postProcessData(l,{skipFormatEvent:!0});const d=_e.wrapInRootNode(l);this.rowsTreeService?this.rowsTreeService.extend(d):this.rowsTreeService=new Dc(d,!0),this.emit(uT,this.getLoadedElementsCount()),a.handled=!0;const b=s5(this.tempDataChunks,C=>!C.handled,this.lastNotHandledChunkIndex);if(b!==-1?(this.lastNotHandledChunkIndex=b,this.onDataHandlerThrottle()):this.isDataHandlerThrottled=!1,this.hasDataFinishEvent&&this.tempDataChunks.length){const C=this.tempDataChunks[this.tempDataChunks.length-1];C.ready=!0}this.hasDataFinishEvent&&b===-1?(this.finishRequest(),this.checkLoadPromise()):this.checkLoadPromise()},this.options.throttleTime)}destroy(){this.detachEvent(),this.rowsGrand=void 0,this.rowsTreeService=void 0,this.columnsTreeService=void 0,this.cornerTreeService=void 0,this.tempDataChunks=[],this.lastNotHandledChunkIndex=0,this.lastReadyNotHandledChunkIndex=0,this.events.removeAllListeners()}on(e,o){this.events.on(e,o),this.triggeredEventsData[e]&&(this.triggeredEventsData[e].forEach(n=>{this.events.emit(e,...n)}),delete this.triggeredEventsData[e])}emit(e,...o){this.events.listeners(e).length===0?(this.triggeredEventsData[e]=this.triggeredEventsData[e]||[],this.triggeredEventsData[e].push(o)):this.events.emit(e,...o)}off(e,o){this.events.removeListener(e,o),this.triggeredEventsData[e]&&delete this.triggeredEventsData[e]}loadData(e,o){const{pageSize:n=h5,isPaginated:i=!1,cacheResult:r=!1,metadata:a}=o||{},s=this.pageSize===n;if(this.clearLoadAllPromise(),e&&this.clearCache(),this.pageSize=n,this.isPaginated=i,this.emit(ift),this.loadPromiseCache&&s){const d=Promise.resolve(this.loadPromiseCache);return this.loadPromiseCache=void 0,d}this.isLoadInProgress=!0,e&&(this.metadata=a||[],this.rawJaql=F_(e,this.metadata),this.initPluginService(this.rawJaql),this.loadService.load(e).then(d=>{if(d==null)return;const b=!("data"in d);if(d.dataFinish[0]&&b)throw{error:{error:!0,details:"metadata undefined."}}}).catch(d=>{this.loadPromiseReject&&this.loadPromiseReject(d.error)}));const l=new Promise((d,b)=>{this.loadPromiseResolve=d,this.loadPromiseReject=b}).then(d=>this.sendInitPage(d)).then(d=>(r&&(this.loadPromiseCache=d),this.loadedPagesCount=1,d)).catch(d=>{throw d instanceof zd&&this.clearLoadPromise(),d});return this.checkLoadPromise(),l}loadAllData(){if(this.isWholeDataLoaded){const e={loadedRowsCount:this.getLoadedElementsCount(),totalItemsCount:typeof this.totalRowsCount=="number"?this.totalRowsCount:this.getTotalItemsCount(),totalRecordsCount:this.totalRecordsCount,limitReached:this.limitReached,dataBars:this.dataBars,rangeMinMax:this.rangeMinMax};return this.columnsCount!==0&&this.totalColumnsCount!==0&&(e.columnsCount=this.columnsCount,e.totalColumnsCount=this.totalColumnsCount),Promise.resolve(e)}return this.loadAllPromise||(this.loadAllPromise=new Promise((e,o)=>{this.loadAllPromiseResolve=e,this.loadAllPromiseReject=o}).then(()=>({loadedRowsCount:this.getLoadedElementsCount(),totalItemsCount:typeof this.totalRowsCount=="number"?this.totalRowsCount:this.getTotalItemsCount(),totalRecordsCount:this.totalRecordsCount,limitReached:this.limitReached,dataBars:this.dataBars,rangeMinMax:this.rangeMinMax})).catch(e=>{throw e instanceof zd&&this.clearLoadAllPromise(),e})),this.loadAllPromise}getSelectedPageData(e,o){return Promise.resolve(this.sendPaginatedPage(e,o))}getIndexedPageData(e,o,n=!1){return Promise.resolve(this.sendPartialPage(e,o,n))}getJaql(){return this.loadService.getJaql()||{metadata:[],grandTotals:null}}isSingleRowTree(){return this.loadService.isSingleRowTree()}setPluginHandlers(e){this.callPlugins=e}setGlobalStyles(e){this.globalStyles=e}getRawJaql(){return this.rawJaql||this.getJaql()}getMetadata(){return this.metadata.length>0?this.metadata:this.getJaql().metadata}preProcessTree(e,o,n){return $h.preProcessTree(e,o,this.getJaql(),n)}postProcessTree(e,o){const n=(r,a,s)=>this.emit(pT,r,a,s,this.options),i=Ht(_t({},o||{}),{emitFn:n});return $h.postProcessTree(e,this.getRawJaql(),i)}postProcessData(e,o){const{skipFormatEvent:n=!1,onlyFormatEvents:i=!1}=o||{},r=this.columnsTreeService?this.columnsTreeService.getLastLevelNodes():[],a=_e.getLastLevelNodes(e),s=this.getRawJaql();n||a.forEach(l=>{const d=Ti(l);r.forEach(b=>{const C=Ti(b),u=Fn.getMetadataPanelByIndex(s,C.measureJaqlIndex,He.MEASURES);if(typeof d.data<"u"&&typeof C.index<"u"){const{data:j=[]}=d,{index:A}=C,p=j[A],I=typeof p=="object"&&p!==null&&p!==void 0?p:{value:p};if(j[A]=I,i||!n){const{skipInternalColorFormatting:W=!1}=this.options;W||$h.applyColorFormatting(I,d,C,u),this.emit(F9,I,d,C,u,s,this.options)}}})})}modifyTree(e,o,n){const i=this.getJaql();return $h.modifyTree(e,o,i,{originalData:n,applyIndexDivergence:this.applyIndexDivergence.bind(this),subtotalsForSingleRow:this.options.subtotalsForSingleRow})}applyIndexDivergence(e){this.divergenceComparator=new l5(e,this.divergenceComparator)}initPluginService(e){this.pluginService=new this.options.PluginService(this.callPlugins,e,this.globalStyles)}cancelLoading(){const e=new zd;this.loadPromiseReject&&typeof this.loadPromiseReject=="function"&&this.loadPromiseReject(e),this.loadAllPromiseReject&&typeof this.loadAllPromiseReject=="function"&&this.loadAllPromiseReject(e),this.detachEvent()}getPageSize(){return this.pageSize}sendInitPage(e){if(this.loadService.hasError()||!this.loadService.hasData())return Yr.getEmptyPage();let o,n;const i=this.getPageSize();if(this.rowsTreeService){const a=i>e?e:i,s=Yr.cloneTreeNode,l=this.rowsTreeService.getPartialTree(0,a,{cloneFn:s});this.rowsGrand&&l.push(dr(this.rowsGrand)),this.postProcessTree(l,{onlyFormatEvents:!0,iterateFn:_e.clearNodeCache}),this.postProcessData(l,{onlyFormatEvents:!0});const d=this.rowsTreeService?this.rowsTreeService.getTreeDeepsLength():0,b=_e.wrapInRootNode(l);this.pluginService&&b&&b.children&&(this.pluginService.applyToRows(b.children),n=this.pluginService.metadataCache),o=new Dc(b,!0,d),o.hasGrandTotals=!!this.rowsGrand}const r=this.isWholeDataLoaded&&i>=e;return{rowsTreeService:o,columnsTreeService:this.columnsTreeService,cornerTreeService:this.cornerTreeService,isLastPage:r,cellsMetadata:n}}sendPaginatedPage(e,o){if(this.loadService.hasError()||!this.loadService.hasData())return Yr.getEmptyPage();o&&(this.pageSize=o);const n=this.getPageSize(),i=this.getLoadedElementsCount();if(e*n>=i)throw new Error("Selected page is out of elements range!");if(e<0)throw new Error("Selected page must be >= 0");let r,a;if(this.rowsTreeService){const s=e>=0?e*n:0,l=(e+1)*n>i?i:(e+1)*n,d=Yr.cloneTreeNode,b=this.rowsTreeService.getPartialTree(s,l,{cloneFn:d});this.rowsGrand&&b.push(dr(this.rowsGrand)),this.postProcessTree(b,{onlyFormatEvents:!0,iterateFn:_e.clearNodeCache}),this.postProcessData(b,{onlyFormatEvents:!0});const C=this.rowsTreeService?this.rowsTreeService.getTreeDeepsLength():0,u=_e.wrapInRootNode(b);this.pluginService&&u&&u.children&&(this.pluginService.applyToRows(u.children),a=this.pluginService.metadataCache),r=new Dc(u,!0,C),r.hasGrandTotals=!!this.rowsGrand}return{rowsTreeService:r,columnsTreeService:this.columnsTreeService,cornerTreeService:this.cornerTreeService,isLastPage:!0,cellsMetadata:a}}sendPartialPage(e,o,n){if(this.loadService.hasError()||!this.loadService.hasData())return Yr.getEmptyPage();const i=this.getLoadedElementsCount();let[r,a]=[Math.min(e,o),Math.max(e,o)];r=r>=0?r:0,a=a>=0?a:0,a=a<i?a:i;let s,l;if(r>i)s=void 0;else{let d;if(this.rowsTreeService){const u=Yr.cloneTreeNode;d=this.rowsTreeService.getPartialTree(r,a,{cloneFn:u}),n&&this.rowsGrand&&d.push(dr(this.rowsGrand)),this.postProcessTree(d,{onlyFormatEvents:!0,iterateFn:_e.clearNodeCache}),this.postProcessData(d,{onlyFormatEvents:!0})}const b=this.rowsTreeService?this.rowsTreeService.getTreeDeepsLength():0,C=_e.wrapInRootNode(d);this.pluginService&&C&&C.children&&(this.pluginService.applyToRows(C.children),l=this.pluginService.metadataCache),s=new Dc(C,!0,b),s.hasGrandTotals=!!(n&&this.rowsGrand)}return{rowsTreeService:s,columnsTreeService:this.columnsTreeService,cornerTreeService:this.cornerTreeService,isLastPage:!0,cellsMetadata:l}}getLoadedElementsCount(){return this.rowsTreeService?this.rowsTreeService.getTreeChildLength():0}getTotalItemsCount(){return this.loadService.getTotalItemsCount()}getLoadedColumnsCount(){return this.columnsTreeService?this.columnsTreeService.getTreeChildLength():0}attachEvent(){this.loadService.listenerCount(Ye.HEADERS)&&this.loadService.offAll(Ye.HEADERS),this.loadService.on(Ye.HEADERS,this.onHeadersHandler),this.loadService.on(Ye.METADATA,this.onMetadataHandler),this.loadService.on(Ye.DATA,this.onDataHandler),this.loadService.on(Ye.GRAND,this.onGrandHandler),this.loadService.on(Ye.DATA_FINISH,this.onDataFinishHandler),this.loadService.on(Ye.TOTAL_ROWS,this.onTotalRowsHandler),this.loadService.on(Ye.DATABARS,this.onDataBarsHandler),this.loadService.on(Ye.RANGE_MIN_MAX,this.onRangeMinMaxHandler),this.loadService.on(Ye.FINISH,this.onFinishHandler),this.loadService.on(Ye.ERROR,this.onErrorHandler)}detachEvent(){this.loadService.off(Ye.HEADERS,this.onHeadersHandler),this.loadService.off(Ye.METADATA,this.onMetadataHandler),this.loadService.off(Ye.DATA,this.onDataHandler),this.loadService.off(Ye.GRAND,this.onGrandHandler),this.loadService.off(Ye.DATA_FINISH,this.onDataFinishHandler),this.loadService.off(Ye.TOTAL_ROWS,this.onTotalRowsHandler),this.loadService.off(Ye.DATABARS,this.onDataBarsHandler),this.loadService.off(Ye.RANGE_MIN_MAX,this.onRangeMinMaxHandler),this.loadService.off(Ye.FINISH,this.onFinishHandler),this.loadService.off(Ye.ERROR,this.onErrorHandler)}checkLoadPromise(){if(!this.isLoadInProgress)return;const e=this.getLoadedElementsCount();(e>=this.getPageSize()||this.isWholeDataLoaded)&&(this.isLoadInProgress=!1,typeof this.loadPromiseResolve=="function"&&(this.loadPromiseResolve(e),this.clearLoadPromise()))}clearLoadAllPromise(){this.loadAllPromise=void 0,this.loadAllPromiseReject=void 0,this.loadAllPromiseResolve=void 0}clearLoadPromise(){this.loadPromiseReject=void 0,this.loadPromiseResolve=void 0}finishRequest(){this.logger.log("finishRequest"),this.hasDataFinishEvent=!0,!this.isDataHandlerThrottled&&(this.isWholeDataLoaded=!0,this.loadAllPromiseResolve&&typeof this.loadAllPromiseResolve=="function"&&(this.loadAllPromiseResolve(),this.clearLoadAllPromise()))}clearCache(){this.rowsGrand=void 0,this.rowsTreeService=void 0,this.columnsTreeService=void 0,this.loadedPagesCount=0,this.hasDataFinishEvent=!1,this.isWholeDataLoaded=!1,this.isLoadInProgress=!1,this.tempDataChunks=[],this.lastNotHandledChunkIndex=0,this.lastReadyNotHandledChunkIndex=0,this.isDataHandlerThrottled=!1}static getEmptyPage(){return{isLastPage:!0}}static fillDataChunks(e,o,n=f5,i=f5){const r=e.length<2?n:i;let a=e[Math.max(0,e.length-1)],s,l=!a;if(!o||typeof o.children>"u"&&typeof o.value>"u"&&o.data&&!o.data.length){a&&(a.ready=!0);return}if(a){const d=Math.max(0,a.list.length-1);s=a.list[d];const b=a.size?`${a.size}`:"0",C=parseInt(b,10)+(o.size||1);(a.handled||C>r&&!(s.isPart&&s.value===o.value))&&(l=!0)}o&&o.isPart&&s&&(!s.isPart||s.value!==o.value)&&(l=!0,s.value!==o.value&&(s=void 0)),l&&(a&&(a.ready=!0),a={list:[],size:0,ready:!1,handled:!1},e.push(a)),a&&(s&&s.isPart&&o&&o.isPart?(_e.deepMerge(s,o),a.size+=o.size||1):(a.list.push(o),a.size+=o.size||1))}static cloneTreeNode(e,o){const n=e,{children:i,isMapped:r,minLevel:a,childCount:s,childDeep:l,parent:d,master:b,data:C,state:u,style:j,store:A}=n,p=ge(n,["children","isMapped","minLevel","childCount","childDeep","parent","master","data","state","style","store"]),I=dr(p);return d&&(I.parent=d),b&&(I.master=b),C&&(I.data=dr(C)),u&&(I.state=dr(u)),j&&(I.style=dr(j)),A&&(I.store=dr(A)),!o&&i&&(I.children=i.map(W=>{const q=Yr.cloneTreeNode(W);return q.parent=I,q})),I}static createColumnsTreeServiceBuilder(e,o){return n=>{const i=e.getJaql(),r=e.getRawJaql?e.getRawJaql():F_(i,i.metadata||[]),a=Fn.getMetadataTree(i,He.MEASURES),s=_e.getChildren(a),{preProcessTree:l,modifyTree:d,postProcessTree:b}=$h;let C,u,j=0,A=0;if(_e.hasChildren(n)){n.columnsCount&&n.totalColumnsCount&&(j=n.columnsCount,A=n.totalColumnsCount);const p=l(n,He.COLUMNS,i),I=d(p,He.COLUMNS,i,{originalData:n,applyIndexDivergence:e.applyIndexDivergence});b(I,r,{emitFn:o&&o.emitHeaderCellFormatEvent});const W=_e.wrapInRootNode(I);e.pluginService&&W&&W.children&&e.pluginService.applyToColumns(W.children),C=W,u=new Dc(W),s.length===1&&u.setValueNode(s[0])}else _e.hasChildren(a)?(n.columnsCount&&n.totalColumnsCount&&(j=n.columnsCount,A=n.totalColumnsCount),typeof n.maxChilds=="number"&&(j=n.maxChilds,a.children=_e.getChildren(a).filter((p,I)=>I<n.maxChilds)),e.pluginService&&a.children&&e.pluginService.applyToColumns(a.children),b(_e.getChildren(a),r,{emitFn:o&&o.emitHeaderCellFormatEvent}),C=a,u=new Dc(a)):(e.pluginService&&e.pluginService.resetRowStartFrom(),C=void 0,u=void 0,j=0,A=0);return{columnsTree:C,columnsTreeService:u,columnsCount:j,totalColumnsCount:A}}}static createCornerTreeServiceBuilder(e,o){return()=>{const n=e.getJaql(),i=e.getRawJaql?e.getRawJaql():F_(n,n.metadata||[]),r=Fn.getMetadataTree(n,He.ROWS);let a;if(_e.hasChildren(r)){_e.iterateThroughTree(_e.getChildren(r),l=>{l.userType=Fo.CORNER;const d=Fn.getMetadataPanelByIndex(i,l.jaqlIndex,l.metadataType||"");o&&o.emitHeaderCellFormatEvent&&o.emitHeaderCellFormatEvent(l,d,i)});let s;e.columnsTreeService&&(s=e.columnsTreeService.getTreeDeepsLength()),e.pluginService&&e.pluginService.applyToHeaders(r),a=new Dc(r,!1,s)}return{cornerTree:r,cornerTreeService:a}}}};var m5={exports:{}};/*!
|
|
2
2
|
Copyright (c) 2018 Jed Watson.
|
|
3
3
|
Licensed under the MIT License (MIT), see
|
|
4
4
|
http://jedwatson.github.io/classnames
|
|
@@ -666,7 +666,7 @@ ${r}`)})}destroy(){super.destroy(),this.onMessageCancel&&(this.onMessageCancel()
|
|
|
666
666
|
`)}}),Lz=(t,e,o,n,i,r,a)=>{var s,l;const d=[],b=[];n.seriesValues.forEach(z=>{b.push(z),d.push(z)}),n.rangeValues.forEach(([z,N])=>{b.push(N),d.push(z)});const C=Zt(jt({},n),{y:b,seriesToColorMap:n.seriesToColorMap}),u=Lb(Zt(jt({},t),{type:"cartesian"}),e,o,C,i,r,a),j={};u.options.series.forEach(z=>{j[z.name]=z});const A=Zt(jt({},n),{y:d,seriesToColorMap:n.seriesToColorMap}),p=Lb(Zt(jt({},t.seriesOther),{type:"cartesian"}),e,o,A,i,r,a),I={};p.options.series.forEach(z=>{I[z.name]=z});let W=1/0,q=-1/0,X=-1,H=0;if(u.options.series.forEach((z,N)=>{if(n.breakBy.length===0&&N<n.seriesValues.length)op(z.name)&&(X=mBt(z,I,j)),z.zIndex=1,z.data.forEach(V=>{V.y&&V.y<W&&(W=V.y),V.y&&V.y>q&&(q=V.y)});else{const V=I[z.name].data;z.yAxis=0;let E=0;n.breakBy.length===0&&(E=N-n.seriesValues.length);const x=n.rangeValues[E],g=x[0].column.name.indexOf("_")+1,S=x[1].column.name.substring(g),w=x[0].column.name.substring(g);z.type="arearange",op(z.name)&&gBt(z,I),H=Math.max(z.data.length,H),z.data=z.data.map((P,U)=>{const Z=Zt(jt({},P),{low:V[U].y,high:P.y,y:void 0,upperPointName:S,lowerPointName:w});return Z.low&&Z.low<W&&(W=Z.low),Z.high&&Z.high>q&&(q=Z.high),Z}),op(z.name)&&vBt(z,I)}}),u.options.xAxis||(u.options.xAxis=[]),X>0&&yBt(u.options.xAxis,X,H),e==="arearange"&&o.lineType==="smooth"){const z="areasplinerange";u.options.chart.type=z,(s=u.options.navigator)!=null&&s.series&&(u.options.navigator.series.type=z)}e==="arearange"&&(u.options.tooltip=yFt(!1,n,i));const[D]=(l=u.options.yAxis)!=null?l:[],$=Zt(jt({},D),{min:W,max:q});return u.options.yAxis=[$],u},IY=(t,e)=>{const o=()=>Zt(jt({},t),{y:[]}),n=o(),i=o(),r=1,a=0;t.seriesValues.forEach(d=>{n.y.push(d),i.y.push(d)}),t.rangeValues.forEach(d=>{const b=d[r],C=d[a];n.y.push(b),i.y.push(C)});const s=Xm(n,e),l=Xm(i,e);return Zt(jt({},s),{type:"range",seriesOther:l})},jY=t=>t.rangeValues?!1:t.y.some(e=>op(Vn(e))),$Y=t=>{const e=t.y.filter(i=>op(Vn(i))).map(i=>{const r=Zt(jt({},i),{column:Pp(i.column,{title:i.column.title&&Pb(i.column.title),name:`${i.column.name}_upper`})});return[Zt(jt({},i),{column:Pp(i.column,{title:i.column.title&&Pb(i.column.title),name:`${i.column.name}_lower`})}),r]}),o=e.concat(t.y).flat(),n=t.y;return Zt(jt({},t),{rangeValues:e,seriesValues:n,y:o})},bFt=(t,e)=>{const o=$Y(t);return Zt(jt({},IY(o,e)),{type:"cartesian"})},xFt=(t,e,o,n,i,r,a)=>{switch(t.type){case"range":return Lz(t,e,o,n,i,r,a);case"cartesian":{const s=n,l=jY(s)?Lz(Zt(jt({},t),{type:"range"}),e,o,$Y(s),i,r,a):Lb(t,e,o,s,i,r,a);return xBt(l.options.series),l}case"categorical":return F4t(t,e,o,n,i,r);case"scatter":return uFt(t,e,o,n,r);case"boxplot":return vFt(t,o,n,i,r);default:throw new ze("errors.unexpectedChartType",{chartType:t.type})}},wFt={legend:{enabled:!0,position:"bottom"},navigator:{enabled:!0},markers:{enabled:!1,fill:"filled",size:"small"},seriesLabels:{enabled:!1,rotation:0},xAxis:{enabled:!0,gridLines:!1,isIntervalEnabled:!1,labels:{enabled:!0},logarithmic:!1,title:{enabled:!1,text:"X Axis title"}},yAxis:{enabled:!0,gridLines:!0,isIntervalEnabled:!1,labels:{enabled:!0},logarithmic:!1,title:{enabled:!1,text:"Y Axis title"}},y2Axis:{enabled:!0,gridLines:!0,isIntervalEnabled:!1,labels:{enabled:!0},logarithmic:!1,title:{enabled:!1,text:"Y2 Axis title"}},convolution:{enabled:!1,selectedConvolutionType:"byPercentage",minimalIndependentSlicePercentage:3,independentSlicesCount:7},labels:{categories:!0,enabled:!0,percent:!0,decimals:!1,value:!1}},sh=()=>xr(wFt);function zY(t,e,o){var n,i,r,a;const s=Wu(e,Yzt(o)),l=lh(e??{},sh()),d=Xx(o,t,l);return Zt(jt({},s),{designPerSeries:d,stackType:e.subtype?BY[e.subtype]:NY,showTotal:(i=(n=e.totalLabels)==null?void 0:n.enabled)!=null?i:!1,totalLabelRotation:(a=(r=e.totalLabels)==null?void 0:r.rotation)!=null?a:0})}const BY={"bar/classic":"classic","bar/stacked":"stacked","bar/stacked100":"stack100","column/classic":"classic","column/stackedcolumn":"stacked","column/stackedcolumn100":"stack100"};function FY(t){return"subtype"in t&&t.subtype?Object.keys(BY).includes(t.subtype):!0}var HY=xb?function(t,e){return xb.set(t,e),t}:g1;function qm(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var o=h1(t.prototype),n=t.apply(o,e);return Ai(n)?n:o}}var _Ft=1;function SFt(t,e,o){var n=e&_Ft,i=qm(t);function r(){var a=this&&this!==Hi&&this instanceof r?i:t;return a.apply(n?o:this,arguments)}return r}var CFt=Math.max;function WY(t,e,o,n){for(var i=-1,r=t.length,a=o.length,s=-1,l=e.length,d=CFt(r-a,0),b=Array(l+d),C=!n;++s<l;)b[s]=e[s];for(;++i<a;)(C||i<r)&&(b[o[i]]=t[i]);for(;d--;)b[s++]=t[i++];return b}var TFt=Math.max;function VY(t,e,o,n){for(var i=-1,r=t.length,a=-1,s=o.length,l=-1,d=e.length,b=TFt(r-s,0),C=Array(b+d),u=!n;++i<b;)C[i]=t[i];for(var j=i;++l<d;)C[j+l]=e[l];for(;++a<s;)(u||i<r)&&(C[j+o[a]]=t[i++]);return C}function MFt(t,e){for(var o=t.length,n=0;o--;)t[o]===e&&++n;return n}var UY=$H(HY),kFt=/\{\n\/\* \[wrapped with (.+)\] \*/,AFt=/,? & /;function EFt(t){var e=t.match(kFt);return e?e[1].split(AFt):[]}var PFt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function OFt(t,e){var o=e.length;if(!o)return t;var n=o-1;return e[n]=(o>1?"& ":"")+e[n],e=e.join(o>2?", ":" "),t.replace(PFt,`{
|
|
667
667
|
/* [wrapped with `+e+`] */
|
|
668
668
|
`)}function GY(t,e){var o=t==null?0:t.length;return!!o&&sO(t,e,0)>-1}var LFt=1,NFt=2,DFt=8,RFt=16,IFt=32,jFt=64,$Ft=128,zFt=256,BFt=512,FFt=[["ary",$Ft],["bind",LFt],["bindKey",NFt],["curry",DFt],["curryRight",RFt],["flip",BFt],["partial",IFt],["partialRight",jFt],["rearg",zFt]];function HFt(t,e){return cH(FFt,function(o){var n="_."+o[0];e&o[1]&&!GY(t,n)&&t.push(n)}),t.sort()}function YY(t,e,o){var n=e+"";return gE(t,OFt(n,HFt(EFt(n),o)))}var WFt=1,VFt=2,UFt=4,GFt=8,Nz=32,Dz=64;function XY(t,e,o,n,i,r,a,s,l,d){var b=e&GFt,C=b?a:void 0,u=b?void 0:a,j=b?r:void 0,A=b?void 0:r;e|=b?Nz:Dz,e&=~(b?Dz:Nz),e&UFt||(e&=~(WFt|VFt));var p=[t,e,i,j,C,A,u,s,l,d],I=o.apply(void 0,p);return XM(t)&&UY(I,p),I.placeholder=n,YY(I,t,e)}function qY(t){var e=t;return e.placeholder}var YFt=Math.min;function XFt(t,e){for(var o=t.length,n=YFt(e.length,o),i=p1(t);n--;){var r=e[n];t[n]=Sg(r,o)?i[r]:void 0}return t}var Rz="__lodash_placeholder__";function Rb(t,e){for(var o=-1,n=t.length,i=0,r=[];++o<n;){var a=t[o];(a===e||a===Rz)&&(t[o]=Rz,r[i++]=o)}return r}var qFt=1,ZFt=2,KFt=8,JFt=16,QFt=128,t6t=512;function EO(t,e,o,n,i,r,a,s,l,d){var b=e&QFt,C=e&qFt,u=e&ZFt,j=e&(KFt|JFt),A=e&t6t,p=u?void 0:qm(t);function I(){for(var W=arguments.length,q=Array(W),X=W;X--;)q[X]=arguments[X];if(j)var H=qY(I),D=MFt(q,H);if(n&&(q=WY(q,n,i,j)),r&&(q=VY(q,r,a,j)),W-=D,j&&W<d){var $=Rb(q,H);return XY(t,e,EO,I.placeholder,o,q,$,s,l,d-W)}var z=C?o:this,N=u?z[t]:t;return W=q.length,s?q=XFt(q,s):A&&W>1&&q.reverse(),b&&l<W&&(q.length=l),this&&this!==Hi&&this instanceof I&&(N=p||qm(N)),N.apply(z,q)}return I}function e6t(t,e,o){var n=qm(t);function i(){for(var r=arguments.length,a=Array(r),s=r,l=qY(i);s--;)a[s]=arguments[s];var d=r<3&&a[0]!==l&&a[r-1]!==l?[]:Rb(a,l);if(r-=d.length,r<o)return XY(t,e,EO,i.placeholder,void 0,a,d,void 0,void 0,o-r);var b=this&&this!==Hi&&this instanceof i?n:t;return y1(b,this,a)}return i}var o6t=1;function n6t(t,e,o,n){var i=e&o6t,r=qm(t);function a(){for(var s=-1,l=arguments.length,d=-1,b=n.length,C=Array(b+l),u=this&&this!==Hi&&this instanceof a?r:t;++d<b;)C[d]=n[d];for(;l--;)C[d++]=arguments[++s];return y1(u,i?o:this,C)}return a}var Iz="__lodash_placeholder__",IC=1,i6t=2,r6t=4,jz=8,sf=128,$z=256,a6t=Math.min;function s6t(t,e){var o=t[1],n=e[1],i=o|n,r=i<(IC|i6t|sf),a=n==sf&&o==jz||n==sf&&o==$z&&t[7].length<=e[8]||n==(sf|$z)&&e[7].length<=e[8]&&o==jz;if(!(r||a))return t;n&IC&&(t[2]=e[2],i|=o&IC?0:r6t);var s=e[3];if(s){var l=t[3];t[3]=l?WY(l,s,e[4]):s,t[4]=l?Rb(t[3],Iz):e[4]}return s=e[5],s&&(l=t[5],t[5]=l?VY(l,s,e[6]):s,t[6]=l?Rb(t[5],Iz):e[6]),s=e[7],s&&(t[7]=s),n&sf&&(t[8]=t[8]==null?e[8]:a6t(t[8],e[8])),t[9]==null&&(t[9]=e[9]),t[0]=e[0],t[1]=i,t}var l6t="Expected a function",zz=1,c6t=2,jC=8,$C=16,zC=32,Bz=64,Fz=Math.max;function u6t(t,e,o,n,i,r,a,s){var l=e&c6t;if(!l&&typeof t!="function")throw new TypeError(l6t);var d=n?n.length:0;if(d||(e&=~(zC|Bz),n=i=void 0),a=a===void 0?a:Fz(qM(a),0),s=s===void 0?s:qM(s),d-=i?i.length:0,e&Bz){var b=n,C=i;n=i=void 0}var u=l?void 0:KP(t),j=[t,e,o,n,i,b,C,r,a,s];if(u&&s6t(j,u),t=j[0],e=j[1],o=j[2],n=j[3],i=j[4],s=j[9]=j[9]===void 0?l?0:t.length:Fz(j[9]-d,0),!s&&e&(jC|$C)&&(e&=~(jC|$C)),!e||e==zz)var A=SFt(t,e,o);else e==jC||e==$C?A=e6t(t,e,s):(e==zC||e==(zz|zC))&&!i.length?A=n6t(t,e,o,n):A=EO.apply(void 0,j);var p=u?HY:UY;return YY(p(A,j),t,e)}var d6t=8;function Yx(t,e,o){e=o?void 0:e;var n=u6t(t,d6t,void 0,void 0,void 0,void 0,void 0,e);return n.placeholder=Yx.placeholder,n}Yx.placeholder={};const p6t=600,h6t=300,ZY=(t,e,o)=>{const n={duration:e.chart.animation.init.duration==="auto"?p6t:e.chart.animation.init.duration},i={duration:e.chart.animation.redraw.duration==="auto"?h6t:e.chart.animation.redraw.duration};return zn(t,{accessibility:{enabled:o},chart:{animation:i},plotOptions:{series:{animation:n}},boost:{useGPUTranslations:!0,usePreAllocated:!0}})};function f6t(t,e){return o=>ZY(o,t,e)}function wy(t){return t===null}const KY=(t,e,{onDataPointClick:o,onDataPointContextMenu:n,onDataPointsSelected:i}={})=>{var r;const a={chart:{events:{}},plotOptions:{series:{point:{events:{click:()=>{}}}}}};return i&&(a.chart.zoomType="x",["scatter","bubble"].includes((r=t.chart)==null?void 0:r.type)&&(a.chart.zoomType="xy"),a.chart.events.selection=s=>{s.preventDefault();const{xAxis:l,yAxis:d,originalEvent:b}=s,C=g6t(l[0],d[0]);C.forEach(u=>{u.state=""}),i(C.map(u=>NC(u,e)),b)}),o&&(a.plotOptions.series.point.events.click=s=>{s.point.state="hover",o(NC(s.point,e),s)}),n&&(a.plotOptions.series.point.events.contextmenu=s=>{s.preventDefault(),n(NC(s.point,e),s)}),ta(t,a)};function m6t(t,{onDataPointClick:e,onDataPointContextMenu:o,onDataPointsSelected:n}={}){return i=>KY(i,t,{onDataPointClick:e,onDataPointContextMenu:o,onDataPointsSelected:n})}const g6t=(t,e)=>{const o=t.axis.series.flatMap(i=>i.points).filter(({x:i,y:r})=>{const a=i>=t.min&&i<=t.max,s=!wy(r);return a&&s});if(!e)return o;const n=e.axis.series.flatMap(i=>i.points).filter(({y:i})=>i>=e.min&&i<=e.max);return o.filter(i=>n.includes(i))},JY=(t,e)=>{var o;if(!e)return t;const n={backgroundColor:e.chart.backgroundColor},i={style:{fontFamily:e.typography.fontFamily}},r={itemStyle:{color:e.chart.textColor,fontFamily:e.typography.fontFamily}},a={series:{dataLabels:{style:{color:e.chart.textColor,fontFamily:e.typography.fontFamily}}}},s={activeDataLabelStyle:{color:e.chart.textColor},breadcrumbs:{buttonTheme:{fill:e.general.brandColor,stroke:e.general.brandColor,style:{color:e.general.primaryButtonTextColor},states:{hover:{fill:e.general.primaryButtonHoverColor,stroke:e.general.primaryButtonHoverColor}}}}},l={chart:n,tooltip:i,legend:r,plotOptions:a,drilldown:s},d={labels:{style:{color:e.chart.textColor,fontFamily:e.typography.fontFamily}},title:{style:{color:e.chart.textColor,fontFamily:e.typography.fontFamily}}},b={color:e==null?void 0:e.chart.backgroundColor,label:{style:{color:e.chart.textColor,fontFamily:e.typography.fontFamily}}},C=zn(t,l);return C.xAxis=(o=C.xAxis)==null?void 0:o.map(u=>{var j;return u.plotBands=(j=u.plotBands)==null?void 0:j.map(A=>zn(A,Zt(jt({},b),{color:A.color||(e==null?void 0:e.chart.backgroundColor)}))),zn(u,d)}),C.yAxis&&(C.yAxis=C.yAxis.map(u=>{var j;return u.plotBands=(j=u.plotBands)==null?void 0:j.map(A=>zn(A,Zt(jt({},b),{color:A.color||(e==null?void 0:e.chart.backgroundColor)}))),zn(u,d)})),C};function v6t(t){return e=>JY(e,t)}function y6t({highchartsOptionsBuilder:t,chartData:e,dataOptions:o,designOptions:n,extraConfig:i,dataPointsEventHandlers:r,onBeforeRender:a}){const s={chartData:e,dataOptions:o,designOptions:n,extraConfig:i};return ih(f6t(i.themeSettings,i.accessibilityEnabled),m6t(o,r),v6t(i.themeSettings),b6t(a))(jt(Zt(jt({chart:t.getChart(s),series:t.getSeries(s)},t.getAxes(s)),{legend:t.getLegend(s),plotOptions:t.getPlotOptions(s),tooltip:t.getTooltip(s)}),t.getExtras(s)))}function b6t(t){return t||(e=>e)}function QY(t,e,o){o=typeof o=="function"?o:void 0;var n=o?o(t,e):void 0;return n===void 0?Ag(t,e,void 0,o):!!n}var tX={exports:{}};(function(t,e){(function(o,n){t.exports=n(Kt)})(typeof self<"u"?self:Zc,function(o){return function(n){function i(a){if(r[a])return r[a].exports;var s=r[a]={i:a,l:!1,exports:{}};return n[a].call(s.exports,s,s.exports,i),s.l=!0,s.exports}var r={};return i.m=n,i.c=r,i.d=function(a,s,l){i.o(a,s)||Object.defineProperty(a,s,{configurable:!1,enumerable:!0,get:l})},i.n=function(a){var s=a&&a.__esModule?function(){return a.default}:function(){return a};return i.d(s,"a",s),s},i.o=function(a,s){return Object.prototype.hasOwnProperty.call(a,s)},i.p="",i(i.s=0)}([function(n,i,r){function a(){return a=Object.assign?Object.assign.bind():function(q){for(var X=1;X<arguments.length;X++){var H=arguments[X];for(var D in H)Object.prototype.hasOwnProperty.call(H,D)&&(q[D]=H[D])}return q},a.apply(this,arguments)}function s(q){return C(q)||b(q)||d(q)||l()}function l(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
669
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d(q,X){if(q){if(typeof q=="string")return u(q,X);var H=Object.prototype.toString.call(q).slice(8,-1);return H==="Object"&&q.constructor&&(H=q.constructor.name),H==="Map"||H==="Set"?Array.from(q):H==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(H)?u(q,X):void 0}}function b(q){if(typeof Symbol<"u"&&q[Symbol.iterator]!=null||q["@@iterator"]!=null)return Array.from(q)}function C(q){if(Array.isArray(q))return u(q)}function u(q,X){(X==null||X>q.length)&&(X=q.length);for(var H=0,D=new Array(X);H<X;H++)D[H]=q[H];return D}function j(q){"@babel/helpers - typeof";return(j=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(X){return typeof X}:function(X){return X&&typeof Symbol=="function"&&X.constructor===Symbol&&X!==Symbol.prototype?"symbol":typeof X})(q)}Object.defineProperty(i,"__esModule",{value:!0}),r.d(i,"HighchartsReact",function(){return W});var A=r(1),p=r.n(A),I=typeof window<"u"?A.useLayoutEffect:A.useEffect,W=Object(A.memo)(Object(A.forwardRef)(function(q,X){var H=Object(A.useRef)(),D=Object(A.useRef)(),$=Object(A.useRef)(q.constructorType),z=Object(A.useRef)(q.highcharts);return I(function(){function N(){var E=q.highcharts||(typeof window>"u"?"undefined":j(window))==="object"&&window.Highcharts,x=q.constructorType||"chart";E?E[x]?q.options?D.current=E[x](H.current,q.options,q.callback):console.warn('The "options" property was not passed.'):console.warn('The "constructorType" property is incorrect or some required module is not imported.'):console.warn('The "highcharts" property was not passed.')}if(D.current){if(q.allowChartUpdate!==!1)if(q.constructorType!==$.current||q.highcharts!==z.current)$.current=q.constructorType,z.current=q.highcharts,N();else if(!q.immutable&&D.current){var V;(V=D.current).update.apply(V,[q.options].concat(s(q.updateArgs||[!0,!0])))}else N()}else N()},[q.options,q.allowChartUpdate,q.updateArgs,q.containerProps,q.highcharts,q.constructorType]),I(function(){return function(){D.current&&(D.current.destroy(),D.current=null)}},[]),Object(A.useImperativeHandle)(X,function(){return{get chart(){return D.current},container:H}},[]),p.a.createElement("div",a({},q.containerProps,{ref:H}))}));i.default=W},function(n,i){n.exports=o}])})})(tX);var x6t=tX.exports;const w6t=fa(x6t);function PO(t){const e=Yt(void 0);return ae(()=>{e.current=t},[t]),e.current}var eX={exports:{}};(function(t){(function(e){t.exports?t.exports=e:e(Highcharts)})(function(e){var o=e.relativeLength;e.wrap(e.seriesTypes.column.prototype,"translate",function(n){var i=this.options,r=i.topMargin||0,a=i.bottomMargin||0;n.call(this),this.points.forEach(function(s){var l=s.shapeArgs,d=l.width,b=l.height,C=l.x,u=l.y,j=o(i.borderRadiusTopLeft||0,d),A=o(i.borderRadiusTopRight||0,d),p=o(i.borderRadiusBottomRight||0,d),I=o(i.borderRadiusBottomLeft||0,d);if(j||A||p||I){var W=Math.min(d,b)/2;j>W&&(j=W),A>W&&(A=W),p>W&&(p=W),I>W&&(I=W),s.dlBox=s.shapeArgs,s.shapeType="path",s.shapeArgs={d:[["M",C+j,u+r],["L",C+d-A,u+r],["C",C+d-A/2,u,C+d,u+A/2,C+d,u+A],["L",C+d,u+b-p],["C",C+d,u+b-p/2,C+d-p/2,u+b,C+d-p,u+b+a],["L",C+I,u+b+a],["C",C+I/2,u+b,C,u+b-I/2,C,u+b-I],["L",C,u+j],["C",C,u+j/2,C+j/2,u,C+j,u],["Z"]]}}})})})})(eX);var _6t=eX.exports;const S6t=fa(_6t),C6t=()=>{(function(t){t.seriesTypes.line.prototype.drawLegendSymbol=t.seriesTypes.area.prototype.drawLegendSymbol,qs.wrap(qs.Series.types.treemap.prototype,"pointAttribs",function(e,...o){var n;const i=e.call(this,...o),r=o[0];return(n=r.options.custom)!=null&&n.blur&&(i.fill=qs.color(r.color).setOpacity(.2).get("rgba"),i.stroke=qs.color(i.stroke).setOpacity(.2).get("rgba")),i})})(qs),function(t){t.Point.prototype.importEvents=function(){const e=this;this.importedEvents&&this.importedEvents.forEach(function(i){i()}),this.importedEvents=[];const o=t.merge(e.series.options.point,e.options),n=o.events;e.events=n,t.objectEach(n,function(i,r){t.isFunction(i)&&e.importedEvents.push(t.addEvent(e,r,i))})}}(qs),S6t(qs)};C6t();const oX=Au(function({options:t}){var e,o,n,i,r,a;const s=PO(t),l=me(p=>{var I,W,q,X,H,D,$,z;const N=t;!((X=(q=(W=(I=N==null?void 0:N.plotOptions)==null?void 0:I.series)==null?void 0:W.point)==null?void 0:q.events)!=null&&X.click)&&!((z=($=(D=(H=N==null?void 0:N.plotOptions)==null?void 0:H.series)==null?void 0:D.point)==null?void 0:$.events)!=null&&z.contextmenu)&&(p.container.onclick=null)},[t]),d=p=>p==null?void 0:p.some(({data:I})=>I.some(W=>!!W.marker)),b=(s==null?void 0:s.xAxis)&&(t==null?void 0:t.xAxis)&&((e=s==null?void 0:s.xAxis[0])==null?void 0:e.type)!==((o=t==null?void 0:t.xAxis[0])==null?void 0:o.type),C=!!s&&((n=s==null?void 0:s.navigator)==null?void 0:n.enabled)!==((i=t==null?void 0:t.navigator)==null?void 0:i.enabled),u=d(s==null?void 0:s.series)&&!d(t==null?void 0:t.series),j=!!s&&((r=s==null?void 0:s.chart)==null?void 0:r.type)!==((a=t==null?void 0:t.chart)==null?void 0:a.type),A=b||C||j||u;return Bt(w6t,{highcharts:qs,options:xr(t),containerProps:{style:{height:"100%",width:"100%"}},immutable:A,callback:l})},(t,e)=>QY(t,e,(o,n)=>sl(o)&&sl(n)?o.toString()===n.toString():void 0)),T6t="_alert_box_10ttx_1",M6t="_content_10ttx_8",k6t="_alert_10ttx_1",BC={alert_box:T6t,content:M6t,alert:k6t},nX=({alerts:t=[]})=>Bt("div",{className:BC.alert_box,children:Bt("div",{className:BC.content,children:[...new Set(t)].map((e,o)=>Bt("div",{className:BC.alert,children:e},`alert-${o}`))})}),A6t=t=>["column","bar"].includes(t);function iX({highchartsOptionsBuilder:t,getAlerts:e}){return function({chartData:o,dataOptions:n,designOptions:i,onDataPointClick:r,onDataPointContextMenu:a,onDataPointsSelected:s,onBeforeRender:l}){var d;const{app:b}=Xn(),{t:C}=Fi(),{themeSettings:u}=En(),j=me((W,q)=>Gg(W,q,b==null?void 0:b.settings.locale,b==null?void 0:b.settings.dateConfig),[b==null?void 0:b.settings.dateConfig,b==null?void 0:b.settings.locale]),A=he(()=>{var W;return{translate:C,themeSettings:u,dateFormatter:j,accessibilityEnabled:((W=b==null?void 0:b.settings.accessibilityConfig)==null?void 0:W.enabled)||!1}},[C,u,j,(d=b==null?void 0:b.settings.accessibilityConfig)==null?void 0:d.enabled]),p=he(()=>y6t({highchartsOptionsBuilder:t,chartData:o,dataOptions:n,designOptions:i,dataPointsEventHandlers:{onDataPointClick:r,onDataPointContextMenu:a,onDataPointsSelected:s},extraConfig:A,onBeforeRender:l}),[o,n,i,r,a,s,A,l]),I=e({chartData:o,dataOptions:n,designOptions:i,extraConfig:A});return p&&We("div",{"aria-label":"chart-root",style:{display:"flex",justifyContent:"center",height:"100%",width:"100%"},children:[!!I.length&&Bt(nX,{alerts:I}),Bt(oX,{options:p})]})}}function rX(t){return!!t.chartData&&!!t.chartType&&A6t(t.chartType)}var E6t="[object String]";function OO(t){return typeof t=="string"||!Ho(t)&&er(t)&&$a(t)==E6t}const aX=t=>{const{chartData:e,designOptions:o}=t,{seriesCapacity:n,categoriesCapacity:i}=o.dataLimits,r=e.xValues.length>i?Ob("x",e.xValues.length,i):null,a=e.series.length>n?xu(e.series.length,n):null;return[r,a].filter(OO)},pr=(t,e)=>Lb(t.chartData,e,t.designOptions,t.dataOptions,t.extraConfig.translate,t.extraConfig.themeSettings,t.extraConfig.dateFormatter).options,P6t={getChart:function(t){return pr(t,"bar").chart},getSeries:function(t){return pr(t,"bar").series},getAxes:function(t){const{xAxis:e,yAxis:o}=pr(t,"bar");return{xAxis:e,yAxis:o}},getLegend:function(t){return pr(t,"bar").legend},getPlotOptions:function(t){return pr(t,"bar").plotOptions},getTooltip:function(t){return pr(t,"bar").tooltip},getExtras:function(t){const e=pr(t,"bar");return w1(e,["chart","series","xAxis","yAxis","legend","plotOptions","tooltip"])}},O6t={dataOptions:{translateDataOptionsToInternal:CO,getAttributes:oY,getMeasures:nY,isCorrectDataOptions:iY,isCorrectDataOptionsInternal:rY},data:{loadData:fO,getChartData:pY},designOptions:{translateStyleOptionsToDesignOptions:Yx(zY)("bar"),isCorrectStyleOptions:FY},renderer:{ChartRendererComponent:iX({highchartsOptionsBuilder:P6t,getAlerts:aX}),isCorrectRendererProps:rX}},L6t={getChart:function(t){return pr(t,"column").chart},getSeries:function(t){return pr(t,"column").series},getAxes:function(t){const{xAxis:e,yAxis:o}=pr(t,"column");return{xAxis:e,yAxis:o}},getLegend:function(t){return pr(t,"column").legend},getPlotOptions:function(t){return pr(t,"column").plotOptions},getTooltip:function(t){return pr(t,"column").tooltip},getExtras:function(t){const e=pr(t,"column");return w1(e,["chart","series","xAxis","yAxis","legend","plotOptions","tooltip"])}},N6t={dataOptions:{translateDataOptionsToInternal:CO,getAttributes:oY,getMeasures:nY,isCorrectDataOptions:iY,isCorrectDataOptionsInternal:rY},data:{loadData:fO,getChartData:pY},designOptions:{translateStyleOptionsToDesignOptions:Yx(zY)("column"),isCorrectStyleOptions:FY},renderer:{ChartRendererComponent:iX({highchartsOptionsBuilder:L6t,getAlerts:aX}),isCorrectRendererProps:rX}},D6t={areamap:Uzt,column:N6t,bar:O6t};function e0(t){const e=D6t[t];if(e)return e;throw new Error(`Unsupported chart type: ${t}`)}function o0(t){return["areamap","column","bar"].includes(t)}function sX(t,e,o){for(var n=-1,i=e.length,r={};++n<i;){var a=e[n],s=m1(t,a);o(s,a)&&gG(r,Gp(a,t),s)}return r}function R6t(t,e){return sX(t,e,function(o,n){return PH(t,n)})}var I6t=x1(function(t,e){return t==null?{}:R6t(t,e)});const j6t=Object.freeze({"area/basic":{lineType:"straight",stackType:"classic"},"area/stacked":{lineType:"straight",stackType:"stacked"},"area/stacked100":{lineType:"straight",stackType:"stack100"},"area/spline":{lineType:"smooth",stackType:"classic"},"area/stackedspline":{lineType:"smooth",stackType:"stacked"},"area/stackedspline100":{lineType:"smooth",stackType:"stack100"},"arearange/basic":{lineType:"straight",stackType:"classic"},"arearange/spline":{lineType:"smooth",stackType:"classic"},"bar/classic":{stackType:"classic"},"bar/stacked":{stackType:"stacked"},"bar/stacked100":{stackType:"stack100"},"column/classic":{stackType:"classic"},"column/stackedcolumn":{stackType:"stacked"},"column/stackedcolumn100":{stackType:"stack100"},"line/basic":{lineType:"straight"},"line/spline":{lineType:"smooth"},"line/step":{lineType:"straight"},"pie/classic":{pieType:"classic"},"pie/donut":{pieType:"donut"},"pie/ring":{pieType:"ring"},"polar/column":{polarType:"column"},"polar/area":{polarType:"area"},"polar/line":{polarType:"line"},"indicator/numeric":{indicatorType:"numeric"},"indicator/gauge":{indicatorType:"gauge"},treemap:{},sunburst:{},"boxplot/full":{boxplotType:"full"},"boxplot/hollow":{boxplotType:"hollow"},scattermap:{},"areamap/world":{mapType:"world"},"areamap/usa":{mapType:"usa"}});function $6t(t){let e;switch(t.subtype){case"indicator/numeric":e=jt({indicatorType:"numeric",numericSubtype:t.numericSubtype},t.numericSubtype==="numericSimple"?{skin:t.skin}:null);break;case"indicator/gauge":e=jt({indicatorType:"gauge",skin:t.skin},t.tickerBarHeight?{tickerBarHeight:t.tickerBarHeight}:null);break}return Zt(jt(jt({},Ea),e),{indicatorComponents:t.indicatorComponents||Ea.indicatorComponents,forceTickerView:!!t.forceTickerView})}const z6t=(t,e,o)=>{const n="y"in o&&Array.isArray(o.y)?o.y.some(s=>s.showOnRightAxis):!1;let i;switch(t){case"area":i=S4t(e,o,n);break;case"arearange":case"line":i=_4t(e,o,n);break;case"pie":i=k4t(e);break;case"funnel":i=A4t(e);break;case"treemap":i=E4t(e);break;case"sunburst":i=P4t(e);break;case"polar":i=L4t(e,o);break;case"indicator":i=$6t(e);break;case"scatter":i=D4t(e);break;case"boxplot":i=R4t(e);break;case"scattermap":i=j4t(e);break;default:throw new ze("errors.chartTypeNotSupported",{chartType:t})}const r="subtype"in e&&e.subtype?e.subtype:"line/basic",a=j6t[r];return jt(jt({},i),a)};function B6t(t,e,o){const n=lh(o??{},sh());if(o0(t)){const i=e0(t);if(!i.designOptions.isCorrectStyleOptions(n))throw new ze("errors.optionsTranslation.invalidStyleOptions",{chartType:t});if(!i.dataOptions.isCorrectDataOptionsInternal(e))throw new ze("errors.optionsTranslation.invalidInternalDataOptions",{chartType:t});return i.designOptions.translateStyleOptionsToDesignOptions(n,e)}else return z6t(t,n,e)}function lh(t,e){return zn.withOptions({mergeArrays:!1},e,t)}function Xx(t,e,o){return F6t(t).map(n=>{const i=n.seriesId,r=n.seriesStyleOptions,a=w4t(e,lh(r,o));return{seriesId:i,designOptions:I6t(a,["lineWidth","marker"])}}).reduce((n,{seriesId:i,designOptions:r})=>Zt(jt({},n),{[i]:r}),{})}function F6t(t){return t.y.filter(H6t).map(({column:{name:e},seriesStyleOptions:o})=>({seriesId:e,seriesStyleOptions:o}))}function H6t(t){return t.seriesStyleOptions!==void 0}const W6t=t=>Fa(t)?"cartesian":Cc(t)?"categorical":Ia(t)?"scatter":Hu(t)?"scattermap":rh(t)?"indicator":lO(t)?"areamap":Tc(t)?"boxplot":"table";var V6t=Object.defineProperty,U6t=Object.defineProperties,G6t=Object.getOwnPropertyDescriptors,Ib=Object.getOwnPropertySymbols,lX=Object.prototype.hasOwnProperty,cX=Object.prototype.propertyIsEnumerable,Js=Math.pow,gk=(t,e,o)=>e in t?V6t(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,Lt=(t,e)=>{for(var o in e||(e={}))lX.call(e,o)&&gk(t,o,e[o]);if(Ib)for(var o of Ib(e))cX.call(e,o)&&gk(t,o,e[o]);return t},Vt=(t,e)=>U6t(t,G6t(e)),vk=t=>typeof t=="symbol"?t:t+"",Ae=(t,e)=>{var o={};for(var n in t)lX.call(t,n)&&e.indexOf(n)<0&&(o[n]=t[n]);if(t!=null&&Ib)for(var n of Ib(t))e.indexOf(n)<0&&cX.call(t,n)&&(o[n]=t[n]);return o},_y=(t,e,o)=>(gk(t,typeof e!="symbol"?e+"":e,o),o),Ha=(t,e,o)=>new Promise((n,i)=>{var r=l=>{try{s(o.next(l))}catch(d){i(d)}},a=l=>{try{s(o.throw(l))}catch(d){i(d)}},s=l=>l.done?n(l.value):Promise.resolve(l.value).then(r,a);s((o=o.apply(t,e)).next())});function Y6t(t){let{i18n:e,defaultNS:o,children:n}=t;const i=he(()=>({i18n:e,defaultNS:o}),[e,o]);return Re(nH.Provider,{value:i},n)}function dc(t){return t===void 0||typeof t=="string"||"title"in t&&"type"in t}const Qi={BOX_MIN_VALUE_NAME:"Box Min",BOX_MEDIAN_VALUE_NAME:"Box Median",BOX_MAX_VALUE_NAME:"Box Max",WHISKER_MIN_VALUE_NAME:"Whisker Min",WHISKER_MAX_VALUE_NAME:"Whisker Max",OUTLIER_COUNT_VALUE_NAME:"Outlier Count",OUTLIER_MIN_VALUE_NAME:"Outlier Min",OUTLIER_MAX_VALUE_NAME:"Outlier Max"};function LO(t){return[ji(Qi.BOX_MIN_VALUE_NAME,"QUARTILE([Attr], 1)",{Attr:t}),ji(Qi.BOX_MEDIAN_VALUE_NAME,"MEDIAN([Attr])",{Attr:t}),ji(Qi.BOX_MAX_VALUE_NAME,"QUARTILE([Attr], 3)",{Attr:t})]}function X6t(t){return[...LO(t),ji(Qi.WHISKER_MIN_VALUE_NAME,"LOWERWHISKERMAX_IQR([Attr])",{Attr:t}),ji(Qi.WHISKER_MAX_VALUE_NAME,"UPPERWHISKERMIN_IQR([Attr])",{Attr:t}),ji(Qi.OUTLIER_COUNT_VALUE_NAME,"OUTLIERSCOUNT_IQR([Attr])",{Attr:t})]}function q6t(t){return[...LO(t),ji(Qi.WHISKER_MIN_VALUE_NAME,"MIN([Attr])",{Attr:t}),ji(Qi.WHISKER_MAX_VALUE_NAME,"MAX([Attr])",{Attr:t})]}function Z6t(t){return[...LO(t),ji(Qi.WHISKER_MIN_VALUE_NAME,"LOWERWHISKERMAX_STDEVP([Attr])",{Attr:t}),ji(Qi.WHISKER_MAX_VALUE_NAME,"UPPERWHISKERMIN_STDEVP([Attr])",{Attr:t}),ji(Qi.OUTLIER_COUNT_VALUE_NAME,"OUTLIERSCOUNT_STDEVP([Attr])",{Attr:t})]}const K6t=WH(t=>{const e=xr(t),o=ji(Qi.OUTLIER_MAX_VALUE_NAME,"(UPPERWHISKERMIN_IQR([Attr]), all([Attr]))",{Attr:t}),n=ji(Qi.OUTLIER_MIN_VALUE_NAME,"(LOWERWHISKERMAX_IQR([Attr]), all([Attr]))",{Attr:t});return e.name=`${e.name} (Outliers)`,e.jaql=i=>{const r=Object.assign(Object.assign({},t.jaql(!0)),{filter:{or:[{fromNotEqual:o.jaql(!0)},{toNotEqual:n.jaql(!0)}]}});return i?r:{jaql:r}},e},"boxWhiskerIqrOutliers"),J6t=WH(t=>{const e=xr(t),o=ji(Qi.OUTLIER_MAX_VALUE_NAME,"(UPPERWHISKERMIN_STDEVP([Attr]), all([Attr]))",{Attr:t}),n=ji(Qi.OUTLIER_MIN_VALUE_NAME,"(LOWERWHISKERMAX_STDEVP([Attr]), all([Attr]))",{Attr:t});return e.jaql=i=>{const r=Object.assign(Object.assign({},t.jaql(!0)),{filter:{or:[{fromNotEqual:o.jaql(!0)},{toNotEqual:n.jaql(!0)}]}});return i?r:{jaql:r}},e},"boxWhiskerStdDevOutliers");function Zm(t){return!!t&&"operator"in t&&(t.operator==="AND"||t.operator==="OR")&&!!t.right&&!!t.left}function uX(t=[],e=[]){if(!Zm(t)&&!Zm(e))return ea(t,e);const{filters:o,relations:n}=Km(t),i=NO(e),r=ea(o,i),a=im(o,n,r);return nm(r,a)}function Km(t){if(!t)return{filters:[],relations:null};if(Ho(t))return{filters:t,relations:null};const e=new Set;function o(i){if(dX(i))return e.add(i),{instanceid:i.config.guid};if(Zm(i)){const r=o(i.left),a=o(i.right);return{left:r,right:a,operator:i.operator}}throw new Kx}const n=o(t);return{filters:Array.from(e),relations:n}}function NO(t){return t?Km(t).filters:[]}function nm(t,e){if(!e||DO(e))return t;const o=n(e);return dX(o)?[o]:o;function n(i){if(qx(i))return t.find(r=>r.config.guid===i.instanceid);if(Zx(i))return(i.operator==="AND"?Gf.and:Gf.or)(n(i.left),n(i.right));throw new Kx}}function DO(t){return!!t&&"instanceid"in t}function im(t,e,o){if(e===null)return null;const n=tHt(t,o);return n.length===0?e:n.reduce((i,r)=>{switch(r.type){case"add":return eHt(r.payload,i);case"remove":return yk(r.payload,i)}},e)}function Hz(t,e){return t.config.guid===e.config.guid}function Q6t(t,e,o){if(!t)return null;return n(t);function n(i){if(qx(i))return i.instanceid===e.config.guid?{instanceid:o.config.guid}:i;if(Zx(i))return{left:n(i.left),right:n(i.right),operator:i.operator};throw new Kx}}function tHt(t,e){const o=[],n=[...t],i=[...e];return n.forEach(r=>{i.some(a=>Hz(r,a))||o.push({type:"remove",payload:r})}),i.forEach(r=>{n.some(a=>Hz(r,a))||o.push({type:"add",payload:r})}),o}function eHt(t,e){return e?{left:e,right:{instanceid:t.config.guid},operator:"AND"}:{instanceid:t.config.guid}}function yk(t,e){if(!e)return null;if(DO(e))return e.instanceid===t.config.guid?null:e;const o=yk(t,e.left),n=yk(t,e.right);return o===null&&n?n:n===null&&o?o:o===null&&n===null?null:{left:o,right:n,operator:e.operator}}function oHt(t,e){if(!t)return null;function o(n){if(nHt(n))return{instanceid:n.instanceId};if(iHt(n))return o(n.value);if(rHt(n))return{operator:n.operator,left:o(n.left),right:o(n.right)};if(aHt(n)){const i=e.find(r=>{if(!vc(r))return!1;const a=r.filters.map(s=>s.config.guid);return n.levels.every(s=>a.includes(s.instanceId))});if(i)return{instanceid:i.config.guid};throw new Error("Broken filter relations model. Cascading filter not found.")}throw new Error("Broken filter relations model. Unknown node type.")}return o(t)}function nHt(t){return"instanceId"in t}function iHt(t){return"value"in t}function rHt(t){return"operator"in t}function aHt(t){return"levels"in t&&Ho(t.levels)}function qx(t){return"instanceid"in t}function Zx(t){return"operator"in t}function dX(t){return"config"in t&&"guid"in t.config}function sHt(t,e){if(!t)return;function o(n){if(qx(n)){const i=e.find(r=>r.config.guid===n.instanceid);return i&&vc(i)?{type:"CascadingIdentifier",levels:i.filters.map(r=>({type:"Identifier",instanceId:r.config.guid}))}:{type:"Identifier",instanceId:n.instanceid}}else{if(Zx(n))return{type:"LogicalExpression",operator:n.operator,left:o(n.left),right:o(n.right)};throw new Error("Unknown node type in filter relations rules.")}}return o(t)}function lHt(t,e){return t.find(o=>o.config.guid===e)}class Kx extends Error{constructor(){super("Broken filter relations. Unknown node type.")}}function cHt(t){return t.nodeType==="openBracket"}function uHt(t){return t.nodeType==="closeBracket"}function dHt(t){return t.nodeType==="attribute"}function pHt(t){return t.nodeType==="operator"}function Jm(t){if(vc(t))return t.filters.map(Jm).join("-");const{attribute:e}=t,o=t.jaql().jaql,n=e.expression||o.dim,i=e.granularity||((o==null?void 0:o.datatype)==="datetime"?pp.translateJaqlToGranularity(o):"");return`${n}${i}`}function ea(t=[],e=[]){const o=[...t];return e.forEach(n=>{const i=o.findIndex(r=>Jm(n)===Jm(r));i!==-1?o[i]=n:o.push(n)}),o}function hHt(t){if(!t)return t;const e=xr(t);function o(n){if("instanceId"in n)return{instanceid:n.instanceId};if("value"in n)return o(n.value);if("operator"in n){const i={operator:n.operator};return"left"in n&&(i.left=o(n.left)),"right"in n&&(i.right=o(n.right)),i}return n}return o(e)}function fHt(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function bk(t,e){return bk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,n){return o.__proto__=n,o},bk(t,e)}const Lf={none:"None",small:"Small",medium:"Medium",large:"Large",left:"Left",center:"Center",right:"Right",light:"Light",dark:"Dark"};function pX(t,e,o){const n={chart:{textColor:t.dashboards.widgetTextColor,backgroundColor:t.dashboards.widgetBackgroundColor,secondaryTextColor:t.dashboards.widgetSecondaryTextColor,animation:{init:{duration:"auto"},redraw:{duration:"auto"}}},typography:{fontFamily:t.typography.fontFamily,primaryTextColor:t.typography.primaryTextColor,secondaryTextColor:t.typography.secondaryTextColor,fontsLoader:{fonts:mHt(t.typography.fontFamily,o,t.typography.customFontSelected)}},palette:{variantColors:e.colors},general:{brandColor:t.general.brandColor,backgroundColor:t.general.backgroundColor,primaryButtonTextColor:t.general.primaryButtonTextColor,primaryButtonHoverColor:t.general.primaryButtonHoverColor,popover:bb().general.popover,buttons:{cancel:{backgroundColor:{default:t.general.secondaryButtonBaseColor,hover:t.general.secondaryButtonHoverColor,focus:t.general.secondaryButtonHoverColor},textColor:t.general.secondaryButtonTextColor}}},widget:{spaceAround:Lf[t.dashboards.widgetSpacing],cornerRadius:Lf[t.dashboards.widgetCornerRadius],shadow:Lf[t.dashboards.widgetShadow],border:t.dashboards.widgetBorderEnabled,borderColor:t.dashboards.widgetBorderColor,header:{titleTextColor:t.dashboards.widgetTitleColor,titleAlignment:Lf[t.dashboards.widgetTitleAlignment],titleFontSize:YP,dividerLine:t.dashboards.widgetTitleDividerEnabled,dividerLineColor:t.dashboards.widgetTitleDividerColor,backgroundColor:t.dashboards.widgetTitleBackgroundColor}},dashboard:{backgroundColor:t.dashboards.layoutBackgroundColor,dividerLineWidth:UP,dividerLineColor:VP,borderWidth:kp,borderColor:GP},filter:{panel:{titleColor:t.dashboards.panelTitleTextColor,backgroundColor:t.dashboards.panelBackgroundColor,borderWidth:kp,borderColor:RU}}};return zn.withOptions({mergeArrays:!1},bb(),n)}function hX(t){return t.dashboards.colorPaletteName}function mHt(t,e,o){const n=o?"fonts/":"resources/base/fonts/";return[{fontFamily:t,fontWeight:"normal",fontStyle:"normal",src:[{url:`${e}${n}${t}-Regular.eot`},{local:`${t}-Regular`},{url:`${e}${n}${t}-Regular.eot?#iefix`,format:"embedded-opentype"},{url:`${e}${n}${t}-Regular.ttf`,format:"truetype"}]},{fontFamily:t,fontWeight:600,fontStyle:"normal",src:[{url:`${e}${n}${t}-SemiBold.eot`},{local:`${t}-SemiBold`},{url:`${e}${n}${t}-SemiBold.eot?#iefix`,format:"embedded-opentype"},{url:`${e}${n}${t}-SemiBold.ttf`,format:"truetype"}]},{fontFamily:t,fontWeight:"bold",fontStyle:"normal",src:[{url:`${e}${n}${t}-Bold.eot`},{local:`${t}-Bold`},{url:`${e}${n}${t}-Bold.eot?#iefix`,format:"embedded-opentype"},{url:`${e}${n}${t}-Bold.ttf`,format:"truetype"}]}]}function fX(t,e){return Ha(this,null,function*(){const o=yield gHt(t,e);if(!o)throw new ze("errors.themeNotFound",{themeOid:t});const n=hX(o),i=yield mX(n,e);return pX(o,i,e.url)})}function gHt(t,e){return Ha(this,null,function*(){return e.get(`api/v1/themes/${t}`).catch(()=>{throw new ze("errors.themeNotFound",{themeOid:t})})})}function mX(t,e){return Ha(this,null,function*(){const o=yield e.get(`api/palettes/${t}`);if(o&&"status"in o&&o.status==="error")throw new ze("errors.paletteNotFound",{paletteName:t});return o})}const vHt={sdkComponentInit:{internal:!0,external:!0},sdkHookInit:{internal:!0,external:!0},sdkError:{internal:!0,external:!1},sdkCliExec:{internal:!0,external:!1},sdkAngularServiceMethodExecuted:{internal:!0,external:!0}},Wz="composesdk",gX=(t,e,o,n=!1)=>{const i=Object.assign({action:t,cat:Wz,eventType:"product",direct:!0},e);return n&&(process.env.NODE_ENV==="development"||process.env.NODE_ENV==="test")?(console.debug("DEBUG: event payload to send",i),Promise.resolve()):o.post("api/activities/",[i],{cache:"no-store",redirect:"error",referrerPolicy:"same-origin",priority:"low"}).catch(r=>{console.error(`unable to log action=${t}, category=${Wz}`,r)})},Vz=(t,e,o,n,i)=>{const r=vHt[`${t}`];return r.internal&&gX(t,e,o,i),r.external&&n&&n(Lt({action:t},e)),Promise.resolve()},RO=()=>{var t,e;const{tracking:o,app:n}=Xn(),i=(e=(t=n==null?void 0:n.httpClient)==null?void 0:t.auth)==null?void 0:e.type,r=me((s,l={},d=!1)=>n?Vz(s,Vt(Lt({},l),{authType:i}),n.httpClient,o.onTrackingEvent,d):Promise.resolve(),[o,n,i]),a=me((s,l=!1)=>{if(!n)return Promise.resolve();const{packageName:d,packageVersion:b,component:C,error:u}=s;let j="";return typeof u=="string"?j=u:u instanceof Error&&(j=u.message||u.toString()),Vz("sdkError",Vt(Lt({},{packageName:d,packageVersion:b,component:C,error:j}),{authType:i}),n.httpClient,o.onTrackingEvent,l)},[o,n,i]);return{trackEvent:r,trackError:a}},yHt="sdkComponentInit",vX=uo(!1),bHt=({skipNested:t=!0,children:e})=>Bt(vX.Provider,{value:t,children:e}),xHt=(t,e)=>{const{tracking:o,app:n}=Xn(),{trackEvent:i}=RO(),r=eo(vX),a=Yt(!1);ae(()=>{if(!(!o||!n)&&!a.current&&!r){const s={packageName:o.packageName,packageVersion:"2.3.0",componentName:t,attributesUsed:Object.entries(e).filter(([,l])=>!!l).map(([l])=>l).join(", ")};i(yHt,s,!o.enabled).finally(()=>a.current=!0)}},[t,e,o,r,i,n])};var wHt="[object Boolean]";function yX(t){return t===!0||t===!1||er(t)&&$a(t)==wHt}const bX=class extends ii{constructor(e){super(e),this.postponedErrors=[],this.handler=e.handler,this.componentName=e.componentName}componentDidMount(){var e;this.context.isInitialized&&(this.httpClient=(e=this.context.app)==null?void 0:e.httpClient)}componentDidCatch(e){throw this.context.tracking.enabled&&(this.httpClient?this.sendErrorTracking(e):this.postponedErrors.push(e)),e}sendErrorTracking(e){try{this.handler({packageName:"sdk-ui",packageVersion:"2.3.0",component:this.componentName,error:e})}catch(o){console.log("Failed to send tracking error event: ",o)}}render(){return this.httpClient&&this.postponedErrors.length>0&&this.postponedErrors.forEach(e=>this.sendErrorTracking(e)),this.postponedErrors=[],this.props.children}};bX.contextType=JP;let _Ht=bX;const SHt=({componentName:t,config:e})=>{const{skip:o,transparent:n}=e||{};return i=>function(r){const{trackError:a}=RO();return yX(o)&&o||sl(o)&&o(r)?Bt(i,Lt({},r)):(xHt(t,r),Bt(bHt,{skipNested:!n,children:Bt(_Ht,{componentName:t,handler:a,children:Bt(i,Lt({},r))})}))}},CHt="_container_1wquj_1",THt="_card_1wquj_11",MHt="_text_1wquj_19",FC={container:CHt,card:THt,text:MHt};function xX({color:t="#FFCB05"}){return Bt("svg",{width:"53px",height:"53px",viewBox:"0 0 53 53",children:Bt("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:We("g",{children:[Bt("polygon",{points:"26.4996 -0.000100000005 -0.000400000001 26.5009 26.4996 52.9999 53.0006 26.5009",fill:t}),Bt("path",{d:"M24.5,39.054 L24.5,35.054 L28.5,35.054 L28.5,39.054 L24.5,39.054 Z M28.5,31.0536 L24.5,31.0536 L23.5,13.0536 L29.5,13.0536 L28.5,31.0536 Z",fill:"#FFFFFF"})]})})})}const wX=({error:t=new ze("errors.componentRenderError")})=>{var e,o,n,i,r,a;const{themeSettings:s}=En(),{app:l}=Xn(),{t:d}=Fi(),[b,C]=le(!1),u=()=>{C(!0)},j=()=>{C(!1)},A=Bt("div",{className:"csdk-flex csdk-justify-center csdk-mb-[10px]",children:Bt(xX,{color:(e=s==null?void 0:s.general)==null?void 0:e.brandColor})}),p=t instanceof c1?d(t.key,Lt({},t.interpolationOptions)):d(t instanceof Error?t.message:t),I=d("errorBoxText",{errorMessage:p,interpolation:{escapeValue:!1}}),W=(n=(o=l==null?void 0:l.settings)==null?void 0:o.errorBoundaryConfig)==null?void 0:n.alwaysShowErrorText;return Bt("div",{onMouseEnter:W?void 0:u,onMouseLeave:W?void 0:j,className:FC.container,"aria-label":"error-box",children:We("div",{className:FC.card,style:{backgroundColor:((i=s==null?void 0:s.general)==null?void 0:i.backgroundColor)||"rgba(255,255,255,0.5)"},children:[A,(W||b)&&Bt("div",{className:FC.text,style:{color:((r=s==null?void 0:s.typography)==null?void 0:r.primaryTextColor)||Sc,fontFamily:((a=s==null?void 0:s.typography)==null?void 0:a.fontFamily)||"inherit"},children:I})]})})};let _X=class extends ii{constructor(t){super(t),this.showErrorBox=!0,this.onError=t.onError,this.isContainerComponent=t.isContainerComponent||!1,this.state={error:null,customErrorUI:null}}static getDerivedStateFromError(t){return{error:t,customErrorUI:null}}componentDidCatch(t){const e=t instanceof Error?t:new Error(t);if(this.onError){const o=this.onError(e);if(o!==void 0&&io(o)){this.setState({error:t,customErrorUI:o});return}}this.setState({error:t})}componentDidUpdate(t,e){if(e.error!==null&&kHt(t.resetKeys,this.props.resetKeys)&&this.setState({error:null,customErrorUI:null}),this.props.error&&!t.error&&!e.error&&!this.state.error&&this.onError){const o=this.props.error instanceof Error?this.props.error:new Error(String(this.props.error)),n=this.onError(o);n!==void 0&&io(n)&&this.setState({customErrorUI:n})}}render(){const{error:t,customErrorUI:e}=this.state,{shouldRenderChildrenWithProvidedError:o,showErrorBox:n,error:i,children:r}=this.props,a=t||i;return!a||i&&!t&&o?r:n?e||Bt(wX,{error:a}):null}};function kHt(t=[],e=[]){return t.length!==e.length||t.some((o,n)=>!cl(o,e[n]))}const SX=({componentName:t})=>e=>function(o){const n=Xn(),i=r=>{var a,s;return(s=(a=n.errorBoundary).onError)==null?void 0:s.call(a,r,{componentName:t,componentProps:o})};return Bt(_X,{resetKeys:Object.values(o),showErrorBox:n.errorBoundary.showErrorBox,onError:i,isContainerComponent:!!(o!=null&&o.children),children:Bt(e,Lt({},o))})};function CX(){var t,e;return(e=(t=document.head.querySelector('meta[property="csp-nonce"]'))==null?void 0:t.getAttribute("content"))!=null?e:void 0}const Uz=CX(),IO=({color:t})=>{const e={backgroundColor:t||"#333333",float:"left",width:"10px",height:"10px",marginRight:"7px",WebkitAnimation:"loading-dots-animation 1.8s infinite ease-in-out",animation:"loading-dots-animation 1.8s infinite ease-in-out",borderRadius:"50%",opacity:.75},o=Vt(Lt({},e),{WebkitAnimationDelay:"-0.32s",animationDelay:"-0.32s"}),n=Vt(Lt({},e),{WebkitAnimationDelay:"-0.16s",animationDelay:"-0.16s"}),i=Vt(Lt({},e),{marginRight:"unset"}),r={"0%, 80%, 100%":{WebkitTransform:"scale(0) rotate(0deg)",transform:"scale(0) rotate(0deg)"},"40%":{WebkitTransform:"scale(1) rotate(0.02deg)",transform:"scale(1) rotate(0.02deg)"}};return We("div",{children:[Bt("style",Vt(Lt({},Uz&&{nonce:Uz}),{children:`
|
|
669
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d(q,X){if(q){if(typeof q=="string")return u(q,X);var H=Object.prototype.toString.call(q).slice(8,-1);return H==="Object"&&q.constructor&&(H=q.constructor.name),H==="Map"||H==="Set"?Array.from(q):H==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(H)?u(q,X):void 0}}function b(q){if(typeof Symbol<"u"&&q[Symbol.iterator]!=null||q["@@iterator"]!=null)return Array.from(q)}function C(q){if(Array.isArray(q))return u(q)}function u(q,X){(X==null||X>q.length)&&(X=q.length);for(var H=0,D=new Array(X);H<X;H++)D[H]=q[H];return D}function j(q){"@babel/helpers - typeof";return(j=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(X){return typeof X}:function(X){return X&&typeof Symbol=="function"&&X.constructor===Symbol&&X!==Symbol.prototype?"symbol":typeof X})(q)}Object.defineProperty(i,"__esModule",{value:!0}),r.d(i,"HighchartsReact",function(){return W});var A=r(1),p=r.n(A),I=typeof window<"u"?A.useLayoutEffect:A.useEffect,W=Object(A.memo)(Object(A.forwardRef)(function(q,X){var H=Object(A.useRef)(),D=Object(A.useRef)(),$=Object(A.useRef)(q.constructorType),z=Object(A.useRef)(q.highcharts);return I(function(){function N(){var E=q.highcharts||(typeof window>"u"?"undefined":j(window))==="object"&&window.Highcharts,x=q.constructorType||"chart";E?E[x]?q.options?D.current=E[x](H.current,q.options,q.callback):console.warn('The "options" property was not passed.'):console.warn('The "constructorType" property is incorrect or some required module is not imported.'):console.warn('The "highcharts" property was not passed.')}if(D.current){if(q.allowChartUpdate!==!1)if(q.constructorType!==$.current||q.highcharts!==z.current)$.current=q.constructorType,z.current=q.highcharts,N();else if(!q.immutable&&D.current){var V;(V=D.current).update.apply(V,[q.options].concat(s(q.updateArgs||[!0,!0])))}else N()}else N()},[q.options,q.allowChartUpdate,q.updateArgs,q.containerProps,q.highcharts,q.constructorType]),I(function(){return function(){D.current&&(D.current.destroy(),D.current=null)}},[]),Object(A.useImperativeHandle)(X,function(){return{get chart(){return D.current},container:H}},[]),p.a.createElement("div",a({},q.containerProps,{ref:H}))}));i.default=W},function(n,i){n.exports=o}])})})(tX);var x6t=tX.exports;const w6t=fa(x6t);function PO(t){const e=Yt(void 0);return ae(()=>{e.current=t},[t]),e.current}var eX={exports:{}};(function(t){(function(e){t.exports?t.exports=e:e(Highcharts)})(function(e){var o=e.relativeLength;e.wrap(e.seriesTypes.column.prototype,"translate",function(n){var i=this.options,r=i.topMargin||0,a=i.bottomMargin||0;n.call(this),this.points.forEach(function(s){var l=s.shapeArgs,d=l.width,b=l.height,C=l.x,u=l.y,j=o(i.borderRadiusTopLeft||0,d),A=o(i.borderRadiusTopRight||0,d),p=o(i.borderRadiusBottomRight||0,d),I=o(i.borderRadiusBottomLeft||0,d);if(j||A||p||I){var W=Math.min(d,b)/2;j>W&&(j=W),A>W&&(A=W),p>W&&(p=W),I>W&&(I=W),s.dlBox=s.shapeArgs,s.shapeType="path",s.shapeArgs={d:[["M",C+j,u+r],["L",C+d-A,u+r],["C",C+d-A/2,u,C+d,u+A/2,C+d,u+A],["L",C+d,u+b-p],["C",C+d,u+b-p/2,C+d-p/2,u+b,C+d-p,u+b+a],["L",C+I,u+b+a],["C",C+I/2,u+b,C,u+b-I/2,C,u+b-I],["L",C,u+j],["C",C,u+j/2,C+j/2,u,C+j,u],["Z"]]}}})})})})(eX);var _6t=eX.exports;const S6t=fa(_6t),C6t=()=>{(function(t){t.seriesTypes.line.prototype.drawLegendSymbol=t.seriesTypes.area.prototype.drawLegendSymbol,qs.wrap(qs.Series.types.treemap.prototype,"pointAttribs",function(e,...o){var n;const i=e.call(this,...o),r=o[0];return(n=r.options.custom)!=null&&n.blur&&(i.fill=qs.color(r.color).setOpacity(.2).get("rgba"),i.stroke=qs.color(i.stroke).setOpacity(.2).get("rgba")),i})})(qs),function(t){t.Point.prototype.importEvents=function(){const e=this;this.importedEvents&&this.importedEvents.forEach(function(i){i()}),this.importedEvents=[];const o=t.merge(e.series.options.point,e.options),n=o.events;e.events=n,t.objectEach(n,function(i,r){t.isFunction(i)&&e.importedEvents.push(t.addEvent(e,r,i))})}}(qs),S6t(qs)};C6t();const oX=Au(function({options:t}){var e,o,n,i,r,a;const s=PO(t),l=me(p=>{var I,W,q,X,H,D,$,z;const N=t;!((X=(q=(W=(I=N==null?void 0:N.plotOptions)==null?void 0:I.series)==null?void 0:W.point)==null?void 0:q.events)!=null&&X.click)&&!((z=($=(D=(H=N==null?void 0:N.plotOptions)==null?void 0:H.series)==null?void 0:D.point)==null?void 0:$.events)!=null&&z.contextmenu)&&(p.container.onclick=null)},[t]),d=p=>p==null?void 0:p.some(({data:I})=>I.some(W=>!!W.marker)),b=(s==null?void 0:s.xAxis)&&(t==null?void 0:t.xAxis)&&((e=s==null?void 0:s.xAxis[0])==null?void 0:e.type)!==((o=t==null?void 0:t.xAxis[0])==null?void 0:o.type),C=!!s&&((n=s==null?void 0:s.navigator)==null?void 0:n.enabled)!==((i=t==null?void 0:t.navigator)==null?void 0:i.enabled),u=d(s==null?void 0:s.series)&&!d(t==null?void 0:t.series),j=!!s&&((r=s==null?void 0:s.chart)==null?void 0:r.type)!==((a=t==null?void 0:t.chart)==null?void 0:a.type),A=b||C||j||u;return Bt(w6t,{highcharts:qs,options:xr(t),containerProps:{style:{height:"100%",width:"100%"}},immutable:A,callback:l})},(t,e)=>QY(t,e,(o,n)=>sl(o)&&sl(n)?o.toString()===n.toString():void 0)),T6t="_alert_box_10ttx_1",M6t="_content_10ttx_8",k6t="_alert_10ttx_1",BC={alert_box:T6t,content:M6t,alert:k6t},nX=({alerts:t=[]})=>Bt("div",{className:BC.alert_box,children:Bt("div",{className:BC.content,children:[...new Set(t)].map((e,o)=>Bt("div",{className:BC.alert,children:e},`alert-${o}`))})}),A6t=t=>["column","bar"].includes(t);function iX({highchartsOptionsBuilder:t,getAlerts:e}){return function({chartData:o,dataOptions:n,designOptions:i,onDataPointClick:r,onDataPointContextMenu:a,onDataPointsSelected:s,onBeforeRender:l}){var d;const{app:b}=Xn(),{t:C}=Fi(),{themeSettings:u}=En(),j=me((W,q)=>Gg(W,q,b==null?void 0:b.settings.locale,b==null?void 0:b.settings.dateConfig),[b==null?void 0:b.settings.dateConfig,b==null?void 0:b.settings.locale]),A=he(()=>{var W;return{translate:C,themeSettings:u,dateFormatter:j,accessibilityEnabled:((W=b==null?void 0:b.settings.accessibilityConfig)==null?void 0:W.enabled)||!1}},[C,u,j,(d=b==null?void 0:b.settings.accessibilityConfig)==null?void 0:d.enabled]),p=he(()=>y6t({highchartsOptionsBuilder:t,chartData:o,dataOptions:n,designOptions:i,dataPointsEventHandlers:{onDataPointClick:r,onDataPointContextMenu:a,onDataPointsSelected:s},extraConfig:A,onBeforeRender:l}),[o,n,i,r,a,s,A,l]),I=e({chartData:o,dataOptions:n,designOptions:i,extraConfig:A});return p&&We("div",{"aria-label":"chart-root",style:{display:"flex",justifyContent:"center",height:"100%",width:"100%"},children:[!!I.length&&Bt(nX,{alerts:I}),Bt(oX,{options:p})]})}}function rX(t){return!!t.chartData&&!!t.chartType&&A6t(t.chartType)}var E6t="[object String]";function OO(t){return typeof t=="string"||!Ho(t)&&er(t)&&$a(t)==E6t}const aX=t=>{const{chartData:e,designOptions:o}=t,{seriesCapacity:n,categoriesCapacity:i}=o.dataLimits,r=e.xValues.length>i?Ob("x",e.xValues.length,i):null,a=e.series.length>n?xu(e.series.length,n):null;return[r,a].filter(OO)},pr=(t,e)=>Lb(t.chartData,e,t.designOptions,t.dataOptions,t.extraConfig.translate,t.extraConfig.themeSettings,t.extraConfig.dateFormatter).options,P6t={getChart:function(t){return pr(t,"bar").chart},getSeries:function(t){return pr(t,"bar").series},getAxes:function(t){const{xAxis:e,yAxis:o}=pr(t,"bar");return{xAxis:e,yAxis:o}},getLegend:function(t){return pr(t,"bar").legend},getPlotOptions:function(t){return pr(t,"bar").plotOptions},getTooltip:function(t){return pr(t,"bar").tooltip},getExtras:function(t){const e=pr(t,"bar");return w1(e,["chart","series","xAxis","yAxis","legend","plotOptions","tooltip"])}},O6t={dataOptions:{translateDataOptionsToInternal:CO,getAttributes:oY,getMeasures:nY,isCorrectDataOptions:iY,isCorrectDataOptionsInternal:rY},data:{loadData:fO,getChartData:pY},designOptions:{translateStyleOptionsToDesignOptions:Yx(zY)("bar"),isCorrectStyleOptions:FY},renderer:{ChartRendererComponent:iX({highchartsOptionsBuilder:P6t,getAlerts:aX}),isCorrectRendererProps:rX}},L6t={getChart:function(t){return pr(t,"column").chart},getSeries:function(t){return pr(t,"column").series},getAxes:function(t){const{xAxis:e,yAxis:o}=pr(t,"column");return{xAxis:e,yAxis:o}},getLegend:function(t){return pr(t,"column").legend},getPlotOptions:function(t){return pr(t,"column").plotOptions},getTooltip:function(t){return pr(t,"column").tooltip},getExtras:function(t){const e=pr(t,"column");return w1(e,["chart","series","xAxis","yAxis","legend","plotOptions","tooltip"])}},N6t={dataOptions:{translateDataOptionsToInternal:CO,getAttributes:oY,getMeasures:nY,isCorrectDataOptions:iY,isCorrectDataOptionsInternal:rY},data:{loadData:fO,getChartData:pY},designOptions:{translateStyleOptionsToDesignOptions:Yx(zY)("column"),isCorrectStyleOptions:FY},renderer:{ChartRendererComponent:iX({highchartsOptionsBuilder:L6t,getAlerts:aX}),isCorrectRendererProps:rX}},D6t={areamap:Uzt,column:N6t,bar:O6t};function e0(t){const e=D6t[t];if(e)return e;throw new Error(`Unsupported chart type: ${t}`)}function o0(t){return["areamap","column","bar"].includes(t)}function sX(t,e,o){for(var n=-1,i=e.length,r={};++n<i;){var a=e[n],s=m1(t,a);o(s,a)&&gG(r,Gp(a,t),s)}return r}function R6t(t,e){return sX(t,e,function(o,n){return PH(t,n)})}var I6t=x1(function(t,e){return t==null?{}:R6t(t,e)});const j6t=Object.freeze({"area/basic":{lineType:"straight",stackType:"classic"},"area/stacked":{lineType:"straight",stackType:"stacked"},"area/stacked100":{lineType:"straight",stackType:"stack100"},"area/spline":{lineType:"smooth",stackType:"classic"},"area/stackedspline":{lineType:"smooth",stackType:"stacked"},"area/stackedspline100":{lineType:"smooth",stackType:"stack100"},"arearange/basic":{lineType:"straight",stackType:"classic"},"arearange/spline":{lineType:"smooth",stackType:"classic"},"bar/classic":{stackType:"classic"},"bar/stacked":{stackType:"stacked"},"bar/stacked100":{stackType:"stack100"},"column/classic":{stackType:"classic"},"column/stackedcolumn":{stackType:"stacked"},"column/stackedcolumn100":{stackType:"stack100"},"line/basic":{lineType:"straight"},"line/spline":{lineType:"smooth"},"line/step":{lineType:"straight"},"pie/classic":{pieType:"classic"},"pie/donut":{pieType:"donut"},"pie/ring":{pieType:"ring"},"polar/column":{polarType:"column"},"polar/area":{polarType:"area"},"polar/line":{polarType:"line"},"indicator/numeric":{indicatorType:"numeric"},"indicator/gauge":{indicatorType:"gauge"},treemap:{},sunburst:{},"boxplot/full":{boxplotType:"full"},"boxplot/hollow":{boxplotType:"hollow"},scattermap:{},"areamap/world":{mapType:"world"},"areamap/usa":{mapType:"usa"}});function $6t(t){let e;switch(t.subtype){case"indicator/numeric":e=jt({indicatorType:"numeric",numericSubtype:t.numericSubtype},t.numericSubtype==="numericSimple"?{skin:t.skin}:null);break;case"indicator/gauge":e=jt({indicatorType:"gauge",skin:t.skin},t.tickerBarHeight?{tickerBarHeight:t.tickerBarHeight}:null);break}return Zt(jt(jt({},Ea),e),{indicatorComponents:t.indicatorComponents||Ea.indicatorComponents,forceTickerView:!!t.forceTickerView})}const z6t=(t,e,o)=>{const n="y"in o&&Array.isArray(o.y)?o.y.some(s=>s.showOnRightAxis):!1;let i;switch(t){case"area":i=S4t(e,o,n);break;case"arearange":case"line":i=_4t(e,o,n);break;case"pie":i=k4t(e);break;case"funnel":i=A4t(e);break;case"treemap":i=E4t(e);break;case"sunburst":i=P4t(e);break;case"polar":i=L4t(e,o);break;case"indicator":i=$6t(e);break;case"scatter":i=D4t(e);break;case"boxplot":i=R4t(e);break;case"scattermap":i=j4t(e);break;default:throw new ze("errors.chartTypeNotSupported",{chartType:t})}const r="subtype"in e&&e.subtype?e.subtype:"line/basic",a=j6t[r];return jt(jt({},i),a)};function B6t(t,e,o){const n=lh(o??{},sh());if(o0(t)){const i=e0(t);if(!i.designOptions.isCorrectStyleOptions(n))throw new ze("errors.optionsTranslation.invalidStyleOptions",{chartType:t});if(!i.dataOptions.isCorrectDataOptionsInternal(e))throw new ze("errors.optionsTranslation.invalidInternalDataOptions",{chartType:t});return i.designOptions.translateStyleOptionsToDesignOptions(n,e)}else return z6t(t,n,e)}function lh(t,e){return zn.withOptions({mergeArrays:!1},e,t)}function Xx(t,e,o){return F6t(t).map(n=>{const i=n.seriesId,r=n.seriesStyleOptions,a=w4t(e,lh(r,o));return{seriesId:i,designOptions:I6t(a,["lineWidth","marker"])}}).reduce((n,{seriesId:i,designOptions:r})=>Zt(jt({},n),{[i]:r}),{})}function F6t(t){return t.y.filter(H6t).map(({column:{name:e},seriesStyleOptions:o})=>({seriesId:e,seriesStyleOptions:o}))}function H6t(t){return t.seriesStyleOptions!==void 0}const W6t=t=>Fa(t)?"cartesian":Cc(t)?"categorical":Ia(t)?"scatter":Hu(t)?"scattermap":rh(t)?"indicator":lO(t)?"areamap":Tc(t)?"boxplot":"table";var V6t=Object.defineProperty,U6t=Object.defineProperties,G6t=Object.getOwnPropertyDescriptors,Ib=Object.getOwnPropertySymbols,lX=Object.prototype.hasOwnProperty,cX=Object.prototype.propertyIsEnumerable,Js=Math.pow,gk=(t,e,o)=>e in t?V6t(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,Lt=(t,e)=>{for(var o in e||(e={}))lX.call(e,o)&&gk(t,o,e[o]);if(Ib)for(var o of Ib(e))cX.call(e,o)&&gk(t,o,e[o]);return t},Vt=(t,e)=>U6t(t,G6t(e)),vk=t=>typeof t=="symbol"?t:t+"",Ae=(t,e)=>{var o={};for(var n in t)lX.call(t,n)&&e.indexOf(n)<0&&(o[n]=t[n]);if(t!=null&&Ib)for(var n of Ib(t))e.indexOf(n)<0&&cX.call(t,n)&&(o[n]=t[n]);return o},_y=(t,e,o)=>(gk(t,typeof e!="symbol"?e+"":e,o),o),Ha=(t,e,o)=>new Promise((n,i)=>{var r=l=>{try{s(o.next(l))}catch(d){i(d)}},a=l=>{try{s(o.throw(l))}catch(d){i(d)}},s=l=>l.done?n(l.value):Promise.resolve(l.value).then(r,a);s((o=o.apply(t,e)).next())});function Y6t(t){let{i18n:e,defaultNS:o,children:n}=t;const i=he(()=>({i18n:e,defaultNS:o}),[e,o]);return Re(nH.Provider,{value:i},n)}function dc(t){return t===void 0||typeof t=="string"||"title"in t&&"type"in t}const Qi={BOX_MIN_VALUE_NAME:"Box Min",BOX_MEDIAN_VALUE_NAME:"Box Median",BOX_MAX_VALUE_NAME:"Box Max",WHISKER_MIN_VALUE_NAME:"Whisker Min",WHISKER_MAX_VALUE_NAME:"Whisker Max",OUTLIER_COUNT_VALUE_NAME:"Outlier Count",OUTLIER_MIN_VALUE_NAME:"Outlier Min",OUTLIER_MAX_VALUE_NAME:"Outlier Max"};function LO(t){return[ji(Qi.BOX_MIN_VALUE_NAME,"QUARTILE([Attr], 1)",{Attr:t}),ji(Qi.BOX_MEDIAN_VALUE_NAME,"MEDIAN([Attr])",{Attr:t}),ji(Qi.BOX_MAX_VALUE_NAME,"QUARTILE([Attr], 3)",{Attr:t})]}function X6t(t){return[...LO(t),ji(Qi.WHISKER_MIN_VALUE_NAME,"LOWERWHISKERMAX_IQR([Attr])",{Attr:t}),ji(Qi.WHISKER_MAX_VALUE_NAME,"UPPERWHISKERMIN_IQR([Attr])",{Attr:t}),ji(Qi.OUTLIER_COUNT_VALUE_NAME,"OUTLIERSCOUNT_IQR([Attr])",{Attr:t})]}function q6t(t){return[...LO(t),ji(Qi.WHISKER_MIN_VALUE_NAME,"MIN([Attr])",{Attr:t}),ji(Qi.WHISKER_MAX_VALUE_NAME,"MAX([Attr])",{Attr:t})]}function Z6t(t){return[...LO(t),ji(Qi.WHISKER_MIN_VALUE_NAME,"LOWERWHISKERMAX_STDEVP([Attr])",{Attr:t}),ji(Qi.WHISKER_MAX_VALUE_NAME,"UPPERWHISKERMIN_STDEVP([Attr])",{Attr:t}),ji(Qi.OUTLIER_COUNT_VALUE_NAME,"OUTLIERSCOUNT_STDEVP([Attr])",{Attr:t})]}const K6t=WH(t=>{const e=xr(t),o=ji(Qi.OUTLIER_MAX_VALUE_NAME,"(UPPERWHISKERMIN_IQR([Attr]), all([Attr]))",{Attr:t}),n=ji(Qi.OUTLIER_MIN_VALUE_NAME,"(LOWERWHISKERMAX_IQR([Attr]), all([Attr]))",{Attr:t});return e.name=`${e.name} (Outliers)`,e.jaql=i=>{const r=Object.assign(Object.assign({},t.jaql(!0)),{filter:{or:[{fromNotEqual:o.jaql(!0)},{toNotEqual:n.jaql(!0)}]}});return i?r:{jaql:r}},e},"boxWhiskerIqrOutliers"),J6t=WH(t=>{const e=xr(t),o=ji(Qi.OUTLIER_MAX_VALUE_NAME,"(UPPERWHISKERMIN_STDEVP([Attr]), all([Attr]))",{Attr:t}),n=ji(Qi.OUTLIER_MIN_VALUE_NAME,"(LOWERWHISKERMAX_STDEVP([Attr]), all([Attr]))",{Attr:t});return e.jaql=i=>{const r=Object.assign(Object.assign({},t.jaql(!0)),{filter:{or:[{fromNotEqual:o.jaql(!0)},{toNotEqual:n.jaql(!0)}]}});return i?r:{jaql:r}},e},"boxWhiskerStdDevOutliers");function Zm(t){return!!t&&"operator"in t&&(t.operator==="AND"||t.operator==="OR")&&!!t.right&&!!t.left}function uX(t=[],e=[]){if(!Zm(t)&&!Zm(e))return ea(t,e);const{filters:o,relations:n}=Km(t),i=NO(e),r=ea(o,i),a=im(o,n,r);return nm(r,a)}function Km(t){if(!t)return{filters:[],relations:null};if(Ho(t))return{filters:t,relations:null};const e=new Set;function o(i){if(dX(i))return e.add(i),{instanceid:i.config.guid};if(Zm(i)){const r=o(i.left),a=o(i.right);return{left:r,right:a,operator:i.operator}}throw new Kx}const n=o(t);return{filters:Array.from(e),relations:n}}function NO(t){return t?Km(t).filters:[]}function nm(t,e){if(!e||DO(e))return t;const o=n(e);return dX(o)?[o]:o;function n(i){if(qx(i))return t.find(r=>r.config.guid===i.instanceid);if(Zx(i))return(i.operator==="AND"?Gf.and:Gf.or)(n(i.left),n(i.right));throw new Kx}}function DO(t){return!!t&&"instanceid"in t}function im(t,e,o){if(e===null)return null;const n=tHt(t,o);return n.length===0?e:n.reduce((i,r)=>{switch(r.type){case"add":return eHt(r.payload,i);case"remove":return yk(r.payload,i)}},e)}function Hz(t,e){return t.config.guid===e.config.guid}function Q6t(t,e,o){if(!t)return null;return n(t);function n(i){if(qx(i))return i.instanceid===e.config.guid?{instanceid:o.config.guid}:i;if(Zx(i))return{left:n(i.left),right:n(i.right),operator:i.operator};throw new Kx}}function tHt(t,e){const o=[],n=[...t],i=[...e];return n.forEach(r=>{i.some(a=>Hz(r,a))||o.push({type:"remove",payload:r})}),i.forEach(r=>{n.some(a=>Hz(r,a))||o.push({type:"add",payload:r})}),o}function eHt(t,e){return e?{left:e,right:{instanceid:t.config.guid},operator:"AND"}:{instanceid:t.config.guid}}function yk(t,e){if(!e)return null;if(DO(e))return e.instanceid===t.config.guid?null:e;const o=yk(t,e.left),n=yk(t,e.right);return o===null&&n?n:n===null&&o?o:o===null&&n===null?null:{left:o,right:n,operator:e.operator}}function oHt(t,e){if(!t)return null;function o(n){if(nHt(n))return{instanceid:n.instanceId};if(iHt(n))return o(n.value);if(rHt(n))return{operator:n.operator,left:o(n.left),right:o(n.right)};if(aHt(n)){const i=e.find(r=>{if(!vc(r))return!1;const a=r.filters.map(s=>s.config.guid);return n.levels.every(s=>a.includes(s.instanceId))});if(i)return{instanceid:i.config.guid};throw new Error("Broken filter relations model. Cascading filter not found.")}throw new Error("Broken filter relations model. Unknown node type.")}return o(t)}function nHt(t){return"instanceId"in t}function iHt(t){return"value"in t}function rHt(t){return"operator"in t}function aHt(t){return"levels"in t&&Ho(t.levels)}function qx(t){return"instanceid"in t}function Zx(t){return"operator"in t}function dX(t){return"config"in t&&"guid"in t.config}function sHt(t,e){if(!t)return;function o(n){if(qx(n)){const i=e.find(r=>r.config.guid===n.instanceid);return i&&vc(i)?{type:"CascadingIdentifier",levels:i.filters.map(r=>({type:"Identifier",instanceId:r.config.guid}))}:{type:"Identifier",instanceId:n.instanceid}}else{if(Zx(n))return{type:"LogicalExpression",operator:n.operator,left:o(n.left),right:o(n.right)};throw new Error("Unknown node type in filter relations rules.")}}return o(t)}function lHt(t,e){return t.find(o=>o.config.guid===e)}class Kx extends Error{constructor(){super("Broken filter relations. Unknown node type.")}}function cHt(t){return t.nodeType==="openBracket"}function uHt(t){return t.nodeType==="closeBracket"}function dHt(t){return t.nodeType==="attribute"}function pHt(t){return t.nodeType==="operator"}function Jm(t){if(vc(t))return t.filters.map(Jm).join("-");const{attribute:e}=t,o=t.jaql().jaql,n=e.expression||o.dim,i=e.granularity||((o==null?void 0:o.datatype)==="datetime"?pp.translateJaqlToGranularity(o):"");return`${n}${i}`}function ea(t=[],e=[]){const o=[...t];return e.forEach(n=>{const i=o.findIndex(r=>Jm(n)===Jm(r));i!==-1?o[i]=n:o.push(n)}),o}function hHt(t){if(!t)return t;const e=xr(t);function o(n){if("instanceId"in n)return{instanceid:n.instanceId};if("value"in n)return o(n.value);if("operator"in n){const i={operator:n.operator};return"left"in n&&(i.left=o(n.left)),"right"in n&&(i.right=o(n.right)),i}return n}return o(e)}function fHt(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function bk(t,e){return bk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,n){return o.__proto__=n,o},bk(t,e)}const Lf={none:"None",small:"Small",medium:"Medium",large:"Large",left:"Left",center:"Center",right:"Right",light:"Light",dark:"Dark"};function pX(t,e,o){const n={chart:{textColor:t.dashboards.widgetTextColor,backgroundColor:t.dashboards.widgetBackgroundColor,secondaryTextColor:t.dashboards.widgetSecondaryTextColor,animation:{init:{duration:"auto"},redraw:{duration:"auto"}}},typography:{fontFamily:t.typography.fontFamily,primaryTextColor:t.typography.primaryTextColor,secondaryTextColor:t.typography.secondaryTextColor,fontsLoader:{fonts:mHt(t.typography.fontFamily,o,t.typography.customFontSelected)}},palette:{variantColors:e.colors},general:{brandColor:t.general.brandColor,backgroundColor:t.general.backgroundColor,primaryButtonTextColor:t.general.primaryButtonTextColor,primaryButtonHoverColor:t.general.primaryButtonHoverColor,popover:bb().general.popover,buttons:{cancel:{backgroundColor:{default:t.general.secondaryButtonBaseColor,hover:t.general.secondaryButtonHoverColor,focus:t.general.secondaryButtonHoverColor},textColor:t.general.secondaryButtonTextColor}}},widget:{spaceAround:Lf[t.dashboards.widgetSpacing],cornerRadius:Lf[t.dashboards.widgetCornerRadius],shadow:Lf[t.dashboards.widgetShadow],border:t.dashboards.widgetBorderEnabled,borderColor:t.dashboards.widgetBorderColor,header:{titleTextColor:t.dashboards.widgetTitleColor,titleAlignment:Lf[t.dashboards.widgetTitleAlignment],titleFontSize:YP,dividerLine:t.dashboards.widgetTitleDividerEnabled,dividerLineColor:t.dashboards.widgetTitleDividerColor,backgroundColor:t.dashboards.widgetTitleBackgroundColor}},dashboard:{backgroundColor:t.dashboards.layoutBackgroundColor,dividerLineWidth:UP,dividerLineColor:VP,borderWidth:kp,borderColor:GP},filter:{panel:{titleColor:t.dashboards.panelTitleTextColor,backgroundColor:t.dashboards.panelBackgroundColor,borderWidth:kp,borderColor:RU}}};return zn.withOptions({mergeArrays:!1},bb(),n)}function hX(t){return t.dashboards.colorPaletteName}function mHt(t,e,o){const n=o?"fonts/":"resources/base/fonts/";return[{fontFamily:t,fontWeight:"normal",fontStyle:"normal",src:[{url:`${e}${n}${t}-Regular.eot`},{local:`${t}-Regular`},{url:`${e}${n}${t}-Regular.eot?#iefix`,format:"embedded-opentype"},{url:`${e}${n}${t}-Regular.ttf`,format:"truetype"}]},{fontFamily:t,fontWeight:600,fontStyle:"normal",src:[{url:`${e}${n}${t}-SemiBold.eot`},{local:`${t}-SemiBold`},{url:`${e}${n}${t}-SemiBold.eot?#iefix`,format:"embedded-opentype"},{url:`${e}${n}${t}-SemiBold.ttf`,format:"truetype"}]},{fontFamily:t,fontWeight:"bold",fontStyle:"normal",src:[{url:`${e}${n}${t}-Bold.eot`},{local:`${t}-Bold`},{url:`${e}${n}${t}-Bold.eot?#iefix`,format:"embedded-opentype"},{url:`${e}${n}${t}-Bold.ttf`,format:"truetype"}]}]}function fX(t,e){return Ha(this,null,function*(){const o=yield gHt(t,e);if(!o)throw new ze("errors.themeNotFound",{themeOid:t});const n=hX(o),i=yield mX(n,e);return pX(o,i,e.url)})}function gHt(t,e){return Ha(this,null,function*(){return e.get(`api/v1/themes/${t}`).catch(()=>{throw new ze("errors.themeNotFound",{themeOid:t})})})}function mX(t,e){return Ha(this,null,function*(){const o=yield e.get(`api/palettes/${t}`);if(o&&"status"in o&&o.status==="error")throw new ze("errors.paletteNotFound",{paletteName:t});return o})}const vHt={sdkComponentInit:{internal:!0,external:!0},sdkHookInit:{internal:!0,external:!0},sdkError:{internal:!0,external:!1},sdkCliExec:{internal:!0,external:!1},sdkAngularServiceMethodExecuted:{internal:!0,external:!0}},Wz="composesdk",gX=(t,e,o,n=!1)=>{const i=Object.assign({action:t,cat:Wz,eventType:"product",direct:!0},e);return n&&(process.env.NODE_ENV==="development"||process.env.NODE_ENV==="test")?(console.debug("DEBUG: event payload to send",i),Promise.resolve()):o.post("api/activities/",[i],{cache:"no-store",redirect:"error",referrerPolicy:"same-origin",priority:"low"}).catch(r=>{console.error(`unable to log action=${t}, category=${Wz}`,r)})},Vz=(t,e,o,n,i)=>{const r=vHt[`${t}`];return r.internal&&gX(t,e,o,i),r.external&&n&&n(Lt({action:t},e)),Promise.resolve()},RO=()=>{var t,e;const{tracking:o,app:n}=Xn(),i=(e=(t=n==null?void 0:n.httpClient)==null?void 0:t.auth)==null?void 0:e.type,r=me((s,l={},d=!1)=>n?Vz(s,Vt(Lt({},l),{authType:i}),n.httpClient,o.onTrackingEvent,d):Promise.resolve(),[o,n,i]),a=me((s,l=!1)=>{if(!n)return Promise.resolve();const{packageName:d,packageVersion:b,component:C,error:u}=s;let j="";return typeof u=="string"?j=u:u instanceof Error&&(j=u.message||u.toString()),Vz("sdkError",Vt(Lt({},{packageName:d,packageVersion:b,component:C,error:j}),{authType:i}),n.httpClient,o.onTrackingEvent,l)},[o,n,i]);return{trackEvent:r,trackError:a}},yHt="sdkComponentInit",vX=uo(!1),bHt=({skipNested:t=!0,children:e})=>Bt(vX.Provider,{value:t,children:e}),xHt=(t,e)=>{const{tracking:o,app:n}=Xn(),{trackEvent:i}=RO(),r=eo(vX),a=Yt(!1);ae(()=>{if(!(!o||!n)&&!a.current&&!r){const s={packageName:o.packageName,packageVersion:"2.3.1",componentName:t,attributesUsed:Object.entries(e).filter(([,l])=>!!l).map(([l])=>l).join(", ")};i(yHt,s,!o.enabled).finally(()=>a.current=!0)}},[t,e,o,r,i,n])};var wHt="[object Boolean]";function yX(t){return t===!0||t===!1||er(t)&&$a(t)==wHt}const bX=class extends ii{constructor(e){super(e),this.postponedErrors=[],this.handler=e.handler,this.componentName=e.componentName}componentDidMount(){var e;this.context.isInitialized&&(this.httpClient=(e=this.context.app)==null?void 0:e.httpClient)}componentDidCatch(e){throw this.context.tracking.enabled&&(this.httpClient?this.sendErrorTracking(e):this.postponedErrors.push(e)),e}sendErrorTracking(e){try{this.handler({packageName:"sdk-ui",packageVersion:"2.3.1",component:this.componentName,error:e})}catch(o){console.log("Failed to send tracking error event: ",o)}}render(){return this.httpClient&&this.postponedErrors.length>0&&this.postponedErrors.forEach(e=>this.sendErrorTracking(e)),this.postponedErrors=[],this.props.children}};bX.contextType=JP;let _Ht=bX;const SHt=({componentName:t,config:e})=>{const{skip:o,transparent:n}=e||{};return i=>function(r){const{trackError:a}=RO();return yX(o)&&o||sl(o)&&o(r)?Bt(i,Lt({},r)):(xHt(t,r),Bt(bHt,{skipNested:!n,children:Bt(_Ht,{componentName:t,handler:a,children:Bt(i,Lt({},r))})}))}},CHt="_container_1wquj_1",THt="_card_1wquj_11",MHt="_text_1wquj_19",FC={container:CHt,card:THt,text:MHt};function xX({color:t="#FFCB05"}){return Bt("svg",{width:"53px",height:"53px",viewBox:"0 0 53 53",children:Bt("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:We("g",{children:[Bt("polygon",{points:"26.4996 -0.000100000005 -0.000400000001 26.5009 26.4996 52.9999 53.0006 26.5009",fill:t}),Bt("path",{d:"M24.5,39.054 L24.5,35.054 L28.5,35.054 L28.5,39.054 L24.5,39.054 Z M28.5,31.0536 L24.5,31.0536 L23.5,13.0536 L29.5,13.0536 L28.5,31.0536 Z",fill:"#FFFFFF"})]})})})}const wX=({error:t=new ze("errors.componentRenderError")})=>{var e,o,n,i,r,a;const{themeSettings:s}=En(),{app:l}=Xn(),{t:d}=Fi(),[b,C]=le(!1),u=()=>{C(!0)},j=()=>{C(!1)},A=Bt("div",{className:"csdk-flex csdk-justify-center csdk-mb-[10px]",children:Bt(xX,{color:(e=s==null?void 0:s.general)==null?void 0:e.brandColor})}),p=t instanceof c1?d(t.key,Lt({},t.interpolationOptions)):d(t instanceof Error?t.message:t),I=d("errorBoxText",{errorMessage:p,interpolation:{escapeValue:!1}}),W=(n=(o=l==null?void 0:l.settings)==null?void 0:o.errorBoundaryConfig)==null?void 0:n.alwaysShowErrorText;return Bt("div",{onMouseEnter:W?void 0:u,onMouseLeave:W?void 0:j,className:FC.container,"aria-label":"error-box",children:We("div",{className:FC.card,style:{backgroundColor:((i=s==null?void 0:s.general)==null?void 0:i.backgroundColor)||"rgba(255,255,255,0.5)"},children:[A,(W||b)&&Bt("div",{className:FC.text,style:{color:((r=s==null?void 0:s.typography)==null?void 0:r.primaryTextColor)||Sc,fontFamily:((a=s==null?void 0:s.typography)==null?void 0:a.fontFamily)||"inherit"},children:I})]})})};let _X=class extends ii{constructor(t){super(t),this.showErrorBox=!0,this.onError=t.onError,this.isContainerComponent=t.isContainerComponent||!1,this.state={error:null,customErrorUI:null}}static getDerivedStateFromError(t){return{error:t,customErrorUI:null}}componentDidCatch(t){const e=t instanceof Error?t:new Error(t);if(this.onError){const o=this.onError(e);if(o!==void 0&&io(o)){this.setState({error:t,customErrorUI:o});return}}this.setState({error:t})}componentDidUpdate(t,e){if(e.error!==null&&kHt(t.resetKeys,this.props.resetKeys)&&this.setState({error:null,customErrorUI:null}),this.props.error&&!t.error&&!e.error&&!this.state.error&&this.onError){const o=this.props.error instanceof Error?this.props.error:new Error(String(this.props.error)),n=this.onError(o);n!==void 0&&io(n)&&this.setState({customErrorUI:n})}}render(){const{error:t,customErrorUI:e}=this.state,{shouldRenderChildrenWithProvidedError:o,showErrorBox:n,error:i,children:r}=this.props,a=t||i;return!a||i&&!t&&o?r:n?e||Bt(wX,{error:a}):null}};function kHt(t=[],e=[]){return t.length!==e.length||t.some((o,n)=>!cl(o,e[n]))}const SX=({componentName:t})=>e=>function(o){const n=Xn(),i=r=>{var a,s;return(s=(a=n.errorBoundary).onError)==null?void 0:s.call(a,r,{componentName:t,componentProps:o})};return Bt(_X,{resetKeys:Object.values(o),showErrorBox:n.errorBoundary.showErrorBox,onError:i,isContainerComponent:!!(o!=null&&o.children),children:Bt(e,Lt({},o))})};function CX(){var t,e;return(e=(t=document.head.querySelector('meta[property="csp-nonce"]'))==null?void 0:t.getAttribute("content"))!=null?e:void 0}const Uz=CX(),IO=({color:t})=>{const e={backgroundColor:t||"#333333",float:"left",width:"10px",height:"10px",marginRight:"7px",WebkitAnimation:"loading-dots-animation 1.8s infinite ease-in-out",animation:"loading-dots-animation 1.8s infinite ease-in-out",borderRadius:"50%",opacity:.75},o=Vt(Lt({},e),{WebkitAnimationDelay:"-0.32s",animationDelay:"-0.32s"}),n=Vt(Lt({},e),{WebkitAnimationDelay:"-0.16s",animationDelay:"-0.16s"}),i=Vt(Lt({},e),{marginRight:"unset"}),r={"0%, 80%, 100%":{WebkitTransform:"scale(0) rotate(0deg)",transform:"scale(0) rotate(0deg)"},"40%":{WebkitTransform:"scale(1) rotate(0.02deg)",transform:"scale(1) rotate(0.02deg)"}};return We("div",{children:[Bt("style",Vt(Lt({},Uz&&{nonce:Uz}),{children:`
|
|
670
670
|
@keyframes loading-dots-animation {
|
|
671
671
|
${Object.entries(r).map(([a,s])=>`${a} { ${Object.entries(s).map(([l,d])=>`${l}: ${d};`).join("")} }`).join("")}
|
|
672
672
|
}
|
|
@@ -997,7 +997,7 @@ https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof t.getDerivedStat
|
|
|
997
997
|
`:null,Qpe=typeof kA!="string"?Kr`
|
|
998
998
|
animation: ${kA} 1.4s ease-in-out infinite;
|
|
999
999
|
`:null,the=t=>{const{classes:e,variant:o,color:n,disableShrink:i}=t,r={root:["root",o,`color${Ke(n)}`],svg:["svg"],circle:["circle",`circle${Ke(o)}`,i&&"circleDisableShrink"]};return Pn(r,Kpe,e)},ehe=Ue("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:o}=t;return[e.root,e[o.variant],e[`color${Ke(o.color)}`]]}})(Un(({theme:t})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:t.transitions.create("transform")}},{props:{variant:"indeterminate"},style:Jpe||{animation:`${MA} 1.4s linear infinite`}},...Object.entries(t.palette).filter(mc()).map(([e])=>({props:{color:e},style:{color:(t.vars||t).palette[e].main}}))]}))),ohe=Ue("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(t,e)=>e.svg})({display:"block"}),nhe=Ue("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(t,e)=>{const{ownerState:o}=t;return[e.circle,e[`circle${Ke(o.variant)}`],o.disableShrink&&e.circleDisableShrink]}})(Un(({theme:t})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:t.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:e})=>e.variant==="indeterminate"&&!e.disableShrink,style:Qpe||{animation:`${kA} 1.4s ease-in-out infinite`}}]}))),XL=ye(function(t,e){const o=_n({props:t,name:"MuiCircularProgress"}),n=o,{className:i,color:r="primary",disableShrink:a=!1,size:s=40,style:l,thickness:d=3.6,value:b=0,variant:C="indeterminate"}=n,u=Ae(n,["className","color","disableShrink","size","style","thickness","value","variant"]),j=Vt(Lt({},o),{color:r,disableShrink:a,size:s,thickness:d,value:b,variant:C}),A=the(j),p={},I={},W={};if(C==="determinate"){const q=2*Math.PI*((Rl-d)/2);p.strokeDasharray=q.toFixed(3),W["aria-valuenow"]=Math.round(b),p.strokeDashoffset=`${((100-b)/100*q).toFixed(3)}px`,I.transform="rotate(-90deg)"}return At(ehe,Vt(Lt(Lt({className:oo(A.root,i),style:Lt(Lt({width:s,height:s},I),l),ownerState:j,ref:e,role:"progressbar"},W),u),{children:At(ohe,{className:A.svg,ownerState:j,viewBox:`${Rl/2} ${Rl/2} ${Rl} ${Rl}`,children:At(nhe,{className:A.circle,style:p,ownerState:j,cx:Rl,cy:Rl,r:(Rl-d)/2,fill:"none",strokeWidth:d})})}))});process.env.NODE_ENV!=="production"&&(XL.propTypes={classes:mt.object,className:mt.string,color:mt.oneOfType([mt.oneOf(["inherit","primary","secondary","error","info","success","warning"]),mt.string]),disableShrink:Tl(mt.bool,t=>t.disableShrink&&t.variant&&t.variant!=="indeterminate"?new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect."):null),size:mt.oneOfType([mt.number,mt.string]),style:mt.object,sx:mt.oneOfType([mt.arrayOf(mt.oneOfType([mt.func,mt.object,mt.bool])),mt.func,mt.object]),thickness:mt.number,value:mt.number,variant:mt.oneOf(["determinate","indeterminate"])});function ihe(t){return ln("MuiIconButton",t)}const UF=cn("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),rhe=t=>{const{classes:e,disabled:o,color:n,edge:i,size:r,loading:a}=t,s={root:["root",a&&"loading",o&&"disabled",n!=="default"&&`color${Ke(n)}`,i&&`edge${Ke(i)}`,`size${Ke(r)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return Pn(s,ihe,e)},ahe=Ue(Uu,{name:"MuiIconButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:o}=t;return[e.root,o.loading&&e.loading,o.color!=="default"&&e[`color${Ke(o.color)}`],o.edge&&e[`edge${Ke(o.edge)}`],e[`size${Ke(o.size)}`]]}})(Un(({theme:t})=>({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(t.vars||t).palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),variants:[{props:e=>!e.disableRipple,style:{"--IconButton-hoverBg":t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:bn(t.palette.action.active,t.palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),Un(({theme:t})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(t.palette).filter(mc()).map(([e])=>({props:{color:e},style:{color:(t.vars||t).palette[e].main}})),...Object.entries(t.palette).filter(mc()).map(([e])=>({props:{color:e},style:{"--IconButton-hoverBg":t.vars?`rgba(${(t.vars||t).palette[e].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:bn((t.vars||t).palette[e].main,t.palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:t.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:t.typography.pxToRem(28)}}],[`&.${UF.disabled}`]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled},[`&.${UF.loading}`]:{color:"transparent"}}))),she=Ue("span",{name:"MuiIconButton",slot:"LoadingIndicator",overridesResolver:(t,e)=>e.loadingIndicator})(({theme:t})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(t.vars||t).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),Tu=ye(function(t,e){const o=_n({props:t,name:"MuiIconButton"}),n=o,{edge:i=!1,children:r,className:a,color:s="default",disabled:l=!1,disableFocusRipple:d=!1,size:b="medium",id:C,loading:u=null,loadingIndicator:j}=n,A=Ae(n,["edge","children","className","color","disabled","disableFocusRipple","size","id","loading","loadingIndicator"]),p=mw(C),I=j??At(XL,{"aria-labelledby":p,color:"inherit",size:16}),W=Vt(Lt({},o),{edge:i,color:s,disabled:l,disableFocusRipple:d,loading:u,loadingIndicator:I,size:b}),q=rhe(W);return At(ahe,Vt(Lt({id:u?p:C,className:oo(q.root,a),centerRipple:!0,focusRipple:!d,disabled:l||u,ref:e},A),{ownerState:W,children:[typeof u=="boolean"&&At("span",{className:q.loadingWrapper,style:{display:"contents"},children:At(she,{className:q.loadingIndicator,ownerState:W,children:u&&I})}),r]}))});process.env.NODE_ENV!=="production"&&(Tu.propTypes={children:Tl(mt.node,t=>ki.toArray(t.children).some(e=>io(e)&&e.props.onClick)?new Error(["MUI: You are providing an onClick event listener to a child of a button element.","Prefer applying it to the IconButton directly.","This guarantees that the whole <button> will be responsive to click events."].join(`
|
|
1000
|
-
`)):null),classes:mt.object,className:mt.string,color:mt.oneOfType([mt.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),mt.string]),disabled:mt.bool,disableFocusRipple:mt.bool,disableRipple:mt.bool,edge:mt.oneOf(["end","start",!1]),id:mt.string,loading:mt.bool,loadingIndicator:mt.node,size:mt.oneOfType([mt.oneOf(["small","medium","large"]),mt.string]),sx:mt.oneOfType([mt.arrayOf(mt.oneOfType([mt.func,mt.object,mt.bool])),mt.func,mt.object])});function lhe({fill:t="rgba(38, 46, 61, 0.67)"}){return Bt("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:Bt("path",{fill:t,d:"M11.5 21a8.5 8.5 0 1 1 0-17 8.5 8.5 0 0 1 0 17zM13 8.878c0-1.27-.499-1.896-1.496-1.878C10.501 7.03 10 7.68 10 8.95c0 .737.17 1.647.51 2.731l.318.98c.081.245.14.413.175.503.197.533.376.811.537.835.15.018.314-.248.493-.8.083-.257.161-.512.233-.763.071-.252.146-.503.224-.755.34-1.12.51-2.054.51-2.803zM11.5 18a1 1 0 1 0 0-2 1 1 0 0 0 0 2z"})})}function che({title:t,description:e,errorMessages:o=[],styleOptions:n,onRefresh:i}){var r,a,s;const[l,d]=le(null),{themeSettings:b}=En(),{typography:{primaryTextColor:C,secondaryTextColor:u,fontFamily:j}}=b,{t:A}=Fi(),p=H=>{d(H.currentTarget)},I=()=>{d(null)},W=he(()=>t?Bt(Tr,{variant:"body2",style:{color:C,fontFamily:j,fontSize:13},children:t}):null,[t,C,j]),q=he(()=>o.length===0?null:o.map(H=>We(ia,{children:[Bt(su,{sx:{my:1,borderColor:u,opacity:.3,marginY:"8px"}}),We("div",{className:"csdk-flex",children:[Bt("div",{className:"csdk-shrink-0 csdk-grow-0",children:Bt(lhe,{fill:"#fa5656"})}),Bt(Tr,{variant:"body2",className:"csdk-grow-1",style:{color:u,fontFamily:j,fontSize:13,marginLeft:5,lineHeight:"24px",letterSpacing:"normal",overflowWrap:"anywhere"},children:H})]})]})),[o,u,j]),X=he(()=>e?We(ia,{children:[Bt(su,{sx:{my:"8px",borderColor:u,opacity:.3}}),Bt(Tr,{variant:"body2",style:{color:u,fontFamily:j,fontSize:13},children:e})]}):null,[e,u,j]);return We(ia,{children:[Bt(Kw,{title:A("widgetHeader.info.tooltip"),style:{color:(r=b.chart)==null?void 0:r.textColor,fontFamily:(a=b.typography)==null?void 0:a.fontFamily},children:Bt(Tu,{onClick:p,sx:{p:0},children:Bt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",children:Bt("path",{fill:(n==null?void 0:n.titleTextColor)||b.widget.header.titleTextColor,d:"M11.5 20a7.5 7.5 0 1 1 0-15 7.5 7.5 0 0 1 0 15zm0-1a6.5 6.5 0 1 0 0-13 6.5 6.5 0 0 0 0 13zm-.5-8h1v5h-1v-5zm0-1v-.998h1V10h-1z"})})})}),Bt(oL,{open:!!l,position:l?{anchorEl:l,anchorOrigin:{vertical:"bottom",horizontal:"center"},contentOrigin:{vertical:"top",horizontal:"center"}}:void 0,onClose:I,children:We(ZK,{raised:!0,className:"csdk-max-w-xs csdk-w-[300px]",children:[We("div",{className:"csdk-flex csdk-flex-row csdk-justify-between csdk-items-center csdk-py-[5px] csdk-px-[12px]",style:{backgroundColor:rO(b.general.backgroundColor)},children:[Bt(Tr,{variant:"subtitle2",sx:{fontWeight:"bold"},style:{color:b.typography.primaryTextColor,fontFamily:b.typography.fontFamily},children:A("widgetHeader.info.details")}),Bt(Tu,{onClick:i,sx:{p:0},children:Bt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",children:Bt("path",{fill:(s=b.chart)==null?void 0:s.textColor,d:"M20 12a8 8 0 0 1-15.259 3.368l1.004-.222a7 7 0 0 0 13.252-2.925L20 12zm0 0a8 8 0 0 1-15.259 3.368l1.004-.222a7 7 0 0 0 13.252-2.925L20 12zm-8-7a7 7 0 0 1 6.267 3.877l1.003-.22A8.001 8.001 0 0 0 4 12l1.003-.22A7 7 0 0 1 12 5zm6.998 3.12A8 8 0 0 0 4 12l1.003-.22a7 7 0 0 1 13.264-2.903l.73-.16v.28l-2.98.016-.017.971h3.985V6h-.987v2.12zm-14.01 9.864H4V14h3.985l-.016.971-2.981.017v2.996z"})})})]}),Bt(su,{sx:{borderColor:b.typography.secondaryTextColor,opacity:.3}}),We(KK,{style:{backgroundColor:b.general.backgroundColor,padding:12},children:[W,q,X]})]})})]})}const uhe=({title:t,description:e,errorMessages:o=[],warningMessages:n=[],dataSetName:i,styleOptions:r,onRefresh:a})=>{var s;const{themeSettings:l}=En(),d=()=>{var b;const C=Bt(ia,{children:Bt(che,{title:i,description:e,styleOptions:r,errorMessages:o,warningMessages:n,onRefresh:a})});return r!=null&&r.renderToolbar?(b=r==null?void 0:r.renderToolbar)==null?void 0:b.call(r,a,C):C};return We(ia,{children:[We("div",{className:"csdk-flex csdk-flex-row csdk-items-center csdk-px-2 csdk-min-h-[32px]",style:{backgroundColor:(r==null?void 0:r.backgroundColor)||l.widget.header.backgroundColor},children:[Bt("div",{className:"csdk-w-full csdk-whitespace-nowrap csdk-overflow-hidden",style:{textAlign:dhe((r==null?void 0:r.titleAlignment)||l.widget.header.titleAlignment),color:(r==null?void 0:r.titleTextColor)||l.widget.header.titleTextColor,fontFamily:(s=l.typography)==null?void 0:s.fontFamily,fontSize:l.widget.header.titleFontSize},children:t||""}),Bt("div",{className:"csdk-ml-auto csdk-flex csdk-items-center",children:d()})]}),tc(r,"dividerLine",l.widget.header.dividerLine)&&Bt(su,{style:{backgroundColor:(r==null?void 0:r.dividerLineColor)||l.widget.header.dividerLineColor||"#e6e6e6"}})]})};function dhe(t){return t.toLowerCase()}const JK=t=>Bt(zpe,{children:Bt(phe,Lt({},t))}),phe=({dataSetName:t,styleOptions:e,title:o,description:n,topSlot:i,bottomSlot:r,children:a,onRefresh:s=()=>{}})=>{var l,d,b;const{errors:C,warnings:u}=GK(),{themeSettings:j}=En();return Bt("div",{className:"csdk-w-full csdk-h-full csdk-overflow-hidden csdk-accessible",children:Bt("div",{className:"csdk-h-full",style:{padding:qK[tc(e,"spaceAround",j.widget.spaceAround)]||"0px"},children:We("div",{className:"csdk-h-full csdk-overflow-hidden",style:{backgroundColor:(e==null?void 0:e.backgroundColor)||"unset",borderWidth:tc(e,"border",j.widget.border)?"1px":0,borderColor:(e==null?void 0:e.borderColor)||j.widget.borderColor,borderRadius:Wpe[(e==null?void 0:e.cornerRadius)||j.widget.cornerRadius]||0,boxShadow:Vpe(e,j),display:"flex",flexDirection:"column"},children:[!((l=e==null?void 0:e.header)!=null&&l.hidden)&&Bt(uhe,{title:o,description:n,dataSetName:t,errorMessages:C,warningMessages:u,styleOptions:e==null?void 0:e.header,onRefresh:s}),i,Bt(gq,{theme:{chart:{backgroundColor:(e==null?void 0:e.backgroundColor)||((d=j.chart)==null?void 0:d.backgroundColor)}},children:Bt("div",{style:{flexGrow:1,minWidth:0,minHeight:0,backgroundColor:(e==null?void 0:e.backgroundColor)||((b=j.chart)==null?void 0:b.backgroundColor)},children:a})}),r]})})})},hhe=t=>{const e=fhe(t);return e.config.disabled=!t.config.disabled,e},fhe=t=>{const e=xr(t);return Object.setPrototypeOf(e,t),e};function mhe(t,e,o){return yc(t,[],{guid:e,excludeMembers:!1,backgroundFilter:o})}function Jw(t){if(!k1(t))throw new ze("errors.notAMembersFilter");const{attribute:e,config:{guid:o,backgroundFilter:n}}=t;return mhe(e,o,n)}function qL(t){return"members"in t&&t.members.length===0}function la(t,e){return t.expression===(e==null?void 0:e.expression)&&t.granularity===e.granularity}function QK(t,e){return t===void 0&&e===void 0?!1:[t,e].some(o=>o===void 0)||t.length!==e.length?!0:t.length===0&&e.length===0?!1:t.some((o,n)=>!QY(o,e[n],tJ))}function ZL(t,e){return la(t.attribute,e.attribute)}function tJ(t,e){const o=ih(ghe,vhe);return cl(o(t),o(e))}function ghe(t){return Vt(Lt({},t),{name:""})}function vhe(t){return Vt(Lt({},t),{config:Vt(Lt({},t.config),{guid:""})})}function yhe(t,e,o,n){if(o===void 0&&n===void 0)return!1;if([o,n].some(r=>r===void 0))return!0;function i(r,a){const s=r,l=r,d=a,b=a;return r===void 0&&a===void 0?!0:[r,a].some(C=>C===void 0)||s.operator!==d.operator?!1:l.instanceid&&b.instanceid?!QK(t==null?void 0:t.filter(C=>C.config.guid===l.instanceid),e==null?void 0:e.filter(C=>C.config.guid===b.instanceid)):i(s.left,d.left)&&i(s.right,d.right)||i(s.left,d.right)&&i(s.right,d.left)}return!i(o,n)}const eJ="sdkHookInit",bhe=(t,e,o,n)=>{o&&gX(eJ,{packageName:e,packageVersion:"2.3.0",hookName:t},o.httpClient).finally(n)};function xhe(t){const{tracking:e,app:o}=Xn(),{trackEvent:n}=RO(),i=Yt(!1);ae(()=>{if(!(!e||!o)&&!i.current){const r={packageName:e.packageName||"sdk-ui",packageVersion:"2.3.0",hookName:t};n(eJ,r,!e.enabled).finally(()=>i.current=!0)}},[e,t,n,o])}const oJ=t=>e=>(...o)=>(xhe(t),e(...o));function AA(t,e){switch(e.type){case"loading":return whe(t);case"success":return _he(e.data);case"error":return She(e.error)}}function whe(t){return t.status==="loading"?t:Vt(Lt({},t),{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0})}function _he(t){return{isLoading:!1,isError:!1,isSuccess:!0,data:t,status:"success",error:void 0}}function She(t){return{isLoading:!1,isError:!0,isSuccess:!1,data:void 0,status:"error",error:t}}function nJ({enabled:t},e){const o=Yt(!1);return me((n,i=!1)=>{const r=t===!1||!n,a=o.current;return o.current=r,!r&&(a||e||i)},[t,e])}var _2=function(){return Hi.Date.now()},Che="Expected a function",The=Math.max,Mhe=Math.min;function khe(t,e,o){var n,i,r,a,s,l,d=0,b=!1,C=!1,u=!0;if(typeof t!="function")throw new TypeError(Che);e=Hm(e)||0,Ai(o)&&(b=!!o.leading,C="maxWait"in o,r=C?The(Hm(o.maxWait)||0,e):r,u="trailing"in o?!!o.trailing:u);function j($){var z=n,N=i;return n=i=void 0,d=$,a=t.apply(N,z),a}function A($){return d=$,s=setTimeout(W,e),b?j($):a}function p($){var z=$-l,N=$-d,V=e-z;return C?Mhe(V,r-N):V}function I($){var z=$-l,N=$-d;return l===void 0||z>=e||z<0||C&&N>=r}function W(){var $=_2();if(I($))return q($);s=setTimeout(W,p($))}function q($){return s=void 0,u&&n?j($):(n=i=void 0,a)}function X(){s!==void 0&&clearTimeout(s),d=0,n=l=i=s=void 0}function H(){return s===void 0?a:q(_2())}function D(){var $=_2(),z=I($);if(n=arguments,i=this,l=$,z){if(s===void 0)return A(l);if(C)return clearTimeout(s),s=setTimeout(W,e),j(l)}return s===void 0&&(s=setTimeout(W,e)),a}return D.cancel=X,D.flush=H,D}function KL(t,{onLocalStateChange:e,syncCompareFn:o=cl}={}){const[n,i]=le(t),r=Yt(t);ae(()=>{o(r.current,t)||i(t),r.current=t},[t,o]);const a=me(s=>{i(l=>{const d=sl(s)?s(l):s;return e==null||e(d),d})},[e]);return[n,a]}function Ahe({chartType:t,dataOptions:e,enabled:o}){const[n,i]=le([]),r=he(()=>{var C;const u=Fa(t)&&((C=e.category)==null?void 0:C.length)===1||Ia(t);return o&&u},[o,t,e]),a=he(()=>{if(n.length===0)return C=>Vt(Lt({},C),{series:C.series.map(u=>Vt(Lt({},u),{data:u.data.map(j=>Vt(Lt({},j),{selected:!1}))}))});if(Ia(t))return C=>Vt(Lt({},C),{series:C.series.map(u=>Vt(Lt({},u),{data:u.data.map(j=>Vt(Lt({},j),{selected:!n.some(A=>{var p,I;return A.x===j.x&&A.y===j.y&&A.size===j.z&&A.breakByPoint===((p=j.custom)==null?void 0:p.maskedBreakByPoint)&&A.breakByColor===((I=j.custom)==null?void 0:I.maskedBreakByColor)})}))}))});{const C=n.reduce((u,{categoryValue:j})=>(j&&(u[`${j}`]=!0),u),{});return u=>Vt(Lt({},u),{series:u.series.map(j=>Vt(Lt({},j),{data:j.data.map(A=>{var p,I;return C[(I=(p=A.custom)==null?void 0:p.xValue)==null?void 0:I[0]]?A:Vt(Lt({},A),{selected:!0})})}))})}},[n,t]),s=he(()=>C=>{var u;return Vt(Lt({},C),{chart:Vt(Lt({},C.chart),{events:Vt(Lt({},(u=C.chart)==null?void 0:u.events),{click:()=>{i([])}})})})},[]),l=me(C=>(r&&(C=a(C),C=s(C)),C),[a,s,r]),d=me(C=>{r&&i(C)},[r]),b=me(C=>{r&&i([C])},[r]);return{onBeforeRender:l,onDataPointsSelected:d,onDataPointClick:b}}const iJ=()=>{const t=Qx();if(!t)throw new ze("errors.missingMenuRoot");const{openMenu:e,closeMenu:o}=t;return{openMenu:e,closeMenu:o}};function EA(t){return t&&t.length?sL(t):[]}function Ehe(t,e,o,n){for(var i=-1,r=t==null?0:t.length;++i<r;){var a=t[i];e(n,a,o(a),t)}return n}function Phe(t,e){return function(o,n){if(o==null)return o;if(!Tg(o))return t(o,n);for(var i=o.length,r=-1,a=Object(o);++r<i&&n(a[r],r,a)!==!1;);return o}}var Ohe=Phe(cE);function Lhe(t,e,o,n){return Ohe(t,function(i,r,a){e(n,i,o(i),a)}),n}function rJ(t,e){return function(o,n){var i=Ho(o)?Ehe:Lhe,r=e?e():{};return i(o,t,v1(n),r)}}var v0=rJ(function(t,e,o){t[o?0:1].push(e)},function(){return[[],[]]});const Nhe=dh(At("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz"),Dhe=Ue(Uu)(Un(({theme:t})=>Vt(Lt({display:"flex",marginLeft:`calc(${t.spacing(1)} * 0.5)`,marginRight:`calc(${t.spacing(1)} * 0.5)`},t.palette.mode==="light"?{backgroundColor:t.palette.grey[100],color:t.palette.grey[700]}:{backgroundColor:t.palette.grey[700],color:t.palette.grey[100]}),{borderRadius:2,"&:hover, &:focus":Lt({},t.palette.mode==="light"?{backgroundColor:t.palette.grey[200]}:{backgroundColor:t.palette.grey[600]}),"&:active":Lt({boxShadow:t.shadows[0]},t.palette.mode==="light"?{backgroundColor:Ck(t.palette.grey[200],.12)}:{backgroundColor:Ck(t.palette.grey[600],.12)})}))),Rhe=Ue(Nhe)({width:24,height:16});function aJ(t){const e=t,{slots:o={},slotProps:n={}}=e,i=Ae(e,["slots","slotProps"]),r=t;return At("li",{children:At(Dhe,Vt(Lt({focusRipple:!0},i),{ownerState:r,children:At(Rhe,Lt({as:o.CollapsedIcon,ownerState:r},n.collapsedIcon))}))})}process.env.NODE_ENV!=="production"&&(aJ.propTypes={slotProps:mt.shape({collapsedIcon:mt.oneOfType([mt.func,mt.object])}),slots:mt.shape({CollapsedIcon:mt.elementType}),sx:mt.object});function Ihe(t){return ln("MuiBreadcrumbs",t)}const jhe=cn("MuiBreadcrumbs",["root","ol","li","separator"]),$he=t=>{const{classes:e}=t;return Pn({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},Ihe,e)},zhe=Ue(Tr,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(t,e)=>[{[`& .${jhe.li}`]:e.li},e.root]})({}),Bhe=Ue("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(t,e)=>e.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),Fhe=Ue("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(t,e)=>e.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function Hhe(t,e,o,n){return t.reduce((i,r,a)=>(a<t.length-1?i=i.concat(r,At(Fhe,{"aria-hidden":!0,className:e,ownerState:n,children:o},`separator-${a}`)):i.push(r),i),[])}const sJ=ye(function(t,e){const o=_n({props:t,name:"MuiBreadcrumbs"}),n=o,{children:i,className:r,component:a="nav",slots:s={},slotProps:l={},expandText:d="Show path",itemsAfterCollapse:b=1,itemsBeforeCollapse:C=1,maxItems:u=8,separator:j="/"}=n,A=Ae(n,["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"]),[p,I]=le(!1),W=Vt(Lt({},o),{component:a,expanded:p,expandText:d,itemsAfterCollapse:b,itemsBeforeCollapse:C,maxItems:u,separator:j}),q=$he(W),X=BO({elementType:s.CollapsedIcon,externalSlotProps:l.collapsedIcon,ownerState:W}),H=Yt(null),D=z=>{const N=()=>{I(!0);const V=H.current.querySelector("a[href],button,[tabindex]");V&&V.focus()};return C+b>=z.length?(process.env.NODE_ENV!=="production"&&console.error(["MUI: You have provided an invalid combination of props to the Breadcrumbs.",`itemsAfterCollapse={${b}} + itemsBeforeCollapse={${C}} >= maxItems={${u}}`].join(`
|
|
1000
|
+
`)):null),classes:mt.object,className:mt.string,color:mt.oneOfType([mt.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),mt.string]),disabled:mt.bool,disableFocusRipple:mt.bool,disableRipple:mt.bool,edge:mt.oneOf(["end","start",!1]),id:mt.string,loading:mt.bool,loadingIndicator:mt.node,size:mt.oneOfType([mt.oneOf(["small","medium","large"]),mt.string]),sx:mt.oneOfType([mt.arrayOf(mt.oneOfType([mt.func,mt.object,mt.bool])),mt.func,mt.object])});function lhe({fill:t="rgba(38, 46, 61, 0.67)"}){return Bt("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:Bt("path",{fill:t,d:"M11.5 21a8.5 8.5 0 1 1 0-17 8.5 8.5 0 0 1 0 17zM13 8.878c0-1.27-.499-1.896-1.496-1.878C10.501 7.03 10 7.68 10 8.95c0 .737.17 1.647.51 2.731l.318.98c.081.245.14.413.175.503.197.533.376.811.537.835.15.018.314-.248.493-.8.083-.257.161-.512.233-.763.071-.252.146-.503.224-.755.34-1.12.51-2.054.51-2.803zM11.5 18a1 1 0 1 0 0-2 1 1 0 0 0 0 2z"})})}function che({title:t,description:e,errorMessages:o=[],styleOptions:n,onRefresh:i}){var r,a,s;const[l,d]=le(null),{themeSettings:b}=En(),{typography:{primaryTextColor:C,secondaryTextColor:u,fontFamily:j}}=b,{t:A}=Fi(),p=H=>{d(H.currentTarget)},I=()=>{d(null)},W=he(()=>t?Bt(Tr,{variant:"body2",style:{color:C,fontFamily:j,fontSize:13},children:t}):null,[t,C,j]),q=he(()=>o.length===0?null:o.map(H=>We(ia,{children:[Bt(su,{sx:{my:1,borderColor:u,opacity:.3,marginY:"8px"}}),We("div",{className:"csdk-flex",children:[Bt("div",{className:"csdk-shrink-0 csdk-grow-0",children:Bt(lhe,{fill:"#fa5656"})}),Bt(Tr,{variant:"body2",className:"csdk-grow-1",style:{color:u,fontFamily:j,fontSize:13,marginLeft:5,lineHeight:"24px",letterSpacing:"normal",overflowWrap:"anywhere"},children:H})]})]})),[o,u,j]),X=he(()=>e?We(ia,{children:[Bt(su,{sx:{my:"8px",borderColor:u,opacity:.3}}),Bt(Tr,{variant:"body2",style:{color:u,fontFamily:j,fontSize:13},children:e})]}):null,[e,u,j]);return We(ia,{children:[Bt(Kw,{title:A("widgetHeader.info.tooltip"),style:{color:(r=b.chart)==null?void 0:r.textColor,fontFamily:(a=b.typography)==null?void 0:a.fontFamily},children:Bt(Tu,{onClick:p,sx:{p:0},children:Bt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",children:Bt("path",{fill:(n==null?void 0:n.titleTextColor)||b.widget.header.titleTextColor,d:"M11.5 20a7.5 7.5 0 1 1 0-15 7.5 7.5 0 0 1 0 15zm0-1a6.5 6.5 0 1 0 0-13 6.5 6.5 0 0 0 0 13zm-.5-8h1v5h-1v-5zm0-1v-.998h1V10h-1z"})})})}),Bt(oL,{open:!!l,position:l?{anchorEl:l,anchorOrigin:{vertical:"bottom",horizontal:"center"},contentOrigin:{vertical:"top",horizontal:"center"}}:void 0,onClose:I,children:We(ZK,{raised:!0,className:"csdk-max-w-xs csdk-w-[300px]",children:[We("div",{className:"csdk-flex csdk-flex-row csdk-justify-between csdk-items-center csdk-py-[5px] csdk-px-[12px]",style:{backgroundColor:rO(b.general.backgroundColor)},children:[Bt(Tr,{variant:"subtitle2",sx:{fontWeight:"bold"},style:{color:b.typography.primaryTextColor,fontFamily:b.typography.fontFamily},children:A("widgetHeader.info.details")}),Bt(Tu,{onClick:i,sx:{p:0},children:Bt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",children:Bt("path",{fill:(s=b.chart)==null?void 0:s.textColor,d:"M20 12a8 8 0 0 1-15.259 3.368l1.004-.222a7 7 0 0 0 13.252-2.925L20 12zm0 0a8 8 0 0 1-15.259 3.368l1.004-.222a7 7 0 0 0 13.252-2.925L20 12zm-8-7a7 7 0 0 1 6.267 3.877l1.003-.22A8.001 8.001 0 0 0 4 12l1.003-.22A7 7 0 0 1 12 5zm6.998 3.12A8 8 0 0 0 4 12l1.003-.22a7 7 0 0 1 13.264-2.903l.73-.16v.28l-2.98.016-.017.971h3.985V6h-.987v2.12zm-14.01 9.864H4V14h3.985l-.016.971-2.981.017v2.996z"})})})]}),Bt(su,{sx:{borderColor:b.typography.secondaryTextColor,opacity:.3}}),We(KK,{style:{backgroundColor:b.general.backgroundColor,padding:12},children:[W,q,X]})]})})]})}const uhe=({title:t,description:e,errorMessages:o=[],warningMessages:n=[],dataSetName:i,styleOptions:r,onRefresh:a})=>{var s;const{themeSettings:l}=En(),d=()=>{var b;const C=Bt(ia,{children:Bt(che,{title:i,description:e,styleOptions:r,errorMessages:o,warningMessages:n,onRefresh:a})});return r!=null&&r.renderToolbar?(b=r==null?void 0:r.renderToolbar)==null?void 0:b.call(r,a,C):C};return We(ia,{children:[We("div",{className:"csdk-flex csdk-flex-row csdk-items-center csdk-px-2 csdk-min-h-[32px]",style:{backgroundColor:(r==null?void 0:r.backgroundColor)||l.widget.header.backgroundColor},children:[Bt("div",{className:"csdk-w-full csdk-whitespace-nowrap csdk-overflow-hidden",style:{textAlign:dhe((r==null?void 0:r.titleAlignment)||l.widget.header.titleAlignment),color:(r==null?void 0:r.titleTextColor)||l.widget.header.titleTextColor,fontFamily:(s=l.typography)==null?void 0:s.fontFamily,fontSize:l.widget.header.titleFontSize},children:t||""}),Bt("div",{className:"csdk-ml-auto csdk-flex csdk-items-center",children:d()})]}),tc(r,"dividerLine",l.widget.header.dividerLine)&&Bt(su,{style:{backgroundColor:(r==null?void 0:r.dividerLineColor)||l.widget.header.dividerLineColor||"#e6e6e6"}})]})};function dhe(t){return t.toLowerCase()}const JK=t=>Bt(zpe,{children:Bt(phe,Lt({},t))}),phe=({dataSetName:t,styleOptions:e,title:o,description:n,topSlot:i,bottomSlot:r,children:a,onRefresh:s=()=>{}})=>{var l,d,b;const{errors:C,warnings:u}=GK(),{themeSettings:j}=En();return Bt("div",{className:"csdk-w-full csdk-h-full csdk-overflow-hidden csdk-accessible",children:Bt("div",{className:"csdk-h-full",style:{padding:qK[tc(e,"spaceAround",j.widget.spaceAround)]||"0px"},children:We("div",{className:"csdk-h-full csdk-overflow-hidden",style:{backgroundColor:(e==null?void 0:e.backgroundColor)||"unset",borderWidth:tc(e,"border",j.widget.border)?"1px":0,borderColor:(e==null?void 0:e.borderColor)||j.widget.borderColor,borderRadius:Wpe[(e==null?void 0:e.cornerRadius)||j.widget.cornerRadius]||0,boxShadow:Vpe(e,j),display:"flex",flexDirection:"column"},children:[!((l=e==null?void 0:e.header)!=null&&l.hidden)&&Bt(uhe,{title:o,description:n,dataSetName:t,errorMessages:C,warningMessages:u,styleOptions:e==null?void 0:e.header,onRefresh:s}),i,Bt(gq,{theme:{chart:{backgroundColor:(e==null?void 0:e.backgroundColor)||((d=j.chart)==null?void 0:d.backgroundColor)}},children:Bt("div",{style:{flexGrow:1,minWidth:0,minHeight:0,backgroundColor:(e==null?void 0:e.backgroundColor)||((b=j.chart)==null?void 0:b.backgroundColor)},children:a})}),r]})})})},hhe=t=>{const e=fhe(t);return e.config.disabled=!t.config.disabled,e},fhe=t=>{const e=xr(t);return Object.setPrototypeOf(e,t),e};function mhe(t,e,o){return yc(t,[],{guid:e,excludeMembers:!1,backgroundFilter:o})}function Jw(t){if(!k1(t))throw new ze("errors.notAMembersFilter");const{attribute:e,config:{guid:o,backgroundFilter:n}}=t;return mhe(e,o,n)}function qL(t){return"members"in t&&t.members.length===0}function la(t,e){return t.expression===(e==null?void 0:e.expression)&&t.granularity===e.granularity}function QK(t,e){return t===void 0&&e===void 0?!1:[t,e].some(o=>o===void 0)||t.length!==e.length?!0:t.length===0&&e.length===0?!1:t.some((o,n)=>!QY(o,e[n],tJ))}function ZL(t,e){return la(t.attribute,e.attribute)}function tJ(t,e){const o=ih(ghe,vhe);return cl(o(t),o(e))}function ghe(t){return Vt(Lt({},t),{name:""})}function vhe(t){return Vt(Lt({},t),{config:Vt(Lt({},t.config),{guid:""})})}function yhe(t,e,o,n){if(o===void 0&&n===void 0)return!1;if([o,n].some(r=>r===void 0))return!0;function i(r,a){const s=r,l=r,d=a,b=a;return r===void 0&&a===void 0?!0:[r,a].some(C=>C===void 0)||s.operator!==d.operator?!1:l.instanceid&&b.instanceid?!QK(t==null?void 0:t.filter(C=>C.config.guid===l.instanceid),e==null?void 0:e.filter(C=>C.config.guid===b.instanceid)):i(s.left,d.left)&&i(s.right,d.right)||i(s.left,d.right)&&i(s.right,d.left)}return!i(o,n)}const eJ="sdkHookInit",bhe=(t,e,o,n)=>{o&&gX(eJ,{packageName:e,packageVersion:"2.3.1",hookName:t},o.httpClient).finally(n)};function xhe(t){const{tracking:e,app:o}=Xn(),{trackEvent:n}=RO(),i=Yt(!1);ae(()=>{if(!(!e||!o)&&!i.current){const r={packageName:e.packageName||"sdk-ui",packageVersion:"2.3.1",hookName:t};n(eJ,r,!e.enabled).finally(()=>i.current=!0)}},[e,t,n,o])}const oJ=t=>e=>(...o)=>(xhe(t),e(...o));function AA(t,e){switch(e.type){case"loading":return whe(t);case"success":return _he(e.data);case"error":return She(e.error)}}function whe(t){return t.status==="loading"?t:Vt(Lt({},t),{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0})}function _he(t){return{isLoading:!1,isError:!1,isSuccess:!0,data:t,status:"success",error:void 0}}function She(t){return{isLoading:!1,isError:!0,isSuccess:!1,data:void 0,status:"error",error:t}}function nJ({enabled:t},e){const o=Yt(!1);return me((n,i=!1)=>{const r=t===!1||!n,a=o.current;return o.current=r,!r&&(a||e||i)},[t,e])}var _2=function(){return Hi.Date.now()},Che="Expected a function",The=Math.max,Mhe=Math.min;function khe(t,e,o){var n,i,r,a,s,l,d=0,b=!1,C=!1,u=!0;if(typeof t!="function")throw new TypeError(Che);e=Hm(e)||0,Ai(o)&&(b=!!o.leading,C="maxWait"in o,r=C?The(Hm(o.maxWait)||0,e):r,u="trailing"in o?!!o.trailing:u);function j($){var z=n,N=i;return n=i=void 0,d=$,a=t.apply(N,z),a}function A($){return d=$,s=setTimeout(W,e),b?j($):a}function p($){var z=$-l,N=$-d,V=e-z;return C?Mhe(V,r-N):V}function I($){var z=$-l,N=$-d;return l===void 0||z>=e||z<0||C&&N>=r}function W(){var $=_2();if(I($))return q($);s=setTimeout(W,p($))}function q($){return s=void 0,u&&n?j($):(n=i=void 0,a)}function X(){s!==void 0&&clearTimeout(s),d=0,n=l=i=s=void 0}function H(){return s===void 0?a:q(_2())}function D(){var $=_2(),z=I($);if(n=arguments,i=this,l=$,z){if(s===void 0)return A(l);if(C)return clearTimeout(s),s=setTimeout(W,e),j(l)}return s===void 0&&(s=setTimeout(W,e)),a}return D.cancel=X,D.flush=H,D}function KL(t,{onLocalStateChange:e,syncCompareFn:o=cl}={}){const[n,i]=le(t),r=Yt(t);ae(()=>{o(r.current,t)||i(t),r.current=t},[t,o]);const a=me(s=>{i(l=>{const d=sl(s)?s(l):s;return e==null||e(d),d})},[e]);return[n,a]}function Ahe({chartType:t,dataOptions:e,enabled:o}){const[n,i]=le([]),r=he(()=>{var C;const u=Fa(t)&&((C=e.category)==null?void 0:C.length)===1||Ia(t);return o&&u},[o,t,e]),a=he(()=>{if(n.length===0)return C=>Vt(Lt({},C),{series:C.series.map(u=>Vt(Lt({},u),{data:u.data.map(j=>Vt(Lt({},j),{selected:!1}))}))});if(Ia(t))return C=>Vt(Lt({},C),{series:C.series.map(u=>Vt(Lt({},u),{data:u.data.map(j=>Vt(Lt({},j),{selected:!n.some(A=>{var p,I;return A.x===j.x&&A.y===j.y&&A.size===j.z&&A.breakByPoint===((p=j.custom)==null?void 0:p.maskedBreakByPoint)&&A.breakByColor===((I=j.custom)==null?void 0:I.maskedBreakByColor)})}))}))});{const C=n.reduce((u,{categoryValue:j})=>(j&&(u[`${j}`]=!0),u),{});return u=>Vt(Lt({},u),{series:u.series.map(j=>Vt(Lt({},j),{data:j.data.map(A=>{var p,I;return C[(I=(p=A.custom)==null?void 0:p.xValue)==null?void 0:I[0]]?A:Vt(Lt({},A),{selected:!0})})}))})}},[n,t]),s=he(()=>C=>{var u;return Vt(Lt({},C),{chart:Vt(Lt({},C.chart),{events:Vt(Lt({},(u=C.chart)==null?void 0:u.events),{click:()=>{i([])}})})})},[]),l=me(C=>(r&&(C=a(C),C=s(C)),C),[a,s,r]),d=me(C=>{r&&i(C)},[r]),b=me(C=>{r&&i([C])},[r]);return{onBeforeRender:l,onDataPointsSelected:d,onDataPointClick:b}}const iJ=()=>{const t=Qx();if(!t)throw new ze("errors.missingMenuRoot");const{openMenu:e,closeMenu:o}=t;return{openMenu:e,closeMenu:o}};function EA(t){return t&&t.length?sL(t):[]}function Ehe(t,e,o,n){for(var i=-1,r=t==null?0:t.length;++i<r;){var a=t[i];e(n,a,o(a),t)}return n}function Phe(t,e){return function(o,n){if(o==null)return o;if(!Tg(o))return t(o,n);for(var i=o.length,r=-1,a=Object(o);++r<i&&n(a[r],r,a)!==!1;);return o}}var Ohe=Phe(cE);function Lhe(t,e,o,n){return Ohe(t,function(i,r,a){e(n,i,o(i),a)}),n}function rJ(t,e){return function(o,n){var i=Ho(o)?Ehe:Lhe,r=e?e():{};return i(o,t,v1(n),r)}}var v0=rJ(function(t,e,o){t[o?0:1].push(e)},function(){return[[],[]]});const Nhe=dh(At("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz"),Dhe=Ue(Uu)(Un(({theme:t})=>Vt(Lt({display:"flex",marginLeft:`calc(${t.spacing(1)} * 0.5)`,marginRight:`calc(${t.spacing(1)} * 0.5)`},t.palette.mode==="light"?{backgroundColor:t.palette.grey[100],color:t.palette.grey[700]}:{backgroundColor:t.palette.grey[700],color:t.palette.grey[100]}),{borderRadius:2,"&:hover, &:focus":Lt({},t.palette.mode==="light"?{backgroundColor:t.palette.grey[200]}:{backgroundColor:t.palette.grey[600]}),"&:active":Lt({boxShadow:t.shadows[0]},t.palette.mode==="light"?{backgroundColor:Ck(t.palette.grey[200],.12)}:{backgroundColor:Ck(t.palette.grey[600],.12)})}))),Rhe=Ue(Nhe)({width:24,height:16});function aJ(t){const e=t,{slots:o={},slotProps:n={}}=e,i=Ae(e,["slots","slotProps"]),r=t;return At("li",{children:At(Dhe,Vt(Lt({focusRipple:!0},i),{ownerState:r,children:At(Rhe,Lt({as:o.CollapsedIcon,ownerState:r},n.collapsedIcon))}))})}process.env.NODE_ENV!=="production"&&(aJ.propTypes={slotProps:mt.shape({collapsedIcon:mt.oneOfType([mt.func,mt.object])}),slots:mt.shape({CollapsedIcon:mt.elementType}),sx:mt.object});function Ihe(t){return ln("MuiBreadcrumbs",t)}const jhe=cn("MuiBreadcrumbs",["root","ol","li","separator"]),$he=t=>{const{classes:e}=t;return Pn({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},Ihe,e)},zhe=Ue(Tr,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(t,e)=>[{[`& .${jhe.li}`]:e.li},e.root]})({}),Bhe=Ue("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(t,e)=>e.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),Fhe=Ue("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(t,e)=>e.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function Hhe(t,e,o,n){return t.reduce((i,r,a)=>(a<t.length-1?i=i.concat(r,At(Fhe,{"aria-hidden":!0,className:e,ownerState:n,children:o},`separator-${a}`)):i.push(r),i),[])}const sJ=ye(function(t,e){const o=_n({props:t,name:"MuiBreadcrumbs"}),n=o,{children:i,className:r,component:a="nav",slots:s={},slotProps:l={},expandText:d="Show path",itemsAfterCollapse:b=1,itemsBeforeCollapse:C=1,maxItems:u=8,separator:j="/"}=n,A=Ae(n,["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"]),[p,I]=le(!1),W=Vt(Lt({},o),{component:a,expanded:p,expandText:d,itemsAfterCollapse:b,itemsBeforeCollapse:C,maxItems:u,separator:j}),q=$he(W),X=BO({elementType:s.CollapsedIcon,externalSlotProps:l.collapsedIcon,ownerState:W}),H=Yt(null),D=z=>{const N=()=>{I(!0);const V=H.current.querySelector("a[href],button,[tabindex]");V&&V.focus()};return C+b>=z.length?(process.env.NODE_ENV!=="production"&&console.error(["MUI: You have provided an invalid combination of props to the Breadcrumbs.",`itemsAfterCollapse={${b}} + itemsBeforeCollapse={${C}} >= maxItems={${u}}`].join(`
|
|
1001
1001
|
`)),z):[...z.slice(0,C),At(aJ,{"aria-label":d,slots:{CollapsedIcon:s.CollapsedIcon},slotProps:{collapsedIcon:X},onClick:N},"ellipsis"),...z.slice(z.length-b,z.length)]},$=ki.toArray(i).filter(z=>(process.env.NODE_ENV!=="production"&&$O.isFragment(z)&&console.error(["MUI: The Breadcrumbs component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
|
|
1002
1002
|
`)),io(z))).map((z,N)=>At("li",{className:q.li,children:z},`child-${N}`));return At(zhe,Vt(Lt({ref:e,component:a,color:"textSecondary",className:oo(q.root,r),ownerState:W},A),{children:At(Bhe,{className:q.ol,ref:H,ownerState:W,children:Hhe(p||u&&$.length<=u?$:D($),q.separator,j,W)})}))});process.env.NODE_ENV!=="production"&&(sJ.propTypes={children:mt.node,classes:mt.object,className:mt.string,component:mt.elementType,expandText:mt.string,itemsAfterCollapse:ps,itemsBeforeCollapse:ps,maxItems:ps,separator:mt.node,slotProps:mt.shape({collapsedIcon:mt.oneOfType([mt.func,mt.object])}),slots:mt.shape({CollapsedIcon:mt.elementType}),sx:mt.oneOfType([mt.arrayOf(mt.oneOfType([mt.func,mt.object,mt.bool])),mt.func,mt.object])});function Whe(t){return ln("MuiButton",t)}const zc=cn("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),lJ=uo({});process.env.NODE_ENV!=="production"&&(lJ.displayName="ButtonGroupContext");const cJ=uo(void 0);process.env.NODE_ENV!=="production"&&(cJ.displayName="ButtonGroupButtonContext");const Vhe=t=>{const{color:e,disableElevation:o,fullWidth:n,size:i,variant:r,loading:a,loadingPosition:s,classes:l}=t,d={root:["root",a&&"loading",r,`${r}${Ke(e)}`,`size${Ke(i)}`,`${r}Size${Ke(i)}`,`color${Ke(e)}`,o&&"disableElevation",n&&"fullWidth",a&&`loadingPosition${Ke(s)}`],startIcon:["icon","startIcon",`iconSize${Ke(i)}`],endIcon:["icon","endIcon",`iconSize${Ke(i)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},b=Pn(d,Whe,l);return Lt(Lt({},l),b)},uJ=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],Uhe=Ue(Uu,{shouldForwardProp:t=>s0(t)||t==="classes",name:"MuiButton",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:o}=t;return[e.root,e[o.variant],e[`${o.variant}${Ke(o.color)}`],e[`size${Ke(o.size)}`],e[`${o.variant}Size${Ke(o.size)}`],o.color==="inherit"&&e.colorInherit,o.disableElevation&&e.disableElevation,o.fullWidth&&e.fullWidth,o.loading&&e.loading]}})(Un(({theme:t})=>{const e=t.palette.mode==="light"?t.palette.grey[300]:t.palette.grey[800],o=t.palette.mode==="light"?t.palette.grey.A100:t.palette.grey[700];return Vt(Lt({},t.typography.button),{minWidth:64,padding:"6px 16px",border:0,borderRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create(["background-color","box-shadow","border-color","color"],{duration:t.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${zc.disabled}`]:{color:(t.vars||t).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(t.vars||t).shadows[2],"&:hover":{boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2]}},"&:active":{boxShadow:(t.vars||t).shadows[8]},[`&.${zc.focusVisible}`]:{boxShadow:(t.vars||t).shadows[6]},[`&.${zc.disabled}`]:{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${zc.disabled}`]:{border:`1px solid ${(t.vars||t).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(t.palette).filter(mc()).map(([n])=>({props:{color:n},style:{"--variant-textColor":(t.vars||t).palette[n].main,"--variant-outlinedColor":(t.vars||t).palette[n].main,"--variant-outlinedBorder":t.vars?`rgba(${t.vars.palette[n].mainChannel} / 0.5)`:bn(t.palette[n].main,.5),"--variant-containedColor":(t.vars||t).palette[n].contrastText,"--variant-containedBg":(t.vars||t).palette[n].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(t.vars||t).palette[n].dark,"--variant-textBg":t.vars?`rgba(${t.vars.palette[n].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:bn(t.palette[n].main,t.palette.action.hoverOpacity),"--variant-outlinedBorder":(t.vars||t).palette[n].main,"--variant-outlinedBg":t.vars?`rgba(${t.vars.palette[n].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:bn(t.palette[n].main,t.palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":t.vars?t.vars.palette.Button.inheritContainedBg:e,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":t.vars?t.vars.palette.Button.inheritContainedHoverBg:o,"--variant-textBg":t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:bn(t.palette.text.primary,t.palette.action.hoverOpacity),"--variant-outlinedBg":t.vars?`rgba(${t.vars.palette.text.primaryChannel} / ${t.vars.palette.action.hoverOpacity})`:bn(t.palette.text.primary,t.palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:t.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:t.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:t.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:t.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:t.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:t.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${zc.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${zc.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:t.transitions.create(["background-color","box-shadow","border-color"],{duration:t.transitions.duration.short}),[`&.${zc.loading}`]:{color:"transparent"}}}]})})),Ghe=Ue("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(t,e)=>{const{ownerState:o}=t;return[e.startIcon,o.loading&&e.startIconLoadingStart,e[`iconSize${Ke(o.size)}`]]}})(({theme:t})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...uJ]})),Yhe=Ue("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(t,e)=>{const{ownerState:o}=t;return[e.endIcon,o.loading&&e.endIconLoadingEnd,e[`iconSize${Ke(o.size)}`]]}})(({theme:t})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...uJ]})),Xhe=Ue("span",{name:"MuiButton",slot:"LoadingIndicator",overridesResolver:(t,e)=>e.loadingIndicator})(({theme:t})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(t.vars||t).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),GF=Ue("span",{name:"MuiButton",slot:"LoadingIconPlaceholder",overridesResolver:(t,e)=>e.loadingIconPlaceholder})({display:"inline-block",width:"1em",height:"1em"}),gg=ye(function(t,e){const o=eo(lJ),n=eo(cJ),i=Qm(o,t),r=_n({props:i,name:"MuiButton"}),a=r,{children:s,color:l="primary",component:d="button",className:b,disabled:C=!1,disableElevation:u=!1,disableFocusRipple:j=!1,endIcon:A,focusVisibleClassName:p,fullWidth:I=!1,id:W,loading:q=null,loadingIndicator:X,loadingPosition:H="center",size:D="medium",startIcon:$,type:z,variant:N="text"}=a,V=Ae(a,["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","id","loading","loadingIndicator","loadingPosition","size","startIcon","type","variant"]),E=mw(W),x=X??At(XL,{"aria-labelledby":E,color:"inherit",size:16}),g=Vt(Lt({},r),{color:l,component:d,disabled:C,disableElevation:u,disableFocusRipple:j,fullWidth:I,loading:q,loadingIndicator:x,loadingPosition:H,size:D,type:z,variant:N}),S=Vhe(g),w=($||q&&H==="start")&&At(Ghe,{className:S.startIcon,ownerState:g,children:$||At(GF,{className:S.loadingIconPlaceholder,ownerState:g})}),P=(A||q&&H==="end")&&At(Yhe,{className:S.endIcon,ownerState:g,children:A||At(GF,{className:S.loadingIconPlaceholder,ownerState:g})}),U=n||"",Z=typeof q=="boolean"?At("span",{className:S.loadingWrapper,style:{display:"contents"},children:q&&At(Xhe,{className:S.loadingIndicator,ownerState:g,children:x})}):null;return At(Uhe,Vt(Lt({ownerState:g,className:oo(o.className,S.root,b,U),component:d,disabled:C||q,focusRipple:!j,focusVisibleClassName:oo(S.focusVisible,p),ref:e,type:z,id:q?E:W},V),{classes:S,children:[w,H!=="end"&&Z,s,H==="end"&&Z,P]}))});process.env.NODE_ENV!=="production"&&(gg.propTypes={children:mt.node,classes:mt.object,className:mt.string,color:mt.oneOfType([mt.oneOf(["inherit","primary","secondary","success","error","info","warning"]),mt.string]),component:mt.elementType,disabled:mt.bool,disableElevation:mt.bool,disableFocusRipple:mt.bool,disableRipple:mt.bool,endIcon:mt.node,focusVisibleClassName:mt.string,fullWidth:mt.bool,href:mt.string,id:mt.string,loading:mt.bool,loadingIndicator:mt.node,loadingPosition:mt.oneOf(["center","end","start"]),size:mt.oneOfType([mt.oneOf(["small","medium","large"]),mt.string]),startIcon:mt.node,sx:mt.oneOfType([mt.arrayOf(mt.oneOfType([mt.func,mt.object,mt.bool])),mt.func,mt.object]),type:mt.oneOfType([mt.oneOf(["button","reset","submit"]),mt.string]),variant:mt.oneOfType([mt.oneOf(["contained","outlined","text"]),mt.string])});const qhe=({clearDrilldownSelections:t,currentDimension:e,setIsHovered:o,themeProps:n})=>{const{t:i}=Fi(),r=e.name,a=Mi(gg,{target:"e1olvz1k0",label:"StyledCancelButton"})("&&{background-color:",n.activeDrillBackgroundColor,";color:",n.primaryButtonTextColor,";border-radius:100%;border:2px solid white;min-width:39px;width:39px;height:39px;z-index:10;padding:7px;cursor:pointer;text-transform:none;margin-right:-5px;&:hover{background-color:",n.activeDrillHoverBackgroundColor,";color:",n.primaryTextColor,";}}"),s=Mi("svg",{target:"e1olvz1k1",label:"Icon"})("width:22px;height:22px;fill:#9ea2ab;"),l=()=>Bt(a,{theme:n,onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),onClick:t,children:Bt(s,{width:22,height:22,viewBox:"0 0 24 24",children:Bt("path",{fill:"#9EA2AB",d:"M12 12.293L6.854 7.146a.5.5 0 1 0-.708.708L11.293 13l-5.147 5.146a.5.5 0 0 0 .708.708L12 13.707l5.146 5.147a.5.5 0 0 0 .708-.708L12.707 13l5.147-5.146a.5.5 0 0 0-.708-.708L12 12.293z"})})}),d=Mi(gg,{target:"e1olvz1k2",label:"StyledCurrentDrillButton"})("&&{position:relative;font-family:",b=>b.theme.fontFamily,";border-radius:0;border:1px solid ",vs,";background-color:",b=>b.theme.chartBackgroundColor,";border-right:none;border-left:none;color:",b=>b.theme.secondaryTextColor,";padding-right:1.25rem;padding-left:1.875rem;height:1.64rem;font-size:13px;transition:background-color 0.2s,border-color 0.2s,color 0.2s;text-transform:none;cursor:auto;pointer-events:none;white-space:nowrap;&:hover{background-color:",b=>b.theme.chartBackgroundColor,";border:1px solid ",vs,";border-right:none;border-left:none;}}");return{CancelButton:l,CurrentDrillButton:()=>We(d,{theme:n,children:[r," (",i("drilldown.breadcrumbsAllSuffix"),")",Bt("span",{className:"flex items-center justify-between",children:Bt("span",{className:"csdk-absolute csdk-right-[0px] csdk-top-[3px] csdk-h-[18px] csdk-w-[18px] csdk-transform csdk-translate-x-1/2 csdk-rotate-45",style:{backgroundColor:"transparent",borderTop:`1px solid ${vs}`,borderRight:`1px solid ${vs}`}})})]})}},Zhe={modifiers:[{name:"offset",options:{offset:[0,12]}}]},Khe=({themeProps:t,filterDisplayValues:e,currentTable:o,currentColumn:n})=>{const{t:i}=Fi();return We("div",{className:"csdk-w-50 csdk-px-[12px] csdk-shadow-md csdk-shadow-gray-500 csdk-rounded-md csdk-bg-white",style:{backgroundColor:t.chartBackgroundColor,color:t.primaryTextColor},children:[We("div",{className:"csdk-border-b csdk-border-[#e4e4e4] csdk-p-3 csdk-pl-1",children:[Bt(Tr,{variant:"body2",fontFamily:t.fontFamily,fontSize:11,children:i("drilldown.popover.members")}),Bt(Tr,{variant:"body2",fontFamily:t.fontFamily,fontSize:13,children:e.join(", ")})]}),We("div",{className:"csdk-border-b csdk-border-[#e4e4e4] csdk-p-3 csdk-pl-1",children:[Bt(Tr,{variant:"body2",fontFamily:t.fontFamily,fontSize:11,children:i("drilldown.popover.table")}),Bt(Tr,{variant:"body2",fontFamily:t.fontFamily,fontSize:13,children:o})]}),We("div",{className:"csdk-p-3 csdk-pl-1",children:[Bt(Tr,{variant:"body2",fontFamily:t.fontFamily,fontSize:11,children:i("drilldown.popover.column")}),Bt(Tr,{variant:"body2",fontFamily:t.fontFamily,fontSize:13,children:n})]})]})},Jhe=({popperParams:t,currentDimension:e,themeProps:o})=>{const n=e.expression.match(/\[(.*?)]/),[i,r]=n?n[1].split("."):["",""];return Bt(g0,{open:!!t,anchorEl:t==null?void 0:t.anchorEl,placement:"bottom",popperOptions:Zhe,children:t&&Bt(Khe,{themeProps:o,filterDisplayValues:t.filterDisplayValues,currentTable:i,currentColumn:r})})},Qhe=()=>{const{themeSettings:{typography:{primaryTextColor:t,secondaryTextColor:e,fontFamily:o},general:{backgroundColor:n,brandColor:i,primaryButtonTextColor:r},chart:{backgroundColor:a}}}=En(),s=Ra(a,-.02),l=Ra(s,-.05);return{primaryTextColor:t,secondaryTextColor:e,fontFamily:o,backgroundColor:n,brandColor:i,primaryButtonTextColor:r,chartBackgroundColor:a,activeDrillBackgroundColor:s,activeDrillHoverBackgroundColor:l}},tfe=Mi(Tu,{target:"egcu0nk0",label:"StyledPrevButton"})("&&{position:absolute;left:0;right:auto;margin:auto;bottom:0;top:0;z-index:10;background:linear-gradient(to right,white 30%,rgba(255,255,255,0) 100%);display:inline-flex;span[aria-label='prev-item']{width:0;height:0;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:5px solid #000;color:transparent;opacity:0.3;&:hover{opacity:0.8;}}}"),efe=Mi(Tu,{target:"egcu0nk1",label:"StyledNextButton"})("&&{position:absolute;left:auto;right:0;margin:auto;bottom:0;top:0;z-index:10;background:linear-gradient(to right,rgba(255,255,255,0) 0,white 70%);display:inline-flex;span[aria-label='next-item']{width:0;height:0;border-top:6px solid transparent;border-bottom:6px solid transparent;border-left:5px solid #000;color:transparent;opacity:0.3;&:hover{opacity:0.8;}}}"),ofe=({currentDimension:t,children:e})=>{const{t:o}=Fi(),n=Yt(null),[i,r]=le(0),[a,s]=le(0),[l,d]=le(0),b=()=>{var A;return(A=n.current)==null?void 0:A.querySelector("ol")};ae(()=>{const A=b();if(A){const p=A.clientWidth,I=A.scrollWidth,W=A.scrollLeft;r(p),s(I),d(W)}},[t]),ae(()=>{const A=b();function p(){if(A){const q=A.clientWidth;r(q)}}function I(){if(A){const q=A.scrollLeft;d(q)}}const W=new ResizeObserver(p);return A?(W.observe(A),A.addEventListener("scroll",I),()=>{W.disconnect(),A.removeEventListener("scroll",I)}):()=>{}},[]);const C=A=>{const p="smooth",I=b();I&&I.scrollBy({left:A==="right"?200:-200,behavior:p})},u=l!=0,j=Math.floor(a-l)>i;return We("div",{style:{position:"relative"},children:[u&&Bt(tfe,{onClick:()=>C("left"),children:Bt("span",{"aria-label":"prev-item",children:o("drilldown.breadcrumbsPrev")})}),j&&Bt(efe,{onClick:()=>C("right"),children:Bt("span",{"aria-label":"next-item",children:o("drilldown.breadcrumbsNext")})}),Bt("div",{ref:n,children:e})]})},vs="#F2F2F2",nfe=Mi(gg,{target:"ex0ybhj0",label:"StyledDrillButton"})("&&{font-family:",({theme:t})=>t.fontFamily,";position:relative;border-radius:0;border:1px solid ",vs,";border-right:none;color:",({active:t,theme:e})=>t==="true"?e.primaryTextColor:e.secondaryTextColor,";background-color:",({active:t,theme:e})=>t==="true"?e.activeDrillBackgroundColor:e.chartBackgroundColor,";padding-right:1.25rem;padding-left:1.875rem;height:1.64rem;font-size:13px;text-transform:none;transition:background-color 0.2s,border-color 0.2s,color 0.2s;white-space:nowrap;cursor:",({active:t})=>t==="true"?"pointer":"auto",";margin-right:",({active:t})=>t==="true"?"5px":"0px",";&:hover{background-color:",({active:t,theme:e})=>t==="true"?e.activeDrillHoverBackgroundColor:e.chartBackgroundColor,";border:1px solid ",vs,";border-right:none;}.MuiTouchRipple-root{display:none;}}"),ife=Mi(sJ,{target:"ex0ybhj1",label:"StyledBreadcrumbs"})(".MuiBreadcrumbs-ol{flex-wrap:nowrap;overflow:hidden;}.MuiBreadcrumbs-separator{display:none;}"),rfe=({isActive:t,filterDisplayValue:e,handleMouseEnter:o,handleMouseLeave:n,handleClick:i,themeProps:r,popperParams:a,index:s})=>Bt(nfe,{theme:r,active:t.toString(),index:s,onMouseEnter:o,onMouseLeave:n,onClick:i,children:We("span",{className:"flex items-center justify-between",children:[We("span",{className:"mr-2",children:[e.slice(0,2).join(", "),e.length>2&&", ..."]}),t?Bt("span",{className:"csdk-absolute csdk-right-0 csdk-h-[18px] csdk-w-[18px] csdk-top-[3px] csdk-translate-x-1/2 csdk-rotate-45",style:{backgroundColor:e===(a==null?void 0:a.filterDisplayValues)?r.activeDrillHoverBackgroundColor:r.activeDrillBackgroundColor,borderTop:`1px solid ${vs}`,borderRight:`1px solid ${vs}`,transition:"background-color 0.2s, border-color 0.2s, color 0.2s",zIndex:8}}):void 0,Bt("span",{className:`csdk-absolute ${t?"csdk-h-[18px] csdk-w-[18px] csdk-top-[3px] csdk-right-[-15px]":"csdk-h-[10px] csdk-w-[10px] csdk-top-[7px] csdk-right-[-5px]"} csdk-transform translate-x-1/2 csdk-rotate-45`,style:{backgroundColor:r.chartBackgroundColor,borderTop:`1px solid ${vs}`,borderRight:`1px solid ${vs}`,zIndex:7,transition:"background-color 0.2s, border-color 0.2s, color 0.2s"}})]})}),dJ=l0({componentName:"DrilldownBreadcrumbs",shouldSkipSisenseContextWaiting:!0})(({filtersDisplayValues:t,currentDimension:e,clearDrilldownSelections:o,sliceDrilldownSelections:n})=>{const[i,r]=le(null),[a,s]=le(!1),l=Qhe(),{CancelButton:d,CurrentDrillButton:b}=qhe({clearDrilldownSelections:o,currentDimension:e,isHovered:a,setIsHovered:s,themeProps:l}),C=p=>I=>{s(!0),r({filterDisplayValues:p,anchorEl:I.currentTarget})},u=()=>{s(!1),r(null)},j=p=>p<t.length-1,A=p=>p===t.length-2;return t.length?Bt("div",{"aria-label":"drilldown-breadcrumbs",children:Bt(ofe,{currentDimension:e,children:We(ife,{separator:null,sx:{backgroundColor:l.chartBackgroundColor,padding:"4px"},children:[Bt(d,{}),t.map((p,I)=>{const W=j(I),q=A(I);return Bt("div",{children:Bt(rfe,{isActive:W,isLastActive:q,filterDisplayValue:p,handleMouseEnter:C(p),handleMouseLeave:u,handleClick:()=>n(I+1),themeProps:l,popperParams:i,index:I})},I)}),Bt(b,{}),Bt(Jhe,{popperParams:i,currentDimension:e,themeProps:l})]})})}):null}),pJ=t=>{const{initialDimension:e,onDrilldownSelectionsChange:o}=t,n=he(()=>t.drilldownPaths||[],[t.drilldownPaths]),i=he(()=>t.drilldownSelections||[],[t.drilldownSelections]),{t:r}=Fi();if(!e)throw new ze("errors.drilldownNoInitialDimension");const[a,s]=KL(i,{onLocalStateChange:o}),l=he(()=>[Es(e),...a.map(({nextDimension:I})=>I)],[e,a]),d=he(()=>n.filter(I=>{if(qe.isAttribute(I)){const q=I;return l.every(X=>!la(X,q))}const W=I;return l.every((q,X)=>la(q,W.levels[X]))}),[n,l]),b=me((I,W,q)=>{s(X=>hJ(X,I,W,q))},[s]),C=me(I=>{s(W=>W.slice(0,I))},[s]),u=me(()=>{s([])},[s]),{drilldownFilters:j,drilldownFiltersDisplayValues:A,drilldownDimension:p}=he(()=>fJ(a,e,r),[a,e,r]);return{drilldownSelections:a,availableDrilldownPaths:d,drilldownFilters:j,drilldownFiltersDisplayValues:A,drilldownDimension:p,selectDrilldown:b,sliceDrilldownSelections:C,clearDrilldownSelections:u}},hJ=(t,e,o,n)=>{var i,r;if(!(n!=null&&n.levels))return[...t,{points:e,nextDimension:o}];if(la(n.levels[0],o))return[];const a=(i=t==null?void 0:t.findIndex(C=>la(C.nextDimension,o)))!=null?i:-1;if(a!==-1)return t.slice(0,a+1);const s=(r=yE(t))==null?void 0:r.nextDimension,l=t.length?n.levels.findIndex(C=>s&&la(C,s)):0,d=n.levels.indexOf(o),b=n.levels.slice(l+1,d+1).map((C,u)=>({points:u===0?e:[],nextDimension:C}));return[...t,...b]},fJ=(t,e,o)=>{let n=e&&Es(e);const i=[],r=[];return t.forEach(({points:a,nextDimension:s})=>{i.push(yc(n,a.map(afe)));const l=a.length?a.map(mJ):[`${n.name} (${o("drilldown.breadcrumbsAllSuffix")})`];r.push(l),n=s}),{drilldownFilters:i,drilldownFiltersDisplayValues:r,drilldownDimension:n}};function mJ(t){return"categoryDisplayValue"in t?`${t.categoryDisplayValue}`:"categoryValue"in t?`${t.categoryValue}`:""}function afe(t){return"categoryValue"in t?`${t.categoryValue}`:""}var sfe=Object.prototype,lfe=sfe.hasOwnProperty,cfe=rJ(function(t,e,o){lfe.call(t,o)?t[o].push(e):_g(t,o,[e])});function ufe(t,e){return e.all?[]:t.filter(o=>{var n;return!((n=e.ids)!=null&&n.includes(o.config.guid))})}function gJ(t,e){return t.find(o=>la(o.attribute,e))}function vJ(t,e,o){const n=gJ(o,t);return yc(t,e.map(i=>`${i}`),{guid:n==null?void 0:n.config.guid,backgroundFilter:n==null?void 0:n.config.backgroundFilter})}function yJ(t,e){return ZL(t,e)&&"members"in t&&"members"in e&&cl(t.members,e.members)}var o1=function(t){return t.WIDGET_POINTS_DRILLDOWN="widget-points-drilldown",t.WIDGET_POINTS_CROSSFILTERING="widget-points-crossfiltering",t}({}),vg=function(t){return t.DRILLDOWN_CHART_POINTS_SELECTION="drilldown-chart-points-selection",t.DRILLDOWN_DRILL_DIRECTIONS="drilldown-drill-directions",t.CROSSFILTERING_CHART_POINTS_SELECTION="crossfiltering-chart-points-selection",t}({});const bJ=2;function bh(t,e){const o=t.flatMap(({entries:i={}})=>e.flatMap(r=>{const a=i[r];return a?(Array.isArray(a)?a:[a]).filter(({attribute:s})=>!!s):[]})),n=cfe(o,({id:i})=>i);return Object.values(n).map(i=>({attribute:i[0].attribute,values:EA(i.map(({value:r})=>r)),displayValues:EA(i.map(({displayValue:r})=>r))}))}function dfe(t){return bh(t,["category"])}function pfe(t){return bh(t,["category"])}function hfe(t,e){const o=bh(t,["category"]),n=o.length-1;return e.category.map((i,r)=>n===r?o[r]:{attribute:Es(i),values:[],displayValues:[]})}function ffe(t){return bh(t,["x","y","breakByPoint","breakByColor"])}function mfe(t){return bh(t,["geo"])}function gfe(t){return bh(t,["geo"])}function Ly(t,e,o){return t==="plugin"?[]:t==="text"?[]:t==="pivot"?[]:t==="treemap"||t==="sunburst"?hfe(o,e):Fa(t)||t==="pie"||t==="funnel"?dfe(o):Tc(t)?pfe(o):Ia(t)?ffe(o):Hu(t)?mfe(o):lO(t)?gfe(o):[]}function JL(t,e){let o=[];return t==="plugin"?o=[]:t==="text"?o=[]:t==="pivot"?o=[...e.rows||[],...e.columns||[]]:Fa(t)||Cc(t)||Tc(t)||ah(t)?o=[...e.category]:Ia(t)?o=[e.x,e.y,e.breakByPoint,e.breakByColor].filter(n=>!!(n&&!yo(n))):(Hu(t)||lO(t))&&(o=[...e.geo]),o.map(Es)}function vfe(t,e,o){const n=gJ(e,t.attribute);if(!n||qL(n))return null;if(yJ(t,n))return Jw(t);if(k1(n)&&o){const[i,r]=v0(n.members,a=>t.members.includes(a));if(i.length===t.members.length&&r.length)return vJ(t.attribute,r,[n])}return null}function yfe(t,e,o){const n=e.filter(a=>!a.config.disabled),i=t.map(a=>vfe(a,n,o)).filter(a=>!!a),r=t.length!==i.length;return{filters:r?t:i,isSelection:r}}function S2(t,e,o=!1){const n=t.map(({attribute:r,values:a})=>vJ(r,a,e)),i=bfe(e,n);return yfe(i,e,o)}function bfe(t,e){const o=t.filter(n=>n.config.locked);return o.length?e.filter(n=>!o.some(i=>ZL(i,n))):e}function xfe(t,e,o){const n=Ly(t,e,o).filter(({displayValues:s})=>s.length);if(n.length===0)return"";const[i]=n,r=o.length===1,a=i.displayValues.length>bJ;return n.length>1?r?n.map(s=>s.displayValues[0]).join(", "):a?"":i.displayValues.join(", "):a?i.attribute.name:i.displayValues.join(", ")}function YF(t,e,o){const n=xfe(t,e,o);return n?{id:vg.CROSSFILTERING_CHART_POINTS_SELECTION,sectionTitle:n}:null}function XF(t,e){return{items:[{caption:t,onClick:e}]}}const wfe=({initialDimension:t,drilldownPaths:e,drilldownSelections:o,openMenu:n,onDrilldownSelectionsChange:i})=>{const{t:r}=Fi(),{availableDrilldownPaths:a,drilldownFilters:s,drilldownFiltersDisplayValues:l,drilldownDimension:d,selectDrilldown:b,sliceDrilldownSelections:C,clearDrilldownSelections:u}=pJ({initialDimension:t,drilldownPaths:e,drilldownSelections:o,onDrilldownSelectionsChange:i}),j=me((p,I)=>{const W=[xJ(I,d),wJ(a,d,(q,X)=>{b(I,q,X)},r)];n({id:o1.WIDGET_POINTS_DRILLDOWN,position:p,itemSections:W})},[d,a,r,b,n]),A=he(()=>d&&Bt(dJ,{filtersDisplayValues:l,currentDimension:d,clearDrilldownSelections:u,sliceDrilldownSelections:C}),[u,d,l,C]);return{drilldownDimension:d,drilldownFilters:s,breadcrumbs:A,openDrilldownMenu:j}};function xJ(t,e){const o=EA(t.map(mJ).filter(n=>!!n));return o.length>bJ?{id:vg.DRILLDOWN_CHART_POINTS_SELECTION,sectionTitle:e.name}:{id:vg.DRILLDOWN_CHART_POINTS_SELECTION,sectionTitle:o.join(", ")}}function _fe(t){return 30+12*t}function wJ(t,e,o,n){const[i,r]=v0(t,qe.isAttribute.bind(qe)),a=i.map(l=>({caption:l.name,onClick:()=>o(l)})),s=r.map(l=>({caption:l.title,subItems:[{items:l.levels.map((d,b)=>({caption:d.name,class:b===0?"":"csdk-drilldown-hierarchy-nested-menu-item",style:{paddingLeft:`${_fe(b)}px`},disabled:la(d,e),onClick:()=>o(d,l)}))}]}));return{id:vg.DRILLDOWN_DRILL_DIRECTIONS,sectionTitle:n("drilldown.drillMenuItem"),items:[...s,...a]}}var Qw=function(t){return t.HIGHLIGHT="highlight",t.FILTER="filter",t}({});function _J(t){return function(e){e=Ql(e);var o=xq(e)?Ik(e):void 0,n=o?o[0]:e.charAt(0),i=o?bq(o,1).join(""):e.slice(1);return n[t]()+i}}var SJ=_J("toUpperCase");function Sfe(t){return SJ(Ql(t).toLowerCase())}function Cfe(t,e,o,n){for(var i=-1,r=t==null?0:t.length;++i<r;)o=e(o,t[i],i,t);return o}function Tfe(t){return function(e){return t==null?void 0:t[e]}}var Mfe={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},kfe=Tfe(Mfe),Afe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Efe="\\u0300-\\u036f",Pfe="\\ufe20-\\ufe2f",Ofe="\\u20d0-\\u20ff",Lfe=Efe+Pfe+Ofe,Nfe="["+Lfe+"]",Dfe=RegExp(Nfe,"g");function Rfe(t){return t=Ql(t),t&&t.replace(Afe,kfe).replace(Dfe,"")}var Ife=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function jfe(t){return t.match(Ife)||[]}var $fe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function zfe(t){return $fe.test(t)}var CJ="\\ud800-\\udfff",Bfe="\\u0300-\\u036f",Ffe="\\ufe20-\\ufe2f",Hfe="\\u20d0-\\u20ff",Wfe=Bfe+Ffe+Hfe,TJ="\\u2700-\\u27bf",MJ="a-z\\xdf-\\xf6\\xf8-\\xff",Vfe="\\xac\\xb1\\xd7\\xf7",Ufe="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Gfe="\\u2000-\\u206f",Yfe=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",kJ="A-Z\\xc0-\\xd6\\xd8-\\xde",Xfe="\\ufe0e\\ufe0f",AJ=Vfe+Ufe+Gfe+Yfe,EJ="['’]",qF="["+AJ+"]",qfe="["+Wfe+"]",PJ="\\d+",Zfe="["+TJ+"]",OJ="["+MJ+"]",LJ="[^"+CJ+AJ+PJ+TJ+MJ+kJ+"]",Kfe="\\ud83c[\\udffb-\\udfff]",Jfe="(?:"+qfe+"|"+Kfe+")",Qfe="[^"+CJ+"]",NJ="(?:\\ud83c[\\udde6-\\uddff]){2}",DJ="[\\ud800-\\udbff][\\udc00-\\udfff]",Id="["+kJ+"]",tme="\\u200d",ZF="(?:"+OJ+"|"+LJ+")",eme="(?:"+Id+"|"+LJ+")",KF="(?:"+EJ+"(?:d|ll|m|re|s|t|ve))?",JF="(?:"+EJ+"(?:D|LL|M|RE|S|T|VE))?",RJ=Jfe+"?",IJ="["+Xfe+"]?",ome="(?:"+tme+"(?:"+[Qfe,NJ,DJ].join("|")+")"+IJ+RJ+")*",nme="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ime="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",rme=IJ+RJ+ome,ame="(?:"+[Zfe,NJ,DJ].join("|")+")"+rme,sme=RegExp([Id+"?"+OJ+"+"+KF+"(?="+[qF,Id,"$"].join("|")+")",eme+"+"+JF+"(?="+[qF,Id+ZF,"$"].join("|")+")",Id+"?"+ZF+"+"+KF,Id+"+"+JF,ime,nme,PJ,ame].join("|"),"g");function lme(t){return t.match(sme)||[]}function cme(t,e,o){return t=Ql(t),e=e,e===void 0?zfe(t)?lme(t):jfe(t):t.match(e)||[]}var ume="['’]",dme=RegExp(ume,"g");function pme(t){return function(e){return Cfe(cme(Rfe(e).replace(dme,"")),t,"")}}var jJ=pme(function(t,e,o){return e=e.toLowerCase(),t+(o?Sfe(e):e)});function hme(t){const{_id:e,title:o,levels:n}=t;return{id:e,title:o,levels:n.map(i=>EE(i))}}function $J(t,e,o){return Ha(this,null,function*(){const n=yield new hO(t,o).getHierarchies(e);return n==null?void 0:n.map(i=>hme(i))})}const fme=oJ("useGetHierarchyModels")(zJ);function zJ(t){const e=YL(t,["dataSource","dimension","ids","alwaysIncluded"]),o=nJ(t,e),[n,i]=ku(AA,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),{isInitialized:r,app:a}=Xn();return ae(()=>{r||i({type:"error",error:new ze("errors.sisenseContextNotFound")}),o(a)&&(i({type:"loading"}),$J(a.httpClient,t,a.defaultDataSource).then(s=>{i({type:"success",data:s})}).catch(s=>{i({type:"error",error:s})}))},[a,r,t,o]),n.data&&e?QF(AA(n,{type:"loading"})):QF(n)}function QF(t){const e=t,{data:o}=e,n=Ae(e,["data"]);return Vt(Lt({},n),{hierarchies:o})}function mme({attribute:t,dataSource:e,drilldownPaths:o=[],enabled:n}){const[i,r]=he(()=>v0(o,OO),[o]),{hierarchies:a=[]}=zJ({enabled:n,dataSource:e,dimension:t,ids:i,alwaysIncluded:!0});return he(()=>a.length?[...a,...r]:r,[a,r])}function gme(t,e){return JL(t,e)[0]}function vme(t){return[...Nx,...Dx,...Rx,...Ix,...jx].includes(t)}function yme(t,e){return JL(t,e).length===1}function bme(t,e){return yme(t,e)&&vme(t)}function BJ(t,e,o){const n=i=>!!i&&!la(o,Es(i));if(Fa(t)||Cc(t)||Tc(t)||ah(t)){const i=e.category[0];if(n(i))return Vt(Lt({},e),{category:[o]})}else if(Ia(t)){const i=e,r=["x","y","breakByPoint","breakByColor"];for(const a of r){const s=i[a];if(s&&!yo(s)&&n(s))return Vt(Lt({},i),{[a]:o})}}return e}function t6(t,e,o){return t.map(n=>{const i=["x","y","breakByPoint","breakByColor"],r=[...i,"size"].some(s=>s in n),a=i.find(s=>o[s]&&!yo(o[s]));if(r){const s=e,l=s.type==="mouseup";l&&console.warn("No drilldown support for multi-selection in scatter chart");const d=l?n[a]:s.point.options.custom[jJ(`{masked ${a}`)];return{categoryValue:d,categoryDisplayValue:d}}return n})}const xme=({propsToExtend:t,onDrilldownSelectionsChange:e})=>{const{chartType:o,dataOptions:n,dataSource:i,drilldownOptions:r}=t,{drilldownSelections:a}=r||{},{openMenu:s}=iJ(),l=he(()=>bme(o,n),[o,n]),d=he(()=>(r==null?void 0:r.drilldownPaths)||[],[r==null?void 0:r.drilldownPaths]),b=he(()=>{const z=A8({name:"dummy drilldown initial attribute"});return gme(o,n)||z},[o,n]),C=mme({attribute:b,dataSource:i,drilldownPaths:d,enabled:l}),u=he(()=>{var z;return(((z=r==null?void 0:r.drilldownSelections)==null?void 0:z.length)||(C==null?void 0:C.length))&&l},[r,l,C]),{drilldownDimension:j,drilldownFilters:A,breadcrumbs:p,openDrilldownMenu:I}=wfe({initialDimension:b,drilldownSelections:a,drilldownPaths:C,openMenu:s,onDrilldownSelectionsChange:e}),W=me((z,N)=>{const V=t6(z,N,n);I({left:N.clientX,top:N.clientY},V)},[n,I]),q=me((z,N)=>{const V=t6([z],N,n);I({left:N.clientX,top:N.clientY},V)},[n,I]),X=he(()=>BJ(o,n,j),[o,n,j]),H=he(()=>A.length?uX(t.filters||[],A):t.filters,[t.filters,A]),D=he(()=>_s([W,t.onDataPointsSelected]),[W,t.onDataPointsSelected]),$=he(()=>_s([q,t.onDataPointContextMenu]),[q,t.onDataPointContextMenu]);return{propsWithDrilldown:Lt(Lt({},t),u&&{dataOptions:X,filters:H,onDataPointsSelected:D,onDataPointContextMenu:$}),isDrilldownEnabled:u,breadcrumbs:p}},wme=l0({componentName:"ChartWidget"})(t=>{var e,o;const{app:n}=Xn(),{chartType:i,dataSource:r=n==null?void 0:n.defaultDataSource,dataOptions:a,styleOptions:s,highlightSelectionDisabled:l=!1,highlights:d,description:b,onChange:C}=t,{width:u,height:j}=s||{},A=Lq(i,{hasHeader:!((e=s==null?void 0:s.header)!=null&&e.hidden)}),[p,I]=le(0),W=he(()=>w1(s,["width","height"]),[s]),q=me(E=>{C==null||C({drilldownOptions:{drilldownSelections:E}})},[C]),{propsWithDrilldown:X,isDrilldownEnabled:H,breadcrumbs:D}=xme({propsToExtend:t,onDrilldownSelectionsChange:q}),$=Ahe({chartType:i,dataOptions:a,enabled:!l&&!H&&!(d!=null&&d.length)}),z=(o=n==null?void 0:n.settings.accessibilityConfig)==null?void 0:o.enabled,N=me(E=>{var x;return z?Vt(Lt({},E),{accessibility:Vt(Lt({},E.accessibility),{description:b??((x=E.accessibility)==null?void 0:x.description)})}):E},[b,z]);if(!i||!a)return null;const V=Vt(Lt({},X),{dataSet:r,styleOptions:W,refreshCounter:p,onDataPointClick:he(()=>_s([$.onDataPointClick,t.onDataPointClick]),[$.onDataPointClick,t.onDataPointClick]),onDataPointContextMenu:X.onDataPointContextMenu,onDataPointsSelected:he(()=>_s([$.onDataPointsSelected,X.onDataPointsSelected]),[$.onDataPointsSelected,X.onDataPointsSelected]),onBeforeRender:he(()=>_s([N,$.onBeforeRender,t.onBeforeRender],!0),[N,$.onBeforeRender,t.onBeforeRender])});return Bt(ww,{defaultSize:A,size:{width:u,height:j},children:Bt(JK,Vt(Lt({},t),{topSlot:We(ia,{children:[t.topSlot,D]}),dataSetName:r&&TE(r),onRefresh:()=>I(p+1),children:Bt(YK,Lt({},V))}))})});class xh{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){const o={listener:e};return this.listeners.add(o),this.onSubscribe(),()=>{this.listeners.delete(o),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const yg=typeof window>"u"||"Deno"in window;function Xr(){}function _me(t,e){return typeof t=="function"?t(e):t}function PA(t){return typeof t=="number"&&t>=0&&t!==1/0}function FJ(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Ff(t,e,o){return y0(t)?typeof e=="function"?Vt(Lt({},o),{queryKey:t,queryFn:e}):Vt(Lt({},e),{queryKey:t}):t}function Sme(t,e,o){return y0(t)?Vt(Lt({},e),{mutationKey:t}):typeof t=="function"?Vt(Lt({},e),{mutationFn:t}):Lt({},t)}function $l(t,e,o){return y0(t)?[Vt(Lt({},e),{queryKey:t}),o]:[t||{},e]}function e6(t,e){const{type:o="all",exact:n,fetchStatus:i,predicate:r,queryKey:a,stale:s}=t;if(y0(a)){if(n){if(e.queryHash!==QL(a,e.options))return!1}else if(!Gd(e.queryKey,a))return!1}if(o!=="all"){const l=e.isActive();if(o==="active"&&!l||o==="inactive"&&l)return!1}return!(typeof s=="boolean"&&e.isStale()!==s||typeof i<"u"&&i!==e.state.fetchStatus||r&&!r(e))}function o6(t,e){const{exact:o,fetching:n,predicate:i,mutationKey:r}=t;if(y0(r)){if(!e.options.mutationKey)return!1;if(o){if(ru(e.options.mutationKey)!==ru(r))return!1}else if(!Gd(e.options.mutationKey,r))return!1}return!(typeof n=="boolean"&&e.state.status==="loading"!==n||i&&!i(e))}function QL(t,e){return((e==null?void 0:e.queryKeyHashFn)||ru)(t)}function ru(t){return JSON.stringify(t,(e,o)=>OA(o)?Object.keys(o).sort().reduce((n,i)=>(n[i]=o[i],n),{}):o)}function Gd(t,e){return HJ(t,e)}function HJ(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(o=>!HJ(t[o],e[o])):!1}function WJ(t,e){if(t===e)return t;const o=n6(t)&&n6(e);if(o||OA(t)&&OA(e)){const n=o?t.length:Object.keys(t).length,i=o?e:Object.keys(e),r=i.length,a=o?[]:{};let s=0;for(let l=0;l<r;l++){const d=o?l:i[l];a[d]=WJ(t[d],e[d]),a[d]===t[d]&&s++}return n===r&&s===n?t:a}return e}function n1(t,e){if(t&&!e||e&&!t)return!1;for(const o in t)if(t[o]!==e[o])return!1;return!0}function n6(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function OA(t){if(!i6(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const o=e.prototype;return!(!i6(o)||!o.hasOwnProperty("isPrototypeOf"))}function i6(t){return Object.prototype.toString.call(t)==="[object Object]"}function y0(t){return Array.isArray(t)}function VJ(t){return new Promise(e=>{setTimeout(e,t)})}function r6(t){VJ(0).then(t)}function Cme(){if(typeof AbortController=="function")return new AbortController}function LA(t,e,o){return o.isDataEqual!=null&&o.isDataEqual(t,e)?t:typeof o.structuralSharing=="function"?o.structuralSharing(t,e):o.structuralSharing!==!1?WJ(t,e):e}class Tme extends xh{constructor(){super(),this.setup=e=>{if(!yg&&window.addEventListener){const o=()=>e();return window.addEventListener("visibilitychange",o,!1),window.addEventListener("focus",o,!1),()=>{window.removeEventListener("visibilitychange",o),window.removeEventListener("focus",o)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var o;this.setup=e,(o=this.cleanup)==null||o.call(this),this.cleanup=e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(e){this.focused!==e&&(this.focused=e,this.onFocus())}onFocus(){this.listeners.forEach(({listener:e})=>{e()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const i1=new Tme,a6=["online","offline"];class Mme extends xh{constructor(){super(),this.setup=e=>{if(!yg&&window.addEventListener){const o=()=>e();return a6.forEach(n=>{window.addEventListener(n,o,!1)}),()=>{a6.forEach(n=>{window.removeEventListener(n,o)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var o;this.setup=e,(o=this.cleanup)==null||o.call(this),this.cleanup=e(n=>{typeof n=="boolean"?this.setOnline(n):this.onOnline()})}setOnline(e){this.online!==e&&(this.online=e,this.onOnline())}onOnline(){this.listeners.forEach(({listener:e})=>{e()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const r1=new Mme;function kme(t){return Math.min(1e3*Js(2,t),3e4)}function t_(t){return(t??"online")==="online"?r1.isOnline():!0}class UJ{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}}function Ny(t){return t instanceof UJ}function GJ(t){let e=!1,o=0,n=!1,i,r,a;const s=new Promise((I,W)=>{r=I,a=W}),l=I=>{n||(j(new UJ(I)),t.abort==null||t.abort())},d=()=>{e=!0},b=()=>{e=!1},C=()=>!i1.isFocused()||t.networkMode!=="always"&&!r1.isOnline(),u=I=>{n||(n=!0,t.onSuccess==null||t.onSuccess(I),i==null||i(),r(I))},j=I=>{n||(n=!0,t.onError==null||t.onError(I),i==null||i(),a(I))},A=()=>new Promise(I=>{i=W=>{const q=n||!C();return q&&I(W),q},t.onPause==null||t.onPause()}).then(()=>{i=void 0,n||t.onContinue==null||t.onContinue()}),p=()=>{if(n)return;let I;try{I=t.fn()}catch(W){I=Promise.reject(W)}Promise.resolve(I).then(u).catch(W=>{var q,X;if(n)return;const H=(q=t.retry)!=null?q:3,D=(X=t.retryDelay)!=null?X:kme,$=typeof D=="function"?D(o,W):D,z=H===!0||typeof H=="number"&&o<H||typeof H=="function"&&H(o,W);if(e||!z){j(W);return}o++,t.onFail==null||t.onFail(o,W),VJ($).then(()=>{if(C())return A()}).then(()=>{e?j(W):p()})})};return t_(t.networkMode)?p():A().then(p),{promise:s,cancel:l,continue:()=>i!=null&&i()?s:Promise.resolve(),cancelRetry:d,continueRetry:b}}const t3=console;function Ame(){let t=[],e=0,o=l=>{l()},n=l=>{l()};const i=l=>{let d;e++;try{d=l()}finally{e--,e||s()}return d},r=l=>{e?t.push(l):r6(()=>{o(l)})},a=l=>(...d)=>{r(()=>{l(...d)})},s=()=>{const l=t;t=[],l.length&&r6(()=>{n(()=>{l.forEach(d=>{o(d)})})})};return{batch:i,batchCalls:a,schedule:r,setNotifyFunction:l=>{o=l},setBatchNotifyFunction:l=>{n=l}}}const Wn=Ame();class YJ{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),PA(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(e){this.cacheTime=Math.max(this.cacheTime||0,e??(yg?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class Eme extends YJ{constructor(e){super(),this.abortSignalConsumed=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.logger=e.logger||t3,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||Pme(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(e){this.options=Lt(Lt({},this.defaultOptions),e),this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(e,o){const n=LA(this.state.data,e,this.options);return this.dispatch({data:n,type:"success",dataUpdatedAt:o==null?void 0:o.updatedAt,manual:o==null?void 0:o.manual}),n}setState(e,o){this.dispatch({type:"setState",state:e,setStateOptions:o})}cancel(e){var o;const n=this.promise;return(o=this.retryer)==null||o.cancel(e),n?n.then(Xr).catch(Xr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(e=>e.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(e=>e.getCurrentResult().isStale)}isStaleByTime(e=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!FJ(this.state.dataUpdatedAt,e)}onFocus(){var e;const o=this.observers.find(n=>n.shouldFetchOnWindowFocus());o&&o.refetch({cancelRefetch:!1}),(e=this.retryer)==null||e.continue()}onOnline(){var e;const o=this.observers.find(n=>n.shouldFetchOnReconnect());o&&o.refetch({cancelRefetch:!1}),(e=this.retryer)==null||e.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(o=>o!==e),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(e,o){var n,i;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&o!=null&&o.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var r;return(r=this.retryer)==null||r.continueRetry(),this.promise}}if(e&&this.setOptions(e),!this.options.queryFn){const j=this.observers.find(A=>A.options.queryFn);j&&this.setOptions(j.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||this.logger.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const a=Cme(),s={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},l=j=>{Object.defineProperty(j,"signal",{enumerable:!0,get:()=>{if(a)return this.abortSignalConsumed=!0,a.signal}})};l(s);const d=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(s)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),b={fetchOptions:o,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:d};if(l(b),(n=this.options.behavior)==null||n.onFetch(b),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((i=b.fetchOptions)==null?void 0:i.meta)){var C;this.dispatch({type:"fetch",meta:(C=b.fetchOptions)==null?void 0:C.meta})}const u=j=>{if(Ny(j)&&j.silent||this.dispatch({type:"error",error:j}),!Ny(j)){var A,p,I,W;(A=(p=this.cache.config).onError)==null||A.call(p,j,this),(I=(W=this.cache.config).onSettled)==null||I.call(W,this.state.data,j,this),process.env.NODE_ENV!=="production"&&this.logger.error(j)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=GJ({fn:b.fetchFn,abort:a==null?void 0:a.abort.bind(a),onSuccess:j=>{var A,p,I,W;if(typeof j>"u"){process.env.NODE_ENV!=="production"&&this.logger.error("Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: "+this.queryHash),u(new Error(this.queryHash+" data is undefined"));return}this.setData(j),(A=(p=this.cache.config).onSuccess)==null||A.call(p,j,this),(I=(W=this.cache.config).onSettled)==null||I.call(W,j,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:u,onFail:(j,A)=>{this.dispatch({type:"failed",failureCount:j,error:A})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:b.options.retry,retryDelay:b.options.retryDelay,networkMode:b.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(e){const o=n=>{var i,r;switch(e.type){case"failed":return Vt(Lt({},n),{fetchFailureCount:e.failureCount,fetchFailureReason:e.error});case"pause":return Vt(Lt({},n),{fetchStatus:"paused"});case"continue":return Vt(Lt({},n),{fetchStatus:"fetching"});case"fetch":return Lt(Vt(Lt({},n),{fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(i=e.meta)!=null?i:null,fetchStatus:t_(this.options.networkMode)?"fetching":"paused"}),!n.dataUpdatedAt&&{error:null,status:"loading"});case"success":return Lt(Vt(Lt({},n),{data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:(r=e.dataUpdatedAt)!=null?r:Date.now(),error:null,isInvalidated:!1,status:"success"}),!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null});case"error":const a=e.error;return Ny(a)&&a.revert&&this.revertState?Vt(Lt({},this.revertState),{fetchStatus:"idle"}):Vt(Lt({},n),{error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"});case"invalidate":return Vt(Lt({},n),{isInvalidated:!0});case"setState":return Lt(Lt({},n),e.state)}};this.state=o(this.state),Wn.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate(e)}),this.cache.notify({query:this,type:"updated",action:e})})}}function Pme(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,o=typeof e<"u",n=o?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:o?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:o?"success":"loading",fetchStatus:"idle"}}class Ome extends xh{constructor(e){super(),this.config=e||{},this.queries=[],this.queriesMap={}}build(e,o,n){var i;const r=o.queryKey,a=(i=o.queryHash)!=null?i:QL(r,o);let s=this.get(a);return s||(s=new Eme({cache:this,logger:e.getLogger(),queryKey:r,queryHash:a,options:e.defaultQueryOptions(o),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(s)),s}add(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"added",query:e}))}remove(e){const o=this.queriesMap[e.queryHash];o&&(e.destroy(),this.queries=this.queries.filter(n=>n!==e),o===e&&delete this.queriesMap[e.queryHash],this.notify({type:"removed",query:e}))}clear(){Wn.batch(()=>{this.queries.forEach(e=>{this.remove(e)})})}get(e){return this.queriesMap[e]}getAll(){return this.queries}find(e,o){const[n]=$l(e,o);return typeof n.exact>"u"&&(n.exact=!0),this.queries.find(i=>e6(n,i))}findAll(e,o){const[n]=$l(e,o);return Object.keys(n).length>0?this.queries.filter(i=>e6(n,i)):this.queries}notify(e){Wn.batch(()=>{this.listeners.forEach(({listener:o})=>{o(e)})})}onFocus(){Wn.batch(()=>{this.queries.forEach(e=>{e.onFocus()})})}onOnline(){Wn.batch(()=>{this.queries.forEach(e=>{e.onOnline()})})}}class Lme extends YJ{constructor(e){super(),this.defaultOptions=e.defaultOptions,this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.logger=e.logger||t3,this.observers=[],this.state=e.state||XJ(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=Lt(Lt({},this.defaultOptions),e),this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(e){this.dispatch({type:"setState",state:e})}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.observers=this.observers.filter(o=>o!==e),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){var e,o;return(e=(o=this.retryer)==null?void 0:o.continue())!=null?e:this.execute()}execute(){return Ha(this,null,function*(){const e=()=>{var z;return this.retryer=GJ({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(N,V)=>{this.dispatch({type:"failed",failureCount:N,error:V})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(z=this.options.retry)!=null?z:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},o=this.state.status==="loading";try{var n,i,r,a,s,l,d,b;if(!o){var C,u,j,A;this.dispatch({type:"loading",variables:this.options.variables}),yield(C=(u=this.mutationCache.config).onMutate)==null?void 0:C.call(u,this.state.variables,this);const N=yield(j=(A=this.options).onMutate)==null?void 0:j.call(A,this.state.variables);N!==this.state.context&&this.dispatch({type:"loading",context:N,variables:this.state.variables})}const z=yield e();return yield(n=(i=this.mutationCache.config).onSuccess)==null?void 0:n.call(i,z,this.state.variables,this.state.context,this),yield(r=(a=this.options).onSuccess)==null?void 0:r.call(a,z,this.state.variables,this.state.context),yield(s=(l=this.mutationCache.config).onSettled)==null?void 0:s.call(l,z,null,this.state.variables,this.state.context,this),yield(d=(b=this.options).onSettled)==null?void 0:d.call(b,z,null,this.state.variables,this.state.context),this.dispatch({type:"success",data:z}),z}catch(z){try{var p,I,W,q,X,H,D,$;throw yield(p=(I=this.mutationCache.config).onError)==null?void 0:p.call(I,z,this.state.variables,this.state.context,this),process.env.NODE_ENV!=="production"&&this.logger.error(z),yield(W=(q=this.options).onError)==null?void 0:W.call(q,z,this.state.variables,this.state.context),yield(X=(H=this.mutationCache.config).onSettled)==null?void 0:X.call(H,void 0,z,this.state.variables,this.state.context,this),yield(D=($=this.options).onSettled)==null?void 0:D.call($,void 0,z,this.state.variables,this.state.context),z}finally{this.dispatch({type:"error",error:z})}}})}dispatch(e){const o=n=>{switch(e.type){case"failed":return Vt(Lt({},n),{failureCount:e.failureCount,failureReason:e.error});case"pause":return Vt(Lt({},n),{isPaused:!0});case"continue":return Vt(Lt({},n),{isPaused:!1});case"loading":return Vt(Lt({},n),{context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!t_(this.options.networkMode),status:"loading",variables:e.variables});case"success":return Vt(Lt({},n),{data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1});case"error":return Vt(Lt({},n),{data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"});case"setState":return Lt(Lt({},n),e.state)}};this.state=o(this.state),Wn.batch(()=>{this.observers.forEach(n=>{n.onMutationUpdate(e)}),this.mutationCache.notify({mutation:this,type:"updated",action:e})})}}function XJ(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class Nme extends xh{constructor(e){super(),this.config=e||{},this.mutations=[],this.mutationId=0}build(e,o,n){const i=new Lme({mutationCache:this,logger:e.getLogger(),mutationId:++this.mutationId,options:e.defaultMutationOptions(o),state:n,defaultOptions:o.mutationKey?e.getMutationDefaults(o.mutationKey):void 0});return this.add(i),i}add(e){this.mutations.push(e),this.notify({type:"added",mutation:e})}remove(e){this.mutations=this.mutations.filter(o=>o!==e),this.notify({type:"removed",mutation:e})}clear(){Wn.batch(()=>{this.mutations.forEach(e=>{this.remove(e)})})}getAll(){return this.mutations}find(e){return typeof e.exact>"u"&&(e.exact=!0),this.mutations.find(o=>o6(e,o))}findAll(e){return this.mutations.filter(o=>o6(e,o))}notify(e){Wn.batch(()=>{this.listeners.forEach(({listener:o})=>{o(e)})})}resumePausedMutations(){var e;return this.resuming=((e=this.resuming)!=null?e:Promise.resolve()).then(()=>{const o=this.mutations.filter(n=>n.state.isPaused);return Wn.batch(()=>o.reduce((n,i)=>n.then(()=>i.continue().catch(Xr)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function Dme(){return{onFetch:t=>{t.fetchFn=()=>{var e,o,n,i,r,a;const s=(e=t.fetchOptions)==null||(o=e.meta)==null?void 0:o.refetchPage,l=(n=t.fetchOptions)==null||(i=n.meta)==null?void 0:i.fetchMore,d=l==null?void 0:l.pageParam,b=(l==null?void 0:l.direction)==="forward",C=(l==null?void 0:l.direction)==="backward",u=((r=t.state.data)==null?void 0:r.pages)||[],j=((a=t.state.data)==null?void 0:a.pageParams)||[];let A=j,p=!1;const I=D=>{Object.defineProperty(D,"signal",{enumerable:!0,get:()=>{var $;if(($=t.signal)!=null&&$.aborted)p=!0;else{var z;(z=t.signal)==null||z.addEventListener("abort",()=>{p=!0})}return t.signal}})},W=t.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+t.options.queryHash+"'")),q=(D,$,z,N)=>(A=N?[$,...A]:[...A,$],N?[z,...D]:[...D,z]),X=(D,$,z,N)=>{if(p)return Promise.reject("Cancelled");if(typeof z>"u"&&!$&&D.length)return Promise.resolve(D);const V={queryKey:t.queryKey,pageParam:z,meta:t.options.meta};I(V);const E=W(V);return Promise.resolve(E).then(x=>q(D,z,x,N))};let H;if(!u.length)H=X([]);else if(b){const D=typeof d<"u",$=D?d:s6(t.options,u);H=X(u,D,$)}else if(C){const D=typeof d<"u",$=D?d:Rme(t.options,u);H=X(u,D,$,!0)}else{A=[];const D=typeof t.options.getNextPageParam>"u";H=!(s&&u[0])||s(u[0],0,u)?X([],D,j[0]):Promise.resolve(q([],j[0],u[0]));for(let $=1;$<u.length;$++)H=H.then(z=>{if(!(s&&u[$])||s(u[$],$,u)){const N=D?j[$]:s6(t.options,z);return X(z,D,N)}return Promise.resolve(q(z,j[$],u[$]))})}return H.then(D=>({pages:D,pageParams:A}))}}}}function s6(t,e){return t.getNextPageParam==null?void 0:t.getNextPageParam(e[e.length-1],e)}function Rme(t,e){return t.getPreviousPageParam==null?void 0:t.getPreviousPageParam(e[0],e)}class Ime{constructor(e={}){this.queryCache=e.queryCache||new Ome,this.mutationCache=e.mutationCache||new Nme,this.logger=e.logger||t3,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0,process.env.NODE_ENV!=="production"&&e.logger&&this.logger.error("Passing a custom logger has been deprecated and will be removed in the next major version.")}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=i1.subscribe(()=>{i1.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=r1.subscribe(()=>{r1.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var e,o;this.mountCount--,this.mountCount===0&&((e=this.unsubscribeFocus)==null||e.call(this),this.unsubscribeFocus=void 0,(o=this.unsubscribeOnline)==null||o.call(this),this.unsubscribeOnline=void 0)}isFetching(e,o){const[n]=$l(e,o);return n.fetchStatus="fetching",this.queryCache.findAll(n).length}isMutating(e){return this.mutationCache.findAll(Vt(Lt({},e),{fetching:!0})).length}getQueryData(e,o){var n;return(n=this.queryCache.find(e,o))==null?void 0:n.state.data}ensureQueryData(e,o,n){const i=Ff(e,o,n),r=this.getQueryData(i.queryKey);return r?Promise.resolve(r):this.fetchQuery(i)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:o,state:n})=>{const i=n.data;return[o,i]})}setQueryData(e,o,n){const i=this.queryCache.find(e),r=i==null?void 0:i.state.data,a=_me(o,r);if(typeof a>"u")return;const s=Ff(e),l=this.defaultQueryOptions(s);return this.queryCache.build(this,l).setData(a,Vt(Lt({},n),{manual:!0}))}setQueriesData(e,o,n){return Wn.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,o,n)]))}getQueryState(e,o){var n;return(n=this.queryCache.find(e,o))==null?void 0:n.state}removeQueries(e,o){const[n]=$l(e,o),i=this.queryCache;Wn.batch(()=>{i.findAll(n).forEach(r=>{i.remove(r)})})}resetQueries(e,o,n){const[i,r]=$l(e,o,n),a=this.queryCache,s=Lt({type:"active"},i);return Wn.batch(()=>(a.findAll(i).forEach(l=>{l.reset()}),this.refetchQueries(s,r)))}cancelQueries(e,o,n){const[i,r={}]=$l(e,o,n);typeof r.revert>"u"&&(r.revert=!0);const a=Wn.batch(()=>this.queryCache.findAll(i).map(s=>s.cancel(r)));return Promise.all(a).then(Xr).catch(Xr)}invalidateQueries(e,o,n){const[i,r]=$l(e,o,n);return Wn.batch(()=>{var a,s;if(this.queryCache.findAll(i).forEach(d=>{d.invalidate()}),i.refetchType==="none")return Promise.resolve();const l=Vt(Lt({},i),{type:(a=(s=i.refetchType)!=null?s:i.type)!=null?a:"active"});return this.refetchQueries(l,r)})}refetchQueries(e,o,n){const[i,r]=$l(e,o,n),a=Wn.batch(()=>this.queryCache.findAll(i).filter(l=>!l.isDisabled()).map(l=>{var d;return l.fetch(void 0,Vt(Lt({},r),{cancelRefetch:(d=r==null?void 0:r.cancelRefetch)!=null?d:!0,meta:{refetchPage:i.refetchPage}}))}));let s=Promise.all(a).then(Xr);return r!=null&&r.throwOnError||(s=s.catch(Xr)),s}fetchQuery(e,o,n){const i=Ff(e,o,n),r=this.defaultQueryOptions(i);typeof r.retry>"u"&&(r.retry=!1);const a=this.queryCache.build(this,r);return a.isStaleByTime(r.staleTime)?a.fetch(r):Promise.resolve(a.state.data)}prefetchQuery(e,o,n){return this.fetchQuery(e,o,n).then(Xr).catch(Xr)}fetchInfiniteQuery(e,o,n){const i=Ff(e,o,n);return i.behavior=Dme(),this.fetchQuery(i)}prefetchInfiniteQuery(e,o,n){return this.fetchInfiniteQuery(e,o,n).then(Xr).catch(Xr)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(e){this.defaultOptions=e}setQueryDefaults(e,o){const n=this.queryDefaults.find(i=>ru(e)===ru(i.queryKey));n?n.defaultOptions=o:this.queryDefaults.push({queryKey:e,defaultOptions:o})}getQueryDefaults(e){if(!e)return;const o=this.queryDefaults.find(n=>Gd(e,n.queryKey));return process.env.NODE_ENV!=="production"&&this.queryDefaults.filter(n=>Gd(e,n.queryKey)).length>1&&this.logger.error("[QueryClient] Several query defaults match with key '"+JSON.stringify(e)+"'. The first matching query defaults are used. Please check how query defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetquerydefaults."),o==null?void 0:o.defaultOptions}setMutationDefaults(e,o){const n=this.mutationDefaults.find(i=>ru(e)===ru(i.mutationKey));n?n.defaultOptions=o:this.mutationDefaults.push({mutationKey:e,defaultOptions:o})}getMutationDefaults(e){if(!e)return;const o=this.mutationDefaults.find(n=>Gd(e,n.mutationKey));return process.env.NODE_ENV!=="production"&&this.mutationDefaults.filter(n=>Gd(e,n.mutationKey)).length>1&&this.logger.error("[QueryClient] Several mutation defaults match with key '"+JSON.stringify(e)+"'. The first matching mutation defaults are used. Please check how mutation defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetmutationdefaults."),o==null?void 0:o.defaultOptions}defaultQueryOptions(e){if(e!=null&&e._defaulted)return e;const o=Vt(Lt(Lt(Lt({},this.defaultOptions.queries),this.getQueryDefaults(e==null?void 0:e.queryKey)),e),{_defaulted:!0});return!o.queryHash&&o.queryKey&&(o.queryHash=QL(o.queryKey,o)),typeof o.refetchOnReconnect>"u"&&(o.refetchOnReconnect=o.networkMode!=="always"),typeof o.useErrorBoundary>"u"&&(o.useErrorBoundary=!!o.suspense),o}defaultMutationOptions(e){return e!=null&&e._defaulted?e:Vt(Lt(Lt(Lt({},this.defaultOptions.mutations),this.getMutationDefaults(e==null?void 0:e.mutationKey)),e),{_defaulted:!0})}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class jme extends xh{constructor(e,o){super(),this.client=e,this.options=o,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(o)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),l6(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return NA(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return NA(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,o){const n=this.options,i=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),process.env.NODE_ENV!=="production"&&typeof(e==null?void 0:e.isDataEqual)<"u"&&this.client.getLogger().error("The isDataEqual option has been deprecated and will be removed in the next major version. You can achieve the same functionality by passing a function as the structuralSharing option"),n1(n,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();const r=this.hasListeners();r&&c6(this.currentQuery,i,this.options,n)&&this.executeFetch(),this.updateResult(o),r&&(this.currentQuery!==i||this.options.enabled!==n.enabled||this.options.staleTime!==n.staleTime)&&this.updateStaleTimeout();const a=this.computeRefetchInterval();r&&(this.currentQuery!==i||this.options.enabled!==n.enabled||a!==this.currentRefetchInterval)&&this.updateRefetchInterval(a)}getOptimisticResult(e){const o=this.client.getQueryCache().build(this.client,e),n=this.createResult(o,e);return zme(this,n,e)&&(this.currentResult=n,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),n}getCurrentResult(){return this.currentResult}trackResult(e){const o={};return Object.keys(e).forEach(n=>{Object.defineProperty(o,n,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(n),e[n])})}),o}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch(e={}){var o=e,{refetchPage:n}=o,i=Ae(o,["refetchPage"]);return this.fetch(Vt(Lt({},i),{meta:{refetchPage:n}}))}fetchOptimistic(e){const o=this.client.defaultQueryOptions(e),n=this.client.getQueryCache().build(this.client,o);return n.isFetchingOptimistic=!0,n.fetch().then(()=>this.createResult(n,o))}fetch(e){var o;return this.executeFetch(Vt(Lt({},e),{cancelRefetch:(o=e.cancelRefetch)!=null?o:!0})).then(()=>(this.updateResult(),this.currentResult))}executeFetch(e){this.updateQuery();let o=this.currentQuery.fetch(this.options,e);return e!=null&&e.throwOnError||(o=o.catch(Xr)),o}updateStaleTimeout(){if(this.clearStaleTimeout(),yg||this.currentResult.isStale||!PA(this.options.staleTime))return;const e=FJ(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},e)}computeRefetchInterval(){var e;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(e=this.options.refetchInterval)!=null?e:!1}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!(yg||this.options.enabled===!1||!PA(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||i1.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,o){const n=this.currentQuery,i=this.options,r=this.currentResult,a=this.currentResultState,s=this.currentResultOptions,l=e!==n,d=l?e.state:this.currentQueryInitialState,b=l?this.currentResult:this.previousQueryResult,{state:C}=e;let{dataUpdatedAt:u,error:j,errorUpdatedAt:A,fetchStatus:p,status:I}=C,W=!1,q=!1,X;if(o._optimisticResults){const z=this.hasListeners(),N=!z&&l6(e,o),V=z&&c6(e,n,o,i);(N||V)&&(p=t_(e.options.networkMode)?"fetching":"paused",u||(I="loading")),o._optimisticResults==="isRestoring"&&(p="idle")}if(o.keepPreviousData&&!C.dataUpdatedAt&&b!=null&&b.isSuccess&&I!=="error")X=b.data,u=b.dataUpdatedAt,I=b.status,W=!0;else if(o.select&&typeof C.data<"u")if(r&&C.data===(a==null?void 0:a.data)&&o.select===this.selectFn)X=this.selectResult;else try{this.selectFn=o.select,X=o.select(C.data),X=LA(r==null?void 0:r.data,X,o),this.selectResult=X,this.selectError=null}catch(z){process.env.NODE_ENV!=="production"&&this.client.getLogger().error(z),this.selectError=z}else X=C.data;if(typeof o.placeholderData<"u"&&typeof X>"u"&&I==="loading"){let z;if(r!=null&&r.isPlaceholderData&&o.placeholderData===(s==null?void 0:s.placeholderData))z=r.data;else if(z=typeof o.placeholderData=="function"?o.placeholderData():o.placeholderData,o.select&&typeof z<"u")try{z=o.select(z),this.selectError=null}catch(N){process.env.NODE_ENV!=="production"&&this.client.getLogger().error(N),this.selectError=N}typeof z<"u"&&(I="success",X=LA(r==null?void 0:r.data,z,o),q=!0)}this.selectError&&(j=this.selectError,X=this.selectResult,A=Date.now(),I="error");const H=p==="fetching",D=I==="loading",$=I==="error";return{status:I,fetchStatus:p,isLoading:D,isSuccess:I==="success",isError:$,isInitialLoading:D&&H,data:X,dataUpdatedAt:u,error:j,errorUpdatedAt:A,failureCount:C.fetchFailureCount,failureReason:C.fetchFailureReason,errorUpdateCount:C.errorUpdateCount,isFetched:C.dataUpdateCount>0||C.errorUpdateCount>0,isFetchedAfterMount:C.dataUpdateCount>d.dataUpdateCount||C.errorUpdateCount>d.errorUpdateCount,isFetching:H,isRefetching:H&&!D,isLoadingError:$&&C.dataUpdatedAt===0,isPaused:p==="paused",isPlaceholderData:q,isPreviousData:W,isRefetchError:$&&C.dataUpdatedAt!==0,isStale:e3(e,o),refetch:this.refetch,remove:this.remove}}updateResult(e){const o=this.currentResult,n=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,n1(n,o))return;this.currentResult=n;const i={cache:!0},r=()=>{if(!o)return!0;const{notifyOnChangeProps:a}=this.options,s=typeof a=="function"?a():a;if(s==="all"||!s&&!this.trackedProps.size)return!0;const l=new Set(s??this.trackedProps);return this.options.useErrorBoundary&&l.add("error"),Object.keys(this.currentResult).some(d=>{const b=d;return this.currentResult[b]!==o[b]&&l.has(b)})};(e==null?void 0:e.listeners)!==!1&&r()&&(i.listeners=!0),this.notify(Lt(Lt({},i),e))}updateQuery(){const e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;const o=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(o==null||o.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){const o={};e.type==="success"?o.onSuccess=!e.manual:e.type==="error"&&!Ny(e.error)&&(o.onError=!0),this.updateResult(o),this.hasListeners()&&this.updateTimers()}notify(e){Wn.batch(()=>{if(e.onSuccess){var o,n,i,r;(o=(n=this.options).onSuccess)==null||o.call(n,this.currentResult.data),(i=(r=this.options).onSettled)==null||i.call(r,this.currentResult.data,null)}else if(e.onError){var a,s,l,d;(a=(s=this.options).onError)==null||a.call(s,this.currentResult.error),(l=(d=this.options).onSettled)==null||l.call(d,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach(({listener:b})=>{b(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function $me(t,e){return e.enabled!==!1&&!t.state.dataUpdatedAt&&!(t.state.status==="error"&&e.retryOnMount===!1)}function l6(t,e){return $me(t,e)||t.state.dataUpdatedAt>0&&NA(t,e,e.refetchOnMount)}function NA(t,e,o){if(e.enabled!==!1){const n=typeof o=="function"?o(t):o;return n==="always"||n!==!1&&e3(t,e)}return!1}function c6(t,e,o,n){return o.enabled!==!1&&(t!==e||n.enabled===!1)&&(!o.suspense||t.state.status!=="error")&&e3(t,o)}function e3(t,e){return t.isStaleByTime(e.staleTime)}function zme(t,e,o){return o.keepPreviousData?!1:o.placeholderData!==void 0?e.isPlaceholderData:!n1(t.getCurrentResult(),e)}var DA={exports:{}},C2={};/**
|
|
1003
1003
|
* @license React
|