@nebula.js/sn-pivot-table 7.23.0 → 7.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,10 @@
1
1
  /*
2
- * @nebula.js/sn-pivot-table v7.23.0
2
+ * @nebula.js/sn-pivot-table v7.24.0
3
3
  * Copyright (c) 2026 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
6
6
 
7
- System.register(["react","react-dom","@nebula.js/stardust","picasso-plugin-q","picasso.js"],function(e,t){"use strict";var n,r,i,o,a,s,l,u,c,d,p,f,h,m,g,v,y,b,x,S,w,C,E,I,D,R,P,M,L,A,k,O,q,T,N,j,_,F,z,W,$,H,V,B,G,U,Y;return{setters:[function(e){n=e.default,r=e.createElement,i=e,o=e.isValidElement,a=e.cloneElement,s=e.Children,l=e.useRef,u=e.createContext,c=e.useReducer,d=e.useEffect,p=e.useDebugValue,f=e.useCallback,h=e.useContext,m=e.useState,g=e.useLayoutEffect,v=e.useMemo,y=e.useInsertionEffect,b=e.memo,x=e.forwardRef,S=e.startTransition,w=e.useImperativeHandle,C=e.PureComponent},function(e){E=e.default,I=e,D=e.flushSync},function(e){R=e.HyperCubeHandler,P=e.useMemo,M=e.useOptions,L=e.usePromise,A=e.useState,k=e.useEffect,O=e.useTheme,q=e.useInteractionState,T=e.onContextMenu,N=e.onTakeSnapshot,j=e.useImperativeHandle,_=e.useTranslator,F=e.useElement,z=e.useStaleLayout,W=e.useModel,$=e.useApp,H=e.useEmbed,V=e.useKeyboard,B=e.useSelections,G=e.useRect},function(e){U=e.default},function(e){Y=e.default}],execute:function(){e("default",function(e){return{qae:{properties:{initial:OY()},data:yF(e)},ext:Iz(e),component(){AY(e)}}});const K={black:"#000",white:"#fff"},X="#e57373",J="#ef5350",Z="#f44336",Q="#d32f2f",ee="#c62828",te="#f3e5f5",ne="#ce93d8",re="#ba68c8",ie="#ab47bc",oe="#9c27b0",ae="#7b1fa2",se="#e3f2fd",le="#90caf9",ue="#42a5f5",ce="#1976d2",de="#1565c0",pe="#4fc3f7",fe="#29b6f6",he="#03a9f4",me="#0288d1",ge="#01579b",ve="#81c784",ye="#66bb6a",be="#4caf50",xe="#388e3c",Se="#2e7d32",we="#1b5e20",Ce="#ffb74d",Ee="#ffa726",Ie="#ff9800",De="#f57c00",Re="#e65100",Pe={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};function Me(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;e<arguments.length;e+=1)t+="&args[]="+encodeURIComponent(arguments[e]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}var Le=Object.freeze({__proto__:null,default:Me}),Ae="$$material";function ke(){return ke=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ke.apply(null,arguments)}function Oe(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}var qe="-ms-",Te="-moz-",Ne="-webkit-",je="comm",_e="rule",Fe="decl",ze="@keyframes",We=Math.abs,$e=String.fromCharCode,He=Object.assign;function Ve(e){return e.trim()}function Be(e,t){return(e=t.exec(e))?e[0]:e}function Ge(e,t,n){return e.replace(t,n)}function Ue(e,t,n){return e.indexOf(t,n)}function Ye(e,t){return 0|e.charCodeAt(t)}function Ke(e,t,n){return e.slice(t,n)}function Xe(e){return e.length}function Je(e){return e.length}function Ze(e,t){return t.push(e),e}function Qe(e,t){return e.filter(function(e){return!Be(e,t)})}var et,tt,nt=1,rt=1,it=0,ot=0,at=0,st="";function lt(e,t,n,r,i,o,a,s){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:nt,column:rt,length:a,return:"",siblings:s}}function ut(e,t){return He(lt("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function ct(e){for(;e.root;)e=ut(e.root,{children:[e]});Ze(e,e.siblings)}function dt(){return at=ot>0?Ye(st,--ot):0,rt--,10===at&&(rt=1,nt--),at}function pt(){return at=ot<it?Ye(st,ot++):0,rt++,10===at&&(rt=1,nt++),at}function ft(){return Ye(st,ot)}function ht(){return ot}function mt(e,t){return Ke(st,e,t)}function gt(e){switch(e){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 vt(e){return Ve(mt(ot-1,xt(91===e?e+2:40===e?e+1:e)))}function yt(e){for(;(at=ft())&&at<33;)pt();return gt(e)>2||gt(at)>3?"":" "}function bt(e,t){for(;--t&&pt()&&!(at<48||at>102||at>57&&at<65||at>70&&at<97););return mt(e,ht()+(t<6&&32==ft()&&32==pt()))}function xt(e){for(;pt();)switch(at){case e:return ot;case 34:case 39:34!==e&&39!==e&&xt(at);break;case 40:41===e&&xt(e);break;case 92:pt()}return ot}function St(e,t){for(;pt()&&e+at!==57&&(e+at!==84||47!==ft()););return"/*"+mt(t,ot-1)+"*"+$e(47===e?e:pt())}function wt(e){for(;!gt(ft());)pt();return mt(e,ot)}function Ct(e){return function(e){return st="",e}(Et("",null,null,null,[""],e=function(e){return nt=rt=1,it=Xe(st=e),ot=0,[]}(e),0,[0],e))}function Et(e,t,n,r,i,o,a,s,l){for(var u=0,c=0,d=a,p=0,f=0,h=0,m=1,g=1,v=1,y=0,b="",x=i,S=o,w=r,C=b;g;)switch(h=y,y=pt()){case 40:if(108!=h&&58==Ye(C,d-1)){-1!=Ue(C+=Ge(vt(y),"&","&\f"),"&\f",We(u?s[u-1]:0))&&(v=-1);break}case 34:case 39:case 91:C+=vt(y);break;case 9:case 10:case 13:case 32:C+=yt(h);break;case 92:C+=bt(ht()-1,7);continue;case 47:switch(ft()){case 42:case 47:Ze(Dt(St(pt(),ht()),t,n,l),l),5!=gt(h||1)&&5!=gt(ft()||1)||!Xe(C)||" "===Ke(C,-1,void 0)||(C+=" ");break;default:C+="/"}break;case 123*m:s[u++]=Xe(C)*v;case 125*m:case 59:case 0:switch(y){case 0:case 125:g=0;case 59+c:-1==v&&(C=Ge(C,/\f/g,"")),f>0&&(Xe(C)-d||0===m&&47===h)&&Ze(f>32?Rt(C+";",r,n,d-1,l):Rt(Ge(C," ","")+";",r,n,d-2,l),l);break;case 59:C+=";";default:if(Ze(w=It(C,t,n,u,c,i,s,b,x=[],S=[],d,o),o),123===y)if(0===c)Et(C,t,w,w,x,o,d,s,S);else{switch(p){case 99:if(110===Ye(C,3))break;case 108:if(97===Ye(C,2))break;default:c=0;case 100:case 109:case 115:}c?Et(e,w,w,r&&Ze(It(e,w,w,0,0,i,s,b,i,x=[],d,S),S),i,S,d,s,r?x:S):Et(C,w,w,w,[""],S,0,s,S)}}u=c=f=0,m=v=1,b=C="",d=a;break;case 58:d=1+Xe(C),f=h;default:if(m<1)if(123==y)--m;else if(125==y&&0==m++&&125==dt())continue;switch(C+=$e(y),y*m){case 38:v=c>0?1:(C+="\f",-1);break;case 44:s[u++]=(Xe(C)-1)*v,v=1;break;case 64:45===ft()&&(C+=vt(pt())),p=ft(),c=d=Xe(b=C+=wt(ht())),y++;break;case 45:45===h&&2==Xe(C)&&(m=0)}}return o}function It(e,t,n,r,i,o,a,s,l,u,c,d){for(var p=i-1,f=0===i?o:[""],h=Je(f),m=0,g=0,v=0;m<r;++m)for(var y=0,b=Ke(e,p+1,p=We(g=a[m])),x=e;y<h;++y)(x=Ve(g>0?f[y]+" "+b:Ge(b,/&\f/g,f[y])))&&(l[v++]=x);return lt(e,t,n,0===i?_e:s,l,u,c,d)}function Dt(e,t,n,r){return lt(e,t,n,je,$e(at),Ke(e,2,-2),0,r)}function Rt(e,t,n,r,i){return lt(e,t,n,Fe,Ke(e,0,r),Ke(e,r+1,-1),r,i)}function Pt(e,t,n){switch(function(e,t){return 45^Ye(e,0)?(((t<<2^Ye(e,0))<<2^Ye(e,1))<<2^Ye(e,2))<<2^Ye(e,3):0}(e,t)){case 5103:return Ne+"print-"+e+e;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 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return Ne+e+e;case 4855:return Ne+e.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+e;case 4789:return Te+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ne+e+Te+e+qe+e+e;case 5936:switch(Ye(e,t+11)){case 114:return Ne+e+qe+Ge(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ne+e+qe+Ge(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ne+e+qe+Ge(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return Ne+e+qe+e+e;case 6165:return Ne+e+qe+"flex-"+e+e;case 5187:return Ne+e+Ge(e,/(\w+).+(:[^]+)/,Ne+"box-$1$2"+qe+"flex-$1$2")+e;case 5443:return Ne+e+qe+"flex-item-"+Ge(e,/flex-|-self/g,"")+(Be(e,/flex-|baseline/)?"":qe+"grid-row-"+Ge(e,/flex-|-self/g,""))+e;case 4675:return Ne+e+qe+"flex-line-pack"+Ge(e,/align-content|flex-|-self/g,"")+e;case 5548:return Ne+e+qe+Ge(e,"shrink","negative")+e;case 5292:return Ne+e+qe+Ge(e,"basis","preferred-size")+e;case 6060:return Ne+"box-"+Ge(e,"-grow","")+Ne+e+qe+Ge(e,"grow","positive")+e;case 4554:return Ne+Ge(e,/([^-])(transform)/g,"$1"+Ne+"$2")+e;case 6187:return Ge(Ge(Ge(e,/(zoom-|grab)/,Ne+"$1"),/(image-set)/,Ne+"$1"),e,"")+e;case 5495:case 3959:return Ge(e,/(image-set\([^]*)/,Ne+"$1$`$1");case 4968:return Ge(Ge(e,/(.+:)(flex-)?(.*)/,Ne+"box-pack:$3"+qe+"flex-pack:$3"),/space-between/,"justify")+Ne+e+e;case 4200:if(!Be(e,/flex-|baseline/))return qe+"grid-column-align"+Ke(e,t)+e;break;case 2592:case 3360:return qe+Ge(e,"template-","")+e;case 4384:case 3616:return n&&n.some(function(e,n){return t=n,Be(e.props,/grid-\w+-end/)})?~Ue(e+(n=n[t].value),"span",0)?e:qe+Ge(e,"-start","")+e+qe+"grid-row-span:"+(~Ue(n,"span",0)?Be(n,/\d+/):+Be(n,/\d+/)-+Be(e,/\d+/))+";":qe+Ge(e,"-start","")+e;case 4896:case 4128:return n&&n.some(function(e){return Be(e.props,/grid-\w+-start/)})?e:qe+Ge(Ge(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Ge(e,/(.+)-inline(.+)/,Ne+"$1$2")+e;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(Xe(e)-1-t>6)switch(Ye(e,t+1)){case 109:if(45!==Ye(e,t+4))break;case 102:return Ge(e,/(.+:)(.+)-([^]+)/,"$1"+Ne+"$2-$3$1"+Te+(108==Ye(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Ue(e,"stretch",0)?Pt(Ge(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return Ge(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(t,n,r,i,o,a,s){return qe+n+":"+r+s+(i?qe+n+"-span:"+(o?a:+a-+r)+s:"")+e});case 4949:if(121===Ye(e,t+6))return Ge(e,":",":"+Ne)+e;break;case 6444:switch(Ye(e,45===Ye(e,14)?18:11)){case 120:return Ge(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+Ne+(45===Ye(e,14)?"inline-":"")+"box$3$1"+Ne+"$2$3$1"+qe+"$2box$3")+e;case 100:return Ge(e,":",":"+qe)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Ge(e,"scroll-","scroll-snap-")+e}return e}function Mt(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function Lt(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case"@namespace":case Fe:return e.return=e.return||e.value;case je:return"";case ze:return e.return=e.value+"{"+Mt(e.children,r)+"}";case _e:if(!Xe(e.value=e.props.join(",")))return""}return Xe(n=Mt(e.children,r))?e.return=e.value+"{"+n+"}":""}function At(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Fe:return void(e.return=Pt(e.value,e.length,n));case ze:return Mt([ut(e,{value:Ge(e.value,"@","@"+Ne)})],r);case _e:if(e.length)return function(e,t){return e.map(t).join("")}(n=e.props,function(t){switch(Be(t,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":ct(ut(e,{props:[Ge(t,/:(read-\w+)/,":-moz-$1")]})),ct(ut(e,{props:[t]})),He(e,{props:Qe(n,r)});break;case"::placeholder":ct(ut(e,{props:[Ge(t,/:(plac\w+)/,":"+Ne+"input-$1")]})),ct(ut(e,{props:[Ge(t,/:(plac\w+)/,":-moz-$1")]})),ct(ut(e,{props:[Ge(t,/:(plac\w+)/,qe+"input-$1")]})),ct(ut(e,{props:[t]})),He(e,{props:Qe(n,r)})}return""})}}const kt="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",Ot="active",qt="data-styled-version",Tt="6.4.0",Nt="/*!sc*/\n",jt="undefined"!=typeof window&&"undefined"!=typeof document;function _t(e){if("undefined"!=typeof process&&void 0!==process.env){const t=process.env[e];if(void 0!==t&&""!==t)return"false"!==t}}const Ft=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:null!==(tt=null!==(et=_t("REACT_APP_SC_DISABLE_SPEEDY"))&&void 0!==et?et:_t("SC_DISABLE_SPEEDY"))&&void 0!==tt?tt:"undefined"==typeof process||void 0===process.env||!1),zt="sc-keyframes-",Wt={};function $t(e,...t){return new Error(`An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#${e} for more information.${t.length>0?` Args: ${t.join(", ")}`:""}`)}let Ht=new Map,Vt=new Map,Bt=1;const Gt=e=>{if(Ht.has(e))return Ht.get(e);for(;Vt.has(Bt);)Bt++;const t=Bt++;return Ht.set(e,t),Vt.set(t,e),t},Ut=e=>Vt.get(e),Yt=(e,t)=>{Bt=t+1,Ht.set(e,t),Vt.set(t,e)},Kt=Object.freeze([]),Xt=Object.freeze({});function Jt(e,t,n=Xt){return e.theme!==n.theme&&e.theme||t||n.theme}const Zt=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Qt=/(^-|-$)/g;function en(e){return e.replace(Zt,"-").replace(Qt,"")}const tn=/(a)(d)/gi,nn=e=>String.fromCharCode(e+(e>25?39:97));function rn(e){let t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=nn(t%52)+n;return(nn(t%52)+n).replace(tn,"$1-$2")}const on=5381,an=(e,t)=>{let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e},sn=e=>an(on,e);function ln(e){return rn(sn(e)>>>0)}function un(e){return"string"==typeof e&&!0}function cn(e){return un(e)?`styled.${e}`:`Styled(${function(e){return e.displayName||e.name||"Component"}(e)})`}const dn=Symbol.for("react.memo"),pn=Symbol.for("react.forward_ref"),fn={contextType:!0,defaultProps:!0,displayName:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,propTypes:!0,type:!0},hn={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},mn={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},gn={[pn]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[dn]:mn};function vn(e){return("type"in(t=e)&&t.type.$$typeof)===dn?mn:"$$typeof"in e?gn[e.$$typeof]:fn;var t}const yn=Object.defineProperty,bn=Object.getOwnPropertyNames,xn=Object.getOwnPropertySymbols,Sn=Object.getOwnPropertyDescriptor,wn=Object.getPrototypeOf,Cn=Object.prototype;function En(e,t,n){if("string"!=typeof t){const r=wn(t);r&&r!==Cn&&En(e,r,n);const i=bn(t).concat(xn(t)),o=vn(e),a=vn(t);for(let r=0;r<i.length;++r){const s=i[r];if(!(s in hn||n&&n[s]||a&&s in a||o&&s in o)){const n=Sn(t,s);try{yn(e,s,n)}catch(e){}}}}return e}function In(e){return"function"==typeof e}function Dn(e){return"object"==typeof e&&"styledComponentId"in e}function Rn(e,t){return e&&t?e+" "+t:e||t||""}function Pn(e,t){return e.join("")}function Mn(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function Ln(e,t,n=!1){if(!n&&!Mn(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(let n=0;n<t.length;n++)e[n]=Ln(e[n],t[n]);else if(Mn(t))for(const n in t)e[n]=Ln(e[n],t[n]);return e}function An(e,t){Object.defineProperty(e,"toString",{value:t})}const kn=class{constructor(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e,this._cGroup=0,this._cIndex=0}indexOfGroup(e){if(e===this._cGroup)return this._cIndex;let t=this._cIndex;if(e>this._cGroup)for(let n=this._cGroup;n<e;n++)t+=this.groupSizes[n];else for(let n=this._cGroup-1;n>=e;n--)t-=this.groupSizes[n];return this._cGroup=e,this._cIndex=t,t}insertRules(e,t){if(e>=this.groupSizes.length){const t=this.groupSizes,n=t.length;let r=n;for(;e>=r;)if(r<<=1,r<0)throw $t(16,`${e}`);this.groupSizes=new Uint32Array(r),this.groupSizes.set(t),this.length=r;for(let e=n;e<r;e++)this.groupSizes[e]=0}let n=this.indexOfGroup(e+1),r=0;for(let i=0,o=t.length;i<o;i++)this.tag.insertRule(n,t[i])&&(this.groupSizes[e]++,n++,r++);r>0&&this._cGroup>e&&(this._cIndex+=r)}clearGroup(e){if(e<this.length){const t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(let e=n;e<r;e++)this.tag.deleteRule(n);t>0&&this._cGroup>e&&(this._cIndex-=t)}}getGroup(e){let t="";if(e>=this.length||0===this.groupSizes[e])return t;const n=this.groupSizes[e],r=this.indexOfGroup(e),i=r+n;for(let e=r;e<i;e++)t+=this.tag.getRule(e)+Nt;return t}},On=`style[${kt}][${qt}="${Tt}"]`,qn=new RegExp(`^${kt}\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)`),Tn=e=>"undefined"!=typeof ShadowRoot&&e instanceof ShadowRoot||"host"in e&&11===e.nodeType,Nn=e=>{if(!e)return document;if(Tn(e))return e;if("getRootNode"in e){const t=e.getRootNode();if(Tn(t))return t}return document},jn=(e,t,n)=>{const r=n.split(",");let i;for(let n=0,o=r.length;n<o;n++)(i=r[n])&&e.registerName(t,i)},_n=(e,t)=>{var n;const r=(null!==(n=t.textContent)&&void 0!==n?n:"").split(Nt),i=[];for(let t=0,n=r.length;t<n;t++){const n=r[t].trim();if(!n)continue;const o=n.match(qn);if(o){const t=0|parseInt(o[1],10),n=o[2];0!==t&&(Yt(n,t),jn(e,n,o[3]),e.getTag().insertRules(t,i)),i.length=0}else i.push(n)}},Fn=e=>{const t=Nn(e.options.target).querySelectorAll(On);for(let n=0,r=t.length;n<r;n++){const r=t[n];r&&r.getAttribute(kt)!==Ot&&(_n(e,r),r.parentNode&&r.parentNode.removeChild(r))}};let zn=!1;const Wn=(e,t)=>{const n=document.head,r=e||n,i=document.createElement("style"),o=(e=>{const t=Array.from(e.querySelectorAll(`style[${kt}]`));return t[t.length-1]})(r),a=void 0!==o?o.nextSibling:null;i.setAttribute(kt,Ot),i.setAttribute(qt,Tt);const s=t||function(){if(!1!==zn)return zn;if("undefined"!=typeof document){const e=document.head.querySelector('meta[property="csp-nonce"]');if(e)return zn=e.nonce||e.getAttribute("content")||void 0;const t=document.head.querySelector('meta[name="sc-nonce"]');if(t)return zn=t.getAttribute("content")||void 0}return zn="undefined"!=typeof __webpack_nonce__?__webpack_nonce__:void 0}();return s&&i.setAttribute("nonce",s),r.insertBefore(i,a),i},$n=class{constructor(e,t){this.element=Wn(e,t),this.element.appendChild(document.createTextNode("")),this.sheet=(e=>{var t;if(e.sheet)return e.sheet;const n=null!==(t=e.getRootNode().styleSheets)&&void 0!==t?t:document.styleSheets;for(let t=0,r=n.length;t<r;t++){const r=n[t];if(r.ownerNode===e)return r}throw $t(17)})(this.element),this.length=0}insertRule(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}}deleteRule(e){this.sheet.deleteRule(e),this.length--}getRule(e){const t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""}},Hn=class{constructor(e,t){this.element=Wn(e,t),this.nodes=this.element.childNodes,this.length=0}insertRule(e,t){if(e<=this.length&&e>=0){const n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1}deleteRule(e){this.element.removeChild(this.nodes[e]),this.length--}getRule(e){return e<this.length?this.nodes[e].textContent:""}};let Vn=jt;const Bn={isServer:!jt,useCSSOMInjection:!Ft};class Gn{static registerId(e){return Gt(e)}constructor(e=Xt,t={},n){this.options=Object.assign(Object.assign({},Bn),e),this.gs=t,this.keyframeIds=new Set,this.names=new Map(n),this.server=!!e.isServer,!this.server&&jt&&Vn&&(Vn=!1,Fn(this)),An(this,()=>(e=>{const t=e.getTag(),{length:n}=t;let r="";for(let i=0;i<n;i++){const n=Ut(i);if(void 0===n)continue;const o=e.names.get(n);if(void 0===o||!o.size)continue;const a=t.getGroup(i);if(0===a.length)continue;const s=kt+".g"+i+'[id="'+n+'"]';let l="";for(const e of o)e.length>0&&(l+=e+",");r+=a+s+'{content:"'+l+'"}'+Nt}return r})(this))}rehydrate(){!this.server&&jt&&Fn(this)}reconstructWithOptions(e,t=!0){const n=new Gn(Object.assign(Object.assign({},this.options),e),this.gs,t&&this.names||void 0);return n.keyframeIds=new Set(this.keyframeIds),!this.server&&jt&&e.target!==this.options.target&&Nn(this.options.target)!==Nn(e.target)&&Fn(n),n}allocateGSInstance(e){return this.gs[e]=(this.gs[e]||0)+1}getTag(){return this.tag||(this.tag=(e=(({useCSSOMInjection:e,target:t,nonce:n})=>e?new $n(t,n):new Hn(t,n))(this.options),new kn(e)));var e}hasNameForId(e,t){var n,r;return null!==(r=null===(n=this.names.get(e))||void 0===n?void 0:n.has(t))&&void 0!==r&&r}registerName(e,t){Gt(e),e.startsWith(zt)&&this.keyframeIds.add(e);const n=this.names.get(e);n?n.add(t):this.names.set(e,new Set([t]))}insertRules(e,t,n){this.registerName(e,t),this.getTag().insertRules(Gt(e),n)}clearNames(e){this.names.has(e)&&this.names.get(e).clear()}clearRules(e){this.getTag().clearGroup(Gt(e)),this.clearNames(e)}clearTag(){this.tag=void 0}}const Un=new WeakSet,Yn={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexShrink:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart: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};function Kn(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||e in Yn||e.startsWith("--")?String(t).trim():t+"px"}const Xn=e=>e>="A"&&e<="Z";function Jn(e){let t="";for(let n=0;n<e.length;n++){const r=e[n];if(1===n&&"-"===r&&"-"===e[0])return e;Xn(r)?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}const Zn=Symbol.for("sc-keyframes");function Qn(e){return In(e)&&!(e.prototype&&e.prototype.isReactComponent)}const er=e=>null==e||!1===e||""===e,tr=Symbol.for("react.client.reference");function nr(e){return e.$$typeof===tr}const rr=e=>{const t=[];for(const n in e){const r=e[n];e.hasOwnProperty(n)&&!er(r)&&(Array.isArray(r)&&Un.has(r)||In(r)?t.push(Jn(n)+":",r,";"):Mn(r)?t.push(n+" {",...rr(r),"}"):t.push(Jn(n)+": "+Kn(n,r)+";"))}return t};function ir(e,t,n,r,i=[]){if(er(e))return i;const o=typeof e;if("string"===o)return i.push(e),i;if("function"===o){if(nr(e))return i;if(Qn(e)&&t){return ir(e(t),t,n,r,i)}return i.push(e),i}if(Array.isArray(e)){for(let o=0;o<e.length;o++)ir(e[o],t,n,r,i);return i}if(Dn(e))return i.push(`.${e.styledComponentId}`),i;if(function(e){return"object"==typeof e&&null!==e&&Zn in e}(e))return n?(e.inject(n,r),i.push(e.getName(r))):i.push(e),i;if(nr(e))return i;if(Mn(e)){const t=rr(e);for(let e=0;e<t.length;e++)i.push(t[e]);return i}return i.push(e.toString()),i}const or=sn(Tt);class ar{constructor(e,t,n){this.rules=e,this.componentId=t,this.baseHash=an(or,t),this.baseStyle=n,Gn.registerId(t)}generateAndInjectStyles(e,t,n){let r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n):"";{let i="";for(let r=0;r<this.rules.length;r++){const o=this.rules[r];if("string"==typeof o)i+=o;else if(o)if(Qn(o)){const r=o(e);"string"==typeof r?i+=r:null!=r&&!1!==r&&(i+=Pn(ir(r,e,t,n)))}else i+=Pn(ir(o,e,t,n))}if(i){this.dynamicNameCache||(this.dynamicNameCache=new Map);const e=n.hash?n.hash+i:i;let o=this.dynamicNameCache.get(e);if(!o){if(o=rn(an(an(this.baseHash,n.hash),i)>>>0),this.dynamicNameCache.size>=200){const e=this.dynamicNameCache.keys().next().value;void 0!==e&&this.dynamicNameCache.delete(e)}this.dynamicNameCache.set(e,o)}if(!t.hasNameForId(this.componentId,o)){const e=n(i,"."+o,void 0,this.componentId);t.insertRules(this.componentId,o,e)}r=Rn(r,o)}}return r}}const sr=/&/g,lr=47;function ur(e,t){let n=0;for(;--t>=0&&92===e.charCodeAt(t);)n++;return!(1&~n)}function cr(e){const t=e.length;let n="",r=0,i=0,o=0,a=!1,s=!1;for(let l=0;l<t;l++){const u=e.charCodeAt(l);if(0!==o||a||u!==lr||42!==e.charCodeAt(l+1))if(a)42===u&&e.charCodeAt(l+1)===lr&&(a=!1,l++);else if(34!==u&&39!==u||ur(e,l)){if(0===o)if(123===u)i++;else if(125===u){if(i--,i<0){s=!0;let n=l+1;for(;n<t;){const t=e.charCodeAt(n);if(59===t||10===t)break;n++}n<t&&59===e.charCodeAt(n)&&n++,i=0,l=n-1,r=n;continue}0===i&&(n+=e.substring(r,l+1),r=l+1)}else 59===u&&0===i&&(n+=e.substring(r,l+1),r=l+1)}else 0===o?o=u:o===u&&(o=0);else a=!0,l++}return s||0!==i||0!==o?(r<t&&0===i&&0===o&&(n+=e.substring(r)),n):e}function dr(e,t){for(let n=0;n<e.length;n++){const r=e[n];if("rule"===r.type){r.value=t+" "+r.value,r.value=r.value.replaceAll(",",","+t+" ");const e=r.props,n=[];for(let r=0;r<e.length;r++)n[r]=t+" "+e[r];r.props=n}Array.isArray(r.children)&&"@keyframes"!==r.type&&(r.children=dr(r.children,t))}return e}const pr=new Gn,fr=function({options:e=Xt,plugins:t=Kt}=Xt){let n,r,i;const o=(e,t,i)=>i.startsWith(r)&&i.endsWith(r)&&i.replaceAll(r,"").length>0?`.${n}`:e,a=t.slice();a.push(e=>{e.type===_e&&e.value.includes("&")&&(i||(i=new RegExp(`\\${r}\\b`,"g")),e.props[0]=e.props[0].replace(sr,r).replace(i,o))}),e.prefix&&a.push(At),a.push(Lt);let s=[];const l=function(e){var t=Je(e);return function(n,r,i,o){for(var a="",s=0;s<t;s++)a+=e[s](n,r,i,o)||"";return a}}(a.concat((d=e=>s.push(e),function(e){e.root||(e=e.return)&&d(e)}))),u=(t,o="",a="",u="&")=>{n=u,r=o,i=void 0;const c=function(e){const t=-1!==e.indexOf("//"),n=-1!==e.indexOf("}");if(!t&&!n)return e;if(!t)return cr(e);const r=e.length;let i="",o=0,a=0,s=0,l=0,u=0,c=!1;for(;a<r;){const t=e.charCodeAt(a);if(34!==t&&39!==t||ur(e,a))if(0===s)if(t===lr&&a+1<r&&42===e.charCodeAt(a+1)){for(a+=2;a+1<r&&(42!==e.charCodeAt(a)||e.charCodeAt(a+1)!==lr);)a++;a+=2}else if(40!==t)if(41!==t)if(l>0)a++;else if(42===t&&a+1<r&&e.charCodeAt(a+1)===lr)i+=e.substring(o,a),a+=2,o=a,c=!0;else if(t===lr&&a+1<r&&e.charCodeAt(a+1)===lr){for(i+=e.substring(o,a);a<r&&10!==e.charCodeAt(a);)a++;o=a,c=!0}else 123===t?u++:125===t&&u--,a++;else l>0&&l--,a++;else l++,a++;else a++;else 0===s?s=t:s===t&&(s=0),a++}return c?(o<r&&(i+=e.substring(o)),0===u?i:cr(i)):0===u?e:cr(e)}(t);let d=Ct(a||o?a+" "+o+" { "+c+" }":c);return e.namespace&&(d=dr(d,e.namespace)),s=[],Mt(d,l),s},c=e;var d;let p=on;for(let e=0;e<t.length;e++)t[e].name||$t(15),p=an(p,t[e].name);return(null==c?void 0:c.namespace)&&(p=an(p,c.namespace)),(null==c?void 0:c.prefix)&&(p=an(p,"p")),u.hash=p!==on?p.toString():"",u}(),hr=n.createContext({shouldForwardProp:void 0,styleSheet:pr,stylis:fr,stylisPlugins:void 0});function mr(){return n.useContext(hr)}hr.Consumer;const gr=n.createContext(void 0);gr.Consumer;const vr=Object.prototype.hasOwnProperty,yr={};function br(e,t){const n="string"!=typeof e?"sc":en(e);yr[n]=(yr[n]||0)+1;const r=n+"-"+ln(Tt+n+yr[n]);return t?t+"-"+r:r}function xr(e,t,i){const o=Dn(e),a=e,s=!un(e),{attrs:l=Kt,componentId:u=br(t.displayName,t.parentComponentId),displayName:c=cn(e)}=t,d=t.displayName&&t.componentId?en(t.displayName)+"-"+t.componentId:t.componentId||u,p=o&&a.attrs?a.attrs.concat(l).filter(Boolean):l;let{shouldForwardProp:f}=t;if(o&&a.shouldForwardProp){const e=a.shouldForwardProp;if(t.shouldForwardProp){const n=t.shouldForwardProp;f=(t,r)=>e(t,r)&&n(t,r)}else f=e}const h=new ar(i,d,o?a.componentStyle:void 0);function m(e,t){return function(e,t,i){const{attrs:o,componentStyle:a,defaultProps:s,foldedComponentIds:l,styledComponentId:u,target:c}=e,d=n.useContext(gr),p=mr(),f=e.shouldForwardProp||p.shouldForwardProp,h=Jt(t,d,s)||Xt;let m,g;{const e=n.useRef(null),r=e.current;if(null!==r&&r[1]===h&&r[2]===p.styleSheet&&r[3]===p.stylis&&r[7]===a&&function(e,t,n){const r=e,i=t;let o=0;for(const e in i)if(vr.call(i,e)&&(o++,r[e]!==i[e]))return!1;return o===n}(r[0],t,r[4]))m=r[5],g=r[6];else{m=function(e,t,n){const r=Object.assign(Object.assign({},t),{className:void 0,theme:n}),i=e.length>1;for(let n=0;n<e.length;n++){const o=e[n],a=In(o)?o(i?Object.assign({},r):r):o;for(const e in a)"className"===e?r.className=Rn(r.className,a[e]):"style"===e?r.style=Object.assign(Object.assign({},r.style),a[e]):e in t&&void 0===t[e]||(r[e]=a[e])}return"className"in t&&"string"==typeof t.className&&(r.className=Rn(r.className,t.className)),r}(o,t,h),g=function(e,t,n,r){return e.generateAndInjectStyles(t,n,r)}(a,m,p.styleSheet,p.stylis);let n=0;for(const e in t)vr.call(t,e)&&n++;e.current=[t,h,p.styleSheet,p.stylis,n,m,g,a]}}const v=m.as||c,y=function(e,t,n,r){const i={};for(const o in e)void 0===e[o]||"$"===o[0]||"as"===o||"theme"===o&&e.theme===n||("forwardedAs"===o?i.as=e.forwardedAs:r&&!r(o,t)||(i[o]=e[o]));return i}(m,v,h,f);let b=Rn(l,u);return g&&(b+=" "+g),m.className&&(b+=" "+m.className),y[un(v)&&v.includes("-")?"class":"className"]=b,i&&(y.ref=i),r(v,y)}(g,e,t)}m.displayName=c;let g=n.forwardRef(m);return g.attrs=p,g.componentStyle=h,g.displayName=c,g.shouldForwardProp=f,g.foldedComponentIds=o?Rn(a.foldedComponentIds,a.styledComponentId):"",g.styledComponentId=d,g.target=o?a.target:e,Object.defineProperty(g,"defaultProps",{get(){return this._foldedDefaultProps},set(e){this._foldedDefaultProps=o?function(e,...t){for(const n of t)Ln(e,n,!0);return e}({},a.defaultProps,e):e}}),An(g,()=>`.${g.styledComponentId}`),s&&En(g,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),g}var Sr=new Set(["a","abbr","address","area","article","aside","audio","b","bdi","bdo","blockquote","body","button","br","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","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","map","mark","menu","meter","nav","object","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","slot","small","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tspan","use"]);function wr(e,t){const n=[e[0]];for(let r=0,i=t.length;r<i;r+=1)n.push(t[r],e[r+1]);return n}const Cr=e=>(Un.add(e),e);function Er(e,...t){if(In(e)||Mn(e))return Cr(ir(wr(Kt,[e,...t])));const n=e;return 0===t.length&&1===n.length&&"string"==typeof n[0]?ir(n):Cr(ir(wr(n,t)))}function Ir(e,t,n=Xt){if(!t)throw $t(1,t);const r=(r,...i)=>e(t,n,Er(r,...i));return r.attrs=r=>Ir(e,t,Object.assign(Object.assign({},n),{attrs:Array.prototype.concat(n.attrs,r).filter(Boolean)})),r.withConfig=r=>Ir(e,t,Object.assign(Object.assign({},n),r)),r}const Dr=e=>Ir(xr,e),Rr=Dr;Sr.forEach(e=>{Rr[e]=Dr(e)});class Pr{constructor(e,t){this.instanceRules=new Map,this.rules=e,this.componentId=t,this.isStatic=function(e){for(let t=0;t<e.length;t+=1){const n=e[t];if(In(n)&&!Dn(n))return!1}return!0}(e),Gn.registerId(this.componentId)}removeStyles(e,t){this.instanceRules.delete(e),this.rebuildGroup(t)}renderStyles(e,t,n,r){const i=this.componentId;if(this.isStatic){if(n.hasNameForId(i,i+e))this.instanceRules.has(e)||this.computeRules(e,t,n,r);else{const o=this.computeRules(e,t,n,r);n.insertRules(i,o.name,o.rules)}return}const o=this.instanceRules.get(e);if(this.computeRules(e,t,n,r),!n.server&&o){const t=o.rules,n=this.instanceRules.get(e).rules;if(t.length===n.length){let e=!0;for(let r=0;r<t.length;r++)if(t[r]!==n[r]){e=!1;break}if(e)return}}this.rebuildGroup(n)}computeRules(e,t,n,r){const i=Pn(ir(this.rules,t,n,r)),o={name:this.componentId+e,rules:r(i,"")};return this.instanceRules.set(e,o),o}rebuildGroup(e){const t=this.componentId;e.clearRules(t);for(const n of this.instanceRules.values())e.insertRules(t,n.name,n.rules)}}var Mr;class Lr{constructor(e,t){this[Mr]=!0,this.inject=(e,t=fr)=>{const n=this.getName(t);if(!e.hasNameForId(this.id,n)){const r=t(this.rules,n,"@keyframes");e.insertRules(this.id,n,r)}},this.name=e,this.id=zt+e,this.rules=t,Gt(this.id),An(this,()=>{throw $t(12,String(this.name))})}getName(e=fr){return e.hash?this.name+rn(+e.hash>>>0):this.name}}function Ar(e,...t){const n=Pn(Er(e,...t)),r=ln(n);return new Lr(r,n)}function kr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Or(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}Mr=Zn;var qr={exports:{}};function Tr(){}function Nr(){}Nr.resetWarningCache=Tr;qr.exports=function(){function e(e,t,n,r,i,o){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==o){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Nr,resetWarningCache:Tr};return n.PropTypes=n,n}();var jr=kr(qr.exports);function _r(e){const{injectFirst:t,children:n}=e;if(t&&"undefined"!=typeof window){const e=document.head;if(!e.querySelector('[data-styled="active"]')){const t=document.createElement("style");t.setAttribute("data-styled","active"),e.insertBefore(t,e.firstChild)}}return n}_r.propTypes={children:jr.node,injectFirst:jr.bool};const Fr=function(e,...t){const r=Er(e,...t),i=`sc-global-${ln(JSON.stringify(r))}`,o=new Pr(r,i),a=e=>{const t=mr(),r=n.useContext(gr);let a;{const e=n.useRef(null);null===e.current&&(e.current=t.styleSheet.allocateGSInstance(i)),a=e.current}t.styleSheet.server&&s(a,e,t.styleSheet,r,t.stylis);{const l=o.isStatic?[a,t.styleSheet,o]:[a,e,t.styleSheet,r,t.stylis,o],u=n.useRef(o);n.useLayoutEffect(()=>(t.styleSheet.server||(u.current!==o&&(t.styleSheet.clearRules(i),u.current=o),s(a,e,t.styleSheet,r,t.stylis)),()=>{o.removeStyles(a,t.styleSheet)}),l)}return t.styleSheet.server&&o.instanceRules.delete(a),null};function s(e,t,n,r,i){if(o.isStatic)o.renderStyles(e,Wt,n,i);else{const s=Object.assign(Object.assign({},t),{theme:Jt(t,r,a.defaultProps)});o.renderStyles(e,s,n,i)}}return n.memo(a)}(e=>{const{styles:t,defaultTheme:n={}}=e;return"function"==typeof t?t(null==(r=e.theme)||0===Object.keys(r).length?n:e.theme):t;var r});
7
+ System.register(["react","react-dom","@nebula.js/stardust","picasso-plugin-q","picasso.js"],function(e,t){"use strict";var n,r,i,o,a,s,l,u,c,d,p,f,h,m,g,v,y,b,x,S,w,C,E,I,D,R,P,M,L,A,k,O,q,T,N,j,_,F,z,W,$,H,V,B,G,U,Y;return{setters:[function(e){n=e.default,r=e.createElement,i=e,o=e.isValidElement,a=e.cloneElement,s=e.Children,l=e.useRef,u=e.createContext,c=e.useReducer,d=e.useEffect,p=e.useDebugValue,f=e.useCallback,h=e.useContext,m=e.useState,g=e.useLayoutEffect,v=e.useMemo,y=e.useInsertionEffect,b=e.memo,x=e.forwardRef,S=e.startTransition,w=e.useImperativeHandle,C=e.PureComponent},function(e){E=e.default,I=e,D=e.flushSync},function(e){R=e.HyperCubeHandler,P=e.useMemo,M=e.useOptions,L=e.usePromise,A=e.useState,k=e.useEffect,O=e.useTheme,q=e.useInteractionState,T=e.onContextMenu,N=e.onTakeSnapshot,j=e.useImperativeHandle,_=e.useTranslator,F=e.useElement,z=e.useStaleLayout,W=e.useModel,$=e.useApp,H=e.useEmbed,V=e.useKeyboard,B=e.useSelections,G=e.useRect},function(e){U=e.default},function(e){Y=e.default}],execute:function(){e("default",function(e){return{qae:{properties:{initial:NY()},data:bF(e)},ext:Pz(e),component(){qY(e)}}});const K={black:"#000",white:"#fff"},X="#e57373",J="#ef5350",Z="#f44336",Q="#d32f2f",ee="#c62828",te="#f3e5f5",ne="#ce93d8",re="#ba68c8",ie="#ab47bc",oe="#9c27b0",ae="#7b1fa2",se="#e3f2fd",le="#90caf9",ue="#42a5f5",ce="#1976d2",de="#1565c0",pe="#4fc3f7",fe="#29b6f6",he="#03a9f4",me="#0288d1",ge="#01579b",ve="#81c784",ye="#66bb6a",be="#4caf50",xe="#388e3c",Se="#2e7d32",we="#1b5e20",Ce="#ffb74d",Ee="#ffa726",Ie="#ff9800",De="#f57c00",Re="#e65100",Pe={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};function Me(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;e<arguments.length;e+=1)t+="&args[]="+encodeURIComponent(arguments[e]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}var Le=Object.freeze({__proto__:null,default:Me}),Ae="$$material";function ke(){return ke=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ke.apply(null,arguments)}function Oe(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}var qe="-ms-",Te="-moz-",Ne="-webkit-",je="comm",_e="rule",Fe="decl",ze="@keyframes",We=Math.abs,$e=String.fromCharCode,He=Object.assign;function Ve(e){return e.trim()}function Be(e,t){return(e=t.exec(e))?e[0]:e}function Ge(e,t,n){return e.replace(t,n)}function Ue(e,t,n){return e.indexOf(t,n)}function Ye(e,t){return 0|e.charCodeAt(t)}function Ke(e,t,n){return e.slice(t,n)}function Xe(e){return e.length}function Je(e){return e.length}function Ze(e,t){return t.push(e),e}function Qe(e,t){return e.filter(function(e){return!Be(e,t)})}var et,tt,nt=1,rt=1,it=0,ot=0,at=0,st="";function lt(e,t,n,r,i,o,a,s){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:nt,column:rt,length:a,return:"",siblings:s}}function ut(e,t){return He(lt("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function ct(e){for(;e.root;)e=ut(e.root,{children:[e]});Ze(e,e.siblings)}function dt(){return at=ot>0?Ye(st,--ot):0,rt--,10===at&&(rt=1,nt--),at}function pt(){return at=ot<it?Ye(st,ot++):0,rt++,10===at&&(rt=1,nt++),at}function ft(){return Ye(st,ot)}function ht(){return ot}function mt(e,t){return Ke(st,e,t)}function gt(e){switch(e){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 vt(e){return Ve(mt(ot-1,xt(91===e?e+2:40===e?e+1:e)))}function yt(e){for(;(at=ft())&&at<33;)pt();return gt(e)>2||gt(at)>3?"":" "}function bt(e,t){for(;--t&&pt()&&!(at<48||at>102||at>57&&at<65||at>70&&at<97););return mt(e,ht()+(t<6&&32==ft()&&32==pt()))}function xt(e){for(;pt();)switch(at){case e:return ot;case 34:case 39:34!==e&&39!==e&&xt(at);break;case 40:41===e&&xt(e);break;case 92:pt()}return ot}function St(e,t){for(;pt()&&e+at!==57&&(e+at!==84||47!==ft()););return"/*"+mt(t,ot-1)+"*"+$e(47===e?e:pt())}function wt(e){for(;!gt(ft());)pt();return mt(e,ot)}function Ct(e){return function(e){return st="",e}(Et("",null,null,null,[""],e=function(e){return nt=rt=1,it=Xe(st=e),ot=0,[]}(e),0,[0],e))}function Et(e,t,n,r,i,o,a,s,l){for(var u=0,c=0,d=a,p=0,f=0,h=0,m=1,g=1,v=1,y=0,b="",x=i,S=o,w=r,C=b;g;)switch(h=y,y=pt()){case 40:if(108!=h&&58==Ye(C,d-1)){-1!=Ue(C+=Ge(vt(y),"&","&\f"),"&\f",We(u?s[u-1]:0))&&(v=-1);break}case 34:case 39:case 91:C+=vt(y);break;case 9:case 10:case 13:case 32:C+=yt(h);break;case 92:C+=bt(ht()-1,7);continue;case 47:switch(ft()){case 42:case 47:Ze(Dt(St(pt(),ht()),t,n,l),l),5!=gt(h||1)&&5!=gt(ft()||1)||!Xe(C)||" "===Ke(C,-1,void 0)||(C+=" ");break;default:C+="/"}break;case 123*m:s[u++]=Xe(C)*v;case 125*m:case 59:case 0:switch(y){case 0:case 125:g=0;case 59+c:-1==v&&(C=Ge(C,/\f/g,"")),f>0&&(Xe(C)-d||0===m&&47===h)&&Ze(f>32?Rt(C+";",r,n,d-1,l):Rt(Ge(C," ","")+";",r,n,d-2,l),l);break;case 59:C+=";";default:if(Ze(w=It(C,t,n,u,c,i,s,b,x=[],S=[],d,o),o),123===y)if(0===c)Et(C,t,w,w,x,o,d,s,S);else{switch(p){case 99:if(110===Ye(C,3))break;case 108:if(97===Ye(C,2))break;default:c=0;case 100:case 109:case 115:}c?Et(e,w,w,r&&Ze(It(e,w,w,0,0,i,s,b,i,x=[],d,S),S),i,S,d,s,r?x:S):Et(C,w,w,w,[""],S,0,s,S)}}u=c=f=0,m=v=1,b=C="",d=a;break;case 58:d=1+Xe(C),f=h;default:if(m<1)if(123==y)--m;else if(125==y&&0==m++&&125==dt())continue;switch(C+=$e(y),y*m){case 38:v=c>0?1:(C+="\f",-1);break;case 44:s[u++]=(Xe(C)-1)*v,v=1;break;case 64:45===ft()&&(C+=vt(pt())),p=ft(),c=d=Xe(b=C+=wt(ht())),y++;break;case 45:45===h&&2==Xe(C)&&(m=0)}}return o}function It(e,t,n,r,i,o,a,s,l,u,c,d){for(var p=i-1,f=0===i?o:[""],h=Je(f),m=0,g=0,v=0;m<r;++m)for(var y=0,b=Ke(e,p+1,p=We(g=a[m])),x=e;y<h;++y)(x=Ve(g>0?f[y]+" "+b:Ge(b,/&\f/g,f[y])))&&(l[v++]=x);return lt(e,t,n,0===i?_e:s,l,u,c,d)}function Dt(e,t,n,r){return lt(e,t,n,je,$e(at),Ke(e,2,-2),0,r)}function Rt(e,t,n,r,i){return lt(e,t,n,Fe,Ke(e,0,r),Ke(e,r+1,-1),r,i)}function Pt(e,t,n){switch(function(e,t){return 45^Ye(e,0)?(((t<<2^Ye(e,0))<<2^Ye(e,1))<<2^Ye(e,2))<<2^Ye(e,3):0}(e,t)){case 5103:return Ne+"print-"+e+e;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 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return Ne+e+e;case 4855:return Ne+e.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+e;case 4789:return Te+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ne+e+Te+e+qe+e+e;case 5936:switch(Ye(e,t+11)){case 114:return Ne+e+qe+Ge(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ne+e+qe+Ge(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ne+e+qe+Ge(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return Ne+e+qe+e+e;case 6165:return Ne+e+qe+"flex-"+e+e;case 5187:return Ne+e+Ge(e,/(\w+).+(:[^]+)/,Ne+"box-$1$2"+qe+"flex-$1$2")+e;case 5443:return Ne+e+qe+"flex-item-"+Ge(e,/flex-|-self/g,"")+(Be(e,/flex-|baseline/)?"":qe+"grid-row-"+Ge(e,/flex-|-self/g,""))+e;case 4675:return Ne+e+qe+"flex-line-pack"+Ge(e,/align-content|flex-|-self/g,"")+e;case 5548:return Ne+e+qe+Ge(e,"shrink","negative")+e;case 5292:return Ne+e+qe+Ge(e,"basis","preferred-size")+e;case 6060:return Ne+"box-"+Ge(e,"-grow","")+Ne+e+qe+Ge(e,"grow","positive")+e;case 4554:return Ne+Ge(e,/([^-])(transform)/g,"$1"+Ne+"$2")+e;case 6187:return Ge(Ge(Ge(e,/(zoom-|grab)/,Ne+"$1"),/(image-set)/,Ne+"$1"),e,"")+e;case 5495:case 3959:return Ge(e,/(image-set\([^]*)/,Ne+"$1$`$1");case 4968:return Ge(Ge(e,/(.+:)(flex-)?(.*)/,Ne+"box-pack:$3"+qe+"flex-pack:$3"),/space-between/,"justify")+Ne+e+e;case 4200:if(!Be(e,/flex-|baseline/))return qe+"grid-column-align"+Ke(e,t)+e;break;case 2592:case 3360:return qe+Ge(e,"template-","")+e;case 4384:case 3616:return n&&n.some(function(e,n){return t=n,Be(e.props,/grid-\w+-end/)})?~Ue(e+(n=n[t].value),"span",0)?e:qe+Ge(e,"-start","")+e+qe+"grid-row-span:"+(~Ue(n,"span",0)?Be(n,/\d+/):+Be(n,/\d+/)-+Be(e,/\d+/))+";":qe+Ge(e,"-start","")+e;case 4896:case 4128:return n&&n.some(function(e){return Be(e.props,/grid-\w+-start/)})?e:qe+Ge(Ge(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Ge(e,/(.+)-inline(.+)/,Ne+"$1$2")+e;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(Xe(e)-1-t>6)switch(Ye(e,t+1)){case 109:if(45!==Ye(e,t+4))break;case 102:return Ge(e,/(.+:)(.+)-([^]+)/,"$1"+Ne+"$2-$3$1"+Te+(108==Ye(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Ue(e,"stretch",0)?Pt(Ge(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return Ge(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(t,n,r,i,o,a,s){return qe+n+":"+r+s+(i?qe+n+"-span:"+(o?a:+a-+r)+s:"")+e});case 4949:if(121===Ye(e,t+6))return Ge(e,":",":"+Ne)+e;break;case 6444:switch(Ye(e,45===Ye(e,14)?18:11)){case 120:return Ge(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+Ne+(45===Ye(e,14)?"inline-":"")+"box$3$1"+Ne+"$2$3$1"+qe+"$2box$3")+e;case 100:return Ge(e,":",":"+qe)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Ge(e,"scroll-","scroll-snap-")+e}return e}function Mt(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function Lt(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case"@namespace":case Fe:return e.return=e.return||e.value;case je:return"";case ze:return e.return=e.value+"{"+Mt(e.children,r)+"}";case _e:if(!Xe(e.value=e.props.join(",")))return""}return Xe(n=Mt(e.children,r))?e.return=e.value+"{"+n+"}":""}function At(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Fe:return void(e.return=Pt(e.value,e.length,n));case ze:return Mt([ut(e,{value:Ge(e.value,"@","@"+Ne)})],r);case _e:if(e.length)return function(e,t){return e.map(t).join("")}(n=e.props,function(t){switch(Be(t,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":ct(ut(e,{props:[Ge(t,/:(read-\w+)/,":-moz-$1")]})),ct(ut(e,{props:[t]})),He(e,{props:Qe(n,r)});break;case"::placeholder":ct(ut(e,{props:[Ge(t,/:(plac\w+)/,":"+Ne+"input-$1")]})),ct(ut(e,{props:[Ge(t,/:(plac\w+)/,":-moz-$1")]})),ct(ut(e,{props:[Ge(t,/:(plac\w+)/,qe+"input-$1")]})),ct(ut(e,{props:[t]})),He(e,{props:Qe(n,r)})}return""})}}const kt="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",Ot="active",qt="data-styled-version",Tt="6.4.0",Nt="/*!sc*/\n",jt="undefined"!=typeof window&&"undefined"!=typeof document;function _t(e){if("undefined"!=typeof process&&void 0!==process.env){const t=process.env[e];if(void 0!==t&&""!==t)return"false"!==t}}const Ft=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:null!==(tt=null!==(et=_t("REACT_APP_SC_DISABLE_SPEEDY"))&&void 0!==et?et:_t("SC_DISABLE_SPEEDY"))&&void 0!==tt?tt:"undefined"==typeof process||void 0===process.env||!1),zt="sc-keyframes-",Wt={};function $t(e,...t){return new Error(`An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#${e} for more information.${t.length>0?` Args: ${t.join(", ")}`:""}`)}let Ht=new Map,Vt=new Map,Bt=1;const Gt=e=>{if(Ht.has(e))return Ht.get(e);for(;Vt.has(Bt);)Bt++;const t=Bt++;return Ht.set(e,t),Vt.set(t,e),t},Ut=e=>Vt.get(e),Yt=(e,t)=>{Bt=t+1,Ht.set(e,t),Vt.set(t,e)},Kt=Object.freeze([]),Xt=Object.freeze({});function Jt(e,t,n=Xt){return e.theme!==n.theme&&e.theme||t||n.theme}const Zt=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Qt=/(^-|-$)/g;function en(e){return e.replace(Zt,"-").replace(Qt,"")}const tn=/(a)(d)/gi,nn=e=>String.fromCharCode(e+(e>25?39:97));function rn(e){let t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=nn(t%52)+n;return(nn(t%52)+n).replace(tn,"$1-$2")}const on=5381,an=(e,t)=>{let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e},sn=e=>an(on,e);function ln(e){return rn(sn(e)>>>0)}function un(e){return"string"==typeof e&&!0}function cn(e){return un(e)?`styled.${e}`:`Styled(${function(e){return e.displayName||e.name||"Component"}(e)})`}const dn=Symbol.for("react.memo"),pn=Symbol.for("react.forward_ref"),fn={contextType:!0,defaultProps:!0,displayName:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,propTypes:!0,type:!0},hn={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},mn={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},gn={[pn]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[dn]:mn};function vn(e){return("type"in(t=e)&&t.type.$$typeof)===dn?mn:"$$typeof"in e?gn[e.$$typeof]:fn;var t}const yn=Object.defineProperty,bn=Object.getOwnPropertyNames,xn=Object.getOwnPropertySymbols,Sn=Object.getOwnPropertyDescriptor,wn=Object.getPrototypeOf,Cn=Object.prototype;function En(e,t,n){if("string"!=typeof t){const r=wn(t);r&&r!==Cn&&En(e,r,n);const i=bn(t).concat(xn(t)),o=vn(e),a=vn(t);for(let r=0;r<i.length;++r){const s=i[r];if(!(s in hn||n&&n[s]||a&&s in a||o&&s in o)){const n=Sn(t,s);try{yn(e,s,n)}catch(e){}}}}return e}function In(e){return"function"==typeof e}function Dn(e){return"object"==typeof e&&"styledComponentId"in e}function Rn(e,t){return e&&t?e+" "+t:e||t||""}function Pn(e,t){return e.join("")}function Mn(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function Ln(e,t,n=!1){if(!n&&!Mn(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(let n=0;n<t.length;n++)e[n]=Ln(e[n],t[n]);else if(Mn(t))for(const n in t)e[n]=Ln(e[n],t[n]);return e}function An(e,t){Object.defineProperty(e,"toString",{value:t})}const kn=class{constructor(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e,this._cGroup=0,this._cIndex=0}indexOfGroup(e){if(e===this._cGroup)return this._cIndex;let t=this._cIndex;if(e>this._cGroup)for(let n=this._cGroup;n<e;n++)t+=this.groupSizes[n];else for(let n=this._cGroup-1;n>=e;n--)t-=this.groupSizes[n];return this._cGroup=e,this._cIndex=t,t}insertRules(e,t){if(e>=this.groupSizes.length){const t=this.groupSizes,n=t.length;let r=n;for(;e>=r;)if(r<<=1,r<0)throw $t(16,`${e}`);this.groupSizes=new Uint32Array(r),this.groupSizes.set(t),this.length=r;for(let e=n;e<r;e++)this.groupSizes[e]=0}let n=this.indexOfGroup(e+1),r=0;for(let i=0,o=t.length;i<o;i++)this.tag.insertRule(n,t[i])&&(this.groupSizes[e]++,n++,r++);r>0&&this._cGroup>e&&(this._cIndex+=r)}clearGroup(e){if(e<this.length){const t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(let e=n;e<r;e++)this.tag.deleteRule(n);t>0&&this._cGroup>e&&(this._cIndex-=t)}}getGroup(e){let t="";if(e>=this.length||0===this.groupSizes[e])return t;const n=this.groupSizes[e],r=this.indexOfGroup(e),i=r+n;for(let e=r;e<i;e++)t+=this.tag.getRule(e)+Nt;return t}},On=`style[${kt}][${qt}="${Tt}"]`,qn=new RegExp(`^${kt}\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)`),Tn=e=>"undefined"!=typeof ShadowRoot&&e instanceof ShadowRoot||"host"in e&&11===e.nodeType,Nn=e=>{if(!e)return document;if(Tn(e))return e;if("getRootNode"in e){const t=e.getRootNode();if(Tn(t))return t}return document},jn=(e,t,n)=>{const r=n.split(",");let i;for(let n=0,o=r.length;n<o;n++)(i=r[n])&&e.registerName(t,i)},_n=(e,t)=>{var n;const r=(null!==(n=t.textContent)&&void 0!==n?n:"").split(Nt),i=[];for(let t=0,n=r.length;t<n;t++){const n=r[t].trim();if(!n)continue;const o=n.match(qn);if(o){const t=0|parseInt(o[1],10),n=o[2];0!==t&&(Yt(n,t),jn(e,n,o[3]),e.getTag().insertRules(t,i)),i.length=0}else i.push(n)}},Fn=e=>{const t=Nn(e.options.target).querySelectorAll(On);for(let n=0,r=t.length;n<r;n++){const r=t[n];r&&r.getAttribute(kt)!==Ot&&(_n(e,r),r.parentNode&&r.parentNode.removeChild(r))}};let zn=!1;const Wn=(e,t)=>{const n=document.head,r=e||n,i=document.createElement("style"),o=(e=>{const t=Array.from(e.querySelectorAll(`style[${kt}]`));return t[t.length-1]})(r),a=void 0!==o?o.nextSibling:null;i.setAttribute(kt,Ot),i.setAttribute(qt,Tt);const s=t||function(){if(!1!==zn)return zn;if("undefined"!=typeof document){const e=document.head.querySelector('meta[property="csp-nonce"]');if(e)return zn=e.nonce||e.getAttribute("content")||void 0;const t=document.head.querySelector('meta[name="sc-nonce"]');if(t)return zn=t.getAttribute("content")||void 0}return zn="undefined"!=typeof __webpack_nonce__?__webpack_nonce__:void 0}();return s&&i.setAttribute("nonce",s),r.insertBefore(i,a),i},$n=class{constructor(e,t){this.element=Wn(e,t),this.element.appendChild(document.createTextNode("")),this.sheet=(e=>{var t;if(e.sheet)return e.sheet;const n=null!==(t=e.getRootNode().styleSheets)&&void 0!==t?t:document.styleSheets;for(let t=0,r=n.length;t<r;t++){const r=n[t];if(r.ownerNode===e)return r}throw $t(17)})(this.element),this.length=0}insertRule(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}}deleteRule(e){this.sheet.deleteRule(e),this.length--}getRule(e){const t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""}},Hn=class{constructor(e,t){this.element=Wn(e,t),this.nodes=this.element.childNodes,this.length=0}insertRule(e,t){if(e<=this.length&&e>=0){const n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1}deleteRule(e){this.element.removeChild(this.nodes[e]),this.length--}getRule(e){return e<this.length?this.nodes[e].textContent:""}};let Vn=jt;const Bn={isServer:!jt,useCSSOMInjection:!Ft};class Gn{static registerId(e){return Gt(e)}constructor(e=Xt,t={},n){this.options=Object.assign(Object.assign({},Bn),e),this.gs=t,this.keyframeIds=new Set,this.names=new Map(n),this.server=!!e.isServer,!this.server&&jt&&Vn&&(Vn=!1,Fn(this)),An(this,()=>(e=>{const t=e.getTag(),{length:n}=t;let r="";for(let i=0;i<n;i++){const n=Ut(i);if(void 0===n)continue;const o=e.names.get(n);if(void 0===o||!o.size)continue;const a=t.getGroup(i);if(0===a.length)continue;const s=kt+".g"+i+'[id="'+n+'"]';let l="";for(const e of o)e.length>0&&(l+=e+",");r+=a+s+'{content:"'+l+'"}'+Nt}return r})(this))}rehydrate(){!this.server&&jt&&Fn(this)}reconstructWithOptions(e,t=!0){const n=new Gn(Object.assign(Object.assign({},this.options),e),this.gs,t&&this.names||void 0);return n.keyframeIds=new Set(this.keyframeIds),!this.server&&jt&&e.target!==this.options.target&&Nn(this.options.target)!==Nn(e.target)&&Fn(n),n}allocateGSInstance(e){return this.gs[e]=(this.gs[e]||0)+1}getTag(){return this.tag||(this.tag=(e=(({useCSSOMInjection:e,target:t,nonce:n})=>e?new $n(t,n):new Hn(t,n))(this.options),new kn(e)));var e}hasNameForId(e,t){var n,r;return null!==(r=null===(n=this.names.get(e))||void 0===n?void 0:n.has(t))&&void 0!==r&&r}registerName(e,t){Gt(e),e.startsWith(zt)&&this.keyframeIds.add(e);const n=this.names.get(e);n?n.add(t):this.names.set(e,new Set([t]))}insertRules(e,t,n){this.registerName(e,t),this.getTag().insertRules(Gt(e),n)}clearNames(e){this.names.has(e)&&this.names.get(e).clear()}clearRules(e){this.getTag().clearGroup(Gt(e)),this.clearNames(e)}clearTag(){this.tag=void 0}}const Un=new WeakSet,Yn={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexShrink:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart: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};function Kn(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||e in Yn||e.startsWith("--")?String(t).trim():t+"px"}const Xn=e=>e>="A"&&e<="Z";function Jn(e){let t="";for(let n=0;n<e.length;n++){const r=e[n];if(1===n&&"-"===r&&"-"===e[0])return e;Xn(r)?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}const Zn=Symbol.for("sc-keyframes");function Qn(e){return In(e)&&!(e.prototype&&e.prototype.isReactComponent)}const er=e=>null==e||!1===e||""===e,tr=Symbol.for("react.client.reference");function nr(e){return e.$$typeof===tr}const rr=e=>{const t=[];for(const n in e){const r=e[n];e.hasOwnProperty(n)&&!er(r)&&(Array.isArray(r)&&Un.has(r)||In(r)?t.push(Jn(n)+":",r,";"):Mn(r)?t.push(n+" {",...rr(r),"}"):t.push(Jn(n)+": "+Kn(n,r)+";"))}return t};function ir(e,t,n,r,i=[]){if(er(e))return i;const o=typeof e;if("string"===o)return i.push(e),i;if("function"===o){if(nr(e))return i;if(Qn(e)&&t){return ir(e(t),t,n,r,i)}return i.push(e),i}if(Array.isArray(e)){for(let o=0;o<e.length;o++)ir(e[o],t,n,r,i);return i}if(Dn(e))return i.push(`.${e.styledComponentId}`),i;if(function(e){return"object"==typeof e&&null!==e&&Zn in e}(e))return n?(e.inject(n,r),i.push(e.getName(r))):i.push(e),i;if(nr(e))return i;if(Mn(e)){const t=rr(e);for(let e=0;e<t.length;e++)i.push(t[e]);return i}return i.push(e.toString()),i}const or=sn(Tt);class ar{constructor(e,t,n){this.rules=e,this.componentId=t,this.baseHash=an(or,t),this.baseStyle=n,Gn.registerId(t)}generateAndInjectStyles(e,t,n){let r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n):"";{let i="";for(let r=0;r<this.rules.length;r++){const o=this.rules[r];if("string"==typeof o)i+=o;else if(o)if(Qn(o)){const r=o(e);"string"==typeof r?i+=r:null!=r&&!1!==r&&(i+=Pn(ir(r,e,t,n)))}else i+=Pn(ir(o,e,t,n))}if(i){this.dynamicNameCache||(this.dynamicNameCache=new Map);const e=n.hash?n.hash+i:i;let o=this.dynamicNameCache.get(e);if(!o){if(o=rn(an(an(this.baseHash,n.hash),i)>>>0),this.dynamicNameCache.size>=200){const e=this.dynamicNameCache.keys().next().value;void 0!==e&&this.dynamicNameCache.delete(e)}this.dynamicNameCache.set(e,o)}if(!t.hasNameForId(this.componentId,o)){const e=n(i,"."+o,void 0,this.componentId);t.insertRules(this.componentId,o,e)}r=Rn(r,o)}}return r}}const sr=/&/g,lr=47;function ur(e,t){let n=0;for(;--t>=0&&92===e.charCodeAt(t);)n++;return!(1&~n)}function cr(e){const t=e.length;let n="",r=0,i=0,o=0,a=!1,s=!1;for(let l=0;l<t;l++){const u=e.charCodeAt(l);if(0!==o||a||u!==lr||42!==e.charCodeAt(l+1))if(a)42===u&&e.charCodeAt(l+1)===lr&&(a=!1,l++);else if(34!==u&&39!==u||ur(e,l)){if(0===o)if(123===u)i++;else if(125===u){if(i--,i<0){s=!0;let n=l+1;for(;n<t;){const t=e.charCodeAt(n);if(59===t||10===t)break;n++}n<t&&59===e.charCodeAt(n)&&n++,i=0,l=n-1,r=n;continue}0===i&&(n+=e.substring(r,l+1),r=l+1)}else 59===u&&0===i&&(n+=e.substring(r,l+1),r=l+1)}else 0===o?o=u:o===u&&(o=0);else a=!0,l++}return s||0!==i||0!==o?(r<t&&0===i&&0===o&&(n+=e.substring(r)),n):e}function dr(e,t){for(let n=0;n<e.length;n++){const r=e[n];if("rule"===r.type){r.value=t+" "+r.value,r.value=r.value.replaceAll(",",","+t+" ");const e=r.props,n=[];for(let r=0;r<e.length;r++)n[r]=t+" "+e[r];r.props=n}Array.isArray(r.children)&&"@keyframes"!==r.type&&(r.children=dr(r.children,t))}return e}const pr=new Gn,fr=function({options:e=Xt,plugins:t=Kt}=Xt){let n,r,i;const o=(e,t,i)=>i.startsWith(r)&&i.endsWith(r)&&i.replaceAll(r,"").length>0?`.${n}`:e,a=t.slice();a.push(e=>{e.type===_e&&e.value.includes("&")&&(i||(i=new RegExp(`\\${r}\\b`,"g")),e.props[0]=e.props[0].replace(sr,r).replace(i,o))}),e.prefix&&a.push(At),a.push(Lt);let s=[];const l=function(e){var t=Je(e);return function(n,r,i,o){for(var a="",s=0;s<t;s++)a+=e[s](n,r,i,o)||"";return a}}(a.concat((d=e=>s.push(e),function(e){e.root||(e=e.return)&&d(e)}))),u=(t,o="",a="",u="&")=>{n=u,r=o,i=void 0;const c=function(e){const t=-1!==e.indexOf("//"),n=-1!==e.indexOf("}");if(!t&&!n)return e;if(!t)return cr(e);const r=e.length;let i="",o=0,a=0,s=0,l=0,u=0,c=!1;for(;a<r;){const t=e.charCodeAt(a);if(34!==t&&39!==t||ur(e,a))if(0===s)if(t===lr&&a+1<r&&42===e.charCodeAt(a+1)){for(a+=2;a+1<r&&(42!==e.charCodeAt(a)||e.charCodeAt(a+1)!==lr);)a++;a+=2}else if(40!==t)if(41!==t)if(l>0)a++;else if(42===t&&a+1<r&&e.charCodeAt(a+1)===lr)i+=e.substring(o,a),a+=2,o=a,c=!0;else if(t===lr&&a+1<r&&e.charCodeAt(a+1)===lr){for(i+=e.substring(o,a);a<r&&10!==e.charCodeAt(a);)a++;o=a,c=!0}else 123===t?u++:125===t&&u--,a++;else l>0&&l--,a++;else l++,a++;else a++;else 0===s?s=t:s===t&&(s=0),a++}return c?(o<r&&(i+=e.substring(o)),0===u?i:cr(i)):0===u?e:cr(e)}(t);let d=Ct(a||o?a+" "+o+" { "+c+" }":c);return e.namespace&&(d=dr(d,e.namespace)),s=[],Mt(d,l),s},c=e;var d;let p=on;for(let e=0;e<t.length;e++)t[e].name||$t(15),p=an(p,t[e].name);return(null==c?void 0:c.namespace)&&(p=an(p,c.namespace)),(null==c?void 0:c.prefix)&&(p=an(p,"p")),u.hash=p!==on?p.toString():"",u}(),hr=n.createContext({shouldForwardProp:void 0,styleSheet:pr,stylis:fr,stylisPlugins:void 0});function mr(){return n.useContext(hr)}hr.Consumer;const gr=n.createContext(void 0);gr.Consumer;const vr=Object.prototype.hasOwnProperty,yr={};function br(e,t){const n="string"!=typeof e?"sc":en(e);yr[n]=(yr[n]||0)+1;const r=n+"-"+ln(Tt+n+yr[n]);return t?t+"-"+r:r}function xr(e,t,i){const o=Dn(e),a=e,s=!un(e),{attrs:l=Kt,componentId:u=br(t.displayName,t.parentComponentId),displayName:c=cn(e)}=t,d=t.displayName&&t.componentId?en(t.displayName)+"-"+t.componentId:t.componentId||u,p=o&&a.attrs?a.attrs.concat(l).filter(Boolean):l;let{shouldForwardProp:f}=t;if(o&&a.shouldForwardProp){const e=a.shouldForwardProp;if(t.shouldForwardProp){const n=t.shouldForwardProp;f=(t,r)=>e(t,r)&&n(t,r)}else f=e}const h=new ar(i,d,o?a.componentStyle:void 0);function m(e,t){return function(e,t,i){const{attrs:o,componentStyle:a,defaultProps:s,foldedComponentIds:l,styledComponentId:u,target:c}=e,d=n.useContext(gr),p=mr(),f=e.shouldForwardProp||p.shouldForwardProp,h=Jt(t,d,s)||Xt;let m,g;{const e=n.useRef(null),r=e.current;if(null!==r&&r[1]===h&&r[2]===p.styleSheet&&r[3]===p.stylis&&r[7]===a&&function(e,t,n){const r=e,i=t;let o=0;for(const e in i)if(vr.call(i,e)&&(o++,r[e]!==i[e]))return!1;return o===n}(r[0],t,r[4]))m=r[5],g=r[6];else{m=function(e,t,n){const r=Object.assign(Object.assign({},t),{className:void 0,theme:n}),i=e.length>1;for(let n=0;n<e.length;n++){const o=e[n],a=In(o)?o(i?Object.assign({},r):r):o;for(const e in a)"className"===e?r.className=Rn(r.className,a[e]):"style"===e?r.style=Object.assign(Object.assign({},r.style),a[e]):e in t&&void 0===t[e]||(r[e]=a[e])}return"className"in t&&"string"==typeof t.className&&(r.className=Rn(r.className,t.className)),r}(o,t,h),g=function(e,t,n,r){return e.generateAndInjectStyles(t,n,r)}(a,m,p.styleSheet,p.stylis);let n=0;for(const e in t)vr.call(t,e)&&n++;e.current=[t,h,p.styleSheet,p.stylis,n,m,g,a]}}const v=m.as||c,y=function(e,t,n,r){const i={};for(const o in e)void 0===e[o]||"$"===o[0]||"as"===o||"theme"===o&&e.theme===n||("forwardedAs"===o?i.as=e.forwardedAs:r&&!r(o,t)||(i[o]=e[o]));return i}(m,v,h,f);let b=Rn(l,u);return g&&(b+=" "+g),m.className&&(b+=" "+m.className),y[un(v)&&v.includes("-")?"class":"className"]=b,i&&(y.ref=i),r(v,y)}(g,e,t)}m.displayName=c;let g=n.forwardRef(m);return g.attrs=p,g.componentStyle=h,g.displayName=c,g.shouldForwardProp=f,g.foldedComponentIds=o?Rn(a.foldedComponentIds,a.styledComponentId):"",g.styledComponentId=d,g.target=o?a.target:e,Object.defineProperty(g,"defaultProps",{get(){return this._foldedDefaultProps},set(e){this._foldedDefaultProps=o?function(e,...t){for(const n of t)Ln(e,n,!0);return e}({},a.defaultProps,e):e}}),An(g,()=>`.${g.styledComponentId}`),s&&En(g,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),g}var Sr=new Set(["a","abbr","address","area","article","aside","audio","b","bdi","bdo","blockquote","body","button","br","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","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","map","mark","menu","meter","nav","object","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","slot","small","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tspan","use"]);function wr(e,t){const n=[e[0]];for(let r=0,i=t.length;r<i;r+=1)n.push(t[r],e[r+1]);return n}const Cr=e=>(Un.add(e),e);function Er(e,...t){if(In(e)||Mn(e))return Cr(ir(wr(Kt,[e,...t])));const n=e;return 0===t.length&&1===n.length&&"string"==typeof n[0]?ir(n):Cr(ir(wr(n,t)))}function Ir(e,t,n=Xt){if(!t)throw $t(1,t);const r=(r,...i)=>e(t,n,Er(r,...i));return r.attrs=r=>Ir(e,t,Object.assign(Object.assign({},n),{attrs:Array.prototype.concat(n.attrs,r).filter(Boolean)})),r.withConfig=r=>Ir(e,t,Object.assign(Object.assign({},n),r)),r}const Dr=e=>Ir(xr,e),Rr=Dr;Sr.forEach(e=>{Rr[e]=Dr(e)});class Pr{constructor(e,t){this.instanceRules=new Map,this.rules=e,this.componentId=t,this.isStatic=function(e){for(let t=0;t<e.length;t+=1){const n=e[t];if(In(n)&&!Dn(n))return!1}return!0}(e),Gn.registerId(this.componentId)}removeStyles(e,t){this.instanceRules.delete(e),this.rebuildGroup(t)}renderStyles(e,t,n,r){const i=this.componentId;if(this.isStatic){if(n.hasNameForId(i,i+e))this.instanceRules.has(e)||this.computeRules(e,t,n,r);else{const o=this.computeRules(e,t,n,r);n.insertRules(i,o.name,o.rules)}return}const o=this.instanceRules.get(e);if(this.computeRules(e,t,n,r),!n.server&&o){const t=o.rules,n=this.instanceRules.get(e).rules;if(t.length===n.length){let e=!0;for(let r=0;r<t.length;r++)if(t[r]!==n[r]){e=!1;break}if(e)return}}this.rebuildGroup(n)}computeRules(e,t,n,r){const i=Pn(ir(this.rules,t,n,r)),o={name:this.componentId+e,rules:r(i,"")};return this.instanceRules.set(e,o),o}rebuildGroup(e){const t=this.componentId;e.clearRules(t);for(const n of this.instanceRules.values())e.insertRules(t,n.name,n.rules)}}var Mr;class Lr{constructor(e,t){this[Mr]=!0,this.inject=(e,t=fr)=>{const n=this.getName(t);if(!e.hasNameForId(this.id,n)){const r=t(this.rules,n,"@keyframes");e.insertRules(this.id,n,r)}},this.name=e,this.id=zt+e,this.rules=t,Gt(this.id),An(this,()=>{throw $t(12,String(this.name))})}getName(e=fr){return e.hash?this.name+rn(+e.hash>>>0):this.name}}function Ar(e,...t){const n=Pn(Er(e,...t)),r=ln(n);return new Lr(r,n)}function kr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Or(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}Mr=Zn;var qr={exports:{}};function Tr(){}function Nr(){}Nr.resetWarningCache=Tr;qr.exports=function(){function e(e,t,n,r,i,o){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==o){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Nr,resetWarningCache:Tr};return n.PropTypes=n,n}();var jr=kr(qr.exports);function _r(e){const{injectFirst:t,children:n}=e;if(t&&"undefined"!=typeof window){const e=document.head;if(!e.querySelector('[data-styled="active"]')){const t=document.createElement("style");t.setAttribute("data-styled","active"),e.insertBefore(t,e.firstChild)}}return n}_r.propTypes={children:jr.node,injectFirst:jr.bool};const Fr=function(e,...t){const r=Er(e,...t),i=`sc-global-${ln(JSON.stringify(r))}`,o=new Pr(r,i),a=e=>{const t=mr(),r=n.useContext(gr);let a;{const e=n.useRef(null);null===e.current&&(e.current=t.styleSheet.allocateGSInstance(i)),a=e.current}t.styleSheet.server&&s(a,e,t.styleSheet,r,t.stylis);{const l=o.isStatic?[a,t.styleSheet,o]:[a,e,t.styleSheet,r,t.stylis,o],u=n.useRef(o);n.useLayoutEffect(()=>(t.styleSheet.server||(u.current!==o&&(t.styleSheet.clearRules(i),u.current=o),s(a,e,t.styleSheet,r,t.stylis)),()=>{o.removeStyles(a,t.styleSheet)}),l)}return t.styleSheet.server&&o.instanceRules.delete(a),null};function s(e,t,n,r,i){if(o.isStatic)o.renderStyles(e,Wt,n,i);else{const s=Object.assign(Object.assign({},t),{theme:Jt(t,r,a.defaultProps)});o.renderStyles(e,s,n,i)}}return n.memo(a)}(e=>{const{styles:t,defaultTheme:n={}}=e;return"function"==typeof t?t(null==(r=e.theme)||0===Object.keys(r).length?n:e.theme):t;var r});
8
8
  /**
9
9
  * @mui/styled-engine-sc v6.4.3
10
10
  *
@@ -97,6 +97,6 @@ function zr(e,t){let n;return n=t?Rr(e).withConfig({displayName:t.label,shouldFo
97
97
  *
98
98
  * This source code is licensed under the MIT license found in the
99
99
  * LICENSE file in the root directory of this source tree.
100
- */var wS,CS,ES={},IS={};function DS(){if(wS)return IS;wS=1;var e=Za;Object.defineProperty(IS,"__esModule",{value:!0}),IS.default=void 0;var t=(0,e(yv()).default)();return IS.default=t,IS}var RS,PS,MS={},LS={};function AS(){if(PS)return MS;PS=1;var e=Za;Object.defineProperty(MS,"__esModule",{value:!0}),MS.default=function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.breakpoints,a=void 0===o?["sm","md","lg"]:o,s=i.disableAlign,l=void 0!==s&&s,u=i.factor,c=void 0===u?2:u,d=i.variants,p=void 0===d?["h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","caption","button","overline"]:d,f=(0,t.default)({},e);f.typography=(0,t.default)({},f.typography);var h=f.typography,m=(0,r.convertLength)(h.htmlFontSize),g=a.map(function(e){return f.breakpoints.values[e]});return p.forEach(function(e){var i=h[e],o=parseFloat(m(i.fontSize,"rem"));if(!(o<=1)){var a=o,s=1+(a-1)/c,u=i.lineHeight;if(!(0,r.isUnitless)(u)&&!l)throw new Error((0,n.formatMuiErrorMessage)(6));(0,r.isUnitless)(u)||(u=parseFloat(m(u,"rem"))/parseFloat(o));var d=null;l||(d=function(e){return(0,r.alignProperty)({size:e,grid:(0,r.fontGrid)({pixels:4,lineHeight:u,htmlFontSize:h.htmlFontSize})})}),h[e]=(0,t.default)({},i,(0,r.responsiveProperty)({cssProperty:"fontSize",min:s,max:a,unit:"rem",breakpoints:g,transform:d}))}}),f};var t=e(Vs()),n=Mh,r=function(){if(RS)return LS;RS=1;var e=Za;Object.defineProperty(LS,"__esModule",{value:!0}),LS.isUnitless=function(e){return String(parseFloat(e)).length===String(e).length},LS.getUnit=n,LS.toUnitless=r,LS.convertLength=function(e){return function(t,i){var o=n(t);if(o===i)return t;var a=r(t);if("px"!==o)if("em"===o)a=r(t)*r(e);else if("rem"===o)return a=r(t)*r(e),t;var s=a;if("px"!==i)if("em"===i)s=a/r(e);else{if("rem"!==i)return t;s=a/r(e)}return parseFloat(s.toFixed(5))+i}},LS.alignProperty=function(e){var t=e.size,n=e.grid,r=t-t%n,i=r+n;return t-r<i-t?r:i},LS.fontGrid=function(e){var t=e.lineHeight;return e.pixels/(t*e.htmlFontSize)},LS.responsiveProperty=function(e){var n=e.cssProperty,r=e.min,i=e.max,o=e.unit,a=void 0===o?"rem":o,s=e.breakpoints,l=void 0===s?[600,960,1280]:s,u=e.transform,c=void 0===u?null:u,d=(0,t.default)({},n,"".concat(r).concat(a)),p=(i-r)/l[l.length-1];return l.forEach(function(e){var i=r+p*e;null!==c&&(i=c(i)),d["@media (min-width:".concat(e,"px)")]=(0,t.default)({},n,"".concat(Math.round(1e4*i)/1e4).concat(a))}),d};var t=e(Kh());function n(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function r(e){return parseFloat(e)}return LS}();return MS}var kS,OS={};var qS,TS={};var NS,jS={};var _S,FS={};!function(e){var t=Za,r=_f;Object.defineProperty(e,"__esModule",{value:!0});var i={createTheme:!0,createMuiTheme:!0,unstable_createMuiStrictModeTheme:!0,createStyles:!0,makeStyles:!0,responsiveFontSizes:!0,styled:!0,useTheme:!0,withStyles:!0,withTheme:!0,createGenerateClassName:!0,jssPreset:!0,ServerStyleSheets:!0,StylesProvider:!0,MuiThemeProvider:!0,ThemeProvider:!0};Object.defineProperty(e,"createTheme",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"createMuiTheme",{enumerable:!0,get:function(){return a.createMuiTheme}}),Object.defineProperty(e,"unstable_createMuiStrictModeTheme",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"createStyles",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"makeStyles",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"responsiveFontSizes",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"styled",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(e,"useTheme",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"withStyles",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"withTheme",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(e,"createGenerateClassName",{enumerable:!0,get:function(){return g.createGenerateClassName}}),Object.defineProperty(e,"jssPreset",{enumerable:!0,get:function(){return g.jssPreset}}),Object.defineProperty(e,"ServerStyleSheets",{enumerable:!0,get:function(){return g.ServerStyleSheets}}),Object.defineProperty(e,"StylesProvider",{enumerable:!0,get:function(){return g.StylesProvider}}),Object.defineProperty(e,"MuiThemeProvider",{enumerable:!0,get:function(){return g.ThemeProvider}}),Object.defineProperty(e,"ThemeProvider",{enumerable:!0,get:function(){return g.ThemeProvider}});var o=Ff;Object.keys(o).forEach(function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))});var a=r(yv()),s=t(function(){if(bv)return xv;bv=1;var e=Za;Object.defineProperty(xv,"__esModule",{value:!0}),xv.default=function(e){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return n.default.apply(void 0,[(0,t.deepmerge)({unstable_strictMode:!0},e)].concat(i))};var t=Mh,n=e(yv());return xv}()),l=t(function(){if(yS)return Sv;yS=1,Object.defineProperty(Sv,"__esModule",{value:!0}),Sv.default=function(t){return(0,e.createStyles)(t)};var e=SS;return Sv}()),u=t(function(){if(CS)return ES;CS=1;var e=Za;Object.defineProperty(ES,"__esModule",{value:!0}),ES.default=void 0;var t=e(Vs()),n=SS,r=e(DS()),i=function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,n.makeStyles)(e,(0,t.default)({defaultTheme:r.default},i))};return ES.default=i,ES}()),c=t(AS()),d=t(function(){if(kS)return OS;kS=1;var e=Za;Object.defineProperty(OS,"__esModule",{value:!0}),OS.default=void 0;var t=e(Vs()),n=SS,r=e(DS()),i=function(e){var i=(0,n.styled)(e);return function(e,n){return i(e,(0,t.default)({defaultTheme:r.default},n))}};return OS.default=i,OS}()),p=hv();Object.keys(p).forEach(function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return p[t]}}))});var f=t(function(){if(qS)return TS;qS=1;var e=Za;Object.defineProperty(TS,"__esModule",{value:!0}),TS.default=function(){return(0,t.useTheme)()||r.default};var t=SS;e(n);var r=e(DS());return TS}()),h=t(function(){if(NS)return jS;NS=1;var e=Za;Object.defineProperty(jS,"__esModule",{value:!0}),jS.default=void 0;var t=e(Vs()),n=SS,r=e(DS()),i=function(e,i){return(0,n.withStyles)(e,(0,t.default)({defaultTheme:r.default},i))};return jS.default=i,jS}()),m=t(function(){if(_S)return FS;_S=1;var e=Za;Object.defineProperty(FS,"__esModule",{value:!0}),FS.default=void 0;var t=SS,n=e(DS()),r=(0,t.withThemeCreator)({defaultTheme:n.default});return FS.default=r,FS}()),g=SS}(qf),qf.alpha(cf.GREYSCALE_0,.05),qf.alpha(cf.GREEN_PALE,.5),qf.alpha(cf.BLUE_PALE,.5),qf.alpha(cf.GREEN_PALE,.5),qf.alpha(cf.BLUE_PALE,.5),qf.alpha(cf.GREEN_PALE,.5),qf.alpha(cf.BLUE_PALE,.5),qf.alpha(cf.GREEN_PALE,.5),qf.alpha(cf.BLUE_PALE,.5),qf.alpha(cf.GREEN_PALE,.5),qf.alpha(cf.BLUE_PALE,.5);const zS=(e="light")=>kf();function WS(e){return"init"in e}function $S(e){return!!e.write}function HS(e){return"v"in e||"e"in e}function VS(e){if("e"in e)throw e.e;if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&!("v"in e))throw new Error("[Bug] atom state is not initialized");return e.v}function BS(e){return"function"==typeof(null==e?void 0:e.then)}function GS(e,t,n){if(!n.p.has(e)){n.p.add(e);const r=()=>n.p.delete(e);t.then(r,r)}}function US(e,t,n){const r=n.get(e),i=null==r?void 0:r.t,o=t.p;if(!(null==i?void 0:i.size))return o;if(!o.size)return i;const a=new Set(i);for(const e of o)a.add(e);return a}const YS=()=>{const e={},t=new WeakMap,n=n=>{var r,i;null==(r=t.get(e))||r.forEach(e=>e(n)),null==(i=t.get(n))||i.forEach(e=>e())};return n.add=(n,r)=>{const i=n||e;let o=t.get(i);return o||(o=new Set,t.set(i,o)),o.add(r),()=>{o.delete(r),o.size||t.delete(i)}},n};function KS(e){return e.i||(e.i=YS()),e.r||(e.r=YS()),e.c||(e.c=YS()),e.m||(e.m=YS()),e.u||(e.u=YS()),e.f||(e.f=(()=>{const e=new Set,t=()=>e.forEach(e=>e());return t.add=t=>(e.add(t),()=>e.delete(t)),t})()),e}const XS=(e,t,...n)=>t.read(...n),JS=(e,t,...n)=>t.write(...n),ZS=(e,t)=>{var n;return null==(n=t.INTERNAL_onInit)?void 0:n.call(t,e)},QS=(e,t,n)=>{var r;return null==(r=t.onMount)?void 0:r.call(t,n)},ew=(e,n)=>{var r;const i=vw(e),o=i[0],a=i[6],s=i[9];if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&!n)throw new Error("Atom is undefined or null");let l=o.get(n);return l||(l={d:new Map,p:new Set,n:0},o.set(n,l),null==(r=a.i)||r.call(a,n),null==s||s(e,n)),l},tw=e=>{var t;const n=vw(e),r=n[1],i=n[3],o=n[4],a=n[5],s=n[6],l=n[13];if(!(s.f||i.size||o.size||a.size))return;const u=[],c=e=>{try{e()}catch(e){u.push(e)}};do{s.f&&c(s.f);const n=new Set;for(const e of i){const i=null==(t=r.get(e))?void 0:t.l;if(i)for(const e of i)n.add(e)}i.clear();for(const e of a)n.add(e);a.clear();for(const e of o)n.add(e);o.clear();for(const e of n)c(e);i.size&&l(e)}while(i.size||a.size||o.size);if(u.length)throw new AggregateError(u)},nw=e=>{const n=vw(e),r=n[1],i=n[2],o=n[3],a=n[11],s=n[14],l=n[17];if(!o.size)return;const u=[],c=[],d=new WeakSet,p=new WeakSet,f=[],h=[];for(const t of o)f.push(t),h.push(a(e,t));for(;f.length;){const n=f.length-1,o=f[n],s=h[n];if(p.has(o))f.pop(),h.pop();else if(d.has(o)){if(i.get(o)===s.n)u.push(o),c.push(s);else if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&i.has(o))throw new Error("[Bug] invalidated atom exists");p.add(o),f.pop(),h.pop()}else{d.add(o);for(const t of US(o,s,r))d.has(t)||(f.push(t),h.push(a(e,t)))}}for(let t=u.length-1;t>=0;--t){const n=u[t],r=c[t];let a=!1;for(const e of r.d.keys())if(e!==n&&o.has(e)){a=!0;break}a&&(i.set(n,r.n),s(e,n),l(e,n)),i.delete(n)}},rw=new WeakSet,iw=(e,n)=>{var r,i;const o=vw(e),a=o[1],s=o[2],l=o[3],u=o[6],c=o[7],d=o[11],p=o[12],f=o[13],h=o[14],m=o[16],g=o[17],v=o[20],y=o[26],b=o[28],x=d(e,n),S=b[0];if(HS(x)){if(a.has(n)&&s.get(n)!==x.n||x.m===S)return x.m=S,x;let t=!1;for(const[n,r]of x.d)if(h(e,n).n!==r){t=!0;break}if(!t)return x.m=S,x}let w=!0;const C=new Set(x.d.keys()),E=()=>{for(const e of C)x.d.delete(e)},I=()=>{if(a.has(n)){const t=!l.size;g(e,n),t&&(f(e),p(e))}},D=t=>{var r;if(t===n){const n=d(e,t);if(!HS(n)){if(!WS(t))throw new Error("no atom init");v(e,t,t.init)}return VS(n)}const i=h(e,t);try{return VS(i)}finally{C.delete(t),x.d.set(t,i.n),BS(x.v)&&GS(n,x.v,i),a.has(n)&&(null==(r=a.get(t))||r.t.add(n)),w||I()}};let R,P;const M={get signal(){return R||(R=new AbortController),R.signal},get setSelf(){return"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&console.warn("[DEPRECATED] setSelf is deprecated and will be removed in v3."),"production"===(t.meta.env?t.meta.env.MODE:void 0)||$S(n)||console.warn("setSelf function cannot be used with read-only atom"),!P&&$S(n)&&(P=(...r)=>{if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&w&&console.warn("setSelf function cannot be called in sync"),!w)try{return m(e,n,...r)}finally{f(e),p(e)}}),P}},L=x.n,A=s.get(n)===L;try{"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&rw.delete(e);const i=c(e,n,D,M);if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&rw.has(e)&&console.warn("Detected store mutation during atom read. This is not supported."),v(e,n,i),BS(i)){y(e,i,()=>null==R?void 0:R.abort());const t=()=>{E(),I()};i.then(t,t)}else E();return null==(r=u.r)||r.call(u,n),x.m=S,x}catch(e){return delete x.v,x.e=e,++x.n,x.m=S,x}finally{w=!1,x.n!==L&&A&&(s.set(n,x.n),l.add(n),null==(i=u.c)||i.call(u,n))}},ow=(e,t)=>{const n=vw(e),r=n[1],i=n[2],o=n[11],a=[t];for(;a.length;){const t=a.pop(),n=o(e,t);for(const s of US(t,n,r)){const t=o(e,s);i.get(s)!==t.n&&(i.set(s,t.n),a.push(s))}}},aw=(e,n,...r)=>{const i=vw(e),o=i[3],a=i[6],s=i[8],l=i[11],u=i[12],c=i[13],d=i[14],p=i[15],f=i[16],h=i[17],m=i[20],g=i[28];let v=!0;const y=t=>VS(d(e,t)),b=(r,...i)=>{var s;const d=l(e,r);try{if(r===n){if(!WS(r))throw new Error("atom not writable");"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&rw.add(e);const n=d.n,l=i[0];return m(e,r,l),h(e,r),void(n!==d.n&&(++g[0],o.add(r),p(e,r),null==(s=a.c)||s.call(a,r)))}return f(e,r,...i)}finally{v||(c(e),u(e))}};try{return s(e,n,y,b,...r)}finally{v=!1}},sw=(e,t)=>{var n;const r=vw(e),i=r[1],o=r[3],a=r[6],s=r[11],l=r[15],u=r[18],c=r[19],d=s(e,t),p=i.get(t);if(p&&d.d.size>0){for(const[r,i]of d.d)if(!p.d.has(r)){const c=s(e,r);u(e,r).t.add(t),p.d.add(r),i!==c.n&&(o.add(r),l(e,r),null==(n=a.c)||n.call(a,r))}for(const n of p.d)if(!d.d.has(n)){p.d.delete(n);const r=c(e,n);null==r||r.t.delete(t)}}},lw=(e,t)=>{var n;const r=vw(e),i=r[1],o=r[4],a=r[6],s=r[10],l=r[11],u=r[12],c=r[13],d=r[14],p=r[16],f=r[18],h=l(e,t);let m=i.get(t);if(!m){d(e,t);for(const n of h.d.keys()){f(e,n).t.add(t)}if(m={l:new Set,d:new Set(h.d.keys()),t:new Set},i.set(t,m),$S(t)&&function(e){return!!e.onMount}(t)){const n=()=>{let n=!0;const r=(...r)=>{try{return p(e,t,...r)}finally{n||(c(e),u(e))}};try{const i=s(e,t,r);i&&(m.u=()=>{n=!0;try{i()}finally{n=!1}})}finally{n=!1}};o.add(n)}null==(n=a.m)||n.call(a,t)}return m},uw=(e,t)=>{var n,r;const i=vw(e),o=i[1],a=i[5],s=i[6],l=i[11],u=i[19],c=l(e,t);let d=o.get(t);if(!d||d.l.size)return d;let p=!1;for(const e of d.t)if(null==(n=o.get(e))?void 0:n.d.has(t)){p=!0;break}if(p)return d;d.u&&a.add(d.u),d=void 0,o.delete(t);for(const n of c.d.keys()){const r=u(e,n);null==r||r.t.delete(t)}null==(r=s.u)||r.call(s,t)},cw=(e,t,n)=>{const r=vw(e),i=r[11],o=r[27],a=i(e,t),s="v"in a,l=a.v;if(BS(n))for(const r of a.d.keys())GS(t,n,i(e,r));a.v=n,delete a.e,s&&Object.is(l,a.v)||(++a.n,BS(l)&&o(e,l))},dw=(e,t)=>VS((0,vw(e)[14])(e,t)),pw=(e,t,...n)=>{const r=vw(e),i=r[3],o=r[12],a=r[13],s=r[16],l=i.size;try{return s(e,t,...n)}finally{i.size!==l&&(a(e),o(e))}},fw=(e,t,n)=>{const r=vw(e),i=r[12],o=r[18],a=r[19],s=o(e,t).l;return s.add(n),i(e),()=>{s.delete(n),a(e,t),i(e)}},hw=(e,t,n)=>{const r=vw(e)[25];let i=r.get(t);if(!i){i=new Set,r.set(t,i);const e=()=>r.delete(t);t.then(e,e)}i.add(n)},mw=(e,t)=>{const n=vw(e)[25].get(t);null==n||n.forEach(e=>e())},gw=new WeakMap,vw=e=>{const n=gw.get(e);if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&!n)throw new Error("Store must be created by buildStore to read its building blocks");return n};function yw(e){const t=vw(e),n=t[24];return n?n(t):t}function bw(...e){const t={get:e=>(0,vw(t)[21])(t,e),set:(e,...n)=>(0,vw(t)[22])(t,e,...n),sub:(e,n)=>(0,vw(t)[23])(t,e,n)},n=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},XS,JS,ZS,QS,ew,tw,nw,iw,ow,aw,sw,lw,uw,cw,dw,pw,fw,void 0,new WeakMap,hw,mw,[0]].map((t,n)=>e[n]||t);return gw.set(t,Object.freeze(n)),t}let xw,Sw=0;function ww(e,n){const r="atom"+ ++Sw,i={toString(){return"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&this.debugLabel?r+":"+this.debugLabel:r}};return"function"==typeof e?i.read=e:(i.init=e,i.read=Cw,i.write=Ew),n&&(i.write=n),i}function Cw(e){return e(this)}function Ew(e,t,n){return t(this,"function"==typeof n?n(e(this)):n)}function Iw(){return bw()}const Dw=u(void 0);function Rw(e){const n=h(Dw);return(null==e?void 0:e.store)||n||(xw||(xw=Iw(),"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=xw),globalThis.__JOTAI_DEFAULT_STORE__!==xw&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),xw)}function Pw({children:e,store:t}){const n=l(null);return t?r(Dw.Provider,{value:t},e):(null===n.current&&(n.current=Iw()),r(Dw.Provider,{value:n.current},e))}const Mw=e=>"function"==typeof(null==e?void 0:e.then),Lw=e=>{e.status||(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}))},Aw=n.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(Lw(e),e)}),kw=new WeakMap,Ow=(e,t,n)=>{const r=yw(e)[26];let i=kw.get(t);return i||(i=new Promise((o,a)=>{let s=t;const l=e=>t=>{s===e&&o(t)},u=e=>t=>{s===e&&a(t)},c=()=>{try{const t=n();Mw(t)?(kw.set(t,i),s=t,t.then(l(t),u(t)),r(e,t,c)):o(t)}catch(e){a(e)}};t.then(l(t),u(t)),r(e,t,c)}),kw.set(t,i)),i};function qw(e,t){const{delay:r,unstable_promiseStatus:i=!n.use}={},o=Rw(t),[[a,s,l],u]=c(t=>{const n=o.get(e);return Object.is(t[0],n)&&t[1]===o&&t[2]===e?t:[n,o,e]},void 0,()=>[o.get(e),o,e]);let f=a;if(s===o&&l===e||(u(),f=o.get(e)),d(()=>{const t=o.sub(e,()=>{if(i)try{const t=o.get(e);Mw(t)&&Lw(Ow(o,t,()=>o.get(e)))}catch(e){}if("number"==typeof r)return console.warn("[DEPRECATED] delay option is deprecated and will be removed in v3.\n\nMigration guide:\n\nCreate a custom hook like the following.\n\nfunction useAtomValueWithDelay<Value>(\n atom: Atom<Value>,\n options: { delay: number },\n): Value {\n const { delay } = options\n const store = useStore(options)\n const [value, setValue] = useState(() => store.get(atom))\n useEffect(() => {\n const unsub = store.sub(atom, () => {\n setTimeout(() => setValue(store.get(atom)), delay)\n })\n return unsub\n }, [store, atom, delay])\n return value\n}\n"),void setTimeout(u,r);u()});return u(),t},[o,e,r,i]),p(f),Mw(f)){const t=Ow(o,f,()=>o.get(e));return i&&Lw(t),Aw(t)}return f}function Tw(e,n){const r=Rw(n);return f((...n)=>{if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&!("write"in e))throw new Error("not writable atom");return r.set(e,...n)},[r,e])}function Nw(e,t){return[qw(e,t),Tw(e,t)]}t.meta.env&&t.meta.env.MODE;!function(e=()=>{try{return window.localStorage}catch(e){return void("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&"undefined"!=typeof window&&console.warn(e))}},n){var r;let i,o;const a={getItem:(t,r)=>{var a,s;const l=e=>{if(i!==(e=e||"")){try{o=JSON.parse(e,null==n?void 0:n.reviver)}catch(e){return r}i=e}return o},u=null!=(s=null==(a=e())?void 0:a.getItem(t))?s:null;return(e=>"function"==typeof(null==e?void 0:e.then))(u)?u.then(l):l(u)},setItem:(t,n)=>{var r;return null==(r=e())?void 0:r.setItem(t,JSON.stringify(n,void 0))},removeItem:t=>{var n;return null==(n=e())?void 0:n.removeItem(t)}};let s;try{s=null==(r=e())?void 0:r.subscribe}catch(e){}var l;!s&&"undefined"!=typeof window&&"function"==typeof window.addEventListener&&window.Storage&&(s=(t,n)=>{if(!(e()instanceof window.Storage))return()=>{};const r=r=>{r.storageArea===e()&&r.key===t&&n(r.newValue)};return window.addEventListener("storage",r),()=>{window.removeEventListener("storage",r)}}),s&&(a.subscribe=(l=s,(e,t,n)=>l(e,e=>{let r;try{r=JSON.parse(e||"")}catch(e){r=n}t(r)})))}();const jw=(e,t,n)=>(t.has(n)?t:t.set(n,e())).get(n),_w=new WeakMap,Fw=()=>{};const zw=new WeakMap;function Ww(e,t){const n=Rw(t),r=$w(n);for(const[i,...o]of e)r.has(i)&&!(null==t?void 0:t.dangerouslyForceHydrate)||(r.add(i),n.set(i,...o))}const $w=e=>{let t=zw.get(e);return t||(t=new WeakSet,zw.set(e,t)),t};function Hw(){return Boolean("undefined"!=typeof process&&process.env?.NODE_ENV&&!1)}function Vw(e){const t=ww(()=>[]),n=ww(function(e){const[r,i,o]=e(t);o.has(n)&&(r.forEach(e),++i.n)});return n.effect=e,n.INTERNAL_onInit=e=>{const r=new Set;let i,o=0,a=!1,s=!1,l=!1;function u(){if(o)return;r.clear();let t=!0;const c=i=>{if(l)return e.get(i);if(i===n){const t=h(e,i);if(!HS(t)){if(!WS(i))throw new Error("no atom init");S(e,i,i.init)}return VS(t)}const o=v(e,i);try{return VS(o)}finally{C.d.set(i,o.n),d.get(i)?.t.add(n),t?r.add(i):d.has(i)&&(x(e,n),g(e),m(e))}};c.peek=e.get;const w=(r,...i)=>{const a=h(e,r);try{if(++o,r===n){if(!WS(r))throw new Error("atom not writable");const t=a.n,n=i[0];return S(e,r,n),x(e,r),void(t!==a.n&&(p.add(r),f.c?.(r),y(e,r)))}return b(e,r,...i)}finally{t||(g(e),m(e)),--o}};w.recurse=(t,...r)=>{if(l){if(Hw())throw new Error("set.recurse is not allowed in cleanup")}else try{return a=!0,x(e,n),w(t,...r)}finally{g(e),a=!1,s&&(s=!1,u())}};try{i?.();const e=n.effect(c,w);if("function"!=typeof e)return;i=()=>{if(!o)try{return t=!0,l=!0,e()}finally{t=!1,l=!1,i=void 0}}}finally{t=!1,r.forEach(t=>{C.d.set(t,h(e,t).n)}),x(e,n),g(e)}}const c=yw(e),d=c[1],p=c[3],f=KS(c[6]),h=c[11],m=c[12],g=c[13],v=c[14],y=c[15],b=c[16],x=c[17],S=c[20],w=function(e,t){let n=Bw.get(e);n||(n=new Set,Bw.set(e,n),t.f.add(function(){for(const e of n)n.delete(e),e()}));return n}(e,f),C=h(e,n);C.v=void 0,Object.assign(e.get(t),[r,C,d]),f.c.add(n,function(){p.delete(n)}),f.m.add(n,function(){w.add(u),i&&w.delete(i)}),f.u.add(n,function(){w.delete(u),i&&w.add(i)}),f.c.add(n,function(){a?s=!0:w.add(u)})},Hw()&&(Object.defineProperty(t,"debugLabel",{get:()=>n.debugLabel?`${n.debugLabel}:ref`:void 0,configurable:!0,enumerable:!0}),t.debugPrivate=!0),n}const Bw=new WeakMap;const Gw=async(e,t,n)=>{const r=e.get(n);void 0!==r&&("dimension"===r.type?await t.moveDimensionToAlternative(r.def.qDef.cId):await t.moveMeasureToAlternative(r.def.qDef.cId))},Uw=async(e,t,n)=>{const r=e.get(n);void 0!==r&&("dimension"===r.type?await t.moveDimensionFromAlternative(r.def.qDef.cId):await t.moveMeasureFromAlternative(r.def.qDef.cId))},Yw=async e=>{const{type:t,handler:n,model:r,fieldInfo:i,handlerQueue:o}=e;void 0!==n&&void 0!==r&&o&&o.add(async()=>{switch(t){case"apply":for(const t of e.localChecked)await Uw(i,n,t);for(const t of e.localUnchecked)await Gw(i,n,t);break;case"checked":await Uw(i,n,e.cId);break;case"unchecked":await Gw(i,n,e.cId)}})},Kw=ww(),Xw=ww(),Jw=ww(),Zw=ww(e=>e(Jw)?.translate??(e=>e)),Qw=ww(""),eC=ww(e=>{const t=e(Qw).toLowerCase().trim();return({title:e})=>e.toLowerCase().trim().includes(t)}),tC=ww(e=>e(Jw)?.getBooleanFlag??(()=>!1)),nC=e=>7005!==e.qError?.qErrorCode,rC=new WeakMap,iC={qInfo:{qType:"AlternativeLayout"},qHyperCubeDef:{qMode:"S",qDimensions:[],qMeasures:[],qInitialDataFetch:[{qTop:0,qLeft:0,qHeight:0,qWidth:0}],excludedNoOfLeftDims:-1,qCalcCond:{qv:"0"}}},oC=function(e,n=Fw){return((e,t,n)=>{const r=jw(()=>new WeakMap,_w,t);return jw(e,r,n)})(()=>{const r=new WeakMap,i=new WeakMap,o=ww(0),a=ww([]);a.INTERNAL_onInit=e=>{e.set(a,[()=>e.set(o,e=>e+1)])},"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&(o.debugPrivate=!0,a.debugPrivate=!0);const s=ww(t=>{let l;t(o);try{l=t(s)}catch(e){}const u=t(e);if(!(e=>"function"==typeof(null==e?void 0:e.then))(u))return{v:u};if(u!==(null==l?void 0:l.p)&&u.then(e=>{i.set(u,e);const[n]=t(a);n()},e=>{r.set(u,e);const[n]=t(a);n()}),r.has(u))throw r.get(u);return i.has(u)?{p:u,v:i.get(u)}:l&&"v"in l?{p:u,f:n(l.v),v:l.v}:{p:u,f:n()}});return s.init=void 0,"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&(s.debugPrivate=!0),ww(e=>{const t=e(s);return"f"in t?t.f:t.v},(t,n,...r)=>n(e,...r))},e,n)}(ww(async e=>{const t=e(Kw);if(t){if(rC.has(t))return rC.get(t);try{const e=await t.app.createSessionObject(iC);return rC.set(t,e),e}catch(e){return void console.error("Error creating alternative layout model:",e)}}})),aC=ww(null),sC=ww(),lC=Vw((e,t)=>{const n=e(Kw),r=e(oC);if(!n||!r)return;const i=async()=>{const e=await n.getLayout();if(e.qSelectionInfo?.qInSelections)return;const i=await n.getEffectiveProperties();await r.applyPatches([{qOp:"replace",qPath:"/qHyperCubeDef/qDimensions",qValue:JSON.stringify(i.qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions)},{qOp:"replace",qPath:"/qHyperCubeDef/qMeasures",qValue:JSON.stringify(i.qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures)}]);const o=await r.getLayout();t(sC,{layout:structuredClone(e),properties:structuredClone(i),altLayout:structuredClone(o)}),t(aC,null)};return i(),n.Invalidated?.bind(i),()=>{n.Invalidated?.unbind(i)}}),uC=ww(e=>e(sC)?.layout),cC=ww(e=>e(sC)?.altLayout),dC=ww(e=>e(sC)?.properties),pC=ww(e=>{const t=e(sC)?.layout;return t?.qHyperCube.qDimensionInfo.filter(nC)??[]}),fC=ww(e=>{const t=e(sC)?.layout;return t?.qHyperCube.qMeasureInfo.filter(nC)??[]}),hC=ww(e=>{const t=e(uC),n=e(pC),r=e(fC),i=e(dC),o=new Map;return t&&i?(n.forEach((e,t)=>{o.set(e.cId,{id:e.cId,type:"dimension",def:i.qHyperCubeDef.qDimensions[t]})}),r.forEach((e,t)=>{o.set(e.cId,{id:e.cId,type:"measure",def:i.qHyperCubeDef.qMeasures[t]})}),i.qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions?.forEach(e=>{o.set(e.qDef.cId,{id:e.qDef.cId,type:"dimension",def:e})}),i.qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures?.forEach(e=>{o.set(e.qDef.cId,{id:e.qDef.cId,type:"measure",def:e})}),o):o});class mC{#e=[];#t=!1;#n=!1;#r;#i;#o;#a;constructor({onQueueCompleted:e}){this.#r=e}#s(){this.#i=void 0,this.#o=void 0,this.#a=void 0}pause(){this.#i&&(clearTimeout(this.#a),this.#o?.(),this.#s());const{promise:e,resolve:t}=Promise.withResolvers();this.#i=e,this.#o=t,this.#a=setTimeout(()=>{this.abort("Aborting queue after being paused for too long")},6e4)}async continue(e=0){const t=this.#o;await(e=>new Promise(t=>{setTimeout(t,e)}))(e),t===this.#o&&(t?.(),clearTimeout(this.#a),this.#s())}abort(e="Queue aborted"){clearTimeout(this.#a),(this.#e.length>0||this.#t)&&console.warn(`[SequentialPromiseQueue] ${e}`),this.#n=!0,this.#e=[],this.#o?.(),this.#s()}add(e){this.#e.push(e),this.#t||this.#l()}async#l(){if(!this.#t){for(this.#t=!0,this.#n=!1;this.#e.length>0;)if(this.#i)await this.#i;else try{const e=this.#e.shift();await(e?.())}catch(e){return console.error("[SequentialPromiseQueue] Error executing action:",e),this.#e=[],void(this.#t=!1)}try{this.#n||await(this.#r?.())}catch(e){console.error("[SequentialPromiseQueue] Error executing onQueueCompleted:",e)}finally{this.#t=!1,this.#e.length>0&&this.#l()}}}}const gC=ww(null),vC=Vw((e,t)=>{const n=e(Kw),r=e(Xw),i=new mC({onQueueCompleted:async()=>{n&&r&&await n.applyPatches([{qPath:"/qHyperCubeDef",qOp:"replace",qValue:JSON.stringify(r.properties.qHyperCubeDef)}],!0)}});t(gC,i);const o=()=>{i.pause()},a=()=>{i.continue(500)},s=()=>{i.abort()};return n?.Invalidated?.bind(o),n?.Validated?.bind(a),n?.Cancelled?.bind(s),n?.Closing?.bind(s),()=>{i.abort(),n?.Invalidated?.unbind(o),n?.Validated?.unbind(a),n?.Cancelled?.unbind(s),n?.Closing?.unbind(s)}}),yC=ww(e=>{const t=[...e(pC),...e(fC)].map(e=>e.cId);return new Set(t)}),bC=ww(new Set),xC=ww(new Set),SC=ww(e=>{const t=e(bC),n=e(xC);return e(yC).difference(n).union(t)}),wC=Vw((e,t)=>{e(yC),t(bC,new Set),t(xC,new Set)}),CC=ww(e=>e(SC),(e,t,n)=>{const r=e(SC).has(n),i=new Set(e(xC)),o=new Set(e(bC));r?(i.add(n),o.delete(n)):(o.add(n),i.delete(n)),t(xC,i),t(bC,o),Yw({type:r?"unchecked":"checked",cId:n,handler:e(Xw),model:e(Kw),fieldInfo:e(hC),handlerQueue:e(gC)})}),EC=({props:e,children:t})=>(Ww([[Kw,e.args.model],[Jw,e.args.apis],[Xw,e.args.handler]]),qw(wC),qw(lC),qw(vC),t);function IC(e,t){const n=new Set(e),r=new Set(t);return e===t||n.size===r.size&&Array.from(n).every(r.has.bind(r))}function DC(e){return"write"in e}const RC=new WeakMap,PC={},{read:MC,write:LC}=ww(null);function AC(e,t,n){const[r,i,o,,a]=e,s=r.get(t);if(s)return s;if(n===e){let r=i.get(t);return r||(r=[TC(e,t,n),n],i.set(t,r)),r}const l=n??PC;let u=o.get(l);u||(u=new WeakMap,o.set(l,u));let c=u.get(t);if(!c){const[r,i]=a?AC(a,t,n):[t];c=[t.read===MC?r:TC(e,t,i),i],u.set(t,c)}return c}function kC(e){for(const t of e[5])t()}function OC(e,t,n,r,i){if(n.read===MC&&DC(n)&&DC(t)&&n.write!==LC&&e!==r){const{write:o}=n;return t.write=qC(e,n.write.bind(n),r,i),()=>{t.write=o}}}function qC(e,t,n,r=n){return function(i,o,...a){return t(function(t){const[r]=AC(e,t,n);return i(r)},function(t,...i){const[a]=AC(e,t,n),s=OC(e,a,t,n,r);try{return o(a,...i)}finally{null==s||s()}},...a)}}function TC(e,t,n){const r=Object.getOwnPropertyDescriptors(t);Object.keys(r).filter(e=>["read","write","debugLabel"].includes(e)).forEach(e=>r[e].configurable=!0);const i=Object.getPrototypeOf(t),o=Object.create(i,r);return o.read!==MC&&(o.read=function(e,t,n){return function(r,i){return t(function(t){const[i]=AC(e,t,n);return r(i)},i)}}(e,t.read.bind(t),n)),DC(o)&&DC(t)&&o.write!==LC&&(o.write=qC(e,t.write.bind(t),n)),o}function NC({atoms:e=[],atomFamilies:t=[],parentStore:n,name:r}){const i=new WeakSet(e),o=RC.get(n),a=(null==o?void 0:o[3])??n,s=[new WeakMap,new WeakMap,new WeakMap,a,o,new Set,void 0],l=s[0],u=s[5],c=function(e){const t=e[3],n=[...yw(t)],r=n[21],i=n[22],o=n[23],a=n[9],s={};n[9]=(e,t)=>a(l,t),n[21]=h(r),n[22]=p,n[23]=h(o),n[24]=([...e])=>{const t=[m(e[0],u),m(e[1],c),m(e[2]),g(e[3]),e[4],e[5],y(e[6]),h(e[7]),h(e[8]),e[9],h(e[10]),h(e[11],e=>d(t[0],e)),e[12],e[13],h(e[14]),h(e[15]),h(e[16]),h(e[17]),h(e[18]),h(e[19]),h(e[20]),h(e[21]),h(e[22]),h(e[23]),()=>e];return t};const l=bw(...n);return l;function u(t){const n=new WeakMap;return function(r){let i=n.get(r);if(i)return i;const o=t(r);return o?(i={...o,d:m(o.d,function(t){return n=>t(AC(e,n)[0])}),p:g(o.p),get n(){return o.n},set n(e){o.n=e},get v(){return o.v},set v(e){o.v=e},get e(){return o.e},set e(e){o.e=e}},n.set(r,i),i):void 0}}function c(e){const t=new WeakMap;return function(n){let r=t.get(n);if(r)return r;const i=e(n);return i?(r={...i,d:g(i.d),t:g(i.t),get u(){return i.u},set u(e){i.u=e}},t.set(n,r),r):void 0}}function d(e,t){return function(n,r){return e.get(r)||(e.set(r,t(n,r)),e.get(r))}}function p(t,n,...r){const[o,a]=AC(e,n),s=OC(e,o,n,a,e);try{return i(t,o,...r)}finally{null==s||s()}}function f(t,n){return function(r,...i){const[o]=AC(e,r);return(n?n(t):t)(o,...i)}}function h(t,n){return function(r,i,...o){const[a]=AC(e,i);return(n?n(t):t)(r,a,...o)}}function m(e,t){return{get:f(e.get.bind(e),t),set:f(e.set.bind(e)),has:f(e.has.bind(e)),delete:f(e.delete.bind(e))}}function g(t){return{get size(){return t.size},add:f(t.add.bind(t)),has:f(t.has.bind(t)),delete:f(t.delete.bind(t)),clear:t.clear.bind(t),forEach:e=>t.forEach(f(e)),*[Symbol.iterator](){for(const n of t)yield AC(e,n)[0]}}}function v(t){if(!t)return;const n=f(t);return n.add=function(n,r){if(void 0===n)return t.add(void 0,r);const[i]=AC(e,n);return t.add(i,r)},n}function y(e){const t={get f(){return e.f},set f(t){e.f=t}};return Object.defineProperties(t,Object.fromEntries(["r","c","m","u"].map(t=>[t,{get:()=>s[t]??(s[t]=v(e[t])),set(n){delete s[t],e[t]=n},configurable:!0,enumerable:!0}]))),Object.assign(t,e)}}(s);s[6]=c,Object.assign(c,{name:r}),RC.set(c,s);for(const t of new Set(e))l.set(t,[TC(s,t,s),s]);for(const e of new Set(t)){for(const t of e.getParams()){const n=e(t);l.has(n)||l.set(n,[TC(s,n,s),s])}const t=e.unstable_listen(({type:e,atom:t})=>{"CREATE"!==e||l.has(t)?"REMOVE"===e&&!i.has(t)&&l.delete(t):l.set(t,[TC(s,t,s),s])});u.add(t)}return c}const jC=function(e,t){return function(n){const{atoms:i=[],atomFamilies:o=[],children:a,scope:s,name:l}=n,u=t(),c=Array.from(i,e=>Array.isArray(e)?e[0]:e);function p(){return[s??NC({atoms:c,atomFamilies:o,parentStore:u,name:l}),function(e){return u!==e.parentStore||!IC(c,e.atoms)||!IC(o,e.atomFamilies)||s!==e.providedScope}]}const[[f,h],g]=m(p);if(h({atoms:c,atomFamilies:o,parentStore:u,providedScope:s})){const e=RC.get(f);e&&kC(e),g(p)}return Ww(Array.from(i).filter(Array.isArray),{store:f}),d(()=>{const e=RC.get(f);return()=>{e&&kC(e)}},[f]),r(e,{store:f,children:a})}}(Pw,Rw);var _C=Object.defineProperty,FC=Object.defineProperties,zC=Object.getOwnPropertyDescriptors,WC=Object.getOwnPropertySymbols,$C=Object.prototype.hasOwnProperty,HC=Object.prototype.propertyIsEnumerable,VC=(e,t,n)=>t in e?_C(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,BC=(e,t)=>{for(var n in t||(t={}))$C.call(t,n)&&VC(e,n,t[n]);if(WC)for(var n of WC(t))HC.call(t,n)&&VC(e,n,t[n]);return e},GC=(e,t)=>FC(e,zC(t));function UC(e,t,n){if(t===n)return e;const r=e.slice();return r.splice(n,0,r.splice(t,1)[0]),r}function YC(e){return"initialIndex"in e&&"number"==typeof e.initialIndex&&"index"in e&&"number"==typeof e.index}function KC(e,t){return function(e,t,n){var r,i,o;const{source:a,target:s,canceled:l}=t.operation;if(!a||!s||l)return"preventDefault"in t&&t.preventDefault(),e;const u=(e,t)=>e===t||"object"==typeof e&&"id"in e&&e.id===t;if(Array.isArray(e)){const r=e.findIndex(e=>u(e,a.id)),i=e.findIndex(e=>u(e,s.id));if(-1===r||-1===i){if(YC(a)){const r=a.initialIndex,i=a.index;return r===i||r<0||r>=e.length?("preventDefault"in t&&t.preventDefault(),e):n(e,r,i)}return e}if(!l&&"index"in a&&"number"==typeof a.index){const t=a.index;if(t!==r)return n(e,r,t)}return n(e,r,i)}const c=Object.entries(e);let d,p,f=-1,h=-1;for(const[e,t]of c)if(-1===f&&(f=t.findIndex(e=>u(e,a.id)),-1!==f&&(d=e)),-1===h&&(h=t.findIndex(e=>u(e,s.id)),-1!==h&&(p=e)),-1!==f&&-1!==h)break;if(-1===f&&YC(a)){const r=a.initialGroup,i=a.initialIndex,o=a.group,s=a.index;if(null==r||null==o||!(r in e)||!(o in e))return"preventDefault"in t&&t.preventDefault(),e;if(r===o&&i===s)return"preventDefault"in t&&t.preventDefault(),e;if(r===o)return GC(BC({},e),{[r]:n(e[r],i,s)});const l=e[r][i];return GC(BC({},e),{[r]:[...e[r].slice(0,i),...e[r].slice(i+1)],[o]:[...e[o].slice(0,s),l,...e[o].slice(s)]})}if(!a.manager)return e;const{dragOperation:m}=a.manager,g=null!=(i=null==(r=m.shape)?void 0:r.current.center)?i:m.position.current;if(null==p&&s.id in e){const t=s.shape&&g.y>s.shape.center.y?e[s.id].length:0;p=s.id,h=t}if(null==d||null==p||d===p&&f===h){if(null!=d&&d===p&&f===h&&YC(a)){const t=null!=a.group&&a.group!==d,r=a.index!==f;if(t||r){const t=null!=(o=a.group)?o:d;if(t in e){if(d===t)return GC(BC({},e),{[d]:n(e[d],f,a.index)});const r=e[d][f];return GC(BC({},e),{[d]:[...e[d].slice(0,f),...e[d].slice(f+1)],[t]:[...e[t].slice(0,a.index),r,...e[t].slice(a.index)]})}}}return"preventDefault"in t&&t.preventDefault(),e}if(d===p)return GC(BC({},e),{[d]:n(e[d],f,h)});const v=s.shape&&Math.round(g.y)>Math.round(s.shape.center.y)?1:0,y=e[d][f];return GC(BC({},e),{[d]:[...e[d].slice(0,f),...e[d].slice(f+1)],[p]:[...e[p].slice(0,h+v),y,...e[p].slice(h+v)]})}(e,t,UC)}function XC(e,t){let n=null;const r=new Map,i=new Set;function o(i){let s;if(void 0===t)s=r.get(i);else for(const[e,n]of r)if(t(e,i)){s=n;break}if(void 0!==s){if(!n?.(s[1],i))return s[0];o.remove(i)}const l=e(i);return r.set(i,[l,Date.now()]),a("CREATE",i,l),l}function a(e,t,n){for(const r of i)r({type:e,param:t,atom:n})}return o.unstable_listen=e=>(i.add(e),()=>{i.delete(e)}),o.getParams=()=>r.keys(),o.remove=e=>{if(void 0===t){if(!r.has(e))return;const[t]=r.get(e);r.delete(e),a("REMOVE",e,t)}else for(const[n,[i]]of r)if(t(n,e)){r.delete(n),a("REMOVE",n,i);break}},o.setShouldRemove=e=>{if(n=e,n)for(const[e,[t,i]]of r)n(i,e)&&(r.delete(e),a("REMOVE",e,t))},o}const JC=({itemIndex:e,sectionIndex:t})=>void 0!==e?`${t}-${e}`:`${t}`,ZC=ww(),QC=ww(e=>e(ZC)?.numberOfSections??0),eE=ww(e=>e(ZC)?.numberOfItemsInSection??[]),tE=ww(e=>e(ZC)?.keyExtractor??JC),nE=ww(e=>e(ZC)?.emptyTexts??(()=>({title:"No items",message:"There are no items to display."}))),rE=ww(e=>e(ZC)?.onDragEnd),iE=ww(e=>e(ZC)?.onDragOver),oE=ww(e=>e(ZC)?.itemRenderer),aE=ww(e=>e(ZC)?.headerRenderer),sE=ww(e=>e(ZC)?.dragOverlayRenderer),lE=ww(e=>e(ZC)?.onClick),uE=ww(e=>{const t=e(QC),n=e(eE),r=e(tE),i={};for(let e=0;e<t;e++)i[e]=Array.from({length:n[e]},(t,n)=>r({sectionIndex:e,itemIndex:n}));return i}),cE=ww(null),dE=ww(e=>e(cE),(e,t,n)=>{if(null===n)return void t(cE,null);const r=e(cE);t(cE,{...r,...n})}),pE=XC(e=>ww(null,(t,n,r)=>{let i;"over"===e?i=t(iE):"end"===e&&(i=t(rE),n(dE,null));const{source:o,target:a}=r.operation;if(null===a)return void n(dE,{toIndex:void 0,toSectionIndex:void 0});const s=o.data.sectionIndex!==a.data.sectionIndex;let l;if(s){const e=KC(t(uE),r)[a.data.sectionIndex].indexOf(o.id);l=-1!==e?e:a.sortable?.index??0}else l=a.sortable?.index??0;if("start"===e)n(dE,{id:o.id,startSection:o.data.sectionKey,startIndex:o.data.itemIndex,startSectionIndex:o.data.sectionIndex});else if("over"===e){const e=t(dE)?.startIndex;n(dE,{toIndex:!s&&void 0!==e&&l>e?l+1:l,toSectionIndex:a.data.sectionIndex})}i?.({id:o.id,toIndex:l,toSection:a.data.sectionKey,fromSection:o.data.sectionKey,startSection:t(dE)?.startSection??o.data.sectionKey,event:r})})),fE=[ZC,QC,eE,tE,nE,rE,oE,aE,lE,dE],hE=[pE],mE=({props:e,children:t})=>{const n=Tw(ZC);return g(()=>{n(e)},[e,n]),t};var gE=Symbol.for("preact-signals");function vE(){if(wE>1)wE--;else{var e,t=!1;for(!function(){var e=DE;for(DE=void 0;void 0!==e;)e.S.v===e.v&&(e.S.i=e.i),e=e.o}();void 0!==SE;){var n=SE;for(SE=void 0,CE++;void 0!==n;){var r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&AE(n))try{n.c()}catch(n){t||(e=n,t=!0)}n=r}}if(CE=0,wE--,t)throw e}}function yE(e){if(wE>0)return e();IE=++EE,wE++;try{return e()}finally{vE()}}var bE=void 0;function xE(e){var t=bE;bE=void 0;try{return e()}finally{bE=t}}var SE=void 0,wE=0,CE=0,EE=0,IE=0,DE=void 0,RE=0;function PE(e){if(void 0!==bE){var t=e.n;if(void 0===t||t.t!==bE)return t={i:0,S:e,p:bE.s,n:void 0,t:bE,e:void 0,x:void 0,r:t},void 0!==bE.s&&(bE.s.n=t),bE.s=t,e.n=t,32&bE.f&&e.S(t),t;if(-1===t.i)return t.i=0,void 0!==t.n&&(t.n.p=t.p,void 0!==t.p&&(t.p.n=t.n),t.p=bE.s,t.n=void 0,bE.s.n=t,bE.s=t),t}}function ME(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=null==t?void 0:t.watched,this.Z=null==t?void 0:t.unwatched,this.name=null==t?void 0:t.name}function LE(e,t){return new ME(e,t)}function AE(e){for(var t=e.s;void 0!==t;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function kE(e){for(var t=e.s;void 0!==t;t=t.n){var n=t.S.n;if(void 0!==n&&(t.r=n),t.S.n=t,t.i=-1,void 0===t.n){e.s=t;break}}}function OE(e){for(var t=e.s,n=void 0;void 0!==t;){var r=t.p;-1===t.i?(t.S.U(t),void 0!==r&&(r.n=t.n),void 0!==t.n&&(t.n.p=r)):n=t,t.S.n=t.r,void 0!==t.r&&(t.r=void 0),t=r}e.s=n}function qE(e,t){ME.call(this,void 0),this.x=e,this.s=void 0,this.g=RE-1,this.f=4,this.W=null==t?void 0:t.watched,this.Z=null==t?void 0:t.unwatched,this.name=null==t?void 0:t.name}function TE(e,t){return new qE(e,t)}function NE(e){var t=e.m;if(e.m=void 0,"function"==typeof t){wE++;var n=bE;bE=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,jE(e),t}finally{bE=n,vE()}}}function jE(e){for(var t=e.s;void 0!==t;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,NE(e)}function _E(e){if(bE!==this)throw new Error("Out-of-order effect");OE(this),bE=e,this.f&=-2,8&this.f&&jE(this),vE()}function FE(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=null==t?void 0:t.name}function zE(e,t){var n=new FE(e,t);try{n.c()}catch(e){throw n.d(),e}var r=n.d.bind(n);return r[Symbol.dispose]=r,r}ME.prototype.brand=gE,ME.prototype.h=function(){return!0},ME.prototype.S=function(e){var t=this,n=this.t;n!==e&&void 0===e.e&&(e.x=n,this.t=e,void 0!==n?n.e=e:xE(function(){var e;null==(e=t.W)||e.call(t)}))},ME.prototype.U=function(e){var t=this;if(void 0!==this.t){var n=e.e,r=e.x;void 0!==n&&(n.x=r,e.e=void 0),void 0!==r&&(r.e=n,e.x=void 0),e===this.t&&(this.t=r,void 0===r&&xE(function(){var e;null==(e=t.Z)||e.call(t)}))}},ME.prototype.subscribe=function(e){var t=this;return zE(function(){var n=t.value,r=bE;bE=void 0;try{e(n)}finally{bE=r}},{name:"sub"})},ME.prototype.valueOf=function(){return this.value},ME.prototype.toString=function(){return this.value+""},ME.prototype.toJSON=function(){return this.value},ME.prototype.peek=function(){var e=bE;bE=void 0;try{return this.value}finally{bE=e}},Object.defineProperty(ME.prototype,"value",{get:function(){var e=PE(this);return void 0!==e&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(CE>100)throw new Error("Cycle detected");!function(e){0!==wE&&0===CE&&e.l!==IE&&(e.l=IE,DE={S:e,v:e.v,i:e.i,o:DE})}(this),this.v=e,this.i++,RE++,wE++;try{for(var t=this.t;void 0!==t;t=t.x)t.t.N()}finally{vE()}}}}),qE.prototype=new ME,qE.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if(32==(36&this.f))return!0;if(this.f&=-5,this.g===RE)return!0;if(this.g=RE,this.f|=1,this.i>0&&!AE(this))return this.f&=-2,!0;var e=bE;try{kE(this),bE=this;var t=this.x();(16&this.f||this.v!==t||0===this.i)&&(this.v=t,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return bE=e,OE(this),this.f&=-2,!0},qE.prototype.S=function(e){if(void 0===this.t){this.f|=36;for(var t=this.s;void 0!==t;t=t.n)t.S.S(t)}ME.prototype.S.call(this,e)},qE.prototype.U=function(e){if(void 0!==this.t&&(ME.prototype.U.call(this,e),void 0===this.t)){this.f&=-33;for(var t=this.s;void 0!==t;t=t.n)t.S.U(t)}},qE.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;void 0!==e;e=e.x)e.t.N()}},Object.defineProperty(qE.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=PE(this);if(this.h(),void 0!==e&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),FE.prototype.c=function(){var e=this.S();try{if(8&this.f)return;if(void 0===this.x)return;var t=this.x();"function"==typeof t&&(this.m=t)}finally{e()}},FE.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,NE(this),kE(this),wE++;var e=bE;return bE=this,_E.bind(this,e)},FE.prototype.N=function(){2&this.f||(this.f|=2,this.u=SE,SE=this)},FE.prototype.d=function(){this.f|=8,1&this.f||jE(this)},FE.prototype.dispose=function(){this.d()};var WE,$E,HE,VE,BE,GE,UE,YE,KE,XE,JE,ZE,QE,eI,tI,nI,rI,iI,oI,aI,sI=Object.create,lI=Object.defineProperty,uI=Object.defineProperties,cI=Object.getOwnPropertyDescriptor,dI=Object.getOwnPropertyDescriptors,pI=Object.getOwnPropertySymbols,fI=Object.prototype.hasOwnProperty,hI=Object.prototype.propertyIsEnumerable,mI=e=>{throw TypeError(e)},gI=(e,t,n)=>t in e?lI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vI=(e,t)=>lI(e,"name",{value:t,configurable:!0}),yI=["class","method","getter","setter","accessor","field","value","get","set"],bI=e=>void 0!==e&&"function"!=typeof e?mI("Function expected"):e,xI=(e,t,n,r,i)=>({kind:yI[e],name:t,metadata:r,addInitializer:e=>n._?mI("Already initialized"):i.push(bI(e||null))}),SI=(e,t)=>{return gI(t,(n="metadata",(r=Symbol[n])?r:Symbol.for("Symbol."+n)),e[3]);var n,r},wI=(e,t,n,r)=>{for(var i=0,o=e[t>>1],a=o&&o.length;i<a;i++)1&t?o[i].call(n):r=o[i].call(n,r);return r},CI=(e,t,n,r,i,o)=>{var a,s,l,u,c,d=7&t,p=!!(8&t),f=!!(16&t),h=d>3?e.length+1:d?p?1:2:0,m=yI[d+5],g=d>3&&(e[h-1]=[]),v=e[h]||(e[h]=[]),y=d&&(!f&&!p&&(i=i.prototype),d<5&&(d>3||!f)&&cI(d<4?i:{get[n](){return DI(this,o)},set[n](e){return PI(this,o,e)}},n));d?f&&d<4&&vI(o,(d>2?"set ":d>1?"get ":"")+n):vI(i,n);for(var b=r.length-1;b>=0;b--)u=xI(d,n,l={},e[3],v),d&&(u.static=p,u.private=f,c=u.access={has:f?e=>II(i,e):e=>n in e},3^d&&(c.get=f?e=>(1^d?DI:MI)(e,i,4^d?o:y.get):e=>e[n]),d>2&&(c.set=f?(e,t)=>PI(e,i,t,4^d?o:y.set):(e,t)=>e[n]=t)),s=(0,r[b])(d?d<4?f?o:y[m]:d>4?void 0:{get:y.get,set:y.set}:i,u),l._=1,4^d||void 0===s?bI(s)&&(d>4?g.unshift(s):d?f?o=s:y[m]=s:i=s):"object"!=typeof s||null===s?mI("Object expected"):(bI(a=s.get)&&(y.get=a),bI(a=s.set)&&(y.set=a),bI(a=s.init)&&g.unshift(a));return d||SI(e,i),y&&lI(i,n,y),f?4^d?o:y:i},EI=(e,t,n)=>t.has(e)||mI("Cannot "+n),II=(e,t)=>Object(t)!==t?mI('Cannot use the "in" operator on this value'):e.has(t),DI=(e,t,n)=>(EI(e,t,"read from private field"),n?n.call(e):t.get(e)),RI=(e,t,n)=>t.has(e)?mI("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),PI=(e,t,n,r)=>(EI(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),MI=(e,t,n)=>(EI(e,t,"access private method"),n);function LI(e,t){if(t){let n;return TE(()=>{const r=e();return r&&n&&t(n,r)?n:(n=r,r)})}return TE(e)}function AI(e,t){if(Object.is(e,t))return!0;if(null===e||null===t)return!1;if("function"==typeof e&&"function"==typeof t)return e===t;if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;return!e.some((e,n)=>!AI(e,t[n]))}if("object"==typeof e&&"object"==typeof t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const i=n.some(n=>!AI(e[n],t[n]));return!i}return!1}function kI({get:e},t){return{init:e=>LE(e),get(){return e.call(this).value},set(t){const n=e.call(this);n.peek()!==t&&(n.value=t)}}}function OI(e,t){const n=new WeakMap;return function(){let t=n.get(this);return t||(t=LI(e.bind(this)),n.set(this,t)),t.value}}function qI(e=!0){return function(t,n){n.addInitializer(function(){const t="field"===n.kind||n.static?this:Object.getPrototypeOf(this),r=Object.getOwnPropertyDescriptor(t,n.name);r&&Object.defineProperty(t,n.name,((e,t)=>uI(e,dI(t)))(((e,t)=>{for(var n in t||(t={}))fI.call(t,n)&&gI(e,n,t[n]);if(pI)for(var n of pI(t))hI.call(t,n)&&gI(e,n,t[n]);return e})({},r),{enumerable:e}))})}}function TI(...e){const t=e.map(e=>zE(e));return()=>t.forEach(e=>e())}GE=[kI],BE=[kI],VE=[kI],HE=[qI()],$E=[qI()],WE=[qI()];var NI,jI=class{constructor(e,t=Object.is){this.defaultValue=e,this.equals=t,wI(UE,5,this),RI(this,ZE),RI(this,YE,wI(UE,8,this)),wI(UE,11,this),RI(this,QE,wI(UE,12,this)),wI(UE,15,this),RI(this,rI,wI(UE,16,this)),wI(UE,19,this),this.reset=this.reset.bind(this),this.reset()}get current(){return DI(this,ZE,oI)}get initial(){return DI(this,ZE,XE)}get previous(){return DI(this,ZE,tI)}set current(e){const t=xE(()=>DI(this,ZE,oI));e&&t&&this.equals(t,e)||yE(()=>{DI(this,ZE,XE)||PI(this,ZE,e,JE),PI(this,ZE,t,nI),PI(this,ZE,e,aI)})}reset(e=this.defaultValue){yE(()=>{PI(this,ZE,void 0,nI),PI(this,ZE,e,JE),PI(this,ZE,e,aI)})}};function _I(e){return xE(()=>{const t={};for(const n in e)t[n]=e[n];return t})}UE=[,,,sI(null)],YE=new WeakMap,ZE=new WeakSet,QE=new WeakMap,rI=new WeakMap,KE=CI(UE,20,"#initial",GE,ZE,YE),XE=KE.get,JE=KE.set,eI=CI(UE,20,"#previous",BE,ZE,QE),tI=eI.get,nI=eI.set,iI=CI(UE,20,"#current",VE,ZE,rI),oI=iI.get,aI=iI.set,CI(UE,2,"current",HE,jI),CI(UE,2,"initial",$E,jI),CI(UE,2,"previous",WE,jI),SI(UE,jI);NI=new WeakMap;var FI,zI,WI,$I,HI,VI=Object.create,BI=Object.defineProperty,GI=Object.getOwnPropertyDescriptor,UI=Object.getOwnPropertySymbols,YI=Object.prototype.hasOwnProperty,KI=Object.prototype.propertyIsEnumerable,XI=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),JI=e=>{throw TypeError(e)},ZI=Math.pow,QI=(e,t,n)=>t in e?BI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,eD=["class","method","getter","setter","accessor","field","value","get","set"],tD=e=>void 0!==e&&"function"!=typeof e?JI("Function expected"):e,nD=(e,t,n,r,i)=>({kind:eD[e],name:t,metadata:r,addInitializer:e=>n._?JI("Already initialized"):i.push(tD(e||null))}),rD=(e,t,n,r,i,o)=>{for(var a,s,l,u,c=7&t,d=eD[c+5],p=e[2]||(e[2]=[]),f=(i=i.prototype,GI(i,n)),h=r.length-1;h>=0;h--)(l=nD(c,n,s={},e[3],p)).static=false,l.private=false,u=l.access={has:e=>n in e},u.get=e=>e[n],a=(0,r[h])(f[d],l),s._=1,tD(a)&&(f[d]=a);return f&&BI(i,n,f),i},iD=(e,t,n)=>t.has(e)||JI("Cannot "+n),oD=class e{constructor(e,t){this.x=e,this.y=t}static delta(t,n){return new e(t.x-n.x,t.y-n.y)}static distance(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}static equals(e,t){return e.x===t.x&&e.y===t.y}static from({x:t,y:n}){return new e(t,n)}},aD=class e{constructor(e,t,n,r){this.left=e,this.top=t,this.width=n,this.height=r,this.scale={x:1,y:1}}get inverseScale(){return{x:1/this.scale.x,y:1/this.scale.y}}translate(t,n){const{top:r,left:i,width:o,height:a,scale:s}=this,l=new e(i+t,r+n,o,a);return l.scale=((e,t)=>{for(var n in t||(t={}))YI.call(t,n)&&QI(e,n,t[n]);if(UI)for(var n of UI(t))KI.call(t,n)&&QI(e,n,t[n]);return e})({},s),l}get boundingRectangle(){const{width:e,height:t,left:n,top:r,right:i,bottom:o}=this;return{width:e,height:t,left:n,top:r,right:i,bottom:o}}get center(){const{left:e,top:t,right:n,bottom:r}=this;return new oD((e+n)/2,(t+r)/2)}get area(){const{width:e,height:t}=this;return e*t}equals(t){if(!(t instanceof e))return!1;const{left:n,top:r,width:i,height:o}=this;return n===t.left&&r===t.top&&i===t.width&&o===t.height}containsPoint(e){const{top:t,left:n,bottom:r,right:i}=this;return t<=e.y&&e.y<=r&&n<=e.x&&e.x<=i}intersectionArea(t){return t instanceof e?function(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),a=i-r,s=o-n;if(r<i&&n<o){return a*s}return 0}(this,t):0}intersectionRatio(e){const{area:t}=this,n=this.intersectionArea(e);return n/(e.area+t-n)}get bottom(){const{top:e,height:t}=this;return e+t}get right(){const{left:e,width:t}=this;return e+t}get aspectRatio(){const{width:e,height:t}=this;return e/t}get corners(){return[{x:this.left,y:this.top},{x:this.right,y:this.top},{x:this.left,y:this.bottom},{x:this.right,y:this.bottom}]}static from({top:t,left:n,width:r,height:i}){return new e(n,t,r,i)}static delta(e,t,n={x:"center",y:"center"}){const r=(e,t)=>{const r=n[t],i="x"===t?e.left:e.top,o="x"===t?e.width:e.height;return"start"==r?i:"end"==r?i+o:i+o/2};return oD.delta({x:r(e,"x"),y:r(e,"y")},{x:r(t,"x"),y:r(t,"y")})}static intersectionRatio(t,n){return e.from(t).intersectionRatio(e.from(n))}};var sD,lD=class extends(WI=jI,zI=[OI],FI=[OI],WI){constructor(e){var t,n,r;super(oD.from(e),(e,t)=>oD.equals(e,t)),((e,t,n)=>{for(var r=0,i=e[t>>1],o=i&&i.length;r<o;r++)i[r].call(n)})(HI,5,this),t=this,r=0,(n=$I).has(t)?JI("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(t):n.set(t,r),this.velocity={x:0,y:0}}get delta(){return oD.delta(this.current,this.initial)}get direction(){const{current:e,previous:t}=this;if(!t)return null;const n={x:e.x-t.x,y:e.y-t.y};return n.x||n.y?Math.abs(n.x)>Math.abs(n.y)?n.x>0?"right":"left":n.y>0?"down":"up":null}get current(){return super.current}set current(e){const{current:t}=this,n=oD.from(e),r={x:n.x-t.x,y:n.y-t.y},i=Date.now(),o=i-(iD(a=this,s=$I,"read from private field"),s.get(a));var a,s;const l=e=>Math.round(e/o*100);yE(()=>{((e,t,n)=>{iD(e,t,"write to private field"),t.set(e,n)})(this,$I,i),this.velocity={x:l(r.x),y:l(r.y)},super.current=n})}reset(e=this.defaultValue){super.reset(oD.from(e)),this.velocity={x:0,y:0}}};function uD({x:e,y:t},n){const r=Math.abs(e),i=Math.abs(t);return"number"==typeof n?Math.sqrt(ZI(r,2)+ZI(i,2))>n:"x"in n&&"y"in n?r>n.x&&i>n.y:"x"in n?r>n.x:"y"in n&&i>n.y}HI=(e=>{var t;return[,,,VI(null!=(t=null==e?void 0:e[XI("metadata")])?t:null)]})(WI),$I=new WeakMap,rD(HI,2,"delta",zI,lD),rD(HI,2,"direction",FI,lD),sD=HI,QI(lD,XI("metadata"),sD[3]);var cD,dD,pD,fD,hD=(e=>(e.Horizontal="x",e.Vertical="y",e))(hD||{}),mD=Object.values(hD),gD=Object.create,vD=Object.defineProperty,yD=Object.defineProperties,bD=Object.getOwnPropertyDescriptor,xD=Object.getOwnPropertyDescriptors,SD=Object.getOwnPropertySymbols,wD=Object.prototype.hasOwnProperty,CD=Object.prototype.propertyIsEnumerable,ED=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),ID=e=>{throw TypeError(e)},DD=(e,t,n)=>t in e?vD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,RD=(e,t)=>{for(var n in t||(t={}))wD.call(t,n)&&DD(e,n,t[n]);if(SD)for(var n of SD(t))CD.call(t,n)&&DD(e,n,t[n]);return e},PD=(e,t)=>yD(e,xD(t)),MD=(e,t)=>vD(e,"name",{value:t,configurable:!0}),LD=(e,t)=>{var n={};for(var r in e)wD.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&SD)for(var r of SD(e))t.indexOf(r)<0&&CD.call(e,r)&&(n[r]=e[r]);return n},AD=e=>{var t;return[,,,gD(null!=(t=null==e?void 0:e[ED("metadata")])?t:null)]},kD=["class","method","getter","setter","accessor","field","value","get","set"],OD=e=>void 0!==e&&"function"!=typeof e?ID("Function expected"):e,qD=(e,t,n,r,i)=>({kind:kD[e],name:t,metadata:r,addInitializer:e=>n._?ID("Already initialized"):i.push(OD(e||null))}),TD=(e,t)=>DD(t,ED("metadata"),e[3]),ND=(e,t,n,r)=>{for(var i=0,o=e[t>>1],a=o&&o.length;i<a;i++)1&t?o[i].call(n):r=o[i].call(n,r);return r},jD=(e,t,n,r,i,o)=>{var a,s,l,u,c,d=7&t,p=!!(8&t),f=!!(16&t),h=d>3?e.length+1:d?p?1:2:0,m=kD[d+5],g=d>3&&(e[h-1]=[]),v=e[h]||(e[h]=[]),y=d&&(!f&&!p&&(i=i.prototype),d<5&&(d>3||!f)&&bD(d<4?i:{get[n](){return zD(this,o)},set[n](e){return $D(this,o,e)}},n));d?f&&d<4&&MD(o,(d>2?"set ":d>1?"get ":"")+n):MD(i,n);for(var b=r.length-1;b>=0;b--)u=qD(d,n,l={},e[3],v),d&&(u.static=p,u.private=f,c=u.access={has:f?e=>FD(i,e):e=>n in e},3^d&&(c.get=f?e=>(1^d?zD:HD)(e,i,4^d?o:y.get):e=>e[n]),d>2&&(c.set=f?(e,t)=>$D(e,i,t,4^d?o:y.set):(e,t)=>e[n]=t)),s=(0,r[b])(d?d<4?f?o:y[m]:d>4?void 0:{get:y.get,set:y.set}:i,u),l._=1,4^d||void 0===s?OD(s)&&(d>4?g.unshift(s):d?f?o=s:y[m]=s:i=s):"object"!=typeof s||null===s?ID("Object expected"):(OD(a=s.get)&&(y.get=a),OD(a=s.set)&&(y.set=a),OD(a=s.init)&&g.unshift(a));return d||TD(e,i),y&&vD(i,n,y),f?4^d?o:y:i},_D=(e,t,n)=>t.has(e)||ID("Cannot "+n),FD=(e,t)=>Object(t)!==t?ID('Cannot use the "in" operator on this value'):e.has(t),zD=(e,t,n)=>(_D(e,t,"read from private field"),n?n.call(e):t.get(e)),WD=(e,t,n)=>t.has(e)?ID("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),$D=(e,t,n,r)=>(_D(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),HD=(e,t,n)=>(_D(e,t,"access private method"),n);function VD(e,t){return{plugin:e,options:t}}function BD(e){return t=>VD(e,t)}function GD(e){return"function"==typeof e?{plugin:e,options:void 0}:e}cD=[kI];var UD=class{constructor(e,t){this.manager=e,this.options=t,WD(this,pD,ND(dD,8,this,!1)),ND(dD,11,this),WD(this,fD,new Set)}enable(){this.disabled=!1}disable(){this.disabled=!0}isDisabled(){return xE(()=>this.disabled)}configure(e){this.options=e}registerEffect(e){const t=zE(e.bind(this));return zD(this,fD).add(t),t}destroy(){zD(this,fD).forEach(e=>e())}static configure(e){return VD(this,e)}};dD=AD(null),pD=new WeakMap,fD=new WeakMap,jD(dD,4,"disabled",cD,UD,pD),TD(dD,UD);var YD,KD=class extends UD{},XD=class{constructor(e){this.manager=e,this.instances=new Map,WD(this,YD,[])}get values(){return Array.from(this.instances.values())}set values(e){const t=e.map(GD).reduceRight((e,t)=>e.some(({plugin:e})=>e===t.plugin)?e:[t,...e],[]),n=t.map(({plugin:e})=>e);for(const e of zD(this,YD))if(!n.includes(e)){if(e.prototype instanceof KD)continue;this.unregister(e)}for(const{plugin:e,options:n}of t)this.register(e,n);$D(this,YD,n)}get(e){return this.instances.get(e)}register(e,t){const n=this.instances.get(e);if(n)return n.options!==t&&(n.options=t),n;const r=new e(this.manager,t);return this.instances.set(e,r),r}unregister(e){const t=this.instances.get(e);t&&(t.destroy(),this.instances.delete(e))}destroy(){for(const e of this.instances.values())e.destroy();this.instances.clear()}};function JD(e,t){return e.priority===t.priority?e.type===t.type?t.value-e.value:t.type-e.type:t.priority-e.priority}YD=new WeakMap;var ZD,QD,eR=[],tR=class extends UD{constructor(e){super(e),WD(this,ZD),WD(this,QD),this.computeCollisions=this.computeCollisions.bind(this),$D(this,QD,LE(eR)),this.destroy=TI(()=>{const e=this.computeCollisions(),t=xE(()=>this.manager.dragOperation.position.current);if(e!==eR){const e=zD(this,ZD);if($D(this,ZD,t),e&&t.x==e.x&&t.y==e.y)return}else $D(this,ZD,void 0);zD(this,QD).value=e},()=>{const{dragOperation:e}=this.manager;e.status.initialized&&this.forceUpdate()})}forceUpdate(e=!0){xE(()=>{e?zD(this,QD).value=this.computeCollisions():$D(this,ZD,void 0)})}computeCollisions(e,t){const{registry:n,dragOperation:r}=this.manager,{source:i,shape:o,status:a}=r;if(!a.initialized||!o)return eR;const s=[],l=[];for(const o of null!=e?e:n.droppables){if(o.disabled)continue;if(i&&!o.accepts(i))continue;const e=null!=t?t:o.collisionDetector;if(!e)continue;l.push(o),o.shape;const n=xE(()=>e({droppable:o,dragOperation:r}));n&&(null!=o.collisionPriority&&(n.priority=o.collisionPriority),s.push(n))}return 0===l.length?eR:(s.sort(JD),s)}get collisions(){return zD(this,QD).value}};ZD=new WeakMap,QD=new WeakMap;var nR=class{constructor(){this.registry=new Map}addEventListener(e,t){const{registry:n}=this,r=new Set(n.get(e));return r.add(t),n.set(e,r),()=>this.removeEventListener(e,t)}removeEventListener(e,t){const{registry:n}=this,r=new Set(n.get(e));r.delete(t),n.set(e,r)}dispatch(e,...t){const{registry:n}=this,r=n.get(e);if(r)for(const e of r)e(...t)}},rR=class extends nR{constructor(e){super(),this.manager=e}dispatch(e,t){const n=[t,this.manager];super.dispatch(e,...n)}};function iR(e,t=!0){let n=!1;return PD(RD({},e),{cancelable:t,get defaultPrevented(){return n},preventDefault(){t&&(n=!0)}})}var oR,aR,sR,lR,uR,cR,dR,pR,fR,hR=class extends KD{constructor(e){super(e);let t=[];this.destroy=TI(()=>{const{dragOperation:n,collisionObserver:r}=e;n.status.initializing&&(t=[],r.enable())},()=>{const{collisionObserver:n,monitor:r}=e,{collisions:i}=n;if(n.isDisabled())return;const o=iR({collisions:i});if(r.dispatch("collision",o),o.defaultPrevented)return;if(((e,t)=>e.map(({id:e})=>e).join("")===t.map(({id:e})=>e).join(""))(i,t))return;t=i;const[a]=i;xE(()=>{var t;(null==a?void 0:a.id)!==(null==(t=e.dragOperation.target)?void 0:t.id)&&(n.disable(),e.actions.setDropTarget(null==a?void 0:a.id).then(()=>{n.enable()}))})})}},mR=(e=>(e[e.Lowest=0]="Lowest",e[e.Low=1]="Low",e[e.Normal=2]="Normal",e[e.High=3]="High",e[e.Highest=4]="Highest",e))(mR||{}),gR=(e=>(e[e.Collision=0]="Collision",e[e.ShapeIntersection=1]="ShapeIntersection",e[e.PointerIntersection=2]="PointerIntersection",e))(gR||{});dR=[kI],cR=[OI],uR=[OI],lR=[OI],sR=[OI],aR=[OI],oR=[OI];var vR=class{constructor(){ND(pR,5,this),WD(this,fR,ND(pR,8,this,"idle")),ND(pR,11,this)}get current(){return this.value}get idle(){return"idle"===this.value}get initializing(){return"initializing"===this.value}get initialized(){const{value:e}=this;return"idle"!==e&&"initialization-pending"!==e}get dragging(){return"dragging"===this.value}get dropped(){return"dropped"===this.value}set(e){this.value=e}};pR=AD(null),fR=new WeakMap,jD(pR,4,"value",dR,vR,fR),jD(pR,2,"current",cR,vR),jD(pR,2,"idle",uR,vR),jD(pR,2,"initializing",lR,vR),jD(pR,2,"initialized",sR,vR),jD(pR,2,"dragging",aR,vR),jD(pR,2,"dropped",oR,vR),TD(pR,vR);var yR,bR,xR,SR,wR,CR,ER,IR,DR,RR=class{constructor(e){this.manager=e}setDragSource(e){const{dragOperation:t}=this.manager;t.sourceIdentifier="string"==typeof e||"number"==typeof e?e:e.id}setDropTarget(e){return xE(()=>{const{dragOperation:t}=this.manager,n=null!=e?e:null;if(t.targetIdentifier===n)return Promise.resolve(!1);t.targetIdentifier=n;const r=iR({operation:t.snapshot()});return t.status.dragging&&this.manager.monitor.dispatch("dragover",r),this.manager.renderer.rendering.then(()=>r.defaultPrevented)})}start(e){return xE(()=>{const{dragOperation:t}=this.manager;null!=e.source&&this.setDragSource(e.source);if(!t.source)throw new Error("Cannot start a drag operation without a drag source");if(!t.status.idle)throw new Error("Cannot start a drag operation while another is active");const n=new AbortController,{event:r,coordinates:i}=e;yE(()=>{t.status.set("initialization-pending"),t.shape=null,t.canceled=!1,t.activatorEvent=null!=r?r:null,t.position.reset(i)});const o=iR({operation:t.snapshot()});return this.manager.monitor.dispatch("beforedragstart",o),o.defaultPrevented?(t.reset(),n.abort(),n):(t.status.set("initializing"),t.controller=n,this.manager.renderer.rendering.then(()=>{if(n.signal.aborted)return;const{status:e}=t;"initializing"===e.current&&(t.status.set("dragging"),this.manager.monitor.dispatch("dragstart",{nativeEvent:r,operation:t.snapshot(),cancelable:!1}))}),n)})}move(e){return xE(()=>{var t,n;const{dragOperation:r}=this.manager,{status:i,controller:o}=r;if(!i.dragging||!o||o.signal.aborted)return;const a=iR({nativeEvent:e.event,operation:r.snapshot(),by:e.by,to:e.to},null==(t=e.cancelable)||t);(null==(n=e.propagate)||n)&&this.manager.monitor.dispatch("dragmove",a),queueMicrotask(()=>{var t,n,i,o,s;if(a.defaultPrevented)return;const l=null!=(s=e.to)?s:{x:r.position.current.x+(null!=(n=null==(t=e.by)?void 0:t.x)?n:0),y:r.position.current.y+(null!=(o=null==(i=e.by)?void 0:i.y)?o:0)};r.position.current=l})})}stop(e={}){return xE(()=>{var t,n;const{dragOperation:r}=this.manager,{controller:i}=r;if(!i||i.signal.aborted)return;let o;i.abort();const a=()=>{this.manager.renderer.rendering.then(()=>{r.status.set("dropped");const e=xE(()=>{var e;return"dropping"===(null==(e=r.source)?void 0:e.status)}),t=()=>{r.controller===i&&(r.controller=void 0),r.reset()};if(e){const{source:e}=r,n=zE(()=>{"idle"===(null==e?void 0:e.status)&&(n(),t())})}else this.manager.renderer.rendering.then(t)})};r.canceled=null!=(t=e.canceled)&&t,this.manager.monitor.dispatch("dragend",{nativeEvent:e.event,operation:r.snapshot(),canceled:null!=(n=e.canceled)&&n,suspend:()=>{const e={resume:()=>{},abort:()=>{}};return o=new Promise((t,n)=>{e.resume=t,e.abort=n}),e}}),o?o.then(a).catch(()=>r.reset()):a()})}};SR=[kI],xR=[kI],bR=[kI],yR=[kI];var PR=class{constructor(e,t){WD(this,CR,ND(wR,8,this)),ND(wR,11,this),WD(this,ER,ND(wR,12,this)),ND(wR,15,this),WD(this,IR,ND(wR,16,this)),ND(wR,19,this),WD(this,DR,ND(wR,20,this)),ND(wR,23,this);const{effects:n,id:r,data:i={},disabled:o=!1,register:a=!0}=e;let s=r;this.manager=t,this.id=r,this.data=i,this.disabled=o,this.effects=()=>{var e;return[()=>{const{id:e,manager:t}=this;if(e!==s)return null==t||t.registry.register(this),()=>null==t?void 0:t.registry.unregister(this)},...null!=(e=null==n?void 0:n())?e:[]]},this.register=this.register.bind(this),this.unregister=this.unregister.bind(this),this.destroy=this.destroy.bind(this),t&&a&&queueMicrotask(this.register)}register(){var e;return null==(e=this.manager)?void 0:e.registry.register(this)}unregister(){var e;null==(e=this.manager)||e.registry.unregister(this)}destroy(){var e;null==(e=this.manager)||e.registry.unregister(this)}};wR=AD(null),CR=new WeakMap,ER=new WeakMap,IR=new WeakMap,DR=new WeakMap,jD(wR,4,"manager",SR,PR,CR),jD(wR,4,"id",xR,PR,ER),jD(wR,4,"data",bR,PR,IR),jD(wR,4,"disabled",yR,PR,DR),TD(wR,PR);var MR,LR,AR,kR,OR,qR,TR,NR,jR,_R,FR,zR,WR,$R,HR,VR,BR,GR,UR,YR,KR,XR,JR,ZR,QR=class{constructor(){this.map=LE(new Map),this.cleanupFunctions=new WeakMap,this.register=(e,t)=>{const n=this.map.peek(),r=n.get(e),i=()=>this.unregister(e,t);if(r===t)return i;if(r){const e=this.cleanupFunctions.get(r);null==e||e(),this.cleanupFunctions.delete(r)}const o=new Map(n);o.set(e,t),this.map.value=o;const a=TI(...t.effects());return this.cleanupFunctions.set(t,a),i},this.unregister=(e,t)=>{const n=this.map.peek();if(n.get(e)!==t)return;const r=this.cleanupFunctions.get(t);null==r||r(),this.cleanupFunctions.delete(t);const i=new Map(n);i.delete(e),this.map.value=i}}[Symbol.iterator](){return this.map.peek().values()}get value(){return this.map.value.values()}has(e){return this.map.value.has(e)}get(e){return this.map.value.get(e)}destroy(){for(const e of this){const t=this.cleanupFunctions.get(e);null==t||t(),e.destroy()}this.map.value=new Map}},eP=class extends(TR=PR,qR=[kI],OR=[kI],kR=[kI],AR=[OI],LR=[OI],MR=[OI],TR){constructor(e,t){var n=e,{modifiers:r,type:i,sensors:o}=n,a=LD(n,["modifiers","type","sensors"]);super(a,t),ND(NR,5,this),WD(this,jR,ND(NR,8,this)),ND(NR,11,this),WD(this,_R,ND(NR,12,this)),ND(NR,15,this),WD(this,FR,ND(NR,16,this,this.isDragSource?"dragging":"idle")),ND(NR,19,this),this.type=i,this.sensors=o,this.modifiers=r,this.alignment=a.alignment}get isDropping(){return"dropping"===this.status&&this.isDragSource}get isDragging(){return"dragging"===this.status&&this.isDragSource}get isDragSource(){var e,t;return(null==(t=null==(e=this.manager)?void 0:e.dragOperation.source)?void 0:t.id)===this.id}};NR=AD(TR),jR=new WeakMap,_R=new WeakMap,FR=new WeakMap,jD(NR,4,"type",qR,eP,jR),jD(NR,4,"modifiers",OR,eP,_R),jD(NR,4,"status",kR,eP,FR),jD(NR,2,"isDropping",AR,eP),jD(NR,2,"isDragging",LR,eP),jD(NR,2,"isDragSource",MR,eP),TD(NR,eP);var tP=class extends(GR=PR,BR=[kI],VR=[kI],HR=[kI],$R=[kI],WR=[kI],zR=[OI],GR){constructor(e,t){var n=e,{accept:r,collisionDetector:i,collisionPriority:o,type:a}=n;super(LD(n,["accept","collisionDetector","collisionPriority","type"]),t),ND(UR,5,this),WD(this,YR,ND(UR,8,this)),ND(UR,11,this),WD(this,KR,ND(UR,12,this)),ND(UR,15,this),WD(this,XR,ND(UR,16,this)),ND(UR,19,this),WD(this,JR,ND(UR,20,this)),ND(UR,23,this),WD(this,ZR,ND(UR,24,this)),ND(UR,27,this),this.accept=r,this.collisionDetector=i,this.collisionPriority=o,this.type=a}accepts(e){const{accept:t}=this;return!t||("function"==typeof t?t(e):!!e.type&&(Array.isArray(t)?t.includes(e.type):e.type===t))}get isDropTarget(){var e,t;return(null==(t=null==(e=this.manager)?void 0:e.dragOperation.target)?void 0:t.id)===this.id}};UR=AD(GR),YR=new WeakMap,KR=new WeakMap,XR=new WeakMap,JR=new WeakMap,ZR=new WeakMap,jD(UR,4,"accept",BR,tP,YR),jD(UR,4,"type",VR,tP,KR),jD(UR,4,"collisionDetector",HR,tP,XR),jD(UR,4,"collisionPriority",$R,tP,JR),jD(UR,4,"shape",WR,tP,ZR),jD(UR,2,"isDropTarget",zR,tP),TD(UR,tP);var nP,rP=class extends UD{constructor(e,t){super(e,t),this.manager=e,this.options=t}},iP=class extends AbortController{constructor(e,t){super(),this.constraints=e,this.onActivate=t,this.activated=!1;for(const t of null!=e?e:[])t.controller=this}onEvent(e){var t;if(!this.activated)if(null==(t=this.constraints)?void 0:t.length)for(const t of this.constraints)t.onEvent(e);else this.activate(e)}activate(e){this.activated||(this.activated=!0,this.onActivate(e))}abort(e){this.activated=!1,super.abort(e)}},oP=class{constructor(e){this.options=e,WD(this,nP)}set controller(e){$D(this,nP,e),e.signal.addEventListener("abort",()=>this.abort())}activate(e){var t;null==(t=zD(this,nP))||t.activate(e)}};nP=new WeakMap;var aP,sP,lP,uP,cP,dP,pP,fP,hP,mP,gP,vP,yP,bP,xP,SP,wP,CP,EP,IP=class extends UD{constructor(e,t){super(e,t),this.manager=e,this.options=t}apply(e){return e.transform}},DP=class{constructor(e){this.draggables=new QR,this.droppables=new QR,this.plugins=new XD(e),this.sensors=new XD(e),this.modifiers=new XD(e)}register(e,t){if(e instanceof eP)return this.draggables.register(e.id,e);if(e instanceof tP)return this.droppables.register(e.id,e);if(e.prototype instanceof IP)return this.modifiers.register(e,t);if(e.prototype instanceof rP)return this.sensors.register(e,t);if(e.prototype instanceof UD)return this.plugins.register(e,t);throw new Error("Invalid instance type")}unregister(e){if(e instanceof PR)return e instanceof eP?this.draggables.unregister(e.id,e):e instanceof tP?this.droppables.unregister(e.id,e):()=>{};if(e.prototype instanceof IP)return this.modifiers.unregister(e);if(e.prototype instanceof rP)return this.sensors.unregister(e);if(e.prototype instanceof UD)return this.plugins.unregister(e);throw new Error("Invalid instance type")}destroy(){this.draggables.destroy(),this.droppables.destroy(),this.plugins.destroy(),this.sensors.destroy(),this.modifiers.destroy()}};hP=[OI],fP=[kI],pP=[kI],dP=[kI],cP=[kI],uP=[kI],lP=[OI],sP=[OI],aP=[OI];var RP=class{constructor(e){ND(yP,5,this),WD(this,mP),WD(this,gP),WD(this,vP,new jI(void 0,(e,t)=>e&&t?e.equals(t):e===t)),this.status=new vR,WD(this,bP,ND(yP,8,this,!1)),ND(yP,11,this),WD(this,xP,ND(yP,12,this,null)),ND(yP,15,this),WD(this,SP,ND(yP,16,this,null)),ND(yP,19,this),WD(this,wP,ND(yP,20,this,null)),ND(yP,23,this),WD(this,CP,ND(yP,24,this,[])),ND(yP,27,this),this.position=new lD({x:0,y:0}),WD(this,EP,{x:0,y:0}),$D(this,mP,e)}get shape(){const{current:e,initial:t,previous:n}=zD(this,vP);return e&&t?{current:e,initial:t,previous:n}:null}set shape(e){e?zD(this,vP).current=e:zD(this,vP).reset()}get source(){var e;const t=this.sourceIdentifier;if(null==t)return null;const n=zD(this,mP).registry.draggables.get(t);return n&&$D(this,gP,n),null!=(e=null!=n?n:zD(this,gP))?e:null}get target(){var e;const t=this.targetIdentifier;return null!=t&&null!=(e=zD(this,mP).registry.droppables.get(t))?e:null}get transform(){const{x:e,y:t}=this.position.delta;let n={x:e,y:t};for(const e of this.modifiers)n=e.apply(PD(RD({},this.snapshot()),{transform:n}));return $D(this,EP,n),n}snapshot(){return xE(()=>({source:this.source,target:this.target,activatorEvent:this.activatorEvent,transform:zD(this,EP),shape:this.shape?_I(this.shape):null,position:_I(this.position),status:_I(this.status),canceled:this.canceled}))}reset(){yE(()=>{this.status.set("idle"),this.sourceIdentifier=null,this.targetIdentifier=null,zD(this,vP).reset(),this.position.reset({x:0,y:0}),$D(this,EP,{x:0,y:0}),this.modifiers=[]})}};yP=AD(null),mP=new WeakMap,gP=new WeakMap,vP=new WeakMap,bP=new WeakMap,xP=new WeakMap,SP=new WeakMap,wP=new WeakMap,CP=new WeakMap,EP=new WeakMap,jD(yP,2,"shape",hP,RP),jD(yP,4,"canceled",fP,RP,bP),jD(yP,4,"activatorEvent",pP,RP,xP),jD(yP,4,"sourceIdentifier",dP,RP,SP),jD(yP,4,"targetIdentifier",cP,RP,wP),jD(yP,4,"modifiers",uP,RP,CP),jD(yP,2,"source",lP,RP),jD(yP,2,"target",sP,RP),jD(yP,2,"transform",aP,RP),TD(yP,RP);var PP={get rendering(){return Promise.resolve()}};function MP(e,t){return"function"==typeof e?e(t):null!=e?e:t}var LP=class{constructor(e){var t;this.destroy=()=>{this.dragOperation.status.idle||this.actions.stop({canceled:!0}),this.dragOperation.modifiers.forEach(e=>e.destroy()),this.registry.destroy(),this.collisionObserver.destroy()};const n=null!=e?e:{},r=MP(n.plugins,[]),i=MP(n.sensors,[]),o=MP(n.modifiers,[]),a=null!=(t=n.renderer)?t:PP,s=new rR(this),l=new DP(this);this.registry=l,this.monitor=s,this.renderer=a,this.actions=new RR(this),this.dragOperation=new RP(this),this.collisionObserver=new tR(this),this.plugins=[hR,...r],this.modifiers=o,this.sensors=i;const{destroy:u}=this,c=TI(()=>{var e,t,n;const r=xE(()=>this.dragOperation.modifiers),i=this.modifiers;for(const e of r)i.includes(e)||e.destroy();this.dragOperation.modifiers=null!=(n=null==(t=null==(e=this.dragOperation.source)?void 0:e.modifiers)?void 0:t.map(e=>{const{plugin:t,options:n}=GD(e);return new t(this,n)}))?n:i});this.destroy=()=>{c(),u()}}get plugins(){return this.registry.plugins.values}set plugins(e){this.registry.plugins.values=e}get modifiers(){return this.registry.modifiers.values}set modifiers(e){this.registry.modifiers.values=e}get sensors(){return this.registry.sensors.values}set sensors(e){this.registry.sensors.values=e}},AP=e=>{throw TypeError(e)},kP=(e,t,n)=>t.has(e)||AP("Cannot "+n),OP=(e,t,n)=>(kP(e,t,"read from private field"),t.get(e)),qP=(e,t,n)=>t.has(e)?AP("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),TP=(e,t,n,r)=>(kP(e,t,"write to private field"),t.set(e,n),n),NP=(e,t,n)=>(kP(e,t,"access private method"),n);function jP(e){return!!e&&(e instanceof KeyframeEffect||"getKeyframes"in e&&"function"==typeof e.getKeyframes)}function _P(e,t){const n=e.getAnimations();if(n.length>0)for(const e of n){if("running"!==e.playState)continue;const{effect:n}=e,r=(jP(n)?n.getKeyframes():[]).filter(t);if(r.length>0)return[r[r.length-1],e]}return null}function FP(e){const{width:t,height:n,top:r,left:i,bottom:o,right:a}=e.getBoundingClientRect();return{width:t,height:n,top:r,left:i,bottom:o,right:a}}function zP(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function WP(e){return"nodeType"in e}function $P(e){var t,n,r;return e?zP(e)?e:WP(e)?"defaultView"in e?null!=(t=e.defaultView)?t:window:null!=(r=null==(n=e.ownerDocument)?void 0:n.defaultView)?r:window:window:window}function HP(e){const{Document:t}=$P(e);return e instanceof t||"nodeType"in e&&e.nodeType===Node.DOCUMENT_NODE}function VP(e){return!(!e||zP(e))&&(e instanceof $P(e).HTMLElement||"namespaceURI"in e&&"string"==typeof e.namespaceURI&&e.namespaceURI.endsWith("html"))}function BP(e){return e instanceof $P(e).SVGElement||"namespaceURI"in e&&"string"==typeof e.namespaceURI&&e.namespaceURI.endsWith("svg")}function GP(e){return e?zP(e)?e.document:WP(e)?HP(e)?e:VP(e)||BP(e)?e.ownerDocument:document:document:document}function UP(e,t){if(function(e){return"DETAILS"===e.tagName}(e)&&!1===e.open)return!1;const{overflow:n,overflowX:r,overflowY:i}=getComputedStyle(e);return"visible"===n&&"visible"===r&&"visible"===i}function YP(e,t=e.getBoundingClientRect(),n=0){var r,i,o,a,s;let l=t;const{ownerDocument:u}=e,c=null!=(r=u.defaultView)?r:window;let d=e.parentElement;for(;d&&d!==u.documentElement;){if(!UP(d)){const e=d.getBoundingClientRect(),t=n*(e.bottom-e.top),r=n*(e.right-e.left),i=n*(e.bottom-e.top),o=n*(e.right-e.left);l={top:Math.max(l.top,e.top-t),right:Math.min(l.right,e.right+r),bottom:Math.min(l.bottom,e.bottom+i),left:Math.max(l.left,e.left-o),width:0,height:0},l.width=l.right-l.left,l.height=l.bottom-l.top}d=d.parentElement}const p=c.visualViewport,f=null!=(i=null==p?void 0:p.offsetTop)?i:0,h=null!=(o=null==p?void 0:p.offsetLeft)?o:0,m=null!=(a=null==p?void 0:p.width)?a:c.innerWidth,g=null!=(s=null==p?void 0:p.height)?s:c.innerHeight,v=n*g,y=n*m;return l={top:Math.max(l.top,f-v),right:Math.min(l.right,h+m+y),bottom:Math.min(l.bottom,f+g+v),left:Math.max(l.left,h-y),width:0,height:0},l.width=l.right-l.left,l.height=l.bottom-l.top,l.width<0&&(l.width=0),l.height<0&&(l.height=0),l}function KP(e){return{x:e.clientX,y:e.clientY}}var XP="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function JP(e=document,t=new Set){if(t.has(e))return[];t.add(e);const n=[e];for(const r of Array.from(e.querySelectorAll("iframe, frame")))try{const e=r.contentDocument;e&&!t.has(e)&&n.push(...JP(e,t))}catch(e){}try{const r=e.defaultView;if(r&&r!==window.top){const i=r.parent;i&&i.document&&i.document!==e&&n.push(...JP(i.document,t))}}catch(e){}return n}function ZP(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function QP(){var e,t;const n=ZP()?window.visualViewport:null;return{x:null!=(e=null==n?void 0:n.offsetLeft)?e:0,y:null!=(t=null==n?void 0:n.offsetTop)?t:0}}function eM(e){return!(!e||!WP(e))&&e instanceof $P(e).ShadowRoot}function tM(e){if(e&&WP(e)){let t=e.getRootNode();if(eM(t))return t;if(t instanceof Document)return t}return GP(e)}function nM(e){return e.matchMedia("(prefers-reduced-motion: reduce)").matches}function rM(e){return"value"in e}function iM(e){return"CANVAS"===e.tagName}function oM(e,{x:t,y:n}){const r=e.elementFromPoint(t,n);if(function(e){return"IFRAME"===(null==e?void 0:e.tagName)}(r)){const{contentDocument:e}=r;if(e){const{left:i,top:o}=r.getBoundingClientRect();return oM(e,{x:t-i,y:n-o})}}return r}var aM=new WeakMap;var sM=class{constructor(){this.entries=new Set,this.clear=()=>{for(const e of this.entries){const[t,{type:n,listener:r,options:i}]=e;t.removeEventListener(n,r,i)}this.entries.clear()}}bind(e,t){const n=Array.isArray(e)?e:[e],r=Array.isArray(t)?t:[t],i=[];for(const e of n)for(const t of r){const{type:n,listener:r,options:o}=t,a=[e,t];e.addEventListener(n,r,o),this.entries.add(a),i.push(a)}return function(){for(const[e,{type:t,listener:n,options:r}]of i)e.removeEventListener(t,n,r)}}};function lM(e){const t=null==e?void 0:e.ownerDocument.defaultView;if(t&&t.self!==t.parent)return t.frameElement}function uM(e,t){const n=()=>performance.now();let r,i;return function(...o){const a=this;i?(null==r||r(),r=function(e,t){const n=setTimeout(e,t);return()=>clearTimeout(n)}(()=>{e.apply(a,o),i=n()},t-(n()-i))):(e.apply(a,o),i=n())}}var cM,dM=XP?ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},pM=class extends dM{constructor(e){super(t=>{OP(this,cM)?e(t,this):TP(this,cM,!0)}),qP(this,cM,!1)}};cM=new WeakMap;var fM,hM,mM,gM,vM,yM,bM,xM,SM,wM,CM,EM=Array.from({length:100},(e,t)=>t/100),IM=class{constructor(e,t,n={debug:!1,skipInitial:!1}){this.element=e,this.callback=t,qP(this,SM),this.disconnect=()=>{var e,t,n;TP(this,bM,!0),null==(e=OP(this,mM))||e.disconnect(),null==(t=OP(this,gM))||t.disconnect(),OP(this,vM).disconnect(),null==(n=OP(this,yM))||n.remove()},qP(this,fM,!0),qP(this,hM),qP(this,mM),qP(this,gM),qP(this,vM),qP(this,yM),qP(this,bM,!1),qP(this,xM,uM(()=>{var e,t,n;const{element:r}=this;if(null==(e=OP(this,gM))||e.disconnect(),OP(this,bM)||!OP(this,fM)||!r.isConnected)return;const i=null!=(t=r.ownerDocument)?t:document,{innerHeight:o,innerWidth:a}=null!=(n=i.defaultView)?n:window,s=r.getBoundingClientRect(),l=YP(r,s),{top:u,left:c,bottom:d,right:p}=l,f=-Math.floor(u),h=-Math.floor(c),m=`${f}px ${-Math.floor(a-p)}px ${-Math.floor(o-d)}px ${h}px`;this.boundingClientRect=s,TP(this,gM,new IntersectionObserver(e=>{const[t]=e,{intersectionRect:n}=t;1!==(1!==t.intersectionRatio?t.intersectionRatio:aD.intersectionRatio(n,YP(r)))&&OP(this,xM).call(this)},{threshold:EM,rootMargin:m,root:i})),OP(this,gM).observe(r),NP(this,SM,wM).call(this)},75)),this.boundingClientRect=e.getBoundingClientRect(),TP(this,fM,function(e,t=e.getBoundingClientRect()){const{width:n,height:r}=YP(e,t);return n>0&&r>0}(e,this.boundingClientRect));let r=!0;this.callback=e=>{r&&(r=!1,n.skipInitial)||t(e)};const i=e.ownerDocument;(null==n?void 0:n.debug)&&(TP(this,yM,document.createElement("div")),OP(this,yM).style.background="rgba(0,0,0,0.15)",OP(this,yM).style.position="fixed",OP(this,yM).style.pointerEvents="none",i.body.appendChild(OP(this,yM))),TP(this,vM,new IntersectionObserver(t=>{var n,r;const i=t[t.length-1],{boundingClientRect:o,isIntersecting:a}=i,{width:s,height:l}=o,u=OP(this,fM);TP(this,fM,a),(s||l)&&(u&&!a?(null==(n=OP(this,gM))||n.disconnect(),this.callback(null),null==(r=OP(this,mM))||r.disconnect(),TP(this,mM,void 0),OP(this,yM)&&(OP(this,yM).style.visibility="hidden")):OP(this,xM).call(this),a&&!OP(this,mM)&&(TP(this,mM,new pM(OP(this,xM))),OP(this,mM).observe(e)))},{threshold:EM,root:i})),OP(this,fM)&&!n.skipInitial&&this.callback(this.boundingClientRect),OP(this,vM).observe(e)}};fM=new WeakMap,hM=new WeakMap,mM=new WeakMap,gM=new WeakMap,vM=new WeakMap,yM=new WeakMap,bM=new WeakMap,xM=new WeakMap,SM=new WeakSet,wM=function(){OP(this,bM)||(NP(this,SM,CM).call(this),function(e,t){return e===t||!(!e||!t)&&e.top==t.top&&e.left==t.left&&e.right==t.right&&e.bottom==t.bottom}(this.boundingClientRect,OP(this,hM))||(this.callback(this.boundingClientRect),TP(this,hM,this.boundingClientRect)))},CM=function(){if(OP(this,yM)){const{top:e,left:t,width:n,height:r}=YP(this.element);OP(this,yM).style.overflow="hidden",OP(this,yM).style.visibility="visible",OP(this,yM).style.top=`${Math.floor(e)}px`,OP(this,yM).style.left=`${Math.floor(t)}px`,OP(this,yM).style.width=`${Math.floor(n)}px`,OP(this,yM).style.height=`${Math.floor(r)}px`}};var DM,RM,PM,MM,LM=new WeakMap,AM=new WeakMap;function kM(e,t){let n=LM.get(e);if(!n){const t=new IM(e,t=>{const n=LM.get(e);n&&n.callbacks.forEach(e=>e(t))},{skipInitial:!0});n={disconnect:t.disconnect,callbacks:new Set}}return n.callbacks.add(t),LM.set(e,n),()=>{n.callbacks.delete(t),0===n.callbacks.size&&(LM.delete(e),n.disconnect())}}var OM=class{constructor(e,t,n){this.callback=t,qP(this,DM),qP(this,RM,!1),qP(this,PM),qP(this,MM,uM(e=>{if(!OP(this,RM)&&e.target&&"contains"in e.target&&"function"==typeof e.target.contains)for(const t of OP(this,PM))if(e.target.contains(t)){this.callback(OP(this,DM).boundingClientRect);break}},75));const r=function(e){const t=new Set;let n=lM(e);for(;n;)t.add(n),n=lM(n);return t}(e),i=function(e,t){const n=new Set;for(const r of e){const e=kM(r,t);n.add(e)}return()=>n.forEach(e=>e())}(r,t),o=function(e,t){var n;const r=e.ownerDocument;if(!AM.has(r)){const e=new AbortController,t=new Set;document.addEventListener("scroll",e=>t.forEach(t=>t(e)),{capture:!0,passive:!0,signal:e.signal}),AM.set(r,{disconnect:()=>e.abort(),listeners:t})}const{listeners:i,disconnect:o}=null!=(n=AM.get(r))?n:{};return i&&o?(i.add(t),()=>{i.delete(t),0===i.size&&(o(),AM.delete(r))}):()=>{}}(e,OP(this,MM));TP(this,PM,r),TP(this,DM,new IM(e,t,n)),this.disconnect=()=>{OP(this,RM)||(TP(this,RM,!0),i(),o(),OP(this,DM).disconnect())}}};function qM(e){return"showPopover"in e&&"hidePopover"in e&&"function"==typeof e.showPopover&&"function"==typeof e.hidePopover}function TM(e){try{qM(e)&&e.isConnected&&e.hasAttribute("popover")&&!e.matches(":popover-open")&&e.showPopover()}catch(e){}}function NM(e){return!(!XP||!e)&&e===GP(e).scrollingElement}function jM(e){var t,n;const r=$P(e),i=NM(e)?function(e){var t,n,r,i;const{documentElement:o}=GP(e),a=$P(e).visualViewport,s=null!=(t=null==a?void 0:a.width)?t:o.clientWidth,l=null!=(n=null==a?void 0:a.height)?n:o.clientHeight,u=null!=(r=null==a?void 0:a.offsetTop)?r:0,c=null!=(i=null==a?void 0:a.offsetLeft)?i:0;return{top:u,left:c,right:c+s,bottom:u+l,width:s,height:l}}(e):FP(e),o=r.visualViewport,a=NM(e)?{height:null!=(t=null==o?void 0:o.height)?t:r.innerHeight,width:null!=(n=null==o?void 0:o.width)?n:r.innerWidth}:{height:e.clientHeight,width:e.clientWidth},s={current:{x:e.scrollLeft,y:e.scrollTop},max:{x:e.scrollWidth-a.width,y:e.scrollHeight-a.height}};return{rect:i,position:s,isTop:s.current.y<=0,isLeft:s.current.x<=0,isBottom:s.current.y>=s.max.y,isRight:s.current.x>=s.max.x}}function _M(e,t){const{isTop:n,isBottom:r,isLeft:i,isRight:o,position:a}=jM(e),{x:s,y:l}=null!=t?t:{x:0,y:0},u=!n&&a.current.y+l>0,c=!r&&a.current.y+l<a.max.y,d=!i&&a.current.x+s>0,p=!o&&a.current.x+s<a.max.x;return{top:u,bottom:c,left:d,right:p,x:d||p,y:u||c}}DM=new WeakMap,RM=new WeakMap,PM=new WeakMap,MM=new WeakMap;var FM=class{constructor(e){this.scheduler=e,this.pending=!1,this.tasks=new Set,this.resolvers=new Set,this.flush=()=>{const{tasks:e,resolvers:t}=this;this.pending=!1,this.tasks=new Set,this.resolvers=new Set;for(const t of e)t();for(const e of t)e()}}schedule(e){return this.tasks.add(e),this.pending||(this.pending=!0,this.scheduler(this.flush)),new Promise(e=>this.resolvers.add(e))}},zM=new FM(e=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(e):e()}),WM=new FM(e=>setTimeout(e,50)),$M=new Map,HM=$M.clear.bind($M);function VM(e,t=!1){if(!t)return BM(e);let n=$M.get(e);return n||(n=BM(e),$M.set(e,n),WM.schedule(HM),n)}function BM(e){return $P(e).getComputedStyle(e)}var GM={excludeElement:!0,escapeShadowDOM:!0};function UM(e,t=GM){const{limit:n,excludeElement:r,escapeShadowDOM:i}=t,o=new Set;return e?function t(a){if(null!=n&&o.size>=n)return o;if(!a)return o;if(HP(a)&&null!=a.scrollingElement&&!o.has(a.scrollingElement))return o.add(a.scrollingElement),o;if(i&&eM(a))return t(a.host);if(!VP(a))return BP(a)?t(a.parentElement):o;if(o.has(a))return o;const s=VM(a,!0);if(r&&a===e||function(e,t=VM(e,!0)){const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const r=t[e];return"string"==typeof r&&n.test(r)})}(a,s)&&o.add(a),function(e,t=VM(e,!0)){return"fixed"===t.position||"sticky"===t.position}(a,s)){const{scrollingElement:e}=a.ownerDocument;return e&&o.add(e),o}return t(a.parentNode)}(e):o}function YM(e,t=window.frameElement){const n={x:0,y:0,scaleX:1,scaleY:1};if(!e)return n;let r=lM(e);for(;r;){if(r===t)return n;const e=FP(r),{x:i,y:o}=KM(r,e);n.x=n.x+e.left,n.y=n.y+e.top,n.scaleX=n.scaleX*i,n.scaleY=n.scaleY*o,r=lM(r)}return n}function KM(e,t=FP(e)){const n=Math.round(t.width),r=Math.round(t.height);if(VP(e))return{x:n/e.offsetWidth,y:r/e.offsetHeight};const i=VM(e,!0);return{x:(parseFloat(i.width)||n)/n,y:(parseFloat(i.height)||r)/r}}function XM(e){if("none"===e)return null;const[t,n,r="0"]=e.split(" "),i={x:parseFloat(t),y:parseFloat(n),z:parseInt(r,10)};return isNaN(i.x)&&isNaN(i.y)?null:{x:isNaN(i.x)?0:i.x,y:isNaN(i.y)?0:i.y,z:isNaN(i.z)?0:i.z}}function JM(e){var t,n,r,i,o,a,s,l,u;const{scale:c,transform:d,translate:p}=e,f=function(e){if("none"===e)return null;const t=e.split(" "),n=parseFloat(t[0]),r=parseFloat(t[1]);return isNaN(n)&&isNaN(r)?null:{x:isNaN(n)?r:n,y:isNaN(r)?n:r}}(c),h=XM(p),m=function(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(d);if(!m&&!f&&!h)return null;const g=null!=(t=null==f?void 0:f.x)?t:1,v=null!=(n=null==f?void 0:f.y)?n:1,y=null!=(r=null==h?void 0:h.x)?r:0,b=null!=(i=null==h?void 0:h.y)?i:0,x=null!=(o=null==m?void 0:m.x)?o:0,S=null!=(a=null==m?void 0:m.y)?a:0,w=null!=(s=null==m?void 0:m.scaleX)?s:1,C=null!=(l=null==m?void 0:m.scaleY)?l:1;return{x:y+x,y:b+S,z:null!=(u=null==h?void 0:h.z)?u:0,scaleX:g*w,scaleY:v*C}}var ZM=(e=>(e[e.Idle=0]="Idle",e[e.Forward=1]="Forward",e[e.Reverse=-1]="Reverse",e))(ZM||{}),QM={x:.2,y:.2},eL={x:10,y:10};function tL(e,t,n,r=25,i=QM,o=eL){const{x:a,y:s}=t,{rect:l,isTop:u,isBottom:c,isLeft:d,isRight:p}=jM(e),f=YM(e),h=JM(VM(e,!0)),m=null!==h&&(null==h?void 0:h.scaleX)<0,g=null!==h&&(null==h?void 0:h.scaleY)<0,v=new aD(l.left*f.scaleX+f.x,l.top*f.scaleY+f.y,l.width*f.scaleX,l.height*f.scaleY),y={x:0,y:0},b={x:0,y:0},x=v.height*i.y,S=v.width*i.x;return(!u||g&&!c)&&s<=v.top+x&&1!==(null==n?void 0:n.y)&&a>=v.left-o.x&&a<=v.right+o.x?(y.y=g?1:-1,b.y=r*Math.abs((v.top+x-s)/x)):(!c||g&&!u)&&s>=v.bottom-x&&-1!==(null==n?void 0:n.y)&&a>=v.left-o.x&&a<=v.right+o.x&&(y.y=g?-1:1,b.y=r*Math.abs((v.bottom-x-s)/x)),(!p||m&&!d)&&a>=v.right-S&&-1!==(null==n?void 0:n.x)&&s>=v.top-o.y&&s<=v.bottom+o.y?(y.x=m?-1:1,b.x=r*Math.abs((v.right-S-a)/S)):(!d||m&&!p)&&a<=v.left+S&&1!==(null==n?void 0:n.x)&&s>=v.top-o.y&&s<=v.bottom+o.y&&(y.x=m?1:-1,b.x=r*Math.abs((v.left+S-a)/S)),{direction:y,speed:b}}function nL(e,t=!1){if("scrollIntoViewIfNeeded"in(n=e)&&"function"==typeof n.scrollIntoViewIfNeeded)return void e.scrollIntoViewIfNeeded(t);var n;if(!VP(e))return e.scrollIntoView();var r=function(e){const[t]=UM(e,{limit:1});return null!=t?t:null}(e);if(!VP(r))return;const i=VM(r,!0),o=parseInt(i.getPropertyValue("border-top-width")),a=parseInt(i.getPropertyValue("border-left-width")),s=e.offsetTop-r.offsetTop<r.scrollTop,l=e.offsetTop-r.offsetTop+e.clientHeight-o>r.scrollTop+r.clientHeight,u=e.offsetLeft-r.offsetLeft<r.scrollLeft,c=e.offsetLeft-r.offsetLeft+e.clientWidth-a>r.scrollLeft+r.clientWidth,d=s&&!l;(s||l)&&t&&(r.scrollTop=e.offsetTop-r.offsetTop-r.clientHeight/2-o+e.clientHeight/2),(u||c)&&t&&(r.scrollLeft=e.offsetLeft-r.offsetLeft-r.clientWidth/2-a+e.clientWidth/2),(s||l||u||c)&&!t&&e.scrollIntoView(d)}function rL({element:e,keyframes:t,options:n}){return e.animate(t,n).finished}function iL(e,t=VM(e).translate,n=!0){if(n){const t=_P(e,e=>"translate"in e);if(t){const{translate:e=""}=t[0];if("string"==typeof e){const t=XM(e);if(t)return t}}}if(t){const e=XM(t);if(e)return e}return{x:0,y:0,z:0}}var oL=new FM(e=>setTimeout(e,0)),aL=new Map,sL=aL.clear.bind(aL);function lL(e,t){const n=function(e){const t=e.ownerDocument;let n=aL.get(t);if(n)return n;n=t.getAnimations(),aL.set(t,n),oL.schedule(sL);const r=n.filter(t=>jP(t.effect)&&t.effect.target===e);return aL.set(e,r),n}(e).filter(e=>{var n,r;if(jP(e.effect)){const{target:i}=e.effect;if(null==(r=i&&(null==(n=t.isValidTarget)?void 0:n.call(t,i)))||r)return e.effect.getKeyframes().some(e=>{for(const n of t.properties)if(e[n])return!0})}}).map(e=>{const{effect:t,currentTime:n}=e,r=null==t?void 0:t.getComputedTiming().duration;if(!e.pending&&"finished"!==e.playState)return"number"==typeof r&&"number"==typeof n&&n<r?(e.currentTime=r,()=>{e.currentTime=n}):void 0});if(n.length>0)return()=>n.forEach(e=>null==e?void 0:e())}var uL=class extends aD{constructor(e,t={}){var n,r,i,o;const{frameTransform:a=YM(e),ignoreTransforms:s,getBoundingClientRect:l=FP}=t,u=lL(e,{properties:["transform","translate","scale","width","height"],isValidTarget:t=>(t!==e||ZP())&&t.contains(e)}),c=l(e);let d,{top:p,left:f,width:h,height:m}=c;const g=VM(e),v=JM(g),y={x:null!=(n=null==v?void 0:v.scaleX)?n:1,y:null!=(r=null==v?void 0:v.scaleY)?r:1},b=function(e,t){var n;const r=e.getAnimations();let i=null;if(!r.length)return null;for(const e of r){if("running"!==e.playState)continue;const r=jP(e.effect)?e.effect.getKeyframes():[],o=r[r.length-1];if(!o)continue;const{transform:a,translate:s,scale:l}=o;if(a||s||l){const e=JM({transform:"string"==typeof a&&a?a:t.transform,translate:"string"==typeof s&&s?s:t.translate,scale:"string"==typeof l&&l?l:t.scale});e&&(i=i?{x:i.x+e.x,y:i.y+e.y,z:null!=(n=i.z)?n:e.z,scaleX:i.scaleX*e.scaleX,scaleY:i.scaleY*e.scaleY}:e)}}return i}(e,g);null==u||u(),v&&(d=function(e,t,n){const{scaleX:r,scaleY:i,x:o,y:a}=t,s=e.left-o-(1-r)*parseFloat(n),l=e.top-a-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),u=r?e.width/r:e.width,c=i?e.height/i:e.height;return{width:u,height:c,top:l,right:s+u,bottom:l+c,left:s}}(c,v,g.transformOrigin),(s||b)&&(p=d.top,f=d.left,h=d.width,m=d.height));const x={width:null!=(i=null==d?void 0:d.width)?i:h,height:null!=(o=null==d?void 0:d.height)?o:m};if(b&&!s&&d){const e=function(e,t,n){const{scaleX:r,scaleY:i,x:o,y:a}=t,s=e.left+o+(1-r)*parseFloat(n),l=e.top+a+(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),u=r?e.width*r:e.width,c=i?e.height*i:e.height;return{width:u,height:c,top:l,right:s+u,bottom:l+c,left:s}}(d,b,g.transformOrigin);p=e.top,f=e.left,h=e.width,m=e.height,y.x=b.scaleX,y.y=b.scaleY}a&&(s||(f*=a.scaleX,h*=a.scaleX,p*=a.scaleY,m*=a.scaleY),f+=a.x,p+=a.y),super(f,p,h,m),this.scale=y,this.intrinsicWidth=x.width,this.intrinsicHeight=x.height}};function cL(e){return"style"in e&&"object"==typeof e.style&&null!==e.style&&"setProperty"in e.style&&"removeProperty"in e.style&&"function"==typeof e.style.setProperty&&"function"==typeof e.style.removeProperty}var dL=class{constructor(e){this.element=e,this.initial=new Map}set(e,t=""){const{element:n}=this;if(cL(n))for(const[r,i]of Object.entries(e)){const e=`${t}${r}`;this.initial.has(e)||this.initial.set(e,n.style.getPropertyValue(e)),n.style.setProperty(e,"string"==typeof i?i:`${i}px`)}}remove(e,t=""){const{element:n}=this;if(cL(n))for(const r of e){const e=`${t}${r}`;n.style.removeProperty(e)}}reset(){const{element:e}=this;if(cL(e)){for(const[t,n]of this.initial)e.style.setProperty(t,n);""===e.getAttribute("style")&&e.removeAttribute("style")}}};function pL(e){return!!e&&(e instanceof $P(e).Element||WP(e)&&e.nodeType===Node.ELEMENT_NODE)}function fL(e){if(!e)return!1;const{KeyboardEvent:t}=$P(e.target);return e instanceof t}var hL={};function mL(e){const t=null==hL[e]?0:hL[e]+1;return hL[e]=t,`${e}-${t}`}var gL=e=>{var t;return null!=(t=(({dragOperation:e,droppable:t})=>{const n=e.position.current;if(!n)return null;const{id:r}=t;if(!t.shape)return null;if(t.shape.containsPoint(n))return{id:r,value:1/oD.distance(t.shape.center,n),type:gR.PointerIntersection,priority:mR.High};return null})(e))?t:(({dragOperation:e,droppable:t})=>{const{shape:n}=e;if(!t.shape||!(null==n?void 0:n.current))return null;const r=n.current.intersectionArea(t.shape);if(r){const{position:i}=e,o=oD.distance(t.shape.center,i.current),a=r/(n.current.area+t.shape.area-r)/o;return{id:t.id,value:a,type:gR.ShapeIntersection,priority:mR.Normal}}return null})(e)},vL=e=>{const{dragOperation:t,droppable:n}=e,{shape:r,position:i}=t;if(!n.shape)return null;const o=r?aD.from(r.current.boundingRectangle).corners:void 0,a=aD.from(n.shape.boundingRectangle).corners.reduce((e,t,n)=>{var r;return e+oD.distance(oD.from(t),null!=(r=null==o?void 0:o[n])?r:i.current)},0),s=a/4;return{id:n.id,value:1/s,type:gR.Collision,priority:mR.Normal}},yL=Object.create,bL=Object.defineProperty,xL=Object.defineProperties,SL=Object.getOwnPropertyDescriptor,wL=Object.getOwnPropertyDescriptors,CL=Object.getOwnPropertySymbols,EL=Object.prototype.hasOwnProperty,IL=Object.prototype.propertyIsEnumerable,DL=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),RL=e=>{throw TypeError(e)},PL=(e,t,n)=>t in e?bL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ML=(e,t)=>{for(var n in t||(t={}))EL.call(t,n)&&PL(e,n,t[n]);if(CL)for(var n of CL(t))IL.call(t,n)&&PL(e,n,t[n]);return e},LL=(e,t)=>xL(e,wL(t)),AL=(e,t)=>bL(e,"name",{value:t,configurable:!0}),kL=(e,t)=>{var n={};for(var r in e)EL.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&CL)for(var r of CL(e))t.indexOf(r)<0&&IL.call(e,r)&&(n[r]=e[r]);return n},OL=e=>{var t;return[,,,yL(null!=(t=null==e?void 0:e[DL("metadata")])?t:null)]},qL=["class","method","getter","setter","accessor","field","value","get","set"],TL=e=>void 0!==e&&"function"!=typeof e?RL("Function expected"):e,NL=(e,t,n,r,i)=>({kind:qL[e],name:t,metadata:r,addInitializer:e=>n._?RL("Already initialized"):i.push(TL(e||null))}),jL=(e,t)=>PL(t,DL("metadata"),e[3]),_L=(e,t,n,r)=>{for(var i=0,o=e[t>>1],a=o&&o.length;i<a;i++)1&t?o[i].call(n):r=o[i].call(n,r);return r},FL=(e,t,n,r,i,o)=>{var a,s,l,u,c,d=7&t,p=!!(8&t),f=!!(16&t),h=d>3?e.length+1:d?p?1:2:0,m=qL[d+5],g=d>3&&(e[h-1]=[]),v=e[h]||(e[h]=[]),y=d&&(!f&&!p&&(i=i.prototype),d<5&&(d>3||!f)&&SL(d<4?i:{get[n](){return $L(this,o)},set[n](e){return VL(this,o,e)}},n));d?f&&d<4&&AL(o,(d>2?"set ":d>1?"get ":"")+n):AL(i,n);for(var b=r.length-1;b>=0;b--)u=NL(d,n,l={},e[3],v),d&&(u.static=p,u.private=f,c=u.access={has:f?e=>WL(i,e):e=>n in e},3^d&&(c.get=f?e=>(1^d?$L:BL)(e,i,4^d?o:y.get):e=>e[n]),d>2&&(c.set=f?(e,t)=>VL(e,i,t,4^d?o:y.set):(e,t)=>e[n]=t)),s=(0,r[b])(d?d<4?f?o:y[m]:d>4?void 0:{get:y.get,set:y.set}:i,u),l._=1,4^d||void 0===s?TL(s)&&(d>4?g.unshift(s):d?f?o=s:y[m]=s:i=s):"object"!=typeof s||null===s?RL("Object expected"):(TL(a=s.get)&&(y.get=a),TL(a=s.set)&&(y.set=a),TL(a=s.init)&&g.unshift(a));return d||jL(e,i),y&&bL(i,n,y),f?4^d?o:y:i},zL=(e,t,n)=>t.has(e)||RL("Cannot "+n),WL=(e,t)=>Object(t)!==t?RL('Cannot use the "in" operator on this value'):e.has(t),$L=(e,t,n)=>(zL(e,t,"read from private field"),n?n.call(e):t.get(e)),HL=(e,t,n)=>t.has(e)?RL("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),VL=(e,t,n,r)=>(zL(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),BL=(e,t,n)=>(zL(e,t,"access private method"),n),GL="button",UL="draggable",YL="dnd-kit-description",KL="dnd-kit-announcement",XL={draggable:"To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item in a given direction. Press space again to drop the item in its new position, or press escape to cancel."},JL={dragstart({operation:{source:e}}){if(e)return`Picked up draggable item ${e.id}.`},dragover({operation:{source:e,target:t}}){if(e&&e.id!==(null==t?void 0:t.id))return t?`Draggable item ${e.id} was moved over droppable target ${t.id}.`:`Draggable item ${e.id} is no longer over a droppable target.`},dragend({operation:{source:e,target:t},canceled:n}){if(e)return n?`Dragging was cancelled. Draggable item ${e.id} was dropped.`:t?`Draggable item ${e.id} was dropped over droppable target ${t.id}`:`Draggable item ${e.id} was dropped.`}};function ZL(e){const t=e.tagName.toLowerCase();return["input","select","textarea","a","button"].includes(t)}var QL=["dragover","dragmove"];var eA,tA,nA,rA,iA,oA,aA,sA,lA,uA,cA,dA,pA,fA=new Map,hA=class extends(iA=KD,rA=[kI],nA=[OI],tA=[OI],eA=[OI],iA){constructor(e){super(e),_L(aA,5,this),HL(this,lA),HL(this,oA,new Set),HL(this,sA,_L(aA,8,this,new Set)),_L(aA,11,this),this.registerEffect(BL(this,lA,uA))}register(e){return $L(this,oA).add(e),()=>{$L(this,oA).delete(e)}}addRoot(e){return xE(()=>{const t=new Set(this.additionalRoots);t.add(e),this.additionalRoots=t}),()=>{xE(()=>{const t=new Set(this.additionalRoots);t.delete(e),this.additionalRoots=t})}}get sourceRoot(){var e;const{source:t}=this.manager.dragOperation;return tM(null!=(e=null==t?void 0:t.element)?e:null)}get targetRoot(){var e;const{target:t}=this.manager.dragOperation;return tM(null!=(e=null==t?void 0:t.element)?e:null)}get roots(){const{status:e}=this.manager.dragOperation;if(e.initializing||e.initialized){const e=[this.sourceRoot,this.targetRoot].filter(e=>null!=e);return new Set([...e,...this.additionalRoots])}return new Set}};aA=OL(iA),oA=new WeakMap,sA=new WeakMap,lA=new WeakSet,uA=function(){const{roots:e}=this,t=[];for(const n of e)for(const e of $L(this,oA))t.push(BL(this,lA,cA).call(this,n,e));return()=>{for(const e of t)e()}},cA=function(e,t){let n=fA.get(e);n||(n=new Map,fA.set(e,n));let r=n.get(t);if(!r){const i=HP(e)?BL(this,lA,dA).call(this,e,n,t):BL(this,lA,pA).call(this,e,n,t);if(!i)return()=>{};r=i,n.set(t,r)}r.refCount++;let i=!1;return()=>{i||(i=!0,r.refCount--,0===r.refCount&&r.cleanup())}},dA=function(e,t,n){const r=e.createElement("style");r.textContent=n,e.head.prepend(r);const i=new MutationObserver(t=>{for(const n of t)for(const t of Array.from(n.removedNodes))if(t===r)return void e.head.prepend(r)});return i.observe(e.head,{childList:!0}),{refCount:0,cleanup:()=>{i.disconnect(),r.remove(),t.delete(n),0===t.size&&fA.delete(e)}}},pA=function(e,t,n){!("adoptedStyleSheets"in e)||Array.isArray(e.adoptedStyleSheets);const r=e.ownerDocument.defaultView,{CSSStyleSheet:i}=null!=r?r:{};if(!i)return null;const o=new i;return o.replaceSync(n),e.adoptedStyleSheets.push(o),{refCount:0,cleanup:()=>{var r;if(eM(e)&&(null==(r=e.host)?void 0:r.isConnected)){const t=e.adoptedStyleSheets.indexOf(o);-1!==t&&e.adoptedStyleSheets.splice(t,1)}t.delete(n),0===t.size&&fA.delete(e)}}},FL(aA,4,"additionalRoots",rA,hA,sA),FL(aA,2,"sourceRoot",nA,hA),FL(aA,2,"targetRoot",tA,hA),FL(aA,2,"roots",eA,hA),jL(aA,hA);var mA="data-dnd-",gA=`${mA}dropping`,vA="--dnd-",yA=`${mA}dragging`,bA=`${mA}placeholder`,xA=[yA,bA,"popover","aria-pressed","aria-grabbing"],SA=["view-transition-name"],wA=`\n :is(:root,:host) [${yA}] {\n position: fixed !important;\n pointer-events: none !important;\n touch-action: none;\n z-index: calc(infinity);\n will-change: translate;\n top: var(${vA}top, 0px) !important;\n left: var(${vA}left, 0px) !important;\n right: unset !important;\n bottom: unset !important;\n width: var(${vA}width, auto);\n max-width: var(${vA}width, auto);\n height: var(${vA}height, auto);\n max-height: var(${vA}height, auto);\n transition: var(${vA}transition) !important;\n }\n\n :is(:root,:host) [${bA}] {\n transition: none;\n }\n\n :is(:root,:host) [${bA}='hidden'] {\n visibility: hidden;\n }\n\n [${yA}] * {\n pointer-events: none !important;\n }\n\n [${yA}]:not([${gA}]) {\n translate: var(${vA}translate) !important;\n }\n\n [${yA}][style*='${vA}scale'] {\n scale: var(${vA}scale) !important;\n transform-origin: var(${vA}transform-origin) !important;\n }\n\n @layer dnd-kit {\n :where([${yA}][popover]) {\n overflow: visible;\n background: unset;\n border: unset;\n margin: unset;\n padding: unset;\n color: inherit;\n\n &:is(input, button) {\n border: revert;\n background: revert;\n }\n }\n }\n [${yA}]::backdrop, [${mA}overlay]:not([${yA}]) {\n display: none;\n visibility: hidden;\n }\n`.replace(/\n+/g," ").replace(/\s+/g," ").trim();function CA(e,t="hidden"){return xE(()=>{const{element:n,manager:r}=e;if(!n||!r)return;const i=function(e,t){const n=new Map;for(const r of t)if(r.element&&(e===r.element||e.contains(r.element))){const e=`${mA}${mL("dom-id")}`;r.element.setAttribute(e,""),n.set(r,e)}return n}(n,r.registry.droppables),o=[],a=function(e){const t="input, textarea, select, canvas, [contenteditable]",n=e.cloneNode(!0),r=Array.from(e.querySelectorAll(t));return Array.from(n.querySelectorAll(t)).forEach((e,t)=>{const n=r[t];if(rM(e)&&rM(n)&&("file"!==e.type&&(e.value=n.value),"radio"===e.type&&e.name&&(e.name=`Cloned__${e.name}`)),iM(e)&&iM(n)&&n.width>0&&n.height>0){const t=e.getContext("2d");null==t||t.drawImage(n,0,0)}}),n}(n),{remove:s}=a;return function(e,t,n){for(const[r,i]of e){if(!r.element)continue;const e=`[${i}]`,o=t.matches(e)?t:t.querySelector(e);if(r.element.removeAttribute(i),!o)continue;const a=r.element;r.proxy=o,o.removeAttribute(i),aM.set(a,o),n.push(()=>{aM.delete(a),r.proxy=void 0})}}(i,a,o),function(e,t="hidden"){e.setAttribute("inert","true"),e.setAttribute("tab-index","-1"),e.setAttribute("aria-hidden","true"),e.setAttribute(bA,t)}(a,t),a.remove=()=>{o.forEach(e=>e()),s.call(a)},a})}function EA(e,t){return e===t||lM(e)===lM(t)}function IA(e){const{target:t}=e;"newState"in e&&"closed"===e.newState&&pL(t)&&t.hasAttribute("popover")&&requestAnimationFrame(()=>TM(t))}function DA(e){return"TR"===e.tagName}var RA,PA,MA,LA,AA,kA,OA,qA=250,TA="ease";var NA=class extends(PA=UD,RA=[kI],PA){constructor(e,t){super(e,t),HL(this,AA),HL(this,LA,_L(MA,8,this)),_L(MA,11,this),this.state={initial:{},current:{}};const n=e.registry.plugins.get(hA),r=null==n?void 0:n.register(wA);if(r){const e=this.destroy.bind(this);this.destroy=()=>{r(),e()}}this.registerEffect(BL(this,AA,kA).bind(this,n)),this.registerEffect(BL(this,AA,OA))}};MA=OL(PA),LA=new WeakMap,AA=new WeakSet,kA=function(e){const{overlay:t}=this;if(!t||!e)return;const n=tM(t);return n?e.addRoot(n):void 0},OA=function(){var e,t,n;const{state:r,manager:i,options:o}=this,{dragOperation:a}=i,{position:s,source:l,status:u}=a;if(u.idle)return r.current={},void(r.initial={});if(!l)return;const{element:c,feedback:d}=l;if(!c||"none"===d||!u.initialized||u.initializing)return;const{initial:p}=r,f=null!=(e=this.overlay)?e:c,h=YM(f),m=YM(c),g=!EA(c,f),v=new uL(c,{frameTransform:g?m:null,ignoreTransforms:!g}),y=m.scaleX/h.scaleX,b=m.scaleY/h.scaleY;let{width:x,height:S,top:w,left:C}=v;g&&(x/=y,S/=b);const E=new dL(f),{transition:I,translate:D,boxSizing:R,paddingBlockStart:P,paddingBlockEnd:M,paddingInlineStart:L,paddingInlineEnd:A,borderInlineStartWidth:k,borderInlineEndWidth:O,borderBlockStartWidth:q,borderBlockEndWidth:T}=VM(c),N="clone"===d,j="content-box"===R,_=j?parseInt(L)+parseInt(A)+parseInt(k)+parseInt(O):0,F=j?parseInt(P)+parseInt(M)+parseInt(q)+parseInt(T):0,z="move"===d||this.overlay?null:CA(l,N?"clone":"hidden"),W=xE(()=>fL(i.dragOperation.activatorEvent));if("none"!==D){const e=XM(D);e&&!p.translate&&(p.translate=e)}if(!p.transformOrigin){const e=xE(()=>s.current);p.transformOrigin={x:(e.x-C*h.scaleX-h.x)/(x*h.scaleX),y:(e.y-w*h.scaleY-h.y)/(S*h.scaleY)}}const{transformOrigin:$}=p,H=w*h.scaleY+h.y,V=C*h.scaleX+h.x;if(!p.coordinates&&(p.coordinates={x:V,y:H},1!==y||1!==b)){const{scaleX:e,scaleY:t}=m,{x:n,y:r}=$;p.coordinates.x+=(x*e-x)*n,p.coordinates.y+=(S*t-S)*r}p.dimensions||(p.dimensions={width:x,height:S}),p.frameTransform||(p.frameTransform=h);const B=p.coordinates.x-V,G=p.coordinates.y-H,U=(p.dimensions.width*p.frameTransform.scaleX-x*h.scaleX)*$.x,Y=(p.dimensions.height*p.frameTransform.scaleY-S*h.scaleY)*$.y,K={x:B/h.scaleX+U,y:G/h.scaleY+Y},X=C+K.x,J=w+K.y;f.setAttribute(yA,"true");const Z=xE(()=>a.transform),Q=null!=(t=p.translate)?t:{x:0,y:0},ee=Z.x*h.scaleX+Q.x,te=Z.y*h.scaleY+Q.y,ne=QP();if(E.set({width:x-_,height:S-F,top:J+ne.y,left:X+ne.x,translate:`${ee}px ${te}px 0`,transition:I?`${I}, translate 0ms linear`:"",scale:g?`${y} ${b}`:"","transform-origin":`${100*$.x}% ${100*$.y}%`},vA),z&&(c.insertAdjacentElement("afterend",z),null==o?void 0:o.rootElement)){("function"==typeof o.rootElement?o.rootElement(l):o.rootElement).appendChild(c)}let re,ie,oe;qM(f)&&(f.hasAttribute("popover")||f.setAttribute("popover","manual"),TM(f),f.addEventListener("beforetoggle",IA));const ae=(se={placeholder:z,element:c,feedbackElement:f,frameTransform:h,transformOrigin:$,width:x,height:S,top:w,left:C,widthOffset:_,heightOffset:F,delta:K,styles:E,dragOperation:a,getElementMutationObserver:()=>re,getSavedCellWidths:()=>oe,setSavedCellWidths:e=>{oe=e}},new ResizeObserver(()=>{var e,t;const n=new uL(se.placeholder,{frameTransform:se.frameTransform,ignoreTransforms:!0}),r=null!=(e=se.transformOrigin)?e:{x:1,y:1},i=(se.width-n.width)*r.x+se.delta.x,o=(se.height-n.height)*r.y+se.delta.y,a=QP();if(se.styles.set({width:n.width-se.widthOffset,height:n.height-se.heightOffset,top:se.top+o+a.y,left:se.left+i+a.x},vA),null==(t=se.getElementMutationObserver())||t.takeRecords(),DA(se.element)&&DA(se.placeholder)){const e=Array.from(se.element.cells),t=Array.from(se.placeholder.cells);se.getSavedCellWidths()||se.setSavedCellWidths(e.map(e=>e.style.width));for(const[n,r]of e.entries()){const e=t[n];r.style.width=`${e.getBoundingClientRect().width}px`}}se.dragOperation.shape=new uL(se.feedbackElement)}));var se;const le=new uL(f);xE(()=>a.shape=le);const ue=$P(f),ce=e=>{this.manager.actions.stop({event:e})},de=nM(ue);W&&ue.addEventListener("resize",ce),"idle"===xE(()=>l.status)&&requestAnimationFrame(()=>l.status="dragging"),z&&(ae.observe(z),re=function(e,t,n){const r=new MutationObserver(r=>{let i=!1;for(const n of r){if(n.target!==e){i=!0;continue}if("attributes"!==n.type)continue;const r=n.attributeName;if(r.startsWith("aria-")||xA.includes(r))continue;const o=e.getAttribute(r);if("style"===r){if(cL(e)&&cL(t)){const n=e.style;for(const e of Array.from(t.style))""===n.getPropertyValue(e)&&t.style.removeProperty(e);for(const e of Array.from(n)){if(SA.includes(e)||e.startsWith(vA))continue;const r=n.getPropertyValue(e);t.style.setProperty(e,r)}}}else null!==o?t.setAttribute(r,o):t.removeAttribute(r)}i&&n&&(t.innerHTML=e.innerHTML)});return r.observe(e,{attributes:!0,subtree:!0,childList:!0}),r}(c,z,N),ie=function(e,t,n){const r=new MutationObserver(r=>{for(const i of r)if(0!==i.addedNodes.length)for(const r of Array.from(i.addedNodes)){if(r.contains(e)&&e.nextElementSibling!==t)return e.insertAdjacentElement("afterend",t),void TM(n);if(r.contains(t)&&t.previousElementSibling!==e)return t.insertAdjacentElement("beforebegin",e),void TM(n)}});return r.observe(e.ownerDocument.body,{childList:!0,subtree:!0}),r}(c,z,f));const pe=null==(n=i.dragOperation.source)?void 0:n.id,fe=()=>{var e;if(!W||null==pe)return;const t=i.registry.draggables.get(pe),n=null!=(e=null==t?void 0:t.handle)?e:null==t?void 0:t.element;VP(n)&&n.focus()},he=()=>{var e;if(null==re||re.disconnect(),null==ie||ie.disconnect(),ae.disconnect(),ue.removeEventListener("resize",ce),qM(f)&&(f.removeEventListener("beforetoggle",IA),f.removeAttribute("popover")),f.removeAttribute(yA),E.reset(),oe&&DA(c)){const t=Array.from(c.cells);for(const[n,r]of t.entries())r.style.width=null!=(e=oe[n])?e:""}l.status="idle";const t=null!=r.current.translate;z&&(t||z.parentElement!==f.parentElement)&&f.isConnected&&z.replaceWith(f),null==z||z.remove()},me=null==o?void 0:o.dropAnimation,ge=this,ve=TI(()=>{var e;const{transform:t,status:n}=a;if((t.x||t.y||r.current.translate)&&n.dragging){const n=null!=(e=p.translate)?e:{x:0,y:0},i={x:t.x/h.scaleX+n.x,y:t.y/h.scaleY+n.y},o=r.current.translate,s=xE(()=>a.modifiers),l=xE(()=>{var e;return null==(e=a.shape)?void 0:e.current}),u=W&&!de?"250ms cubic-bezier(0.25, 1, 0.5, 1)":"0ms linear";if(E.set({transition:`${I}, translate ${u}`,translate:`${i.x}px ${i.y}px 0`},vA),null==re||re.takeRecords(),l&&l!==le&&o&&!s.length){const e=oD.delta(i,o);a.shape=aD.from(l.boundingRectangle).translate(e.x*h.scaleX,e.y*h.scaleY)}else a.shape=new uL(f);r.current.translate=i}},function(){if(a.status.dropped){this.dispose(),l.status="dropping";const e=void 0!==ge.dropAnimation?ge.dropAnimation:me;let t=r.current.translate;const n=null!=t;if(t||c===f||(t={x:0,y:0}),!t||null===e)return void he();i.renderer.rendering.then(()=>{!function(e){var t,n,r,i;const{animation:o}=e;if("function"==typeof o){const t=o({element:e.element,feedbackElement:e.feedbackElement,placeholder:e.placeholder,translate:e.translate,moved:e.moved});return void Promise.resolve(t).then(()=>{e.cleanup(),requestAnimationFrame(e.restoreFocus)})}const{duration:a=qA,easing:s=TA}=null!=o?o:{};TM(e.feedbackElement);const[,l]=null!=(t=_P(e.feedbackElement,e=>"translate"in e))?t:[];null==l||l.pause();const u=null!=(n=e.placeholder)?n:e.element,c={frameTransform:EA(e.feedbackElement,u)?null:void 0},d=new uL(e.feedbackElement,c),p=null!=(r=XM(VM(e.feedbackElement).translate))?r:e.translate,f=new uL(u,c),h=aD.delta(d,f,e.alignment),m=p.x-h.x,g=p.y-h.y,v=Math.round(d.intrinsicHeight)!==Math.round(f.intrinsicHeight)?{minHeight:[`${d.intrinsicHeight}px`,`${f.intrinsicHeight}px`],maxHeight:[`${d.intrinsicHeight}px`,`${f.intrinsicHeight}px`]}:{},y=Math.round(d.intrinsicWidth)!==Math.round(f.intrinsicWidth)?{minWidth:[`${d.intrinsicWidth}px`,`${f.intrinsicWidth}px`],maxWidth:[`${d.intrinsicWidth}px`,`${f.intrinsicWidth}px`]}:{};e.styles.set({transition:e.transition},vA),e.feedbackElement.setAttribute(gA,""),null==(i=e.getElementMutationObserver())||i.takeRecords(),rL({element:e.feedbackElement,keyframes:LL(ML(ML({},v),y),{translate:[`${p.x}px ${p.y}px 0`,`${m}px ${g}px 0`]}),options:{duration:nM($P(e.feedbackElement))?0:e.moved||e.feedbackElement!==e.element?a:0,easing:s}}).then(()=>{e.feedbackElement.removeAttribute(gA),null==l||l.finish(),e.cleanup(),requestAnimationFrame(e.restoreFocus)})}({element:c,feedbackElement:f,placeholder:z,translate:t,moved:n,transition:I,alignment:l.alignment,styles:E,animation:null!=e?e:void 0,getElementMutationObserver:()=>re,cleanup:he,restoreFocus:fe})})}});return()=>{he(),ve()}},FL(MA,4,"overlay",RA,NA,LA),jL(MA,NA),NA.configure=BD(NA);var jA,_A,FA,zA,WA,$A,HA,VA=NA,BA=!0;FA=[kI],zA=ZM.Forward,jA=[kI],_A=ZM.Reverse;var GA=class{constructor(){HL(this,$A,_L(WA,8,this,BA)),_L(WA,11,this),HL(this,HA,_L(WA,12,this,BA)),_L(WA,15,this)}isLocked(e){return e!==ZM.Idle&&(null==e?this[ZM.Forward]===BA&&this[ZM.Reverse]===BA:this[e]===BA)}unlock(e){e!==ZM.Idle&&(this[e]=false)}};WA=OL(null),$A=new WeakMap,HA=new WeakMap,FL(WA,4,zA,FA,GA,$A),FL(WA,4,_A,jA,GA,HA),jL(WA,GA);var UA,YA,KA,XA,JA,ZA,QA=[ZM.Forward,ZM.Reverse],ek=class{constructor(){this.x=new GA,this.y=new GA}isLocked(){return this.x.isLocked()&&this.y.isLocked()}},tk=class extends UD{constructor(e){super(e);const t=LE(new ek);let n=null;this.signal=t,zE(()=>{const{status:r}=e.dragOperation;if(!r.initialized)return n=null,void(t.value=new ek);const{delta:i}=e.dragOperation.position;if(n){const e={x:nk(i.x,n.x),y:nk(i.y,n.y)},r=t.peek();yE(()=>{for(const t of mD)for(const n of QA)e[t]===n&&r[t].unlock(n);t.value=r})}n=i})}get current(){return this.signal.peek()}};function nk(e,t){return Math.sign(e-t)}var rk=class extends(YA=KD,UA=[kI],YA){constructor(e){super(e),HL(this,XA,_L(KA,8,this,!1)),_L(KA,11,this),HL(this,JA),HL(this,ZA,()=>{if(!$L(this,JA))return;const{element:e,by:t}=$L(this,JA);t.y&&(e.scrollTop+=t.y),t.x&&(e.scrollLeft+=t.x)}),this.scroll=e=>{var t;if(this.disabled)return!1;const n=this.getScrollableElements();if(!n)return VL(this,JA,void 0),!1;const{position:r}=this.manager.dragOperation,i=null==r?void 0:r.current;if(i){const{by:r}=null!=e?e:{},o=r?{x:ik(r.x),y:ik(r.y)}:void 0,a=o?void 0:this.scrollIntentTracker.current;if(null==a?void 0:a.isLocked())return!1;for(const e of n){const n=_M(e,r);if(n.x||n.y){const{speed:n,direction:s}=tL(e,i,o);if(a)for(const e of mD)a[e].isLocked(s[e])&&(n[e]=0,s[e]=0);if(s.x||s.y){const{x:i,y:o}=null!=r?r:s,a=i*n.x,l=o*n.y;if(a||l){const n=null==(t=$L(this,JA))?void 0:t.by;if(this.autoScrolling&&n){if(n.x&&!a||n.y&&!l)continue}return VL(this,JA,{element:e,by:{x:a,y:l}}),zM.schedule($L(this,ZA)),!0}}}}}return VL(this,JA,void 0),!1};let t=null,n=null;const r=LI(()=>{const{position:n,source:r}=e.dragOperation;if(!n)return null;const i=oM(tM(null==r?void 0:r.element),n.current);return i&&(t=i),null!=i?i:t}),i=LI(()=>{const t=r.value,{documentElement:i}=GP(t);if(!t||t===i){const{target:t}=e.dragOperation,r=null==t?void 0:t.element;if(r){const e=UM(r,{excludeElement:!1});return n=e,e}}if(t){const e=UM(t,{excludeElement:!1});return this.autoScrolling&&n&&e.size<(null==n?void 0:n.size)?n:(n=e,e)}return n=null,null},AI);this.getScrollableElements=()=>i.value,this.scrollIntentTracker=new tk(e),this.destroy=e.monitor.addEventListener("dragmove",t=>{!this.disabled&&!t.defaultPrevented&&fL(e.dragOperation.activatorEvent)&&t.by&&this.scroll({by:t.by})&&t.preventDefault()})}};function ik(e){return e>0?ZM.Forward:e<0?ZM.Reverse:ZM.Idle}KA=OL(YA),XA=new WeakMap,JA=new WeakMap,ZA=new WeakMap,FL(KA,4,"autoScrolling",UA,rk,XA),jL(KA,rk);var ok,ak=new class{constructor(e){this.scheduler=e,this.pending=!1,this.tasks=new Set,this.resolvers=new Set,this.flush=()=>{const{tasks:e,resolvers:t}=this;this.pending=!1,this.tasks=new Set,this.resolvers=new Set;for(const t of e)t();for(const e of t)e()}}schedule(e){return this.tasks.add(e),this.pending||(this.pending=!0,this.scheduler(this.flush)),new Promise(e=>this.resolvers.add(e))}}(e=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(e):e()}),sk=class extends UD{constructor(e,t){super(e);const n=e.registry.plugins.get(rk);if(!n)throw new Error("AutoScroller plugin depends on Scroller plugin");this.destroy=zE(()=>{if(this.disabled)return;const{position:t,status:r}=e.dragOperation;if(r.dragging){if(n.scroll()){n.autoScrolling=!0;const e=setInterval(()=>ak.schedule(n.scroll),10);return()=>{clearInterval(e)}}n.autoScrolling=!1}})}},lk={capture:!0,passive:!0},uk=class extends KD{constructor(e){super(e),HL(this,ok),this.handleScroll=()=>{null==$L(this,ok)&&VL(this,ok,setTimeout(()=>{this.manager.collisionObserver.forceUpdate(!1),VL(this,ok,void 0)},50))};const{dragOperation:t}=this.manager;this.destroy=zE(()=>{var e,n,r;if(t.status.dragging){const i=null!=(r=null==(n=null==(e=t.source)?void 0:e.element)?void 0:n.ownerDocument)?r:document;return i.addEventListener("scroll",this.handleScroll,lk),()=>{i.removeEventListener("scroll",this.handleScroll,lk)}}})}};ok=new WeakMap;function ck(){var e;null==(e=document.getSelection())||e.removeAllRanges()}var dk,pk=Object.freeze({offset:10,keyboardCodes:{start:["Space","Enter"],cancel:["Escape"],end:["Space","Enter","Tab"],up:["ArrowUp"],down:["ArrowDown"],left:["ArrowLeft"],right:["ArrowRight"]},preventActivation(e,t){var n;const r=null!=(n=t.handle)?n:t.element;return e.target!==r}}),fk=class extends rP{constructor(e,t){super(e),this.manager=e,this.options=t,HL(this,dk,[]),this.listeners=new sM,this.handleSourceKeyDown=(e,t,n)=>{if(this.disabled||e.defaultPrevented)return;if(!pL(e.target))return;if(t.disabled)return;const{keyboardCodes:r=pk.keyboardCodes,preventActivation:i=pk.preventActivation}=null!=n?n:{};r.start.includes(e.code)&&this.manager.dragOperation.status.idle&&((null==i?void 0:i(e,t))||this.handleStart(e,t,n))}}bind(e,t=this.options){const n=zE(()=>{var n;const r=null!=(n=e.handle)?n:e.element,i=n=>{fL(n)&&this.handleSourceKeyDown(n,e,t)};if(r)return r.addEventListener("keydown",i),()=>{r.removeEventListener("keydown",i)}});return n}handleStart(e,t,n){const{element:r}=t;if(!r)throw new Error("Source draggable does not have an associated element");e.preventDefault(),e.stopImmediatePropagation(),nL(r);const{center:i}=new uL(r);if(this.manager.actions.start({event:e,coordinates:{x:i.x,y:i.y},source:t}).signal.aborted)return this.cleanup();this.sideEffects();const o=GP(r),a=[this.listeners.bind(o,[{type:"keydown",listener:e=>this.handleKeyDown(e,t,n),options:{capture:!0}}])];$L(this,dk).push(...a)}handleKeyDown(e,t,n){const{keyboardCodes:r=pk.keyboardCodes}=null!=n?n:{};if(gk(e,[...r.end,...r.cancel])){e.preventDefault();const t=gk(e,r.cancel);return void this.handleEnd(e,t)}gk(e,r.up)?this.handleMove("up",e):gk(e,r.down)&&this.handleMove("down",e),gk(e,r.left)?this.handleMove("left",e):gk(e,r.right)&&this.handleMove("right",e)}handleEnd(e,t){this.manager.actions.stop({event:e,canceled:t}),this.cleanup()}handleMove(e,t){var n,r;const{shape:i}=this.manager.dragOperation,o=t.shiftKey?5:1;let a={x:0,y:0},s=null!=(r=null==(n=this.options)?void 0:n.offset)?r:pk.offset;if("number"==typeof s&&(s={x:s,y:s}),i){switch(e){case"up":a={x:0,y:-s.y*o};break;case"down":a={x:0,y:s.y*o};break;case"left":a={x:-s.x*o,y:0};break;case"right":a={x:s.x*o,y:0}}(a.x||a.y)&&(t.preventDefault(),this.manager.actions.move({event:t,by:a}))}}sideEffects(){const e=this.manager.registry.plugins.get(sk);!1===(null==e?void 0:e.disabled)&&(e.disable(),$L(this,dk).push(()=>{e.enable()}))}cleanup(){$L(this,dk).forEach(e=>e()),VL(this,dk,[])}destroy(){this.cleanup(),this.listeners.clear()}};dk=new WeakMap,fk.configure=BD(fk),fk.defaults=pk;var hk,mk=fk;function gk(e,t){return t.includes(e.code)}var vk,yk;hk=new WeakMap;vk=new WeakMap,yk=new WeakMap;var bk=class{};bk.Delay=class extends oP{constructor(){super(...arguments),HL(this,vk),HL(this,yk)}onEvent(e){switch(e.type){case"pointerdown":VL(this,yk,KP(e)),VL(this,vk,setTimeout(()=>this.activate(e),this.options.value));break;case"pointermove":if(!$L(this,yk))return;const{x:t,y:n}=KP(e);uD({x:t-$L(this,yk).x,y:n-$L(this,yk).y},this.options.tolerance)&&this.abort();break;case"pointerup":this.abort()}}abort(){$L(this,vk)&&(clearTimeout($L(this,vk)),VL(this,yk,void 0),VL(this,vk,void 0))}},bk.Distance=class extends oP{constructor(){super(...arguments),HL(this,hk)}onEvent(e){switch(e.type){case"pointerdown":VL(this,hk,KP(e));break;case"pointermove":if(!$L(this,hk))return;const{x:t,y:n}=KP(e),r={x:t-$L(this,hk).x,y:n-$L(this,hk).y},{tolerance:i}=this.options;if(i&&uD(r,i))return void this.abort();uD(r,this.options.value)&&this.activate(e);break;case"pointerup":this.abort()}}abort(){VL(this,hk,void 0)}};var xk,Sk=Object.freeze({activationConstraints(e,t){var n;const{pointerType:r,target:i}=e;if("mouse"!==r||!pL(i)||t.handle!==i&&!(null==(n=t.handle)?void 0:n.contains(i)))return"touch"===r?[new bk.Delay({value:250,tolerance:5})]:function(e){if(!pL(e))return!1;const{tagName:t}=e;return"INPUT"===t||"TEXTAREA"===t||(n=e).hasAttribute("contenteditable")&&"false"!==n.getAttribute("contenteditable");var n}(i)&&!e.defaultPrevented?[new bk.Delay({value:200,tolerance:0})]:[new bk.Delay({value:200,tolerance:10}),new bk.Distance({value:5})]},preventActivation(e,t){var n;const{target:r}=e;return r!==t.element&&(r!==t.handle&&(!!pL(r)&&(!(null==(n=t.handle)?void 0:n.contains(r))&&Boolean(r.closest('\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n a[href],\n [contenteditable]:not([contenteditable="false"])\n ')))))}}),wk=class extends rP{constructor(e,t){super(e),this.manager=e,this.options=t,HL(this,xk,new Set),this.listeners=new sM,this.latest={event:void 0,coordinates:void 0},this.handleMove=()=>{const{event:e,coordinates:t}=this.latest;e&&t&&this.manager.actions.move({event:e,to:t})},this.handleCancel=this.handleCancel.bind(this),this.handlePointerUp=this.handlePointerUp.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}activationConstraints(e,t,n=this.options){const{activationConstraints:r=Sk.activationConstraints}=null!=n?n:{};return"function"==typeof r?r(e,t):r}bind(e,t=this.options){const n=zE(()=>{var n;const r=new AbortController,{signal:i}=r,o=n=>{(function(e){if(!e)return!1;const{PointerEvent:t}=$P(e.target);return e instanceof t})(n)&&this.handlePointerDown(n,e,t)};let a=[null!=(n=e.handle)?n:e.element];(null==t?void 0:t.activatorElements)&&(a=Array.isArray(t.activatorElements)?t.activatorElements:t.activatorElements(e));for(const e of a)e&&(Rk(e.ownerDocument.defaultView),e.addEventListener("pointerdown",o,{signal:i}));return()=>r.abort()});return n}handlePointerDown(e,t,n){if(this.disabled||!e.isPrimary||0!==e.button||!pL(e.target)||t.disabled||function(e){return"sensor"in e}(e)||!this.manager.dragOperation.status.idle)return;const{preventActivation:r=Sk.preventActivation}=null!=n?n:{};if(null==r?void 0:r(e,t))return;const{target:i}=e,o=VP(i)&&i.draggable&&"true"===i.getAttribute("draggable"),a=YM(t.element),{x:s,y:l}=KP(e);this.initialCoordinates={x:s*a.scaleX+a.x,y:l*a.scaleY+a.y};const u=this.activationConstraints(e,t,n);e.sensor=this;const c=new iP(u,e=>this.handleStart(t,e));c.signal.onabort=()=>this.handleCancel(e),c.onEvent(e),this.controller=c;const d=JP(),p=this.listeners.bind(d,[{type:"pointermove",listener:e=>this.handlePointerMove(e,t)},{type:"pointerup",listener:this.handlePointerUp,options:{capture:!0}},{type:"pointercancel",listener:this.handleCancel},{type:"dragstart",listener:o?this.handleCancel:Ek,options:{capture:!0}}]);$L(this,xk).add(()=>{p(),this.initialCoordinates=void 0})}handlePointerMove(e,t){var n,r;if(!1!==(null==(n=this.controller)?void 0:n.activated)){if(this.manager.dragOperation.status.dragging){const n=KP(e),r=YM(t.element);n.x=n.x*r.scaleX+r.x,n.y=n.y*r.scaleY+r.y,e.preventDefault(),e.stopPropagation(),this.latest.event=e,this.latest.coordinates=n,zM.schedule(this.handleMove)}}else null==(r=this.controller)||r.onEvent(e)}handlePointerUp(e){const{status:t}=this.manager.dragOperation;if(!t.idle){e.preventDefault(),e.stopPropagation();const n=!t.initialized;this.manager.actions.stop({event:e,canceled:n})}this.cleanup()}handleKeyDown(e){"Escape"===e.key&&(e.preventDefault(),this.handleCancel(e))}handleStart(e,t){const{manager:n,initialCoordinates:r}=this;if(!r||!n.dragOperation.status.idle)return;if(t.defaultPrevented)return;if(n.actions.start({coordinates:r,event:t,source:e}).signal.aborted)return this.cleanup();t.preventDefault();const i=GP(t.target).body;i.setPointerCapture(t.pointerId);const o=pL(t.target)?[t.target,i]:i,a=this.listeners.bind(o,[{type:"touchmove",listener:Ek,options:{passive:!1}},{type:"click",listener:Ek},{type:"contextmenu",listener:Ek},{type:"keydown",listener:this.handleKeyDown}]);$L(this,xk).add(a)}handleCancel(e){const{dragOperation:t}=this.manager;t.status.initialized&&this.manager.actions.stop({event:e,canceled:!0}),this.cleanup()}cleanup(){this.latest={event:void 0,coordinates:void 0},$L(this,xk).forEach(e=>e()),$L(this,xk).clear()}destroy(){this.cleanup(),this.listeners.clear()}};xk=new WeakMap,wk.configure=BD(wk),wk.defaults=Sk;var Ck=wk;function Ek(e){e.preventDefault()}function Ik(){}var Dk=new WeakSet;function Rk(e){e&&!Dk.has(e)&&(e.addEventListener("touchmove",Ik,{capture:!1,passive:!1}),Dk.add(e))}var Pk,Mk,Lk,Ak,kk,Ok,qk,Tk,Nk,jk,_k,Fk,zk,Wk,$k,Hk,Vk,Bk,Gk={modifiers:[],plugins:[class extends UD{constructor(e,t){super(e);const{id:n,idPrefix:{description:r=YL,announcement:i=KL}={},announcements:o=JL,screenReaderInstructions:a=XL,debounce:s=500}=null!=t?t:{},l=n?`${r}-${n}`:mL(r),u=n?`${i}-${n}`:mL(i);let c,d,p,f;const h=(e=f)=>{p&&e&&(null==p?void 0:p.nodeValue)!==e&&(p.nodeValue=e)},m=()=>zM.schedule(h),g=function(e,t){let n;const r=()=>{clearTimeout(n),n=setTimeout(e,t)};return r.cancel=()=>clearTimeout(n),r}(m,s),v=Object.entries(o).map(([e,t])=>this.manager.monitor.addEventListener(e,(n,r)=>{const i=p;if(!i)return;const o=null==t?void 0:t(n,r);o&&i.nodeValue!==o&&(f=o,QL.includes(e)?g():(m(),g.cancel()))})),y=()=>{let e=[];(null==c?void 0:c.isConnected)||(c=function(e,t){const n=document.createElement("div");return n.id=e,n.style.setProperty("display","none"),n.textContent=t,n}(l,a.draggable),e.push(c)),(null==d?void 0:d.isConnected)||(d=function(e){const t=document.createElement("div");return t.id=e,t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true"),t.style.setProperty("position","fixed"),t.style.setProperty("width","1px"),t.style.setProperty("height","1px"),t.style.setProperty("margin","-1px"),t.style.setProperty("border","0"),t.style.setProperty("padding","0"),t.style.setProperty("overflow","hidden"),t.style.setProperty("clip","rect(0 0 0 0)"),t.style.setProperty("clip-path","inset(100%)"),t.style.setProperty("white-space","nowrap"),t}(u),p=document.createTextNode(""),d.appendChild(p),e.push(d)),e.length>0&&document.body.append(...e)},b=new Set;function x(){for(const e of b)e()}this.registerEffect(()=>{var e;b.clear();for(const t of this.manager.registry.draggables.value){const n=null!=(e=t.handle)?e:t.element;if(n){c&&d||b.add(y),ZL(n)&&!ZP()||n.hasAttribute("tabindex")||b.add(()=>n.setAttribute("tabindex","0")),n.hasAttribute("role")||"button"===n.tagName.toLowerCase()||b.add(()=>n.setAttribute("role",GL)),n.hasAttribute("aria-roledescription")||b.add(()=>n.setAttribute("aria-roledescription",UL)),n.hasAttribute("aria-describedby")||b.add(()=>n.setAttribute("aria-describedby",l));for(const e of["aria-pressed","aria-grabbed"]){const r=String(t.isDragging);n.getAttribute(e)!==r&&b.add(()=>n.setAttribute(e,r))}const e=String(t.disabled);n.getAttribute("aria-disabled")!==e&&b.add(()=>n.setAttribute("aria-disabled",e))}}b.size>0&&zM.schedule(x)}),this.destroy=()=>{super.destroy(),null==c||c.remove(),null==d||d.remove(),v.forEach(e=>e())}}},sk,class extends UD{constructor(e,t){super(e,t),this.manager=e;const n=LI(()=>{var e;return GP(null==(e=this.manager.dragOperation.source)?void 0:e.element)});this.destroy=zE(()=>{var e;const{dragOperation:t}=this.manager,{cursor:r="grabbing",nonce:i}=null!=(e=this.options)?e:{};if(t.status.initialized){const e=n.value,t=e.createElement("style");return i&&t.setAttribute("nonce",i),t.textContent=`* { cursor: ${r} !important; }`,e.head.appendChild(t),()=>t.remove()}})}},VA,class extends UD{constructor(e,t){super(e,t),this.manager=e,this.destroy=zE(()=>{var e;const{dragOperation:t}=this.manager,{nonce:n}=null!=(e=this.options)?e:{};if(t.status.initialized){const e=document.createElement("style");return n&&e.setAttribute("nonce",n),e.textContent="* { user-select: none !important; -webkit-user-select: none !important; }",document.head.appendChild(e),ck(),document.addEventListener("selectionchange",ck,{capture:!0}),()=>{document.removeEventListener("selectionchange",ck,{capture:!0}),e.remove()}}})}}],sensors:[Ck,mk]},Uk=class extends LP{constructor(e={}){const t=MP(e.plugins,Gk.plugins),n=MP(e.sensors,Gk.sensors),r=MP(e.modifiers,Gk.modifiers);super(LL(ML({},e),{plugins:[uk,rk,hA,...t],sensors:n,modifiers:r}))}},Yk=class extends(Ak=eP,Lk=[kI],Mk=[kI],Pk=[kI],Ak){constructor(e,t){var n=e,{element:r,effects:i=()=>[],handle:o,feedback:a="default"}=n,s=kL(n,["element","effects","handle","feedback"]);super(ML({effects:()=>[...i(),()=>{var e,t;const{manager:n}=this;if(!n)return;const r=(null!=(t=null==(e=this.sensors)?void 0:e.map(GD))?t:[...n.sensors]).map(e=>{const t=e instanceof rP?e:n.registry.register(e.plugin),r=e instanceof rP?void 0:e.options;return t.bind(this,r)});return function(){r.forEach(e=>e())}}]},s),t),HL(this,Ok,_L(kk,8,this)),_L(kk,11,this),HL(this,qk,_L(kk,12,this)),_L(kk,15,this),HL(this,Tk,_L(kk,16,this)),_L(kk,19,this),this.element=r,this.handle=o,this.feedback=a}};kk=OL(Ak),Ok=new WeakMap,qk=new WeakMap,Tk=new WeakMap,FL(kk,4,"handle",Lk,Yk,Ok),FL(kk,4,"element",Mk,Yk,qk),FL(kk,4,"feedback",Pk,Yk,Tk),jL(kk,Yk);var Kk=class extends(_k=tP,jk=[kI],Nk=[kI],_k){constructor(e,t){var n=e,{element:r,effects:i=()=>[]}=n,o=kL(n,["element","effects"]);const{collisionDetector:a=gL}=o,s=e=>{const{manager:t,element:n}=this;if(!n||null===e)return void(this.shape=void 0);if(!t)return;const r=new uL(n),i=xE(()=>this.shape);return r&&(null==i?void 0:i.equals(r))?i:(this.shape=r,r)},l=LE(!1);super(LL(ML({},o),{collisionDetector:a,effects:()=>[...i(),()=>{const{element:e,manager:t}=this;if(!t)return;const{dragOperation:n}=t,{source:r}=n;l.value=Boolean(r&&n.status.initialized&&e&&!this.disabled&&this.accepts(r))},()=>{const{element:e}=this;if(l.value&&e){const t=new OM(e,s);return()=>{t.disconnect(),this.shape=void 0}}},()=>{var e;if(null==(e=this.manager)?void 0:e.dragOperation.status.initialized)return()=>{this.shape=void 0}}]}),t),HL(this,Vk),HL(this,zk,_L(Fk,8,this)),_L(Fk,11,this),HL(this,Bk,_L(Fk,12,this)),_L(Fk,15,this),this.element=r,this.refreshShape=()=>s()}set element(e){VL(this,Vk,e,Hk)}get element(){var e;return null!=(e=this.proxy)?e:$L(this,Vk,$k)}};function Xk(e){var t;if(null!=e)return function(e){return null!=e&&"object"==typeof e&&"current"in e}(e)?null!=(t=e.current)?t:void 0:e}Fk=OL(_k),zk=new WeakMap,Vk=new WeakSet,Bk=new WeakMap,Wk=FL(Fk,20,"#element",jk,Vk,zk),$k=Wk.get,Hk=Wk.set,FL(Fk,4,"proxy",Nk,Kk,Bk),jL(Fk,Kk);var Jk="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?g:d;function Zk(){const e=m(0)[1];return f(()=>{e(e=>e+1)},[e])}function Qk(e,t=[],n=!1){const r=l(e);return r.current=e,function(e,t=!1){const n=l(e.peek()),r=l(!1),i=Zk();return Jk(()=>zE(()=>{const o=n.current,a=e.value;if(o!==a){if(n.current=a,!r.current)return;t?D(i):i()}}),[e,t,i]),{get value(){return r.current=!0,e.peek()}}}(v(()=>LI(()=>r.current()),t),n)}function eO(e,t){const n=l(new Map),r=Zk();return Jk(()=>{if(e)return zE(()=>{var i;let o=!1,a=!1;for(const r of n.current){const[s]=r,l=xE(()=>r[1]),u=e[s];l!==u&&(o=!0,n.current.set(s,u),a=null!=(i=null==t?void 0:t(s,l,u))&&i)}o&&(a?D(r):r())});n.current.clear()},[e]),v(()=>e?new Proxy(e,{get(e,t){const r=e[t];return n.current.set(t,r),r}}):e,[e])}function tO(e,t){e()}function nO(e){const t=l(e);return Jk(()=>{t.current=e},[e]),t}function rO(e,t,n=d,r=Object.is){const i=l(e);n(()=>{const n=i.current;r(e,n)||(i.current=e,t(e,n))},[t,e])}function iO(e,t){const n=l(Xk(e));Jk(()=>{const r=Xk(e);r!==n.current&&(n.current=r,t(r))})}var oO=Object.defineProperty,aO=Object.defineProperties,sO=Object.getOwnPropertyDescriptors,lO=Object.getOwnPropertySymbols,uO=Object.prototype.hasOwnProperty,cO=Object.prototype.propertyIsEnumerable,dO=(e,t,n)=>t in e?oO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pO=new Uk,fO=u(pO),hO=b(x(({children:e},t)=>{const[n,r]=m(0),i=l(null),o=l(null),a=v(()=>({renderer:{get rendering(){var e;return null!=(e=i.current)?e:Promise.resolve()}},trackRendering(e){i.current||(i.current=new Promise(e=>{o.current=e})),S(()=>{e(),r(e=>e+1)})}}),[]);return Jk(()=>{var e;null==(e=o.current)||e.call(o),i.current=null},[e,n]),w(t,()=>a),null})),mO=[void 0,AI];function gO(e){var t=e,{children:n,onCollision:r,onBeforeDragStart:i,onDragStart:o,onDragMove:a,onDragOver:s,onDragEnd:u}=t,c=((e,t)=>{var n={};for(var r in e)uO.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&lO)for(var r of lO(e))t.indexOf(r)<0&&cO.call(e,r)&&(n[r]=e[r]);return n})(t,["children","onCollision","onBeforeDragStart","onDragStart","onDragMove","onDragOver","onDragEnd"]);const p=l(null),{plugins:f,modifiers:h,sensors:m}=c,g=MP(f,Gk.plugins),v=MP(m,Gk.sensors),b=MP(h,Gk.modifiers),x=nO(i),S=nO(o),w=nO(s),C=nO(a),E=nO(u),I=nO(r),D=function(e){const t=l(null);t.current||(t.current=e());return y(()=>()=>{var e;return null==(e=t.current)?void 0:e.destroy()},[]),t.current}(()=>{var e;return null!=(e=c.manager)?e:new Uk(c)});return d(()=>{if(!p.current)throw new Error("Renderer not found");const{renderer:e,trackRendering:t}=p.current,{monitor:n}=D;D.renderer=e;const r=[n.addEventListener("beforedragstart",e=>{const n=x.current;n&&t(()=>n(e,D))}),n.addEventListener("dragstart",e=>{var t;return null==(t=S.current)?void 0:t.call(S,e,D)}),n.addEventListener("dragover",e=>{const n=w.current;n&&t(()=>n(e,D))}),n.addEventListener("dragmove",e=>{const n=C.current;n&&t(()=>n(e,D))}),n.addEventListener("dragend",e=>{const n=E.current;n&&t(()=>n(e,D))}),n.addEventListener("collision",e=>{var t;return null==(t=I.current)?void 0:t.call(I,e,D)})];return()=>r.forEach(e=>e())},[D]),rO(g,()=>D&&(D.plugins=g),...mO),rO(v,()=>D&&(D.sensors=v),...mO),rO(b,()=>D&&(D.modifiers=b),...mO),fo.jsxs(fO.Provider,{value:D,children:[fo.jsx(hO,{ref:p,children:n}),n]})}function vO(){return h(fO)}function yO(e){var t;const n=null!=(t=vO())?t:void 0,[r]=m(()=>e(n));return r.manager!==n&&(r.manager=n),Jk(r.register,[n,r]),r}function bO({children:e,className:t,dropAnimation:n,style:i,tag:o,disabled:a}){var s;const u=l(null),c=vO(),p=null!=(s=Qk(()=>null==c?void 0:c.dragOperation.source,[c]).value)?s:null,f="function"==typeof a?a(p):a;d(()=>{if(!u.current||!c||f)return;const e=c.plugins.find(e=>e instanceof VA);return e?(e.overlay=u.current,()=>{e.overlay=void 0}):void 0},[c,f]),d(()=>{if(!c)return;const e=c.plugins.find(e=>e instanceof VA);return e?(e.dropAnimation=n,()=>{e.dropAnimation=void 0}):void 0},[c,n]);const h=v(()=>{if(!c)return null;const e=new Proxy(c.registry,{get:(e,t)=>"register"===t||"unregister"===t?xO:e[t]});return new Proxy(c,{get:(t,n)=>"registry"===n?e:t[n]})},[c]);return fo.jsx(fO.Provider,{value:h,children:r(o||"div",{ref:u,className:t,style:i,"data-dnd-overlay":!0},function(){if(!p||f)return null;if("function"==typeof e)return fo.jsx(SO,{source:p,children:e});return e}())})}function xO(){return()=>{}}function SO({children:e,source:t}){return e(eO(t))}var wO,CO,EO,IO,DO,RO=Object.create,PO=Object.defineProperty,MO=Object.getOwnPropertyDescriptor,LO=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),AO=e=>{throw TypeError(e)},kO=["class","method","getter","setter","accessor","field","value","get","set"],OO=e=>void 0!==e&&"function"!=typeof e?AO("Function expected"):e,qO=(e,t,n,r,i)=>({kind:kO[e],name:t,metadata:r,addInitializer:e=>n._?AO("Already initialized"):i.push(OO(e||null))}),TO=(e,t,n,r,i,o)=>{for(var a,s,l,u,c=7&t,d=kO[c+5],p=e[2]||(e[2]=[]),f=(i=i.prototype,MO(i,n)),h=r.length-1;h>=0;h--)(l=qO(c,n,s={},e[3],p)).static=false,l.private=false,u=l.access={has:e=>n in e},u.get=e=>e[n],a=(0,r[h])(f[d],l),s._=1,OO(a)&&(f[d]=a);return f&&PO(i,n,f),i},NO=(e,t,n)=>t.has(e)||AO("Cannot "+n),jO=class e{constructor(e,t){this.x=e,this.y=t}static delta(t,n){return new e(t.x-n.x,t.y-n.y)}static distance(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}static equals(e,t){return e.x===t.x&&e.y===t.y}static from({x:t,y:n}){return new e(t,n)}},_O=class extends(EO=jI,CO=[OI],wO=[OI],EO){constructor(e){var t,n,r;super(jO.from(e),(e,t)=>jO.equals(e,t)),((e,t,n)=>{for(var r=0,i=e[t>>1],o=i&&i.length;r<o;r++)i[r].call(n)})(DO,5,this),t=this,r=0,(n=IO).has(t)?AO("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(t):n.set(t,r),this.velocity={x:0,y:0}}get delta(){return jO.delta(this.current,this.initial)}get direction(){const{current:e,previous:t}=this;if(!t)return null;const n={x:e.x-t.x,y:e.y-t.y};return n.x||n.y?Math.abs(n.x)>Math.abs(n.y)?n.x>0?"right":"left":n.y>0?"down":"up":null}get current(){return super.current}set current(e){const{current:t}=this,n=jO.from(e),r={x:n.x-t.x,y:n.y-t.y},i=Date.now(),o=i-(NO(a=this,s=IO,"read from private field"),s.get(a));var a,s;const l=e=>Math.round(e/o*100);yE(()=>{((e,t,n)=>{NO(e,t,"write to private field"),t.set(e,n)})(this,IO,i),this.velocity={x:l(r.x),y:l(r.y)},super.current=n})}reset(e=this.defaultValue){super.reset(jO.from(e)),this.velocity={x:0,y:0}}};DO=(e=>{var t;return[,,,RO(null!=(t=null==e?void 0:e[LO("metadata")])?t:null)]})(EO),IO=new WeakMap,TO(DO,2,"delta",CO,_O),TO(DO,2,"direction",wO,_O),((e,t)=>{((e,t,n)=>{t in e?PO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(t,LO("metadata"),e[3])})(DO,_O);var FO=(e=>(e.Horizontal="x",e.Vertical="y",e))(FO||{});Object.values(FO);var zO=e=>{var t;return null!=(t=(({dragOperation:e,droppable:t})=>{const n=e.position.current;if(!n)return null;const{id:r}=t;if(!t.shape)return null;if(t.shape.containsPoint(n))return{id:r,value:1/jO.distance(t.shape.center,n),type:gR.PointerIntersection,priority:mR.High};return null})(e))?t:(({dragOperation:e,droppable:t})=>{const{shape:n}=e;if(!t.shape||!(null==n?void 0:n.current))return null;const r=n.current.intersectionArea(t.shape);if(r){const{position:i}=e,o=jO.distance(t.shape.center,i.current),a=r/(n.current.area+t.shape.area-r)/o;return{id:t.id,value:a,type:gR.ShapeIntersection,priority:mR.Normal}}return null})(e)};function WO(e){const{collisionDetector:t,data:n,disabled:r,element:i,id:o,accept:a,type:s}=e,l=yO(t=>new Kk(((e,t)=>aO(e,sO(t)))(((e,t)=>{for(var n in t||(t={}))uO.call(t,n)&&dO(e,n,t[n]);if(lO)for(var n of lO(t))cO.call(t,n)&&dO(e,n,t[n]);return e})({},e),{register:!1,element:Xk(i)}),t)),u=eO(l);return rO(o,()=>l.id=o),iO(i,e=>l.element=e),rO(a,()=>l.accept=a,void 0,AI),rO(t,()=>l.collisionDetector=null!=t?t:zO),rO(n,()=>n&&(l.data=n)),rO(r,()=>l.disabled=!0===r),rO(s,()=>l.type=s),{droppable:u,get isDropTarget(){return u.isDropTarget},ref:f(e=>{var t,n;(e||!(null==(t=l.element)?void 0:t.isConnected)||(null==(n=l.manager)?void 0:n.dragOperation.status.idle))&&(l.element=null!=e?e:void 0)},[l])}}const $O=e=>Array.from({length:e},(e,t)=>t),HO=({id:e,sectionIndex:t,itemIndex:n})=>fo.jsx("span",{children:`${e}-${t}-${n}`}),VO=n.memo(()=>{const e=qw(sE)??HO,{startSectionIndex:t,startIndex:n,id:r}=qw(dE)??{};return"number"!=typeof t||"number"!=typeof n||void 0===r?null:fo.jsx(bO,{dropAnimation:null,children:fo.jsx("div",{style:{display:"flex",alignItems:"center",padding:"10px",background:"white",boxShadow:"0px 4px 10px 0px rgba(0, 0, 0, 0.15)",borderRadius:"4px",border:"1px solid rgba(0, 0, 0, 0.15)",width:"208px",maxHeight:"32px",fontSize:"12px",lineHeight:"16px"},children:fo.jsx(e,{id:r,sectionIndex:t,itemIndex:n})})})}),BO=({sectionIndex:e,itemIndex:t,isDragging:n})=>{const r=qw(dE),i=r?.toSectionIndex===e&&r.toIndex===t;return fo.jsx("div",{"data-key":"drop-target-indicator","data-testid":"drop-target-indicator",style:{visibility:i&&!n?"visible":"hidden",padding:0,background:"rgba(64, 64, 64, 1)",borderRadius:2,marginLeft:"4px",width:"calc(100% - 8px)",height:"2px"}})},GO=(e,t)=>e?"2px solid rgba(0, 135, 61, 1)":t?"1px dashed rgba(0, 0, 0, 0.43)":void 0,UO=n.memo(({sectionIndex:e})=>{const t=qw(eE)[e],n=qw(tE),r=qw(nE),i=null!==qw(dE),o=r(e),a=n({sectionIndex:e}),{ref:s,isDropTarget:l}=WO({id:a,type:"section",accept:"item",collisionPriority:mR.Low,data:{id:a,sectionIndex:e,sectionKey:a}});return t>0?null:fo.jsxs(sc,{ref:s,sx:{margin:"4px",outline:GO(l,i),borderRadius:"4px",boxSizing:"border-box"},children:[fo.jsx(sc,{sx:{position:"relative",top:"4px"},children:fo.jsx(BO,{sectionIndex:e,itemIndex:0,isDragging:!1})}),fo.jsxs(sc,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px",padding:"20px 4px"},children:[fo.jsx(Cu,{sx:{textAlign:"center",width:"fit-content",maxWidth:"100%",overflowWrap:"break-word",textOverflow:"ellipsis",fontWeight:"600",fontSize:"14px",lineHeight:"16px",color:"rgba(64, 64, 64, 1)"},children:o.title}),fo.jsx(Cu,{sx:{textAlign:"center",width:"fit-content",maxWidth:"100%",overflowWrap:"break-word",textOverflow:"ellipsis",fontSize:"12px",lineHeight:"150%",color:"rgba(64, 64, 64, 1)"},children:o.message})]})]})}),YO=n.memo(({id:e,sectionIndex:t})=>{const n=qw(aE);return void 0===n?null:fo.jsx(n,{id:e,sectionIndex:t})});var KO=Object.defineProperty,XO=Object.defineProperties,JO=Object.getOwnPropertyDescriptors,ZO=Object.getOwnPropertySymbols,QO=Object.prototype.hasOwnProperty,eq=Object.prototype.propertyIsEnumerable,tq=(e,t,n)=>t in e?KO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nq=(e,t)=>{for(var n in t||(t={}))QO.call(t,n)&&tq(e,n,t[n]);if(ZO)for(var n of ZO(t))eq.call(t,n)&&tq(e,n,t[n]);return e},rq=(e,t)=>XO(e,JO(t)),iq=class extends IP{apply({transform:e}){if(!this.options)return e;const{axis:t,value:n}=this.options;return rq(nq({},e),{[t]:n})}};iq.configure=BD(iq);var oq=iq,aq=oq.configure({axis:"x",value:0});oq.configure({axis:"y",value:0});var sq=class extends IP{apply({transform:e}){var t;const{size:n=20}=null!=(t=this.options)?t:{},r="number"==typeof n?n:n.x,i="number"==typeof n?n:n.y;return rq(nq({},e),{x:Math.ceil(e.x/r)*r,y:Math.ceil(e.y/i)*i})}};sq.configure=BD(sq);var lq=Object.create,uq=Object.defineProperty,cq=Object.defineProperties,dq=Object.getOwnPropertyDescriptor,pq=Object.getOwnPropertyDescriptors,fq=Object.getOwnPropertySymbols,hq=Object.prototype.hasOwnProperty,mq=Object.prototype.propertyIsEnumerable,gq=e=>{throw TypeError(e)},vq=(e,t,n)=>t in e?uq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yq=(e,t)=>{for(var n in t||(t={}))hq.call(t,n)&&vq(e,n,t[n]);if(fq)for(var n of fq(t))mq.call(t,n)&&vq(e,n,t[n]);return e},bq=(e,t)=>cq(e,pq(t)),xq=["class","method","getter","setter","accessor","field","value","get","set"],Sq=e=>void 0!==e&&"function"!=typeof e?gq("Function expected"):e,wq=(e,t,n,r,i)=>({kind:xq[e],name:t,metadata:r,addInitializer:e=>n._?gq("Already initialized"):i.push(Sq(e||null))}),Cq=(e,t,n,r)=>{for(var i=0,o=e[t>>1],a=o&&o.length;i<a;i++)1&t?o[i].call(n):r=o[i].call(n,r);return r},Eq=(e,t,n,r,i,o)=>{for(var a,s,l,u,c,d=7&t,p=e.length+1,f=xq[d+5],h=e[p-1]=[],m=e[p]||(e[p]=[]),g=(i=i.prototype,dq({get[n](){return Dq(this,o)},set[n](e){return Pq(this,o,e)}},n)),v=r.length-1;v>=0;v--)(u=wq(d,n,l={},e[3],m)).static=false,u.private=false,c=u.access={has:e=>n in e},c.get=e=>e[n],c.set=(e,t)=>e[n]=t,s=(0,r[v])({get:g.get,set:g.set},u),l._=1,void 0===s?Sq(s)&&(g[f]=s):"object"!=typeof s||null===s?gq("Object expected"):(Sq(a=s.get)&&(g.get=a),Sq(a=s.set)&&(g.set=a),Sq(a=s.init)&&h.unshift(a));return g&&uq(i,n,g),i},Iq=(e,t,n)=>t.has(e)||gq("Cannot "+n),Dq=(e,t,n)=>(Iq(e,t,"read from private field"),t.get(e)),Rq=(e,t,n)=>t.has(e)?gq("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Pq=(e,t,n,r)=>(Iq(e,t,"write to private field"),t.set(e,n),n);function Mq(e){return e instanceof aT||e instanceof oT}var Lq=class extends UD{constructor(e){super(e);const t=zE(()=>{const{dragOperation:t}=e;if(fL(t.activatorEvent)&&Mq(t.source)&&t.status.initialized){const t=e.registry.plugins.get(rk);if(t)return t.disable(),()=>t.enable()}}),n=e.monitor.addEventListener("dragmove",(e,t)=>{queueMicrotask(()=>{if(this.disabled||e.defaultPrevented||!e.nativeEvent)return;const{dragOperation:n}=t;if(!fL(e.nativeEvent))return;if(!Mq(n.source))return;if(!n.shape)return;const{actions:r,collisionObserver:i,registry:o}=t,{by:a}=e;if(!a)return;const s=function(e){const{x:t,y:n}=e;if(t>0)return"right";if(t<0)return"left";if(n>0)return"down";if(n<0)return"up"}(a),{source:l,target:u}=n,{center:c}=n.shape.current,d=[],p=[];yE(()=>{for(const e of o.droppables){const{id:t}=e;if(!e.accepts(l)||t===(null==u?void 0:u.id)&&Mq(e)||!e.element)continue;let n=e.shape;const r=new uL(e.element,{getBoundingClientRect:e=>YP(e,void 0,.2)});r.height&&r.width&&(("down"==s&&c.y+10<r.center.y||"up"==s&&c.y-10>r.center.y||"left"==s&&c.x-10>r.center.x||"right"==s&&c.x+10<r.center.x)&&(d.push(e),e.shape=r,p.push(()=>e.shape=n)))}}),e.preventDefault(),i.disable();const f=i.computeCollisions(d,vL);yE(()=>p.forEach(e=>e()));const[h]=f;if(!h)return;const{id:m}=h,{index:g,group:v}=l.sortable;r.setDropTarget(m).then(()=>{const{source:e,target:t,shape:o}=n;if(!e||!Mq(e)||!o)return;const{index:a,group:s,target:l}=e.sortable,u=g!==a||v!==s,c=u?l:null==t?void 0:t.element;if(!c)return;nL(c);const d=new uL(c);if(!d)return;const p=aD.delta(d,aD.from(o.current.boundingRectangle),e.alignment);r.move({by:p}),u?r.setDropTarget(e.id).then(()=>i.enable()):i.enable()})})});this.destroy=()=>{n(),t()}}};var Aq=Object.defineProperty,kq=Object.defineProperties,Oq=Object.getOwnPropertyDescriptors,qq=Object.getOwnPropertySymbols,Tq=Object.prototype.hasOwnProperty,Nq=Object.prototype.propertyIsEnumerable,jq=(e,t,n)=>t in e?Aq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_q=(e,t)=>{for(var n in t||(t={}))Tq.call(t,n)&&jq(e,n,t[n]);if(qq)for(var n of qq(t))Nq.call(t,n)&&jq(e,n,t[n]);return e},Fq=(e,t)=>kq(e,Oq(t));function zq(e,t,n){if(t===n)return e;const r=e.slice();return r.splice(n,0,r.splice(t,1)[0]),r}function Wq(e){return"initialIndex"in e&&"number"==typeof e.initialIndex&&"index"in e&&"number"==typeof e.index}function $q(e,t){return function(e,t,n){var r,i,o;const{source:a,target:s,canceled:l}=t.operation;if(!a||!s||l)return"preventDefault"in t&&t.preventDefault(),e;const u=(e,t)=>e===t||"object"==typeof e&&"id"in e&&e.id===t;if(Array.isArray(e)){const r=e.findIndex(e=>u(e,a.id)),i=e.findIndex(e=>u(e,s.id));if(-1===r||-1===i){if(Wq(a)){const r=a.initialIndex,i=a.index;return r===i||r<0||r>=e.length?("preventDefault"in t&&t.preventDefault(),e):n(e,r,i)}return e}if(!l&&"index"in a&&"number"==typeof a.index){const t=a.index;if(t!==r)return n(e,r,t)}return n(e,r,i)}const c=Object.entries(e);let d,p,f=-1,h=-1;for(const[e,t]of c)if(-1===f&&(f=t.findIndex(e=>u(e,a.id)),-1!==f&&(d=e)),-1===h&&(h=t.findIndex(e=>u(e,s.id)),-1!==h&&(p=e)),-1!==f&&-1!==h)break;if(-1===f&&Wq(a)){const r=a.initialGroup,i=a.initialIndex,o=a.group,s=a.index;if(null==r||null==o||!(r in e)||!(o in e))return"preventDefault"in t&&t.preventDefault(),e;if(r===o&&i===s)return"preventDefault"in t&&t.preventDefault(),e;if(r===o)return Fq(_q({},e),{[r]:n(e[r],i,s)});const l=e[r][i];return Fq(_q({},e),{[r]:[...e[r].slice(0,i),...e[r].slice(i+1)],[o]:[...e[o].slice(0,s),l,...e[o].slice(s)]})}if(!a.manager)return e;const{dragOperation:m}=a.manager,g=null!=(i=null==(r=m.shape)?void 0:r.current.center)?i:m.position.current;if(null==p&&s.id in e){const t=s.shape&&g.y>s.shape.center.y?e[s.id].length:0;p=s.id,h=t}if(null==d||null==p||d===p&&f===h){if(null!=d&&d===p&&f===h&&Wq(a)){const t=null!=a.group&&a.group!==d,r=a.index!==f;if(t||r){const t=null!=(o=a.group)?o:d;if(t in e){if(d===t)return Fq(_q({},e),{[d]:n(e[d],f,a.index)});const r=e[d][f];return Fq(_q({},e),{[d]:[...e[d].slice(0,f),...e[d].slice(f+1)],[t]:[...e[t].slice(0,a.index),r,...e[t].slice(a.index)]})}}}return"preventDefault"in t&&t.preventDefault(),e}if(d===p)return Fq(_q({},e),{[d]:n(e[d],f,h)});const v=s.shape&&Math.round(g.y)>Math.round(s.shape.center.y)?1:0,y=e[d][f];return Fq(_q({},e),{[d]:[...e[d].slice(0,f),...e[d].slice(f+1)],[p]:[...e[p].slice(0,h+v),y,...e[p].slice(h+v)]})}(e,t,zq)}var Hq="__default__";function Vq(e,t,n,r){const i=r<t?"afterend":"beforebegin";n.insertAdjacentElement(i,e)}function Bq(e,t){return e.index-t.index}function Gq(e){return Array.from(e).sort(Bq)}var Uq,Yq,Kq,Xq,Jq,Zq,Qq,eT,tT=[Lq,class extends UD{constructor(e){super(e);const t=()=>{const t=new Map;for(const n of e.registry.droppables)if(n instanceof aT){const{sortable:e}=n,{group:r}=e;let i=t.get(r);i||(i=new Set,t.set(r,i)),i.add(e)}for(const[e,n]of t)t.set(e,new Set(Gq(n)));return t},n=[e.monitor.addEventListener("dragover",(e,n)=>{if(this.disabled)return;const{dragOperation:r}=n,{source:i,target:o}=r;if(!Mq(i)||!Mq(o))return;if(i.sortable===o.sortable)return;const a=t(),s=i.sortable.group===o.sortable.group,l=a.get(i.sortable.group),u=s?l:a.get(o.sortable.group);l&&u&&queueMicrotask(()=>{e.defaultPrevented||n.renderer.rendering.then(()=>{var r,c,d;const p=t();for(const[e,t]of a.entries()){const n=Array.from(t).entries();for(const[t,i]of n)if(i.index!==t||i.group!==e||!(null==(r=p.get(e))?void 0:r.has(i)))return}const f=i.sortable.element,h=o.sortable.element;if(!h||!f)return;if(!s&&o.id===i.sortable.group)return;const m=Gq(l),g=s?m:Gq(u),v=null!=(c=i.sortable.group)?c:Hq,y=null!=(d=o.sortable.group)?d:Hq,b={[v]:m,[y]:g},x=$q(b,e);if(b===x)return;const S=x[y].indexOf(i.sortable),w=x[y].indexOf(o.sortable);n.collisionObserver.disable(),Vq(f,S,h,w),yE(()=>{for(const[e,t]of x[v].entries())t.index=e;if(!s)for(const[e,t]of x[y].entries())t.group=o.sortable.group,t.index=e}),n.actions.setDropTarget(i.id).then(()=>n.collisionObserver.enable())})})}),e.monitor.addEventListener("dragend",(e,n)=>{if(!e.canceled)return;const{dragOperation:r}=n,{source:i}=r;Mq(i)&&(i.sortable.initialIndex===i.sortable.index&&i.sortable.initialGroup===i.sortable.group||queueMicrotask(()=>{const e=t(),r=e.get(i.sortable.initialGroup);r&&n.renderer.rendering.then(()=>{for(const[t,n]of e.entries()){const e=Array.from(n).entries();for(const[n,r]of e)if(r.index!==n||r.group!==t)return}const t=Gq(r),n=i.sortable.element,o=t[i.sortable.initialIndex],a=null==o?void 0:o.element;o&&a&&n&&(Vq(n,o.index,a,i.index),yE(()=>{for(const[t,n]of e.entries()){const e=Array.from(n).values();for(const t of e)t.index=t.initialIndex,t.group=t.initialGroup}}))})}))})];this.destroy=()=>{for(const e of n)e()}}}],nT={duration:250,easing:"cubic-bezier(0.25, 1, 0.5, 1)",idle:!1},rT=new class{constructor(){RI(this,NI,new WeakMap)}get(e,t){var n;return e?null==(n=DI(this,NI).get(e))?void 0:n.get(t):void 0}set(e,t,n){var r;if(e)return DI(this,NI).has(e)||DI(this,NI).set(e,new Map),null==(r=DI(this,NI).get(e))?void 0:r.set(t,n)}clear(e){var t;return e?null==(t=DI(this,NI).get(e))?void 0:t.clear():void 0}};Yq=[kI],Uq=[kI];var iT=class{constructor(e,t){Rq(this,Xq,Cq(Kq,8,this)),Cq(Kq,11,this),Rq(this,Jq),Rq(this,Zq),Rq(this,Qq,Cq(Kq,12,this)),Cq(Kq,15,this),Rq(this,eT),this.register=()=>(yE(()=>{var e,t;null==(e=this.manager)||e.registry.register(this.droppable),null==(t=this.manager)||t.registry.register(this.draggable)}),()=>this.unregister()),this.unregister=()=>{yE(()=>{var e,t;null==(e=this.manager)||e.registry.unregister(this.droppable),null==(t=this.manager)||t.registry.unregister(this.draggable)})},this.destroy=()=>{yE(()=>{this.droppable.destroy(),this.draggable.destroy()})};var n=e,{effects:r=()=>[],group:i,index:o,sensors:a,type:s,transition:l=nT,plugins:u=tT}=n,c=((e,t)=>{var n={};for(var r in e)hq.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&fq)for(var r of fq(e))t.indexOf(r)<0&&mq.call(e,r)&&(n[r]=e[r]);return n})(n,["effects","group","index","sensors","type","transition","plugins"]);this.droppable=new aT(c,t,this),this.draggable=new oT(bq(yq({},c),{effects:()=>[()=>{var e,t,n;const r=null==(e=this.manager)?void 0:e.dragOperation.status;(null==r?void 0:r.initializing)&&this.id===(null==(n=null==(t=this.manager)?void 0:t.dragOperation.source)?void 0:n.id)&&rT.clear(this.manager),(null==r?void 0:r.dragging)&&rT.set(this.manager,this.id,xE(()=>({initialIndex:this.index,initialGroup:this.group})))},()=>{const{index:e,group:t,manager:n}=this,r=Dq(this,Zq),i=Dq(this,Jq);e===r&&t===i||(Pq(this,Zq,e),Pq(this,Jq,t),this.animate())},()=>{const{target:e}=this,{feedback:t,isDragSource:n}=this.draggable;"move"==t&&n&&(this.droppable.disabled=!e)},()=>{const{manager:e}=this;for(const t of u)null==e||e.registry.register(t)},...r()],type:s,sensors:a}),t,this),Pq(this,eT,c.element),this.manager=t,this.index=o,Pq(this,Zq,o),this.group=i,Pq(this,Jq,i),this.type=s,this.transition=l}get initialIndex(){var e,t;return null!=(t=null==(e=rT.get(this.manager,this.id))?void 0:e.initialIndex)?t:this.index}get initialGroup(){var e,t;return null!=(t=null==(e=rT.get(this.manager,this.id))?void 0:e.initialGroup)?t:this.group}animate(){xE(()=>{const{manager:e,transition:t}=this,{shape:n}=this.droppable;if(!e)return;const{idle:r}=e.dragOperation.status;n&&t&&(!r||t.idle)&&e.renderer.rendering.then(()=>{const{element:r}=this;if(!r)return;const i=this.refreshShape();if(!i)return;const o=n.boundingRectangle.left-i.boundingRectangle.left,a=n.boundingRectangle.top-i.boundingRectangle.top,{translate:s}=VM(r),l=iL(r,s,!1),u=iL(r,s);if(o||a){const n=nM($P(r))?bq(yq({},t),{duration:0}):t;rL({element:r,keyframes:{translate:[`${l.x+o}px ${l.y+a}px ${l.z}`,`${u.x}px ${u.y}px ${u.z}`]},options:n}).then(()=>{e.dragOperation.status.dragging||(this.droppable.shape=void 0)})}})})}get manager(){return this.draggable.manager}set manager(e){yE(()=>{this.draggable.manager=e,this.droppable.manager=e})}set element(e){yE(()=>{const t=Dq(this,eT),n=this.droppable.element,r=this.draggable.element;n&&n!==t||(this.droppable.element=e),r&&r!==t||(this.draggable.element=e),Pq(this,eT,e)})}get element(){var e,t;const n=Dq(this,eT);if(n)return null!=(t=null!=(e=aM.get(n))?e:n)?t:this.droppable.element}set target(e){this.droppable.element=e}get target(){return this.droppable.element}set source(e){this.draggable.element=e}get source(){return this.draggable.element}get disabled(){return this.draggable.disabled&&this.droppable.disabled}set feedback(e){this.draggable.feedback=e}set disabled(e){yE(()=>{this.droppable.disabled=e,this.draggable.disabled=e})}set data(e){yE(()=>{this.droppable.data=e,this.draggable.data=e})}set handle(e){this.draggable.handle=e}set id(e){yE(()=>{this.droppable.id=e,this.draggable.id=e})}get id(){return this.droppable.id}set sensors(e){this.draggable.sensors=e}set modifiers(e){this.draggable.modifiers=e}set collisionPriority(e){this.droppable.collisionPriority=e}set collisionDetector(e){this.droppable.collisionDetector=null!=e?e:gL}set alignment(e){this.draggable.alignment=e}get alignment(){return this.draggable.alignment}set type(e){yE(()=>{this.droppable.type=e,this.draggable.type=e})}get type(){return this.draggable.type}set accept(e){this.droppable.accept=e}get accept(){return this.droppable.accept}get isDropTarget(){return this.droppable.isDropTarget}get isDragSource(){return this.draggable.isDragSource}get isDragging(){return this.draggable.isDragging}get isDropping(){return this.draggable.isDropping}get status(){return this.draggable.status}refreshShape(){return this.droppable.refreshShape()}accepts(e){return this.droppable.accepts(e)}};Kq=[,,,lq(null)],Xq=new WeakMap,Jq=new WeakMap,Zq=new WeakMap,Qq=new WeakMap,eT=new WeakMap,Eq(Kq,4,"index",Yq,iT,Xq),Eq(Kq,4,"group",Uq,iT,Qq),((e,t)=>{return vq(t,(n="metadata",(r=Symbol[n])?r:Symbol.for("Symbol."+n)),e[3]);var n,r})(Kq,iT);var oT=class extends Yk{constructor(e,t,n){super(e,t),this.sortable=n}get index(){return this.sortable.index}get initialIndex(){return this.sortable.initialIndex}get group(){return this.sortable.group}get initialGroup(){return this.sortable.initialGroup}},aT=class extends Kk{constructor(e,t,n){super(e,t),this.sortable=n}get index(){return this.sortable.index}get group(){return this.sortable.group}},sT=Object.defineProperty,lT=Object.defineProperties,uT=Object.getOwnPropertyDescriptors,cT=Object.getOwnPropertySymbols,dT=Object.prototype.hasOwnProperty,pT=Object.prototype.propertyIsEnumerable,fT=(e,t,n)=>t in e?sT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,hT=(e,t)=>{for(var n in t||(t={}))dT.call(t,n)&&fT(e,n,t[n]);if(cT)for(var n of cT(t))pT.call(t,n)&&fT(e,n,t[n]);return e};function mT(e){const{accept:t,collisionDetector:n,collisionPriority:r,id:i,data:o,element:a,handle:s,index:l,group:u,disabled:c,feedback:d,modifiers:p,sensors:h,target:m,type:g}=e,v=hT(hT({},nT),e.transition),y=yO(t=>new iT(((e,t)=>lT(e,uT(t)))(hT({},e),{transition:v,register:!1,handle:Xk(s),element:Xk(a),target:Xk(m),feedback:d}),t)),b=eO(y,gT);return rO(i,()=>y.id=i),Jk(()=>{yE(()=>{y.group=u,y.index=l})},[y,u,l]),rO(g,()=>y.type=g),rO(t,()=>y.accept=t,void 0,AI),rO(o,()=>o&&(y.data=o)),rO(l,()=>{var e;(null==(e=y.manager)?void 0:e.dragOperation.status.idle)&&(null==v?void 0:v.idle)&&y.refreshShape()},tO),iO(s,e=>y.handle=e),iO(a,e=>y.element=e),iO(m,e=>y.target=e),rO(c,()=>y.disabled=!0===c),rO(h,()=>y.sensors=h),rO(n,()=>y.collisionDetector=n),rO(r,()=>y.collisionPriority=r),rO(d,()=>y.feedback=null!=d?d:"default"),rO(v,()=>y.transition=v,void 0,AI),rO(p,()=>y.modifiers=p,void 0,AI),rO(e.alignment,()=>y.alignment=e.alignment),{sortable:b,get isDragging(){return b.isDragging},get isDropping(){return b.isDropping},get isDragSource(){return b.isDragSource},get isDropTarget(){return b.isDropTarget},handleRef:f(e=>{y.handle=null!=e?e:void 0},[y]),ref:f(e=>{var t,n;(e||!(null==(t=y.element)?void 0:t.isConnected)||(null==(n=y.manager)?void 0:n.dragOperation.status.idle))&&(y.element=null!=e?e:void 0)},[y]),sourceRef:f(e=>{var t,n;(e||!(null==(t=y.source)?void 0:t.isConnected)||(null==(n=y.manager)?void 0:n.dragOperation.status.idle))&&(y.source=null!=e?e:void 0)},[y]),targetRef:f(e=>{var t,n;(e||!(null==(t=y.target)?void 0:t.isConnected)||(null==(n=y.manager)?void 0:n.dragOperation.status.idle))&&(y.target=null!=e?e:void 0)},[y])}}function gT(e,t,n){return!("isDragSource"!==e||n||!t)}const vT=({id:e,itemIndex:t,sectionIndex:n})=>fo.jsx("div",{children:`${n}:${t} - ${e}`}),yT=({id:e,itemIndex:t,sectionIndex:n})=>{const r=qw(lE),i=qw(oE),o=qw(eE).at(n)??0,a=qw(tE)({sectionIndex:n}),{ref:s,isDragging:l,handleRef:u}=mT({id:e,index:t,type:"item",accept:"item",group:a,modifiers:[aq],plugins:[Lq],data:{id:e,sectionIndex:n,sectionKey:a,itemIndex:t}}),c=void 0!==r?()=>{r({id:e,itemIndex:t,sectionIndex:n})}:void 0,d=i??vT;return fo.jsx(Vd,{className:"section-item-container","data-testid":"section-item",onClick:c,ref:s,"data-dragging":l,sx:{padding:0,backgroundColor:l?"rgba(242, 242, 242, 1)":void 0,borderRadius:l?"4px":void 0},children:fo.jsxs("div",{style:{width:"100%",opacity:l?.4:1},children:[fo.jsx(BO,{isDragging:l,itemIndex:t,sectionIndex:n}),fo.jsx(d,{id:e,itemIndex:t,sectionIndex:n,dragHandleRef:u}),t===o-1&&fo.jsx(BO,{isDragging:!1,itemIndex:t+1,sectionIndex:n})]})})},bT=n.memo(yT),xT=n.memo(({sectionIndex:e})=>{const t=qw(tE),n=qw(eE).at(e)??0,r=t({sectionIndex:e});return fo.jsxs(sc,{className:"exploration-list",style:{overflow:"auto"},children:[fo.jsx(td,{}),fo.jsx(YO,{id:r,sectionIndex:e}),fo.jsx(td,{}),fo.jsx(UO,{sectionIndex:e}),fo.jsx(kd,{sx:{padding:"2px 8px"},children:$O(n).map(n=>{const r=t({sectionIndex:e,itemIndex:n});return fo.jsx(bT,{id:r,itemIndex:n,sectionIndex:e},r)})})]},r)}),ST=[Ck.configure({activationConstraints:[new bk.Distance({value:5})]}),mk],wT=n.memo(()=>{const e=qw(QC),t=qw(tE),n=Tw(pE("start")),r=Tw(pE("over")),i=Tw(pE("end"));return fo.jsxs(gO,{sensors:ST,onDragEnd:i,onDragOver:r,onDragStart:n,children:[fo.jsx(sc,{style:{display:"flex",flexDirection:"column"},children:$O(e).map(e=>fo.jsx(xT,{sectionIndex:e},t({sectionIndex:e})))}),fo.jsx(VO,{})]})}),CT=n.memo(e=>fo.jsx(jC,{atoms:fE,atomFamilies:hE,children:fo.jsx(mE,{props:e,children:fo.jsx(wT,{})})})),ET="12px",IT="nebula-table-utils-head-menu-button",DT="sn-copy-cell";let RT=function(e){return e.Enter="Enter",e.Space=" ",e.Esc="Escape",e.Tab="Tab",e.Shift="Shift",e.Left="ArrowLeft",e.Right="ArrowRight",e.Up="ArrowUp",e.Down="ArrowDown",e.C="c",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.F2="F2",e}({});const PT="nebula-table-utils-column-adjuster";let MT=function(e){return e[e.PixelsMin=30]="PixelsMin",e[e.PixelsMax=7680]="PixelsMax",e[e.PixelsDefault=200]="PixelsDefault",e[e.PercentageMin=1]="PercentageMin",e[e.PercentageMax=100]="PercentageMax",e[e.PercentageDefault=20]="PercentageDefault",e[e.PercentageMaxInIndentMode=75]="PercentageMaxInIndentMode",e[e.AutoMinPivot=80]="AutoMinPivot",e[e.AutoMinTable=120]="AutoMinTable",e}({}),LT=function(e){return e.Auto="auto",e.FitToContent="fitToContent",e.Pixels="pixels",e.Percentage="percentage",e}({});const AT={darker:.15,brighter:.3,opacity:.03},kT={darker:.3,brighter:.5,opacity:.05};let OT=function(e){return e.Cyclic="C",e}({});const qT=(e,t)=>{const n=new Map;for(const t of e)n.set(t.id,t);return t.reduce((e,t)=>{const r=n.get(t);return r&&e.push(r),e},[])},TT=XC(e=>ww(t=>{const n=t(tC),r=t(Xw),i=t(uC),o=t(aC)?.[e],a=n("SUPPORT-9810-MISSING-MEASURES",!1)?r?.properties.qHyperCubeDef.rankedList?.[e]:i?.qHyperCube.rankedList?.[e];return o||(r?.isRankedListCorrupt(e)||void 0===a?r?.createRankedList(e):a)})),NT=(e,t=new Set)=>ww(n=>{const r=n(e),i=n(CC);if(!r||0===r.length)return"disabled";const o=r.filter(e=>!t.has(e.id));if(0===o.length)return"disabled";const a=o.filter(e=>i.has(e.id)).length;return 0===a?"none":a===o.length?"all":"some"}),jT=(e,t=new Set)=>ww(null,(n,r,i)=>{const o=n(e);o&&0!==o.length&&(e=>{const{items:t,shouldCheckAll:n,get:r,set:i,excludedIds:o}=e,a=t.filter(e=>!o?.has(e.id));if(0===a.length)return;const s=r(CC),l=new Set,u=new Set;if(a.forEach(e=>{const t=s.has(e.id);t&&!n&&u.add(e.id),!t&&n&&l.add(e.id)}),0===l.size&&0===u.size)return;const c=new Set(r(bC)),d=new Set(r(xC));l.forEach(e=>c.add(e)),l.forEach(e=>d.delete(e)),u.forEach(e=>d.add(e)),u.forEach(e=>c.delete(e)),i(bC,c),i(xC,d),Yw({type:"apply",localChecked:l,localUnchecked:u,handler:r(Xw),model:r(Kw),fieldInfo:r(hC),handlerQueue:r(gC)})})({items:o,shouldCheckAll:i,get:n,set:r,excludedIds:t})}),_T=ww(e=>{const t=e(cC);return t?.qHyperCube.qDimensionInfo.filter(nC).map(({cId:e,qFallbackTitle:t})=>({id:e,title:t??"",alternative:!0}))}),FT=ww(e=>{const t=e(uC),n=e(Zw),r=t?.qHyperCube.qEffectiveInterColumnSortOrder.map(e=>{if(-1===e)return{id:-1,title:n("Common.Values")};const{cId:r,qFallbackTitle:i}=t.qHyperCube.qDimensionInfo[e];return{id:r,title:i??""}});return r}),zT=ww(e=>{const t=e(Zw),n=e(_T),r=e(eC),i=e(TT("columns")),o=e(TT("rows")),a=e(FT);if(void 0===n||void 0===i||void 0===o||void 0===a)return[];const s=[...a,...n].filter(r);return[{id:"rows",title:t("Common.Rows"),items:qT(s,o)},{id:"columns",title:t("Common.Columns"),items:qT(s,i)}]}),WT=XC(e=>ww(t=>t(zT).at(e))),$T=XC(({sectionIndex:e,itemIndex:t})=>ww(n=>n(WT(e))?.items.at(t)?.title),(e,t)=>e.sectionIndex===t.sectionIndex&&e.itemIndex===t.itemIndex),HT=XC(e=>ww(t=>t(WT(e))?.title)),VT=ww(e=>({sectionIndex:t,itemIndex:n})=>{const r=e(WT(t));return void 0===r?0===t?"rows":"columns":void 0===n?r.id:r.items.at(n)?.id??`missing-item-${t}-${n}`}),BT=ww(e=>e(zT).map(e=>e.items.length)),GT=XC(e=>NT(ww(t=>t(WT(e))?.items),new Set([-1]))),UT=XC(e=>jT(ww(t=>t(WT(e))?.items),new Set([-1]))),YT=ww(null,async(e,t,{event:n,id:r,toIndex:i,toSection:o,startSection:a})=>{const s=e(Xw),l=e(Kw),u=e(gC),c=e(TT("rows")),d=e(TT("columns")),p=o;if(void 0===s||void 0===l||void 0===c||void 0===d||null===u)return;if(n.operation.canceled)return void t(aC,null);if("section"===n.operation.target?.type&&a===o)return void t(aC,null);const f=KC({rows:c,columns:d},n);t(aC,f),u.add(async()=>{"number"==typeof r?await s.movePseudoDimension({toIndex:i,toSection:p}):await s.moveDimension({cId:r,toIndex:i,toSection:p})})}),KT={noItems:{row:"ChartExploration.PivotTable.RowSectionEmpty.Title",column:"ChartExploration.PivotTable.ColumnSectionEmpty.Title",measure:"ChartExploration.PivotTable.MeasureSectionEmpty.Title"},noSearchFound:{row:"ChartExploration.PivotTable.NoRowsFound.Title",column:"ChartExploration.PivotTable.NoColumnsFound.Title",measure:"ChartExploration.PivotTable.NoMeasuresFound.Title"}},XT="ChartExploration.PivotTable.DimensionSectionEmpty.Message",JT="ChartExploration.PivotTable.MeasureSectionEmpty.Message",ZT="#177fe6",QT=(e,t,n,r)=>{if("measure"===t)return e(r?KT.noSearchFound.measure:KT.noItems.measure);const i=r?KT.noSearchFound:KT.noItems;return e(n?i.row:i.column)},eN=(e,t,n)=>n?"":e("measure"===t?JT:XT),tN=XC(e=>ww(t=>{const n=t(Zw),r=t(Qw).length>0;return t=>({title:QT(n,e,0===t,r),message:eN(n,e,r)})})),nN=tN("measure"),rN=tN("dimensions"),iN=({children:e})=>fo.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e}),oN=e=>{const t=qw($T(e));return fo.jsx(iN,{children:t})},aN=ww(e=>{const t=e(cC);return t?.qHyperCube.qMeasureInfo.filter(nC).map(({cId:e,qFallbackTitle:t})=>({id:e,title:t??""}))}),sN=ww(e=>{const t=e(uC),n=e(aN),r=e(eC),i=e(TT("measures"));if(void 0===t||void 0===n||void 0===i)return[];const o=t.qHyperCube.qMeasureInfo.filter(nC).map(({cId:e,qFallbackTitle:t})=>({id:e,title:t??""}));o.push(...n);const a=o.filter(r);return qT(a,i)}),lN=XC(e=>ww(t=>t(sN).at(e)?.title??"")),uN=ww(e=>({itemIndex:t})=>{const n=e(sN);return void 0===t?"measures":n.at(t)?.id??`missing-item-${t}`}),cN=ww(e=>[e(sN).length]),dN=NT(sN),pN=jT(sN),fN=ww(null,async(e,t,{id:n,toIndex:r,event:i})=>{const o=e(Xw),a=e(Kw),s=e(gC),l=e(TT("measures"));if(void 0===o||void 0===a||void 0===l||"string"!=typeof n||null===s)return;const u=KC({measures:l},i);t(aC,u),s.add(async()=>{await o.moveMeasure({cId:n,toIndex:r})})}),hN=zS().palette,mN={TEXT:hN.text.primary,DISABLED:hN.text.disabled,HOVER:hN.action.hover,WHITE:Of.GREYSCALE_100,BORDER_MEDIUM:Of.GREYSCALE_85,DARK_MODE_TEXT:Of.GREYSCALE_95,DARK_MODE_BORDER:Of.GREYSCALE_95,DARK_MODE_DISABLED:Of.GREYSCALE_70,TRANSPARENT:"transparent",SELECTED:hN.primary.main,LINK:hN.info.main,ERROR:hN.error.main};function gN(e){return null!==e&&"object"==typeof e&&"r"in e&&"number"==typeof e.r&&"g"in e&&"number"==typeof e.g&&"b"in e&&"number"==typeof e.b&&("number"==typeof e.a||void 0===e.a)}function vN(e){if("object"==typeof e&&gN(e))return(e.r<<16)+(e.g<<8)+e.b;let t=0,n=0,r=0;if("string"==typeof e){let i;(i=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e))?(t=parseInt(i[1],10),n=parseInt(i[2],10),r=parseInt(i[3],10)):(i=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(e))?(t=parseInt(i[1],16),n=parseInt(i[2],16),r=parseInt(i[3],16)):(i=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(e))&&(t=parseInt(i[1]+i[1],16),n=parseInt(i[2]+i[2],16),r=parseInt(i[3]+i[3],16))}return(t<<16)+(n<<8)+r}const yN={aliceblue:{r:240,g:248,b:255},antiquewhite:{r:250,g:235,b:215},aqua:{r:0,g:255,b:255},aquamarine:{r:127,g:255,b:212},azure:{r:240,g:255,b:255},beige:{r:245,g:245,b:220},bisque:{r:255,g:228,b:196},black:{r:0,g:0,b:0},blanchedalmond:{r:255,g:235,b:205},blue:{r:0,g:0,b:255},blueviolet:{r:138,g:43,b:226},brown:{r:165,g:42,b:42},burlywood:{r:222,g:184,b:135},cadetblue:{r:95,g:158,b:160},chartreuse:{r:127,g:255,b:0},chocolate:{r:210,g:105,b:30},coral:{r:255,g:127,b:80},cornflowerblue:{r:100,g:149,b:237},cornsilk:{r:255,g:248,b:220},crimson:{r:220,g:20,b:60},cyan:{r:0,g:255,b:255},darkblue:{r:0,g:0,b:139},darkcyan:{r:0,g:139,b:139},darkgoldenrod:{r:184,g:134,b:11},darkgray:{r:169,g:169,b:169},darkgreen:{r:0,g:100,b:0},darkgrey:{r:169,g:169,b:169},darkkhaki:{r:189,g:183,b:107},darkmagenta:{r:139,g:0,b:139},darkolivegreen:{r:85,g:107,b:47},darkorange:{r:255,g:140,b:0},darkorchid:{r:153,g:50,b:204},darkred:{r:139,g:0,b:0},darksalmon:{r:233,g:150,b:122},darkseagreen:{r:143,g:188,b:143},darkslateblue:{r:72,g:61,b:139},darkslategray:{r:47,g:79,b:79},darkslategrey:{r:47,g:79,b:79},darkturquoise:{r:0,g:206,b:209},darkviolet:{r:148,g:0,b:211},deeppink:{r:255,g:20,b:147},deepskyblue:{r:0,g:191,b:255},dimgray:{r:105,g:105,b:105},dimgrey:{r:105,g:105,b:105},dodgerblue:{r:30,g:144,b:255},firebrick:{r:178,g:34,b:34},floralwhite:{r:255,g:250,b:240},forestgreen:{r:34,g:139,b:34},fuchsia:{r:255,g:0,b:255},gainsboro:{r:220,g:220,b:220},ghostwhite:{r:248,g:248,b:255},gold:{r:255,g:215,b:0},goldenrod:{r:218,g:165,b:32},gray:{r:128,g:128,b:128},green:{r:0,g:128,b:0},greenyellow:{r:173,g:255,b:47},grey:{r:128,g:128,b:128},honeydew:{r:240,g:255,b:240},hotpink:{r:255,g:105,b:180},indianred:{r:205,g:92,b:92},indigo:{r:75,g:0,b:130},ivory:{r:255,g:255,b:240},khaki:{r:240,g:230,b:140},lavender:{r:230,g:230,b:250},lavenderblush:{r:255,g:240,b:245},lawngreen:{r:124,g:252,b:0},lemonchiffon:{r:255,g:250,b:205},lightblue:{r:173,g:216,b:230},lightcoral:{r:240,g:128,b:128},lightcyan:{r:224,g:255,b:255},lightgoldenrodyellow:{r:250,g:250,b:210},lightgray:{r:211,g:211,b:211},lightgreen:{r:144,g:238,b:144},lightgrey:{r:211,g:211,b:211},lightpink:{r:255,g:182,b:193},lightsalmon:{r:255,g:160,b:122},lightseagreen:{r:32,g:178,b:170},lightskyblue:{r:135,g:206,b:250},lightslategray:{r:119,g:136,b:153},lightslategrey:{r:119,g:136,b:153},lightsteelblue:{r:176,g:196,b:222},lightyellow:{r:255,g:255,b:224},lime:{r:0,g:255,b:0},limegreen:{r:50,g:205,b:50},linen:{r:250,g:240,b:230},magenta:{r:255,g:0,b:255},maroon:{r:128,g:0,b:0},mediumaquamarine:{r:102,g:205,b:170},mediumblue:{r:0,g:0,b:205},mediumorchid:{r:186,g:85,b:211},mediumpurple:{r:147,g:112,b:219},mediumseagreen:{r:60,g:179,b:113},mediumslateblue:{r:123,g:104,b:238},mediumspringgreen:{r:0,g:250,b:154},mediumturquoise:{r:72,g:209,b:204},mediumvioletred:{r:199,g:21,b:133},midnightblue:{r:25,g:25,b:112},mintcream:{r:245,g:255,b:250},mistyrose:{r:255,g:228,b:225},moccasin:{r:255,g:228,b:181},navajowhite:{r:255,g:222,b:173},navy:{r:0,g:0,b:128},oldlace:{r:253,g:245,b:230},olive:{r:128,g:128,b:0},olivedrab:{r:107,g:142,b:35},orange:{r:255,g:165,b:0},orangered:{r:255,g:69,b:0},orchid:{r:218,g:112,b:214},palegoldenrod:{r:238,g:232,b:170},palegreen:{r:152,g:251,b:152},paleturquoise:{r:175,g:238,b:238},palevioletred:{r:219,g:112,b:147},papayawhip:{r:255,g:239,b:213},peachpuff:{r:255,g:218,b:185},peru:{r:205,g:133,b:63},pink:{r:255,g:192,b:203},plum:{r:221,g:160,b:221},powderblue:{r:176,g:224,b:230},purple:{r:128,g:0,b:128},red:{r:255,g:0,b:0},rosybrown:{r:188,g:143,b:143},royalblue:{r:65,g:105,b:225},saddlebrown:{r:139,g:69,b:19},salmon:{r:250,g:128,b:114},sandybrown:{r:244,g:164,b:96},seagreen:{r:46,g:139,b:87},seashell:{r:255,g:245,b:238},sienna:{r:160,g:82,b:45},silver:{r:192,g:192,b:192},skyblue:{r:135,g:206,b:235},slateblue:{r:106,g:90,b:205},slategray:{r:112,g:128,b:144},slategrey:{r:112,g:128,b:144},snow:{r:255,g:250,b:250},springgreen:{r:0,g:255,b:127},steelblue:{r:70,g:130,b:180},tan:{r:210,g:180,b:140},teal:{r:0,g:128,b:128},thistle:{r:216,g:191,b:216},tomato:{r:255,g:99,b:71},transparent:{r:0,g:0,b:0,a:0},turquoise:{r:64,g:224,b:208},violet:{r:238,g:130,b:238},wheat:{r:245,g:222,b:179},white:{r:255,g:255,b:255},whitesmoke:{r:245,g:245,b:245},yellow:{r:255,g:255,b:0},yellowgreen:{r:154,g:205,b:50}},bN="qcm-color";function xN(...e){const t={type:bN,r:0,g:0,b:0,a:1,invalid:!1,spaces:{}};let n=0,r=0,i=0,o=1;if(null!==(a=e[0])&&"object"==typeof a&&"type"in a&&a.type===bN)({r:n,g:r,b:i,a:o}=e[0]),t.invalid=e[0].invalid,t.spaces={...e[0].spaces};else if(gN(e[0]))({r:n,g:r,b:i}=e[0]),"a"in e[0]&&({a:o}=e[0]);else if(e.length<3)if("string"==typeof e[0]){const a=e[0];let s;if(s=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(a))n=parseInt(s[1],10),r=parseInt(s[2],10),i=parseInt(s[3],10);else if(s=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(a))n=parseInt(s[1],10),r=parseInt(s[2],10),i=parseInt(s[3],10),o=parseFloat(s[4]);else if(s=/^ARGB\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(a))o=parseInt(s[1],10)/255,n=parseInt(s[2],10),r=parseInt(s[3],10),i=parseInt(s[4],10);else if(s=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(a))n=parseInt(s[1],16),r=parseInt(s[2],16),i=parseInt(s[3],16),o=1;else if(s=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(a))n=parseInt(s[1]+s[1],16),r=parseInt(s[2]+s[2],16),i=parseInt(s[3]+s[3],16),o=1;else if(s=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a<=.5?2*a*t:(2-2*a)*t;let u=e/60;const c=l*(1-Math.abs(u%2-1));let d=[];switch(u=Math.floor(u),u){case 0:d=[l,c,0];break;case 1:d=[c,l,0];break;case 2:d=[0,l,c];break;case 3:d=[0,c,l];break;case 4:d=[c,0,l];break;case 5:d=[l,0,c];break;default:d=[0,0,0]}const p=a-.5*l;n=d[0]+p,r=d[1]+p,i=d[2]+p,n=Math.round(255*n),r=Math.round(255*r),i=Math.round(255*i),o=1}else if(s=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);o=parseFloat(s[7]),e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a<=.5?2*a*t:(2-2*a)*t;let u=e/60;const c=l*(1-Math.abs(u%2-1));let d=[];switch(u=Math.floor(u),u){case 0:d=[l,c,0];break;case 1:d=[c,l,0];break;case 2:d=[0,l,c];break;case 3:d=[0,c,l];break;case 4:d=[c,0,l];break;case 5:d=[l,0,c];break;default:d=[0,0,0]}const p=a-.5*l;n=d[0]+p,r=d[1]+p,i=d[2]+p,n=Math.round(255*n),r=Math.round(255*r),i=Math.round(255*i)}else if(s=/^hsv\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a*t;let u=e/60;const c=l*(1-Math.abs(u%2-1));let d=[];switch(u=Math.floor(u),u){case 0:d=[l,c,0];break;case 1:d=[c,l,0];break;case 2:d=[0,l,c];break;case 3:d=[0,c,l];break;case 4:d=[c,0,l];break;case 5:d=[l,0,c];break;default:d=[0,0,0]}const p=a-l;n=d[0]+p,r=d[1]+p,i=d[2]+p,n=Math.round(255*n),r=Math.round(255*r),i=Math.round(255*i),o=1}else{const e=a.toLowerCase();if(function(e){return e in yN}(e)){const t=yN[e];({r:n,g:r,b:i}=t),o="a"in t?t.a:1}else t.invalid=!0}}else"number"==typeof e[0]&&e[0]>=0&&"argb"===e[1]?(o=(4278190080&e[0])>>>24,o/=255,n=(16711680&e[0])>>16,r=(65280&e[0])>>8,i=255&e[0]):"number"==typeof e[0]&&e[0]>=0?(n=(16711680&e[0])>>16,r=(65280&e[0])>>8,i=255&e[0]):t.invalid=!0;else 3===e.length||4===e.length?(n=e[0],r=e[1],i=e[2],o=4===e.length?e[3]:1):t.invalid=!0;var a;return Number.isNaN(+n+r+i+o)&&(t.invalid=!0),t.r=Math.floor(n),t.g=Math.floor(r),t.b=Math.floor(i),t.a=o,t}function SN(e){let t,n,r;if(gN(e))return t=e.r.toString(16),n=e.g.toString(16),r=e.b.toString(16),1===t.length&&(t=`0${t}`),1===n.length&&(n=`0${n}`),1===r.length&&(r=`0${r}`),`#${[t,n,r].join("")}`;const i="string"==typeof e?vN(e):e;return t=((16711680&i)>>16).toString(16),n=((65280&i)>>8).toString(16),r=(255&i).toString(16),1===t.length&&(t=`0${t}`),1===n.length&&(n=`0${n}`),1===r.length&&(r=`0${r}`),`#${t}${n}${r}`}function wN(e){let t,n,r=0;const i="string"==typeof e?xN(e):e,o=i.r/255,a=i.g/255,s=i.b/255,{a:l}=i,u=Math.max(o,a,s),c=Math.min(o,a,s),d=(u+c)/2;if(u===c)t=0,r=0;else{switch(n=u-c,t=d>.5?n/(2-u-c):n/(u+c),u){case o:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-o)/n+2;break;case s:r=(o-a)/n+4}r/=6}return{h:360*r,s:100*t,l:100*d,a:l}}function CN(e){let t,n,r=0;const i="string"==typeof e?xN(e):e,o=i.r/255,a=i.g/255,s=i.b/255,l=Math.max(o,a,s),u=Math.min(o,a,s),c=l;if(l===u)t=0,r=0;else{switch(n=l-u,t=0===n?0:n/c,l){case o:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-o)/n+2;break;case s:r=(o-a)/n+4}r/=6}return{h:360*r%360,s:100*t,v:100*c}}function EN(e){if(gN(e))return`rgb(${e.r}, ${e.g}, ${e.b})`;const t="string"==typeof e?vN(e):e;return`rgb(${(16711680&t)>>16}, ${(65280&t)>>8}, ${255&t})`}function IN(e,t){return gN(e)?`rgba(${e.r}, ${e.g}, ${e.b}, ${e.a})`:IN(xN(e))}function DN(e){return gN(e)?1===e.a?EN(e):IN(e):DN(xN(e))}const RN=e=>{const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};function PN(e){return.2126*RN(e.r)+.7152*RN(e.g)+.0722*RN(e.b)}function MN(...e){const t=xN(...e),n={type:t.type,r:t.r,g:t.g,b:t.b,a:t.a,invalid:t.invalid,spaces:t.spaces},r=()=>(n.spaces.hslaObject||(n.spaces.hslaObject=wN(n)),n.spaces.hslaObject),i=e=>{const t=r(),{h:n,s:i,l:o,a:a}=t;return`hsla(${n}, ${i}, ${Math.max(0,Math.min(o+e,100))}, ${a})`};return{get type(){return n.type},isInvalid:()=>n.invalid,get r(){return n.r},get g(){return n.g},get b(){return n.b},get a(){return n.a},getR:()=>n.r,getG:()=>n.g,getB:()=>n.b,getAlpha:()=>n.a,setAlpha:e=>{n.a=e,n.spaces={}},isEqualTo:e=>{let t;if("string"==typeof e)t=xN(e);else{if(e.type!==n.type)return!1;t=e}return t.r===n.r&&t.g===n.g&&t.b===n.b&&t.a===n.a},isDark:()=>function(...e){const t=xN(...e);return t.invalid||PN(t)<.4}(n),getRGB:()=>(n.spaces.rgb||(n.spaces.rgb=EN(n)),n.spaces.rgb),getRGBA:()=>(n.spaces.rgba||(n.spaces.rgba=IN(n)),n.spaces.rgba),getString:()=>(n.spaces.string||(n.spaces.string=DN(n)),n.spaces.string),getHex:()=>(n.spaces.hex||(n.spaces.hex=SN(n)),n.spaces.hex),getHSL:()=>(n.spaces.hsl||(n.spaces.hsl=function(e){let t,n,r=0;const i="string"==typeof e?xN(e):e,o=i.r/255,a=i.g/255,s=i.b/255,l=Math.max(o,a,s),u=Math.min(o,a,s),c=(l+u)/2;if(l===u)t=0,r=0;else{switch(n=l-u,t=c>.5?n/(2-l-u):n/(l+u),l){case o:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-o)/n+2;break;case s:r=(o-a)/n+4}r/=6}return`hsl(${360*r}, ${100*t}, ${100*c})`}(n)),n.spaces.hsl),getHSLA:()=>(n.spaces.hsla||(n.spaces.hsla=function(e){const{h:t,s:n,l:r,a:i}=wN(e);return`hsla(${t}, ${n}, ${r}, ${i})`}(n)),n.spaces.hsla),getHSLAObject:r,getShiftedHSLA:i,getHSV:()=>(n.spaces.hsv||(n.spaces.hsv=function(e){const{h:t,s:n,v:r}=CN(e);return`hsv(${t}, ${n}, ${r})`}(n)),n.spaces.hsv),getHSVObject:()=>(n.spaces.hsvObject||(n.spaces.hsvObject=CN(n)),n.spaces.hsvObject),blend:(e,t)=>`rgba(${Math.floor(n.r+(e.r-n.r)*t)}, ${Math.floor(n.g+(e.g-n.g)*t)}, ${Math.floor(n.b+(e.b-n.b)*t)}, ${Math.floor(n.a+(e.getAlpha()-n.a)*t)})`,getBrightenedColor:(e=1)=>MN(i(18*e)),getDarkenedColor:(e=1)=>MN(i(18*-e))}}function LN(e,t){if(!e||!t)return;const n=PN(e),r=PN(t);return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)}const AN="#FFFFFF";function kN(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ON,qN="top",TN="top-right",NN="right",jN="bottom-right",_N="bottom",FN="bottom-left",zN="left",WN="top-left";kN(kN(kN(kN(kN(kN(kN(kN(kN(kN(ON={},"equal-equal",[qN,_N]),"equal-higher",[_N,jN]),"equal-lower",[qN,TN]),"equal-void",[qN,_N]),"higher-equal",[zN,FN,qN,TN]),"higher-higher-acute",[_N,FN,zN,TN]),"higher-higher-obtuse",[_N,qN]),"higher-lower-negative",[qN,TN,NN]),"higher-lower-positive",[_N,FN,zN]),"higher-void",[qN]),kN(kN(kN(kN(kN(kN(kN(kN(kN(kN(ON,"lower-equal",[qN]),"lower-higher-negative",[qN,WN]),"lower-higher-positive",[jN]),"lower-lower-acute",[qN,WN,zN,TN,NN]),"lower-lower-obtuse",[qN,_N]),"lower-void",[qN]),"void-equal",[qN]),"void-higher",[qN,_N]),"void-lower",[qN,_N,zN]),"void-void",[qN]),kN(ON,"unclassified",[qN,_N,NN,zN,TN,jN,FN,WN]);var $N,HN,VN=["American Typewriter, serif","Andalé Mono, monospace","Arial Black, sans-serif","Arial, sans-serif","Bradley Hand, cursive","Brush Script MT, cursive","Comic Sans MS, cursive","Courier, monospace","Didot, serif","Georgia, serif","Impact, sans-serif","Lucida Console, monospace","Luminari, fantasy","Monaco, monospace","QlikView Sans, sans-serif","Source Sans Pro, sans-serif","Tahoma, sans-serif","Times New Roman, serif","Trebuchet MS, sans-serif","Verdana, sans-serif"],BN=["Abril Fatface, serif","Bangers, fantasy","Bebas Neue, sans serif","EB Garamond, serif","Fredoka One, fantasy","Graduate, fantasy","Gravitas One, serif","Indie Flower, fantasy","Inter, sans-serif","Lobster, fantasy","Montserrat, sans-serif","Nixie One, sans-serif","Noto Sans, sans-serif","Open Sans, sans-serif","PT Serif, serif","Pacifico, cursive","Permanent Marker, fantasy","QlikView Sans, sans-serif","Raleway, sans-serif","Rammetto One, fantasy","Roboto, sans-serif","Source Sans Pro, sans-serif","Titan One, fantasy","Yanone Kaffeesatz, sans-serif"];function GN(e){return null!=e&&e.isEnabled("PS_20852_WYSIWYG_FONT_SUPPORT")?BN:VN}var UN=function(){if(HN)return $N;HN=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},o=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,i=e.call(n,"constructor"),o=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!i&&!o)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return $N=function e(){var t,n,r,l,u,c,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=s(d,n),d!==(l=s(t,n))&&(h&&l&&(o(l)||(u=i(l)))?(u?(u=!1,c=r&&i(r)?r:[]):c=r&&o(r)?r:{},a(d,{name:n,newValue:e(h,c,l)})):void 0!==l&&a(d,{name:n,newValue:l}));return d},$N}();function YN(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function KN(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function XN(){}!function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")&&e.default}(UN);var JN=.7,ZN=1/JN,QN="\\s*([+-]?\\d+)\\s*",ej="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",tj="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",nj=/^#([0-9a-f]{3,8})$/,rj=new RegExp(`^rgb\\(${QN},${QN},${QN}\\)$`),ij=new RegExp(`^rgb\\(${tj},${tj},${tj}\\)$`),oj=new RegExp(`^rgba\\(${QN},${QN},${QN},${ej}\\)$`),aj=new RegExp(`^rgba\\(${tj},${tj},${tj},${ej}\\)$`),sj=new RegExp(`^hsl\\(${ej},${tj},${tj}\\)$`),lj=new RegExp(`^hsla\\(${ej},${tj},${tj},${ej}\\)$`),uj={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function cj(){return this.rgb().formatHex()}function dj(){return this.rgb().formatRgb()}function pj(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=nj.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?fj(t):3===n?new vj(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?hj(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?hj(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=rj.exec(e))?new vj(t[1],t[2],t[3],1):(t=ij.exec(e))?new vj(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=oj.exec(e))?hj(t[1],t[2],t[3],t[4]):(t=aj.exec(e))?hj(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=sj.exec(e))?Cj(t[1],t[2]/100,t[3]/100,1):(t=lj.exec(e))?Cj(t[1],t[2]/100,t[3]/100,t[4]):uj.hasOwnProperty(e)?fj(uj[e]):"transparent"===e?new vj(NaN,NaN,NaN,0):null}function fj(e){return new vj(e>>16&255,e>>8&255,255&e,1)}function hj(e,t,n,r){return r<=0&&(e=t=n=NaN),new vj(e,t,n,r)}function mj(e){return e instanceof XN||(e=pj(e)),e?new vj((e=e.rgb()).r,e.g,e.b,e.opacity):new vj}function gj(e,t,n,r){return 1===arguments.length?mj(e):new vj(e,t,n,null==r?1:r)}function vj(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function yj(){return`#${wj(this.r)}${wj(this.g)}${wj(this.b)}`}function bj(){const e=xj(this.opacity);return`${1===e?"rgb(":"rgba("}${Sj(this.r)}, ${Sj(this.g)}, ${Sj(this.b)}${1===e?")":`, ${e})`}`}function xj(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Sj(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function wj(e){return((e=Sj(e))<16?"0":"")+e.toString(16)}function Cj(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ij(e,t,n,r)}function Ej(e){if(e instanceof Ij)return new Ij(e.h,e.s,e.l,e.opacity);if(e instanceof XN||(e=pj(e)),!e)return new Ij;if(e instanceof Ij)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Ij(a,s,l,e.opacity)}function Ij(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Dj(e){return(e=(e||0)%360)<0?e+360:e}function Rj(e){return Math.max(0,Math.min(1,e||0))}function Pj(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}YN(XN,pj,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:cj,formatHex:cj,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Ej(this).formatHsl()},formatRgb:dj,toString:dj}),YN(vj,gj,KN(XN,{brighter(e){return e=null==e?ZN:Math.pow(ZN,e),new vj(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?JN:Math.pow(JN,e),new vj(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new vj(Sj(this.r),Sj(this.g),Sj(this.b),xj(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:yj,formatHex:yj,formatHex8:function(){return`#${wj(this.r)}${wj(this.g)}${wj(this.b)}${wj(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:bj,toString:bj})),YN(Ij,function(e,t,n,r){return 1===arguments.length?Ej(e):new Ij(e,t,n,null==r?1:r)},KN(XN,{brighter(e){return e=null==e?ZN:Math.pow(ZN,e),new Ij(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?JN:Math.pow(JN,e),new Ij(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new vj(Pj(e>=240?e-240:e+120,i,r),Pj(e,i,r),Pj(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Ij(Dj(this.h),Rj(this.s),Rj(this.l),xj(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=xj(this.opacity);return`${1===e?"hsl(":"hsla("}${Dj(this.h)}, ${100*Rj(this.s)}%, ${100*Rj(this.l)}%${1===e?")":`, ${e})`}`}}));const Mj=Math.PI/180,Lj=180/Math.PI,Aj=.96422,kj=.82521,Oj=4/29,qj=6/29,Tj=3*qj*qj,Nj=qj*qj*qj;function jj(e){if(e instanceof _j)return new _j(e.l,e.a,e.b,e.opacity);if(e instanceof Hj)return Vj(e);e instanceof vj||(e=mj(e));var t,n,r=$j(e.r),i=$j(e.g),o=$j(e.b),a=Fj((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?t=n=a:(t=Fj((.4360747*r+.3850649*i+.1430804*o)/Aj),n=Fj((.0139322*r+.0971045*i+.7141733*o)/kj)),new _j(116*a-16,500*(t-a),200*(a-n),e.opacity)}function _j(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function Fj(e){return e>Nj?Math.pow(e,1/3):e/Tj+Oj}function zj(e){return e>qj?e*e*e:Tj*(e-Oj)}function Wj(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function $j(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Hj(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Vj(e){if(isNaN(e.h))return new _j(e.l,0,0,e.opacity);var t=e.h*Mj;return new _j(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}YN(_j,function(e,t,n,r){return 1===arguments.length?jj(e):new _j(e,t,n,null==r?1:r)},KN(XN,{brighter(e){return new _j(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new _j(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new vj(Wj(3.1338561*(t=Aj*zj(t))-1.6168667*(e=1*zj(e))-.4906146*(n=kj*zj(n))),Wj(-.9787684*t+1.9161415*e+.033454*n),Wj(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),YN(Hj,function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof Hj)return new Hj(e.h,e.c,e.l,e.opacity);if(e instanceof _j||(e=jj(e)),0===e.a&&0===e.b)return new Hj(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Lj;return new Hj(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new Hj(e,t,n,null==r?1:r)},KN(XN,{brighter(e){return new Hj(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new Hj(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return Vj(this).rgb()}}));var Bj=e=>()=>e;function Gj(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Bj(isNaN(e)?t:e)}!function e(t){var n=function(e){return 1===(e=+e)?Gj:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):Bj(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=gj(e)).r,(t=gj(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=Gj(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);var Uj="center",Yj="bottom";[{key:"NoDataExist",alignment:Uj,condition:function(e){var t=e.layoutService;if(!t)return!1;var n=t.meta.size;return n.x*n.y===0}},{key:"OnlyNanDataMeasure",translationKey:"OnlyNanData",alignment:Uj,condition:function(e){var t=e.layoutService;return!!t&&t.getHyperCubeValue("qMeasureInfo").every(function(e){return"NaN"===e.qMin&&"NaN"===e.qMax})}},{key:"OnlyNanDataDimensionContinuous",translationKey:"OnlyNanData",alignment:Uj,condition:function(e){var t=e.layoutService;if(!t)return!1;if(!t.meta.isContinuous)return!1;var n=t.getHyperCubeValue("qDimensionInfo.0");return n&&(n.qMax<n.qMin||"NaN"===n.qMax)}},{key:"OnlyNegativeOrZeroValues",alignment:Uj},{key:"DataRangeIncludingZero",alignment:Yj},{key:"LimitedData",alignment:Yj},{key:"NegativeOrZeroValues",alignment:Yj}].reduce(function(e,t){return e[t.key]=t,e},{});var Kj,Xj=["__proto__","constructor"];function Jj(e,t,n){if(void 0!==e&&void 0!==t){var r=t.split("."),i=r[r.length-1];if(!Xj.some(function(e){return r.includes(e)})){for(var o=e,a=0;a<r.length-1;++a){var s=r[a];void 0===o[s]&&(o[s]=Number.isNaN(+r[a+1])?{}:[]),o=o[s]}void 0!==n?o[i]=n:delete o[i]}}}function Zj(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return e},n=function(){var e={};return{get:function(t){return e[t]},set:function(t,n){return e[t]=n,n},has:function(t){return t in e},remove:function(t){delete e[t]},empty:function(){e={}}}}();return function(r){var i=t(r);return n.has(i)?n.get(i):n.set(i,e(r))}}function Qj(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return function(){for(var r=this,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];clearTimeout(t),t=setTimeout(function(){return e.apply(r,o)},n)}}function e_(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function t_(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=r_)):void 0===t&&(t=n_);for(var n,r,i,o,a,s=new a_(e),l=[s];n=l.pop();)if((i=t(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)l.push(r=i[o]=new a_(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(o_)}function n_(e){return e.children}function r_(e){return Array.isArray(e)?e[1]:null}function i_(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function o_(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function a_(e){this.data=e,this.depth=this.height=0,this.parent=null}a_.prototype=t_.prototype={constructor:a_,count:function(){return this.eachAfter(e_)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,i,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=s.pop();)e.call(t,o,++l,this);return this},eachBefore:function(e,t){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t},copy:function(){return t_(this).eachBefore(i_)},[Symbol.iterator]:function*(){var e,t,n,r,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n])}while(o.length)}},Kj=function(e){
100
+ */var wS,CS,ES={},IS={};function DS(){if(wS)return IS;wS=1;var e=Za;Object.defineProperty(IS,"__esModule",{value:!0}),IS.default=void 0;var t=(0,e(yv()).default)();return IS.default=t,IS}var RS,PS,MS={},LS={};function AS(){if(PS)return MS;PS=1;var e=Za;Object.defineProperty(MS,"__esModule",{value:!0}),MS.default=function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.breakpoints,a=void 0===o?["sm","md","lg"]:o,s=i.disableAlign,l=void 0!==s&&s,u=i.factor,c=void 0===u?2:u,d=i.variants,p=void 0===d?["h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","caption","button","overline"]:d,f=(0,t.default)({},e);f.typography=(0,t.default)({},f.typography);var h=f.typography,m=(0,r.convertLength)(h.htmlFontSize),g=a.map(function(e){return f.breakpoints.values[e]});return p.forEach(function(e){var i=h[e],o=parseFloat(m(i.fontSize,"rem"));if(!(o<=1)){var a=o,s=1+(a-1)/c,u=i.lineHeight;if(!(0,r.isUnitless)(u)&&!l)throw new Error((0,n.formatMuiErrorMessage)(6));(0,r.isUnitless)(u)||(u=parseFloat(m(u,"rem"))/parseFloat(o));var d=null;l||(d=function(e){return(0,r.alignProperty)({size:e,grid:(0,r.fontGrid)({pixels:4,lineHeight:u,htmlFontSize:h.htmlFontSize})})}),h[e]=(0,t.default)({},i,(0,r.responsiveProperty)({cssProperty:"fontSize",min:s,max:a,unit:"rem",breakpoints:g,transform:d}))}}),f};var t=e(Vs()),n=Mh,r=function(){if(RS)return LS;RS=1;var e=Za;Object.defineProperty(LS,"__esModule",{value:!0}),LS.isUnitless=function(e){return String(parseFloat(e)).length===String(e).length},LS.getUnit=n,LS.toUnitless=r,LS.convertLength=function(e){return function(t,i){var o=n(t);if(o===i)return t;var a=r(t);if("px"!==o)if("em"===o)a=r(t)*r(e);else if("rem"===o)return a=r(t)*r(e),t;var s=a;if("px"!==i)if("em"===i)s=a/r(e);else{if("rem"!==i)return t;s=a/r(e)}return parseFloat(s.toFixed(5))+i}},LS.alignProperty=function(e){var t=e.size,n=e.grid,r=t-t%n,i=r+n;return t-r<i-t?r:i},LS.fontGrid=function(e){var t=e.lineHeight;return e.pixels/(t*e.htmlFontSize)},LS.responsiveProperty=function(e){var n=e.cssProperty,r=e.min,i=e.max,o=e.unit,a=void 0===o?"rem":o,s=e.breakpoints,l=void 0===s?[600,960,1280]:s,u=e.transform,c=void 0===u?null:u,d=(0,t.default)({},n,"".concat(r).concat(a)),p=(i-r)/l[l.length-1];return l.forEach(function(e){var i=r+p*e;null!==c&&(i=c(i)),d["@media (min-width:".concat(e,"px)")]=(0,t.default)({},n,"".concat(Math.round(1e4*i)/1e4).concat(a))}),d};var t=e(Kh());function n(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function r(e){return parseFloat(e)}return LS}();return MS}var kS,OS={};var qS,TS={};var NS,jS={};var _S,FS={};!function(e){var t=Za,r=_f;Object.defineProperty(e,"__esModule",{value:!0});var i={createTheme:!0,createMuiTheme:!0,unstable_createMuiStrictModeTheme:!0,createStyles:!0,makeStyles:!0,responsiveFontSizes:!0,styled:!0,useTheme:!0,withStyles:!0,withTheme:!0,createGenerateClassName:!0,jssPreset:!0,ServerStyleSheets:!0,StylesProvider:!0,MuiThemeProvider:!0,ThemeProvider:!0};Object.defineProperty(e,"createTheme",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"createMuiTheme",{enumerable:!0,get:function(){return a.createMuiTheme}}),Object.defineProperty(e,"unstable_createMuiStrictModeTheme",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"createStyles",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"makeStyles",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"responsiveFontSizes",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"styled",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(e,"useTheme",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"withStyles",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"withTheme",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(e,"createGenerateClassName",{enumerable:!0,get:function(){return g.createGenerateClassName}}),Object.defineProperty(e,"jssPreset",{enumerable:!0,get:function(){return g.jssPreset}}),Object.defineProperty(e,"ServerStyleSheets",{enumerable:!0,get:function(){return g.ServerStyleSheets}}),Object.defineProperty(e,"StylesProvider",{enumerable:!0,get:function(){return g.StylesProvider}}),Object.defineProperty(e,"MuiThemeProvider",{enumerable:!0,get:function(){return g.ThemeProvider}}),Object.defineProperty(e,"ThemeProvider",{enumerable:!0,get:function(){return g.ThemeProvider}});var o=Ff;Object.keys(o).forEach(function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))});var a=r(yv()),s=t(function(){if(bv)return xv;bv=1;var e=Za;Object.defineProperty(xv,"__esModule",{value:!0}),xv.default=function(e){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return n.default.apply(void 0,[(0,t.deepmerge)({unstable_strictMode:!0},e)].concat(i))};var t=Mh,n=e(yv());return xv}()),l=t(function(){if(yS)return Sv;yS=1,Object.defineProperty(Sv,"__esModule",{value:!0}),Sv.default=function(t){return(0,e.createStyles)(t)};var e=SS;return Sv}()),u=t(function(){if(CS)return ES;CS=1;var e=Za;Object.defineProperty(ES,"__esModule",{value:!0}),ES.default=void 0;var t=e(Vs()),n=SS,r=e(DS()),i=function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,n.makeStyles)(e,(0,t.default)({defaultTheme:r.default},i))};return ES.default=i,ES}()),c=t(AS()),d=t(function(){if(kS)return OS;kS=1;var e=Za;Object.defineProperty(OS,"__esModule",{value:!0}),OS.default=void 0;var t=e(Vs()),n=SS,r=e(DS()),i=function(e){var i=(0,n.styled)(e);return function(e,n){return i(e,(0,t.default)({defaultTheme:r.default},n))}};return OS.default=i,OS}()),p=hv();Object.keys(p).forEach(function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return p[t]}}))});var f=t(function(){if(qS)return TS;qS=1;var e=Za;Object.defineProperty(TS,"__esModule",{value:!0}),TS.default=function(){return(0,t.useTheme)()||r.default};var t=SS;e(n);var r=e(DS());return TS}()),h=t(function(){if(NS)return jS;NS=1;var e=Za;Object.defineProperty(jS,"__esModule",{value:!0}),jS.default=void 0;var t=e(Vs()),n=SS,r=e(DS()),i=function(e,i){return(0,n.withStyles)(e,(0,t.default)({defaultTheme:r.default},i))};return jS.default=i,jS}()),m=t(function(){if(_S)return FS;_S=1;var e=Za;Object.defineProperty(FS,"__esModule",{value:!0}),FS.default=void 0;var t=SS,n=e(DS()),r=(0,t.withThemeCreator)({defaultTheme:n.default});return FS.default=r,FS}()),g=SS}(qf),qf.alpha(cf.GREYSCALE_0,.05),qf.alpha(cf.GREEN_PALE,.5),qf.alpha(cf.BLUE_PALE,.5),qf.alpha(cf.GREEN_PALE,.5),qf.alpha(cf.BLUE_PALE,.5),qf.alpha(cf.GREEN_PALE,.5),qf.alpha(cf.BLUE_PALE,.5),qf.alpha(cf.GREEN_PALE,.5),qf.alpha(cf.BLUE_PALE,.5),qf.alpha(cf.GREEN_PALE,.5),qf.alpha(cf.BLUE_PALE,.5);const zS=(e="light")=>kf();function WS(e){return"init"in e}function $S(e){return!!e.write}function HS(e){return"v"in e||"e"in e}function VS(e){if("e"in e)throw e.e;if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&!("v"in e))throw new Error("[Bug] atom state is not initialized");return e.v}function BS(e){return"function"==typeof(null==e?void 0:e.then)}function GS(e,t,n){if(!n.p.has(e)){n.p.add(e);const r=()=>n.p.delete(e);t.then(r,r)}}function US(e,t,n){const r=n.get(e),i=null==r?void 0:r.t,o=t.p;if(!(null==i?void 0:i.size))return o;if(!o.size)return i;const a=new Set(i);for(const e of o)a.add(e);return a}const YS=()=>{const e={},t=new WeakMap,n=n=>{var r,i;null==(r=t.get(e))||r.forEach(e=>e(n)),null==(i=t.get(n))||i.forEach(e=>e())};return n.add=(n,r)=>{const i=n||e;let o=t.get(i);return o||(o=new Set,t.set(i,o)),o.add(r),()=>{o.delete(r),o.size||t.delete(i)}},n};function KS(e){return e.i||(e.i=YS()),e.r||(e.r=YS()),e.c||(e.c=YS()),e.m||(e.m=YS()),e.u||(e.u=YS()),e.f||(e.f=(()=>{const e=new Set,t=()=>e.forEach(e=>e());return t.add=t=>(e.add(t),()=>e.delete(t)),t})()),e}const XS=(e,t,...n)=>t.read(...n),JS=(e,t,...n)=>t.write(...n),ZS=(e,t)=>{var n;return null==(n=t.INTERNAL_onInit)?void 0:n.call(t,e)},QS=(e,t,n)=>{var r;return null==(r=t.onMount)?void 0:r.call(t,n)},ew=(e,n)=>{var r;const i=vw(e),o=i[0],a=i[6],s=i[9];if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&!n)throw new Error("Atom is undefined or null");let l=o.get(n);return l||(l={d:new Map,p:new Set,n:0},o.set(n,l),null==(r=a.i)||r.call(a,n),null==s||s(e,n)),l},tw=e=>{var t;const n=vw(e),r=n[1],i=n[3],o=n[4],a=n[5],s=n[6],l=n[13];if(!(s.f||i.size||o.size||a.size))return;const u=[],c=e=>{try{e()}catch(e){u.push(e)}};do{s.f&&c(s.f);const n=new Set;for(const e of i){const i=null==(t=r.get(e))?void 0:t.l;if(i)for(const e of i)n.add(e)}i.clear();for(const e of a)n.add(e);a.clear();for(const e of o)n.add(e);o.clear();for(const e of n)c(e);i.size&&l(e)}while(i.size||a.size||o.size);if(u.length)throw new AggregateError(u)},nw=e=>{const n=vw(e),r=n[1],i=n[2],o=n[3],a=n[11],s=n[14],l=n[17];if(!o.size)return;const u=[],c=[],d=new WeakSet,p=new WeakSet,f=[],h=[];for(const t of o)f.push(t),h.push(a(e,t));for(;f.length;){const n=f.length-1,o=f[n],s=h[n];if(p.has(o))f.pop(),h.pop();else if(d.has(o)){if(i.get(o)===s.n)u.push(o),c.push(s);else if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&i.has(o))throw new Error("[Bug] invalidated atom exists");p.add(o),f.pop(),h.pop()}else{d.add(o);for(const t of US(o,s,r))d.has(t)||(f.push(t),h.push(a(e,t)))}}for(let t=u.length-1;t>=0;--t){const n=u[t],r=c[t];let a=!1;for(const e of r.d.keys())if(e!==n&&o.has(e)){a=!0;break}a&&(i.set(n,r.n),s(e,n),l(e,n)),i.delete(n)}},rw=new WeakSet,iw=(e,n)=>{var r,i;const o=vw(e),a=o[1],s=o[2],l=o[3],u=o[6],c=o[7],d=o[11],p=o[12],f=o[13],h=o[14],m=o[16],g=o[17],v=o[20],y=o[26],b=o[28],x=d(e,n),S=b[0];if(HS(x)){if(a.has(n)&&s.get(n)!==x.n||x.m===S)return x.m=S,x;let t=!1;for(const[n,r]of x.d)if(h(e,n).n!==r){t=!0;break}if(!t)return x.m=S,x}let w=!0;const C=new Set(x.d.keys()),E=()=>{for(const e of C)x.d.delete(e)},I=()=>{if(a.has(n)){const t=!l.size;g(e,n),t&&(f(e),p(e))}},D=t=>{var r;if(t===n){const n=d(e,t);if(!HS(n)){if(!WS(t))throw new Error("no atom init");v(e,t,t.init)}return VS(n)}const i=h(e,t);try{return VS(i)}finally{C.delete(t),x.d.set(t,i.n),BS(x.v)&&GS(n,x.v,i),a.has(n)&&(null==(r=a.get(t))||r.t.add(n)),w||I()}};let R,P;const M={get signal(){return R||(R=new AbortController),R.signal},get setSelf(){return"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&console.warn("[DEPRECATED] setSelf is deprecated and will be removed in v3."),"production"===(t.meta.env?t.meta.env.MODE:void 0)||$S(n)||console.warn("setSelf function cannot be used with read-only atom"),!P&&$S(n)&&(P=(...r)=>{if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&w&&console.warn("setSelf function cannot be called in sync"),!w)try{return m(e,n,...r)}finally{f(e),p(e)}}),P}},L=x.n,A=s.get(n)===L;try{"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&rw.delete(e);const i=c(e,n,D,M);if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&rw.has(e)&&console.warn("Detected store mutation during atom read. This is not supported."),v(e,n,i),BS(i)){y(e,i,()=>null==R?void 0:R.abort());const t=()=>{E(),I()};i.then(t,t)}else E();return null==(r=u.r)||r.call(u,n),x.m=S,x}catch(e){return delete x.v,x.e=e,++x.n,x.m=S,x}finally{w=!1,x.n!==L&&A&&(s.set(n,x.n),l.add(n),null==(i=u.c)||i.call(u,n))}},ow=(e,t)=>{const n=vw(e),r=n[1],i=n[2],o=n[11],a=[t];for(;a.length;){const t=a.pop(),n=o(e,t);for(const s of US(t,n,r)){const t=o(e,s);i.get(s)!==t.n&&(i.set(s,t.n),a.push(s))}}},aw=(e,n,...r)=>{const i=vw(e),o=i[3],a=i[6],s=i[8],l=i[11],u=i[12],c=i[13],d=i[14],p=i[15],f=i[16],h=i[17],m=i[20],g=i[28];let v=!0;const y=t=>VS(d(e,t)),b=(r,...i)=>{var s;const d=l(e,r);try{if(r===n){if(!WS(r))throw new Error("atom not writable");"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&rw.add(e);const n=d.n,l=i[0];return m(e,r,l),h(e,r),void(n!==d.n&&(++g[0],o.add(r),p(e,r),null==(s=a.c)||s.call(a,r)))}return f(e,r,...i)}finally{v||(c(e),u(e))}};try{return s(e,n,y,b,...r)}finally{v=!1}},sw=(e,t)=>{var n;const r=vw(e),i=r[1],o=r[3],a=r[6],s=r[11],l=r[15],u=r[18],c=r[19],d=s(e,t),p=i.get(t);if(p&&d.d.size>0){for(const[r,i]of d.d)if(!p.d.has(r)){const c=s(e,r);u(e,r).t.add(t),p.d.add(r),i!==c.n&&(o.add(r),l(e,r),null==(n=a.c)||n.call(a,r))}for(const n of p.d)if(!d.d.has(n)){p.d.delete(n);const r=c(e,n);null==r||r.t.delete(t)}}},lw=(e,t)=>{var n;const r=vw(e),i=r[1],o=r[4],a=r[6],s=r[10],l=r[11],u=r[12],c=r[13],d=r[14],p=r[16],f=r[18],h=l(e,t);let m=i.get(t);if(!m){d(e,t);for(const n of h.d.keys()){f(e,n).t.add(t)}if(m={l:new Set,d:new Set(h.d.keys()),t:new Set},i.set(t,m),$S(t)&&function(e){return!!e.onMount}(t)){const n=()=>{let n=!0;const r=(...r)=>{try{return p(e,t,...r)}finally{n||(c(e),u(e))}};try{const i=s(e,t,r);i&&(m.u=()=>{n=!0;try{i()}finally{n=!1}})}finally{n=!1}};o.add(n)}null==(n=a.m)||n.call(a,t)}return m},uw=(e,t)=>{var n,r;const i=vw(e),o=i[1],a=i[5],s=i[6],l=i[11],u=i[19],c=l(e,t);let d=o.get(t);if(!d||d.l.size)return d;let p=!1;for(const e of d.t)if(null==(n=o.get(e))?void 0:n.d.has(t)){p=!0;break}if(p)return d;d.u&&a.add(d.u),d=void 0,o.delete(t);for(const n of c.d.keys()){const r=u(e,n);null==r||r.t.delete(t)}null==(r=s.u)||r.call(s,t)},cw=(e,t,n)=>{const r=vw(e),i=r[11],o=r[27],a=i(e,t),s="v"in a,l=a.v;if(BS(n))for(const r of a.d.keys())GS(t,n,i(e,r));a.v=n,delete a.e,s&&Object.is(l,a.v)||(++a.n,BS(l)&&o(e,l))},dw=(e,t)=>VS((0,vw(e)[14])(e,t)),pw=(e,t,...n)=>{const r=vw(e),i=r[3],o=r[12],a=r[13],s=r[16],l=i.size;try{return s(e,t,...n)}finally{i.size!==l&&(a(e),o(e))}},fw=(e,t,n)=>{const r=vw(e),i=r[12],o=r[18],a=r[19],s=o(e,t).l;return s.add(n),i(e),()=>{s.delete(n),a(e,t),i(e)}},hw=(e,t,n)=>{const r=vw(e)[25];let i=r.get(t);if(!i){i=new Set,r.set(t,i);const e=()=>r.delete(t);t.then(e,e)}i.add(n)},mw=(e,t)=>{const n=vw(e)[25].get(t);null==n||n.forEach(e=>e())},gw=new WeakMap,vw=e=>{const n=gw.get(e);if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&!n)throw new Error("Store must be created by buildStore to read its building blocks");return n};function yw(e){const t=vw(e),n=t[24];return n?n(t):t}function bw(...e){const t={get:e=>(0,vw(t)[21])(t,e),set:(e,...n)=>(0,vw(t)[22])(t,e,...n),sub:(e,n)=>(0,vw(t)[23])(t,e,n)},n=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},XS,JS,ZS,QS,ew,tw,nw,iw,ow,aw,sw,lw,uw,cw,dw,pw,fw,void 0,new WeakMap,hw,mw,[0]].map((t,n)=>e[n]||t);return gw.set(t,Object.freeze(n)),t}let xw,Sw=0;function ww(e,n){const r="atom"+ ++Sw,i={toString(){return"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&this.debugLabel?r+":"+this.debugLabel:r}};return"function"==typeof e?i.read=e:(i.init=e,i.read=Cw,i.write=Ew),n&&(i.write=n),i}function Cw(e){return e(this)}function Ew(e,t,n){return t(this,"function"==typeof n?n(e(this)):n)}function Iw(){return bw()}const Dw=u(void 0);function Rw(e){const n=h(Dw);return(null==e?void 0:e.store)||n||(xw||(xw=Iw(),"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=xw),globalThis.__JOTAI_DEFAULT_STORE__!==xw&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),xw)}function Pw({children:e,store:t}){const n=l(null);return t?r(Dw.Provider,{value:t},e):(null===n.current&&(n.current=Iw()),r(Dw.Provider,{value:n.current},e))}const Mw=e=>"function"==typeof(null==e?void 0:e.then),Lw=e=>{e.status||(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}))},Aw=n.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(Lw(e),e)}),kw=new WeakMap,Ow=(e,t,n)=>{const r=yw(e)[26];let i=kw.get(t);return i||(i=new Promise((o,a)=>{let s=t;const l=e=>t=>{s===e&&o(t)},u=e=>t=>{s===e&&a(t)},c=()=>{try{const t=n();Mw(t)?(kw.set(t,i),s=t,t.then(l(t),u(t)),r(e,t,c)):o(t)}catch(e){a(e)}};t.then(l(t),u(t)),r(e,t,c)}),kw.set(t,i)),i};function qw(e,t){const{delay:r,unstable_promiseStatus:i=!n.use}={},o=Rw(t),[[a,s,l],u]=c(t=>{const n=o.get(e);return Object.is(t[0],n)&&t[1]===o&&t[2]===e?t:[n,o,e]},void 0,()=>[o.get(e),o,e]);let f=a;if(s===o&&l===e||(u(),f=o.get(e)),d(()=>{const t=o.sub(e,()=>{if(i)try{const t=o.get(e);Mw(t)&&Lw(Ow(o,t,()=>o.get(e)))}catch(e){}if("number"==typeof r)return console.warn("[DEPRECATED] delay option is deprecated and will be removed in v3.\n\nMigration guide:\n\nCreate a custom hook like the following.\n\nfunction useAtomValueWithDelay<Value>(\n atom: Atom<Value>,\n options: { delay: number },\n): Value {\n const { delay } = options\n const store = useStore(options)\n const [value, setValue] = useState(() => store.get(atom))\n useEffect(() => {\n const unsub = store.sub(atom, () => {\n setTimeout(() => setValue(store.get(atom)), delay)\n })\n return unsub\n }, [store, atom, delay])\n return value\n}\n"),void setTimeout(u,r);u()});return u(),t},[o,e,r,i]),p(f),Mw(f)){const t=Ow(o,f,()=>o.get(e));return i&&Lw(t),Aw(t)}return f}function Tw(e,n){const r=Rw(n);return f((...n)=>{if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&!("write"in e))throw new Error("not writable atom");return r.set(e,...n)},[r,e])}function Nw(e,t){return[qw(e,t),Tw(e,t)]}t.meta.env&&t.meta.env.MODE;!function(e=()=>{try{return window.localStorage}catch(e){return void("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&"undefined"!=typeof window&&console.warn(e))}},n){var r;let i,o;const a={getItem:(t,r)=>{var a,s;const l=e=>{if(i!==(e=e||"")){try{o=JSON.parse(e,null==n?void 0:n.reviver)}catch(e){return r}i=e}return o},u=null!=(s=null==(a=e())?void 0:a.getItem(t))?s:null;return(e=>"function"==typeof(null==e?void 0:e.then))(u)?u.then(l):l(u)},setItem:(t,n)=>{var r;return null==(r=e())?void 0:r.setItem(t,JSON.stringify(n,void 0))},removeItem:t=>{var n;return null==(n=e())?void 0:n.removeItem(t)}};let s;try{s=null==(r=e())?void 0:r.subscribe}catch(e){}var l;!s&&"undefined"!=typeof window&&"function"==typeof window.addEventListener&&window.Storage&&(s=(t,n)=>{if(!(e()instanceof window.Storage))return()=>{};const r=r=>{r.storageArea===e()&&r.key===t&&n(r.newValue)};return window.addEventListener("storage",r),()=>{window.removeEventListener("storage",r)}}),s&&(a.subscribe=(l=s,(e,t,n)=>l(e,e=>{let r;try{r=JSON.parse(e||"")}catch(e){r=n}t(r)})))}();const jw=(e,t,n)=>(t.has(n)?t:t.set(n,e())).get(n),_w=new WeakMap,Fw=()=>{};const zw=new WeakMap;function Ww(e,t){const n=Rw(t),r=$w(n);for(const[i,...o]of e)r.has(i)&&!(null==t?void 0:t.dangerouslyForceHydrate)||(r.add(i),n.set(i,...o))}const $w=e=>{let t=zw.get(e);return t||(t=new WeakSet,zw.set(e,t)),t};function Hw(){return Boolean("undefined"!=typeof process&&process.env?.NODE_ENV&&!1)}function Vw(e){const t=ww(()=>[]),n=ww(function(e){const[r,i,o]=e(t);o.has(n)&&(r.forEach(e),++i.n)});return n.effect=e,n.INTERNAL_onInit=e=>{const r=new Set;let i,o=0,a=!1,s=!1,l=!1;function u(){if(o)return;r.clear();let t=!0;const c=i=>{if(l)return e.get(i);if(i===n){const t=h(e,i);if(!HS(t)){if(!WS(i))throw new Error("no atom init");S(e,i,i.init)}return VS(t)}const o=v(e,i);try{return VS(o)}finally{C.d.set(i,o.n),d.get(i)?.t.add(n),t?r.add(i):d.has(i)&&(x(e,n),g(e),m(e))}};c.peek=e.get;const w=(r,...i)=>{const a=h(e,r);try{if(++o,r===n){if(!WS(r))throw new Error("atom not writable");const t=a.n,n=i[0];return S(e,r,n),x(e,r),void(t!==a.n&&(p.add(r),f.c?.(r),y(e,r)))}return b(e,r,...i)}finally{t||(g(e),m(e)),--o}};w.recurse=(t,...r)=>{if(l){if(Hw())throw new Error("set.recurse is not allowed in cleanup")}else try{return a=!0,x(e,n),w(t,...r)}finally{g(e),a=!1,s&&(s=!1,u())}};try{i?.();const e=n.effect(c,w);if("function"!=typeof e)return;i=()=>{if(!o)try{return t=!0,l=!0,e()}finally{t=!1,l=!1,i=void 0}}}finally{t=!1,r.forEach(t=>{C.d.set(t,h(e,t).n)}),x(e,n),g(e)}}const c=yw(e),d=c[1],p=c[3],f=KS(c[6]),h=c[11],m=c[12],g=c[13],v=c[14],y=c[15],b=c[16],x=c[17],S=c[20],w=function(e,t){let n=Bw.get(e);n||(n=new Set,Bw.set(e,n),t.f.add(function(){for(const e of n)n.delete(e),e()}));return n}(e,f),C=h(e,n);C.v=void 0,Object.assign(e.get(t),[r,C,d]),f.c.add(n,function(){p.delete(n)}),f.m.add(n,function(){w.add(u),i&&w.delete(i)}),f.u.add(n,function(){w.delete(u),i&&w.add(i)}),f.c.add(n,function(){a?s=!0:w.add(u)})},Hw()&&(Object.defineProperty(t,"debugLabel",{get:()=>n.debugLabel?`${n.debugLabel}:ref`:void 0,configurable:!0,enumerable:!0}),t.debugPrivate=!0),n}const Bw=new WeakMap;const Gw=async(e,t,n)=>{const r=e.get(n);void 0!==r&&("dimension"===r.type?await t.moveDimensionToAlternative(r.def.qDef.cId):await t.moveMeasureToAlternative(r.def.qDef.cId))},Uw=async(e,t,n)=>{const r=e.get(n);void 0!==r&&("dimension"===r.type?await t.moveDimensionFromAlternative(r.def.qDef.cId):await t.moveMeasureFromAlternative(r.def.qDef.cId))},Yw=async e=>{const{type:t,handler:n,model:r,fieldInfo:i,handlerQueue:o}=e;void 0!==n&&void 0!==r&&o&&o.add(async()=>{switch(t){case"apply":for(const t of e.localChecked)await Uw(i,n,t);for(const t of e.localUnchecked)await Gw(i,n,t);break;case"checked":await Uw(i,n,e.cId);break;case"unchecked":await Gw(i,n,e.cId)}})},Kw=ww(),Xw=ww(),Jw=ww(),Zw=ww(e=>e(Jw)?.translate??(e=>e)),Qw=ww(""),eC=ww(e=>{const t=e(Qw).toLowerCase().trim();return({title:e})=>e.toLowerCase().trim().includes(t)}),tC=ww(e=>e(Jw)?.getBooleanFlag??(()=>!1)),nC=e=>7005!==e.qError?.qErrorCode,rC=new WeakMap,iC={qInfo:{qType:"AlternativeLayout"},qHyperCubeDef:{qMode:"S",qDimensions:[],qMeasures:[],qInitialDataFetch:[{qTop:0,qLeft:0,qHeight:0,qWidth:0}],excludedNoOfLeftDims:-1,qCalcCond:{qv:"0"}}},oC=function(e,n=Fw){return((e,t,n)=>{const r=jw(()=>new WeakMap,_w,t);return jw(e,r,n)})(()=>{const r=new WeakMap,i=new WeakMap,o=ww(0),a=ww([]);a.INTERNAL_onInit=e=>{e.set(a,[()=>e.set(o,e=>e+1)])},"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&(o.debugPrivate=!0,a.debugPrivate=!0);const s=ww(t=>{let l;t(o);try{l=t(s)}catch(e){}const u=t(e);if(!(e=>"function"==typeof(null==e?void 0:e.then))(u))return{v:u};if(u!==(null==l?void 0:l.p)&&u.then(e=>{i.set(u,e);const[n]=t(a);n()},e=>{r.set(u,e);const[n]=t(a);n()}),r.has(u))throw r.get(u);return i.has(u)?{p:u,v:i.get(u)}:l&&"v"in l?{p:u,f:n(l.v),v:l.v}:{p:u,f:n()}});return s.init=void 0,"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&(s.debugPrivate=!0),ww(e=>{const t=e(s);return"f"in t?t.f:t.v},(t,n,...r)=>n(e,...r))},e,n)}(ww(async e=>{const t=e(Kw);if(t){if(rC.has(t))return rC.get(t);try{const e=await t.app.createSessionObject(iC);return rC.set(t,e),e}catch(e){return void console.error("Error creating alternative layout model:",e)}}})),aC=ww(null),sC=ww(),lC=Vw((e,t)=>{const n=e(Kw),r=e(oC);if(!n||!r)return;const i=async()=>{const e=await n.getLayout();if(e.qSelectionInfo?.qInSelections)return;const i=await n.getEffectiveProperties();await r.applyPatches([{qOp:"replace",qPath:"/qHyperCubeDef/qDimensions",qValue:JSON.stringify(i.qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions)},{qOp:"replace",qPath:"/qHyperCubeDef/qMeasures",qValue:JSON.stringify(i.qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures)}]);const o=await r.getLayout();t(sC,{layout:structuredClone(e),properties:structuredClone(i),altLayout:structuredClone(o)}),t(aC,null)};return i(),n.Invalidated?.bind(i),()=>{n.Invalidated?.unbind(i)}}),uC=ww(e=>e(sC)?.layout),cC=ww(e=>e(sC)?.altLayout),dC=ww(e=>e(sC)?.properties),pC=ww(e=>{const t=e(sC)?.layout;return t?.qHyperCube.qDimensionInfo.filter(nC)??[]}),fC=ww(e=>{const t=e(sC)?.layout;return t?.qHyperCube.qMeasureInfo.filter(nC)??[]}),hC=ww(e=>{const t=e(uC),n=e(pC),r=e(fC),i=e(dC),o=new Map;return t&&i?(n.forEach((e,t)=>{o.set(e.cId,{id:e.cId,type:"dimension",def:i.qHyperCubeDef.qDimensions[t]})}),r.forEach((e,t)=>{o.set(e.cId,{id:e.cId,type:"measure",def:i.qHyperCubeDef.qMeasures[t]})}),i.qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions?.forEach(e=>{o.set(e.qDef.cId,{id:e.qDef.cId,type:"dimension",def:e})}),i.qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures?.forEach(e=>{o.set(e.qDef.cId,{id:e.qDef.cId,type:"measure",def:e})}),o):o});class mC{#e=[];#t=!1;#n=!1;#r;#i;#o;#a;constructor({onQueueCompleted:e}){this.#r=e}#s(){this.#i=void 0,this.#o=void 0,this.#a=void 0}pause(){this.#i&&(clearTimeout(this.#a),this.#o?.(),this.#s());const{promise:e,resolve:t}=Promise.withResolvers();this.#i=e,this.#o=t,this.#a=setTimeout(()=>{this.abort("Aborting queue after being paused for too long")},6e4)}async continue(e=0){const t=this.#o;await(e=>new Promise(t=>{setTimeout(t,e)}))(e),t===this.#o&&(t?.(),clearTimeout(this.#a),this.#s())}abort(e="Queue aborted"){clearTimeout(this.#a),(this.#e.length>0||this.#t)&&console.warn(`[SequentialPromiseQueue] ${e}`),this.#n=!0,this.#e=[],this.#o?.(),this.#s()}add(e){this.#e.push(e),this.#t||this.#l()}async#l(){if(!this.#t){for(this.#t=!0,this.#n=!1;this.#e.length>0;)if(this.#i)await this.#i;else try{const e=this.#e.shift();await(e?.())}catch(e){return console.error("[SequentialPromiseQueue] Error executing action:",e),this.#e=[],void(this.#t=!1)}try{this.#n||await(this.#r?.())}catch(e){console.error("[SequentialPromiseQueue] Error executing onQueueCompleted:",e)}finally{this.#t=!1,this.#e.length>0&&this.#l()}}}}const gC=ww(null),vC=Vw((e,t)=>{const n=e(Kw),r=e(Xw),i=new mC({onQueueCompleted:async()=>{n&&r&&await n.applyPatches([{qPath:"/qHyperCubeDef",qOp:"replace",qValue:JSON.stringify(r.properties.qHyperCubeDef)}],!0)}});t(gC,i);const o=()=>{i.pause()},a=()=>{i.continue(500)},s=()=>{i.abort()};return n?.Invalidated?.bind(o),n?.Validated?.bind(a),n?.Cancelled?.bind(s),n?.Closing?.bind(s),()=>{i.abort(),n?.Invalidated?.unbind(o),n?.Validated?.unbind(a),n?.Cancelled?.unbind(s),n?.Closing?.unbind(s)}}),yC=ww(e=>{const t=[...e(pC),...e(fC)].map(e=>e.cId);return new Set(t)}),bC=ww(new Set),xC=ww(new Set),SC=ww(e=>{const t=e(bC),n=e(xC);return e(yC).difference(n).union(t)}),wC=Vw((e,t)=>{e(yC),t(bC,new Set),t(xC,new Set)}),CC=ww(e=>e(SC),(e,t,n)=>{const r=e(SC).has(n),i=new Set(e(xC)),o=new Set(e(bC));r?(i.add(n),o.delete(n)):(o.add(n),i.delete(n)),t(xC,i),t(bC,o),Yw({type:r?"unchecked":"checked",cId:n,handler:e(Xw),model:e(Kw),fieldInfo:e(hC),handlerQueue:e(gC)})}),EC=({props:e,children:t})=>(Ww([[Kw,e.args.model],[Jw,e.args.apis],[Xw,e.args.handler]]),qw(wC),qw(lC),qw(vC),t);function IC(e,t){const n=new Set(e),r=new Set(t);return e===t||n.size===r.size&&Array.from(n).every(r.has.bind(r))}function DC(e){return"write"in e}const RC=new WeakMap,PC={},{read:MC,write:LC}=ww(null);function AC(e,t,n){const[r,i,o,,a]=e,s=r.get(t);if(s)return s;if(n===e){let r=i.get(t);return r||(r=[TC(e,t,n),n],i.set(t,r)),r}const l=n??PC;let u=o.get(l);u||(u=new WeakMap,o.set(l,u));let c=u.get(t);if(!c){const[r,i]=a?AC(a,t,n):[t];c=[t.read===MC?r:TC(e,t,i),i],u.set(t,c)}return c}function kC(e){for(const t of e[5])t()}function OC(e,t,n,r,i){if(n.read===MC&&DC(n)&&DC(t)&&n.write!==LC&&e!==r){const{write:o}=n;return t.write=qC(e,n.write.bind(n),r,i),()=>{t.write=o}}}function qC(e,t,n,r=n){return function(i,o,...a){return t(function(t){const[r]=AC(e,t,n);return i(r)},function(t,...i){const[a]=AC(e,t,n),s=OC(e,a,t,n,r);try{return o(a,...i)}finally{null==s||s()}},...a)}}function TC(e,t,n){const r=Object.getOwnPropertyDescriptors(t);Object.keys(r).filter(e=>["read","write","debugLabel"].includes(e)).forEach(e=>r[e].configurable=!0);const i=Object.getPrototypeOf(t),o=Object.create(i,r);return o.read!==MC&&(o.read=function(e,t,n){return function(r,i){return t(function(t){const[i]=AC(e,t,n);return r(i)},i)}}(e,t.read.bind(t),n)),DC(o)&&DC(t)&&o.write!==LC&&(o.write=qC(e,t.write.bind(t),n)),o}function NC({atoms:e=[],atomFamilies:t=[],parentStore:n,name:r}){const i=new WeakSet(e),o=RC.get(n),a=(null==o?void 0:o[3])??n,s=[new WeakMap,new WeakMap,new WeakMap,a,o,new Set,void 0],l=s[0],u=s[5],c=function(e){const t=e[3],n=[...yw(t)],r=n[21],i=n[22],o=n[23],a=n[9],s={};n[9]=(e,t)=>a(l,t),n[21]=h(r),n[22]=p,n[23]=h(o),n[24]=([...e])=>{const t=[m(e[0],u),m(e[1],c),m(e[2]),g(e[3]),e[4],e[5],y(e[6]),h(e[7]),h(e[8]),e[9],h(e[10]),h(e[11],e=>d(t[0],e)),e[12],e[13],h(e[14]),h(e[15]),h(e[16]),h(e[17]),h(e[18]),h(e[19]),h(e[20]),h(e[21]),h(e[22]),h(e[23]),()=>e];return t};const l=bw(...n);return l;function u(t){const n=new WeakMap;return function(r){let i=n.get(r);if(i)return i;const o=t(r);return o?(i={...o,d:m(o.d,function(t){return n=>t(AC(e,n)[0])}),p:g(o.p),get n(){return o.n},set n(e){o.n=e},get v(){return o.v},set v(e){o.v=e},get e(){return o.e},set e(e){o.e=e}},n.set(r,i),i):void 0}}function c(e){const t=new WeakMap;return function(n){let r=t.get(n);if(r)return r;const i=e(n);return i?(r={...i,d:g(i.d),t:g(i.t),get u(){return i.u},set u(e){i.u=e}},t.set(n,r),r):void 0}}function d(e,t){return function(n,r){return e.get(r)||(e.set(r,t(n,r)),e.get(r))}}function p(t,n,...r){const[o,a]=AC(e,n),s=OC(e,o,n,a,e);try{return i(t,o,...r)}finally{null==s||s()}}function f(t,n){return function(r,...i){const[o]=AC(e,r);return(n?n(t):t)(o,...i)}}function h(t,n){return function(r,i,...o){const[a]=AC(e,i);return(n?n(t):t)(r,a,...o)}}function m(e,t){return{get:f(e.get.bind(e),t),set:f(e.set.bind(e)),has:f(e.has.bind(e)),delete:f(e.delete.bind(e))}}function g(t){return{get size(){return t.size},add:f(t.add.bind(t)),has:f(t.has.bind(t)),delete:f(t.delete.bind(t)),clear:t.clear.bind(t),forEach:e=>t.forEach(f(e)),*[Symbol.iterator](){for(const n of t)yield AC(e,n)[0]}}}function v(t){if(!t)return;const n=f(t);return n.add=function(n,r){if(void 0===n)return t.add(void 0,r);const[i]=AC(e,n);return t.add(i,r)},n}function y(e){const t={get f(){return e.f},set f(t){e.f=t}};return Object.defineProperties(t,Object.fromEntries(["r","c","m","u"].map(t=>[t,{get:()=>s[t]??(s[t]=v(e[t])),set(n){delete s[t],e[t]=n},configurable:!0,enumerable:!0}]))),Object.assign(t,e)}}(s);s[6]=c,Object.assign(c,{name:r}),RC.set(c,s);for(const t of new Set(e))l.set(t,[TC(s,t,s),s]);for(const e of new Set(t)){for(const t of e.getParams()){const n=e(t);l.has(n)||l.set(n,[TC(s,n,s),s])}const t=e.unstable_listen(({type:e,atom:t})=>{"CREATE"!==e||l.has(t)?"REMOVE"===e&&!i.has(t)&&l.delete(t):l.set(t,[TC(s,t,s),s])});u.add(t)}return c}const jC=function(e,t){return function(n){const{atoms:i=[],atomFamilies:o=[],children:a,scope:s,name:l}=n,u=t(),c=Array.from(i,e=>Array.isArray(e)?e[0]:e);function p(){return[s??NC({atoms:c,atomFamilies:o,parentStore:u,name:l}),function(e){return u!==e.parentStore||!IC(c,e.atoms)||!IC(o,e.atomFamilies)||s!==e.providedScope}]}const[[f,h],g]=m(p);if(h({atoms:c,atomFamilies:o,parentStore:u,providedScope:s})){const e=RC.get(f);e&&kC(e),g(p)}return Ww(Array.from(i).filter(Array.isArray),{store:f}),d(()=>{const e=RC.get(f);return()=>{e&&kC(e)}},[f]),r(e,{store:f,children:a})}}(Pw,Rw);var _C=Object.defineProperty,FC=Object.defineProperties,zC=Object.getOwnPropertyDescriptors,WC=Object.getOwnPropertySymbols,$C=Object.prototype.hasOwnProperty,HC=Object.prototype.propertyIsEnumerable,VC=(e,t,n)=>t in e?_C(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,BC=(e,t)=>{for(var n in t||(t={}))$C.call(t,n)&&VC(e,n,t[n]);if(WC)for(var n of WC(t))HC.call(t,n)&&VC(e,n,t[n]);return e},GC=(e,t)=>FC(e,zC(t));function UC(e,t,n){if(t===n)return e;const r=e.slice();return r.splice(n,0,r.splice(t,1)[0]),r}function YC(e){return"initialIndex"in e&&"number"==typeof e.initialIndex&&"index"in e&&"number"==typeof e.index}function KC(e,t){return function(e,t,n){var r,i,o;const{source:a,target:s,canceled:l}=t.operation;if(!a||!s||l)return"preventDefault"in t&&t.preventDefault(),e;const u=(e,t)=>e===t||"object"==typeof e&&"id"in e&&e.id===t;if(Array.isArray(e)){const r=e.findIndex(e=>u(e,a.id)),i=e.findIndex(e=>u(e,s.id));if(-1===r||-1===i){if(YC(a)){const r=a.initialIndex,i=a.index;return r===i||r<0||r>=e.length?("preventDefault"in t&&t.preventDefault(),e):n(e,r,i)}return e}if(!l&&"index"in a&&"number"==typeof a.index){const t=a.index;if(t!==r)return n(e,r,t)}return n(e,r,i)}const c=Object.entries(e);let d,p,f=-1,h=-1;for(const[e,t]of c)if(-1===f&&(f=t.findIndex(e=>u(e,a.id)),-1!==f&&(d=e)),-1===h&&(h=t.findIndex(e=>u(e,s.id)),-1!==h&&(p=e)),-1!==f&&-1!==h)break;if(-1===f&&YC(a)){const r=a.initialGroup,i=a.initialIndex,o=a.group,s=a.index;if(null==r||null==o||!(r in e)||!(o in e))return"preventDefault"in t&&t.preventDefault(),e;if(r===o&&i===s)return"preventDefault"in t&&t.preventDefault(),e;if(r===o)return GC(BC({},e),{[r]:n(e[r],i,s)});const l=e[r][i];return GC(BC({},e),{[r]:[...e[r].slice(0,i),...e[r].slice(i+1)],[o]:[...e[o].slice(0,s),l,...e[o].slice(s)]})}if(!a.manager)return e;const{dragOperation:m}=a.manager,g=null!=(i=null==(r=m.shape)?void 0:r.current.center)?i:m.position.current;if(null==p&&s.id in e){const t=s.shape&&g.y>s.shape.center.y?e[s.id].length:0;p=s.id,h=t}if(null==d||null==p||d===p&&f===h){if(null!=d&&d===p&&f===h&&YC(a)){const t=null!=a.group&&a.group!==d,r=a.index!==f;if(t||r){const t=null!=(o=a.group)?o:d;if(t in e){if(d===t)return GC(BC({},e),{[d]:n(e[d],f,a.index)});const r=e[d][f];return GC(BC({},e),{[d]:[...e[d].slice(0,f),...e[d].slice(f+1)],[t]:[...e[t].slice(0,a.index),r,...e[t].slice(a.index)]})}}}return"preventDefault"in t&&t.preventDefault(),e}if(d===p)return GC(BC({},e),{[d]:n(e[d],f,h)});const v=s.shape&&Math.round(g.y)>Math.round(s.shape.center.y)?1:0,y=e[d][f];return GC(BC({},e),{[d]:[...e[d].slice(0,f),...e[d].slice(f+1)],[p]:[...e[p].slice(0,h+v),y,...e[p].slice(h+v)]})}(e,t,UC)}function XC(e,t){let n=null;const r=new Map,i=new Set;function o(i){let s;if(void 0===t)s=r.get(i);else for(const[e,n]of r)if(t(e,i)){s=n;break}if(void 0!==s){if(!n?.(s[1],i))return s[0];o.remove(i)}const l=e(i);return r.set(i,[l,Date.now()]),a("CREATE",i,l),l}function a(e,t,n){for(const r of i)r({type:e,param:t,atom:n})}return o.unstable_listen=e=>(i.add(e),()=>{i.delete(e)}),o.getParams=()=>r.keys(),o.remove=e=>{if(void 0===t){if(!r.has(e))return;const[t]=r.get(e);r.delete(e),a("REMOVE",e,t)}else for(const[n,[i]]of r)if(t(n,e)){r.delete(n),a("REMOVE",n,i);break}},o.setShouldRemove=e=>{if(n=e,n)for(const[e,[t,i]]of r)n(i,e)&&(r.delete(e),a("REMOVE",e,t))},o}const JC=({itemIndex:e,sectionIndex:t})=>void 0!==e?`${t}-${e}`:`${t}`,ZC=ww(),QC=ww(e=>e(ZC)?.numberOfSections??0),eE=ww(e=>e(ZC)?.numberOfItemsInSection??[]),tE=ww(e=>e(ZC)?.keyExtractor??JC),nE=ww(e=>e(ZC)?.emptyTexts??(()=>({title:"No items",message:"There are no items to display."}))),rE=ww(e=>e(ZC)?.onDragEnd),iE=ww(e=>e(ZC)?.onDragOver),oE=ww(e=>e(ZC)?.itemRenderer),aE=ww(e=>e(ZC)?.headerRenderer),sE=ww(e=>e(ZC)?.dragOverlayRenderer),lE=ww(e=>e(ZC)?.onClick),uE=ww(e=>{const t=e(QC),n=e(eE),r=e(tE),i={};for(let e=0;e<t;e++)i[e]=Array.from({length:n[e]},(t,n)=>r({sectionIndex:e,itemIndex:n}));return i}),cE=ww(null),dE=ww(e=>e(cE),(e,t,n)=>{if(null===n)return void t(cE,null);const r=e(cE);t(cE,{...r,...n})}),pE=XC(e=>ww(null,(t,n,r)=>{let i;"over"===e?i=t(iE):"end"===e&&(i=t(rE),n(dE,null));const{source:o,target:a}=r.operation;if(null===a)return void n(dE,{toIndex:void 0,toSectionIndex:void 0});const s=o.data.sectionIndex!==a.data.sectionIndex;let l;if(s){const e=KC(t(uE),r)[a.data.sectionIndex].indexOf(o.id);l=-1!==e?e:a.sortable?.index??0}else l=a.sortable?.index??0;if("start"===e)n(dE,{id:o.id,startSection:o.data.sectionKey,startIndex:o.data.itemIndex,startSectionIndex:o.data.sectionIndex});else if("over"===e){const e=t(dE)?.startIndex;n(dE,{toIndex:!s&&void 0!==e&&l>e?l+1:l,toSectionIndex:a.data.sectionIndex})}i?.({id:o.id,toIndex:l,toSection:a.data.sectionKey,fromSection:o.data.sectionKey,startSection:t(dE)?.startSection??o.data.sectionKey,event:r})})),fE=[ZC,QC,eE,tE,nE,rE,oE,aE,lE,dE],hE=[pE],mE=({props:e,children:t})=>{const n=Tw(ZC);return g(()=>{n(e)},[e,n]),t};var gE=Symbol.for("preact-signals");function vE(){if(wE>1)wE--;else{var e,t=!1;for(!function(){var e=DE;for(DE=void 0;void 0!==e;)e.S.v===e.v&&(e.S.i=e.i),e=e.o}();void 0!==SE;){var n=SE;for(SE=void 0,CE++;void 0!==n;){var r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&AE(n))try{n.c()}catch(n){t||(e=n,t=!0)}n=r}}if(CE=0,wE--,t)throw e}}function yE(e){if(wE>0)return e();IE=++EE,wE++;try{return e()}finally{vE()}}var bE=void 0;function xE(e){var t=bE;bE=void 0;try{return e()}finally{bE=t}}var SE=void 0,wE=0,CE=0,EE=0,IE=0,DE=void 0,RE=0;function PE(e){if(void 0!==bE){var t=e.n;if(void 0===t||t.t!==bE)return t={i:0,S:e,p:bE.s,n:void 0,t:bE,e:void 0,x:void 0,r:t},void 0!==bE.s&&(bE.s.n=t),bE.s=t,e.n=t,32&bE.f&&e.S(t),t;if(-1===t.i)return t.i=0,void 0!==t.n&&(t.n.p=t.p,void 0!==t.p&&(t.p.n=t.n),t.p=bE.s,t.n=void 0,bE.s.n=t,bE.s=t),t}}function ME(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=null==t?void 0:t.watched,this.Z=null==t?void 0:t.unwatched,this.name=null==t?void 0:t.name}function LE(e,t){return new ME(e,t)}function AE(e){for(var t=e.s;void 0!==t;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function kE(e){for(var t=e.s;void 0!==t;t=t.n){var n=t.S.n;if(void 0!==n&&(t.r=n),t.S.n=t,t.i=-1,void 0===t.n){e.s=t;break}}}function OE(e){for(var t=e.s,n=void 0;void 0!==t;){var r=t.p;-1===t.i?(t.S.U(t),void 0!==r&&(r.n=t.n),void 0!==t.n&&(t.n.p=r)):n=t,t.S.n=t.r,void 0!==t.r&&(t.r=void 0),t=r}e.s=n}function qE(e,t){ME.call(this,void 0),this.x=e,this.s=void 0,this.g=RE-1,this.f=4,this.W=null==t?void 0:t.watched,this.Z=null==t?void 0:t.unwatched,this.name=null==t?void 0:t.name}function TE(e,t){return new qE(e,t)}function NE(e){var t=e.m;if(e.m=void 0,"function"==typeof t){wE++;var n=bE;bE=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,jE(e),t}finally{bE=n,vE()}}}function jE(e){for(var t=e.s;void 0!==t;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,NE(e)}function _E(e){if(bE!==this)throw new Error("Out-of-order effect");OE(this),bE=e,this.f&=-2,8&this.f&&jE(this),vE()}function FE(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=null==t?void 0:t.name}function zE(e,t){var n=new FE(e,t);try{n.c()}catch(e){throw n.d(),e}var r=n.d.bind(n);return r[Symbol.dispose]=r,r}ME.prototype.brand=gE,ME.prototype.h=function(){return!0},ME.prototype.S=function(e){var t=this,n=this.t;n!==e&&void 0===e.e&&(e.x=n,this.t=e,void 0!==n?n.e=e:xE(function(){var e;null==(e=t.W)||e.call(t)}))},ME.prototype.U=function(e){var t=this;if(void 0!==this.t){var n=e.e,r=e.x;void 0!==n&&(n.x=r,e.e=void 0),void 0!==r&&(r.e=n,e.x=void 0),e===this.t&&(this.t=r,void 0===r&&xE(function(){var e;null==(e=t.Z)||e.call(t)}))}},ME.prototype.subscribe=function(e){var t=this;return zE(function(){var n=t.value,r=bE;bE=void 0;try{e(n)}finally{bE=r}},{name:"sub"})},ME.prototype.valueOf=function(){return this.value},ME.prototype.toString=function(){return this.value+""},ME.prototype.toJSON=function(){return this.value},ME.prototype.peek=function(){var e=bE;bE=void 0;try{return this.value}finally{bE=e}},Object.defineProperty(ME.prototype,"value",{get:function(){var e=PE(this);return void 0!==e&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(CE>100)throw new Error("Cycle detected");!function(e){0!==wE&&0===CE&&e.l!==IE&&(e.l=IE,DE={S:e,v:e.v,i:e.i,o:DE})}(this),this.v=e,this.i++,RE++,wE++;try{for(var t=this.t;void 0!==t;t=t.x)t.t.N()}finally{vE()}}}}),qE.prototype=new ME,qE.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if(32==(36&this.f))return!0;if(this.f&=-5,this.g===RE)return!0;if(this.g=RE,this.f|=1,this.i>0&&!AE(this))return this.f&=-2,!0;var e=bE;try{kE(this),bE=this;var t=this.x();(16&this.f||this.v!==t||0===this.i)&&(this.v=t,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return bE=e,OE(this),this.f&=-2,!0},qE.prototype.S=function(e){if(void 0===this.t){this.f|=36;for(var t=this.s;void 0!==t;t=t.n)t.S.S(t)}ME.prototype.S.call(this,e)},qE.prototype.U=function(e){if(void 0!==this.t&&(ME.prototype.U.call(this,e),void 0===this.t)){this.f&=-33;for(var t=this.s;void 0!==t;t=t.n)t.S.U(t)}},qE.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;void 0!==e;e=e.x)e.t.N()}},Object.defineProperty(qE.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=PE(this);if(this.h(),void 0!==e&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),FE.prototype.c=function(){var e=this.S();try{if(8&this.f)return;if(void 0===this.x)return;var t=this.x();"function"==typeof t&&(this.m=t)}finally{e()}},FE.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,NE(this),kE(this),wE++;var e=bE;return bE=this,_E.bind(this,e)},FE.prototype.N=function(){2&this.f||(this.f|=2,this.u=SE,SE=this)},FE.prototype.d=function(){this.f|=8,1&this.f||jE(this)},FE.prototype.dispose=function(){this.d()};var WE,$E,HE,VE,BE,GE,UE,YE,KE,XE,JE,ZE,QE,eI,tI,nI,rI,iI,oI,aI,sI=Object.create,lI=Object.defineProperty,uI=Object.defineProperties,cI=Object.getOwnPropertyDescriptor,dI=Object.getOwnPropertyDescriptors,pI=Object.getOwnPropertySymbols,fI=Object.prototype.hasOwnProperty,hI=Object.prototype.propertyIsEnumerable,mI=e=>{throw TypeError(e)},gI=(e,t,n)=>t in e?lI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vI=(e,t)=>lI(e,"name",{value:t,configurable:!0}),yI=["class","method","getter","setter","accessor","field","value","get","set"],bI=e=>void 0!==e&&"function"!=typeof e?mI("Function expected"):e,xI=(e,t,n,r,i)=>({kind:yI[e],name:t,metadata:r,addInitializer:e=>n._?mI("Already initialized"):i.push(bI(e||null))}),SI=(e,t)=>{return gI(t,(n="metadata",(r=Symbol[n])?r:Symbol.for("Symbol."+n)),e[3]);var n,r},wI=(e,t,n,r)=>{for(var i=0,o=e[t>>1],a=o&&o.length;i<a;i++)1&t?o[i].call(n):r=o[i].call(n,r);return r},CI=(e,t,n,r,i,o)=>{var a,s,l,u,c,d=7&t,p=!!(8&t),f=!!(16&t),h=d>3?e.length+1:d?p?1:2:0,m=yI[d+5],g=d>3&&(e[h-1]=[]),v=e[h]||(e[h]=[]),y=d&&(!f&&!p&&(i=i.prototype),d<5&&(d>3||!f)&&cI(d<4?i:{get[n](){return DI(this,o)},set[n](e){return PI(this,o,e)}},n));d?f&&d<4&&vI(o,(d>2?"set ":d>1?"get ":"")+n):vI(i,n);for(var b=r.length-1;b>=0;b--)u=xI(d,n,l={},e[3],v),d&&(u.static=p,u.private=f,c=u.access={has:f?e=>II(i,e):e=>n in e},3^d&&(c.get=f?e=>(1^d?DI:MI)(e,i,4^d?o:y.get):e=>e[n]),d>2&&(c.set=f?(e,t)=>PI(e,i,t,4^d?o:y.set):(e,t)=>e[n]=t)),s=(0,r[b])(d?d<4?f?o:y[m]:d>4?void 0:{get:y.get,set:y.set}:i,u),l._=1,4^d||void 0===s?bI(s)&&(d>4?g.unshift(s):d?f?o=s:y[m]=s:i=s):"object"!=typeof s||null===s?mI("Object expected"):(bI(a=s.get)&&(y.get=a),bI(a=s.set)&&(y.set=a),bI(a=s.init)&&g.unshift(a));return d||SI(e,i),y&&lI(i,n,y),f?4^d?o:y:i},EI=(e,t,n)=>t.has(e)||mI("Cannot "+n),II=(e,t)=>Object(t)!==t?mI('Cannot use the "in" operator on this value'):e.has(t),DI=(e,t,n)=>(EI(e,t,"read from private field"),n?n.call(e):t.get(e)),RI=(e,t,n)=>t.has(e)?mI("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),PI=(e,t,n,r)=>(EI(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),MI=(e,t,n)=>(EI(e,t,"access private method"),n);function LI(e,t){if(t){let n;return TE(()=>{const r=e();return r&&n&&t(n,r)?n:(n=r,r)})}return TE(e)}function AI(e,t){if(Object.is(e,t))return!0;if(null===e||null===t)return!1;if("function"==typeof e&&"function"==typeof t)return e===t;if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;return!e.some((e,n)=>!AI(e,t[n]))}if("object"==typeof e&&"object"==typeof t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const i=n.some(n=>!AI(e[n],t[n]));return!i}return!1}function kI({get:e},t){return{init:e=>LE(e),get(){return e.call(this).value},set(t){const n=e.call(this);n.peek()!==t&&(n.value=t)}}}function OI(e,t){const n=new WeakMap;return function(){let t=n.get(this);return t||(t=LI(e.bind(this)),n.set(this,t)),t.value}}function qI(e=!0){return function(t,n){n.addInitializer(function(){const t="field"===n.kind||n.static?this:Object.getPrototypeOf(this),r=Object.getOwnPropertyDescriptor(t,n.name);r&&Object.defineProperty(t,n.name,((e,t)=>uI(e,dI(t)))(((e,t)=>{for(var n in t||(t={}))fI.call(t,n)&&gI(e,n,t[n]);if(pI)for(var n of pI(t))hI.call(t,n)&&gI(e,n,t[n]);return e})({},r),{enumerable:e}))})}}function TI(...e){const t=e.map(e=>zE(e));return()=>t.forEach(e=>e())}GE=[kI],BE=[kI],VE=[kI],HE=[qI()],$E=[qI()],WE=[qI()];var NI,jI=class{constructor(e,t=Object.is){this.defaultValue=e,this.equals=t,wI(UE,5,this),RI(this,ZE),RI(this,YE,wI(UE,8,this)),wI(UE,11,this),RI(this,QE,wI(UE,12,this)),wI(UE,15,this),RI(this,rI,wI(UE,16,this)),wI(UE,19,this),this.reset=this.reset.bind(this),this.reset()}get current(){return DI(this,ZE,oI)}get initial(){return DI(this,ZE,XE)}get previous(){return DI(this,ZE,tI)}set current(e){const t=xE(()=>DI(this,ZE,oI));e&&t&&this.equals(t,e)||yE(()=>{DI(this,ZE,XE)||PI(this,ZE,e,JE),PI(this,ZE,t,nI),PI(this,ZE,e,aI)})}reset(e=this.defaultValue){yE(()=>{PI(this,ZE,void 0,nI),PI(this,ZE,e,JE),PI(this,ZE,e,aI)})}};function _I(e){return xE(()=>{const t={};for(const n in e)t[n]=e[n];return t})}UE=[,,,sI(null)],YE=new WeakMap,ZE=new WeakSet,QE=new WeakMap,rI=new WeakMap,KE=CI(UE,20,"#initial",GE,ZE,YE),XE=KE.get,JE=KE.set,eI=CI(UE,20,"#previous",BE,ZE,QE),tI=eI.get,nI=eI.set,iI=CI(UE,20,"#current",VE,ZE,rI),oI=iI.get,aI=iI.set,CI(UE,2,"current",HE,jI),CI(UE,2,"initial",$E,jI),CI(UE,2,"previous",WE,jI),SI(UE,jI);NI=new WeakMap;var FI,zI,WI,$I,HI,VI=Object.create,BI=Object.defineProperty,GI=Object.getOwnPropertyDescriptor,UI=Object.getOwnPropertySymbols,YI=Object.prototype.hasOwnProperty,KI=Object.prototype.propertyIsEnumerable,XI=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),JI=e=>{throw TypeError(e)},ZI=Math.pow,QI=(e,t,n)=>t in e?BI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,eD=["class","method","getter","setter","accessor","field","value","get","set"],tD=e=>void 0!==e&&"function"!=typeof e?JI("Function expected"):e,nD=(e,t,n,r,i)=>({kind:eD[e],name:t,metadata:r,addInitializer:e=>n._?JI("Already initialized"):i.push(tD(e||null))}),rD=(e,t,n,r,i,o)=>{for(var a,s,l,u,c=7&t,d=eD[c+5],p=e[2]||(e[2]=[]),f=(i=i.prototype,GI(i,n)),h=r.length-1;h>=0;h--)(l=nD(c,n,s={},e[3],p)).static=false,l.private=false,u=l.access={has:e=>n in e},u.get=e=>e[n],a=(0,r[h])(f[d],l),s._=1,tD(a)&&(f[d]=a);return f&&BI(i,n,f),i},iD=(e,t,n)=>t.has(e)||JI("Cannot "+n),oD=class e{constructor(e,t){this.x=e,this.y=t}static delta(t,n){return new e(t.x-n.x,t.y-n.y)}static distance(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}static equals(e,t){return e.x===t.x&&e.y===t.y}static from({x:t,y:n}){return new e(t,n)}},aD=class e{constructor(e,t,n,r){this.left=e,this.top=t,this.width=n,this.height=r,this.scale={x:1,y:1}}get inverseScale(){return{x:1/this.scale.x,y:1/this.scale.y}}translate(t,n){const{top:r,left:i,width:o,height:a,scale:s}=this,l=new e(i+t,r+n,o,a);return l.scale=((e,t)=>{for(var n in t||(t={}))YI.call(t,n)&&QI(e,n,t[n]);if(UI)for(var n of UI(t))KI.call(t,n)&&QI(e,n,t[n]);return e})({},s),l}get boundingRectangle(){const{width:e,height:t,left:n,top:r,right:i,bottom:o}=this;return{width:e,height:t,left:n,top:r,right:i,bottom:o}}get center(){const{left:e,top:t,right:n,bottom:r}=this;return new oD((e+n)/2,(t+r)/2)}get area(){const{width:e,height:t}=this;return e*t}equals(t){if(!(t instanceof e))return!1;const{left:n,top:r,width:i,height:o}=this;return n===t.left&&r===t.top&&i===t.width&&o===t.height}containsPoint(e){const{top:t,left:n,bottom:r,right:i}=this;return t<=e.y&&e.y<=r&&n<=e.x&&e.x<=i}intersectionArea(t){return t instanceof e?function(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),a=i-r,s=o-n;if(r<i&&n<o){return a*s}return 0}(this,t):0}intersectionRatio(e){const{area:t}=this,n=this.intersectionArea(e);return n/(e.area+t-n)}get bottom(){const{top:e,height:t}=this;return e+t}get right(){const{left:e,width:t}=this;return e+t}get aspectRatio(){const{width:e,height:t}=this;return e/t}get corners(){return[{x:this.left,y:this.top},{x:this.right,y:this.top},{x:this.left,y:this.bottom},{x:this.right,y:this.bottom}]}static from({top:t,left:n,width:r,height:i}){return new e(n,t,r,i)}static delta(e,t,n={x:"center",y:"center"}){const r=(e,t)=>{const r=n[t],i="x"===t?e.left:e.top,o="x"===t?e.width:e.height;return"start"==r?i:"end"==r?i+o:i+o/2};return oD.delta({x:r(e,"x"),y:r(e,"y")},{x:r(t,"x"),y:r(t,"y")})}static intersectionRatio(t,n){return e.from(t).intersectionRatio(e.from(n))}};var sD,lD=class extends(WI=jI,zI=[OI],FI=[OI],WI){constructor(e){var t,n,r;super(oD.from(e),(e,t)=>oD.equals(e,t)),((e,t,n)=>{for(var r=0,i=e[t>>1],o=i&&i.length;r<o;r++)i[r].call(n)})(HI,5,this),t=this,r=0,(n=$I).has(t)?JI("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(t):n.set(t,r),this.velocity={x:0,y:0}}get delta(){return oD.delta(this.current,this.initial)}get direction(){const{current:e,previous:t}=this;if(!t)return null;const n={x:e.x-t.x,y:e.y-t.y};return n.x||n.y?Math.abs(n.x)>Math.abs(n.y)?n.x>0?"right":"left":n.y>0?"down":"up":null}get current(){return super.current}set current(e){const{current:t}=this,n=oD.from(e),r={x:n.x-t.x,y:n.y-t.y},i=Date.now(),o=i-(iD(a=this,s=$I,"read from private field"),s.get(a));var a,s;const l=e=>Math.round(e/o*100);yE(()=>{((e,t,n)=>{iD(e,t,"write to private field"),t.set(e,n)})(this,$I,i),this.velocity={x:l(r.x),y:l(r.y)},super.current=n})}reset(e=this.defaultValue){super.reset(oD.from(e)),this.velocity={x:0,y:0}}};function uD({x:e,y:t},n){const r=Math.abs(e),i=Math.abs(t);return"number"==typeof n?Math.sqrt(ZI(r,2)+ZI(i,2))>n:"x"in n&&"y"in n?r>n.x&&i>n.y:"x"in n?r>n.x:"y"in n&&i>n.y}HI=(e=>{var t;return[,,,VI(null!=(t=null==e?void 0:e[XI("metadata")])?t:null)]})(WI),$I=new WeakMap,rD(HI,2,"delta",zI,lD),rD(HI,2,"direction",FI,lD),sD=HI,QI(lD,XI("metadata"),sD[3]);var cD,dD,pD,fD,hD=(e=>(e.Horizontal="x",e.Vertical="y",e))(hD||{}),mD=Object.values(hD),gD=Object.create,vD=Object.defineProperty,yD=Object.defineProperties,bD=Object.getOwnPropertyDescriptor,xD=Object.getOwnPropertyDescriptors,SD=Object.getOwnPropertySymbols,wD=Object.prototype.hasOwnProperty,CD=Object.prototype.propertyIsEnumerable,ED=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),ID=e=>{throw TypeError(e)},DD=(e,t,n)=>t in e?vD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,RD=(e,t)=>{for(var n in t||(t={}))wD.call(t,n)&&DD(e,n,t[n]);if(SD)for(var n of SD(t))CD.call(t,n)&&DD(e,n,t[n]);return e},PD=(e,t)=>yD(e,xD(t)),MD=(e,t)=>vD(e,"name",{value:t,configurable:!0}),LD=(e,t)=>{var n={};for(var r in e)wD.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&SD)for(var r of SD(e))t.indexOf(r)<0&&CD.call(e,r)&&(n[r]=e[r]);return n},AD=e=>{var t;return[,,,gD(null!=(t=null==e?void 0:e[ED("metadata")])?t:null)]},kD=["class","method","getter","setter","accessor","field","value","get","set"],OD=e=>void 0!==e&&"function"!=typeof e?ID("Function expected"):e,qD=(e,t,n,r,i)=>({kind:kD[e],name:t,metadata:r,addInitializer:e=>n._?ID("Already initialized"):i.push(OD(e||null))}),TD=(e,t)=>DD(t,ED("metadata"),e[3]),ND=(e,t,n,r)=>{for(var i=0,o=e[t>>1],a=o&&o.length;i<a;i++)1&t?o[i].call(n):r=o[i].call(n,r);return r},jD=(e,t,n,r,i,o)=>{var a,s,l,u,c,d=7&t,p=!!(8&t),f=!!(16&t),h=d>3?e.length+1:d?p?1:2:0,m=kD[d+5],g=d>3&&(e[h-1]=[]),v=e[h]||(e[h]=[]),y=d&&(!f&&!p&&(i=i.prototype),d<5&&(d>3||!f)&&bD(d<4?i:{get[n](){return zD(this,o)},set[n](e){return $D(this,o,e)}},n));d?f&&d<4&&MD(o,(d>2?"set ":d>1?"get ":"")+n):MD(i,n);for(var b=r.length-1;b>=0;b--)u=qD(d,n,l={},e[3],v),d&&(u.static=p,u.private=f,c=u.access={has:f?e=>FD(i,e):e=>n in e},3^d&&(c.get=f?e=>(1^d?zD:HD)(e,i,4^d?o:y.get):e=>e[n]),d>2&&(c.set=f?(e,t)=>$D(e,i,t,4^d?o:y.set):(e,t)=>e[n]=t)),s=(0,r[b])(d?d<4?f?o:y[m]:d>4?void 0:{get:y.get,set:y.set}:i,u),l._=1,4^d||void 0===s?OD(s)&&(d>4?g.unshift(s):d?f?o=s:y[m]=s:i=s):"object"!=typeof s||null===s?ID("Object expected"):(OD(a=s.get)&&(y.get=a),OD(a=s.set)&&(y.set=a),OD(a=s.init)&&g.unshift(a));return d||TD(e,i),y&&vD(i,n,y),f?4^d?o:y:i},_D=(e,t,n)=>t.has(e)||ID("Cannot "+n),FD=(e,t)=>Object(t)!==t?ID('Cannot use the "in" operator on this value'):e.has(t),zD=(e,t,n)=>(_D(e,t,"read from private field"),n?n.call(e):t.get(e)),WD=(e,t,n)=>t.has(e)?ID("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),$D=(e,t,n,r)=>(_D(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),HD=(e,t,n)=>(_D(e,t,"access private method"),n);function VD(e,t){return{plugin:e,options:t}}function BD(e){return t=>VD(e,t)}function GD(e){return"function"==typeof e?{plugin:e,options:void 0}:e}cD=[kI];var UD=class{constructor(e,t){this.manager=e,this.options=t,WD(this,pD,ND(dD,8,this,!1)),ND(dD,11,this),WD(this,fD,new Set)}enable(){this.disabled=!1}disable(){this.disabled=!0}isDisabled(){return xE(()=>this.disabled)}configure(e){this.options=e}registerEffect(e){const t=zE(e.bind(this));return zD(this,fD).add(t),t}destroy(){zD(this,fD).forEach(e=>e())}static configure(e){return VD(this,e)}};dD=AD(null),pD=new WeakMap,fD=new WeakMap,jD(dD,4,"disabled",cD,UD,pD),TD(dD,UD);var YD,KD=class extends UD{},XD=class{constructor(e){this.manager=e,this.instances=new Map,WD(this,YD,[])}get values(){return Array.from(this.instances.values())}set values(e){const t=e.map(GD).reduceRight((e,t)=>e.some(({plugin:e})=>e===t.plugin)?e:[t,...e],[]),n=t.map(({plugin:e})=>e);for(const e of zD(this,YD))if(!n.includes(e)){if(e.prototype instanceof KD)continue;this.unregister(e)}for(const{plugin:e,options:n}of t)this.register(e,n);$D(this,YD,n)}get(e){return this.instances.get(e)}register(e,t){const n=this.instances.get(e);if(n)return n.options!==t&&(n.options=t),n;const r=new e(this.manager,t);return this.instances.set(e,r),r}unregister(e){const t=this.instances.get(e);t&&(t.destroy(),this.instances.delete(e))}destroy(){for(const e of this.instances.values())e.destroy();this.instances.clear()}};function JD(e,t){return e.priority===t.priority?e.type===t.type?t.value-e.value:t.type-e.type:t.priority-e.priority}YD=new WeakMap;var ZD,QD,eR=[],tR=class extends UD{constructor(e){super(e),WD(this,ZD),WD(this,QD),this.computeCollisions=this.computeCollisions.bind(this),$D(this,QD,LE(eR)),this.destroy=TI(()=>{const e=this.computeCollisions(),t=xE(()=>this.manager.dragOperation.position.current);if(e!==eR){const e=zD(this,ZD);if($D(this,ZD,t),e&&t.x==e.x&&t.y==e.y)return}else $D(this,ZD,void 0);zD(this,QD).value=e},()=>{const{dragOperation:e}=this.manager;e.status.initialized&&this.forceUpdate()})}forceUpdate(e=!0){xE(()=>{e?zD(this,QD).value=this.computeCollisions():$D(this,ZD,void 0)})}computeCollisions(e,t){const{registry:n,dragOperation:r}=this.manager,{source:i,shape:o,status:a}=r;if(!a.initialized||!o)return eR;const s=[],l=[];for(const o of null!=e?e:n.droppables){if(o.disabled)continue;if(i&&!o.accepts(i))continue;const e=null!=t?t:o.collisionDetector;if(!e)continue;l.push(o),o.shape;const n=xE(()=>e({droppable:o,dragOperation:r}));n&&(null!=o.collisionPriority&&(n.priority=o.collisionPriority),s.push(n))}return 0===l.length?eR:(s.sort(JD),s)}get collisions(){return zD(this,QD).value}};ZD=new WeakMap,QD=new WeakMap;var nR=class{constructor(){this.registry=new Map}addEventListener(e,t){const{registry:n}=this,r=new Set(n.get(e));return r.add(t),n.set(e,r),()=>this.removeEventListener(e,t)}removeEventListener(e,t){const{registry:n}=this,r=new Set(n.get(e));r.delete(t),n.set(e,r)}dispatch(e,...t){const{registry:n}=this,r=n.get(e);if(r)for(const e of r)e(...t)}},rR=class extends nR{constructor(e){super(),this.manager=e}dispatch(e,t){const n=[t,this.manager];super.dispatch(e,...n)}};function iR(e,t=!0){let n=!1;return PD(RD({},e),{cancelable:t,get defaultPrevented(){return n},preventDefault(){t&&(n=!0)}})}var oR,aR,sR,lR,uR,cR,dR,pR,fR,hR=class extends KD{constructor(e){super(e);let t=[];this.destroy=TI(()=>{const{dragOperation:n,collisionObserver:r}=e;n.status.initializing&&(t=[],r.enable())},()=>{const{collisionObserver:n,monitor:r}=e,{collisions:i}=n;if(n.isDisabled())return;const o=iR({collisions:i});if(r.dispatch("collision",o),o.defaultPrevented)return;if(((e,t)=>e.map(({id:e})=>e).join("")===t.map(({id:e})=>e).join(""))(i,t))return;t=i;const[a]=i;xE(()=>{var t;(null==a?void 0:a.id)!==(null==(t=e.dragOperation.target)?void 0:t.id)&&(n.disable(),e.actions.setDropTarget(null==a?void 0:a.id).then(()=>{n.enable()}))})})}},mR=(e=>(e[e.Lowest=0]="Lowest",e[e.Low=1]="Low",e[e.Normal=2]="Normal",e[e.High=3]="High",e[e.Highest=4]="Highest",e))(mR||{}),gR=(e=>(e[e.Collision=0]="Collision",e[e.ShapeIntersection=1]="ShapeIntersection",e[e.PointerIntersection=2]="PointerIntersection",e))(gR||{});dR=[kI],cR=[OI],uR=[OI],lR=[OI],sR=[OI],aR=[OI],oR=[OI];var vR=class{constructor(){ND(pR,5,this),WD(this,fR,ND(pR,8,this,"idle")),ND(pR,11,this)}get current(){return this.value}get idle(){return"idle"===this.value}get initializing(){return"initializing"===this.value}get initialized(){const{value:e}=this;return"idle"!==e&&"initialization-pending"!==e}get dragging(){return"dragging"===this.value}get dropped(){return"dropped"===this.value}set(e){this.value=e}};pR=AD(null),fR=new WeakMap,jD(pR,4,"value",dR,vR,fR),jD(pR,2,"current",cR,vR),jD(pR,2,"idle",uR,vR),jD(pR,2,"initializing",lR,vR),jD(pR,2,"initialized",sR,vR),jD(pR,2,"dragging",aR,vR),jD(pR,2,"dropped",oR,vR),TD(pR,vR);var yR,bR,xR,SR,wR,CR,ER,IR,DR,RR=class{constructor(e){this.manager=e}setDragSource(e){const{dragOperation:t}=this.manager;t.sourceIdentifier="string"==typeof e||"number"==typeof e?e:e.id}setDropTarget(e){return xE(()=>{const{dragOperation:t}=this.manager,n=null!=e?e:null;if(t.targetIdentifier===n)return Promise.resolve(!1);t.targetIdentifier=n;const r=iR({operation:t.snapshot()});return t.status.dragging&&this.manager.monitor.dispatch("dragover",r),this.manager.renderer.rendering.then(()=>r.defaultPrevented)})}start(e){return xE(()=>{const{dragOperation:t}=this.manager;null!=e.source&&this.setDragSource(e.source);if(!t.source)throw new Error("Cannot start a drag operation without a drag source");if(!t.status.idle)throw new Error("Cannot start a drag operation while another is active");const n=new AbortController,{event:r,coordinates:i}=e;yE(()=>{t.status.set("initialization-pending"),t.shape=null,t.canceled=!1,t.activatorEvent=null!=r?r:null,t.position.reset(i)});const o=iR({operation:t.snapshot()});return this.manager.monitor.dispatch("beforedragstart",o),o.defaultPrevented?(t.reset(),n.abort(),n):(t.status.set("initializing"),t.controller=n,this.manager.renderer.rendering.then(()=>{if(n.signal.aborted)return;const{status:e}=t;"initializing"===e.current&&(t.status.set("dragging"),this.manager.monitor.dispatch("dragstart",{nativeEvent:r,operation:t.snapshot(),cancelable:!1}))}),n)})}move(e){return xE(()=>{var t,n;const{dragOperation:r}=this.manager,{status:i,controller:o}=r;if(!i.dragging||!o||o.signal.aborted)return;const a=iR({nativeEvent:e.event,operation:r.snapshot(),by:e.by,to:e.to},null==(t=e.cancelable)||t);(null==(n=e.propagate)||n)&&this.manager.monitor.dispatch("dragmove",a),queueMicrotask(()=>{var t,n,i,o,s;if(a.defaultPrevented)return;const l=null!=(s=e.to)?s:{x:r.position.current.x+(null!=(n=null==(t=e.by)?void 0:t.x)?n:0),y:r.position.current.y+(null!=(o=null==(i=e.by)?void 0:i.y)?o:0)};r.position.current=l})})}stop(e={}){return xE(()=>{var t,n;const{dragOperation:r}=this.manager,{controller:i}=r;if(!i||i.signal.aborted)return;let o;i.abort();const a=()=>{this.manager.renderer.rendering.then(()=>{r.status.set("dropped");const e=xE(()=>{var e;return"dropping"===(null==(e=r.source)?void 0:e.status)}),t=()=>{r.controller===i&&(r.controller=void 0),r.reset()};if(e){const{source:e}=r,n=zE(()=>{"idle"===(null==e?void 0:e.status)&&(n(),t())})}else this.manager.renderer.rendering.then(t)})};r.canceled=null!=(t=e.canceled)&&t,this.manager.monitor.dispatch("dragend",{nativeEvent:e.event,operation:r.snapshot(),canceled:null!=(n=e.canceled)&&n,suspend:()=>{const e={resume:()=>{},abort:()=>{}};return o=new Promise((t,n)=>{e.resume=t,e.abort=n}),e}}),o?o.then(a).catch(()=>r.reset()):a()})}};SR=[kI],xR=[kI],bR=[kI],yR=[kI];var PR=class{constructor(e,t){WD(this,CR,ND(wR,8,this)),ND(wR,11,this),WD(this,ER,ND(wR,12,this)),ND(wR,15,this),WD(this,IR,ND(wR,16,this)),ND(wR,19,this),WD(this,DR,ND(wR,20,this)),ND(wR,23,this);const{effects:n,id:r,data:i={},disabled:o=!1,register:a=!0}=e;let s=r;this.manager=t,this.id=r,this.data=i,this.disabled=o,this.effects=()=>{var e;return[()=>{const{id:e,manager:t}=this;if(e!==s)return null==t||t.registry.register(this),()=>null==t?void 0:t.registry.unregister(this)},...null!=(e=null==n?void 0:n())?e:[]]},this.register=this.register.bind(this),this.unregister=this.unregister.bind(this),this.destroy=this.destroy.bind(this),t&&a&&queueMicrotask(this.register)}register(){var e;return null==(e=this.manager)?void 0:e.registry.register(this)}unregister(){var e;null==(e=this.manager)||e.registry.unregister(this)}destroy(){var e;null==(e=this.manager)||e.registry.unregister(this)}};wR=AD(null),CR=new WeakMap,ER=new WeakMap,IR=new WeakMap,DR=new WeakMap,jD(wR,4,"manager",SR,PR,CR),jD(wR,4,"id",xR,PR,ER),jD(wR,4,"data",bR,PR,IR),jD(wR,4,"disabled",yR,PR,DR),TD(wR,PR);var MR,LR,AR,kR,OR,qR,TR,NR,jR,_R,FR,zR,WR,$R,HR,VR,BR,GR,UR,YR,KR,XR,JR,ZR,QR=class{constructor(){this.map=LE(new Map),this.cleanupFunctions=new WeakMap,this.register=(e,t)=>{const n=this.map.peek(),r=n.get(e),i=()=>this.unregister(e,t);if(r===t)return i;if(r){const e=this.cleanupFunctions.get(r);null==e||e(),this.cleanupFunctions.delete(r)}const o=new Map(n);o.set(e,t),this.map.value=o;const a=TI(...t.effects());return this.cleanupFunctions.set(t,a),i},this.unregister=(e,t)=>{const n=this.map.peek();if(n.get(e)!==t)return;const r=this.cleanupFunctions.get(t);null==r||r(),this.cleanupFunctions.delete(t);const i=new Map(n);i.delete(e),this.map.value=i}}[Symbol.iterator](){return this.map.peek().values()}get value(){return this.map.value.values()}has(e){return this.map.value.has(e)}get(e){return this.map.value.get(e)}destroy(){for(const e of this){const t=this.cleanupFunctions.get(e);null==t||t(),e.destroy()}this.map.value=new Map}},eP=class extends(TR=PR,qR=[kI],OR=[kI],kR=[kI],AR=[OI],LR=[OI],MR=[OI],TR){constructor(e,t){var n=e,{modifiers:r,type:i,sensors:o}=n,a=LD(n,["modifiers","type","sensors"]);super(a,t),ND(NR,5,this),WD(this,jR,ND(NR,8,this)),ND(NR,11,this),WD(this,_R,ND(NR,12,this)),ND(NR,15,this),WD(this,FR,ND(NR,16,this,this.isDragSource?"dragging":"idle")),ND(NR,19,this),this.type=i,this.sensors=o,this.modifiers=r,this.alignment=a.alignment}get isDropping(){return"dropping"===this.status&&this.isDragSource}get isDragging(){return"dragging"===this.status&&this.isDragSource}get isDragSource(){var e,t;return(null==(t=null==(e=this.manager)?void 0:e.dragOperation.source)?void 0:t.id)===this.id}};NR=AD(TR),jR=new WeakMap,_R=new WeakMap,FR=new WeakMap,jD(NR,4,"type",qR,eP,jR),jD(NR,4,"modifiers",OR,eP,_R),jD(NR,4,"status",kR,eP,FR),jD(NR,2,"isDropping",AR,eP),jD(NR,2,"isDragging",LR,eP),jD(NR,2,"isDragSource",MR,eP),TD(NR,eP);var tP=class extends(GR=PR,BR=[kI],VR=[kI],HR=[kI],$R=[kI],WR=[kI],zR=[OI],GR){constructor(e,t){var n=e,{accept:r,collisionDetector:i,collisionPriority:o,type:a}=n;super(LD(n,["accept","collisionDetector","collisionPriority","type"]),t),ND(UR,5,this),WD(this,YR,ND(UR,8,this)),ND(UR,11,this),WD(this,KR,ND(UR,12,this)),ND(UR,15,this),WD(this,XR,ND(UR,16,this)),ND(UR,19,this),WD(this,JR,ND(UR,20,this)),ND(UR,23,this),WD(this,ZR,ND(UR,24,this)),ND(UR,27,this),this.accept=r,this.collisionDetector=i,this.collisionPriority=o,this.type=a}accepts(e){const{accept:t}=this;return!t||("function"==typeof t?t(e):!!e.type&&(Array.isArray(t)?t.includes(e.type):e.type===t))}get isDropTarget(){var e,t;return(null==(t=null==(e=this.manager)?void 0:e.dragOperation.target)?void 0:t.id)===this.id}};UR=AD(GR),YR=new WeakMap,KR=new WeakMap,XR=new WeakMap,JR=new WeakMap,ZR=new WeakMap,jD(UR,4,"accept",BR,tP,YR),jD(UR,4,"type",VR,tP,KR),jD(UR,4,"collisionDetector",HR,tP,XR),jD(UR,4,"collisionPriority",$R,tP,JR),jD(UR,4,"shape",WR,tP,ZR),jD(UR,2,"isDropTarget",zR,tP),TD(UR,tP);var nP,rP=class extends UD{constructor(e,t){super(e,t),this.manager=e,this.options=t}},iP=class extends AbortController{constructor(e,t){super(),this.constraints=e,this.onActivate=t,this.activated=!1;for(const t of null!=e?e:[])t.controller=this}onEvent(e){var t;if(!this.activated)if(null==(t=this.constraints)?void 0:t.length)for(const t of this.constraints)t.onEvent(e);else this.activate(e)}activate(e){this.activated||(this.activated=!0,this.onActivate(e))}abort(e){this.activated=!1,super.abort(e)}},oP=class{constructor(e){this.options=e,WD(this,nP)}set controller(e){$D(this,nP,e),e.signal.addEventListener("abort",()=>this.abort())}activate(e){var t;null==(t=zD(this,nP))||t.activate(e)}};nP=new WeakMap;var aP,sP,lP,uP,cP,dP,pP,fP,hP,mP,gP,vP,yP,bP,xP,SP,wP,CP,EP,IP=class extends UD{constructor(e,t){super(e,t),this.manager=e,this.options=t}apply(e){return e.transform}},DP=class{constructor(e){this.draggables=new QR,this.droppables=new QR,this.plugins=new XD(e),this.sensors=new XD(e),this.modifiers=new XD(e)}register(e,t){if(e instanceof eP)return this.draggables.register(e.id,e);if(e instanceof tP)return this.droppables.register(e.id,e);if(e.prototype instanceof IP)return this.modifiers.register(e,t);if(e.prototype instanceof rP)return this.sensors.register(e,t);if(e.prototype instanceof UD)return this.plugins.register(e,t);throw new Error("Invalid instance type")}unregister(e){if(e instanceof PR)return e instanceof eP?this.draggables.unregister(e.id,e):e instanceof tP?this.droppables.unregister(e.id,e):()=>{};if(e.prototype instanceof IP)return this.modifiers.unregister(e);if(e.prototype instanceof rP)return this.sensors.unregister(e);if(e.prototype instanceof UD)return this.plugins.unregister(e);throw new Error("Invalid instance type")}destroy(){this.draggables.destroy(),this.droppables.destroy(),this.plugins.destroy(),this.sensors.destroy(),this.modifiers.destroy()}};hP=[OI],fP=[kI],pP=[kI],dP=[kI],cP=[kI],uP=[kI],lP=[OI],sP=[OI],aP=[OI];var RP=class{constructor(e){ND(yP,5,this),WD(this,mP),WD(this,gP),WD(this,vP,new jI(void 0,(e,t)=>e&&t?e.equals(t):e===t)),this.status=new vR,WD(this,bP,ND(yP,8,this,!1)),ND(yP,11,this),WD(this,xP,ND(yP,12,this,null)),ND(yP,15,this),WD(this,SP,ND(yP,16,this,null)),ND(yP,19,this),WD(this,wP,ND(yP,20,this,null)),ND(yP,23,this),WD(this,CP,ND(yP,24,this,[])),ND(yP,27,this),this.position=new lD({x:0,y:0}),WD(this,EP,{x:0,y:0}),$D(this,mP,e)}get shape(){const{current:e,initial:t,previous:n}=zD(this,vP);return e&&t?{current:e,initial:t,previous:n}:null}set shape(e){e?zD(this,vP).current=e:zD(this,vP).reset()}get source(){var e;const t=this.sourceIdentifier;if(null==t)return null;const n=zD(this,mP).registry.draggables.get(t);return n&&$D(this,gP,n),null!=(e=null!=n?n:zD(this,gP))?e:null}get target(){var e;const t=this.targetIdentifier;return null!=t&&null!=(e=zD(this,mP).registry.droppables.get(t))?e:null}get transform(){const{x:e,y:t}=this.position.delta;let n={x:e,y:t};for(const e of this.modifiers)n=e.apply(PD(RD({},this.snapshot()),{transform:n}));return $D(this,EP,n),n}snapshot(){return xE(()=>({source:this.source,target:this.target,activatorEvent:this.activatorEvent,transform:zD(this,EP),shape:this.shape?_I(this.shape):null,position:_I(this.position),status:_I(this.status),canceled:this.canceled}))}reset(){yE(()=>{this.status.set("idle"),this.sourceIdentifier=null,this.targetIdentifier=null,zD(this,vP).reset(),this.position.reset({x:0,y:0}),$D(this,EP,{x:0,y:0}),this.modifiers=[]})}};yP=AD(null),mP=new WeakMap,gP=new WeakMap,vP=new WeakMap,bP=new WeakMap,xP=new WeakMap,SP=new WeakMap,wP=new WeakMap,CP=new WeakMap,EP=new WeakMap,jD(yP,2,"shape",hP,RP),jD(yP,4,"canceled",fP,RP,bP),jD(yP,4,"activatorEvent",pP,RP,xP),jD(yP,4,"sourceIdentifier",dP,RP,SP),jD(yP,4,"targetIdentifier",cP,RP,wP),jD(yP,4,"modifiers",uP,RP,CP),jD(yP,2,"source",lP,RP),jD(yP,2,"target",sP,RP),jD(yP,2,"transform",aP,RP),TD(yP,RP);var PP={get rendering(){return Promise.resolve()}};function MP(e,t){return"function"==typeof e?e(t):null!=e?e:t}var LP=class{constructor(e){var t;this.destroy=()=>{this.dragOperation.status.idle||this.actions.stop({canceled:!0}),this.dragOperation.modifiers.forEach(e=>e.destroy()),this.registry.destroy(),this.collisionObserver.destroy()};const n=null!=e?e:{},r=MP(n.plugins,[]),i=MP(n.sensors,[]),o=MP(n.modifiers,[]),a=null!=(t=n.renderer)?t:PP,s=new rR(this),l=new DP(this);this.registry=l,this.monitor=s,this.renderer=a,this.actions=new RR(this),this.dragOperation=new RP(this),this.collisionObserver=new tR(this),this.plugins=[hR,...r],this.modifiers=o,this.sensors=i;const{destroy:u}=this,c=TI(()=>{var e,t,n;const r=xE(()=>this.dragOperation.modifiers),i=this.modifiers;for(const e of r)i.includes(e)||e.destroy();this.dragOperation.modifiers=null!=(n=null==(t=null==(e=this.dragOperation.source)?void 0:e.modifiers)?void 0:t.map(e=>{const{plugin:t,options:n}=GD(e);return new t(this,n)}))?n:i});this.destroy=()=>{c(),u()}}get plugins(){return this.registry.plugins.values}set plugins(e){this.registry.plugins.values=e}get modifiers(){return this.registry.modifiers.values}set modifiers(e){this.registry.modifiers.values=e}get sensors(){return this.registry.sensors.values}set sensors(e){this.registry.sensors.values=e}},AP=e=>{throw TypeError(e)},kP=(e,t,n)=>t.has(e)||AP("Cannot "+n),OP=(e,t,n)=>(kP(e,t,"read from private field"),t.get(e)),qP=(e,t,n)=>t.has(e)?AP("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),TP=(e,t,n,r)=>(kP(e,t,"write to private field"),t.set(e,n),n),NP=(e,t,n)=>(kP(e,t,"access private method"),n);function jP(e){return!!e&&(e instanceof KeyframeEffect||"getKeyframes"in e&&"function"==typeof e.getKeyframes)}function _P(e,t){const n=e.getAnimations();if(n.length>0)for(const e of n){if("running"!==e.playState)continue;const{effect:n}=e,r=(jP(n)?n.getKeyframes():[]).filter(t);if(r.length>0)return[r[r.length-1],e]}return null}function FP(e){const{width:t,height:n,top:r,left:i,bottom:o,right:a}=e.getBoundingClientRect();return{width:t,height:n,top:r,left:i,bottom:o,right:a}}function zP(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function WP(e){return"nodeType"in e}function $P(e){var t,n,r;return e?zP(e)?e:WP(e)?"defaultView"in e?null!=(t=e.defaultView)?t:window:null!=(r=null==(n=e.ownerDocument)?void 0:n.defaultView)?r:window:window:window}function HP(e){const{Document:t}=$P(e);return e instanceof t||"nodeType"in e&&e.nodeType===Node.DOCUMENT_NODE}function VP(e){return!(!e||zP(e))&&(e instanceof $P(e).HTMLElement||"namespaceURI"in e&&"string"==typeof e.namespaceURI&&e.namespaceURI.endsWith("html"))}function BP(e){return e instanceof $P(e).SVGElement||"namespaceURI"in e&&"string"==typeof e.namespaceURI&&e.namespaceURI.endsWith("svg")}function GP(e){return e?zP(e)?e.document:WP(e)?HP(e)?e:VP(e)||BP(e)?e.ownerDocument:document:document:document}function UP(e,t){if(function(e){return"DETAILS"===e.tagName}(e)&&!1===e.open)return!1;const{overflow:n,overflowX:r,overflowY:i}=getComputedStyle(e);return"visible"===n&&"visible"===r&&"visible"===i}function YP(e,t=e.getBoundingClientRect(),n=0){var r,i,o,a,s;let l=t;const{ownerDocument:u}=e,c=null!=(r=u.defaultView)?r:window;let d=e.parentElement;for(;d&&d!==u.documentElement;){if(!UP(d)){const e=d.getBoundingClientRect(),t=n*(e.bottom-e.top),r=n*(e.right-e.left),i=n*(e.bottom-e.top),o=n*(e.right-e.left);l={top:Math.max(l.top,e.top-t),right:Math.min(l.right,e.right+r),bottom:Math.min(l.bottom,e.bottom+i),left:Math.max(l.left,e.left-o),width:0,height:0},l.width=l.right-l.left,l.height=l.bottom-l.top}d=d.parentElement}const p=c.visualViewport,f=null!=(i=null==p?void 0:p.offsetTop)?i:0,h=null!=(o=null==p?void 0:p.offsetLeft)?o:0,m=null!=(a=null==p?void 0:p.width)?a:c.innerWidth,g=null!=(s=null==p?void 0:p.height)?s:c.innerHeight,v=n*g,y=n*m;return l={top:Math.max(l.top,f-v),right:Math.min(l.right,h+m+y),bottom:Math.min(l.bottom,f+g+v),left:Math.max(l.left,h-y),width:0,height:0},l.width=l.right-l.left,l.height=l.bottom-l.top,l.width<0&&(l.width=0),l.height<0&&(l.height=0),l}function KP(e){return{x:e.clientX,y:e.clientY}}var XP="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function JP(e=document,t=new Set){if(t.has(e))return[];t.add(e);const n=[e];for(const r of Array.from(e.querySelectorAll("iframe, frame")))try{const e=r.contentDocument;e&&!t.has(e)&&n.push(...JP(e,t))}catch(e){}try{const r=e.defaultView;if(r&&r!==window.top){const i=r.parent;i&&i.document&&i.document!==e&&n.push(...JP(i.document,t))}}catch(e){}return n}function ZP(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function QP(){var e,t;const n=ZP()?window.visualViewport:null;return{x:null!=(e=null==n?void 0:n.offsetLeft)?e:0,y:null!=(t=null==n?void 0:n.offsetTop)?t:0}}function eM(e){return!(!e||!WP(e))&&e instanceof $P(e).ShadowRoot}function tM(e){if(e&&WP(e)){let t=e.getRootNode();if(eM(t))return t;if(t instanceof Document)return t}return GP(e)}function nM(e){return e.matchMedia("(prefers-reduced-motion: reduce)").matches}function rM(e){return"value"in e}function iM(e){return"CANVAS"===e.tagName}function oM(e,{x:t,y:n}){const r=e.elementFromPoint(t,n);if(function(e){return"IFRAME"===(null==e?void 0:e.tagName)}(r)){const{contentDocument:e}=r;if(e){const{left:i,top:o}=r.getBoundingClientRect();return oM(e,{x:t-i,y:n-o})}}return r}var aM=new WeakMap;var sM=class{constructor(){this.entries=new Set,this.clear=()=>{for(const e of this.entries){const[t,{type:n,listener:r,options:i}]=e;t.removeEventListener(n,r,i)}this.entries.clear()}}bind(e,t){const n=Array.isArray(e)?e:[e],r=Array.isArray(t)?t:[t],i=[];for(const e of n)for(const t of r){const{type:n,listener:r,options:o}=t,a=[e,t];e.addEventListener(n,r,o),this.entries.add(a),i.push(a)}return function(){for(const[e,{type:t,listener:n,options:r}]of i)e.removeEventListener(t,n,r)}}};function lM(e){const t=null==e?void 0:e.ownerDocument.defaultView;if(t&&t.self!==t.parent)return t.frameElement}function uM(e,t){const n=()=>performance.now();let r,i;return function(...o){const a=this;i?(null==r||r(),r=function(e,t){const n=setTimeout(e,t);return()=>clearTimeout(n)}(()=>{e.apply(a,o),i=n()},t-(n()-i))):(e.apply(a,o),i=n())}}var cM,dM=XP?ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},pM=class extends dM{constructor(e){super(t=>{OP(this,cM)?e(t,this):TP(this,cM,!0)}),qP(this,cM,!1)}};cM=new WeakMap;var fM,hM,mM,gM,vM,yM,bM,xM,SM,wM,CM,EM=Array.from({length:100},(e,t)=>t/100),IM=class{constructor(e,t,n={debug:!1,skipInitial:!1}){this.element=e,this.callback=t,qP(this,SM),this.disconnect=()=>{var e,t,n;TP(this,bM,!0),null==(e=OP(this,mM))||e.disconnect(),null==(t=OP(this,gM))||t.disconnect(),OP(this,vM).disconnect(),null==(n=OP(this,yM))||n.remove()},qP(this,fM,!0),qP(this,hM),qP(this,mM),qP(this,gM),qP(this,vM),qP(this,yM),qP(this,bM,!1),qP(this,xM,uM(()=>{var e,t,n;const{element:r}=this;if(null==(e=OP(this,gM))||e.disconnect(),OP(this,bM)||!OP(this,fM)||!r.isConnected)return;const i=null!=(t=r.ownerDocument)?t:document,{innerHeight:o,innerWidth:a}=null!=(n=i.defaultView)?n:window,s=r.getBoundingClientRect(),l=YP(r,s),{top:u,left:c,bottom:d,right:p}=l,f=-Math.floor(u),h=-Math.floor(c),m=`${f}px ${-Math.floor(a-p)}px ${-Math.floor(o-d)}px ${h}px`;this.boundingClientRect=s,TP(this,gM,new IntersectionObserver(e=>{const[t]=e,{intersectionRect:n}=t;1!==(1!==t.intersectionRatio?t.intersectionRatio:aD.intersectionRatio(n,YP(r)))&&OP(this,xM).call(this)},{threshold:EM,rootMargin:m,root:i})),OP(this,gM).observe(r),NP(this,SM,wM).call(this)},75)),this.boundingClientRect=e.getBoundingClientRect(),TP(this,fM,function(e,t=e.getBoundingClientRect()){const{width:n,height:r}=YP(e,t);return n>0&&r>0}(e,this.boundingClientRect));let r=!0;this.callback=e=>{r&&(r=!1,n.skipInitial)||t(e)};const i=e.ownerDocument;(null==n?void 0:n.debug)&&(TP(this,yM,document.createElement("div")),OP(this,yM).style.background="rgba(0,0,0,0.15)",OP(this,yM).style.position="fixed",OP(this,yM).style.pointerEvents="none",i.body.appendChild(OP(this,yM))),TP(this,vM,new IntersectionObserver(t=>{var n,r;const i=t[t.length-1],{boundingClientRect:o,isIntersecting:a}=i,{width:s,height:l}=o,u=OP(this,fM);TP(this,fM,a),(s||l)&&(u&&!a?(null==(n=OP(this,gM))||n.disconnect(),this.callback(null),null==(r=OP(this,mM))||r.disconnect(),TP(this,mM,void 0),OP(this,yM)&&(OP(this,yM).style.visibility="hidden")):OP(this,xM).call(this),a&&!OP(this,mM)&&(TP(this,mM,new pM(OP(this,xM))),OP(this,mM).observe(e)))},{threshold:EM,root:i})),OP(this,fM)&&!n.skipInitial&&this.callback(this.boundingClientRect),OP(this,vM).observe(e)}};fM=new WeakMap,hM=new WeakMap,mM=new WeakMap,gM=new WeakMap,vM=new WeakMap,yM=new WeakMap,bM=new WeakMap,xM=new WeakMap,SM=new WeakSet,wM=function(){OP(this,bM)||(NP(this,SM,CM).call(this),function(e,t){return e===t||!(!e||!t)&&e.top==t.top&&e.left==t.left&&e.right==t.right&&e.bottom==t.bottom}(this.boundingClientRect,OP(this,hM))||(this.callback(this.boundingClientRect),TP(this,hM,this.boundingClientRect)))},CM=function(){if(OP(this,yM)){const{top:e,left:t,width:n,height:r}=YP(this.element);OP(this,yM).style.overflow="hidden",OP(this,yM).style.visibility="visible",OP(this,yM).style.top=`${Math.floor(e)}px`,OP(this,yM).style.left=`${Math.floor(t)}px`,OP(this,yM).style.width=`${Math.floor(n)}px`,OP(this,yM).style.height=`${Math.floor(r)}px`}};var DM,RM,PM,MM,LM=new WeakMap,AM=new WeakMap;function kM(e,t){let n=LM.get(e);if(!n){const t=new IM(e,t=>{const n=LM.get(e);n&&n.callbacks.forEach(e=>e(t))},{skipInitial:!0});n={disconnect:t.disconnect,callbacks:new Set}}return n.callbacks.add(t),LM.set(e,n),()=>{n.callbacks.delete(t),0===n.callbacks.size&&(LM.delete(e),n.disconnect())}}var OM=class{constructor(e,t,n){this.callback=t,qP(this,DM),qP(this,RM,!1),qP(this,PM),qP(this,MM,uM(e=>{if(!OP(this,RM)&&e.target&&"contains"in e.target&&"function"==typeof e.target.contains)for(const t of OP(this,PM))if(e.target.contains(t)){this.callback(OP(this,DM).boundingClientRect);break}},75));const r=function(e){const t=new Set;let n=lM(e);for(;n;)t.add(n),n=lM(n);return t}(e),i=function(e,t){const n=new Set;for(const r of e){const e=kM(r,t);n.add(e)}return()=>n.forEach(e=>e())}(r,t),o=function(e,t){var n;const r=e.ownerDocument;if(!AM.has(r)){const e=new AbortController,t=new Set;document.addEventListener("scroll",e=>t.forEach(t=>t(e)),{capture:!0,passive:!0,signal:e.signal}),AM.set(r,{disconnect:()=>e.abort(),listeners:t})}const{listeners:i,disconnect:o}=null!=(n=AM.get(r))?n:{};return i&&o?(i.add(t),()=>{i.delete(t),0===i.size&&(o(),AM.delete(r))}):()=>{}}(e,OP(this,MM));TP(this,PM,r),TP(this,DM,new IM(e,t,n)),this.disconnect=()=>{OP(this,RM)||(TP(this,RM,!0),i(),o(),OP(this,DM).disconnect())}}};function qM(e){return"showPopover"in e&&"hidePopover"in e&&"function"==typeof e.showPopover&&"function"==typeof e.hidePopover}function TM(e){try{qM(e)&&e.isConnected&&e.hasAttribute("popover")&&!e.matches(":popover-open")&&e.showPopover()}catch(e){}}function NM(e){return!(!XP||!e)&&e===GP(e).scrollingElement}function jM(e){var t,n;const r=$P(e),i=NM(e)?function(e){var t,n,r,i;const{documentElement:o}=GP(e),a=$P(e).visualViewport,s=null!=(t=null==a?void 0:a.width)?t:o.clientWidth,l=null!=(n=null==a?void 0:a.height)?n:o.clientHeight,u=null!=(r=null==a?void 0:a.offsetTop)?r:0,c=null!=(i=null==a?void 0:a.offsetLeft)?i:0;return{top:u,left:c,right:c+s,bottom:u+l,width:s,height:l}}(e):FP(e),o=r.visualViewport,a=NM(e)?{height:null!=(t=null==o?void 0:o.height)?t:r.innerHeight,width:null!=(n=null==o?void 0:o.width)?n:r.innerWidth}:{height:e.clientHeight,width:e.clientWidth},s={current:{x:e.scrollLeft,y:e.scrollTop},max:{x:e.scrollWidth-a.width,y:e.scrollHeight-a.height}};return{rect:i,position:s,isTop:s.current.y<=0,isLeft:s.current.x<=0,isBottom:s.current.y>=s.max.y,isRight:s.current.x>=s.max.x}}function _M(e,t){const{isTop:n,isBottom:r,isLeft:i,isRight:o,position:a}=jM(e),{x:s,y:l}=null!=t?t:{x:0,y:0},u=!n&&a.current.y+l>0,c=!r&&a.current.y+l<a.max.y,d=!i&&a.current.x+s>0,p=!o&&a.current.x+s<a.max.x;return{top:u,bottom:c,left:d,right:p,x:d||p,y:u||c}}DM=new WeakMap,RM=new WeakMap,PM=new WeakMap,MM=new WeakMap;var FM=class{constructor(e){this.scheduler=e,this.pending=!1,this.tasks=new Set,this.resolvers=new Set,this.flush=()=>{const{tasks:e,resolvers:t}=this;this.pending=!1,this.tasks=new Set,this.resolvers=new Set;for(const t of e)t();for(const e of t)e()}}schedule(e){return this.tasks.add(e),this.pending||(this.pending=!0,this.scheduler(this.flush)),new Promise(e=>this.resolvers.add(e))}},zM=new FM(e=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(e):e()}),WM=new FM(e=>setTimeout(e,50)),$M=new Map,HM=$M.clear.bind($M);function VM(e,t=!1){if(!t)return BM(e);let n=$M.get(e);return n||(n=BM(e),$M.set(e,n),WM.schedule(HM),n)}function BM(e){return $P(e).getComputedStyle(e)}var GM={excludeElement:!0,escapeShadowDOM:!0};function UM(e,t=GM){const{limit:n,excludeElement:r,escapeShadowDOM:i}=t,o=new Set;return e?function t(a){if(null!=n&&o.size>=n)return o;if(!a)return o;if(HP(a)&&null!=a.scrollingElement&&!o.has(a.scrollingElement))return o.add(a.scrollingElement),o;if(i&&eM(a))return t(a.host);if(!VP(a))return BP(a)?t(a.parentElement):o;if(o.has(a))return o;const s=VM(a,!0);if(r&&a===e||function(e,t=VM(e,!0)){const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const r=t[e];return"string"==typeof r&&n.test(r)})}(a,s)&&o.add(a),function(e,t=VM(e,!0)){return"fixed"===t.position||"sticky"===t.position}(a,s)){const{scrollingElement:e}=a.ownerDocument;return e&&o.add(e),o}return t(a.parentNode)}(e):o}function YM(e,t=window.frameElement){const n={x:0,y:0,scaleX:1,scaleY:1};if(!e)return n;let r=lM(e);for(;r;){if(r===t)return n;const e=FP(r),{x:i,y:o}=KM(r,e);n.x=n.x+e.left,n.y=n.y+e.top,n.scaleX=n.scaleX*i,n.scaleY=n.scaleY*o,r=lM(r)}return n}function KM(e,t=FP(e)){const n=Math.round(t.width),r=Math.round(t.height);if(VP(e))return{x:n/e.offsetWidth,y:r/e.offsetHeight};const i=VM(e,!0);return{x:(parseFloat(i.width)||n)/n,y:(parseFloat(i.height)||r)/r}}function XM(e){if("none"===e)return null;const[t,n,r="0"]=e.split(" "),i={x:parseFloat(t),y:parseFloat(n),z:parseInt(r,10)};return isNaN(i.x)&&isNaN(i.y)?null:{x:isNaN(i.x)?0:i.x,y:isNaN(i.y)?0:i.y,z:isNaN(i.z)?0:i.z}}function JM(e){var t,n,r,i,o,a,s,l,u;const{scale:c,transform:d,translate:p}=e,f=function(e){if("none"===e)return null;const t=e.split(" "),n=parseFloat(t[0]),r=parseFloat(t[1]);return isNaN(n)&&isNaN(r)?null:{x:isNaN(n)?r:n,y:isNaN(r)?n:r}}(c),h=XM(p),m=function(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(d);if(!m&&!f&&!h)return null;const g=null!=(t=null==f?void 0:f.x)?t:1,v=null!=(n=null==f?void 0:f.y)?n:1,y=null!=(r=null==h?void 0:h.x)?r:0,b=null!=(i=null==h?void 0:h.y)?i:0,x=null!=(o=null==m?void 0:m.x)?o:0,S=null!=(a=null==m?void 0:m.y)?a:0,w=null!=(s=null==m?void 0:m.scaleX)?s:1,C=null!=(l=null==m?void 0:m.scaleY)?l:1;return{x:y+x,y:b+S,z:null!=(u=null==h?void 0:h.z)?u:0,scaleX:g*w,scaleY:v*C}}var ZM=(e=>(e[e.Idle=0]="Idle",e[e.Forward=1]="Forward",e[e.Reverse=-1]="Reverse",e))(ZM||{}),QM={x:.2,y:.2},eL={x:10,y:10};function tL(e,t,n,r=25,i=QM,o=eL){const{x:a,y:s}=t,{rect:l,isTop:u,isBottom:c,isLeft:d,isRight:p}=jM(e),f=YM(e),h=JM(VM(e,!0)),m=null!==h&&(null==h?void 0:h.scaleX)<0,g=null!==h&&(null==h?void 0:h.scaleY)<0,v=new aD(l.left*f.scaleX+f.x,l.top*f.scaleY+f.y,l.width*f.scaleX,l.height*f.scaleY),y={x:0,y:0},b={x:0,y:0},x=v.height*i.y,S=v.width*i.x;return(!u||g&&!c)&&s<=v.top+x&&1!==(null==n?void 0:n.y)&&a>=v.left-o.x&&a<=v.right+o.x?(y.y=g?1:-1,b.y=r*Math.abs((v.top+x-s)/x)):(!c||g&&!u)&&s>=v.bottom-x&&-1!==(null==n?void 0:n.y)&&a>=v.left-o.x&&a<=v.right+o.x&&(y.y=g?-1:1,b.y=r*Math.abs((v.bottom-x-s)/x)),(!p||m&&!d)&&a>=v.right-S&&-1!==(null==n?void 0:n.x)&&s>=v.top-o.y&&s<=v.bottom+o.y?(y.x=m?-1:1,b.x=r*Math.abs((v.right-S-a)/S)):(!d||m&&!p)&&a<=v.left+S&&1!==(null==n?void 0:n.x)&&s>=v.top-o.y&&s<=v.bottom+o.y&&(y.x=m?1:-1,b.x=r*Math.abs((v.left+S-a)/S)),{direction:y,speed:b}}function nL(e,t=!1){if("scrollIntoViewIfNeeded"in(n=e)&&"function"==typeof n.scrollIntoViewIfNeeded)return void e.scrollIntoViewIfNeeded(t);var n;if(!VP(e))return e.scrollIntoView();var r=function(e){const[t]=UM(e,{limit:1});return null!=t?t:null}(e);if(!VP(r))return;const i=VM(r,!0),o=parseInt(i.getPropertyValue("border-top-width")),a=parseInt(i.getPropertyValue("border-left-width")),s=e.offsetTop-r.offsetTop<r.scrollTop,l=e.offsetTop-r.offsetTop+e.clientHeight-o>r.scrollTop+r.clientHeight,u=e.offsetLeft-r.offsetLeft<r.scrollLeft,c=e.offsetLeft-r.offsetLeft+e.clientWidth-a>r.scrollLeft+r.clientWidth,d=s&&!l;(s||l)&&t&&(r.scrollTop=e.offsetTop-r.offsetTop-r.clientHeight/2-o+e.clientHeight/2),(u||c)&&t&&(r.scrollLeft=e.offsetLeft-r.offsetLeft-r.clientWidth/2-a+e.clientWidth/2),(s||l||u||c)&&!t&&e.scrollIntoView(d)}function rL({element:e,keyframes:t,options:n}){return e.animate(t,n).finished}function iL(e,t=VM(e).translate,n=!0){if(n){const t=_P(e,e=>"translate"in e);if(t){const{translate:e=""}=t[0];if("string"==typeof e){const t=XM(e);if(t)return t}}}if(t){const e=XM(t);if(e)return e}return{x:0,y:0,z:0}}var oL=new FM(e=>setTimeout(e,0)),aL=new Map,sL=aL.clear.bind(aL);function lL(e,t){const n=function(e){const t=e.ownerDocument;let n=aL.get(t);if(n)return n;n=t.getAnimations(),aL.set(t,n),oL.schedule(sL);const r=n.filter(t=>jP(t.effect)&&t.effect.target===e);return aL.set(e,r),n}(e).filter(e=>{var n,r;if(jP(e.effect)){const{target:i}=e.effect;if(null==(r=i&&(null==(n=t.isValidTarget)?void 0:n.call(t,i)))||r)return e.effect.getKeyframes().some(e=>{for(const n of t.properties)if(e[n])return!0})}}).map(e=>{const{effect:t,currentTime:n}=e,r=null==t?void 0:t.getComputedTiming().duration;if(!e.pending&&"finished"!==e.playState)return"number"==typeof r&&"number"==typeof n&&n<r?(e.currentTime=r,()=>{e.currentTime=n}):void 0});if(n.length>0)return()=>n.forEach(e=>null==e?void 0:e())}var uL=class extends aD{constructor(e,t={}){var n,r,i,o;const{frameTransform:a=YM(e),ignoreTransforms:s,getBoundingClientRect:l=FP}=t,u=lL(e,{properties:["transform","translate","scale","width","height"],isValidTarget:t=>(t!==e||ZP())&&t.contains(e)}),c=l(e);let d,{top:p,left:f,width:h,height:m}=c;const g=VM(e),v=JM(g),y={x:null!=(n=null==v?void 0:v.scaleX)?n:1,y:null!=(r=null==v?void 0:v.scaleY)?r:1},b=function(e,t){var n;const r=e.getAnimations();let i=null;if(!r.length)return null;for(const e of r){if("running"!==e.playState)continue;const r=jP(e.effect)?e.effect.getKeyframes():[],o=r[r.length-1];if(!o)continue;const{transform:a,translate:s,scale:l}=o;if(a||s||l){const e=JM({transform:"string"==typeof a&&a?a:t.transform,translate:"string"==typeof s&&s?s:t.translate,scale:"string"==typeof l&&l?l:t.scale});e&&(i=i?{x:i.x+e.x,y:i.y+e.y,z:null!=(n=i.z)?n:e.z,scaleX:i.scaleX*e.scaleX,scaleY:i.scaleY*e.scaleY}:e)}}return i}(e,g);null==u||u(),v&&(d=function(e,t,n){const{scaleX:r,scaleY:i,x:o,y:a}=t,s=e.left-o-(1-r)*parseFloat(n),l=e.top-a-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),u=r?e.width/r:e.width,c=i?e.height/i:e.height;return{width:u,height:c,top:l,right:s+u,bottom:l+c,left:s}}(c,v,g.transformOrigin),(s||b)&&(p=d.top,f=d.left,h=d.width,m=d.height));const x={width:null!=(i=null==d?void 0:d.width)?i:h,height:null!=(o=null==d?void 0:d.height)?o:m};if(b&&!s&&d){const e=function(e,t,n){const{scaleX:r,scaleY:i,x:o,y:a}=t,s=e.left+o+(1-r)*parseFloat(n),l=e.top+a+(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),u=r?e.width*r:e.width,c=i?e.height*i:e.height;return{width:u,height:c,top:l,right:s+u,bottom:l+c,left:s}}(d,b,g.transformOrigin);p=e.top,f=e.left,h=e.width,m=e.height,y.x=b.scaleX,y.y=b.scaleY}a&&(s||(f*=a.scaleX,h*=a.scaleX,p*=a.scaleY,m*=a.scaleY),f+=a.x,p+=a.y),super(f,p,h,m),this.scale=y,this.intrinsicWidth=x.width,this.intrinsicHeight=x.height}};function cL(e){return"style"in e&&"object"==typeof e.style&&null!==e.style&&"setProperty"in e.style&&"removeProperty"in e.style&&"function"==typeof e.style.setProperty&&"function"==typeof e.style.removeProperty}var dL=class{constructor(e){this.element=e,this.initial=new Map}set(e,t=""){const{element:n}=this;if(cL(n))for(const[r,i]of Object.entries(e)){const e=`${t}${r}`;this.initial.has(e)||this.initial.set(e,n.style.getPropertyValue(e)),n.style.setProperty(e,"string"==typeof i?i:`${i}px`)}}remove(e,t=""){const{element:n}=this;if(cL(n))for(const r of e){const e=`${t}${r}`;n.style.removeProperty(e)}}reset(){const{element:e}=this;if(cL(e)){for(const[t,n]of this.initial)e.style.setProperty(t,n);""===e.getAttribute("style")&&e.removeAttribute("style")}}};function pL(e){return!!e&&(e instanceof $P(e).Element||WP(e)&&e.nodeType===Node.ELEMENT_NODE)}function fL(e){if(!e)return!1;const{KeyboardEvent:t}=$P(e.target);return e instanceof t}var hL={};function mL(e){const t=null==hL[e]?0:hL[e]+1;return hL[e]=t,`${e}-${t}`}var gL=e=>{var t;return null!=(t=(({dragOperation:e,droppable:t})=>{const n=e.position.current;if(!n)return null;const{id:r}=t;if(!t.shape)return null;if(t.shape.containsPoint(n))return{id:r,value:1/oD.distance(t.shape.center,n),type:gR.PointerIntersection,priority:mR.High};return null})(e))?t:(({dragOperation:e,droppable:t})=>{const{shape:n}=e;if(!t.shape||!(null==n?void 0:n.current))return null;const r=n.current.intersectionArea(t.shape);if(r){const{position:i}=e,o=oD.distance(t.shape.center,i.current),a=r/(n.current.area+t.shape.area-r)/o;return{id:t.id,value:a,type:gR.ShapeIntersection,priority:mR.Normal}}return null})(e)},vL=e=>{const{dragOperation:t,droppable:n}=e,{shape:r,position:i}=t;if(!n.shape)return null;const o=r?aD.from(r.current.boundingRectangle).corners:void 0,a=aD.from(n.shape.boundingRectangle).corners.reduce((e,t,n)=>{var r;return e+oD.distance(oD.from(t),null!=(r=null==o?void 0:o[n])?r:i.current)},0),s=a/4;return{id:n.id,value:1/s,type:gR.Collision,priority:mR.Normal}},yL=Object.create,bL=Object.defineProperty,xL=Object.defineProperties,SL=Object.getOwnPropertyDescriptor,wL=Object.getOwnPropertyDescriptors,CL=Object.getOwnPropertySymbols,EL=Object.prototype.hasOwnProperty,IL=Object.prototype.propertyIsEnumerable,DL=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),RL=e=>{throw TypeError(e)},PL=(e,t,n)=>t in e?bL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ML=(e,t)=>{for(var n in t||(t={}))EL.call(t,n)&&PL(e,n,t[n]);if(CL)for(var n of CL(t))IL.call(t,n)&&PL(e,n,t[n]);return e},LL=(e,t)=>xL(e,wL(t)),AL=(e,t)=>bL(e,"name",{value:t,configurable:!0}),kL=(e,t)=>{var n={};for(var r in e)EL.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&CL)for(var r of CL(e))t.indexOf(r)<0&&IL.call(e,r)&&(n[r]=e[r]);return n},OL=e=>{var t;return[,,,yL(null!=(t=null==e?void 0:e[DL("metadata")])?t:null)]},qL=["class","method","getter","setter","accessor","field","value","get","set"],TL=e=>void 0!==e&&"function"!=typeof e?RL("Function expected"):e,NL=(e,t,n,r,i)=>({kind:qL[e],name:t,metadata:r,addInitializer:e=>n._?RL("Already initialized"):i.push(TL(e||null))}),jL=(e,t)=>PL(t,DL("metadata"),e[3]),_L=(e,t,n,r)=>{for(var i=0,o=e[t>>1],a=o&&o.length;i<a;i++)1&t?o[i].call(n):r=o[i].call(n,r);return r},FL=(e,t,n,r,i,o)=>{var a,s,l,u,c,d=7&t,p=!!(8&t),f=!!(16&t),h=d>3?e.length+1:d?p?1:2:0,m=qL[d+5],g=d>3&&(e[h-1]=[]),v=e[h]||(e[h]=[]),y=d&&(!f&&!p&&(i=i.prototype),d<5&&(d>3||!f)&&SL(d<4?i:{get[n](){return $L(this,o)},set[n](e){return VL(this,o,e)}},n));d?f&&d<4&&AL(o,(d>2?"set ":d>1?"get ":"")+n):AL(i,n);for(var b=r.length-1;b>=0;b--)u=NL(d,n,l={},e[3],v),d&&(u.static=p,u.private=f,c=u.access={has:f?e=>WL(i,e):e=>n in e},3^d&&(c.get=f?e=>(1^d?$L:BL)(e,i,4^d?o:y.get):e=>e[n]),d>2&&(c.set=f?(e,t)=>VL(e,i,t,4^d?o:y.set):(e,t)=>e[n]=t)),s=(0,r[b])(d?d<4?f?o:y[m]:d>4?void 0:{get:y.get,set:y.set}:i,u),l._=1,4^d||void 0===s?TL(s)&&(d>4?g.unshift(s):d?f?o=s:y[m]=s:i=s):"object"!=typeof s||null===s?RL("Object expected"):(TL(a=s.get)&&(y.get=a),TL(a=s.set)&&(y.set=a),TL(a=s.init)&&g.unshift(a));return d||jL(e,i),y&&bL(i,n,y),f?4^d?o:y:i},zL=(e,t,n)=>t.has(e)||RL("Cannot "+n),WL=(e,t)=>Object(t)!==t?RL('Cannot use the "in" operator on this value'):e.has(t),$L=(e,t,n)=>(zL(e,t,"read from private field"),n?n.call(e):t.get(e)),HL=(e,t,n)=>t.has(e)?RL("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),VL=(e,t,n,r)=>(zL(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),BL=(e,t,n)=>(zL(e,t,"access private method"),n),GL="button",UL="draggable",YL="dnd-kit-description",KL="dnd-kit-announcement",XL={draggable:"To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item in a given direction. Press space again to drop the item in its new position, or press escape to cancel."},JL={dragstart({operation:{source:e}}){if(e)return`Picked up draggable item ${e.id}.`},dragover({operation:{source:e,target:t}}){if(e&&e.id!==(null==t?void 0:t.id))return t?`Draggable item ${e.id} was moved over droppable target ${t.id}.`:`Draggable item ${e.id} is no longer over a droppable target.`},dragend({operation:{source:e,target:t},canceled:n}){if(e)return n?`Dragging was cancelled. Draggable item ${e.id} was dropped.`:t?`Draggable item ${e.id} was dropped over droppable target ${t.id}`:`Draggable item ${e.id} was dropped.`}};function ZL(e){const t=e.tagName.toLowerCase();return["input","select","textarea","a","button"].includes(t)}var QL=["dragover","dragmove"];var eA,tA,nA,rA,iA,oA,aA,sA,lA,uA,cA,dA,pA,fA=new Map,hA=class extends(iA=KD,rA=[kI],nA=[OI],tA=[OI],eA=[OI],iA){constructor(e){super(e),_L(aA,5,this),HL(this,lA),HL(this,oA,new Set),HL(this,sA,_L(aA,8,this,new Set)),_L(aA,11,this),this.registerEffect(BL(this,lA,uA))}register(e){return $L(this,oA).add(e),()=>{$L(this,oA).delete(e)}}addRoot(e){return xE(()=>{const t=new Set(this.additionalRoots);t.add(e),this.additionalRoots=t}),()=>{xE(()=>{const t=new Set(this.additionalRoots);t.delete(e),this.additionalRoots=t})}}get sourceRoot(){var e;const{source:t}=this.manager.dragOperation;return tM(null!=(e=null==t?void 0:t.element)?e:null)}get targetRoot(){var e;const{target:t}=this.manager.dragOperation;return tM(null!=(e=null==t?void 0:t.element)?e:null)}get roots(){const{status:e}=this.manager.dragOperation;if(e.initializing||e.initialized){const e=[this.sourceRoot,this.targetRoot].filter(e=>null!=e);return new Set([...e,...this.additionalRoots])}return new Set}};aA=OL(iA),oA=new WeakMap,sA=new WeakMap,lA=new WeakSet,uA=function(){const{roots:e}=this,t=[];for(const n of e)for(const e of $L(this,oA))t.push(BL(this,lA,cA).call(this,n,e));return()=>{for(const e of t)e()}},cA=function(e,t){let n=fA.get(e);n||(n=new Map,fA.set(e,n));let r=n.get(t);if(!r){const i=HP(e)?BL(this,lA,dA).call(this,e,n,t):BL(this,lA,pA).call(this,e,n,t);if(!i)return()=>{};r=i,n.set(t,r)}r.refCount++;let i=!1;return()=>{i||(i=!0,r.refCount--,0===r.refCount&&r.cleanup())}},dA=function(e,t,n){const r=e.createElement("style");r.textContent=n,e.head.prepend(r);const i=new MutationObserver(t=>{for(const n of t)for(const t of Array.from(n.removedNodes))if(t===r)return void e.head.prepend(r)});return i.observe(e.head,{childList:!0}),{refCount:0,cleanup:()=>{i.disconnect(),r.remove(),t.delete(n),0===t.size&&fA.delete(e)}}},pA=function(e,t,n){!("adoptedStyleSheets"in e)||Array.isArray(e.adoptedStyleSheets);const r=e.ownerDocument.defaultView,{CSSStyleSheet:i}=null!=r?r:{};if(!i)return null;const o=new i;return o.replaceSync(n),e.adoptedStyleSheets.push(o),{refCount:0,cleanup:()=>{var r;if(eM(e)&&(null==(r=e.host)?void 0:r.isConnected)){const t=e.adoptedStyleSheets.indexOf(o);-1!==t&&e.adoptedStyleSheets.splice(t,1)}t.delete(n),0===t.size&&fA.delete(e)}}},FL(aA,4,"additionalRoots",rA,hA,sA),FL(aA,2,"sourceRoot",nA,hA),FL(aA,2,"targetRoot",tA,hA),FL(aA,2,"roots",eA,hA),jL(aA,hA);var mA="data-dnd-",gA=`${mA}dropping`,vA="--dnd-",yA=`${mA}dragging`,bA=`${mA}placeholder`,xA=[yA,bA,"popover","aria-pressed","aria-grabbing"],SA=["view-transition-name"],wA=`\n :is(:root,:host) [${yA}] {\n position: fixed !important;\n pointer-events: none !important;\n touch-action: none;\n z-index: calc(infinity);\n will-change: translate;\n top: var(${vA}top, 0px) !important;\n left: var(${vA}left, 0px) !important;\n right: unset !important;\n bottom: unset !important;\n width: var(${vA}width, auto);\n max-width: var(${vA}width, auto);\n height: var(${vA}height, auto);\n max-height: var(${vA}height, auto);\n transition: var(${vA}transition) !important;\n }\n\n :is(:root,:host) [${bA}] {\n transition: none;\n }\n\n :is(:root,:host) [${bA}='hidden'] {\n visibility: hidden;\n }\n\n [${yA}] * {\n pointer-events: none !important;\n }\n\n [${yA}]:not([${gA}]) {\n translate: var(${vA}translate) !important;\n }\n\n [${yA}][style*='${vA}scale'] {\n scale: var(${vA}scale) !important;\n transform-origin: var(${vA}transform-origin) !important;\n }\n\n @layer dnd-kit {\n :where([${yA}][popover]) {\n overflow: visible;\n background: unset;\n border: unset;\n margin: unset;\n padding: unset;\n color: inherit;\n\n &:is(input, button) {\n border: revert;\n background: revert;\n }\n }\n }\n [${yA}]::backdrop, [${mA}overlay]:not([${yA}]) {\n display: none;\n visibility: hidden;\n }\n`.replace(/\n+/g," ").replace(/\s+/g," ").trim();function CA(e,t="hidden"){return xE(()=>{const{element:n,manager:r}=e;if(!n||!r)return;const i=function(e,t){const n=new Map;for(const r of t)if(r.element&&(e===r.element||e.contains(r.element))){const e=`${mA}${mL("dom-id")}`;r.element.setAttribute(e,""),n.set(r,e)}return n}(n,r.registry.droppables),o=[],a=function(e){const t="input, textarea, select, canvas, [contenteditable]",n=e.cloneNode(!0),r=Array.from(e.querySelectorAll(t));return Array.from(n.querySelectorAll(t)).forEach((e,t)=>{const n=r[t];if(rM(e)&&rM(n)&&("file"!==e.type&&(e.value=n.value),"radio"===e.type&&e.name&&(e.name=`Cloned__${e.name}`)),iM(e)&&iM(n)&&n.width>0&&n.height>0){const t=e.getContext("2d");null==t||t.drawImage(n,0,0)}}),n}(n),{remove:s}=a;return function(e,t,n){for(const[r,i]of e){if(!r.element)continue;const e=`[${i}]`,o=t.matches(e)?t:t.querySelector(e);if(r.element.removeAttribute(i),!o)continue;const a=r.element;r.proxy=o,o.removeAttribute(i),aM.set(a,o),n.push(()=>{aM.delete(a),r.proxy=void 0})}}(i,a,o),function(e,t="hidden"){e.setAttribute("inert","true"),e.setAttribute("tab-index","-1"),e.setAttribute("aria-hidden","true"),e.setAttribute(bA,t)}(a,t),a.remove=()=>{o.forEach(e=>e()),s.call(a)},a})}function EA(e,t){return e===t||lM(e)===lM(t)}function IA(e){const{target:t}=e;"newState"in e&&"closed"===e.newState&&pL(t)&&t.hasAttribute("popover")&&requestAnimationFrame(()=>TM(t))}function DA(e){return"TR"===e.tagName}var RA,PA,MA,LA,AA,kA,OA,qA=250,TA="ease";var NA=class extends(PA=UD,RA=[kI],PA){constructor(e,t){super(e,t),HL(this,AA),HL(this,LA,_L(MA,8,this)),_L(MA,11,this),this.state={initial:{},current:{}};const n=e.registry.plugins.get(hA),r=null==n?void 0:n.register(wA);if(r){const e=this.destroy.bind(this);this.destroy=()=>{r(),e()}}this.registerEffect(BL(this,AA,kA).bind(this,n)),this.registerEffect(BL(this,AA,OA))}};MA=OL(PA),LA=new WeakMap,AA=new WeakSet,kA=function(e){const{overlay:t}=this;if(!t||!e)return;const n=tM(t);return n?e.addRoot(n):void 0},OA=function(){var e,t,n;const{state:r,manager:i,options:o}=this,{dragOperation:a}=i,{position:s,source:l,status:u}=a;if(u.idle)return r.current={},void(r.initial={});if(!l)return;const{element:c,feedback:d}=l;if(!c||"none"===d||!u.initialized||u.initializing)return;const{initial:p}=r,f=null!=(e=this.overlay)?e:c,h=YM(f),m=YM(c),g=!EA(c,f),v=new uL(c,{frameTransform:g?m:null,ignoreTransforms:!g}),y=m.scaleX/h.scaleX,b=m.scaleY/h.scaleY;let{width:x,height:S,top:w,left:C}=v;g&&(x/=y,S/=b);const E=new dL(f),{transition:I,translate:D,boxSizing:R,paddingBlockStart:P,paddingBlockEnd:M,paddingInlineStart:L,paddingInlineEnd:A,borderInlineStartWidth:k,borderInlineEndWidth:O,borderBlockStartWidth:q,borderBlockEndWidth:T}=VM(c),N="clone"===d,j="content-box"===R,_=j?parseInt(L)+parseInt(A)+parseInt(k)+parseInt(O):0,F=j?parseInt(P)+parseInt(M)+parseInt(q)+parseInt(T):0,z="move"===d||this.overlay?null:CA(l,N?"clone":"hidden"),W=xE(()=>fL(i.dragOperation.activatorEvent));if("none"!==D){const e=XM(D);e&&!p.translate&&(p.translate=e)}if(!p.transformOrigin){const e=xE(()=>s.current);p.transformOrigin={x:(e.x-C*h.scaleX-h.x)/(x*h.scaleX),y:(e.y-w*h.scaleY-h.y)/(S*h.scaleY)}}const{transformOrigin:$}=p,H=w*h.scaleY+h.y,V=C*h.scaleX+h.x;if(!p.coordinates&&(p.coordinates={x:V,y:H},1!==y||1!==b)){const{scaleX:e,scaleY:t}=m,{x:n,y:r}=$;p.coordinates.x+=(x*e-x)*n,p.coordinates.y+=(S*t-S)*r}p.dimensions||(p.dimensions={width:x,height:S}),p.frameTransform||(p.frameTransform=h);const B=p.coordinates.x-V,G=p.coordinates.y-H,U=(p.dimensions.width*p.frameTransform.scaleX-x*h.scaleX)*$.x,Y=(p.dimensions.height*p.frameTransform.scaleY-S*h.scaleY)*$.y,K={x:B/h.scaleX+U,y:G/h.scaleY+Y},X=C+K.x,J=w+K.y;f.setAttribute(yA,"true");const Z=xE(()=>a.transform),Q=null!=(t=p.translate)?t:{x:0,y:0},ee=Z.x*h.scaleX+Q.x,te=Z.y*h.scaleY+Q.y,ne=QP();if(E.set({width:x-_,height:S-F,top:J+ne.y,left:X+ne.x,translate:`${ee}px ${te}px 0`,transition:I?`${I}, translate 0ms linear`:"",scale:g?`${y} ${b}`:"","transform-origin":`${100*$.x}% ${100*$.y}%`},vA),z&&(c.insertAdjacentElement("afterend",z),null==o?void 0:o.rootElement)){("function"==typeof o.rootElement?o.rootElement(l):o.rootElement).appendChild(c)}let re,ie,oe;qM(f)&&(f.hasAttribute("popover")||f.setAttribute("popover","manual"),TM(f),f.addEventListener("beforetoggle",IA));const ae=(se={placeholder:z,element:c,feedbackElement:f,frameTransform:h,transformOrigin:$,width:x,height:S,top:w,left:C,widthOffset:_,heightOffset:F,delta:K,styles:E,dragOperation:a,getElementMutationObserver:()=>re,getSavedCellWidths:()=>oe,setSavedCellWidths:e=>{oe=e}},new ResizeObserver(()=>{var e,t;const n=new uL(se.placeholder,{frameTransform:se.frameTransform,ignoreTransforms:!0}),r=null!=(e=se.transformOrigin)?e:{x:1,y:1},i=(se.width-n.width)*r.x+se.delta.x,o=(se.height-n.height)*r.y+se.delta.y,a=QP();if(se.styles.set({width:n.width-se.widthOffset,height:n.height-se.heightOffset,top:se.top+o+a.y,left:se.left+i+a.x},vA),null==(t=se.getElementMutationObserver())||t.takeRecords(),DA(se.element)&&DA(se.placeholder)){const e=Array.from(se.element.cells),t=Array.from(se.placeholder.cells);se.getSavedCellWidths()||se.setSavedCellWidths(e.map(e=>e.style.width));for(const[n,r]of e.entries()){const e=t[n];r.style.width=`${e.getBoundingClientRect().width}px`}}se.dragOperation.shape=new uL(se.feedbackElement)}));var se;const le=new uL(f);xE(()=>a.shape=le);const ue=$P(f),ce=e=>{this.manager.actions.stop({event:e})},de=nM(ue);W&&ue.addEventListener("resize",ce),"idle"===xE(()=>l.status)&&requestAnimationFrame(()=>l.status="dragging"),z&&(ae.observe(z),re=function(e,t,n){const r=new MutationObserver(r=>{let i=!1;for(const n of r){if(n.target!==e){i=!0;continue}if("attributes"!==n.type)continue;const r=n.attributeName;if(r.startsWith("aria-")||xA.includes(r))continue;const o=e.getAttribute(r);if("style"===r){if(cL(e)&&cL(t)){const n=e.style;for(const e of Array.from(t.style))""===n.getPropertyValue(e)&&t.style.removeProperty(e);for(const e of Array.from(n)){if(SA.includes(e)||e.startsWith(vA))continue;const r=n.getPropertyValue(e);t.style.setProperty(e,r)}}}else null!==o?t.setAttribute(r,o):t.removeAttribute(r)}i&&n&&(t.innerHTML=e.innerHTML)});return r.observe(e,{attributes:!0,subtree:!0,childList:!0}),r}(c,z,N),ie=function(e,t,n){const r=new MutationObserver(r=>{for(const i of r)if(0!==i.addedNodes.length)for(const r of Array.from(i.addedNodes)){if(r.contains(e)&&e.nextElementSibling!==t)return e.insertAdjacentElement("afterend",t),void TM(n);if(r.contains(t)&&t.previousElementSibling!==e)return t.insertAdjacentElement("beforebegin",e),void TM(n)}});return r.observe(e.ownerDocument.body,{childList:!0,subtree:!0}),r}(c,z,f));const pe=null==(n=i.dragOperation.source)?void 0:n.id,fe=()=>{var e;if(!W||null==pe)return;const t=i.registry.draggables.get(pe),n=null!=(e=null==t?void 0:t.handle)?e:null==t?void 0:t.element;VP(n)&&n.focus()},he=()=>{var e;if(null==re||re.disconnect(),null==ie||ie.disconnect(),ae.disconnect(),ue.removeEventListener("resize",ce),qM(f)&&(f.removeEventListener("beforetoggle",IA),f.removeAttribute("popover")),f.removeAttribute(yA),E.reset(),oe&&DA(c)){const t=Array.from(c.cells);for(const[n,r]of t.entries())r.style.width=null!=(e=oe[n])?e:""}l.status="idle";const t=null!=r.current.translate;z&&(t||z.parentElement!==f.parentElement)&&f.isConnected&&z.replaceWith(f),null==z||z.remove()},me=null==o?void 0:o.dropAnimation,ge=this,ve=TI(()=>{var e;const{transform:t,status:n}=a;if((t.x||t.y||r.current.translate)&&n.dragging){const n=null!=(e=p.translate)?e:{x:0,y:0},i={x:t.x/h.scaleX+n.x,y:t.y/h.scaleY+n.y},o=r.current.translate,s=xE(()=>a.modifiers),l=xE(()=>{var e;return null==(e=a.shape)?void 0:e.current}),u=W&&!de?"250ms cubic-bezier(0.25, 1, 0.5, 1)":"0ms linear";if(E.set({transition:`${I}, translate ${u}`,translate:`${i.x}px ${i.y}px 0`},vA),null==re||re.takeRecords(),l&&l!==le&&o&&!s.length){const e=oD.delta(i,o);a.shape=aD.from(l.boundingRectangle).translate(e.x*h.scaleX,e.y*h.scaleY)}else a.shape=new uL(f);r.current.translate=i}},function(){if(a.status.dropped){this.dispose(),l.status="dropping";const e=void 0!==ge.dropAnimation?ge.dropAnimation:me;let t=r.current.translate;const n=null!=t;if(t||c===f||(t={x:0,y:0}),!t||null===e)return void he();i.renderer.rendering.then(()=>{!function(e){var t,n,r,i;const{animation:o}=e;if("function"==typeof o){const t=o({element:e.element,feedbackElement:e.feedbackElement,placeholder:e.placeholder,translate:e.translate,moved:e.moved});return void Promise.resolve(t).then(()=>{e.cleanup(),requestAnimationFrame(e.restoreFocus)})}const{duration:a=qA,easing:s=TA}=null!=o?o:{};TM(e.feedbackElement);const[,l]=null!=(t=_P(e.feedbackElement,e=>"translate"in e))?t:[];null==l||l.pause();const u=null!=(n=e.placeholder)?n:e.element,c={frameTransform:EA(e.feedbackElement,u)?null:void 0},d=new uL(e.feedbackElement,c),p=null!=(r=XM(VM(e.feedbackElement).translate))?r:e.translate,f=new uL(u,c),h=aD.delta(d,f,e.alignment),m=p.x-h.x,g=p.y-h.y,v=Math.round(d.intrinsicHeight)!==Math.round(f.intrinsicHeight)?{minHeight:[`${d.intrinsicHeight}px`,`${f.intrinsicHeight}px`],maxHeight:[`${d.intrinsicHeight}px`,`${f.intrinsicHeight}px`]}:{},y=Math.round(d.intrinsicWidth)!==Math.round(f.intrinsicWidth)?{minWidth:[`${d.intrinsicWidth}px`,`${f.intrinsicWidth}px`],maxWidth:[`${d.intrinsicWidth}px`,`${f.intrinsicWidth}px`]}:{};e.styles.set({transition:e.transition},vA),e.feedbackElement.setAttribute(gA,""),null==(i=e.getElementMutationObserver())||i.takeRecords(),rL({element:e.feedbackElement,keyframes:LL(ML(ML({},v),y),{translate:[`${p.x}px ${p.y}px 0`,`${m}px ${g}px 0`]}),options:{duration:nM($P(e.feedbackElement))?0:e.moved||e.feedbackElement!==e.element?a:0,easing:s}}).then(()=>{e.feedbackElement.removeAttribute(gA),null==l||l.finish(),e.cleanup(),requestAnimationFrame(e.restoreFocus)})}({element:c,feedbackElement:f,placeholder:z,translate:t,moved:n,transition:I,alignment:l.alignment,styles:E,animation:null!=e?e:void 0,getElementMutationObserver:()=>re,cleanup:he,restoreFocus:fe})})}});return()=>{he(),ve()}},FL(MA,4,"overlay",RA,NA,LA),jL(MA,NA),NA.configure=BD(NA);var jA,_A,FA,zA,WA,$A,HA,VA=NA,BA=!0;FA=[kI],zA=ZM.Forward,jA=[kI],_A=ZM.Reverse;var GA=class{constructor(){HL(this,$A,_L(WA,8,this,BA)),_L(WA,11,this),HL(this,HA,_L(WA,12,this,BA)),_L(WA,15,this)}isLocked(e){return e!==ZM.Idle&&(null==e?this[ZM.Forward]===BA&&this[ZM.Reverse]===BA:this[e]===BA)}unlock(e){e!==ZM.Idle&&(this[e]=false)}};WA=OL(null),$A=new WeakMap,HA=new WeakMap,FL(WA,4,zA,FA,GA,$A),FL(WA,4,_A,jA,GA,HA),jL(WA,GA);var UA,YA,KA,XA,JA,ZA,QA=[ZM.Forward,ZM.Reverse],ek=class{constructor(){this.x=new GA,this.y=new GA}isLocked(){return this.x.isLocked()&&this.y.isLocked()}},tk=class extends UD{constructor(e){super(e);const t=LE(new ek);let n=null;this.signal=t,zE(()=>{const{status:r}=e.dragOperation;if(!r.initialized)return n=null,void(t.value=new ek);const{delta:i}=e.dragOperation.position;if(n){const e={x:nk(i.x,n.x),y:nk(i.y,n.y)},r=t.peek();yE(()=>{for(const t of mD)for(const n of QA)e[t]===n&&r[t].unlock(n);t.value=r})}n=i})}get current(){return this.signal.peek()}};function nk(e,t){return Math.sign(e-t)}var rk=class extends(YA=KD,UA=[kI],YA){constructor(e){super(e),HL(this,XA,_L(KA,8,this,!1)),_L(KA,11,this),HL(this,JA),HL(this,ZA,()=>{if(!$L(this,JA))return;const{element:e,by:t}=$L(this,JA);t.y&&(e.scrollTop+=t.y),t.x&&(e.scrollLeft+=t.x)}),this.scroll=e=>{var t;if(this.disabled)return!1;const n=this.getScrollableElements();if(!n)return VL(this,JA,void 0),!1;const{position:r}=this.manager.dragOperation,i=null==r?void 0:r.current;if(i){const{by:r}=null!=e?e:{},o=r?{x:ik(r.x),y:ik(r.y)}:void 0,a=o?void 0:this.scrollIntentTracker.current;if(null==a?void 0:a.isLocked())return!1;for(const e of n){const n=_M(e,r);if(n.x||n.y){const{speed:n,direction:s}=tL(e,i,o);if(a)for(const e of mD)a[e].isLocked(s[e])&&(n[e]=0,s[e]=0);if(s.x||s.y){const{x:i,y:o}=null!=r?r:s,a=i*n.x,l=o*n.y;if(a||l){const n=null==(t=$L(this,JA))?void 0:t.by;if(this.autoScrolling&&n){if(n.x&&!a||n.y&&!l)continue}return VL(this,JA,{element:e,by:{x:a,y:l}}),zM.schedule($L(this,ZA)),!0}}}}}return VL(this,JA,void 0),!1};let t=null,n=null;const r=LI(()=>{const{position:n,source:r}=e.dragOperation;if(!n)return null;const i=oM(tM(null==r?void 0:r.element),n.current);return i&&(t=i),null!=i?i:t}),i=LI(()=>{const t=r.value,{documentElement:i}=GP(t);if(!t||t===i){const{target:t}=e.dragOperation,r=null==t?void 0:t.element;if(r){const e=UM(r,{excludeElement:!1});return n=e,e}}if(t){const e=UM(t,{excludeElement:!1});return this.autoScrolling&&n&&e.size<(null==n?void 0:n.size)?n:(n=e,e)}return n=null,null},AI);this.getScrollableElements=()=>i.value,this.scrollIntentTracker=new tk(e),this.destroy=e.monitor.addEventListener("dragmove",t=>{!this.disabled&&!t.defaultPrevented&&fL(e.dragOperation.activatorEvent)&&t.by&&this.scroll({by:t.by})&&t.preventDefault()})}};function ik(e){return e>0?ZM.Forward:e<0?ZM.Reverse:ZM.Idle}KA=OL(YA),XA=new WeakMap,JA=new WeakMap,ZA=new WeakMap,FL(KA,4,"autoScrolling",UA,rk,XA),jL(KA,rk);var ok,ak=new class{constructor(e){this.scheduler=e,this.pending=!1,this.tasks=new Set,this.resolvers=new Set,this.flush=()=>{const{tasks:e,resolvers:t}=this;this.pending=!1,this.tasks=new Set,this.resolvers=new Set;for(const t of e)t();for(const e of t)e()}}schedule(e){return this.tasks.add(e),this.pending||(this.pending=!0,this.scheduler(this.flush)),new Promise(e=>this.resolvers.add(e))}}(e=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(e):e()}),sk=class extends UD{constructor(e,t){super(e);const n=e.registry.plugins.get(rk);if(!n)throw new Error("AutoScroller plugin depends on Scroller plugin");this.destroy=zE(()=>{if(this.disabled)return;const{position:t,status:r}=e.dragOperation;if(r.dragging){if(n.scroll()){n.autoScrolling=!0;const e=setInterval(()=>ak.schedule(n.scroll),10);return()=>{clearInterval(e)}}n.autoScrolling=!1}})}},lk={capture:!0,passive:!0},uk=class extends KD{constructor(e){super(e),HL(this,ok),this.handleScroll=()=>{null==$L(this,ok)&&VL(this,ok,setTimeout(()=>{this.manager.collisionObserver.forceUpdate(!1),VL(this,ok,void 0)},50))};const{dragOperation:t}=this.manager;this.destroy=zE(()=>{var e,n,r;if(t.status.dragging){const i=null!=(r=null==(n=null==(e=t.source)?void 0:e.element)?void 0:n.ownerDocument)?r:document;return i.addEventListener("scroll",this.handleScroll,lk),()=>{i.removeEventListener("scroll",this.handleScroll,lk)}}})}};ok=new WeakMap;function ck(){var e;null==(e=document.getSelection())||e.removeAllRanges()}var dk,pk=Object.freeze({offset:10,keyboardCodes:{start:["Space","Enter"],cancel:["Escape"],end:["Space","Enter","Tab"],up:["ArrowUp"],down:["ArrowDown"],left:["ArrowLeft"],right:["ArrowRight"]},preventActivation(e,t){var n;const r=null!=(n=t.handle)?n:t.element;return e.target!==r}}),fk=class extends rP{constructor(e,t){super(e),this.manager=e,this.options=t,HL(this,dk,[]),this.listeners=new sM,this.handleSourceKeyDown=(e,t,n)=>{if(this.disabled||e.defaultPrevented)return;if(!pL(e.target))return;if(t.disabled)return;const{keyboardCodes:r=pk.keyboardCodes,preventActivation:i=pk.preventActivation}=null!=n?n:{};r.start.includes(e.code)&&this.manager.dragOperation.status.idle&&((null==i?void 0:i(e,t))||this.handleStart(e,t,n))}}bind(e,t=this.options){const n=zE(()=>{var n;const r=null!=(n=e.handle)?n:e.element,i=n=>{fL(n)&&this.handleSourceKeyDown(n,e,t)};if(r)return r.addEventListener("keydown",i),()=>{r.removeEventListener("keydown",i)}});return n}handleStart(e,t,n){const{element:r}=t;if(!r)throw new Error("Source draggable does not have an associated element");e.preventDefault(),e.stopImmediatePropagation(),nL(r);const{center:i}=new uL(r);if(this.manager.actions.start({event:e,coordinates:{x:i.x,y:i.y},source:t}).signal.aborted)return this.cleanup();this.sideEffects();const o=GP(r),a=[this.listeners.bind(o,[{type:"keydown",listener:e=>this.handleKeyDown(e,t,n),options:{capture:!0}}])];$L(this,dk).push(...a)}handleKeyDown(e,t,n){const{keyboardCodes:r=pk.keyboardCodes}=null!=n?n:{};if(gk(e,[...r.end,...r.cancel])){e.preventDefault();const t=gk(e,r.cancel);return void this.handleEnd(e,t)}gk(e,r.up)?this.handleMove("up",e):gk(e,r.down)&&this.handleMove("down",e),gk(e,r.left)?this.handleMove("left",e):gk(e,r.right)&&this.handleMove("right",e)}handleEnd(e,t){this.manager.actions.stop({event:e,canceled:t}),this.cleanup()}handleMove(e,t){var n,r;const{shape:i}=this.manager.dragOperation,o=t.shiftKey?5:1;let a={x:0,y:0},s=null!=(r=null==(n=this.options)?void 0:n.offset)?r:pk.offset;if("number"==typeof s&&(s={x:s,y:s}),i){switch(e){case"up":a={x:0,y:-s.y*o};break;case"down":a={x:0,y:s.y*o};break;case"left":a={x:-s.x*o,y:0};break;case"right":a={x:s.x*o,y:0}}(a.x||a.y)&&(t.preventDefault(),this.manager.actions.move({event:t,by:a}))}}sideEffects(){const e=this.manager.registry.plugins.get(sk);!1===(null==e?void 0:e.disabled)&&(e.disable(),$L(this,dk).push(()=>{e.enable()}))}cleanup(){$L(this,dk).forEach(e=>e()),VL(this,dk,[])}destroy(){this.cleanup(),this.listeners.clear()}};dk=new WeakMap,fk.configure=BD(fk),fk.defaults=pk;var hk,mk=fk;function gk(e,t){return t.includes(e.code)}var vk,yk;hk=new WeakMap;vk=new WeakMap,yk=new WeakMap;var bk=class{};bk.Delay=class extends oP{constructor(){super(...arguments),HL(this,vk),HL(this,yk)}onEvent(e){switch(e.type){case"pointerdown":VL(this,yk,KP(e)),VL(this,vk,setTimeout(()=>this.activate(e),this.options.value));break;case"pointermove":if(!$L(this,yk))return;const{x:t,y:n}=KP(e);uD({x:t-$L(this,yk).x,y:n-$L(this,yk).y},this.options.tolerance)&&this.abort();break;case"pointerup":this.abort()}}abort(){$L(this,vk)&&(clearTimeout($L(this,vk)),VL(this,yk,void 0),VL(this,vk,void 0))}},bk.Distance=class extends oP{constructor(){super(...arguments),HL(this,hk)}onEvent(e){switch(e.type){case"pointerdown":VL(this,hk,KP(e));break;case"pointermove":if(!$L(this,hk))return;const{x:t,y:n}=KP(e),r={x:t-$L(this,hk).x,y:n-$L(this,hk).y},{tolerance:i}=this.options;if(i&&uD(r,i))return void this.abort();uD(r,this.options.value)&&this.activate(e);break;case"pointerup":this.abort()}}abort(){VL(this,hk,void 0)}};var xk,Sk=Object.freeze({activationConstraints(e,t){var n;const{pointerType:r,target:i}=e;if("mouse"!==r||!pL(i)||t.handle!==i&&!(null==(n=t.handle)?void 0:n.contains(i)))return"touch"===r?[new bk.Delay({value:250,tolerance:5})]:function(e){if(!pL(e))return!1;const{tagName:t}=e;return"INPUT"===t||"TEXTAREA"===t||(n=e).hasAttribute("contenteditable")&&"false"!==n.getAttribute("contenteditable");var n}(i)&&!e.defaultPrevented?[new bk.Delay({value:200,tolerance:0})]:[new bk.Delay({value:200,tolerance:10}),new bk.Distance({value:5})]},preventActivation(e,t){var n;const{target:r}=e;return r!==t.element&&(r!==t.handle&&(!!pL(r)&&(!(null==(n=t.handle)?void 0:n.contains(r))&&Boolean(r.closest('\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n a[href],\n [contenteditable]:not([contenteditable="false"])\n ')))))}}),wk=class extends rP{constructor(e,t){super(e),this.manager=e,this.options=t,HL(this,xk,new Set),this.listeners=new sM,this.latest={event:void 0,coordinates:void 0},this.handleMove=()=>{const{event:e,coordinates:t}=this.latest;e&&t&&this.manager.actions.move({event:e,to:t})},this.handleCancel=this.handleCancel.bind(this),this.handlePointerUp=this.handlePointerUp.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}activationConstraints(e,t,n=this.options){const{activationConstraints:r=Sk.activationConstraints}=null!=n?n:{};return"function"==typeof r?r(e,t):r}bind(e,t=this.options){const n=zE(()=>{var n;const r=new AbortController,{signal:i}=r,o=n=>{(function(e){if(!e)return!1;const{PointerEvent:t}=$P(e.target);return e instanceof t})(n)&&this.handlePointerDown(n,e,t)};let a=[null!=(n=e.handle)?n:e.element];(null==t?void 0:t.activatorElements)&&(a=Array.isArray(t.activatorElements)?t.activatorElements:t.activatorElements(e));for(const e of a)e&&(Rk(e.ownerDocument.defaultView),e.addEventListener("pointerdown",o,{signal:i}));return()=>r.abort()});return n}handlePointerDown(e,t,n){if(this.disabled||!e.isPrimary||0!==e.button||!pL(e.target)||t.disabled||function(e){return"sensor"in e}(e)||!this.manager.dragOperation.status.idle)return;const{preventActivation:r=Sk.preventActivation}=null!=n?n:{};if(null==r?void 0:r(e,t))return;const{target:i}=e,o=VP(i)&&i.draggable&&"true"===i.getAttribute("draggable"),a=YM(t.element),{x:s,y:l}=KP(e);this.initialCoordinates={x:s*a.scaleX+a.x,y:l*a.scaleY+a.y};const u=this.activationConstraints(e,t,n);e.sensor=this;const c=new iP(u,e=>this.handleStart(t,e));c.signal.onabort=()=>this.handleCancel(e),c.onEvent(e),this.controller=c;const d=JP(),p=this.listeners.bind(d,[{type:"pointermove",listener:e=>this.handlePointerMove(e,t)},{type:"pointerup",listener:this.handlePointerUp,options:{capture:!0}},{type:"pointercancel",listener:this.handleCancel},{type:"dragstart",listener:o?this.handleCancel:Ek,options:{capture:!0}}]);$L(this,xk).add(()=>{p(),this.initialCoordinates=void 0})}handlePointerMove(e,t){var n,r;if(!1!==(null==(n=this.controller)?void 0:n.activated)){if(this.manager.dragOperation.status.dragging){const n=KP(e),r=YM(t.element);n.x=n.x*r.scaleX+r.x,n.y=n.y*r.scaleY+r.y,e.preventDefault(),e.stopPropagation(),this.latest.event=e,this.latest.coordinates=n,zM.schedule(this.handleMove)}}else null==(r=this.controller)||r.onEvent(e)}handlePointerUp(e){const{status:t}=this.manager.dragOperation;if(!t.idle){e.preventDefault(),e.stopPropagation();const n=!t.initialized;this.manager.actions.stop({event:e,canceled:n})}this.cleanup()}handleKeyDown(e){"Escape"===e.key&&(e.preventDefault(),this.handleCancel(e))}handleStart(e,t){const{manager:n,initialCoordinates:r}=this;if(!r||!n.dragOperation.status.idle)return;if(t.defaultPrevented)return;if(n.actions.start({coordinates:r,event:t,source:e}).signal.aborted)return this.cleanup();t.preventDefault();const i=GP(t.target).body;i.setPointerCapture(t.pointerId);const o=pL(t.target)?[t.target,i]:i,a=this.listeners.bind(o,[{type:"touchmove",listener:Ek,options:{passive:!1}},{type:"click",listener:Ek},{type:"contextmenu",listener:Ek},{type:"keydown",listener:this.handleKeyDown}]);$L(this,xk).add(a)}handleCancel(e){const{dragOperation:t}=this.manager;t.status.initialized&&this.manager.actions.stop({event:e,canceled:!0}),this.cleanup()}cleanup(){this.latest={event:void 0,coordinates:void 0},$L(this,xk).forEach(e=>e()),$L(this,xk).clear()}destroy(){this.cleanup(),this.listeners.clear()}};xk=new WeakMap,wk.configure=BD(wk),wk.defaults=Sk;var Ck=wk;function Ek(e){e.preventDefault()}function Ik(){}var Dk=new WeakSet;function Rk(e){e&&!Dk.has(e)&&(e.addEventListener("touchmove",Ik,{capture:!1,passive:!1}),Dk.add(e))}var Pk,Mk,Lk,Ak,kk,Ok,qk,Tk,Nk,jk,_k,Fk,zk,Wk,$k,Hk,Vk,Bk,Gk={modifiers:[],plugins:[class extends UD{constructor(e,t){super(e);const{id:n,idPrefix:{description:r=YL,announcement:i=KL}={},announcements:o=JL,screenReaderInstructions:a=XL,debounce:s=500}=null!=t?t:{},l=n?`${r}-${n}`:mL(r),u=n?`${i}-${n}`:mL(i);let c,d,p,f;const h=(e=f)=>{p&&e&&(null==p?void 0:p.nodeValue)!==e&&(p.nodeValue=e)},m=()=>zM.schedule(h),g=function(e,t){let n;const r=()=>{clearTimeout(n),n=setTimeout(e,t)};return r.cancel=()=>clearTimeout(n),r}(m,s),v=Object.entries(o).map(([e,t])=>this.manager.monitor.addEventListener(e,(n,r)=>{const i=p;if(!i)return;const o=null==t?void 0:t(n,r);o&&i.nodeValue!==o&&(f=o,QL.includes(e)?g():(m(),g.cancel()))})),y=()=>{let e=[];(null==c?void 0:c.isConnected)||(c=function(e,t){const n=document.createElement("div");return n.id=e,n.style.setProperty("display","none"),n.textContent=t,n}(l,a.draggable),e.push(c)),(null==d?void 0:d.isConnected)||(d=function(e){const t=document.createElement("div");return t.id=e,t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true"),t.style.setProperty("position","fixed"),t.style.setProperty("width","1px"),t.style.setProperty("height","1px"),t.style.setProperty("margin","-1px"),t.style.setProperty("border","0"),t.style.setProperty("padding","0"),t.style.setProperty("overflow","hidden"),t.style.setProperty("clip","rect(0 0 0 0)"),t.style.setProperty("clip-path","inset(100%)"),t.style.setProperty("white-space","nowrap"),t}(u),p=document.createTextNode(""),d.appendChild(p),e.push(d)),e.length>0&&document.body.append(...e)},b=new Set;function x(){for(const e of b)e()}this.registerEffect(()=>{var e;b.clear();for(const t of this.manager.registry.draggables.value){const n=null!=(e=t.handle)?e:t.element;if(n){c&&d||b.add(y),ZL(n)&&!ZP()||n.hasAttribute("tabindex")||b.add(()=>n.setAttribute("tabindex","0")),n.hasAttribute("role")||"button"===n.tagName.toLowerCase()||b.add(()=>n.setAttribute("role",GL)),n.hasAttribute("aria-roledescription")||b.add(()=>n.setAttribute("aria-roledescription",UL)),n.hasAttribute("aria-describedby")||b.add(()=>n.setAttribute("aria-describedby",l));for(const e of["aria-pressed","aria-grabbed"]){const r=String(t.isDragging);n.getAttribute(e)!==r&&b.add(()=>n.setAttribute(e,r))}const e=String(t.disabled);n.getAttribute("aria-disabled")!==e&&b.add(()=>n.setAttribute("aria-disabled",e))}}b.size>0&&zM.schedule(x)}),this.destroy=()=>{super.destroy(),null==c||c.remove(),null==d||d.remove(),v.forEach(e=>e())}}},sk,class extends UD{constructor(e,t){super(e,t),this.manager=e;const n=LI(()=>{var e;return GP(null==(e=this.manager.dragOperation.source)?void 0:e.element)});this.destroy=zE(()=>{var e;const{dragOperation:t}=this.manager,{cursor:r="grabbing",nonce:i}=null!=(e=this.options)?e:{};if(t.status.initialized){const e=n.value,t=e.createElement("style");return i&&t.setAttribute("nonce",i),t.textContent=`* { cursor: ${r} !important; }`,e.head.appendChild(t),()=>t.remove()}})}},VA,class extends UD{constructor(e,t){super(e,t),this.manager=e,this.destroy=zE(()=>{var e;const{dragOperation:t}=this.manager,{nonce:n}=null!=(e=this.options)?e:{};if(t.status.initialized){const e=document.createElement("style");return n&&e.setAttribute("nonce",n),e.textContent="* { user-select: none !important; -webkit-user-select: none !important; }",document.head.appendChild(e),ck(),document.addEventListener("selectionchange",ck,{capture:!0}),()=>{document.removeEventListener("selectionchange",ck,{capture:!0}),e.remove()}}})}}],sensors:[Ck,mk]},Uk=class extends LP{constructor(e={}){const t=MP(e.plugins,Gk.plugins),n=MP(e.sensors,Gk.sensors),r=MP(e.modifiers,Gk.modifiers);super(LL(ML({},e),{plugins:[uk,rk,hA,...t],sensors:n,modifiers:r}))}},Yk=class extends(Ak=eP,Lk=[kI],Mk=[kI],Pk=[kI],Ak){constructor(e,t){var n=e,{element:r,effects:i=()=>[],handle:o,feedback:a="default"}=n,s=kL(n,["element","effects","handle","feedback"]);super(ML({effects:()=>[...i(),()=>{var e,t;const{manager:n}=this;if(!n)return;const r=(null!=(t=null==(e=this.sensors)?void 0:e.map(GD))?t:[...n.sensors]).map(e=>{const t=e instanceof rP?e:n.registry.register(e.plugin),r=e instanceof rP?void 0:e.options;return t.bind(this,r)});return function(){r.forEach(e=>e())}}]},s),t),HL(this,Ok,_L(kk,8,this)),_L(kk,11,this),HL(this,qk,_L(kk,12,this)),_L(kk,15,this),HL(this,Tk,_L(kk,16,this)),_L(kk,19,this),this.element=r,this.handle=o,this.feedback=a}};kk=OL(Ak),Ok=new WeakMap,qk=new WeakMap,Tk=new WeakMap,FL(kk,4,"handle",Lk,Yk,Ok),FL(kk,4,"element",Mk,Yk,qk),FL(kk,4,"feedback",Pk,Yk,Tk),jL(kk,Yk);var Kk=class extends(_k=tP,jk=[kI],Nk=[kI],_k){constructor(e,t){var n=e,{element:r,effects:i=()=>[]}=n,o=kL(n,["element","effects"]);const{collisionDetector:a=gL}=o,s=e=>{const{manager:t,element:n}=this;if(!n||null===e)return void(this.shape=void 0);if(!t)return;const r=new uL(n),i=xE(()=>this.shape);return r&&(null==i?void 0:i.equals(r))?i:(this.shape=r,r)},l=LE(!1);super(LL(ML({},o),{collisionDetector:a,effects:()=>[...i(),()=>{const{element:e,manager:t}=this;if(!t)return;const{dragOperation:n}=t,{source:r}=n;l.value=Boolean(r&&n.status.initialized&&e&&!this.disabled&&this.accepts(r))},()=>{const{element:e}=this;if(l.value&&e){const t=new OM(e,s);return()=>{t.disconnect(),this.shape=void 0}}},()=>{var e;if(null==(e=this.manager)?void 0:e.dragOperation.status.initialized)return()=>{this.shape=void 0}}]}),t),HL(this,Vk),HL(this,zk,_L(Fk,8,this)),_L(Fk,11,this),HL(this,Bk,_L(Fk,12,this)),_L(Fk,15,this),this.element=r,this.refreshShape=()=>s()}set element(e){VL(this,Vk,e,Hk)}get element(){var e;return null!=(e=this.proxy)?e:$L(this,Vk,$k)}};function Xk(e){var t;if(null!=e)return function(e){return null!=e&&"object"==typeof e&&"current"in e}(e)?null!=(t=e.current)?t:void 0:e}Fk=OL(_k),zk=new WeakMap,Vk=new WeakSet,Bk=new WeakMap,Wk=FL(Fk,20,"#element",jk,Vk,zk),$k=Wk.get,Hk=Wk.set,FL(Fk,4,"proxy",Nk,Kk,Bk),jL(Fk,Kk);var Jk="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?g:d;function Zk(){const e=m(0)[1];return f(()=>{e(e=>e+1)},[e])}function Qk(e,t=[],n=!1){const r=l(e);return r.current=e,function(e,t=!1){const n=l(e.peek()),r=l(!1),i=Zk();return Jk(()=>zE(()=>{const o=n.current,a=e.value;if(o!==a){if(n.current=a,!r.current)return;t?D(i):i()}}),[e,t,i]),{get value(){return r.current=!0,e.peek()}}}(v(()=>LI(()=>r.current()),t),n)}function eO(e,t){const n=l(new Map),r=Zk();return Jk(()=>{if(e)return zE(()=>{var i;let o=!1,a=!1;for(const r of n.current){const[s]=r,l=xE(()=>r[1]),u=e[s];l!==u&&(o=!0,n.current.set(s,u),a=null!=(i=null==t?void 0:t(s,l,u))&&i)}o&&(a?D(r):r())});n.current.clear()},[e]),v(()=>e?new Proxy(e,{get(e,t){const r=e[t];return n.current.set(t,r),r}}):e,[e])}function tO(e,t){e()}function nO(e){const t=l(e);return Jk(()=>{t.current=e},[e]),t}function rO(e,t,n=d,r=Object.is){const i=l(e);n(()=>{const n=i.current;r(e,n)||(i.current=e,t(e,n))},[t,e])}function iO(e,t){const n=l(Xk(e));Jk(()=>{const r=Xk(e);r!==n.current&&(n.current=r,t(r))})}var oO=Object.defineProperty,aO=Object.defineProperties,sO=Object.getOwnPropertyDescriptors,lO=Object.getOwnPropertySymbols,uO=Object.prototype.hasOwnProperty,cO=Object.prototype.propertyIsEnumerable,dO=(e,t,n)=>t in e?oO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pO=new Uk,fO=u(pO),hO=b(x(({children:e},t)=>{const[n,r]=m(0),i=l(null),o=l(null),a=v(()=>({renderer:{get rendering(){var e;return null!=(e=i.current)?e:Promise.resolve()}},trackRendering(e){i.current||(i.current=new Promise(e=>{o.current=e})),S(()=>{e(),r(e=>e+1)})}}),[]);return Jk(()=>{var e;null==(e=o.current)||e.call(o),i.current=null},[e,n]),w(t,()=>a),null})),mO=[void 0,AI];function gO(e){var t=e,{children:n,onCollision:r,onBeforeDragStart:i,onDragStart:o,onDragMove:a,onDragOver:s,onDragEnd:u}=t,c=((e,t)=>{var n={};for(var r in e)uO.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&lO)for(var r of lO(e))t.indexOf(r)<0&&cO.call(e,r)&&(n[r]=e[r]);return n})(t,["children","onCollision","onBeforeDragStart","onDragStart","onDragMove","onDragOver","onDragEnd"]);const p=l(null),{plugins:f,modifiers:h,sensors:m}=c,g=MP(f,Gk.plugins),v=MP(m,Gk.sensors),b=MP(h,Gk.modifiers),x=nO(i),S=nO(o),w=nO(s),C=nO(a),E=nO(u),I=nO(r),D=function(e){const t=l(null);t.current||(t.current=e());return y(()=>()=>{var e;return null==(e=t.current)?void 0:e.destroy()},[]),t.current}(()=>{var e;return null!=(e=c.manager)?e:new Uk(c)});return d(()=>{if(!p.current)throw new Error("Renderer not found");const{renderer:e,trackRendering:t}=p.current,{monitor:n}=D;D.renderer=e;const r=[n.addEventListener("beforedragstart",e=>{const n=x.current;n&&t(()=>n(e,D))}),n.addEventListener("dragstart",e=>{var t;return null==(t=S.current)?void 0:t.call(S,e,D)}),n.addEventListener("dragover",e=>{const n=w.current;n&&t(()=>n(e,D))}),n.addEventListener("dragmove",e=>{const n=C.current;n&&t(()=>n(e,D))}),n.addEventListener("dragend",e=>{const n=E.current;n&&t(()=>n(e,D))}),n.addEventListener("collision",e=>{var t;return null==(t=I.current)?void 0:t.call(I,e,D)})];return()=>r.forEach(e=>e())},[D]),rO(g,()=>D&&(D.plugins=g),...mO),rO(v,()=>D&&(D.sensors=v),...mO),rO(b,()=>D&&(D.modifiers=b),...mO),fo.jsxs(fO.Provider,{value:D,children:[fo.jsx(hO,{ref:p,children:n}),n]})}function vO(){return h(fO)}function yO(e){var t;const n=null!=(t=vO())?t:void 0,[r]=m(()=>e(n));return r.manager!==n&&(r.manager=n),Jk(r.register,[n,r]),r}function bO({children:e,className:t,dropAnimation:n,style:i,tag:o,disabled:a}){var s;const u=l(null),c=vO(),p=null!=(s=Qk(()=>null==c?void 0:c.dragOperation.source,[c]).value)?s:null,f="function"==typeof a?a(p):a;d(()=>{if(!u.current||!c||f)return;const e=c.plugins.find(e=>e instanceof VA);return e?(e.overlay=u.current,()=>{e.overlay=void 0}):void 0},[c,f]),d(()=>{if(!c)return;const e=c.plugins.find(e=>e instanceof VA);return e?(e.dropAnimation=n,()=>{e.dropAnimation=void 0}):void 0},[c,n]);const h=v(()=>{if(!c)return null;const e=new Proxy(c.registry,{get:(e,t)=>"register"===t||"unregister"===t?xO:e[t]});return new Proxy(c,{get:(t,n)=>"registry"===n?e:t[n]})},[c]);return fo.jsx(fO.Provider,{value:h,children:r(o||"div",{ref:u,className:t,style:i,"data-dnd-overlay":!0},function(){if(!p||f)return null;if("function"==typeof e)return fo.jsx(SO,{source:p,children:e});return e}())})}function xO(){return()=>{}}function SO({children:e,source:t}){return e(eO(t))}var wO,CO,EO,IO,DO,RO=Object.create,PO=Object.defineProperty,MO=Object.getOwnPropertyDescriptor,LO=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),AO=e=>{throw TypeError(e)},kO=["class","method","getter","setter","accessor","field","value","get","set"],OO=e=>void 0!==e&&"function"!=typeof e?AO("Function expected"):e,qO=(e,t,n,r,i)=>({kind:kO[e],name:t,metadata:r,addInitializer:e=>n._?AO("Already initialized"):i.push(OO(e||null))}),TO=(e,t,n,r,i,o)=>{for(var a,s,l,u,c=7&t,d=kO[c+5],p=e[2]||(e[2]=[]),f=(i=i.prototype,MO(i,n)),h=r.length-1;h>=0;h--)(l=qO(c,n,s={},e[3],p)).static=false,l.private=false,u=l.access={has:e=>n in e},u.get=e=>e[n],a=(0,r[h])(f[d],l),s._=1,OO(a)&&(f[d]=a);return f&&PO(i,n,f),i},NO=(e,t,n)=>t.has(e)||AO("Cannot "+n),jO=class e{constructor(e,t){this.x=e,this.y=t}static delta(t,n){return new e(t.x-n.x,t.y-n.y)}static distance(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}static equals(e,t){return e.x===t.x&&e.y===t.y}static from({x:t,y:n}){return new e(t,n)}},_O=class extends(EO=jI,CO=[OI],wO=[OI],EO){constructor(e){var t,n,r;super(jO.from(e),(e,t)=>jO.equals(e,t)),((e,t,n)=>{for(var r=0,i=e[t>>1],o=i&&i.length;r<o;r++)i[r].call(n)})(DO,5,this),t=this,r=0,(n=IO).has(t)?AO("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(t):n.set(t,r),this.velocity={x:0,y:0}}get delta(){return jO.delta(this.current,this.initial)}get direction(){const{current:e,previous:t}=this;if(!t)return null;const n={x:e.x-t.x,y:e.y-t.y};return n.x||n.y?Math.abs(n.x)>Math.abs(n.y)?n.x>0?"right":"left":n.y>0?"down":"up":null}get current(){return super.current}set current(e){const{current:t}=this,n=jO.from(e),r={x:n.x-t.x,y:n.y-t.y},i=Date.now(),o=i-(NO(a=this,s=IO,"read from private field"),s.get(a));var a,s;const l=e=>Math.round(e/o*100);yE(()=>{((e,t,n)=>{NO(e,t,"write to private field"),t.set(e,n)})(this,IO,i),this.velocity={x:l(r.x),y:l(r.y)},super.current=n})}reset(e=this.defaultValue){super.reset(jO.from(e)),this.velocity={x:0,y:0}}};DO=(e=>{var t;return[,,,RO(null!=(t=null==e?void 0:e[LO("metadata")])?t:null)]})(EO),IO=new WeakMap,TO(DO,2,"delta",CO,_O),TO(DO,2,"direction",wO,_O),((e,t)=>{((e,t,n)=>{t in e?PO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(t,LO("metadata"),e[3])})(DO,_O);var FO=(e=>(e.Horizontal="x",e.Vertical="y",e))(FO||{});Object.values(FO);var zO=e=>{var t;return null!=(t=(({dragOperation:e,droppable:t})=>{const n=e.position.current;if(!n)return null;const{id:r}=t;if(!t.shape)return null;if(t.shape.containsPoint(n))return{id:r,value:1/jO.distance(t.shape.center,n),type:gR.PointerIntersection,priority:mR.High};return null})(e))?t:(({dragOperation:e,droppable:t})=>{const{shape:n}=e;if(!t.shape||!(null==n?void 0:n.current))return null;const r=n.current.intersectionArea(t.shape);if(r){const{position:i}=e,o=jO.distance(t.shape.center,i.current),a=r/(n.current.area+t.shape.area-r)/o;return{id:t.id,value:a,type:gR.ShapeIntersection,priority:mR.Normal}}return null})(e)};function WO(e){const{collisionDetector:t,data:n,disabled:r,element:i,id:o,accept:a,type:s}=e,l=yO(t=>new Kk(((e,t)=>aO(e,sO(t)))(((e,t)=>{for(var n in t||(t={}))uO.call(t,n)&&dO(e,n,t[n]);if(lO)for(var n of lO(t))cO.call(t,n)&&dO(e,n,t[n]);return e})({},e),{register:!1,element:Xk(i)}),t)),u=eO(l);return rO(o,()=>l.id=o),iO(i,e=>l.element=e),rO(a,()=>l.accept=a,void 0,AI),rO(t,()=>l.collisionDetector=null!=t?t:zO),rO(n,()=>n&&(l.data=n)),rO(r,()=>l.disabled=!0===r),rO(s,()=>l.type=s),{droppable:u,get isDropTarget(){return u.isDropTarget},ref:f(e=>{var t,n;(e||!(null==(t=l.element)?void 0:t.isConnected)||(null==(n=l.manager)?void 0:n.dragOperation.status.idle))&&(l.element=null!=e?e:void 0)},[l])}}const $O=e=>Array.from({length:e},(e,t)=>t),HO=({id:e,sectionIndex:t,itemIndex:n})=>fo.jsx("span",{children:`${e}-${t}-${n}`}),VO=n.memo(()=>{const e=qw(sE)??HO,{startSectionIndex:t,startIndex:n,id:r}=qw(dE)??{};return"number"!=typeof t||"number"!=typeof n||void 0===r?null:fo.jsx(bO,{dropAnimation:null,children:fo.jsx("div",{style:{display:"flex",alignItems:"center",padding:"10px",background:"white",boxShadow:"0px 4px 10px 0px rgba(0, 0, 0, 0.15)",borderRadius:"4px",border:"1px solid rgba(0, 0, 0, 0.15)",width:"208px",maxHeight:"32px",fontSize:"12px",lineHeight:"16px"},children:fo.jsx(e,{id:r,sectionIndex:t,itemIndex:n})})})}),BO=({sectionIndex:e,itemIndex:t,isDragging:n})=>{const r=qw(dE),i=r?.toSectionIndex===e&&r.toIndex===t;return fo.jsx("div",{"data-key":"drop-target-indicator","data-testid":"drop-target-indicator",style:{visibility:i&&!n?"visible":"hidden",padding:0,background:"rgba(64, 64, 64, 1)",borderRadius:2,marginLeft:"4px",width:"calc(100% - 8px)",height:"2px"}})},GO=(e,t)=>e?"2px solid rgba(0, 135, 61, 1)":t?"1px dashed rgba(0, 0, 0, 0.43)":void 0,UO=n.memo(({sectionIndex:e})=>{const t=qw(eE)[e],n=qw(tE),r=qw(nE),i=null!==qw(dE),o=r(e),a=n({sectionIndex:e}),{ref:s,isDropTarget:l}=WO({id:a,type:"section",accept:"item",collisionPriority:mR.Low,data:{id:a,sectionIndex:e,sectionKey:a}});return t>0?null:fo.jsxs(sc,{ref:s,sx:{margin:"4px",outline:GO(l,i),borderRadius:"4px",boxSizing:"border-box"},children:[fo.jsx(sc,{sx:{position:"relative",top:"4px"},children:fo.jsx(BO,{sectionIndex:e,itemIndex:0,isDragging:!1})}),fo.jsxs(sc,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px",padding:"20px 4px"},children:[fo.jsx(Cu,{sx:{textAlign:"center",width:"fit-content",maxWidth:"100%",overflowWrap:"break-word",textOverflow:"ellipsis",fontWeight:"600",fontSize:"14px",lineHeight:"16px",color:"rgba(64, 64, 64, 1)"},children:o.title}),fo.jsx(Cu,{sx:{textAlign:"center",width:"fit-content",maxWidth:"100%",overflowWrap:"break-word",textOverflow:"ellipsis",fontSize:"12px",lineHeight:"150%",color:"rgba(64, 64, 64, 1)"},children:o.message})]})]})}),YO=n.memo(({id:e,sectionIndex:t})=>{const n=qw(aE);return void 0===n?null:fo.jsx(n,{id:e,sectionIndex:t})});var KO=Object.defineProperty,XO=Object.defineProperties,JO=Object.getOwnPropertyDescriptors,ZO=Object.getOwnPropertySymbols,QO=Object.prototype.hasOwnProperty,eq=Object.prototype.propertyIsEnumerable,tq=(e,t,n)=>t in e?KO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nq=(e,t)=>{for(var n in t||(t={}))QO.call(t,n)&&tq(e,n,t[n]);if(ZO)for(var n of ZO(t))eq.call(t,n)&&tq(e,n,t[n]);return e},rq=(e,t)=>XO(e,JO(t)),iq=class extends IP{apply({transform:e}){if(!this.options)return e;const{axis:t,value:n}=this.options;return rq(nq({},e),{[t]:n})}};iq.configure=BD(iq);var oq=iq,aq=oq.configure({axis:"x",value:0});oq.configure({axis:"y",value:0});var sq=class extends IP{apply({transform:e}){var t;const{size:n=20}=null!=(t=this.options)?t:{},r="number"==typeof n?n:n.x,i="number"==typeof n?n:n.y;return rq(nq({},e),{x:Math.ceil(e.x/r)*r,y:Math.ceil(e.y/i)*i})}};sq.configure=BD(sq);var lq=Object.create,uq=Object.defineProperty,cq=Object.defineProperties,dq=Object.getOwnPropertyDescriptor,pq=Object.getOwnPropertyDescriptors,fq=Object.getOwnPropertySymbols,hq=Object.prototype.hasOwnProperty,mq=Object.prototype.propertyIsEnumerable,gq=e=>{throw TypeError(e)},vq=(e,t,n)=>t in e?uq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yq=(e,t)=>{for(var n in t||(t={}))hq.call(t,n)&&vq(e,n,t[n]);if(fq)for(var n of fq(t))mq.call(t,n)&&vq(e,n,t[n]);return e},bq=(e,t)=>cq(e,pq(t)),xq=["class","method","getter","setter","accessor","field","value","get","set"],Sq=e=>void 0!==e&&"function"!=typeof e?gq("Function expected"):e,wq=(e,t,n,r,i)=>({kind:xq[e],name:t,metadata:r,addInitializer:e=>n._?gq("Already initialized"):i.push(Sq(e||null))}),Cq=(e,t,n,r)=>{for(var i=0,o=e[t>>1],a=o&&o.length;i<a;i++)1&t?o[i].call(n):r=o[i].call(n,r);return r},Eq=(e,t,n,r,i,o)=>{for(var a,s,l,u,c,d=7&t,p=e.length+1,f=xq[d+5],h=e[p-1]=[],m=e[p]||(e[p]=[]),g=(i=i.prototype,dq({get[n](){return Dq(this,o)},set[n](e){return Pq(this,o,e)}},n)),v=r.length-1;v>=0;v--)(u=wq(d,n,l={},e[3],m)).static=false,u.private=false,c=u.access={has:e=>n in e},c.get=e=>e[n],c.set=(e,t)=>e[n]=t,s=(0,r[v])({get:g.get,set:g.set},u),l._=1,void 0===s?Sq(s)&&(g[f]=s):"object"!=typeof s||null===s?gq("Object expected"):(Sq(a=s.get)&&(g.get=a),Sq(a=s.set)&&(g.set=a),Sq(a=s.init)&&h.unshift(a));return g&&uq(i,n,g),i},Iq=(e,t,n)=>t.has(e)||gq("Cannot "+n),Dq=(e,t,n)=>(Iq(e,t,"read from private field"),t.get(e)),Rq=(e,t,n)=>t.has(e)?gq("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Pq=(e,t,n,r)=>(Iq(e,t,"write to private field"),t.set(e,n),n);function Mq(e){return e instanceof aT||e instanceof oT}var Lq=class extends UD{constructor(e){super(e);const t=zE(()=>{const{dragOperation:t}=e;if(fL(t.activatorEvent)&&Mq(t.source)&&t.status.initialized){const t=e.registry.plugins.get(rk);if(t)return t.disable(),()=>t.enable()}}),n=e.monitor.addEventListener("dragmove",(e,t)=>{queueMicrotask(()=>{if(this.disabled||e.defaultPrevented||!e.nativeEvent)return;const{dragOperation:n}=t;if(!fL(e.nativeEvent))return;if(!Mq(n.source))return;if(!n.shape)return;const{actions:r,collisionObserver:i,registry:o}=t,{by:a}=e;if(!a)return;const s=function(e){const{x:t,y:n}=e;if(t>0)return"right";if(t<0)return"left";if(n>0)return"down";if(n<0)return"up"}(a),{source:l,target:u}=n,{center:c}=n.shape.current,d=[],p=[];yE(()=>{for(const e of o.droppables){const{id:t}=e;if(!e.accepts(l)||t===(null==u?void 0:u.id)&&Mq(e)||!e.element)continue;let n=e.shape;const r=new uL(e.element,{getBoundingClientRect:e=>YP(e,void 0,.2)});r.height&&r.width&&(("down"==s&&c.y+10<r.center.y||"up"==s&&c.y-10>r.center.y||"left"==s&&c.x-10>r.center.x||"right"==s&&c.x+10<r.center.x)&&(d.push(e),e.shape=r,p.push(()=>e.shape=n)))}}),e.preventDefault(),i.disable();const f=i.computeCollisions(d,vL);yE(()=>p.forEach(e=>e()));const[h]=f;if(!h)return;const{id:m}=h,{index:g,group:v}=l.sortable;r.setDropTarget(m).then(()=>{const{source:e,target:t,shape:o}=n;if(!e||!Mq(e)||!o)return;const{index:a,group:s,target:l}=e.sortable,u=g!==a||v!==s,c=u?l:null==t?void 0:t.element;if(!c)return;nL(c);const d=new uL(c);if(!d)return;const p=aD.delta(d,aD.from(o.current.boundingRectangle),e.alignment);r.move({by:p}),u?r.setDropTarget(e.id).then(()=>i.enable()):i.enable()})})});this.destroy=()=>{n(),t()}}};var Aq=Object.defineProperty,kq=Object.defineProperties,Oq=Object.getOwnPropertyDescriptors,qq=Object.getOwnPropertySymbols,Tq=Object.prototype.hasOwnProperty,Nq=Object.prototype.propertyIsEnumerable,jq=(e,t,n)=>t in e?Aq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_q=(e,t)=>{for(var n in t||(t={}))Tq.call(t,n)&&jq(e,n,t[n]);if(qq)for(var n of qq(t))Nq.call(t,n)&&jq(e,n,t[n]);return e},Fq=(e,t)=>kq(e,Oq(t));function zq(e,t,n){if(t===n)return e;const r=e.slice();return r.splice(n,0,r.splice(t,1)[0]),r}function Wq(e){return"initialIndex"in e&&"number"==typeof e.initialIndex&&"index"in e&&"number"==typeof e.index}function $q(e,t){return function(e,t,n){var r,i,o;const{source:a,target:s,canceled:l}=t.operation;if(!a||!s||l)return"preventDefault"in t&&t.preventDefault(),e;const u=(e,t)=>e===t||"object"==typeof e&&"id"in e&&e.id===t;if(Array.isArray(e)){const r=e.findIndex(e=>u(e,a.id)),i=e.findIndex(e=>u(e,s.id));if(-1===r||-1===i){if(Wq(a)){const r=a.initialIndex,i=a.index;return r===i||r<0||r>=e.length?("preventDefault"in t&&t.preventDefault(),e):n(e,r,i)}return e}if(!l&&"index"in a&&"number"==typeof a.index){const t=a.index;if(t!==r)return n(e,r,t)}return n(e,r,i)}const c=Object.entries(e);let d,p,f=-1,h=-1;for(const[e,t]of c)if(-1===f&&(f=t.findIndex(e=>u(e,a.id)),-1!==f&&(d=e)),-1===h&&(h=t.findIndex(e=>u(e,s.id)),-1!==h&&(p=e)),-1!==f&&-1!==h)break;if(-1===f&&Wq(a)){const r=a.initialGroup,i=a.initialIndex,o=a.group,s=a.index;if(null==r||null==o||!(r in e)||!(o in e))return"preventDefault"in t&&t.preventDefault(),e;if(r===o&&i===s)return"preventDefault"in t&&t.preventDefault(),e;if(r===o)return Fq(_q({},e),{[r]:n(e[r],i,s)});const l=e[r][i];return Fq(_q({},e),{[r]:[...e[r].slice(0,i),...e[r].slice(i+1)],[o]:[...e[o].slice(0,s),l,...e[o].slice(s)]})}if(!a.manager)return e;const{dragOperation:m}=a.manager,g=null!=(i=null==(r=m.shape)?void 0:r.current.center)?i:m.position.current;if(null==p&&s.id in e){const t=s.shape&&g.y>s.shape.center.y?e[s.id].length:0;p=s.id,h=t}if(null==d||null==p||d===p&&f===h){if(null!=d&&d===p&&f===h&&Wq(a)){const t=null!=a.group&&a.group!==d,r=a.index!==f;if(t||r){const t=null!=(o=a.group)?o:d;if(t in e){if(d===t)return Fq(_q({},e),{[d]:n(e[d],f,a.index)});const r=e[d][f];return Fq(_q({},e),{[d]:[...e[d].slice(0,f),...e[d].slice(f+1)],[t]:[...e[t].slice(0,a.index),r,...e[t].slice(a.index)]})}}}return"preventDefault"in t&&t.preventDefault(),e}if(d===p)return Fq(_q({},e),{[d]:n(e[d],f,h)});const v=s.shape&&Math.round(g.y)>Math.round(s.shape.center.y)?1:0,y=e[d][f];return Fq(_q({},e),{[d]:[...e[d].slice(0,f),...e[d].slice(f+1)],[p]:[...e[p].slice(0,h+v),y,...e[p].slice(h+v)]})}(e,t,zq)}var Hq="__default__";function Vq(e,t,n,r){const i=r<t?"afterend":"beforebegin";n.insertAdjacentElement(i,e)}function Bq(e,t){return e.index-t.index}function Gq(e){return Array.from(e).sort(Bq)}var Uq,Yq,Kq,Xq,Jq,Zq,Qq,eT,tT=[Lq,class extends UD{constructor(e){super(e);const t=()=>{const t=new Map;for(const n of e.registry.droppables)if(n instanceof aT){const{sortable:e}=n,{group:r}=e;let i=t.get(r);i||(i=new Set,t.set(r,i)),i.add(e)}for(const[e,n]of t)t.set(e,new Set(Gq(n)));return t},n=[e.monitor.addEventListener("dragover",(e,n)=>{if(this.disabled)return;const{dragOperation:r}=n,{source:i,target:o}=r;if(!Mq(i)||!Mq(o))return;if(i.sortable===o.sortable)return;const a=t(),s=i.sortable.group===o.sortable.group,l=a.get(i.sortable.group),u=s?l:a.get(o.sortable.group);l&&u&&queueMicrotask(()=>{e.defaultPrevented||n.renderer.rendering.then(()=>{var r,c,d;const p=t();for(const[e,t]of a.entries()){const n=Array.from(t).entries();for(const[t,i]of n)if(i.index!==t||i.group!==e||!(null==(r=p.get(e))?void 0:r.has(i)))return}const f=i.sortable.element,h=o.sortable.element;if(!h||!f)return;if(!s&&o.id===i.sortable.group)return;const m=Gq(l),g=s?m:Gq(u),v=null!=(c=i.sortable.group)?c:Hq,y=null!=(d=o.sortable.group)?d:Hq,b={[v]:m,[y]:g},x=$q(b,e);if(b===x)return;const S=x[y].indexOf(i.sortable),w=x[y].indexOf(o.sortable);n.collisionObserver.disable(),Vq(f,S,h,w),yE(()=>{for(const[e,t]of x[v].entries())t.index=e;if(!s)for(const[e,t]of x[y].entries())t.group=o.sortable.group,t.index=e}),n.actions.setDropTarget(i.id).then(()=>n.collisionObserver.enable())})})}),e.monitor.addEventListener("dragend",(e,n)=>{if(!e.canceled)return;const{dragOperation:r}=n,{source:i}=r;Mq(i)&&(i.sortable.initialIndex===i.sortable.index&&i.sortable.initialGroup===i.sortable.group||queueMicrotask(()=>{const e=t(),r=e.get(i.sortable.initialGroup);r&&n.renderer.rendering.then(()=>{for(const[t,n]of e.entries()){const e=Array.from(n).entries();for(const[n,r]of e)if(r.index!==n||r.group!==t)return}const t=Gq(r),n=i.sortable.element,o=t[i.sortable.initialIndex],a=null==o?void 0:o.element;o&&a&&n&&(Vq(n,o.index,a,i.index),yE(()=>{for(const[t,n]of e.entries()){const e=Array.from(n).values();for(const t of e)t.index=t.initialIndex,t.group=t.initialGroup}}))})}))})];this.destroy=()=>{for(const e of n)e()}}}],nT={duration:250,easing:"cubic-bezier(0.25, 1, 0.5, 1)",idle:!1},rT=new class{constructor(){RI(this,NI,new WeakMap)}get(e,t){var n;return e?null==(n=DI(this,NI).get(e))?void 0:n.get(t):void 0}set(e,t,n){var r;if(e)return DI(this,NI).has(e)||DI(this,NI).set(e,new Map),null==(r=DI(this,NI).get(e))?void 0:r.set(t,n)}clear(e){var t;return e?null==(t=DI(this,NI).get(e))?void 0:t.clear():void 0}};Yq=[kI],Uq=[kI];var iT=class{constructor(e,t){Rq(this,Xq,Cq(Kq,8,this)),Cq(Kq,11,this),Rq(this,Jq),Rq(this,Zq),Rq(this,Qq,Cq(Kq,12,this)),Cq(Kq,15,this),Rq(this,eT),this.register=()=>(yE(()=>{var e,t;null==(e=this.manager)||e.registry.register(this.droppable),null==(t=this.manager)||t.registry.register(this.draggable)}),()=>this.unregister()),this.unregister=()=>{yE(()=>{var e,t;null==(e=this.manager)||e.registry.unregister(this.droppable),null==(t=this.manager)||t.registry.unregister(this.draggable)})},this.destroy=()=>{yE(()=>{this.droppable.destroy(),this.draggable.destroy()})};var n=e,{effects:r=()=>[],group:i,index:o,sensors:a,type:s,transition:l=nT,plugins:u=tT}=n,c=((e,t)=>{var n={};for(var r in e)hq.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&fq)for(var r of fq(e))t.indexOf(r)<0&&mq.call(e,r)&&(n[r]=e[r]);return n})(n,["effects","group","index","sensors","type","transition","plugins"]);this.droppable=new aT(c,t,this),this.draggable=new oT(bq(yq({},c),{effects:()=>[()=>{var e,t,n;const r=null==(e=this.manager)?void 0:e.dragOperation.status;(null==r?void 0:r.initializing)&&this.id===(null==(n=null==(t=this.manager)?void 0:t.dragOperation.source)?void 0:n.id)&&rT.clear(this.manager),(null==r?void 0:r.dragging)&&rT.set(this.manager,this.id,xE(()=>({initialIndex:this.index,initialGroup:this.group})))},()=>{const{index:e,group:t,manager:n}=this,r=Dq(this,Zq),i=Dq(this,Jq);e===r&&t===i||(Pq(this,Zq,e),Pq(this,Jq,t),this.animate())},()=>{const{target:e}=this,{feedback:t,isDragSource:n}=this.draggable;"move"==t&&n&&(this.droppable.disabled=!e)},()=>{const{manager:e}=this;for(const t of u)null==e||e.registry.register(t)},...r()],type:s,sensors:a}),t,this),Pq(this,eT,c.element),this.manager=t,this.index=o,Pq(this,Zq,o),this.group=i,Pq(this,Jq,i),this.type=s,this.transition=l}get initialIndex(){var e,t;return null!=(t=null==(e=rT.get(this.manager,this.id))?void 0:e.initialIndex)?t:this.index}get initialGroup(){var e,t;return null!=(t=null==(e=rT.get(this.manager,this.id))?void 0:e.initialGroup)?t:this.group}animate(){xE(()=>{const{manager:e,transition:t}=this,{shape:n}=this.droppable;if(!e)return;const{idle:r}=e.dragOperation.status;n&&t&&(!r||t.idle)&&e.renderer.rendering.then(()=>{const{element:r}=this;if(!r)return;const i=this.refreshShape();if(!i)return;const o=n.boundingRectangle.left-i.boundingRectangle.left,a=n.boundingRectangle.top-i.boundingRectangle.top,{translate:s}=VM(r),l=iL(r,s,!1),u=iL(r,s);if(o||a){const n=nM($P(r))?bq(yq({},t),{duration:0}):t;rL({element:r,keyframes:{translate:[`${l.x+o}px ${l.y+a}px ${l.z}`,`${u.x}px ${u.y}px ${u.z}`]},options:n}).then(()=>{e.dragOperation.status.dragging||(this.droppable.shape=void 0)})}})})}get manager(){return this.draggable.manager}set manager(e){yE(()=>{this.draggable.manager=e,this.droppable.manager=e})}set element(e){yE(()=>{const t=Dq(this,eT),n=this.droppable.element,r=this.draggable.element;n&&n!==t||(this.droppable.element=e),r&&r!==t||(this.draggable.element=e),Pq(this,eT,e)})}get element(){var e,t;const n=Dq(this,eT);if(n)return null!=(t=null!=(e=aM.get(n))?e:n)?t:this.droppable.element}set target(e){this.droppable.element=e}get target(){return this.droppable.element}set source(e){this.draggable.element=e}get source(){return this.draggable.element}get disabled(){return this.draggable.disabled&&this.droppable.disabled}set feedback(e){this.draggable.feedback=e}set disabled(e){yE(()=>{this.droppable.disabled=e,this.draggable.disabled=e})}set data(e){yE(()=>{this.droppable.data=e,this.draggable.data=e})}set handle(e){this.draggable.handle=e}set id(e){yE(()=>{this.droppable.id=e,this.draggable.id=e})}get id(){return this.droppable.id}set sensors(e){this.draggable.sensors=e}set modifiers(e){this.draggable.modifiers=e}set collisionPriority(e){this.droppable.collisionPriority=e}set collisionDetector(e){this.droppable.collisionDetector=null!=e?e:gL}set alignment(e){this.draggable.alignment=e}get alignment(){return this.draggable.alignment}set type(e){yE(()=>{this.droppable.type=e,this.draggable.type=e})}get type(){return this.draggable.type}set accept(e){this.droppable.accept=e}get accept(){return this.droppable.accept}get isDropTarget(){return this.droppable.isDropTarget}get isDragSource(){return this.draggable.isDragSource}get isDragging(){return this.draggable.isDragging}get isDropping(){return this.draggable.isDropping}get status(){return this.draggable.status}refreshShape(){return this.droppable.refreshShape()}accepts(e){return this.droppable.accepts(e)}};Kq=[,,,lq(null)],Xq=new WeakMap,Jq=new WeakMap,Zq=new WeakMap,Qq=new WeakMap,eT=new WeakMap,Eq(Kq,4,"index",Yq,iT,Xq),Eq(Kq,4,"group",Uq,iT,Qq),((e,t)=>{return vq(t,(n="metadata",(r=Symbol[n])?r:Symbol.for("Symbol."+n)),e[3]);var n,r})(Kq,iT);var oT=class extends Yk{constructor(e,t,n){super(e,t),this.sortable=n}get index(){return this.sortable.index}get initialIndex(){return this.sortable.initialIndex}get group(){return this.sortable.group}get initialGroup(){return this.sortable.initialGroup}},aT=class extends Kk{constructor(e,t,n){super(e,t),this.sortable=n}get index(){return this.sortable.index}get group(){return this.sortable.group}},sT=Object.defineProperty,lT=Object.defineProperties,uT=Object.getOwnPropertyDescriptors,cT=Object.getOwnPropertySymbols,dT=Object.prototype.hasOwnProperty,pT=Object.prototype.propertyIsEnumerable,fT=(e,t,n)=>t in e?sT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,hT=(e,t)=>{for(var n in t||(t={}))dT.call(t,n)&&fT(e,n,t[n]);if(cT)for(var n of cT(t))pT.call(t,n)&&fT(e,n,t[n]);return e};function mT(e){const{accept:t,collisionDetector:n,collisionPriority:r,id:i,data:o,element:a,handle:s,index:l,group:u,disabled:c,feedback:d,modifiers:p,sensors:h,target:m,type:g}=e,v=hT(hT({},nT),e.transition),y=yO(t=>new iT(((e,t)=>lT(e,uT(t)))(hT({},e),{transition:v,register:!1,handle:Xk(s),element:Xk(a),target:Xk(m),feedback:d}),t)),b=eO(y,gT);return rO(i,()=>y.id=i),Jk(()=>{yE(()=>{y.group=u,y.index=l})},[y,u,l]),rO(g,()=>y.type=g),rO(t,()=>y.accept=t,void 0,AI),rO(o,()=>o&&(y.data=o)),rO(l,()=>{var e;(null==(e=y.manager)?void 0:e.dragOperation.status.idle)&&(null==v?void 0:v.idle)&&y.refreshShape()},tO),iO(s,e=>y.handle=e),iO(a,e=>y.element=e),iO(m,e=>y.target=e),rO(c,()=>y.disabled=!0===c),rO(h,()=>y.sensors=h),rO(n,()=>y.collisionDetector=n),rO(r,()=>y.collisionPriority=r),rO(d,()=>y.feedback=null!=d?d:"default"),rO(v,()=>y.transition=v,void 0,AI),rO(p,()=>y.modifiers=p,void 0,AI),rO(e.alignment,()=>y.alignment=e.alignment),{sortable:b,get isDragging(){return b.isDragging},get isDropping(){return b.isDropping},get isDragSource(){return b.isDragSource},get isDropTarget(){return b.isDropTarget},handleRef:f(e=>{y.handle=null!=e?e:void 0},[y]),ref:f(e=>{var t,n;(e||!(null==(t=y.element)?void 0:t.isConnected)||(null==(n=y.manager)?void 0:n.dragOperation.status.idle))&&(y.element=null!=e?e:void 0)},[y]),sourceRef:f(e=>{var t,n;(e||!(null==(t=y.source)?void 0:t.isConnected)||(null==(n=y.manager)?void 0:n.dragOperation.status.idle))&&(y.source=null!=e?e:void 0)},[y]),targetRef:f(e=>{var t,n;(e||!(null==(t=y.target)?void 0:t.isConnected)||(null==(n=y.manager)?void 0:n.dragOperation.status.idle))&&(y.target=null!=e?e:void 0)},[y])}}function gT(e,t,n){return!("isDragSource"!==e||n||!t)}const vT=({id:e,itemIndex:t,sectionIndex:n})=>fo.jsx("div",{children:`${n}:${t} - ${e}`}),yT=({id:e,itemIndex:t,sectionIndex:n})=>{const r=qw(lE),i=qw(oE),o=qw(eE).at(n)??0,a=qw(tE)({sectionIndex:n}),{ref:s,isDragging:l,handleRef:u}=mT({id:e,index:t,type:"item",accept:"item",group:a,modifiers:[aq],plugins:[Lq],data:{id:e,sectionIndex:n,sectionKey:a,itemIndex:t}}),c=void 0!==r?()=>{r({id:e,itemIndex:t,sectionIndex:n})}:void 0,d=i??vT;return fo.jsx(Vd,{className:"section-item-container","data-testid":"section-item",onClick:c,ref:s,"data-dragging":l,sx:{padding:0,backgroundColor:l?"rgba(242, 242, 242, 1)":void 0,borderRadius:l?"4px":void 0},children:fo.jsxs("div",{style:{width:"100%",opacity:l?.4:1},children:[fo.jsx(BO,{isDragging:l,itemIndex:t,sectionIndex:n}),fo.jsx(d,{id:e,itemIndex:t,sectionIndex:n,dragHandleRef:u}),t===o-1&&fo.jsx(BO,{isDragging:!1,itemIndex:t+1,sectionIndex:n})]})})},bT=n.memo(yT),xT=n.memo(({sectionIndex:e})=>{const t=qw(tE),n=qw(eE).at(e)??0,r=t({sectionIndex:e});return fo.jsxs(sc,{className:"exploration-list",style:{overflow:"auto"},children:[fo.jsx(td,{}),fo.jsx(YO,{id:r,sectionIndex:e}),fo.jsx(td,{}),fo.jsx(UO,{sectionIndex:e}),fo.jsx(kd,{sx:{padding:"2px 8px"},children:$O(n).map(n=>{const r=t({sectionIndex:e,itemIndex:n});return fo.jsx(bT,{id:r,itemIndex:n,sectionIndex:e},r)})})]},r)}),ST=[Ck.configure({activationConstraints:[new bk.Distance({value:5})]}),mk],wT=n.memo(()=>{const e=qw(QC),t=qw(tE),n=Tw(pE("start")),r=Tw(pE("over")),i=Tw(pE("end"));return fo.jsxs(gO,{sensors:ST,onDragEnd:i,onDragOver:r,onDragStart:n,children:[fo.jsx(sc,{style:{display:"flex",flexDirection:"column"},children:$O(e).map(e=>fo.jsx(xT,{sectionIndex:e},t({sectionIndex:e})))}),fo.jsx(VO,{})]})}),CT=n.memo(e=>fo.jsx(jC,{atoms:fE,atomFamilies:hE,children:fo.jsx(mE,{props:e,children:fo.jsx(wT,{})})})),ET="12px",IT="nebula-table-utils-head-menu-button",DT="sn-copy-cell";let RT=function(e){return e.Enter="Enter",e.Space=" ",e.Esc="Escape",e.Tab="Tab",e.Shift="Shift",e.Left="ArrowLeft",e.Right="ArrowRight",e.Up="ArrowUp",e.Down="ArrowDown",e.C="c",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.F2="F2",e}({});const PT="nebula-table-utils-column-adjuster";let MT=function(e){return e[e.PixelsMin=30]="PixelsMin",e[e.PixelsMax=7680]="PixelsMax",e[e.PixelsDefault=200]="PixelsDefault",e[e.PercentageMin=1]="PercentageMin",e[e.PercentageMax=100]="PercentageMax",e[e.PercentageDefault=20]="PercentageDefault",e[e.PercentageMaxInIndentMode=75]="PercentageMaxInIndentMode",e[e.AutoMinPivot=80]="AutoMinPivot",e[e.AutoMinTable=120]="AutoMinTable",e}({}),LT=function(e){return e.Auto="auto",e.FitToContent="fitToContent",e.Pixels="pixels",e.Percentage="percentage",e}({});const AT={darker:.15,brighter:.3,opacity:.03},kT={darker:.3,brighter:.5,opacity:.05};let OT=function(e){return e.Cyclic="C",e}({});const qT=(e,t)=>{const n=new Map;for(const t of e)n.set(t.id,t);return t.reduce((e,t)=>{const r=n.get(t);return r&&e.push(r),e},[])},TT=XC(e=>ww(t=>{const n=t(dC),r=t(aC)?.[e];return r||n?.qHyperCubeDef.rankedList?.[e]})),NT=XC(e=>ww(t=>{const n=t(tC),r=t(Xw),i=t(uC),o=t(aC)?.[e],a=n("SUPPORT-9810-MISSING-MEASURES",!1)?r?.properties.qHyperCubeDef.rankedList?.[e]:i?.qHyperCube.rankedList?.[e];return o||(r?.isRankedListCorrupt(e)||void 0===a?r?.createRankedList(e):a)})),jT=(e,t=new Set)=>ww(n=>{const r=n(e),i=n(CC);if(!r||0===r.length)return"disabled";const o=r.filter(e=>!t.has(e.id));if(0===o.length)return"disabled";const a=o.filter(e=>i.has(e.id)).length;return 0===a?"none":a===o.length?"all":"some"}),_T=(e,t=new Set)=>ww(null,(n,r,i)=>{const o=n(e);o&&0!==o.length&&(e=>{const{items:t,shouldCheckAll:n,get:r,set:i,excludedIds:o}=e,a=t.filter(e=>!o?.has(e.id));if(0===a.length)return;const s=r(CC),l=new Set,u=new Set;if(a.forEach(e=>{const t=s.has(e.id);t&&!n&&u.add(e.id),!t&&n&&l.add(e.id)}),0===l.size&&0===u.size)return;const c=new Set(r(bC)),d=new Set(r(xC));l.forEach(e=>c.add(e)),l.forEach(e=>d.delete(e)),u.forEach(e=>d.add(e)),u.forEach(e=>c.delete(e)),i(bC,c),i(xC,d),Yw({type:"apply",localChecked:l,localUnchecked:u,handler:r(Xw),model:r(Kw),fieldInfo:r(hC),handlerQueue:r(gC)})})({items:o,shouldCheckAll:i,get:n,set:r,excludedIds:t})}),FT=ww(e=>{const t=e(cC);return t?.qHyperCube.qDimensionInfo.filter(nC).map(({cId:e,qFallbackTitle:t})=>({id:e,title:t??"",alternative:!0}))}),zT=ww(e=>{const t=e(uC),n=e(Zw),r=t?.qHyperCube.qEffectiveInterColumnSortOrder.map(e=>{if(-1===e)return{id:-1,title:n("Common.Values")};const{cId:r,qFallbackTitle:i}=t.qHyperCube.qDimensionInfo[e];return{id:r,title:i??""}});return r}),WT=ww(e=>{const t=e(Zw),n=e(FT),r=e(eC),i=e(tC)("SUPPORT-9810-MIGRATE-RANKED-LISTS",!1),o=e(i?TT("columns"):NT("columns")),a=e(i?TT("rows"):NT("rows")),s=e(zT);if(void 0===n||void 0===o||void 0===a||void 0===s)return[];const l=[...s,...n].filter(r);return[{id:"rows",title:t("Common.Rows"),items:qT(l,a)},{id:"columns",title:t("Common.Columns"),items:qT(l,o)}]}),$T=XC(e=>ww(t=>t(WT).at(e))),HT=XC(({sectionIndex:e,itemIndex:t})=>ww(n=>n($T(e))?.items.at(t)?.title),(e,t)=>e.sectionIndex===t.sectionIndex&&e.itemIndex===t.itemIndex),VT=XC(e=>ww(t=>t($T(e))?.title)),BT=ww(e=>({sectionIndex:t,itemIndex:n})=>{const r=e($T(t));return void 0===r?0===t?"rows":"columns":void 0===n?r.id:r.items.at(n)?.id??`missing-item-${t}-${n}`}),GT=ww(e=>e(WT).map(e=>e.items.length)),UT=XC(e=>jT(ww(t=>t($T(e))?.items),new Set([-1]))),YT=XC(e=>_T(ww(t=>t($T(e))?.items),new Set([-1]))),KT=ww(null,async(e,t,{event:n,id:r,toIndex:i,toSection:o,startSection:a})=>{const s=e(Xw),l=e(Kw),u=e(gC),c=e(TT("rows")),d=e(TT("columns")),p=o;if(void 0===s||void 0===l||void 0===c||void 0===d||null===u)return;if(n.operation.canceled)return void t(aC,null);if("section"===n.operation.target?.type&&a===o)return void t(aC,null);const f=KC({rows:c,columns:d},n);t(aC,f),u.add(async()=>{"number"==typeof r?await s.movePseudoDimension({toIndex:i,toSection:p}):await s.moveDimension({cId:r,toIndex:i,toSection:p})})}),XT={noItems:{row:"ChartExploration.PivotTable.RowSectionEmpty.Title",column:"ChartExploration.PivotTable.ColumnSectionEmpty.Title",measure:"ChartExploration.PivotTable.MeasureSectionEmpty.Title"},noSearchFound:{row:"ChartExploration.PivotTable.NoRowsFound.Title",column:"ChartExploration.PivotTable.NoColumnsFound.Title",measure:"ChartExploration.PivotTable.NoMeasuresFound.Title"}},JT="ChartExploration.PivotTable.DimensionSectionEmpty.Message",ZT="ChartExploration.PivotTable.MeasureSectionEmpty.Message",QT="#177fe6",eN=(e,t,n,r)=>{if("measure"===t)return e(r?XT.noSearchFound.measure:XT.noItems.measure);const i=r?XT.noSearchFound:XT.noItems;return e(n?i.row:i.column)},tN=(e,t,n)=>n?"":e("measure"===t?ZT:JT),nN=XC(e=>ww(t=>{const n=t(Zw),r=t(Qw).length>0;return t=>({title:eN(n,e,0===t,r),message:tN(n,e,r)})})),rN=nN("measure"),iN=nN("dimensions"),oN=({children:e})=>fo.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e}),aN=e=>{const t=qw(HT(e));return fo.jsx(oN,{children:t})},sN=ww(e=>{const t=e(cC);return t?.qHyperCube.qMeasureInfo.filter(nC).map(({cId:e,qFallbackTitle:t})=>({id:e,title:t??""}))}),lN=ww(e=>{const t=e(tC)("SUPPORT-9810-MIGRATE-RANKED-LISTS",!1),n=e(uC),r=e(sN),i=e(eC),o=e(t?TT("measures"):NT("measures"));if(void 0===n||void 0===r||void 0===o)return[];const a=n.qHyperCube.qMeasureInfo.filter(nC).map(({cId:e,qFallbackTitle:t})=>({id:e,title:t??""}));a.push(...r);const s=a.filter(i);return qT(s,o)}),uN=XC(e=>ww(t=>t(lN).at(e)?.title??"")),cN=ww(e=>({itemIndex:t})=>{const n=e(lN);return void 0===t?"measures":n.at(t)?.id??`missing-item-${t}`}),dN=ww(e=>[e(lN).length]),pN=jT(lN),fN=_T(lN),hN=ww(null,async(e,t,{id:n,toIndex:r,event:i})=>{const o=e(Xw),a=e(Kw),s=e(gC),l=e(TT("measures"));if(void 0===o||void 0===a||void 0===l||"string"!=typeof n||null===s)return;const u=KC({measures:l},i);t(aC,u),s.add(async()=>{await o.moveMeasure({cId:n,toIndex:r})})}),mN=zS().palette,gN={TEXT:mN.text.primary,DISABLED:mN.text.disabled,HOVER:mN.action.hover,WHITE:Of.GREYSCALE_100,BORDER_MEDIUM:Of.GREYSCALE_85,DARK_MODE_TEXT:Of.GREYSCALE_95,DARK_MODE_BORDER:Of.GREYSCALE_95,DARK_MODE_DISABLED:Of.GREYSCALE_70,TRANSPARENT:"transparent",SELECTED:mN.primary.main,LINK:mN.info.main,ERROR:mN.error.main};function vN(e){return null!==e&&"object"==typeof e&&"r"in e&&"number"==typeof e.r&&"g"in e&&"number"==typeof e.g&&"b"in e&&"number"==typeof e.b&&("number"==typeof e.a||void 0===e.a)}function yN(e){if("object"==typeof e&&vN(e))return(e.r<<16)+(e.g<<8)+e.b;let t=0,n=0,r=0;if("string"==typeof e){let i;(i=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e))?(t=parseInt(i[1],10),n=parseInt(i[2],10),r=parseInt(i[3],10)):(i=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(e))?(t=parseInt(i[1],16),n=parseInt(i[2],16),r=parseInt(i[3],16)):(i=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(e))&&(t=parseInt(i[1]+i[1],16),n=parseInt(i[2]+i[2],16),r=parseInt(i[3]+i[3],16))}return(t<<16)+(n<<8)+r}const bN={aliceblue:{r:240,g:248,b:255},antiquewhite:{r:250,g:235,b:215},aqua:{r:0,g:255,b:255},aquamarine:{r:127,g:255,b:212},azure:{r:240,g:255,b:255},beige:{r:245,g:245,b:220},bisque:{r:255,g:228,b:196},black:{r:0,g:0,b:0},blanchedalmond:{r:255,g:235,b:205},blue:{r:0,g:0,b:255},blueviolet:{r:138,g:43,b:226},brown:{r:165,g:42,b:42},burlywood:{r:222,g:184,b:135},cadetblue:{r:95,g:158,b:160},chartreuse:{r:127,g:255,b:0},chocolate:{r:210,g:105,b:30},coral:{r:255,g:127,b:80},cornflowerblue:{r:100,g:149,b:237},cornsilk:{r:255,g:248,b:220},crimson:{r:220,g:20,b:60},cyan:{r:0,g:255,b:255},darkblue:{r:0,g:0,b:139},darkcyan:{r:0,g:139,b:139},darkgoldenrod:{r:184,g:134,b:11},darkgray:{r:169,g:169,b:169},darkgreen:{r:0,g:100,b:0},darkgrey:{r:169,g:169,b:169},darkkhaki:{r:189,g:183,b:107},darkmagenta:{r:139,g:0,b:139},darkolivegreen:{r:85,g:107,b:47},darkorange:{r:255,g:140,b:0},darkorchid:{r:153,g:50,b:204},darkred:{r:139,g:0,b:0},darksalmon:{r:233,g:150,b:122},darkseagreen:{r:143,g:188,b:143},darkslateblue:{r:72,g:61,b:139},darkslategray:{r:47,g:79,b:79},darkslategrey:{r:47,g:79,b:79},darkturquoise:{r:0,g:206,b:209},darkviolet:{r:148,g:0,b:211},deeppink:{r:255,g:20,b:147},deepskyblue:{r:0,g:191,b:255},dimgray:{r:105,g:105,b:105},dimgrey:{r:105,g:105,b:105},dodgerblue:{r:30,g:144,b:255},firebrick:{r:178,g:34,b:34},floralwhite:{r:255,g:250,b:240},forestgreen:{r:34,g:139,b:34},fuchsia:{r:255,g:0,b:255},gainsboro:{r:220,g:220,b:220},ghostwhite:{r:248,g:248,b:255},gold:{r:255,g:215,b:0},goldenrod:{r:218,g:165,b:32},gray:{r:128,g:128,b:128},green:{r:0,g:128,b:0},greenyellow:{r:173,g:255,b:47},grey:{r:128,g:128,b:128},honeydew:{r:240,g:255,b:240},hotpink:{r:255,g:105,b:180},indianred:{r:205,g:92,b:92},indigo:{r:75,g:0,b:130},ivory:{r:255,g:255,b:240},khaki:{r:240,g:230,b:140},lavender:{r:230,g:230,b:250},lavenderblush:{r:255,g:240,b:245},lawngreen:{r:124,g:252,b:0},lemonchiffon:{r:255,g:250,b:205},lightblue:{r:173,g:216,b:230},lightcoral:{r:240,g:128,b:128},lightcyan:{r:224,g:255,b:255},lightgoldenrodyellow:{r:250,g:250,b:210},lightgray:{r:211,g:211,b:211},lightgreen:{r:144,g:238,b:144},lightgrey:{r:211,g:211,b:211},lightpink:{r:255,g:182,b:193},lightsalmon:{r:255,g:160,b:122},lightseagreen:{r:32,g:178,b:170},lightskyblue:{r:135,g:206,b:250},lightslategray:{r:119,g:136,b:153},lightslategrey:{r:119,g:136,b:153},lightsteelblue:{r:176,g:196,b:222},lightyellow:{r:255,g:255,b:224},lime:{r:0,g:255,b:0},limegreen:{r:50,g:205,b:50},linen:{r:250,g:240,b:230},magenta:{r:255,g:0,b:255},maroon:{r:128,g:0,b:0},mediumaquamarine:{r:102,g:205,b:170},mediumblue:{r:0,g:0,b:205},mediumorchid:{r:186,g:85,b:211},mediumpurple:{r:147,g:112,b:219},mediumseagreen:{r:60,g:179,b:113},mediumslateblue:{r:123,g:104,b:238},mediumspringgreen:{r:0,g:250,b:154},mediumturquoise:{r:72,g:209,b:204},mediumvioletred:{r:199,g:21,b:133},midnightblue:{r:25,g:25,b:112},mintcream:{r:245,g:255,b:250},mistyrose:{r:255,g:228,b:225},moccasin:{r:255,g:228,b:181},navajowhite:{r:255,g:222,b:173},navy:{r:0,g:0,b:128},oldlace:{r:253,g:245,b:230},olive:{r:128,g:128,b:0},olivedrab:{r:107,g:142,b:35},orange:{r:255,g:165,b:0},orangered:{r:255,g:69,b:0},orchid:{r:218,g:112,b:214},palegoldenrod:{r:238,g:232,b:170},palegreen:{r:152,g:251,b:152},paleturquoise:{r:175,g:238,b:238},palevioletred:{r:219,g:112,b:147},papayawhip:{r:255,g:239,b:213},peachpuff:{r:255,g:218,b:185},peru:{r:205,g:133,b:63},pink:{r:255,g:192,b:203},plum:{r:221,g:160,b:221},powderblue:{r:176,g:224,b:230},purple:{r:128,g:0,b:128},red:{r:255,g:0,b:0},rosybrown:{r:188,g:143,b:143},royalblue:{r:65,g:105,b:225},saddlebrown:{r:139,g:69,b:19},salmon:{r:250,g:128,b:114},sandybrown:{r:244,g:164,b:96},seagreen:{r:46,g:139,b:87},seashell:{r:255,g:245,b:238},sienna:{r:160,g:82,b:45},silver:{r:192,g:192,b:192},skyblue:{r:135,g:206,b:235},slateblue:{r:106,g:90,b:205},slategray:{r:112,g:128,b:144},slategrey:{r:112,g:128,b:144},snow:{r:255,g:250,b:250},springgreen:{r:0,g:255,b:127},steelblue:{r:70,g:130,b:180},tan:{r:210,g:180,b:140},teal:{r:0,g:128,b:128},thistle:{r:216,g:191,b:216},tomato:{r:255,g:99,b:71},transparent:{r:0,g:0,b:0,a:0},turquoise:{r:64,g:224,b:208},violet:{r:238,g:130,b:238},wheat:{r:245,g:222,b:179},white:{r:255,g:255,b:255},whitesmoke:{r:245,g:245,b:245},yellow:{r:255,g:255,b:0},yellowgreen:{r:154,g:205,b:50}},xN="qcm-color";function SN(...e){const t={type:xN,r:0,g:0,b:0,a:1,invalid:!1,spaces:{}};let n=0,r=0,i=0,o=1;if(null!==(a=e[0])&&"object"==typeof a&&"type"in a&&a.type===xN)({r:n,g:r,b:i,a:o}=e[0]),t.invalid=e[0].invalid,t.spaces={...e[0].spaces};else if(vN(e[0]))({r:n,g:r,b:i}=e[0]),"a"in e[0]&&({a:o}=e[0]);else if(e.length<3)if("string"==typeof e[0]){const a=e[0];let s;if(s=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(a))n=parseInt(s[1],10),r=parseInt(s[2],10),i=parseInt(s[3],10);else if(s=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(a))n=parseInt(s[1],10),r=parseInt(s[2],10),i=parseInt(s[3],10),o=parseFloat(s[4]);else if(s=/^ARGB\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(a))o=parseInt(s[1],10)/255,n=parseInt(s[2],10),r=parseInt(s[3],10),i=parseInt(s[4],10);else if(s=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(a))n=parseInt(s[1],16),r=parseInt(s[2],16),i=parseInt(s[3],16),o=1;else if(s=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(a))n=parseInt(s[1]+s[1],16),r=parseInt(s[2]+s[2],16),i=parseInt(s[3]+s[3],16),o=1;else if(s=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a<=.5?2*a*t:(2-2*a)*t;let u=e/60;const c=l*(1-Math.abs(u%2-1));let d=[];switch(u=Math.floor(u),u){case 0:d=[l,c,0];break;case 1:d=[c,l,0];break;case 2:d=[0,l,c];break;case 3:d=[0,c,l];break;case 4:d=[c,0,l];break;case 5:d=[l,0,c];break;default:d=[0,0,0]}const p=a-.5*l;n=d[0]+p,r=d[1]+p,i=d[2]+p,n=Math.round(255*n),r=Math.round(255*r),i=Math.round(255*i),o=1}else if(s=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);o=parseFloat(s[7]),e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a<=.5?2*a*t:(2-2*a)*t;let u=e/60;const c=l*(1-Math.abs(u%2-1));let d=[];switch(u=Math.floor(u),u){case 0:d=[l,c,0];break;case 1:d=[c,l,0];break;case 2:d=[0,l,c];break;case 3:d=[0,c,l];break;case 4:d=[c,0,l];break;case 5:d=[l,0,c];break;default:d=[0,0,0]}const p=a-.5*l;n=d[0]+p,r=d[1]+p,i=d[2]+p,n=Math.round(255*n),r=Math.round(255*r),i=Math.round(255*i)}else if(s=/^hsv\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a*t;let u=e/60;const c=l*(1-Math.abs(u%2-1));let d=[];switch(u=Math.floor(u),u){case 0:d=[l,c,0];break;case 1:d=[c,l,0];break;case 2:d=[0,l,c];break;case 3:d=[0,c,l];break;case 4:d=[c,0,l];break;case 5:d=[l,0,c];break;default:d=[0,0,0]}const p=a-l;n=d[0]+p,r=d[1]+p,i=d[2]+p,n=Math.round(255*n),r=Math.round(255*r),i=Math.round(255*i),o=1}else{const e=a.toLowerCase();if(function(e){return e in bN}(e)){const t=bN[e];({r:n,g:r,b:i}=t),o="a"in t?t.a:1}else t.invalid=!0}}else"number"==typeof e[0]&&e[0]>=0&&"argb"===e[1]?(o=(4278190080&e[0])>>>24,o/=255,n=(16711680&e[0])>>16,r=(65280&e[0])>>8,i=255&e[0]):"number"==typeof e[0]&&e[0]>=0?(n=(16711680&e[0])>>16,r=(65280&e[0])>>8,i=255&e[0]):t.invalid=!0;else 3===e.length||4===e.length?(n=e[0],r=e[1],i=e[2],o=4===e.length?e[3]:1):t.invalid=!0;var a;return Number.isNaN(+n+r+i+o)&&(t.invalid=!0),t.r=Math.floor(n),t.g=Math.floor(r),t.b=Math.floor(i),t.a=o,t}function wN(e){let t,n,r;if(vN(e))return t=e.r.toString(16),n=e.g.toString(16),r=e.b.toString(16),1===t.length&&(t=`0${t}`),1===n.length&&(n=`0${n}`),1===r.length&&(r=`0${r}`),`#${[t,n,r].join("")}`;const i="string"==typeof e?yN(e):e;return t=((16711680&i)>>16).toString(16),n=((65280&i)>>8).toString(16),r=(255&i).toString(16),1===t.length&&(t=`0${t}`),1===n.length&&(n=`0${n}`),1===r.length&&(r=`0${r}`),`#${t}${n}${r}`}function CN(e){let t,n,r=0;const i="string"==typeof e?SN(e):e,o=i.r/255,a=i.g/255,s=i.b/255,{a:l}=i,u=Math.max(o,a,s),c=Math.min(o,a,s),d=(u+c)/2;if(u===c)t=0,r=0;else{switch(n=u-c,t=d>.5?n/(2-u-c):n/(u+c),u){case o:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-o)/n+2;break;case s:r=(o-a)/n+4}r/=6}return{h:360*r,s:100*t,l:100*d,a:l}}function EN(e){let t,n,r=0;const i="string"==typeof e?SN(e):e,o=i.r/255,a=i.g/255,s=i.b/255,l=Math.max(o,a,s),u=Math.min(o,a,s),c=l;if(l===u)t=0,r=0;else{switch(n=l-u,t=0===n?0:n/c,l){case o:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-o)/n+2;break;case s:r=(o-a)/n+4}r/=6}return{h:360*r%360,s:100*t,v:100*c}}function IN(e){if(vN(e))return`rgb(${e.r}, ${e.g}, ${e.b})`;const t="string"==typeof e?yN(e):e;return`rgb(${(16711680&t)>>16}, ${(65280&t)>>8}, ${255&t})`}function DN(e,t){return vN(e)?`rgba(${e.r}, ${e.g}, ${e.b}, ${e.a})`:DN(SN(e))}function RN(e){return vN(e)?1===e.a?IN(e):DN(e):RN(SN(e))}const PN=e=>{const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};function MN(e){return.2126*PN(e.r)+.7152*PN(e.g)+.0722*PN(e.b)}function LN(...e){const t=SN(...e),n={type:t.type,r:t.r,g:t.g,b:t.b,a:t.a,invalid:t.invalid,spaces:t.spaces},r=()=>(n.spaces.hslaObject||(n.spaces.hslaObject=CN(n)),n.spaces.hslaObject),i=e=>{const t=r(),{h:n,s:i,l:o,a:a}=t;return`hsla(${n}, ${i}, ${Math.max(0,Math.min(o+e,100))}, ${a})`};return{get type(){return n.type},isInvalid:()=>n.invalid,get r(){return n.r},get g(){return n.g},get b(){return n.b},get a(){return n.a},getR:()=>n.r,getG:()=>n.g,getB:()=>n.b,getAlpha:()=>n.a,setAlpha:e=>{n.a=e,n.spaces={}},isEqualTo:e=>{let t;if("string"==typeof e)t=SN(e);else{if(e.type!==n.type)return!1;t=e}return t.r===n.r&&t.g===n.g&&t.b===n.b&&t.a===n.a},isDark:()=>function(...e){const t=SN(...e);return t.invalid||MN(t)<.4}(n),getRGB:()=>(n.spaces.rgb||(n.spaces.rgb=IN(n)),n.spaces.rgb),getRGBA:()=>(n.spaces.rgba||(n.spaces.rgba=DN(n)),n.spaces.rgba),getString:()=>(n.spaces.string||(n.spaces.string=RN(n)),n.spaces.string),getHex:()=>(n.spaces.hex||(n.spaces.hex=wN(n)),n.spaces.hex),getHSL:()=>(n.spaces.hsl||(n.spaces.hsl=function(e){let t,n,r=0;const i="string"==typeof e?SN(e):e,o=i.r/255,a=i.g/255,s=i.b/255,l=Math.max(o,a,s),u=Math.min(o,a,s),c=(l+u)/2;if(l===u)t=0,r=0;else{switch(n=l-u,t=c>.5?n/(2-l-u):n/(l+u),l){case o:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-o)/n+2;break;case s:r=(o-a)/n+4}r/=6}return`hsl(${360*r}, ${100*t}, ${100*c})`}(n)),n.spaces.hsl),getHSLA:()=>(n.spaces.hsla||(n.spaces.hsla=function(e){const{h:t,s:n,l:r,a:i}=CN(e);return`hsla(${t}, ${n}, ${r}, ${i})`}(n)),n.spaces.hsla),getHSLAObject:r,getShiftedHSLA:i,getHSV:()=>(n.spaces.hsv||(n.spaces.hsv=function(e){const{h:t,s:n,v:r}=EN(e);return`hsv(${t}, ${n}, ${r})`}(n)),n.spaces.hsv),getHSVObject:()=>(n.spaces.hsvObject||(n.spaces.hsvObject=EN(n)),n.spaces.hsvObject),blend:(e,t)=>`rgba(${Math.floor(n.r+(e.r-n.r)*t)}, ${Math.floor(n.g+(e.g-n.g)*t)}, ${Math.floor(n.b+(e.b-n.b)*t)}, ${Math.floor(n.a+(e.getAlpha()-n.a)*t)})`,getBrightenedColor:(e=1)=>LN(i(18*e)),getDarkenedColor:(e=1)=>LN(i(18*-e))}}function AN(e,t){if(!e||!t)return;const n=MN(e),r=MN(t);return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)}const kN="#FFFFFF";function ON(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var qN,TN="top",NN="top-right",jN="right",_N="bottom-right",FN="bottom",zN="bottom-left",WN="left",$N="top-left";ON(ON(ON(ON(ON(ON(ON(ON(ON(ON(qN={},"equal-equal",[TN,FN]),"equal-higher",[FN,_N]),"equal-lower",[TN,NN]),"equal-void",[TN,FN]),"higher-equal",[WN,zN,TN,NN]),"higher-higher-acute",[FN,zN,WN,NN]),"higher-higher-obtuse",[FN,TN]),"higher-lower-negative",[TN,NN,jN]),"higher-lower-positive",[FN,zN,WN]),"higher-void",[TN]),ON(ON(ON(ON(ON(ON(ON(ON(ON(ON(qN,"lower-equal",[TN]),"lower-higher-negative",[TN,$N]),"lower-higher-positive",[_N]),"lower-lower-acute",[TN,$N,WN,NN,jN]),"lower-lower-obtuse",[TN,FN]),"lower-void",[TN]),"void-equal",[TN]),"void-higher",[TN,FN]),"void-lower",[TN,FN,WN]),"void-void",[TN]),ON(qN,"unclassified",[TN,FN,jN,WN,NN,_N,zN,$N]);var HN,VN,BN=["American Typewriter, serif","Andalé Mono, monospace","Arial Black, sans-serif","Arial, sans-serif","Bradley Hand, cursive","Brush Script MT, cursive","Comic Sans MS, cursive","Courier, monospace","Didot, serif","Georgia, serif","Impact, sans-serif","Lucida Console, monospace","Luminari, fantasy","Monaco, monospace","QlikView Sans, sans-serif","Source Sans Pro, sans-serif","Tahoma, sans-serif","Times New Roman, serif","Trebuchet MS, sans-serif","Verdana, sans-serif"],GN=["Abril Fatface, serif","Bangers, fantasy","Bebas Neue, sans serif","EB Garamond, serif","Fredoka One, fantasy","Graduate, fantasy","Gravitas One, serif","Indie Flower, fantasy","Inter, sans-serif","Lobster, fantasy","Montserrat, sans-serif","Nixie One, sans-serif","Noto Sans, sans-serif","Open Sans, sans-serif","PT Serif, serif","Pacifico, cursive","Permanent Marker, fantasy","QlikView Sans, sans-serif","Raleway, sans-serif","Rammetto One, fantasy","Roboto, sans-serif","Source Sans Pro, sans-serif","Titan One, fantasy","Yanone Kaffeesatz, sans-serif"];function UN(e){return null!=e&&e.isEnabled("PS_20852_WYSIWYG_FONT_SUPPORT")?GN:BN}var YN=function(){if(VN)return HN;VN=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},o=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,i=e.call(n,"constructor"),o=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!i&&!o)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return HN=function e(){var t,n,r,l,u,c,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=s(d,n),d!==(l=s(t,n))&&(h&&l&&(o(l)||(u=i(l)))?(u?(u=!1,c=r&&i(r)?r:[]):c=r&&o(r)?r:{},a(d,{name:n,newValue:e(h,c,l)})):void 0!==l&&a(d,{name:n,newValue:l}));return d},HN}();function KN(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function XN(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function JN(){}!function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")&&e.default}(YN);var ZN=.7,QN=1/ZN,ej="\\s*([+-]?\\d+)\\s*",tj="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",nj="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",rj=/^#([0-9a-f]{3,8})$/,ij=new RegExp(`^rgb\\(${ej},${ej},${ej}\\)$`),oj=new RegExp(`^rgb\\(${nj},${nj},${nj}\\)$`),aj=new RegExp(`^rgba\\(${ej},${ej},${ej},${tj}\\)$`),sj=new RegExp(`^rgba\\(${nj},${nj},${nj},${tj}\\)$`),lj=new RegExp(`^hsl\\(${tj},${nj},${nj}\\)$`),uj=new RegExp(`^hsla\\(${tj},${nj},${nj},${tj}\\)$`),cj={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function dj(){return this.rgb().formatHex()}function pj(){return this.rgb().formatRgb()}function fj(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=rj.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?hj(t):3===n?new yj(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?mj(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?mj(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=ij.exec(e))?new yj(t[1],t[2],t[3],1):(t=oj.exec(e))?new yj(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=aj.exec(e))?mj(t[1],t[2],t[3],t[4]):(t=sj.exec(e))?mj(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=lj.exec(e))?Ej(t[1],t[2]/100,t[3]/100,1):(t=uj.exec(e))?Ej(t[1],t[2]/100,t[3]/100,t[4]):cj.hasOwnProperty(e)?hj(cj[e]):"transparent"===e?new yj(NaN,NaN,NaN,0):null}function hj(e){return new yj(e>>16&255,e>>8&255,255&e,1)}function mj(e,t,n,r){return r<=0&&(e=t=n=NaN),new yj(e,t,n,r)}function gj(e){return e instanceof JN||(e=fj(e)),e?new yj((e=e.rgb()).r,e.g,e.b,e.opacity):new yj}function vj(e,t,n,r){return 1===arguments.length?gj(e):new yj(e,t,n,null==r?1:r)}function yj(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function bj(){return`#${Cj(this.r)}${Cj(this.g)}${Cj(this.b)}`}function xj(){const e=Sj(this.opacity);return`${1===e?"rgb(":"rgba("}${wj(this.r)}, ${wj(this.g)}, ${wj(this.b)}${1===e?")":`, ${e})`}`}function Sj(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function wj(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Cj(e){return((e=wj(e))<16?"0":"")+e.toString(16)}function Ej(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Dj(e,t,n,r)}function Ij(e){if(e instanceof Dj)return new Dj(e.h,e.s,e.l,e.opacity);if(e instanceof JN||(e=fj(e)),!e)return new Dj;if(e instanceof Dj)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Dj(a,s,l,e.opacity)}function Dj(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Rj(e){return(e=(e||0)%360)<0?e+360:e}function Pj(e){return Math.max(0,Math.min(1,e||0))}function Mj(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}KN(JN,fj,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:dj,formatHex:dj,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Ij(this).formatHsl()},formatRgb:pj,toString:pj}),KN(yj,vj,XN(JN,{brighter(e){return e=null==e?QN:Math.pow(QN,e),new yj(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?ZN:Math.pow(ZN,e),new yj(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new yj(wj(this.r),wj(this.g),wj(this.b),Sj(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:bj,formatHex:bj,formatHex8:function(){return`#${Cj(this.r)}${Cj(this.g)}${Cj(this.b)}${Cj(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:xj,toString:xj})),KN(Dj,function(e,t,n,r){return 1===arguments.length?Ij(e):new Dj(e,t,n,null==r?1:r)},XN(JN,{brighter(e){return e=null==e?QN:Math.pow(QN,e),new Dj(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?ZN:Math.pow(ZN,e),new Dj(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new yj(Mj(e>=240?e-240:e+120,i,r),Mj(e,i,r),Mj(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Dj(Rj(this.h),Pj(this.s),Pj(this.l),Sj(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Sj(this.opacity);return`${1===e?"hsl(":"hsla("}${Rj(this.h)}, ${100*Pj(this.s)}%, ${100*Pj(this.l)}%${1===e?")":`, ${e})`}`}}));const Lj=Math.PI/180,Aj=180/Math.PI,kj=.96422,Oj=.82521,qj=4/29,Tj=6/29,Nj=3*Tj*Tj,jj=Tj*Tj*Tj;function _j(e){if(e instanceof Fj)return new Fj(e.l,e.a,e.b,e.opacity);if(e instanceof Vj)return Bj(e);e instanceof yj||(e=gj(e));var t,n,r=Hj(e.r),i=Hj(e.g),o=Hj(e.b),a=zj((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?t=n=a:(t=zj((.4360747*r+.3850649*i+.1430804*o)/kj),n=zj((.0139322*r+.0971045*i+.7141733*o)/Oj)),new Fj(116*a-16,500*(t-a),200*(a-n),e.opacity)}function Fj(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function zj(e){return e>jj?Math.pow(e,1/3):e/Nj+qj}function Wj(e){return e>Tj?e*e*e:Nj*(e-qj)}function $j(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Hj(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Vj(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Bj(e){if(isNaN(e.h))return new Fj(e.l,0,0,e.opacity);var t=e.h*Lj;return new Fj(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}KN(Fj,function(e,t,n,r){return 1===arguments.length?_j(e):new Fj(e,t,n,null==r?1:r)},XN(JN,{brighter(e){return new Fj(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new Fj(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new yj($j(3.1338561*(t=kj*Wj(t))-1.6168667*(e=1*Wj(e))-.4906146*(n=Oj*Wj(n))),$j(-.9787684*t+1.9161415*e+.033454*n),$j(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),KN(Vj,function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof Vj)return new Vj(e.h,e.c,e.l,e.opacity);if(e instanceof Fj||(e=_j(e)),0===e.a&&0===e.b)return new Vj(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Aj;return new Vj(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new Vj(e,t,n,null==r?1:r)},XN(JN,{brighter(e){return new Vj(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new Vj(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return Bj(this).rgb()}}));var Gj=e=>()=>e;function Uj(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Gj(isNaN(e)?t:e)}!function e(t){var n=function(e){return 1===(e=+e)?Uj:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):Gj(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=vj(e)).r,(t=vj(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=Uj(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);var Yj="center",Kj="bottom";[{key:"NoDataExist",alignment:Yj,condition:function(e){var t=e.layoutService;if(!t)return!1;var n=t.meta.size;return n.x*n.y===0}},{key:"OnlyNanDataMeasure",translationKey:"OnlyNanData",alignment:Yj,condition:function(e){var t=e.layoutService;return!!t&&t.getHyperCubeValue("qMeasureInfo").every(function(e){return"NaN"===e.qMin&&"NaN"===e.qMax})}},{key:"OnlyNanDataDimensionContinuous",translationKey:"OnlyNanData",alignment:Yj,condition:function(e){var t=e.layoutService;if(!t)return!1;if(!t.meta.isContinuous)return!1;var n=t.getHyperCubeValue("qDimensionInfo.0");return n&&(n.qMax<n.qMin||"NaN"===n.qMax)}},{key:"OnlyNegativeOrZeroValues",alignment:Yj},{key:"DataRangeIncludingZero",alignment:Kj},{key:"LimitedData",alignment:Kj},{key:"NegativeOrZeroValues",alignment:Kj}].reduce(function(e,t){return e[t.key]=t,e},{});var Xj,Jj=["__proto__","constructor"];function Zj(e,t,n){if(void 0!==e&&void 0!==t){var r=t.split("."),i=r[r.length-1];if(!Jj.some(function(e){return r.includes(e)})){for(var o=e,a=0;a<r.length-1;++a){var s=r[a];void 0===o[s]&&(o[s]=Number.isNaN(+r[a+1])?{}:[]),o=o[s]}void 0!==n?o[i]=n:delete o[i]}}}function Qj(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return e},n=function(){var e={};return{get:function(t){return e[t]},set:function(t,n){return e[t]=n,n},has:function(t){return t in e},remove:function(t){delete e[t]},empty:function(){e={}}}}();return function(r){var i=t(r);return n.has(i)?n.get(i):n.set(i,e(r))}}function e_(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return function(){for(var r=this,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];clearTimeout(t),t=setTimeout(function(){return e.apply(r,o)},n)}}function t_(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function n_(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=i_)):void 0===t&&(t=r_);for(var n,r,i,o,a,s=new s_(e),l=[s];n=l.pop();)if((i=t(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)l.push(r=i[o]=new s_(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(a_)}function r_(e){return e.children}function i_(e){return Array.isArray(e)?e[1]:null}function o_(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function a_(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function s_(e){this.data=e,this.depth=this.height=0,this.parent=null}s_.prototype=n_.prototype={constructor:s_,count:function(){return this.eachAfter(t_)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,i,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=s.pop();)e.call(t,o,++l,this);return this},eachBefore:function(e,t){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t},copy:function(){return n_(this).eachBefore(o_)},[Symbol.iterator]:function*(){var e,t,n,r,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n])}while(o.length)}},Xj=function(e){
101
101
  /*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
102
- e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,s,l,u,c,d,p=e.length,f=e.search(/[0-9\-\+#]/),h=f>0?e.substring(0,f):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),v=p-g,y=e.substring(v,v+1),b=v+("."===y||","===y?1:0),x=g>0?e.substring(b,p):"";if(n=(t="-"===(e=e.substring(f,b)).charAt(0)?-t:+t)<0?t=-t:0,i=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",o=r&&r[1]&&r[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(u=t.split("."))[1]||u[1]&&u[1].length<=s)&&(t=(+t).toFixed(s+1)),c=e[0].split(o),e[0]=c.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;u[0].length<e[0].length-a;)u[0]="0"+u[0];else 0===+u[0]&&(u[0]="");if((t=t.split("."))[0]=u[0],l=c[1]&&c[c.length-1].length){for(m="",v=(d=t[0]).length%l,p=d.length,b=0;b<p;b++)m+=d.charAt(b),!((b-v+1)%l)&&b<p-l&&(m+=o);t[0]=m}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),h+(n?"-":"")+r+x}},Kj({exports:{}});const s_=(e,t=mN.TEXT,n=mN.WHITE)=>{const r=MN(e??""),i=MN(t),o=MN(n);return r.isInvalid()?t:function(e,t,n){const r=LN(e,t),i=LN(e,n);if(void 0!==r&&void 0!==i)return r>i?t:n}(r,o,i).getRGB()},l_=e=>{const t=e.getStyle("","","dataColors.selected")||mN.SELECTED,n=function(e,t){const n=MN(AN),r=MN(e),i=MN(t);if(r.isInvalid()||i.isInvalid()||r.getAlpha()<1||i.getAlpha()<1)return t;const o=LN(n,r),a=LN(i,r),s=o>a||o>4.5;return!s&&a>3?i.getHex():s?AN:"#000000"}(t,mN.TEXT);return{background:t,color:n}},u_=(e,t)=>{const n=MN(e);return 0===n.a?(n.setAlpha(t.opacity),n.getString()):n.isDark()?n.getBrightenedColor(t.brighter).getString():n.getDarkenedColor(t.darker).getString()},c_=e=>{const t=MN(e);return t.isInvalid()?null:1===t.a?t.getRGB():t.getRGBA()},d_=e=>{e.stopPropagation(),e.preventDefault()},p_=e=>{(e instanceof HTMLElement||e instanceof SVGElement)&&e.focus()},f_=e=>{const{currentTarget:t}=e;if("true"===t.getAttribute("data-dragging"))return!0;const n=t.closest(".exploration-panel");if(!n)return!1;const r=n.getElementsByClassName("section-item-container");return Array.from(r).some(e=>"true"===e.getAttribute("data-dragging"))},h_=(e,t)=>{const{key:n,currentTarget:r}=e;if(r===t.current&&n===RT.Tab)if(e.preventDefault(),e.shiftKey)((e,t)=>{const{currentTarget:n}=e;if(n!==t.current)return;const r=n.closest('[role="region"]')?.getElementsByTagName("button")[0];r&&p_(r)})(e,t);else{const e=r.parentElement?.getElementsByClassName("exploration-section-header")[0];e&&p_(e)}},m_=(e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=t.sectionIndex??2;if(0===r)return void((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=n.closest(".exploration-panel")?.getElementsByTagName("input")[0];r&&p_(r)})(e,t);const i=n.closest(".exploration-panel")?.getElementsByClassName("exploration-list")[r-1],o=i?.getElementsByClassName("exploration-item-focus").length??0;if(o>0){const e=i?.getElementsByClassName("exploration-draggable-icon")[o-1];e&&p_(e)}},g_=(e,t)=>{const{key:n}=e;switch(n){case RT.Tab:d_(e),e.shiftKey?m_(e,t):((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=n.closest(".exploration-list"),i=r?.getElementsByClassName("exploration-item-focus")[0];if(!i){const e=n.closest(".exploration-panel")?.getElementsByClassName("exploration-list")[2].getElementsByClassName("exploration-section-header")[0];return void(e&&p_(e))}p_(i)})(e,t);break;case RT.Down:if(f_(e))break;e.preventDefault(),((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=n.closest(".exploration-panel"),i=r?.getElementsByClassName("exploration-section-header").length??0;let o=null;if(0===i)return;const a=t.sectionIndex??2;o=a+1<i?r?.getElementsByClassName("exploration-section-header")[a+1]:r?.getElementsByClassName("exploration-section-header")[0],o&&p_(o)})(e,t);break;case RT.Up:if(f_(e))break;e.preventDefault(),((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=n.closest(".exploration-panel"),i=r?.getElementsByClassName("exploration-section-header").length??0;let o=null;if(0===i)return;const a=t.sectionIndex??2;o=a-1>=0?r?.getElementsByClassName("exploration-section-header")[a-1]:r?.getElementsByClassName("exploration-section-header")[i-1],o&&p_(o)})(e,t);break;case RT.Enter:case RT.Space:e.preventDefault(),((e,t)=>{const{currentTarget:n}=e;if(e.preventDefault(),n!==t.ref.current)return;const r="all"!==t.checkState;t.toggleAllCheckboxes(r)})(e,t)}},v_=({children:e})=>fo.jsx("span",{style:{width:"fit-content",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",fontWeight:"bold"},children:e}),y_=({children:e,sectionIndex:t})=>{const r=qw(void 0!==t?GT(t):dN),i=Tw(void 0!==t?UT(t):pN),o=n.useRef(null),a={ref:o,toggleAllCheckboxes:i,checkState:r,sectionIndex:t};return fo.jsxs(sc,{ref:o,className:"exploration-section-header",tabIndex:0,onKeyDown:e=>{g_(e,a)},sx:{display:"flex",alignItems:"center",width:"100%",padding:"2px 8px 2px 8px",boxSizing:"border-box",fontSize:"14px","&:focus-visible":{boxShadow:`0 0 0 2px ${ZT} inset`}},children:[fo.jsx(Oc,{disabled:"disabled"===r,checked:"all"===r,indeterminate:"some"===r,onChange:e=>{i(e.target.checked)},size:"small",style:{flexShrink:0,padding:9}}),fo.jsx(v_,{children:e})]})},b_=({sectionIndex:e})=>{const t=qw(HT(e));return fo.jsx(y_,{sectionIndex:e,children:t})},x_=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M5.5 1a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zm0 4a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zM5 9.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5zm.5 3.5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zM9 1.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5zM9.5 5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zM9 9.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5zm.5 3.5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5z"})})),S_=Sl("div")({position:"absolute",width:"1px",height:"1px",padding:0,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0}),w_=Sl(x_)(()=>({padding:"6px 6px",flexShrink:0,cursor:"grab","&:focus-visible":{boxShadow:`0 0 0 2px ${ZT} inset`}})),C_=e=>"svg"===e.tagName?"exploration-draggable-icon":e.className,E_=(e,t)=>{const n=e.closest(".exploration-list"),r=n?.nextElementSibling||n?.parentElement?.nextElementSibling;if(null===r||!r){if(t===RT.Tab)return;return n?.closest(".exploration-panel")?.getElementsByClassName("exploration-section-header")[0]}return r.getElementsByClassName("exploration-section-header")[0]},I_=e=>{const{currentTarget:t}=e,n=C_(t);let r=t.closest("li")?.previousElementSibling?.getElementsByClassName(n)[0];if(!r){const e=t.closest(".exploration-list"),i=e?.querySelector(".exploration-section-header");if(i)return i;if(r=((e,t)=>{const n=e.closest(".exploration-list"),r=n?.previousElementSibling;if(null===r||!r)return e.closest(".exploration-panel")?.getElementsByClassName(t)[1];const i=r.getElementsByClassName(t);return i.length>0?i[i.length-1]:void 0})(t,n),!r){const e=t.closest(".exploration-panel")?.getElementsByClassName(n)[1];return e??null}}return r},D_=(e,t)=>{const{currentTarget:n}=e;if(n===t.items.draggableIconRef.current){const e=n.closest("li")?.getElementsByClassName("exploration-item")[0];return void(e&&p_(e))}if(n===t.items.explorationItemRef.current){const e=n.getElementsByClassName("exploration-draggable-icon")[0];return void p_(e)}n===t.items.explorationItemFocusRef.current&&t.toggleCheckedById(t.id)},R_=e=>{const t=e.key===RT.Down?(e=>{const{currentTarget:t,key:n}=e,r=C_(t),i=t.closest("li");let o=i?.nextElementSibling?.getElementsByClassName(r)[0];return o||(o=E_(t,n),o)?o:t.closest(".exploration-panel")?.getElementsByClassName(r)[0]})(e):I_(e);t&&p_(t)},P_=(e,t)=>{const{key:n}=e;switch(n){case RT.Tab:if(e.shiftKey)e.preventDefault(),((e,t)=>{const{currentTarget:n}=e,r=n.closest("ul")?.getElementsByClassName("exploration-item-focus");if(n===t.items.draggableIconRef.current){if(t.itemIndex>=0){const e=r&&r[t.itemIndex];return void(e&&p_(e))}const n=I_(e);n&&p_(n)}if(n===t.items.explorationItemFocusRef.current){const t=n.closest("li")?.previousElementSibling?.getElementsByClassName("exploration-draggable-icon")[0];if(t)return void p_(t);const r=I_(e);r&&p_(r)}})(e,t);else{const n=((e,t)=>{const{currentTarget:n,key:r}=e;if(e.shiftKey)return!0;if(n===t.items.explorationItemRef.current){const e=n.getElementsByClassName("exploration-draggable-icon")[0];return p_(e),!0}if(n===t.items.explorationItemFocusRef.current){const e=n.closest("li")?.getElementsByClassName("exploration-draggable-icon")[0];return e&&p_(e),!0}if(n===t.items.draggableIconRef.current){const e=n.closest("ul")?.getElementsByClassName("exploration-item-focus");if((e?.length||0)-1>t.itemIndex){const n=e&&e[t.itemIndex+1];return n&&p_(n),!0}const i=E_(n,r);if(!i)return!1;p_(i)}return!0})(e,t);n?d_(e):e.stopPropagation()}break;case RT.Down:case RT.Up:if(f_(e))break;d_(e),R_(e);break;case RT.Enter:if(e.currentTarget===t.items.explorationItemRef.current&&t.dragHandleRef){t.dragHandleRef(e.currentTarget);break}d_(e),D_(e,t);break;case RT.Space:d_(e),D_(e,t)}},M_=({children:e})=>fo.jsx("span",{style:{width:"fit-content",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flexGrow:1},children:e}),L_=({title:e,dragHandleRef:t,...r})=>{const[i,o]=Nw(CC),a=qw(Zw),s=n.useRef(null),l=n.useRef(null),u=n.useRef(null),c={id:r.id,itemIndex:r.itemIndex,toggleCheckedById:o,items:{explorationItemRef:s,explorationItemFocusRef:l,draggableIconRef:u},dragHandleRef:t};return n.useEffect(()=>{t&&s.current&&t(s.current)},[t]),fo.jsxs(sc,{ref:s,className:"exploration-item",onClick:e=>{e.stopPropagation(),o(r.id)},onKeyDown:e=>{P_(e,c)},tabIndex:0,style:{display:"flex",alignItems:"center",width:"100%",cursor:"pointer",padding:0,boxSizing:"border-box",fontSize:"14px"},title:e,sx:{"&:hover":{backgroundColor:"action.hover"},"&:focus-visible":{boxShadow:`0 0 0 2px ${ZT} inset`}},children:[fo.jsxs(sc,{ref:l,className:"exploration-item-focus",component:"div",tabIndex:0,onKeyDownCapture:e=>{P_(e,c)},sx:{display:"flex",minWidth:0,alignItems:"center",justifyContent:"space-between",flexGrow:1,marginRight:"4px","&:focus-visible":{boxShadow:`0 0 0 2px ${ZT} inset`}},children:[fo.jsx(Oc,{checked:i.has(r.id),"aria-label":a("ChartExploration.ListItem.Label",e),size:"small",tabIndex:-1,style:{padding:9,flexShrink:0,visibility:-1===r.id?"hidden":"visible"}}),fo.jsx(M_,{children:e})]}),fo.jsx(w_,{ref:u,className:"exploration-draggable-icon",tabIndex:0,height:"16px",onClick:e=>{e.stopPropagation()},onKeyDownCapture:e=>{P_(e,c)}})]})},A_=e=>{const t=qw($T(e))??"";return fo.jsx(L_,{title:t,...e})},k_=()=>{const e=qw(VT),t=qw(BT),n=qw(rN),r=Tw(YT);return fo.jsx(CT,{numberOfSections:2,numberOfItemsInSection:t,keyExtractor:e,emptyTexts:n,onDragEnd:r,dragOverlayRenderer:oN,headerRenderer:b_,itemRenderer:A_})},O_=({itemIndex:e})=>{const t=qw(lN(e));return fo.jsx(iN,{children:t})},q_=()=>{const e=qw(Zw);return fo.jsx(y_,{children:e("Common.Values")})},T_=e=>{const{itemIndex:t}=e,n=qw(lN(t));return fo.jsx(L_,{title:n,...e})},N_=()=>{const e=qw(uN),t=qw(cN),n=qw(nN),r=Tw(fN);return fo.jsx(sc,{className:"exploration-header-section",style:{height:"100%",display:"flex",flexDirection:"column-reverse"},children:fo.jsx(CT,{numberOfSections:1,numberOfItemsInSection:t,keyExtractor:e,emptyTexts:n,onDragEnd:r,dragOverlayRenderer:O_,headerRenderer:q_,itemRenderer:T_})})},j_=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M8.588 11.415a6 6 0 1 1 2.828-2.829l4.101 4a1.5 1.5 0 0 1 .014 2.134l-.707.707a1.5 1.5 0 0 1-2.108.014zM11 6A5 5 0 1 0 1 6a5 5 0 0 0 10 0m-1.52 4.888 3.934 3.837a.5.5 0 0 0 .703-.005l.707-.707a.5.5 0 0 0-.005-.711l-3.926-3.829a6 6 0 0 1-1.413 1.415"})})),__=()=>{const[e,t]=Nw(Qw),r=qw(Zw),i=n.useRef(null),[o]=qw(cN),[a=0,s=0]=qw(BT),l=f(e=>{t(e.target.value)},[t]),u=0===e.length||0===a&&0===s&&0===o?r("Common.Search.NoResultsAvailable"):r("ChartExploration.Pivot.Search.ResultsFound",a.toString(),s.toString(),o.toString());return fo.jsxs(sc,{ref:i,onKeyDown:e=>{h_(e,i)},style:{position:"sticky",top:0,zIndex:10,width:"calc(100% - 24px)",backgroundColor:"var(--sprout-common-background-color-weak)",paddingTop:0,paddingRight:12,paddingLeft:12,paddingBottom:12},children:[fo.jsx(S_,{"data-testid":"screenOnly-search-results","aria-live":"polite","aria-atomic":"true",children:u}),fo.jsx(Vp,{size:"small",fullWidth:!0,"data-testid":"chart-exploration-search-input","aria-label":r("Common.Search.AccessibilityLabel"),type:"search",defaultValue:e,placeholder:r("Common.Search"),onChange:l,startAdornment:fo.jsx(xd,{position:"start",children:fo.jsx(j_,{})}),inputProps:{style:{fontSize:"14px",paddingTop:6,paddingBottom:6}}})]})},F_=e=>{const t=_s(kf());return fo.jsx(Cl,{theme:t,children:fo.jsx(Pw,{children:fo.jsx(EC,{props:e,children:fo.jsxs(sc,{className:"exploration-panel",style:{display:"flex",flexDirection:"column"},children:[fo.jsx(__,{}),fo.jsx(k_,{}),fo.jsx(N_,{})]})})})})},z_=e=>{if(e.flags.isEnabled("CLIENT_IM_5973_PIVOT_TABLE_EXPLORATION"))return{component:F_,classification:{tags:["exploration"],exclusive:!0}}};var W_=function(e){return e.CONTAINS="contains",e.MATCHES_EXACTLY="matches_exactly",e.STARTS_WITH="starts_with",e.ENDS_WITH="ends_with",e.BEGINNING_OF_WORD="beginning_of_word",e}(W_||{}),$_=function(e){return e.COMPARE="compare",e.GENERAL="general",e}($_||{}),H_=function(e){return e.VALUES="values",e.CONDITION="condition",e.SEARCH="search",e.CLEAR_SELECTION="clear_selection",e.TOP_BOTTOM="top_bottom",e}(H_||{}),V_=function(e){return e.FIXED_VALUE="fixed_value",e.CALCULATED_VALUE="calculated_value",e}(V_||{});const B_=e=>e&&"]"!==e?/^[A-Za-z][A-Za-z0-9_]*$/.test(e)||(e=>{if(!e)return!1;if("["===e[0]&&"]"===e[e.length-1]){let t=e.substring(1,e.length-1);if(/^[A-Za-z][A-Za-z0-9_]*$/.test(t))return!0;if(t=t.replace(/\]\]/g,"]"),e===`[${t.replace(/\]/g,"]]")}]`)return!0}return!1})(e)?e:`[${e.replace(/\]/g,"]]")}]`:e,G_=e=>{if(!Array.isArray(e))return"";let t="{<";const n=[];if(e.forEach(e=>{let t=`[${e.field}]${e.exclude?"-":""}={`,r="}",i="";switch(e.type){case H_.SEARCH:i=(e=>{let t="",n="";const r=e.options?.mode;if(!r)return"";switch(r){case W_.BEGINNING_OF_WORD:t="*^",n="*";break;case W_.ENDS_WITH:t="*";break;case W_.STARTS_WITH:n="*";break;case W_.MATCHES_EXACTLY:break;case W_.CONTAINS:default:t="*",n="*"}const i=e.options.values?.[0]??"";return""!==i?`"${t}${i}${n}"`:""})(e);break;case H_.CONDITION:i=(e=>{const{options:t}=e,n=t?.mode===$_.GENERAL,r=t?.modifier?.type===V_.FIXED_VALUE,i=t?.modifier?.operator?t.modifier.operator.split(" "):[];if(0===i.length||!r&&(!t.firstValue?.aggregator||!t.firstValue?.field)||r&&!t.firstValue?.fixedValue||n&&(!t.conditionField?.aggregator||!t.conditionField?.field))return"";let o,a,s="=";n&&r?(o=`${t.conditionField?.aggregator}(${B_(t.conditionField?.field)})`,a=`${t.firstValue?.fixedValue}`):!n&&r?(o="",a=`${t.firstValue?.fixedValue}`,s=""):n||r?(o=`${t.conditionField?.aggregator}(${B_(t.conditionField?.field)})`,a=`${t.firstValue?.aggregator}(${B_(t.firstValue?.field)})`):(o=`${B_(e.field)}`,a=`${t.firstValue?.aggregator}(total ${B_(t.firstValue?.field)})`);const l=`${s}${o}${i[0]}${a}`;let u="";if(i.length>1){if(!r&&(!t.secondValue?.aggregator||!t.secondValue?.field)||r&&!t.secondValue?.fixedValue)return"";let e,a;n&&r?(e=`${t.secondValue?.fixedValue}`,a=` and ${o}`):!n&&r?(e=`${t.secondValue?.fixedValue}`,a=""):n||r?(e=`${t.secondValue?.aggregator}(${B_(t.secondValue?.field)})`,a=` and ${o}`):(e=`${t.secondValue?.aggregator}(total ${B_(t.secondValue?.field)})`,a=` and ${o}`),u=`${a}${i[1]}${e}`}return`"${l}${u}"`})(e);break;case H_.CLEAR_SELECTION:i=`[${e.field}]=`,t="",r="";break;case H_.VALUES:default:i=e.options?.values?e.options.values.map(e=>`'${e.replace(/'/g,"''")}'`).join(","):""}""!==i&&n.push(`${t}${i}${r}`)}),0===n.length)return;return t+=`${n.join(",")}>}`,t},U_=[];for(let e=0;e<256;++e)U_.push((e+256).toString(16).slice(1));const Y_=new Uint8Array(16);function K_(e,t,n){return crypto.randomUUID?crypto.randomUUID():function(e){e=e||{};const t=e.random??e.rng?.()??crypto.getRandomValues(Y_);if(t.length<16)throw new Error("Random bytes length must be >= 16");return t[6]=15&t[6]|64,t[8]=63&t[8]|128,function(e,t=0){return(U_[e[t+0]]+U_[e[t+1]]+U_[e[t+2]]+U_[e[t+3]]+"-"+U_[e[t+4]]+U_[e[t+5]]+"-"+U_[e[t+6]]+U_[e[t+7]]+"-"+U_[e[t+8]]+U_[e[t+9]]+"-"+U_[e[t+10]]+U_[e[t+11]]+U_[e[t+12]]+U_[e[t+13]]+U_[e[t+14]]+U_[e[t+15]]).toLowerCase()}(t)}(e)}const X_=()=>crypto?.randomUUID?.()??K_(),J_=1e3,Z_=1e3,Q_=e=>{if(0===e.qInterColumnSortOrder.length)return;const t=e.qDimensions,n=((e,t)=>{const n=new Set;for(const t of e){if(n.has(t))return!0;n.add(t)}const r=e.includes(-1),i=e.filter(e=>-1!==e);if(t){const n=r?t.length+1:t.length;if(e.length!==n)return!0}const o=[...i].sort((e,t)=>e-t);for(let e=0;e<o.length;e++)if(o[e]!==e)return!0;return!1})(e.qInterColumnSortOrder,t);n&&(e.qInterColumnSortOrder=((e,t)=>{const n=[];if(t)for(let e=0;e<t.length;e++)n.push(e);return e.qMeasures.length>=2&&n.push(-1),n})(e,t))},eF=(e,t,n)=>{[e[t],e[n]]=[e[n],e[t]]},tF=e=>{if(!e)return;Q_(e);const t=e.qDimensions,{qInterColumnSortOrder:n}=e;((e,t=[])=>{const n=t.filter(e=>-1!==e);for(let r=0;r<n.length;r++)if(-1!==n[r]&&n[r]!==r){const i=n[r],o=n.indexOf(r),a=n[o];eF(n,r,o),eF(e,r,o),eF(t,t.indexOf(i),t.indexOf(a))}})(t,n)},nF=R;class rF extends nF{#u;#c;constructor(e,t,n){super(e),this.path=e.path,this.#u=t,this.#c=n}async addDimension(e,t,n,r){if(!e||this.#d(e))return;const i=t??!1;if(e.qDef.cId||(e.qDef.cId=X_()),r)return this.addAlternativeDimension(e,i,n);if(this.getDimensions().length<this.maxDimensions()){const t=await(async(e,t,n,r)=>{const i=e.getDimensions(),o=e.hcProperties.qNoOfLeftDims;return await e.autoSortDimension(t),tF(e.hcProperties),(-1===o||Number.isNaN(+o))&&(e.hcProperties.qNoOfLeftDims=i.length),n?((e,t,n,r)=>{if(!e)return;const{qInterColumnSortOrder:i,qNoOfLeftDims:o}=e,a=t.length,s=i.indexOf(-1),l=-1!==s,u=void 0!==r?r+(o||0):void 0;if(l&&void 0!==u&&s>=u?((e,t,n)=>{t.splice(n,1),t.push(e),t.splice(n+1,0,-1)})(a,i,s):i.push(a),void 0===r)t.push(n);else if(void 0!==u){const e=l&&u>s?u-1:u;t.splice(e,0,n)}})(e.hcProperties,i,t,r):((e,t,n,r)=>{if(!e||"number"!=typeof e.qNoOfLeftDims)return;const i=e.qNoOfLeftDims,{qInterColumnSortOrder:o}=e,a=t.length,s=o.indexOf(-1),l=-1!==s&&i>0&&s<i;if(o.push(a),l)void 0===r?t.splice(i-1,0,n):s<r?t.splice(r-1,0,n):(t.splice(r,0,n),o.splice(s,1),o.splice(s+1,0,-1));else{const e=r??i;t.splice(e,0,n),-1!==s&&(o.splice(s,1),o.splice(s+1,0,-1))}e.qNoOfLeftDims++})(e.hcProperties,i,t,r),t})(this,e,i,n);return this.#p({section:i?"columns":"rows",cId:e.qDef.cId,addLast:void 0===n}),t}}async addDimensions(e,t,n){const r=[];for await(const i of e){const e=await this.addDimension(i,n,void 0,t);e&&r.push(e)}return r}addAlternativeDimension(e,t,n){if(!e||this.#d(e))return;const r=this.getAlternativeDimensions();void 0===this.hcProperties.excludedNoOfLeftDims&&(this.hcProperties.excludedNoOfLeftDims=r.length);let i=n;return i=void 0===i?t?r.length:this.hcProperties.excludedNoOfLeftDims:t?this.hcProperties.excludedNoOfLeftDims+i:Math.min(i,this.hcProperties.excludedNoOfLeftDims),r.splice(i,0,e),t||this.hcProperties.excludedNoOfLeftDims++,this.#p({section:t?"columns":"rows",cId:e.qDef.cId,alternative:!0,addLast:void 0===n}),e}async addFieldDimension(e,t,n,r={}){const i=this.createFieldDimension(e,t,n);return this.addDimension(i,r.asColumn,void 0,!1)}async addFieldDimensions(e,t={}){const n=e.map(e=>this.createFieldDimension(e.field,e.label,e.defaults));return this.addDimensions(n,void 0,t.asColumn)}async addLibraryDimensions(e,t={}){const n=e.map(e=>this.createLibraryDimension(e.id,e.defaults));return this.addDimensions(n,void 0,t.asColumn)}reinsertDimension(e,t,n){e.qDef.cId||(e.qDef.cId=X_());if(this.getDimensions().length<this.maxDimensions())return this.addDimension(e,t,n);return this.reinsertAlternativeDimension(e,n,t)}reinsertAlternativeDimension(e,t,n){const r=this.getDimensions(),i=this.getAlternativeDimensions();if(r.length>=J_)return Promise.resolve();const o="number"==typeof t?t:i.length;return i.splice(o,0,e),this.#p({section:n?"columns":"rows",cId:e.qDef.cId,alternative:!0}),Promise.resolve(e)}async removeDimensions(e,t,n){return Promise.all([...e].reverse().map(e=>this.removeDimension(e,t,n)))}async removeDimension(e,t,n){if(t){const t=this.getAlternativeDimensions().splice(e,1)[0];return!n&&this.hcProperties.excludedNoOfLeftDims&&this.hcProperties.excludedNoOfLeftDims--,this.#f({cId:t.qDef.cId,section:n?"columns":"rows"}),t}const r=this.getDimensions(),i=this.properties.qHyperCubeDef.qNoOfLeftDims,o=this.hcProperties.qInterColumnSortOrder.indexOf(e);"number"==typeof this.properties.qHyperCubeDef.qNoOfLeftDims&&"number"==typeof o&&"number"==typeof i&&o+1<=i&&this.properties.qHyperCubeDef.qNoOfLeftDims--;const a=this.properties.qHyperCubeDef.columnWidths?this.properties.qHyperCubeDef.columnWidths[1]:void 0;Array.isArray(a)&&a.length>e&&a.splice(e,1);const s=r.splice(e,1).at(0);if(s)return((e,t)=>{if(!e)return-1;const n=e.indexOf(t);if(-1===n)return-1;for(let n=0;n<e.length;++n)e[n]>t&&e[n]--;e.splice(n,1)})(this.hcProperties.qInterColumnSortOrder,e),tF(this.hcProperties),this.#f({cId:s.qDef.cId,section:n?"columns":"rows"}),s}#d(e){return!(!e||void 0===e.qDef.cId)&&[...this.getDimensions(),...this.getAlternativeDimensions()].some(t=>t.qDef.cId===e.qDef.cId)}async addMeasures(e,t=!1){const n=[];for await(const r of e){const e=await this.addMeasure(r,t,void 0,!0);e&&n.push(e)}return n}addAlternativeMeasures(e,t){if(this.#h(e))return;const n=this.getAlternativeMeasures(),r=void 0===t?n.length:t,i=n.splice(r,0,e);return this.#m({cId:e.qDef.cId,alternative:!0,addLast:void 0===t}),i}async addMeasure(e,t,n,r){if(this.#h(e))return;if(e.qDef.cId||(e.qDef.cId=X_()),t)return this.addAlternativeMeasures(e,n);r||delete e.qDef.qNumFormat;const i=this.getMeasures();if(i.length<this.maxMeasures()){const t=1===i.length;return void 0!==n&&n>=0?i.splice(n,0,e):i.push(e),this.autoSortMeasure(e).then(()=>(t&&(this.hcProperties.qInterColumnSortOrder.push(-1),0===this.getDimensions().length&&(this.hcProperties.qNoOfLeftDims=0)),this.#m({cId:e.qDef.cId,addLast:void 0===n}),e))}return i.length<Z_?(this.getAlternativeMeasures().push(e),this.#m({cId:e.qDef.cId,alternative:!0,addLast:void 0===n}),Promise.resolve(e)):Promise.resolve()}reinsertMeasure(e,t){const n=this.getMeasures(),r=this.getAlternativeMeasures(),i=this.hcProperties.qInterColumnSortOrder;if(e.qDef.cId||(e.qDef.cId=X_()),t=void 0!==t?t:n.length,n.length<this.maxMeasures()){if(n.splice(t,0,e),2===n.length){-1===i.indexOf(-1)&&i.push(-1)}this.#m({cId:e.qDef.cId})}else n.length<Z_&&(t=r.length,r.splice(t,0,e),this.#m({cId:e.qDef.cId}));return Promise.resolve(e)}async removeMeasure(e,t){if(t&&"number"==typeof e){const t=this.getAlternativeMeasures().splice(e,1)[0];return this.#f({cId:t.qDef.cId,section:"measures"}),t}const n=this.getMeasures();let r,i,o;if("number"==typeof e&&e<n.length){r=2===n.length,i=this.getMeasures().splice(e,1)[0];const t=this.hcProperties.qInterColumnSortOrder;r&&(o=t.indexOf(-1),t.splice(o,1),this.hcProperties.qNoOfLeftDims&&o+1<=this.hcProperties.qNoOfLeftDims&&this.hcProperties.qNoOfLeftDims--)}else"number"==typeof e&&(i=this.getAlternativeMeasures().splice(e-n.length,1)[0]);if(i)return this.#f({cId:i.qDef.cId,section:"measures"}),i}async removeMeasures(e,t){return await Promise.all([...e].reverse().map(e=>this.removeMeasure(e,t))),e}#h(e){return!(!e||void 0===e.qDef.cId)&&[...this.getMeasures(),...this.getAlternativeMeasures()].some(t=>t.qDef.cId===e.qDef.cId)}getSorting(){throw new Error("don't call this")}changeSorting(){throw new Error("don't call this")}setSorting(){throw new Error("don't call this")}getRowDimensions(){const e=this.#g("rows"),t=this.getDimensions();return e.filter(e=>e>=0).map(e=>t[e])}getColumnDimensions(){const e=this.#g("columns"),t=this.getDimensions();return e.filter(e=>e>=0).map(e=>t[e])}getAlternativeRowDimensions(){const e=this.getAlternativeDimensions(),{excludedNoOfLeftDims:t}=this.hcProperties;return-1===t?e:e.slice(0,t)}getAlternativeColumnDimensions(){const e=this.getAlternativeDimensions(),{excludedNoOfLeftDims:t}=this.hcProperties;return-1===t?[]:e.slice(t)}#v(e){const t=this.hcProperties.rankedList?.[e];return t||this.createRankedList(e)}#y(e){return[...this.#v(e)]}#b(e,t){return void 0===this.hcProperties.rankedList&&(this.hcProperties.rankedList={}),this.hcProperties.rankedList[e]=t,t}#x(e){const t=({qDef:t})=>t.cId===e;if(-1===e){return this.hcProperties.qInterColumnSortOrder.indexOf(-1)+1<=this.hcProperties.qNoOfLeftDims?"rows":"columns"}return this.getRowDimensions().some(t)||this.getAlternativeRowDimensions().some(t)?"rows":this.getColumnDimensions().some(t)||this.getAlternativeColumnDimensions().some(t)?"columns":null}#S(e){const t=({qDef:t})=>t.cId===e;return!(!this.getAlternativeDimensions().some(t)&&!this.getAlternativeMeasures().some(t))}#g(e){const{qInterColumnSortOrder:t,qNoOfLeftDims:n}=this.hcProperties;if(this.#w())return"columns"===e?t:[];switch(e){case"rows":return-1===n?t:t.slice(0,n);case"columns":return-1===n?[]:t.slice(n);default:throw new Error(`Unknown section in #getInterColumnSortOrderBySection: ${e}`)}}#w(){const{qNoOfLeftDims:e}=this.hcProperties,t=-1===e||Number.isNaN(+e);return 0===this.getDimensions().length&&this.getMeasures().length>0&&t}#C(e){const t=this.hcProperties.qInterColumnSortOrder.indexOf(-1);if(-1===t)return!1;if(this.#w())return"columns"===e;if(void 0===this.hcProperties.qNoOfLeftDims)return"rows"===e;switch(e){case"rows":return t+1<=this.hcProperties.qNoOfLeftDims;case"columns":return t+1>this.hcProperties.qNoOfLeftDims;default:return!1}}#E(e,t=!0){const n=e=>-1===e?-1:e.qDef.cId;if("measures"===e)return this.getMeasures().concat(t?this.getAlternativeMeasures():[]).map(n);const r=this.#g(e),i=this.getDimensions(),o=r.map(e=>-1===e?-1:i[e]);switch(e){case"rows":return o.concat(t?this.getAlternativeRowDimensions():[]).map(n);case"columns":return o.concat(t?this.getAlternativeColumnDimensions():[]).map(n);default:throw new Error(`Unknown section in #isCorruptRankedList: ${e}`)}}isRankedListCorrupt(e){const t=this.hcProperties.rankedList?.[e],n=this.properties.qInfo?.qId;if(!t)return!0;if(new Set(t).size!==t.length){const r=t.filter((e,n)=>t.indexOf(e)!==n);return console.warn("Corrupt ranked list detected: duplicate ids",{duplicates:r,section:e,chartId:n}),!0}const r=this.#E(e);if(t.length!==r.length)return console.warn("Corrupt ranked list detected: length mismatch",{section:e,chartId:n,fieldIds:r,rankedList:t,diff:new Set(r).symmetricDifference(new Set(t))}),!0;const i=r.filter(e=>!t.includes(e));if(i.length>0)return console.warn("Corrupt ranked list detected: missing ids",{missingIds:i,section:e,chartId:n}),!0;const o=this.#E(e,!1),a=t.filter(e=>o.includes(e)),s=o.filter((e,t)=>e!==a[t]);return s.length>0&&(console.warn("Corrupt ranked list detected: main field order mismatch",{section:e,chartId:n,orderMismatchIds:s}),!0)}createRankedList(e){switch(e){case"rows":case"columns":return this.#I({section:e});case"measures":return this.#D();default:throw new Error(`Unknown section in getRankedList: ${e}`)}}#I({section:e}){const t=this.getDimensions(),n=this.#g(e),r="columns"===e?this.getAlternativeColumnDimensions():this.getAlternativeRowDimensions(),i=n.map(e=>-1===e?-1:t[e].qDef.cId);return i.push(...r.map(e=>e.qDef.cId)),this.#b(e,i)}#D(){if(void 0!==this.hcProperties.rankedList?.measures&&!this.#c("SUPPORT-9810-MISSING-MEASURES"))return this.hcProperties.rankedList.measures;const e=[...this.getMeasures(),...this.getAlternativeMeasures()].map(e=>e.qDef.cId);return this.#b("measures",e)}#R({section:e,cId:t,fields:n,addLast:r}){const i=this.#v(e),o=n.findIndex(e=>e.qDef.cId===t),a=n[o+1]?.qDef.cId,s=n[o-1]?.qDef.cId;if(r)i.push(t);else if(o>=0)if(a){const e=i.indexOf(a);i.splice(e,0,t)}else if(s){const e=i.indexOf(s);i.splice(e+1,0,t)}else i.push(t);return void 0===this.hcProperties.rankedList&&(this.hcProperties.rankedList={}),this.hcProperties.rankedList[e]}#p({section:e,cId:t,alternative:n=!1,addLast:r=!1}){if(void 0===this.hcProperties.rankedList?.[e])return this.#I({section:e});let i=[];return i="columns"===e?n?this.getAlternativeColumnDimensions():this.getColumnDimensions():n?this.getAlternativeRowDimensions():this.getRowDimensions(),this.#R({section:e,cId:t,fields:i,addLast:r})}#m({cId:e,alternative:t=!1,addLast:n=!1}){if(void 0===this.hcProperties.rankedList?.measures)return this.#D();const r=t?this.getAlternativeMeasures():this.getMeasures();return this.#P(),this.#R({section:"measures",cId:e,fields:r,addLast:n})}#P(){const e=this.#v("rows"),t=this.#v("columns");this.#C("rows")&&!e.includes(-1)?e.push(-1):this.#C("columns")&&!t.includes(-1)&&t.push(-1)}#M(){if(this.hcProperties.qInterColumnSortOrder.includes(-1))return;const e=this.#v("rows"),t=this.#v("columns"),n=e.indexOf(-1),r=t.indexOf(-1);-1!==n&&e.splice(n,1),-1!==r&&t.splice(r,1)}#f({cId:e,section:t}){const n=this.#v(t),r=n.indexOf(e);-1!==r&&(n.splice(r,1),this.#M())}async moveMeasureToAlternative(e){const t=this.getMeasures().findIndex(t=>t.qDef.cId===e),n=this.#y("measures"),r=n.indexOf(e);if(-1===t)return;const i=await this.removeMeasure(t);if(void 0===i)return;const o=n.slice(r+1).find(e=>this.getAlternativeMeasures().some(t=>t.qDef.cId===e)),a=this.getAlternativeMeasures().findIndex(e=>e.qDef.cId===o);await this.addAlternativeMeasures(i,-1===a?void 0:a),this.#b("measures",n)}async moveMeasureFromAlternative(e){const t=this.getAlternativeMeasures().findIndex(t=>t.qDef.cId===e),n=this.#y("measures"),r=n.indexOf(e);if(-1===t)return;const i=await this.removeMeasure(t,!0);if(void 0===i)return;const o=this.getMeasures().map(e=>e.qDef.cId),a=n.slice(r+1).find(e=>o.includes(e)),s=o.findIndex(e=>e===a);await this.addMeasure(i,!1,-1===s?void 0:s),this.#b("measures",n)}async moveDimensionToAlternative(e){const t=this.#x(e),n=this.getDimensions().findIndex(t=>t.qDef.cId===e);if(-1===n||null===t)return;const r=this.#y(t),i=r.indexOf(e),o="columns"===t,a=await this.removeDimension(n,!1,o);if(void 0===a)return;const s=r.slice(i+1).find(e=>this.getAlternativeDimensions().some(({qDef:t})=>t.cId===e));let l=this.getAlternativeDimensions().findIndex(({qDef:e})=>e.cId===s);l=-1===l?void 0:l;void 0!==this.addAlternativeDimension(a,o,l)&&this.#b(t,r)}async moveDimensionFromAlternative(e){const t=this.#x(e),n=this.getAlternativeDimensions().findIndex(t=>t.qDef.cId===e);if(-1===n||null===t)return;const r=this.#y(t),i=r.indexOf(e),o="columns"===t,a=await this.removeDimension(n,!0,o);if(void 0===a)return;const s=this.#E(t,!1),l=r.slice(i+1).find(e=>s.includes(e));let u=s.findIndex(e=>e===l);u=-1===u?void 0:u;void 0!==await this.addDimension(a,o,u)&&this.#b(t,r)}movePseudoDimension({toIndex:e,toSection:t}){const n=this.#x(-1);if(null===n)return void console.error("Cannot move pseudo dimension, unable to find it in any section",{toIndex:e,toSection:t});const r="columns"===t,i=n===t,o=this.#y(t);if(i){const e=o.indexOf(-1);o.splice(e,1)}else{const i=this.#v(n),o=i.indexOf(-1);if(-1===o)return void console.error("Couldn't delete pseudo dimension from current section",{toIndex:e,toSection:t,fromSection:n});i.splice(o,1),this.hcProperties.qNoOfLeftDims=r?Math.max(0,this.hcProperties.qNoOfLeftDims-1):this.hcProperties.qNoOfLeftDims+1}const a=e-o.slice(0,e).filter(e=>this.#S(e)).length,s=r?this.hcProperties.qNoOfLeftDims+a:a,l=this.hcProperties.qInterColumnSortOrder.indexOf(-1);this.hcProperties.qInterColumnSortOrder.splice(l,1),this.hcProperties.qInterColumnSortOrder.splice(s,0,-1),o.splice(e,0,-1),this.#b(t,o)}async moveDimension({cId:e,toIndex:t,toSection:n}){const r=this.#x(e),i=this.#S(e);if(null===r)return void console.error("Cannot move dimension, unable to find it in any section",{cId:e});const o=(i?this.getAlternativeDimensions():this.getDimensions()).findIndex(({qDef:t})=>t.cId===e);if(-1===o)return void console.error("Couldn't find dimension to move",{cId:e,toIndex:t,toSection:n});const a=this.#y(n),s=a.indexOf(e);-1!==s&&a.splice(s,1);const l=Math.max(0,Math.min(t,a.length));l!==t&&console.warn("[moveDimension] toIndex is out of bounds, clamping it",{toIndex:t,clampedToIndex:l});const u=l-a.slice(0,l).filter(e=>this.#S(e)!==i).length,c="columns"===n,d="columns"===r,p=await this.removeDimension(o,i,d);if(void 0===p)return;void 0!==await this.addDimension(p,c,u,i)&&(a.splice(l,0,e),this.#b(n,a))}async moveMeasure({cId:e,toIndex:t}){const n=this.#S(e),r=(n?this.getAlternativeMeasures():this.getMeasures()).findIndex(t=>t.qDef.cId===e);if(-1===r)return void console.error("Cannot move measure, unable to find it in any section",{cId:e});const i=this.#y("measures"),o=i.indexOf(e);-1!==o&&i.splice(o,1);const a=Math.max(0,Math.min(t,i.length));a!==t&&console.warn("[moveMeasure] toIndex is out of bounds, clamping it",{toIndex:t,clampedToIndex:a});const s=await this.removeMeasure(r,n);if(void 0===s)return;const l=a-i.slice(0,a).filter(e=>this.#S(e)!==n).length;void 0!==await this.addMeasure(s,n,l)&&(i.splice(a,0,e),this.#b("measures",i))}getLabels(){return this.getMeasures().filter(e=>!e.qLibraryId&&!!e.qDef.qLabel).map(e=>e.qDef.qLabel)}IsHCInStraightMode(){return"S"===this.hcProperties.qMode}getFilters(){return this.properties.filters??[]}getFilter(e){return this.getFilters().find(t=>t.id===e)}addFilterField(e){const t=e.qTags??e.tags,n=Array.isArray(t)&&t.includes("$numeric"),r=e.isDerived,i=Array.isArray(this.properties.filters)?this.properties.filters:[],o={type:"values",field:r?e.value??e.fullname:e.name??e.label??e.field,options:{values:[]},exclude:!1,id:X_(),qTags:Array.isArray(t)?t:[],isNumeric:n};return i.push(o),this.properties.filters=i,this.properties.qHyperCubeDef.qContextSetExpression=G_(i),o}addFilters(e){const t=[];for(const n of e)t.push(this.addFilterField(n));return t}#L(e){const t=this.getFilters();return t.splice(e,1),this.properties.qHyperCubeDef.qContextSetExpression=G_(t),t}removeFilters(e){if(0===e.length)return[];let t=[];const n=[...e].sort((e,t)=>t-e);t=this.getFilters().filter((t,n)=>e.includes(n));for(const e of n)this.#L(e);return t}getAddDimensionLabel(){return this.#u.get("Visualization.Requirements.AddDimension")}canColorBy(){return!1}}var iF={exports:{}};!function(e){self,e.exports=(()=>{var e={909:e=>{var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},a=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,i=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(r in e);return void 0===r||t.call(e,r)},s=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(i)return i(e,n).value}return e[n]};e.exports=function e(){var t,n,r,i,u,c,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=l(d,n),d!==(i=l(t,n))&&(h&&i&&(a(i)||(u=o(i)))?(u?(u=!1,c=r&&o(r)?r:[]):c=r&&a(r)?r:{},s(d,{name:n,newValue:e(h,c,i)})):void 0!==i&&s(d,{name:n,newValue:i}));return d}},8:(e,t)=>{(()=>{var e={229:e=>{var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},a=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,i=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(r in e);return void 0===r||t.call(e,r)},s=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(i)return i(e,n).value}return e[n]};e.exports=function e(){var t,n,r,i,u,c,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=l(d,n),d!==(i=l(t,n))&&(h&&i&&(a(i)||(u=o(i)))?(u?(u=!1,c=r&&o(r)?r:[]):c=r&&a(r)?r:{},s(d,{name:n,newValue:e(h,c,i)})):void 0!==i&&s(d,{name:n,newValue:i}));return d}}},n={};function r(t){var i=n[t];if(void 0!==i)return i.exports;var o=n[t]={exports:{}};return e[t](o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};(()=>{r.r(i),r.d(i,{default:()=>Ae});var e=r(229),t=r.n(e);const n=function(e,t,n){if(!t)return!1;var r,i=t.split("."),o=i[i.length-1],a=e;for(r=0;r<i.length-1;++r)void 0===a[i[r]]&&(a[i[r]]=Number.isNaN(+i[r+1])?{}:[]),a=a[i[r]];if(void 0!==n){var s=a[o];return a[o]=n,{updated:n,previous:s}}return delete a[o],!1},o=function(e,t,n){var r,i=t.split("."),o=e;if(void 0===o)return n;for(r=0;r<i.length;++r){if(void 0===o[i[r]])return n;o=o[i[r]]}return o},a={EXPRESSIONS:{observed:"",trend:"STL_Trend",seasonal:"STL_Seasonal",residual:"STL_Residual"},OPTIONS:[{value:"observed",translation:"cao.trendDecomposition.parameters.decomposition.observed"},{value:"trend",translation:"cao.trendDecomposition.parameters.decomposition.trend"},{value:"seasonal",translation:"cao.trendDecomposition.parameters.decomposition.seasonal"},{value:"residual",translation:"cao.trendDecomposition.parameters.decomposition.residual"}]};var s="".concat(" ","(").concat(" "),l="".concat(" ",")").concat(" ");function u(e){return s+e+l}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var n=function(e,t){if(!t)return null;var n,r;for(n=0;n<t.length;n++)if((r=t[n]).qInfo.qId===e)return r;return null}(e.qLibraryId,t.dimensionList);return n&&n.qData.info[0].qTags.indexOf("$numeric")>-1}var r=function(e,t){if(!t)return null;var n,r,i=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var n=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(n)&&(t=(t=t.substring(1,n)).trim()),t}(e);for(n=0;n<t.length;n++){if((r=t[n]).qName===i)return r;if(r.qDerivedFieldData)for(var o=0;o<r.qDerivedFieldData.qDerivedFieldLists.length;++o)for(var a=r.qDerivedFieldData.qDerivedFieldLists[o],s=0;s<a.qFieldDefs.length;++s){var l=a.qFieldDefs[s];if(l.qName===i)return l}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return r&&r.qTags.indexOf("$numeric")>-1}function d(e){return!(!e.fullAccumulation&&!e.fullRange)}function p(e,t){var n=e.crossAllDimensions;return 2===t&&n?"RowNo(Total)":"RowNo()"}function f(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e),n=t.trim();return"="===n.substring(0,1)?n.substring(1).trim():n}function h(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function m(e,t){var n=e.crossAllDimensions;return 2===t&&n?"Above(Total ":"Above("}function g(e){return void 0===e?")":", 0, ".concat(e,")")}function v(e){return"Replace(Replace(".concat(e,",'''',''''''),'$','$''&''')")}function y(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=").concat(v("MinString(".concat(t,")")),")' and Only({1}").concat(t,")<='$(=").concat(v("MaxString(".concat(t,")")),")'\"}")}function b(e){var t=e.modifier,n=void 0===t?{}:t,r=e.dimensions,i=e.dimensionAndFieldList,o=e.funcComp,a=void 0===o?"Sum":o,s=e.valueComp,l=void 0===s?"0":s;if(!n.showExcludedValues)return"";if(r&&1===r.length){var u=y(c(r[0],i),h(0));return"".concat(a,"({1<").concat(u,">}").concat(l,")")}if(r&&2===r.length){var d=c(r[0],i),p=c(r[1],i),f=h(0),m=h(1),g=y(d,f),v=y(p,m);return"".concat(a,"({1<").concat(g,",").concat(v,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function x(e){return"".concat(e,"(")}function S(e){var t=e.properties,n=e.layout;return o(t,"qHyperCubeDef.qDimensions",o(n,"qHyperCube.qDimensionInfo",[])).length}const w={isFullRange:d,getNumDimensions:S,getExpressionWithExcludedComp:function(e){var t=e.expression,n=e.modifier,r=e.dimensions,i=e.dimensionAndFieldList,o=e.treatMissingAsNull,a=u(f(t));if(!n.showExcludedValues)return a;var s=b({modifier:n,dimensions:r,dimensionAndFieldList:i}),l=o?"":", 0";if(r&&1===r.length){var c=h(0);return"If(Count(".concat(c,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(r&&2===r.length){var d=h(0),p=h(1);return"If(Count(".concat(d,") * Count(").concat(p,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:p,getNumStepComp:function(e,t){if(!d(e)){var n=e.steps;return"number"!=typeof n||Number.isNaN(n)?6:n}return p(e,t)},getAboveCompPrefix:m,getAboveCompSuffix:g,getAboveComp:function(e,t,n,r){return m(e,t)+n+g(r)},getFunctionPrefix:x,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return x(e)+t+")"},getAggrComp:function(e,t,n){return"Aggr(".concat(e,", ").concat(t,", ").concat(n,")")},getExcludedComp:b,needDimension:function(e){var t=e.modifier,n=e.properties,r=e.layout,i=function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t);return 0===i&&2===S({properties:n,layout:r})},getDimComp:function(e,t){var n=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),r=h(t);if(!n.qSortByExpression&&!n.qSortByNumeric&&!n.qSortByAscii)return r;var i=["Descending","Ascending"],o=n.qSortByNumeric?"(Numeric, ".concat(i[(n.qSortByNumeric+1)/2],")"):"",a=n.qSortByAscii?"(Text, ".concat(i[(n.qSortByAscii+1)/2],")"):"";return n.qSortByNumeric&&n.qSortByAscii?"(".concat(r,", ").concat(o,", ").concat(a,")"):n.qSortByNumeric?"(".concat(r,", ").concat(o,")"):n.qSortByAscii?"(".concat(r,", ").concat(a,")"):r},simplifyExpression:f,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var n=t.indexOf(s);if(-1!==n){var r=t.indexOf(l);if(-1!==r)return t.substring(n+s.length,r)}}},initModifier:function(e,t){Object.keys(t).forEach(function(n){void 0===e[n]&&(e[n]=t[n])})},isNumeric:c,isApplicable:function(e){var t=e.properties,n=e.layout,r=e.minDimensions,i=void 0===r?1:r,o=e.maxDimensions,a=void 0===o?2:o;if(!t&&!n)return!0;var s=S({properties:t,layout:n});return s>=i&&s<=a},getExpressionWithMarkers:u,canExtract:function(e){var t=e.indexOf(s),n=e.indexOf(l);return t>-1&&n>-1&&t<n},getDimDefWithWrapper:h,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")},generateTSDExpression:function(e,t,n){var r=t||e.outputExpression;if(e.base&&e.base.qDef&&(r=t!==e.base.qDef?t:e.base.qDef),"observed"!==e.decomposition){var i=n.qHyperCubeDef.qMeasures.find(function(t){return t.qDef.base&&t.qDef.base.qLibraryId&&e.base&&e.base.qLibraryId?t.qDef.base.qLibraryId===e.base.qLibraryId:null});i&&t!==i.qDef.qLabel&&(r=i.qLibraryId||i.qDef.base.qLibraryId?"[".concat(i.qDef.qLabel,"]"):i.qDef.base.qDef);var o=function(e){var t=a.OPTIONS.find(function(t){return t.value===e.decomposition});return t?a.EXPRESSIONS[t.value]:""}(e);r=r.startsWith("=")?r.substr(1):r,r="".concat(o,"(").concat(r,", ").concat(e.steps,")")}return r},getDecomposition:function(e){var t="observed";return Object.values(a.EXPRESSIONS).find(function(n){var r=e.qDef.base.qDef.toLowerCase()||e.qDef.qDef.toLowerCase();return a.EXPRESSIONS[n]&&r.includes(a.EXPRESSIONS[n].toLowerCase())&&(t=n),n}),t}};function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}var I=t().bind(null,!0),D={},R=Array.isArray;function P(e){return null!=e&&!Array.isArray(e)&&"object"===E(e)}function M(e){return void 0===e}function L(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function A(e,t){var n,r=t.substring(1).split("/").slice(0,-1);return r.forEach(function(t,i){if(i!==r.length){n=+t;var o=Number.isNaN(n)?{}:[];e[n||t]=M(e[n||t])?o:e[t],e=e[n||t]}}),e}function k(e,t){var n=!0;if(P(e)&&P(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach(function(r){k(e[r],t[r])||(n=!1)}),n);if(R(e)&&R(t)){if(e.length!==t.length)return!1;for(var r=0,i=e.length;r<i;r+=1)if(!k(e[r],t[r]))return!1;return!0}return e===t}D.generate=function(e,t,n){n=n||"";var r=[];return Object.keys(t).forEach(function(i){var o=function(e){return e?I({},{val:e}).val:e}(t[i]),a=e[i],s="".concat(n,"/").concat(i);k(o,a)||L(t,i)||(M(a)?r.push({op:"add",path:s,value:o}):P(o)&&P(a)?r=r.concat(D.generate(a,o,s)):R(o)&&R(a)?r=r.concat(function(e,t,n){var r=[],i=e.slice(),o=-1;function a(e,t,n){if(e[n]&&M(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(var r=0,i=e.length;r<i;r+=1)if(e[r]&&e[r].qInfo.qId===t)return r;return-1}if(k(t,i))return r;if(!M(t[0])&&M(t[0].qInfo))return r.push({op:"replace",path:n,value:t}),r;for(var s=i.length-1;s>=0;s-=1)-1===(o=a(t,i[s].qInfo&&i[s].qInfo.qId,s))?(r.push({op:"remove",path:"".concat(n,"/").concat(s)}),i.splice(s,1)):r=r.concat(D.generate(i[s],t[o],"".concat(n,"/").concat(s)));for(var l=0,u=t.length;l<u;l+=1)-1===(o=a(i,t[l].qInfo&&t[l].qInfo.qId))?(r.push({op:"add",path:"".concat(n,"/").concat(l),value:t[l]}),i.splice(l,0,t[l])):o!==l&&(r.push({op:"move",path:"".concat(n,"/").concat(l),from:"".concat(n,"/").concat(o)}),i.splice(l,0,i.splice(o,1)[0]));return r}(a,o,s)):r.push({op:"replace",path:"".concat(n,"/").concat(i),value:o}))}),Object.keys(e).forEach(function(i){M(t[i])&&!L(e,i)&&r.push({op:"remove",path:"".concat(n,"/").concat(i)})}),r},D.apply=function(e,t){t.forEach(function(t){var n,r,i=A(e,t.path),o=t.path.split("/").splice(-1)[0],a=o&&Number.isNaN(+o)?i[o]:i[+o]||i,s=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(i=null,a=e),"add"===t.op||"replace"===t.op)if(R(i))"-"===o&&(o=i.length),i.splice(+o,"add"===t.op?0:1,t.value);else if(R(a)&&R(t.value)){var l,u=t.value.slice();a.length=0,(l=a).push.apply(l,function(e){if(Array.isArray(e))return C(e)}(r=u)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(e,t):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}else if(P(a)&&P(t.value))n=a,Object.keys(n).forEach(function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!L(n,e)&&delete n[e]}),I(a,t.value);else{if(!i)throw new Error("Patchee is not an object we can patch");i[o]=t.value}else if("move"===t.op){var c=A(e,t.from);R(i)?i.splice(+o,0,c.splice(+s,1)[0]):(i[o]=c[s],delete c[s])}else"remove"===t.op&&(R(i)?i.splice(+o,1):delete i[o])})},D.clone=function(e){return I({},e)},D.createPatch=function(e,t,n){var r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},D.updateObject=function(e,t){Object.keys(e).length?D.apply(e,D.generate(e,t)):I(e,t)};const O=D,q=function(e,n,r){if(!e)return Promise.resolve();var i=O.generate(n,r);return t()(!0,n,r),i&&i.length?(i=i.map(function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}}),e.applyPatches(i,!0)):Promise.resolve()};var T="accumulation";function N(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===T)return n[r]}function j(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===T)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var _={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""};const F={translationKey:"properties.modifier.accumulation",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=w.getNumDimensions({properties:r,layout:i}));var u=o(r,"qHyperCubeDef.qDimensions",[]),c=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:u,dimensionAndFieldList:s}),d=w.getNumStepComp(n,l),p=w.getAboveComp(n,l,c,d),f=w.getRangeComp("RangeSum",p);if(w.needDimension({modifier:n,properties:r,layout:i})){var h=w.getDimComp(u,1),m=w.getDimComp(u,0),g=w.getAggrComp(f,h,m);f=n.showExcludedValues?w.getExcludedComp({modifier:n,dimensions:u,dimensionAndFieldList:s,valueComp:g}):g}return f},extractInputExpression:w.extractInputExpression,initModifier:function(e){w.initModifier(e,_)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(j(t,e),".accumulationDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.accumulation.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(j(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.accumulation.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(j(t,e),".fullAccumulation")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(j(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=N(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=N(t,e);return n&&!n.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(j(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(T))return!1;var o=N(t,e);return o&&!o.disabled}};return n}};var z="movingAverage";function W(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===z)return n[r]}function $(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===z)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var H={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1};const V={translationKey:"properties.modifier.movingAverage",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,n=e.expression,r=e.modifier,i=e.properties,a=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!r)return n;var u=s;void 0===u&&(u=w.getNumDimensions({properties:i,layout:a}));var c=o(i,"qHyperCubeDef.qDimensions",[]),d=r.showExcludedValues&&r.nullSuppression,p=w.getExpressionWithExcludedComp({expression:n,modifier:r,dimensions:c,dimensionAndFieldList:l,treatMissingAsNull:d}),f=w.getNumStepComp(r,u),h=w.getAboveComp(r,u,p,f);if(r.nullSuppression)t=w.getRangeComp("RangeAvg",h);else{var m=w.getRangeComp("RangeSum",h),g=function(e,t){var n=w.getRowNoComp(e,t);if(!w.isFullRange(e)){var r=e.steps,i="number"!=typeof r||Number.isNaN(r)?6:r;return"RangeMin(".concat(i,", ").concat(n,")")}return n}(r,u);t="".concat(m," / ").concat(g)}var v=t;if(w.needDimension({modifier:r,properties:i,layout:a})){var y=w.getDimComp(c,1),b=w.getDimComp(c,0),x=w.getAggrComp(v,y,b);v=r.showExcludedValues?w.getExcludedComp({modifier:r,dimensions:c,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return v},extractInputExpression:w.extractInputExpression,initModifier:function(e){w.initModifier(e,H)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat($(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.movingAverage.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat($(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.movingAverage.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat($(t,e),".fullRange")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat($(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=W(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=W(t,e);return n&&!n.fullRange}},showExcludedValues:{refFn:function(t){return"".concat($(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat($(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(z))return!1;var o=W(t,e);return o&&!o.disabled}};return n}};var B="timeSeriesDecomposition";function G(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===B)return n[r]}function U(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===B)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var Y={type:"timeSeriesDecomposition",disabled:!1,decomposition:"",steps:2,outputExpression:""};const K={translationKey:"properties.modifier.timeSeriesDecomposition",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties;return n?w.generateTSDExpression(n,t,r):t},extractInputExpression:w.extractInputExpression,initModifier:function(e,t){w.initModifier(e,Y),""===e.decomposition&&t&&(e.decomposition=w.getDecomposition(t))},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.timeSeriesDecomposition||"properties.modifier.timeSeriesDecomposition",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{decomposition:{refFn:function(t){return"".concat(U(t,e),".decomposition")},type:"string",translation:t.modifierTrendDecompositionDecomposition||"properties.modifier.trendDecomposition.decomposition",component:"dropdown",schemaIgnore:!0,defaultValue:t.trendDecompositionParametersDecompositionObserved||"cao.trendDecomposition.parameters.decomposition.observed",options:a.OPTIONS},steps:{refFn:function(t){return"".concat(U(t,e),".steps")},type:"integer",translation:t.modifierTimeSeriesDecompositionPeriods||"properties.modifier.timeSeriesDecomposition.periods",schemaIgnore:!0,defaultValue:2,change:function(t,n){var r=G(t,e);if(r){var i=r.steps;r.steps="number"!=typeof i||Number.isNaN(i)?2:Math.abs(i),n.properties.qHyperCubeDef.qMeasures=n.properties.qHyperCubeDef.qMeasures.map(function(e){return e.qDef.modifiers.map(function(e){return"timeSeriesDecomposition"===e.type?e.steps=i:e.steps=e.steps,e}),e})}},show:function(t){var n=G(t,e);return n&&!n.fullRange}}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(B))return!1;var o=G(t,e);return o&&!o.disabled}};return n}};var X="difference";function J(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===X)return n[r]}function Z(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===X)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var Q={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""};const ee={translationKey:"properties.modifier.difference",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:w.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=w.getNumDimensions({properties:r,layout:i}));var u=o(r,"qHyperCubeDef.qDimensions",[]),c=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:u,dimensionAndFieldList:s}),d=w.getAboveComp(n,l,c),p="".concat(c," - ").concat(d);if(w.needDimension({modifier:n,properties:r,layout:i})){var f=w.getDimComp(u,1),h=w.getDimComp(u,0),m=w.getAggrComp(p,f,h);p=n.showExcludedValues?w.getExcludedComp({modifier:n,dimensions:u,dimensionAndFieldList:s,funcComp:"Only",valueComp:m}):m}return p},initModifier:function(e){Object.keys(Q).forEach(function(t){void 0===e[t]&&(e[t]=Q[t])})},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(Z(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.difference.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(Z(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.difference.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},showExcludedValues:{refFn:function(t){return"".concat(Z(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(X))return!1;var o=J(t,e);return o&&!o.disabled}};return n}};var te="normalization";function ne(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===te)return n[r]}function re(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===te)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}function ie(e,t){for(var n=0;n<e.length;n++)if(e[n].value===t)return n;return-1}var oe={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:2,selectionScope:2};function ae(e){return 2===e?"{1}":""}function se(e,t,n){return 1===e?"{$<".concat(w.getFieldWithWrapper(t),"={'").concat(n,"'}>}"):""}function le(e,t){return 0===e&&t>1||2===e?"Total":""}function ue(e,t,n){return 0===e&&t>1?"<".concat(w.getDimDefWithWrapper(n),">"):""}const ce={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:w.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=w.getNumDimensions({properties:r,layout:i}));var u=o(r,"qHyperCubeDef.qDimensions",[]),c=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:u,dimensionAndFieldList:s}),d=n.selectionScope,p=n.dimensionalScope;return function(e,t,n,r,i,o,a){var s=ae(t),l=se(t,n,r),u=""===s&&""===l?"":s||l,c=le(i,o),d=ue(i,o,a),p=function(e){for(var t=[],n=0;n<e;n++)t[n]=w.getDimDefWithWrapper(n);return t.join(", ")}(o);return"".concat(e,"/ Sum(").concat(u," ").concat(c).concat(d," Aggr(").concat(u," ").concat(e,", ").concat(p,"))")}(c,d,n.field,n.value,p,l,n.primaryDimension)},initModifier:function(e){Object.keys(oe).forEach(function(t){void 0===e[t]&&(e[t]=oe[t])})},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(re(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,options:function(n){return function(e,t,n){var r=[{value:0,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:1,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:2,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return r=function(e,t){if(1===e){var n=ie(t,0);t.splice(n,1)}return t}(ne(e,n).dimensionalScope,r),r}(n,t,e)}},field:{refFn:function(t){return"".concat(re(t,e),".field")},type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:function(e,t,n){return n.app.getFieldList().then(function(e){return e.map(function(e){return{label:e.qName,value:e.qName}})})},show:function(t){return 1===ne(t,e).selectionScope}},value:{refFn:function(t){return"".concat(re(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return 1===ne(t,e).selectionScope}},dimensionalScope:{refFn:function(t){return"".concat(re(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,supportTooltip:!0,options:function(n,r){return function(e,t,n,r){var i=t.layout.qHyperCube.qDimensionInfo.length,o=[{value:0,translation:n.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:n.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:1,translation:n.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension"),tooltipTranslation:n.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension",".tooltip")},{value:2,translation:n.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:n.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension",".tooltip")}];return o=function(e,t){if(e<2){var n=ie(t,0);t.splice(n,1)}return t}(i,o),o=function(e,t){if(0===e){var n=ie(t,1);t.splice(n,1)}return t}(ne(e,r).selectionScope,o),o}(n,r,t,e)}},primaryDimension:{refFn:function(t){return"".concat(re(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.normalization.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(t,n){return 0===(ne(t,e).dimensionalScope||0)&&n.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(te))return!1;var o=ne(t,e);return o&&!o.disabled}};return n},getDisregardSelectionComp:ae,getFieldSelectionComp:se,getTotalComp:le,getSelectedDimComp:ue};var de="qDef.base",pe="qDef.qDef",fe="qDef.base.qDef",he="qLibraryId",me="qDef.base.qLibraryId";const ge={getExpression:function(e){var t=o(e,fe);return void 0!==t?t:o(e,pe)},getExpressionRef:function(e){return void 0!==o(e,fe)?fe:pe},getLibraryIdRef:function(e){return o(e,me)?me:he},getLibraryId:function(e){return o(e,me)||o(e,he)},getLabelRef:function(e){return o(e,de)?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return o(e,de)?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}};var ve="qDef.qDef",ye="qDef.base.qDef",be="qLibraryId",xe="qDef.base.qLibraryId",Se="qDef.qLabel",we="qDef.qLabelExpression",Ce="qDef.base.qLabel",Ee="qDef.base.qLabelExpression",Ie="qDef.qAggrFunc",De="qDef.base.qAggrFunc",Re={initBase:function(e,t){(t||Re.isValid(e))&&(n(e,ye,o(e,ve)),n(e,xe,o(e,be)),n(e,Ce,o(e,Se)),n(e,Ee,o(e,we)))},restoreBase:function(e){Re.isValid(e)&&(n(e,ve,o(e,ye)),n(e,be,o(e,xe)),n(e,Se,o(e,Ce)),n(e,we,o(e,Ee)),o(e,Ie)&&o(e,De)&&n(e,Ie,o(e,De)),delete e.qDef.base)},isValid:function(e){var t=o(e,ye),n=o(e,xe);return void 0!==t||void 0!==n}};const Pe=Re;function Me(e){return Me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Me(e)}var Le={accumulation:F,movingAverage:V,difference:ee,normalization:ce,timeSeriesDecomposition:K};const Ae={modifiers:Le,apply:Oe,applyModifiers:qe,cleanUpMeasure:Te,destroy:function(e){e&&ke[e.id]&&ke[e.id].masterItemSubscriber&&(ke[e.id].masterItemSubscriber&&ke[e.id].masterItemSubscriber.unsubscribe(),delete ke[e.id])},hasActiveModifiers:Ne,getActiveModifier:je,initBase:Pe.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some(function(e){return Le[e]})},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some(function(e){return Le[e]&&Le[e].isApplicable({properties:n,layout:r})})},measureBase:ge,limitedSorting:function(e){var t=e.measures,n=e.properties,r=e.layout,i=!1,o=!1;return t.forEach(function(e){var t=ze(e);Ue({modifiers:t,properties:n,layout:r})&&(i=!0,o=o||Ze({modifiers:t,properties:n,layout:r}))}),i&&!o},ifEnableTotalsFunction:_e};var ke={};function Oe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.model,r=e.properties,i=e.isSnapshot,a=void 0!==i&&i,s=e.masterItem,l=!1;ke[n.id]=ke[n.id]||{isFirstTime:!0};var u=ke[n.id].isFirstTime;if(ke[n.id].isFirstTime=!1,r&&"object"===Me(r))return qe({model:n,properties:r});var c=n?n.layout:void 0,d=o(c,"qSelectionInfo.qInSelections");if(a||d)return Promise.resolve(l);var p=o(c,"qHyperCube.qMeasureInfo"),f=ke[n.id].lastReloadTime;if(ke[n.id].lastReloadTime=o(n,"app.layout.qLastReloadTime"),Ne({measures:p,layout:c})){var h=function(e){var t=e.measures,n=e.layout,r=e.lastReloadTime;return o(e.model,"app.layout.qLastReloadTime")!==r&&function(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some(function(e){return Ge({measure:e,properties:n,layout:r})})}({measures:t,layout:n})}({measures:p,layout:c,model:n,lastReloadTime:f});return h||function(e){var t=e.measures,n=e.layout,r=e.masterItem,i=e.isFirstTime;return!!Array.isArray(t)&&(i||r||t.some(function(e){return function(e){var t=e.measure,n=e.layout;return Ue({modifiers:ze(t),layout:n})?!t.base:!!t.base}({measure:e,layout:n})}))}({measures:p,layout:c,masterItem:s,isFirstTime:u})?n.getEffectiveProperties().then(function(e){var r=t()(!0,{},e);$e(r);var i=Qe(r);return Ye({model:n}).then(function(t){return Ke({libraryIds:i,model:n}).then(function(i){return h&&function(e){var t=e.properties;Fe(t).forEach(function(e){return function(e){var t=e.measure;if(Ge({measure:t,properties:e.properties})){var n=0,r=t.qDef.modifiers;Array.isArray(r)&&r.forEach(function(e){if("object"===Me(e)&&!e.disabled){if(n++,"object"!==Me(Le[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(n>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var r=Le[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==r&&Ve(t)&&w.simplifyExpression(t.qDef.base.qDef)!==w.simplifyExpression(r)&&(t.qDef.base.qDef=r)}})}}({measure:e,properties:t})})}({properties:r}),qe({model:n,oldProperties:e,properties:r,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:i,dimensionAndFieldList:t})})})}):Promise.resolve(l)}return function(e){return!!Array.isArray(e)&&e.some(function(e){return"object"===Me(e.base)})}(p)?n.getEffectiveProperties().then(function(e){return function(e){var n=e.model,r=e.properties,i=Qe(r);return et({model:n,libraryIds:i}).then(function(){var e=t()(!0,{},r);return Fe(r).forEach(function(e){return Te(e)}),Je({oldProperties:e,newProperties:r,model:n})})}({model:n,properties:e})}):Promise.resolve(l)}function qe(e){var n=e.model,r=e.oldProperties,i=e.properties,a=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,u=e.masterItem,c=e.libraryItemsProps,d=e.dimensionAndFieldList;void 0===r&&(r=l?t()(!0,{},i):i),$e(i);var p=Qe(i);return et({model:n,libraryIds:p,masterItem:u}).then(function(){return function(e){var n=e.measures,r=e.properties,i=e.model,a=e.libraryItemsProps,s=e.dimensionAndFieldList;if(n||(n=Fe(r)),!n.length)return Promise.resolve();if(!Ne({measures:n,properties:r}))return n.forEach(function(e){return Te(e)}),Promise.resolve();var l=a?void 0:Qe(r);return Ye({model:i,dimensionAndFieldList:s}).then(function(e){return Ke({libraryIds:l,model:i,libraryItemsProps:a}).then(function(i){n.forEach(function(n){Ue({modifiers:n.qDef.modifiers,properties:r})?(function(e){var n=e.measure,r=e.properties,i=e.libraryItemsProps,a=e.dimensionAndFieldList,s=0;Pe.isValid(n)||Pe.initBase(n,!0);var l=n.qDef,u=l.modifiers,c=l.base;Array.isArray(u)&&u.forEach(function(e){if("object"===Me(e)&&!e.disabled){if(s++,"object"!==Me(Le[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(s>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");Le[e.type].initModifier(e,n);var l=n.qLibraryId||c&&c.qLibraryId;l?function(e){var n=e.measure,r=e.modifier,i=e.properties,o=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=""===s?s:Le[r.type].generateExpression({expression:s,modifier:r,properties:i,dimensionAndFieldList:o});r.outputExpression=l,n.qDef.qDef=r.outputExpression,(n.qDef.qLabel||a.qMeasure.qLabel)&&(n.qDef.qLabel=a.qMeasure.qLabel),(n.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(n.qDef.qLabelExpression=a.qMeasure.qLabelExpression),n.qDef.quarantine&&n.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(n.qDef.qNumFormat=a.qMeasure.qNumFormat,n.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete n.qLibraryId,n.qDef.coloring=a.qMeasure.coloring,r.base=t()(!0,{},n.qDef.base)}({measure:n,modifier:e,libraryId:l,properties:r,libraryItemsProps:i,dimensionAndFieldList:a}):function(e){var n=e.measure,r=e.modifier,i=e.properties,o=e.dimensionAndFieldList;"function"==typeof Le[r.type].updateModifier&&Le[r.type].updateModifier(r,i.qHyperCubeDef);var a=ge.getExpression(n),s=""===a?a:Le[r.type].generateExpression({expression:a,modifier:r,properties:i,dimensionAndFieldList:o});r.outputExpression=s,n.qDef.qDef=r.outputExpression,n.qDef.base.qLabelExpression?n.qDef.qLabelExpression=n.qDef.base.qLabelExpression:n.qDef.qLabel=n.qDef.base.qLabel||a,r.base=t()(!0,{},n.qDef.base)}({measure:n,modifier:e,properties:r,dimensionAndFieldList:a}),function(e){var t=o(e,"qDef.qAggrFunc");"Expr"!==t||_e(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&_e(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(n)}})}({measure:n,properties:r,libraryItemsProps:i,dimensionAndFieldList:e}),He(n)):Te(n)})})})}({measures:a,properties:i,model:n,libraryItemsProps:c,dimensionAndFieldList:d}).then(function(){return l?Je({oldProperties:r,newProperties:i,model:n}):Promise.resolve(!1)})})}function Te(e){!function(e){var t=ze(e);return Array.isArray(t)&&t.some(function(e){return"object"===Me(e)&&!e.disabled&&!Le[e.type]})}(e)?Pe.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,He(e)}function Ne(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some(function(e){return Ue({modifiers:ze(e),properties:n,layout:r})})}function je(e){var t=ze(e);if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];if(Le[r.type]&&!r.disabled)return r}}function _e(e){var t=je(e);return!t||Le[t.type].enableTotalsFunction(e)}function Fe(e){return o(e,"qHyperCubeDef.qMeasures",[]).concat(o(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function ze(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function We(e){return o(e,"outputExpression.qValueExpression.qExpr")||o(e,"outputExpression")}function $e(e){Fe(e).forEach(function(e){return function(e){var n=je(e);n&&(void 0!==n.outputExpression&&We(n)!==e.qDef.qDef?delete e.qDef.base:!Pe.isValid(e)&&n.base&&(e.qDef.base=t()(!0,{},n.base)))}(e)})}function He(e){var t=ze(e);Array.isArray(t)&&t.forEach(function(t){"object"===Me(t)&&(t.disabled||!Le[t.type]&&We(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)})}function Ve(e){return e.base||e.qDef&&e.qDef.base}function Be(e){var t=Ve(e);return e.qLibraryId||t&&t.qLibraryId}function Ge(e){var t=e.measure,n=e.properties,r=e.layout;return!Be(t)&&Ue({modifiers:ze(t),properties:n,layout:r})}function Ue(e){var t=e.modifiers,n=e.properties,r=e.layout,i={};return Array.isArray(t)&&t.some(function(e){return!("object"!==Me(e)||e.disabled||!Le[e.type])&&(void 0===i[e.type]&&(i[e.type]=Le[e.type].isApplicable({properties:n,layout:r})),i[e.type])})}function Ye(e){var t=e.model,n=e.dimensionAndFieldList;if(n)return Promise.resolve(n);var r=[],i={},o=t.app.getDimensionList().then(function(e){i.dimensionList=e});r.push(o);var a=t.app.getFieldList().then(function(e){i.fieldList=e});return r.push(a),Promise.all(r).then(function(){return i})}function Ke(e){var t=e.libraryIds,n=e.model,r=e.libraryItemsProps;if(r)return Promise.resolve(r);var i=t.measureLibraryIds,o=t.dimensionLibraryIds,a={},s=[];return i.forEach(function(e){var t=n.app.getMeasure(e).then(function(t){return t.getProperties().then(function(t){a[e]=t})});s.push(t)}),o.forEach(function(e){var t=n.app.getDimension(e).then(function(t){return t.getProperties().then(function(t){a[e]=t})});s.push(t)}),Promise.all(s).then(function(){return a})}function Xe(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Je(e){var t=e.oldProperties,n=e.newProperties,r=e.model,i=JSON.stringify(o(t,"qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(o(n,"qHyperCubeDef.qMeasures"),Xe)||JSON.stringify(o(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(o(n,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe);return i?function(e){var t=e.model,n=e.oldProperties,r=e.newProperties,i=t.layout;return i&&!i.qHasSoftPatches&&!i.qExtendsId&&o(i,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(r):q(t,n,r)}({model:r,oldProperties:t,newProperties:n}).then(function(){return i}):Promise.resolve(i)}function Ze(e){var t=e.modifiers,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some(function(e){return"object"===Me(e)&&!e.disabled&&Le[e.type]&&Le[e.type].needDimension({modifier:e,properties:n,layout:r})})}function Qe(e){var t=Fe(e),n=[],r=[],i=!1;return t.forEach(function(t){var r=ze(t);if(Ue({modifiers:r,properties:e})){var o=Be(t);o&&n.push(o),i=i||Ze({modifiers:r,properties:e})}}),o(e,"qHyperCubeDef.qDimensions",[]).forEach(function(e){var t=e.qLibraryId;t&&r.push(t)}),{measureLibraryIds:n,dimensionLibraryIds:r}}function et(e){var t=e.model,n=e.libraryIds;return!e.masterItem&&n&&(n.measureLibraryIds.length||n.dimensionLibraryIds.length)?(ke[t.id].masterItemSubscriber=ke[t.id].masterItemSubscriber||function(e){var t=e.model,n=e.callback,r={},i={},a={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},n=o(e,"qInfo.qType");return n&&s[n]&&s[n].forEach(function(n){t[n]=o(e,n)}),JSON.stringify(t)}function u(e){var t=e.qInfo.qId;if(r[t]){var i=l(e);r[t].properties!==i&&(r[t].properties=i,"function"==typeof n&&r[t].enabled&&n(e)),r[t].enabled=!0}}function c(e,n){return t.app[n](e).then(function(t){r[e]={listener:t.layoutSubscribe(u),enabled:!1,properties:l(t.layout)}})}return{subscribe:function(e){var n=e.measureLibraryIds,o=e.dimensionLibraryIds,s=[];return function(e){var t=e.dimensionLibraryIds;i={},e.measureLibraryIds.forEach(function(e){i[e]=!0}),a={},t.forEach(function(e){a[e]=!0})}({measureLibraryIds:n,dimensionLibraryIds:o}),Object.keys(r).forEach(function(e){i[e]||a[e]||(r[e].listener.dispose(),delete r[e])}),t.app&&(Object.keys(i).forEach(function(e){i[e]&&!r[e]&&s.push(c(e,"getMeasure"))}),Object.keys(a).forEach(function(e){a[e]&&!r[e]&&s.push(c(e,"getDimension"))})),Promise.all(s)},unsubscribe:function(){Object.keys(r).forEach(function(e){r[e].listener.dispose()}),r={}}}}({model:t,callback:function(e){return Oe({model:t,masterItem:e}).then(function(){return t.app.clearUndoBuffer()})}}),ke[t.id].masterItemSubscriber.subscribe(n)):Promise.resolve()}})(),t.default=i.default,Object.defineProperty(t,"__esModule",{value:!0})})()}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var r={};return(()=>{function e(t){var n,r=t;return r>9?(n=65+r-10)>90&&(n+=6):r="".concat(r).charCodeAt(0),[48,111,79,105,73,108].indexOf(n)>-1?e(r+1):String.fromCharCode(n)}function t(n){var r=e(n%62),i=Math.floor(n/62);return i>0?t(i)+r:r}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}n.d(r,{default:()=>$e});const o={getValue:function(e,t,n){if(null==e||null==t)return n;for(var r=t.split("."),i=e,o=0;o<r.length;++o){var a=r[o];if(""!==a){if(void 0===i[a]||null===i[a])return n;i=i[a]}}return i},setValue:function(e,t,n){if(null!=e&&null!=t){for(var r=t.split("."),i=r[r.length-1],o=e,a=0;a<r.length-1;++a){var s=r[a];void 0!==o[s]&&null!==o[s]||(o[s]=Number.isNaN(+r[a+1])?{}:[]),o=o[s]}void 0!==n?o[i]=n:delete o[i]}},isEmpty:function(e){return 0===Object.keys(e).length&&e.constructor===Object},isAtomicValue:function(e){return/boolean|number|string/.test(i(e))},generateId:function(){return t(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function a(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return r;return-1}return-1}const d={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;var n=e.indexOf(t[0]);if(-1!==n){for(var r=0;r<t.length;r++){var i=e.indexOf(t[r]);if(n>i)return!1;n=i}return!0}return!1},indexAdded:function(e,t){var n;for(n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)},indexRemoved:function(e,t){var n,r=0;for(n=0;n<e.length;++n)e[n]>t?--e[n]:e[n]===t&&(r=n);return e.splice(r,1),r},findItemByPropertyValue:function(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return e[r];return null}return null},findIndexByPropertyValue:c};var p=n(8),f=n.n(p);const h=function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,i=n.data[0];(t=i.dimensions).push.apply(t,a(r.qDimensions));var s,l=o.getValue(r,"qLayoutExclude.qHyperCubeDef.qDimensions");l&&(s=i.excludedDimensions).push.apply(s,a(l))},m=function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,i=n.data[0];(t=i.measures).push.apply(t,l(r.qMeasures));var a,s=o.getValue(r,"qLayoutExclude.qHyperCubeDef.qMeasures");s&&(a=i.excludedMeasures).push.apply(a,l(s))},g=function(e){var t=e.exportFormat,n=e.qHyperCubeDef,r=t.data[0];n.qInterColumnSortOrder||(n.qInterColumnSortOrder=[]),r.interColumnSortOrder=n.qInterColumnSortOrder.concat();var i=o.getValue(n,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");i&&d.isOrderedSubset(i,r.interColumnSortOrder)&&(r.interColumnSortOrder=i.concat())},v=function(e){var t=e.exportFormat,n=e.properties;Object.keys(n).forEach(function(e){t.properties[e]=n[e]})},y=function(e){var t=e.exportFormat,n=e.properties;n.qLayoutExclude||(n.qLayoutExclude={}),n.qLayoutExclude.disabled&&(Object.keys(n.qLayoutExclude.disabled).forEach(function(e){t.properties.hasOwnProperty(e)||(t.properties[e]=n.qLayoutExclude.disabled[e])}),delete n.qLayoutExclude.disabled),n.qLayoutExclude.changed&&(function(e){Object.keys(e.qLayoutExclude.changed).forEach(function(t){e.qLayoutExclude.changed[t].to===o.getValue(e,t)&&o.setValue(e,t,e.qLayoutExclude.changed[t].from)})}(n),delete n.qLayoutExclude.changed),n.qLayoutExclude.quarantine&&!o.isEmpty(n.qLayoutExclude.quarantine)||delete n.qLayoutExclude},b=function(e){e.forEach(function(e){f().cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)})};function x(e,t,n){var r,i,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=o.getValue(e,t);if(!o.isAtomicValue(s))try{if((i=(i=(r=JSON.stringify(s)).match(/:\{/g))?i.length:0)>2&&!a)return;s=JSON.parse(r)}catch(e){return}o.getValue(e,"qLayoutExclude.quarantine")||o.setValue(e,"qLayoutExclude.quarantine",{});var l=o.getValue(e,"qLayoutExclude.quarantine");l[n]||(l[n]={}),l[n][t]=s}var S=n(909),w=n.n(S);function C(e,t){var n=w()(!0,{},t,e);return o.getValue(n,"qOtherTotalSpec.qOtherCounted")||o.setValue(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),o.getValue(n,"qOtherTotalSpec.qOtherLimit")||o.setValue(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel="Others"),n}function E(e,t){return w()(!0,{},t,e)}function I(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}var D=Math.pow(2,53)-1;function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const M=function(e,t,n){var r="masterobject"===o.getValue(t,"properties.qInfo.qType")?"masterobject":o.getValue(n,"qInfo.qType");o.setValue(e,"qInfo.qType",r),e.visualization=n.visualization},L=function(e,t,n){t.hasOwnProperty(e)&&(n[e]=t[e])},A=function(e,t,n,r){t.hasOwnProperty(e)?n[e]=t[e]:n[e]=r},k=function(){return{qDef:{autoSort:!0,cId:"",othersLabel:"Others"},qLibraryId:"",qNullSuppression:!1,qOtherLabel:"Others",qOtherTotalSpec:{qOtherLimitMode:"OTHER_GE_LIMIT",qOtherMode:"OTHER_OFF",qOtherSortMode:"OTHER_SORT_DESCENDING",qSuppressOther:!1}}},O=function(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}},q=function(e){var t,n=e.exportFormat,r=e.maxDimensions,i=e.minDimensions,o=e.newHyperCubeDef,a=e.defaultDimension,s=n.data[0];for(t=0;t<s.dimensions.length;++t){var l=C(s.dimensions[t],a);o.qDimensions.length<r?o.qDimensions.push(l):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(l)}for(t=0;t<s.excludedDimensions.length;++t){var u=C(s.excludedDimensions[t],a);o.qDimensions.length<i?o.qDimensions.push(u):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(u)}},T=function(e){var t,n=e.exportFormat,r=e.maxMeasures,i=e.minMeasures,o=e.newHyperCubeDef,a=e.defaultMeasure,s=n.data[0];for(t=0;t<s.measures.length;++t){var l=E(s.measures[t],a);o.qMeasures.length<r?o.qMeasures.push(l):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(l)}for(t=0;t<s.excludedMeasures.length;++t){var u=E(s.excludedMeasures[t],a);o.qMeasures.length<i?o.qMeasures.push(u):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(u)}},N=function(e){var t=e.exportFormat,n=e.dataDefinition,r=void 0===n?{}:n,i=t.data[0],o=r.dimensions||{max:0},a=r.measures||{max:0},s=I(a.max,i.dimensions.length,D),l=I(a.min,i.dimensions.length,0);return{maxDimensions:I(o.max,s,D),minDimensions:I(o.min,l,0),maxMeasures:s,minMeasures:l}},j=function(e){var t=e.exportFormat,n=e.newHyperCubeDef,r=t.data[0],i=n.qDimensions.length+n.qMeasures.length;n.qInterColumnSortOrder=r.interColumnSortOrder.concat();var o=n.qInterColumnSortOrder.length;if(o!==i)for(n.qLayoutExclude&&(n.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=r.interColumnSortOrder.concat());o!==i;)o<i?(d.indexAdded(n.qInterColumnSortOrder,o),++o):(--o,d.indexRemoved(n.qInterColumnSortOrder,o))},_=function(e){var t=e.exportFormat,n=e.initialProperties,r=e.hypercubePath,i={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach(function(e){"qLayoutExclude"===e?t.properties[e].quarantine&&(i.qLayoutExclude.quarantine=w()(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&r?o.setValue(i,"".concat(r,".qHyperCubeDef"),t.properties.qHyperCubeDef):n.hasOwnProperty(e)||-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)||function(e,t){return"components"===t&&Array.isArray(e[t])&&e[t].some(function(e){return"general"===e.key})}(t.properties,e)?i[e]=t.properties[e]:i.qLayoutExclude.disabled[e]=t.properties[e]}),null===(i=w()(!0,{},n,i)).components&&(i.components=[]),i},F=function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=t.data[0];return a.dimensions.length>n&&n>0||a.measures.length>i&&i>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>r||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>o||!i&&a.measures.length>0||!n&&a.dimensions.length>0},z=function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=e.newHyperCubeDef,s=t.data[0];a.qLayoutExclude||(a.qLayoutExclude={}),a.qLayoutExclude.qHyperCubeDef||(a.qLayoutExclude.qHyperCubeDef={}),(s.dimensions.length>n&&n>0||s.excludedDimensions&&s.excludedDimensions.length&&s.dimensions.length+s.excludedDimensions.length>r)&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(s.measures.length>i&&i>0||s.excludedMeasures&&s.excludedMeasures.length&&s.measures.length+s.excludedMeasures.length>o)&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!i&&s.measures.length&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!n&&s.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))},W=function(e){var t,n=e.newProperties,r=e.dataDefinition,i=e.hypercubePath;if(r.dimensions&&"function"==typeof r.dimensions.added){var a=o.getValue(n,i||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return R(e)}(t=a.qDimensions)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return R(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?R(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();a.qDimensions=[],s.forEach(function(e){a.qDimensions.push(e),r.dimensions.added(e,n)})}},$=function(e){var t,n=e.newProperties,r=e.dataDefinition,i=e.hypercubePath;if(r.measures&&"function"==typeof r.measures.added){var a=o.getValue(n,i||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return P(e)}(t=a.qMeasures)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return P(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?P(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();a.qMeasures=[],s.forEach(function(e){a.qMeasures.push(e),r.measures.added(e,n)})}},H=function(e){var t=e.measures,n=e.modifierTypes;t&&n&&f().isSupportedModifiers(n)&&t.forEach(function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store})};function V(e,t){var n=o.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!n&&(Object.keys(n).forEach(function(t){o.setValue(e,t,n[t])}),delete e.qLayoutExclude.quarantine[t],!0)}const B={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t={data:[],properties:{}},n=0;n<e;++n)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}(),a=t.qProperty,s=o.getValue(a,n||""),l=s.qHyperCubeDef;return l.qInterColumnSortOrder||(l.qInterColumnSortOrder=[]),h({exportFormat:i,qHyperCubeDef:l}),m({exportFormat:i,qHyperCubeDef:l}),g({exportFormat:i,qHyperCubeDef:l}),delete l.qLayoutExclude,v({exportFormat:i,properties:a}),n&&(i.properties.qHyperCubeDef=l,delete s.qHyperCubeDef),y({exportFormat:i,properties:a}),r||b(i.properties.qHyperCubeDef.qMeasures),Array.isArray(i.properties.filters)&&(x(i.properties,"filters","storedFilters",!0),delete i.properties.filters),i.properties.qHyperCubeDef.qContextSetExpression&&(x(i.properties,"qHyperCubeDef.qContextSetExpression","storedFilters"),i.properties.qHyperCubeDef.qContextSetExpression=""),i.properties.qHyperCubeDef.qDynamicScript&&i.properties.qHyperCubeDef.qDynamicScript.length&&(x(i.properties,"qHyperCubeDef.qDynamicScript","dynamicScript"),i.properties.qHyperCubeDef.qDynamicScript=[]),i},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=void 0===n?{}:n,i=e.dataDefinition,a=void 0===i?{}:i,s=e.defaultPropertyValues,l=void 0===s?{}:s,u=e.hypercubePath,c=e.extension,d=e.supportedFilters,p=void 0===d||d,f=e.isHCModifierSupported,h=void 0===f||f,m={qChildren:[]},g=_({exportFormat:t,initialProperties:r,hypercubePath:u}),v=o.getValue(r,u||"").qHyperCubeDef,y=o.getValue(g,u||"").qHyperCubeDef,b=N({exportFormat:t,dataDefinition:a}),x=b.maxDimensions,S=b.minDimensions,w=b.maxMeasures,C=b.minMeasures,E=l.defaultDimension,I=void 0===E?k():E,D=l.defaultMeasure,R=void 0===D?O():D;y.qDimensions.length=0,y.qMeasures.length=0,F({exportFormat:t,maxDimensions:x,minDimensions:S,maxMeasures:w,minMeasures:C})&&z({exportFormat:t,maxDimensions:x,minDimensions:S,maxMeasures:w,minMeasures:C,newHyperCubeDef:y}),q({exportFormat:t,maxDimensions:x,minDimensions:S,newHyperCubeDef:y,defaultDimension:I}),T({exportFormat:t,maxMeasures:w,minMeasures:C,newHyperCubeDef:y,defaultMeasure:R}),W({newProperties:g,dataDefinition:a,hypercubePath:u}),$({newProperties:g,dataDefinition:a,hypercubePath:u}),j({exportFormat:t,newHyperCubeDef:y}),L("qMaxStackedCells",v,y),L("qNoOfLeftDims",v,y),A("qInitialDataFetch",v,y,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),A("qMode",v,y,"S"),A("qReductionMode",v,y,"N"),A("qSortbyYValue",v,y),A("qIndentMode",v,y),A("qShowTotalsAbove",v,y),M(g,t,r),m.qProperty=g;var P=o.getValue(c||{},"support.modifiers");return H({measures:y.qMeasures,modifierTypes:P}),p&&V(m.qProperty,"storedFilters"),"S"===y.qMode&&h&&V(m.qProperty,"dynamicScript"),m}};var G={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function U(e,t,n,r){t=t||[];var i=c(e,r,n),o=c(t,r,n);if(-1!==i&&-1===o){var a=e.splice(i,1);t.push(a[0])}return t}function Y(e,t){return e.length!==t}const K={create:function(e,t){if(!e||!G[e])throw new Error("Attribute Expressions Util: ID required");var n={};return t&&Object.keys(t).forEach(function(e){n[e]=t[e]}),n.id=e,n.qAttribute=!0,n},moveByIdFromGroup:function(e,t,n,r,i){n=n||"qAttributeExpressions",i=i||"id";for(var o=0;o<e.length;o++){var a=e[o][n],s=t.length;if(U(a,t,r,i),Y(t,s))return t}return t},IDMAP:{CELL_BACKGROUND_COLOR:"cellBackgroundColor",CELL_FOREGROUND_COLOR:"cellForegroundColor",COLOR_BY_ALTERNATIVE:"colorByAlternative",COLOR_BY_EXPRESSION:"colorByExpression",TOOLTIP:"tooltip",CELL_LINK_LABEL:"urlLabel",CELL_LINK_URL:"url"}},X={getNumDimensions:function(e){return o.getValue(e,"qHyperCubeDef.qDimensions.length",0)},getNumMeasures:function(e){return o.getValue(e,"qHyperCubeDef.qMeasures.length",0)},wrapFieldName:function(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e},getItemLabel:function(e){return e.label||e.name}},J={colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>0&&X.getNumMeasures(e)<=1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)>0},expression:function(e){return X.getNumMeasures(e)>=1}}},Z={colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumMeasures(e)>=1}}};var Q={scatterplot:Z,"sn-scatter-plot":Z,piechart:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumMeasures(e)>=1}}},linechart:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)<=1},expression:function(e){return X.getNumMeasures(e)>=1}}},map:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>=1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)>=1},expression:function(e){return X.getNumDimensions(e)>=1}}},distributionplot:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumDimensions(e)>=1}}}};function ee(e,t,n){if(Array.isArray(e[t])){var r=d.findIndexByPropertyValue(e[t],"id",n);r>=0&&e[t].splice(r,1)}else e[t]=[]}function te(e,t){var n=K.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach(function(e){ee(e,"qAttributeDimensions",n),ee(e,"qAttributeExpressions",n)}),t.forEach(function(e){ee(e,"qAttributeDimensions",n),ee(e,"qAttributeExpressions",n)})}function ne(e,t){if(t){var n="="===t.charAt(0);e.color.altLabel=n?{qStringExpression:{qExpr:t.substr(1)}}:t}}function re(e){var t=e.properties,n=e.isDimension,r=e.dimensions,i=e.excludedDimensions,a=e.measures,s=e.label;te(r,i);var l=r[r.length-1];if(l){var u=n?o.getValue(t,"color.byDimDef"):o.getValue(t,"color.byMeasureDef"),c=o.getValue(t,"color.formatting.qNumFormat"),p=o.getValue(t,"color.formatting.isCustomFormatted");if(u){var f=K.create(K.IDMAP.COLOR_BY_ALTERNATIVE);switch(u.type){case"expression":!function(e){var t=e.attributeExpression,n=e.label,r=e.item,i=e.isDimension,o=e.qNumFormat,a=e.isCustomFormatted;t.label=n||r.label,i?t.qDef=r.key:(t.qExpression=r.key,o&&(t.qNumFormat=o,t.isCustomFormatted=a)),t.matchMeasure=r.activeMeasureIndex,t.label&&"="===t.label.charAt(0)&&(t.labelExpRef="color.altLabel")}({attributeExpression:f,label:s,item:u,isDimension:n,qNumFormat:c,isCustomFormatted:p});break;case"libraryItem":!function(e){var t=e.attributeExpression,n=e.measures,r=e.item,i=e.qNumFormat,o=e.isCustomFormatted;e.isDimension||(t.matchMeasure=d.findIndexByPropertyValue(n,"qLibraryId",r.key),i&&(t.qNumFormat=i,t.isCustomFormatted=o)),void 0!==r.expression?t.qExpression=r.expression:t.qLibraryId=r.key,t.colorMapRef=r.key}({attributeExpression:f,measures:a,item:u,isDimension:n,qNumFormat:c,isCustomFormatted:p})}n?(f.qSortBy={qSortByAscii:1},l.qAttributeDimensions.push(f)):l.qAttributeExpressions.push(f)}}}function ie(e,t,n,r){var i,o,a,s={};switch(e){case"dimension":n.qLibraryId?(s.type="dimension",s.name=n.qLibraryId,s.id=n.qLibraryId):(s.type="field",t?(s.name=n.label||n.qDef,s.id=n.qDef):(s.name=n.qDef.qFieldDefs[0],s.label=(a=n.qDef).qLabelExpression?a.qLabelExpression:a.qFieldLabels&&a.qFieldLabels[0]?a.qFieldLabels[0]:a.qFieldDefs[0]));break;case"measure":i=function(e,t){return t?e.qLibraryId:f().measureBase.getLibraryId(e)}(n,t),i?(s.type="measure",s.name=i,s.id=i,o=function(e,t){return f().hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}(n,r),o&&(s.expression=o)):(s.type="expression",t?(s.name=n.label||n.qExpression,s.id=n.qExpression):(s.name=n.qDef.qDef,s.label=function(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qLabel?t.qLabel:t.qDef}(n)));break;default:throw new Error('columnType should be "dimension" or "measure"')}return s}const oe={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}};function ae(e,t,n,r){var i=t.type,o=e.color,a=o.mode,s=X.getItemLabel(t);switch(ne(e,s||""),i){case"field":a="byDimension",o.byDimDef={label:t.label||X.wrapFieldName(t.name),key:X.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":a="byMeasure",o.byMeasureDef={label:s,key:t.name,type:"expression",activeMeasureIndex:t.activeMeasureIndex};break;case"dimension":a="byDimension",o.byDimDef={label:t.name,key:t.id,type:"libraryItem",activeDimensionIndex:t.activeDimensionIndex};break;case"measure":a="byMeasure",o.byMeasureDef={label:t.name,key:t.id,expression:t.expression,type:"libraryItem",activeMeasureIndex:t.activeMeasureIndex},o.formatting&&oe.useMasterNumberFormat(o.formatting)}o.auto=!1,o.mode=a}function se(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byDimDef");if(a&&ne(e,a.label),function(e){return!!(e&&e.activeDimensionIndex>-1)}(a))!function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"color.byDimDef");r.activeDimensionIndex=Math.min(r.activeDimensionIndex,n.length-1);var i=ie("dimension",!1,n[r.activeDimensionIndex]);i.activeDimensionIndex=r.activeDimensionIndex,ae(e,i)}(e,t);else if(function(e){return!e||!e.key}(a)&&function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=n[function(e,t,n){var r=o.getValue(t,"visualization"),i=n.split("."),a=Number(i[1]),s=o.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===r&&"point"===s}(n,e,t)?0:n.length-1],i=K.IDMAP.COLOR_BY_ALTERNATIVE,a=d.findItemByPropertyValue(r.qAttributeDimensions,"id",i);return ae(e,ie("dimension",!!a,a||r)),!!a}(e,t))return;re({properties:e,isDimension:!0,dimensions:n,excludedDimensions:i,measures:r,label:o.getValue(e,"color.byDimDef.label")})}const le=function(e,t,n){o.setValue(e,t,n),o.isAtomicValue(n)&&function(e,t,n){var r=e.qLayoutExclude;r&&(r.changed||(r.changed={}),r.changed[t]={from:o.getValue(e,t),to:n})}(e,t,n)},ue=function(e,t){var n={primary:!0};if(e){var r=(Q[t]||J).colorModeOptions||J.colorModeOptions;n.byDimension=r.dimension(e),n.byMeasure=r.measure(e),n.byMultiple=r.multiColor(e),n.byExpression=r.expression(e)}return n},ce=function(e){var t=e.canColorBy,n=e.autoColor,r=e.colorMode,i=e.dimensions;return!(t[r]&&!n&&("byDimension"!==r&&"byMeasure"!==r||!i.length))},de=function(e,t){var n,r=o.getValue(e,"color.mode"),i=o.getValue(e,"color.auto"),a=o.getValue(e,"".concat(t,"qDimensions"),[]),s=o.getValue(e,"".concat(t,"qMeasures"),[]),l=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);i?te(a,l):!(n={auto:i,colorMode:r,dimensions:a}).auto&&"byDimension"===n.colorMode&&n.dimensions.length>0?se(e,t):function(e){var t=e.auto,n=e.colorMode,r=e.dimensions,i=e.measures,a=e.properties,s=o.getValue(a,"visualization");return!(t||"byMeasure"!==n||!r.length||"map"!==s&&!i.length)}({auto:i,colorMode:r,dimensions:a,measures:s,properties:e})?function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byMeasureDef");if(a&&ne(e,a.label),function(e){return!!(e&&e.activeMeasureIndex>-1)}(a))!function(e,t){var n=o.getValue(e,"".concat(t,"qMeasures"),[]),r=o.getValue(e,"color.byMeasureDef");if(r.activeMeasureIndex=Math.min(r.activeMeasureIndex,n.length-1),r.activeMeasureIndex>-1){var i=ie("measure",!1,n[r.activeMeasureIndex],!0);i.activeMeasureIndex=r.activeMeasureIndex,ae(e,i)}}(e,t);else if(function(e,t){return(!e||!e.key)&&t.length>0}(a,r)&&function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=n[n.length-1],a=K.IDMAP.COLOR_BY_ALTERNATIVE,s=d.findItemByPropertyValue(i.qAttributeExpressions,"id",a);return ae(e,ie("measure",!!s,s||r[0])),!!s}(e,t))return;re({properties:e,isDimension:!1,dimensions:n,excludedDimensions:i,measures:r,label:o.getValue(e,"color.byMeasureDef.label")})}(e,t):function(e,t){var n=o.getValue(e,"color.mode"),r=o.getValue(e,"".concat(t,"qDimensions"),[]),i=o.getValue(e,"".concat(t,"qMeasures"),[]),a=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===n&&i.length<2&&o.setValue(e,"color.mode","primary"),te(r,a)}(e,t)},pe=function(e){e.forEach(function(e){e.qOtherTotalSpec&&"qTotalMode"in e.qOtherTotalSpec&&delete e.qOtherTotalSpec.qTotalMode})},fe=function(e){var t=e.shouldUpdateColorBy,n=e.properties,r=o.getValue(n,"qHyperCubeDef.qMeasures",[]),i=o.getValue(n,"color.mode","");return!t&&"byExpression"===i&&r.length>0},he=function(e){var t=o.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),n=o.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:n,id:"colorByExpression"}),o.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)},me=function(e){o.setValue(e,"color.mode","primary"),o.setValue(e,"color.auto",!0)},ge=function(e){var t=o.getValue(e,"qHyperCubeDef.qDimensions",[]),n=o.getValue(e,"color.persistent",!1);return t.length>1&&!n},ve={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=B.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),o=i.data[0],a=o.dimensions.concat(o.excludedDimensions),s=o.measures.concat(o.excludedMeasures),l=K.IDMAP,u=l.COLOR_BY_ALTERNATIVE,c=l.COLOR_BY_EXPRESSION;return K.moveByIdFromGroup(a,[],"qAttributeDimensions",u),K.moveByIdFromGroup(a,[],"qAttributeExpressions",u),K.moveByIdFromGroup(s,[],"qAttributeExpressions",c),i},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,i=e.defaultPropertyValues,a=e.hypercubePath,s=e.extension,l=e.supportedFilters,u=e.isHCModifierSupported,c=B.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:i,hypercubePath:a,extension:s,supportedFilters:l,isHCModifierSupported:u}),d=c.qProperty,p=o.getValue(d,"visualization"),f=o.getValue(d,"qHyperCubeDef.qDimensions",[]),h=o.getValue(d,"color.mode",""),m=o.getValue(d,"color.auto",""),g=ue(d,p),v=ce({canColorBy:g,autoColor:m,colorMode:h,dimensions:f});return g[h]?fe({shouldUpdateColorBy:v,properties:d})&&he(d):me(d),v&&de(d,"qHyperCubeDef."),ge(d)&&le(d,"color.persistent",!0),pe(f),c}};var ye=["bar","marker","line"];const be=function(e){var t=e.initialProperties,n=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?V(n,"unsupportedAutoMinMax")||w()(n.measureAxis,t.measureAxis):V(n,"supportedAutoMinMax")||w()(n.measureAxis,t.measureAxis)},xe=function(e){var t,n=e.exportFormat,r=e.initialProperties,i=e.properties,o=e.measureType,a=i.qHyperCubeDef,s=i.measureAxis;if(function(e){var t=e.initialProperties;return!(!e.exportFormat.properties.measureAxes||t.measureAxes||!t.measureAxis||void 0===t.measureAxis.autoMinMax)}({exportFormat:n,initialProperties:r})){var l=function(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach(function(e){if(e.qDef.series){var n=e.qDef.series,r=n.type,i=n.axis;t[i]||(t[i]={axis:i,type:{line:0,marker:0,bar:0,total:0}}),ye.includes(r)&&t[i].type[r]++,t[i].type.total++}}),t}(a);l.length?(o&&(t=l.filter(function(e){return e.type[o]>0}).sort(function(e,t){return t.type[o]-e.type[o]})),t&&t.length||(t=l.sort(function(e,t){return t.type.total-e.type.total})),t&&t[0]&&w()(s,n.properties.measureAxes[t[0].axis])):w()(s,n.properties.measureAxes[0])}},Se=function(e){if(e.qDimensions.length>1){var t=e.qInterColumnSortOrder.indexOf(0);if(0!==t){var n=e.qInterColumnSortOrder[0];e.qInterColumnSortOrder[0]=0,e.qInterColumnSortOrder[t]=n}}},we={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=e.supportedAutoMinMax,o=void 0===i||i,a=ve.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),s=a.properties;return o?(x(s,"measureAxis.min","supportedAutoMinMax"),x(s,"measureAxis.max","supportedAutoMinMax")):(x(s,"measureAxis.min","unsupportedAutoMinMax"),x(s,"measureAxis.max","unsupportedAutoMinMax")),a},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,i=e.defaultPropertyValues,o=e.hypercubePath,a=e.measureType,s=e.extension,l=e.supportedFilters,u=e.isHCModifierSupported,c=ve.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:i,hypercubePath:o,extension:s,supportedFilters:l,isHCModifierSupported:u}),d=c.qProperty;return be({initialProperties:n,properties:d}),xe({exportFormat:t,initialProperties:n,properties:d,measureType:a}),Se(d.qHyperCubeDef),d.qHyperCubeDef.qColumnOrder=[],d.qHyperCubeDef.columnOrder=[],c}};function Ce(e,t,n){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(n)}function Ee(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,n,[]).forEach(function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,a);if(void 0!==s){var l=o.getValue(i,"qDef.cId");l||(l=o.generateId(),o.setValue(i,"qDef.cId",l));var u=Ce(n,r,l);o.setValue(t,u,s),o.setValue(i,a,void 0)}}({properties:t,quarantineName:r,arrayName:i,item:e,itemPath:a})})}function Ie(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,n,[]).forEach(function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,"qDef.cId");if(s){var l=Ce(n,r,s),u=o.getValue(t,l);void 0!==u&&(o.setValue(i,a,u),o.setValue(t,l,void 0))}}({properties:t,quarantineName:r,arrayName:i,item:e,itemPath:a})})}var De="qHyperCubeDef.qMeasures",Re="conditionalColoring",Pe="measures",Me="qDef.conditionalColoring";const Le={quarantine:function(e){Ee({properties:e,arrayPath:De,quarantineName:Re,arrayName:Pe,itemPath:Me})},unquarantine:function(e){Ie({properties:e,arrayPath:De,itemPath:Me,arrayName:Pe,quarantineName:Re})}};var Ae="qHyperCubeDef.qMeasures",ke="measures",Oe="qHyperCubeDef.qDimensions",qe="dimensions",Te="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",Ne="alternativeMeasures",je="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",_e="alternativeDimensions",Fe="qCalcCondition",ze="conditionalShowHide";const We={quarantine:function(e){Ee({properties:e,arrayPath:Ae,quarantineName:ze,arrayName:ke,itemPath:Fe}),Ee({properties:e,arrayPath:Oe,quarantineName:ze,arrayName:qe,itemPath:Fe})},unquarantine:function(e){Ie({properties:e,arrayPath:Ae,quarantineName:ze,arrayName:ke,itemPath:Fe}),Ie({properties:e,arrayPath:Oe,quarantineName:ze,arrayName:qe,itemPath:Fe})},quarantineAlternative:function(e){Ee({properties:e,arrayPath:Te,quarantineName:ze,arrayName:Ne,itemPath:Fe}),Ee({properties:e,arrayPath:je,quarantineName:ze,arrayName:_e,itemPath:Fe})},unquarantineAlternative:function(e){Ie({properties:e,arrayPath:Te,quarantineName:ze,arrayName:Ne,itemPath:Fe}),Ie({properties:e,arrayPath:je,quarantineName:ze,arrayName:_e,itemPath:Fe})}},$e={hypercube:B,colorChart:ve,axisChart:we,quarantineProperty:x,unquarantineProperty:V,quarantineArrayProp:Ee,unquarantineArrayProp:Ie,conditionalColoring:Le,conditionalShow:We}})(),r.default})()}(iF);var oF=kr(iF.exports);const aF="qHyperCubeDef.qMeasures",sF="measures",lF="qHyperCubeDef.qDimensions",uF="dimensions",cF="qDef.representation",dF="tableRepresentation",pF="qDef.conditionalColoring",fF="conditionalColoring",hF="qMiniChartDef",mF="miniChartDef",gF=e=>{oF.unquarantineArrayProp({properties:e,arrayPath:lF,itemPath:cF,arrayName:uF,quarantineName:dF}),oF.unquarantineArrayProp({properties:e,arrayPath:aF,itemPath:cF,arrayName:sF,quarantineName:dF}),oF.unquarantineArrayProp({properties:e,arrayPath:aF,itemPath:pF,arrayName:sF,quarantineName:fF}),oF.unquarantineArrayProp({properties:e,arrayPath:aF,itemPath:hF,arrayName:sF,quarantineName:mF})},vF=e=>{oF.quarantineArrayProp({properties:e,arrayPath:lF,itemPath:cF,arrayName:uF,quarantineName:dF}),oF.quarantineArrayProp({properties:e,arrayPath:aF,itemPath:cF,arrayName:sF,quarantineName:dF}),oF.quarantineArrayProp({properties:e,arrayPath:aF,itemPath:pF,arrayName:sF,quarantineName:fF}),oF.quarantineArrayProp({properties:e,arrayPath:aF,itemPath:hF,arrayName:sF,quarantineName:mF})};function yF(e){const{translator:t}=e;return{targets:[{path:"/qHyperCubeDef",dimensions:{min:1,max:1e3,description(e,n,r){const i="rows"===r?.type?"Visualizations.Descriptions.Row":"Visualizations.Descriptions.Column";return t.get(i)}},measures:{min:1,max:1e3,description:()=>t.get("Visualizations.Descriptions.Values")},filters:{description:()=>t.get("SimpleProperties.Filters.Filter")}}]}}const bF="qHyperCubeDef.qDimensions",xF="dimensions",SF="qOtherTotalSpec.qTotalMode",wF="totalMode",CF={quarantine(e){oF.quarantineArrayProp({properties:e,arrayPath:bF,quarantineName:wF,arrayName:xF,itemPath:SF})},unquarantine(e){oF.unquarantineArrayProp({properties:e,arrayPath:bF,quarantineName:wF,arrayName:xF,itemPath:SF})}};function EF(e){const t=yF(e);return(e,n,r,i)=>{const o=oF.hypercube.importProperties({exportFormat:e,initialProperties:n,dataDefinition:t.targets[0],hypercubePath:i}),a=o.qProperty.qHyperCubeDef.qDimensions.length,s=o.qProperty.qHyperCubeDef.qMeasures.length;let l,u=o.qProperty.qHyperCubeDef.qInterColumnSortOrder,c=!0;a+s===u.length&&Jj(o,"qProperty.qLayoutExclude.quarantine.interColSortOrder",u.concat());const d=o.qProperty.qLayoutExclude.quarantine?.pivotInterColSortOrder;d?(u=d,l=[...d],Jj(o,"qProperty.qHyperCubeDef.qInterColumnSortOrder",u),o.qProperty.qLayoutExclude.quarantine&&delete o.qProperty.qLayoutExclude.quarantine.pivotInterColSortOrder):u.length=0;const p=+(u.indexOf(-1)>-1),f=a+p;if(f>u.length)for(let e=u.length;e<f;e++)u.indexOf(e)<0&&u.push(e-p);for(let e=u.length-1;e>=0;e--)u[e]>=a&&u.splice(e,1);s>1&&u.indexOf(-1)<0?u.push(-1):s<2&&u.indexOf(-1)>-1&&u.splice(u.indexOf(-1),1);const h=o.qProperty.qHyperCubeDef.qNoOfLeftDims??-1;if(a>0&&-1===h&&Jj(o,"qProperty.qHyperCubeDef.qNoOfLeftDims",a),l?.length===u.length){for(let e=0;e<l.length;e++)if(l[e]!==u[e]){c=!1;break}c&&(oF.unquarantineProperty(o.qProperty,"noOfLeftDims"),oF.unquarantineProperty(o.qProperty,"excludedNoOfLeftDims "))}return oF.unquarantineProperty(o.qProperty,"rankedList"),oF.conditionalShow.unquarantine(o.qProperty),CF.unquarantine(o.qProperty),gF(o.qProperty),oF.unquarantineProperty(o.qProperty,"pivotTableIndentMode"),o}}function IF(e,t){const n=e.qProperty.qHyperCubeDef.qInterColumnSortOrder,r=n.slice(),i=n.indexOf(-1);i>-1&&n.splice(i,1);const o=oF.hypercube.exportProperties({propertyTree:e,hyperCubePath:t}),a=o.properties.qHyperCubeDef,s=a.qDimensions.length,l=a.qMeasures.length;let u=a.qInterColumnSortOrder;Jj(o,"properties.qLayoutExclude.quarantine.pivotInterColSortOrder",r),oF.quarantineProperty(o.properties,"qHyperCubeDef.qNoOfLeftDims","noOfLeftDims"),delete o.properties.qHyperCubeDef.qNoOfLeftDims,oF.quarantineProperty(o.properties,"qHyperCubeDef.rankedList","rankedList"),delete o.properties.qHyperCubeDef.rankedList;const c=o.properties.qLayoutExclude.quarantine?.interColSortOrder;c&&(u=c,Jj(o,"properties.qHyperCubeDef.qInterColumnSortOrder",u),Jj(o,"data.0.interColumnSortOrder",u),o.properties.qLayoutExclude.quarantine&&delete o.properties.qLayoutExclude.quarantine.interColSortOrder);for(let e=u.length;e<s+l;e++)u.length<=e&&u.push(e);return oF.quarantineProperty(o.properties,"qHyperCubeDef.qIndentMode","pivotTableIndentMode"),oF.quarantineProperty(o.properties,"qHyperCubeDef.excludedNoOfLeftDims ","excludedNoOfLeftDims "),oF.conditionalShow.quarantine(o.properties),CF.quarantine(o.properties),vF(o.properties),o}const DF=e=>({dimensions:{min:1,max:1e3,description(t,n,r){const i="rows"===r?.type?"Visualizations.Descriptions.Row":"Visualizations.Descriptions.Column";return e.translator.get(i)}},measures:{min:1,max:1e3,description:()=>e.translator.get("Visualizations.Descriptions.Values")}}),RF={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}}}};let PF=function(e){return e.Text="text",e.Link="link",e.Image="image",e.ImagesInIndentMode="imagesInIndentMode",e.Indicator="indicator",e.MiniChart="miniChart",e.EditableText="editableText",e.EditableSelector="editableSelector",e}({}),MF=function(e){return e.Attribute="attribute",e.Dimension="dimension",e}({});const LF=e=>{switch(e?.type){case"url":return PF.Link;case"image":return PF.Image;case"indicator":return PF.Indicator;case"miniChart":return PF.MiniChart;default:return PF.Text}},AF=({isImagesEnabled:e})=>({uses:"dimensionRepresentationItems.representationType",options(t,n,r){const{qIndentMode:i}=r.properties.qHyperCubeDef,o=[{value:"text",translation:"Object.Table.Representation.Text"},{value:"url",translation:"Object.Table.Representation.Link"}];return(!i&&e||i)&&o.push({value:"image",translation:"Object.Table.Representation.Image"}),o}}),kF=e=>{if(e)return{representationImage:{uses:"dimensionRepresentationItems.representationImage",show:e=>LF(e.qDef.representation)===PF.Image,items:{imageSize:{options:[{value:"alwaysFit",translation:"properties.backgroundImage.sizeAlwaysFit"},{value:"fitWidth",translation:"properties.backgroundImage.sizeFitWidth"},{value:"fitHeight",translation:"properties.backgroundImage.sizeFitHeight"},{value:"fill",translation:"properties.backgroundImage.sizeStretch"},{value:"originalSize",translation:"properties.backgroundImage.originalSize"}]},imageBoxWidth:{ref:"qDef.representation.imageBox.width",translation:"properties.pivot.representation.image.imageBox.width",type:"number",expression:"optional",defaultValue:24,show:(e,t,n)=>{if(!n.properties.qHyperCubeDef)return!1;const{qInterColumnSortOrder:r,qNoOfLeftDims:i,qDimensions:o,qIndentMode:a}=n.properties.qHyperCubeDef;let s=!1;r?.indexOf(-1);const l=o?.indexOf(e)??1/0;return(r?.slice(0,i)??[]).indexOf(l)>-1&&(s=!0),s&&a}}}}}},OF=e=>{const{anything:t}=e,n=!t.sense?.isUnsupportedFeature?.("tableImages");return{representationType:AF({isImagesEnabled:n}),representationUrlPosition:{uses:"dimensionRepresentationItems.representationUrlPosition",show:e=>LF(e.qDef.representation)===PF.Link},representationUrlLabel:{uses:"dimensionRepresentationItems.representationUrlLabel",show:e=>LF(e.qDef.representation)===PF.Link&&e.qDef.representation?.urlPosition===MF.Dimension},representationLinkUrl:{uses:"dimensionRepresentationItems.representationLinkUrl",show:e=>LF(e.qDef.representation)===PF.Link&&e.qDef.representation?.urlPosition===MF.Attribute},...kF(n)}},qF=(e,t)=>{const{anything:n}=e,r=n.sense?.isUnsupportedFeature,i=!r?.("tableImages")&&t[PF.Image],o=!r?.("qMiniChartDef")&&t[PF.MiniChart],a=!r?.("tableIndicators")&&t[PF.Indicator],s=i&&t[PF.ImagesInIndentMode];return{representationType:{uses:"measureRepresentationItems.representationType",options:(e,t,n)=>(e=>{const{qIndentMode:t}=e.properties.qHyperCubeDef??{},n=[{value:"text",translation:"Object.Table.Representation.Text"}];return(!t&&i||t&&s)&&n.push({value:"image",translation:"Object.Table.Representation.Image"}),a&&n.push({value:"indicator",translation:"Object.Table.Representation.Indicator"}),o&&n.push({value:"miniChart",translation:"Common.MiniChart"}),n})(n)},representationImage:i?{uses:"measureRepresentationItems.representationImage",show:e=>LF(e.qDef.representation)===PF.Image,items:{imageSize:{options:[{value:"alwaysFit",translation:"properties.backgroundImage.sizeAlwaysFit"},{value:"fitWidth",translation:"properties.backgroundImage.sizeFitWidth"},{value:"fitHeight",translation:"properties.backgroundImage.sizeFitHeight"},{value:"fill",translation:"properties.backgroundImage.sizeStretch"},{value:"originalSize",translation:"properties.backgroundImage.originalSize"}]}}}:void 0,representationIndicator:a?{uses:"measureRepresentationItems.representationIndicator"}:void 0,representationMiniChart:o?{uses:"measureRepresentationItems.representationMiniChart"}:void 0}};let TF=function(e){return e.Dimension="dimensions",e.Measures="measures",e.Pivot="pivot",e}({}),NF=function(e){return e.CellForegroundColor="cellForegroundColor",e.CellBackgroundColor="cellBackgroundColor",e.ImageUrl="imageUrl",e.ImageLabel="imageLabel",e.Link="url",e.LinkLabel="urlLabel",e}({}),jF=function(e){return e.TopGrid="topGrid",e.LeftGrid="leftGrid",e.DataGrid="dataGrid",e}({}),_F=function(e){return e.Forward="forward",e.Backward="backward",e.None="none",e}({});const FF="image",zF=(e,t,n)=>{if(!n.properties.qHyperCubeDef.qIndentMode)return!0;const r=n.properties.qHyperCubeDef.qInterColumnSortOrder?.indexOf(-1)??-1;let i=n.properties.qHyperCubeDef.qNoOfLeftDims??-1;r>-1&&r<i&&(i-=1);const o=n.properties.qHyperCubeDef.qDimensions.indexOf(e);return 0===o||o>=i},WF=()=>({type:{type:"string",component:"dropdown",ref:"qDef.columnWidth.type",translation:"Object.Table.Column.Width",options:[{value:LT.Auto,translation:"Common.Auto"},{value:LT.FitToContent,translation:"Object.Table.Column.FitToContent"},{value:LT.Pixels,translation:"Object.Table.Column.Pixels"},{value:LT.Percentage,translation:"Object.Table.Column.Percentage"}],defaultValue:LT.Auto},sizePixels:{ref:"qDef.columnWidth.pixels",translation:"Object.Table.Column.Pixels",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:MT.PixelsDefault,show:e=>e.qDef.columnWidth?.type===LT.Pixels},sizePercentage:{ref:"qDef.columnWidth.percentage",translation:"Object.Table.Column.Percentage",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:MT.PercentageDefault,show:e=>e.qDef.columnWidth?.type===LT.Percentage}}),$F=({key:e,translation:t,env:n})=>{const r=!n.anything.sense?.isUnsupportedFeature?.("tableImages");return{[`${e}Auto`]:{ref:`qDef.${e}.auto`,type:"boolean",component:"switch",translation:t,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}],defaultValue:!0,show:t=>!r||"labelTextAlign"===e||t.qDef.representation?.type!==FF},[e]:{ref:`qDef.${e}.align`,type:"string",component:"item-selection-list",horizontal:!0,items:[{component:"icon-item",icon:"align_left",labelPlacement:"bottom",value:"left",translation:"properties.dock.left"},{component:"icon-item",icon:"align_center",labelPlacement:"bottom",value:"center",translation:"Common.Center"},{component:"icon-item",icon:"align_right",labelPlacement:"bottom",value:"right",translation:"properties.dock.right"}],defaultValue:"left",show:t=>void 0!==t.qDef[e]&&!t.qDef[e].auto&&(!r||"labelTextAlign"===e||t.qDef.representation?.type!==FF)}}},HF="TOTAL_OFF",VF={component:"attribute-expression-reference",defaultValue:[],ref:"qAttributeExpressions",items:[{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.BackgroundExpression",defaultValue:"",id:NF.CellBackgroundColor},{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.ForegroundExpression",defaultValue:"",id:NF.CellForegroundColor},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:NF.LinkLabel,tid:"URLLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:NF.Link,tid:"URLByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:NF.ImageLabel,tid:"ImageLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:NF.ImageUrl,tid:"ImageUrlByExpression",show:!1}]},BF="TOTAL_OFF",GF={component:"attribute-expression-reference",defaultValue:[],ref:"qAttributeExpressions",items:[{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.BackgroundExpression",defaultValue:"",id:NF.CellBackgroundColor},{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.ForegroundExpression",defaultValue:"",id:NF.CellForegroundColor},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:NF.LinkLabel,tid:"URLLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:NF.Link,tid:"URLByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:NF.ImageLabel,tid:"ImageLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:NF.ImageUrl,tid:"ImageUrlByExpression",show:!1}]},UF=e=>{const{translator:t,anything:n,flags:r}=e,i=(e=>{const{translator:t,anything:n}=e;return{type:"items",component:"data-assets-panel-pivot",translation:"Common.Data",items:{dimensions:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qDimensions",items:{field:{type:"items",translation:"Common.Field",items:{libraryId:{type:"string",component:"library-item",libraryItemType:"dimension",ref:"qLibraryId",translation:"Common.Dimension",show:e=>!!e.qLibraryId},inlineDimension:{component:"inline-dimension",show:e=>!e.qLibraryId},autoSort:{ref:"qDef.autoSort",type:"boolean",defaultValue:!0,show:!1},cId:{ref:"qDef.cId",type:"string",show:!1},nullSuppression:{type:"boolean",ref:"qNullSuppression",defaultValue:!1,translation:"properties.dimensions.showNull",inverted:!0},totalMode:{type:"string",component:"switch",translation:"properties.showTotals",ref:"qOtherTotalSpec.qTotalMode",defaultValue:HF,trueOption:{value:"TOTAL_EXPR",translation:"properties.on"},falseOption:{value:HF,translation:"properties.off"},show:!n.sense?.isUnsupportedFeature?.("totals")&&zF},totalsLabel:{type:"string",component:"expression",expressionType:"StringExpr",ref:"qTotalLabel",translation:"properties.totals.label",defaultValue:()=>t.get("Object.Table.Totals"),show:(e,t,r)=>!n.sense?.isUnsupportedFeature?.("totals")&&e.qOtherTotalSpec?.qTotalMode!==HF&&zF(e,0,r)},dimensionLimits:{uses:"dimensions.items.dimensionLimits"},showOthers:{uses:"dimensions.items.others"},globalGrouping:{type:"boolean",translation:"properties.dimensionLimits.globalGrouping",ref:"qOtherTotalSpec.qGlobalOtherGrouping",defaultValue:!1,show:e=>"OTHER_OFF"!==e.qOtherTotalSpec?.qOtherMode}}},presentation:{type:"items",translation:"properties.presentation",items:{visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Table.Columns.VisibilityCondition",defaultValue:{qv:""},isExpression:e=>"string"==typeof e&&e.trim().length>0},cellColoring:VF,...$F({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...$F({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...OF(e),...WF()}}}},measures:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qMeasures",items:{field:{type:"items",translation:"Common.Field",items:{libraryId:{type:"string",component:"library-item",libraryItemType:"measure",ref:"qLibraryId",translation:"Common.Measure",show:e=>!!e.qLibraryId},inlineMeasure:{component:"inline-measure",show:e=>!e.qLibraryId},autoSort:{ref:"qDef.autoSort",type:"boolean",defaultValue:!0,show:!1},cId:{ref:"qDef.cId",type:"string",show:!1},numberFormatting:{uses:"measures.items.numberFormatting"}}},presentation:{type:"items",translation:"properties.presentation",items:{visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Table.Columns.VisibilityCondition",defaultValue:{qv:""},isExpression:e=>"string"==typeof e&&e.trim().length>0},cellColoring:VF,...$F({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...$F({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...qF(e,{[PF.Image]:!0,[PF.Indicator]:!0}),...WF()}}}},filter:{type:"object",component:"filter-item-react",ref:"filter",tabName:"SimpleProperties.Filters.Filters"}}}})(e);return r.isEnabled("CLIENT_IM5974_PIVOT_DATA_PROPERTIES")?i:{type:"items",component:"pivot-data",translation:"properties.data",addTranslation:"Property.AddData",items:{dimensions:{type:"array",component:"dimensions",translation:"Common.Dimensions",alternativeTranslation:"properties.alternative.dimensions",ref:"qHyperCubeDef.qDimensions",disabledRef:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",min:1,allowAdd:!0,allowRemove:!0,allowMove:!0,addTranslation:"properties.dimensions.add",grouped:!0,items:{libraryId:{type:"string",component:"library-item",libraryItemType:"dimension",ref:"qLibraryId",translation:"Common.Dimension",show:e=>!!e.qLibraryId},inlineDimension:{component:"inline-dimension",show:e=>!e.qLibraryId},autoSort:{ref:"qDef.autoSort",type:"boolean",defaultValue:!0,show:!1},cId:{ref:"qDef.cId",type:"string",show:!1},nullSuppression:{type:"boolean",ref:"qNullSuppression",defaultValue:!1,translation:"properties.dimensions.showNull",inverted:!0},totalMode:{type:"string",component:"switch",translation:"properties.showTotals",ref:"qOtherTotalSpec.qTotalMode",defaultValue:BF,trueOption:{value:"TOTAL_EXPR",translation:"properties.on"},falseOption:{value:BF,translation:"properties.off"},show:!n.sense?.isUnsupportedFeature?.("totals")&&zF},totalsLabel:{type:"string",component:"expression",expressionType:"StringExpr",ref:"qTotalLabel",translation:"properties.totals.label",defaultValue:()=>t.get("Object.Table.Totals"),show:(e,t,r)=>!n.sense?.isUnsupportedFeature?.("totals")&&e.qOtherTotalSpec?.qTotalMode!==BF&&zF(e,0,r)},dimensionLimits:{uses:"dimensions.items.dimensionLimits"},showOthers:{uses:"dimensions.items.others"},globalGrouping:{type:"boolean",translation:"properties.dimensionLimits.globalGrouping",ref:"qOtherTotalSpec.qGlobalOtherGrouping",defaultValue:!1,show:e=>"OTHER_OFF"!==e.qOtherTotalSpec?.qOtherMode},visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Table.Columns.VisibilityCondition",defaultValue:{qv:""},isExpression:e=>"string"==typeof e&&e.trim().length>0},cellColoring:GF,...$F({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...$F({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...OF(e),...WF()}},measures:{type:"array",component:"measures",translation:"Common.Measures",ref:"qHyperCubeDef.qMeasures",disabledRef:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",min:1,allowAdd:!0,allowRemove:!0,allowMove:!0,addTranslation:"properties.measures.add",grouped:!0,items:{libraryId:{type:"string",component:"library-item",libraryItemType:"measure",ref:"qLibraryId",translation:"Common.Measure",show:e=>!!e.qLibraryId},inlineMeasure:{component:"inline-measure",show:e=>!e.qLibraryId},autoSort:{ref:"qDef.autoSort",type:"boolean",defaultValue:!0,show:!1},cId:{ref:"qDef.cId",type:"string",show:!1},numberFormatting:{uses:"measures.items.numberFormatting"},visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Table.Columns.VisibilityCondition",defaultValue:{qv:""},isExpression:e=>"string"==typeof e&&e.trim().length>0},cellColoring:GF,...$F({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...$F({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...qF(e,{[PF.Image]:!0,[PF.ImagesInIndentMode]:!0,[PF.Indicator]:!0}),...WF()}},filters:{type:"items",translation:"SimpleProperties.Filters.Filters",ref:"filters",allowAdd:!0,allowRemove:!0,allowMove:!1,addTranslation:"properties.filters.add",grouped:!0,items:{filter:{type:"object",component:"filter-item",ref:"filter"}}}}}},YF=(e,t,n,r)=>({ref:e,translation:t,dualOutput:!0,type:"object",component:"color-picker",width:"auto",disableNone:r??!1,defaultValue(e,t,i){const o=r?.(e,t,i)??!1,a=i.theme.current(),s=n(a,o);return{color:"transparent"===s?"none":s}}}),KF=(e,t=!1)=>{return{value:e,label:t?(n=e,n.charAt(0).toUpperCase()+n.slice(1)):e,groupHeader:!1,disabled:!1,styles:t?{fontFamily:e}:void 0};var n},XF=({ref:e,themeAccessor:t,translator:n,flags:r})=>({component:"dropdown",ref:e,options:(e,i,o)=>{const a=o.theme.current();return((e,t,n,r)=>{const i=t.fontFamily??"Source Sans Pro, sans-serif",o=t.fontFamilies??[],a=Array.from(new Set([e,i,...o])),s=[{value:"ThemeHeader",label:n.get("properties.themeFonts"),metaText:n.get("properties.theme"),groupHeader:!0},...a.sort().map(e=>KF(e,!0))],l=[{value:"DefaultHeader",label:n.get("properties.allFonts"),metaText:n.get("properties.default"),groupHeader:!0},...GN(r).filter(e=>!a.includes(e)).map(e=>KF(e,!0))];return[...s,...l.length>1?l:[]]})(t(a),a,n,r)},defaultValue:(e,n,r)=>t(r.theme.current())}),JF=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],ZF=({ref:e,themeAccessor:t,translator:n})=>({component:"dropdown",ref:e,options:(e,r,i)=>{const o=i.theme.current();return((e,t,n)=>{const r=t.fontSize,i=t.fontSizes??[],o=Array.from(new Set([e,r,...i])),a=[{value:"ThemeHeader",label:n.get("properties.themeFontSizes"),metaText:n.get("properties.theme"),groupHeader:!0},...o.sort((e,t)=>parseInt(e,10)-parseInt(t,10)).map(e=>KF(e,!1))],s=[{value:"DefaultHeader",label:n.get("properties.allFontSizes"),metaText:n.get("properties.default"),groupHeader:!0},...JF.filter(e=>!o.includes(e)).map(e=>KF(e,!1))];return[...a,...s.length>1?s:[]]})(t(o),o,n)},defaultValue:(e,n,r)=>t(r.theme.current())}),QF=({section:e,defaultFontStyle:t,translator:n,flags:r,getThemeValue:i,translation:o,disableNoneCallback:a})=>({component:"panel-section",translation:o??`properties.pivot.${e}`,items:{content:{component:"items",ref:"components",key:"theme",items:{fontFamily:XF({ref:`${e}.fontFamily`,themeAccessor:t=>i(t,e,"fontFamily")??t.fontFamily,translator:n,flags:r}),fontWrapperItem:{component:"inline-wrapper",items:{fontStyle:{component:"font-style-buttons",width:!1,ref:`${e}.fontStyle`,defaultValue:t??[]},fontSize:ZF({ref:`${e}.fontSize`,themeAccessor:t=>i(t,e,"fontSize")??t.fontSize,translator:n}),fontColor:YF(`${e}.fontColor`,void 0,t=>i(t,e,"color")??t.color)}},background:YF(`${e}.background`,"properties.background",(t,n)=>{const r=n?mN.WHITE:mN.TRANSPARENT;return i(t,e,"backgroundColor")??r},a)}}}}),ez=({section:e,defaultFontStyle:t,fallbackBackground:n,getThemeValue:r})=>({component:"panel-section",translation:`properties.pivot.${e}`,items:{content:{component:"items",ref:"components",key:"theme",items:{fontWrapperItem:{component:"inline-wrapper",items:{fontStyle:{component:"font-style-buttons",fullWidth:!0,ref:`${e}.fontStyle`,defaultValue:t??[]},fontColor:YF(`${e}.fontColor`,void 0,t=>r(t,e,"color")??t.color)}},background:YF(`${e}.background`,"properties.background",t=>r(t,e,"backgroundColor")??n??"transparent")}}}}),tz=(e,t)=>({component:"dropdown",ref:e,translation:t,options:[...Array(10).keys()].map(e=>({value:e+1,translation:e+1})),defaultValue:1}),nz="12px",rz="Source Sans Pro, sans-serif",iz="600",oz=15e3,az=4/3;let sz=function(e){return e.Transparent="transparent",e.FontSecondary="#737373",e.DividerDark="#595959",e.DividerLight="#D9D9D9",e.NullValueBackground="#F2F2F2",e}({}),lz=function(e){return e.Solid="solid",e.None="none",e}({});const uz={display:"flex",justifyContent:"center",alignItems:"center"},cz={borderStyle:"solid"},dz={boxSizing:"border-box",padding:"4px 8px",userSelect:"none",WebkitUserSelect:"none"},pz={lineHeight:az,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},fz=e=>({whiteSpace:"unset",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",wordBreak:e>1?"break-word":"break-all"}),hz=(e,t)=>e>0?`${e}px ${lz.Solid} ${t}`:lz.None,mz=(e,t,n,r,i)=>{const o=Number(!t||i?.right),a=Number(!e||i?.bottom);return{borderRight:"rtl"!==r?hz(o,n):lz.None,borderBottom:hz(a,n),borderLeft:"rtl"===r?hz(o,n):lz.None,borderTop:lz.None}},gz=(e,t,n,r,i,o,a)=>{const s=mz(t,r,i,o,a);return e.isLeftDimension||(e.isLastDimension&&!t&&(s.borderBottom=hz(2,i)),n||(s.borderLeft="rtl"!==o?hz(1,i):"none",s.borderRight="rtl"===o?hz(1,i):"none")),s},vz=({bottomDivider:e,rightDivider:t,borderColor:n})=>{const r={};return e&&(r.borderBottom=hz(1,n)),t&&(r.borderRight=hz(1,n)),r},yz=(e,t,n)=>{switch(t){case"header":return e.object?.pivotTableV2?.dimension?.label?.name?.[n];case"dimensionValues":return e.object?.pivotTableV2?.dimension?.label?.value?.[n];case"measureLabels":return e.object?.pivotTableV2?.measure?.label?.name?.[n];case"measureValues":return e.object?.pivotTableV2?.measure?.label?.value?.[n];case"totalValues":return e.object?.pivotTableV2?.total?.label?.value?.[n];case"nullValues":return e.object?.pivotTableV2?.null?.label?.value?.[n];default:return}},bz=(e,t)=>({type:"items",items:[{component:"styling-panel",chartTitle:"Object.PivotTable",subtitle:"LayerStyleEditor.component.styling",translation:"LayerStyleEditor.component.styling",ref:"components",useGeneral:!0,useBackground:!0,items:{headerSection:QF({section:"header",defaultFontStyle:["bold"],translator:e,flags:t,getThemeValue:yz}),dimensionValueSection:QF({section:"dimensionValues",translator:e,flags:t,getThemeValue:yz}),measureValueSection:QF({section:"measureValues",translator:e,flags:t,getThemeValue:yz}),measureLabelSection:ez({section:"measureLabels",getThemeValue:yz}),totalValuesSection:ez({section:"totalValues",defaultFontStyle:["bold"],getThemeValue:yz}),nullValuesSection:ez({section:"nullValues",fallbackBackground:sz.NullValueBackground,getThemeValue:yz}),gridSection:{translation:"properties.pivot.grid",component:"panel-section",items:{gridItems:{component:"items",ref:"components",key:"theme",items:{lineClamp:tz("grid.lineClamp","ThemeStyleEditor.style.rowHeight"),columnLineClamp:tz("grid.columnLineClamp","ThemeStyleEditor.style.columnHeight"),border:YF("grid.border","properties.border",e=>e.object?.pivotTableV2?.grid?.borderColor??sz.DividerLight),divider:YF("grid.divider","properties.pivot.divider",e=>e.object?.pivotTableV2?.grid?.divider?.borderColor??sz.DividerDark),background:YF("grid.background","properties.background",e=>e.object?.pivotTableV2?.grid?.backgroundColor??sz.Transparent)}}}}}}]}),xz=e=>{if(e.isEnabled("CLIENT_IM_5973_PIVOT_TABLE_EXPLORATION"))return{chartExploration:{type:"items",translation:"properties.chartExploration",items:{chartExplorationToggler:{type:"items",component:"chart-exploration-toggler",translation:"properties.enableChartExploration",ref:"enableChartExploration"},visibilityToggler:{show:e=>e.enableChartExploration,component:"buttongroup",translation:"properties.ChartExploration.VisibilityOption",ref:"chartExploration.menuVisibility",options:[{value:"auto",translation:"Common.Auto"},{value:"minimized",translation:"properties.ChartExploration.Minimized"}]}},show:e=>!e.insideContainer}}},Sz=(e,t)=>({uses:"settings",items:{presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:[bz(e,t),{type:"items",items:{nullValueText:{ref:"nullValueRepresentation.text",type:"string",translation:"properties.pivot.nullValueText",defaultValue:"-"},alwaysFullyExpanded:{ref:"qHyperCubeDef.qAlwaysFullyExpanded",type:"boolean",translation:"properties.pivot.fullyExpanded",defaultValue:!1},indentMode:{ref:"qHyperCubeDef.qIndentMode",type:"boolean",translation:"properties.pivot.indentMode",defaultValue:!1,change(e){e.qHyperCubeDef.qShowTotalsAbove=!0}},type:{type:"string",component:"dropdown",ref:"qHyperCubeDef.indentModeColumnWidth.type",translation:"Object.Table.Column.Width",options:[{value:LT.Auto,translation:"Common.Auto"},{value:LT.Pixels,translation:"Object.Table.Column.Pixels"},{value:LT.Percentage,translation:"Object.Table.Column.Percentage"}],defaultValue:LT.Auto,show:e=>!!e.qHyperCubeDef.qIndentMode},sizePixels:{ref:"qHyperCubeDef.indentModeColumnWidth.pixels",translation:"Object.Table.Column.Pixels",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:MT.PixelsDefault,show:e=>{const t=e.qHyperCubeDef;return t.qIndentMode&&t.indentModeColumnWidth?.type===LT.Pixels}},sizePercentage:{ref:"qHyperCubeDef.indentModeColumnWidth.percentage",translation:"Object.Table.Column.Percentage",component:"expression",expressionType:"ValueExpression",expression:"optional",defaultValue:MT.PercentageDefault,show:e=>{const t=e.qHyperCubeDef;return t.qIndentMode&&t.indentModeColumnWidth?.type===LT.Percentage}},showTotalsAbove:{ref:"qHyperCubeDef.qShowTotalsAbove",type:"boolean",translation:"properties.pivot.showTotalsAbove",defaultValue:!0,show(e){const{qIndentMode:t}=e.qHyperCubeDef;return!t&&!!e.qHyperCubeDef.qDimensions.some(e=>"TOTAL_EXPR"===e.qOtherTotalSpec?.qTotalMode)}},resetProperties:{type:"object",component:"button",translation:"properties.pivot.resetExpansionButton",disabled:e=>!!e.qHyperCubeDef.qAlwaysFullyExpanded,action(e,t,n,r){e.qHyperCubeDef.qExpansionState=[],r.$emit("saveProperties",e)}}}}]},...xz(t)}}),wz="auto",Cz={type:"items",translation:"properties.sorting",items:{sortbyY:{type:"items",items:{sortbyYToggle:{ref:"qHyperCubeDef.qSortbyYValue",type:"boolean",component:"switch",translation:"properties.sorting.sortByY.label",convertFunctions:{get:e=>!!e("integer"),set:(e,t)=>{t("integer",e?-1:0)}},options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}]},sortbyYOrder:{ref:"qHyperCubeDef.qSortbyYValue",type:"string",component:"dropdown",defaultValue:0,options:[{value:1,translation:"properties.sorting.ascending"},{value:-1,translation:"properties.sorting.descending"}],show:e=>!!e.qHyperCubeDef.qSortbyYValue}}},defaultSorting:{uses:"sorting",items:{dimensions:{showPriority:!1,allowMove:!1},measures:{included:!1}}},searchSorting:{ref:"search.sorting",type:"string",component:"dropdown",defaultValue:wz,translation:"Object.Table.SortingInSearch",options:[{value:wz,translation:"Common.Auto"},{value:"inherit",translation:"Object.Table.SortingInSearch.InheritFromDimension"}]}}};function Ez(e){const{translator:t,flags:n}=e;return{type:"items",component:"accordion",items:{data:UF(e),sorting:Cz,addons:RF,settings:Sz(t,n)}}}function Iz(e){return{support:{cssScaling:!0,snapshot:!0,export:!0,exploration:e.flags.isEnabled("CLIENT_IM_5973_PIVOT_TABLE_EXPLORATION"),sharing:!1,exportData:!0,viewData:!0},usePropertyHandler:"pivot-data",definition:Ez(e),importProperties:EF(e),exportProperties:IF,exploration:z_(e),data:DF(e),propertyHandler:e.flags.isEnabled("VNA-147_NEBULA_PIVOT_DATA_HANDLERS")?t=>new rF(t,e.translator,e.flags.isEnabled):void 0}}const Dz=()=>{let e;return{promise:new Promise(t=>{e=t}),resolve:e}};function Rz(e,t){return P(()=>e,t)}const Pz={},Mz=e=>{const t=P(()=>({current:Pz}),[]);return t.current=t.current===Pz?e:t.current,t},Lz=e=>!!e&&0===MN(e).a,Az="#grid",kz=(e,t)=>{const n=t?.closest(e);return n&&window.getComputedStyle(n).backgroundColor},Oz=(e,t,n,r,i)=>{const o=kz(".qv-object .qv-inner-object",n),a=kz(".qv-panel-sheet",n),s=kz(Az,n)??a,l=(e=>{const t=e.components?.find(e=>"general"===e.key),n=t?.bgColor?.colorExpression,r=t?.bgColor?.color?.color,i=t?.bgColor?.useColorExpression;if(i&&n)return c_(n);if("none"===r)return"transparent";if(void 0===r)return;const o=MN(r);return o.setAlpha(t?.bgColor?.color?.alpha??o.a),o.getRGBA()})(e),u=r?.(t),c=i?.(t),d=l||u||o||c,p=Lz(d),f=!Lz(h=p?s:d)&&s_(h,mN.TEXT,mN.DARK_MODE_TEXT)===EN(mN.DARK_MODE_TEXT);var h;const m=((e,t,n,r=mN.WHITE)=>e&&!Lz(e)?e:Lz(t)?n&&!Lz(n)?n:r:t)(l,d,s);return{color:d,headerColor:m,isDark:f}},qz=(e,t,n,r)=>{const i=O(),o=((e,t={attributeFilter:["style"],childList:!1,subtree:!1})=>{const[n,r]=A([]);return k(()=>{let n;return e&&(n=new MutationObserver(e=>{r(e)}),n.observe(e,t)),()=>{n?.disconnect()}},[e,t]),n})(t.closest(Az),{attributeFilter:["style"],childList:!1,subtree:!1,attributeOldValue:!0}).filter(({oldValue:e})=>e?.includes("background")).map(({oldValue:e})=>e).join(",");return P(()=>({...i,background:Oz(e,i,t,n,r)}),[i.name(),t,n,r,e,o])};function Tz(e,t){const n=P(()=>({isLoading:!0}),t),[r,i]=L(async()=>{try{return await e()}finally{n.isLoading=!1}},t);return[r,n.isLoading,i]}const Nz=3,jz=/\n/g;function _z(e,t,n){let r=0,i=e.length;if(Number.isNaN(t))return null;if(e.length<=1)return null;if(n(e)<=t)return null;for(;r<=i;){const o=Math.floor((r+i)/2),a=e.slice(0,o),s=e.slice(0,o-1),l=n(a),u=n(s);if(l>t&&u<=t)return e.slice(o-1)||null;if(l===t)return e.slice(o)||null;l<t?r=o+1:i=o}return null}function Fz({fontSize:e="12px",fontFamily:t="Source Sans Pro, Arial, sans-serif",fontStyle:n="normal",fontWeight:r="normal"},i){const{maxNbrLinesOfText:o=Nz,allowLineBreaks:a=!0}=i??{},{estimateWidth:s,measureText:l,estimateLineCount:u}=v(()=>(({fontSize:e="12px",fontFamily:t="Source Sans Pro, Arial, sans-serif",fontStyle:n="normal",fontWeight:r="normal"},i)=>{const{maxNbrLinesOfText:o=Nz,allowLineBreaks:a=!0}=i??{};return()=>{const i=document.createElement("canvas").getContext("2d");i.font=`${n} ${r} ${e} ${t}`;const s=i.measureText.bind(i),l=Zj(e=>{if(void 0===e)return 0;if(a){const t=e.split(jz).map(e=>s(e).width);return t.reduce((e,t)=>t>e?t:e,0)}const t=e.replace(jz," ");return s(t).width}),u=e=>+l(e).toFixed(2),c=Zj(({text:e,maxWidth:t,isNumeric:n=!1})=>{if(n)return 1;const r=a?e.split(jz):[e];let i=0;for(const e of r){let n=e;do{i+=1,n=_z(n,t,u)}while(null!==n&&i<o);if(i>=o)break}return i},({text:e,maxWidth:t,isNumeric:n})=>`${e}-${t}-${n?"true":"false"}`);return{measureText:e=>l(e),estimateWidth:e=>l("N")*e,estimateLineCount:c}}})({fontStyle:n,fontWeight:r,fontSize:e,fontFamily:t},{maxNbrLinesOfText:o,allowLineBreaks:a})(),[n,r,e,t,o,a]);return{estimateWidth:s,measureText:l,estimateLineCount:u}}var zz,Wz=E;zz=Wz.createRoot,Wz.hydrateRoot;const $z="Source Sans Pro, sans-serif";function Hz(e,t){const[n,r]=m(t);n.some((e,n)=>e!==t[n])&&(r(t),e())}var Vz={NebulaTableUtils_ColumnAdjuster_ColumnNameLabel:{id:"NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",locale:{"de-DE":"Breite von {0}","en-US":"Width of {0}","es-ES":"Ancho de {0}","fr-FR":"Largeur de {0}","it-IT":"Larghezza di {0}","ja-JP":"{0} の幅","ko-KR":"{0}의 너비","nl-NL":"Breedte van {0}","pl-PL":"Szerokość kolumny {0}","pt-BR":"Comprimento de {0}","ru-RU":'Ширина столбца "{0}"',"sv-SE":"Bredd på {0}","tr-TR":"{0} genişliği","zh-CN":"{0} 的宽度","zh-TW":"{0} 的寬度"}},NebulaTableUtils_MenuGroupLabel_Sorting:{id:"NebulaTableUtils.MenuGroupLabel.Sorting",locale:{"de-DE":"Sortierung","en-US":"Sorting","es-ES":"Ordenación","fr-FR":"Tri","it-IT":"Ordinamento","ja-JP":"ソート","ko-KR":"정렬","nl-NL":"Sorteren","pl-PL":"Sortowanie","pt-BR":"Classificação","ru-RU":"Сортировка","sv-SE":"Sortering","tr-TR":"Sıralama","zh-CN":"排序","zh-TW":"排序"}},NebulaTableUtils_MenuItemLabel_AdjustColumnSize:{id:"NebulaTableUtils.MenuItemLabel.AdjustColumnSize",locale:{"de-DE":"Spaltengröße anpassen","en-US":"Adjust column size","es-ES":"Ajustar el tamaño de columna","fr-FR":"Ajuster la taille de colonne","it-IT":"Regola dimensioni colonna","ja-JP":"列サイズを調整","ko-KR":"열 크기 조정","nl-NL":"Kolomgrootte aanpassen","pl-PL":"Dostosuj rozmiar kolumny","pt-BR":"Ajustar tamanho da coluna","ru-RU":"Настроить размер столбца","sv-SE":"Justera kolumnens storlek","tr-TR":"Sütun boyutunu ayarla","zh-CN":"调节列大小","zh-TW":"調整欄大小"}},NebulaTableUtils_MenuItemLabel_ClearSelections:{id:"NebulaTableUtils.MenuItemLabel.ClearSelections",locale:{"de-DE":"Auswahlen löschen","en-US":"Clear selections","es-ES":"Borrar selecciones","fr-FR":"Effacer les sélections","it-IT":"Cancella selezioni","ja-JP":"選択をクリア","ko-KR":"선택 지우기","nl-NL":"Geselecteerde waarden wissen","pl-PL":"Wyczyść wybory","pt-BR":"Limpar seleções","ru-RU":"Очистить выбранные","sv-SE":"Radera urval","tr-TR":"Seçimleri temizle","zh-CN":"清除选择项","zh-TW":"清除選項"}},NebulaTableUtils_MenuItemLabel_Collapse:{id:"NebulaTableUtils.MenuItemLabel.Collapse",locale:{"de-DE":"Reduzieren","en-US":"Collapse","es-ES":"Contraer","fr-FR":"Réduire","it-IT":"Comprimi","ja-JP":"折りたたむ","ko-KR":"축소","nl-NL":"Samenvouwen","pl-PL":"Zwiń","pt-BR":"Recolher","ru-RU":"Свернуть","sv-SE":"Dölj","tr-TR":"Daralt","zh-CN":"折叠","zh-TW":"收合"}},NebulaTableUtils_MenuItemLabel_ColumnOptions:{id:"NebulaTableUtils.MenuItemLabel.ColumnOptions",locale:{"de-DE":"Spaltenoptionen","en-US":"Column options","es-ES":"Opciones de columna","fr-FR":"Options de colonne","it-IT":"Opzioni colonna","ja-JP":"列オプション","ko-KR":"열 옵션","nl-NL":"Kolomopties","pl-PL":"Opcje kolumny","pt-BR":"Opções da coluna","ru-RU":"Параметры столбца","sv-SE":"Alternativ för kolumn","tr-TR":"Sütun seçenekleri","zh-CN":"列选项","zh-TW":"欄選項"}},NebulaTableUtils_MenuItemLabel_Expand:{id:"NebulaTableUtils.MenuItemLabel.Expand",locale:{"de-DE":"Erweitern","en-US":"Expand","es-ES":"Expandir","fr-FR":"Développer","it-IT":"Espandi","ja-JP":"展開","ko-KR":"확장","nl-NL":"Uitvouwen","pl-PL":"Rozwiń","pt-BR":"Expandir","ru-RU":"Развернуть","sv-SE":"Utöka","tr-TR":"Genişlet","zh-CN":"展开","zh-TW":"展開"}},NebulaTableUtils_MenuItemLabel_Search:{id:"NebulaTableUtils.MenuItemLabel.Search",locale:{"de-DE":"Suchen","en-US":"Search","es-ES":"Buscar","fr-FR":"Rechercher","it-IT":"Cerca","ja-JP":"検索","ko-KR":"검색","nl-NL":"Zoeken","pl-PL":"Wyszukaj","pt-BR":"Pesquisar","ru-RU":"Поиск","sv-SE":"Sök","tr-TR":"Ara","zh-CN":"搜索","zh-TW":"搜尋"}},NebulaTableUtils_MenuItemLabel_SelectAll:{id:"NebulaTableUtils.MenuItemLabel.SelectAll",locale:{"de-DE":"Alle auswählen","en-US":"Select all","es-ES":"Seleccionar todo","fr-FR":"Sélectionner tout","it-IT":"Seleziona tutti","ja-JP":"すべて選択","ko-KR":"모두 선택","nl-NL":"Alles selecteren","pl-PL":"Wybierz wszystko","pt-BR":"Selecionar tudo","ru-RU":"Выбрать все","sv-SE":"Välj alla","tr-TR":"Tümünü seç","zh-CN":"全选","zh-TW":"全選"}},NebulaTableUtils_MenuItemLabel_SelectAlternative:{id:"NebulaTableUtils.MenuItemLabel.SelectAlternative",locale:{"de-DE":"Alternative Werte auswählen","en-US":"Select alternative","es-ES":"Seleccionar alternativos","fr-FR":"Sélectionner des valeurs alternatives","it-IT":"Seleziona alternativi","ja-JP":"代替項目を選択","ko-KR":"대체 가능 값 선택","nl-NL":"Alternatief selecteren","pl-PL":"Wybierz alternatywę","pt-BR":"Selecionar alternativa","ru-RU":"Выбрать альтернативные","sv-SE":"Välj alternativ","tr-TR":"Alternatifi seç","zh-CN":"选择替代项","zh-TW":"選取替代選項"}},NebulaTableUtils_MenuItemLabel_SelectExcluded:{id:"NebulaTableUtils.MenuItemLabel.SelectExcluded",locale:{"de-DE":"Ausgeschlossene Werte auswählen","en-US":"Select excluded","es-ES":"Seleccionar excluidos","fr-FR":"Sélectionner les valeurs exclues","it-IT":"Seleziona esclusi","ja-JP":"除外項目を選択","ko-KR":"제외 항목 선택","nl-NL":"Uitgesloten waarden selecteren","pl-PL":"Wybierz wykluczone","pt-BR":"Selecionar excluídos","ru-RU":"Выбрать исключенные","sv-SE":"Välj uteslutna","tr-TR":"Hariç tutulanı seç","zh-CN":"选择排除项","zh-TW":"選取排除值"}},NebulaTableUtils_MenuItemLabel_SelectPossible:{id:"NebulaTableUtils.MenuItemLabel.SelectPossible",locale:{"de-DE":"Wählbare Werte auswählen","en-US":"Select possible","es-ES":"Seleccionar posibles","fr-FR":"Sélectionner les valeurs possibles","it-IT":"Seleziona possibili","ja-JP":"絞込項目を選択","ko-KR":"사용 가능 항목 선택","nl-NL":"Mogelijke waarden selecteren","pl-PL":"Wybierz możliwe","pt-BR":"Selecionar possíveis","ru-RU":"Выбрать возможные","sv-SE":"Välj möjliga","tr-TR":"Olası olanı seç","zh-CN":"选择可能值","zh-TW":"選取可能值"}},NebulaTableUtils_MenuItemLabel_Selections:{id:"NebulaTableUtils.MenuItemLabel.Selections",locale:{"de-DE":"Auswahlen","en-US":"Selections","es-ES":"Selecciones","fr-FR":"Sélections","it-IT":"Selezioni","ja-JP":"選択","ko-KR":"선택 내용","nl-NL":"Selecties","pl-PL":"Wybory","pt-BR":"Seleções","ru-RU":"Выборки","sv-SE":"Urval","tr-TR":"Seçimler","zh-CN":"选择项","zh-TW":"選項"}},NebulaTableUtils_MenuItemLabel_SortAscending:{id:"NebulaTableUtils.MenuItemLabel.SortAscending",locale:{"de-DE":"In aufsteigender Reihenfolge sortieren","en-US":"Sort ascending","es-ES":"Orden ascendente","fr-FR":"Trier par ordre croissant","it-IT":"Ordinamento crescente","ja-JP":"昇順でソート","ko-KR":"오름차순으로 정렬","nl-NL":"Oplopend sorteren","pl-PL":"Sortuj rosnąco","pt-BR":"Classificar em ordem crescente","ru-RU":"Сортировка по возрастанию","sv-SE":"Sortera stigande","tr-TR":"Artan sıralama","zh-CN":"升序排序","zh-TW":"以遞增方式排序"}},NebulaTableUtils_MenuItemLabel_SortDescending:{id:"NebulaTableUtils.MenuItemLabel.SortDescending",locale:{"de-DE":"In absteigender Reihenfolge sortieren","en-US":"Sort descending","es-ES":"Orden descendente","fr-FR":"Trier par ordre décroissant","it-IT":"Ordinamento decrescente","ja-JP":"降順でソート","ko-KR":"내림차순으로 정렬","nl-NL":"Aflopend sorteren","pl-PL":"Sortuj malejąco","pt-BR":"Classificar em ordem decrescente","ru-RU":"Сортировка по убыванию","sv-SE":"Sortera fallande","tr-TR":"Azalan sıralama","zh-CN":"降序排序","zh-TW":"以遞減方式排序"}},NebulaTableUtils_Pagination_DisplayedRowsLabel:{id:"NebulaTableUtils.Pagination.DisplayedRowsLabel",locale:{"de-DE":"{0} von {1}","en-US":"{0} of {1}","es-ES":"{0} de {1}","fr-FR":"{0} sur {1}","it-IT":"{0} di {1}","ja-JP":"{0} / {1}","ko-KR":"{0}/{1}","nl-NL":"{0} van {1}","pl-PL":"{0} z {1}","pt-BR":"{0} de {1}","ru-RU":"{0} из {1}","sv-SE":"{0} av {1}","tr-TR":"{0} / {1}","zh-CN":"{0} / {1}","zh-TW":"{0} / {1}"}},NebulaTableUtils_Pagination_FirstPage:{id:"NebulaTableUtils.Pagination.FirstPage",locale:{"de-DE":"Zur ersten Seite","en-US":"Go to the first page","es-ES":"Ir a la primera página","fr-FR":"Accéder à la première page","it-IT":"Vai alla prima pagina","ja-JP":"最初のページに移動","ko-KR":"첫 페이지로 이동","nl-NL":"Ga naar de eerste pagina","pl-PL":"Przejdź do pierwszej strony","pt-BR":"Ir para a primeira página","ru-RU":"Перейти к первой странице","sv-SE":"Gå till första sidan","tr-TR":"İlk sayfaya git","zh-CN":"转到第一页","zh-TW":"移至第一頁"}},NebulaTableUtils_Pagination_LastPage:{id:"NebulaTableUtils.Pagination.LastPage",locale:{"de-DE":"Zur letzten Seite","en-US":"Go to the last page","es-ES":"Ir a la última página","fr-FR":"Accéder à la dernière page","it-IT":"Vai all'ultima pagina","ja-JP":"最後のページに移動","ko-KR":"마지막 페이지로 이동","nl-NL":"Ga naar de laatste pagina","pl-PL":"Przejdź do ostatniej strony","pt-BR":"Ir para a última página","ru-RU":"Перейти к последней странице","sv-SE":"Gå till sista sidan","tr-TR":"Son sayfaya git","zh-CN":"转到最后一页","zh-TW":"移至最後一頁"}},NebulaTableUtils_Pagination_NextPage:{id:"NebulaTableUtils.Pagination.NextPage",locale:{"de-DE":"Zur nächsten Seite","en-US":"Go to the next page","es-ES":"Ir a la página siguiente","fr-FR":"Accéder à la page suivante","it-IT":"Vai alla pagina successiva","ja-JP":"次のページに移動","ko-KR":"다음 페이지로 이동","nl-NL":"Ga naar de volgende pagina","pl-PL":"Przejdź do następnej strony","pt-BR":"Ir para a próxima página","ru-RU":"Перейти к следующей странице","sv-SE":"Gå till nästa sida","tr-TR":"Sonraki sayfaya git","zh-CN":"转到下一页","zh-TW":"移至下一頁"}},NebulaTableUtils_Pagination_PreviousPage:{id:"NebulaTableUtils.Pagination.PreviousPage",locale:{"de-DE":"Zur vorherigen Seite","en-US":"Go to the previous page","es-ES":"Ir a la página anterior","fr-FR":"Accéder à la page précédente","it-IT":"Vai alla pagina precedente","ja-JP":"前のページに移動","ko-KR":"이전 페이지로 이동","nl-NL":"Ga naar de vorige pagina","pl-PL":"Przejdź do poprzedniej strony","pt-BR":"Ir para a página anterior","ru-RU":"Перейти к предыдущей странице","sv-SE":"Gå till föregående sida","tr-TR":"Önceki sayfaya git","zh-CN":"转到前一页","zh-TW":"移至上一頁"}},NebulaTableUtils_Pagination_RowsPerPage:{id:"NebulaTableUtils.Pagination.RowsPerPage",locale:{"de-DE":"Zeilen pro Seite","en-US":"Rows per page","es-ES":"Filas por página","fr-FR":"Lignes par page","it-IT":"Righe per pagina","ja-JP":"ページあたりの行数","ko-KR":"페이지별 행 수","nl-NL":"Rijen per pagina","pl-PL":"Wierszy na stronę","pt-BR":"Linhas por página","ru-RU":"Строк на странице","sv-SE":"Rader per sida","tr-TR":"Sayfa başına satır sayısı","zh-CN":"每页行数","zh-TW":"每頁列數"}},NebulaTableUtils_Pagination_SelectPage:{id:"NebulaTableUtils.Pagination.SelectPage",locale:{"de-DE":"Seite auswählen","en-US":"Select page","es-ES":"Seleccionar página","fr-FR":"Sélectionner une page","it-IT":"Seleziona pagina","ja-JP":"ページを選択","ko-KR":"페이지 선택","nl-NL":"Pagina selecteren","pl-PL":"Wybierz stronę","pt-BR":"Selecionar página","ru-RU":"Выберите страницу","sv-SE":"Välj sida","tr-TR":"Sayfa seç","zh-CN":"选择页面","zh-TW":"選取頁面"}}};const Bz=({translator:e})=>(v(()=>{!function(e){if(e&&e.get&&e.add){const t="NebulaTableUtils.MenuGroupLabel.Sorting";if(e.get(t)!==t)return;Object.keys(Vz).forEach(t=>{e.add(Vz[t])})}}(e)},[e]),e),Gz={width:"100%",height:"100%",color:"transparent",background:"transparent",borderColor:"transparent"},Uz={border:0,boxShadow:"none",borderRadius:0,outline:0,width:0,height:0,background:"transparent",cursor:"pointer",visibility:"hidden"},Yz=Sl("input",{shouldForwardProp:e=>"isLastColumn"!==e&&"hoverColor"!==e})(({isLastColumn:e,hoverColor:t,dir:n})=>({position:"absolute",display:"flex",height:"100%",top:0,marginLeft:"-4px",marginRight:"rtl"===n?"-4px":void 0,touchAction:"none",cursor:"col-resize",pointerEvents:"auto",width:(e?4:9)+"px",justifyContent:e?"flex-end":"center",outline:"none",appearance:"none",WebkitAppearance:"none",backgroundColor:"transparent","&::-webkit-slider-runnable-track":{...Gz},"&::-moz-range-track":{...Gz},"&::-ms-track":{...Gz},"&::-webkit-slider-thumb":{appearance:"none",WebkitAppearance:"none",...Uz},"&::-moz-range-thumb":{...Uz},"&::-ms-thumb":{...Uz},"&:hover:not(:focus, :active)":{"&::after":{backgroundColor:t||"#D9D9D9","@media (hover: none)":{backgroundColor:"none"}}},"&:focus-visible, &:active":{"&::after":{backgroundColor:"#177fe6",borderLeft:"1px solid #fff",borderRight:e?void 0:"1px solid #fff"}},"&::after":{content:'""',height:"100%",width:"3px",position:"absolute"}})),Kz=({columnWidth:e,keyValue:t,isLastColumn:n,isPivot:r,hoverColor:i,updateWidthCallback:o,confirmWidthCallback:a,handleBlur:s,setIsAdjustingWidth:u,isLeftColumn:c,accessibilityRelatedArgs:d,direction:p="ltr"})=>{const f=Bz({translator:d.translator}),h=l({initWidth:e,columnWidth:e,initX:0}),m=n?0:1,g=r&&!c,v=()=>g?h.current.columnWidth-m:"100%",y={left:"rtl"!==p?v():void 0,right:"rtl"===p?v():void 0},b=t=>{h.current={initWidth:e,columnWidth:e,initX:t??h.current.initX}};Hz(()=>{g&&b()},[e]);const x=e=>{const t=Math.max(e,MT.PixelsMin);h.current.columnWidth=t,o(t)},S=()=>{if(h.current.columnWidth!==h.current.initWidth){const e={type:LT.Pixels,pixels:h.current.columnWidth};a(e)}u?.(!1)},w=e=>{const t="rtl"===p?h.current.initWidth+h.current.initX-e.clientX:h.current.initWidth+e.clientX-h.current.initX;x(t)},C=e=>{d_(e),document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",C),S()},E=e=>{const t="rtl"===p?h.current.initWidth+-h.current.initX-e.touches[0].clientX:h.current.initWidth+e.touches[0].clientX-h.current.initX;x(t)},I=e=>{d_(e),document.removeEventListener("touchmove",E),document.removeEventListener("touchend",I),S()},D=!r&&s?e=>{if(e.key===RT.Left||e.key===RT.Right){d_(e);const t=5,n=e.key===RT.Left?t:-t,r="rtl"===p?n:-n;u?.(!0),x(h.current.columnWidth+r)}else e.key===RT.Space||e.key===RT.Enter?(d_(e),s(e),u?.(!1),S()):e.key===RT.Esc&&(d_(e),s(e),u?.(!1),x(h.current.initWidth))}:void 0,R=f.get("NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",[String(d.columnLabel)]);return fo.jsx(Yz,{style:y,hoverColor:i,isLastColumn:n,className:PT,"data-testid":PT,onMouseDown:e=>{d_(e),document.addEventListener("mousemove",w),document.addEventListener("mouseup",C),u?.(!0),b(e.clientX)},onDoubleClick:()=>{a({type:LT.FitToContent})},onTouchStart:e=>{1===e.touches.length&&(d_(e),document.addEventListener("touchmove",E),document.addEventListener("touchend",I),u?.(!0),b(e.touches[0].clientX))},onKeyDown:D,onBlur:s,onFocus:()=>{b()},type:"range",tabIndex:-1,"aria-label":R,"aria-valuemin":MT.PixelsMin,"aria-valuemax":MT.PixelsMax,"aria-valuenow":Number(e.toFixed(1)),dir:p},t)},Xz=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M15 4H1V2h14zm0 10H1v-2h14zm0-5H1V7h14z"})})),Jz=Sl(sc,{shouldForwardProp:e=>"rightAligned"!==e&&"shouldShowMenuIcon"!==e&&"isAccessibleHeader"!==e})(({rightAligned:e,shouldShowMenuIcon:t,isAccessibleHeader:n})=>({...e?{marginRight:"auto"}:{marginLeft:"auto"},height:n?24:void 0,display:t?"flex":"none",fontWeight:"bold",width:n?"100%":void 0,alignItems:"center",justifyContent:"center"})),Zz=Sl(Xz,{shouldForwardProp:e=>"isInteractionsActive"!==e})(({isInteractionsActive:e})=>({minWidth:"unset",position:"relative",cursor:e?"pointer":"default"})),Qz=Sl(wp)(({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}})),eW=Sl(td)(({theme:e})=>({"&.MuiDivider-root":{margin:e.spacing(.5)}})),tW=Sl(Rp)(({theme:e})=>({fontSize:"12px",height:24,fontWeight:"bold",padding:`${e.spacing(.25,2)} !important`,marginBottom:e.spacing(.5)})),nW=Sl(Rp,{shouldForwardProp:e=>"isSubMenu"!==e&&"isActive"!==e})(({theme:e,isSubMenu:t,isActive:n})=>({width:`calc(220px - ${e.spacing(1)} - ${t?10:0}px)`,maxHeight:32,borderRadius:`${e.spacing(.5)} !important`,margin:`${e.spacing(.25,.5)} !important`,padding:`${e.spacing(1,1.5)} !important`,display:"flex !important",justifyContent:"space-between !important","&&:focus":{boxShadow:"rgb(23, 127, 230) 0px 0px 0px 2px"},position:"relative !important",overflow:"hidden",boxSizing:"border-box !important",background:n?"rgba(0, 0, 0, 0.05)":"transparent"})),rW=Sl("div",{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})(({theme:e,direction:t,isPagination:n})=>({position:"absolute",width:e.spacing(.5),height:16,left:0,right:n||"rtl"!==t?void 0:0,top:"50%",transform:"TranslateY(-50%)",borderRadius:"0 2px 2px 0",background:"#01873d"})),iW=Sl("div")(()=>({display:"flex",justifyContent:"space-between",alignItems:"center",maxWidth:"100%"})),oW=Sl(Cu)(()=>({fontFamily:'"Source Sans Pro", HelveticaNeue, "Helvetica Neue", Helvetica, Arial, sans-serif',fontSize:"14px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"})),aW=Sl(Kd,{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})(({theme:e,direction:t,isPagination:n})=>({width:16,minWidth:"unset !important",marginRight:n||"rtl"!==t?e.spacing(1.5):0,marginLeft:n||"rtl"!==t?void 0:e.spacing(1.5),lineHeight:0})),sW=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M8.5 8 4 3.5 5.5 2l6 6-6 6L4 12.5z"})})),lW=e=>{const t=e.nextElementSibling;return t?"HR"===t.tagName?lW(t):t:e.parentElement?.children?.[0]},uW=e=>{const t=e.previousElementSibling;if(!t){const t=e.parentElement?.children?.length;return e.parentElement?.children?.[t-1]}return"HR"===t.tagName?uW(t):t},cW=e=>{const{key:t,currentTarget:n}=e,r=document.activeElement??n;if(t===RT.Down||t===RT.Up){const n=e=>t===RT.Down?lW(e):uW(e);e.preventDefault(),e.stopPropagation();let i=n(r);for(;i;){if("true"!==i.ariaDisabled){i.focus();break}i=n(i)}}},dW=(e,t)=>e.map(e=>e.map(e=>({...e.groupHeading?{groupHeading:e.groupHeading}:{},items:e.items.map(({onClick:e,...n})=>({...n,...e?{onClick:async n=>{Object.entries(t).forEach(([,e])=>{e(!1)}),await e(n)}}:{}}))})));let pW={};const fW=({autoFocus:e,id:t,onClick:r,itemTitle:i,icon:o,enabled:a,subMenus:s,isSubMenu:l,isActive:u,direction:c,isPagination:d})=>{const[p,h]=m(!1),g=n.useRef(null),v=f(e=>{e.stopPropagation(),h(!1)},[h]);return fo.jsxs(fo.Fragment,{children:[fo.jsxs(nW,{ref:s?g:null,"data-testid":`menu-item-${t}`,className:"nebula-table-utils-head-menu-item",onClick:async e=>{"keyup"!==e.type&&(r&&(await r(e),pW={}),s?.length&&(h(!0),pW[i]=h,e.stopPropagation()))},disabled:!a,autoFocus:e,isSubMenu:!!l,isActive:!!u,onKeyDown:cW,children:[u?fo.jsx(rW,{direction:c,isPagination:d}):null,fo.jsxs(iW,{children:[fo.jsx(aW,{direction:c,isPagination:d,children:fo.jsx(o,{})}),fo.jsx(oW,{variant:"body2",children:i})]}),s?.length?fo.jsx(sW,{}):null]},t),s?.length?fo.jsx(vW,{isSubMenu:!0,open:p,anchorEl:g.current,onClose:v,menuGroups:dW(s,pW),transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},direction:c,isPagination:d}):null]})},hW=({menuGroup:e,isSubMenu:t,direction:n,isPagination:r})=>e.map(e=>[[e.groupHeading&&fo.jsx(tW,{disabled:!0,style:{opacity:1},children:e.groupHeading},e.groupHeading),e.items.map(e=>fo.jsx(fW,{...e,isSubMenu:t,direction:n,isPagination:r},e.id))].filter(Boolean)]),mW=({itemGroups:e,isSubMenu:t,direction:n,isPagination:r})=>e.map((i,o)=>[hW({menuGroup:i,isSubMenu:t,direction:n,isPagination:r}),o<e.length-1?fo.jsx(eW,{"data-testid":"group-divider",variant:"middle"}):void 0]),gW={appear:0,enter:0,exit:0},vW=({anchorEl:e,open:t,onClose:n,menuGroups:r,transformOrigin:i,anchorOrigin:o,isSubMenu:a,direction:s,isPagination:l})=>r.length?fo.jsx(Qz,{className:"nebula-table-utils-head-menu",open:t,anchorEl:e,onClose:n,transitionDuration:gW,MenuListProps:{id:"nebula-table-utils-head-menu-list-id"},...o?{anchorOrigin:o}:{},...i?{transformOrigin:i}:{},dir:s,children:mW({itemGroups:r,isSubMenu:a,direction:s,isPagination:l})}):null,yW=(e,t)=>e.some(e=>t[e]>0),bW={canSelectAll:!1,canClearSelections:!1,canSelectPossible:!1,canSelectAlternative:!1,canSelectExcluded:!1},xW=({open:e,qStateName:t="$",headerData:n,app:r})=>{const[i,o]=m(null),[a,s]=m(bW);return Hz(()=>{e||(s(bW),o(null))},[e]),d(()=>{if(!r?.createSessionObject||!n.isDim||!e)return()=>{};let i,a=!1;const l=()=>{i&&r.destroySessionObject(i)};return(async()=>{try{const e=((e,t)=>({qInfo:{qType:"tableListbox"},qListObjectDef:Boolean(t.qLibraryId)?{qLibraryId:t.qLibraryId,qStateName:e}:{qDef:{qFieldDefs:[t.fieldId]},qStateName:e}}))(t,n),u=await r.createSessionObject(e),c=await u.getLayout(),{qStateCounts:d}=c.qListObject?.qDimensionInfo??{};i=c.qInfo?.qId,a?l():(o(u),d&&s((e=>({canSelectAll:yW(["qOption","qAlternative","qExcluded","qDeselected"],e),canClearSelections:yW(["qSelected"],e),canSelectPossible:yW(["qOption"],e),canSelectAlternative:yW(["qAlternative"],e),canSelectExcluded:yW(["qAlternative","qExcluded"],e)}))(d)))}catch(e){console.error(e)}})(),()=>{a=!0,l()}},[e,r,n,t]),{fieldInstance:i,selectionActionsEnabledStatus:a}},SW=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M3.5 1.793 6.207 4.5l-.707.707-1.5-1.5V14H3V3.707l-1.5 1.5L.793 4.5zM8 4h5v1H8zm0 3h6v1H8zm0 3h7v1H8z"})})),wW=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M1 14.5a.5.5 0 0 0 .5.5H3v1H1.5A1.5 1.5 0 0 1 0 14.5V13h1zm9 1.5H6v-1h4zm5.354-8.646L12.707 10l2.646 2.646-.707.707L12 10.708l-2.646 2.646-.708-.707L11.293 10 8.646 7.354l.708-.708L12 9.293l2.646-2.647zM1 10H0V6h1zm2-9H1.5a.5.5 0 0 0-.5.5V3H0V1.5A1.5 1.5 0 0 1 1.5 0H3zm11.5-1A1.5 1.5 0 0 1 16 1.5V3h-1V1.5a.5.5 0 0 0-.5-.5H13V0zM10 1H6V0h4z"})})),CW=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M3.914 8h8.207L10.5 6.379l.707-.708L14.036 8.5l-2.829 2.828-.707-.707L12.12 9H3.914l1.621 1.621-.707.707L2 8.5l2.828-2.828.707.707zM15 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zm0 13V2h-2v3h-1V2H4v3H3V2H1v12h2v-2h1v2h8v-2h1v2z"})})),EW=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M3 2h1v10.293l1.5-1.5.707.707L3.5 14.207.793 11.5l.707-.707 1.5 1.5zm12 2H8v1h7zM8 7h6v1H8zm5 3H8v1h5z"})})),IW=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M.5 4.774v6.452a2 2 0 0 0 1.154 1.813l5.5 2.566a2 2 0 0 0 1.692 0l5.5-2.566a2 2 0 0 0 1.154-1.813V4.774a2 2 0 0 0-1.154-1.813L8.846.395a2 2 0 0 0-1.692 0l-5.5 2.566A2 2 0 0 0 .5 4.774m1 0v-.032l6 2.428v7.493l-5.423-2.53a1 1 0 0 1-.577-.907zm.545-.89.032-.016 5.5-2.567a1 1 0 0 1 .846 0l5.5 2.567.032.015L8 6.293zm12.455.858v6.484a1 1 0 0 1-.577.906L8.5 14.663V7.17z"})})),DW=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8z"})})),RW=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8zM8.5 4v8h-1V4z"})})),PW=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M1 8a7 7 0 1 1 10 6.326V11h-1v5h5v-1h-3.124A8 8 0 1 0 8 16v-1a7 7 0 0 1-7-7"})})),MW=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M9.057 11.164a6 6 0 1 1 2.112-2.116 1 1 0 0 1 .052.044l4.176 4.08a1 1 0 0 1 .009 1.422l-.707.707a1 1 0 0 1-1.406.008l-4.185-4.087a1 1 0 0 1-.05-.058ZM10.5 6a4.5 4.5 0 1 0-9 0 4.5 4.5 0 0 0 9 0"})})),LW=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M3 4v1H1v10h10v-2h1v2a1 1 0 0 1-.883.993L11 16H1a1 1 0 0 1-.993-.883L0 15V5a1 1 0 0 1 .883-.993L1 4zm12-4a1 1 0 0 1 .993.883L16 1v10a1 1 0 0 1-.883.993L15 12H5a1 1 0 0 1-.993-.883L4 11V1a1 1 0 0 1 .883-.993L5 0zm0 1H5v10h10zm-2.36 2.653.72.694L9.143 8.72 6.64 6.125l.72-.694L9.143 7.28z"})})),AW=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 4v8l8-8zm0-1h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})})),kW=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 3h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})})),OW=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 4v8h8V4zm0-1h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})})),qW=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M1 1.5a.5.5 0 0 1 .5-.5H3V0H1.5A1.5 1.5 0 0 0 0 1.5V3h1zM14.5 1a.5.5 0 0 1 .5.5V3h1V1.5A1.5 1.5 0 0 0 14.5 0H13v1zM1 14.5a.5.5 0 0 0 .5.5H3v1H1.5A1.5 1.5 0 0 1 0 14.5V13h1zm14 0a.5.5 0 0 1-.5.5H13v1h1.5a1.5 1.5 0 0 0 1.5-1.5V13h-1zM6 0h4v1H6zM0 6h1v4H0zm15 0h1v4h-1zm-9 9h4v1H6z"})}));let TW=function(e){return e.Sorting="sorting",e.Searching="searching",e.Selections="selections",e.AdjusterHeaderSize="adjustHeaderSize",e}({});const NW="/qListObjectDef",jW=({headerData:e,translator:t,menuAvailabilityFlags:n,setOpen:r,sortFromMenu:i,interactions:o,embedListbox:a,fieldInstance:s,selectionActionsEnabledStatus:l,anchorRef:u,focusColumnAdjuster:c,setActiveFieldCallback:d,expandOrCollapseArgs:p})=>{const f=[];if(n[TW.Sorting]){const{isActivelySorted:n,sortDirection:o}=e,{ascendingEnabled:a,descendingEnabled:s}=(({isActivelySorted:e,sortDirection:t,isPivot:n,isSortedByFirstMeasure:r})=>{let i=!n&&!e||"D"===t,o=!n&&!e||"A"===t;return r&&(i=!1,o=!1),{ascendingEnabled:i,descendingEnabled:o}})(e);f.push([{groupHeading:t.get("NebulaTableUtils.MenuGroupLabel.Sorting"),items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortAscending"),onClick:async e=>{e.stopPropagation(),await(i?.(e,"A")),r(!1)},icon:SW,enabled:a,isActive:!!n&&"A"===o,autoFocus:a},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortDescending"),onClick:async e=>{e.stopPropagation(),await(i?.(e,"D")),r(!1)},icon:EW,enabled:s,isActive:!!n&&"D"===o,autoFocus:!a&&s}]}])}if(e.isCyclic&&d){const t=[];t.push([{items:[{id:1,itemTitle:e.groupDimensionLabels[e.groupDimensionPos],enabled:!0,icon:PW,subMenus:[[{items:e.groupDimensionLabels.map((t,n)=>({id:n+1,itemTitle:t,onClick:async e=>{e.stopPropagation(),r(!1),d(n)},enabled:!0,icon:IW,isActive:e.groupDimensionPos===n}))}]]}]}]),t.length>0&&f.push(...t)}if(e.isDim&&o?.select){const i=[];n[TW.Searching]&&i.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Search"),onClick:e=>{e.stopPropagation(),r(!1),a()},icon:MW,enabled:!0}]}]),!e.isLocked&&n[TW.Selections]&&i.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Selections"),icon:qW,enabled:!!s,subMenus:[[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAll"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectAll(NW))},icon:LW,enabled:l.canSelectAll},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectPossible"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectPossible(NW))},icon:OW,enabled:l.canSelectPossible},{id:3,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAlternative"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectAlternative(NW))},icon:AW,enabled:l.canSelectAlternative},{id:4,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectExcluded"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectExcluded(NW))},icon:kW,enabled:l.canSelectExcluded}]}],[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.ClearSelections"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.clearSelections(NW))},icon:wW,enabled:l.canClearSelections}]}]]}]}]),p&&!p.alwaysFullyExpanded&&f.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Expand"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await p.expandCallback()},icon:RW,enabled:!0},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Collapse"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await p.collapseCallback()},icon:DW,enabled:!0}]}]),i.length>0&&f.push(...i)}return n[TW.AdjusterHeaderSize]&&f.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.AdjustColumnSize"),onClick:e=>{e.stopPropagation(),e.preventDefault(),r(!1),c?.(u)},icon:CW,enabled:!0}]}]),f},_W=({open:e,setOpen:t,anchorRef:n,headerData:r,translator:i,interactions:o,menuAvailabilityFlags:a,shouldShowMenuIcon:s=!0,sortRelatedArgs:u,searchRelatedArgs:c,selectionRelatedArgs:d,adjustHeaderSizeRelatedArgs:p,expandOrCollapseArgs:h,model:m,direction:g="ltr",isPagination:v,isAccessibleHeader:y,iconSize:b=ET})=>{const x=l(null),S=Bz({translator:i}),{qLibraryId:w,fieldId:C,headTextAlign:E}=r,I=d?.app,{fieldInstance:D,selectionActionsEnabledStatus:R}=xW({open:e,headerData:r,app:I,qStateName:d?.qStateName}),P=(({model:e,headerData:t})=>{if(e&&"setActiveField"in e&&void 0!==t.dimensionInfoIndex){const n=t.dimensionInfoIndex;return async t=>{try{await e.setActiveField("/qHyperCubeDef",n,t)}catch(e){console.error(e)}}}return null})({model:m,headerData:r}),M=(({qLibraryId:e,fieldId:t,searchRelatedArgs:n,selectionRelatedArgs:r,direction:i,onPopoverClose:o})=>f(()=>{const a=e?{qLibraryId:e,type:"dimension"}:t;if(n?.embed){const{embed:e,listboxRef:t}=n;e.__DO_NOT_USE__.popover(t.current,a,{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"rtl"===i?"right":"left"},sortCriteria:n.sortCriteria,stateName:r?.qStateName,direction:i,onPopoverClose:o})}},[e,t,n,r?.qStateName,i,o]))({qLibraryId:w,fieldId:C,searchRelatedArgs:c,selectionRelatedArgs:d,direction:g}),L=f(e=>{e.stopPropagation(),t(!1)},[t]),A=f(e=>{e.stopPropagation(),t(e=>!e)},[t]);return o.active?fo.jsxs(Jz,{rightAligned:"right"===E,shouldShowMenuIcon:s,className:"nebula-table-utils-head-menu-wrapper",onClick:!1===y?A:void 0,ref:x,isAccessibleHeader:y,children:[s?fo.jsx(Zz,{height:b,className:IT,"data-testid":IT,isInteractionsActive:o.active??!1,children:fo.jsx(Xz,{})}):null,fo.jsx(vW,{open:e,anchorEl:!1===y?x.current:n.current,onClose:L,menuGroups:jW({headerData:r,translator:S,menuAvailabilityFlags:a,setOpen:t,...u,embedListbox:M,interactions:o,fieldInstance:D,selectionActionsEnabledStatus:R,anchorRef:n,focusColumnAdjuster:p?.focusColumnAdjuster,setActiveFieldCallback:P,expandOrCollapseArgs:h}),direction:g,isPagination:v})]}):null},FW=e=>e.isDark?{background:e.color,borderColor:mN.DARK_MODE_BORDER,color:mN.DARK_MODE_TEXT,disabledColor:mN.DARK_MODE_DISABLED,iconColor:mN.DARK_MODE_TEXT}:{background:e.color,borderColor:mN.BORDER_MEDIUM,color:mN.TEXT,disabledColor:mN.DISABLED},zW=Sl(sc,{shouldForwardProp:e=>"footerStyle"!==e})(({footerStyle:e,theme:t})=>({height:40,display:"flex",justifyContent:"flex-end",alignItems:"center",padding:t.spacing(0,1,0,1),color:e.color,background:e.background,borderTop:`1px solid ${e.borderColor}`})),WW=Sl(lf,{shouldForwardProp:e=>"footerStyle"!==e})(({footerStyle:e,theme:t})=>({background:"inherit",marginRight:t.spacing(1),color:e.color,"& .MuiNativeSelect-icon, .MuiNativeSelect-select":{color:e.iconColor}})),$W=Sl(vc,{shouldForwardProp:e=>"disabledCondition"!==e&&"footerStyle"!==e})(({disabledCondition:e,footerStyle:t,theme:n})=>({color:e?t.disabledColor:t.color,cursor:e?"default":"pointer",marginLeft:n.spacing(1)})),HW=Sl(Cu)(({theme:e})=>({color:"inherit",margin:e.spacing(0,1,0,1)})),VW=({children:e,footerContainer:t,interactions:n,theme:r,paginationNeeded:i=!0})=>{const o=v(()=>FW(r.background),[r]);if(!n.active)return null;const a=i?fo.jsx(zW,{footerStyle:o,children:e}):null;return t?E.createPortal(e,t):a},BW=u({}),GW=()=>h(BW),UW=({children:e,direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:i,isSelectionMode:o,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:u,keyboard:c,translator:d,theme:p,interactions:f,rect:h,layout:m,visibilityThreshold:g})=>{const y=(e=>!e.enabled||e.active)(c)?0:-1,b=v(()=>FW(p.background),[p]),x=i?i.getBoundingClientRect().width:h.width,S=Bz({translator:d}),w=v(()=>({direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:i,isSelectionMode:o,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:u,keyboard:c,translator:S,theme:p,interactions:f,rect:h,layout:m,footerStyle:b,tabIndex:y,width:x,visibilityThreshold:g}),[t,n,r,i,o,a,s,l,u,c,S,p,f,h,m,b,y,x,g]);return fo.jsx(BW.Provider,{value:w,children:e})};let YW=function(e){return e.FirstPage="FirstPage",e.LastPage="LastPage",e.NextPage="NextPage",e.PreviousPage="PreviousPage",e}({}),KW=function(e){return e[e.DisplayedRowsLabel=250]="DisplayedRowsLabel",e[e.FirstPage=350]="FirstPage",e[e.LastPage=350]="LastPage",e[e.RowsPerPage=550]="RowsPerPage",e[e.SelectPage=700]="SelectPage",e}({});const XW=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"m7 8 4.5 4.5L10 14 4 8l6-6 1.5 1.5z"})})),JW=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"m12 2 1.5 1.5L9 8l4.5 4.5L12 14 6 8zM4 2v12H2V2z"})})),ZW=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"m3.5 2 6 6-6 6L2 12.5 6.5 8 2 3.5zM14 2v12h-2V2z"})})),QW={FirstPage:JW,PreviousPage:XW,NextPage:sW,LastPage:ZW,FirstPageRTL:ZW,PreviousPageRTL:sW,NextPageRTL:XW,LastPageRTL:JW},e$=({disabledCondition:e,pageNumber:t,type:n})=>{const{direction:r,footerStyle:i,handleChangePage:o,translator:a,interactions:s,tabIndex:l}=GW(),u=n.concat("rtl"===r?"RTL":""),c=QW[u];return{styledProps:{footerStyle:i,disabledCondition:e,size:"small","data-testid":"pagination-action-icon-button","aria-disabled":e,"aria-label":a.get(`NebulaTableUtils.Pagination.${n}`),title:s.passive?a.get(`NebulaTableUtils.Pagination.${n}`):void 0,tabIndex:l,onClick:e?void 0:()=>{o(t)}},IconComponent:c}},t$=()=>{const{pageInfo:e,width:t,interactions:n,visibilityThreshold:r}=GW(),i=0===e.page,{IconComponent:o,styledProps:a}=e$({type:YW.FirstPage,disabledCondition:i,pageNumber:0});return t<=(r?.firstPage||KW.FirstPage)?null:fo.jsx($W,{...a,disabled:!n.active,children:fo.jsx(o,{height:ET})})},n$=(e,t,n=!1)=>{n&&e.key===RT.Tab&&!e.shiftKey&&(d_(e),((e,t,n)=>{const r=e.closest(".qv-object-wrapper")?.querySelector(".sel-toolbar-confirm")?.parentElement??document.querySelector("#qv-selection-toolbar-popover .sel-toolbar-confirm")?.parentElement;r?r.focus():t.focusSelection?.(n)})(e.target,t,!1))},r$=()=>{const{pageInfo:e,keyboard:t,totalPages:n,isSelectionMode:r,width:i,interactions:o,visibilityThreshold:a}=GW(),s=e.page>=n-1,{IconComponent:l,styledProps:u}=e$({type:YW.LastPage,disabledCondition:s,pageNumber:n-1}),c=t.enabled?e=>{n$(e,t,r)}:void 0;return i<=(a?.lastPage||KW.LastPage)?null:fo.jsx($W,{...u,onKeyDown:c,disabled:!o.active,children:fo.jsx(l,{height:ET})})},i$=()=>{const{pageInfo:e,keyboard:t,totalPages:n,isSelectionMode:r,width:i,interactions:o}=GW(),a=e.page>=n-1,{IconComponent:s,styledProps:l}=e$({type:YW.NextPage,disabledCondition:a,pageNumber:e.page+1}),u=!(i>KW.FirstPage&&i>KW.LastPage)&&t.enabled?e=>{n$(e,t,r)}:void 0;return fo.jsx($W,{...l,onKeyDown:u,disabled:!o.active,children:fo.jsx(s,{height:ET})})},o$=()=>{const{pageInfo:e,interactions:t}=GW(),n=0===e.page,{IconComponent:r,styledProps:i}=e$({type:YW.PreviousPage,disabledCondition:n,pageNumber:e.page-1});return fo.jsx($W,{...i,disabled:!t.active,children:fo.jsx(r,{height:ET})})},a$=()=>{const{translator:e,width:t,pageInfo:n,totalRowCount:r,visibilityThreshold:i}=GW(),{page:o,rowsPerPage:a}=n;if(t<=(i?.displayedRowsLabel||KW.DisplayedRowsLabel))return null;const s=e.get("NebulaTableUtils.Pagination.DisplayedRowsLabel",[`${o*a+1} - ${Math.min((o+1)*a,r)}`,r.toString()]);return fo.jsx(HW,{variant:"caption",dir:"ltr",children:s})},s$=({name:e,value:t,options:n,handleChange:r})=>{const{layout:i,footerStyle:o,translator:a,tabIndex:s,interactions:l}=GW(),u=i.qInfo.qId,c=a.get(`NebulaTableUtils.Pagination.${e}`),d=`${e}-dropdown`,p=`${d}-label-${u}`,f={tabIndex:s,id:`${d}-${u}`,"data-testid":d,"aria-labelledby":p};return fo.jsxs(fo.Fragment,{children:[fo.jsxs(HW,{variant:"caption",id:p,children:[c,":"]}),fo.jsx(WW,{footerStyle:o,size:"small",native:!0,value:t,onChange:r,inputProps:f,disabled:!l.active,children:n})]})},l$=()=>{const{pageInfo:e,isSelectionMode:t,totalColumnCount:n,width:r,handleChangeRowsPerPage:i,visibilityThreshold:o}=GW();if(!(!!e.rowsPerPageOptions?.length&&!t&&r>(o?.rowsPerPage||KW.RowsPerPage)&&n<=100)||void 0===e.rowsPerPageOptions)return null;const a=fo.jsx(fo.Fragment,{children:e.rowsPerPageOptions.map(e=>fo.jsx("option",{value:e,children:e},e))});return fo.jsx(s$,{name:"RowsPerPage",value:e.rowsPerPage,options:a,handleChange:e=>{i?.(+e.target.value)}})},u$=1e3,c$="…",d$=({totalPages:e,page:t})=>{const n=Math.min(e,u$),r=n<e&&t>500,i=r?Math.min(500+t,e):n,o=r?Math.max(0,i-u$):0,a=Array.from(Array(n).keys()).map(e=>{const t=e+o;return fo.jsx("option",{value:t,children:t+1},t)});return o>0&&a.unshift(fo.jsx("option",{value:c$,disabled:!0,children:c$},"startMoreOptions")),i<e-1&&a.push(fo.jsx("option",{value:c$,disabled:!0,children:c$},"endMoreOptions")),fo.jsx(fo.Fragment,{children:a})},p$=()=>{const{pageInfo:e,width:t,totalPages:n,handleChangePage:r,visibilityThreshold:i}=GW(),{page:o}=e;if(t<=(i?.selectPage||KW.SelectPage))return null;const a=fo.jsx(d$,{totalPages:n,page:o});return fo.jsx(s$,{name:"SelectPage",value:o,options:a,handleChange:e=>{r(+e.target.value)}})};var f$=b(e=>fo.jsxs(UW,{...e,children:[fo.jsx(l$,{}),fo.jsx(p$,{}),fo.jsx(a$,{}),fo.jsx(t$,{}),fo.jsx(o$,{}),fo.jsx(i$,{}),fo.jsx(r$,{})]}));const h$=e=>fo.jsx(VW,{...e,children:fo.jsx(f$,{...e})}),m$=u({}),g$=()=>h(m$),v$=({rect:e,pageInfo:t,qPivotDataPages:n,updatePageInfo:r,direction:i,children:o})=>{const a=v(()=>({rect:e,pageInfo:t,qPivotDataPages:n,updatePageInfo:r,direction:i}),[e,t,n,r,i]);return fo.jsx(m$.Provider,{value:a,children:o})},y$=u({}),b$=()=>h(y$),x$=({app:e,model:t,theme:n,embed:r,keyboard:i,translator:o,interactions:a,env:s,children:l})=>{const u=v(()=>({model:t,app:e,interactions:a,embed:r,theme:n,keyboard:i,env:s,translator:o}),[e,a,t,r,n,i,s,o]);return fo.jsx(y$.Provider,{value:u,children:l})},S$=u({}),w$=()=>h(S$),C$=({children:e,...t})=>fo.jsx(S$.Provider,{value:t,children:e}),E$=()=>{const{text:e,fontFamily:t,fontSize:n,justifyContent:r,alignItems:i,height:o}=(()=>{const{theme:e,translator:t}=b$(),{layoutService:n}=w$(),r=e.getStyle("","","fontFamily")??rz;return n.hasData?n.hasLimitedData?{text:t.get("SNPivotTable.LimitedData"),fontSize:"13px",fontFamily:r,alignItems:"center",height:"22px"}:{}:{text:t.get("SNPivotTable.NoData"),fontSize:"16px",fontFamily:r,justifyContent:"center",alignItems:"center",height:"100%"}})();return void 0===e?null:fo.jsx("div",{style:{display:"flex",justifyContent:r,alignItems:i,width:"100%",height:o},children:fo.jsx("span",{style:{...pz,fontFamily:t,fontSize:n,fontStyle:"italic",color:"#7b7a78"},children:e})})},I$="/qHyperCubeDef",D$=-1,R$="PSEUDO-DIM",P$=e=>e===D$?R$:(({cId:e})=>e??X_())(e),M$=({layoutService:e,visibleLeftDimensionInfos:t,cell:n,colIdx:r})=>{n&&(n.canBeResized=!0,n.colIdx=n.colIdx||r,n.dimensionInfoIndex===D$?n.columnWidthLocation=TF.Measures:n.isLeftDimension?n.columnWidthLocation=TF.Dimension:t.at(-1)===D$?n.columnWidthLocation=TF.Measures:e.hasPseudoDimOnLeft&&(n.columnWidthLocation=TF.Pivot))},L$=(e,t,n,r)=>{const i=P$(n),o=e.getDimensionInfoIndex(n),a=e.isLeftDimension(o);return n===D$?{id:i,colIdx:-1,label:"",sortDirection:"A",fieldId:"",isLocked:!1,isDim:!1,isCyclic:!1,groupDimensionPos:0,groupDimensionLabels:[],headTextAlign:"left",dimensionInfoIndex:o,canBeResized:!1,isLeftDimension:a,isLastDimension:r,columnWidthLocation:TF.Measures,isPivot:!0,qEffectiveDimensionName:void 0}:{id:i,colIdx:0,label:n.qFallbackTitle??"",qReverseSort:n.qReverseSort,sortDirection:n.qSortIndicator&&"N"!==n.qSortIndicator?n.qSortIndicator:"A",qLibraryId:n.qLibraryId,fieldId:n.qGroupFieldDefs[n.qGroupPos],isLocked:n.qLocked??!1,columnWidth:n.columnWidth,qApprMaxGlyphCount:n.qApprMaxGlyphCount,isDim:!0,isCyclic:n.qGrouping===OT.Cyclic,groupDimensionPos:n.qGroupPos,groupDimensionLabels:n.qGroupFallbackTitles,headTextAlign:"left",dimensionInfoIndex:o,canBeResized:!1,isLeftDimension:a,isLastDimension:r,columnWidthLocation:TF.Dimension,isPivot:!0,isSortedByFirstMeasure:t.isSortedByFirstMeasure,qEffectiveDimensionName:n.qEffectiveDimensionName}},A$=({layoutService:e,effectivePropertiesService:t,lastRow:n,lastCol:r})=>{let i=r;var o;n.length>0&&(i=(o=r).at(-1)===D$?o.slice(0,-1):o);const a=i.length+(n.length?1:0),s=Math.max(1,n.length),l=((e,t)=>Array(e).fill(null).map(()=>Array.from({length:t},()=>null)))(a,s);return n.forEach((n,r,i)=>{const o=r===i.length-1;l[a-1][r]=L$(e,t,n,o)}),i.forEach((n,r,i)=>{const o=r===i.length-1;l[r][s-1]=L$(e,t,n,o)}),l},k$=(e,t,n,r)=>{const i=((e,t,n,r)=>{let i;return i=0===n.length||n.includes(D$)?A$({layoutService:e,effectivePropertiesService:t,lastRow:r,lastCol:n}):(e=>e[0].map((t,n)=>e.map(e=>e[n])))(A$({layoutService:e,effectivePropertiesService:t,lastRow:n,lastCol:r})),e.isIndentModeEnabled&&i[i.length-1].length>1&&(i[i.length-1]=[i.at(-1),...new Array(i[0]?i[0].length-1:0).fill(null)]),i.length&&i.at(-1)?.forEach((t,n)=>{Array.isArray(t)?t.forEach((t,n)=>{M$({layoutService:e,visibleLeftDimensionInfos:r,cell:t,colIdx:n})}):M$({layoutService:e,visibleLeftDimensionInfos:r,cell:t,colIdx:n})}),i})(e,t,n,r);return{data:i,size:{x:i[0]?.length??0,y:i.length}}};var O$={fromSearchString:function(e){if(!e)return[];"?"===e[0]&&(e=e.substr(1));const t=[];return e.split("&").forEach(e=>{if(!e)return;const n=e.indexOf("=");let r,i="",o=!1;-1===n?r=e:(r=e.slice(0,n),i=e.slice(n+1),o=!0),t.push(function(e,t,n){return{key:T$(e),value:T$(t.replace(/%2B/g,"shouldNotDecodePlus")),useEqualSign:n}}(r,i,o))}),t}},q$=O$;function T$(e){try{return decodeURIComponent(e)}catch{return e}}function N$(e){if(!(this instanceof N$))throw new Error("Url needs to be called with the new keyword");if(!e)throw new Error("Url needs a string to operate on");const t=function(e){const t={authorityAndPath:"",search:"",hash:""};let n=e.indexOf("#");-1!==n&&(t.hash=e.substr(n),e=e.substr(0,n));n=e.indexOf("?"),-1!==n&&(t.search=e.substr(n),e=e.substr(0,n));return t.authorityAndPath=e,t}(e);Object.defineProperties(this,{authorityAndPath:{value:t.authorityAndPath},search:{value:t.search},hash:{value:t.hash},searchParams:{get:()=>q$.fromSearchString(t.search)}})}function j$(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/shouldNotDecodePlus/gi,"%2B")}N$.encodeAuthorityAndPath=function(e){return encodeURI(e).replace(/%5B/gi,"[").replace(/%5D/gi,"]").replace(/%25/gi,"%")},N$.encodeSearchParams=function(e){let t,n="";for(let r=0;r<e.length;r++)t=e[r],n+=0===r?"?":"&",n+=j$(t.key),t.value?n+=`=${j$(t.value)}`:n+=t.useEqualSign?"=":"";return n};var _$=N$;var F$,z$=class{_hasNext(){return null!=this._input&&(0!==this._input.length&&this._index<this._input.length)}constructor(e){this._input=e,this._pushback=null,this._temp=null,this._index=0,this._mark=0}pushback(e){this._pushback=e}index(){return this._index}hasNext(){return null!=this._pushback||this._hasNext()}next(){if(null!=this._pushback){const e=this._pushback;return this._pushback=null,e}return this._hasNext()?this._input.charAt(this._index++):null}nextHex(){const e=this.next();return null==e?null:e.match(/[0-9A-Fa-f]/)?e:null}peek(e){return e?!(!this._pushback||this._pushback!==e)||!!this._hasNext()&&this._input.charAt(this._index)===e:this._pushback?this._pushback:this._hasNext()?this._input.charAt(this._index):null}mark(){this._temp=this._pushback,this._mark=this._index}reset(){this._pushback=this._temp,this._index=this._mark}remainder(){let e=this._input.substr(this._index);return null!=this._pushback&&(e=this._pushback+e),e}},W$=class{decode(e){let t="";const n=new z$(e);let r;for(;n.hasNext();)r=this.decodeCharacter(n),t+=null!=r?r:n.next();return t}decodeCharacter(e){return e.next()}},$$=e=>e>=0&&e<=1114111,H$=e=>e.match(/[\s]/),V$=class extends W${decodeCharacter(e){e.mark();const t=e.next();let n,r,i;if(null==t||"\\"!==t)return e.reset(),null;const o=e.next();if(null==o)return e.reset(),null;switch(o){case"\r":e.peek("\n")&&e.next();case"\n":case"\f":case"\0":return this.decodeCharacter(e)}if("NaN"===parseInt(o,16))return o;for(n=o,r=0;r<5&&(i=e.next(),null!=i&&!H$(i));r++){if("NaN"===parseInt(i,16)){e.pushback(i);break}n+=i}const a=parseInt(n,16);return $$(a)?String.fromCharCode(a):"�"}},B$=class e{constructor(e,t){this._key=e,this._value=t}getKey(){return this._key}getValue(){return this._value}equals(t){return t instanceof e&&(this._key===t._key&&this._value===t._value)}static newInstanceIfNeeded(){let t,n,r=arguments[0];return"string"==typeof arguments[1]?(t=arguments[1],n=r.length):(n=arguments[1],t=arguments[2]),t&&r?(r.length>n&&(r=r.substr(0,n)),new e(r,t)):null}},G$=class e{setValue(e){this._nextMap=null,this._value=e}getNextNode(e){return this._nextMap?this._nextMap[e]:null}put(t,n,r){let i,o;if(t.length===n)return o=this._value,this.setValue(r),o;const a=t.charAt(n);return this._nextMap?(i=this._nextMap[a],i||(i=new e,this._nextMap[a]=i)):(this._nextMap={},i=new e,this._nextMap[a]=i),i.put(t,n+1,r)}get(e,t){if(e.length<=t)return this._value;const n=this.getNextNode(e.charAt(t));return n?n.get(e,t+1):null}getLongestMatch(e,t){if(e.length<=t)return B$.newInstanceIfNeeded(e,this._value);const n=this.getNextNode(e.charAt(t));if(!n)return B$.newInstanceIfNeeded(e,t,this._value);const r=n.getLongestMatch(e,t+1);return r||B$.newInstanceIfNeeded(e,t,this._value)}},U$=class{constructor(){this.clear()}getLongestMatch(e){return this.root&&e?this.root.getLongestMatch(e,0):null}getMaxKeyLength(){return this.maxKeyLen}clear(){this.root=null,this.maxKeyLen=0,this.size=0}put(e,t){this.root||(this.root=new G$);const n=this.root.put(e,0,t);return n||(e.length>this.maxKeyLen&&(this.maxKeyLen=e.length),this.size++,null)}},Y$=(()=>{const e=[],t=[],n=new U$;let r,i,o;for(r in e["&quot"]="34",e["&amp"]="38",e["&lt"]="60",e["&gt"]="62",e["&nbsp"]="160",e["&iexcl"]="161",e["&cent"]="162",e["&pound"]="163",e["&curren"]="164",e["&yen"]="165",e["&brvbar"]="166",e["&sect"]="167",e["&uml"]="168",e["&copy"]="169",e["&ordf"]="170",e["&laquo"]="171",e["&not"]="172",e["&shy"]="173",e["&reg"]="174",e["&macr"]="175",e["&deg"]="176",e["&plusmn"]="177",e["&sup2"]="178",e["&sup3"]="179",e["&acute"]="180",e["&micro"]="181",e["&para"]="182",e["&middot"]="183",e["&cedil"]="184",e["&sup1"]="185",e["&ordm"]="186",e["&raquo"]="187",e["&frac14"]="188",e["&frac12"]="189",e["&frac34"]="190",e["&iquest"]="191",e["&Agrave"]="192",e["&Aacute"]="193",e["&Acirc"]="194",e["&Atilde"]="195",e["&Auml"]="196",e["&Aring"]="197",e["&AElig"]="198",e["&Ccedil"]="199",e["&Egrave"]="200",e["&Eacute"]="201",e["&Ecirc"]="202",e["&Euml"]="203",e["&Igrave"]="204",e["&Iacute"]="205",e["&Icirc"]="206",e["&Iuml"]="207",e["&ETH"]="208",e["&Ntilde"]="209",e["&Ograve"]="210",e["&Oacute"]="211",e["&Ocirc"]="212",e["&Otilde"]="213",e["&Ouml"]="214",e["&times"]="215",e["&Oslash"]="216",e["&Ugrave"]="217",e["&Uacute"]="218",e["&Ucirc"]="219",e["&Uuml"]="220",e["&Yacute"]="221",e["&THORN"]="222",e["&szlig"]="223",e["&agrave"]="224",e["&aacute"]="225",e["&acirc"]="226",e["&atilde"]="227",e["&auml"]="228",e["&aring"]="229",e["&aelig"]="230",e["&ccedil"]="231",e["&egrave"]="232",e["&eacute"]="233",e["&ecirc"]="234",e["&euml"]="235",e["&igrave"]="236",e["&iacute"]="237",e["&icirc"]="238",e["&iuml"]="239",e["&eth"]="240",e["&ntilde"]="241",e["&ograve"]="242",e["&oacute"]="243",e["&ocirc"]="244",e["&otilde"]="245",e["&ouml"]="246",e["&divide"]="247",e["&oslash"]="248",e["&ugrave"]="249",e["&uacute"]="250",e["&ucirc"]="251",e["&uuml"]="252",e["&yacute"]="253",e["&thorn"]="254",e["&yuml"]="255",e["&OElig"]="338",e["&oelig"]="339",e["&Scaron"]="352",e["&scaron"]="353",e["&Yuml"]="376",e["&fnof"]="402",e["&circ"]="710",e["&tilde"]="732",e["&Alpha"]="913",e["&Beta"]="914",e["&Gamma"]="915",e["&Delta"]="916",e["&Epsilon"]="917",e["&Zeta"]="918",e["&Eta"]="919",e["&Theta"]="920",e["&Iota"]="921",e["&Kappa"]="922",e["&Lambda"]="923",e["&Mu"]="924",e["&Nu"]="925",e["&Xi"]="926",e["&Omicron"]="927",e["&Pi"]="928",e["&Rho"]="929",e["&Sigma"]="931",e["&Tau"]="932",e["&Upsilon"]="933",e["&Phi"]="934",e["&Chi"]="935",e["&Psi"]="936",e["&Omega"]="937",e["&alpha"]="945",e["&beta"]="946",e["&gamma"]="947",e["&delta"]="948",e["&epsilon"]="949",e["&zeta"]="950",e["&eta"]="951",e["&theta"]="952",e["&iota"]="953",e["&kappa"]="954",e["&lambda"]="955",e["&mu"]="956",e["&nu"]="957",e["&xi"]="958",e["&omicron"]="959",e["&pi"]="960",e["&rho"]="961",e["&sigmaf"]="962",e["&sigma"]="963",e["&tau"]="964",e["&upsilon"]="965",e["&phi"]="966",e["&chi"]="967",e["&psi"]="968",e["&omega"]="969",e["&thetasym"]="977",e["&upsih"]="978",e["&piv"]="982",e["&ensp"]="8194",e["&emsp"]="8195",e["&thinsp"]="8201",e["&zwnj"]="8204",e["&zwj"]="8205",e["&lrm"]="8206",e["&rlm"]="8207",e["&ndash"]="8211",e["&mdash"]="8212",e["&lsquo"]="8216",e["&rsquo"]="8217",e["&sbquo"]="8218",e["&ldquo"]="8220",e["&rdquo"]="8221",e["&bdquo"]="8222",e["&dagger"]="8224",e["&Dagger"]="8225",e["&bull"]="8226",e["&hellip"]="8230",e["&permil"]="8240",e["&prime"]="8242",e["&Prime"]="8243",e["&lsaquo"]="8249",e["&rsaquo"]="8250",e["&oline"]="8254",e["&frasl"]="8260",e["&euro"]="8364",e["&image"]="8365",e["&weierp"]="8472",e["&real"]="8476",e["&trade"]="8482",e["&alefsym"]="8501",e["&larr"]="8592",e["&uarr"]="8593",e["&rarr"]="8594",e["&darr"]="8595",e["&harr"]="8596",e["&crarr"]="8629",e["&lArr"]="8656",e["&uArr"]="8657",e["&rArr"]="8658",e["&dArr"]="8659",e["&hArr"]="8660",e["&forall"]="8704",e["&part"]="8706",e["&exist"]="8707",e["&empty"]="8709",e["&nabla"]="8711",e["&isin"]="8712",e["&notin"]="8713",e["&ni"]="8715",e["&prod"]="8719",e["&sum"]="8721",e["&minus"]="8722",e["&lowast"]="8727",e["&radic"]="8730",e["&prop"]="8733",e["&infin"]="8734",e["&ang"]="8736",e["&and"]="8743",e["&or"]="8744",e["&cap"]="8745",e["&cup"]="8746",e["&int"]="8747",e["&there4"]="8756",e["&sim"]="8764",e["&cong"]="8773",e["&asymp"]="8776",e["&ne"]="8800",e["&equiv"]="8801",e["&le"]="8804",e["&ge"]="8805",e["&sub"]="8834",e["&sup"]="8835",e["&nsub"]="8836",e["&sube"]="8838",e["&supe"]="8839",e["&oplus"]="8853",e["&otimes"]="8855",e["&perp"]="8869",e["&sdot"]="8901",e["&lceil"]="8968",e["&rceil"]="8969",e["&lfloor"]="8970",e["&rfloor"]="8971",e["&lang"]="9001",e["&rang"]="9002",e["&loz"]="9674",e["&spades"]="9824",e["&clubs"]="9827",e["&hearts"]="9829",e["&diams"]="9830",e)"function"!=typeof e[r]&&e.hasOwnProperty(r)&&(t[e[r]]=r);for(i in t)"function"!=typeof t[i]&&t.hasOwnProperty(i)&&(o=t[i].toLowerCase().substr(1),n.put(o,String.fromCharCode(i)));return n})(),K$=class extends W${decodeCharacter(e){let t;e.mark();const n=e.next();if(null==n||"&"!==n)return e.reset(),null;const r=e.next();if(null==r)return e.reset(),null;if("#"===r){if(t=this._getNumericEntity(e),null!=t)return t}else if(r.match(/[A-Za-z]/)&&(e.pushback(r),t=this._getNamedEntity(e),null!=t))return t;return e.reset(),null}_getNamedEntity(e){let t,n,r,i="";for(t=Math.min(e.remainder().length,Y$.getMaxKeyLength()),r=0;r<t;r++)i+=e.next().toLowerCase();const o=Y$.getLongestMatch(i);if(null==o)return null;for(e.reset(),e.next(),t=o.getKey().length,n=0;n<t;n++)e.next();return e.peek(";")&&e.next(),o.getValue()}_getNumericEntity(e){const t=e.peek();return null==t?null:"x"===t||"X"===t?(e.next(),this._parseHex(e)):this._parseNumber(e)}_parseHex(e){let t,n="";for(;e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,16))){if(";"===t){e.next();break}break}n+=t,e.next()}const r=parseInt(n,16);return!Number.isNaN(+r)&&$$(r)?String.fromCharCode(r):null}_parseNumber(e){let t,n="";for(;e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,10))){if(";"===t){e.next();break}break}n+=t,e.next()}const r=parseInt(n,10);return!Number.isNaN(+r)&&$$(r)?String.fromCharCode(r):null}},X$=class extends W${decodeCharacter(e){e.mark();const t=e.next();let n,r,i,o;if(null==t)return e.reset(),null;if("%"!==t)return e.reset(),null;for(n="",r=0;r<2;r++)i=e.nextHex(),null!=i&&(n+=i);return 2===n.length&&(o=parseInt(n,16),$$(o))?String.fromCharCode(o):(e.reset(),null)}},J$=/^data:(?<!\s)\s*(image\/[\w+-.]+)(?<!\s)\s*(;.*?){0,1}(?<!\s)\s*,(.*)/i,Z$=5e6,Q$=5e5,eH=(e,t)=>{const{maxByteSizeSvg:n=Q$,maxByteSizeImage:r=Z$}=t??{},{mimeType:i,encoding:o,data:a}=(e=>{const[,t,n,r]=J$.exec(e.trim())??[];return{encoding:n,data:r,mimeType:t?.toLocaleLowerCase()}})(e);if(!a)return!0;const s=((e,t,n)=>{const r={type:e};if(t?.includes(";base64"))try{return new Blob([atob(n)],r).size}catch{return new Blob([n],r).size}return"image/svg+xml"===e?new Blob([n],r).size:0})(i,o,a);return"image/svg+xml"===i?s<=n:s<=r};"undefined"!=typeof document&&(F$=document.createElement("div"));var tH=Array.prototype.indexOf,nH=[",",".","_"," "],rH=[",",".","-","_"," "],iH={width:["%"],height:["%"]},oH={default:["-"," ","%"],color:["#"," ","(",")"],image:["(",")",":","/","?","&","-",".",'"',"="," "]},aH={background:["(",")",":","%","/","?","&","-"," ",".",'"',"=","#"],"background-image":oH.image,"background-color":oH.color,"border-color":oH.color,"border-image":oH.image,color:oH.color,icon:oH.image,"list-style-image":oH.image,"outline-color":oH.color},sH={attr_name:["^on[a-z]{1,}","style","href","src"],attr_val:["javascript:","data:"],css_key:["behavior","-moz-behavior","-ms-behavior"],css_val:["expression"]};function lH(e,t,n){let r;if(t){if(tH)return tH.call(t,e,n);for(r=t.length,n=n?n<0?Math.max(0,r+n):n:0;n<r;n++)if(n in t&&t[n]===e)return n}return-1}function uH(e){if(null==e)return"";let t="";const n=document.createTextNode(e);return F$.appendChild(n),t=F$.innerHTML,F$.removeChild(n),t}function cH(e,t,n){let r,i,o,a,s,l,u,c,d;for(e=pH(e).toLowerCase(),t=pH(t),o=0;o<sH.attr_name.length;o++)if(e.match(sH.attr_name[o]))throw new Error(`Unsafe attribute name used: ${e}`);for(o=0;o<sH.attr_val.length;o++)if(t.toLowerCase().match(sH.attr_val[o]))throw new Error(`Unsafe attribute value used: ${t}`);if(r=iH[e],r||(r=rH),i="",!n){for(a=0;a<e.length;a++){if(s=e.charAt(a),!s.match(/[a-zA-Z\-0-9]/))throw new Error("Invalid attribute name specified");i+=s}i+='="'}for(l=0;l<t.length;l++)u=t.charAt(l),c=t.charCodeAt(l),!u.match(/[a-zA-Z0-9]/)&&lH(u,r)<0?(d=c.toString(16),i+=`&#x${d};`):i+=u;return n||(i+='"'),i}function dH(e,t,n){let r,i,o,a,s,l,u,c,d,p;if(e=pH(e).toLowerCase(),t=pH(t),lH(e,sH.css_key)>=0)throw new Error(`Unsafe property name used: ${e}`);for(r=0;r<sH.css_val.length;r++)if(t.toLowerCase().indexOf(sH.css_val[r])>=0)throw new Error(`Unsafe property value used: ${t}`);if(i=aH[e],i||(i=oH.default),o="",!n){for(a=0;a<e.length;a++){if(s=e.charAt(a),!s.match(/[a-zA-Z-]/))throw new Error("Invalid Property Name specified");o+=s}o+=": "}for(l=0;l<t.length;l++)u=t.charAt(l),c=t.charCodeAt(l),!u.match(/[a-zA-Z0-9]/)&&lH(u,i)<0?(d=c.toString(16),p="000000".substr(d.length),o+=`\\${p}${d}`):o+=u;return o}function pH(e,t){let n,r,i,o,a=!1;if(null===e)return null;n=e,r=e,i=0;const s=[new K$,new X$,new V$];for(;!a;){r=n;for(let e=0;e<s.length;e++)o=s[e].decode(n),o!==n&&(i++,n=o);r!==n||(a=!0)}if(t&&i>1)throw new Error("Attack Detected - Multiple/Double Encodings used in input");return n}var fH=[];for(let e=0;e<255;e++)fH[e]=e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122?null:e.toString(16);var hH={html:e=>uH(e.unsafe),css(e){let t,n=[];const r=[],i={};let o="";for(t in e.map?n=e.map:n[e.name]=e.unsafe,n)"function"!=typeof n[t]&&n.hasOwnProperty(t)&&(r[t]=dH(t,n[t],!0),o+=dH(t,n[t],!0),i[t]=r[t]);return e.map?i:o},attr(e){let t=[];const n=[],r={};let i="";e.map?t=e.map:t[e.name]=e.unsafe;for(const e in t)"function"!=typeof t[e]&&t.hasOwnProperty(e)&&(n[e]=cH(e,t[e],!0),i+=cH(e,t[e],!0),r[e]=n[e]);return e.map?r:i}};function mH(e,t){throw new Error(t)}var gH={canonicalize:pH,encode:function(){const e={context:"html",unsafe:null,name:null,map:null,setter:null,strict:!0};return 1===arguments.length&&"object"==typeof arguments[0]?function(){let e,t,n;const r=arguments[0]||{};let i=1;const o=arguments.length;for(;i<o;i++)if(null!=(e=arguments[i]))for(t in e)if(e.hasOwnProperty(t)){if(n=e[t],r===n)continue;void 0!==n&&(r[t]=n)}}(e,arguments[0]):(e.context=arguments[0],2===arguments.length?"html"===e.context?e.unsafe=arguments[1]:"attr"!==e.context&&"css"!==e.context||(e.map=arguments[1]):(e.name=arguments[2],e.unsafe=arguments[1])),"html"===e.context?hH.html(e):"css"===e.context?(null!=e.map&&"object"!=typeof e.map&&mH(this,"Invalid parameter type"),hH.css(e)):"attr"===e.context?(null!=e.map&&"object"!=typeof e.map&&mH(this,"Invalid parameter type"),hH.attr(e)):void mH(this,"Invalid parameter type")},encodeForAttr:cH,encodeForAttr2:function(e){return cH("nonsens",e,!0)},encodeForCSS:dH,encodeForHref:function(e){pH(e),0!==e.search("[a-zA-Z0-9]+:")&&(e=`http://${e}`);const t=new _$(e),n=_$.encodeAuthorityAndPath(t.authorityAndPath),r=t.searchParams;e=n+_$.encodeSearchParams(r)+t.hash;const i=decodeURI(e).toLowerCase();if(-1!==i.indexOf("javascript:"))throw new Error("Attack Detected - Javascript in input");if(-1!==i.indexOf("data:"))throw new Error("Attack Detected - data in input");return e},encodeForJS:function(e,t){let n,r,i,o,a,s;for(t||(t=nH),s="",n=0;n<e.length;n++)i=e.charAt(n),o=e.charCodeAt(n),lH(i,t)>=0||null==fH[o]?s+=i:(r=o.toString(16),o<256?(a="00".substr(r.length),s+=`\\x${a}${r.toUpperCase()}`):(a="0000".substr(r.length),s+=`\\u${a}${r.toUpperCase()}`));return s},encodeForHTML:uH,encodeForURL:function(e,t){let n="";return t&&(t.match(/^[A-Za-z\-0-9]{1,}$/)?n+=pH(t).toLowerCase():mH(this,"Illegal Attribute Name Specified"),n+='="'),n+=encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A"),n+=t?'"':"",n},isSafeDataURL:eH,validateURI:function(e){if(""===e||function(e){if("canParse"in URL)return URL.canParse(e);try{return new URL(e),!0}catch{return!1}}(e))return!1;const t=e.replace(/%2E/gi,".");if(t.match(/[#&=: ]/))return!1;const n=function(e){let t=e,n="";for(;t.length>0;)if(t.startsWith("../")||t.startsWith("./"))t=t.replace(/^\.\.?\//,"");else if(t.startsWith("/./"))t=t.replace(/^\/\.\//,"/");else if("/."===t)t="/";else if(t.startsWith("/../")){t=t.replace(/^\/\.\.\//,"/");const e=n.lastIndexOf("/");-1!==e&&(n=n.slice(0,e))}else if("/.."===t){t="/";const e=n.lastIndexOf("/");-1!==e&&(n=n.slice(0,e))}else if("."===t||".."===t)t="";else{const e=t.match(/^\/?[^/]*/),r=e?e[0]:"";t=t.slice(r.length),n+=r}return n}(t);return""!==n&&"/"!==n&&n}};const vH=(e,t)=>t.qAttrExps?.qValues?.[e],yH=(e,t)=>{switch(e){case"topLeft":default:return{horizontal:"rtl"===t?"flex-end":"flex-start",vertical:"flex-start"};case"centerLeft":return{horizontal:"center",vertical:"flex-start"};case"bottomLeft":return{horizontal:"rtl"===t?"flex-start":"flex-end",vertical:"flex-start"};case"topCenter":return{horizontal:"rtl"===t?"flex-end":"flex-start",vertical:"center"};case"centerCenter":return{horizontal:"center",vertical:"center"};case"bottomCenter":return{horizontal:"rtl"===t?"flex-start":"flex-end",vertical:"center"};case"topRight":return{horizontal:"rtl"===t?"flex-end":"flex-start",vertical:"flex-end"};case"centerRight":return{horizontal:"center",vertical:"flex-end"};case"bottomRight":return{horizontal:"rtl"===t?"flex-start":"flex-end",vertical:"flex-end"}}},bH=({text:e,url:t,imageSize:n,imagePosition:r,labelStructure:i,imageBox:o,direction:a})=>!r||t&&(t.toLowerCase().includes("javascript:")||!gH.isSafeDataURL(t))?{type:PF.Text,url:void 0,text:e,labelStructure:i}:{type:PF.Image,url:t||"",text:e,imageSize:n,resolvedImagePosition:yH(r,a),labelStructure:i,imageBox:o},xH=(e,t,n,r)=>{if(!e.qMiniChart||!t?.miniChart||!n)return{type:PF.Text,text:r};const{minY:i,maxY:o}=((e,t,n)=>{const r="global"===t.yAxis?.scale,i="zeroCenter"===t.yAxis?.position,o=r?n.qYMin:e.qMiniChart.qMin,a=r?n.qYMax:e.qMiniChart.qMax;if(i){const e=Math.max(Math.abs(o),Math.abs(a));return{minY:-e,maxY:e}}return(e=>"zeroBaseline"===e.yAxis?.position||"bars"===e.type&&"auto"===e.yAxis?.position)(t)?{minY:Math.min(0,o),maxY:Math.max(0,a)}:{minY:o,maxY:a}})(e,t.miniChart,n),a={type:t.miniChart.type,qMatrix:e.qMiniChart.qMatrix,minY:i,maxY:o,showDots:!!t.miniChart.showDots,colors:t.miniChart.colors,colorMin:e.qMiniChart.qMin,colorMax:e.qMiniChart.qMax};return{type:PF.MiniChart,text:r,miniChart:a}},SH=(e,t,n)=>{const r=Array.isArray(t.qAttrExps)?t.qAttrExps[0]:t.qAttrExps,i=r?.qValues?.[e];if(i){const e=Number.isNaN(+i.qNum)?void 0:`${i.qNum}`;return i.qText||e}return n?.urlPosition===MF.Attribute?void 0:n?.urlLabel},wH=({labelStructure:e,text:t,url:n})=>{try{if(!n)throw Error("Invalid url");return{type:PF.Link,url:gH.encodeForHref(n),text:t,labelStructure:e}}catch{return{type:PF.Text,url:void 0,text:t,labelStructure:e}}},CH=({cell:e,representationProperties:t,attrExprInfoIndex:n,env:r,conditionalColoring:i,miniChartOnMeasure:o,labelStructure:a,getText:s=e=>e.qText,direction:l,enabledFeatures:u})=>{const c=LF(t),d=s(e);return c===PF.Image&&u[PF.Image]&&!r.anything.sense?.isUnsupportedFeature?.("tableImages")?((e,t,n,r,i,o)=>{const{imageSize:a,imagePosition:s,imageSetting:l,imageLabel:u,imageBox:c}=t??{};if("url"===l){const t=vH(n.imageUrl??-1,e)?.qText;return o&&(o.maskedValue=t??""),bH({text:r,url:t,imageSize:a,imagePosition:s,labelStructure:o,imageBox:c,direction:i})}if("label"===l){const t=o?o.originalValue:r;if(-1===n.imageLabel)return bH({text:u||t||"",url:t,imageSize:a,imagePosition:s,labelStructure:o,imageBox:c,direction:i});const l=vH(n.imageLabel??-1,e)?.qText??r;return bH({text:l,url:t,imageSize:a,imagePosition:s,labelStructure:o,imageBox:c,direction:i})}return{type:PF.Text,url:void 0,labelStructure:o,text:r}})(e,t,n,d,l,a):c===PF.Link?((e,t,n,r,i)=>{const{urlPosition:o}=t??{};if(o===MF.Attribute){const o=SH(n.url??-1,e,t);return wH({labelStructure:r,text:i||o||"",url:o})}if(o===MF.Dimension){const o=SH(n.urlLabel??-1,e,t)||i;return r&&(r.maskedValue=o),wH({text:o,labelStructure:r,url:r?.originalValue??i})}return{type:PF.Text,url:void 0,text:i,labelStructure:r}})(e,t,n,a,d):c===PF.Indicator&&u[PF.Indicator]&&!r.anything.sense?.isUnsupportedFeature?.("tableIndicators")?((e,t,n)=>{const{indicator:r}=e??{};return{type:PF.Indicator,url:void 0,text:n,indicator:{applySegmentColors:r?.applySegmentColors,position:r?.position,showTextValues:r?.showTextValues},indicatorConditionalColoring:t}})(t,i,d):c===PF.MiniChart&&u[PF.MiniChart]&&!r.anything.sense?.isUnsupportedFeature?.("qMiniChartDef")?xH(e,t,o,d):{type:PF.Text,url:void 0,text:d,labelStructure:a}},EH=(e,t)=>{const n=t.qAttrExps,r=n?.qValues?.[e?.cellForegroundColor??-1]?.qText,i=n?.qValues?.[e?.cellBackgroundColor??-1]?.qText,o=i?c_(i):null,a=r?c_(r):null,s=((e,t)=>e||!t?null:s_(t))(a,o);return{color:s??a,background:o}},IH=(e,t)=>t.qSubNodes.reduce((e,t)=>0===t.qSubNodes.length?e+1:IH(e,t),e),DH=(e,t,n,r,i,o)=>{const a=i?o.rowsPerPage-n:oz-r;let s=e.qUp+e.qDown;if(i&&0===n){const n=(t+e.qUp)%o.rowsPerPage;s=e.qDown+n}return Math.min(a,IH(s,e))},RH=({node:e,parent:t,root:n,x:r,y:i,pageY:o,layoutService:a,dimensionInfo:s,attrExprInfoIndex:l,isLeftColumn:u=!0,isIndentModeEnabled:c=!1,indentLevel:d,labelStructure:p,env:f,pageInfo:h,direction:m="ltr"})=>{const g=(!c||!u)&&"P"===e.qType,v=((e,t)=>{if(e!==D$){if(t){const t=LF(e.representation);return t===PF.Link||t===PF.Image?e.representation:{type:PF.Text}}return e.representation}})(s,c),y=(({node:e,isLeftColumn:t,isIndentModeEnabled:n,labelStructure:r,representationType:i,parentOrRootOriginalValue:o})=>{let a=e.qText;if(t&&n&&r){const{originalValue:t,delimeter:n,suffix:s}=r;a=i===PF.Link?"P"===e.qType?o:t:`${t} ${!s||!t&&s?"":n} ${s}`.trim()}return a})({node:e,isLeftColumn:u,isIndentModeEnabled:c,labelStructure:p,representationType:LF(v),parentOrRootOriginalValue:(t||n)?.representation?.labelStructure?.originalValue??""}),b=CH({cell:{...e,qText:y},representationProperties:v,attrExprInfoIndex:l,env:f,labelStructure:p,direction:m,enabledFeatures:{[PF.Image]:!0,[PF.Indicator]:!0}}),x={id:X_(),ref:e,x:r,y:i,pageX:r,pageY:o,mainAxisPageCoord:u?o:r,isLeftColumn:u,parent:t,root:n,children:[],isLeafNode:0===e.qSubNodes.length,leafCount:DH(e,i,o,r,u,h),distanceToNextCell:0,isLockedByDimension:!("object"!=typeof s||!s.qLocked),isTotal:"T"===e.qType||!!t?.isTotal,isEmpty:"E"===e.qType||-4===e.qElemNo,isNull:"U"===e.qType,isPseudoDimension:g,expressionColor:EH(l,e),selectionCellType:u?"L":"T",dimensionInfoIndex:a.getDimensionInfoIndex(s),canBeResized:0===e.qSubNodes.length&&!u,visibleMeasureInfoIndex:g?e.qElemNo:t?.visibleMeasureInfoIndex,representation:b,...void 0!==d&&{indentLevel:d}};return t&&(t.children[x.mainAxisPageCoord-t.mainAxisPageCoord]=x),x},PH=(e,t,n,r,i,o,a,s,l)=>{const{isIndentModeEnabled:u}=i;if(!t.length)return e;let c=0;return function t(d,p,f,h=0,m=-1){e[h]||(e[h]={}),u&&m++;const g=i.leftDimensionInfoIndexes.indexOf(D$);f.forEach((f,v)=>{const y={originalValue:f.qText??"",maskedValue:"",delimeter:"-",suffix:""};c+=0===v?0:1;const b=n.qTop-r.page*r.rowsPerPage,x=Math.max(0,b+c-f.qUp),S=n.qTop+c-f.qUp;if(u){if(i.hasPseudoDimOnLeft&&m<=g)if(y.originalValue=f.qText??"",y.maskedValue=f.qText??"","N"===f.qType||"U"===f.qType||"T"===f.qType)"U"===f.qType&&(y.originalValue=i.getNullValueText()),m<g&&(y.suffix=i.visibleMeasureInfo[0].qFallbackTitle??"");else if("P"===f.qType){y.originalValue=(p||d)?.representation.labelStructure?.originalValue??"",y.maskedValue=(p||d)?.representation.labelStructure?.originalValue??"",y.suffix=f.qText??"";const e=f.qSubNodes;f={...(p||d)?.ref,...f.qText?{qText:f.qText}:{},qSubNodes:e},m=(p||d)?.indentLevel??0}"U"===f.qType&&(y.originalValue=i.getNullValueText())}let w=h;u&&(w=g>=1&&m>=g?m+1:m,0===m&&0===g&&0===f.qSubNodes.length&&(w=0));const C=e.at(h)?.[x],E=u&&void 0===C?.ref.qText||!C?RH({node:f,parent:p,root:d,x:w,y:S,pageY:x,layoutService:i,dimensionInfo:o[w],attrExprInfoIndex:a[w],isLeftColumn:!0,...u&&{isIndentModeEnabled:u,indentLevel:m},env:s,pageInfo:r,labelStructure:y,direction:l}):e[h][x];if(e[h][x]=E,f.qSubNodes.length){const e=u?0:h+1;t(d||E,E,f.qSubNodes,e,m)}})}(null,null,t,0,-1),e},MH=(e,t)=>{e.slice(0,-1).forEach(e=>{Object.values(e).forEach((e,n,r)=>{const i=r.at(n+1);e.distanceToNextCell=i?i.mainAxisPageCoord-(e.mainAxisPageCoord+e.leafCount):t-(e.mainAxisPageCoord+e.leafCount)})})},LH=(e,t)=>{const n=e[0],r=n?Object.values(n):[],i=t?.isIndentModeEnabled&&t.hasPseudoDimOnLeft?t.visibleMeasureInfo.length-1:0,o=n?.[i],a=r.at(-1);return o?.isTotal?o.isLeafNode?o.mainAxisPageCoord:o.mainAxisPageCoord+o.leafCount-1:a?.isTotal?a.mainAxisPageCoord-1:-1},AH=({prevData:e,nextDataPage:t,pageInfo:n,layoutService:r,visibleLeftDimensionInfo:i,attrExprInfoIndexes:o,env:a,direction:s})=>{const{qLeft:l,qArea:u}=t;if(!l.length)return e;const c=PH(e.grid,l,u,n,r,i,o,a,s);MH(c,n.rowsOnCurrentPage);const d=LH(c,r);return{...e,grid:c,columnCount:c.length,totalDividerIndex:d}},kH=({qArea:e,prevData:t,pivotValuePoints:n,pageInfo:r})=>{const i=[...t];return n.forEach((t,n)=>{t.forEach((t,o)=>{const a=e.qTop-r.page*r.rowsPerPage+n,s=e.qLeft+o;Array.isArray(i[a])||(i[a]=[]);const l="U"===t.qType;i[a][s]=i[a][s]??{id:X_(),ref:t,isNull:l}})}),i},OH=({prevData:e,dataPage:t,pageInfo:n})=>{const{qData:r,qArea:i}=t;return r?.length?kH({qArea:i,prevData:e,pivotValuePoints:r,pageInfo:n}):e},qH=(e,t,n,r,i,o,a,s,l,u)=>{const{isIndentModeEnabled:c}=r;if(!t.length)return e;let d=0;!function t(a,p,f,h=0){e[h]||(e[h]={}),f.forEach((f,m)=>{d+=0===m?0:1;const g=n.qLeft+d-f.qUp,v=e[h][g]??RH({node:f,parent:p,root:a,x:g,y:h,pageY:h,layoutService:r,dimensionInfo:i[h],attrExprInfoIndex:o[h],isLeftColumn:!1,...c&&{isIndentModeEnabled:c},env:s,pageInfo:l,direction:u});e[h][g]=v,f.qSubNodes.length&&t(a||v,v,f.qSubNodes,h+1)})}(null,null,t);for(let t=0;t<a-e.length;t++)e.push({});return e},TH=({prevData:e,nextDataPage:t,layoutService:n,visibleTopDimensionInfo:r,attrExprInfoIndexes:i,headerRows:o,env:a,pageInfo:s,direction:l})=>{const{qTop:u,qArea:c}=t;if(!u.length)return e;const d=qH(e.grid,u,c,n,r,i,o,a,s,l);MH(d,n.size.x);const p=LH(d);return{...e,grid:d,rowCount:d.length,totalDividerIndex:p}},NH=e=>-1===e?{}:e.qAttrExprInfo.reduce((e,{id:t},n)=>(e[t]=n,e),{}),jH=(e,t)=>{const{env:n}=b$(),{direction:r}=g$(),{layoutService:i,effectivePropertiesService:o}=w$(),{qPivotDataPages:a,pageInfo:s}=g$(),[l,u]=m(null),c=((e,t,n)=>v(()=>({left:e.map(NH),top:t.map(NH),measures:n.map(NH)}),[n,e,t]))(e,t,i.visibleMeasureInfo),d=v(()=>k$(i,o,t,e),[i,o,t,e]),p=f(()=>a.slice(1).reduce((e,t)=>OH({prevData:e,dataPage:t,pageInfo:s}),((e,t)=>{const{qData:n,qArea:r}=e;return kH({qArea:r,prevData:[],pivotValuePoints:n,pageInfo:t})})(a[0],s)),[a,s]),h=f(()=>a.slice(1).reduce((e,o)=>TH({prevData:e,nextDataPage:o,layoutService:i,visibleTopDimensionInfo:t,attrExprInfoIndexes:c.top,headerRows:d.size.y,env:n,pageInfo:s,direction:r}),((e,t,n,r,i,o,a,s)=>{const{qArea:l,qTop:u}=e,c=qH([],u,l,t,n,r,i,o,a,s);MH(c,t.size.x);const d=LH(c);return{grid:c,rowCount:c.length,layoutSize:t.size,totalDividerIndex:d}})(a[0],i,t,c.top,d.size.y,n,s,r)),[a,i,t,c.top,d.size.y,n,s,r]),g=f(()=>a.slice(1).reduce((t,o)=>AH({prevData:t,nextDataPage:o,pageInfo:s,layoutService:i,visibleLeftDimensionInfo:e,attrExprInfoIndexes:c.left,env:n,direction:r}),((e,t,n,r,i,o,a)=>{const{qArea:s,qLeft:l}=e,u=PH([],l,s,n,t,r,i,o,a);MH(u,n.rowsOnCurrentPage);const c=LH(u,t);return{grid:u,columnCount:u.length,layoutSize:t.size,totalDividerIndex:c}})(a[0],i,s,e,c.left,n,r)),[a,i,s,e,c,n,r]),[y,b]=m(()=>p()),[x,S]=m(()=>h()),[w,C]=m(()=>g());Hz(()=>{b(p())},[p]),Hz(()=>{S(h())},[h]),Hz(()=>{C(g())},[g]),Hz(()=>{l&&l.forEach(o=>{b(e=>OH({prevData:e,dataPage:o,pageInfo:s})),S(e=>TH({prevData:e,nextDataPage:o,layoutService:i,visibleTopDimensionInfo:t,attrExprInfoIndexes:c.top,headerRows:d.size.y,env:n,pageInfo:s,direction:r})),C(t=>AH({prevData:t,nextDataPage:o,pageInfo:s,layoutService:i,visibleLeftDimensionInfo:e,attrExprInfoIndexes:c.left,env:n,direction:r}))})},[l]);const E=f(e=>{u(e)},[]);return{headersData:d,measureData:y,topDimensionData:x,leftDimensionData:w,attrExprInfoIndexes:c,nextPageHandler:E}},_H=Math.sqrt(1e4),FH=e=>({maxNumberOfVisibleRows:Math.ceil(e.height/24),maxNumberOfVisibleColumns:Math.ceil(e.width/MT.PixelsMin)}),zH=e=>{if(null===e)return[];if(e.qWidth*e.qHeight<1e4)return[e];const t=[],n=Math.ceil(e.qWidth/_H),r=Math.ceil(e.qHeight/_H);for(let i=0;i<n;i++)for(let n=0;n<r;n++)t.push({qLeft:e.qLeft+i*_H,qTop:e.qTop+n*_H,qWidth:Math.min(_H,e.qWidth-i*_H),qHeight:Math.min(_H,e.qHeight-n*_H)});return t};function WH({nextPageHandler:e}){const{model:t}=b$(),{pageInfo:n}=g$(),{layoutService:r}=w$(),i=(e=>{const t=l(e);return t.current=e,t})(n.page),o=t,a=f(async(e,t)=>{await(o?.collapseLeft(I$,e,t,!1))},[o]),s=f(async(e,t)=>{await(o?.collapseTop(I$,e,t,!1))},[o]),u=f(async(e,t)=>{await(o?.expandLeft(I$,e,t,!1))},[o]),c=f(async(e,t)=>{await(o?.expandTop(I$,e,t,!1))},[o]),d=f(async t=>{if(o?.getHyperCubePivotData&&0!==t.length)try{const r=await o.getHyperCubePivotData(I$,t.reduce((e,t)=>[...e,...zH(t)],[]));i.current===n.page&&e(r)}catch(e){console.error(e)}},[o,e,n,i]),p=f((e,{dimensionInfoIndex:n,isLeftColumn:i,x:o=0,columnWidthLocation:a})=>{const{qMeasureInfo:s,qDimensionInfo:l,topHeadersColumnWidth:u}=r.layout.qHyperCube;let c=[];switch(a){case TF.Dimension:c=[{qPath:`${I$}/qDimensions/${n}/qDef/columnWidth`,oldValue:l[n].columnWidth}];break;case TF.Measures:if(i)c=s.map((e,t)=>({qPath:`${I$}/qMeasures/${t}/qDef/columnWidth`,oldValue:e.columnWidth}));else{const e=r.getMeasureInfoIndexFromCellIndex(o);c=[{qPath:`${I$}/qMeasures/${e}/qDef/columnWidth`,oldValue:s[e].columnWidth}]}break;case TF.Pivot:c=[{qPath:`${I$}/topHeadersColumnWidth`,oldValue:u}]}const d=c.map(t=>{const{qPath:n,oldValue:r}=t;return{qPath:n,qOp:r?"Replace":"Add",qValue:JSON.stringify({...r,...e})}});t?.applyPatches(d,!0)},[t,r]),h=f(async e=>{await(o?.applyPatches([{qPath:`${I$}/indentModeColumnWidth`,qOp:r.layout.qHyperCube.indentModeColumnWidth?"Replace":"Add",qValue:JSON.stringify({...r.indentModeColumnWidth,...e})}],!0))},[o,r]);return v(()=>({collapseLeft:a,collapseTop:s,expandLeft:u,expandTop:c,applyColumnWidth:p,applyIndentModeColumnWidth:h,fetchPages:d}),[a,s,u,c,p,h,d])}const $H=(e,t,n)=>(r,i)=>{if("P"===r)return D$;const o=t[n+i];return e[o]},HH=e=>{const t=[],n=(e,r=0)=>{e.slice(0,1).forEach(e=>{t[r]=e.qType,e.qSubNodes.length&&n(e.qSubNodes,r+1)})};return n(e),t},VH=u({}),BH=()=>h(VH),GH=({children:e})=>{const{visibleLeftDimensionInfo:t,visibleTopDimensionInfo:n}=(()=>{const{layoutService:{layout:{qHyperCube:{qNoOfLeftDims:e,qEffectiveInterColumnSortOrder:t,qDimensionInfo:n}}}}=w$(),{qPivotDataPages:r}=g$();return v(()=>{const i=HH(r[0]?.qLeft??[]),o=HH(r[0]?.qTop??[]);return{visibleLeftDimensionInfo:i.map($H(n,t,0)),visibleTopDimensionInfo:o.map($H(n,t,e))}},[n,t,e,r])})(),{headersData:r,measureData:i,topDimensionData:o,leftDimensionData:a,attrExprInfoIndexes:s,nextPageHandler:l}=jH(t,n),u=WH({nextPageHandler:l}),c=v(()=>({gridSectionsData:{headersData:r,topDimensionData:o,leftDimensionData:a,measureData:i},visibleDimensionsInfo:{visibleLeftDimensionInfo:t,visibleTopDimensionInfo:n},attrExprInfoIndexes:s,dataModel:u}),[t,n,r,i,o,a,s,u]);return fo.jsx(VH.Provider,{value:c,children:e})},UH=20,YH=18,KH=.75,XH=e=>-1!==e&&e?.representation?.type===PF.Image,JH=({isLeftColumn:e,layoutService:t,representation:n})=>Boolean(e)&&t.isIndentModeEnabled&&n.type===PF.Image,ZH=e=>void 0===e?iz:e,QH=(e,t)=>{if(void 0!==e&&!Number.isNaN(+e)){const n=+e;return n>=0?n:t}return t},eV=e=>QH(e,MT.PixelsDefault),tV=(e,t)=>QH(e,MT.PercentageDefault)*t/100,nV=(e,t,n)=>{switch(t?.type){case LT.Pixels:return eV(t.pixels);case LT.Percentage:return tV(t.percentage,e);case LT.FitToContent:case LT.Auto:default:return n}},rV=({headers:e,layoutService:t,effectivePropertiesService:n,estimateWidthForDimensionValue:r,shouldConsiderCombinatedLength:i,measureTextForHeader:o,longestMeasureValuePossible:a})=>e.reduce((e,s,l)=>{const{layout:{qHyperCube:{qNoOfLeftDims:u,qDimensionInfo:c}}}=t,{id:d,colIdx:p,qApprMaxGlyphCount:f,isLeftDimension:h}=s,m=c.find(e=>e.cId===d),g={width:24,...m?.representation?.imageBox};if(!h)return e+0;if(d===R$)return e+0;const v=JH({isLeftColumn:h,layoutService:t,representation:m?.representation||{type:PF.Text}})?g.width+8+4:r(f),y=!n.qAlwaysFullyExpanded&&p<u-1?21:0;let b=0;if(i&&o&&a){b=o("- ")+a}return Math.max(e,24*l+YH+y+v+b)},0),iV=(e,t,n)=>e.reduce((e,r)=>{const i=(n?0:1)*YH;return Math.max(e,i+t(r.qFallbackTitle??""))},0),oV=(e,t,n,r)=>{const i=100*e/t,o=r*KH*(i/100),a=i/100*+n;return Math.min(a,o)},aV=(e,t,n,r)=>r*(+n/100)*(100*e/t/100),sV=(e,t)=>e.some(e=>e>=t*KH),lV=({layoutService:e,effectivePropertiesService:t,headersData:n,columnWidths:r,tableWidth:i,widthOverride:o,measureTextForHeader:a,estimateWidthForDimensionValue:s,measureTextWidthForMeasuresCombinedWithDimensions:l,translator:u})=>{let c=[];const d=i*KH,p=n.data[n.data.length-1][0];if(!Array.isArray(p))return{leftGridWidth:0,leftGridColumnWidths:[],leftGridFullWidth:0};const f=Math.min(d,r.at(-1)),h=Math.min(d,rV({headers:p,layoutService:e,effectivePropertiesService:t,estimateWidthForDimensionValue:s})),m=Math.min(d,iV(e.visibleMeasureInfo,a));let g=0;const v=p.findIndex(e=>e.id===R$),y=(({layoutService:e,measureTextForHeader:t,translator:n,headersData:r})=>{const{type:i}=e.indentModeColumnWidth;return i===LT.Auto&&r.size.y<=1?t(n.get("SNPivotTable.IndentMode.Rows"))+8+YH+16:24})({layoutService:e,measureTextForHeader:a,translator:u,headersData:n});if(e.hasPseudoDimOnLeft)if(0===v){const e=Math.max(f,h,m);c=[Math.max(y,e-f),f]}else{const n=Math.min(d,iV(e.visibleMeasureInfo,l,!0));g=Math.min(d,rV({headers:p.slice(0,v),layoutService:e,effectivePropertiesService:t,estimateWidthForDimensionValue:s,shouldConsiderCombinatedLength:!0,measureTextForHeader:a,longestMeasureValuePossible:n}));const r=Math.max(f,h,g);c=[Math.max(y,r-f),f]}else c=[Math.max(y,h-f),f];const b=Math.min(d,c.reduce((e,t)=>e+t,0)),{indentModeColumnWidth:x}=e;o&&o<=d&&(x.type=LT.Pixels,x.pixels=o);return[LT.Pixels,LT.Percentage].includes(x.type)||sV(c,i)?((e,t,n,r)=>{let i=e[0],o=e[1],a=[];const s=e.reduce((e,t)=>e+t,0),{type:l,pixels:u,percentage:c}=t,d=QH(u,MT.PixelsDefault),p=QH(c,MT.PercentageDefault),f=sV(e,n);l===LT.Auto&&f&&(i>o?i-=o:o-=i),l===LT.Pixels&&d&&(i=oV(e[0],s,d,n),o=oV(e[1],s,d,n)),l===LT.Percentage&&p&&(i=aV(e[0],s,p,n),o=aV(e[1],s,p,n));let h=0;o<=r&&(h=i-5,h>0&&(i-=h,o+=h)),h=o-r,h>0&&(i+=h,o-=h),a=[i,o];const m=a.reduce((e,t)=>e+t,0);return{leftGridColumnWidths:a,leftGridWidth:m,leftGridFullWidth:m}})(c,x,i,f):{leftGridWidth:b,leftGridColumnWidths:c,leftGridFullWidth:b}};function uV({tableWidth:e}){const t=e*KH,{styleService:n,layoutService:r,effectivePropertiesService:i}=w$(),{translator:o}=b$(),{gridSectionsData:{headersData:a}}=BH(),{measureText:s}=Fz(n.header,{allowLineBreaks:!1}),{estimateWidth:l,measureText:u}=Fz({...n.dimensionValues,fontWeight:ZH(n.dimensionValues.fontWeight)}),{measureText:c}=Fz({...n.dimensionValues,...n.measureLabels}),d=f((n,d)=>{const{layout:{qHyperCube:{qNoOfLeftDims:p,topHeadersColumnWidth:f}},visibleMeasureInfo:h,isIndentModeEnabled:m,hasPseudoDimOnLeft:g}=r,v=(t=0)=>h.reduce((n,{qFallbackTitle:r,columnWidth:i})=>{const o=c(r)+YH,a=Math.max(o,t);return Math.max(n,m?a:nV(e,i,a))},0),y=e=>a.data.reduce((t,n)=>{const r=n.at(e);if(!r||Array.isArray(r))return t;if(r.id===R$)return t;const i=(e=>{const{label:t,isLocked:n}=e,r=n?UH:0;return YH+s(t)+UH+r})(r);return Math.max(i,t)},0);let b=0,x=a.data.at(-1);m&&a.size.x>1&&x&&x[0]&&(x=x[0]);const S=x.map((o,s)=>{let u=YH;if(m&&1!==a.size.x||!n||void 0===d||d!==o.colIdx){let t;o.columnWidthLocation===TF.Pivot?t=m?void 0:f:o.columnWidthLocation===TF.Dimension&&({columnWidth:t}=o);let n=0;if(o.isLeftDimension)if(o.id===R$)n=v();else{const e=y(s),t=((e,t)=>{const{qApprMaxGlyphCount:n,isLeftDimension:o,dimensionInfoIndex:a}=e,s=r.getDimensionInfo(a);if(XH(s))return MT.PixelsDefault;const u=!i.qAlwaysFullyExpanded&&o&&t<p-1?21:0;return YH+l(n)+u})(o,s);n=Math.max(e,t),m&&!g&&s+1===p&&o.columnWidthLocation===TF.Dimension&&a.size.x>1&&(n=e)}else n=y(s),o.columnWidthLocation===TF.Measures&&(n=v(n));m&&1===a.size.x&&(t=r.indentModeColumnWidth),u=m&&!g&&a.size.x>1?n:nV(e,t,n)}else u=m?Math.min(t,n):n;return b+=u,u});return m&&a.size.x>1?lV({layoutService:r,effectivePropertiesService:i,headersData:a,columnWidths:S,tableWidth:e,widthOverride:n,measureTextForHeader:s,estimateWidthForDimensionValue:l,measureTextWidthForMeasuresCombinedWithDimensions:u,translator:o}):{leftGridWidth:Math.min(t,b),leftGridColumnWidths:S,leftGridFullWidth:b}},[e,a,r,t,s,c,l,u,o,i]),[p,h]=m(d);Hz(()=>{h(d())},[d]);const g=f((e,t)=>{h(d(e,t))},[d]);return{...p,overrideLeftGridWidth:g}}function cV({tableWidth:e,verticalScrollbarWidth:t,leftGridWidth:n}){const{styleService:r,layoutService:i}=w$(),{visibleDimensionsInfo:{visibleTopDimensionInfo:o}}=BH(),{layout:{qHyperCube:{qNoOfLeftDims:a,qEffectiveInterColumnSortOrder:s}},size:l,visibleMeasureInfo:u}=i,{estimateWidth:c,measureText:d}=Fz(r.measureValues,{allowLineBreaks:!1}),{estimateWidth:p}=Fz({...r.dimensionValues,fontWeight:ZH(r.dimensionValues.fontWeight)},{allowLineBreaks:!1}),h=e-n-1,m=o.at(-1),g=m===D$,y=s.length-a>o.length?21:0,b=v(()=>{const e=g?u:[m],t=l.x/e.length,n=[],r=[];let i=h;const o=(e,r)=>{n[e]=Math.min(MT.PixelsMax,Math.max(MT.PixelsMin,r)),i-=n[e]*t};if(e.forEach((e,t)=>{if(e?.columnWidth){const{columnWidth:{type:n,pixels:i,percentage:a},qApprMaxGlyphCount:s,qFallbackTitle:l}=e;switch(n){case LT.Pixels:o(t,eV(i));break;case LT.Percentage:o(t,tV(a,h));break;case LT.FitToContent:o(t,((e,t,n)=>n?MT.PixelsDefault:YH+(g?Math.max(c(e),d(t)):Math.max(Math.max(...u.map(e=>c(e.qApprMaxGlyphCount))),p(e)+y)))(s,l??"",XH(e)));break;case LT.Auto:default:r.push(t)}}else r.push(t)}),r.length){const e=r.length*t,o=i/e;r.forEach(e=>{n[e]=Math.max(MT.AutoMinPivot,o)})}return n},[g,u,m,l.x,h,c,d,p,y]),x=v(()=>{if(g){return u.reduce((e,t,n)=>e+b[n],0)/u.length}return b[0]},[g,b,u]),S=parseFloat((t/i.size.x).toFixed(12)),w=f(e=>(g&&void 0!==e?b[i.getMeasureInfoIndexFromCellIndex(e,!0)]:x)-S,[g,b,i,x,S]),C=l.x*x;return{rightGridFullWidth:C,rightGridWidth:Math.min(C,h),getRightGridColumnWidth:w}}const dV=`scrollable-container--${jF.TopGrid}`,pV=`scrollable-container--${jF.LeftGrid}`,fV=`scrollable-container--${jF.DataGrid}`,hV=e=>{if(!(e&&e instanceof HTMLDivElement))return{width:0,height:0};const t=e.offsetWidth-e.clientWidth,n=e.offsetHeight-e.clientHeight;return{width:t>=2?t:0,height:n>=2?n:0}},mV=(e,t)=>e>t?_F.Forward:e<t?_F.Backward:_F.None,gV=({gridRefs:{topGridRef:e,leftGridRef:t,dataGridRef:n},getWrapperElements:r,updateViewService:i,trackScrollDirection:o,interactions:a})=>{const{direction:s}=g$();d(()=>{const{headerGridWrapperElement:l,topGridWrapperElement:u,leftGridWrapperElement:c,dataGridWrapperElement:d}=r(),p=e=>{const t=e.target;l.scrollLeft=t.scrollLeft,o(e),i?.(e)},f=e=>{const t=e.target;l.scrollTop=t.scrollTop,o(e),i?.(e)},h=r=>{const a=r.target,l=((e,t)=>{const{scrollWidth:n,clientWidth:r,scrollLeft:i}=e,o=n-r;if("rtl"===t){if(i>o)return o;if(i<0)return Math.abs(i)}return i})(a,s);n.current?.scrollTo({scrollLeft:l,scrollTop:a.scrollTop}),u.scrollLeft=l,e.current?.forEach(e=>{e?.scrollTo(l)}),c.scrollTop=d.scrollTop,t.current?.forEach(e=>{e?.scrollTo(a.scrollTop)}),o(r),i?.(r)};return c.addEventListener("scroll",p),u.addEventListener("scroll",f),d.addEventListener("scroll",h),a.scroll||setTimeout(()=>{c.removeEventListener("scroll",p),u.removeEventListener("scroll",f),d.removeEventListener("scroll",h)},0),()=>{c.removeEventListener("scroll",p),u.removeEventListener("scroll",f),d.removeEventListener("scroll",h)}},[o,i,a,e,t,n,r,s])},vV=ww(!1),yV=(e,t)=>Math.abs(e.width-t.width)>2||Math.abs(e.height-t.height)>2,bV=({topGridWrapperRef:e,leftGridWrapperRef:t,dataGridWrapperRef:n})=>{const{top:r,left:i,data:o,resetHorizontalScrollbarHeight:a}=((e,t,n)=>{const[r,i]=m({width:0,height:0}),[o,a]=m({width:0,height:0}),[s,u]=m({width:0,height:0}),[c,p]=m(!1),h=qw(vV),g=l(h),v=l(h);g.current=h;const y=f(()=>{p(e=>!e&&e);const r=hV(e.current),o=hV(t.current),s=hV(n.current);i(e=>yV(e,r)?r:e),a(e=>yV(e,o)?o:e),u(e=>yV(e,s)?s:e)},[e,t,n]);d(()=>{const r=new ResizeObserver(()=>{g.current||y()}),i=[e.current,t.current,n.current].filter(e=>Boolean(e));return i.forEach(e=>{r.observe(e)}),()=>{r.disconnect()}},[y,e,t,n]),d(()=>{const e=v.current;if(v.current=h,e&&!h){const e=setTimeout(y,0);return()=>{clearTimeout(e)}}},[h,y]);const b=f(()=>{p(!0)},[]);return{top:r,left:c?{...o,height:0}:o,data:c?{...s,height:0}:s,resetHorizontalScrollbarHeight:b}})(e,t,n);return{scrollbarsDimensions:{verticalScrollbarWidth:Math.max(r.width,o.width),horizontalScrollbarHeight:Math.max(i.height,o.height)},resetHorizontalScrollbarHeight:a}},xV=()=>{const{interactions:e}=b$(),t=l(null),n=l(null),r=l(null),i=l(null),o=l([]),a=l([]),s=l(null),{scrollbarsDimensions:{verticalScrollbarWidth:u,horizontalScrollbarHeight:c},resetHorizontalScrollbarHeight:p}=bV({topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:i});(({gridSectionsWrapperRefs:{headerGridWrapperRef:e,topGridWrapperRef:t,leftGridWrapperRef:n,dataGridWrapperRef:r},gridRefs:{topGridRef:i,leftGridRef:o,dataGridRef:a}})=>{const{pageInfo:s}=g$(),{downloadService:l,viewService:u,layoutService:c}=w$(),d=f(()=>{const i={left:0,top:0};e.current?.scrollTo(i),t.current?.scrollTo(i),n.current?.scrollTo(i),r.current?.scrollTo(i)},[e,t,n,r]);g(()=>{d()},[s.page,d]),g(()=>{c.triggerdByExpandOrCollapse||d()},[c,d]),g(()=>{if(c.triggerdByExpandOrCollapse){const e=r.current?.scrollLeft??0,t=r.current?.scrollTop??0;o.current?.forEach(e=>{e?.scrollTo(t)}),i.current?.forEach(t=>{t?.scrollTo(e)}),a.current?.scrollTo({scrollTop:t,scrollLeft:e})}},[c,r,a,o,i]),g(()=>{(l.isDownloadedAsPDForImage||c.isSnapshot)&&r.current&&n.current&&t.current&&(r.current.scrollTop=u.scrollTop,r.current.scrollLeft=u.scrollLeft,n.current.scrollLeft=u.leftGridScrollLeft,t.current.scrollTop=u.topGridScrollTop)},[u,l,c,r,n,t])})({gridSectionsWrapperRefs:{headerGridWrapperRef:t,topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:i},gridRefs:{topGridRef:o,leftGridRef:a,dataGridRef:s}});const{trackScrollDirection:h,scrollDirectionRefs:{verticalScrollDirection:m,horizontalScrollDirection:v}}=(()=>{const e=l(_F.None),t=l(_F.None),n=l({prevScrollTop:0,prevScrollLeft:0}),r=f(r=>{if(r instanceof WheelEvent&&(e.current=mV(r.deltaY,0),t.current=mV(r.deltaX,0)),r instanceof Event&&!(r instanceof WheelEvent)){const i=r.target;e.current=mV(i.scrollTop,n.current.prevScrollTop),n.current.prevScrollTop=i.scrollTop,t.current=mV(i.scrollLeft,n.current.prevScrollLeft),n.current.prevScrollLeft=i.scrollLeft}},[e,t,n]);return{trackScrollDirection:r,scrollDirectionRefs:{verticalScrollDirection:e,horizontalScrollDirection:t}}})(),y=(()=>{const{viewService:e}=w$();return f(t=>{const n=t.target,r=t.currentTarget,i=n.dataset.key;i===pV&&(e.leftGridScrollLeft=r.scrollLeft),i===fV&&(e.scrollLeft=r.scrollLeft),i===dV&&(e.topGridScrollTop=r.scrollTop),i!==pV&&i!==fV||(e.scrollTop=r.scrollTop)},[e])})(),b={gridRefs:{topGridRef:o,leftGridRef:a,dataGridRef:s},getWrapperElements:f(()=>({headerGridWrapperElement:t.current,topGridWrapperElement:n.current,leftGridWrapperElement:r.current,dataGridWrapperElement:i.current}),[t,n,r,i]),updateViewService:y,trackScrollDirection:h,interactions:e};return(({gridRefs:{topGridRef:e,leftGridRef:t,dataGridRef:n},getWrapperElements:r,updateViewService:i,trackScrollDirection:o,interactions:a})=>{d(()=>{const{headerGridWrapperElement:i,topGridWrapperElement:s,leftGridWrapperElement:l,dataGridWrapperElement:u}=r(),c=e=>{e.ctrlKey||(e.preventDefault(),i.scrollLeft+=e.deltaX,i.scrollTop+=e.deltaY,l.scrollLeft=i.scrollLeft,s.scrollTop=i.scrollTop,o(e))},d=e=>{e.ctrlKey||(e.preventDefault(),l.scrollTop+=e.deltaY,t.current?.forEach(e=>{e?.scrollTo(l.scrollTop)}),i.scrollLeft+=e.deltaX,l.scrollLeft=i.scrollLeft,u.scrollTop=l.scrollTop,n.current?.scrollTo({scrollTop:l.scrollTop}),o(e))},p=t=>{t.ctrlKey||(t.preventDefault(),s.scrollLeft+=t.deltaX,e.current?.forEach(e=>{e?.scrollTo(s.scrollLeft)}),i.scrollTop+=t.deltaY,s.scrollTop=i.scrollTop,u.scrollLeft=s.scrollLeft,n.current?.scrollTo({scrollLeft:s.scrollLeft}),o(t))},f=r=>{r.ctrlKey||(r.preventDefault(),u.scrollLeft+=r.deltaX,u.scrollTop+=r.deltaY,n.current?.scrollTo({scrollLeft:u.scrollLeft,scrollTop:u.scrollTop}),s.scrollLeft=u.scrollLeft,e.current?.forEach(e=>{e?.scrollTo(u.scrollLeft)}),l.scrollTop=u.scrollTop,t.current?.forEach(e=>{e?.scrollTo(u.scrollTop)}),o(r))};return i.addEventListener("wheel",c),l.addEventListener("wheel",d),s.addEventListener("wheel",p),u.addEventListener("wheel",f),a.scroll||setTimeout(()=>{i.removeEventListener("wheel",c),l.removeEventListener("wheel",d),s.removeEventListener("wheel",p),u.removeEventListener("wheel",f)},0),()=>{i.removeEventListener("wheel",c),l.removeEventListener("wheel",d),s.removeEventListener("wheel",p),u.removeEventListener("wheel",f)}},[o,i,a,e,t,n,r])})(b),gV(b),{gridSectionsWrapperRefs:{headerGridWrapperRef:t,topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:i},gridRefs:{topGridRef:o,leftGridRef:a,dataGridRef:s},scrollDirectionRefs:{verticalScrollDirection:m,horizontalScrollDirection:v},scrollbarsDimensions:{verticalScrollbarWidth:u,horizontalScrollbarHeight:c,resetHorizontalScrollbarHeight:p}}},SV=()=>{const{layoutService:e}=w$(),{rect:t,pageInfo:n}=g$();return v(()=>{let{height:r}=t;return e.hasLimitedData&&(r-=22),n.shouldShowPagination&&(r-=41),{...t,height:r}},[t,e,n.shouldShowPagination])},wV=({children:e,style:t})=>fo.jsx("div",{"data-testid":"fullSize",style:t,children:e}),CV=({children:e,style:t})=>{const{direction:n}=g$();return fo.jsx("div",{"data-section-id":"GRID",style:{direction:n,display:"grid",...t},children:e})},EV=e=>e&&`scrollable-container--${e}`,IV=({children:e,style:t,origin:n},r)=>{const{interactions:i}=b$(),o=i.scroll?t:{overflow:"hidden"};return fo.jsx("div",{"data-testid":"scrollable","data-key":EV(n),style:o,ref:r,children:e})};var DV=n.forwardRef(IV);const RV=({children:e,style:t})=>{const{direction:n}=g$();return fo.jsx("div",{"data-testid":"sticky",style:{position:"sticky",top:0,["rtl"===n?"right":"left"]:0,...t},children:e})};var PV=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function MV(e,t){return e===t||!(!PV(e)||!PV(t))}function LV(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!MV(e[n],t[n]))return!1;return!0}function AV(e,t){var n;void 0===t&&(t=LV);var r,i=[],o=!1;return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return o&&n===this&&t(a,i)||(r=e.apply(this,a),o=!0,n=this,i=a),r}}var kV="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function OV(e){cancelAnimationFrame(e.id)}function qV(e,t){var n=kV();var r={id:requestAnimationFrame(function i(){kV()-n>=t?e.call(null):r.id=requestAnimationFrame(i)})};return r}var TV=-1;function NV(e){if(void 0===e&&(e=!1),-1===TV||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),TV=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return TV}var jV=null;function _V(e){if(void 0===e&&(e=!1),null===jV||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),i=r.style;return i.width="100px",i.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?jV="positive-descending":(t.scrollLeft=1,jV=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),jV}return jV}var FV=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function zV(e){var t,n=e.getColumnOffset,i=e.getColumnStartIndexForOffset,o=e.getColumnStopIndexForStartIndex,a=e.getColumnWidth,s=e.getEstimatedTotalHeight,l=e.getEstimatedTotalWidth,u=e.getOffsetForColumnAndAlignment,c=e.getOffsetForRowAndAlignment,d=e.getRowHeight,p=e.getRowOffset,f=e.getRowStartIndexForOffset,h=e.getRowStopIndexForStartIndex,m=e.initInstanceProps,g=e.shouldResetStyleCacheOnItemSizeChange,v=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=m(r.props,$l(r)),r._resetIsScrollingTimeoutId=null,r._outerRef=void 0,r.state={instance:$l(r),isScrolling:!1,horizontalScrollDirection:"forward",scrollLeft:"number"==typeof r.props.initialScrollLeft?r.props.initialScrollLeft:0,scrollTop:"number"==typeof r.props.initialScrollTop?r.props.initialScrollTop:0,scrollUpdateWasRequested:!1,verticalScrollDirection:"forward"},r._callOnItemsRendered=void 0,r._callOnItemsRendered=AV(function(e,t,n,i,o,a,s,l){return r.props.onItemsRendered({overscanColumnStartIndex:e,overscanColumnStopIndex:t,overscanRowStartIndex:n,overscanRowStopIndex:i,visibleColumnStartIndex:o,visibleColumnStopIndex:a,visibleRowStartIndex:s,visibleRowStopIndex:l})}),r._callOnScroll=void 0,r._callOnScroll=AV(function(e,t,n,i,o){return r.props.onScroll({horizontalScrollDirection:n,scrollLeft:e,scrollTop:t,verticalScrollDirection:i,scrollUpdateWasRequested:o})}),r._getItemStyle=void 0,r._getItemStyle=function(e,t){var i,o=r.props,s=o.columnWidth,l=o.direction,u=o.rowHeight,c=r._getItemStyleCache(g&&s,g&&l,g&&u),f=e+":"+t;if(c.hasOwnProperty(f))i=c[f];else{var h=n(r.props,t,r._instanceProps),m="rtl"===l;c[f]=i={position:"absolute",left:m?void 0:h,right:m?h:void 0,top:p(r.props,e,r._instanceProps),height:d(r.props,e,r._instanceProps),width:a(r.props,t,r._instanceProps)}}return i},r._getItemStyleCache=void 0,r._getItemStyleCache=AV(function(e,t,n){return{}}),r._onScroll=function(e){var t=e.currentTarget,n=t.clientHeight,i=t.clientWidth,o=t.scrollLeft,a=t.scrollTop,s=t.scrollHeight,l=t.scrollWidth;r.setState(function(e){if(e.scrollLeft===o&&e.scrollTop===a)return null;var t=r.props.direction,u=o;if("rtl"===t)switch(_V()){case"negative":u=-o;break;case"positive-descending":u=l-i-o}u=Math.max(0,Math.min(u,l-i));var c=Math.max(0,Math.min(a,s-n));return{isScrolling:!0,horizontalScrollDirection:e.scrollLeft<o?"forward":"backward",scrollLeft:u,scrollTop:c,verticalScrollDirection:e.scrollTop<a?"forward":"backward",scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&OV(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=qV(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1)})},r}kl(t,e),t.getDerivedStateFromProps=function(e,t){return WV(e,t),v(e),null};var y=t.prototype;return y.scrollTo=function(e){var t=e.scrollLeft,n=e.scrollTop;void 0!==t&&(t=Math.max(0,t)),void 0!==n&&(n=Math.max(0,n)),this.setState(function(e){return void 0===t&&(t=e.scrollLeft),void 0===n&&(n=e.scrollTop),e.scrollLeft===t&&e.scrollTop===n?null:{horizontalScrollDirection:e.scrollLeft<t?"forward":"backward",scrollLeft:t,scrollTop:n,scrollUpdateWasRequested:!0,verticalScrollDirection:e.scrollTop<n?"forward":"backward"}},this._resetIsScrollingDebounced)},y.scrollToItem=function(e){var t=e.align,n=void 0===t?"auto":t,r=e.columnIndex,i=e.rowIndex,o=this.props,a=o.columnCount,d=o.height,p=o.rowCount,f=o.width,h=this.state,m=h.scrollLeft,g=h.scrollTop,v=NV();void 0!==r&&(r=Math.max(0,Math.min(r,a-1))),void 0!==i&&(i=Math.max(0,Math.min(i,p-1)));var y=s(this.props,this._instanceProps),b=l(this.props,this._instanceProps)>f?v:0,x=y>d?v:0;this.scrollTo({scrollLeft:void 0!==r?u(this.props,r,n,m,this._instanceProps,x):m,scrollTop:void 0!==i?c(this.props,i,n,g,this._instanceProps,b):g})},y.componentDidMount=function(){var e=this.props,t=e.initialScrollLeft,n=e.initialScrollTop;if(null!=this._outerRef){var r=this._outerRef;"number"==typeof t&&(r.scrollLeft=t),"number"==typeof n&&(r.scrollTop=n)}this._callPropsCallbacks()},y.componentDidUpdate=function(){var e=this.props.direction,t=this.state,n=t.scrollLeft,r=t.scrollTop;if(t.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("rtl"===e)switch(_V()){case"negative":i.scrollLeft=-n;break;case"positive-ascending":i.scrollLeft=n;break;default:var o=i.clientWidth,a=i.scrollWidth;i.scrollLeft=a-o-n}else i.scrollLeft=Math.max(0,n);i.scrollTop=Math.max(0,r)}this._callPropsCallbacks()},y.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&OV(this._resetIsScrollingTimeoutId)},y.render=function(){var e=this.props,t=e.children,n=e.className,i=e.columnCount,o=e.direction,a=e.height,u=e.innerRef,c=e.innerElementType,d=e.innerTagName,p=e.itemData,f=e.itemKey,h=void 0===f?FV:f,m=e.outerElementType,g=e.outerTagName,v=e.rowCount,y=e.style,b=e.useIsScrolling,x=e.width,S=this.state.isScrolling,w=this._getHorizontalRangeToRender(),C=w[0],E=w[1],I=this._getVerticalRangeToRender(),D=I[0],R=I[1],P=[];if(i>0&&v)for(var M=D;M<=R;M++)for(var L=C;L<=E;L++)P.push(r(t,{columnIndex:L,data:p,isScrolling:b?S:void 0,key:h({columnIndex:L,data:p,rowIndex:M}),rowIndex:M,style:this._getItemStyle(M,L)}));var A=s(this.props,this._instanceProps),k=l(this.props,this._instanceProps);return r(m||g||"div",{className:n,onScroll:this._onScroll,ref:this._outerRefSetter,style:ke({position:"relative",height:a,width:x,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},y)},r(c||d||"div",{children:P,ref:u,style:{height:A,pointerEvents:S?"none":void 0,width:k}}))},y._callPropsCallbacks=function(){var e=this.props,t=e.columnCount,n=e.onItemsRendered,r=e.onScroll,i=e.rowCount;if("function"==typeof n&&t>0&&i>0){var o=this._getHorizontalRangeToRender(),a=o[0],s=o[1],l=o[2],u=o[3],c=this._getVerticalRangeToRender(),d=c[0],p=c[1],f=c[2],h=c[3];this._callOnItemsRendered(a,s,d,p,l,u,f,h)}if("function"==typeof r){var m=this.state,g=m.horizontalScrollDirection,v=m.scrollLeft,y=m.scrollTop,b=m.scrollUpdateWasRequested,x=m.verticalScrollDirection;this._callOnScroll(v,y,g,x,b)}},y._getHorizontalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanColumnCount,r=e.overscanColumnsCount,a=e.overscanCount,s=e.rowCount,l=this.state,u=l.horizontalScrollDirection,c=l.isScrolling,d=l.scrollLeft,p=n||r||a||1;if(0===t||0===s)return[0,0,0,0];var f=i(this.props,d,this._instanceProps),h=o(this.props,f,d,this._instanceProps),m=c&&"backward"!==u?1:Math.max(1,p),g=c&&"forward"!==u?1:Math.max(1,p);return[Math.max(0,f-m),Math.max(0,Math.min(t-1,h+g)),f,h]},y._getVerticalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanCount,r=e.overscanRowCount,i=e.overscanRowsCount,o=e.rowCount,a=this.state,s=a.isScrolling,l=a.verticalScrollDirection,u=a.scrollTop,c=r||i||n||1;if(0===t||0===o)return[0,0,0,0];var d=f(this.props,u,this._instanceProps),p=h(this.props,d,u,this._instanceProps),m=s&&"backward"!==l?1:Math.max(1,c),g=s&&"forward"!==l?1:Math.max(1,c);return[Math.max(0,d-m),Math.max(0,Math.min(o-1,p+g)),d,p]},t}(C),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var WV=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},$V=function(e,t){var n=e.rowCount,r=t.rowMetadataMap,i=t.estimatedRowHeight,o=t.lastMeasuredRowIndex,a=0;if(o>=n&&(o=n-1),o>=0){var s=r[o];a=s.offset+s.size}return a+(n-o-1)*i},HV=function(e,t){var n=e.columnCount,r=t.columnMetadataMap,i=t.estimatedColumnWidth,o=t.lastMeasuredColumnIndex,a=0;if(o>=n&&(o=n-1),o>=0){var s=r[o];a=s.offset+s.size}return a+(n-o-1)*i},VV=function(e,t,n,r){var i,o,a;if("column"===e?(i=r.columnMetadataMap,o=t.columnWidth,a=r.lastMeasuredColumnIndex):(i=r.rowMetadataMap,o=t.rowHeight,a=r.lastMeasuredRowIndex),n>a){var s=0;if(a>=0){var l=i[a];s=l.offset+l.size}for(var u=a+1;u<=n;u++){var c=o(u);i[u]={offset:s,size:c},s+=c}"column"===e?r.lastMeasuredColumnIndex=n:r.lastMeasuredRowIndex=n}return i[n]},BV=function(e,t,n,r){var i,o;return"column"===e?(i=n.columnMetadataMap,o=n.lastMeasuredColumnIndex):(i=n.rowMetadataMap,o=n.lastMeasuredRowIndex),(o>0?i[o].offset:0)>=r?GV(e,t,n,o,0,r):UV(e,t,n,Math.max(0,o),r)},GV=function(e,t,n,r,i,o){for(;i<=r;){var a=i+Math.floor((r-i)/2),s=VV(e,t,a,n).offset;if(s===o)return a;s<o?i=a+1:s>o&&(r=a-1)}return i>0?i-1:0},UV=function(e,t,n,r,i){for(var o="column"===e?t.columnCount:t.rowCount,a=1;r<o&&VV(e,t,r,n).offset<i;)r+=a,a*=2;return GV(e,t,n,Math.min(r,o-1),Math.floor(r/2),i)},YV=function(e,t,n,r,i,o,a){var s="column"===e?t.width:t.height,l=VV(e,t,n,o),u="column"===e?HV(t,o):$V(t,o),c=Math.max(0,Math.min(u-s,l.offset)),d=Math.max(0,l.offset-s+a+l.size);switch("smart"===r&&(r=i>=d-s&&i<=c+s?"auto":"center"),r){case"start":return c;case"end":return d;case"center":return Math.round(d+(c-d)/2);default:return i>=d&&i<=c?i:d>c||i<d?d:c}},KV=zV({getColumnOffset:function(e,t,n){return VV("column",e,t,n).offset},getColumnStartIndexForOffset:function(e,t,n){return BV("column",e,n,t)},getColumnStopIndexForStartIndex:function(e,t,n,r){for(var i=e.columnCount,o=e.width,a=VV("column",e,t,r),s=n+o,l=a.offset+a.size,u=t;u<i-1&&l<s;)u++,l+=VV("column",e,u,r).size;return u},getColumnWidth:function(e,t,n){return n.columnMetadataMap[t].size},getEstimatedTotalHeight:$V,getEstimatedTotalWidth:HV,getOffsetForColumnAndAlignment:function(e,t,n,r,i,o){return YV("column",e,t,n,r,i,o)},getOffsetForRowAndAlignment:function(e,t,n,r,i,o){return YV("row",e,t,n,r,i,o)},getRowOffset:function(e,t,n){return VV("row",e,t,n).offset},getRowHeight:function(e,t,n){return n.rowMetadataMap[t].size},getRowStartIndexForOffset:function(e,t,n){return BV("row",e,n,t)},getRowStopIndexForStartIndex:function(e,t,n,r){for(var i=e.rowCount,o=e.height,a=VV("row",e,t,r),s=n+o,l=a.offset+a.size,u=t;u<i-1&&l<s;)u++,l+=VV("row",e,u,r).size;return u},initInstanceProps:function(e,t){var n=e,r={columnMetadataMap:{},estimatedColumnWidth:n.estimatedColumnWidth||50,estimatedRowHeight:n.estimatedRowHeight||50,lastMeasuredColumnIndex:-1,lastMeasuredRowIndex:-1,rowMetadataMap:{}};return t.resetAfterColumnIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({columnIndex:e,shouldForceUpdate:n})},t.resetAfterRowIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({rowIndex:e,shouldForceUpdate:n})},t.resetAfterIndices=function(e){var n=e.columnIndex,i=e.rowIndex,o=e.shouldForceUpdate,a=void 0===o||o;"number"==typeof n&&(r.lastMeasuredColumnIndex=Math.min(r.lastMeasuredColumnIndex,n-1)),"number"==typeof i&&(r.lastMeasuredRowIndex=Math.min(r.lastMeasuredRowIndex,i-1)),t._getItemStyleCache(-1),a&&t.forceUpdate()},r},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.columnWidth,e.rowHeight}}),XV=function(e,t){return e};function JV(e){var t,n=e.getItemOffset,i=e.getEstimatedTotalSize,o=e.getItemSize,a=e.getOffsetForIndexAndAlignment,s=e.getStartIndexForOffset,l=e.getStopIndexForStartIndex,u=e.initInstanceProps,c=e.shouldResetStyleCacheOnItemSizeChange,d=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=u(r.props,$l(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:$l(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=AV(function(e,t,n,i){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:i})}),r._callOnScroll=void 0,r._callOnScroll=AV(function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})}),r._getItemStyle=void 0,r._getItemStyle=function(e){var t,i=r.props,a=i.direction,s=i.itemSize,l=i.layout,u=r._getItemStyleCache(c&&s,c&&l,c&&a);if(u.hasOwnProperty(e))t=u[e];else{var d=n(r.props,e,r._instanceProps),p=o(r.props,e,r._instanceProps),f="horizontal"===a||"horizontal"===l,h="rtl"===a,m=f?d:0;u[e]=t={position:"absolute",left:h?void 0:m,right:h?m:void 0,top:f?0:d,height:f?"100%":p,width:f?p:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=AV(function(e,t,n){return{}}),r._onScrollHorizontal=function(e){var t=e.currentTarget,n=t.clientWidth,i=t.scrollLeft,o=t.scrollWidth;r.setState(function(e){if(e.scrollOffset===i)return null;var t=r.props.direction,a=i;if("rtl"===t)switch(_V()){case"negative":a=-i;break;case"positive-descending":a=o-n-i}return a=Math.max(0,Math.min(a,o-n)),{isScrolling:!0,scrollDirection:e.scrollOffset<a?"forward":"backward",scrollOffset:a,scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._onScrollVertical=function(e){var t=e.currentTarget,n=t.clientHeight,i=t.scrollHeight,o=t.scrollTop;r.setState(function(e){if(e.scrollOffset===o)return null;var t=Math.max(0,Math.min(o,i-n));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&OV(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=qV(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1,null)})},r}kl(t,e),t.getDerivedStateFromProps=function(e,t){return ZV(e,t),d(e),null};var p=t.prototype;return p.scrollTo=function(e){e=Math.max(0,e),this.setState(function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffset<e?"forward":"backward",scrollOffset:e,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},p.scrollToItem=function(e,t){void 0===t&&(t="auto");var n=this.props,r=n.itemCount,i=n.layout,o=this.state.scrollOffset;e=Math.max(0,Math.min(e,r-1));var s=0;if(this._outerRef){var l=this._outerRef;s="vertical"===i?l.scrollWidth>l.clientWidth?NV():0:l.scrollHeight>l.clientHeight?NV():0}this.scrollTo(a(this.props,e,t,o,this._instanceProps,s))},p.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,r=e.layout;if("number"==typeof n&&null!=this._outerRef){var i=this._outerRef;"horizontal"===t||"horizontal"===r?i.scrollLeft=n:i.scrollTop=n}this._callPropsCallbacks()},p.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,i=r.scrollOffset;if(r.scrollUpdateWasRequested&&null!=this._outerRef){var o=this._outerRef;if("horizontal"===t||"horizontal"===n)if("rtl"===t)switch(_V()){case"negative":o.scrollLeft=-i;break;case"positive-ascending":o.scrollLeft=i;break;default:var a=o.clientWidth,s=o.scrollWidth;o.scrollLeft=s-a-i}else o.scrollLeft=i;else o.scrollTop=i}this._callPropsCallbacks()},p.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&OV(this._resetIsScrollingTimeoutId)},p.render=function(){var e=this.props,t=e.children,n=e.className,o=e.direction,a=e.height,s=e.innerRef,l=e.innerElementType,u=e.innerTagName,c=e.itemCount,d=e.itemData,p=e.itemKey,f=void 0===p?XV:p,h=e.layout,m=e.outerElementType,g=e.outerTagName,v=e.style,y=e.useIsScrolling,b=e.width,x=this.state.isScrolling,S="horizontal"===o||"horizontal"===h,w=S?this._onScrollHorizontal:this._onScrollVertical,C=this._getRangeToRender(),E=C[0],I=C[1],D=[];if(c>0)for(var R=E;R<=I;R++)D.push(r(t,{data:d,key:f(R,d),index:R,isScrolling:y?x:void 0,style:this._getItemStyle(R)}));var P=i(this.props,this._instanceProps);return r(m||g||"div",{className:n,onScroll:w,ref:this._outerRefSetter,style:ke({position:"relative",height:a,width:b,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},v)},r(l||u||"div",{children:D,ref:s,style:{height:S?"100%":P,pointerEvents:x?"none":void 0,width:S?P:"100%"}}))},p._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],i=e[3];this._callOnItemsRendered(t,n,r,i)}if("function"==typeof this.props.onScroll){var o=this.state,a=o.scrollDirection,s=o.scrollOffset,l=o.scrollUpdateWasRequested;this._callOnScroll(a,s,l)}},p._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,i=r.isScrolling,o=r.scrollDirection,a=r.scrollOffset;if(0===t)return[0,0,0,0];var u=s(this.props,a,this._instanceProps),c=l(this.props,u,a,this._instanceProps),d=i&&"backward"!==o?1:Math.max(1,n),p=i&&"forward"!==o?1:Math.max(1,n);return[Math.max(0,u-d),Math.max(0,Math.min(t-1,c+p)),u,c]},t}(C),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var ZV=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},QV=function(e,t,n){var r=e.itemSize,i=n.itemMetadataMap,o=n.lastMeasuredIndex;if(t>o){var a=0;if(o>=0){var s=i[o];a=s.offset+s.size}for(var l=o+1;l<=t;l++){var u=r(l);i[l]={offset:a,size:u},a+=u}n.lastMeasuredIndex=t}return i[t]},eB=function(e,t,n,r,i){for(;r<=n;){var o=r+Math.floor((n-r)/2),a=QV(e,o,t).offset;if(a===i)return o;a<i?r=o+1:a>i&&(n=o-1)}return r>0?r-1:0},tB=function(e,t,n,r){for(var i=e.itemCount,o=1;n<i&&QV(e,n,t).offset<r;)n+=o,o*=2;return eB(e,t,Math.min(n,i-1),Math.floor(n/2),r)},nB=function(e,t){var n=e.itemCount,r=t.itemMetadataMap,i=t.estimatedItemSize,o=t.lastMeasuredIndex,a=0;if(o>=n&&(o=n-1),o>=0){var s=r[o];a=s.offset+s.size}return a+(n-o-1)*i},rB=JV({getItemOffset:function(e,t,n){return QV(e,t,n).offset},getItemSize:function(e,t,n){return n.itemMetadataMap[t].size},getEstimatedTotalSize:nB,getOffsetForIndexAndAlignment:function(e,t,n,r,i,o){var a=e.direction,s=e.height,l=e.layout,u=e.width,c="horizontal"===a||"horizontal"===l?u:s,d=QV(e,t,i),p=nB(e,i),f=Math.max(0,Math.min(p-c,d.offset)),h=Math.max(0,d.offset-c+d.size+o);switch("smart"===n&&(n=r>=h-c&&r<=f+c?"auto":"center"),n){case"start":return f;case"end":return h;case"center":return Math.round(h+(f-h)/2);default:return r>=h&&r<=f?r:r<h?h:f}},getStartIndexForOffset:function(e,t,n){return function(e,t,n){var r=t.itemMetadataMap,i=t.lastMeasuredIndex;return(i>0?r[i].offset:0)>=n?eB(e,t,i,0,n):tB(e,t,Math.max(0,i),n)}(e,n,t)},getStopIndexForStartIndex:function(e,t,n,r){for(var i=e.direction,o=e.height,a=e.itemCount,s=e.layout,l=e.width,u="horizontal"===i||"horizontal"===s?l:o,c=QV(e,t,r),d=n+u,p=c.offset+c.size,f=t;f<a-1&&p<d;)f++,p+=QV(e,f,r).size;return f},initInstanceProps:function(e,t){var n={itemMetadataMap:{},estimatedItemSize:e.estimatedItemSize||50,lastMeasuredIndex:-1};return t.resetAfterIndex=function(e,r){void 0===r&&(r=!0),n.lastMeasuredIndex=Math.min(n.lastMeasuredIndex,e-1),t._getItemStyleCache(-1),r&&t.forceUpdate()},n},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.itemSize}});function iB(e,t){for(var n in e)if(!(n in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1}var oB=["style"],aB=["style"];function sB(e,t){var n=e.style,r=Oe(e,oB),i=t.style,o=Oe(t,aB);return!iB(n,i)&&!iB(r,o)}const lB=10,uB=(e,t)=>e.current===_F.Backward?t:0,cB=(e,t,n,r)=>{for(let i=n;i<n+r;i++){const n=e.at(i);if(void 0===n||void 0===n.at(t))return!0}return!1},dB=(e,t)=>e.qLeft+e.qWidth===t.qLeft&&e.qTop===t.qTop&&e.qHeight===t.qHeight,pB=({pageInfo:e,measureData:t,pageTop:n,qHeight:r,startLeft:i,endLeft:o})=>{const a=[],s=e.page*e.rowsPerPage;for(let e=i;e<o;e++)if(cB(t,e,n,r)){const t=a[a.length-1],i={qLeft:e,qTop:n+s,qWidth:1,qHeight:r};void 0!==t&&dB(t,i)?t.qWidth+=i.qWidth:a.push(i)}return a},fB=({pageInfo:e,measureData:t,scrollDirection:n,viewService:r,minBufferStartLeft:i,minBufferEndLeft:o,columnEndIndex:a})=>{const{gridRowStartIndex:s,gridHeight:l}=r,u=n.current===_F.Backward?Math.max(0,i-25):o,c=Math.min(u+25,a);return pB({pageInfo:e,measureData:t,startLeft:u,endLeft:c,pageTop:s,qHeight:l})},hB=({pageInfo:e,measureData:t,scrollDirection:n,layoutService:r,viewService:i})=>{const{startLeft:o,endLeft:a,pageTop:s,qHeight:l}=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:i,gridWidth:o,gridHeight:a}=t,s=e.size.x,l=uB(n,lB),u=Math.max(r-l,0);return{startLeft:u,endLeft:u+Math.min(o+lB,s-u),pageTop:i,qHeight:a}})(r,i,n),u=pB({pageInfo:e,measureData:t,startLeft:o,endLeft:a,pageTop:s,qHeight:l});return u.length>0?[...u,...fB({pageInfo:e,measureData:t,scrollDirection:n,viewService:i,minBufferStartLeft:o,minBufferEndLeft:a,columnEndIndex:r.size.x})]:u},mB=(e,t,n,r)=>{const i=e[n];if(void 0===i)return!0;for(let e=t;e<t+r;e++){if(void 0===i[e])return!0}return!1},gB=(e,t)=>e.qTop+e.qHeight===t.qTop&&e.qLeft===t.qLeft&&e.qWidth===t.qWidth,vB=({startTop:e,endTop:t,qLeft:n,qWidth:r,measureData:i,pageInfo:o})=>{const a=[],s=o.page*o.rowsPerPage;for(let o=e;o<t;o++)if(mB(i,n,o,r)){const e=a.at(-1),t={qLeft:n,qTop:o+s,qWidth:r,qHeight:1};void 0!==e&&gB(e,t)?e.qHeight+=t.qHeight:a.push(t)}return a},yB=({pageInfo:e,measureData:t,scrollDirection:n,viewService:r})=>{const{startTop:i,endTop:o,qLeft:a,qWidth:s}=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:i,gridWidth:o,gridHeight:a}=t,s=uB(n,lB),l=Math.max(i-s,0);return{startTop:l,endTop:l+Math.min(a+lB,e.rowsOnCurrentPage-l),qLeft:r,qWidth:o}})(e,r,n),l=vB({startTop:i,endTop:o,qLeft:a,qWidth:s,measureData:t,pageInfo:e});if(l.length>0){const r=n.current===_F.Backward?Math.max(0,i-25):o,u=Math.min(r+25,e.rowsOnCurrentPage),c=vB({startTop:r,endTop:u,qLeft:a,qWidth:s,measureData:t,pageInfo:e});return[...l,...c]}return l},bB=async(e,t,n,r,i,o,a,s)=>{const{gridColumnStartIndex:l,gridRowStartIndex:u,gridWidth:c,gridHeight:d}=i;let p=[],f=[];o.current!==_F.None&&(p=yB({pageInfo:r,measureData:n,scrollDirection:o,viewService:i})),a.current!==_F.None&&(f=hB({pageInfo:r,measureData:n,scrollDirection:a,layoutService:t,viewService:i})),o.current===_F.None&&a.current===_F.None&&(p=vB({measureData:n,pageInfo:r,qLeft:l,qWidth:c,startTop:u,endTop:u+d}));const h=e.fetchPages([...p,...f]);s.isDownloadedAsPDForImage&&s.waitForPromise(h)},xB=function(e){var t,n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,o=0;return function(){t=this;for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];n=s;var u=Date.now()-o,c=function(){o=Date.now(),r=0,e.apply(t,n)};r||(u>=i?c():r=setTimeout(c,i-u))}}(bB,100),SB=Qj(bB,75),wB=(e,t,n=!1)=>void 0!==e&&(e.isLeafNode||n&&e.isLeftColumn?e.mainAxisPageCoord===t:e.mainAxisPageCoord+e.leafCount-1===t),CB=({style:e,index:t,isLastRow:n,isLastColumn:r,showLastBorder:i,isLeftColumn:o,showTotalCellDivider:a})=>{const{direction:s}=g$(),{styleService:{grid:{border:l,divider:u}}}=w$();return fo.jsx("div",{style:{...e,...dz,...mz(n,r,l,s,i),...vz({bottomDivider:a&&o,rightDivider:a&&!o,borderColor:u})},"data-testid":"empty-cell","data-index":t})},EB=({children:e,verticalAlign:t,width:n,right:r,isLeftColumn:i})=>{const{layoutService:{isIndentModeEnabled:o}}=w$(),a=i&&o;return fo.jsx("div",{"data-key":"sticky-cell-container",style:{display:"flex",flexDirection:"row",width:n,maxWidth:"100%",maxHeight:"100%",position:"sticky",left:4,top:0,bottom:0,right:r,...!a&&{alignItems:t,alignSelf:t,overflow:"hidden"}},children:e})},IB=e=>{const{type:t,imageSize:n}=e;return t!==PF.Image||"fill"!==n&&"fitWidth"!==n?"fit-content":"100%"},DB=e=>"number"==typeof e&&!Number.isNaN(+e),RB=e=>"string"==typeof e&&e.length>0||"number"==typeof e?+e:NaN,PB=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M7.5 8.5H2v-1h5.5V2h1v5.5H14v1H8.5V14h-1z"})})),MB=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8"})})),LB=x((e,t)=>fo.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:[fo.jsx("path",{d:"M3 9v6.5a.5.5 0 1 1-1 0V.5a.5.5 0 0 1 1 0V1q2.441.639 3.667.639c1.225 0 1.774-.995 3.87-1.196q1.972-.19 3.297.47A.3.3 0 0 1 14 1.18v7.344a.3.3 0 0 1-.417.277q-1.338-.565-3.045-.416c-1.98.172-2.083 1.107-3.871 1.253Q4.879 9.785 3 9"}),fo.jsx("use",{fillRule:"evenodd"})]})),AB=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M13.9 7.4c-1 1.3-.6 1.5-1.5 4.1-.5 1.8-1.2 2.9-1.7 3.6q-.45.6-.9.9H4.2c-1 0-1.6-.5-1.9-1-.2-.3-.3-.6-.3-1V4.2c0-.4.3-.7.7-.7s.7.3.7.7v3.6l.9-.1V1.6c0-.4.3-.7.7-.7s.7.3.7.7v5.1l1.1-.2V.7C6.7.3 7 0 7.4 0s.7.3.7.7v5.9l1.1.1V1.6c0-.4.3-.7.7-.7s.7.3.7.7v7.7s.1 0 .1-.2l.6-1.4c1.1-2.1 3.1-1.1 2.6-.3"})})),kB=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M5 13h6v1.5c0 .3-.2.5-.5.5H10v.5c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5V15h-.5c-.3 0-.5-.2-.5-.5zm0-1c0-2-3-3-3-7 0-3 3-5 6-5s6 2 6 5c0 4-3 4-3 7H5m-.5-7c.3 0 .5-.2.5-.5s.2-.7.5-1 .6-.5 1-.5c.3 0 .5-.2.5-.5S6.8 2 6.5 2c-.6 0-1.2.3-1.7.8S4 3.9 4 4.5c0 .3.2.5.5.5"})})),OB=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8m4.5 9c.25 0 .5-.3.5-.6v-.8c0-.3-.25-.6-.5-.6h-9c-.25 0-.5.3-.5.6v.7c0 .4.25.7.5.7z"})})),qB=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M2 7.5h12v1H2z"})})),TB=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M9 7h7a7.004 7.004 0 0 0-7-7zm1-5.917A6.005 6.005 0 0 1 14.917 6H10zM14 9H7V2a7.002 7.002 0 0 0 0 14 7 7 0 0 0 7-7m-8 1h6.917A6.002 6.002 0 0 1 1 9a6 6 0 0 1 5-5.917z"})})),NB=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M9 9h3.5c.25 0 .5-.3.5-.6v-.8c0-.3-.25-.6-.5-.6H9V3.5c0-.25-.3-.5-.6-.5h-.7c-.4 0-.7.25-.7.5V7H3.5c-.25 0-.5.3-.5.6v.7c0 .4.25.7.5.7H7v3.5c0 .25.3.5.6.5h.8c.3 0 .6-.25.6-.5zM8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8"})})),jB=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"m8.418 1.007.042.08 1.788 4.217 4.571.388a.5.5 0 0 1 .348.811l-.063.065-3.472 3.008 1.043 4.47a.5.5 0 0 1-.664.581l-.081-.04L8 12.217l-3.93 2.372a.5.5 0 0 1-.757-.453l.012-.089 1.043-4.47L.896 6.568a.5.5 0 0 1 .196-.86l.089-.016 4.571-.388L7.54 1.086a.5.5 0 0 1 .878-.08Z"})})),_B=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M13 14H3a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1"})})),FB=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"m6 10 7-7 2 2-7 7-2 2-5-5 2-2z"})})),zB=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M2.4 4h11.2a.2.2 0 0 1 .16.32l-5.6 7.467a.2.2 0 0 1-.32 0L2.24 4.32A.2.2 0 0 1 2.4 4"})})),WB=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M11 2.4v11.2a.2.2 0 0 1-.32.16l-7.467-5.6a.2.2 0 0 1 0-.32l7.467-5.6a.2.2 0 0 1 .32.16"})})),$B=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M4 13.6V2.4a.2.2 0 0 1 .32-.16l7.467 5.6a.2.2 0 0 1 0 .32l-7.467 5.6A.2.2 0 0 1 4 13.6"})})),HB={m:FB,"ï":jB,R:x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M13.6 11H2.4a.2.2 0 0 1-.16-.32l5.6-7.467a.2.2 0 0 1 .32 0l5.6 7.467a.2.2 0 0 1-.16.32"})})),S:zB,T:WB,U:$B,P:NB,Q:OB,"è":x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M14.98 15H1.04c-1.002 0-1.303-.7-.802-1.5l6.82-11.9c.5-.8 1.303-.8 1.804 0l6.92 11.9c.501.8.1 1.5-.803 1.5M8.5 5h-1c-.3 0-.5.2-.5.5V9c0 .3.2.5.5.5h1c.3 0 .5-.2.5-.5V5.5c0-.3-.2-.5-.5-.5m-1 6c-.3 0-.5.2-.5.5v1c0 .3.2.5.5.5h1c.3 0 .5-.2.5-.5v-1c0-.3-.2-.5-.5-.5z"})})),"¢":AB,"©":LB,"23F4":kB,2013:_B,"&":TB,add:PB,"minus-2":qB,dot:MB},VB=({size:e,iconKey:t,color:n,pvStyle:r})=>{const i=t&&HB[t];return i&&fo.jsx("div",{"data-testid":"representation-indicator-icon",style:{color:n,height:e,...r},children:fo.jsx(i,{style:{height:e}})})},BB=(e,t)=>e.max===e.min?.5:(t-e.min)/(e.max-e.min),GB=(e,t,n)=>{const r=e.paletteColors?e.paletteColors[t]:e.localPaletteColors[t];return n.getColorPickerColor(r)},UB=(e,t,n)=>{const r={previousColor:(i=e.localPaletteColors)[(o=t)-(o>0?1:0)],nextColor:i[o+(o<i.length-1?1:0)]};var i,o;const a=((e,t)=>{const n=e.limits&&e.limits.concat().sort((e,t)=>e.value-t.value);return{lowerLimit:n&&t>0?n[t-1]:{value:0,gradient:!1},upperLimit:n&&n[t]?n[t]:{value:1,gradient:!1}}})(e,t),s=((e,t,n,r,i)=>{const{upperLimit:o,lowerLimit:a}=e,{previousColor:s,nextColor:l}=t,u=r===o.value?1:(r-a.value)/(o.value-a.value);return a.gradient&&o.gradient?r-a.value<o.value-r?{color:s.color,t:.5-u}:{color:l.color,t:u-.5}:a.gradient?{color:s.color,t:1-(.5+u/2)}:o.gradient?{color:l.color,t:u/2}:{color:i.localPaletteColors[n].color,t:r}})(a,r,t,n,e);return MN(e.localPaletteColors[t].color??"").blend(MN(s.color??""),s.t)},YB=(e,t,n)=>{const r=((e,t)=>{const{limits:n}=e;return n&&(e.limits=n.sort((e,t)=>e.value-t.value),e.limits=n.map(e=>({...e,value:BB(t,e.value)}))),e})({...e},t),i=r.paletteColors||r.localPaletteColors;return i&&(r.localPaletteColors=i.concat().map((e,t)=>({color:GB(r,t,n)}))),r},KB=(e,t,n,r)=>{const i=YB(e,n,r),{localPaletteColors:o}=i;if(t<=0)return o[0].color;if(t>=1)return o[o.length-1].color;const a=((e,t)=>{let n="",r=0;const{limits:i,localPaletteColors:o}=e;for(let a=0;a<o.length;a++){const o=i&&i[a]?i[a].value:1;if(t>=r&&t<o){n=UB(e,a,t);break}r=o}return n})(i,t);return a},XB=(e,t)=>{const n=(e=>e.map(e=>e.value??e).sort((e,t)=>e-t))(e),r=n.some(e=>!DB(e));return 0===n.length||r?(e=>{const t=0===e?0:.5*e;return{min:e-t,max:e+t}})(t):1===n.length?((e,t)=>{const n=e[0]-t;if(0===n||!DB(n)){const e=0===t?.5:Math.abs(.5*t);return{min:t-e,max:t+e}}return n>0?{min:t-.5*Math.abs(t),max:e[0]+2*n}:{min:e[0]+2*n,max:t+.5*Math.abs(t)}})(n,t):((e,t)=>{let n=e[e.length-1]-e[0];return n=n>0?n:1,{min:Math.min(t,e[0])-n/2,max:Math.max(t,e[e.length-1])+n/2}})(n,t)},JB=(e,t)=>{const{limits:n}=e.segments;if(!n)return;const r=((e,t)=>{const{min:n,max:r}=XB(e,t),i=Math.abs(t);return{min:n??t-i,max:r??t+i}})(n,t),i=((e,t,n)=>{const{limits:r,paletteColors:i,localPaletteColors:o}=e.segments;if(!r||!DB(t))return 0;let a=n&&DB(n)?Math.min(n,t):0;const s=r.sort((e,t)=>e.value-t.value),l=i||o;for(let e=0;e<l.length;e++){if(e===l.length-1||t<s[e].value&&t>=a)return e;a=s[e].value}return 0})(e,t,r.min);return{limitRange:r,limitPaletteColorIndex:i}},ZB=e=>"flex-start"===e?"flex-end":"flex-start",QB=(e,t,n,r)=>{const i=e.indicatorConditionalColoring;if(!i)return;const o=JB(i,t),a=((e,t,n,r)=>{const{segments:i}=e;if(!i||!n)return;const{limits:o}=i;if(!o?.length||!((e,t)=>!(!e||0===e.length||!(e[t]?.gradient??e[t-1]?.gradient)))(o,n.limitPaletteColorIndex))return GB(i,n.limitPaletteColorIndex,r);const a=BB(n.limitRange,t);return KB(i,a,n.limitRange,r)})(i,t,o,r),s=i.segments.paletteColors[o?.limitPaletteColorIndex||0].icon,{indicator:l}=e;let u=l?.position||"right";return"rtl"===n&&(u="right"===u?"left":"right"),{color:a,iconKey:s,position:u}},eG=({representation:e,cellValue:t,textStyle:n})=>{const{styleService:r}=w$(),{theme:i}=b$(),{direction:o}=g$(),{text:a,indicator:s}=e,{showTextValues:l,applySegmentColors:u}=s??{},c=QB(e,t,o,i),{fontSize:d,fontFamily:p,fontStyle:f,fontWeight:h,textDecoration:m}=r.measureValues,g={fontSize:d,fontFamily:p,fontStyle:f,fontWeight:h,textDecoration:m},v=parseInt(d||nz,10),{iconKey:y,color:b,position:x}=c||{},S={display:"flex",paddingTop:2};return l?fo.jsxs("div",{"data-key":"representation-indicator",style:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"4px",overflow:n?.overflow,color:u?b:n?.color},children:["left"===x&&VB({size:v,iconKey:y,color:b,pvStyle:S}),fo.jsx("span",{style:{paddingTop:4,overflow:n?.overflow,textOverflow:n?.textOverflow,whiteSpace:"nowrap",direction:t<0?"ltr":void 0,...g},children:a}),"right"===x&&VB({size:v,iconKey:y,color:b,pvStyle:S})]}):(S.paddingTop=5,VB({size:v,iconKey:y,color:b,pvStyle:S}))},tG=(e,t,n)=>{if(e?.auto)return t;switch(e?.align){case"center":return"center";case"left":return"rtl"===n?"flex-end":"flex-start";case"right":return"rtl"===n?"flex-start":"flex-end";default:return t}},nG=(e,t)=>{let{textAlign:n}=t.getDimensionInfo(e.dimensionInfoIndex)??{};return e.isPseudoDimension&&void 0!==e.visibleMeasureInfoIndex&&({labelTextAlign:n}=t.visibleMeasureInfo.at(e.visibleMeasureInfoIndex)??{}),n?.auto||void 0===n?"left":n.align},rG=(e,t,n,r,i)=>{if(i)return;const o=e.representation,a=JH({isLeftColumn:n,layoutService:t,representation:o}),s=n?"flex-start":"center",l=e.representation.resolvedImagePosition?.horizontal;if(e.representation.type===PF.Image)return a&&l&&"center"!==l&&"rtl"===r?ZB(l):l??s;if(e.isPseudoDimension&&void 0!==e.visibleMeasureInfoIndex){const{labelTextAlign:n}=t.visibleMeasureInfo[e.visibleMeasureInfoIndex]??{};return tG(n,s,r)}const{textAlign:u}=t.getDimensionInfo(e.dimensionInfoIndex)??{};return tG(u,s,r)},iG=e=>!!e.target?.getAttribute("class")?.includes(PT),oG=(e,t)=>{switch(t.type){case"clearSelections":return{engineSelectedCells:null,activeSelection:null,selectedField:null};case"mouseup":return{...e,activeSelection:null,engineSelectedCells:t.payload.engineSelectedCells};case"mousedown":return{...e,activeSelection:t.payload.activeSelection,selectedField:t.payload.selectedField};case"mouseover":{if(!e.activeSelection)return e;const{index:n}=t.payload,r=Math.min(n,e.activeSelection.startIndex),i=Math.max(n,e.activeSelection.endIndex);if(r===e.activeSelection.startIndex&&i===e.activeSelection.endIndex)return e;const o={...e.activeSelection,startIndex:r,endIndex:i};return o.clientSelectedCells=(e=>{const{getCellFromIndex:t,startIndex:n,endIndex:r,clientSelectedCells:i}=e,o=new Map(i);for(let e=n;e<=r;e++){const n=t(e);"N"===n?.ref.qType&&o.set(n.ref.qElemNo,n)}return o})(o),{...e,activeSelection:o}}default:return e}},aG=e=>null!==e.target?.closest("[data-prevent-selection]"),sG=e=>"A"===e.target?.tagName,lG=({startIndex:e,getCellFromIndex:t,cell:n})=>({type:"mousedown",payload:{activeSelection:{startIndex:e,endIndex:e,getCellFromIndex:t,clientSelectedCells:(new Map).set(n.ref.qElemNo,n)},selectedField:{selectionCellType:n.selectionCellType,index:"L"===n.selectionCellType?n.x:n.y}}});const uG=u({createMouseDownHandler:()=>()=>{},createMouseOverHandler:()=>()=>{},createPointerUpHandler:()=>()=>{},isSelected:()=>!1,isActive:!1,isLocked:()=>!1}),cG=()=>h(uG),dG=({children:e,selections:t})=>{const n=function(e){const{updatePageInfo:t}=g$(),n=e.isActive(),[r,i]=c(oG,{engineSelectedCells:null,selectedField:null,activeSelection:null});d(()=>{const n=()=>{i({type:"clearSelections"})},r=()=>{n(),t({page:0})};return e.on("deactivated",n),e.on("canceled",n),e.on("confirmed",r),e.on("cleared",n),()=>{e.removeListener("deactivated",n),e.removeListener("canceled",n),e.removeListener("confirmed",r),e.removeListener("cleared",n)}},[e,t]);const o=f(async()=>{if(!r.activeSelection)return;var t,n;1===r.activeSelection.clientSelectedCells.size&&(t=r.engineSelectedCells,(n=r.activeSelection).clientSelectedCells.forEach((e,r)=>{t?.has(r)&&(n.clientSelectedCells.delete(r),t.delete(r))}));const o=new Map([...r.engineSelectedCells??new Map,...r.activeSelection.clientSelectedCells]);try{i({type:"mouseup",payload:{engineSelectedCells:o}}),await e.select({method:"selectPivotCells",params:[I$,Array.from(o,([,e])=>({qType:e.selectionCellType,qRow:e.y,qCol:e.x}))]})}catch(e){console.error(e),i({type:"mouseup",payload:{engineSelectedCells:r.engineSelectedCells}})}},[r,e]);d(()=>{if(r.activeSelection)return document.addEventListener("mouseup",o),()=>{document.removeEventListener("mouseup",o)}},[o,r.activeSelection]);const a=f((e,t)=>n=>{const r=t(e);iG(n)||aG(n)||sG(n)||!(e=>1===e.buttons)(n)||!r||i(lG({startIndex:e,getCellFromIndex:t,cell:r}))},[]),s=f(t=>async()=>{r.activeSelection&&(e.isActive()||await e.begin([I$]),i({type:"mouseover",payload:{index:t}}))},[r.activeSelection,e]),l=f((e,t)=>n=>{if("touch"!==n.pointerType)return;const r=t(e);iG(n)||aG(n)||sG(n)||!r||(i(lG({startIndex:e,getCellFromIndex:t,cell:r})),o())},[o]),u=f(e=>!(!r.engineSelectedCells?.size&&!r.activeSelection?.clientSelectedCells.size||!r.selectedField||e.selectionCellType===r.selectedField.selectionCellType&&("L"===e.selectionCellType?r.selectedField.index===e.x:r.selectedField.index===e.y)),[r.activeSelection?.clientSelectedCells.size,r.engineSelectedCells?.size,r.selectedField]),p=f(e=>!u(e)&&(r.engineSelectedCells?.has(e.ref.qElemNo)||!!r.activeSelection?.clientSelectedCells.has(e.ref.qElemNo)),[u,r.activeSelection?.clientSelectedCells,r.engineSelectedCells]);return v(()=>({isSelected:p,isActive:n,isLocked:u,createMouseDownHandler:a,createMouseOverHandler:s,createPointerUpHandler:l}),[p,n,u,a,s,l])}(t);return fo.jsx(uG.Provider,{value:n,children:e})},pG=e=>"fill"===e.representation.imageSize,fG=(e,t)=>{let n=e.isLeftColumn?"flex-start":"center";return e.isLeftColumn&&pG(e)&&t&&(n="center"),e.representation.type!==PF.Image||pG(e)?n:e.representation.resolvedImagePosition?.vertical};var hG=function(e){return e.Background="background",e.Color="color",e.FontWeight="fontWeight",e.FontStyle="fontStyle",e.TextDecoration="textDecoration",e}(hG||{});const mG={brighter:.5,darker:.3,opacity:.03},gG=(e,{cell:t,styleService:n})=>{if(e===hG.Background||e===hG.Color){const n=t.expressionColor[e];if(n)return n}return t.isNull?n.nullValues[e]:t.isPseudoDimension?n.measureLabels[e]:t.isTotal?n.totalValues[e]:n.dimensionValues[e]},vG=({styleService:e,isCellSelected:t,cell:n,isCellLocked:r})=>{if(t)return e.selectedColors.background;const i=gG(hG.Background,{cell:n,styleService:e});return!r||!i||n.isPseudoDimension||n.isEmpty||n.isNull||n.isTotal?gG(hG.Background,{cell:n,styleService:e}):`repeating-linear-gradient(\n -45deg,\n ${u_(o=i,mG)} 0px 2px,\n ${o} 0px 4px\n ) border-box`;var o},yG=({cell:e,styleService:t,isCellSelected:n})=>n?t.selectedColors.color:gG(hG.Color,{cell:e,styleService:t}),bG=({cell:e,styleService:t})=>{const{qCanCollapse:n,qCanExpand:r}=e.ref,i=gG(hG.FontWeight,{cell:e,styleService:t});return void 0===i&&(r||n)?iz:i},xG=({cell:e,styleService:t})=>gG(hG.FontStyle,{cell:e,styleService:t}),SG=({cell:e,styleService:t})=>gG(hG.TextDecoration,{cell:e,styleService:t}),wG=e=>e?"pointer":"default",CG=({expandOrCollapse:e,cell:t})=>n=>{e?.(t.y,t.x),n.stopPropagation()},EG=(e,t)=>{if(!e.isLeftColumn||e.representation.type===PF.Image)return{padding:4};return{padding:4,marginTop:t.dimensionValueTextHeight/2-6.5-4}},IG=({cell:e,isLeftColumn:t,isCellSelected:n})=>{const{styleService:r,layoutService:i}=w$(),{interactions:o}=b$(),{isActive:a}=cG(),{dataModel:s}=BH();if(!e.ref.qCanExpand&&!e.ref.qCanCollapse)return null;const l=!o.active||a||!s,u=yG({cell:e,styleService:r,isCellSelected:n}),c=a?.4:1,d=e.ref.qCanExpand?RW:DW;let p;p=e.ref.qCanExpand?t?s.expandLeft:s.expandTop:t?s.collapseLeft:s.collapseTop;const f=JH({isLeftColumn:t,layoutService:i,representation:e.representation});return fo.jsx(d,{opacity:c,color:u,"data-prevent-selection":!l||void 0,"data-testid":e.ref.qCanExpand?"expand-icon":"collapse-icon",height:13,style:{flexShrink:0,cursor:l?"default":"pointer",position:"sticky",top:0,...EG(e,r),...f&&{alignSelf:fG(e)}},onClick:l?void 0:CG({cell:e,expandOrCollapse:p})})},DG=e=>{switch(e){case"fitHeight":case"fill":case"alwaysFit":return"100%";case"originalSize":return"fit-content";default:return"auto"}},RG=(e,t,n)=>{if("alwaysFit"===e&&t&&!n)return"fit-content";switch(e){case"fitHeight":return"auto";case"originalSize":return"fit-content";case"alwaysFit":return n?"unset":"100%";default:return"100%"}},PG=(e,t)=>{if("alwaysFit"===e)switch(t?.vertical){case"flex-start":return"center top";case"flex-end":return"center bottom";default:return"center center"}},MG=({representation:e,canExpandOrCollapse:t,leafCount:n,isLeftColumn:r,styleService:i,layoutService:o,isMeasureCell:a})=>{const{isIndentModeEnabled:s}=o,l=JH({isLeftColumn:r,layoutService:o,representation:e}),u=t?21:0,c=e.imageBox?.width??24;let d=`calc(100% - ${u}px)`,p=i.headerCellHeight;r&&l&&(d=c),(a||r)&&(p=i.contentCellHeight);let f=p;switch(r&&void 0!==n&&!s&&(f=p*Math.max(n,1)),e.imageSize){case"originalSize":return{maxWidth:d,maxHeight:f,...l?{width:d}:{}};case"fitWidth":return{width:d,maxHeight:f};case"fitHeight":return{height:f,maxWidth:d,...l?{width:d}:{}};case"fill":return{height:f,width:d};default:return{width:d,height:p}}},LG=e=>{if("alwaysFit"===e)return"contain"},AG=({suffix:e,delimeter:t})=>` ${e?t:""} ${e}`.trim(),kG=({imageSize:e,resolvedImagePosition:t,isImagesInIndentModeEnabled:n,isMeasureCell:r})=>({width:RG(e,n,r),height:DG(e),objectFit:LG(e),objectPosition:PG(e,t),...n&&"alwaysFit"===e?{"max-width":"100%"}:{}}),OG=({representation:e,textStyle:t,isMeasureCell:n})=>{const{imageRef:r,onLoad:i}=(()=>{const{downloadService:e}=w$(),t=l(null),{promise:n,resolve:r}=v(()=>Dz(),[]);return d(()=>(e.isDownloadedAsPDForImage&&(e.waitForPromise(n),t.current?.complete&&r()),()=>{r()}),[t,e,n,r]),{onLoad:f(()=>{r()},[r]),imageRef:t}})(),{layoutService:{isIndentModeEnabled:o}}=w$(),{url:a,text:s,imageSize:u,resolvedImagePosition:c}=e,{overflow:p,...h}=t;return fo.jsx("img",{src:a,alt:s,style:{...kG({imageSize:u,resolvedImagePosition:c,isImagesInIndentModeEnabled:o,isMeasureCell:n}),...h},onLoad:i,ref:r})},qG=({representation:e,textStyle:t,canExpandOrCollapse:n,leafCount:r,isLeftColumn:i=!1,imageContainerHorizontalAlignment:o,isMeasureCell:a})=>{const{styleService:s,layoutService:l}=w$(),{resolvedImagePosition:u}=e;return fo.jsx("div",{"data-key":"image-container--image",style:{display:"flex",flexDirection:"column",justifyContent:u?.vertical,alignItems:o,overflow:"hidden",boxSizing:"border-box",border:"4px solid transparent",...MG({representation:e,canExpandOrCollapse:n,leafCount:r,styleService:s,layoutService:l,isLeftColumn:i,isMeasureCell:a})},children:fo.jsx(OG,{representation:e,textStyle:t,isMeasureCell:!0})})},TG={display:"flex",flexDirection:"row",alignItems:"center"},NG={alignItems:"center",display:"flex",flexDirection:"row",backgroundClip:"padding-box"},jG=(e,t,n,r)=>t?{...NG,...e.nullValues}:n?{...TG,color:e.totalValues.color,background:r??e.totalValues.background}:{...TG,color:e.measureValues.color,background:r??e.measureValues.background},_G=(e,t,n,r,i)=>{const{fontFamily:o,fontSize:a}=e.measureValues,s={...pz,...!n&&fz(e.grid.lineClamp),...t&&{color:t},fontFamily:o,fontSize:a};if(i){const{fontWeight:t,fontStyle:n,textDecoration:r}=e.nullValues;return{...s,fontWeight:t,fontStyle:n,textDecoration:r}}if(r){const{fontWeight:t,fontStyle:n,textDecoration:r}=e.totalValues;return{...s,fontWeight:t,fontStyle:n,textDecoration:r}}const{fontWeight:l,fontStyle:u,textDecoration:c}=e.measureValues;return{...s,fontWeight:void 0===l?iz:l,fontStyle:u,textDecoration:c}},FG=({cell:e,representation:t,color:n,isTotalValueCell:r,cellHorizontalAlignment:i})=>{const{layoutService:o,styleService:a}=w$(),{isIndentModeEnabled:s}=o,l=e.isNull?o.getNullValueText():t.text,u=t.type===PF.Image,c=t.type===PF.Indicator,d=DB(RB(l)),p=_G(a,n,d,r,e.isNull);if(!s&&u&&!e.isNull||s&&u&&!e.isNull)return fo.jsx(qG,{isMeasureCell:!0,textStyle:p,representation:t,imageContainerHorizontalAlignment:i});const f=RB(e.isNull?t.text:e.ref.qNum);return c&&DB(f)?fo.jsx(eG,{representation:t,cellValue:f,textStyle:p}):fo.jsx("span",{style:{padding:4,direction:d?"ltr":void 0,...p},children:l})},zG=(e,t)=>e?.[t]?.visibleMeasureInfoIndex??0,WG="flex-start",$G=(e,t)=>e.isNull?WG:t.type===PF.Image&&"fill"!==t.imageSize?t.resolvedImagePosition?.vertical:WG,HG=({columnIndex:e,rowIndex:t,style:n,data:r})=>{const{env:i}=b$(),{pageInfo:o,direction:a}=g$(),{styleService:s,layoutService:l}=w$(),{attrExprInfoIndexes:u,gridSectionsData:{measureData:c,leftDimensionData:d,topDimensionData:p},visibleDimensionsInfo:{visibleLeftDimensionInfo:h,visibleTopDimensionInfo:m}}=BH(),g=(()=>{const{layoutService:{isIndentModeEnabled:e}}=w$(),{gridSectionsData:{leftDimensionData:t,topDimensionData:n},visibleDimensionsInfo:{visibleLeftDimensionInfo:r,visibleTopDimensionInfo:i}}=BH(),o=r.length,a=i.length;return f((r,i)=>!(!n.grid.at(a-1)?.[r]?.isTotal&&!t.grid.at(e?0:o-1)?.[i]?.isTotal),[n,t,o,a,e])})(),v=(()=>{const{gridSectionsData:{topDimensionData:e},visibleDimensionsInfo:{visibleTopDimensionInfo:t}}=BH(),n=t.length;return f(t=>{const r=e.grid.at(n-1)?.[t];return wB(r,e.totalDividerIndex)},[e,n])})(),y=(()=>{const{layoutService:{isIndentModeEnabled:e}}=w$(),{gridSectionsData:{leftDimensionData:t},visibleDimensionsInfo:{visibleLeftDimensionInfo:n}}=BH(),r=n.length;return f(n=>{const i=e?0:r-1,o=t.grid.at(i)?.[n];return wB(o,t.totalDividerIndex,e)},[t,e,r])})(),{showLastBorder:b}=r,x=p.grid.at(m.length-1),S=d.grid.at(h.length-1),{background:w}=s.measureValues,C=c[t]?.[e],E=t===o.rowsOnCurrentPage-1,I=e===l.size.x-1;if(!C)return fo.jsx(CB,{style:{...n,background:w},isLastRow:E,isLastColumn:I,showLastBorder:b,index:t,isLeftColumn:!1,showTotalCellDivider:!1});const D=l.hasPseudoDimOnLeft?zG(S,t):zG(x,e),R=l.visibleMeasureInfo[D],P=CH({cell:C.ref,representationProperties:R.representation,attrExprInfoIndex:u.measures[D],env:i,direction:a,conditionalColoring:R.conditionalColoring,enabledFeatures:{[PF.Image]:!0,[PF.Indicator]:!0}}),M=!C.isNull&&g(e,t),L=C.isNull?l.getNullValueText():P.text,A=!C.isNull||!Number.isNaN(+L),k=EH(u.measures[D],C.ref),O=((e,t,n,r,i)=>{const{textAlign:o}=t,a=r?"flex-end":"center";return e.isNull||n.type!==PF.Image?tG(o,a,i):n.resolvedImagePosition?.horizontal??"center"})(C,R,P,A,a),q={...jG(s,C.isNull,M,k.background),...mz(E,I,s.grid.border,a,b),...vz({bottomDivider:y(t),rightDivider:v(e),borderColor:s.grid.divider}),...dz,padding:"0px 4px",display:"flex",justifyContent:O};return fo.jsx("div",{className:DT,title:L,style:{...q,...n},"data-testid":"measure-value","data-row-index":t,"data-col-index":e,children:fo.jsx(EB,{width:IB(P),verticalAlign:$G(C,P),children:fo.jsx(FG,{cell:C,representation:P,isTotalValueCell:M,color:k.color,cellHorizontalAlignment:O})})})};var VG=n.memo(HG,sB);const BG=(e,t)=>t.list[e]?.id??e.toString(),GG=({columnIndex:e,rowIndex:t,data:n})=>n.grid[t]?.[e]?.id??`${t}-${e}`,UG=e=>({...cz,overflow:"hidden",boxSizing:"content-box",borderWidth:"rtl"===e?"1px 1px 0px 0px":"1px 0px 0px 1px"}),YG=({dataGridRef:e,height:t,rowHightCallback:n,width:r,showLastBorder:i,getRightGridColumnWidth:o,verticalScrollDirection:a,horizontalScrollDirection:s})=>{const{pageInfo:l,direction:u}=g$(),{layoutService:c,styleService:{grid:{divider:d},contentCellHeight:p}}=w$(),{dataModel:h,gridSectionsData:{measureData:m}}=BH(),v={...UG(u),borderColor:d,willChange:"auto",userSelect:"none",WebkitUserSelect:"none"},y=(({verticalScrollDirection:e,horizontalScrollDirection:t})=>{const{pageInfo:n}=g$(),{downloadService:r,viewService:i,layoutService:o}=w$(),{dataModel:a,gridSectionsData:{leftDimensionData:s,topDimensionData:l,measureData:u}}=BH(),c=s.columnCount,d=l.rowCount;return f(async({overscanColumnStartIndex:s,overscanColumnStopIndex:l,overscanRowStartIndex:p,overscanRowStopIndex:f})=>{i.gridColumnStartIndex=s,i.gridRowStartIndex=p,i.gridWidth=l-s+1,i.gridHeight=f-p+1;const h=i.gridWidth+c+(t.current===_F.None?0:lB),m=i.gridHeight+d+(e.current===_F.None?0:lB);let g=xB;m*h>1500&&(g=SB),g(a,o,u,n,i,e,t,r)},[i,o,a,u,e,t,n,c,d,r])})({verticalScrollDirection:a,horizontalScrollDirection:s});return Hz(()=>{e.current&&e.current.resetAfterColumnIndex(0,!1)},[e,h,m]),g(()=>{e.current&&e.current.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!0})},[r,t,e,p,u]),0===c.size.x?null:fo.jsx(KV,{"data-section-id":"DATA_GRID",ref:e,style:v,columnCount:c.size.x,columnWidth:o,height:t,rowCount:l.rowsOnCurrentPage,rowHeight:n,width:r,itemData:{showLastBorder:i,grid:m},onItemsRendered:y,estimatedRowHeight:n(),estimatedColumnWidth:o(),itemKey:GG,direction:u,children:VG})};var KG=b(YG);const XG=x((e,t)=>fo.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:[fo.jsx("path",{d:"M13 7H8zV4.982C13 2.23 10.761 0 8 0S3 2.23 3 4.982V7h.75H3h1.5V5.332C4.5 3.216 5.549 1.5 8 1.5s3.5 1.716 3.5 3.832V7h.75H3a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1H3z"}),fo.jsx("use",{fillRule:"evenodd"})]})),JG=e=>{const[t,n]=Nw(vV);return Hz(()=>{n(!1)},e),{isAdjustingWidth:t,setIsAdjustingWidth:n}},ZG=()=>{const[e,t]=m(!1),{dataModel:n}=BH(),{interactions:r}=b$(),{isAdjustingWidth:i,setIsAdjustingWidth:o}=JG([n]);return{open:e,setOpen:t,handleOpenMenu:e=>{!r.active||iG(e)||i||t(!0)},isAdjustingWidth:i,setIsAdjustingWidth:o}};function QG(e,t){const n=t.expressionColor?.background??e.dimensionValues.background,r=t.isLeftColumn?e.header.background:n,i=r===sz.Transparent?mN.WHITE:r,o=MN(e.grid.border),a=MN(i);return a.isInvalid()||o.isInvalid()||1===o.a?e.grid.border:function(e,t,n){return MN(e.r+(t.r-e.r)*n,e.g+(t.g-e.g)*n,e.b+(t.b-e.b)*n,e.a+(t.a-e.a)*n)}(a,o,o.a).getRGB()}const eU=({cellInfo:e,columnWidth:t,isLastColumn:n,overrideLeftGridWidth:r,setIsAdjustingWidth:i,shouldApplyIndentModeColumnWidth:o,tableWidth:a})=>{const{direction:s}=g$(),{interactions:l,translator:u}=b$(),{isActive:c}=cG(),{dataModel:d}=BH(),{styleService:p}=w$(),[,f]=m({});if(!(e.canBeResized&&!!l.active&&!c))return null;const h=QG(p,e);return fo.jsx(Kz,{isPivot:!0,columnWidth:t,isLastColumn:n,keyValue:`adjuster-${e.dimensionInfoIndex}`,hoverColor:h,updateWidthCallback:t=>{f({}),r&&void 0!==e.colIdx&&r(t,e.colIdx)},confirmWidthCallback:t=>{o?d.applyIndentModeColumnWidth({...t,pixels:Math.min((a??0)*KH,t.pixels??0)}):d.applyColumnWidth(t,e)},setIsAdjustingWidth:i,isLeftColumn:e.isLeftColumn,accessibilityRelatedArgs:{translator:u,columnLabel:e.label??""},direction:s})},tU=Sl(sc,{shouldForwardProp:e=>!["interactions","hoverBackground","background","shouldShowMenuIcon","isDimension"].includes(e)})(({interactions:e,background:t,hoverBackground:n,shouldShowMenuIcon:r,isDimension:i})=>({pointerEvents:i?"all":"none",position:"relative",display:"grid",gridTemplateColumns:r?"1fr 12px":"1fr",gap:8,alignItems:"center",cursor:e.active?"pointer":"default",background:t,"&&:hover":{background:e.active&&i?n:t}})),nU=Sl("div",{shouldForwardProp:e=>!["direction"].includes(e)})(({direction:e})=>({position:"absolute",left:"rtl"!==e?0:void 0,bottom:0})),rU=Sl("div",{shouldForwardProp:e=>"justifyContent"!==e})(({justifyContent:e})=>({...uz,justifyContent:e??uz.justifyContent,flexDirection:"row",overflow:"hidden",position:"relative",gap:8})),iU=Sl("div")(()=>({...uz})),oU=Sl("div",{shouldForwardProp:e=>!["fontSize","fontFamily","fontWeight","fontStyle","textDecoration","justifyContent"].includes(e)})(({fontSize:e,fontFamily:t,fontWeight:n,fontStyle:r,textDecoration:i,justifyContent:o})=>({display:"flex",justifyContent:o,alignSelf:"center",flexGrow:1,maxWidth:"100%",fontWeight:n,fontSize:e,fontFamily:t,fontStyle:r,textDecoration:i})),aU=Sl(wp)(({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}})),sU=Sl(Rp,{shouldForwardProp:e=>!["isActive"].includes(e)})(({theme:e,isActive:t})=>({width:220,maxHeight:32,borderRadius:e.spacing(.5),margin:e.spacing(.25,.5),padding:e.spacing(1,1.5),display:"flex",justifyContent:"space-between",position:"relative",overflow:"hidden ",boxSizing:"border-box",background:t?"rgba(0, 0, 0, 0.05)":"transparent","&:hover":{".indent-mode-dropdown-more":{opacity:1}}})),lU=Sl("span")({textOverflow:"ellipsis",overflow:"hidden"}),uU=Sl("div",{shouldForwardProp:e=>"visible"!==e})(({visible:e})=>({opacity:e?1:0,width:UH,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"})),cU=Sl("span",{shouldForwardProp:e=>!["padding","alignSelf"].includes(e)})(({padding:e,alignSelf:t})=>({padding:e,alignSelf:t,position:"sticky",top:0}));let dU=function(e){return e.Expand="Expand",e.Collapse="Collapse",e}({});const pU=(e,t)=>({qExcludeList:t===dU.Expand,qPos:{qDimName:e,qElemNo:[]}}),fU=`${I$}/qExpansionState`,hU=({model:e,qExpansionState:t,qEffectiveDimensionName:n,action:r})=>async()=>{const i=(({qEffectiveDimensionName:e,oldExpansionState:t,action:n})=>{const r=t?.findIndex(t=>t.qPos?.qDimName===e);return{expansionData:pU(e,n),index:r}})({qEffectiveDimensionName:n,oldExpansionState:t,action:r});await(async({model:e,newExpansionState:t,errorMsg:n})=>{const{index:r,expansionData:i}=t;try{let t,n=fU,o="Add";void 0===r?t=JSON.stringify([i]):-1===r?(n=`${fU}/-`,t=JSON.stringify(i)):(n=`${fU}/${r}`,o="Replace",t=JSON.stringify(i)),await e.applyPatches([{qPath:n,qOp:o,qValue:t}],!0)}catch(e){console.error(n,e)}})({model:e,newExpansionState:i,errorMsg:`Failed to ${r} dimension`})},mU=({model:e,effectivePropertiesService:t,cell:n})=>{if(void 0===n.qEffectiveDimensionName)return;const r={model:e,qExpansionState:t.qExpansionState,qEffectiveDimensionName:n.qEffectiveDimensionName};return{expandCallback:hU({...r,action:dU.Expand}),collapseCallback:hU({...r,action:dU.Collapse}),alwaysFullyExpanded:t.qAlwaysFullyExpanded}},gU={[TW.Sorting]:!0,[TW.Selections]:!0,[TW.Searching]:!0},vU=({cell:e,style:t,isFirstColumn:n,isLastColumn:r,isLastRow:i,changeSortOrder:o,iconsVisibilityStatus:a,columnWidth:s,overrideLeftGridWidth:u,shouldApplyIndentModeColumnWidth:c,tableWidth:d})=>{const p=l(null),{styleService:f,layoutService:h,effectivePropertiesService:m}=w$(),{app:g,interactions:v,embed:y,translator:b,model:x,env:S}=b$(),{fontSize:w,fontFamily:C,fontStyle:E,fontWeight:I,textDecoration:D,color:R,background:P,hoverBackground:M,activeBackground:L}=f.header,A=l(null),{shouldShowLockIcon:k,shouldShowMenuIcon:O}=a,{open:q,setOpen:T,handleOpenMenu:N,setIsAdjustingWidth:j}=ZG(),{direction:_}=g$(),F={sortFromMenu:async(t,n)=>{t.stopPropagation(),await o(e,n)}},z={embed:y,listboxRef:p,sortCriteria:h.searchSortFromDimension&&e.isDim?m.getSortCriteriaForDimension(e.dimensionInfoIndex):void 0},W={app:g,qStateName:h.layout.qStateName},{labelTextAlign:$}=h.getDimensionInfo(e.dimensionInfoIndex)??{},H=tG($,"flex-start",_);return fo.jsxs(tU,{className:DT,title:e.label,interactions:v,background:q?L:P,hoverBackground:M,shouldShowMenuIcon:O,isDimension:e.isDim,style:{...t,...dz,...gz(e,i,n,r,f.grid.border,_),color:R},"data-testid":"title-cell",onClick:N,children:[fo.jsxs(rU,{children:[k?fo.jsx(iU,{children:fo.jsx(XG,{height:12})}):null,fo.jsx(oU,{fontFamily:C,fontSize:w,fontStyle:E,fontWeight:I,textDecoration:D,justifyContent:H,children:fo.jsx("span",{style:S.flags.isEnabled("VNA-135-WRAP_HEADER_TEXT")?{...pz,...fz(f.grid.columnLineClamp)}:pz,children:e.label})})]}),e.isDim?fo.jsxs(fo.Fragment,{children:[fo.jsx(_W,{headerData:e,translator:b,anchorRef:A,open:q,setOpen:T,interactions:v,menuAvailabilityFlags:gU,sortRelatedArgs:F,searchRelatedArgs:z,selectionRelatedArgs:W,expandOrCollapseArgs:mU({model:x,effectivePropertiesService:m,cell:e}),shouldShowMenuIcon:O,model:x&&"setActiveField"in x?x:void 0,direction:_,isAccessibleHeader:!0}),fo.jsx(nU,{ref:p,direction:_}),fo.jsx(nU,{ref:A,direction:_})]}):null,fo.jsx(eU,{cellInfo:{...e,isLeftColumn:!0},columnWidth:s,isLastColumn:r,overrideLeftGridWidth:u,setIsAdjustingWidth:j,shouldApplyIndentModeColumnWidth:c,tableWidth:d})]})},yU=({rowSpan:e,columnSpan:t})=>{const{styleService:n}=w$(),{direction:r}=g$();return e>0&&t>0?fo.jsx("div",{style:{...cz,gridRowStart:1,gridRowEnd:`span ${e}`,gridColumnStart:1,gridColumnEnd:`span ${t}`,borderWidth:"rtl"===r?"0px 0px 0px 1px":"0px 1px 0px 0px",borderColor:n.grid.border,background:n.grid.background},"data-testid":"empty-header-cell"}):null},bU=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"m8 9 4.5-4.5L14 6l-4.5 4.5L8 12 2 6l1.5-1.5z"})})),xU=x((e,t)=>fo.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:[fo.jsx("path",{d:"m8 7-4.5 4.5L2 10l6-6 6 6-1.5 1.5z"}),fo.jsx("use",{fillRule:"evenodd"})]})),SU=({tableWidth:e,leftGridWidth:t,overrideLeftGridWidth:n})=>{const{direction:r}=g$(),{styleService:i}=w$(),{interactions:o,translator:a}=b$(),{isActive:s}=cG(),{dataModel:l}=BH(),{setIsAdjustingWidth:u}=JG([l]);if(!(!!o.active&&!s))return null;const c=QG(i,{isLeftColumn:!0});return fo.jsx(Kz,{isPivot:!0,isLastColumn:!0,isLeftColumn:!0,keyValue:"adjuster-indent-row",hoverColor:c,columnWidth:t,updateWidthCallback:t=>{n(Math.min(t,e*KH))},confirmWidthCallback:r=>{if(r.type===LT.FitToContent)return void l.applyIndentModeColumnWidth({type:LT.Auto});const i=Math.min(r.pixels??t,e*KH);n(i),l.applyIndentModeColumnWidth({type:LT.Pixels,pixels:i})},setIsAdjustingWidth:u,accessibilityRelatedArgs:{translator:a,columnLabel:a.get("SNPivotTable.IndentMode.Rows")},direction:r})},wU=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M3 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0m6 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0m5 1a1 1 0 1 0 0-2 1 1 0 0 0 0 2"})})),CU=({cell:e,changeSortOrder:t})=>{const n=l(null),r=l(null),{app:i,interactions:o,embed:a,translator:s,model:u}=b$(),{layoutService:c,effectivePropertiesService:d}=w$(),{open:p,setOpen:f,handleOpenMenu:h}=ZG();return fo.jsxs(sU,{onClick:h,isActive:p,children:[fo.jsx(lU,{children:e.label}),fo.jsxs(uU,{className:"indent-mode-dropdown-more",visible:p,children:[fo.jsx(wU,{}),e.isDim?fo.jsxs(fo.Fragment,{children:[fo.jsx(_W,{headerData:e,translator:s,anchorRef:n,open:p,setOpen:f,interactions:o,menuAvailabilityFlags:gU,sortRelatedArgs:{sortFromMenu:async(n,r)=>{n.stopPropagation(),await t(e,r)}},searchRelatedArgs:{embed:a,listboxRef:r},selectionRelatedArgs:{app:i,qStateName:c.layout.qStateName},expandOrCollapseArgs:mU({model:u,effectivePropertiesService:d,cell:e}),shouldShowMenuIcon:!1,model:u&&"setActiveField"in u?u:void 0}),fo.jsx(nU,{ref:r}),fo.jsx(nU,{ref:n})]}):null]})]})},EU=({idx:e,menu:t,menuItems:n,isOnlyOneRow:r})=>{const i=n.at(-1)?.id===R$,o=e+1<n.length&&n[e+1]?.id===R$;return!(r&&i&&o)&&(t?.id!==R$&&e<n.length-1)},IU=({menuItems:e,changeSortOrder:t,overrideLeftGridWidth:n,leftGridWidth:r,tableWidth:i})=>{const{styleService:o}=w$(),{interactions:a,translator:s}=b$(),{dataModel:u,gridSectionsData:{headersData:c}}=BH(),[d,p]=m(!1),f=l(null),{headerCellHeight:h}=o,{color:g,background:v,hoverBackground:y,activeBackground:b,fontFamily:x,fontSize:S,fontStyle:w,fontWeight:C,textDecoration:E}=o.header,{isAdjustingWidth:I}=JG([u]),D=e=>{e.stopPropagation()},R={height:h,gridColumn:`1 / span ${c.size.x}`,gridRow:c.size.y,zIndex:c.size.x-0};return fo.jsxs(tU,{isDimension:!0,background:d?b:v,interactions:a,hoverBackground:y,style:{...R,...dz,color:g},onClick:e=>{!a.active||iG(e)||I||p(!d)},"data-testid":"indentModeHeaderCellWrapper",children:[fo.jsxs(rU,{justifyContent:"flex-start",children:[fo.jsx(oU,{fontFamily:x,fontSize:S,fontStyle:w,fontWeight:C,textDecoration:E,justifyContent:"flex-start",children:fo.jsx("span",{style:pz,children:s.get("SNPivotTable.IndentMode.Rows")})}),d?fo.jsx(xU,{}):fo.jsx(bU,{}),fo.jsx(nU,{ref:f})]}),fo.jsx(aU,{open:d,anchorEl:f.current,disableEnforceFocus:!0,children:e.map((n,r)=>[n&&n.id!==R$&&fo.jsx("li",{role:"presentation",onClick:D,onKeyDown:D,children:fo.jsx(CU,{cell:n,changeSortOrder:t})}),EU({idx:r,menu:n,menuItems:e,isOnlyOneRow:1===c.size.y})&&fo.jsx(eW,{"data-testid":"group-divider",variant:"middle"})])}),fo.jsx(SU,{tableWidth:i,leftGridWidth:r,overrideLeftGridWidth:n})]})},DU=({layoutService:e,headersData:t,topRowIndex:n})=>e.isIndentModeEnabled&&t.size.x>1&&n+1===t.size.y,RU={display:"grid",width:"fit-content"},PU=({tableWidth:e,leftGridWidth:t,columnWidths:n,rowHight:r,changeSortOrder:i,getHeaderCellsIconsVisibilityStatus:o,height:a,overrideLeftGridWidth:s})=>{const{layoutService:l}=w$(),{gridSectionsData:{headersData:u}}=BH();return fo.jsxs("div",{"data-testid":"HEADER_GRID",style:{...RU,gridTemplateColumns:n.map(e=>`${e}px`).join(" "),gridTemplateRows:u.data.map(()=>`${r}px`).join(" "),height:a},children:[u.size.y>1&&fo.jsx(yU,{columnSpan:u.size.x-1,rowSpan:u.size.y-1}),u.data.map((a,c)=>{let d=[];if(DU({layoutService:l,headersData:u,topRowIndex:c})){const n=a.at(0);return Array.isArray(n)&&d.push(fo.jsx(IU,{menuItems:n,changeSortOrder:i,overrideLeftGridWidth:s,leftGridWidth:t,tableWidth:e},n.at(0)?.id)),d}return d=a.reduce((t,a,d)=>{if(a&&!Array.isArray(a)){const p=o(d,a.isLocked,a.label),f=l.isIndentModeEnabled&&1===u.size.x;t.push(fo.jsx(vU,{style:{width:n[d],height:r,gridColumn:l.isIndentModeEnabled&&u.size.x>1?2:d+1,gridRow:c+1,zIndex:u.size.x-d},isLastRow:c===u.size.y-1,isFirstColumn:0===d,isLastColumn:d===u.size.x-1,changeSortOrder:i,cell:a,iconsVisibilityStatus:p,columnWidth:n[d],overrideLeftGridWidth:s,shouldApplyIndentModeColumnWidth:f,tableWidth:e},a.id))}return t},[]),d})]})};var MU=b(PU);const LU=(e,t,n,r)=>{const{layoutService:i}=w$();g(()=>{e.current?.forEach(e=>e?.resetAfterIndex(0,!0))},[e,t,n,r,i])},AU=(e,t)=>{Hz(()=>{e.current?.forEach(e=>e?.resetAfterIndex(0,!1))},[e,t])},kU=(e,t)=>{const{isLast:n,list:r,listValues:i}=t;return n?r[e]:i[e]},OU=()=>{},qU=({children:e,reactWindowStyle:t,cell:n,data:r,showTotalCellDivider:i,isLastRow:o,isLastColumn:a,isLeftColumn:s,isCellSelected:l,isAdjustingWidth:u,index:c})=>{const{styleService:d,layoutService:p}=w$(),{interactions:f}=b$(),{direction:h}=g$(),{isLocked:m,createMouseDownHandler:g,createMouseOverHandler:v,createPointerUpHandler:y}=cG(),{showLastBorder:b}=r,x=m(n)||n.isLockedByDimension,S=!(x||!f.active||!f.select||n.isEmpty||n.isNull||n.isPseudoDimension||n.isTotal||u),w=S?g(c,e=>kU(e,r)):void 0,C=S?v(c):void 0,E=S?y(c,e=>kU(e,r)):void 0,I=JH({isLeftColumn:s,layoutService:p,representation:n.representation});return fo.jsx("div",{className:DT,title:f.passive?n.representation.text:void 0,style:{...t,...mz(o,a,d.grid.border,h,b),...vz({bottomDivider:i&&s,rightDivider:i&&!s,borderColor:d.grid.divider}),...dz,padding:"rtl"===h?"0px 0px 0px 4px":"0px 4px",cursor:wG(S),background:vG({styleService:d,isCellSelected:l,cell:n,isCellLocked:x}),zIndex:s?void 0:p.size.x-n.x,justifyContent:rG(n,p,s,h,I),display:"flex",...p.isIndentModeEnabled&&s&&{["rtl"===h?"paddingRight":"paddingLeft"]:Math.max(4,24*(n.indentLevel??0))},textAlign:nG(n,p)},"aria-hidden":"true",onMouseDown:w,onMouseOver:C,onPointerUp:E,onKeyUp:OU,role:"button",tabIndex:-1,"data-testid":"dimension-cell","data-x":n.x,"data-page-x":n.pageX,"data-y":n.y,"data-page-y":n.pageY,"data-cell-type":n.ref.qType,"data-dimension-info-index":n.dimensionInfoIndex,children:e})},TU=e=>{e.stopPropagation()},NU=({href:e,text:t,interactions:n,color:r})=>({href:e,title:t,rel:"noreferrer",target:"_blank",underline:"hover",onClick:TU,color:mN.LINK,style:{pointerEvents:n.active?"auto":"none",color:r??void 0,opacity:n.active&&n.passive||r?void 0:.4}}),jU=({href:e,text:t,interactions:n,color:r})=>fo.jsx(Rd,{...NU({href:e,text:t,interactions:n,color:r}),children:t}),_U=Y();_U.use(U),_U.renderer.prio(["canvas"]);const FU=(e,t)=>e&&"center"!==e&&"rtl"===t?ZB(e):e,zU=({cell:e,representation:t,textStyle:n,imageContainerHorizontalAlignment:r})=>{const{imageBox:i}=t,{styleService:{grid:{lineClamp:o}}}=w$(),{direction:a}=g$();return fo.jsxs("div",{style:{display:"grid",gridTemplateColumns:`${i?.width??24}px 1fr`,maxHeight:"fit-content",alignItems:"center",justifyContent:"flex-start",boxSizing:"border-box"},children:[fo.jsx("div",{"data-key":"image-container--partial-image",style:{display:"flex",flexDirection:"column",justifyContent:fG(e),alignItems:FU(r,a),overflow:"hidden",boxSizing:"border-box",border:"4px solid transparent",width:i?.width??24,height:"100%"},children:fo.jsx(OG,{representation:t,textStyle:n})}),fo.jsx(cU,{padding:4/(o<=2?2:1),alignSelf:fG(e,!0),children:!!t.labelStructure&&AG(t.labelStructure)})]})},WU=({suffix:e,delimeter:t})=>` ${e?t:""} ${e}`,$U=({href:e,text:t,labelStructure:n,interactions:r,color:i})=>fo.jsxs("span",{children:[fo.jsx(Rd,{...NU({href:e,text:t,interactions:r,color:i}),children:n?.maskedValue?n.maskedValue:n?.originalValue}),!!n&&WU(n)]}),HU=({children:e,textStyle:t,shouldEnableStickyText:n})=>fo.jsx("span",{style:{...t,border:"4px solid transparent",boxSizing:"border-box",...n&&{alignSelf:"flex-start",position:"sticky",top:0}},children:e}),VU=({isLeftColumn:e,styleService:t,cell:n,isIndentModeEnabled:r})=>e?r?t.grid.lineClamp:Math.max(t.grid.lineClamp,n.leafCount*t.grid.lineClamp):t.grid.columnLineClamp,BU=({cell:e,isCellSelected:t,isLeftColumn:n})=>{const{direction:r}=g$(),{isActive:i}=cG(),{layoutService:o,styleService:a}=w$(),{interactions:s}=b$(),l=n&&o.isIndentModeEnabled;let u=n&&!e.isNull?(e=>{const{representation:{text:t,labelStructure:n}}=e;if(!n||!n.originalValue)return t;const{originalValue:r,maskedValue:i,suffix:o,delimeter:a}=n;return`${0!==i.length?i:r} ${o?a:""} ${o}`.trim()})(e):e.representation.text;if(e.isEmpty)return null;const c=(({cell:e,styleService:t,isCellSelected:n,isLeftColumn:r,isIndentModeEnabled:i})=>({...pz,...fz(VU({cell:e,isLeftColumn:r,styleService:t,isIndentModeEnabled:i})),color:yG({cell:e,styleService:t,isCellSelected:n}),fontWeight:bG({cell:e,styleService:t}),fontStyle:xG({cell:e,styleService:t}),textDecoration:SG({cell:e,styleService:t}),fontFamily:t.dimensionValues.fontFamily,fontSize:t.dimensionValues.fontSize}))({cell:e,styleService:a,isCellSelected:t,isLeftColumn:n,isIndentModeEnabled:o.isIndentModeEnabled});if(e.representation.type===PF.Image&&!e.isTotal&&!e.isNull){const{labelStructure:t}=e.representation,i=n&&t&&t.suffix?zU:qG;return fo.jsx(i,{cell:e,representation:e.representation,leafCount:e.leafCount,textStyle:c,isLeftColumn:n,canExpandOrCollapse:e.ref.qCanCollapse||e.ref.qCanExpand,imageContainerHorizontalAlignment:rG(e,o,n,r)})}if(e.representation.type===PF.Link&&!i&&!e.isTotal){const t=n&&e.representation.labelStructure?$U:jU;u=fo.jsx(t,{text:e.representation.text,labelStructure:e.representation.labelStructure,href:e.representation.url,interactions:s,color:e.expressionColor.color})}return fo.jsx(HU,{shouldEnableStickyText:l,textStyle:{...c,...e.representation.type===PF.Image&&e.isNull?{alignSelf:fG(e)}:{}},children:u})},GU=({index:e,style:t,data:n})=>{const{styleService:r,layoutService:i}=w$(),{isSelected:o}=cG(),{isLeftColumn:a=!1,showLastBorder:s,itemCount:l,isLast:u,totalDividerIndex:c}=n,{isAdjustingWidth:d,setIsAdjustingWidth:p}=JG([n]),f=kU(e,n),h=a?e===l-1:u,m=a?u:e===l-1,g=wB(f,c,i.isIndentModeEnabled);if(void 0===f){const{background:n}=r.dimensionValues;return fo.jsx(CB,{style:{...t,background:n},index:e,isLastRow:h,isLastColumn:m,showLastBorder:s,isLeftColumn:a,showTotalCellDivider:g})}const v=o(f);return fo.jsxs(qU,{reactWindowStyle:t,isLeftColumn:a,isLastRow:h,isLastColumn:m,isCellSelected:v,showTotalCellDivider:g,cell:f,data:n,isAdjustingWidth:d,index:e,children:[fo.jsxs(EB,{verticalAlign:fG(f),width:IB(f.representation),right:f.isLeftColumn?void 0:4,isLeftColumn:a,children:[fo.jsx(IG,{isLeftColumn:a,isCellSelected:v,cell:f}),fo.jsx(BU,{isLeftColumn:a,isCellSelected:v,cell:f})]}),fo.jsx(eU,{cellInfo:{...f,columnWidthLocation:f.isPseudoDimension?TF.Measures:TF.Dimension},columnWidth:t.width,isLastColumn:m,setIsAdjustingWidth:p})]})};var UU=n.memo(GU,sB);const YU=({list:e,listValues:t,isLastRow:n,getRightGridColumnWidth:r})=>i=>{const o=n?e[i]:t.at(i);return o&&0===i&&o.x>0?(o.leafCount+o.x+o.distanceToNextCell)*r():!n&&o?(o.leafCount+o.distanceToNextCell)*r():r(o?.x??i)},KU=(e,t,n,r)=>{const i=Object.values(e);let o,a=i.length;return r&&(a=n,o=t/a),{itemCount:a,estimatedItemSize:o,listValues:i}},XU=(e,t)=>n=>{e.current&&(e.current[t]=n)},JU={display:"flex",height:"fit-content",borderWidth:"1px 0px 0px 0px",...cz},ZU={overflow:"hidden",willChange:"auto",flexShrink:0},QU=({leftGridRef:e,width:t,height:n,columnWidths:r,showLastBorder:i})=>{const{pageInfo:o,direction:a}=g$(),{layoutService:s,styleService:{contentCellHeight:l,grid:{divider:u}}}=w$(),{qSize:c}=s.layout.qHyperCube,{gridSectionsData:{leftDimensionData:d},visibleDimensionsInfo:{visibleLeftDimensionInfo:p}}=BH();AU(e,d),LU(e,t,n,l);const f=o.rowsOnCurrentPage*l,h={...JU,borderColor:u,width:r.reduce((e,t)=>e+t,0)};return fo.jsx("div",{style:h,"data-section-id":"LEFT_GRID",children:d.grid.map((t,u)=>{const h=u===d.columnCount-1,m=P$(p[u]),{itemCount:g,estimatedItemSize:v,listValues:y}=KU(t,f,o.rowsOnCurrentPage,h),b=s.isIndentModeEnabled?()=>l:((e,t,n,r,i)=>o=>{const a=r?e[o]:t.at(o);if(a&&0===o&&a.pageY>0)return(a.leafCount+a.pageY+a.distanceToNextCell)*n;if(a&&a.leafCount>0){const e=a.y===i-a.leafCount;return(a.leafCount-(e?a.ref.qUp:0)+a.distanceToNextCell)*n}return n})(t,y,l,h,c.qcy);return fo.jsx(rB,{ref:XU(e,u),style:{...ZU,flexGrow:h?1:0,direction:a},height:n,width:r[u],itemCount:g,itemSize:b,layout:"vertical",itemData:{list:t,isLeftColumn:!0,isLast:h,itemCount:g,showLastBorder:i,listValues:y,totalDividerIndex:d.totalDividerIndex},itemKey:BG,estimatedItemSize:v,children:UU},m)})})};var eY=b(QU);const tY={overflow:"hidden",willChange:"auto"},nY=e=>({...cz,borderWidth:"rtl"===e?"0px 1px 0px 0px":"0px 0px 0px 1px"}),rY=({topGridRef:e,rowHightCallback:t,width:n,height:r,showLastBorder:i,getRightGridColumnWidth:o})=>{const{direction:a}=g$(),{layoutService:s,styleService:{grid:{divider:l},headerCellHeight:u}}=w$(),{gridSectionsData:{headersData:c,topDimensionData:d}}=BH(),p={...nY(a),borderColor:l,height:r};AU(e,d),LU(e,n,r,u);const f=s.size.x*o();return 0===d.rowCount?fo.jsx("div",{style:{width:n,height:r,...nY(a)}}):fo.jsx("div",{style:p,"data-section-id":"TOP_GRID",children:d.grid.map((r,l)=>{const u=l===d.rowCount-1,{itemCount:p,estimatedItemSize:h,listValues:m}=KU(r,f,s.size.x,u),g=(({layoutService:e,headersData:t,topRowIndex:n})=>{const r=t.data.at(n);if(void 0===r)return;const i=t.size.x-1,o=DU({layoutService:e,headersData:t,topRowIndex:n})?0:i,a=r.at(o),s=Array.isArray(a)?a.at(i):a;return s?e.getDimensionInfo(s.dimensionInfoIndex):void 0})({layoutService:s,headersData:c,topRowIndex:l}),v=g?P$(g):`empty ${l}`;return fo.jsx(rB,{ref:XU(e,l),style:tY,height:t(),width:n,itemCount:p,itemSize:YU({list:r,listValues:m,isLastRow:u,getRightGridColumnWidth:o}),layout:"horizontal",itemData:{list:r,isLast:u,itemCount:p,showLastBorder:i,listValues:m,totalDividerIndex:d.totalDividerIndex},itemKey:BG,estimatedItemSize:h,direction:a,children:UU},v)})})};var iY=b(rY);const oY=()=>fo.jsx(aY,{}),aY=()=>{const{styleService:{headerCellHeight:e,contentCellHeight:t}}=w$(),n=SV(),r=(()=>{const{model:e}=b$(),t=f(async(t,n)=>{if(!e)throw new Error("No Model provided!");const{qReverseSort:r,dimensionInfoIndex:i,sortDirection:o}=t,a=[];if(n===o)return!1;a.push({qPath:`/qHyperCubeDef/qDimensions/${i}/qDef/qReverseSort`,qOp:"Replace",qValue:(!r).toString()});try{return await e.applyPatches(a,!0),!0}catch(e){return console.error("Error while applying patch: ",e),!1}},[e]);return t})(),{gridSectionsWrapperRefs:{headerGridWrapperRef:i,topGridWrapperRef:o,leftGridWrapperRef:a,dataGridWrapperRef:s},gridRefs:{topGridRef:l,leftGridRef:u,dataGridRef:c},scrollDirectionRefs:{verticalScrollDirection:p,horizontalScrollDirection:h},scrollbarsDimensions:{verticalScrollbarWidth:m,horizontalScrollbarHeight:g,resetHorizontalScrollbarHeight:v}}=xV(),{leftGridWidth:y,leftGridFullWidth:b,leftGridColumnWidths:x,rightGridFullWidth:S,showLastRightBorder:w,getRightGridColumnWidth:C,getHeaderCellsIconsVisibilityStatus:E,overrideLeftGridWidth:I}=function({tableWidth:e,verticalScrollbarWidth:t,resetHorizontalScrollbarHeight:n}){const{layoutService:r,styleService:i}=w$(),{gridSectionsData:{headersData:o}}=BH(),{measureText:a}=Fz(i.header,{allowLineBreaks:!1}),s=uV({tableWidth:e}),l=cV({tableWidth:e,verticalScrollbarWidth:t,leftGridWidth:s.leftGridWidth}),u=s.leftGridWidth+l.rightGridFullWidth+1<e,c=f((e,t,n="")=>{let i=e;r.isIndentModeEnabled&&(i=1,1===o.size.x&&(i=0));const l=s.leftGridColumnWidths[i];let u=!1,c=!1,d=a(n)+YH;return t&&d+UH<=l&&(c=!0,d+=UH),d+UH<=l&&(u=!0),{shouldShowMenuIcon:u,shouldShowLockIcon:c}},[s.leftGridColumnWidths,a,r.isIndentModeEnabled,o.size.x]);return d(()=>{const e=s.leftGridWidth===s.leftGridFullWidth,t=l.rightGridWidth===l.rightGridFullWidth;e&&t&&n()},[n,s.leftGridWidth,s.leftGridFullWidth,l.rightGridWidth,l.rightGridFullWidth]),{...s,...l,showLastRightBorder:u,getHeaderCellsIconsVisibilityStatus:c}}({tableWidth:n.width,verticalScrollbarWidth:m,resetHorizontalScrollbarHeight:v}),{gridScaffoldDimensions:D,headerGridDims:R,topGridDims:P,leftGridDims:M,dataGridDims:L,metadata:{everyThingFitsInTableRectHeight:A,scrollbarsVisibilityStatus:k}}=(({cellHeights:{headerCellHeight:e,contentCellHeight:t},horizontalWidths:{leftGridWidth:n,leftGridOriginalWidth:r,rightGridOriginalWidth:i},scrollBarsDimensions:{verticalScrollbarWidth:o,horizontalScrollbarHeight:a}})=>{const s=SV(),{pageInfo:l}=g$(),{gridSectionsData:{headersData:u,topDimensionData:c}}=BH(),d=Math.min(s.height*KH,Math.max(s.height*KH-25,s.height-t-a)),p=s.width*KH,f=l.rowsOnCurrentPage*t,h=Math.max(u.size.y,c.rowCount,1),m=e*h,g=e*h,v=Math.min(p,n),y=s.width-p,b=Math.max(y,s.width-v),x=Math.min(d,m,g),{availableHeight:S,everyThingFitsInTableRectHeight:w,everyThingFitsInTableRectWidth:C}=((e,t,n)=>{const r=t+1+n+o<=s.width,i=e+1+f+a,l=i-s.height<a||i<=s.height;return{availableHeight:l?i:s.height,everyThingFitsInTableRectHeight:l,everyThingFitsInTableRectWidth:r}})(x,v,b),E=S-d,I=Math.max(E,S-x),D=Math.min(I,f),R=Math.min(I,f),P=m+1+f,{visibilityStatus:M,metadata:{hasLeftGridOverflowX:L,hasDataGridOverflowX:A}}=(e=>{const{gridScaffold:{X_AXIS:{leftSectionWidth:t,rightSectionWidth:n},Y_AXIS:{topSectionHeight:r,bottomSectionHeight:i}},gridOriginalWidth:{X_AXIS:{leftSectionFullWidth:o,rightSectionFullWidth:a},Y_AXIS:{topSectionFullHeight:s,bottomSectionFullHeight:l}}}=e,u=s>r,c=o>t,d=a>n,p=l>i;return{visibilityStatus:{topGrid:{overflowX:"hidden",overflowY:u?"scroll":"hidden"},leftGrid:{overflowX:c?"scroll":"hidden",overflowY:"hidden"},dataGrid:{overflowX:d?"scroll":"hidden",overflowY:p?"scroll":"hidden"}},metadata:{hasTopGridOverflowY:u,hasLeftGridOverflowX:c,hasDataGridOverflowX:d,hasDataGridOverflowY:p}}})({gridScaffold:{X_AXIS:{leftSectionWidth:v,rightSectionWidth:b},Y_AXIS:{topSectionHeight:x,bottomSectionHeight:I}},gridOriginalWidth:{X_AXIS:{leftSectionFullWidth:r,rightSectionFullWidth:i},Y_AXIS:{topSectionFullHeight:g,bottomSectionFullHeight:P-g}}});return{gridScaffoldDimensions:{width:s.width,height:s.height,gridTemplateColumns:`${v}px ${b}px`,gridTemplateRows:`${x}px ${I}px`},headerGridDims:{width:-1,height:x},topGridDims:{fullSizeWrapper:{width:i-o+(A?o:0),height:g},stickyWrapper:{width:b-1-o,height:-1},self:{width:Math.min(i,b)-(C?1:0)-o,height:g}},leftGridDims:{fullSizeWrapper:{width:v,height:P-g+(!L&&A?a:0)},stickyWrapper:{width:v,height:I-1-a},self:{width:v,height:Math.max(t,D-(w?0:a-1))}},dataGridDims:{fullSizeWrapper:{width:i-o+(A?o:0),height:P-g+(!A&&L?a:0)},stickyWrapper:{width:b-1-o,height:I-1-a},self:{width:Math.min(i,b)-(C?1:0)-o,height:Math.max(t,R-(w?0:a-1))}},metadata:{everyThingFitsInTableRectHeight:w,scrollbarsVisibilityStatus:M}}})({cellHeights:{headerCellHeight:e,contentCellHeight:t},horizontalWidths:{leftGridWidth:y,leftGridOriginalWidth:b,rightGridOriginalWidth:S},scrollBarsDimensions:{verticalScrollbarWidth:m,horizontalScrollbarHeight:g}}),O=f(()=>e,[e]),q=f(()=>t,[t]);return(()=>{const{downloadService:e}=w$();d(()=>{e.notifyIsDoneRendering()})})(),fo.jsxs(CV,{style:D,children:[fo.jsx("div",{style:{overflow:"hidden"},ref:i,children:fo.jsx(MU,{tableWidth:n.width,leftGridWidth:y,columnWidths:x,getHeaderCellsIconsVisibilityStatus:E,rowHight:e,height:R.height,changeSortOrder:r,overrideLeftGridWidth:I})}),fo.jsx(DV,{style:k.topGrid,origin:jF.TopGrid,ref:o,children:fo.jsx(wV,{style:P.fullSizeWrapper,children:fo.jsx(RV,{style:P.stickyWrapper,children:fo.jsx(iY,{topGridRef:l,rowHightCallback:O,...P.self,showLastBorder:{right:w,bottom:!1},getRightGridColumnWidth:C})})})}),fo.jsx(DV,{style:k.leftGrid,origin:jF.LeftGrid,ref:a,children:fo.jsx(wV,{style:M.fullSizeWrapper,children:fo.jsx(RV,{style:M.stickyWrapper,children:fo.jsx(eY,{leftGridRef:u,...M.self,columnWidths:x,showLastBorder:{right:!1,bottom:A}})})})}),fo.jsx(DV,{style:k.dataGrid,origin:jF.DataGrid,ref:s,children:fo.jsx(wV,{style:L.fullSizeWrapper,children:fo.jsx(RV,{style:L.stickyWrapper,children:fo.jsx(KG,{dataGridRef:c,rowHightCallback:q,...L.self,showLastBorder:{right:w,bottom:A},getRightGridColumnWidth:C,verticalScrollDirection:p,horizontalScrollDirection:h})})})})]})},sY=()=>{const{keyboard:e,theme:t,interactions:n,translator:r}=b$(),{pageInfo:i,updatePageInfo:o,rect:a}=g$(),{layoutService:s}=w$(),{layout:l,hasData:u}=s;return fo.jsxs(fo.Fragment,{children:[u?fo.jsx(oY,{}):null,fo.jsx(E$,{}),fo.jsx(h$,{paginationNeeded:i.shouldShowPagination,handleChangePage:e=>{o({page:e})},pageInfo:i,totalRowCount:i.totalRowCount,totalColumnCount:0,totalPages:i.totalPages,keyboard:e,translator:r,theme:t,interactions:n,rect:a,layout:l})]})};const lY=(e,{selections:t,baseObjects:r,coreServices:i,nebulaObjects:o},a)=>{const s=function(e){const t=zS();return t?.components?.MuiTable?.styleOverrides&&(t.components.MuiTable.styleOverrides.root={}),_s({...t,direction:e})}(r.direction);e.render(fo.jsx(n.StrictMode,{children:fo.jsx(Pw,{store:a,children:fo.jsx(Cl,{theme:s,children:fo.jsx(x$,{...o,children:fo.jsx(v$,{...r,children:fo.jsx(dG,{selections:t,children:fo.jsx(C$,{...i,children:fo.jsx(GH,{children:fo.jsx(sY,{})})})})})})})})}))};var uY=function(e){return e.FontSize="fontSize",e.FontFamily="fontFamily",e.FontColor="fontColor",e.FontStyle="fontStyle",e.Background="background",e.LineClamp="lineClamp",e.ColumnLineClamp="columnLineClamp",e.Border="border",e.Divider="divider",e}(uY||{}),cY=function(e){return e.Dimension="object.pivotTableV2.dimension",e.Measure="object.pivotTableV2.measure",e.Total="object.pivotTableV2.total",e.Null="object.pivotTableV2.null",e.Grid="object.pivotTableV2",e}(cY||{}),dY=function(e){return e.Grid="grid",e.Divider="grid.divider",e.LabelName="label.name",e.LabelValue="label.value",e}(dY||{}),pY=function(e){return e.FontSize="fontSize",e.FontFamily="fontFamily",e.FontColor="color",e.BackgroundColor="backgroundColor",e.LineClamp="lineClamp",e.ColumnLineClamp="columnLineClamp",e.BorderColor="borderColor",e}(pY||{});const fY=e=>e?`${parseInt(e,10)}px`:void 0,hY=(e,t)=>{if(t){const n=e.getColorPickerColor(t);return"none"===n?sz.Transparent:n}},mY=(e,t)=>+(parseInt(e,10)*az*t+8).toFixed(2),gY=(e,t)=>void 0===e?t:e.some(e=>"bold"===e)?iz:"normal",vY=e=>e?.some(e=>"italic"===e)?"italic":"normal",yY=e=>e?.some(e=>"underline"===e)?"underline":"none",bY=document.createElement("textarea");function xY(e){bY.value=e,document.body.appendChild(bY),bY.select(),bY.setSelectionRange(0,bY.value.length),document.execCommand("copy"),document.body.removeChild(bY)}bY.style.position="absolute",bY.style.left="-9999px",bY.setAttribute("readonly","");function SY(e){T?.((t,n)=>{const r=n.target,i=r?.closest(`.${DT}`);i?.title&&t.addItem({translation:"contextMenu.copyCellValue",icon:"lui-icon lui-icon--copy",tid:"copy-cell-context-item",id:"copy-cell-context-item",select:async()=>{(e=>{const t=e.title;t&&(navigator.clipboard?.writeText?navigator.clipboard.writeText(t).catch(()=>{xY(t)}):xY(t))})(i)}}),e?.forEach(e=>{e(t,n,i)})})}const wY=({model:e,layoutService:t,effectivePropertiesService:n,translator:r})=>Rz((i,o,a)=>{if(!e||n.qAlwaysFullyExpanded)return;const s=e,l=i.addItem({translation:"Object.PivotTable.ContextMenu.ExpandCollapse",tid:"expand-collapse-group",id:"expand-collapse-group"}),{qEffectiveDimensionName:u,label:c}=((e,t)=>{const n=((e,t)=>{const n=e?.getAttribute("data-dimension-info-index");if("string"==typeof n)return t.getDimensionInfo(+n)})(e,t);return"object"==typeof n?{qEffectiveDimensionName:n.qEffectiveDimensionName,label:n.qFallbackTitle}:{qEffectiveDimensionName:void 0,label:void 0}})(a,t);l.addItem((e=>({icon:"lui-icon lui-icon--plus",translation:"Object.PivotTable.ContextMenu.ExpandAll",tid:"expand-all",select:async()=>{try{await e.expandTop(I$,0,0,!0),await e.expandLeft(I$,0,0,!0)}catch(e){console.error("Failed to expand all",e)}}}))(s)),"string"==typeof u&&l.addItem((({model:e,effectivePropertiesService:t,qEffectiveDimensionName:n,label:r,translator:i})=>({icon:"lui-icon lui-icon--plus",translation:i.get("SNPivotTable.ContextMenu.ExpandDimension",[r??""]),tid:"expand-dimension",id:"expand-dimension",select:hU({model:e,qExpansionState:t.qExpansionState,qEffectiveDimensionName:n,action:dU.Expand})}))({model:s,effectivePropertiesService:n,qEffectiveDimensionName:u,label:c,translator:r})),l.addItem((e=>({icon:"lui-icon lui-icon--minus",translation:"Object.PivotTable.ContextMenu.CollapseAll",tid:"collapse-all",select:async()=>{try{await e.collapseTop(I$,0,0,!0),await e.collapseLeft(I$,0,0,!0)}catch(e){console.error("Failed to collapse all",e)}}}))(s)),"string"==typeof u&&l.addItem((({model:e,effectivePropertiesService:t,qEffectiveDimensionName:n,label:r,translator:i})=>({icon:"lui-icon lui-icon--minus",translation:i.get("SNPivotTable.ContextMenu.CollapseDimension",[r??""]),tid:"collapse-dimension",id:"collapse-dimension",select:hU({model:e,qExpansionState:t.qExpansionState,qEffectiveDimensionName:n,action:dU.Collapse})}))({model:s,effectivePropertiesService:n,qEffectiveDimensionName:u,label:c,translator:r}))},[e,t,n]),CY=(e,t)=>P(()=>(({layout:e})=>{const{qHyperCube:t,nullValueRepresentation:n,snapshotData:r}=e,{qNoOfLeftDims:i,qEffectiveInterColumnSortOrder:o,qMeasureInfo:a,qDimensionInfo:s}=t,l=!!r,u=r?.content?.rowsPerPage??15e3,c={x:Math.min(e.qHyperCube.qSize.qcx,oz),y:Math.min(e.qHyperCube.qSize.qcy,u)},d=o.slice(0,i),p=e=>d.some(t=>t===e),f=p(D$),h=new Map(o.map(e=>[s[e]??D$,e])),m=a.filter(e=>7005!==e.qError?.qErrorCode);return{layout:e,getNullValueText:()=>n?.text??"-",getMeasureInfoIndexFromCellIndex:(e,t=!1)=>{if(f)return 0;const n=e%m.length;return t?n:a.findIndex(e=>e===m[n])},getDimensionInfo:e=>e===D$?void 0:s.at(e),getDimensionInfoIndex:e=>h.get(e)??-1,size:c,isSnapshot:l,hasLimitedData:!l&&c.x<e.qHyperCube.qSize.qcx,hasData:c.x>0&&c.y>0,hasLeftDimensions:0!==e.qHyperCube.qNoOfLeftDims,hasPseudoDimOnLeft:f,leftDimensionInfoIndexes:d,isLeftDimension:p,triggerdByExpandOrCollapse:!!e.qHyperCube.qLastExpandedPos,visibleMeasureInfo:m,isIndentModeEnabled:Boolean(e.qHyperCube.qIndentMode),indentModeColumnWidth:e.qHyperCube.indentModeColumnWidth??{type:LT.Auto,pixels:MT.PixelsDefault,percentage:MT.PercentageDefault},searchSortFromDimension:"inherit"===e.search?.sorting}})({layout:e}),[e,t]),EY=({model:e,layoutService:t,viewService:n,pageInfo:r,rect:i})=>{const{layout:o,isSnapshot:a,triggerdByExpandOrCollapse:s}=t,l=(e=>{const t=Mz(e);return t.current=e,t})(FH(i));return Tz(async()=>{const{qHyperCube:t}=o,{maxNumberOfVisibleRows:i,maxNumberOfVisibleColumns:u}=l.current;if(a)return o.snapshotData?.content?.qPivotDataPages??[];if(void 0!==e&&"getHyperCubePivotData"in e&&(((e,t,n,r)=>!!e&&(t.gridColumnStartIndex+t.gridWidth>=r||t.gridRowStartIndex+t.gridHeight>=n))(s,n,i,u)||((e,t,n,r)=>{const{qHyperCube:{qPivotDataPages:i,qSize:o}}=e,{qTop:a,qWidth:s,qHeight:l}=i[0]?.qArea??{qTop:0,qWidth:0,qHeight:0};return a<t.page*t.rowsPerPage||s<Math.min(r,o.qcx)||l<Math.min(n,o.qcy)})(o,r,i,u))){const t=((e,t,n,r,i,o)=>{const a=r.page*r.rowsPerPage,s=Math.min(a+r.rowsPerPage,n.qcy),l=Math.min(oz,n.qcx);if(n.qcy<a)return null;let u=0,c=a;if(e){u=t.gridColumnStartIndex,c=a+t.gridRowStartIndex;const e=c+t.gridHeight,n=t.gridColumnStartIndex+t.gridWidth;e>s&&(c=Math.max(0,s-i)),n>l&&(u=Math.max(0,l-o))}return{qLeft:u,qTop:c,qWidth:Math.min(l-u,o),qHeight:Math.min(s-c,i)}})(s,n,o.qHyperCube.qSize,r,i,u);return t?e.getHyperCubePivotData(I$,zH(t)):[]}return t.qPivotDataPages},[o,a,e,n,r.page,r.rowsPerPage,l,s])},IY=({rowsPerPage:e,totalRowCount:t,page:n})=>Math.min(e,t-n*e),DY=(e,t,n=15e3)=>({rowsPerPage:n,totalPages:Math.max(1,Math.ceil(e/n)),totalRowCount:e,rowsOnCurrentPage:IY({rowsPerPage:n,totalRowCount:e,page:t})}),RY=15,PY=({layoutService:e,viewService:t,rect:n,model:r,pageInfo:i})=>{const{freeResize:o}=M();return N(async e=>{const o=e;if(!o.snapshotData||!r||o.snapshotData.content)return o;if("getHyperCubePivotData"in r){const{scrollTop:e,scrollLeft:a,leftGridScrollLeft:s,topGridScrollTop:l}=t,u=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:i,gridWidth:o,gridHeight:a}=e,s=t.page*t.rowsPerPage,l=Math.max(r-RY,0),u=Math.max(s+i-RY,s,0),c=oz-l,d=s+t.rowsOnCurrentPage-u;if((e=>0===e.gridWidth&&0===e.gridHeight)(e)){const{maxNumberOfVisibleColumns:e,maxNumberOfVisibleRows:t}=FH(n);return{qLeft:l,qTop:u,qWidth:Math.min(c,e+30),qHeight:Math.min(d,t+30)}}return{qLeft:l,qTop:u,qWidth:Math.min(c,o+30),qHeight:Math.min(d,a+30)}})(t,i,n),c=zH(u),d={qLeft:0,qTop:i.page*i.rowsPerPage,qWidth:1,qHeight:1};o.snapshotData.content={qPivotDataPages:await r.getHyperCubePivotData(I$,[d,...c]),scrollTop:e,scrollLeft:a,leftGridScrollLeft:s,topGridScrollTop:l,page:i.page,rowsPerPage:i.rowsPerPage},o.snapshotData.object.size.w=n.width,o.snapshotData.object.size.h=n.height}return o}),j(()=>({getViewState:()=>((e,t)=>({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,leftGridScrollLeft:e.leftGridScrollLeft,topGridScrollTop:e.topGridScrollTop,renderPage:t.page}))(t,i)}),[t]),e.layout.snapshotData?.content&&!o?{left:n.left,top:n.top,width:e.layout.snapshotData.object.size.w,height:e.layout.snapshotData.object.size.h}:n};var MY={SNPivotTable_ContextMenu_CollapseDimension:{id:"SNPivotTable.ContextMenu.CollapseDimension",locale:{"de-DE":"{0} reduzieren","en-US":"Collapse {0}","es-ES":"Contraer {0}","fr-FR":"Réduire {0}","it-IT":"Comprimi {0}","ja-JP":"{0} を折りたたむ","ko-KR":"{0} 축소","nl-NL":"{0} samenvouwen","pl-PL":"Zwiń {0}","pt-BR":"Recolher {0}","ru-RU":"Свернуть {0}","sv-SE":"Dölj {0}","tr-TR":"{0} öğelerini daralt","zh-CN":"折叠 {0}","zh-TW":"收合 {0}"}},SNPivotTable_ContextMenu_ExpandDimension:{id:"SNPivotTable.ContextMenu.ExpandDimension",locale:{"de-DE":"{0} erweitern","en-US":"Expand {0}","es-ES":"Expandir {0}","fr-FR":"Développer {0}","it-IT":"Espandi {0}","ja-JP":"{0} を展開","ko-KR":"{0} 확장","nl-NL":"{0} uitvouwen","pl-PL":"Rozwiń {0}","pt-BR":"Expandir {0}","ru-RU":"Развернуть {0}","sv-SE":"Visa {0}","tr-TR":"{0} öğelerini genişlet","zh-CN":"展开 {0}","zh-TW":"展開 {0}"}},SNPivotTable_IndentMode_Rows:{id:"SNPivotTable.IndentMode.Rows",locale:{"de-DE":"Zeilen","en-US":"Rows","es-ES":"Filas","fr-FR":"Lignes","it-IT":"Righe","ja-JP":"行","ko-KR":"행","nl-NL":"Rijen","pl-PL":"Wiersze","pt-BR":"Linhas","ru-RU":"Строки","sv-SE":"Rader","tr-TR":"Satırlar","zh-CN":"行","zh-TW":"列"}},SNPivotTable_LimitedData:{id:"SNPivotTable.LimitedData",locale:{"de-DE":"* Derzeit wird eine begrenzte Anzahl Spalten angezeigt","en-US":"* Currently showing a limited number of columns","es-ES":"* Actualmente mostrando un número limitado de columnas","fr-FR":"*Affichage actuel d'un nombre limité de colonnes","it-IT":"* Attualmente visualizzato un numero limitato di colonne","ja-JP":"* 現在、限られた列の数を表示","ko-KR":"* 현재 제한된 수의 열만 표시","nl-NL":"* Op dit moment wordt slechts een beperkt aantal kolommen getoond","pl-PL":"* Obecnie wyświetlana jest ograniczona liczba kolumn","pt-BR":"* Atualmente mostrando um número limitado de colunas","ru-RU":"* В настоящее время отображается ограниченное количество столбцов","sv-SE":"* Visar för närvarande ett begränsat antal kolumner","tr-TR":"*Şu anda sınırlı sayıda sütun gösteriliyor","zh-CN":"* 当前显示的列数有限","zh-TW":"* 目前顯示有限欄數"}},SNPivotTable_NoData:{id:"SNPivotTable.NoData",locale:{"de-DE":"Das Diagramm wird nicht angezeigt, weil es keine Werte enthält.","en-US":"The chart is not displayed because it contains no values.","es-ES":"El gráfico no se muestra porque no contiene valores.","fr-FR":"Le graphique n'est pas affiché, car il ne contient aucune valeur.","it-IT":"Il grafico non è visualizzato poiché non contiene alcun valore.","ja-JP":"チャートには値が含まれていないため、チャートは表示されません。","ko-KR":"차트에 값이 없으므로 차트가 표시되지 않습니다.","nl-NL":"Het diagram wordt niet weergegeven omdat deze geen waarden bevat.","pl-PL":"Wykres nie jest wyświetlany, ponieważ nie zawiera wartości.","pt-BR":"O gráfico não foi exibido porque não contém valores.","ru-RU":"Диаграмма не отображается, так как не содержит значений.","sv-SE":"Diagrammet visas inte eftersom det inte innehåller några värden.","tr-TR":"Değer içermemesi nedeniyle grafik görüntülenmiyor.","zh-CN":"图表未显示,因为它不包含任何值。","zh-TW":"系統不會顯示圖表,因為這沒有包含任何值。"}}};const LY=()=>{const e=_(),t=e.language();return P(()=>{!function(e){const t="SNPivotTable_LimitedData";e.get(t)===t&&Object.keys(MY).forEach(t=>{e.add(MY[t])})}(e)},[e]),{translator:e,language:t}},AY=e=>{const t=P(()=>Iw(),[]),{flags:n}=e,r=F(),i=(e=>{const t=P(()=>zz(e),[e]);return k(()=>()=>{t.unmount()},[t]),t})(r),o=z(),a=W(),s=$(),l=H(),u=V(),c=(()=>{const{viewState:e}=M(),t=Mz(new Set),n=void 0!==window.qlikprinting,{promise:r,resolve:i}=P(()=>Dz(),[]),o=Rz(e=>{t.current.add(e)},[t]),a=Rz(Qj(async()=>{await Promise.all(t.current),t.current.clear(),i()},1e3),[i,t]);return L(async()=>{await r},[r]),P(()=>({viewState:e,isDownloadedAsPDForImage:n,notifyIsDoneRendering:a,waitForPromise:o}),[a,n,e,o])})(),d=((e,t)=>{const[n]=Tz(async()=>{if(void 0!==e&&!t.snapshotData&&"getEffectiveProperties"in e)return{...await e.getEffectiveProperties()}},[e,t]);return P(()=>{const e=void 0!==n?.qHyperCubeDef.qSortbyYValue&&1===Math.abs(n.qHyperCubeDef.qSortbyYValue),t=n?.qHyperCubeDef.qDimensions.map(e=>e.qDef?.qSortCriterias)??[];return{qAlwaysFullyExpanded:n?.qHyperCubeDef.qAlwaysFullyExpanded??!1,qExpansionState:n?.qHyperCubeDef.qExpansionState,isSortedByFirstMeasure:e,getSortCriteriaForDimension:e=>t[e]}},[n])})(a,o),p=CY(o,n),f=(e=>{const t=q();return{...t,select:!!t.active&&!!t.select&&!e,active:!!t.active&&!e,scroll:!!t.active}})(p.isSnapshot),h=B(),m=qz(o,r),{translator:g,language:v}=LY(),{pageInfo:y,updatePageInfo:b}=((e,t)=>{const{size:n,layout:{qHyperCube:{qSize:r}}}=e,i=t.isDownloadedAsPDForImage||e.isSnapshot,o=(e=>e.layout.snapshotData?.content?.rowsPerPage)(e),[a,s]=A(()=>{const a=((e,t)=>t.isDownloadedAsPDForImage?t.viewState?.renderPage??0:e.isSnapshot?e.layout.snapshotData?.content?.page??0:0)(e,t);return{page:a,shouldShowPagination:r.qcy>n.y&&!i,...DY(r.qcy,a,o)}}),l=e.layout.qHyperCube.qSize.qcy;return k(()=>{s(t=>({...t,...DY(l,t.page,o),shouldShowPagination:l>e.size.y&&!i}))},[l,e.size.y,s,i,o]),k(()=>{const{page:e,totalPages:t}=a;if(e+1>t){const e=t-1,n=IY({...a,page:e});s({...a,page:e,rowsOnCurrentPage:n})}},[a]),{pageInfo:a,updatePageInfo:e=>{s({...a,...e,rowsOnCurrentPage:IY({...a,...e})})}}})(p,c),x=((e,t,n)=>P(()=>((e,t)=>{if(e.isDownloadedAsPDForImage){const{viewState:t}=e;return{gridColumnStartIndex:0,gridRowStartIndex:0,gridWidth:0,gridHeight:0,scrollTop:t?.scrollTop??0,scrollLeft:t?.scrollLeft??0,leftGridScrollLeft:t?.leftGridScrollLeft??0,topGridScrollTop:t?.topGridScrollTop??0}}return{gridColumnStartIndex:0,gridRowStartIndex:0,gridWidth:0,gridHeight:0,scrollTop:t?.content?.scrollTop??0,scrollLeft:t?.content?.scrollLeft??0,leftGridScrollLeft:t?.content?.leftGridScrollLeft??0,topGridScrollTop:t?.content?.topGridScrollTop??0}})(n,t.snapshotData),[n,e.page,t.snapshotData]))(y,o,c),S=PY({rect:G(),layoutService:p,viewService:x,model:a,pageInfo:y}),[w,C]=EY({model:a,layoutService:p,viewService:x,pageInfo:y,rect:S}),E=P(()=>((e,t)=>{const n=t.layout.components?.find(e=>"theme"===e.key),r=n?.header,i=n?.dimensionValues,o=n?.measureValues,a=n?.measureLabels,s=n?.totalValues,l=n?.nullValues,u=n?.grid,c=(t,n,r)=>e.getStyle(t,n,r),d=+(u?.[uY.LineClamp]??c(cY.Grid,dY.Grid,pY.LineClamp)??1),p=+(u?.[uY.ColumnLineClamp]??c(cY.Grid,dY.Grid,pY.ColumnLineClamp)??1),f=hY(e,r?.[uY.Background])??c(cY.Dimension,dY.LabelName,pY.BackgroundColor)??sz.Transparent,h={header:{fontSize:fY(r?.[uY.FontSize])??c(cY.Dimension,dY.LabelName,pY.FontSize)??nz,fontFamily:r?.[uY.FontFamily]??c(cY.Dimension,dY.LabelName,pY.FontFamily)??rz,fontWeight:gY(r?.[uY.FontStyle],iz),fontStyle:vY(r?.[uY.FontStyle]),textDecoration:yY(r?.[uY.FontStyle]),color:hY(e,r?.[uY.FontColor])??c(cY.Dimension,dY.LabelName,pY.FontColor)??mN.TEXT,background:f,hoverBackground:u_(f,AT),activeBackground:u_(f,kT)},dimensionValues:{fontSize:fY(i?.[uY.FontSize])??c(cY.Dimension,dY.LabelValue,pY.FontSize)??nz,fontFamily:i?.[uY.FontFamily]??c(cY.Dimension,dY.LabelValue,pY.FontFamily)??rz,fontWeight:gY(i?.[uY.FontStyle],void 0),fontStyle:vY(i?.[uY.FontStyle]),textDecoration:yY(i?.[uY.FontStyle]),color:hY(e,i?.[uY.FontColor])??c(cY.Dimension,dY.LabelValue,pY.FontColor)??mN.TEXT,background:hY(e,i?.[uY.Background])??c(cY.Dimension,dY.LabelValue,pY.BackgroundColor)??sz.Transparent},measureValues:{fontSize:fY(o?.[uY.FontSize])??c(cY.Measure,dY.LabelValue,pY.FontSize)??nz,fontFamily:o?.[uY.FontFamily]??c(cY.Measure,dY.LabelValue,pY.FontFamily)??rz,fontWeight:gY(o?.[uY.FontStyle],"normal"),fontStyle:vY(o?.[uY.FontStyle]),textDecoration:yY(o?.[uY.FontStyle]),color:hY(e,o?.[uY.FontColor])??c(cY.Measure,dY.LabelValue,pY.FontColor)??sz.FontSecondary,background:hY(e,o?.[uY.Background])??c(cY.Measure,dY.LabelValue,pY.BackgroundColor)??sz.Transparent},measureLabels:{fontWeight:gY(a?.[uY.FontStyle],"normal"),fontStyle:vY(a?.[uY.FontStyle]),textDecoration:yY(a?.[uY.FontStyle]),color:hY(e,a?.[uY.FontColor])??c(cY.Measure,dY.LabelName,pY.FontColor)??sz.FontSecondary,background:hY(e,a?.[uY.Background])??c(cY.Measure,dY.LabelName,pY.BackgroundColor)??sz.Transparent},totalValues:{fontWeight:gY(s?.[uY.FontStyle],iz),fontStyle:vY(s?.[uY.FontStyle]),textDecoration:yY(s?.[uY.FontStyle]),color:hY(e,s?.[uY.FontColor])??c(cY.Total,dY.LabelValue,pY.FontColor)??mN.TEXT,background:hY(e,s?.[uY.Background])??c(cY.Total,dY.LabelValue,pY.BackgroundColor)??sz.Transparent},nullValues:{fontWeight:gY(l?.[uY.FontStyle],"normal"),fontStyle:vY(l?.[uY.FontStyle]),textDecoration:yY(l?.[uY.FontStyle]),color:hY(e,l?.[uY.FontColor])??c(cY.Null,dY.LabelValue,pY.FontColor)??mN.TEXT,background:hY(e,l?.[uY.Background])??c(cY.Null,dY.LabelValue,pY.BackgroundColor)??sz.NullValueBackground},grid:{columnLineClamp:p,lineClamp:d,border:hY(e,u?.[uY.Border])??c(cY.Grid,dY.Grid,pY.BorderColor)??sz.DividerLight,divider:hY(e,u?.[uY.Divider])??c(cY.Grid,dY.Divider,pY.BorderColor)??sz.DividerDark,background:hY(e,u?.[uY.Background])??c(cY.Grid,dY.Grid,pY.BackgroundColor)??sz.Transparent},selectedColors:l_(e)};return h.headerCellHeight=Math.max(mY(h.header.fontSize,p),mY(h.dimensionValues.fontSize,p),32),h.contentCellHeight=Math.max(mY(h.measureValues.fontSize,d),mY(h.dimensionValues.fontSize,d),24),h.dimensionValueTextHeight=mY(h.dimensionValues.fontSize,1),h})(m,p),[m,p]),I=((e,t,n)=>{const[,r,i]=Tz(async()=>{const t=GN(n.flags),r=e.getStyle("","","fontFamily"),i=e.getStyle("object","label.name","fontFamily"),o=e.getStyle("object","label.value","fontFamily"),a=e.getStyle("","","fontFamilies")??[];return Promise.all([...t,...a,r,i,o,$z].filter(e=>void 0!==e).map(async e=>{await document.fonts.load(`600 12px ${e}`),await document.fonts.load(`12px ${e}`)}))},[t,e,n]);return i?(console.warn("Failed to load fonts:",i),!0):!r})(m,o,e),{direction:D}=M();SY([wY({model:a,layoutService:p,effectivePropertiesService:d,translator:g})]),k(()=>{!C&&a&&!!w&&I&&lY(i,{selections:h,baseObjects:{rect:S,pageInfo:y,qPivotDataPages:w,updatePageInfo:b,direction:D},nebulaObjects:{env:e,app:s,model:a,embed:l,theme:m,keyboard:u,translator:g,interactions:f},coreServices:{styleService:E,viewService:x,layoutService:p,downloadService:c,effectivePropertiesService:d}},t)},[a,s,S,f,h,x,p,c,C,w,E,i,I,g,v,y,b,d,l,u,m,e,D,t])},kY={version:"7.23.0",qHyperCubeDef:{qAlwaysFullyExpanded:!1,qDimensions:[],qMeasures:[],qMode:"P",qSuppressMissing:!0,qSuppressZero:!1,qShowTotalsAbove:!0,qInitialDataFetch:[{qTop:0,qLeft:0,qWidth:50,qHeight:50}],qIndentMode:!1},showTitles:!0,title:"",subtitle:"",footnote:"",nullValueRepresentation:{text:"-"},components:[]},OY=()=>({...kY,qHyperCubeDef:{...kY.qHyperCubeDef,qIndentMode:!1}})}}});
102
+ e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,s,l,u,c,d,p=e.length,f=e.search(/[0-9\-\+#]/),h=f>0?e.substring(0,f):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),v=p-g,y=e.substring(v,v+1),b=v+("."===y||","===y?1:0),x=g>0?e.substring(b,p):"";if(n=(t="-"===(e=e.substring(f,b)).charAt(0)?-t:+t)<0?t=-t:0,i=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",o=r&&r[1]&&r[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(u=t.split("."))[1]||u[1]&&u[1].length<=s)&&(t=(+t).toFixed(s+1)),c=e[0].split(o),e[0]=c.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;u[0].length<e[0].length-a;)u[0]="0"+u[0];else 0===+u[0]&&(u[0]="");if((t=t.split("."))[0]=u[0],l=c[1]&&c[c.length-1].length){for(m="",v=(d=t[0]).length%l,p=d.length,b=0;b<p;b++)m+=d.charAt(b),!((b-v+1)%l)&&b<p-l&&(m+=o);t[0]=m}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),h+(n?"-":"")+r+x}},Xj({exports:{}});const l_=(e,t=gN.TEXT,n=gN.WHITE)=>{const r=LN(e??""),i=LN(t),o=LN(n);return r.isInvalid()?t:function(e,t,n){const r=AN(e,t),i=AN(e,n);if(void 0!==r&&void 0!==i)return r>i?t:n}(r,o,i).getRGB()},u_=e=>{const t=e.getStyle("","","dataColors.selected")||gN.SELECTED,n=function(e,t){const n=LN(kN),r=LN(e),i=LN(t);if(r.isInvalid()||i.isInvalid()||r.getAlpha()<1||i.getAlpha()<1)return t;const o=AN(n,r),a=AN(i,r),s=o>a||o>4.5;return!s&&a>3?i.getHex():s?kN:"#000000"}(t,gN.TEXT);return{background:t,color:n}},c_=(e,t)=>{const n=LN(e);return 0===n.a?(n.setAlpha(t.opacity),n.getString()):n.isDark()?n.getBrightenedColor(t.brighter).getString():n.getDarkenedColor(t.darker).getString()},d_=e=>{const t=LN(e);return t.isInvalid()?null:1===t.a?t.getRGB():t.getRGBA()},p_=e=>{e.stopPropagation(),e.preventDefault()},f_=e=>{(e instanceof HTMLElement||e instanceof SVGElement)&&e.focus()},h_=e=>{const{currentTarget:t}=e;if("true"===t.getAttribute("data-dragging"))return!0;const n=t.closest(".exploration-panel");if(!n)return!1;const r=n.getElementsByClassName("section-item-container");return Array.from(r).some(e=>"true"===e.getAttribute("data-dragging"))},m_=(e,t)=>{const{key:n,currentTarget:r}=e;if(r===t.current&&n===RT.Tab)if(e.preventDefault(),e.shiftKey)((e,t)=>{const{currentTarget:n}=e;if(n!==t.current)return;const r=n.closest('[role="region"]')?.getElementsByTagName("button")[0];r&&f_(r)})(e,t);else{const e=r.parentElement?.getElementsByClassName("exploration-section-header")[0];e&&f_(e)}},g_=(e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=t.sectionIndex??2;if(0===r)return void((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=n.closest(".exploration-panel")?.getElementsByTagName("input")[0];r&&f_(r)})(e,t);const i=n.closest(".exploration-panel")?.getElementsByClassName("exploration-list")[r-1],o=i?.getElementsByClassName("exploration-item-focus").length??0;if(o>0){const e=i?.getElementsByClassName("exploration-draggable-icon")[o-1];e&&f_(e)}},v_=(e,t)=>{const{key:n}=e;switch(n){case RT.Tab:p_(e),e.shiftKey?g_(e,t):((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=n.closest(".exploration-list"),i=r?.getElementsByClassName("exploration-item-focus")[0];if(!i){const e=n.closest(".exploration-panel")?.getElementsByClassName("exploration-list")[2].getElementsByClassName("exploration-section-header")[0];return void(e&&f_(e))}f_(i)})(e,t);break;case RT.Down:if(h_(e))break;e.preventDefault(),((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=n.closest(".exploration-panel"),i=r?.getElementsByClassName("exploration-section-header").length??0;let o=null;if(0===i)return;const a=t.sectionIndex??2;o=a+1<i?r?.getElementsByClassName("exploration-section-header")[a+1]:r?.getElementsByClassName("exploration-section-header")[0],o&&f_(o)})(e,t);break;case RT.Up:if(h_(e))break;e.preventDefault(),((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=n.closest(".exploration-panel"),i=r?.getElementsByClassName("exploration-section-header").length??0;let o=null;if(0===i)return;const a=t.sectionIndex??2;o=a-1>=0?r?.getElementsByClassName("exploration-section-header")[a-1]:r?.getElementsByClassName("exploration-section-header")[i-1],o&&f_(o)})(e,t);break;case RT.Enter:case RT.Space:e.preventDefault(),((e,t)=>{const{currentTarget:n}=e;if(e.preventDefault(),n!==t.ref.current)return;const r="all"!==t.checkState;t.toggleAllCheckboxes(r)})(e,t)}},y_=({children:e})=>fo.jsx("span",{style:{width:"fit-content",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",fontWeight:"bold"},children:e}),b_=({children:e,sectionIndex:t})=>{const r=qw(void 0!==t?UT(t):pN),i=Tw(void 0!==t?YT(t):fN),o=n.useRef(null),a={ref:o,toggleAllCheckboxes:i,checkState:r,sectionIndex:t};return fo.jsxs(sc,{ref:o,className:"exploration-section-header",tabIndex:0,onKeyDown:e=>{v_(e,a)},sx:{display:"flex",alignItems:"center",width:"100%",padding:"2px 8px 2px 8px",boxSizing:"border-box",fontSize:"14px","&:focus-visible":{boxShadow:`0 0 0 2px ${QT} inset`}},children:[fo.jsx(Oc,{disabled:"disabled"===r,checked:"all"===r,indeterminate:"some"===r,onChange:e=>{i(e.target.checked)},size:"small",style:{flexShrink:0,padding:9}}),fo.jsx(y_,{children:e})]})},x_=({sectionIndex:e})=>{const t=qw(VT(e));return fo.jsx(b_,{sectionIndex:e,children:t})},S_=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M5.5 1a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zm0 4a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zM5 9.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5zm.5 3.5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zM9 1.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5zM9.5 5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zM9 9.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5zm.5 3.5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5z"})})),w_=Sl("div")({position:"absolute",width:"1px",height:"1px",padding:0,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0}),C_=Sl(S_)(()=>({padding:"6px 6px",flexShrink:0,cursor:"grab","&:focus-visible":{boxShadow:`0 0 0 2px ${QT} inset`}})),E_=e=>"svg"===e.tagName?"exploration-draggable-icon":e.className,I_=(e,t)=>{const n=e.closest(".exploration-list"),r=n?.nextElementSibling||n?.parentElement?.nextElementSibling;if(null===r||!r){if(t===RT.Tab)return;return n?.closest(".exploration-panel")?.getElementsByClassName("exploration-section-header")[0]}return r.getElementsByClassName("exploration-section-header")[0]},D_=e=>{const{currentTarget:t}=e,n=E_(t);let r=t.closest("li")?.previousElementSibling?.getElementsByClassName(n)[0];if(!r){const e=t.closest(".exploration-list"),i=e?.querySelector(".exploration-section-header");if(i)return i;if(r=((e,t)=>{const n=e.closest(".exploration-list"),r=n?.previousElementSibling;if(null===r||!r)return e.closest(".exploration-panel")?.getElementsByClassName(t)[1];const i=r.getElementsByClassName(t);return i.length>0?i[i.length-1]:void 0})(t,n),!r){const e=t.closest(".exploration-panel")?.getElementsByClassName(n)[1];return e??null}}return r},R_=(e,t)=>{const{currentTarget:n}=e;if(n===t.items.draggableIconRef.current){const e=n.closest("li")?.getElementsByClassName("exploration-item")[0];return void(e&&f_(e))}if(n===t.items.explorationItemRef.current){const e=n.getElementsByClassName("exploration-draggable-icon")[0];return void f_(e)}n===t.items.explorationItemFocusRef.current&&t.toggleCheckedById(t.id)},P_=e=>{const t=e.key===RT.Down?(e=>{const{currentTarget:t,key:n}=e,r=E_(t),i=t.closest("li");let o=i?.nextElementSibling?.getElementsByClassName(r)[0];return o||(o=I_(t,n),o)?o:t.closest(".exploration-panel")?.getElementsByClassName(r)[0]})(e):D_(e);t&&f_(t)},M_=(e,t)=>{const{key:n}=e;switch(n){case RT.Tab:if(e.shiftKey)e.preventDefault(),((e,t)=>{const{currentTarget:n}=e,r=n.closest("ul")?.getElementsByClassName("exploration-item-focus");if(n===t.items.draggableIconRef.current){if(t.itemIndex>=0){const e=r&&r[t.itemIndex];return void(e&&f_(e))}const n=D_(e);n&&f_(n)}if(n===t.items.explorationItemFocusRef.current){const t=n.closest("li")?.previousElementSibling?.getElementsByClassName("exploration-draggable-icon")[0];if(t)return void f_(t);const r=D_(e);r&&f_(r)}})(e,t);else{const n=((e,t)=>{const{currentTarget:n,key:r}=e;if(e.shiftKey)return!0;if(n===t.items.explorationItemRef.current){const e=n.getElementsByClassName("exploration-draggable-icon")[0];return f_(e),!0}if(n===t.items.explorationItemFocusRef.current){const e=n.closest("li")?.getElementsByClassName("exploration-draggable-icon")[0];return e&&f_(e),!0}if(n===t.items.draggableIconRef.current){const e=n.closest("ul")?.getElementsByClassName("exploration-item-focus");if((e?.length||0)-1>t.itemIndex){const n=e&&e[t.itemIndex+1];return n&&f_(n),!0}const i=I_(n,r);if(!i)return!1;f_(i)}return!0})(e,t);n?p_(e):e.stopPropagation()}break;case RT.Down:case RT.Up:if(h_(e))break;p_(e),P_(e);break;case RT.Enter:if(e.currentTarget===t.items.explorationItemRef.current&&t.dragHandleRef){t.dragHandleRef(e.currentTarget);break}p_(e),R_(e,t);break;case RT.Space:p_(e),R_(e,t)}},L_=({children:e})=>fo.jsx("span",{style:{width:"fit-content",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flexGrow:1},children:e}),A_=({title:e,dragHandleRef:t,...r})=>{const[i,o]=Nw(CC),a=qw(Zw),s=n.useRef(null),l=n.useRef(null),u=n.useRef(null),c={id:r.id,itemIndex:r.itemIndex,toggleCheckedById:o,items:{explorationItemRef:s,explorationItemFocusRef:l,draggableIconRef:u},dragHandleRef:t};return n.useEffect(()=>{t&&s.current&&t(s.current)},[t]),fo.jsxs(sc,{ref:s,className:"exploration-item",onClick:e=>{e.stopPropagation(),o(r.id)},onKeyDown:e=>{M_(e,c)},tabIndex:0,style:{display:"flex",alignItems:"center",width:"100%",cursor:"pointer",padding:0,boxSizing:"border-box",fontSize:"14px"},title:e,sx:{"&:hover":{backgroundColor:"action.hover"},"&:focus-visible":{boxShadow:`0 0 0 2px ${QT} inset`}},children:[fo.jsxs(sc,{ref:l,className:"exploration-item-focus",component:"div",tabIndex:0,onKeyDownCapture:e=>{M_(e,c)},sx:{display:"flex",minWidth:0,alignItems:"center",justifyContent:"space-between",flexGrow:1,marginRight:"4px","&:focus-visible":{boxShadow:`0 0 0 2px ${QT} inset`}},children:[fo.jsx(Oc,{checked:i.has(r.id),"aria-label":a("ChartExploration.ListItem.Label",e),size:"small",tabIndex:-1,style:{padding:9,flexShrink:0,visibility:-1===r.id?"hidden":"visible"}}),fo.jsx(L_,{children:e})]}),fo.jsx(C_,{ref:u,className:"exploration-draggable-icon",tabIndex:0,height:"16px",onClick:e=>{e.stopPropagation()},onKeyDownCapture:e=>{M_(e,c)}})]})},k_=e=>{const t=qw(HT(e))??"";return fo.jsx(A_,{title:t,...e})},O_=()=>{const e=qw(BT),t=qw(GT),n=qw(iN),r=Tw(KT);return fo.jsx(CT,{numberOfSections:2,numberOfItemsInSection:t,keyExtractor:e,emptyTexts:n,onDragEnd:r,dragOverlayRenderer:aN,headerRenderer:x_,itemRenderer:k_})},q_=({itemIndex:e})=>{const t=qw(uN(e));return fo.jsx(oN,{children:t})},T_=()=>{const e=qw(Zw);return fo.jsx(b_,{children:e("Common.Values")})},N_=e=>{const{itemIndex:t}=e,n=qw(uN(t));return fo.jsx(A_,{title:n,...e})},j_=()=>{const e=qw(cN),t=qw(dN),n=qw(rN),r=Tw(hN);return fo.jsx(sc,{className:"exploration-header-section",style:{height:"100%",display:"flex",flexDirection:"column-reverse"},children:fo.jsx(CT,{numberOfSections:1,numberOfItemsInSection:t,keyExtractor:e,emptyTexts:n,onDragEnd:r,dragOverlayRenderer:q_,headerRenderer:T_,itemRenderer:N_})})},__=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M8.588 11.415a6 6 0 1 1 2.828-2.829l4.101 4a1.5 1.5 0 0 1 .014 2.134l-.707.707a1.5 1.5 0 0 1-2.108.014zM11 6A5 5 0 1 0 1 6a5 5 0 0 0 10 0m-1.52 4.888 3.934 3.837a.5.5 0 0 0 .703-.005l.707-.707a.5.5 0 0 0-.005-.711l-3.926-3.829a6 6 0 0 1-1.413 1.415"})})),F_=()=>{const[e,t]=Nw(Qw),r=qw(Zw),i=n.useRef(null),[o]=qw(dN),[a=0,s=0]=qw(GT),l=f(e=>{t(e.target.value)},[t]),u=0===e.length||0===a&&0===s&&0===o?r("Common.Search.NoResultsAvailable"):r("ChartExploration.Pivot.Search.ResultsFound",a.toString(),s.toString(),o.toString());return fo.jsxs(sc,{ref:i,onKeyDown:e=>{m_(e,i)},style:{position:"sticky",top:0,zIndex:10,width:"calc(100% - 24px)",backgroundColor:"var(--sprout-common-background-color-weak)",paddingTop:0,paddingRight:12,paddingLeft:12,paddingBottom:12},children:[fo.jsx(w_,{"data-testid":"screenOnly-search-results","aria-live":"polite","aria-atomic":"true",children:u}),fo.jsx(Vp,{size:"small",fullWidth:!0,"data-testid":"chart-exploration-search-input","aria-label":r("Common.Search.AccessibilityLabel"),type:"search",defaultValue:e,placeholder:r("Common.Search"),onChange:l,startAdornment:fo.jsx(xd,{position:"start",children:fo.jsx(__,{})}),inputProps:{style:{fontSize:"14px",paddingTop:6,paddingBottom:6}}})]})},z_=e=>{const t=_s(kf());return fo.jsx(Cl,{theme:t,children:fo.jsx(Pw,{children:fo.jsx(EC,{props:e,children:fo.jsxs(sc,{className:"exploration-panel",style:{display:"flex",flexDirection:"column"},children:[fo.jsx(F_,{}),fo.jsx(O_,{}),fo.jsx(j_,{})]})})})})},W_=e=>{if(e.flags.isEnabled("CLIENT_IM_5973_PIVOT_TABLE_EXPLORATION"))return{component:z_,classification:{tags:["exploration"],exclusive:!0}}};var $_=function(e){return e.CONTAINS="contains",e.MATCHES_EXACTLY="matches_exactly",e.STARTS_WITH="starts_with",e.ENDS_WITH="ends_with",e.BEGINNING_OF_WORD="beginning_of_word",e}($_||{}),H_=function(e){return e.COMPARE="compare",e.GENERAL="general",e}(H_||{}),V_=function(e){return e.VALUES="values",e.CONDITION="condition",e.SEARCH="search",e.CLEAR_SELECTION="clear_selection",e.TOP_BOTTOM="top_bottom",e}(V_||{}),B_=function(e){return e.FIXED_VALUE="fixed_value",e.CALCULATED_VALUE="calculated_value",e}(B_||{});const G_=e=>e&&"]"!==e?/^[A-Za-z][A-Za-z0-9_]*$/.test(e)||(e=>{if(!e)return!1;if("["===e[0]&&"]"===e[e.length-1]){let t=e.substring(1,e.length-1);if(/^[A-Za-z][A-Za-z0-9_]*$/.test(t))return!0;if(t=t.replace(/\]\]/g,"]"),e===`[${t.replace(/\]/g,"]]")}]`)return!0}return!1})(e)?e:`[${e.replace(/\]/g,"]]")}]`:e,U_=e=>{if(!Array.isArray(e))return"";let t="{<";const n=[];if(e.forEach(e=>{let t=`[${e.field}]${e.exclude?"-":""}={`,r="}",i="";switch(e.type){case V_.SEARCH:i=(e=>{let t="",n="";const r=e.options?.mode;if(!r)return"";switch(r){case $_.BEGINNING_OF_WORD:t="*^",n="*";break;case $_.ENDS_WITH:t="*";break;case $_.STARTS_WITH:n="*";break;case $_.MATCHES_EXACTLY:break;case $_.CONTAINS:default:t="*",n="*"}const i=e.options.values?.[0]??"";return""!==i?`"${t}${i}${n}"`:""})(e);break;case V_.CONDITION:i=(e=>{const{options:t}=e,n=t?.mode===H_.GENERAL,r=t?.modifier?.type===B_.FIXED_VALUE,i=t?.modifier?.operator?t.modifier.operator.split(" "):[];if(0===i.length||!r&&(!t.firstValue?.aggregator||!t.firstValue?.field)||r&&!t.firstValue?.fixedValue||n&&(!t.conditionField?.aggregator||!t.conditionField?.field))return"";let o,a,s="=";n&&r?(o=`${t.conditionField?.aggregator}(${G_(t.conditionField?.field)})`,a=`${t.firstValue?.fixedValue}`):!n&&r?(o="",a=`${t.firstValue?.fixedValue}`,s=""):n||r?(o=`${t.conditionField?.aggregator}(${G_(t.conditionField?.field)})`,a=`${t.firstValue?.aggregator}(${G_(t.firstValue?.field)})`):(o=`${G_(e.field)}`,a=`${t.firstValue?.aggregator}(total ${G_(t.firstValue?.field)})`);const l=`${s}${o}${i[0]}${a}`;let u="";if(i.length>1){if(!r&&(!t.secondValue?.aggregator||!t.secondValue?.field)||r&&!t.secondValue?.fixedValue)return"";let e,a;n&&r?(e=`${t.secondValue?.fixedValue}`,a=` and ${o}`):!n&&r?(e=`${t.secondValue?.fixedValue}`,a=""):n||r?(e=`${t.secondValue?.aggregator}(${G_(t.secondValue?.field)})`,a=` and ${o}`):(e=`${t.secondValue?.aggregator}(total ${G_(t.secondValue?.field)})`,a=` and ${o}`),u=`${a}${i[1]}${e}`}return`"${l}${u}"`})(e);break;case V_.CLEAR_SELECTION:i=`[${e.field}]=`,t="",r="";break;case V_.VALUES:default:i=e.options?.values?e.options.values.map(e=>`'${e.replace(/'/g,"''")}'`).join(","):""}""!==i&&n.push(`${t}${i}${r}`)}),0===n.length)return;return t+=`${n.join(",")}>}`,t},Y_=[];for(let e=0;e<256;++e)Y_.push((e+256).toString(16).slice(1));const K_=new Uint8Array(16);function X_(e,t,n){return crypto.randomUUID?crypto.randomUUID():function(e){e=e||{};const t=e.random??e.rng?.()??crypto.getRandomValues(K_);if(t.length<16)throw new Error("Random bytes length must be >= 16");return t[6]=15&t[6]|64,t[8]=63&t[8]|128,function(e,t=0){return(Y_[e[t+0]]+Y_[e[t+1]]+Y_[e[t+2]]+Y_[e[t+3]]+"-"+Y_[e[t+4]]+Y_[e[t+5]]+"-"+Y_[e[t+6]]+Y_[e[t+7]]+"-"+Y_[e[t+8]]+Y_[e[t+9]]+"-"+Y_[e[t+10]]+Y_[e[t+11]]+Y_[e[t+12]]+Y_[e[t+13]]+Y_[e[t+14]]+Y_[e[t+15]]).toLowerCase()}(t)}(e)}const J_=()=>crypto?.randomUUID?.()??X_(),Z_=1e3,Q_=1e3,eF=e=>{if(0===e.qInterColumnSortOrder.length)return;const t=e.qDimensions,n=((e,t)=>{const n=new Set;for(const t of e){if(n.has(t))return!0;n.add(t)}const r=e.includes(-1),i=e.filter(e=>-1!==e);if(t){const n=r?t.length+1:t.length;if(e.length!==n)return!0}const o=[...i].sort((e,t)=>e-t);for(let e=0;e<o.length;e++)if(o[e]!==e)return!0;return!1})(e.qInterColumnSortOrder,t);n&&(e.qInterColumnSortOrder=((e,t)=>{const n=[];if(t)for(let e=0;e<t.length;e++)n.push(e);return e.qMeasures.length>=2&&n.push(-1),n})(e,t))},tF=(e,t,n)=>{[e[t],e[n]]=[e[n],e[t]]},nF=e=>{if(!e)return;eF(e);const t=e.qDimensions,{qInterColumnSortOrder:n}=e;((e,t=[])=>{const n=t.filter(e=>-1!==e);for(let r=0;r<n.length;r++)if(-1!==n[r]&&n[r]!==r){const i=n[r],o=n.indexOf(r),a=n[o];tF(n,r,o),tF(e,r,o),tF(t,t.indexOf(i),t.indexOf(a))}})(t,n)},rF=R;class iF extends rF{#u;#c;constructor(e,t){super(e),this.path=e.path,this.#u=t.translator,this.#c=t.flags.isEnabled}async addDimension(e,t,n,r){if(!e||this.#d(e))return;const i=t??!1;if(e.qDef.cId||(e.qDef.cId=J_()),r)return this.addAlternativeDimension(e,i,n);if(this.getDimensions().length<this.maxDimensions()){const t=await(async(e,t,n,r)=>{const i=e.getDimensions(),o=e.hcProperties.qNoOfLeftDims;return await e.autoSortDimension(t),nF(e.hcProperties),(-1===o||Number.isNaN(+o))&&(e.hcProperties.qNoOfLeftDims=i.length),n?((e,t,n,r)=>{if(!e)return;const{qInterColumnSortOrder:i,qNoOfLeftDims:o}=e,a=t.length,s=i.indexOf(-1),l=-1!==s,u=void 0!==r?r+(o||0):void 0;if(l&&void 0!==u&&s>=u?((e,t,n)=>{t.splice(n,1),t.push(e),t.splice(n+1,0,-1)})(a,i,s):i.push(a),void 0===r)t.push(n);else if(void 0!==u){const e=l&&u>s?u-1:u;t.splice(e,0,n)}})(e.hcProperties,i,t,r):((e,t,n,r)=>{if(!e||"number"!=typeof e.qNoOfLeftDims)return;const i=e.qNoOfLeftDims,{qInterColumnSortOrder:o}=e,a=t.length,s=o.indexOf(-1),l=-1!==s&&i>0&&s<i;if(o.push(a),l)void 0===r?t.splice(i-1,0,n):s<r?t.splice(r-1,0,n):(t.splice(r,0,n),o.splice(s,1),o.splice(s+1,0,-1));else{const e=r??i;t.splice(e,0,n),-1!==s&&(o.splice(s,1),o.splice(s+1,0,-1))}e.qNoOfLeftDims++})(e.hcProperties,i,t,r),t})(this,e,i,n);return this.#p({section:i?"columns":"rows",cId:e.qDef.cId,addLast:void 0===n}),t}}async addDimensions(e,t,n){const r=[];for await(const i of e){const e=await this.addDimension(i,n,void 0,t);e&&r.push(e)}return r}addAlternativeDimension(e,t,n){if(!e||this.#d(e))return;const r=this.getAlternativeDimensions();void 0===this.hcProperties.excludedNoOfLeftDims&&(this.hcProperties.excludedNoOfLeftDims=r.length);let i=n;return i=void 0===i?t?r.length:this.hcProperties.excludedNoOfLeftDims:t?this.hcProperties.excludedNoOfLeftDims+i:Math.min(i,this.hcProperties.excludedNoOfLeftDims),r.splice(i,0,e),t||this.hcProperties.excludedNoOfLeftDims++,this.#p({section:t?"columns":"rows",cId:e.qDef.cId,alternative:!0,addLast:void 0===n}),e}async addFieldDimension(e,t,n,r={}){const i=this.createFieldDimension(e,t,n);return this.addDimension(i,r.asColumn,void 0,!1)}async addFieldDimensions(e,t={}){const n=e.map(e=>this.createFieldDimension(e.field,e.label,e.defaults));return this.addDimensions(n,void 0,t.asColumn)}async addLibraryDimensions(e,t={}){const n=e.map(e=>this.createLibraryDimension(e.id,e.defaults));return this.addDimensions(n,void 0,t.asColumn)}reinsertDimension(e,t,n){e.qDef.cId||(e.qDef.cId=J_());if(this.getDimensions().length<this.maxDimensions())return this.addDimension(e,t,n);return this.reinsertAlternativeDimension(e,n,t)}reinsertAlternativeDimension(e,t,n){const r=this.getDimensions(),i=this.getAlternativeDimensions();if(r.length>=Z_)return Promise.resolve();const o="number"==typeof t?t:i.length;return i.splice(o,0,e),this.#p({section:n?"columns":"rows",cId:e.qDef.cId,alternative:!0}),Promise.resolve(e)}async removeDimensions(e,t,n){return Promise.all([...e].reverse().map(e=>this.removeDimension(e,t,n)))}async removeDimension(e,t,n){if(t){const t=this.getAlternativeDimensions().splice(e,1)[0];return!n&&this.hcProperties.excludedNoOfLeftDims&&this.hcProperties.excludedNoOfLeftDims--,this.#f({cId:t.qDef.cId,section:n?"columns":"rows"}),t}const r=this.getDimensions(),i=this.properties.qHyperCubeDef.qNoOfLeftDims,o=this.hcProperties.qInterColumnSortOrder.indexOf(e);"number"==typeof this.properties.qHyperCubeDef.qNoOfLeftDims&&"number"==typeof o&&"number"==typeof i&&o+1<=i&&this.properties.qHyperCubeDef.qNoOfLeftDims--;const a=this.properties.qHyperCubeDef.columnWidths?this.properties.qHyperCubeDef.columnWidths[1]:void 0;Array.isArray(a)&&a.length>e&&a.splice(e,1);const s=r.splice(e,1).at(0);if(s)return((e,t)=>{if(!e)return-1;const n=e.indexOf(t);if(-1===n)return-1;for(let n=0;n<e.length;++n)e[n]>t&&e[n]--;e.splice(n,1)})(this.hcProperties.qInterColumnSortOrder,e),nF(this.hcProperties),this.#f({cId:s.qDef.cId,section:n?"columns":"rows"}),s}#d(e){return!(!e||void 0===e.qDef.cId)&&[...this.getDimensions(),...this.getAlternativeDimensions()].some(t=>t.qDef.cId===e.qDef.cId)}async addMeasures(e,t=!1){const n=[];for await(const r of e){const e=await this.addMeasure(r,t,void 0,!0);e&&n.push(e)}return n}addAlternativeMeasures(e,t){if(this.#h(e))return;const n=this.getAlternativeMeasures(),r=void 0===t?n.length:t,i=n.splice(r,0,e);return this.#m({cId:e.qDef.cId,alternative:!0,addLast:void 0===t}),i}async addMeasure(e,t,n,r){if(this.#h(e))return;if(e.qDef.cId||(e.qDef.cId=J_()),t)return this.addAlternativeMeasures(e,n);r||delete e.qDef.qNumFormat;const i=this.getMeasures();if(i.length<this.maxMeasures()){const t=1===i.length;return void 0!==n&&n>=0?i.splice(n,0,e):i.push(e),this.autoSortMeasure(e).then(()=>(t&&(this.hcProperties.qInterColumnSortOrder.push(-1),0===this.getDimensions().length&&(this.hcProperties.qNoOfLeftDims=0)),this.#m({cId:e.qDef.cId,addLast:void 0===n}),e))}return i.length<Q_?(this.getAlternativeMeasures().push(e),this.#m({cId:e.qDef.cId,alternative:!0,addLast:void 0===n}),Promise.resolve(e)):Promise.resolve()}reinsertMeasure(e,t){const n=this.getMeasures(),r=this.getAlternativeMeasures(),i=this.hcProperties.qInterColumnSortOrder;if(e.qDef.cId||(e.qDef.cId=J_()),t=void 0!==t?t:n.length,n.length<this.maxMeasures()){if(n.splice(t,0,e),2===n.length){-1===i.indexOf(-1)&&i.push(-1)}this.#m({cId:e.qDef.cId})}else n.length<Q_&&(t=r.length,r.splice(t,0,e),this.#m({cId:e.qDef.cId}));return Promise.resolve(e)}async removeMeasure(e,t){if(t&&"number"==typeof e){const t=this.getAlternativeMeasures().splice(e,1)[0];return this.#f({cId:t.qDef.cId,section:"measures"}),t}const n=this.getMeasures();let r,i,o;if("number"==typeof e&&e<n.length){r=2===n.length,i=this.getMeasures().splice(e,1)[0];const t=this.hcProperties.qInterColumnSortOrder;r&&(o=t.indexOf(-1),t.splice(o,1),this.hcProperties.qNoOfLeftDims&&o+1<=this.hcProperties.qNoOfLeftDims&&this.hcProperties.qNoOfLeftDims--)}else"number"==typeof e&&(i=this.getAlternativeMeasures().splice(e-n.length,1)[0]);if(i)return this.#f({cId:i.qDef.cId,section:"measures"}),i}async removeMeasures(e,t){return await Promise.all([...e].reverse().map(e=>this.removeMeasure(e,t))),e}#h(e){return!(!e||void 0===e.qDef.cId)&&[...this.getMeasures(),...this.getAlternativeMeasures()].some(t=>t.qDef.cId===e.qDef.cId)}getSorting(){throw new Error("don't call this")}changeSorting(){throw new Error("don't call this")}setSorting(){throw new Error("don't call this")}getRowDimensions(){const e=this.#g("rows"),t=this.getDimensions();return e.filter(e=>e>=0).map(e=>t[e])}getColumnDimensions(){const e=this.#g("columns"),t=this.getDimensions();return e.filter(e=>e>=0).map(e=>t[e])}getAlternativeRowDimensions(){const e=this.getAlternativeDimensions(),{excludedNoOfLeftDims:t}=this.hcProperties;return-1===t?e:e.slice(0,t)}getAlternativeColumnDimensions(){const e=this.getAlternativeDimensions(),{excludedNoOfLeftDims:t}=this.hcProperties;return-1===t?[]:e.slice(t)}#v(e){const t=this.hcProperties.rankedList?.[e];return t||this.createRankedList(e)}#y(e){return[...this.#v(e)]}#b(e,t){return void 0===this.hcProperties.rankedList&&(this.hcProperties.rankedList={}),this.hcProperties.rankedList[e]=t,t}#x(e){const t=({qDef:t})=>t.cId===e;if(-1===e){return this.hcProperties.qInterColumnSortOrder.indexOf(-1)+1<=this.hcProperties.qNoOfLeftDims?"rows":"columns"}return this.getRowDimensions().some(t)||this.getAlternativeRowDimensions().some(t)?"rows":this.getColumnDimensions().some(t)||this.getAlternativeColumnDimensions().some(t)?"columns":null}#S(e){const t=({qDef:t})=>t.cId===e;return!(!this.getAlternativeDimensions().some(t)&&!this.getAlternativeMeasures().some(t))}#g(e){const{qInterColumnSortOrder:t,qNoOfLeftDims:n}=this.hcProperties;if(this.#w())return"columns"===e?t:[];switch(e){case"rows":return-1===n?t:t.slice(0,n);case"columns":return-1===n?[]:t.slice(n);default:throw new Error(`Unknown section in #getInterColumnSortOrderBySection: ${e}`)}}#w(){const{qNoOfLeftDims:e}=this.hcProperties,t=-1===e||Number.isNaN(+e);return 0===this.getDimensions().length&&this.getMeasures().length>0&&t}#C(e){const t=this.hcProperties.qInterColumnSortOrder.indexOf(-1);if(-1===t)return!1;if(this.#w())return"columns"===e;if(void 0===this.hcProperties.qNoOfLeftDims)return"rows"===e;switch(e){case"rows":return t+1<=this.hcProperties.qNoOfLeftDims;case"columns":return t+1>this.hcProperties.qNoOfLeftDims;default:return!1}}#E(e,t=!0){const n=e=>-1===e?-1:e.qDef.cId;if("measures"===e)return this.getMeasures().concat(t?this.getAlternativeMeasures():[]).map(n);const r=this.#g(e),i=this.getDimensions(),o=r.map(e=>-1===e?-1:i[e]);switch(e){case"rows":return o.concat(t?this.getAlternativeRowDimensions():[]).map(n);case"columns":return o.concat(t?this.getAlternativeColumnDimensions():[]).map(n);default:throw new Error(`Unknown section in #isCorruptRankedList: ${e}`)}}isRankedListCorrupt(e){const t=this.hcProperties.rankedList?.[e],n=this.properties.qInfo?.qId;if(!t)return!0;if(new Set(t).size!==t.length){const r=t.filter((e,n)=>t.indexOf(e)!==n);return console.warn("Corrupt ranked list detected: duplicate ids",{duplicates:r,section:e,chartId:n}),!0}const r=this.#E(e);if(t.length!==r.length)return console.warn("Corrupt ranked list detected: length mismatch",{section:e,chartId:n,fieldIds:r,rankedList:t,diff:new Set(r).symmetricDifference(new Set(t))}),!0;const i=r.filter(e=>!t.includes(e));if(i.length>0)return console.warn("Corrupt ranked list detected: missing ids",{missingIds:i,section:e,chartId:n}),!0;const o=this.#E(e,!1),a=t.filter(e=>o.includes(e)),s=o.filter((e,t)=>e!==a[t]);return s.length>0&&(console.warn("Corrupt ranked list detected: main field order mismatch",{section:e,chartId:n,orderMismatchIds:s}),!0)}createRankedList(e){switch(e){case"rows":case"columns":return this.#I({section:e});case"measures":return this.#D();default:throw new Error(`Unknown section in getRankedList: ${e}`)}}#I({section:e}){const t=this.getDimensions(),n=this.#g(e),r="columns"===e?this.getAlternativeColumnDimensions():this.getAlternativeRowDimensions(),i=n.map(e=>-1===e?-1:t[e].qDef.cId);return i.push(...r.map(e=>e.qDef.cId)),this.#b(e,i)}#D(){if(void 0!==this.hcProperties.rankedList?.measures&&!this.#c("SUPPORT-9810-MISSING-MEASURES"))return this.hcProperties.rankedList.measures;const e=[...this.getMeasures(),...this.getAlternativeMeasures()].map(e=>e.qDef.cId);return this.#b("measures",e)}#R({section:e,cId:t,fields:n,addLast:r}){const i=this.#v(e),o=n.findIndex(e=>e.qDef.cId===t),a=n[o+1]?.qDef.cId,s=n[o-1]?.qDef.cId;if(r)i.push(t);else if(o>=0)if(a){const e=i.indexOf(a);i.splice(e,0,t)}else if(s){const e=i.indexOf(s);i.splice(e+1,0,t)}else i.push(t);return void 0===this.hcProperties.rankedList&&(this.hcProperties.rankedList={}),this.hcProperties.rankedList[e]}#p({section:e,cId:t,alternative:n=!1,addLast:r=!1}){if(void 0===this.hcProperties.rankedList?.[e])return this.#I({section:e});let i=[];return i="columns"===e?n?this.getAlternativeColumnDimensions():this.getColumnDimensions():n?this.getAlternativeRowDimensions():this.getRowDimensions(),this.#R({section:e,cId:t,fields:i,addLast:r})}#m({cId:e,alternative:t=!1,addLast:n=!1}){if(void 0===this.hcProperties.rankedList?.measures)return this.#D();const r=t?this.getAlternativeMeasures():this.getMeasures();return this.#P(),this.#R({section:"measures",cId:e,fields:r,addLast:n})}#P(){const e=this.#v("rows"),t=this.#v("columns");this.#C("rows")&&!e.includes(-1)?e.push(-1):this.#C("columns")&&!t.includes(-1)&&t.push(-1)}#M(){if(this.hcProperties.qInterColumnSortOrder.includes(-1))return;const e=this.#v("rows"),t=this.#v("columns"),n=e.indexOf(-1),r=t.indexOf(-1);-1!==n&&e.splice(n,1),-1!==r&&t.splice(r,1)}#f({cId:e,section:t}){const n=this.#v(t),r=n.indexOf(e);-1!==r&&(n.splice(r,1),this.#M())}async moveMeasureToAlternative(e){const t=this.getMeasures().findIndex(t=>t.qDef.cId===e),n=this.#y("measures"),r=n.indexOf(e);if(-1===t)return;const i=await this.removeMeasure(t);if(void 0===i)return;const o=n.slice(r+1).find(e=>this.getAlternativeMeasures().some(t=>t.qDef.cId===e)),a=this.getAlternativeMeasures().findIndex(e=>e.qDef.cId===o);await this.addAlternativeMeasures(i,-1===a?void 0:a),this.#b("measures",n)}async moveMeasureFromAlternative(e){const t=this.getAlternativeMeasures().findIndex(t=>t.qDef.cId===e),n=this.#y("measures"),r=n.indexOf(e);if(-1===t)return;const i=await this.removeMeasure(t,!0);if(void 0===i)return;const o=this.getMeasures().map(e=>e.qDef.cId),a=n.slice(r+1).find(e=>o.includes(e)),s=o.findIndex(e=>e===a);await this.addMeasure(i,!1,-1===s?void 0:s),this.#b("measures",n)}async moveDimensionToAlternative(e){const t=this.#x(e),n=this.getDimensions().findIndex(t=>t.qDef.cId===e);if(-1===n||null===t)return;const r=this.#y(t),i=r.indexOf(e),o="columns"===t,a=await this.removeDimension(n,!1,o);if(void 0===a)return;const s=r.slice(i+1).find(e=>this.getAlternativeDimensions().some(({qDef:t})=>t.cId===e));let l=this.getAlternativeDimensions().findIndex(({qDef:e})=>e.cId===s);l=-1===l?void 0:l;void 0!==this.addAlternativeDimension(a,o,l)&&this.#b(t,r)}async moveDimensionFromAlternative(e){const t=this.#x(e),n=this.getAlternativeDimensions().findIndex(t=>t.qDef.cId===e);if(-1===n||null===t)return;const r=this.#y(t),i=r.indexOf(e),o="columns"===t,a=await this.removeDimension(n,!0,o);if(void 0===a)return;const s=this.#E(t,!1),l=r.slice(i+1).find(e=>s.includes(e));let u=s.findIndex(e=>e===l);u=-1===u?void 0:u;void 0!==await this.addDimension(a,o,u)&&this.#b(t,r)}movePseudoDimension({toIndex:e,toSection:t}){const n=this.#x(-1);if(null===n)return void console.error("Cannot move pseudo dimension, unable to find it in any section",{toIndex:e,toSection:t});const r="columns"===t,i=n===t,o=this.#y(t);if(i){const e=o.indexOf(-1);o.splice(e,1)}else{const i=this.#v(n),o=i.indexOf(-1);if(-1===o)return void console.error("Couldn't delete pseudo dimension from current section",{toIndex:e,toSection:t,fromSection:n});i.splice(o,1),this.hcProperties.qNoOfLeftDims=r?Math.max(0,this.hcProperties.qNoOfLeftDims-1):this.hcProperties.qNoOfLeftDims+1}const a=e-o.slice(0,e).filter(e=>this.#S(e)).length,s=r?this.hcProperties.qNoOfLeftDims+a:a,l=this.hcProperties.qInterColumnSortOrder.indexOf(-1);this.hcProperties.qInterColumnSortOrder.splice(l,1),this.hcProperties.qInterColumnSortOrder.splice(s,0,-1),o.splice(e,0,-1),this.#b(t,o)}async moveDimension({cId:e,toIndex:t,toSection:n}){const r=this.#x(e),i=this.#S(e);if(null===r)return void console.error("Cannot move dimension, unable to find it in any section",{cId:e});const o=(i?this.getAlternativeDimensions():this.getDimensions()).findIndex(({qDef:t})=>t.cId===e);if(-1===o)return void console.error("Couldn't find dimension to move",{cId:e,toIndex:t,toSection:n});const a=this.#y(n),s=a.indexOf(e);-1!==s&&a.splice(s,1);const l=Math.max(0,Math.min(t,a.length));l!==t&&console.warn("[moveDimension] toIndex is out of bounds, clamping it",{toIndex:t,clampedToIndex:l});const u=l-a.slice(0,l).filter(e=>this.#S(e)!==i).length,c="columns"===n,d="columns"===r,p=await this.removeDimension(o,i,d);if(void 0===p)return;void 0!==await this.addDimension(p,c,u,i)&&(a.splice(l,0,e),this.#b(n,a))}async moveMeasure({cId:e,toIndex:t}){const n=this.#S(e),r=(n?this.getAlternativeMeasures():this.getMeasures()).findIndex(t=>t.qDef.cId===e);if(-1===r)return void console.error("Cannot move measure, unable to find it in any section",{cId:e});const i=this.#y("measures"),o=i.indexOf(e);-1!==o&&i.splice(o,1);const a=Math.max(0,Math.min(t,i.length));a!==t&&console.warn("[moveMeasure] toIndex is out of bounds, clamping it",{toIndex:t,clampedToIndex:a});const s=await this.removeMeasure(r,n);if(void 0===s)return;const l=a-i.slice(0,a).filter(e=>this.#S(e)!==n).length;void 0!==await this.addMeasure(s,n,l)&&(i.splice(a,0,e),this.#b("measures",i))}getLabels(){return this.getMeasures().filter(e=>!e.qLibraryId&&!!e.qDef.qLabel).map(e=>e.qDef.qLabel)}IsHCInStraightMode(){return"S"===this.hcProperties.qMode}getFilters(){return this.properties.filters??[]}getFilter(e){return this.getFilters().find(t=>t.id===e)}addFilterField(e){const t=e.qTags??e.tags,n=Array.isArray(t)&&t.includes("$numeric"),r=e.isDerived,i=Array.isArray(this.properties.filters)?this.properties.filters:[],o={type:"values",field:r?e.value??e.fullname:e.name??e.label??e.field,options:{values:[]},exclude:!1,id:J_(),qTags:Array.isArray(t)?t:[],isNumeric:n};return i.push(o),this.properties.filters=i,this.properties.qHyperCubeDef.qContextSetExpression=U_(i),o}addFilters(e){const t=[];for(const n of e)t.push(this.addFilterField(n));return t}#L(e){const t=this.getFilters();return t.splice(e,1),this.properties.qHyperCubeDef.qContextSetExpression=U_(t),t}removeFilters(e){if(0===e.length)return[];let t=[];const n=[...e].sort((e,t)=>t-e);t=this.getFilters().filter((t,n)=>e.includes(n));for(const e of n)this.#L(e);return t}getAddDimensionLabel(){return this.#u.get("Visualization.Requirements.AddDimension")}canColorBy(){return!1}}var oF={exports:{}};!function(e){self,e.exports=(()=>{var e={909:e=>{var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},a=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,i=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(r in e);return void 0===r||t.call(e,r)},s=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(i)return i(e,n).value}return e[n]};e.exports=function e(){var t,n,r,i,u,c,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=l(d,n),d!==(i=l(t,n))&&(h&&i&&(a(i)||(u=o(i)))?(u?(u=!1,c=r&&o(r)?r:[]):c=r&&a(r)?r:{},s(d,{name:n,newValue:e(h,c,i)})):void 0!==i&&s(d,{name:n,newValue:i}));return d}},8:(e,t)=>{(()=>{var e={229:e=>{var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},a=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,i=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(r in e);return void 0===r||t.call(e,r)},s=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(i)return i(e,n).value}return e[n]};e.exports=function e(){var t,n,r,i,u,c,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=l(d,n),d!==(i=l(t,n))&&(h&&i&&(a(i)||(u=o(i)))?(u?(u=!1,c=r&&o(r)?r:[]):c=r&&a(r)?r:{},s(d,{name:n,newValue:e(h,c,i)})):void 0!==i&&s(d,{name:n,newValue:i}));return d}}},n={};function r(t){var i=n[t];if(void 0!==i)return i.exports;var o=n[t]={exports:{}};return e[t](o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};(()=>{r.r(i),r.d(i,{default:()=>Ae});var e=r(229),t=r.n(e);const n=function(e,t,n){if(!t)return!1;var r,i=t.split("."),o=i[i.length-1],a=e;for(r=0;r<i.length-1;++r)void 0===a[i[r]]&&(a[i[r]]=Number.isNaN(+i[r+1])?{}:[]),a=a[i[r]];if(void 0!==n){var s=a[o];return a[o]=n,{updated:n,previous:s}}return delete a[o],!1},o=function(e,t,n){var r,i=t.split("."),o=e;if(void 0===o)return n;for(r=0;r<i.length;++r){if(void 0===o[i[r]])return n;o=o[i[r]]}return o},a={EXPRESSIONS:{observed:"",trend:"STL_Trend",seasonal:"STL_Seasonal",residual:"STL_Residual"},OPTIONS:[{value:"observed",translation:"cao.trendDecomposition.parameters.decomposition.observed"},{value:"trend",translation:"cao.trendDecomposition.parameters.decomposition.trend"},{value:"seasonal",translation:"cao.trendDecomposition.parameters.decomposition.seasonal"},{value:"residual",translation:"cao.trendDecomposition.parameters.decomposition.residual"}]};var s="".concat(" ","(").concat(" "),l="".concat(" ",")").concat(" ");function u(e){return s+e+l}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var n=function(e,t){if(!t)return null;var n,r;for(n=0;n<t.length;n++)if((r=t[n]).qInfo.qId===e)return r;return null}(e.qLibraryId,t.dimensionList);return n&&n.qData.info[0].qTags.indexOf("$numeric")>-1}var r=function(e,t){if(!t)return null;var n,r,i=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var n=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(n)&&(t=(t=t.substring(1,n)).trim()),t}(e);for(n=0;n<t.length;n++){if((r=t[n]).qName===i)return r;if(r.qDerivedFieldData)for(var o=0;o<r.qDerivedFieldData.qDerivedFieldLists.length;++o)for(var a=r.qDerivedFieldData.qDerivedFieldLists[o],s=0;s<a.qFieldDefs.length;++s){var l=a.qFieldDefs[s];if(l.qName===i)return l}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return r&&r.qTags.indexOf("$numeric")>-1}function d(e){return!(!e.fullAccumulation&&!e.fullRange)}function p(e,t){var n=e.crossAllDimensions;return 2===t&&n?"RowNo(Total)":"RowNo()"}function f(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e),n=t.trim();return"="===n.substring(0,1)?n.substring(1).trim():n}function h(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function m(e,t){var n=e.crossAllDimensions;return 2===t&&n?"Above(Total ":"Above("}function g(e){return void 0===e?")":", 0, ".concat(e,")")}function v(e){return"Replace(Replace(".concat(e,",'''',''''''),'$','$''&''')")}function y(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=").concat(v("MinString(".concat(t,")")),")' and Only({1}").concat(t,")<='$(=").concat(v("MaxString(".concat(t,")")),")'\"}")}function b(e){var t=e.modifier,n=void 0===t?{}:t,r=e.dimensions,i=e.dimensionAndFieldList,o=e.funcComp,a=void 0===o?"Sum":o,s=e.valueComp,l=void 0===s?"0":s;if(!n.showExcludedValues)return"";if(r&&1===r.length){var u=y(c(r[0],i),h(0));return"".concat(a,"({1<").concat(u,">}").concat(l,")")}if(r&&2===r.length){var d=c(r[0],i),p=c(r[1],i),f=h(0),m=h(1),g=y(d,f),v=y(p,m);return"".concat(a,"({1<").concat(g,",").concat(v,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function x(e){return"".concat(e,"(")}function S(e){var t=e.properties,n=e.layout;return o(t,"qHyperCubeDef.qDimensions",o(n,"qHyperCube.qDimensionInfo",[])).length}const w={isFullRange:d,getNumDimensions:S,getExpressionWithExcludedComp:function(e){var t=e.expression,n=e.modifier,r=e.dimensions,i=e.dimensionAndFieldList,o=e.treatMissingAsNull,a=u(f(t));if(!n.showExcludedValues)return a;var s=b({modifier:n,dimensions:r,dimensionAndFieldList:i}),l=o?"":", 0";if(r&&1===r.length){var c=h(0);return"If(Count(".concat(c,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(r&&2===r.length){var d=h(0),p=h(1);return"If(Count(".concat(d,") * Count(").concat(p,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:p,getNumStepComp:function(e,t){if(!d(e)){var n=e.steps;return"number"!=typeof n||Number.isNaN(n)?6:n}return p(e,t)},getAboveCompPrefix:m,getAboveCompSuffix:g,getAboveComp:function(e,t,n,r){return m(e,t)+n+g(r)},getFunctionPrefix:x,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return x(e)+t+")"},getAggrComp:function(e,t,n){return"Aggr(".concat(e,", ").concat(t,", ").concat(n,")")},getExcludedComp:b,needDimension:function(e){var t=e.modifier,n=e.properties,r=e.layout,i=function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t);return 0===i&&2===S({properties:n,layout:r})},getDimComp:function(e,t){var n=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),r=h(t);if(!n.qSortByExpression&&!n.qSortByNumeric&&!n.qSortByAscii)return r;var i=["Descending","Ascending"],o=n.qSortByNumeric?"(Numeric, ".concat(i[(n.qSortByNumeric+1)/2],")"):"",a=n.qSortByAscii?"(Text, ".concat(i[(n.qSortByAscii+1)/2],")"):"";return n.qSortByNumeric&&n.qSortByAscii?"(".concat(r,", ").concat(o,", ").concat(a,")"):n.qSortByNumeric?"(".concat(r,", ").concat(o,")"):n.qSortByAscii?"(".concat(r,", ").concat(a,")"):r},simplifyExpression:f,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var n=t.indexOf(s);if(-1!==n){var r=t.indexOf(l);if(-1!==r)return t.substring(n+s.length,r)}}},initModifier:function(e,t){Object.keys(t).forEach(function(n){void 0===e[n]&&(e[n]=t[n])})},isNumeric:c,isApplicable:function(e){var t=e.properties,n=e.layout,r=e.minDimensions,i=void 0===r?1:r,o=e.maxDimensions,a=void 0===o?2:o;if(!t&&!n)return!0;var s=S({properties:t,layout:n});return s>=i&&s<=a},getExpressionWithMarkers:u,canExtract:function(e){var t=e.indexOf(s),n=e.indexOf(l);return t>-1&&n>-1&&t<n},getDimDefWithWrapper:h,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")},generateTSDExpression:function(e,t,n){var r=t||e.outputExpression;if(e.base&&e.base.qDef&&(r=t!==e.base.qDef?t:e.base.qDef),"observed"!==e.decomposition){var i=n.qHyperCubeDef.qMeasures.find(function(t){return t.qDef.base&&t.qDef.base.qLibraryId&&e.base&&e.base.qLibraryId?t.qDef.base.qLibraryId===e.base.qLibraryId:null});i&&t!==i.qDef.qLabel&&(r=i.qLibraryId||i.qDef.base.qLibraryId?"[".concat(i.qDef.qLabel,"]"):i.qDef.base.qDef);var o=function(e){var t=a.OPTIONS.find(function(t){return t.value===e.decomposition});return t?a.EXPRESSIONS[t.value]:""}(e);r=r.startsWith("=")?r.substr(1):r,r="".concat(o,"(").concat(r,", ").concat(e.steps,")")}return r},getDecomposition:function(e){var t="observed";return Object.values(a.EXPRESSIONS).find(function(n){var r=e.qDef.base.qDef.toLowerCase()||e.qDef.qDef.toLowerCase();return a.EXPRESSIONS[n]&&r.includes(a.EXPRESSIONS[n].toLowerCase())&&(t=n),n}),t}};function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}var I=t().bind(null,!0),D={},R=Array.isArray;function P(e){return null!=e&&!Array.isArray(e)&&"object"===E(e)}function M(e){return void 0===e}function L(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function A(e,t){var n,r=t.substring(1).split("/").slice(0,-1);return r.forEach(function(t,i){if(i!==r.length){n=+t;var o=Number.isNaN(n)?{}:[];e[n||t]=M(e[n||t])?o:e[t],e=e[n||t]}}),e}function k(e,t){var n=!0;if(P(e)&&P(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach(function(r){k(e[r],t[r])||(n=!1)}),n);if(R(e)&&R(t)){if(e.length!==t.length)return!1;for(var r=0,i=e.length;r<i;r+=1)if(!k(e[r],t[r]))return!1;return!0}return e===t}D.generate=function(e,t,n){n=n||"";var r=[];return Object.keys(t).forEach(function(i){var o=function(e){return e?I({},{val:e}).val:e}(t[i]),a=e[i],s="".concat(n,"/").concat(i);k(o,a)||L(t,i)||(M(a)?r.push({op:"add",path:s,value:o}):P(o)&&P(a)?r=r.concat(D.generate(a,o,s)):R(o)&&R(a)?r=r.concat(function(e,t,n){var r=[],i=e.slice(),o=-1;function a(e,t,n){if(e[n]&&M(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(var r=0,i=e.length;r<i;r+=1)if(e[r]&&e[r].qInfo.qId===t)return r;return-1}if(k(t,i))return r;if(!M(t[0])&&M(t[0].qInfo))return r.push({op:"replace",path:n,value:t}),r;for(var s=i.length-1;s>=0;s-=1)-1===(o=a(t,i[s].qInfo&&i[s].qInfo.qId,s))?(r.push({op:"remove",path:"".concat(n,"/").concat(s)}),i.splice(s,1)):r=r.concat(D.generate(i[s],t[o],"".concat(n,"/").concat(s)));for(var l=0,u=t.length;l<u;l+=1)-1===(o=a(i,t[l].qInfo&&t[l].qInfo.qId))?(r.push({op:"add",path:"".concat(n,"/").concat(l),value:t[l]}),i.splice(l,0,t[l])):o!==l&&(r.push({op:"move",path:"".concat(n,"/").concat(l),from:"".concat(n,"/").concat(o)}),i.splice(l,0,i.splice(o,1)[0]));return r}(a,o,s)):r.push({op:"replace",path:"".concat(n,"/").concat(i),value:o}))}),Object.keys(e).forEach(function(i){M(t[i])&&!L(e,i)&&r.push({op:"remove",path:"".concat(n,"/").concat(i)})}),r},D.apply=function(e,t){t.forEach(function(t){var n,r,i=A(e,t.path),o=t.path.split("/").splice(-1)[0],a=o&&Number.isNaN(+o)?i[o]:i[+o]||i,s=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(i=null,a=e),"add"===t.op||"replace"===t.op)if(R(i))"-"===o&&(o=i.length),i.splice(+o,"add"===t.op?0:1,t.value);else if(R(a)&&R(t.value)){var l,u=t.value.slice();a.length=0,(l=a).push.apply(l,function(e){if(Array.isArray(e))return C(e)}(r=u)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(e,t):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}else if(P(a)&&P(t.value))n=a,Object.keys(n).forEach(function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!L(n,e)&&delete n[e]}),I(a,t.value);else{if(!i)throw new Error("Patchee is not an object we can patch");i[o]=t.value}else if("move"===t.op){var c=A(e,t.from);R(i)?i.splice(+o,0,c.splice(+s,1)[0]):(i[o]=c[s],delete c[s])}else"remove"===t.op&&(R(i)?i.splice(+o,1):delete i[o])})},D.clone=function(e){return I({},e)},D.createPatch=function(e,t,n){var r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},D.updateObject=function(e,t){Object.keys(e).length?D.apply(e,D.generate(e,t)):I(e,t)};const O=D,q=function(e,n,r){if(!e)return Promise.resolve();var i=O.generate(n,r);return t()(!0,n,r),i&&i.length?(i=i.map(function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}}),e.applyPatches(i,!0)):Promise.resolve()};var T="accumulation";function N(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===T)return n[r]}function j(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===T)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var _={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""};const F={translationKey:"properties.modifier.accumulation",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=w.getNumDimensions({properties:r,layout:i}));var u=o(r,"qHyperCubeDef.qDimensions",[]),c=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:u,dimensionAndFieldList:s}),d=w.getNumStepComp(n,l),p=w.getAboveComp(n,l,c,d),f=w.getRangeComp("RangeSum",p);if(w.needDimension({modifier:n,properties:r,layout:i})){var h=w.getDimComp(u,1),m=w.getDimComp(u,0),g=w.getAggrComp(f,h,m);f=n.showExcludedValues?w.getExcludedComp({modifier:n,dimensions:u,dimensionAndFieldList:s,valueComp:g}):g}return f},extractInputExpression:w.extractInputExpression,initModifier:function(e){w.initModifier(e,_)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(j(t,e),".accumulationDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.accumulation.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(j(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.accumulation.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(j(t,e),".fullAccumulation")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(j(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=N(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=N(t,e);return n&&!n.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(j(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(T))return!1;var o=N(t,e);return o&&!o.disabled}};return n}};var z="movingAverage";function W(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===z)return n[r]}function $(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===z)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var H={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1};const V={translationKey:"properties.modifier.movingAverage",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,n=e.expression,r=e.modifier,i=e.properties,a=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!r)return n;var u=s;void 0===u&&(u=w.getNumDimensions({properties:i,layout:a}));var c=o(i,"qHyperCubeDef.qDimensions",[]),d=r.showExcludedValues&&r.nullSuppression,p=w.getExpressionWithExcludedComp({expression:n,modifier:r,dimensions:c,dimensionAndFieldList:l,treatMissingAsNull:d}),f=w.getNumStepComp(r,u),h=w.getAboveComp(r,u,p,f);if(r.nullSuppression)t=w.getRangeComp("RangeAvg",h);else{var m=w.getRangeComp("RangeSum",h),g=function(e,t){var n=w.getRowNoComp(e,t);if(!w.isFullRange(e)){var r=e.steps,i="number"!=typeof r||Number.isNaN(r)?6:r;return"RangeMin(".concat(i,", ").concat(n,")")}return n}(r,u);t="".concat(m," / ").concat(g)}var v=t;if(w.needDimension({modifier:r,properties:i,layout:a})){var y=w.getDimComp(c,1),b=w.getDimComp(c,0),x=w.getAggrComp(v,y,b);v=r.showExcludedValues?w.getExcludedComp({modifier:r,dimensions:c,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return v},extractInputExpression:w.extractInputExpression,initModifier:function(e){w.initModifier(e,H)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat($(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.movingAverage.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat($(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.movingAverage.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat($(t,e),".fullRange")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat($(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=W(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=W(t,e);return n&&!n.fullRange}},showExcludedValues:{refFn:function(t){return"".concat($(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat($(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(z))return!1;var o=W(t,e);return o&&!o.disabled}};return n}};var B="timeSeriesDecomposition";function G(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===B)return n[r]}function U(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===B)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var Y={type:"timeSeriesDecomposition",disabled:!1,decomposition:"",steps:2,outputExpression:""};const K={translationKey:"properties.modifier.timeSeriesDecomposition",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties;return n?w.generateTSDExpression(n,t,r):t},extractInputExpression:w.extractInputExpression,initModifier:function(e,t){w.initModifier(e,Y),""===e.decomposition&&t&&(e.decomposition=w.getDecomposition(t))},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.timeSeriesDecomposition||"properties.modifier.timeSeriesDecomposition",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{decomposition:{refFn:function(t){return"".concat(U(t,e),".decomposition")},type:"string",translation:t.modifierTrendDecompositionDecomposition||"properties.modifier.trendDecomposition.decomposition",component:"dropdown",schemaIgnore:!0,defaultValue:t.trendDecompositionParametersDecompositionObserved||"cao.trendDecomposition.parameters.decomposition.observed",options:a.OPTIONS},steps:{refFn:function(t){return"".concat(U(t,e),".steps")},type:"integer",translation:t.modifierTimeSeriesDecompositionPeriods||"properties.modifier.timeSeriesDecomposition.periods",schemaIgnore:!0,defaultValue:2,change:function(t,n){var r=G(t,e);if(r){var i=r.steps;r.steps="number"!=typeof i||Number.isNaN(i)?2:Math.abs(i),n.properties.qHyperCubeDef.qMeasures=n.properties.qHyperCubeDef.qMeasures.map(function(e){return e.qDef.modifiers.map(function(e){return"timeSeriesDecomposition"===e.type?e.steps=i:e.steps=e.steps,e}),e})}},show:function(t){var n=G(t,e);return n&&!n.fullRange}}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(B))return!1;var o=G(t,e);return o&&!o.disabled}};return n}};var X="difference";function J(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===X)return n[r]}function Z(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===X)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var Q={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""};const ee={translationKey:"properties.modifier.difference",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:w.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=w.getNumDimensions({properties:r,layout:i}));var u=o(r,"qHyperCubeDef.qDimensions",[]),c=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:u,dimensionAndFieldList:s}),d=w.getAboveComp(n,l,c),p="".concat(c," - ").concat(d);if(w.needDimension({modifier:n,properties:r,layout:i})){var f=w.getDimComp(u,1),h=w.getDimComp(u,0),m=w.getAggrComp(p,f,h);p=n.showExcludedValues?w.getExcludedComp({modifier:n,dimensions:u,dimensionAndFieldList:s,funcComp:"Only",valueComp:m}):m}return p},initModifier:function(e){Object.keys(Q).forEach(function(t){void 0===e[t]&&(e[t]=Q[t])})},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(Z(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.difference.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(Z(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.difference.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},showExcludedValues:{refFn:function(t){return"".concat(Z(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(X))return!1;var o=J(t,e);return o&&!o.disabled}};return n}};var te="normalization";function ne(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===te)return n[r]}function re(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===te)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}function ie(e,t){for(var n=0;n<e.length;n++)if(e[n].value===t)return n;return-1}var oe={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:2,selectionScope:2};function ae(e){return 2===e?"{1}":""}function se(e,t,n){return 1===e?"{$<".concat(w.getFieldWithWrapper(t),"={'").concat(n,"'}>}"):""}function le(e,t){return 0===e&&t>1||2===e?"Total":""}function ue(e,t,n){return 0===e&&t>1?"<".concat(w.getDimDefWithWrapper(n),">"):""}const ce={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:w.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=w.getNumDimensions({properties:r,layout:i}));var u=o(r,"qHyperCubeDef.qDimensions",[]),c=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:u,dimensionAndFieldList:s}),d=n.selectionScope,p=n.dimensionalScope;return function(e,t,n,r,i,o,a){var s=ae(t),l=se(t,n,r),u=""===s&&""===l?"":s||l,c=le(i,o),d=ue(i,o,a),p=function(e){for(var t=[],n=0;n<e;n++)t[n]=w.getDimDefWithWrapper(n);return t.join(", ")}(o);return"".concat(e,"/ Sum(").concat(u," ").concat(c).concat(d," Aggr(").concat(u," ").concat(e,", ").concat(p,"))")}(c,d,n.field,n.value,p,l,n.primaryDimension)},initModifier:function(e){Object.keys(oe).forEach(function(t){void 0===e[t]&&(e[t]=oe[t])})},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(re(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,options:function(n){return function(e,t,n){var r=[{value:0,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:1,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:2,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return r=function(e,t){if(1===e){var n=ie(t,0);t.splice(n,1)}return t}(ne(e,n).dimensionalScope,r),r}(n,t,e)}},field:{refFn:function(t){return"".concat(re(t,e),".field")},type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:function(e,t,n){return n.app.getFieldList().then(function(e){return e.map(function(e){return{label:e.qName,value:e.qName}})})},show:function(t){return 1===ne(t,e).selectionScope}},value:{refFn:function(t){return"".concat(re(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return 1===ne(t,e).selectionScope}},dimensionalScope:{refFn:function(t){return"".concat(re(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,supportTooltip:!0,options:function(n,r){return function(e,t,n,r){var i=t.layout.qHyperCube.qDimensionInfo.length,o=[{value:0,translation:n.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:n.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:1,translation:n.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension"),tooltipTranslation:n.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension",".tooltip")},{value:2,translation:n.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:n.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension",".tooltip")}];return o=function(e,t){if(e<2){var n=ie(t,0);t.splice(n,1)}return t}(i,o),o=function(e,t){if(0===e){var n=ie(t,1);t.splice(n,1)}return t}(ne(e,r).selectionScope,o),o}(n,r,t,e)}},primaryDimension:{refFn:function(t){return"".concat(re(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.normalization.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(t,n){return 0===(ne(t,e).dimensionalScope||0)&&n.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(te))return!1;var o=ne(t,e);return o&&!o.disabled}};return n},getDisregardSelectionComp:ae,getFieldSelectionComp:se,getTotalComp:le,getSelectedDimComp:ue};var de="qDef.base",pe="qDef.qDef",fe="qDef.base.qDef",he="qLibraryId",me="qDef.base.qLibraryId";const ge={getExpression:function(e){var t=o(e,fe);return void 0!==t?t:o(e,pe)},getExpressionRef:function(e){return void 0!==o(e,fe)?fe:pe},getLibraryIdRef:function(e){return o(e,me)?me:he},getLibraryId:function(e){return o(e,me)||o(e,he)},getLabelRef:function(e){return o(e,de)?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return o(e,de)?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}};var ve="qDef.qDef",ye="qDef.base.qDef",be="qLibraryId",xe="qDef.base.qLibraryId",Se="qDef.qLabel",we="qDef.qLabelExpression",Ce="qDef.base.qLabel",Ee="qDef.base.qLabelExpression",Ie="qDef.qAggrFunc",De="qDef.base.qAggrFunc",Re={initBase:function(e,t){(t||Re.isValid(e))&&(n(e,ye,o(e,ve)),n(e,xe,o(e,be)),n(e,Ce,o(e,Se)),n(e,Ee,o(e,we)))},restoreBase:function(e){Re.isValid(e)&&(n(e,ve,o(e,ye)),n(e,be,o(e,xe)),n(e,Se,o(e,Ce)),n(e,we,o(e,Ee)),o(e,Ie)&&o(e,De)&&n(e,Ie,o(e,De)),delete e.qDef.base)},isValid:function(e){var t=o(e,ye),n=o(e,xe);return void 0!==t||void 0!==n}};const Pe=Re;function Me(e){return Me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Me(e)}var Le={accumulation:F,movingAverage:V,difference:ee,normalization:ce,timeSeriesDecomposition:K};const Ae={modifiers:Le,apply:Oe,applyModifiers:qe,cleanUpMeasure:Te,destroy:function(e){e&&ke[e.id]&&ke[e.id].masterItemSubscriber&&(ke[e.id].masterItemSubscriber&&ke[e.id].masterItemSubscriber.unsubscribe(),delete ke[e.id])},hasActiveModifiers:Ne,getActiveModifier:je,initBase:Pe.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some(function(e){return Le[e]})},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some(function(e){return Le[e]&&Le[e].isApplicable({properties:n,layout:r})})},measureBase:ge,limitedSorting:function(e){var t=e.measures,n=e.properties,r=e.layout,i=!1,o=!1;return t.forEach(function(e){var t=ze(e);Ue({modifiers:t,properties:n,layout:r})&&(i=!0,o=o||Ze({modifiers:t,properties:n,layout:r}))}),i&&!o},ifEnableTotalsFunction:_e};var ke={};function Oe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.model,r=e.properties,i=e.isSnapshot,a=void 0!==i&&i,s=e.masterItem,l=!1;ke[n.id]=ke[n.id]||{isFirstTime:!0};var u=ke[n.id].isFirstTime;if(ke[n.id].isFirstTime=!1,r&&"object"===Me(r))return qe({model:n,properties:r});var c=n?n.layout:void 0,d=o(c,"qSelectionInfo.qInSelections");if(a||d)return Promise.resolve(l);var p=o(c,"qHyperCube.qMeasureInfo"),f=ke[n.id].lastReloadTime;if(ke[n.id].lastReloadTime=o(n,"app.layout.qLastReloadTime"),Ne({measures:p,layout:c})){var h=function(e){var t=e.measures,n=e.layout,r=e.lastReloadTime;return o(e.model,"app.layout.qLastReloadTime")!==r&&function(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some(function(e){return Ge({measure:e,properties:n,layout:r})})}({measures:t,layout:n})}({measures:p,layout:c,model:n,lastReloadTime:f});return h||function(e){var t=e.measures,n=e.layout,r=e.masterItem,i=e.isFirstTime;return!!Array.isArray(t)&&(i||r||t.some(function(e){return function(e){var t=e.measure,n=e.layout;return Ue({modifiers:ze(t),layout:n})?!t.base:!!t.base}({measure:e,layout:n})}))}({measures:p,layout:c,masterItem:s,isFirstTime:u})?n.getEffectiveProperties().then(function(e){var r=t()(!0,{},e);$e(r);var i=Qe(r);return Ye({model:n}).then(function(t){return Ke({libraryIds:i,model:n}).then(function(i){return h&&function(e){var t=e.properties;Fe(t).forEach(function(e){return function(e){var t=e.measure;if(Ge({measure:t,properties:e.properties})){var n=0,r=t.qDef.modifiers;Array.isArray(r)&&r.forEach(function(e){if("object"===Me(e)&&!e.disabled){if(n++,"object"!==Me(Le[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(n>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var r=Le[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==r&&Ve(t)&&w.simplifyExpression(t.qDef.base.qDef)!==w.simplifyExpression(r)&&(t.qDef.base.qDef=r)}})}}({measure:e,properties:t})})}({properties:r}),qe({model:n,oldProperties:e,properties:r,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:i,dimensionAndFieldList:t})})})}):Promise.resolve(l)}return function(e){return!!Array.isArray(e)&&e.some(function(e){return"object"===Me(e.base)})}(p)?n.getEffectiveProperties().then(function(e){return function(e){var n=e.model,r=e.properties,i=Qe(r);return et({model:n,libraryIds:i}).then(function(){var e=t()(!0,{},r);return Fe(r).forEach(function(e){return Te(e)}),Je({oldProperties:e,newProperties:r,model:n})})}({model:n,properties:e})}):Promise.resolve(l)}function qe(e){var n=e.model,r=e.oldProperties,i=e.properties,a=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,u=e.masterItem,c=e.libraryItemsProps,d=e.dimensionAndFieldList;void 0===r&&(r=l?t()(!0,{},i):i),$e(i);var p=Qe(i);return et({model:n,libraryIds:p,masterItem:u}).then(function(){return function(e){var n=e.measures,r=e.properties,i=e.model,a=e.libraryItemsProps,s=e.dimensionAndFieldList;if(n||(n=Fe(r)),!n.length)return Promise.resolve();if(!Ne({measures:n,properties:r}))return n.forEach(function(e){return Te(e)}),Promise.resolve();var l=a?void 0:Qe(r);return Ye({model:i,dimensionAndFieldList:s}).then(function(e){return Ke({libraryIds:l,model:i,libraryItemsProps:a}).then(function(i){n.forEach(function(n){Ue({modifiers:n.qDef.modifiers,properties:r})?(function(e){var n=e.measure,r=e.properties,i=e.libraryItemsProps,a=e.dimensionAndFieldList,s=0;Pe.isValid(n)||Pe.initBase(n,!0);var l=n.qDef,u=l.modifiers,c=l.base;Array.isArray(u)&&u.forEach(function(e){if("object"===Me(e)&&!e.disabled){if(s++,"object"!==Me(Le[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(s>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");Le[e.type].initModifier(e,n);var l=n.qLibraryId||c&&c.qLibraryId;l?function(e){var n=e.measure,r=e.modifier,i=e.properties,o=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=""===s?s:Le[r.type].generateExpression({expression:s,modifier:r,properties:i,dimensionAndFieldList:o});r.outputExpression=l,n.qDef.qDef=r.outputExpression,(n.qDef.qLabel||a.qMeasure.qLabel)&&(n.qDef.qLabel=a.qMeasure.qLabel),(n.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(n.qDef.qLabelExpression=a.qMeasure.qLabelExpression),n.qDef.quarantine&&n.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(n.qDef.qNumFormat=a.qMeasure.qNumFormat,n.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete n.qLibraryId,n.qDef.coloring=a.qMeasure.coloring,r.base=t()(!0,{},n.qDef.base)}({measure:n,modifier:e,libraryId:l,properties:r,libraryItemsProps:i,dimensionAndFieldList:a}):function(e){var n=e.measure,r=e.modifier,i=e.properties,o=e.dimensionAndFieldList;"function"==typeof Le[r.type].updateModifier&&Le[r.type].updateModifier(r,i.qHyperCubeDef);var a=ge.getExpression(n),s=""===a?a:Le[r.type].generateExpression({expression:a,modifier:r,properties:i,dimensionAndFieldList:o});r.outputExpression=s,n.qDef.qDef=r.outputExpression,n.qDef.base.qLabelExpression?n.qDef.qLabelExpression=n.qDef.base.qLabelExpression:n.qDef.qLabel=n.qDef.base.qLabel||a,r.base=t()(!0,{},n.qDef.base)}({measure:n,modifier:e,properties:r,dimensionAndFieldList:a}),function(e){var t=o(e,"qDef.qAggrFunc");"Expr"!==t||_e(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&_e(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(n)}})}({measure:n,properties:r,libraryItemsProps:i,dimensionAndFieldList:e}),He(n)):Te(n)})})})}({measures:a,properties:i,model:n,libraryItemsProps:c,dimensionAndFieldList:d}).then(function(){return l?Je({oldProperties:r,newProperties:i,model:n}):Promise.resolve(!1)})})}function Te(e){!function(e){var t=ze(e);return Array.isArray(t)&&t.some(function(e){return"object"===Me(e)&&!e.disabled&&!Le[e.type]})}(e)?Pe.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,He(e)}function Ne(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some(function(e){return Ue({modifiers:ze(e),properties:n,layout:r})})}function je(e){var t=ze(e);if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];if(Le[r.type]&&!r.disabled)return r}}function _e(e){var t=je(e);return!t||Le[t.type].enableTotalsFunction(e)}function Fe(e){return o(e,"qHyperCubeDef.qMeasures",[]).concat(o(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function ze(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function We(e){return o(e,"outputExpression.qValueExpression.qExpr")||o(e,"outputExpression")}function $e(e){Fe(e).forEach(function(e){return function(e){var n=je(e);n&&(void 0!==n.outputExpression&&We(n)!==e.qDef.qDef?delete e.qDef.base:!Pe.isValid(e)&&n.base&&(e.qDef.base=t()(!0,{},n.base)))}(e)})}function He(e){var t=ze(e);Array.isArray(t)&&t.forEach(function(t){"object"===Me(t)&&(t.disabled||!Le[t.type]&&We(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)})}function Ve(e){return e.base||e.qDef&&e.qDef.base}function Be(e){var t=Ve(e);return e.qLibraryId||t&&t.qLibraryId}function Ge(e){var t=e.measure,n=e.properties,r=e.layout;return!Be(t)&&Ue({modifiers:ze(t),properties:n,layout:r})}function Ue(e){var t=e.modifiers,n=e.properties,r=e.layout,i={};return Array.isArray(t)&&t.some(function(e){return!("object"!==Me(e)||e.disabled||!Le[e.type])&&(void 0===i[e.type]&&(i[e.type]=Le[e.type].isApplicable({properties:n,layout:r})),i[e.type])})}function Ye(e){var t=e.model,n=e.dimensionAndFieldList;if(n)return Promise.resolve(n);var r=[],i={},o=t.app.getDimensionList().then(function(e){i.dimensionList=e});r.push(o);var a=t.app.getFieldList().then(function(e){i.fieldList=e});return r.push(a),Promise.all(r).then(function(){return i})}function Ke(e){var t=e.libraryIds,n=e.model,r=e.libraryItemsProps;if(r)return Promise.resolve(r);var i=t.measureLibraryIds,o=t.dimensionLibraryIds,a={},s=[];return i.forEach(function(e){var t=n.app.getMeasure(e).then(function(t){return t.getProperties().then(function(t){a[e]=t})});s.push(t)}),o.forEach(function(e){var t=n.app.getDimension(e).then(function(t){return t.getProperties().then(function(t){a[e]=t})});s.push(t)}),Promise.all(s).then(function(){return a})}function Xe(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Je(e){var t=e.oldProperties,n=e.newProperties,r=e.model,i=JSON.stringify(o(t,"qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(o(n,"qHyperCubeDef.qMeasures"),Xe)||JSON.stringify(o(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(o(n,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe);return i?function(e){var t=e.model,n=e.oldProperties,r=e.newProperties,i=t.layout;return i&&!i.qHasSoftPatches&&!i.qExtendsId&&o(i,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(r):q(t,n,r)}({model:r,oldProperties:t,newProperties:n}).then(function(){return i}):Promise.resolve(i)}function Ze(e){var t=e.modifiers,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some(function(e){return"object"===Me(e)&&!e.disabled&&Le[e.type]&&Le[e.type].needDimension({modifier:e,properties:n,layout:r})})}function Qe(e){var t=Fe(e),n=[],r=[],i=!1;return t.forEach(function(t){var r=ze(t);if(Ue({modifiers:r,properties:e})){var o=Be(t);o&&n.push(o),i=i||Ze({modifiers:r,properties:e})}}),o(e,"qHyperCubeDef.qDimensions",[]).forEach(function(e){var t=e.qLibraryId;t&&r.push(t)}),{measureLibraryIds:n,dimensionLibraryIds:r}}function et(e){var t=e.model,n=e.libraryIds;return!e.masterItem&&n&&(n.measureLibraryIds.length||n.dimensionLibraryIds.length)?(ke[t.id].masterItemSubscriber=ke[t.id].masterItemSubscriber||function(e){var t=e.model,n=e.callback,r={},i={},a={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},n=o(e,"qInfo.qType");return n&&s[n]&&s[n].forEach(function(n){t[n]=o(e,n)}),JSON.stringify(t)}function u(e){var t=e.qInfo.qId;if(r[t]){var i=l(e);r[t].properties!==i&&(r[t].properties=i,"function"==typeof n&&r[t].enabled&&n(e)),r[t].enabled=!0}}function c(e,n){return t.app[n](e).then(function(t){r[e]={listener:t.layoutSubscribe(u),enabled:!1,properties:l(t.layout)}})}return{subscribe:function(e){var n=e.measureLibraryIds,o=e.dimensionLibraryIds,s=[];return function(e){var t=e.dimensionLibraryIds;i={},e.measureLibraryIds.forEach(function(e){i[e]=!0}),a={},t.forEach(function(e){a[e]=!0})}({measureLibraryIds:n,dimensionLibraryIds:o}),Object.keys(r).forEach(function(e){i[e]||a[e]||(r[e].listener.dispose(),delete r[e])}),t.app&&(Object.keys(i).forEach(function(e){i[e]&&!r[e]&&s.push(c(e,"getMeasure"))}),Object.keys(a).forEach(function(e){a[e]&&!r[e]&&s.push(c(e,"getDimension"))})),Promise.all(s)},unsubscribe:function(){Object.keys(r).forEach(function(e){r[e].listener.dispose()}),r={}}}}({model:t,callback:function(e){return Oe({model:t,masterItem:e}).then(function(){return t.app.clearUndoBuffer()})}}),ke[t.id].masterItemSubscriber.subscribe(n)):Promise.resolve()}})(),t.default=i.default,Object.defineProperty(t,"__esModule",{value:!0})})()}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var r={};return(()=>{function e(t){var n,r=t;return r>9?(n=65+r-10)>90&&(n+=6):r="".concat(r).charCodeAt(0),[48,111,79,105,73,108].indexOf(n)>-1?e(r+1):String.fromCharCode(n)}function t(n){var r=e(n%62),i=Math.floor(n/62);return i>0?t(i)+r:r}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}n.d(r,{default:()=>$e});const o={getValue:function(e,t,n){if(null==e||null==t)return n;for(var r=t.split("."),i=e,o=0;o<r.length;++o){var a=r[o];if(""!==a){if(void 0===i[a]||null===i[a])return n;i=i[a]}}return i},setValue:function(e,t,n){if(null!=e&&null!=t){for(var r=t.split("."),i=r[r.length-1],o=e,a=0;a<r.length-1;++a){var s=r[a];void 0!==o[s]&&null!==o[s]||(o[s]=Number.isNaN(+r[a+1])?{}:[]),o=o[s]}void 0!==n?o[i]=n:delete o[i]}},isEmpty:function(e){return 0===Object.keys(e).length&&e.constructor===Object},isAtomicValue:function(e){return/boolean|number|string/.test(i(e))},generateId:function(){return t(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function a(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return r;return-1}return-1}const d={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;var n=e.indexOf(t[0]);if(-1!==n){for(var r=0;r<t.length;r++){var i=e.indexOf(t[r]);if(n>i)return!1;n=i}return!0}return!1},indexAdded:function(e,t){var n;for(n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)},indexRemoved:function(e,t){var n,r=0;for(n=0;n<e.length;++n)e[n]>t?--e[n]:e[n]===t&&(r=n);return e.splice(r,1),r},findItemByPropertyValue:function(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return e[r];return null}return null},findIndexByPropertyValue:c};var p=n(8),f=n.n(p);const h=function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,i=n.data[0];(t=i.dimensions).push.apply(t,a(r.qDimensions));var s,l=o.getValue(r,"qLayoutExclude.qHyperCubeDef.qDimensions");l&&(s=i.excludedDimensions).push.apply(s,a(l))},m=function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,i=n.data[0];(t=i.measures).push.apply(t,l(r.qMeasures));var a,s=o.getValue(r,"qLayoutExclude.qHyperCubeDef.qMeasures");s&&(a=i.excludedMeasures).push.apply(a,l(s))},g=function(e){var t=e.exportFormat,n=e.qHyperCubeDef,r=t.data[0];n.qInterColumnSortOrder||(n.qInterColumnSortOrder=[]),r.interColumnSortOrder=n.qInterColumnSortOrder.concat();var i=o.getValue(n,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");i&&d.isOrderedSubset(i,r.interColumnSortOrder)&&(r.interColumnSortOrder=i.concat())},v=function(e){var t=e.exportFormat,n=e.properties;Object.keys(n).forEach(function(e){t.properties[e]=n[e]})},y=function(e){var t=e.exportFormat,n=e.properties;n.qLayoutExclude||(n.qLayoutExclude={}),n.qLayoutExclude.disabled&&(Object.keys(n.qLayoutExclude.disabled).forEach(function(e){t.properties.hasOwnProperty(e)||(t.properties[e]=n.qLayoutExclude.disabled[e])}),delete n.qLayoutExclude.disabled),n.qLayoutExclude.changed&&(function(e){Object.keys(e.qLayoutExclude.changed).forEach(function(t){e.qLayoutExclude.changed[t].to===o.getValue(e,t)&&o.setValue(e,t,e.qLayoutExclude.changed[t].from)})}(n),delete n.qLayoutExclude.changed),n.qLayoutExclude.quarantine&&!o.isEmpty(n.qLayoutExclude.quarantine)||delete n.qLayoutExclude},b=function(e){e.forEach(function(e){f().cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)})};function x(e,t,n){var r,i,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=o.getValue(e,t);if(!o.isAtomicValue(s))try{if((i=(i=(r=JSON.stringify(s)).match(/:\{/g))?i.length:0)>2&&!a)return;s=JSON.parse(r)}catch(e){return}o.getValue(e,"qLayoutExclude.quarantine")||o.setValue(e,"qLayoutExclude.quarantine",{});var l=o.getValue(e,"qLayoutExclude.quarantine");l[n]||(l[n]={}),l[n][t]=s}var S=n(909),w=n.n(S);function C(e,t){var n=w()(!0,{},t,e);return o.getValue(n,"qOtherTotalSpec.qOtherCounted")||o.setValue(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),o.getValue(n,"qOtherTotalSpec.qOtherLimit")||o.setValue(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel="Others"),n}function E(e,t){return w()(!0,{},t,e)}function I(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}var D=Math.pow(2,53)-1;function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const M=function(e,t,n){var r="masterobject"===o.getValue(t,"properties.qInfo.qType")?"masterobject":o.getValue(n,"qInfo.qType");o.setValue(e,"qInfo.qType",r),e.visualization=n.visualization},L=function(e,t,n){t.hasOwnProperty(e)&&(n[e]=t[e])},A=function(e,t,n,r){t.hasOwnProperty(e)?n[e]=t[e]:n[e]=r},k=function(){return{qDef:{autoSort:!0,cId:"",othersLabel:"Others"},qLibraryId:"",qNullSuppression:!1,qOtherLabel:"Others",qOtherTotalSpec:{qOtherLimitMode:"OTHER_GE_LIMIT",qOtherMode:"OTHER_OFF",qOtherSortMode:"OTHER_SORT_DESCENDING",qSuppressOther:!1}}},O=function(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}},q=function(e){var t,n=e.exportFormat,r=e.maxDimensions,i=e.minDimensions,o=e.newHyperCubeDef,a=e.defaultDimension,s=n.data[0];for(t=0;t<s.dimensions.length;++t){var l=C(s.dimensions[t],a);o.qDimensions.length<r?o.qDimensions.push(l):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(l)}for(t=0;t<s.excludedDimensions.length;++t){var u=C(s.excludedDimensions[t],a);o.qDimensions.length<i?o.qDimensions.push(u):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(u)}},T=function(e){var t,n=e.exportFormat,r=e.maxMeasures,i=e.minMeasures,o=e.newHyperCubeDef,a=e.defaultMeasure,s=n.data[0];for(t=0;t<s.measures.length;++t){var l=E(s.measures[t],a);o.qMeasures.length<r?o.qMeasures.push(l):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(l)}for(t=0;t<s.excludedMeasures.length;++t){var u=E(s.excludedMeasures[t],a);o.qMeasures.length<i?o.qMeasures.push(u):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(u)}},N=function(e){var t=e.exportFormat,n=e.dataDefinition,r=void 0===n?{}:n,i=t.data[0],o=r.dimensions||{max:0},a=r.measures||{max:0},s=I(a.max,i.dimensions.length,D),l=I(a.min,i.dimensions.length,0);return{maxDimensions:I(o.max,s,D),minDimensions:I(o.min,l,0),maxMeasures:s,minMeasures:l}},j=function(e){var t=e.exportFormat,n=e.newHyperCubeDef,r=t.data[0],i=n.qDimensions.length+n.qMeasures.length;n.qInterColumnSortOrder=r.interColumnSortOrder.concat();var o=n.qInterColumnSortOrder.length;if(o!==i)for(n.qLayoutExclude&&(n.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=r.interColumnSortOrder.concat());o!==i;)o<i?(d.indexAdded(n.qInterColumnSortOrder,o),++o):(--o,d.indexRemoved(n.qInterColumnSortOrder,o))},_=function(e){var t=e.exportFormat,n=e.initialProperties,r=e.hypercubePath,i={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach(function(e){"qLayoutExclude"===e?t.properties[e].quarantine&&(i.qLayoutExclude.quarantine=w()(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&r?o.setValue(i,"".concat(r,".qHyperCubeDef"),t.properties.qHyperCubeDef):n.hasOwnProperty(e)||-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)||function(e,t){return"components"===t&&Array.isArray(e[t])&&e[t].some(function(e){return"general"===e.key})}(t.properties,e)?i[e]=t.properties[e]:i.qLayoutExclude.disabled[e]=t.properties[e]}),null===(i=w()(!0,{},n,i)).components&&(i.components=[]),i},F=function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=t.data[0];return a.dimensions.length>n&&n>0||a.measures.length>i&&i>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>r||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>o||!i&&a.measures.length>0||!n&&a.dimensions.length>0},z=function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=e.newHyperCubeDef,s=t.data[0];a.qLayoutExclude||(a.qLayoutExclude={}),a.qLayoutExclude.qHyperCubeDef||(a.qLayoutExclude.qHyperCubeDef={}),(s.dimensions.length>n&&n>0||s.excludedDimensions&&s.excludedDimensions.length&&s.dimensions.length+s.excludedDimensions.length>r)&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(s.measures.length>i&&i>0||s.excludedMeasures&&s.excludedMeasures.length&&s.measures.length+s.excludedMeasures.length>o)&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!i&&s.measures.length&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!n&&s.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))},W=function(e){var t,n=e.newProperties,r=e.dataDefinition,i=e.hypercubePath;if(r.dimensions&&"function"==typeof r.dimensions.added){var a=o.getValue(n,i||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return R(e)}(t=a.qDimensions)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return R(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?R(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();a.qDimensions=[],s.forEach(function(e){a.qDimensions.push(e),r.dimensions.added(e,n)})}},$=function(e){var t,n=e.newProperties,r=e.dataDefinition,i=e.hypercubePath;if(r.measures&&"function"==typeof r.measures.added){var a=o.getValue(n,i||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return P(e)}(t=a.qMeasures)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return P(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?P(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();a.qMeasures=[],s.forEach(function(e){a.qMeasures.push(e),r.measures.added(e,n)})}},H=function(e){var t=e.measures,n=e.modifierTypes;t&&n&&f().isSupportedModifiers(n)&&t.forEach(function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store})};function V(e,t){var n=o.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!n&&(Object.keys(n).forEach(function(t){o.setValue(e,t,n[t])}),delete e.qLayoutExclude.quarantine[t],!0)}const B={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t={data:[],properties:{}},n=0;n<e;++n)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}(),a=t.qProperty,s=o.getValue(a,n||""),l=s.qHyperCubeDef;return l.qInterColumnSortOrder||(l.qInterColumnSortOrder=[]),h({exportFormat:i,qHyperCubeDef:l}),m({exportFormat:i,qHyperCubeDef:l}),g({exportFormat:i,qHyperCubeDef:l}),delete l.qLayoutExclude,v({exportFormat:i,properties:a}),n&&(i.properties.qHyperCubeDef=l,delete s.qHyperCubeDef),y({exportFormat:i,properties:a}),r||b(i.properties.qHyperCubeDef.qMeasures),Array.isArray(i.properties.filters)&&(x(i.properties,"filters","storedFilters",!0),delete i.properties.filters),i.properties.qHyperCubeDef.qContextSetExpression&&(x(i.properties,"qHyperCubeDef.qContextSetExpression","storedFilters"),i.properties.qHyperCubeDef.qContextSetExpression=""),i.properties.qHyperCubeDef.qDynamicScript&&i.properties.qHyperCubeDef.qDynamicScript.length&&(x(i.properties,"qHyperCubeDef.qDynamicScript","dynamicScript"),i.properties.qHyperCubeDef.qDynamicScript=[]),i},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=void 0===n?{}:n,i=e.dataDefinition,a=void 0===i?{}:i,s=e.defaultPropertyValues,l=void 0===s?{}:s,u=e.hypercubePath,c=e.extension,d=e.supportedFilters,p=void 0===d||d,f=e.isHCModifierSupported,h=void 0===f||f,m={qChildren:[]},g=_({exportFormat:t,initialProperties:r,hypercubePath:u}),v=o.getValue(r,u||"").qHyperCubeDef,y=o.getValue(g,u||"").qHyperCubeDef,b=N({exportFormat:t,dataDefinition:a}),x=b.maxDimensions,S=b.minDimensions,w=b.maxMeasures,C=b.minMeasures,E=l.defaultDimension,I=void 0===E?k():E,D=l.defaultMeasure,R=void 0===D?O():D;y.qDimensions.length=0,y.qMeasures.length=0,F({exportFormat:t,maxDimensions:x,minDimensions:S,maxMeasures:w,minMeasures:C})&&z({exportFormat:t,maxDimensions:x,minDimensions:S,maxMeasures:w,minMeasures:C,newHyperCubeDef:y}),q({exportFormat:t,maxDimensions:x,minDimensions:S,newHyperCubeDef:y,defaultDimension:I}),T({exportFormat:t,maxMeasures:w,minMeasures:C,newHyperCubeDef:y,defaultMeasure:R}),W({newProperties:g,dataDefinition:a,hypercubePath:u}),$({newProperties:g,dataDefinition:a,hypercubePath:u}),j({exportFormat:t,newHyperCubeDef:y}),L("qMaxStackedCells",v,y),L("qNoOfLeftDims",v,y),A("qInitialDataFetch",v,y,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),A("qMode",v,y,"S"),A("qReductionMode",v,y,"N"),A("qSortbyYValue",v,y),A("qIndentMode",v,y),A("qShowTotalsAbove",v,y),M(g,t,r),m.qProperty=g;var P=o.getValue(c||{},"support.modifiers");return H({measures:y.qMeasures,modifierTypes:P}),p&&V(m.qProperty,"storedFilters"),"S"===y.qMode&&h&&V(m.qProperty,"dynamicScript"),m}};var G={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function U(e,t,n,r){t=t||[];var i=c(e,r,n),o=c(t,r,n);if(-1!==i&&-1===o){var a=e.splice(i,1);t.push(a[0])}return t}function Y(e,t){return e.length!==t}const K={create:function(e,t){if(!e||!G[e])throw new Error("Attribute Expressions Util: ID required");var n={};return t&&Object.keys(t).forEach(function(e){n[e]=t[e]}),n.id=e,n.qAttribute=!0,n},moveByIdFromGroup:function(e,t,n,r,i){n=n||"qAttributeExpressions",i=i||"id";for(var o=0;o<e.length;o++){var a=e[o][n],s=t.length;if(U(a,t,r,i),Y(t,s))return t}return t},IDMAP:{CELL_BACKGROUND_COLOR:"cellBackgroundColor",CELL_FOREGROUND_COLOR:"cellForegroundColor",COLOR_BY_ALTERNATIVE:"colorByAlternative",COLOR_BY_EXPRESSION:"colorByExpression",TOOLTIP:"tooltip",CELL_LINK_LABEL:"urlLabel",CELL_LINK_URL:"url"}},X={getNumDimensions:function(e){return o.getValue(e,"qHyperCubeDef.qDimensions.length",0)},getNumMeasures:function(e){return o.getValue(e,"qHyperCubeDef.qMeasures.length",0)},wrapFieldName:function(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e},getItemLabel:function(e){return e.label||e.name}},J={colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>0&&X.getNumMeasures(e)<=1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)>0},expression:function(e){return X.getNumMeasures(e)>=1}}},Z={colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumMeasures(e)>=1}}};var Q={scatterplot:Z,"sn-scatter-plot":Z,piechart:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumMeasures(e)>=1}}},linechart:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)<=1},expression:function(e){return X.getNumMeasures(e)>=1}}},map:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>=1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)>=1},expression:function(e){return X.getNumDimensions(e)>=1}}},distributionplot:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumDimensions(e)>=1}}}};function ee(e,t,n){if(Array.isArray(e[t])){var r=d.findIndexByPropertyValue(e[t],"id",n);r>=0&&e[t].splice(r,1)}else e[t]=[]}function te(e,t){var n=K.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach(function(e){ee(e,"qAttributeDimensions",n),ee(e,"qAttributeExpressions",n)}),t.forEach(function(e){ee(e,"qAttributeDimensions",n),ee(e,"qAttributeExpressions",n)})}function ne(e,t){if(t){var n="="===t.charAt(0);e.color.altLabel=n?{qStringExpression:{qExpr:t.substr(1)}}:t}}function re(e){var t=e.properties,n=e.isDimension,r=e.dimensions,i=e.excludedDimensions,a=e.measures,s=e.label;te(r,i);var l=r[r.length-1];if(l){var u=n?o.getValue(t,"color.byDimDef"):o.getValue(t,"color.byMeasureDef"),c=o.getValue(t,"color.formatting.qNumFormat"),p=o.getValue(t,"color.formatting.isCustomFormatted");if(u){var f=K.create(K.IDMAP.COLOR_BY_ALTERNATIVE);switch(u.type){case"expression":!function(e){var t=e.attributeExpression,n=e.label,r=e.item,i=e.isDimension,o=e.qNumFormat,a=e.isCustomFormatted;t.label=n||r.label,i?t.qDef=r.key:(t.qExpression=r.key,o&&(t.qNumFormat=o,t.isCustomFormatted=a)),t.matchMeasure=r.activeMeasureIndex,t.label&&"="===t.label.charAt(0)&&(t.labelExpRef="color.altLabel")}({attributeExpression:f,label:s,item:u,isDimension:n,qNumFormat:c,isCustomFormatted:p});break;case"libraryItem":!function(e){var t=e.attributeExpression,n=e.measures,r=e.item,i=e.qNumFormat,o=e.isCustomFormatted;e.isDimension||(t.matchMeasure=d.findIndexByPropertyValue(n,"qLibraryId",r.key),i&&(t.qNumFormat=i,t.isCustomFormatted=o)),void 0!==r.expression?t.qExpression=r.expression:t.qLibraryId=r.key,t.colorMapRef=r.key}({attributeExpression:f,measures:a,item:u,isDimension:n,qNumFormat:c,isCustomFormatted:p})}n?(f.qSortBy={qSortByAscii:1},l.qAttributeDimensions.push(f)):l.qAttributeExpressions.push(f)}}}function ie(e,t,n,r){var i,o,a,s={};switch(e){case"dimension":n.qLibraryId?(s.type="dimension",s.name=n.qLibraryId,s.id=n.qLibraryId):(s.type="field",t?(s.name=n.label||n.qDef,s.id=n.qDef):(s.name=n.qDef.qFieldDefs[0],s.label=(a=n.qDef).qLabelExpression?a.qLabelExpression:a.qFieldLabels&&a.qFieldLabels[0]?a.qFieldLabels[0]:a.qFieldDefs[0]));break;case"measure":i=function(e,t){return t?e.qLibraryId:f().measureBase.getLibraryId(e)}(n,t),i?(s.type="measure",s.name=i,s.id=i,o=function(e,t){return f().hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}(n,r),o&&(s.expression=o)):(s.type="expression",t?(s.name=n.label||n.qExpression,s.id=n.qExpression):(s.name=n.qDef.qDef,s.label=function(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qLabel?t.qLabel:t.qDef}(n)));break;default:throw new Error('columnType should be "dimension" or "measure"')}return s}const oe={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}};function ae(e,t,n,r){var i=t.type,o=e.color,a=o.mode,s=X.getItemLabel(t);switch(ne(e,s||""),i){case"field":a="byDimension",o.byDimDef={label:t.label||X.wrapFieldName(t.name),key:X.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":a="byMeasure",o.byMeasureDef={label:s,key:t.name,type:"expression",activeMeasureIndex:t.activeMeasureIndex};break;case"dimension":a="byDimension",o.byDimDef={label:t.name,key:t.id,type:"libraryItem",activeDimensionIndex:t.activeDimensionIndex};break;case"measure":a="byMeasure",o.byMeasureDef={label:t.name,key:t.id,expression:t.expression,type:"libraryItem",activeMeasureIndex:t.activeMeasureIndex},o.formatting&&oe.useMasterNumberFormat(o.formatting)}o.auto=!1,o.mode=a}function se(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byDimDef");if(a&&ne(e,a.label),function(e){return!!(e&&e.activeDimensionIndex>-1)}(a))!function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"color.byDimDef");r.activeDimensionIndex=Math.min(r.activeDimensionIndex,n.length-1);var i=ie("dimension",!1,n[r.activeDimensionIndex]);i.activeDimensionIndex=r.activeDimensionIndex,ae(e,i)}(e,t);else if(function(e){return!e||!e.key}(a)&&function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=n[function(e,t,n){var r=o.getValue(t,"visualization"),i=n.split("."),a=Number(i[1]),s=o.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===r&&"point"===s}(n,e,t)?0:n.length-1],i=K.IDMAP.COLOR_BY_ALTERNATIVE,a=d.findItemByPropertyValue(r.qAttributeDimensions,"id",i);return ae(e,ie("dimension",!!a,a||r)),!!a}(e,t))return;re({properties:e,isDimension:!0,dimensions:n,excludedDimensions:i,measures:r,label:o.getValue(e,"color.byDimDef.label")})}const le=function(e,t,n){o.setValue(e,t,n),o.isAtomicValue(n)&&function(e,t,n){var r=e.qLayoutExclude;r&&(r.changed||(r.changed={}),r.changed[t]={from:o.getValue(e,t),to:n})}(e,t,n)},ue=function(e,t){var n={primary:!0};if(e){var r=(Q[t]||J).colorModeOptions||J.colorModeOptions;n.byDimension=r.dimension(e),n.byMeasure=r.measure(e),n.byMultiple=r.multiColor(e),n.byExpression=r.expression(e)}return n},ce=function(e){var t=e.canColorBy,n=e.autoColor,r=e.colorMode,i=e.dimensions;return!(t[r]&&!n&&("byDimension"!==r&&"byMeasure"!==r||!i.length))},de=function(e,t){var n,r=o.getValue(e,"color.mode"),i=o.getValue(e,"color.auto"),a=o.getValue(e,"".concat(t,"qDimensions"),[]),s=o.getValue(e,"".concat(t,"qMeasures"),[]),l=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);i?te(a,l):!(n={auto:i,colorMode:r,dimensions:a}).auto&&"byDimension"===n.colorMode&&n.dimensions.length>0?se(e,t):function(e){var t=e.auto,n=e.colorMode,r=e.dimensions,i=e.measures,a=e.properties,s=o.getValue(a,"visualization");return!(t||"byMeasure"!==n||!r.length||"map"!==s&&!i.length)}({auto:i,colorMode:r,dimensions:a,measures:s,properties:e})?function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byMeasureDef");if(a&&ne(e,a.label),function(e){return!!(e&&e.activeMeasureIndex>-1)}(a))!function(e,t){var n=o.getValue(e,"".concat(t,"qMeasures"),[]),r=o.getValue(e,"color.byMeasureDef");if(r.activeMeasureIndex=Math.min(r.activeMeasureIndex,n.length-1),r.activeMeasureIndex>-1){var i=ie("measure",!1,n[r.activeMeasureIndex],!0);i.activeMeasureIndex=r.activeMeasureIndex,ae(e,i)}}(e,t);else if(function(e,t){return(!e||!e.key)&&t.length>0}(a,r)&&function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=n[n.length-1],a=K.IDMAP.COLOR_BY_ALTERNATIVE,s=d.findItemByPropertyValue(i.qAttributeExpressions,"id",a);return ae(e,ie("measure",!!s,s||r[0])),!!s}(e,t))return;re({properties:e,isDimension:!1,dimensions:n,excludedDimensions:i,measures:r,label:o.getValue(e,"color.byMeasureDef.label")})}(e,t):function(e,t){var n=o.getValue(e,"color.mode"),r=o.getValue(e,"".concat(t,"qDimensions"),[]),i=o.getValue(e,"".concat(t,"qMeasures"),[]),a=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===n&&i.length<2&&o.setValue(e,"color.mode","primary"),te(r,a)}(e,t)},pe=function(e){e.forEach(function(e){e.qOtherTotalSpec&&"qTotalMode"in e.qOtherTotalSpec&&delete e.qOtherTotalSpec.qTotalMode})},fe=function(e){var t=e.shouldUpdateColorBy,n=e.properties,r=o.getValue(n,"qHyperCubeDef.qMeasures",[]),i=o.getValue(n,"color.mode","");return!t&&"byExpression"===i&&r.length>0},he=function(e){var t=o.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),n=o.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:n,id:"colorByExpression"}),o.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)},me=function(e){o.setValue(e,"color.mode","primary"),o.setValue(e,"color.auto",!0)},ge=function(e){var t=o.getValue(e,"qHyperCubeDef.qDimensions",[]),n=o.getValue(e,"color.persistent",!1);return t.length>1&&!n},ve={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=B.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),o=i.data[0],a=o.dimensions.concat(o.excludedDimensions),s=o.measures.concat(o.excludedMeasures),l=K.IDMAP,u=l.COLOR_BY_ALTERNATIVE,c=l.COLOR_BY_EXPRESSION;return K.moveByIdFromGroup(a,[],"qAttributeDimensions",u),K.moveByIdFromGroup(a,[],"qAttributeExpressions",u),K.moveByIdFromGroup(s,[],"qAttributeExpressions",c),i},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,i=e.defaultPropertyValues,a=e.hypercubePath,s=e.extension,l=e.supportedFilters,u=e.isHCModifierSupported,c=B.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:i,hypercubePath:a,extension:s,supportedFilters:l,isHCModifierSupported:u}),d=c.qProperty,p=o.getValue(d,"visualization"),f=o.getValue(d,"qHyperCubeDef.qDimensions",[]),h=o.getValue(d,"color.mode",""),m=o.getValue(d,"color.auto",""),g=ue(d,p),v=ce({canColorBy:g,autoColor:m,colorMode:h,dimensions:f});return g[h]?fe({shouldUpdateColorBy:v,properties:d})&&he(d):me(d),v&&de(d,"qHyperCubeDef."),ge(d)&&le(d,"color.persistent",!0),pe(f),c}};var ye=["bar","marker","line"];const be=function(e){var t=e.initialProperties,n=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?V(n,"unsupportedAutoMinMax")||w()(n.measureAxis,t.measureAxis):V(n,"supportedAutoMinMax")||w()(n.measureAxis,t.measureAxis)},xe=function(e){var t,n=e.exportFormat,r=e.initialProperties,i=e.properties,o=e.measureType,a=i.qHyperCubeDef,s=i.measureAxis;if(function(e){var t=e.initialProperties;return!(!e.exportFormat.properties.measureAxes||t.measureAxes||!t.measureAxis||void 0===t.measureAxis.autoMinMax)}({exportFormat:n,initialProperties:r})){var l=function(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach(function(e){if(e.qDef.series){var n=e.qDef.series,r=n.type,i=n.axis;t[i]||(t[i]={axis:i,type:{line:0,marker:0,bar:0,total:0}}),ye.includes(r)&&t[i].type[r]++,t[i].type.total++}}),t}(a);l.length?(o&&(t=l.filter(function(e){return e.type[o]>0}).sort(function(e,t){return t.type[o]-e.type[o]})),t&&t.length||(t=l.sort(function(e,t){return t.type.total-e.type.total})),t&&t[0]&&w()(s,n.properties.measureAxes[t[0].axis])):w()(s,n.properties.measureAxes[0])}},Se=function(e){if(e.qDimensions.length>1){var t=e.qInterColumnSortOrder.indexOf(0);if(0!==t){var n=e.qInterColumnSortOrder[0];e.qInterColumnSortOrder[0]=0,e.qInterColumnSortOrder[t]=n}}},we={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=e.supportedAutoMinMax,o=void 0===i||i,a=ve.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),s=a.properties;return o?(x(s,"measureAxis.min","supportedAutoMinMax"),x(s,"measureAxis.max","supportedAutoMinMax")):(x(s,"measureAxis.min","unsupportedAutoMinMax"),x(s,"measureAxis.max","unsupportedAutoMinMax")),a},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,i=e.defaultPropertyValues,o=e.hypercubePath,a=e.measureType,s=e.extension,l=e.supportedFilters,u=e.isHCModifierSupported,c=ve.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:i,hypercubePath:o,extension:s,supportedFilters:l,isHCModifierSupported:u}),d=c.qProperty;return be({initialProperties:n,properties:d}),xe({exportFormat:t,initialProperties:n,properties:d,measureType:a}),Se(d.qHyperCubeDef),d.qHyperCubeDef.qColumnOrder=[],d.qHyperCubeDef.columnOrder=[],c}};function Ce(e,t,n){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(n)}function Ee(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,n,[]).forEach(function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,a);if(void 0!==s){var l=o.getValue(i,"qDef.cId");l||(l=o.generateId(),o.setValue(i,"qDef.cId",l));var u=Ce(n,r,l);o.setValue(t,u,s),o.setValue(i,a,void 0)}}({properties:t,quarantineName:r,arrayName:i,item:e,itemPath:a})})}function Ie(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,n,[]).forEach(function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,"qDef.cId");if(s){var l=Ce(n,r,s),u=o.getValue(t,l);void 0!==u&&(o.setValue(i,a,u),o.setValue(t,l,void 0))}}({properties:t,quarantineName:r,arrayName:i,item:e,itemPath:a})})}var De="qHyperCubeDef.qMeasures",Re="conditionalColoring",Pe="measures",Me="qDef.conditionalColoring";const Le={quarantine:function(e){Ee({properties:e,arrayPath:De,quarantineName:Re,arrayName:Pe,itemPath:Me})},unquarantine:function(e){Ie({properties:e,arrayPath:De,itemPath:Me,arrayName:Pe,quarantineName:Re})}};var Ae="qHyperCubeDef.qMeasures",ke="measures",Oe="qHyperCubeDef.qDimensions",qe="dimensions",Te="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",Ne="alternativeMeasures",je="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",_e="alternativeDimensions",Fe="qCalcCondition",ze="conditionalShowHide";const We={quarantine:function(e){Ee({properties:e,arrayPath:Ae,quarantineName:ze,arrayName:ke,itemPath:Fe}),Ee({properties:e,arrayPath:Oe,quarantineName:ze,arrayName:qe,itemPath:Fe})},unquarantine:function(e){Ie({properties:e,arrayPath:Ae,quarantineName:ze,arrayName:ke,itemPath:Fe}),Ie({properties:e,arrayPath:Oe,quarantineName:ze,arrayName:qe,itemPath:Fe})},quarantineAlternative:function(e){Ee({properties:e,arrayPath:Te,quarantineName:ze,arrayName:Ne,itemPath:Fe}),Ee({properties:e,arrayPath:je,quarantineName:ze,arrayName:_e,itemPath:Fe})},unquarantineAlternative:function(e){Ie({properties:e,arrayPath:Te,quarantineName:ze,arrayName:Ne,itemPath:Fe}),Ie({properties:e,arrayPath:je,quarantineName:ze,arrayName:_e,itemPath:Fe})}},$e={hypercube:B,colorChart:ve,axisChart:we,quarantineProperty:x,unquarantineProperty:V,quarantineArrayProp:Ee,unquarantineArrayProp:Ie,conditionalColoring:Le,conditionalShow:We}})(),r.default})()}(oF);var aF=kr(oF.exports);const sF="qHyperCubeDef.qMeasures",lF="measures",uF="qHyperCubeDef.qDimensions",cF="dimensions",dF="qDef.representation",pF="tableRepresentation",fF="qDef.conditionalColoring",hF="conditionalColoring",mF="qMiniChartDef",gF="miniChartDef",vF=e=>{aF.unquarantineArrayProp({properties:e,arrayPath:uF,itemPath:dF,arrayName:cF,quarantineName:pF}),aF.unquarantineArrayProp({properties:e,arrayPath:sF,itemPath:dF,arrayName:lF,quarantineName:pF}),aF.unquarantineArrayProp({properties:e,arrayPath:sF,itemPath:fF,arrayName:lF,quarantineName:hF}),aF.unquarantineArrayProp({properties:e,arrayPath:sF,itemPath:mF,arrayName:lF,quarantineName:gF})},yF=e=>{aF.quarantineArrayProp({properties:e,arrayPath:uF,itemPath:dF,arrayName:cF,quarantineName:pF}),aF.quarantineArrayProp({properties:e,arrayPath:sF,itemPath:dF,arrayName:lF,quarantineName:pF}),aF.quarantineArrayProp({properties:e,arrayPath:sF,itemPath:fF,arrayName:lF,quarantineName:hF}),aF.quarantineArrayProp({properties:e,arrayPath:sF,itemPath:mF,arrayName:lF,quarantineName:gF})};function bF(e){const{translator:t}=e;return{targets:[{path:"/qHyperCubeDef",dimensions:{min:1,max:1e3,description(e,n,r){const i="rows"===r?.type?"Visualizations.Descriptions.Row":"Visualizations.Descriptions.Column";return t.get(i)}},measures:{min:1,max:1e3,description:()=>t.get("Visualizations.Descriptions.Values")},filters:{description:()=>t.get("SimpleProperties.Filters.Filter")}}]}}const xF="qHyperCubeDef.qDimensions",SF="dimensions",wF="qOtherTotalSpec.qTotalMode",CF="totalMode",EF={quarantine(e){aF.quarantineArrayProp({properties:e,arrayPath:xF,quarantineName:CF,arrayName:SF,itemPath:wF})},unquarantine(e){aF.unquarantineArrayProp({properties:e,arrayPath:xF,quarantineName:CF,arrayName:SF,itemPath:wF})}};function IF(e){const t=bF(e);return(e,n,r,i)=>{const o=aF.hypercube.importProperties({exportFormat:e,initialProperties:n,dataDefinition:t.targets[0],hypercubePath:i}),a=o.qProperty.qHyperCubeDef.qDimensions.length,s=o.qProperty.qHyperCubeDef.qMeasures.length;let l,u=o.qProperty.qHyperCubeDef.qInterColumnSortOrder,c=!0;a+s===u.length&&Zj(o,"qProperty.qLayoutExclude.quarantine.interColSortOrder",u.concat());const d=o.qProperty.qLayoutExclude.quarantine?.pivotInterColSortOrder;d?(u=d,l=[...d],Zj(o,"qProperty.qHyperCubeDef.qInterColumnSortOrder",u),o.qProperty.qLayoutExclude.quarantine&&delete o.qProperty.qLayoutExclude.quarantine.pivotInterColSortOrder):u.length=0;const p=+(u.indexOf(-1)>-1),f=a+p;if(f>u.length)for(let e=u.length;e<f;e++)u.indexOf(e)<0&&u.push(e-p);for(let e=u.length-1;e>=0;e--)u[e]>=a&&u.splice(e,1);s>1&&u.indexOf(-1)<0?u.push(-1):s<2&&u.indexOf(-1)>-1&&u.splice(u.indexOf(-1),1);const h=o.qProperty.qHyperCubeDef.qNoOfLeftDims??-1;if(a>0&&-1===h&&Zj(o,"qProperty.qHyperCubeDef.qNoOfLeftDims",a),l?.length===u.length){for(let e=0;e<l.length;e++)if(l[e]!==u[e]){c=!1;break}c&&(aF.unquarantineProperty(o.qProperty,"noOfLeftDims"),aF.unquarantineProperty(o.qProperty,"excludedNoOfLeftDims "))}return aF.unquarantineProperty(o.qProperty,"rankedList"),aF.conditionalShow.unquarantine(o.qProperty),EF.unquarantine(o.qProperty),vF(o.qProperty),aF.unquarantineProperty(o.qProperty,"pivotTableIndentMode"),o}}function DF(e,t){const n=e.qProperty.qHyperCubeDef.qInterColumnSortOrder,r=n.slice(),i=n.indexOf(-1);i>-1&&n.splice(i,1);const o=aF.hypercube.exportProperties({propertyTree:e,hyperCubePath:t}),a=o.properties.qHyperCubeDef,s=a.qDimensions.length,l=a.qMeasures.length;let u=a.qInterColumnSortOrder;Zj(o,"properties.qLayoutExclude.quarantine.pivotInterColSortOrder",r),aF.quarantineProperty(o.properties,"qHyperCubeDef.qNoOfLeftDims","noOfLeftDims"),delete o.properties.qHyperCubeDef.qNoOfLeftDims,aF.quarantineProperty(o.properties,"qHyperCubeDef.rankedList","rankedList"),delete o.properties.qHyperCubeDef.rankedList;const c=o.properties.qLayoutExclude.quarantine?.interColSortOrder;c&&(u=c,Zj(o,"properties.qHyperCubeDef.qInterColumnSortOrder",u),Zj(o,"data.0.interColumnSortOrder",u),o.properties.qLayoutExclude.quarantine&&delete o.properties.qLayoutExclude.quarantine.interColSortOrder);for(let e=u.length;e<s+l;e++)u.length<=e&&u.push(e);return aF.quarantineProperty(o.properties,"qHyperCubeDef.qIndentMode","pivotTableIndentMode"),aF.quarantineProperty(o.properties,"qHyperCubeDef.excludedNoOfLeftDims ","excludedNoOfLeftDims "),aF.conditionalShow.quarantine(o.properties),EF.quarantine(o.properties),yF(o.properties),o}const RF=e=>({dimensions:{min:1,max:1e3,description(t,n,r){const i="rows"===r?.type?"Visualizations.Descriptions.Row":"Visualizations.Descriptions.Column";return e.translator.get(i)}},measures:{min:1,max:1e3,description:()=>e.translator.get("Visualizations.Descriptions.Values")}}),PF=["rows","columns","measures"],MF=e=>{if(!e.flags.isEnabled("SUPPORT-9810-MIGRATE-RANKED-LISTS"))return;const t=new iF({path:"qHyperCubeDef"},e);return{properties:e=>(t.setProperties(e),PF.forEach(e=>{t.isRankedListCorrupt(e)&&t.createRankedList(e)}),e)}},LF={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}}}};let AF=function(e){return e.Text="text",e.Link="link",e.Image="image",e.ImagesInIndentMode="imagesInIndentMode",e.Indicator="indicator",e.MiniChart="miniChart",e.EditableText="editableText",e.EditableSelector="editableSelector",e}({}),kF=function(e){return e.Attribute="attribute",e.Dimension="dimension",e}({});const OF=e=>{switch(e?.type){case"url":return AF.Link;case"image":return AF.Image;case"indicator":return AF.Indicator;case"miniChart":return AF.MiniChart;default:return AF.Text}},qF=({isImagesEnabled:e})=>({uses:"dimensionRepresentationItems.representationType",options(t,n,r){const{qIndentMode:i}=r.properties.qHyperCubeDef,o=[{value:"text",translation:"Object.Table.Representation.Text"},{value:"url",translation:"Object.Table.Representation.Link"}];return(!i&&e||i)&&o.push({value:"image",translation:"Object.Table.Representation.Image"}),o}}),TF=e=>{if(e)return{representationImage:{uses:"dimensionRepresentationItems.representationImage",show:e=>OF(e.qDef.representation)===AF.Image,items:{imageSize:{options:[{value:"alwaysFit",translation:"properties.backgroundImage.sizeAlwaysFit"},{value:"fitWidth",translation:"properties.backgroundImage.sizeFitWidth"},{value:"fitHeight",translation:"properties.backgroundImage.sizeFitHeight"},{value:"fill",translation:"properties.backgroundImage.sizeStretch"},{value:"originalSize",translation:"properties.backgroundImage.originalSize"}]},imageBoxWidth:{ref:"qDef.representation.imageBox.width",translation:"properties.pivot.representation.image.imageBox.width",type:"number",expression:"optional",defaultValue:24,show:(e,t,n)=>{if(!n.properties.qHyperCubeDef)return!1;const{qInterColumnSortOrder:r,qNoOfLeftDims:i,qDimensions:o,qIndentMode:a}=n.properties.qHyperCubeDef;let s=!1;r?.indexOf(-1);const l=o?.indexOf(e)??1/0;return(r?.slice(0,i)??[]).indexOf(l)>-1&&(s=!0),s&&a}}}}}},NF=e=>{const{anything:t}=e,n=!t.sense?.isUnsupportedFeature?.("tableImages");return{representationType:qF({isImagesEnabled:n}),representationUrlPosition:{uses:"dimensionRepresentationItems.representationUrlPosition",show:e=>OF(e.qDef.representation)===AF.Link},representationUrlLabel:{uses:"dimensionRepresentationItems.representationUrlLabel",show:e=>OF(e.qDef.representation)===AF.Link&&e.qDef.representation?.urlPosition===kF.Dimension},representationLinkUrl:{uses:"dimensionRepresentationItems.representationLinkUrl",show:e=>OF(e.qDef.representation)===AF.Link&&e.qDef.representation?.urlPosition===kF.Attribute},...TF(n)}},jF=(e,t)=>{const{anything:n}=e,r=n.sense?.isUnsupportedFeature,i=!r?.("tableImages")&&t[AF.Image],o=!r?.("qMiniChartDef")&&t[AF.MiniChart],a=!r?.("tableIndicators")&&t[AF.Indicator],s=i&&t[AF.ImagesInIndentMode];return{representationType:{uses:"measureRepresentationItems.representationType",options:(e,t,n)=>(e=>{const{qIndentMode:t}=e.properties.qHyperCubeDef??{},n=[{value:"text",translation:"Object.Table.Representation.Text"}];return(!t&&i||t&&s)&&n.push({value:"image",translation:"Object.Table.Representation.Image"}),a&&n.push({value:"indicator",translation:"Object.Table.Representation.Indicator"}),o&&n.push({value:"miniChart",translation:"Common.MiniChart"}),n})(n)},representationImage:i?{uses:"measureRepresentationItems.representationImage",show:e=>OF(e.qDef.representation)===AF.Image,items:{imageSize:{options:[{value:"alwaysFit",translation:"properties.backgroundImage.sizeAlwaysFit"},{value:"fitWidth",translation:"properties.backgroundImage.sizeFitWidth"},{value:"fitHeight",translation:"properties.backgroundImage.sizeFitHeight"},{value:"fill",translation:"properties.backgroundImage.sizeStretch"},{value:"originalSize",translation:"properties.backgroundImage.originalSize"}]}}}:void 0,representationIndicator:a?{uses:"measureRepresentationItems.representationIndicator"}:void 0,representationMiniChart:o?{uses:"measureRepresentationItems.representationMiniChart"}:void 0}};let _F=function(e){return e.Dimension="dimensions",e.Measures="measures",e.Pivot="pivot",e}({}),FF=function(e){return e.CellForegroundColor="cellForegroundColor",e.CellBackgroundColor="cellBackgroundColor",e.ImageUrl="imageUrl",e.ImageLabel="imageLabel",e.Link="url",e.LinkLabel="urlLabel",e}({}),zF=function(e){return e.TopGrid="topGrid",e.LeftGrid="leftGrid",e.DataGrid="dataGrid",e}({}),WF=function(e){return e.Forward="forward",e.Backward="backward",e.None="none",e}({});const $F="image",HF=(e,t,n)=>{if(!n.properties.qHyperCubeDef.qIndentMode)return!0;const r=n.properties.qHyperCubeDef.qInterColumnSortOrder?.indexOf(-1)??-1;let i=n.properties.qHyperCubeDef.qNoOfLeftDims??-1;r>-1&&r<i&&(i-=1);const o=n.properties.qHyperCubeDef.qDimensions.indexOf(e);return 0===o||o>=i},VF=()=>({type:{type:"string",component:"dropdown",ref:"qDef.columnWidth.type",translation:"Object.Table.Column.Width",options:[{value:LT.Auto,translation:"Common.Auto"},{value:LT.FitToContent,translation:"Object.Table.Column.FitToContent"},{value:LT.Pixels,translation:"Object.Table.Column.Pixels"},{value:LT.Percentage,translation:"Object.Table.Column.Percentage"}],defaultValue:LT.Auto},sizePixels:{ref:"qDef.columnWidth.pixels",translation:"Object.Table.Column.Pixels",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:MT.PixelsDefault,show:e=>e.qDef.columnWidth?.type===LT.Pixels},sizePercentage:{ref:"qDef.columnWidth.percentage",translation:"Object.Table.Column.Percentage",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:MT.PercentageDefault,show:e=>e.qDef.columnWidth?.type===LT.Percentage}}),BF=({key:e,translation:t,env:n})=>{const r=!n.anything.sense?.isUnsupportedFeature?.("tableImages");return{[`${e}Auto`]:{ref:`qDef.${e}.auto`,type:"boolean",component:"switch",translation:t,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}],defaultValue:!0,show:t=>!r||"labelTextAlign"===e||t.qDef.representation?.type!==$F},[e]:{ref:`qDef.${e}.align`,type:"string",component:"item-selection-list",horizontal:!0,items:[{component:"icon-item",icon:"align_left",labelPlacement:"bottom",value:"left",translation:"properties.dock.left"},{component:"icon-item",icon:"align_center",labelPlacement:"bottom",value:"center",translation:"Common.Center"},{component:"icon-item",icon:"align_right",labelPlacement:"bottom",value:"right",translation:"properties.dock.right"}],defaultValue:"left",show:t=>void 0!==t.qDef[e]&&!t.qDef[e].auto&&(!r||"labelTextAlign"===e||t.qDef.representation?.type!==$F)}}},GF="TOTAL_OFF",UF={component:"attribute-expression-reference",defaultValue:[],ref:"qAttributeExpressions",items:[{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.BackgroundExpression",defaultValue:"",id:FF.CellBackgroundColor},{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.ForegroundExpression",defaultValue:"",id:FF.CellForegroundColor},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:FF.LinkLabel,tid:"URLLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:FF.Link,tid:"URLByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:FF.ImageLabel,tid:"ImageLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:FF.ImageUrl,tid:"ImageUrlByExpression",show:!1}]},YF="TOTAL_OFF",KF={component:"attribute-expression-reference",defaultValue:[],ref:"qAttributeExpressions",items:[{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.BackgroundExpression",defaultValue:"",id:FF.CellBackgroundColor},{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.ForegroundExpression",defaultValue:"",id:FF.CellForegroundColor},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:FF.LinkLabel,tid:"URLLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:FF.Link,tid:"URLByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:FF.ImageLabel,tid:"ImageLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:FF.ImageUrl,tid:"ImageUrlByExpression",show:!1}]},XF=e=>{const{translator:t,anything:n,flags:r}=e,i=(e=>{const{translator:t,anything:n}=e;return{type:"items",component:"data-assets-panel-pivot",translation:"Common.Data",items:{dimensions:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qDimensions",items:{field:{type:"items",translation:"Common.Field",items:{libraryId:{type:"string",component:"library-item",libraryItemType:"dimension",ref:"qLibraryId",translation:"Common.Dimension",show:e=>!!e.qLibraryId},inlineDimension:{component:"inline-dimension",show:e=>!e.qLibraryId},autoSort:{ref:"qDef.autoSort",type:"boolean",defaultValue:!0,show:!1},cId:{ref:"qDef.cId",type:"string",show:!1},nullSuppression:{type:"boolean",ref:"qNullSuppression",defaultValue:!1,translation:"properties.dimensions.showNull",inverted:!0},totalMode:{type:"string",component:"switch",translation:"properties.showTotals",ref:"qOtherTotalSpec.qTotalMode",defaultValue:GF,trueOption:{value:"TOTAL_EXPR",translation:"properties.on"},falseOption:{value:GF,translation:"properties.off"},show:!n.sense?.isUnsupportedFeature?.("totals")&&HF},totalsLabel:{type:"string",component:"expression",expressionType:"StringExpr",ref:"qTotalLabel",translation:"properties.totals.label",defaultValue:()=>t.get("Object.Table.Totals"),show:(e,t,r)=>!n.sense?.isUnsupportedFeature?.("totals")&&e.qOtherTotalSpec?.qTotalMode!==GF&&HF(e,0,r)},dimensionLimits:{uses:"dimensions.items.dimensionLimits"},showOthers:{uses:"dimensions.items.others"},globalGrouping:{type:"boolean",translation:"properties.dimensionLimits.globalGrouping",ref:"qOtherTotalSpec.qGlobalOtherGrouping",defaultValue:!1,show:e=>"OTHER_OFF"!==e.qOtherTotalSpec?.qOtherMode}}},presentation:{type:"items",translation:"properties.presentation",items:{visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Table.Columns.VisibilityCondition",defaultValue:{qv:""},isExpression:e=>"string"==typeof e&&e.trim().length>0},cellColoring:UF,...BF({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...BF({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...NF(e),...VF()}}}},measures:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qMeasures",items:{field:{type:"items",translation:"Common.Field",items:{libraryId:{type:"string",component:"library-item",libraryItemType:"measure",ref:"qLibraryId",translation:"Common.Measure",show:e=>!!e.qLibraryId},inlineMeasure:{component:"inline-measure",show:e=>!e.qLibraryId},autoSort:{ref:"qDef.autoSort",type:"boolean",defaultValue:!0,show:!1},cId:{ref:"qDef.cId",type:"string",show:!1},numberFormatting:{uses:"measures.items.numberFormatting"}}},presentation:{type:"items",translation:"properties.presentation",items:{visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Table.Columns.VisibilityCondition",defaultValue:{qv:""},isExpression:e=>"string"==typeof e&&e.trim().length>0},cellColoring:UF,...BF({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...BF({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...jF(e,{[AF.Image]:!0,[AF.Indicator]:!0}),...VF()}}}},filter:{type:"object",component:"filter-item-react",ref:"filter",tabName:"SimpleProperties.Filters.Filters"}}}})(e);return r.isEnabled("CLIENT_IM5974_PIVOT_DATA_PROPERTIES")?i:{type:"items",component:"pivot-data",translation:"properties.data",addTranslation:"Property.AddData",items:{dimensions:{type:"array",component:"dimensions",translation:"Common.Dimensions",alternativeTranslation:"properties.alternative.dimensions",ref:"qHyperCubeDef.qDimensions",disabledRef:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",min:1,allowAdd:!0,allowRemove:!0,allowMove:!0,addTranslation:"properties.dimensions.add",grouped:!0,items:{libraryId:{type:"string",component:"library-item",libraryItemType:"dimension",ref:"qLibraryId",translation:"Common.Dimension",show:e=>!!e.qLibraryId},inlineDimension:{component:"inline-dimension",show:e=>!e.qLibraryId},autoSort:{ref:"qDef.autoSort",type:"boolean",defaultValue:!0,show:!1},cId:{ref:"qDef.cId",type:"string",show:!1},nullSuppression:{type:"boolean",ref:"qNullSuppression",defaultValue:!1,translation:"properties.dimensions.showNull",inverted:!0},totalMode:{type:"string",component:"switch",translation:"properties.showTotals",ref:"qOtherTotalSpec.qTotalMode",defaultValue:YF,trueOption:{value:"TOTAL_EXPR",translation:"properties.on"},falseOption:{value:YF,translation:"properties.off"},show:!n.sense?.isUnsupportedFeature?.("totals")&&HF},totalsLabel:{type:"string",component:"expression",expressionType:"StringExpr",ref:"qTotalLabel",translation:"properties.totals.label",defaultValue:()=>t.get("Object.Table.Totals"),show:(e,t,r)=>!n.sense?.isUnsupportedFeature?.("totals")&&e.qOtherTotalSpec?.qTotalMode!==YF&&HF(e,0,r)},dimensionLimits:{uses:"dimensions.items.dimensionLimits"},showOthers:{uses:"dimensions.items.others"},globalGrouping:{type:"boolean",translation:"properties.dimensionLimits.globalGrouping",ref:"qOtherTotalSpec.qGlobalOtherGrouping",defaultValue:!1,show:e=>"OTHER_OFF"!==e.qOtherTotalSpec?.qOtherMode},visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Table.Columns.VisibilityCondition",defaultValue:{qv:""},isExpression:e=>"string"==typeof e&&e.trim().length>0},cellColoring:KF,...BF({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...BF({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...NF(e),...VF()}},measures:{type:"array",component:"measures",translation:"Common.Measures",ref:"qHyperCubeDef.qMeasures",disabledRef:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",min:1,allowAdd:!0,allowRemove:!0,allowMove:!0,addTranslation:"properties.measures.add",grouped:!0,items:{libraryId:{type:"string",component:"library-item",libraryItemType:"measure",ref:"qLibraryId",translation:"Common.Measure",show:e=>!!e.qLibraryId},inlineMeasure:{component:"inline-measure",show:e=>!e.qLibraryId},autoSort:{ref:"qDef.autoSort",type:"boolean",defaultValue:!0,show:!1},cId:{ref:"qDef.cId",type:"string",show:!1},numberFormatting:{uses:"measures.items.numberFormatting"},visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Table.Columns.VisibilityCondition",defaultValue:{qv:""},isExpression:e=>"string"==typeof e&&e.trim().length>0},cellColoring:KF,...BF({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...BF({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...jF(e,{[AF.Image]:!0,[AF.ImagesInIndentMode]:!0,[AF.Indicator]:!0}),...VF()}},filters:{type:"items",translation:"SimpleProperties.Filters.Filters",ref:"filters",allowAdd:!0,allowRemove:!0,allowMove:!1,addTranslation:"properties.filters.add",grouped:!0,items:{filter:{type:"object",component:"filter-item",ref:"filter"}}}}}},JF=(e,t,n,r)=>({ref:e,translation:t,dualOutput:!0,type:"object",component:"color-picker",width:"auto",disableNone:r??!1,defaultValue(e,t,i){const o=r?.(e,t,i)??!1,a=i.theme.current(),s=n(a,o);return{color:"transparent"===s?"none":s}}}),ZF=(e,t=!1)=>{return{value:e,label:t?(n=e,n.charAt(0).toUpperCase()+n.slice(1)):e,groupHeader:!1,disabled:!1,styles:t?{fontFamily:e}:void 0};var n},QF=({ref:e,themeAccessor:t,translator:n,flags:r})=>({component:"dropdown",ref:e,options:(e,i,o)=>{const a=o.theme.current();return((e,t,n,r)=>{const i=t.fontFamily??"Source Sans Pro, sans-serif",o=t.fontFamilies??[],a=Array.from(new Set([e,i,...o])),s=[{value:"ThemeHeader",label:n.get("properties.themeFonts"),metaText:n.get("properties.theme"),groupHeader:!0},...a.sort().map(e=>ZF(e,!0))],l=[{value:"DefaultHeader",label:n.get("properties.allFonts"),metaText:n.get("properties.default"),groupHeader:!0},...UN(r).filter(e=>!a.includes(e)).map(e=>ZF(e,!0))];return[...s,...l.length>1?l:[]]})(t(a),a,n,r)},defaultValue:(e,n,r)=>t(r.theme.current())}),ez=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],tz=({ref:e,themeAccessor:t,translator:n})=>({component:"dropdown",ref:e,options:(e,r,i)=>{const o=i.theme.current();return((e,t,n)=>{const r=t.fontSize,i=t.fontSizes??[],o=Array.from(new Set([e,r,...i])),a=[{value:"ThemeHeader",label:n.get("properties.themeFontSizes"),metaText:n.get("properties.theme"),groupHeader:!0},...o.sort((e,t)=>parseInt(e,10)-parseInt(t,10)).map(e=>ZF(e,!1))],s=[{value:"DefaultHeader",label:n.get("properties.allFontSizes"),metaText:n.get("properties.default"),groupHeader:!0},...ez.filter(e=>!o.includes(e)).map(e=>ZF(e,!1))];return[...a,...s.length>1?s:[]]})(t(o),o,n)},defaultValue:(e,n,r)=>t(r.theme.current())}),nz=({section:e,defaultFontStyle:t,translator:n,flags:r,getThemeValue:i,translation:o,disableNoneCallback:a})=>({component:"panel-section",translation:o??`properties.pivot.${e}`,items:{content:{component:"items",ref:"components",key:"theme",items:{fontFamily:QF({ref:`${e}.fontFamily`,themeAccessor:t=>i(t,e,"fontFamily")??t.fontFamily,translator:n,flags:r}),fontWrapperItem:{component:"inline-wrapper",items:{fontStyle:{component:"font-style-buttons",width:!1,ref:`${e}.fontStyle`,defaultValue:t??[]},fontSize:tz({ref:`${e}.fontSize`,themeAccessor:t=>i(t,e,"fontSize")??t.fontSize,translator:n}),fontColor:JF(`${e}.fontColor`,void 0,t=>i(t,e,"color")??t.color)}},background:JF(`${e}.background`,"properties.background",(t,n)=>{const r=n?gN.WHITE:gN.TRANSPARENT;return i(t,e,"backgroundColor")??r},a)}}}}),rz=({section:e,defaultFontStyle:t,fallbackBackground:n,getThemeValue:r})=>({component:"panel-section",translation:`properties.pivot.${e}`,items:{content:{component:"items",ref:"components",key:"theme",items:{fontWrapperItem:{component:"inline-wrapper",items:{fontStyle:{component:"font-style-buttons",fullWidth:!0,ref:`${e}.fontStyle`,defaultValue:t??[]},fontColor:JF(`${e}.fontColor`,void 0,t=>r(t,e,"color")??t.color)}},background:JF(`${e}.background`,"properties.background",t=>r(t,e,"backgroundColor")??n??"transparent")}}}}),iz=(e,t)=>({component:"dropdown",ref:e,translation:t,options:[...Array(10).keys()].map(e=>({value:e+1,translation:e+1})),defaultValue:1}),oz="12px",az="Source Sans Pro, sans-serif",sz="600",lz=15e3,uz=4/3;let cz=function(e){return e.Transparent="transparent",e.FontSecondary="#737373",e.DividerDark="#595959",e.DividerLight="#D9D9D9",e.NullValueBackground="#F2F2F2",e}({}),dz=function(e){return e.Solid="solid",e.None="none",e}({});const pz={display:"flex",justifyContent:"center",alignItems:"center"},fz={borderStyle:"solid"},hz={boxSizing:"border-box",padding:"4px 8px",userSelect:"none",WebkitUserSelect:"none"},mz={lineHeight:uz,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},gz=e=>({whiteSpace:"unset",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",wordBreak:e>1?"break-word":"break-all"}),vz=(e,t)=>e>0?`${e}px ${dz.Solid} ${t}`:dz.None,yz=(e,t,n,r,i)=>{const o=Number(!t||i?.right),a=Number(!e||i?.bottom);return{borderRight:"rtl"!==r?vz(o,n):dz.None,borderBottom:vz(a,n),borderLeft:"rtl"===r?vz(o,n):dz.None,borderTop:dz.None}},bz=(e,t,n,r,i,o,a)=>{const s=yz(t,r,i,o,a);return e.isLeftDimension||(e.isLastDimension&&!t&&(s.borderBottom=vz(2,i)),n||(s.borderLeft="rtl"!==o?vz(1,i):"none",s.borderRight="rtl"===o?vz(1,i):"none")),s},xz=({bottomDivider:e,rightDivider:t,borderColor:n})=>{const r={};return e&&(r.borderBottom=vz(1,n)),t&&(r.borderRight=vz(1,n)),r},Sz=(e,t,n)=>{switch(t){case"header":return e.object?.pivotTableV2?.dimension?.label?.name?.[n];case"dimensionValues":return e.object?.pivotTableV2?.dimension?.label?.value?.[n];case"measureLabels":return e.object?.pivotTableV2?.measure?.label?.name?.[n];case"measureValues":return e.object?.pivotTableV2?.measure?.label?.value?.[n];case"totalValues":return e.object?.pivotTableV2?.total?.label?.value?.[n];case"nullValues":return e.object?.pivotTableV2?.null?.label?.value?.[n];default:return}},wz=(e,t)=>({type:"items",items:[{component:"styling-panel",chartTitle:"Object.PivotTable",subtitle:"LayerStyleEditor.component.styling",translation:"LayerStyleEditor.component.styling",ref:"components",useGeneral:!0,useBackground:!0,items:{headerSection:nz({section:"header",defaultFontStyle:["bold"],translator:e,flags:t,getThemeValue:Sz}),dimensionValueSection:nz({section:"dimensionValues",translator:e,flags:t,getThemeValue:Sz}),measureValueSection:nz({section:"measureValues",translator:e,flags:t,getThemeValue:Sz}),measureLabelSection:rz({section:"measureLabels",getThemeValue:Sz}),totalValuesSection:rz({section:"totalValues",defaultFontStyle:["bold"],getThemeValue:Sz}),nullValuesSection:rz({section:"nullValues",fallbackBackground:cz.NullValueBackground,getThemeValue:Sz}),gridSection:{translation:"properties.pivot.grid",component:"panel-section",items:{gridItems:{component:"items",ref:"components",key:"theme",items:{lineClamp:iz("grid.lineClamp","ThemeStyleEditor.style.rowHeight"),columnLineClamp:iz("grid.columnLineClamp","ThemeStyleEditor.style.columnHeight"),border:JF("grid.border","properties.border",e=>e.object?.pivotTableV2?.grid?.borderColor??cz.DividerLight),divider:JF("grid.divider","properties.pivot.divider",e=>e.object?.pivotTableV2?.grid?.divider?.borderColor??cz.DividerDark),background:JF("grid.background","properties.background",e=>e.object?.pivotTableV2?.grid?.backgroundColor??cz.Transparent)}}}}}}]}),Cz=e=>{if(e.isEnabled("CLIENT_IM_5973_PIVOT_TABLE_EXPLORATION"))return{chartExploration:{type:"items",translation:"properties.chartExploration",items:{chartExplorationToggler:{type:"items",component:"chart-exploration-toggler",translation:"properties.enableChartExploration",ref:"enableChartExploration"},visibilityToggler:{show:e=>e.enableChartExploration,component:"buttongroup",translation:"properties.ChartExploration.VisibilityOption",ref:"chartExploration.menuVisibility",options:[{value:"auto",translation:"Common.Auto"},{value:"minimized",translation:"properties.ChartExploration.Minimized"}]}},show:e=>!e.insideContainer}}},Ez=(e,t)=>({uses:"settings",items:{presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:[wz(e,t),{type:"items",items:{nullValueText:{ref:"nullValueRepresentation.text",type:"string",translation:"properties.pivot.nullValueText",defaultValue:"-"},alwaysFullyExpanded:{ref:"qHyperCubeDef.qAlwaysFullyExpanded",type:"boolean",translation:"properties.pivot.fullyExpanded",defaultValue:!1},indentMode:{ref:"qHyperCubeDef.qIndentMode",type:"boolean",translation:"properties.pivot.indentMode",defaultValue:!1,change(e){e.qHyperCubeDef.qShowTotalsAbove=!0}},type:{type:"string",component:"dropdown",ref:"qHyperCubeDef.indentModeColumnWidth.type",translation:"Object.Table.Column.Width",options:[{value:LT.Auto,translation:"Common.Auto"},{value:LT.Pixels,translation:"Object.Table.Column.Pixels"},{value:LT.Percentage,translation:"Object.Table.Column.Percentage"}],defaultValue:LT.Auto,show:e=>!!e.qHyperCubeDef.qIndentMode},sizePixels:{ref:"qHyperCubeDef.indentModeColumnWidth.pixels",translation:"Object.Table.Column.Pixels",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:MT.PixelsDefault,show:e=>{const t=e.qHyperCubeDef;return t.qIndentMode&&t.indentModeColumnWidth?.type===LT.Pixels}},sizePercentage:{ref:"qHyperCubeDef.indentModeColumnWidth.percentage",translation:"Object.Table.Column.Percentage",component:"expression",expressionType:"ValueExpression",expression:"optional",defaultValue:MT.PercentageDefault,show:e=>{const t=e.qHyperCubeDef;return t.qIndentMode&&t.indentModeColumnWidth?.type===LT.Percentage}},showTotalsAbove:{ref:"qHyperCubeDef.qShowTotalsAbove",type:"boolean",translation:"properties.pivot.showTotalsAbove",defaultValue:!0,show(e){const{qIndentMode:t}=e.qHyperCubeDef;return!t&&!!e.qHyperCubeDef.qDimensions.some(e=>"TOTAL_EXPR"===e.qOtherTotalSpec?.qTotalMode)}},resetProperties:{type:"object",component:"button",translation:"properties.pivot.resetExpansionButton",disabled:e=>!!e.qHyperCubeDef.qAlwaysFullyExpanded,action(e,t,n,r){e.qHyperCubeDef.qExpansionState=[],r.$emit("saveProperties",e)}}}}]},...Cz(t)}}),Iz="auto",Dz={type:"items",translation:"properties.sorting",items:{sortbyY:{type:"items",items:{sortbyYToggle:{ref:"qHyperCubeDef.qSortbyYValue",type:"boolean",component:"switch",translation:"properties.sorting.sortByY.label",convertFunctions:{get:e=>!!e("integer"),set:(e,t)=>{t("integer",e?-1:0)}},options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}]},sortbyYOrder:{ref:"qHyperCubeDef.qSortbyYValue",type:"string",component:"dropdown",defaultValue:0,options:[{value:1,translation:"properties.sorting.ascending"},{value:-1,translation:"properties.sorting.descending"}],show:e=>!!e.qHyperCubeDef.qSortbyYValue}}},defaultSorting:{uses:"sorting",items:{dimensions:{showPriority:!1,allowMove:!1},measures:{included:!1}}},searchSorting:{ref:"search.sorting",type:"string",component:"dropdown",defaultValue:Iz,translation:"Object.Table.SortingInSearch",options:[{value:Iz,translation:"Common.Auto"},{value:"inherit",translation:"Object.Table.SortingInSearch.InheritFromDimension"}]}}};function Rz(e){const{translator:t,flags:n}=e;return{type:"items",component:"accordion",items:{data:XF(e),sorting:Dz,addons:LF,settings:Ez(t,n)}}}function Pz(e){return{support:{cssScaling:!0,snapshot:!0,export:!0,exploration:e.flags.isEnabled("CLIENT_IM_5973_PIVOT_TABLE_EXPLORATION"),sharing:!1,exportData:!0,viewData:!0},usePropertyHandler:"pivot-data",definition:Rz(e),importProperties:IF(e),exportProperties:DF,exploration:W_(e),data:RF(e),migrate:MF(e),propertyHandler:e.flags.isEnabled("VNA-147_NEBULA_PIVOT_DATA_HANDLERS")?t=>new iF(t,e):void 0}}const Mz=()=>{let e;return{promise:new Promise(t=>{e=t}),resolve:e}};function Lz(e,t){return P(()=>e,t)}const Az={},kz=e=>{const t=P(()=>({current:Az}),[]);return t.current=t.current===Az?e:t.current,t},Oz=e=>!!e&&0===LN(e).a,qz="#grid",Tz=(e,t)=>{const n=t?.closest(e);return n&&window.getComputedStyle(n).backgroundColor},Nz=(e,t,n,r,i)=>{const o=Tz(".qv-object .qv-inner-object",n),a=Tz(".qv-panel-sheet",n),s=Tz(qz,n)??a,l=(e=>{const t=e.components?.find(e=>"general"===e.key),n=t?.bgColor?.colorExpression,r=t?.bgColor?.color?.color,i=t?.bgColor?.useColorExpression;if(i&&n)return d_(n);if("none"===r)return"transparent";if(void 0===r)return;const o=LN(r);return o.setAlpha(t?.bgColor?.color?.alpha??o.a),o.getRGBA()})(e),u=r?.(t),c=i?.(t),d=l||u||o||c,p=Oz(d),f=!Oz(h=p?s:d)&&l_(h,gN.TEXT,gN.DARK_MODE_TEXT)===IN(gN.DARK_MODE_TEXT);var h;const m=((e,t,n,r=gN.WHITE)=>e&&!Oz(e)?e:Oz(t)?n&&!Oz(n)?n:r:t)(l,d,s);return{color:d,headerColor:m,isDark:f}},jz=(e,t,n,r)=>{const i=O(),o=((e,t={attributeFilter:["style"],childList:!1,subtree:!1})=>{const[n,r]=A([]);return k(()=>{let n;return e&&(n=new MutationObserver(e=>{r(e)}),n.observe(e,t)),()=>{n?.disconnect()}},[e,t]),n})(t.closest(qz),{attributeFilter:["style"],childList:!1,subtree:!1,attributeOldValue:!0}).filter(({oldValue:e})=>e?.includes("background")).map(({oldValue:e})=>e).join(",");return P(()=>({...i,background:Nz(e,i,t,n,r)}),[i.name(),t,n,r,e,o])};function _z(e,t){const n=P(()=>({isLoading:!0}),t),[r,i]=L(async()=>{try{return await e()}finally{n.isLoading=!1}},t);return[r,n.isLoading,i]}const Fz=3,zz=/\n/g;function Wz(e,t,n){let r=0,i=e.length;if(Number.isNaN(t))return null;if(e.length<=1)return null;if(n(e)<=t)return null;for(;r<=i;){const o=Math.floor((r+i)/2),a=e.slice(0,o),s=e.slice(0,o-1),l=n(a),u=n(s);if(l>t&&u<=t)return e.slice(o-1)||null;if(l===t)return e.slice(o)||null;l<t?r=o+1:i=o}return null}function $z({fontSize:e="12px",fontFamily:t="Source Sans Pro, Arial, sans-serif",fontStyle:n="normal",fontWeight:r="normal"},i){const{maxNbrLinesOfText:o=Fz,allowLineBreaks:a=!0}=i??{},{estimateWidth:s,measureText:l,estimateLineCount:u}=v(()=>(({fontSize:e="12px",fontFamily:t="Source Sans Pro, Arial, sans-serif",fontStyle:n="normal",fontWeight:r="normal"},i)=>{const{maxNbrLinesOfText:o=Fz,allowLineBreaks:a=!0}=i??{};return()=>{const i=document.createElement("canvas").getContext("2d");i.font=`${n} ${r} ${e} ${t}`;const s=i.measureText.bind(i),l=Qj(e=>{if(void 0===e)return 0;if(a){const t=e.split(zz).map(e=>s(e).width);return t.reduce((e,t)=>t>e?t:e,0)}const t=e.replace(zz," ");return s(t).width}),u=e=>+l(e).toFixed(2),c=Qj(({text:e,maxWidth:t,isNumeric:n=!1})=>{if(n)return 1;const r=a?e.split(zz):[e];let i=0;for(const e of r){let n=e;do{i+=1,n=Wz(n,t,u)}while(null!==n&&i<o);if(i>=o)break}return i},({text:e,maxWidth:t,isNumeric:n})=>`${e}-${t}-${n?"true":"false"}`);return{measureText:e=>l(e),estimateWidth:e=>l("N")*e,estimateLineCount:c}}})({fontStyle:n,fontWeight:r,fontSize:e,fontFamily:t},{maxNbrLinesOfText:o,allowLineBreaks:a})(),[n,r,e,t,o,a]);return{estimateWidth:s,measureText:l,estimateLineCount:u}}var Hz,Vz=E;Hz=Vz.createRoot,Vz.hydrateRoot;const Bz="Source Sans Pro, sans-serif";function Gz(e,t){const[n,r]=m(t);n.some((e,n)=>e!==t[n])&&(r(t),e())}var Uz={NebulaTableUtils_ColumnAdjuster_ColumnNameLabel:{id:"NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",locale:{"de-DE":"Breite von {0}","en-US":"Width of {0}","es-ES":"Ancho de {0}","fr-FR":"Largeur de {0}","it-IT":"Larghezza di {0}","ja-JP":"{0} の幅","ko-KR":"{0}의 너비","nl-NL":"Breedte van {0}","pl-PL":"Szerokość kolumny {0}","pt-BR":"Comprimento de {0}","ru-RU":'Ширина столбца "{0}"',"sv-SE":"Bredd på {0}","tr-TR":"{0} genişliği","zh-CN":"{0} 的宽度","zh-TW":"{0} 的寬度"}},NebulaTableUtils_MenuGroupLabel_Sorting:{id:"NebulaTableUtils.MenuGroupLabel.Sorting",locale:{"de-DE":"Sortierung","en-US":"Sorting","es-ES":"Ordenación","fr-FR":"Tri","it-IT":"Ordinamento","ja-JP":"ソート","ko-KR":"정렬","nl-NL":"Sorteren","pl-PL":"Sortowanie","pt-BR":"Classificação","ru-RU":"Сортировка","sv-SE":"Sortering","tr-TR":"Sıralama","zh-CN":"排序","zh-TW":"排序"}},NebulaTableUtils_MenuItemLabel_AdjustColumnSize:{id:"NebulaTableUtils.MenuItemLabel.AdjustColumnSize",locale:{"de-DE":"Spaltengröße anpassen","en-US":"Adjust column size","es-ES":"Ajustar el tamaño de columna","fr-FR":"Ajuster la taille de colonne","it-IT":"Regola dimensioni colonna","ja-JP":"列サイズを調整","ko-KR":"열 크기 조정","nl-NL":"Kolomgrootte aanpassen","pl-PL":"Dostosuj rozmiar kolumny","pt-BR":"Ajustar tamanho da coluna","ru-RU":"Настроить размер столбца","sv-SE":"Justera kolumnens storlek","tr-TR":"Sütun boyutunu ayarla","zh-CN":"调节列大小","zh-TW":"調整欄大小"}},NebulaTableUtils_MenuItemLabel_ClearSelections:{id:"NebulaTableUtils.MenuItemLabel.ClearSelections",locale:{"de-DE":"Auswahlen löschen","en-US":"Clear selections","es-ES":"Borrar selecciones","fr-FR":"Effacer les sélections","it-IT":"Cancella selezioni","ja-JP":"選択をクリア","ko-KR":"선택 지우기","nl-NL":"Geselecteerde waarden wissen","pl-PL":"Wyczyść wybory","pt-BR":"Limpar seleções","ru-RU":"Очистить выбранные","sv-SE":"Radera urval","tr-TR":"Seçimleri temizle","zh-CN":"清除选择项","zh-TW":"清除選項"}},NebulaTableUtils_MenuItemLabel_Collapse:{id:"NebulaTableUtils.MenuItemLabel.Collapse",locale:{"de-DE":"Reduzieren","en-US":"Collapse","es-ES":"Contraer","fr-FR":"Réduire","it-IT":"Comprimi","ja-JP":"折りたたむ","ko-KR":"축소","nl-NL":"Samenvouwen","pl-PL":"Zwiń","pt-BR":"Recolher","ru-RU":"Свернуть","sv-SE":"Dölj","tr-TR":"Daralt","zh-CN":"折叠","zh-TW":"收合"}},NebulaTableUtils_MenuItemLabel_ColumnOptions:{id:"NebulaTableUtils.MenuItemLabel.ColumnOptions",locale:{"de-DE":"Spaltenoptionen","en-US":"Column options","es-ES":"Opciones de columna","fr-FR":"Options de colonne","it-IT":"Opzioni colonna","ja-JP":"列オプション","ko-KR":"열 옵션","nl-NL":"Kolomopties","pl-PL":"Opcje kolumny","pt-BR":"Opções da coluna","ru-RU":"Параметры столбца","sv-SE":"Alternativ för kolumn","tr-TR":"Sütun seçenekleri","zh-CN":"列选项","zh-TW":"欄選項"}},NebulaTableUtils_MenuItemLabel_Expand:{id:"NebulaTableUtils.MenuItemLabel.Expand",locale:{"de-DE":"Erweitern","en-US":"Expand","es-ES":"Expandir","fr-FR":"Développer","it-IT":"Espandi","ja-JP":"展開","ko-KR":"확장","nl-NL":"Uitvouwen","pl-PL":"Rozwiń","pt-BR":"Expandir","ru-RU":"Развернуть","sv-SE":"Utöka","tr-TR":"Genişlet","zh-CN":"展开","zh-TW":"展開"}},NebulaTableUtils_MenuItemLabel_Search:{id:"NebulaTableUtils.MenuItemLabel.Search",locale:{"de-DE":"Suchen","en-US":"Search","es-ES":"Buscar","fr-FR":"Rechercher","it-IT":"Cerca","ja-JP":"検索","ko-KR":"검색","nl-NL":"Zoeken","pl-PL":"Wyszukaj","pt-BR":"Pesquisar","ru-RU":"Поиск","sv-SE":"Sök","tr-TR":"Ara","zh-CN":"搜索","zh-TW":"搜尋"}},NebulaTableUtils_MenuItemLabel_SelectAll:{id:"NebulaTableUtils.MenuItemLabel.SelectAll",locale:{"de-DE":"Alle auswählen","en-US":"Select all","es-ES":"Seleccionar todo","fr-FR":"Sélectionner tout","it-IT":"Seleziona tutti","ja-JP":"すべて選択","ko-KR":"모두 선택","nl-NL":"Alles selecteren","pl-PL":"Wybierz wszystko","pt-BR":"Selecionar tudo","ru-RU":"Выбрать все","sv-SE":"Välj alla","tr-TR":"Tümünü seç","zh-CN":"全选","zh-TW":"全選"}},NebulaTableUtils_MenuItemLabel_SelectAlternative:{id:"NebulaTableUtils.MenuItemLabel.SelectAlternative",locale:{"de-DE":"Alternative Werte auswählen","en-US":"Select alternative","es-ES":"Seleccionar alternativos","fr-FR":"Sélectionner des valeurs alternatives","it-IT":"Seleziona alternativi","ja-JP":"代替項目を選択","ko-KR":"대체 가능 값 선택","nl-NL":"Alternatief selecteren","pl-PL":"Wybierz alternatywę","pt-BR":"Selecionar alternativa","ru-RU":"Выбрать альтернативные","sv-SE":"Välj alternativ","tr-TR":"Alternatifi seç","zh-CN":"选择替代项","zh-TW":"選取替代選項"}},NebulaTableUtils_MenuItemLabel_SelectExcluded:{id:"NebulaTableUtils.MenuItemLabel.SelectExcluded",locale:{"de-DE":"Ausgeschlossene Werte auswählen","en-US":"Select excluded","es-ES":"Seleccionar excluidos","fr-FR":"Sélectionner les valeurs exclues","it-IT":"Seleziona esclusi","ja-JP":"除外項目を選択","ko-KR":"제외 항목 선택","nl-NL":"Uitgesloten waarden selecteren","pl-PL":"Wybierz wykluczone","pt-BR":"Selecionar excluídos","ru-RU":"Выбрать исключенные","sv-SE":"Välj uteslutna","tr-TR":"Hariç tutulanı seç","zh-CN":"选择排除项","zh-TW":"選取排除值"}},NebulaTableUtils_MenuItemLabel_SelectPossible:{id:"NebulaTableUtils.MenuItemLabel.SelectPossible",locale:{"de-DE":"Wählbare Werte auswählen","en-US":"Select possible","es-ES":"Seleccionar posibles","fr-FR":"Sélectionner les valeurs possibles","it-IT":"Seleziona possibili","ja-JP":"絞込項目を選択","ko-KR":"사용 가능 항목 선택","nl-NL":"Mogelijke waarden selecteren","pl-PL":"Wybierz możliwe","pt-BR":"Selecionar possíveis","ru-RU":"Выбрать возможные","sv-SE":"Välj möjliga","tr-TR":"Olası olanı seç","zh-CN":"选择可能值","zh-TW":"選取可能值"}},NebulaTableUtils_MenuItemLabel_Selections:{id:"NebulaTableUtils.MenuItemLabel.Selections",locale:{"de-DE":"Auswahlen","en-US":"Selections","es-ES":"Selecciones","fr-FR":"Sélections","it-IT":"Selezioni","ja-JP":"選択","ko-KR":"선택 내용","nl-NL":"Selecties","pl-PL":"Wybory","pt-BR":"Seleções","ru-RU":"Выборки","sv-SE":"Urval","tr-TR":"Seçimler","zh-CN":"选择项","zh-TW":"選項"}},NebulaTableUtils_MenuItemLabel_SortAscending:{id:"NebulaTableUtils.MenuItemLabel.SortAscending",locale:{"de-DE":"In aufsteigender Reihenfolge sortieren","en-US":"Sort ascending","es-ES":"Orden ascendente","fr-FR":"Trier par ordre croissant","it-IT":"Ordinamento crescente","ja-JP":"昇順でソート","ko-KR":"오름차순으로 정렬","nl-NL":"Oplopend sorteren","pl-PL":"Sortuj rosnąco","pt-BR":"Classificar em ordem crescente","ru-RU":"Сортировка по возрастанию","sv-SE":"Sortera stigande","tr-TR":"Artan sıralama","zh-CN":"升序排序","zh-TW":"以遞增方式排序"}},NebulaTableUtils_MenuItemLabel_SortDescending:{id:"NebulaTableUtils.MenuItemLabel.SortDescending",locale:{"de-DE":"In absteigender Reihenfolge sortieren","en-US":"Sort descending","es-ES":"Orden descendente","fr-FR":"Trier par ordre décroissant","it-IT":"Ordinamento decrescente","ja-JP":"降順でソート","ko-KR":"내림차순으로 정렬","nl-NL":"Aflopend sorteren","pl-PL":"Sortuj malejąco","pt-BR":"Classificar em ordem decrescente","ru-RU":"Сортировка по убыванию","sv-SE":"Sortera fallande","tr-TR":"Azalan sıralama","zh-CN":"降序排序","zh-TW":"以遞減方式排序"}},NebulaTableUtils_Pagination_DisplayedRowsLabel:{id:"NebulaTableUtils.Pagination.DisplayedRowsLabel",locale:{"de-DE":"{0} von {1}","en-US":"{0} of {1}","es-ES":"{0} de {1}","fr-FR":"{0} sur {1}","it-IT":"{0} di {1}","ja-JP":"{0} / {1}","ko-KR":"{0}/{1}","nl-NL":"{0} van {1}","pl-PL":"{0} z {1}","pt-BR":"{0} de {1}","ru-RU":"{0} из {1}","sv-SE":"{0} av {1}","tr-TR":"{0} / {1}","zh-CN":"{0} / {1}","zh-TW":"{0} / {1}"}},NebulaTableUtils_Pagination_FirstPage:{id:"NebulaTableUtils.Pagination.FirstPage",locale:{"de-DE":"Zur ersten Seite","en-US":"Go to the first page","es-ES":"Ir a la primera página","fr-FR":"Accéder à la première page","it-IT":"Vai alla prima pagina","ja-JP":"最初のページに移動","ko-KR":"첫 페이지로 이동","nl-NL":"Ga naar de eerste pagina","pl-PL":"Przejdź do pierwszej strony","pt-BR":"Ir para a primeira página","ru-RU":"Перейти к первой странице","sv-SE":"Gå till första sidan","tr-TR":"İlk sayfaya git","zh-CN":"转到第一页","zh-TW":"移至第一頁"}},NebulaTableUtils_Pagination_LastPage:{id:"NebulaTableUtils.Pagination.LastPage",locale:{"de-DE":"Zur letzten Seite","en-US":"Go to the last page","es-ES":"Ir a la última página","fr-FR":"Accéder à la dernière page","it-IT":"Vai all'ultima pagina","ja-JP":"最後のページに移動","ko-KR":"마지막 페이지로 이동","nl-NL":"Ga naar de laatste pagina","pl-PL":"Przejdź do ostatniej strony","pt-BR":"Ir para a última página","ru-RU":"Перейти к последней странице","sv-SE":"Gå till sista sidan","tr-TR":"Son sayfaya git","zh-CN":"转到最后一页","zh-TW":"移至最後一頁"}},NebulaTableUtils_Pagination_NextPage:{id:"NebulaTableUtils.Pagination.NextPage",locale:{"de-DE":"Zur nächsten Seite","en-US":"Go to the next page","es-ES":"Ir a la página siguiente","fr-FR":"Accéder à la page suivante","it-IT":"Vai alla pagina successiva","ja-JP":"次のページに移動","ko-KR":"다음 페이지로 이동","nl-NL":"Ga naar de volgende pagina","pl-PL":"Przejdź do następnej strony","pt-BR":"Ir para a próxima página","ru-RU":"Перейти к следующей странице","sv-SE":"Gå till nästa sida","tr-TR":"Sonraki sayfaya git","zh-CN":"转到下一页","zh-TW":"移至下一頁"}},NebulaTableUtils_Pagination_PreviousPage:{id:"NebulaTableUtils.Pagination.PreviousPage",locale:{"de-DE":"Zur vorherigen Seite","en-US":"Go to the previous page","es-ES":"Ir a la página anterior","fr-FR":"Accéder à la page précédente","it-IT":"Vai alla pagina precedente","ja-JP":"前のページに移動","ko-KR":"이전 페이지로 이동","nl-NL":"Ga naar de vorige pagina","pl-PL":"Przejdź do poprzedniej strony","pt-BR":"Ir para a página anterior","ru-RU":"Перейти к предыдущей странице","sv-SE":"Gå till föregående sida","tr-TR":"Önceki sayfaya git","zh-CN":"转到前一页","zh-TW":"移至上一頁"}},NebulaTableUtils_Pagination_RowsPerPage:{id:"NebulaTableUtils.Pagination.RowsPerPage",locale:{"de-DE":"Zeilen pro Seite","en-US":"Rows per page","es-ES":"Filas por página","fr-FR":"Lignes par page","it-IT":"Righe per pagina","ja-JP":"ページあたりの行数","ko-KR":"페이지별 행 수","nl-NL":"Rijen per pagina","pl-PL":"Wierszy na stronę","pt-BR":"Linhas por página","ru-RU":"Строк на странице","sv-SE":"Rader per sida","tr-TR":"Sayfa başına satır sayısı","zh-CN":"每页行数","zh-TW":"每頁列數"}},NebulaTableUtils_Pagination_SelectPage:{id:"NebulaTableUtils.Pagination.SelectPage",locale:{"de-DE":"Seite auswählen","en-US":"Select page","es-ES":"Seleccionar página","fr-FR":"Sélectionner une page","it-IT":"Seleziona pagina","ja-JP":"ページを選択","ko-KR":"페이지 선택","nl-NL":"Pagina selecteren","pl-PL":"Wybierz stronę","pt-BR":"Selecionar página","ru-RU":"Выберите страницу","sv-SE":"Välj sida","tr-TR":"Sayfa seç","zh-CN":"选择页面","zh-TW":"選取頁面"}}};const Yz=({translator:e})=>(v(()=>{!function(e){if(e&&e.get&&e.add){const t="NebulaTableUtils.MenuGroupLabel.Sorting";if(e.get(t)!==t)return;Object.keys(Uz).forEach(t=>{e.add(Uz[t])})}}(e)},[e]),e),Kz={width:"100%",height:"100%",color:"transparent",background:"transparent",borderColor:"transparent"},Xz={border:0,boxShadow:"none",borderRadius:0,outline:0,width:0,height:0,background:"transparent",cursor:"pointer",visibility:"hidden"},Jz=Sl("input",{shouldForwardProp:e=>"isLastColumn"!==e&&"hoverColor"!==e})(({isLastColumn:e,hoverColor:t,dir:n})=>({position:"absolute",display:"flex",height:"100%",top:0,marginLeft:"-4px",marginRight:"rtl"===n?"-4px":void 0,touchAction:"none",cursor:"col-resize",pointerEvents:"auto",width:(e?4:9)+"px",justifyContent:e?"flex-end":"center",outline:"none",appearance:"none",WebkitAppearance:"none",backgroundColor:"transparent","&::-webkit-slider-runnable-track":{...Kz},"&::-moz-range-track":{...Kz},"&::-ms-track":{...Kz},"&::-webkit-slider-thumb":{appearance:"none",WebkitAppearance:"none",...Xz},"&::-moz-range-thumb":{...Xz},"&::-ms-thumb":{...Xz},"&:hover:not(:focus, :active)":{"&::after":{backgroundColor:t||"#D9D9D9","@media (hover: none)":{backgroundColor:"none"}}},"&:focus-visible, &:active":{"&::after":{backgroundColor:"#177fe6",borderLeft:"1px solid #fff",borderRight:e?void 0:"1px solid #fff"}},"&::after":{content:'""',height:"100%",width:"3px",position:"absolute"}})),Zz=({columnWidth:e,keyValue:t,isLastColumn:n,isPivot:r,hoverColor:i,updateWidthCallback:o,confirmWidthCallback:a,handleBlur:s,setIsAdjustingWidth:u,isLeftColumn:c,accessibilityRelatedArgs:d,direction:p="ltr"})=>{const f=Yz({translator:d.translator}),h=l({initWidth:e,columnWidth:e,initX:0}),m=n?0:1,g=r&&!c,v=()=>g?h.current.columnWidth-m:"100%",y={left:"rtl"!==p?v():void 0,right:"rtl"===p?v():void 0},b=t=>{h.current={initWidth:e,columnWidth:e,initX:t??h.current.initX}};Gz(()=>{g&&b()},[e]);const x=e=>{const t=Math.max(e,MT.PixelsMin);h.current.columnWidth=t,o(t)},S=()=>{if(h.current.columnWidth!==h.current.initWidth){const e={type:LT.Pixels,pixels:h.current.columnWidth};a(e)}u?.(!1)},w=e=>{const t="rtl"===p?h.current.initWidth+h.current.initX-e.clientX:h.current.initWidth+e.clientX-h.current.initX;x(t)},C=e=>{p_(e),document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",C),S()},E=e=>{const t="rtl"===p?h.current.initWidth+-h.current.initX-e.touches[0].clientX:h.current.initWidth+e.touches[0].clientX-h.current.initX;x(t)},I=e=>{p_(e),document.removeEventListener("touchmove",E),document.removeEventListener("touchend",I),S()},D=!r&&s?e=>{if(e.key===RT.Left||e.key===RT.Right){p_(e);const t=5,n=e.key===RT.Left?t:-t,r="rtl"===p?n:-n;u?.(!0),x(h.current.columnWidth+r)}else e.key===RT.Space||e.key===RT.Enter?(p_(e),s(e),u?.(!1),S()):e.key===RT.Esc&&(p_(e),s(e),u?.(!1),x(h.current.initWidth))}:void 0,R=f.get("NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",[String(d.columnLabel)]);return fo.jsx(Jz,{style:y,hoverColor:i,isLastColumn:n,className:PT,"data-testid":PT,onMouseDown:e=>{p_(e),document.addEventListener("mousemove",w),document.addEventListener("mouseup",C),u?.(!0),b(e.clientX)},onDoubleClick:()=>{a({type:LT.FitToContent})},onTouchStart:e=>{1===e.touches.length&&(p_(e),document.addEventListener("touchmove",E),document.addEventListener("touchend",I),u?.(!0),b(e.touches[0].clientX))},onKeyDown:D,onBlur:s,onFocus:()=>{b()},type:"range",tabIndex:-1,"aria-label":R,"aria-valuemin":MT.PixelsMin,"aria-valuemax":MT.PixelsMax,"aria-valuenow":Number(e.toFixed(1)),dir:p},t)},Qz=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M15 4H1V2h14zm0 10H1v-2h14zm0-5H1V7h14z"})})),eW=Sl(sc,{shouldForwardProp:e=>"rightAligned"!==e&&"shouldShowMenuIcon"!==e&&"isAccessibleHeader"!==e})(({rightAligned:e,shouldShowMenuIcon:t,isAccessibleHeader:n})=>({...e?{marginRight:"auto"}:{marginLeft:"auto"},height:n?24:void 0,display:t?"flex":"none",fontWeight:"bold",width:n?"100%":void 0,alignItems:"center",justifyContent:"center"})),tW=Sl(Qz,{shouldForwardProp:e=>"isInteractionsActive"!==e})(({isInteractionsActive:e})=>({minWidth:"unset",position:"relative",cursor:e?"pointer":"default"})),nW=Sl(wp)(({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}})),rW=Sl(td)(({theme:e})=>({"&.MuiDivider-root":{margin:e.spacing(.5)}})),iW=Sl(Rp)(({theme:e})=>({fontSize:"12px",height:24,fontWeight:"bold",padding:`${e.spacing(.25,2)} !important`,marginBottom:e.spacing(.5)})),oW=Sl(Rp,{shouldForwardProp:e=>"isSubMenu"!==e&&"isActive"!==e})(({theme:e,isSubMenu:t,isActive:n})=>({width:`calc(220px - ${e.spacing(1)} - ${t?10:0}px)`,maxHeight:32,borderRadius:`${e.spacing(.5)} !important`,margin:`${e.spacing(.25,.5)} !important`,padding:`${e.spacing(1,1.5)} !important`,display:"flex !important",justifyContent:"space-between !important","&&:focus":{boxShadow:"rgb(23, 127, 230) 0px 0px 0px 2px"},position:"relative !important",overflow:"hidden",boxSizing:"border-box !important",background:n?"rgba(0, 0, 0, 0.05)":"transparent"})),aW=Sl("div",{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})(({theme:e,direction:t,isPagination:n})=>({position:"absolute",width:e.spacing(.5),height:16,left:0,right:n||"rtl"!==t?void 0:0,top:"50%",transform:"TranslateY(-50%)",borderRadius:"0 2px 2px 0",background:"#01873d"})),sW=Sl("div")(()=>({display:"flex",justifyContent:"space-between",alignItems:"center",maxWidth:"100%"})),lW=Sl(Cu)(()=>({fontFamily:'"Source Sans Pro", HelveticaNeue, "Helvetica Neue", Helvetica, Arial, sans-serif',fontSize:"14px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"})),uW=Sl(Kd,{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})(({theme:e,direction:t,isPagination:n})=>({width:16,minWidth:"unset !important",marginRight:n||"rtl"!==t?e.spacing(1.5):0,marginLeft:n||"rtl"!==t?void 0:e.spacing(1.5),lineHeight:0})),cW=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M8.5 8 4 3.5 5.5 2l6 6-6 6L4 12.5z"})})),dW=e=>{const t=e.nextElementSibling;return t?"HR"===t.tagName?dW(t):t:e.parentElement?.children?.[0]},pW=e=>{const t=e.previousElementSibling;if(!t){const t=e.parentElement?.children?.length;return e.parentElement?.children?.[t-1]}return"HR"===t.tagName?pW(t):t},fW=e=>{const{key:t,currentTarget:n}=e,r=document.activeElement??n;if(t===RT.Down||t===RT.Up){const n=e=>t===RT.Down?dW(e):pW(e);e.preventDefault(),e.stopPropagation();let i=n(r);for(;i;){if("true"!==i.ariaDisabled){i.focus();break}i=n(i)}}},hW=(e,t)=>e.map(e=>e.map(e=>({...e.groupHeading?{groupHeading:e.groupHeading}:{},items:e.items.map(({onClick:e,...n})=>({...n,...e?{onClick:async n=>{Object.entries(t).forEach(([,e])=>{e(!1)}),await e(n)}}:{}}))})));let mW={};const gW=({autoFocus:e,id:t,onClick:r,itemTitle:i,icon:o,enabled:a,subMenus:s,isSubMenu:l,isActive:u,direction:c,isPagination:d})=>{const[p,h]=m(!1),g=n.useRef(null),v=f(e=>{e.stopPropagation(),h(!1)},[h]);return fo.jsxs(fo.Fragment,{children:[fo.jsxs(oW,{ref:s?g:null,"data-testid":`menu-item-${t}`,className:"nebula-table-utils-head-menu-item",onClick:async e=>{"keyup"!==e.type&&(r&&(await r(e),mW={}),s?.length&&(h(!0),mW[i]=h,e.stopPropagation()))},disabled:!a,autoFocus:e,isSubMenu:!!l,isActive:!!u,onKeyDown:fW,children:[u?fo.jsx(aW,{direction:c,isPagination:d}):null,fo.jsxs(sW,{children:[fo.jsx(uW,{direction:c,isPagination:d,children:fo.jsx(o,{})}),fo.jsx(lW,{variant:"body2",children:i})]}),s?.length?fo.jsx(cW,{}):null]},t),s?.length?fo.jsx(xW,{isSubMenu:!0,open:p,anchorEl:g.current,onClose:v,menuGroups:hW(s,mW),transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},direction:c,isPagination:d}):null]})},vW=({menuGroup:e,isSubMenu:t,direction:n,isPagination:r})=>e.map(e=>[[e.groupHeading&&fo.jsx(iW,{disabled:!0,style:{opacity:1},children:e.groupHeading},e.groupHeading),e.items.map(e=>fo.jsx(gW,{...e,isSubMenu:t,direction:n,isPagination:r},e.id))].filter(Boolean)]),yW=({itemGroups:e,isSubMenu:t,direction:n,isPagination:r})=>e.map((i,o)=>[vW({menuGroup:i,isSubMenu:t,direction:n,isPagination:r}),o<e.length-1?fo.jsx(rW,{"data-testid":"group-divider",variant:"middle"}):void 0]),bW={appear:0,enter:0,exit:0},xW=({anchorEl:e,open:t,onClose:n,menuGroups:r,transformOrigin:i,anchorOrigin:o,isSubMenu:a,direction:s,isPagination:l})=>r.length?fo.jsx(nW,{className:"nebula-table-utils-head-menu",open:t,anchorEl:e,onClose:n,transitionDuration:bW,MenuListProps:{id:"nebula-table-utils-head-menu-list-id"},...o?{anchorOrigin:o}:{},...i?{transformOrigin:i}:{},dir:s,children:yW({itemGroups:r,isSubMenu:a,direction:s,isPagination:l})}):null,SW=(e,t)=>e.some(e=>t[e]>0),wW={canSelectAll:!1,canClearSelections:!1,canSelectPossible:!1,canSelectAlternative:!1,canSelectExcluded:!1},CW=({open:e,qStateName:t="$",headerData:n,app:r})=>{const[i,o]=m(null),[a,s]=m(wW);return Gz(()=>{e||(s(wW),o(null))},[e]),d(()=>{if(!r?.createSessionObject||!n.isDim||!e)return()=>{};let i,a=!1;const l=()=>{i&&r.destroySessionObject(i)};return(async()=>{try{const e=((e,t)=>({qInfo:{qType:"tableListbox"},qListObjectDef:Boolean(t.qLibraryId)?{qLibraryId:t.qLibraryId,qStateName:e}:{qDef:{qFieldDefs:[t.fieldId]},qStateName:e}}))(t,n),u=await r.createSessionObject(e),c=await u.getLayout(),{qStateCounts:d}=c.qListObject?.qDimensionInfo??{};i=c.qInfo?.qId,a?l():(o(u),d&&s((e=>({canSelectAll:SW(["qOption","qAlternative","qExcluded","qDeselected"],e),canClearSelections:SW(["qSelected"],e),canSelectPossible:SW(["qOption"],e),canSelectAlternative:SW(["qAlternative"],e),canSelectExcluded:SW(["qAlternative","qExcluded"],e)}))(d)))}catch(e){console.error(e)}})(),()=>{a=!0,l()}},[e,r,n,t]),{fieldInstance:i,selectionActionsEnabledStatus:a}},EW=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M3.5 1.793 6.207 4.5l-.707.707-1.5-1.5V14H3V3.707l-1.5 1.5L.793 4.5zM8 4h5v1H8zm0 3h6v1H8zm0 3h7v1H8z"})})),IW=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M1 14.5a.5.5 0 0 0 .5.5H3v1H1.5A1.5 1.5 0 0 1 0 14.5V13h1zm9 1.5H6v-1h4zm5.354-8.646L12.707 10l2.646 2.646-.707.707L12 10.708l-2.646 2.646-.708-.707L11.293 10 8.646 7.354l.708-.708L12 9.293l2.646-2.647zM1 10H0V6h1zm2-9H1.5a.5.5 0 0 0-.5.5V3H0V1.5A1.5 1.5 0 0 1 1.5 0H3zm11.5-1A1.5 1.5 0 0 1 16 1.5V3h-1V1.5a.5.5 0 0 0-.5-.5H13V0zM10 1H6V0h4z"})})),DW=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M3.914 8h8.207L10.5 6.379l.707-.708L14.036 8.5l-2.829 2.828-.707-.707L12.12 9H3.914l1.621 1.621-.707.707L2 8.5l2.828-2.828.707.707zM15 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zm0 13V2h-2v3h-1V2H4v3H3V2H1v12h2v-2h1v2h8v-2h1v2z"})})),RW=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M3 2h1v10.293l1.5-1.5.707.707L3.5 14.207.793 11.5l.707-.707 1.5 1.5zm12 2H8v1h7zM8 7h6v1H8zm5 3H8v1h5z"})})),PW=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M.5 4.774v6.452a2 2 0 0 0 1.154 1.813l5.5 2.566a2 2 0 0 0 1.692 0l5.5-2.566a2 2 0 0 0 1.154-1.813V4.774a2 2 0 0 0-1.154-1.813L8.846.395a2 2 0 0 0-1.692 0l-5.5 2.566A2 2 0 0 0 .5 4.774m1 0v-.032l6 2.428v7.493l-5.423-2.53a1 1 0 0 1-.577-.907zm.545-.89.032-.016 5.5-2.567a1 1 0 0 1 .846 0l5.5 2.567.032.015L8 6.293zm12.455.858v6.484a1 1 0 0 1-.577.906L8.5 14.663V7.17z"})})),MW=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8z"})})),LW=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8zM8.5 4v8h-1V4z"})})),AW=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M1 8a7 7 0 1 1 10 6.326V11h-1v5h5v-1h-3.124A8 8 0 1 0 8 16v-1a7 7 0 0 1-7-7"})})),kW=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M9.057 11.164a6 6 0 1 1 2.112-2.116 1 1 0 0 1 .052.044l4.176 4.08a1 1 0 0 1 .009 1.422l-.707.707a1 1 0 0 1-1.406.008l-4.185-4.087a1 1 0 0 1-.05-.058ZM10.5 6a4.5 4.5 0 1 0-9 0 4.5 4.5 0 0 0 9 0"})})),OW=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M3 4v1H1v10h10v-2h1v2a1 1 0 0 1-.883.993L11 16H1a1 1 0 0 1-.993-.883L0 15V5a1 1 0 0 1 .883-.993L1 4zm12-4a1 1 0 0 1 .993.883L16 1v10a1 1 0 0 1-.883.993L15 12H5a1 1 0 0 1-.993-.883L4 11V1a1 1 0 0 1 .883-.993L5 0zm0 1H5v10h10zm-2.36 2.653.72.694L9.143 8.72 6.64 6.125l.72-.694L9.143 7.28z"})})),qW=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 4v8l8-8zm0-1h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})})),TW=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 3h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})})),NW=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 4v8h8V4zm0-1h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})})),jW=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M1 1.5a.5.5 0 0 1 .5-.5H3V0H1.5A1.5 1.5 0 0 0 0 1.5V3h1zM14.5 1a.5.5 0 0 1 .5.5V3h1V1.5A1.5 1.5 0 0 0 14.5 0H13v1zM1 14.5a.5.5 0 0 0 .5.5H3v1H1.5A1.5 1.5 0 0 1 0 14.5V13h1zm14 0a.5.5 0 0 1-.5.5H13v1h1.5a1.5 1.5 0 0 0 1.5-1.5V13h-1zM6 0h4v1H6zM0 6h1v4H0zm15 0h1v4h-1zm-9 9h4v1H6z"})}));let _W=function(e){return e.Sorting="sorting",e.Searching="searching",e.Selections="selections",e.AdjusterHeaderSize="adjustHeaderSize",e}({});const FW="/qListObjectDef",zW=({headerData:e,translator:t,menuAvailabilityFlags:n,setOpen:r,sortFromMenu:i,interactions:o,embedListbox:a,fieldInstance:s,selectionActionsEnabledStatus:l,anchorRef:u,focusColumnAdjuster:c,setActiveFieldCallback:d,expandOrCollapseArgs:p})=>{const f=[];if(n[_W.Sorting]){const{isActivelySorted:n,sortDirection:o}=e,{ascendingEnabled:a,descendingEnabled:s}=(({isActivelySorted:e,sortDirection:t,isPivot:n,isSortedByFirstMeasure:r})=>{let i=!n&&!e||"D"===t,o=!n&&!e||"A"===t;return r&&(i=!1,o=!1),{ascendingEnabled:i,descendingEnabled:o}})(e);f.push([{groupHeading:t.get("NebulaTableUtils.MenuGroupLabel.Sorting"),items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortAscending"),onClick:async e=>{e.stopPropagation(),await(i?.(e,"A")),r(!1)},icon:EW,enabled:a,isActive:!!n&&"A"===o,autoFocus:a},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortDescending"),onClick:async e=>{e.stopPropagation(),await(i?.(e,"D")),r(!1)},icon:RW,enabled:s,isActive:!!n&&"D"===o,autoFocus:!a&&s}]}])}if(e.isCyclic&&d){const t=[];t.push([{items:[{id:1,itemTitle:e.groupDimensionLabels[e.groupDimensionPos],enabled:!0,icon:AW,subMenus:[[{items:e.groupDimensionLabels.map((t,n)=>({id:n+1,itemTitle:t,onClick:async e=>{e.stopPropagation(),r(!1),d(n)},enabled:!0,icon:PW,isActive:e.groupDimensionPos===n}))}]]}]}]),t.length>0&&f.push(...t)}if(e.isDim&&o?.select){const i=[];n[_W.Searching]&&i.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Search"),onClick:e=>{e.stopPropagation(),r(!1),a()},icon:kW,enabled:!0}]}]),!e.isLocked&&n[_W.Selections]&&i.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Selections"),icon:jW,enabled:!!s,subMenus:[[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAll"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectAll(FW))},icon:OW,enabled:l.canSelectAll},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectPossible"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectPossible(FW))},icon:NW,enabled:l.canSelectPossible},{id:3,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAlternative"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectAlternative(FW))},icon:qW,enabled:l.canSelectAlternative},{id:4,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectExcluded"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectExcluded(FW))},icon:TW,enabled:l.canSelectExcluded}]}],[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.ClearSelections"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.clearSelections(FW))},icon:IW,enabled:l.canClearSelections}]}]]}]}]),p&&!p.alwaysFullyExpanded&&f.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Expand"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await p.expandCallback()},icon:LW,enabled:!0},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Collapse"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await p.collapseCallback()},icon:MW,enabled:!0}]}]),i.length>0&&f.push(...i)}return n[_W.AdjusterHeaderSize]&&f.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.AdjustColumnSize"),onClick:e=>{e.stopPropagation(),e.preventDefault(),r(!1),c?.(u)},icon:DW,enabled:!0}]}]),f},WW=({open:e,setOpen:t,anchorRef:n,headerData:r,translator:i,interactions:o,menuAvailabilityFlags:a,shouldShowMenuIcon:s=!0,sortRelatedArgs:u,searchRelatedArgs:c,selectionRelatedArgs:d,adjustHeaderSizeRelatedArgs:p,expandOrCollapseArgs:h,model:m,direction:g="ltr",isPagination:v,isAccessibleHeader:y,iconSize:b=ET})=>{const x=l(null),S=Yz({translator:i}),{qLibraryId:w,fieldId:C,headTextAlign:E}=r,I=d?.app,{fieldInstance:D,selectionActionsEnabledStatus:R}=CW({open:e,headerData:r,app:I,qStateName:d?.qStateName}),P=(({model:e,headerData:t})=>{if(e&&"setActiveField"in e&&void 0!==t.dimensionInfoIndex){const n=t.dimensionInfoIndex;return async t=>{try{await e.setActiveField("/qHyperCubeDef",n,t)}catch(e){console.error(e)}}}return null})({model:m,headerData:r}),M=(({qLibraryId:e,fieldId:t,searchRelatedArgs:n,selectionRelatedArgs:r,direction:i,onPopoverClose:o})=>f(()=>{const a=e?{qLibraryId:e,type:"dimension"}:t;if(n?.embed){const{embed:e,listboxRef:t}=n;e.__DO_NOT_USE__.popover(t.current,a,{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"rtl"===i?"right":"left"},sortCriteria:n.sortCriteria,stateName:r?.qStateName,direction:i,onPopoverClose:o})}},[e,t,n,r?.qStateName,i,o]))({qLibraryId:w,fieldId:C,searchRelatedArgs:c,selectionRelatedArgs:d,direction:g}),L=f(e=>{e.stopPropagation(),t(!1)},[t]),A=f(e=>{e.stopPropagation(),t(e=>!e)},[t]);return o.active?fo.jsxs(eW,{rightAligned:"right"===E,shouldShowMenuIcon:s,className:"nebula-table-utils-head-menu-wrapper",onClick:!1===y?A:void 0,ref:x,isAccessibleHeader:y,children:[s?fo.jsx(tW,{height:b,className:IT,"data-testid":IT,isInteractionsActive:o.active??!1,children:fo.jsx(Qz,{})}):null,fo.jsx(xW,{open:e,anchorEl:!1===y?x.current:n.current,onClose:L,menuGroups:zW({headerData:r,translator:S,menuAvailabilityFlags:a,setOpen:t,...u,embedListbox:M,interactions:o,fieldInstance:D,selectionActionsEnabledStatus:R,anchorRef:n,focusColumnAdjuster:p?.focusColumnAdjuster,setActiveFieldCallback:P,expandOrCollapseArgs:h}),direction:g,isPagination:v})]}):null},$W=e=>e.isDark?{background:e.color,borderColor:gN.DARK_MODE_BORDER,color:gN.DARK_MODE_TEXT,disabledColor:gN.DARK_MODE_DISABLED,iconColor:gN.DARK_MODE_TEXT}:{background:e.color,borderColor:gN.BORDER_MEDIUM,color:gN.TEXT,disabledColor:gN.DISABLED},HW=Sl(sc,{shouldForwardProp:e=>"footerStyle"!==e})(({footerStyle:e,theme:t})=>({height:40,display:"flex",justifyContent:"flex-end",alignItems:"center",padding:t.spacing(0,1,0,1),color:e.color,background:e.background,borderTop:`1px solid ${e.borderColor}`})),VW=Sl(lf,{shouldForwardProp:e=>"footerStyle"!==e})(({footerStyle:e,theme:t})=>({background:"inherit",marginRight:t.spacing(1),color:e.color,"& .MuiNativeSelect-icon, .MuiNativeSelect-select":{color:e.iconColor}})),BW=Sl(vc,{shouldForwardProp:e=>"disabledCondition"!==e&&"footerStyle"!==e})(({disabledCondition:e,footerStyle:t,theme:n})=>({color:e?t.disabledColor:t.color,cursor:e?"default":"pointer",marginLeft:n.spacing(1)})),GW=Sl(Cu)(({theme:e})=>({color:"inherit",margin:e.spacing(0,1,0,1)})),UW=({children:e,footerContainer:t,interactions:n,theme:r,paginationNeeded:i=!0})=>{const o=v(()=>$W(r.background),[r]);if(!n.active)return null;const a=i?fo.jsx(HW,{footerStyle:o,children:e}):null;return t?E.createPortal(e,t):a},YW=u({}),KW=()=>h(YW),XW=({children:e,direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:i,isSelectionMode:o,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:u,keyboard:c,translator:d,theme:p,interactions:f,rect:h,layout:m,visibilityThreshold:g})=>{const y=(e=>!e.enabled||e.active)(c)?0:-1,b=v(()=>$W(p.background),[p]),x=i?i.getBoundingClientRect().width:h.width,S=Yz({translator:d}),w=v(()=>({direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:i,isSelectionMode:o,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:u,keyboard:c,translator:S,theme:p,interactions:f,rect:h,layout:m,footerStyle:b,tabIndex:y,width:x,visibilityThreshold:g}),[t,n,r,i,o,a,s,l,u,c,S,p,f,h,m,b,y,x,g]);return fo.jsx(YW.Provider,{value:w,children:e})};let JW=function(e){return e.FirstPage="FirstPage",e.LastPage="LastPage",e.NextPage="NextPage",e.PreviousPage="PreviousPage",e}({}),ZW=function(e){return e[e.DisplayedRowsLabel=250]="DisplayedRowsLabel",e[e.FirstPage=350]="FirstPage",e[e.LastPage=350]="LastPage",e[e.RowsPerPage=550]="RowsPerPage",e[e.SelectPage=700]="SelectPage",e}({});const QW=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"m7 8 4.5 4.5L10 14 4 8l6-6 1.5 1.5z"})})),e$=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"m12 2 1.5 1.5L9 8l4.5 4.5L12 14 6 8zM4 2v12H2V2z"})})),t$=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"m3.5 2 6 6-6 6L2 12.5 6.5 8 2 3.5zM14 2v12h-2V2z"})})),n$={FirstPage:e$,PreviousPage:QW,NextPage:cW,LastPage:t$,FirstPageRTL:t$,PreviousPageRTL:cW,NextPageRTL:QW,LastPageRTL:e$},r$=({disabledCondition:e,pageNumber:t,type:n})=>{const{direction:r,footerStyle:i,handleChangePage:o,translator:a,interactions:s,tabIndex:l}=KW(),u=n.concat("rtl"===r?"RTL":""),c=n$[u];return{styledProps:{footerStyle:i,disabledCondition:e,size:"small","data-testid":"pagination-action-icon-button","aria-disabled":e,"aria-label":a.get(`NebulaTableUtils.Pagination.${n}`),title:s.passive?a.get(`NebulaTableUtils.Pagination.${n}`):void 0,tabIndex:l,onClick:e?void 0:()=>{o(t)}},IconComponent:c}},i$=()=>{const{pageInfo:e,width:t,interactions:n,visibilityThreshold:r}=KW(),i=0===e.page,{IconComponent:o,styledProps:a}=r$({type:JW.FirstPage,disabledCondition:i,pageNumber:0});return t<=(r?.firstPage||ZW.FirstPage)?null:fo.jsx(BW,{...a,disabled:!n.active,children:fo.jsx(o,{height:ET})})},o$=(e,t,n=!1)=>{n&&e.key===RT.Tab&&!e.shiftKey&&(p_(e),((e,t,n)=>{const r=e.closest(".qv-object-wrapper")?.querySelector(".sel-toolbar-confirm")?.parentElement??document.querySelector("#qv-selection-toolbar-popover .sel-toolbar-confirm")?.parentElement;r?r.focus():t.focusSelection?.(n)})(e.target,t,!1))},a$=()=>{const{pageInfo:e,keyboard:t,totalPages:n,isSelectionMode:r,width:i,interactions:o,visibilityThreshold:a}=KW(),s=e.page>=n-1,{IconComponent:l,styledProps:u}=r$({type:JW.LastPage,disabledCondition:s,pageNumber:n-1}),c=t.enabled?e=>{o$(e,t,r)}:void 0;return i<=(a?.lastPage||ZW.LastPage)?null:fo.jsx(BW,{...u,onKeyDown:c,disabled:!o.active,children:fo.jsx(l,{height:ET})})},s$=()=>{const{pageInfo:e,keyboard:t,totalPages:n,isSelectionMode:r,width:i,interactions:o}=KW(),a=e.page>=n-1,{IconComponent:s,styledProps:l}=r$({type:JW.NextPage,disabledCondition:a,pageNumber:e.page+1}),u=!(i>ZW.FirstPage&&i>ZW.LastPage)&&t.enabled?e=>{o$(e,t,r)}:void 0;return fo.jsx(BW,{...l,onKeyDown:u,disabled:!o.active,children:fo.jsx(s,{height:ET})})},l$=()=>{const{pageInfo:e,interactions:t}=KW(),n=0===e.page,{IconComponent:r,styledProps:i}=r$({type:JW.PreviousPage,disabledCondition:n,pageNumber:e.page-1});return fo.jsx(BW,{...i,disabled:!t.active,children:fo.jsx(r,{height:ET})})},u$=()=>{const{translator:e,width:t,pageInfo:n,totalRowCount:r,visibilityThreshold:i}=KW(),{page:o,rowsPerPage:a}=n;if(t<=(i?.displayedRowsLabel||ZW.DisplayedRowsLabel))return null;const s=e.get("NebulaTableUtils.Pagination.DisplayedRowsLabel",[`${o*a+1} - ${Math.min((o+1)*a,r)}`,r.toString()]);return fo.jsx(GW,{variant:"caption",dir:"ltr",children:s})},c$=({name:e,value:t,options:n,handleChange:r})=>{const{layout:i,footerStyle:o,translator:a,tabIndex:s,interactions:l}=KW(),u=i.qInfo.qId,c=a.get(`NebulaTableUtils.Pagination.${e}`),d=`${e}-dropdown`,p=`${d}-label-${u}`,f={tabIndex:s,id:`${d}-${u}`,"data-testid":d,"aria-labelledby":p};return fo.jsxs(fo.Fragment,{children:[fo.jsxs(GW,{variant:"caption",id:p,children:[c,":"]}),fo.jsx(VW,{footerStyle:o,size:"small",native:!0,value:t,onChange:r,inputProps:f,disabled:!l.active,children:n})]})},d$=()=>{const{pageInfo:e,isSelectionMode:t,totalColumnCount:n,width:r,handleChangeRowsPerPage:i,visibilityThreshold:o}=KW();if(!(!!e.rowsPerPageOptions?.length&&!t&&r>(o?.rowsPerPage||ZW.RowsPerPage)&&n<=100)||void 0===e.rowsPerPageOptions)return null;const a=fo.jsx(fo.Fragment,{children:e.rowsPerPageOptions.map(e=>fo.jsx("option",{value:e,children:e},e))});return fo.jsx(c$,{name:"RowsPerPage",value:e.rowsPerPage,options:a,handleChange:e=>{i?.(+e.target.value)}})},p$=1e3,f$="…",h$=({totalPages:e,page:t})=>{const n=Math.min(e,p$),r=n<e&&t>500,i=r?Math.min(500+t,e):n,o=r?Math.max(0,i-p$):0,a=Array.from(Array(n).keys()).map(e=>{const t=e+o;return fo.jsx("option",{value:t,children:t+1},t)});return o>0&&a.unshift(fo.jsx("option",{value:f$,disabled:!0,children:f$},"startMoreOptions")),i<e-1&&a.push(fo.jsx("option",{value:f$,disabled:!0,children:f$},"endMoreOptions")),fo.jsx(fo.Fragment,{children:a})},m$=()=>{const{pageInfo:e,width:t,totalPages:n,handleChangePage:r,visibilityThreshold:i}=KW(),{page:o}=e;if(t<=(i?.selectPage||ZW.SelectPage))return null;const a=fo.jsx(h$,{totalPages:n,page:o});return fo.jsx(c$,{name:"SelectPage",value:o,options:a,handleChange:e=>{r(+e.target.value)}})};var g$=b(e=>fo.jsxs(XW,{...e,children:[fo.jsx(d$,{}),fo.jsx(m$,{}),fo.jsx(u$,{}),fo.jsx(i$,{}),fo.jsx(l$,{}),fo.jsx(s$,{}),fo.jsx(a$,{})]}));const v$=e=>fo.jsx(UW,{...e,children:fo.jsx(g$,{...e})}),y$=u({}),b$=()=>h(y$),x$=({rect:e,pageInfo:t,qPivotDataPages:n,updatePageInfo:r,direction:i,children:o})=>{const a=v(()=>({rect:e,pageInfo:t,qPivotDataPages:n,updatePageInfo:r,direction:i}),[e,t,n,r,i]);return fo.jsx(y$.Provider,{value:a,children:o})},S$=u({}),w$=()=>h(S$),C$=({app:e,model:t,theme:n,embed:r,keyboard:i,translator:o,interactions:a,env:s,children:l})=>{const u=v(()=>({model:t,app:e,interactions:a,embed:r,theme:n,keyboard:i,env:s,translator:o}),[e,a,t,r,n,i,s,o]);return fo.jsx(S$.Provider,{value:u,children:l})},E$=u({}),I$=()=>h(E$),D$=({children:e,...t})=>fo.jsx(E$.Provider,{value:t,children:e}),R$=()=>{const{text:e,fontFamily:t,fontSize:n,justifyContent:r,alignItems:i,height:o}=(()=>{const{theme:e,translator:t}=w$(),{layoutService:n}=I$(),r=e.getStyle("","","fontFamily")??az;return n.hasData?n.hasLimitedData?{text:t.get("SNPivotTable.LimitedData"),fontSize:"13px",fontFamily:r,alignItems:"center",height:"22px"}:{}:{text:t.get("SNPivotTable.NoData"),fontSize:"16px",fontFamily:r,justifyContent:"center",alignItems:"center",height:"100%"}})();return void 0===e?null:fo.jsx("div",{style:{display:"flex",justifyContent:r,alignItems:i,width:"100%",height:o},children:fo.jsx("span",{style:{...mz,fontFamily:t,fontSize:n,fontStyle:"italic",color:"#7b7a78"},children:e})})},P$="/qHyperCubeDef",M$=-1,L$="PSEUDO-DIM",A$=e=>e===M$?L$:(({cId:e})=>e??J_())(e),k$=({layoutService:e,visibleLeftDimensionInfos:t,cell:n,colIdx:r})=>{n&&(n.canBeResized=!0,n.colIdx=n.colIdx||r,n.dimensionInfoIndex===M$?n.columnWidthLocation=_F.Measures:n.isLeftDimension?n.columnWidthLocation=_F.Dimension:t.at(-1)===M$?n.columnWidthLocation=_F.Measures:e.hasPseudoDimOnLeft&&(n.columnWidthLocation=_F.Pivot))},O$=(e,t,n,r)=>{const i=A$(n),o=e.getDimensionInfoIndex(n),a=e.isLeftDimension(o);return n===M$?{id:i,colIdx:-1,label:"",sortDirection:"A",fieldId:"",isLocked:!1,isDim:!1,isCyclic:!1,groupDimensionPos:0,groupDimensionLabels:[],headTextAlign:"left",dimensionInfoIndex:o,canBeResized:!1,isLeftDimension:a,isLastDimension:r,columnWidthLocation:_F.Measures,isPivot:!0,qEffectiveDimensionName:void 0}:{id:i,colIdx:0,label:n.qFallbackTitle??"",qReverseSort:n.qReverseSort,sortDirection:n.qSortIndicator&&"N"!==n.qSortIndicator?n.qSortIndicator:"A",qLibraryId:n.qLibraryId,fieldId:n.qGroupFieldDefs[n.qGroupPos],isLocked:n.qLocked??!1,columnWidth:n.columnWidth,qApprMaxGlyphCount:n.qApprMaxGlyphCount,isDim:!0,isCyclic:n.qGrouping===OT.Cyclic,groupDimensionPos:n.qGroupPos,groupDimensionLabels:n.qGroupFallbackTitles,headTextAlign:"left",dimensionInfoIndex:o,canBeResized:!1,isLeftDimension:a,isLastDimension:r,columnWidthLocation:_F.Dimension,isPivot:!0,isSortedByFirstMeasure:t.isSortedByFirstMeasure,qEffectiveDimensionName:n.qEffectiveDimensionName}},q$=({layoutService:e,effectivePropertiesService:t,lastRow:n,lastCol:r})=>{let i=r;var o;n.length>0&&(i=(o=r).at(-1)===M$?o.slice(0,-1):o);const a=i.length+(n.length?1:0),s=Math.max(1,n.length),l=((e,t)=>Array(e).fill(null).map(()=>Array.from({length:t},()=>null)))(a,s);return n.forEach((n,r,i)=>{const o=r===i.length-1;l[a-1][r]=O$(e,t,n,o)}),i.forEach((n,r,i)=>{const o=r===i.length-1;l[r][s-1]=O$(e,t,n,o)}),l},T$=(e,t,n,r)=>{const i=((e,t,n,r)=>{let i;return i=0===n.length||n.includes(M$)?q$({layoutService:e,effectivePropertiesService:t,lastRow:r,lastCol:n}):(e=>e[0].map((t,n)=>e.map(e=>e[n])))(q$({layoutService:e,effectivePropertiesService:t,lastRow:n,lastCol:r})),e.isIndentModeEnabled&&i[i.length-1].length>1&&(i[i.length-1]=[i.at(-1),...new Array(i[0]?i[0].length-1:0).fill(null)]),i.length&&i.at(-1)?.forEach((t,n)=>{Array.isArray(t)?t.forEach((t,n)=>{k$({layoutService:e,visibleLeftDimensionInfos:r,cell:t,colIdx:n})}):k$({layoutService:e,visibleLeftDimensionInfos:r,cell:t,colIdx:n})}),i})(e,t,n,r);return{data:i,size:{x:i[0]?.length??0,y:i.length}}};var N$={fromSearchString:function(e){if(!e)return[];"?"===e[0]&&(e=e.substr(1));const t=[];return e.split("&").forEach(e=>{if(!e)return;const n=e.indexOf("=");let r,i="",o=!1;-1===n?r=e:(r=e.slice(0,n),i=e.slice(n+1),o=!0),t.push(function(e,t,n){return{key:_$(e),value:_$(t.replace(/%2B/g,"shouldNotDecodePlus")),useEqualSign:n}}(r,i,o))}),t}},j$=N$;function _$(e){try{return decodeURIComponent(e)}catch{return e}}function F$(e){if(!(this instanceof F$))throw new Error("Url needs to be called with the new keyword");if(!e)throw new Error("Url needs a string to operate on");const t=function(e){const t={authorityAndPath:"",search:"",hash:""};let n=e.indexOf("#");-1!==n&&(t.hash=e.substr(n),e=e.substr(0,n));n=e.indexOf("?"),-1!==n&&(t.search=e.substr(n),e=e.substr(0,n));return t.authorityAndPath=e,t}(e);Object.defineProperties(this,{authorityAndPath:{value:t.authorityAndPath},search:{value:t.search},hash:{value:t.hash},searchParams:{get:()=>j$.fromSearchString(t.search)}})}function z$(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/shouldNotDecodePlus/gi,"%2B")}F$.encodeAuthorityAndPath=function(e){return encodeURI(e).replace(/%5B/gi,"[").replace(/%5D/gi,"]").replace(/%25/gi,"%")},F$.encodeSearchParams=function(e){let t,n="";for(let r=0;r<e.length;r++)t=e[r],n+=0===r?"?":"&",n+=z$(t.key),t.value?n+=`=${z$(t.value)}`:n+=t.useEqualSign?"=":"";return n};var W$=F$;var $$,H$=class{_hasNext(){return null!=this._input&&(0!==this._input.length&&this._index<this._input.length)}constructor(e){this._input=e,this._pushback=null,this._temp=null,this._index=0,this._mark=0}pushback(e){this._pushback=e}index(){return this._index}hasNext(){return null!=this._pushback||this._hasNext()}next(){if(null!=this._pushback){const e=this._pushback;return this._pushback=null,e}return this._hasNext()?this._input.charAt(this._index++):null}nextHex(){const e=this.next();return null==e?null:e.match(/[0-9A-Fa-f]/)?e:null}peek(e){return e?!(!this._pushback||this._pushback!==e)||!!this._hasNext()&&this._input.charAt(this._index)===e:this._pushback?this._pushback:this._hasNext()?this._input.charAt(this._index):null}mark(){this._temp=this._pushback,this._mark=this._index}reset(){this._pushback=this._temp,this._index=this._mark}remainder(){let e=this._input.substr(this._index);return null!=this._pushback&&(e=this._pushback+e),e}},V$=class{decode(e){let t="";const n=new H$(e);let r;for(;n.hasNext();)r=this.decodeCharacter(n),t+=null!=r?r:n.next();return t}decodeCharacter(e){return e.next()}},B$=e=>e>=0&&e<=1114111,G$=e=>e.match(/[\s]/),U$=class extends V${decodeCharacter(e){e.mark();const t=e.next();let n,r,i;if(null==t||"\\"!==t)return e.reset(),null;const o=e.next();if(null==o)return e.reset(),null;switch(o){case"\r":e.peek("\n")&&e.next();case"\n":case"\f":case"\0":return this.decodeCharacter(e)}if("NaN"===parseInt(o,16))return o;for(n=o,r=0;r<5&&(i=e.next(),null!=i&&!G$(i));r++){if("NaN"===parseInt(i,16)){e.pushback(i);break}n+=i}const a=parseInt(n,16);return B$(a)?String.fromCharCode(a):"�"}},Y$=class e{constructor(e,t){this._key=e,this._value=t}getKey(){return this._key}getValue(){return this._value}equals(t){return t instanceof e&&(this._key===t._key&&this._value===t._value)}static newInstanceIfNeeded(){let t,n,r=arguments[0];return"string"==typeof arguments[1]?(t=arguments[1],n=r.length):(n=arguments[1],t=arguments[2]),t&&r?(r.length>n&&(r=r.substr(0,n)),new e(r,t)):null}},K$=class e{setValue(e){this._nextMap=null,this._value=e}getNextNode(e){return this._nextMap?this._nextMap[e]:null}put(t,n,r){let i,o;if(t.length===n)return o=this._value,this.setValue(r),o;const a=t.charAt(n);return this._nextMap?(i=this._nextMap[a],i||(i=new e,this._nextMap[a]=i)):(this._nextMap={},i=new e,this._nextMap[a]=i),i.put(t,n+1,r)}get(e,t){if(e.length<=t)return this._value;const n=this.getNextNode(e.charAt(t));return n?n.get(e,t+1):null}getLongestMatch(e,t){if(e.length<=t)return Y$.newInstanceIfNeeded(e,this._value);const n=this.getNextNode(e.charAt(t));if(!n)return Y$.newInstanceIfNeeded(e,t,this._value);const r=n.getLongestMatch(e,t+1);return r||Y$.newInstanceIfNeeded(e,t,this._value)}},X$=class{constructor(){this.clear()}getLongestMatch(e){return this.root&&e?this.root.getLongestMatch(e,0):null}getMaxKeyLength(){return this.maxKeyLen}clear(){this.root=null,this.maxKeyLen=0,this.size=0}put(e,t){this.root||(this.root=new K$);const n=this.root.put(e,0,t);return n||(e.length>this.maxKeyLen&&(this.maxKeyLen=e.length),this.size++,null)}},J$=(()=>{const e=[],t=[],n=new X$;let r,i,o;for(r in e["&quot"]="34",e["&amp"]="38",e["&lt"]="60",e["&gt"]="62",e["&nbsp"]="160",e["&iexcl"]="161",e["&cent"]="162",e["&pound"]="163",e["&curren"]="164",e["&yen"]="165",e["&brvbar"]="166",e["&sect"]="167",e["&uml"]="168",e["&copy"]="169",e["&ordf"]="170",e["&laquo"]="171",e["&not"]="172",e["&shy"]="173",e["&reg"]="174",e["&macr"]="175",e["&deg"]="176",e["&plusmn"]="177",e["&sup2"]="178",e["&sup3"]="179",e["&acute"]="180",e["&micro"]="181",e["&para"]="182",e["&middot"]="183",e["&cedil"]="184",e["&sup1"]="185",e["&ordm"]="186",e["&raquo"]="187",e["&frac14"]="188",e["&frac12"]="189",e["&frac34"]="190",e["&iquest"]="191",e["&Agrave"]="192",e["&Aacute"]="193",e["&Acirc"]="194",e["&Atilde"]="195",e["&Auml"]="196",e["&Aring"]="197",e["&AElig"]="198",e["&Ccedil"]="199",e["&Egrave"]="200",e["&Eacute"]="201",e["&Ecirc"]="202",e["&Euml"]="203",e["&Igrave"]="204",e["&Iacute"]="205",e["&Icirc"]="206",e["&Iuml"]="207",e["&ETH"]="208",e["&Ntilde"]="209",e["&Ograve"]="210",e["&Oacute"]="211",e["&Ocirc"]="212",e["&Otilde"]="213",e["&Ouml"]="214",e["&times"]="215",e["&Oslash"]="216",e["&Ugrave"]="217",e["&Uacute"]="218",e["&Ucirc"]="219",e["&Uuml"]="220",e["&Yacute"]="221",e["&THORN"]="222",e["&szlig"]="223",e["&agrave"]="224",e["&aacute"]="225",e["&acirc"]="226",e["&atilde"]="227",e["&auml"]="228",e["&aring"]="229",e["&aelig"]="230",e["&ccedil"]="231",e["&egrave"]="232",e["&eacute"]="233",e["&ecirc"]="234",e["&euml"]="235",e["&igrave"]="236",e["&iacute"]="237",e["&icirc"]="238",e["&iuml"]="239",e["&eth"]="240",e["&ntilde"]="241",e["&ograve"]="242",e["&oacute"]="243",e["&ocirc"]="244",e["&otilde"]="245",e["&ouml"]="246",e["&divide"]="247",e["&oslash"]="248",e["&ugrave"]="249",e["&uacute"]="250",e["&ucirc"]="251",e["&uuml"]="252",e["&yacute"]="253",e["&thorn"]="254",e["&yuml"]="255",e["&OElig"]="338",e["&oelig"]="339",e["&Scaron"]="352",e["&scaron"]="353",e["&Yuml"]="376",e["&fnof"]="402",e["&circ"]="710",e["&tilde"]="732",e["&Alpha"]="913",e["&Beta"]="914",e["&Gamma"]="915",e["&Delta"]="916",e["&Epsilon"]="917",e["&Zeta"]="918",e["&Eta"]="919",e["&Theta"]="920",e["&Iota"]="921",e["&Kappa"]="922",e["&Lambda"]="923",e["&Mu"]="924",e["&Nu"]="925",e["&Xi"]="926",e["&Omicron"]="927",e["&Pi"]="928",e["&Rho"]="929",e["&Sigma"]="931",e["&Tau"]="932",e["&Upsilon"]="933",e["&Phi"]="934",e["&Chi"]="935",e["&Psi"]="936",e["&Omega"]="937",e["&alpha"]="945",e["&beta"]="946",e["&gamma"]="947",e["&delta"]="948",e["&epsilon"]="949",e["&zeta"]="950",e["&eta"]="951",e["&theta"]="952",e["&iota"]="953",e["&kappa"]="954",e["&lambda"]="955",e["&mu"]="956",e["&nu"]="957",e["&xi"]="958",e["&omicron"]="959",e["&pi"]="960",e["&rho"]="961",e["&sigmaf"]="962",e["&sigma"]="963",e["&tau"]="964",e["&upsilon"]="965",e["&phi"]="966",e["&chi"]="967",e["&psi"]="968",e["&omega"]="969",e["&thetasym"]="977",e["&upsih"]="978",e["&piv"]="982",e["&ensp"]="8194",e["&emsp"]="8195",e["&thinsp"]="8201",e["&zwnj"]="8204",e["&zwj"]="8205",e["&lrm"]="8206",e["&rlm"]="8207",e["&ndash"]="8211",e["&mdash"]="8212",e["&lsquo"]="8216",e["&rsquo"]="8217",e["&sbquo"]="8218",e["&ldquo"]="8220",e["&rdquo"]="8221",e["&bdquo"]="8222",e["&dagger"]="8224",e["&Dagger"]="8225",e["&bull"]="8226",e["&hellip"]="8230",e["&permil"]="8240",e["&prime"]="8242",e["&Prime"]="8243",e["&lsaquo"]="8249",e["&rsaquo"]="8250",e["&oline"]="8254",e["&frasl"]="8260",e["&euro"]="8364",e["&image"]="8365",e["&weierp"]="8472",e["&real"]="8476",e["&trade"]="8482",e["&alefsym"]="8501",e["&larr"]="8592",e["&uarr"]="8593",e["&rarr"]="8594",e["&darr"]="8595",e["&harr"]="8596",e["&crarr"]="8629",e["&lArr"]="8656",e["&uArr"]="8657",e["&rArr"]="8658",e["&dArr"]="8659",e["&hArr"]="8660",e["&forall"]="8704",e["&part"]="8706",e["&exist"]="8707",e["&empty"]="8709",e["&nabla"]="8711",e["&isin"]="8712",e["&notin"]="8713",e["&ni"]="8715",e["&prod"]="8719",e["&sum"]="8721",e["&minus"]="8722",e["&lowast"]="8727",e["&radic"]="8730",e["&prop"]="8733",e["&infin"]="8734",e["&ang"]="8736",e["&and"]="8743",e["&or"]="8744",e["&cap"]="8745",e["&cup"]="8746",e["&int"]="8747",e["&there4"]="8756",e["&sim"]="8764",e["&cong"]="8773",e["&asymp"]="8776",e["&ne"]="8800",e["&equiv"]="8801",e["&le"]="8804",e["&ge"]="8805",e["&sub"]="8834",e["&sup"]="8835",e["&nsub"]="8836",e["&sube"]="8838",e["&supe"]="8839",e["&oplus"]="8853",e["&otimes"]="8855",e["&perp"]="8869",e["&sdot"]="8901",e["&lceil"]="8968",e["&rceil"]="8969",e["&lfloor"]="8970",e["&rfloor"]="8971",e["&lang"]="9001",e["&rang"]="9002",e["&loz"]="9674",e["&spades"]="9824",e["&clubs"]="9827",e["&hearts"]="9829",e["&diams"]="9830",e)"function"!=typeof e[r]&&e.hasOwnProperty(r)&&(t[e[r]]=r);for(i in t)"function"!=typeof t[i]&&t.hasOwnProperty(i)&&(o=t[i].toLowerCase().substr(1),n.put(o,String.fromCharCode(i)));return n})(),Z$=class extends V${decodeCharacter(e){let t;e.mark();const n=e.next();if(null==n||"&"!==n)return e.reset(),null;const r=e.next();if(null==r)return e.reset(),null;if("#"===r){if(t=this._getNumericEntity(e),null!=t)return t}else if(r.match(/[A-Za-z]/)&&(e.pushback(r),t=this._getNamedEntity(e),null!=t))return t;return e.reset(),null}_getNamedEntity(e){let t,n,r,i="";for(t=Math.min(e.remainder().length,J$.getMaxKeyLength()),r=0;r<t;r++)i+=e.next().toLowerCase();const o=J$.getLongestMatch(i);if(null==o)return null;for(e.reset(),e.next(),t=o.getKey().length,n=0;n<t;n++)e.next();return e.peek(";")&&e.next(),o.getValue()}_getNumericEntity(e){const t=e.peek();return null==t?null:"x"===t||"X"===t?(e.next(),this._parseHex(e)):this._parseNumber(e)}_parseHex(e){let t,n="";for(;e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,16))){if(";"===t){e.next();break}break}n+=t,e.next()}const r=parseInt(n,16);return!Number.isNaN(+r)&&B$(r)?String.fromCharCode(r):null}_parseNumber(e){let t,n="";for(;e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,10))){if(";"===t){e.next();break}break}n+=t,e.next()}const r=parseInt(n,10);return!Number.isNaN(+r)&&B$(r)?String.fromCharCode(r):null}},Q$=class extends V${decodeCharacter(e){e.mark();const t=e.next();let n,r,i,o;if(null==t)return e.reset(),null;if("%"!==t)return e.reset(),null;for(n="",r=0;r<2;r++)i=e.nextHex(),null!=i&&(n+=i);return 2===n.length&&(o=parseInt(n,16),B$(o))?String.fromCharCode(o):(e.reset(),null)}},eH=/^data:(?<!\s)\s*(image\/[\w+-.]+)(?<!\s)\s*(;.*?){0,1}(?<!\s)\s*,(.*)/i,tH=5e6,nH=5e5,rH=(e,t)=>{const{maxByteSizeSvg:n=nH,maxByteSizeImage:r=tH}=t??{},{mimeType:i,encoding:o,data:a}=(e=>{const[,t,n,r]=eH.exec(e.trim())??[];return{encoding:n,data:r,mimeType:t?.toLocaleLowerCase()}})(e);if(!a)return!0;const s=((e,t,n)=>{const r={type:e};if(t?.includes(";base64"))try{return new Blob([atob(n)],r).size}catch{return new Blob([n],r).size}return"image/svg+xml"===e?new Blob([n],r).size:0})(i,o,a);return"image/svg+xml"===i?s<=n:s<=r};"undefined"!=typeof document&&($$=document.createElement("div"));var iH=Array.prototype.indexOf,oH=[",",".","_"," "],aH=[",",".","-","_"," "],sH={width:["%"],height:["%"]},lH={default:["-"," ","%"],color:["#"," ","(",")"],image:["(",")",":","/","?","&","-",".",'"',"="," "]},uH={background:["(",")",":","%","/","?","&","-"," ",".",'"',"=","#"],"background-image":lH.image,"background-color":lH.color,"border-color":lH.color,"border-image":lH.image,color:lH.color,icon:lH.image,"list-style-image":lH.image,"outline-color":lH.color},cH={attr_name:["^on[a-z]{1,}","style","href","src"],attr_val:["javascript:","data:"],css_key:["behavior","-moz-behavior","-ms-behavior"],css_val:["expression"]};function dH(e,t,n){let r;if(t){if(iH)return iH.call(t,e,n);for(r=t.length,n=n?n<0?Math.max(0,r+n):n:0;n<r;n++)if(n in t&&t[n]===e)return n}return-1}function pH(e){if(null==e)return"";let t="";const n=document.createTextNode(e);return $$.appendChild(n),t=$$.innerHTML,$$.removeChild(n),t}function fH(e,t,n){let r,i,o,a,s,l,u,c,d;for(e=mH(e).toLowerCase(),t=mH(t),o=0;o<cH.attr_name.length;o++)if(e.match(cH.attr_name[o]))throw new Error(`Unsafe attribute name used: ${e}`);for(o=0;o<cH.attr_val.length;o++)if(t.toLowerCase().match(cH.attr_val[o]))throw new Error(`Unsafe attribute value used: ${t}`);if(r=sH[e],r||(r=aH),i="",!n){for(a=0;a<e.length;a++){if(s=e.charAt(a),!s.match(/[a-zA-Z\-0-9]/))throw new Error("Invalid attribute name specified");i+=s}i+='="'}for(l=0;l<t.length;l++)u=t.charAt(l),c=t.charCodeAt(l),!u.match(/[a-zA-Z0-9]/)&&dH(u,r)<0?(d=c.toString(16),i+=`&#x${d};`):i+=u;return n||(i+='"'),i}function hH(e,t,n){let r,i,o,a,s,l,u,c,d,p;if(e=mH(e).toLowerCase(),t=mH(t),dH(e,cH.css_key)>=0)throw new Error(`Unsafe property name used: ${e}`);for(r=0;r<cH.css_val.length;r++)if(t.toLowerCase().indexOf(cH.css_val[r])>=0)throw new Error(`Unsafe property value used: ${t}`);if(i=uH[e],i||(i=lH.default),o="",!n){for(a=0;a<e.length;a++){if(s=e.charAt(a),!s.match(/[a-zA-Z-]/))throw new Error("Invalid Property Name specified");o+=s}o+=": "}for(l=0;l<t.length;l++)u=t.charAt(l),c=t.charCodeAt(l),!u.match(/[a-zA-Z0-9]/)&&dH(u,i)<0?(d=c.toString(16),p="000000".substr(d.length),o+=`\\${p}${d}`):o+=u;return o}function mH(e,t){let n,r,i,o,a=!1;if(null===e)return null;n=e,r=e,i=0;const s=[new Z$,new Q$,new U$];for(;!a;){r=n;for(let e=0;e<s.length;e++)o=s[e].decode(n),o!==n&&(i++,n=o);r!==n||(a=!0)}if(t&&i>1)throw new Error("Attack Detected - Multiple/Double Encodings used in input");return n}var gH=[];for(let e=0;e<255;e++)gH[e]=e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122?null:e.toString(16);var vH={html:e=>pH(e.unsafe),css(e){let t,n=[];const r=[],i={};let o="";for(t in e.map?n=e.map:n[e.name]=e.unsafe,n)"function"!=typeof n[t]&&n.hasOwnProperty(t)&&(r[t]=hH(t,n[t],!0),o+=hH(t,n[t],!0),i[t]=r[t]);return e.map?i:o},attr(e){let t=[];const n=[],r={};let i="";e.map?t=e.map:t[e.name]=e.unsafe;for(const e in t)"function"!=typeof t[e]&&t.hasOwnProperty(e)&&(n[e]=fH(e,t[e],!0),i+=fH(e,t[e],!0),r[e]=n[e]);return e.map?r:i}};function yH(e,t){throw new Error(t)}var bH={canonicalize:mH,encode:function(){const e={context:"html",unsafe:null,name:null,map:null,setter:null,strict:!0};return 1===arguments.length&&"object"==typeof arguments[0]?function(){let e,t,n;const r=arguments[0]||{};let i=1;const o=arguments.length;for(;i<o;i++)if(null!=(e=arguments[i]))for(t in e)if(e.hasOwnProperty(t)){if(n=e[t],r===n)continue;void 0!==n&&(r[t]=n)}}(e,arguments[0]):(e.context=arguments[0],2===arguments.length?"html"===e.context?e.unsafe=arguments[1]:"attr"!==e.context&&"css"!==e.context||(e.map=arguments[1]):(e.name=arguments[2],e.unsafe=arguments[1])),"html"===e.context?vH.html(e):"css"===e.context?(null!=e.map&&"object"!=typeof e.map&&yH(this,"Invalid parameter type"),vH.css(e)):"attr"===e.context?(null!=e.map&&"object"!=typeof e.map&&yH(this,"Invalid parameter type"),vH.attr(e)):void yH(this,"Invalid parameter type")},encodeForAttr:fH,encodeForAttr2:function(e){return fH("nonsens",e,!0)},encodeForCSS:hH,encodeForHref:function(e){mH(e),0!==e.search("[a-zA-Z0-9]+:")&&(e=`http://${e}`);const t=new W$(e),n=W$.encodeAuthorityAndPath(t.authorityAndPath),r=t.searchParams;e=n+W$.encodeSearchParams(r)+t.hash;const i=decodeURI(e).toLowerCase();if(-1!==i.indexOf("javascript:"))throw new Error("Attack Detected - Javascript in input");if(-1!==i.indexOf("data:"))throw new Error("Attack Detected - data in input");return e},encodeForJS:function(e,t){let n,r,i,o,a,s;for(t||(t=oH),s="",n=0;n<e.length;n++)i=e.charAt(n),o=e.charCodeAt(n),dH(i,t)>=0||null==gH[o]?s+=i:(r=o.toString(16),o<256?(a="00".substr(r.length),s+=`\\x${a}${r.toUpperCase()}`):(a="0000".substr(r.length),s+=`\\u${a}${r.toUpperCase()}`));return s},encodeForHTML:pH,encodeForURL:function(e,t){let n="";return t&&(t.match(/^[A-Za-z\-0-9]{1,}$/)?n+=mH(t).toLowerCase():yH(this,"Illegal Attribute Name Specified"),n+='="'),n+=encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A"),n+=t?'"':"",n},isSafeDataURL:rH,validateURI:function(e){if(""===e||function(e){if("canParse"in URL)return URL.canParse(e);try{return new URL(e),!0}catch{return!1}}(e))return!1;const t=e.replace(/%2E/gi,".");if(t.match(/[#&=: ]/))return!1;const n=function(e){let t=e,n="";for(;t.length>0;)if(t.startsWith("../")||t.startsWith("./"))t=t.replace(/^\.\.?\//,"");else if(t.startsWith("/./"))t=t.replace(/^\/\.\//,"/");else if("/."===t)t="/";else if(t.startsWith("/../")){t=t.replace(/^\/\.\.\//,"/");const e=n.lastIndexOf("/");-1!==e&&(n=n.slice(0,e))}else if("/.."===t){t="/";const e=n.lastIndexOf("/");-1!==e&&(n=n.slice(0,e))}else if("."===t||".."===t)t="";else{const e=t.match(/^\/?[^/]*/),r=e?e[0]:"";t=t.slice(r.length),n+=r}return n}(t);return""!==n&&"/"!==n&&n}};const xH=(e,t)=>t.qAttrExps?.qValues?.[e],SH=(e,t)=>{switch(e){case"topLeft":default:return{horizontal:"rtl"===t?"flex-end":"flex-start",vertical:"flex-start"};case"centerLeft":return{horizontal:"center",vertical:"flex-start"};case"bottomLeft":return{horizontal:"rtl"===t?"flex-start":"flex-end",vertical:"flex-start"};case"topCenter":return{horizontal:"rtl"===t?"flex-end":"flex-start",vertical:"center"};case"centerCenter":return{horizontal:"center",vertical:"center"};case"bottomCenter":return{horizontal:"rtl"===t?"flex-start":"flex-end",vertical:"center"};case"topRight":return{horizontal:"rtl"===t?"flex-end":"flex-start",vertical:"flex-end"};case"centerRight":return{horizontal:"center",vertical:"flex-end"};case"bottomRight":return{horizontal:"rtl"===t?"flex-start":"flex-end",vertical:"flex-end"}}},wH=({text:e,url:t,imageSize:n,imagePosition:r,labelStructure:i,imageBox:o,direction:a})=>!r||t&&(t.toLowerCase().includes("javascript:")||!bH.isSafeDataURL(t))?{type:AF.Text,url:void 0,text:e,labelStructure:i}:{type:AF.Image,url:t||"",text:e,imageSize:n,resolvedImagePosition:SH(r,a),labelStructure:i,imageBox:o},CH=(e,t,n,r)=>{if(!e.qMiniChart||!t?.miniChart||!n)return{type:AF.Text,text:r};const{minY:i,maxY:o}=((e,t,n)=>{const r="global"===t.yAxis?.scale,i="zeroCenter"===t.yAxis?.position,o=r?n.qYMin:e.qMiniChart.qMin,a=r?n.qYMax:e.qMiniChart.qMax;if(i){const e=Math.max(Math.abs(o),Math.abs(a));return{minY:-e,maxY:e}}return(e=>"zeroBaseline"===e.yAxis?.position||"bars"===e.type&&"auto"===e.yAxis?.position)(t)?{minY:Math.min(0,o),maxY:Math.max(0,a)}:{minY:o,maxY:a}})(e,t.miniChart,n),a={type:t.miniChart.type,qMatrix:e.qMiniChart.qMatrix,minY:i,maxY:o,showDots:!!t.miniChart.showDots,colors:t.miniChart.colors,colorMin:e.qMiniChart.qMin,colorMax:e.qMiniChart.qMax};return{type:AF.MiniChart,text:r,miniChart:a}},EH=(e,t,n)=>{const r=Array.isArray(t.qAttrExps)?t.qAttrExps[0]:t.qAttrExps,i=r?.qValues?.[e];if(i){const e=Number.isNaN(+i.qNum)?void 0:`${i.qNum}`;return i.qText||e}return n?.urlPosition===kF.Attribute?void 0:n?.urlLabel},IH=({labelStructure:e,text:t,url:n})=>{try{if(!n)throw Error("Invalid url");return{type:AF.Link,url:bH.encodeForHref(n),text:t,labelStructure:e}}catch{return{type:AF.Text,url:void 0,text:t,labelStructure:e}}},DH=({cell:e,representationProperties:t,attrExprInfoIndex:n,env:r,conditionalColoring:i,miniChartOnMeasure:o,labelStructure:a,getText:s=e=>e.qText,direction:l,enabledFeatures:u})=>{const c=OF(t),d=s(e);return c===AF.Image&&u[AF.Image]&&!r.anything.sense?.isUnsupportedFeature?.("tableImages")?((e,t,n,r,i,o)=>{const{imageSize:a,imagePosition:s,imageSetting:l,imageLabel:u,imageBox:c}=t??{};if("url"===l){const t=xH(n.imageUrl??-1,e)?.qText;return o&&(o.maskedValue=t??""),wH({text:r,url:t,imageSize:a,imagePosition:s,labelStructure:o,imageBox:c,direction:i})}if("label"===l){const t=o?o.originalValue:r;if(-1===n.imageLabel)return wH({text:u||t||"",url:t,imageSize:a,imagePosition:s,labelStructure:o,imageBox:c,direction:i});const l=xH(n.imageLabel??-1,e)?.qText??r;return wH({text:l,url:t,imageSize:a,imagePosition:s,labelStructure:o,imageBox:c,direction:i})}return{type:AF.Text,url:void 0,labelStructure:o,text:r}})(e,t,n,d,l,a):c===AF.Link?((e,t,n,r,i)=>{const{urlPosition:o}=t??{};if(o===kF.Attribute){const o=EH(n.url??-1,e,t);return IH({labelStructure:r,text:i||o||"",url:o})}if(o===kF.Dimension){const o=EH(n.urlLabel??-1,e,t)||i;return r&&(r.maskedValue=o),IH({text:o,labelStructure:r,url:r?.originalValue??i})}return{type:AF.Text,url:void 0,text:i,labelStructure:r}})(e,t,n,a,d):c===AF.Indicator&&u[AF.Indicator]&&!r.anything.sense?.isUnsupportedFeature?.("tableIndicators")?((e,t,n)=>{const{indicator:r}=e??{};return{type:AF.Indicator,url:void 0,text:n,indicator:{applySegmentColors:r?.applySegmentColors,position:r?.position,showTextValues:r?.showTextValues},indicatorConditionalColoring:t}})(t,i,d):c===AF.MiniChart&&u[AF.MiniChart]&&!r.anything.sense?.isUnsupportedFeature?.("qMiniChartDef")?CH(e,t,o,d):{type:AF.Text,url:void 0,text:d,labelStructure:a}},RH=(e,t)=>{const n=t.qAttrExps,r=n?.qValues?.[e?.cellForegroundColor??-1]?.qText,i=n?.qValues?.[e?.cellBackgroundColor??-1]?.qText,o=i?d_(i):null,a=r?d_(r):null,s=((e,t)=>e||!t?null:l_(t))(a,o);return{color:s??a,background:o}},PH=(e,t)=>t.qSubNodes.reduce((e,t)=>0===t.qSubNodes.length?e+1:PH(e,t),e),MH=(e,t,n,r,i,o)=>{const a=i?o.rowsPerPage-n:lz-r;let s=e.qUp+e.qDown;if(i&&0===n){const n=(t+e.qUp)%o.rowsPerPage;s=e.qDown+n}return Math.min(a,PH(s,e))},LH=({node:e,parent:t,root:n,x:r,y:i,pageY:o,layoutService:a,dimensionInfo:s,attrExprInfoIndex:l,isLeftColumn:u=!0,isIndentModeEnabled:c=!1,indentLevel:d,labelStructure:p,env:f,pageInfo:h,direction:m="ltr"})=>{const g=(!c||!u)&&"P"===e.qType,v=((e,t)=>{if(e!==M$){if(t){const t=OF(e.representation);return t===AF.Link||t===AF.Image?e.representation:{type:AF.Text}}return e.representation}})(s,c),y=(({node:e,isLeftColumn:t,isIndentModeEnabled:n,labelStructure:r,representationType:i,parentOrRootOriginalValue:o})=>{let a=e.qText;if(t&&n&&r){const{originalValue:t,delimeter:n,suffix:s}=r;a=i===AF.Link?"P"===e.qType?o:t:`${t} ${!s||!t&&s?"":n} ${s}`.trim()}return a})({node:e,isLeftColumn:u,isIndentModeEnabled:c,labelStructure:p,representationType:OF(v),parentOrRootOriginalValue:(t||n)?.representation?.labelStructure?.originalValue??""}),b=DH({cell:{...e,qText:y},representationProperties:v,attrExprInfoIndex:l,env:f,labelStructure:p,direction:m,enabledFeatures:{[AF.Image]:!0,[AF.Indicator]:!0}}),x={id:J_(),ref:e,x:r,y:i,pageX:r,pageY:o,mainAxisPageCoord:u?o:r,isLeftColumn:u,parent:t,root:n,children:[],isLeafNode:0===e.qSubNodes.length,leafCount:MH(e,i,o,r,u,h),distanceToNextCell:0,isLockedByDimension:!("object"!=typeof s||!s.qLocked),isTotal:"T"===e.qType||!!t?.isTotal,isEmpty:"E"===e.qType||-4===e.qElemNo,isNull:"U"===e.qType,isPseudoDimension:g,expressionColor:RH(l,e),selectionCellType:u?"L":"T",dimensionInfoIndex:a.getDimensionInfoIndex(s),canBeResized:0===e.qSubNodes.length&&!u,visibleMeasureInfoIndex:g?e.qElemNo:t?.visibleMeasureInfoIndex,representation:b,...void 0!==d&&{indentLevel:d}};return t&&(t.children[x.mainAxisPageCoord-t.mainAxisPageCoord]=x),x},AH=(e,t,n,r,i,o,a,s,l)=>{const{isIndentModeEnabled:u}=i;if(!t.length)return e;let c=0;return function t(d,p,f,h=0,m=-1){e[h]||(e[h]={}),u&&m++;const g=i.leftDimensionInfoIndexes.indexOf(M$);f.forEach((f,v)=>{const y={originalValue:f.qText??"",maskedValue:"",delimeter:"-",suffix:""};c+=0===v?0:1;const b=n.qTop-r.page*r.rowsPerPage,x=Math.max(0,b+c-f.qUp),S=n.qTop+c-f.qUp;if(u){if(i.hasPseudoDimOnLeft&&m<=g)if(y.originalValue=f.qText??"",y.maskedValue=f.qText??"","N"===f.qType||"U"===f.qType||"T"===f.qType)"U"===f.qType&&(y.originalValue=i.getNullValueText()),m<g&&(y.suffix=i.visibleMeasureInfo[0].qFallbackTitle??"");else if("P"===f.qType){y.originalValue=(p||d)?.representation.labelStructure?.originalValue??"",y.maskedValue=(p||d)?.representation.labelStructure?.originalValue??"",y.suffix=f.qText??"";const e=f.qSubNodes;f={...(p||d)?.ref,...f.qText?{qText:f.qText}:{},qSubNodes:e},m=(p||d)?.indentLevel??0}"U"===f.qType&&(y.originalValue=i.getNullValueText())}let w=h;u&&(w=g>=1&&m>=g?m+1:m,0===m&&0===g&&0===f.qSubNodes.length&&(w=0));const C=e.at(h)?.[x],E=u&&void 0===C?.ref.qText||!C?LH({node:f,parent:p,root:d,x:w,y:S,pageY:x,layoutService:i,dimensionInfo:o[w],attrExprInfoIndex:a[w],isLeftColumn:!0,...u&&{isIndentModeEnabled:u,indentLevel:m},env:s,pageInfo:r,labelStructure:y,direction:l}):e[h][x];if(e[h][x]=E,f.qSubNodes.length){const e=u?0:h+1;t(d||E,E,f.qSubNodes,e,m)}})}(null,null,t,0,-1),e},kH=(e,t)=>{e.slice(0,-1).forEach(e=>{Object.values(e).forEach((e,n,r)=>{const i=r.at(n+1);e.distanceToNextCell=i?i.mainAxisPageCoord-(e.mainAxisPageCoord+e.leafCount):t-(e.mainAxisPageCoord+e.leafCount)})})},OH=(e,t)=>{const n=e[0],r=n?Object.values(n):[],i=t?.isIndentModeEnabled&&t.hasPseudoDimOnLeft?t.visibleMeasureInfo.length-1:0,o=n?.[i],a=r.at(-1);return o?.isTotal?o.isLeafNode?o.mainAxisPageCoord:o.mainAxisPageCoord+o.leafCount-1:a?.isTotal?a.mainAxisPageCoord-1:-1},qH=({prevData:e,nextDataPage:t,pageInfo:n,layoutService:r,visibleLeftDimensionInfo:i,attrExprInfoIndexes:o,env:a,direction:s})=>{const{qLeft:l,qArea:u}=t;if(!l.length)return e;const c=AH(e.grid,l,u,n,r,i,o,a,s);kH(c,n.rowsOnCurrentPage);const d=OH(c,r);return{...e,grid:c,columnCount:c.length,totalDividerIndex:d}},TH=({qArea:e,prevData:t,pivotValuePoints:n,pageInfo:r})=>{const i=[...t];return n.forEach((t,n)=>{t.forEach((t,o)=>{const a=e.qTop-r.page*r.rowsPerPage+n,s=e.qLeft+o;Array.isArray(i[a])||(i[a]=[]);const l="U"===t.qType;i[a][s]=i[a][s]??{id:J_(),ref:t,isNull:l}})}),i},NH=({prevData:e,dataPage:t,pageInfo:n})=>{const{qData:r,qArea:i}=t;return r?.length?TH({qArea:i,prevData:e,pivotValuePoints:r,pageInfo:n}):e},jH=(e,t,n,r,i,o,a,s,l,u)=>{const{isIndentModeEnabled:c}=r;if(!t.length)return e;let d=0;!function t(a,p,f,h=0){e[h]||(e[h]={}),f.forEach((f,m)=>{d+=0===m?0:1;const g=n.qLeft+d-f.qUp,v=e[h][g]??LH({node:f,parent:p,root:a,x:g,y:h,pageY:h,layoutService:r,dimensionInfo:i[h],attrExprInfoIndex:o[h],isLeftColumn:!1,...c&&{isIndentModeEnabled:c},env:s,pageInfo:l,direction:u});e[h][g]=v,f.qSubNodes.length&&t(a||v,v,f.qSubNodes,h+1)})}(null,null,t);for(let t=0;t<a-e.length;t++)e.push({});return e},_H=({prevData:e,nextDataPage:t,layoutService:n,visibleTopDimensionInfo:r,attrExprInfoIndexes:i,headerRows:o,env:a,pageInfo:s,direction:l})=>{const{qTop:u,qArea:c}=t;if(!u.length)return e;const d=jH(e.grid,u,c,n,r,i,o,a,s,l);kH(d,n.size.x);const p=OH(d);return{...e,grid:d,rowCount:d.length,totalDividerIndex:p}},FH=e=>-1===e?{}:e.qAttrExprInfo.reduce((e,{id:t},n)=>(e[t]=n,e),{}),zH=(e,t)=>{const{env:n}=w$(),{direction:r}=b$(),{layoutService:i,effectivePropertiesService:o}=I$(),{qPivotDataPages:a,pageInfo:s}=b$(),[l,u]=m(null),c=((e,t,n)=>v(()=>({left:e.map(FH),top:t.map(FH),measures:n.map(FH)}),[n,e,t]))(e,t,i.visibleMeasureInfo),d=v(()=>T$(i,o,t,e),[i,o,t,e]),p=f(()=>a.slice(1).reduce((e,t)=>NH({prevData:e,dataPage:t,pageInfo:s}),((e,t)=>{const{qData:n,qArea:r}=e;return TH({qArea:r,prevData:[],pivotValuePoints:n,pageInfo:t})})(a[0],s)),[a,s]),h=f(()=>a.slice(1).reduce((e,o)=>_H({prevData:e,nextDataPage:o,layoutService:i,visibleTopDimensionInfo:t,attrExprInfoIndexes:c.top,headerRows:d.size.y,env:n,pageInfo:s,direction:r}),((e,t,n,r,i,o,a,s)=>{const{qArea:l,qTop:u}=e,c=jH([],u,l,t,n,r,i,o,a,s);kH(c,t.size.x);const d=OH(c);return{grid:c,rowCount:c.length,layoutSize:t.size,totalDividerIndex:d}})(a[0],i,t,c.top,d.size.y,n,s,r)),[a,i,t,c.top,d.size.y,n,s,r]),g=f(()=>a.slice(1).reduce((t,o)=>qH({prevData:t,nextDataPage:o,pageInfo:s,layoutService:i,visibleLeftDimensionInfo:e,attrExprInfoIndexes:c.left,env:n,direction:r}),((e,t,n,r,i,o,a)=>{const{qArea:s,qLeft:l}=e,u=AH([],l,s,n,t,r,i,o,a);kH(u,n.rowsOnCurrentPage);const c=OH(u,t);return{grid:u,columnCount:u.length,layoutSize:t.size,totalDividerIndex:c}})(a[0],i,s,e,c.left,n,r)),[a,i,s,e,c,n,r]),[y,b]=m(()=>p()),[x,S]=m(()=>h()),[w,C]=m(()=>g());Gz(()=>{b(p())},[p]),Gz(()=>{S(h())},[h]),Gz(()=>{C(g())},[g]),Gz(()=>{l&&l.forEach(o=>{b(e=>NH({prevData:e,dataPage:o,pageInfo:s})),S(e=>_H({prevData:e,nextDataPage:o,layoutService:i,visibleTopDimensionInfo:t,attrExprInfoIndexes:c.top,headerRows:d.size.y,env:n,pageInfo:s,direction:r})),C(t=>qH({prevData:t,nextDataPage:o,pageInfo:s,layoutService:i,visibleLeftDimensionInfo:e,attrExprInfoIndexes:c.left,env:n,direction:r}))})},[l]);const E=f(e=>{u(e)},[]);return{headersData:d,measureData:y,topDimensionData:x,leftDimensionData:w,attrExprInfoIndexes:c,nextPageHandler:E}},WH=Math.sqrt(1e4),$H=e=>({maxNumberOfVisibleRows:Math.ceil(e.height/24),maxNumberOfVisibleColumns:Math.ceil(e.width/MT.PixelsMin)}),HH=e=>{if(null===e)return[];if(e.qWidth*e.qHeight<1e4)return[e];const t=[],n=Math.ceil(e.qWidth/WH),r=Math.ceil(e.qHeight/WH);for(let i=0;i<n;i++)for(let n=0;n<r;n++)t.push({qLeft:e.qLeft+i*WH,qTop:e.qTop+n*WH,qWidth:Math.min(WH,e.qWidth-i*WH),qHeight:Math.min(WH,e.qHeight-n*WH)});return t};function VH({nextPageHandler:e}){const{model:t}=w$(),{pageInfo:n}=b$(),{layoutService:r}=I$(),i=(e=>{const t=l(e);return t.current=e,t})(n.page),o=t,a=f(async(e,t)=>{await(o?.collapseLeft(P$,e,t,!1))},[o]),s=f(async(e,t)=>{await(o?.collapseTop(P$,e,t,!1))},[o]),u=f(async(e,t)=>{await(o?.expandLeft(P$,e,t,!1))},[o]),c=f(async(e,t)=>{await(o?.expandTop(P$,e,t,!1))},[o]),d=f(async t=>{if(o?.getHyperCubePivotData&&0!==t.length)try{const r=await o.getHyperCubePivotData(P$,t.reduce((e,t)=>[...e,...HH(t)],[]));i.current===n.page&&e(r)}catch(e){console.error(e)}},[o,e,n,i]),p=f((e,{dimensionInfoIndex:n,isLeftColumn:i,x:o=0,columnWidthLocation:a})=>{const{qMeasureInfo:s,qDimensionInfo:l,topHeadersColumnWidth:u}=r.layout.qHyperCube;let c=[];switch(a){case _F.Dimension:c=[{qPath:`${P$}/qDimensions/${n}/qDef/columnWidth`,oldValue:l[n].columnWidth}];break;case _F.Measures:if(i)c=s.map((e,t)=>({qPath:`${P$}/qMeasures/${t}/qDef/columnWidth`,oldValue:e.columnWidth}));else{const e=r.getMeasureInfoIndexFromCellIndex(o);c=[{qPath:`${P$}/qMeasures/${e}/qDef/columnWidth`,oldValue:s[e].columnWidth}]}break;case _F.Pivot:c=[{qPath:`${P$}/topHeadersColumnWidth`,oldValue:u}]}const d=c.map(t=>{const{qPath:n,oldValue:r}=t;return{qPath:n,qOp:r?"Replace":"Add",qValue:JSON.stringify({...r,...e})}});t?.applyPatches(d,!0)},[t,r]),h=f(async e=>{await(o?.applyPatches([{qPath:`${P$}/indentModeColumnWidth`,qOp:r.layout.qHyperCube.indentModeColumnWidth?"Replace":"Add",qValue:JSON.stringify({...r.indentModeColumnWidth,...e})}],!0))},[o,r]);return v(()=>({collapseLeft:a,collapseTop:s,expandLeft:u,expandTop:c,applyColumnWidth:p,applyIndentModeColumnWidth:h,fetchPages:d}),[a,s,u,c,p,h,d])}const BH=(e,t,n)=>(r,i)=>{if("P"===r)return M$;const o=t[n+i];return e[o]},GH=e=>{const t=[],n=(e,r=0)=>{e.slice(0,1).forEach(e=>{t[r]=e.qType,e.qSubNodes.length&&n(e.qSubNodes,r+1)})};return n(e),t},UH=u({}),YH=()=>h(UH),KH=({children:e})=>{const{visibleLeftDimensionInfo:t,visibleTopDimensionInfo:n}=(()=>{const{layoutService:{layout:{qHyperCube:{qNoOfLeftDims:e,qEffectiveInterColumnSortOrder:t,qDimensionInfo:n}}}}=I$(),{qPivotDataPages:r}=b$();return v(()=>{const i=GH(r[0]?.qLeft??[]),o=GH(r[0]?.qTop??[]);return{visibleLeftDimensionInfo:i.map(BH(n,t,0)),visibleTopDimensionInfo:o.map(BH(n,t,e))}},[n,t,e,r])})(),{headersData:r,measureData:i,topDimensionData:o,leftDimensionData:a,attrExprInfoIndexes:s,nextPageHandler:l}=zH(t,n),u=VH({nextPageHandler:l}),c=v(()=>({gridSectionsData:{headersData:r,topDimensionData:o,leftDimensionData:a,measureData:i},visibleDimensionsInfo:{visibleLeftDimensionInfo:t,visibleTopDimensionInfo:n},attrExprInfoIndexes:s,dataModel:u}),[t,n,r,i,o,a,s,u]);return fo.jsx(UH.Provider,{value:c,children:e})},XH=20,JH=18,ZH=.75,QH=e=>-1!==e&&e?.representation?.type===AF.Image,eV=({isLeftColumn:e,layoutService:t,representation:n})=>Boolean(e)&&t.isIndentModeEnabled&&n.type===AF.Image,tV=e=>void 0===e?sz:e,nV=(e,t)=>{if(void 0!==e&&!Number.isNaN(+e)){const n=+e;return n>=0?n:t}return t},rV=e=>nV(e,MT.PixelsDefault),iV=(e,t)=>nV(e,MT.PercentageDefault)*t/100,oV=(e,t,n)=>{switch(t?.type){case LT.Pixels:return rV(t.pixels);case LT.Percentage:return iV(t.percentage,e);case LT.FitToContent:case LT.Auto:default:return n}},aV=({headers:e,layoutService:t,effectivePropertiesService:n,estimateWidthForDimensionValue:r,shouldConsiderCombinatedLength:i,measureTextForHeader:o,longestMeasureValuePossible:a})=>e.reduce((e,s,l)=>{const{layout:{qHyperCube:{qNoOfLeftDims:u,qDimensionInfo:c}}}=t,{id:d,colIdx:p,qApprMaxGlyphCount:f,isLeftDimension:h}=s,m=c.find(e=>e.cId===d),g={width:24,...m?.representation?.imageBox};if(!h)return e+0;if(d===L$)return e+0;const v=eV({isLeftColumn:h,layoutService:t,representation:m?.representation||{type:AF.Text}})?g.width+8+4:r(f),y=!n.qAlwaysFullyExpanded&&p<u-1?21:0;let b=0;if(i&&o&&a){b=o("- ")+a}return Math.max(e,24*l+JH+y+v+b)},0),sV=(e,t,n)=>e.reduce((e,r)=>{const i=(n?0:1)*JH;return Math.max(e,i+t(r.qFallbackTitle??""))},0),lV=(e,t,n,r)=>{const i=100*e/t,o=r*ZH*(i/100),a=i/100*+n;return Math.min(a,o)},uV=(e,t,n,r)=>r*(+n/100)*(100*e/t/100),cV=(e,t)=>e.some(e=>e>=t*ZH),dV=({layoutService:e,effectivePropertiesService:t,headersData:n,columnWidths:r,tableWidth:i,widthOverride:o,measureTextForHeader:a,estimateWidthForDimensionValue:s,measureTextWidthForMeasuresCombinedWithDimensions:l,translator:u})=>{let c=[];const d=i*ZH,p=n.data[n.data.length-1][0];if(!Array.isArray(p))return{leftGridWidth:0,leftGridColumnWidths:[],leftGridFullWidth:0};const f=Math.min(d,r.at(-1)),h=Math.min(d,aV({headers:p,layoutService:e,effectivePropertiesService:t,estimateWidthForDimensionValue:s})),m=Math.min(d,sV(e.visibleMeasureInfo,a));let g=0;const v=p.findIndex(e=>e.id===L$),y=(({layoutService:e,measureTextForHeader:t,translator:n,headersData:r})=>{const{type:i}=e.indentModeColumnWidth;return i===LT.Auto&&r.size.y<=1?t(n.get("SNPivotTable.IndentMode.Rows"))+8+JH+16:24})({layoutService:e,measureTextForHeader:a,translator:u,headersData:n});if(e.hasPseudoDimOnLeft)if(0===v){const e=Math.max(f,h,m);c=[Math.max(y,e-f),f]}else{const n=Math.min(d,sV(e.visibleMeasureInfo,l,!0));g=Math.min(d,aV({headers:p.slice(0,v),layoutService:e,effectivePropertiesService:t,estimateWidthForDimensionValue:s,shouldConsiderCombinatedLength:!0,measureTextForHeader:a,longestMeasureValuePossible:n}));const r=Math.max(f,h,g);c=[Math.max(y,r-f),f]}else c=[Math.max(y,h-f),f];const b=Math.min(d,c.reduce((e,t)=>e+t,0)),{indentModeColumnWidth:x}=e;o&&o<=d&&(x.type=LT.Pixels,x.pixels=o);return[LT.Pixels,LT.Percentage].includes(x.type)||cV(c,i)?((e,t,n,r)=>{let i=e[0],o=e[1],a=[];const s=e.reduce((e,t)=>e+t,0),{type:l,pixels:u,percentage:c}=t,d=nV(u,MT.PixelsDefault),p=nV(c,MT.PercentageDefault),f=cV(e,n);l===LT.Auto&&f&&(i>o?i-=o:o-=i),l===LT.Pixels&&d&&(i=lV(e[0],s,d,n),o=lV(e[1],s,d,n)),l===LT.Percentage&&p&&(i=uV(e[0],s,p,n),o=uV(e[1],s,p,n));let h=0;o<=r&&(h=i-5,h>0&&(i-=h,o+=h)),h=o-r,h>0&&(i+=h,o-=h),a=[i,o];const m=a.reduce((e,t)=>e+t,0);return{leftGridColumnWidths:a,leftGridWidth:m,leftGridFullWidth:m}})(c,x,i,f):{leftGridWidth:b,leftGridColumnWidths:c,leftGridFullWidth:b}};function pV({tableWidth:e}){const t=e*ZH,{styleService:n,layoutService:r,effectivePropertiesService:i}=I$(),{translator:o}=w$(),{gridSectionsData:{headersData:a}}=YH(),{measureText:s}=$z(n.header,{allowLineBreaks:!1}),{estimateWidth:l,measureText:u}=$z({...n.dimensionValues,fontWeight:tV(n.dimensionValues.fontWeight)}),{measureText:c}=$z({...n.dimensionValues,...n.measureLabels}),d=f((n,d)=>{const{layout:{qHyperCube:{qNoOfLeftDims:p,topHeadersColumnWidth:f}},visibleMeasureInfo:h,isIndentModeEnabled:m,hasPseudoDimOnLeft:g}=r,v=(t=0)=>h.reduce((n,{qFallbackTitle:r,columnWidth:i})=>{const o=c(r)+JH,a=Math.max(o,t);return Math.max(n,m?a:oV(e,i,a))},0),y=e=>a.data.reduce((t,n)=>{const r=n.at(e);if(!r||Array.isArray(r))return t;if(r.id===L$)return t;const i=(e=>{const{label:t,isLocked:n}=e,r=n?XH:0;return JH+s(t)+XH+r})(r);return Math.max(i,t)},0);let b=0,x=a.data.at(-1);m&&a.size.x>1&&x&&x[0]&&(x=x[0]);const S=x.map((o,s)=>{let u=JH;if(m&&1!==a.size.x||!n||void 0===d||d!==o.colIdx){let t;o.columnWidthLocation===_F.Pivot?t=m?void 0:f:o.columnWidthLocation===_F.Dimension&&({columnWidth:t}=o);let n=0;if(o.isLeftDimension)if(o.id===L$)n=v();else{const e=y(s),t=((e,t)=>{const{qApprMaxGlyphCount:n,isLeftDimension:o,dimensionInfoIndex:a}=e,s=r.getDimensionInfo(a);if(QH(s))return MT.PixelsDefault;const u=!i.qAlwaysFullyExpanded&&o&&t<p-1?21:0;return JH+l(n)+u})(o,s);n=Math.max(e,t),m&&!g&&s+1===p&&o.columnWidthLocation===_F.Dimension&&a.size.x>1&&(n=e)}else n=y(s),o.columnWidthLocation===_F.Measures&&(n=v(n));m&&1===a.size.x&&(t=r.indentModeColumnWidth),u=m&&!g&&a.size.x>1?n:oV(e,t,n)}else u=m?Math.min(t,n):n;return b+=u,u});return m&&a.size.x>1?dV({layoutService:r,effectivePropertiesService:i,headersData:a,columnWidths:S,tableWidth:e,widthOverride:n,measureTextForHeader:s,estimateWidthForDimensionValue:l,measureTextWidthForMeasuresCombinedWithDimensions:u,translator:o}):{leftGridWidth:Math.min(t,b),leftGridColumnWidths:S,leftGridFullWidth:b}},[e,a,r,t,s,c,l,u,o,i]),[p,h]=m(d);Gz(()=>{h(d())},[d]);const g=f((e,t)=>{h(d(e,t))},[d]);return{...p,overrideLeftGridWidth:g}}function fV({tableWidth:e,verticalScrollbarWidth:t,leftGridWidth:n}){const{styleService:r,layoutService:i}=I$(),{visibleDimensionsInfo:{visibleTopDimensionInfo:o}}=YH(),{layout:{qHyperCube:{qNoOfLeftDims:a,qEffectiveInterColumnSortOrder:s}},size:l,visibleMeasureInfo:u}=i,{estimateWidth:c,measureText:d}=$z(r.measureValues,{allowLineBreaks:!1}),{estimateWidth:p}=$z({...r.dimensionValues,fontWeight:tV(r.dimensionValues.fontWeight)},{allowLineBreaks:!1}),h=e-n-1,m=o.at(-1),g=m===M$,y=s.length-a>o.length?21:0,b=v(()=>{const e=g?u:[m],t=l.x/e.length,n=[],r=[];let i=h;const o=(e,r)=>{n[e]=Math.min(MT.PixelsMax,Math.max(MT.PixelsMin,r)),i-=n[e]*t};if(e.forEach((e,t)=>{if(e?.columnWidth){const{columnWidth:{type:n,pixels:i,percentage:a},qApprMaxGlyphCount:s,qFallbackTitle:l}=e;switch(n){case LT.Pixels:o(t,rV(i));break;case LT.Percentage:o(t,iV(a,h));break;case LT.FitToContent:o(t,((e,t,n)=>n?MT.PixelsDefault:JH+(g?Math.max(c(e),d(t)):Math.max(Math.max(...u.map(e=>c(e.qApprMaxGlyphCount))),p(e)+y)))(s,l??"",QH(e)));break;case LT.Auto:default:r.push(t)}}else r.push(t)}),r.length){const e=r.length*t,o=i/e;r.forEach(e=>{n[e]=Math.max(MT.AutoMinPivot,o)})}return n},[g,u,m,l.x,h,c,d,p,y]),x=v(()=>{if(g){return u.reduce((e,t,n)=>e+b[n],0)/u.length}return b[0]},[g,b,u]),S=parseFloat((t/i.size.x).toFixed(12)),w=f(e=>(g&&void 0!==e?b[i.getMeasureInfoIndexFromCellIndex(e,!0)]:x)-S,[g,b,i,x,S]),C=l.x*x;return{rightGridFullWidth:C,rightGridWidth:Math.min(C,h),getRightGridColumnWidth:w}}const hV=`scrollable-container--${zF.TopGrid}`,mV=`scrollable-container--${zF.LeftGrid}`,gV=`scrollable-container--${zF.DataGrid}`,vV=e=>{if(!(e&&e instanceof HTMLDivElement))return{width:0,height:0};const t=e.offsetWidth-e.clientWidth,n=e.offsetHeight-e.clientHeight;return{width:t>=2?t:0,height:n>=2?n:0}},yV=(e,t)=>e>t?WF.Forward:e<t?WF.Backward:WF.None,bV=({gridRefs:{topGridRef:e,leftGridRef:t,dataGridRef:n},getWrapperElements:r,updateViewService:i,trackScrollDirection:o,interactions:a})=>{const{direction:s}=b$();d(()=>{const{headerGridWrapperElement:l,topGridWrapperElement:u,leftGridWrapperElement:c,dataGridWrapperElement:d}=r(),p=e=>{const t=e.target;l.scrollLeft=t.scrollLeft,o(e),i?.(e)},f=e=>{const t=e.target;l.scrollTop=t.scrollTop,o(e),i?.(e)},h=r=>{const a=r.target,l=((e,t)=>{const{scrollWidth:n,clientWidth:r,scrollLeft:i}=e,o=n-r;if("rtl"===t){if(i>o)return o;if(i<0)return Math.abs(i)}return i})(a,s);n.current?.scrollTo({scrollLeft:l,scrollTop:a.scrollTop}),u.scrollLeft=l,e.current?.forEach(e=>{e?.scrollTo(l)}),c.scrollTop=d.scrollTop,t.current?.forEach(e=>{e?.scrollTo(a.scrollTop)}),o(r),i?.(r)};return c.addEventListener("scroll",p),u.addEventListener("scroll",f),d.addEventListener("scroll",h),a.scroll||setTimeout(()=>{c.removeEventListener("scroll",p),u.removeEventListener("scroll",f),d.removeEventListener("scroll",h)},0),()=>{c.removeEventListener("scroll",p),u.removeEventListener("scroll",f),d.removeEventListener("scroll",h)}},[o,i,a,e,t,n,r,s])},xV=ww(!1),SV=(e,t)=>Math.abs(e.width-t.width)>2||Math.abs(e.height-t.height)>2,wV=({topGridWrapperRef:e,leftGridWrapperRef:t,dataGridWrapperRef:n})=>{const{top:r,left:i,data:o,resetHorizontalScrollbarHeight:a}=((e,t,n)=>{const[r,i]=m({width:0,height:0}),[o,a]=m({width:0,height:0}),[s,u]=m({width:0,height:0}),[c,p]=m(!1),h=qw(xV),g=l(h),v=l(h);g.current=h;const y=f(()=>{p(e=>!e&&e);const r=vV(e.current),o=vV(t.current),s=vV(n.current);i(e=>SV(e,r)?r:e),a(e=>SV(e,o)?o:e),u(e=>SV(e,s)?s:e)},[e,t,n]);d(()=>{const r=new ResizeObserver(()=>{g.current||y()}),i=[e.current,t.current,n.current].filter(e=>Boolean(e));return i.forEach(e=>{r.observe(e)}),()=>{r.disconnect()}},[y,e,t,n]),d(()=>{const e=v.current;if(v.current=h,e&&!h){const e=setTimeout(y,0);return()=>{clearTimeout(e)}}},[h,y]);const b=f(()=>{p(!0)},[]);return{top:r,left:c?{...o,height:0}:o,data:c?{...s,height:0}:s,resetHorizontalScrollbarHeight:b}})(e,t,n);return{scrollbarsDimensions:{verticalScrollbarWidth:Math.max(r.width,o.width),horizontalScrollbarHeight:Math.max(i.height,o.height)},resetHorizontalScrollbarHeight:a}},CV=()=>{const{interactions:e}=w$(),t=l(null),n=l(null),r=l(null),i=l(null),o=l([]),a=l([]),s=l(null),{scrollbarsDimensions:{verticalScrollbarWidth:u,horizontalScrollbarHeight:c},resetHorizontalScrollbarHeight:p}=wV({topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:i});(({gridSectionsWrapperRefs:{headerGridWrapperRef:e,topGridWrapperRef:t,leftGridWrapperRef:n,dataGridWrapperRef:r},gridRefs:{topGridRef:i,leftGridRef:o,dataGridRef:a}})=>{const{pageInfo:s}=b$(),{downloadService:l,viewService:u,layoutService:c}=I$(),d=f(()=>{const i={left:0,top:0};e.current?.scrollTo(i),t.current?.scrollTo(i),n.current?.scrollTo(i),r.current?.scrollTo(i)},[e,t,n,r]);g(()=>{d()},[s.page,d]),g(()=>{c.triggerdByExpandOrCollapse||d()},[c,d]),g(()=>{if(c.triggerdByExpandOrCollapse){const e=r.current?.scrollLeft??0,t=r.current?.scrollTop??0;o.current?.forEach(e=>{e?.scrollTo(t)}),i.current?.forEach(t=>{t?.scrollTo(e)}),a.current?.scrollTo({scrollTop:t,scrollLeft:e})}},[c,r,a,o,i]),g(()=>{(l.isDownloadedAsPDForImage||c.isSnapshot)&&r.current&&n.current&&t.current&&(r.current.scrollTop=u.scrollTop,r.current.scrollLeft=u.scrollLeft,n.current.scrollLeft=u.leftGridScrollLeft,t.current.scrollTop=u.topGridScrollTop)},[u,l,c,r,n,t])})({gridSectionsWrapperRefs:{headerGridWrapperRef:t,topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:i},gridRefs:{topGridRef:o,leftGridRef:a,dataGridRef:s}});const{trackScrollDirection:h,scrollDirectionRefs:{verticalScrollDirection:m,horizontalScrollDirection:v}}=(()=>{const e=l(WF.None),t=l(WF.None),n=l({prevScrollTop:0,prevScrollLeft:0}),r=f(r=>{if(r instanceof WheelEvent&&(e.current=yV(r.deltaY,0),t.current=yV(r.deltaX,0)),r instanceof Event&&!(r instanceof WheelEvent)){const i=r.target;e.current=yV(i.scrollTop,n.current.prevScrollTop),n.current.prevScrollTop=i.scrollTop,t.current=yV(i.scrollLeft,n.current.prevScrollLeft),n.current.prevScrollLeft=i.scrollLeft}},[e,t,n]);return{trackScrollDirection:r,scrollDirectionRefs:{verticalScrollDirection:e,horizontalScrollDirection:t}}})(),y=(()=>{const{viewService:e}=I$();return f(t=>{const n=t.target,r=t.currentTarget,i=n.dataset.key;i===mV&&(e.leftGridScrollLeft=r.scrollLeft),i===gV&&(e.scrollLeft=r.scrollLeft),i===hV&&(e.topGridScrollTop=r.scrollTop),i!==mV&&i!==gV||(e.scrollTop=r.scrollTop)},[e])})(),b={gridRefs:{topGridRef:o,leftGridRef:a,dataGridRef:s},getWrapperElements:f(()=>({headerGridWrapperElement:t.current,topGridWrapperElement:n.current,leftGridWrapperElement:r.current,dataGridWrapperElement:i.current}),[t,n,r,i]),updateViewService:y,trackScrollDirection:h,interactions:e};return(({gridRefs:{topGridRef:e,leftGridRef:t,dataGridRef:n},getWrapperElements:r,updateViewService:i,trackScrollDirection:o,interactions:a})=>{d(()=>{const{headerGridWrapperElement:i,topGridWrapperElement:s,leftGridWrapperElement:l,dataGridWrapperElement:u}=r(),c=e=>{e.ctrlKey||(e.preventDefault(),i.scrollLeft+=e.deltaX,i.scrollTop+=e.deltaY,l.scrollLeft=i.scrollLeft,s.scrollTop=i.scrollTop,o(e))},d=e=>{e.ctrlKey||(e.preventDefault(),l.scrollTop+=e.deltaY,t.current?.forEach(e=>{e?.scrollTo(l.scrollTop)}),i.scrollLeft+=e.deltaX,l.scrollLeft=i.scrollLeft,u.scrollTop=l.scrollTop,n.current?.scrollTo({scrollTop:l.scrollTop}),o(e))},p=t=>{t.ctrlKey||(t.preventDefault(),s.scrollLeft+=t.deltaX,e.current?.forEach(e=>{e?.scrollTo(s.scrollLeft)}),i.scrollTop+=t.deltaY,s.scrollTop=i.scrollTop,u.scrollLeft=s.scrollLeft,n.current?.scrollTo({scrollLeft:s.scrollLeft}),o(t))},f=r=>{r.ctrlKey||(r.preventDefault(),u.scrollLeft+=r.deltaX,u.scrollTop+=r.deltaY,n.current?.scrollTo({scrollLeft:u.scrollLeft,scrollTop:u.scrollTop}),s.scrollLeft=u.scrollLeft,e.current?.forEach(e=>{e?.scrollTo(u.scrollLeft)}),l.scrollTop=u.scrollTop,t.current?.forEach(e=>{e?.scrollTo(u.scrollTop)}),o(r))};return i.addEventListener("wheel",c),l.addEventListener("wheel",d),s.addEventListener("wheel",p),u.addEventListener("wheel",f),a.scroll||setTimeout(()=>{i.removeEventListener("wheel",c),l.removeEventListener("wheel",d),s.removeEventListener("wheel",p),u.removeEventListener("wheel",f)},0),()=>{i.removeEventListener("wheel",c),l.removeEventListener("wheel",d),s.removeEventListener("wheel",p),u.removeEventListener("wheel",f)}},[o,i,a,e,t,n,r])})(b),bV(b),{gridSectionsWrapperRefs:{headerGridWrapperRef:t,topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:i},gridRefs:{topGridRef:o,leftGridRef:a,dataGridRef:s},scrollDirectionRefs:{verticalScrollDirection:m,horizontalScrollDirection:v},scrollbarsDimensions:{verticalScrollbarWidth:u,horizontalScrollbarHeight:c,resetHorizontalScrollbarHeight:p}}},EV=()=>{const{layoutService:e}=I$(),{rect:t,pageInfo:n}=b$();return v(()=>{let{height:r}=t;return e.hasLimitedData&&(r-=22),n.shouldShowPagination&&(r-=41),{...t,height:r}},[t,e,n.shouldShowPagination])},IV=({children:e,style:t})=>fo.jsx("div",{"data-testid":"fullSize",style:t,children:e}),DV=({children:e,style:t})=>{const{direction:n}=b$();return fo.jsx("div",{"data-section-id":"GRID",style:{direction:n,display:"grid",...t},children:e})},RV=e=>e&&`scrollable-container--${e}`,PV=({children:e,style:t,origin:n},r)=>{const{interactions:i}=w$(),o=i.scroll?t:{overflow:"hidden"};return fo.jsx("div",{"data-testid":"scrollable","data-key":RV(n),style:o,ref:r,children:e})};var MV=n.forwardRef(PV);const LV=({children:e,style:t})=>{const{direction:n}=b$();return fo.jsx("div",{"data-testid":"sticky",style:{position:"sticky",top:0,["rtl"===n?"right":"left"]:0,...t},children:e})};var AV=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function kV(e,t){return e===t||!(!AV(e)||!AV(t))}function OV(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!kV(e[n],t[n]))return!1;return!0}function qV(e,t){var n;void 0===t&&(t=OV);var r,i=[],o=!1;return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return o&&n===this&&t(a,i)||(r=e.apply(this,a),o=!0,n=this,i=a),r}}var TV="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function NV(e){cancelAnimationFrame(e.id)}function jV(e,t){var n=TV();var r={id:requestAnimationFrame(function i(){TV()-n>=t?e.call(null):r.id=requestAnimationFrame(i)})};return r}var _V=-1;function FV(e){if(void 0===e&&(e=!1),-1===_V||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),_V=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return _V}var zV=null;function WV(e){if(void 0===e&&(e=!1),null===zV||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),i=r.style;return i.width="100px",i.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?zV="positive-descending":(t.scrollLeft=1,zV=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),zV}return zV}var $V=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function HV(e){var t,n=e.getColumnOffset,i=e.getColumnStartIndexForOffset,o=e.getColumnStopIndexForStartIndex,a=e.getColumnWidth,s=e.getEstimatedTotalHeight,l=e.getEstimatedTotalWidth,u=e.getOffsetForColumnAndAlignment,c=e.getOffsetForRowAndAlignment,d=e.getRowHeight,p=e.getRowOffset,f=e.getRowStartIndexForOffset,h=e.getRowStopIndexForStartIndex,m=e.initInstanceProps,g=e.shouldResetStyleCacheOnItemSizeChange,v=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=m(r.props,$l(r)),r._resetIsScrollingTimeoutId=null,r._outerRef=void 0,r.state={instance:$l(r),isScrolling:!1,horizontalScrollDirection:"forward",scrollLeft:"number"==typeof r.props.initialScrollLeft?r.props.initialScrollLeft:0,scrollTop:"number"==typeof r.props.initialScrollTop?r.props.initialScrollTop:0,scrollUpdateWasRequested:!1,verticalScrollDirection:"forward"},r._callOnItemsRendered=void 0,r._callOnItemsRendered=qV(function(e,t,n,i,o,a,s,l){return r.props.onItemsRendered({overscanColumnStartIndex:e,overscanColumnStopIndex:t,overscanRowStartIndex:n,overscanRowStopIndex:i,visibleColumnStartIndex:o,visibleColumnStopIndex:a,visibleRowStartIndex:s,visibleRowStopIndex:l})}),r._callOnScroll=void 0,r._callOnScroll=qV(function(e,t,n,i,o){return r.props.onScroll({horizontalScrollDirection:n,scrollLeft:e,scrollTop:t,verticalScrollDirection:i,scrollUpdateWasRequested:o})}),r._getItemStyle=void 0,r._getItemStyle=function(e,t){var i,o=r.props,s=o.columnWidth,l=o.direction,u=o.rowHeight,c=r._getItemStyleCache(g&&s,g&&l,g&&u),f=e+":"+t;if(c.hasOwnProperty(f))i=c[f];else{var h=n(r.props,t,r._instanceProps),m="rtl"===l;c[f]=i={position:"absolute",left:m?void 0:h,right:m?h:void 0,top:p(r.props,e,r._instanceProps),height:d(r.props,e,r._instanceProps),width:a(r.props,t,r._instanceProps)}}return i},r._getItemStyleCache=void 0,r._getItemStyleCache=qV(function(e,t,n){return{}}),r._onScroll=function(e){var t=e.currentTarget,n=t.clientHeight,i=t.clientWidth,o=t.scrollLeft,a=t.scrollTop,s=t.scrollHeight,l=t.scrollWidth;r.setState(function(e){if(e.scrollLeft===o&&e.scrollTop===a)return null;var t=r.props.direction,u=o;if("rtl"===t)switch(WV()){case"negative":u=-o;break;case"positive-descending":u=l-i-o}u=Math.max(0,Math.min(u,l-i));var c=Math.max(0,Math.min(a,s-n));return{isScrolling:!0,horizontalScrollDirection:e.scrollLeft<o?"forward":"backward",scrollLeft:u,scrollTop:c,verticalScrollDirection:e.scrollTop<a?"forward":"backward",scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&NV(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=jV(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1)})},r}kl(t,e),t.getDerivedStateFromProps=function(e,t){return VV(e,t),v(e),null};var y=t.prototype;return y.scrollTo=function(e){var t=e.scrollLeft,n=e.scrollTop;void 0!==t&&(t=Math.max(0,t)),void 0!==n&&(n=Math.max(0,n)),this.setState(function(e){return void 0===t&&(t=e.scrollLeft),void 0===n&&(n=e.scrollTop),e.scrollLeft===t&&e.scrollTop===n?null:{horizontalScrollDirection:e.scrollLeft<t?"forward":"backward",scrollLeft:t,scrollTop:n,scrollUpdateWasRequested:!0,verticalScrollDirection:e.scrollTop<n?"forward":"backward"}},this._resetIsScrollingDebounced)},y.scrollToItem=function(e){var t=e.align,n=void 0===t?"auto":t,r=e.columnIndex,i=e.rowIndex,o=this.props,a=o.columnCount,d=o.height,p=o.rowCount,f=o.width,h=this.state,m=h.scrollLeft,g=h.scrollTop,v=FV();void 0!==r&&(r=Math.max(0,Math.min(r,a-1))),void 0!==i&&(i=Math.max(0,Math.min(i,p-1)));var y=s(this.props,this._instanceProps),b=l(this.props,this._instanceProps)>f?v:0,x=y>d?v:0;this.scrollTo({scrollLeft:void 0!==r?u(this.props,r,n,m,this._instanceProps,x):m,scrollTop:void 0!==i?c(this.props,i,n,g,this._instanceProps,b):g})},y.componentDidMount=function(){var e=this.props,t=e.initialScrollLeft,n=e.initialScrollTop;if(null!=this._outerRef){var r=this._outerRef;"number"==typeof t&&(r.scrollLeft=t),"number"==typeof n&&(r.scrollTop=n)}this._callPropsCallbacks()},y.componentDidUpdate=function(){var e=this.props.direction,t=this.state,n=t.scrollLeft,r=t.scrollTop;if(t.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("rtl"===e)switch(WV()){case"negative":i.scrollLeft=-n;break;case"positive-ascending":i.scrollLeft=n;break;default:var o=i.clientWidth,a=i.scrollWidth;i.scrollLeft=a-o-n}else i.scrollLeft=Math.max(0,n);i.scrollTop=Math.max(0,r)}this._callPropsCallbacks()},y.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&NV(this._resetIsScrollingTimeoutId)},y.render=function(){var e=this.props,t=e.children,n=e.className,i=e.columnCount,o=e.direction,a=e.height,u=e.innerRef,c=e.innerElementType,d=e.innerTagName,p=e.itemData,f=e.itemKey,h=void 0===f?$V:f,m=e.outerElementType,g=e.outerTagName,v=e.rowCount,y=e.style,b=e.useIsScrolling,x=e.width,S=this.state.isScrolling,w=this._getHorizontalRangeToRender(),C=w[0],E=w[1],I=this._getVerticalRangeToRender(),D=I[0],R=I[1],P=[];if(i>0&&v)for(var M=D;M<=R;M++)for(var L=C;L<=E;L++)P.push(r(t,{columnIndex:L,data:p,isScrolling:b?S:void 0,key:h({columnIndex:L,data:p,rowIndex:M}),rowIndex:M,style:this._getItemStyle(M,L)}));var A=s(this.props,this._instanceProps),k=l(this.props,this._instanceProps);return r(m||g||"div",{className:n,onScroll:this._onScroll,ref:this._outerRefSetter,style:ke({position:"relative",height:a,width:x,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},y)},r(c||d||"div",{children:P,ref:u,style:{height:A,pointerEvents:S?"none":void 0,width:k}}))},y._callPropsCallbacks=function(){var e=this.props,t=e.columnCount,n=e.onItemsRendered,r=e.onScroll,i=e.rowCount;if("function"==typeof n&&t>0&&i>0){var o=this._getHorizontalRangeToRender(),a=o[0],s=o[1],l=o[2],u=o[3],c=this._getVerticalRangeToRender(),d=c[0],p=c[1],f=c[2],h=c[3];this._callOnItemsRendered(a,s,d,p,l,u,f,h)}if("function"==typeof r){var m=this.state,g=m.horizontalScrollDirection,v=m.scrollLeft,y=m.scrollTop,b=m.scrollUpdateWasRequested,x=m.verticalScrollDirection;this._callOnScroll(v,y,g,x,b)}},y._getHorizontalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanColumnCount,r=e.overscanColumnsCount,a=e.overscanCount,s=e.rowCount,l=this.state,u=l.horizontalScrollDirection,c=l.isScrolling,d=l.scrollLeft,p=n||r||a||1;if(0===t||0===s)return[0,0,0,0];var f=i(this.props,d,this._instanceProps),h=o(this.props,f,d,this._instanceProps),m=c&&"backward"!==u?1:Math.max(1,p),g=c&&"forward"!==u?1:Math.max(1,p);return[Math.max(0,f-m),Math.max(0,Math.min(t-1,h+g)),f,h]},y._getVerticalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanCount,r=e.overscanRowCount,i=e.overscanRowsCount,o=e.rowCount,a=this.state,s=a.isScrolling,l=a.verticalScrollDirection,u=a.scrollTop,c=r||i||n||1;if(0===t||0===o)return[0,0,0,0];var d=f(this.props,u,this._instanceProps),p=h(this.props,d,u,this._instanceProps),m=s&&"backward"!==l?1:Math.max(1,c),g=s&&"forward"!==l?1:Math.max(1,c);return[Math.max(0,d-m),Math.max(0,Math.min(o-1,p+g)),d,p]},t}(C),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var VV=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},BV=function(e,t){var n=e.rowCount,r=t.rowMetadataMap,i=t.estimatedRowHeight,o=t.lastMeasuredRowIndex,a=0;if(o>=n&&(o=n-1),o>=0){var s=r[o];a=s.offset+s.size}return a+(n-o-1)*i},GV=function(e,t){var n=e.columnCount,r=t.columnMetadataMap,i=t.estimatedColumnWidth,o=t.lastMeasuredColumnIndex,a=0;if(o>=n&&(o=n-1),o>=0){var s=r[o];a=s.offset+s.size}return a+(n-o-1)*i},UV=function(e,t,n,r){var i,o,a;if("column"===e?(i=r.columnMetadataMap,o=t.columnWidth,a=r.lastMeasuredColumnIndex):(i=r.rowMetadataMap,o=t.rowHeight,a=r.lastMeasuredRowIndex),n>a){var s=0;if(a>=0){var l=i[a];s=l.offset+l.size}for(var u=a+1;u<=n;u++){var c=o(u);i[u]={offset:s,size:c},s+=c}"column"===e?r.lastMeasuredColumnIndex=n:r.lastMeasuredRowIndex=n}return i[n]},YV=function(e,t,n,r){var i,o;return"column"===e?(i=n.columnMetadataMap,o=n.lastMeasuredColumnIndex):(i=n.rowMetadataMap,o=n.lastMeasuredRowIndex),(o>0?i[o].offset:0)>=r?KV(e,t,n,o,0,r):XV(e,t,n,Math.max(0,o),r)},KV=function(e,t,n,r,i,o){for(;i<=r;){var a=i+Math.floor((r-i)/2),s=UV(e,t,a,n).offset;if(s===o)return a;s<o?i=a+1:s>o&&(r=a-1)}return i>0?i-1:0},XV=function(e,t,n,r,i){for(var o="column"===e?t.columnCount:t.rowCount,a=1;r<o&&UV(e,t,r,n).offset<i;)r+=a,a*=2;return KV(e,t,n,Math.min(r,o-1),Math.floor(r/2),i)},JV=function(e,t,n,r,i,o,a){var s="column"===e?t.width:t.height,l=UV(e,t,n,o),u="column"===e?GV(t,o):BV(t,o),c=Math.max(0,Math.min(u-s,l.offset)),d=Math.max(0,l.offset-s+a+l.size);switch("smart"===r&&(r=i>=d-s&&i<=c+s?"auto":"center"),r){case"start":return c;case"end":return d;case"center":return Math.round(d+(c-d)/2);default:return i>=d&&i<=c?i:d>c||i<d?d:c}},ZV=HV({getColumnOffset:function(e,t,n){return UV("column",e,t,n).offset},getColumnStartIndexForOffset:function(e,t,n){return YV("column",e,n,t)},getColumnStopIndexForStartIndex:function(e,t,n,r){for(var i=e.columnCount,o=e.width,a=UV("column",e,t,r),s=n+o,l=a.offset+a.size,u=t;u<i-1&&l<s;)u++,l+=UV("column",e,u,r).size;return u},getColumnWidth:function(e,t,n){return n.columnMetadataMap[t].size},getEstimatedTotalHeight:BV,getEstimatedTotalWidth:GV,getOffsetForColumnAndAlignment:function(e,t,n,r,i,o){return JV("column",e,t,n,r,i,o)},getOffsetForRowAndAlignment:function(e,t,n,r,i,o){return JV("row",e,t,n,r,i,o)},getRowOffset:function(e,t,n){return UV("row",e,t,n).offset},getRowHeight:function(e,t,n){return n.rowMetadataMap[t].size},getRowStartIndexForOffset:function(e,t,n){return YV("row",e,n,t)},getRowStopIndexForStartIndex:function(e,t,n,r){for(var i=e.rowCount,o=e.height,a=UV("row",e,t,r),s=n+o,l=a.offset+a.size,u=t;u<i-1&&l<s;)u++,l+=UV("row",e,u,r).size;return u},initInstanceProps:function(e,t){var n=e,r={columnMetadataMap:{},estimatedColumnWidth:n.estimatedColumnWidth||50,estimatedRowHeight:n.estimatedRowHeight||50,lastMeasuredColumnIndex:-1,lastMeasuredRowIndex:-1,rowMetadataMap:{}};return t.resetAfterColumnIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({columnIndex:e,shouldForceUpdate:n})},t.resetAfterRowIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({rowIndex:e,shouldForceUpdate:n})},t.resetAfterIndices=function(e){var n=e.columnIndex,i=e.rowIndex,o=e.shouldForceUpdate,a=void 0===o||o;"number"==typeof n&&(r.lastMeasuredColumnIndex=Math.min(r.lastMeasuredColumnIndex,n-1)),"number"==typeof i&&(r.lastMeasuredRowIndex=Math.min(r.lastMeasuredRowIndex,i-1)),t._getItemStyleCache(-1),a&&t.forceUpdate()},r},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.columnWidth,e.rowHeight}}),QV=function(e,t){return e};function eB(e){var t,n=e.getItemOffset,i=e.getEstimatedTotalSize,o=e.getItemSize,a=e.getOffsetForIndexAndAlignment,s=e.getStartIndexForOffset,l=e.getStopIndexForStartIndex,u=e.initInstanceProps,c=e.shouldResetStyleCacheOnItemSizeChange,d=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=u(r.props,$l(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:$l(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=qV(function(e,t,n,i){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:i})}),r._callOnScroll=void 0,r._callOnScroll=qV(function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})}),r._getItemStyle=void 0,r._getItemStyle=function(e){var t,i=r.props,a=i.direction,s=i.itemSize,l=i.layout,u=r._getItemStyleCache(c&&s,c&&l,c&&a);if(u.hasOwnProperty(e))t=u[e];else{var d=n(r.props,e,r._instanceProps),p=o(r.props,e,r._instanceProps),f="horizontal"===a||"horizontal"===l,h="rtl"===a,m=f?d:0;u[e]=t={position:"absolute",left:h?void 0:m,right:h?m:void 0,top:f?0:d,height:f?"100%":p,width:f?p:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=qV(function(e,t,n){return{}}),r._onScrollHorizontal=function(e){var t=e.currentTarget,n=t.clientWidth,i=t.scrollLeft,o=t.scrollWidth;r.setState(function(e){if(e.scrollOffset===i)return null;var t=r.props.direction,a=i;if("rtl"===t)switch(WV()){case"negative":a=-i;break;case"positive-descending":a=o-n-i}return a=Math.max(0,Math.min(a,o-n)),{isScrolling:!0,scrollDirection:e.scrollOffset<a?"forward":"backward",scrollOffset:a,scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._onScrollVertical=function(e){var t=e.currentTarget,n=t.clientHeight,i=t.scrollHeight,o=t.scrollTop;r.setState(function(e){if(e.scrollOffset===o)return null;var t=Math.max(0,Math.min(o,i-n));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&NV(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=jV(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1,null)})},r}kl(t,e),t.getDerivedStateFromProps=function(e,t){return tB(e,t),d(e),null};var p=t.prototype;return p.scrollTo=function(e){e=Math.max(0,e),this.setState(function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffset<e?"forward":"backward",scrollOffset:e,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},p.scrollToItem=function(e,t){void 0===t&&(t="auto");var n=this.props,r=n.itemCount,i=n.layout,o=this.state.scrollOffset;e=Math.max(0,Math.min(e,r-1));var s=0;if(this._outerRef){var l=this._outerRef;s="vertical"===i?l.scrollWidth>l.clientWidth?FV():0:l.scrollHeight>l.clientHeight?FV():0}this.scrollTo(a(this.props,e,t,o,this._instanceProps,s))},p.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,r=e.layout;if("number"==typeof n&&null!=this._outerRef){var i=this._outerRef;"horizontal"===t||"horizontal"===r?i.scrollLeft=n:i.scrollTop=n}this._callPropsCallbacks()},p.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,i=r.scrollOffset;if(r.scrollUpdateWasRequested&&null!=this._outerRef){var o=this._outerRef;if("horizontal"===t||"horizontal"===n)if("rtl"===t)switch(WV()){case"negative":o.scrollLeft=-i;break;case"positive-ascending":o.scrollLeft=i;break;default:var a=o.clientWidth,s=o.scrollWidth;o.scrollLeft=s-a-i}else o.scrollLeft=i;else o.scrollTop=i}this._callPropsCallbacks()},p.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&NV(this._resetIsScrollingTimeoutId)},p.render=function(){var e=this.props,t=e.children,n=e.className,o=e.direction,a=e.height,s=e.innerRef,l=e.innerElementType,u=e.innerTagName,c=e.itemCount,d=e.itemData,p=e.itemKey,f=void 0===p?QV:p,h=e.layout,m=e.outerElementType,g=e.outerTagName,v=e.style,y=e.useIsScrolling,b=e.width,x=this.state.isScrolling,S="horizontal"===o||"horizontal"===h,w=S?this._onScrollHorizontal:this._onScrollVertical,C=this._getRangeToRender(),E=C[0],I=C[1],D=[];if(c>0)for(var R=E;R<=I;R++)D.push(r(t,{data:d,key:f(R,d),index:R,isScrolling:y?x:void 0,style:this._getItemStyle(R)}));var P=i(this.props,this._instanceProps);return r(m||g||"div",{className:n,onScroll:w,ref:this._outerRefSetter,style:ke({position:"relative",height:a,width:b,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},v)},r(l||u||"div",{children:D,ref:s,style:{height:S?"100%":P,pointerEvents:x?"none":void 0,width:S?P:"100%"}}))},p._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],i=e[3];this._callOnItemsRendered(t,n,r,i)}if("function"==typeof this.props.onScroll){var o=this.state,a=o.scrollDirection,s=o.scrollOffset,l=o.scrollUpdateWasRequested;this._callOnScroll(a,s,l)}},p._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,i=r.isScrolling,o=r.scrollDirection,a=r.scrollOffset;if(0===t)return[0,0,0,0];var u=s(this.props,a,this._instanceProps),c=l(this.props,u,a,this._instanceProps),d=i&&"backward"!==o?1:Math.max(1,n),p=i&&"forward"!==o?1:Math.max(1,n);return[Math.max(0,u-d),Math.max(0,Math.min(t-1,c+p)),u,c]},t}(C),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var tB=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},nB=function(e,t,n){var r=e.itemSize,i=n.itemMetadataMap,o=n.lastMeasuredIndex;if(t>o){var a=0;if(o>=0){var s=i[o];a=s.offset+s.size}for(var l=o+1;l<=t;l++){var u=r(l);i[l]={offset:a,size:u},a+=u}n.lastMeasuredIndex=t}return i[t]},rB=function(e,t,n,r,i){for(;r<=n;){var o=r+Math.floor((n-r)/2),a=nB(e,o,t).offset;if(a===i)return o;a<i?r=o+1:a>i&&(n=o-1)}return r>0?r-1:0},iB=function(e,t,n,r){for(var i=e.itemCount,o=1;n<i&&nB(e,n,t).offset<r;)n+=o,o*=2;return rB(e,t,Math.min(n,i-1),Math.floor(n/2),r)},oB=function(e,t){var n=e.itemCount,r=t.itemMetadataMap,i=t.estimatedItemSize,o=t.lastMeasuredIndex,a=0;if(o>=n&&(o=n-1),o>=0){var s=r[o];a=s.offset+s.size}return a+(n-o-1)*i},aB=eB({getItemOffset:function(e,t,n){return nB(e,t,n).offset},getItemSize:function(e,t,n){return n.itemMetadataMap[t].size},getEstimatedTotalSize:oB,getOffsetForIndexAndAlignment:function(e,t,n,r,i,o){var a=e.direction,s=e.height,l=e.layout,u=e.width,c="horizontal"===a||"horizontal"===l?u:s,d=nB(e,t,i),p=oB(e,i),f=Math.max(0,Math.min(p-c,d.offset)),h=Math.max(0,d.offset-c+d.size+o);switch("smart"===n&&(n=r>=h-c&&r<=f+c?"auto":"center"),n){case"start":return f;case"end":return h;case"center":return Math.round(h+(f-h)/2);default:return r>=h&&r<=f?r:r<h?h:f}},getStartIndexForOffset:function(e,t,n){return function(e,t,n){var r=t.itemMetadataMap,i=t.lastMeasuredIndex;return(i>0?r[i].offset:0)>=n?rB(e,t,i,0,n):iB(e,t,Math.max(0,i),n)}(e,n,t)},getStopIndexForStartIndex:function(e,t,n,r){for(var i=e.direction,o=e.height,a=e.itemCount,s=e.layout,l=e.width,u="horizontal"===i||"horizontal"===s?l:o,c=nB(e,t,r),d=n+u,p=c.offset+c.size,f=t;f<a-1&&p<d;)f++,p+=nB(e,f,r).size;return f},initInstanceProps:function(e,t){var n={itemMetadataMap:{},estimatedItemSize:e.estimatedItemSize||50,lastMeasuredIndex:-1};return t.resetAfterIndex=function(e,r){void 0===r&&(r=!0),n.lastMeasuredIndex=Math.min(n.lastMeasuredIndex,e-1),t._getItemStyleCache(-1),r&&t.forceUpdate()},n},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.itemSize}});function sB(e,t){for(var n in e)if(!(n in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1}var lB=["style"],uB=["style"];function cB(e,t){var n=e.style,r=Oe(e,lB),i=t.style,o=Oe(t,uB);return!sB(n,i)&&!sB(r,o)}const dB=10,pB=(e,t)=>e.current===WF.Backward?t:0,fB=(e,t,n,r)=>{for(let i=n;i<n+r;i++){const n=e.at(i);if(void 0===n||void 0===n.at(t))return!0}return!1},hB=(e,t)=>e.qLeft+e.qWidth===t.qLeft&&e.qTop===t.qTop&&e.qHeight===t.qHeight,mB=({pageInfo:e,measureData:t,pageTop:n,qHeight:r,startLeft:i,endLeft:o})=>{const a=[],s=e.page*e.rowsPerPage;for(let e=i;e<o;e++)if(fB(t,e,n,r)){const t=a[a.length-1],i={qLeft:e,qTop:n+s,qWidth:1,qHeight:r};void 0!==t&&hB(t,i)?t.qWidth+=i.qWidth:a.push(i)}return a},gB=({pageInfo:e,measureData:t,scrollDirection:n,viewService:r,minBufferStartLeft:i,minBufferEndLeft:o,columnEndIndex:a})=>{const{gridRowStartIndex:s,gridHeight:l}=r,u=n.current===WF.Backward?Math.max(0,i-25):o,c=Math.min(u+25,a);return mB({pageInfo:e,measureData:t,startLeft:u,endLeft:c,pageTop:s,qHeight:l})},vB=({pageInfo:e,measureData:t,scrollDirection:n,layoutService:r,viewService:i})=>{const{startLeft:o,endLeft:a,pageTop:s,qHeight:l}=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:i,gridWidth:o,gridHeight:a}=t,s=e.size.x,l=pB(n,dB),u=Math.max(r-l,0);return{startLeft:u,endLeft:u+Math.min(o+dB,s-u),pageTop:i,qHeight:a}})(r,i,n),u=mB({pageInfo:e,measureData:t,startLeft:o,endLeft:a,pageTop:s,qHeight:l});return u.length>0?[...u,...gB({pageInfo:e,measureData:t,scrollDirection:n,viewService:i,minBufferStartLeft:o,minBufferEndLeft:a,columnEndIndex:r.size.x})]:u},yB=(e,t,n,r)=>{const i=e[n];if(void 0===i)return!0;for(let e=t;e<t+r;e++){if(void 0===i[e])return!0}return!1},bB=(e,t)=>e.qTop+e.qHeight===t.qTop&&e.qLeft===t.qLeft&&e.qWidth===t.qWidth,xB=({startTop:e,endTop:t,qLeft:n,qWidth:r,measureData:i,pageInfo:o})=>{const a=[],s=o.page*o.rowsPerPage;for(let o=e;o<t;o++)if(yB(i,n,o,r)){const e=a.at(-1),t={qLeft:n,qTop:o+s,qWidth:r,qHeight:1};void 0!==e&&bB(e,t)?e.qHeight+=t.qHeight:a.push(t)}return a},SB=({pageInfo:e,measureData:t,scrollDirection:n,viewService:r})=>{const{startTop:i,endTop:o,qLeft:a,qWidth:s}=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:i,gridWidth:o,gridHeight:a}=t,s=pB(n,dB),l=Math.max(i-s,0);return{startTop:l,endTop:l+Math.min(a+dB,e.rowsOnCurrentPage-l),qLeft:r,qWidth:o}})(e,r,n),l=xB({startTop:i,endTop:o,qLeft:a,qWidth:s,measureData:t,pageInfo:e});if(l.length>0){const r=n.current===WF.Backward?Math.max(0,i-25):o,u=Math.min(r+25,e.rowsOnCurrentPage),c=xB({startTop:r,endTop:u,qLeft:a,qWidth:s,measureData:t,pageInfo:e});return[...l,...c]}return l},wB=async(e,t,n,r,i,o,a,s)=>{const{gridColumnStartIndex:l,gridRowStartIndex:u,gridWidth:c,gridHeight:d}=i;let p=[],f=[];o.current!==WF.None&&(p=SB({pageInfo:r,measureData:n,scrollDirection:o,viewService:i})),a.current!==WF.None&&(f=vB({pageInfo:r,measureData:n,scrollDirection:a,layoutService:t,viewService:i})),o.current===WF.None&&a.current===WF.None&&(p=xB({measureData:n,pageInfo:r,qLeft:l,qWidth:c,startTop:u,endTop:u+d}));const h=e.fetchPages([...p,...f]);s.isDownloadedAsPDForImage&&s.waitForPromise(h)},CB=function(e){var t,n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,o=0;return function(){t=this;for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];n=s;var u=Date.now()-o,c=function(){o=Date.now(),r=0,e.apply(t,n)};r||(u>=i?c():r=setTimeout(c,i-u))}}(wB,100),EB=e_(wB,75),IB=(e,t,n=!1)=>void 0!==e&&(e.isLeafNode||n&&e.isLeftColumn?e.mainAxisPageCoord===t:e.mainAxisPageCoord+e.leafCount-1===t),DB=({style:e,index:t,isLastRow:n,isLastColumn:r,showLastBorder:i,isLeftColumn:o,showTotalCellDivider:a})=>{const{direction:s}=b$(),{styleService:{grid:{border:l,divider:u}}}=I$();return fo.jsx("div",{style:{...e,...hz,...yz(n,r,l,s,i),...xz({bottomDivider:a&&o,rightDivider:a&&!o,borderColor:u})},"data-testid":"empty-cell","data-index":t})},RB=({children:e,verticalAlign:t,width:n,right:r,isLeftColumn:i})=>{const{layoutService:{isIndentModeEnabled:o}}=I$(),a=i&&o;return fo.jsx("div",{"data-key":"sticky-cell-container",style:{display:"flex",flexDirection:"row",width:n,maxWidth:"100%",maxHeight:"100%",position:"sticky",left:4,top:0,bottom:0,right:r,...!a&&{alignItems:t,alignSelf:t,overflow:"hidden"}},children:e})},PB=e=>{const{type:t,imageSize:n}=e;return t!==AF.Image||"fill"!==n&&"fitWidth"!==n?"fit-content":"100%"},MB=e=>"number"==typeof e&&!Number.isNaN(+e),LB=e=>"string"==typeof e&&e.length>0||"number"==typeof e?+e:NaN,AB=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M7.5 8.5H2v-1h5.5V2h1v5.5H14v1H8.5V14h-1z"})})),kB=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8"})})),OB=x((e,t)=>fo.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:[fo.jsx("path",{d:"M3 9v6.5a.5.5 0 1 1-1 0V.5a.5.5 0 0 1 1 0V1q2.441.639 3.667.639c1.225 0 1.774-.995 3.87-1.196q1.972-.19 3.297.47A.3.3 0 0 1 14 1.18v7.344a.3.3 0 0 1-.417.277q-1.338-.565-3.045-.416c-1.98.172-2.083 1.107-3.871 1.253Q4.879 9.785 3 9"}),fo.jsx("use",{fillRule:"evenodd"})]})),qB=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M13.9 7.4c-1 1.3-.6 1.5-1.5 4.1-.5 1.8-1.2 2.9-1.7 3.6q-.45.6-.9.9H4.2c-1 0-1.6-.5-1.9-1-.2-.3-.3-.6-.3-1V4.2c0-.4.3-.7.7-.7s.7.3.7.7v3.6l.9-.1V1.6c0-.4.3-.7.7-.7s.7.3.7.7v5.1l1.1-.2V.7C6.7.3 7 0 7.4 0s.7.3.7.7v5.9l1.1.1V1.6c0-.4.3-.7.7-.7s.7.3.7.7v7.7s.1 0 .1-.2l.6-1.4c1.1-2.1 3.1-1.1 2.6-.3"})})),TB=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M5 13h6v1.5c0 .3-.2.5-.5.5H10v.5c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5V15h-.5c-.3 0-.5-.2-.5-.5zm0-1c0-2-3-3-3-7 0-3 3-5 6-5s6 2 6 5c0 4-3 4-3 7H5m-.5-7c.3 0 .5-.2.5-.5s.2-.7.5-1 .6-.5 1-.5c.3 0 .5-.2.5-.5S6.8 2 6.5 2c-.6 0-1.2.3-1.7.8S4 3.9 4 4.5c0 .3.2.5.5.5"})})),NB=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8m4.5 9c.25 0 .5-.3.5-.6v-.8c0-.3-.25-.6-.5-.6h-9c-.25 0-.5.3-.5.6v.7c0 .4.25.7.5.7z"})})),jB=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M2 7.5h12v1H2z"})})),_B=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M9 7h7a7.004 7.004 0 0 0-7-7zm1-5.917A6.005 6.005 0 0 1 14.917 6H10zM14 9H7V2a7.002 7.002 0 0 0 0 14 7 7 0 0 0 7-7m-8 1h6.917A6.002 6.002 0 0 1 1 9a6 6 0 0 1 5-5.917z"})})),FB=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M9 9h3.5c.25 0 .5-.3.5-.6v-.8c0-.3-.25-.6-.5-.6H9V3.5c0-.25-.3-.5-.6-.5h-.7c-.4 0-.7.25-.7.5V7H3.5c-.25 0-.5.3-.5.6v.7c0 .4.25.7.5.7H7v3.5c0 .25.3.5.6.5h.8c.3 0 .6-.25.6-.5zM8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8"})})),zB=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"m8.418 1.007.042.08 1.788 4.217 4.571.388a.5.5 0 0 1 .348.811l-.063.065-3.472 3.008 1.043 4.47a.5.5 0 0 1-.664.581l-.081-.04L8 12.217l-3.93 2.372a.5.5 0 0 1-.757-.453l.012-.089 1.043-4.47L.896 6.568a.5.5 0 0 1 .196-.86l.089-.016 4.571-.388L7.54 1.086a.5.5 0 0 1 .878-.08Z"})})),WB=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M13 14H3a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1"})})),$B=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"m6 10 7-7 2 2-7 7-2 2-5-5 2-2z"})})),HB=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M2.4 4h11.2a.2.2 0 0 1 .16.32l-5.6 7.467a.2.2 0 0 1-.32 0L2.24 4.32A.2.2 0 0 1 2.4 4"})})),VB=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M11 2.4v11.2a.2.2 0 0 1-.32.16l-7.467-5.6a.2.2 0 0 1 0-.32l7.467-5.6a.2.2 0 0 1 .32.16"})})),BB=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M4 13.6V2.4a.2.2 0 0 1 .32-.16l7.467 5.6a.2.2 0 0 1 0 .32l-7.467 5.6A.2.2 0 0 1 4 13.6"})})),GB={m:$B,"ï":zB,R:x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M13.6 11H2.4a.2.2 0 0 1-.16-.32l5.6-7.467a.2.2 0 0 1 .32 0l5.6 7.467a.2.2 0 0 1-.16.32"})})),S:HB,T:VB,U:BB,P:FB,Q:NB,"è":x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M14.98 15H1.04c-1.002 0-1.303-.7-.802-1.5l6.82-11.9c.5-.8 1.303-.8 1.804 0l6.92 11.9c.501.8.1 1.5-.803 1.5M8.5 5h-1c-.3 0-.5.2-.5.5V9c0 .3.2.5.5.5h1c.3 0 .5-.2.5-.5V5.5c0-.3-.2-.5-.5-.5m-1 6c-.3 0-.5.2-.5.5v1c0 .3.2.5.5.5h1c.3 0 .5-.2.5-.5v-1c0-.3-.2-.5-.5-.5z"})})),"¢":qB,"©":OB,"23F4":TB,2013:WB,"&":_B,add:AB,"minus-2":jB,dot:kB},UB=({size:e,iconKey:t,color:n,pvStyle:r})=>{const i=t&&GB[t];return i&&fo.jsx("div",{"data-testid":"representation-indicator-icon",style:{color:n,height:e,...r},children:fo.jsx(i,{style:{height:e}})})},YB=(e,t)=>e.max===e.min?.5:(t-e.min)/(e.max-e.min),KB=(e,t,n)=>{const r=e.paletteColors?e.paletteColors[t]:e.localPaletteColors[t];return n.getColorPickerColor(r)},XB=(e,t,n)=>{const r={previousColor:(i=e.localPaletteColors)[(o=t)-(o>0?1:0)],nextColor:i[o+(o<i.length-1?1:0)]};var i,o;const a=((e,t)=>{const n=e.limits&&e.limits.concat().sort((e,t)=>e.value-t.value);return{lowerLimit:n&&t>0?n[t-1]:{value:0,gradient:!1},upperLimit:n&&n[t]?n[t]:{value:1,gradient:!1}}})(e,t),s=((e,t,n,r,i)=>{const{upperLimit:o,lowerLimit:a}=e,{previousColor:s,nextColor:l}=t,u=r===o.value?1:(r-a.value)/(o.value-a.value);return a.gradient&&o.gradient?r-a.value<o.value-r?{color:s.color,t:.5-u}:{color:l.color,t:u-.5}:a.gradient?{color:s.color,t:1-(.5+u/2)}:o.gradient?{color:l.color,t:u/2}:{color:i.localPaletteColors[n].color,t:r}})(a,r,t,n,e);return LN(e.localPaletteColors[t].color??"").blend(LN(s.color??""),s.t)},JB=(e,t,n)=>{const r=((e,t)=>{const{limits:n}=e;return n&&(e.limits=n.sort((e,t)=>e.value-t.value),e.limits=n.map(e=>({...e,value:YB(t,e.value)}))),e})({...e},t),i=r.paletteColors||r.localPaletteColors;return i&&(r.localPaletteColors=i.concat().map((e,t)=>({color:KB(r,t,n)}))),r},ZB=(e,t,n,r)=>{const i=JB(e,n,r),{localPaletteColors:o}=i;if(t<=0)return o[0].color;if(t>=1)return o[o.length-1].color;const a=((e,t)=>{let n="",r=0;const{limits:i,localPaletteColors:o}=e;for(let a=0;a<o.length;a++){const o=i&&i[a]?i[a].value:1;if(t>=r&&t<o){n=XB(e,a,t);break}r=o}return n})(i,t);return a},QB=(e,t)=>{const n=(e=>e.map(e=>e.value??e).sort((e,t)=>e-t))(e),r=n.some(e=>!MB(e));return 0===n.length||r?(e=>{const t=0===e?0:.5*e;return{min:e-t,max:e+t}})(t):1===n.length?((e,t)=>{const n=e[0]-t;if(0===n||!MB(n)){const e=0===t?.5:Math.abs(.5*t);return{min:t-e,max:t+e}}return n>0?{min:t-.5*Math.abs(t),max:e[0]+2*n}:{min:e[0]+2*n,max:t+.5*Math.abs(t)}})(n,t):((e,t)=>{let n=e[e.length-1]-e[0];return n=n>0?n:1,{min:Math.min(t,e[0])-n/2,max:Math.max(t,e[e.length-1])+n/2}})(n,t)},eG=(e,t)=>{const{limits:n}=e.segments;if(!n)return;const r=((e,t)=>{const{min:n,max:r}=QB(e,t),i=Math.abs(t);return{min:n??t-i,max:r??t+i}})(n,t),i=((e,t,n)=>{const{limits:r,paletteColors:i,localPaletteColors:o}=e.segments;if(!r||!MB(t))return 0;let a=n&&MB(n)?Math.min(n,t):0;const s=r.sort((e,t)=>e.value-t.value),l=i||o;for(let e=0;e<l.length;e++){if(e===l.length-1||t<s[e].value&&t>=a)return e;a=s[e].value}return 0})(e,t,r.min);return{limitRange:r,limitPaletteColorIndex:i}},tG=e=>"flex-start"===e?"flex-end":"flex-start",nG=(e,t,n,r)=>{const i=e.indicatorConditionalColoring;if(!i)return;const o=eG(i,t),a=((e,t,n,r)=>{const{segments:i}=e;if(!i||!n)return;const{limits:o}=i;if(!o?.length||!((e,t)=>!(!e||0===e.length||!(e[t]?.gradient??e[t-1]?.gradient)))(o,n.limitPaletteColorIndex))return KB(i,n.limitPaletteColorIndex,r);const a=YB(n.limitRange,t);return ZB(i,a,n.limitRange,r)})(i,t,o,r),s=i.segments.paletteColors[o?.limitPaletteColorIndex||0].icon,{indicator:l}=e;let u=l?.position||"right";return"rtl"===n&&(u="right"===u?"left":"right"),{color:a,iconKey:s,position:u}},rG=({representation:e,cellValue:t,textStyle:n})=>{const{styleService:r}=I$(),{theme:i}=w$(),{direction:o}=b$(),{text:a,indicator:s}=e,{showTextValues:l,applySegmentColors:u}=s??{},c=nG(e,t,o,i),{fontSize:d,fontFamily:p,fontStyle:f,fontWeight:h,textDecoration:m}=r.measureValues,g={fontSize:d,fontFamily:p,fontStyle:f,fontWeight:h,textDecoration:m},v=parseInt(d||oz,10),{iconKey:y,color:b,position:x}=c||{},S={display:"flex",paddingTop:2};return l?fo.jsxs("div",{"data-key":"representation-indicator",style:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"4px",overflow:n?.overflow,color:u?b:n?.color},children:["left"===x&&UB({size:v,iconKey:y,color:b,pvStyle:S}),fo.jsx("span",{style:{paddingTop:4,overflow:n?.overflow,textOverflow:n?.textOverflow,whiteSpace:"nowrap",direction:t<0?"ltr":void 0,...g},children:a}),"right"===x&&UB({size:v,iconKey:y,color:b,pvStyle:S})]}):(S.paddingTop=5,UB({size:v,iconKey:y,color:b,pvStyle:S}))},iG=e=>!!e.target?.getAttribute("class")?.includes(PT),oG=(e,t)=>{switch(t.type){case"clearSelections":return{engineSelectedCells:null,activeSelection:null,selectedField:null};case"mouseup":return{...e,activeSelection:null,engineSelectedCells:t.payload.engineSelectedCells};case"mousedown":return{...e,activeSelection:t.payload.activeSelection,selectedField:t.payload.selectedField};case"mouseover":{if(!e.activeSelection)return e;const{index:n}=t.payload,r=Math.min(n,e.activeSelection.startIndex),i=Math.max(n,e.activeSelection.endIndex);if(r===e.activeSelection.startIndex&&i===e.activeSelection.endIndex)return e;const o={...e.activeSelection,startIndex:r,endIndex:i};return o.clientSelectedCells=(e=>{const{getCellFromIndex:t,startIndex:n,endIndex:r,clientSelectedCells:i}=e,o=new Map(i);for(let e=n;e<=r;e++){const n=t(e);"N"===n?.ref.qType&&o.set(n.ref.qElemNo,n)}return o})(o),{...e,activeSelection:o}}default:return e}},aG=e=>null!==e.target?.closest("[data-prevent-selection]"),sG=e=>"A"===e.target?.tagName,lG=({startIndex:e,getCellFromIndex:t,cell:n})=>({type:"mousedown",payload:{activeSelection:{startIndex:e,endIndex:e,getCellFromIndex:t,clientSelectedCells:(new Map).set(n.ref.qElemNo,n)},selectedField:{selectionCellType:n.selectionCellType,index:"L"===n.selectionCellType?n.x:n.y}}});const uG=u({createMouseDownHandler:()=>()=>{},createMouseOverHandler:()=>()=>{},createPointerUpHandler:()=>()=>{},isSelected:()=>!1,isActive:!1,isLocked:()=>!1}),cG=()=>h(uG),dG=({children:e,selections:t})=>{const n=function(e){const{updatePageInfo:t}=b$(),n=e.isActive(),[r,i]=c(oG,{engineSelectedCells:null,selectedField:null,activeSelection:null});d(()=>{const n=()=>{i({type:"clearSelections"})},r=()=>{n(),t({page:0})};return e.on("deactivated",n),e.on("canceled",n),e.on("confirmed",r),e.on("cleared",n),()=>{e.removeListener("deactivated",n),e.removeListener("canceled",n),e.removeListener("confirmed",r),e.removeListener("cleared",n)}},[e,t]);const o=f(async()=>{if(!r.activeSelection)return;var t,n;1===r.activeSelection.clientSelectedCells.size&&(t=r.engineSelectedCells,(n=r.activeSelection).clientSelectedCells.forEach((e,r)=>{t?.has(r)&&(n.clientSelectedCells.delete(r),t.delete(r))}));const o=new Map([...r.engineSelectedCells??new Map,...r.activeSelection.clientSelectedCells]);try{i({type:"mouseup",payload:{engineSelectedCells:o}}),await e.select({method:"selectPivotCells",params:[P$,Array.from(o,([,e])=>({qType:e.selectionCellType,qRow:e.y,qCol:e.x}))]})}catch(e){console.error(e),i({type:"mouseup",payload:{engineSelectedCells:r.engineSelectedCells}})}},[r,e]);d(()=>{if(r.activeSelection)return document.addEventListener("mouseup",o),()=>{document.removeEventListener("mouseup",o)}},[o,r.activeSelection]);const a=f((e,t)=>n=>{const r=t(e);iG(n)||aG(n)||sG(n)||!(e=>1===e.buttons)(n)||!r||i(lG({startIndex:e,getCellFromIndex:t,cell:r}))},[]),s=f(t=>async()=>{r.activeSelection&&(e.isActive()||await e.begin([P$]),i({type:"mouseover",payload:{index:t}}))},[r.activeSelection,e]),l=f((e,t)=>n=>{if("touch"!==n.pointerType)return;const r=t(e);iG(n)||aG(n)||sG(n)||!r||(i(lG({startIndex:e,getCellFromIndex:t,cell:r})),o())},[o]),u=f(e=>!(!r.engineSelectedCells?.size&&!r.activeSelection?.clientSelectedCells.size||!r.selectedField||e.selectionCellType===r.selectedField.selectionCellType&&("L"===e.selectionCellType?r.selectedField.index===e.x:r.selectedField.index===e.y)),[r.activeSelection?.clientSelectedCells.size,r.engineSelectedCells?.size,r.selectedField]),p=f(e=>!u(e)&&(r.engineSelectedCells?.has(e.ref.qElemNo)||!!r.activeSelection?.clientSelectedCells.has(e.ref.qElemNo)),[u,r.activeSelection?.clientSelectedCells,r.engineSelectedCells]);return v(()=>({isSelected:p,isActive:n,isLocked:u,createMouseDownHandler:a,createMouseOverHandler:s,createPointerUpHandler:l}),[p,n,u,a,s,l])}(t);return fo.jsx(uG.Provider,{value:n,children:e})},pG=e=>"fill"===e.representation.imageSize,fG=(e,t)=>{let n=e.isLeftColumn?"flex-start":"center";return e.isLeftColumn&&pG(e)&&t&&(n="center"),e.representation.type!==AF.Image||pG(e)?n:e.representation.resolvedImagePosition?.vertical};var hG=function(e){return e.Background="background",e.Color="color",e.FontWeight="fontWeight",e.FontStyle="fontStyle",e.TextDecoration="textDecoration",e}(hG||{});const mG={brighter:.5,darker:.3,opacity:.03},gG=(e,{cell:t,styleService:n})=>{if(e===hG.Background||e===hG.Color){const n=t.expressionColor[e];if(n)return n}return t.isNull?n.nullValues[e]:t.isPseudoDimension?n.measureLabels[e]:t.isTotal?n.totalValues[e]:n.dimensionValues[e]},vG=({styleService:e,isCellSelected:t,cell:n,isCellLocked:r})=>{if(t)return e.selectedColors.background;const i=gG(hG.Background,{cell:n,styleService:e});return!r||!i||n.isPseudoDimension||n.isEmpty||n.isNull||n.isTotal?gG(hG.Background,{cell:n,styleService:e}):`repeating-linear-gradient(\n -45deg,\n ${c_(o=i,mG)} 0px 2px,\n ${o} 0px 4px\n ) border-box`;var o},yG=({cell:e,styleService:t,isCellSelected:n})=>n?t.selectedColors.color:gG(hG.Color,{cell:e,styleService:t}),bG=({cell:e,styleService:t})=>{const{qCanCollapse:n,qCanExpand:r}=e.ref,i=gG(hG.FontWeight,{cell:e,styleService:t});return void 0===i&&(r||n)?sz:i},xG=({cell:e,styleService:t})=>gG(hG.FontStyle,{cell:e,styleService:t}),SG=({cell:e,styleService:t})=>gG(hG.TextDecoration,{cell:e,styleService:t}),wG=e=>e?"pointer":"default",CG=({expandOrCollapse:e,cell:t})=>n=>{e?.(t.y,t.x),n.stopPropagation()},EG=(e,t)=>{if(!e.isLeftColumn||e.representation.type===AF.Image)return{padding:4};return{padding:4,marginTop:t.dimensionValueTextHeight/2-6.5-4}},IG=({cell:e,isLeftColumn:t,isCellSelected:n})=>{const{styleService:r,layoutService:i}=I$(),{interactions:o}=w$(),{isActive:a}=cG(),{dataModel:s}=YH();if(!e.ref.qCanExpand&&!e.ref.qCanCollapse)return null;const l=!o.active||a||!s,u=yG({cell:e,styleService:r,isCellSelected:n}),c=a?.4:1,d=e.ref.qCanExpand?LW:MW;let p;p=e.ref.qCanExpand?t?s.expandLeft:s.expandTop:t?s.collapseLeft:s.collapseTop;const f=eV({isLeftColumn:t,layoutService:i,representation:e.representation});return fo.jsx(d,{opacity:c,color:u,"data-prevent-selection":!l||void 0,"data-testid":e.ref.qCanExpand?"expand-icon":"collapse-icon",height:13,style:{flexShrink:0,cursor:l?"default":"pointer",position:"sticky",top:0,...EG(e,r),...f&&{alignSelf:fG(e)}},onClick:l?void 0:CG({cell:e,expandOrCollapse:p})})},DG=e=>{switch(e){case"fitHeight":case"fill":case"alwaysFit":return"100%";case"originalSize":return"fit-content";default:return"auto"}},RG=(e,t,n)=>{if("alwaysFit"===e&&t&&!n)return"fit-content";switch(e){case"fitHeight":return"auto";case"originalSize":return"fit-content";case"alwaysFit":return n?"unset":"100%";default:return"100%"}},PG=(e,t)=>{if("alwaysFit"===e)switch(t?.vertical){case"flex-start":return"center top";case"flex-end":return"center bottom";default:return"center center"}},MG=({representation:e,canExpandOrCollapse:t,leafCount:n,isLeftColumn:r,styleService:i,layoutService:o,isMeasureCell:a})=>{const{isIndentModeEnabled:s}=o,l=eV({isLeftColumn:r,layoutService:o,representation:e}),u=t?21:0,c=e.imageBox?.width??24;let d=`calc(100% - ${u}px)`,p=i.headerCellHeight;r&&l&&(d=c),(a||r)&&(p=i.contentCellHeight);let f=p;switch(r&&void 0!==n&&!s&&(f=p*Math.max(n,1)),e.imageSize){case"originalSize":return{maxWidth:d,maxHeight:f,...l?{width:d}:{}};case"fitWidth":return{width:d,maxHeight:f};case"fitHeight":return{height:f,maxWidth:d,...l?{width:d}:{}};case"fill":return{height:f,width:d};default:return{width:d,height:p}}},LG=e=>{if("alwaysFit"===e)return"contain"},AG=({suffix:e,delimeter:t})=>` ${e?t:""} ${e}`.trim(),kG=({imageSize:e,resolvedImagePosition:t,isImagesInIndentModeEnabled:n,isMeasureCell:r})=>({width:RG(e,n,r),height:DG(e),objectFit:LG(e),objectPosition:PG(e,t),...n&&"alwaysFit"===e?{"max-width":"100%"}:{}}),OG=({representation:e,textStyle:t,isMeasureCell:n})=>{const{imageRef:r,onLoad:i}=(()=>{const{downloadService:e}=I$(),t=l(null),{promise:n,resolve:r}=v(()=>Mz(),[]);return d(()=>(e.isDownloadedAsPDForImage&&(e.waitForPromise(n),t.current?.complete&&r()),()=>{r()}),[t,e,n,r]),{onLoad:f(()=>{r()},[r]),imageRef:t}})(),{layoutService:{isIndentModeEnabled:o}}=I$(),{url:a,text:s,imageSize:u,resolvedImagePosition:c}=e,{overflow:p,...h}=t;return fo.jsx("img",{src:a,alt:s,style:{...kG({imageSize:u,resolvedImagePosition:c,isImagesInIndentModeEnabled:o,isMeasureCell:n}),...h},onLoad:i,ref:r})},qG=({representation:e,textStyle:t,canExpandOrCollapse:n,leafCount:r,isLeftColumn:i=!1,imageContainerHorizontalAlignment:o,isMeasureCell:a})=>{const{styleService:s,layoutService:l}=I$(),{resolvedImagePosition:u}=e;return fo.jsx("div",{"data-key":"image-container--image",style:{display:"flex",flexDirection:"column",justifyContent:u?.vertical,alignItems:o,overflow:"hidden",boxSizing:"border-box",border:"4px solid transparent",...MG({representation:e,canExpandOrCollapse:n,leafCount:r,styleService:s,layoutService:l,isLeftColumn:i,isMeasureCell:a})},children:fo.jsx(OG,{representation:e,textStyle:t,isMeasureCell:!0})})},TG=(e,t,n)=>{if(e?.auto)return t;switch(e?.align){case"center":return"center";case"left":return"rtl"===n?"flex-end":"flex-start";case"right":return"rtl"===n?"flex-start":"flex-end";default:return t}},NG=(e,t)=>{let{textAlign:n}=t.getDimensionInfo(e.dimensionInfoIndex)??{};return e.isPseudoDimension&&void 0!==e.visibleMeasureInfoIndex&&({labelTextAlign:n}=t.visibleMeasureInfo.at(e.visibleMeasureInfoIndex)??{}),n?.auto||void 0===n?"left":n.align},jG={display:"flex",flexDirection:"row",alignItems:"center"},_G={alignItems:"center",display:"flex",flexDirection:"row",backgroundClip:"padding-box"},FG=(e,t,n,r)=>t?{..._G,...e.nullValues}:n?{...jG,color:e.totalValues.color,background:r??e.totalValues.background}:{...jG,color:e.measureValues.color,background:r??e.measureValues.background},zG=(e,t,n,r,i)=>{const{fontFamily:o,fontSize:a}=e.measureValues,s={...mz,...!n&&gz(e.grid.lineClamp),...t&&{color:t},fontFamily:o,fontSize:a};if(i){const{fontWeight:t,fontStyle:n,textDecoration:r}=e.nullValues;return{...s,fontWeight:t,fontStyle:n,textDecoration:r}}if(r){const{fontWeight:t,fontStyle:n,textDecoration:r}=e.totalValues;return{...s,fontWeight:t,fontStyle:n,textDecoration:r}}const{fontWeight:l,fontStyle:u,textDecoration:c}=e.measureValues;return{...s,fontWeight:void 0===l?sz:l,fontStyle:u,textDecoration:c}},WG=({cell:e,representation:t,color:n,isTotalValueCell:r,cellHorizontalAlignment:i})=>{const{layoutService:o,styleService:a}=I$(),{isIndentModeEnabled:s}=o,l=e.isNull?o.getNullValueText():t.text,u=t.type===AF.Image,c=t.type===AF.Indicator,d=MB(LB(l)),p=zG(a,n,d,r,e.isNull);if(!s&&u&&!e.isNull||s&&u&&!e.isNull)return fo.jsx(qG,{isMeasureCell:!0,textStyle:p,representation:t,imageContainerHorizontalAlignment:i});const f=LB(e.isNull?t.text:e.ref.qNum);return c&&MB(f)?fo.jsx(rG,{representation:t,cellValue:f,textStyle:p}):fo.jsx("span",{style:{padding:4,direction:d?"ltr":void 0,...p},children:l})},$G=(e,t)=>e?.[t]?.visibleMeasureInfoIndex??0,HG="flex-start",VG=(e,t)=>e.isNull?HG:t.type===AF.Image&&"fill"!==t.imageSize?t.resolvedImagePosition?.vertical:HG,BG=({columnIndex:e,rowIndex:t,style:n,data:r})=>{const{env:i}=w$(),{pageInfo:o,direction:a}=b$(),{styleService:s,layoutService:l}=I$(),{attrExprInfoIndexes:u,gridSectionsData:{measureData:c,leftDimensionData:d,topDimensionData:p},visibleDimensionsInfo:{visibleLeftDimensionInfo:h,visibleTopDimensionInfo:m}}=YH(),g=(()=>{const{layoutService:{isIndentModeEnabled:e}}=I$(),{gridSectionsData:{leftDimensionData:t,topDimensionData:n},visibleDimensionsInfo:{visibleLeftDimensionInfo:r,visibleTopDimensionInfo:i}}=YH(),o=r.length,a=i.length;return f((r,i)=>!(!n.grid.at(a-1)?.[r]?.isTotal&&!t.grid.at(e?0:o-1)?.[i]?.isTotal),[n,t,o,a,e])})(),v=(()=>{const{gridSectionsData:{topDimensionData:e},visibleDimensionsInfo:{visibleTopDimensionInfo:t}}=YH(),n=t.length;return f(t=>{const r=e.grid.at(n-1)?.[t];return IB(r,e.totalDividerIndex)},[e,n])})(),y=(()=>{const{layoutService:{isIndentModeEnabled:e}}=I$(),{gridSectionsData:{leftDimensionData:t},visibleDimensionsInfo:{visibleLeftDimensionInfo:n}}=YH(),r=n.length;return f(n=>{const i=e?0:r-1,o=t.grid.at(i)?.[n];return IB(o,t.totalDividerIndex,e)},[t,e,r])})(),{showLastBorder:b}=r,x=p.grid.at(m.length-1),S=d.grid.at(h.length-1),{background:w}=s.measureValues,C=c[t]?.[e],E=t===o.rowsOnCurrentPage-1,I=e===l.size.x-1;if(!C)return fo.jsx(DB,{style:{...n,background:w},isLastRow:E,isLastColumn:I,showLastBorder:b,index:t,isLeftColumn:!1,showTotalCellDivider:!1});const D=l.hasPseudoDimOnLeft?$G(S,t):$G(x,e),R=l.visibleMeasureInfo[D],P=DH({cell:C.ref,representationProperties:R.representation,attrExprInfoIndex:u.measures[D],env:i,direction:a,conditionalColoring:R.conditionalColoring,enabledFeatures:{[AF.Image]:!0,[AF.Indicator]:!0}}),M=!C.isNull&&g(e,t),L=C.isNull?l.getNullValueText():P.text,A=!C.isNull||!Number.isNaN(+L),k=RH(u.measures[D],C.ref),O=((e,t,n,r,i)=>{const{textAlign:o}=t,a=r?"flex-end":"center";return e.isNull||n.type!==AF.Image?TG(o,a,i):n.resolvedImagePosition?.horizontal??"center"})(C,R,P,A,a),q={...FG(s,C.isNull,M,k.background),...yz(E,I,s.grid.border,a,b),...xz({bottomDivider:y(t),rightDivider:v(e),borderColor:s.grid.divider}),...hz,padding:"0px 4px",display:"flex",justifyContent:O};return fo.jsx("div",{className:DT,title:L,style:{...q,...n},"data-testid":"measure-value","data-row-index":t,"data-col-index":e,children:fo.jsx(RB,{width:PB(P),verticalAlign:VG(C,P),children:fo.jsx(WG,{cell:C,representation:P,isTotalValueCell:M,color:k.color,cellHorizontalAlignment:O})})})};var GG=n.memo(BG,cB);const UG=(e,t)=>t.list[e]?.id??e.toString(),YG=({columnIndex:e,rowIndex:t,data:n})=>n.grid[t]?.[e]?.id??`${t}-${e}`,KG=e=>({...fz,overflow:"hidden",boxSizing:"content-box",borderWidth:"rtl"===e?"1px 1px 0px 0px":"1px 0px 0px 1px"}),XG=({dataGridRef:e,height:t,rowHightCallback:n,width:r,showLastBorder:i,getRightGridColumnWidth:o,verticalScrollDirection:a,horizontalScrollDirection:s})=>{const{pageInfo:l,direction:u}=b$(),{layoutService:c,styleService:{grid:{divider:d},contentCellHeight:p}}=I$(),{dataModel:h,gridSectionsData:{measureData:m}}=YH(),v={...KG(u),borderColor:d,willChange:"auto",userSelect:"none",WebkitUserSelect:"none"},y=(({verticalScrollDirection:e,horizontalScrollDirection:t})=>{const{pageInfo:n}=b$(),{downloadService:r,viewService:i,layoutService:o}=I$(),{dataModel:a,gridSectionsData:{leftDimensionData:s,topDimensionData:l,measureData:u}}=YH(),c=s.columnCount,d=l.rowCount;return f(async({overscanColumnStartIndex:s,overscanColumnStopIndex:l,overscanRowStartIndex:p,overscanRowStopIndex:f})=>{i.gridColumnStartIndex=s,i.gridRowStartIndex=p,i.gridWidth=l-s+1,i.gridHeight=f-p+1;const h=i.gridWidth+c+(t.current===WF.None?0:dB),m=i.gridHeight+d+(e.current===WF.None?0:dB);let g=CB;m*h>1500&&(g=EB),g(a,o,u,n,i,e,t,r)},[i,o,a,u,e,t,n,c,d,r])})({verticalScrollDirection:a,horizontalScrollDirection:s});return Gz(()=>{e.current&&e.current.resetAfterColumnIndex(0,!1)},[e,h,m]),g(()=>{e.current&&e.current.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!0})},[r,t,e,p,u]),0===c.size.x?null:fo.jsx(ZV,{"data-section-id":"DATA_GRID",ref:e,style:v,columnCount:c.size.x,columnWidth:o,height:t,rowCount:l.rowsOnCurrentPage,rowHeight:n,width:r,itemData:{showLastBorder:i,grid:m},onItemsRendered:y,estimatedRowHeight:n(),estimatedColumnWidth:o(),itemKey:YG,direction:u,children:GG})};var JG=b(XG);const ZG=x((e,t)=>fo.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:[fo.jsx("path",{d:"M13 7H8zV4.982C13 2.23 10.761 0 8 0S3 2.23 3 4.982V7h.75H3h1.5V5.332C4.5 3.216 5.549 1.5 8 1.5s3.5 1.716 3.5 3.832V7h.75H3a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1H3z"}),fo.jsx("use",{fillRule:"evenodd"})]})),QG=e=>{const[t,n]=Nw(xV);return Gz(()=>{n(!1)},e),{isAdjustingWidth:t,setIsAdjustingWidth:n}},eU=()=>{const[e,t]=m(!1),{dataModel:n}=YH(),{interactions:r}=w$(),{isAdjustingWidth:i,setIsAdjustingWidth:o}=QG([n]);return{open:e,setOpen:t,handleOpenMenu:e=>{!r.active||iG(e)||i||t(!0)},isAdjustingWidth:i,setIsAdjustingWidth:o}};function tU(e,t){const n=t.expressionColor?.background??e.dimensionValues.background,r=t.isLeftColumn?e.header.background:n,i=r===cz.Transparent?gN.WHITE:r,o=LN(e.grid.border),a=LN(i);return a.isInvalid()||o.isInvalid()||1===o.a?e.grid.border:function(e,t,n){return LN(e.r+(t.r-e.r)*n,e.g+(t.g-e.g)*n,e.b+(t.b-e.b)*n,e.a+(t.a-e.a)*n)}(a,o,o.a).getRGB()}const nU=({cellInfo:e,columnWidth:t,isLastColumn:n,overrideLeftGridWidth:r,setIsAdjustingWidth:i,shouldApplyIndentModeColumnWidth:o,tableWidth:a})=>{const{direction:s}=b$(),{interactions:l,translator:u}=w$(),{isActive:c}=cG(),{dataModel:d}=YH(),{styleService:p}=I$(),[,f]=m({});if(!(e.canBeResized&&!!l.active&&!c))return null;const h=tU(p,e);return fo.jsx(Zz,{isPivot:!0,columnWidth:t,isLastColumn:n,keyValue:`adjuster-${e.dimensionInfoIndex}`,hoverColor:h,updateWidthCallback:t=>{f({}),r&&void 0!==e.colIdx&&r(t,e.colIdx)},confirmWidthCallback:t=>{o?d.applyIndentModeColumnWidth({...t,pixels:Math.min((a??0)*ZH,t.pixels??0)}):d.applyColumnWidth(t,e)},setIsAdjustingWidth:i,isLeftColumn:e.isLeftColumn,accessibilityRelatedArgs:{translator:u,columnLabel:e.label??""},direction:s})},rU=Sl(sc,{shouldForwardProp:e=>!["interactions","hoverBackground","background","shouldShowMenuIcon","isDimension"].includes(e)})(({interactions:e,background:t,hoverBackground:n,shouldShowMenuIcon:r,isDimension:i})=>({pointerEvents:i?"all":"none",position:"relative",display:"grid",gridTemplateColumns:r?"1fr 12px":"1fr",gap:8,alignItems:"center",cursor:e.active?"pointer":"default",background:t,"&&:hover":{background:e.active&&i?n:t}})),iU=Sl("div",{shouldForwardProp:e=>!["direction"].includes(e)})(({direction:e})=>({position:"absolute",left:"rtl"!==e?0:void 0,bottom:0})),oU=Sl("div",{shouldForwardProp:e=>"justifyContent"!==e})(({justifyContent:e})=>({...pz,justifyContent:e??pz.justifyContent,flexDirection:"row",overflow:"hidden",position:"relative",gap:8})),aU=Sl("div")(()=>({...pz})),sU=Sl("div",{shouldForwardProp:e=>!["fontSize","fontFamily","fontWeight","fontStyle","textDecoration","justifyContent"].includes(e)})(({fontSize:e,fontFamily:t,fontWeight:n,fontStyle:r,textDecoration:i,justifyContent:o})=>({display:"flex",justifyContent:o,alignSelf:"center",flexGrow:1,maxWidth:"100%",fontWeight:n,fontSize:e,fontFamily:t,fontStyle:r,textDecoration:i})),lU=Sl(wp)(({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}})),uU=Sl(Rp,{shouldForwardProp:e=>!["isActive"].includes(e)})(({theme:e,isActive:t})=>({width:220,maxHeight:32,borderRadius:e.spacing(.5),margin:e.spacing(.25,.5),padding:e.spacing(1,1.5),display:"flex",justifyContent:"space-between",position:"relative",overflow:"hidden ",boxSizing:"border-box",background:t?"rgba(0, 0, 0, 0.05)":"transparent","&:hover":{".indent-mode-dropdown-more":{opacity:1}}})),cU=Sl("span")({textOverflow:"ellipsis",overflow:"hidden"}),dU=Sl("div",{shouldForwardProp:e=>"visible"!==e})(({visible:e})=>({opacity:e?1:0,width:XH,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"})),pU=Sl("span",{shouldForwardProp:e=>!["padding","alignSelf"].includes(e)})(({padding:e,alignSelf:t})=>({padding:e,alignSelf:t,position:"sticky",top:0}));let fU=function(e){return e.Expand="Expand",e.Collapse="Collapse",e}({});const hU=(e,t)=>({qExcludeList:t===fU.Expand,qPos:{qDimName:e,qElemNo:[]}}),mU=`${P$}/qExpansionState`,gU=({model:e,qExpansionState:t,qEffectiveDimensionName:n,action:r})=>async()=>{const i=(({qEffectiveDimensionName:e,oldExpansionState:t,action:n})=>{const r=t?.findIndex(t=>t.qPos?.qDimName===e);return{expansionData:hU(e,n),index:r}})({qEffectiveDimensionName:n,oldExpansionState:t,action:r});await(async({model:e,newExpansionState:t,errorMsg:n})=>{const{index:r,expansionData:i}=t;try{let t,n=mU,o="Add";void 0===r?t=JSON.stringify([i]):-1===r?(n=`${mU}/-`,t=JSON.stringify(i)):(n=`${mU}/${r}`,o="Replace",t=JSON.stringify(i)),await e.applyPatches([{qPath:n,qOp:o,qValue:t}],!0)}catch(e){console.error(n,e)}})({model:e,newExpansionState:i,errorMsg:`Failed to ${r} dimension`})},vU=({model:e,effectivePropertiesService:t,cell:n})=>{if(void 0===n.qEffectiveDimensionName)return;const r={model:e,qExpansionState:t.qExpansionState,qEffectiveDimensionName:n.qEffectiveDimensionName};return{expandCallback:gU({...r,action:fU.Expand}),collapseCallback:gU({...r,action:fU.Collapse}),alwaysFullyExpanded:t.qAlwaysFullyExpanded}},yU={[_W.Sorting]:!0,[_W.Selections]:!0,[_W.Searching]:!0},bU=({cell:e,style:t,isFirstColumn:n,isLastColumn:r,isLastRow:i,changeSortOrder:o,iconsVisibilityStatus:a,columnWidth:s,overrideLeftGridWidth:u,shouldApplyIndentModeColumnWidth:c,tableWidth:d})=>{const p=l(null),{styleService:f,layoutService:h,effectivePropertiesService:m}=I$(),{app:g,interactions:v,embed:y,translator:b,model:x,env:S}=w$(),{fontSize:w,fontFamily:C,fontStyle:E,fontWeight:I,textDecoration:D,color:R,background:P,hoverBackground:M,activeBackground:L}=f.header,A=l(null),{shouldShowLockIcon:k,shouldShowMenuIcon:O}=a,{open:q,setOpen:T,handleOpenMenu:N,setIsAdjustingWidth:j}=eU(),{direction:_}=b$(),F={sortFromMenu:async(t,n)=>{t.stopPropagation(),await o(e,n)}},z={embed:y,listboxRef:p,sortCriteria:h.searchSortFromDimension&&e.isDim?m.getSortCriteriaForDimension(e.dimensionInfoIndex):void 0},W={app:g,qStateName:h.layout.qStateName},{labelTextAlign:$}=h.getDimensionInfo(e.dimensionInfoIndex)??{},H=TG($,"flex-start",_);return fo.jsxs(rU,{className:DT,title:e.label,interactions:v,background:q?L:P,hoverBackground:M,shouldShowMenuIcon:O,isDimension:e.isDim,style:{...t,...hz,...bz(e,i,n,r,f.grid.border,_),color:R},"data-testid":"title-cell",onClick:N,children:[fo.jsxs(oU,{children:[k?fo.jsx(aU,{children:fo.jsx(ZG,{height:12})}):null,fo.jsx(sU,{fontFamily:C,fontSize:w,fontStyle:E,fontWeight:I,textDecoration:D,justifyContent:H,children:fo.jsx("span",{style:S.flags.isEnabled("VNA-135-WRAP_HEADER_TEXT")?{...mz,...gz(f.grid.columnLineClamp)}:mz,children:e.label})})]}),e.isDim?fo.jsxs(fo.Fragment,{children:[fo.jsx(WW,{headerData:e,translator:b,anchorRef:A,open:q,setOpen:T,interactions:v,menuAvailabilityFlags:yU,sortRelatedArgs:F,searchRelatedArgs:z,selectionRelatedArgs:W,expandOrCollapseArgs:vU({model:x,effectivePropertiesService:m,cell:e}),shouldShowMenuIcon:O,model:x&&"setActiveField"in x?x:void 0,direction:_,isAccessibleHeader:!0}),fo.jsx(iU,{ref:p,direction:_}),fo.jsx(iU,{ref:A,direction:_})]}):null,fo.jsx(nU,{cellInfo:{...e,isLeftColumn:!0},columnWidth:s,isLastColumn:r,overrideLeftGridWidth:u,setIsAdjustingWidth:j,shouldApplyIndentModeColumnWidth:c,tableWidth:d})]})},xU=({rowSpan:e,columnSpan:t})=>{const{styleService:n}=I$(),{direction:r}=b$();return e>0&&t>0?fo.jsx("div",{style:{...fz,gridRowStart:1,gridRowEnd:`span ${e}`,gridColumnStart:1,gridColumnEnd:`span ${t}`,borderWidth:"rtl"===r?"0px 0px 0px 1px":"0px 1px 0px 0px",borderColor:n.grid.border,background:n.grid.background},"data-testid":"empty-header-cell"}):null},SU=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"m8 9 4.5-4.5L14 6l-4.5 4.5L8 12 2 6l1.5-1.5z"})})),wU=x((e,t)=>fo.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:[fo.jsx("path",{d:"m8 7-4.5 4.5L2 10l6-6 6 6-1.5 1.5z"}),fo.jsx("use",{fillRule:"evenodd"})]})),CU=({tableWidth:e,leftGridWidth:t,overrideLeftGridWidth:n})=>{const{direction:r}=b$(),{styleService:i}=I$(),{interactions:o,translator:a}=w$(),{isActive:s}=cG(),{dataModel:l}=YH(),{setIsAdjustingWidth:u}=QG([l]);if(!(!!o.active&&!s))return null;const c=tU(i,{isLeftColumn:!0});return fo.jsx(Zz,{isPivot:!0,isLastColumn:!0,isLeftColumn:!0,keyValue:"adjuster-indent-row",hoverColor:c,columnWidth:t,updateWidthCallback:t=>{n(Math.min(t,e*ZH))},confirmWidthCallback:r=>{if(r.type===LT.FitToContent)return void l.applyIndentModeColumnWidth({type:LT.Auto});const i=Math.min(r.pixels??t,e*ZH);n(i),l.applyIndentModeColumnWidth({type:LT.Pixels,pixels:i})},setIsAdjustingWidth:u,accessibilityRelatedArgs:{translator:a,columnLabel:a.get("SNPivotTable.IndentMode.Rows")},direction:r})},EU=x((e,t)=>fo.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:fo.jsx("path",{d:"M3 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0m6 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0m5 1a1 1 0 1 0 0-2 1 1 0 0 0 0 2"})})),IU=({cell:e,changeSortOrder:t})=>{const n=l(null),r=l(null),{app:i,interactions:o,embed:a,translator:s,model:u}=w$(),{layoutService:c,effectivePropertiesService:d}=I$(),{open:p,setOpen:f,handleOpenMenu:h}=eU();return fo.jsxs(uU,{onClick:h,isActive:p,children:[fo.jsx(cU,{children:e.label}),fo.jsxs(dU,{className:"indent-mode-dropdown-more",visible:p,children:[fo.jsx(EU,{}),e.isDim?fo.jsxs(fo.Fragment,{children:[fo.jsx(WW,{headerData:e,translator:s,anchorRef:n,open:p,setOpen:f,interactions:o,menuAvailabilityFlags:yU,sortRelatedArgs:{sortFromMenu:async(n,r)=>{n.stopPropagation(),await t(e,r)}},searchRelatedArgs:{embed:a,listboxRef:r},selectionRelatedArgs:{app:i,qStateName:c.layout.qStateName},expandOrCollapseArgs:vU({model:u,effectivePropertiesService:d,cell:e}),shouldShowMenuIcon:!1,model:u&&"setActiveField"in u?u:void 0}),fo.jsx(iU,{ref:r}),fo.jsx(iU,{ref:n})]}):null]})]})},DU=({idx:e,menu:t,menuItems:n,isOnlyOneRow:r})=>{const i=n.at(-1)?.id===L$,o=e+1<n.length&&n[e+1]?.id===L$;return!(r&&i&&o)&&(t?.id!==L$&&e<n.length-1)},RU=({menuItems:e,changeSortOrder:t,overrideLeftGridWidth:n,leftGridWidth:r,tableWidth:i})=>{const{styleService:o}=I$(),{interactions:a,translator:s}=w$(),{dataModel:u,gridSectionsData:{headersData:c}}=YH(),[d,p]=m(!1),f=l(null),{headerCellHeight:h}=o,{color:g,background:v,hoverBackground:y,activeBackground:b,fontFamily:x,fontSize:S,fontStyle:w,fontWeight:C,textDecoration:E}=o.header,{isAdjustingWidth:I}=QG([u]),D=e=>{e.stopPropagation()},R={height:h,gridColumn:`1 / span ${c.size.x}`,gridRow:c.size.y,zIndex:c.size.x-0};return fo.jsxs(rU,{isDimension:!0,background:d?b:v,interactions:a,hoverBackground:y,style:{...R,...hz,color:g},onClick:e=>{!a.active||iG(e)||I||p(!d)},"data-testid":"indentModeHeaderCellWrapper",children:[fo.jsxs(oU,{justifyContent:"flex-start",children:[fo.jsx(sU,{fontFamily:x,fontSize:S,fontStyle:w,fontWeight:C,textDecoration:E,justifyContent:"flex-start",children:fo.jsx("span",{style:mz,children:s.get("SNPivotTable.IndentMode.Rows")})}),d?fo.jsx(wU,{}):fo.jsx(SU,{}),fo.jsx(iU,{ref:f})]}),fo.jsx(lU,{open:d,anchorEl:f.current,disableEnforceFocus:!0,children:e.map((n,r)=>[n&&n.id!==L$&&fo.jsx("li",{role:"presentation",onClick:D,onKeyDown:D,children:fo.jsx(IU,{cell:n,changeSortOrder:t})}),DU({idx:r,menu:n,menuItems:e,isOnlyOneRow:1===c.size.y})&&fo.jsx(rW,{"data-testid":"group-divider",variant:"middle"})])}),fo.jsx(CU,{tableWidth:i,leftGridWidth:r,overrideLeftGridWidth:n})]})},PU=({layoutService:e,headersData:t,topRowIndex:n})=>e.isIndentModeEnabled&&t.size.x>1&&n+1===t.size.y,MU={display:"grid",width:"fit-content"},LU=({tableWidth:e,leftGridWidth:t,columnWidths:n,rowHight:r,changeSortOrder:i,getHeaderCellsIconsVisibilityStatus:o,height:a,overrideLeftGridWidth:s})=>{const{layoutService:l}=I$(),{gridSectionsData:{headersData:u}}=YH();return fo.jsxs("div",{"data-testid":"HEADER_GRID",style:{...MU,gridTemplateColumns:n.map(e=>`${e}px`).join(" "),gridTemplateRows:u.data.map(()=>`${r}px`).join(" "),height:a},children:[u.size.y>1&&fo.jsx(xU,{columnSpan:u.size.x-1,rowSpan:u.size.y-1}),u.data.map((a,c)=>{let d=[];if(PU({layoutService:l,headersData:u,topRowIndex:c})){const n=a.at(0);return Array.isArray(n)&&d.push(fo.jsx(RU,{menuItems:n,changeSortOrder:i,overrideLeftGridWidth:s,leftGridWidth:t,tableWidth:e},n.at(0)?.id)),d}return d=a.reduce((t,a,d)=>{if(a&&!Array.isArray(a)){const p=o(d,a.isLocked,a.label),f=l.isIndentModeEnabled&&1===u.size.x;t.push(fo.jsx(bU,{style:{width:n[d],height:r,gridColumn:l.isIndentModeEnabled&&u.size.x>1?2:d+1,gridRow:c+1,zIndex:u.size.x-d},isLastRow:c===u.size.y-1,isFirstColumn:0===d,isLastColumn:d===u.size.x-1,changeSortOrder:i,cell:a,iconsVisibilityStatus:p,columnWidth:n[d],overrideLeftGridWidth:s,shouldApplyIndentModeColumnWidth:f,tableWidth:e},a.id))}return t},[]),d})]})};var AU=b(LU);const kU=(e,t,n,r)=>{const{layoutService:i}=I$();g(()=>{e.current?.forEach(e=>e?.resetAfterIndex(0,!0))},[e,t,n,r,i])},OU=(e,t)=>{Gz(()=>{e.current?.forEach(e=>e?.resetAfterIndex(0,!1))},[e,t])},qU=(e,t)=>{const{isLast:n,list:r,listValues:i}=t;return n?r[e]:i[e]},TU=(e,t,n,r,i)=>{if(i)return;const o=e.representation,a=eV({isLeftColumn:n,layoutService:t,representation:o}),s=n?"flex-start":"center",l=e.representation.resolvedImagePosition?.horizontal;if(e.representation.type===AF.Image)return a&&l&&"center"!==l&&"rtl"===r?tG(l):l??s;if(e.isPseudoDimension&&void 0!==e.visibleMeasureInfoIndex){const{labelTextAlign:n}=t.visibleMeasureInfo[e.visibleMeasureInfoIndex]??{};return TG(n,s,r)}const{textAlign:u}=t.getDimensionInfo(e.dimensionInfoIndex)??{};return TG(u,s,r)},NU=()=>{},jU=({children:e,reactWindowStyle:t,cell:n,data:r,showTotalCellDivider:i,isLastRow:o,isLastColumn:a,isLeftColumn:s,isCellSelected:l,isAdjustingWidth:u,index:c})=>{const{styleService:d,layoutService:p}=I$(),{interactions:f}=w$(),{direction:h}=b$(),{isLocked:m,createMouseDownHandler:g,createMouseOverHandler:v,createPointerUpHandler:y}=cG(),{showLastBorder:b}=r,x=m(n)||n.isLockedByDimension,S=!(x||!f.active||!f.select||n.isEmpty||n.isNull||n.isPseudoDimension||n.isTotal||u),w=S?g(c,e=>qU(e,r)):void 0,C=S?v(c):void 0,E=S?y(c,e=>qU(e,r)):void 0,I=eV({isLeftColumn:s,layoutService:p,representation:n.representation});return fo.jsx("div",{className:DT,title:f.passive?n.representation.text:void 0,style:{...t,...yz(o,a,d.grid.border,h,b),...xz({bottomDivider:i&&s,rightDivider:i&&!s,borderColor:d.grid.divider}),...hz,padding:"rtl"===h?"0px 0px 0px 4px":"0px 4px",cursor:wG(S),background:vG({styleService:d,isCellSelected:l,cell:n,isCellLocked:x}),zIndex:s?void 0:p.size.x-n.x,justifyContent:TU(n,p,s,h,I),display:"flex",...p.isIndentModeEnabled&&s&&{["rtl"===h?"paddingRight":"paddingLeft"]:Math.max(4,24*(n.indentLevel??0))},textAlign:NG(n,p)},"aria-hidden":"true",onMouseDown:w,onMouseOver:C,onPointerUp:E,onKeyUp:NU,role:"button",tabIndex:-1,"data-testid":"dimension-cell","data-x":n.x,"data-page-x":n.pageX,"data-y":n.y,"data-page-y":n.pageY,"data-cell-type":n.ref.qType,"data-dimension-info-index":n.dimensionInfoIndex,children:e})},_U=e=>{e.stopPropagation()},FU=({href:e,text:t,interactions:n,color:r})=>({href:e,title:t,rel:"noreferrer",target:"_blank",underline:"hover",onClick:_U,color:gN.LINK,style:{pointerEvents:n.active?"auto":"none",color:r??void 0,opacity:n.active&&n.passive||r?void 0:.4}}),zU=({href:e,text:t,interactions:n,color:r})=>fo.jsx(Rd,{...FU({href:e,text:t,interactions:n,color:r}),children:t}),WU=Y();WU.use(U),WU.renderer.prio(["canvas"]);const $U=(e,t)=>e&&"center"!==e&&"rtl"===t?tG(e):e,HU=({cell:e,representation:t,textStyle:n,imageContainerHorizontalAlignment:r})=>{const{imageBox:i}=t,{styleService:{grid:{lineClamp:o}}}=I$(),{direction:a}=b$();return fo.jsxs("div",{style:{display:"grid",gridTemplateColumns:`${i?.width??24}px 1fr`,maxHeight:"fit-content",alignItems:"center",justifyContent:"flex-start",boxSizing:"border-box"},children:[fo.jsx("div",{"data-key":"image-container--partial-image",style:{display:"flex",flexDirection:"column",justifyContent:fG(e),alignItems:$U(r,a),overflow:"hidden",boxSizing:"border-box",border:"4px solid transparent",width:i?.width??24,height:"100%"},children:fo.jsx(OG,{representation:t,textStyle:n})}),fo.jsx(pU,{padding:4/(o<=2?2:1),alignSelf:fG(e,!0),children:!!t.labelStructure&&AG(t.labelStructure)})]})},VU=({suffix:e,delimeter:t})=>` ${e?t:""} ${e}`,BU=({href:e,text:t,labelStructure:n,interactions:r,color:i})=>fo.jsxs("span",{children:[fo.jsx(Rd,{...FU({href:e,text:t,interactions:r,color:i}),children:n?.maskedValue?n.maskedValue:n?.originalValue}),!!n&&VU(n)]}),GU=({children:e,textStyle:t,shouldEnableStickyText:n})=>fo.jsx("span",{style:{...t,border:"4px solid transparent",boxSizing:"border-box",...n&&{alignSelf:"flex-start",position:"sticky",top:0}},children:e}),UU=({isLeftColumn:e,styleService:t,cell:n,isIndentModeEnabled:r})=>e?r?t.grid.lineClamp:Math.max(t.grid.lineClamp,n.leafCount*t.grid.lineClamp):t.grid.columnLineClamp,YU=({cell:e,isCellSelected:t,isLeftColumn:n})=>{const{direction:r}=b$(),{isActive:i}=cG(),{layoutService:o,styleService:a}=I$(),{interactions:s}=w$(),l=n&&o.isIndentModeEnabled;let u=n&&!e.isNull?(e=>{const{representation:{text:t,labelStructure:n}}=e;if(!n||!n.originalValue)return t;const{originalValue:r,maskedValue:i,suffix:o,delimeter:a}=n;return`${0!==i.length?i:r} ${o?a:""} ${o}`.trim()})(e):e.representation.text;if(e.isEmpty)return null;const c=(({cell:e,styleService:t,isCellSelected:n,isLeftColumn:r,isIndentModeEnabled:i})=>({...mz,...gz(UU({cell:e,isLeftColumn:r,styleService:t,isIndentModeEnabled:i})),color:yG({cell:e,styleService:t,isCellSelected:n}),fontWeight:bG({cell:e,styleService:t}),fontStyle:xG({cell:e,styleService:t}),textDecoration:SG({cell:e,styleService:t}),fontFamily:t.dimensionValues.fontFamily,fontSize:t.dimensionValues.fontSize}))({cell:e,styleService:a,isCellSelected:t,isLeftColumn:n,isIndentModeEnabled:o.isIndentModeEnabled});if(e.representation.type===AF.Image&&!e.isTotal&&!e.isNull){const{labelStructure:t}=e.representation,i=n&&t&&t.suffix?HU:qG;return fo.jsx(i,{cell:e,representation:e.representation,leafCount:e.leafCount,textStyle:c,isLeftColumn:n,canExpandOrCollapse:e.ref.qCanCollapse||e.ref.qCanExpand,imageContainerHorizontalAlignment:TU(e,o,n,r)})}if(e.representation.type===AF.Link&&!i&&!e.isTotal){const t=n&&e.representation.labelStructure?BU:zU;u=fo.jsx(t,{text:e.representation.text,labelStructure:e.representation.labelStructure,href:e.representation.url,interactions:s,color:e.expressionColor.color})}return fo.jsx(GU,{shouldEnableStickyText:l,textStyle:{...c,...e.representation.type===AF.Image&&e.isNull?{alignSelf:fG(e)}:{}},children:u})},KU=({index:e,style:t,data:n})=>{const{styleService:r,layoutService:i}=I$(),{isSelected:o}=cG(),{isLeftColumn:a=!1,showLastBorder:s,itemCount:l,isLast:u,totalDividerIndex:c}=n,{isAdjustingWidth:d,setIsAdjustingWidth:p}=QG([n]),f=qU(e,n),h=a?e===l-1:u,m=a?u:e===l-1,g=IB(f,c,i.isIndentModeEnabled);if(void 0===f){const{background:n}=r.dimensionValues;return fo.jsx(DB,{style:{...t,background:n},index:e,isLastRow:h,isLastColumn:m,showLastBorder:s,isLeftColumn:a,showTotalCellDivider:g})}const v=o(f);return fo.jsxs(jU,{reactWindowStyle:t,isLeftColumn:a,isLastRow:h,isLastColumn:m,isCellSelected:v,showTotalCellDivider:g,cell:f,data:n,isAdjustingWidth:d,index:e,children:[fo.jsxs(RB,{verticalAlign:fG(f),width:PB(f.representation),right:f.isLeftColumn?void 0:4,isLeftColumn:a,children:[fo.jsx(IG,{isLeftColumn:a,isCellSelected:v,cell:f}),fo.jsx(YU,{isLeftColumn:a,isCellSelected:v,cell:f})]}),fo.jsx(nU,{cellInfo:{...f,columnWidthLocation:f.isPseudoDimension?_F.Measures:_F.Dimension},columnWidth:t.width,isLastColumn:m,setIsAdjustingWidth:p})]})};var XU=n.memo(KU,cB);const JU=({list:e,listValues:t,isLastRow:n,getRightGridColumnWidth:r})=>i=>{const o=n?e[i]:t.at(i);return o&&0===i&&o.x>0?(o.leafCount+o.x+o.distanceToNextCell)*r():!n&&o?(o.leafCount+o.distanceToNextCell)*r():r(o?.x??i)},ZU=(e,t,n,r)=>{const i=Object.values(e);let o,a=i.length;return r&&(a=n,o=t/a),{itemCount:a,estimatedItemSize:o,listValues:i}},QU=(e,t)=>n=>{e.current&&(e.current[t]=n)},eY={display:"flex",height:"fit-content",borderWidth:"1px 0px 0px 0px",...fz},tY={overflow:"hidden",willChange:"auto",flexShrink:0},nY=({leftGridRef:e,width:t,height:n,columnWidths:r,showLastBorder:i})=>{const{pageInfo:o,direction:a}=b$(),{layoutService:s,styleService:{contentCellHeight:l,grid:{divider:u}}}=I$(),{qSize:c}=s.layout.qHyperCube,{gridSectionsData:{leftDimensionData:d},visibleDimensionsInfo:{visibleLeftDimensionInfo:p}}=YH();OU(e,d),kU(e,t,n,l);const f=o.rowsOnCurrentPage*l,h={...eY,borderColor:u,width:r.reduce((e,t)=>e+t,0)};return fo.jsx("div",{style:h,"data-section-id":"LEFT_GRID",children:d.grid.map((t,u)=>{const h=u===d.columnCount-1,m=A$(p[u]),{itemCount:g,estimatedItemSize:v,listValues:y}=ZU(t,f,o.rowsOnCurrentPage,h),b=s.isIndentModeEnabled?()=>l:((e,t,n,r,i)=>o=>{const a=r?e[o]:t.at(o);if(a&&0===o&&a.pageY>0)return(a.leafCount+a.pageY+a.distanceToNextCell)*n;if(a&&a.leafCount>0){const e=a.y===i-a.leafCount;return(a.leafCount-(e?a.ref.qUp:0)+a.distanceToNextCell)*n}return n})(t,y,l,h,c.qcy);return fo.jsx(aB,{ref:QU(e,u),style:{...tY,flexGrow:h?1:0,direction:a},height:n,width:r[u],itemCount:g,itemSize:b,layout:"vertical",itemData:{list:t,isLeftColumn:!0,isLast:h,itemCount:g,showLastBorder:i,listValues:y,totalDividerIndex:d.totalDividerIndex},itemKey:UG,estimatedItemSize:v,children:XU},m)})})};var rY=b(nY);const iY={overflow:"hidden",willChange:"auto"},oY=e=>({...fz,borderWidth:"rtl"===e?"0px 1px 0px 0px":"0px 0px 0px 1px"}),aY=({topGridRef:e,rowHightCallback:t,width:n,height:r,showLastBorder:i,getRightGridColumnWidth:o})=>{const{direction:a}=b$(),{layoutService:s,styleService:{grid:{divider:l},headerCellHeight:u}}=I$(),{gridSectionsData:{headersData:c,topDimensionData:d}}=YH(),p={...oY(a),borderColor:l,height:r};OU(e,d),kU(e,n,r,u);const f=s.size.x*o();return 0===d.rowCount?fo.jsx("div",{style:{width:n,height:r,...oY(a)}}):fo.jsx("div",{style:p,"data-section-id":"TOP_GRID",children:d.grid.map((r,l)=>{const u=l===d.rowCount-1,{itemCount:p,estimatedItemSize:h,listValues:m}=ZU(r,f,s.size.x,u),g=(({layoutService:e,headersData:t,topRowIndex:n})=>{const r=t.data.at(n);if(void 0===r)return;const i=t.size.x-1,o=PU({layoutService:e,headersData:t,topRowIndex:n})?0:i,a=r.at(o),s=Array.isArray(a)?a.at(i):a;return s?e.getDimensionInfo(s.dimensionInfoIndex):void 0})({layoutService:s,headersData:c,topRowIndex:l}),v=g?A$(g):`empty ${l}`;return fo.jsx(aB,{ref:QU(e,l),style:iY,height:t(),width:n,itemCount:p,itemSize:JU({list:r,listValues:m,isLastRow:u,getRightGridColumnWidth:o}),layout:"horizontal",itemData:{list:r,isLast:u,itemCount:p,showLastBorder:i,listValues:m,totalDividerIndex:d.totalDividerIndex},itemKey:UG,estimatedItemSize:h,direction:a,children:XU},v)})})};var sY=b(aY);const lY=()=>fo.jsx(uY,{}),uY=()=>{const{styleService:{headerCellHeight:e,contentCellHeight:t}}=I$(),n=EV(),r=(()=>{const{model:e}=w$(),t=f(async(t,n)=>{if(!e)throw new Error("No Model provided!");const{qReverseSort:r,dimensionInfoIndex:i,sortDirection:o}=t,a=[];if(n===o)return!1;a.push({qPath:`/qHyperCubeDef/qDimensions/${i}/qDef/qReverseSort`,qOp:"Replace",qValue:(!r).toString()});try{return await e.applyPatches(a,!0),!0}catch(e){return console.error("Error while applying patch: ",e),!1}},[e]);return t})(),{gridSectionsWrapperRefs:{headerGridWrapperRef:i,topGridWrapperRef:o,leftGridWrapperRef:a,dataGridWrapperRef:s},gridRefs:{topGridRef:l,leftGridRef:u,dataGridRef:c},scrollDirectionRefs:{verticalScrollDirection:p,horizontalScrollDirection:h},scrollbarsDimensions:{verticalScrollbarWidth:m,horizontalScrollbarHeight:g,resetHorizontalScrollbarHeight:v}}=CV(),{leftGridWidth:y,leftGridFullWidth:b,leftGridColumnWidths:x,rightGridFullWidth:S,showLastRightBorder:w,getRightGridColumnWidth:C,getHeaderCellsIconsVisibilityStatus:E,overrideLeftGridWidth:I}=function({tableWidth:e,verticalScrollbarWidth:t,resetHorizontalScrollbarHeight:n}){const{layoutService:r,styleService:i}=I$(),{gridSectionsData:{headersData:o}}=YH(),{measureText:a}=$z(i.header,{allowLineBreaks:!1}),s=pV({tableWidth:e}),l=fV({tableWidth:e,verticalScrollbarWidth:t,leftGridWidth:s.leftGridWidth}),u=s.leftGridWidth+l.rightGridFullWidth+1<e,c=f((e,t,n="")=>{let i=e;r.isIndentModeEnabled&&(i=1,1===o.size.x&&(i=0));const l=s.leftGridColumnWidths[i];let u=!1,c=!1,d=a(n)+JH;return t&&d+XH<=l&&(c=!0,d+=XH),d+XH<=l&&(u=!0),{shouldShowMenuIcon:u,shouldShowLockIcon:c}},[s.leftGridColumnWidths,a,r.isIndentModeEnabled,o.size.x]);return d(()=>{const e=s.leftGridWidth===s.leftGridFullWidth,t=l.rightGridWidth===l.rightGridFullWidth;e&&t&&n()},[n,s.leftGridWidth,s.leftGridFullWidth,l.rightGridWidth,l.rightGridFullWidth]),{...s,...l,showLastRightBorder:u,getHeaderCellsIconsVisibilityStatus:c}}({tableWidth:n.width,verticalScrollbarWidth:m,resetHorizontalScrollbarHeight:v}),{gridScaffoldDimensions:D,headerGridDims:R,topGridDims:P,leftGridDims:M,dataGridDims:L,metadata:{everyThingFitsInTableRectHeight:A,scrollbarsVisibilityStatus:k}}=(({cellHeights:{headerCellHeight:e,contentCellHeight:t},horizontalWidths:{leftGridWidth:n,leftGridOriginalWidth:r,rightGridOriginalWidth:i},scrollBarsDimensions:{verticalScrollbarWidth:o,horizontalScrollbarHeight:a}})=>{const s=EV(),{pageInfo:l}=b$(),{gridSectionsData:{headersData:u,topDimensionData:c}}=YH(),d=Math.min(s.height*ZH,Math.max(s.height*ZH-25,s.height-t-a)),p=s.width*ZH,f=l.rowsOnCurrentPage*t,h=Math.max(u.size.y,c.rowCount,1),m=e*h,g=e*h,v=Math.min(p,n),y=s.width-p,b=Math.max(y,s.width-v),x=Math.min(d,m,g),{availableHeight:S,everyThingFitsInTableRectHeight:w,everyThingFitsInTableRectWidth:C}=((e,t,n)=>{const r=t+1+n+o<=s.width,i=e+1+f+a,l=i-s.height<a||i<=s.height;return{availableHeight:l?i:s.height,everyThingFitsInTableRectHeight:l,everyThingFitsInTableRectWidth:r}})(x,v,b),E=S-d,I=Math.max(E,S-x),D=Math.min(I,f),R=Math.min(I,f),P=m+1+f,{visibilityStatus:M,metadata:{hasLeftGridOverflowX:L,hasDataGridOverflowX:A}}=(e=>{const{gridScaffold:{X_AXIS:{leftSectionWidth:t,rightSectionWidth:n},Y_AXIS:{topSectionHeight:r,bottomSectionHeight:i}},gridOriginalWidth:{X_AXIS:{leftSectionFullWidth:o,rightSectionFullWidth:a},Y_AXIS:{topSectionFullHeight:s,bottomSectionFullHeight:l}}}=e,u=s>r,c=o>t,d=a>n,p=l>i;return{visibilityStatus:{topGrid:{overflowX:"hidden",overflowY:u?"scroll":"hidden"},leftGrid:{overflowX:c?"scroll":"hidden",overflowY:"hidden"},dataGrid:{overflowX:d?"scroll":"hidden",overflowY:p?"scroll":"hidden"}},metadata:{hasTopGridOverflowY:u,hasLeftGridOverflowX:c,hasDataGridOverflowX:d,hasDataGridOverflowY:p}}})({gridScaffold:{X_AXIS:{leftSectionWidth:v,rightSectionWidth:b},Y_AXIS:{topSectionHeight:x,bottomSectionHeight:I}},gridOriginalWidth:{X_AXIS:{leftSectionFullWidth:r,rightSectionFullWidth:i},Y_AXIS:{topSectionFullHeight:g,bottomSectionFullHeight:P-g}}});return{gridScaffoldDimensions:{width:s.width,height:s.height,gridTemplateColumns:`${v}px ${b}px`,gridTemplateRows:`${x}px ${I}px`},headerGridDims:{width:-1,height:x},topGridDims:{fullSizeWrapper:{width:i-o+(A?o:0),height:g},stickyWrapper:{width:b-1-o,height:-1},self:{width:Math.min(i,b)-(C?1:0)-o,height:g}},leftGridDims:{fullSizeWrapper:{width:v,height:P-g+(!L&&A?a:0)},stickyWrapper:{width:v,height:I-1-a},self:{width:v,height:Math.max(t,D-(w?0:a-1))}},dataGridDims:{fullSizeWrapper:{width:i-o+(A?o:0),height:P-g+(!A&&L?a:0)},stickyWrapper:{width:b-1-o,height:I-1-a},self:{width:Math.min(i,b)-(C?1:0)-o,height:Math.max(t,R-(w?0:a-1))}},metadata:{everyThingFitsInTableRectHeight:w,scrollbarsVisibilityStatus:M}}})({cellHeights:{headerCellHeight:e,contentCellHeight:t},horizontalWidths:{leftGridWidth:y,leftGridOriginalWidth:b,rightGridOriginalWidth:S},scrollBarsDimensions:{verticalScrollbarWidth:m,horizontalScrollbarHeight:g}}),O=f(()=>e,[e]),q=f(()=>t,[t]);return(()=>{const{downloadService:e}=I$();d(()=>{e.notifyIsDoneRendering()})})(),fo.jsxs(DV,{style:D,children:[fo.jsx("div",{style:{overflow:"hidden"},ref:i,children:fo.jsx(AU,{tableWidth:n.width,leftGridWidth:y,columnWidths:x,getHeaderCellsIconsVisibilityStatus:E,rowHight:e,height:R.height,changeSortOrder:r,overrideLeftGridWidth:I})}),fo.jsx(MV,{style:k.topGrid,origin:zF.TopGrid,ref:o,children:fo.jsx(IV,{style:P.fullSizeWrapper,children:fo.jsx(LV,{style:P.stickyWrapper,children:fo.jsx(sY,{topGridRef:l,rowHightCallback:O,...P.self,showLastBorder:{right:w,bottom:!1},getRightGridColumnWidth:C})})})}),fo.jsx(MV,{style:k.leftGrid,origin:zF.LeftGrid,ref:a,children:fo.jsx(IV,{style:M.fullSizeWrapper,children:fo.jsx(LV,{style:M.stickyWrapper,children:fo.jsx(rY,{leftGridRef:u,...M.self,columnWidths:x,showLastBorder:{right:!1,bottom:A}})})})}),fo.jsx(MV,{style:k.dataGrid,origin:zF.DataGrid,ref:s,children:fo.jsx(IV,{style:L.fullSizeWrapper,children:fo.jsx(LV,{style:L.stickyWrapper,children:fo.jsx(JG,{dataGridRef:c,rowHightCallback:q,...L.self,showLastBorder:{right:w,bottom:A},getRightGridColumnWidth:C,verticalScrollDirection:p,horizontalScrollDirection:h})})})})]})},cY=()=>{const{keyboard:e,theme:t,interactions:n,translator:r}=w$(),{pageInfo:i,updatePageInfo:o,rect:a}=b$(),{layoutService:s}=I$(),{layout:l,hasData:u}=s;return fo.jsxs(fo.Fragment,{children:[u?fo.jsx(lY,{}):null,fo.jsx(R$,{}),fo.jsx(v$,{paginationNeeded:i.shouldShowPagination,handleChangePage:e=>{o({page:e})},pageInfo:i,totalRowCount:i.totalRowCount,totalColumnCount:0,totalPages:i.totalPages,keyboard:e,translator:r,theme:t,interactions:n,rect:a,layout:l})]})};const dY=(e,{selections:t,baseObjects:r,coreServices:i,nebulaObjects:o},a)=>{const s=function(e){const t=zS();return t?.components?.MuiTable?.styleOverrides&&(t.components.MuiTable.styleOverrides.root={}),_s({...t,direction:e})}(r.direction);e.render(fo.jsx(n.StrictMode,{children:fo.jsx(Pw,{store:a,children:fo.jsx(Cl,{theme:s,children:fo.jsx(C$,{...o,children:fo.jsx(x$,{...r,children:fo.jsx(dG,{selections:t,children:fo.jsx(D$,{...i,children:fo.jsx(KH,{children:fo.jsx(cY,{})})})})})})})})}))};var pY=function(e){return e.FontSize="fontSize",e.FontFamily="fontFamily",e.FontColor="fontColor",e.FontStyle="fontStyle",e.Background="background",e.LineClamp="lineClamp",e.ColumnLineClamp="columnLineClamp",e.Border="border",e.Divider="divider",e}(pY||{}),fY=function(e){return e.Dimension="object.pivotTableV2.dimension",e.Measure="object.pivotTableV2.measure",e.Total="object.pivotTableV2.total",e.Null="object.pivotTableV2.null",e.Grid="object.pivotTableV2",e}(fY||{}),hY=function(e){return e.Grid="grid",e.Divider="grid.divider",e.LabelName="label.name",e.LabelValue="label.value",e}(hY||{}),mY=function(e){return e.FontSize="fontSize",e.FontFamily="fontFamily",e.FontColor="color",e.BackgroundColor="backgroundColor",e.LineClamp="lineClamp",e.ColumnLineClamp="columnLineClamp",e.BorderColor="borderColor",e}(mY||{});const gY=e=>e?`${parseInt(e,10)}px`:void 0,vY=(e,t)=>{if(t){const n=e.getColorPickerColor(t);return"none"===n?cz.Transparent:n}},yY=(e,t)=>+(parseInt(e,10)*uz*t+8).toFixed(2),bY=(e,t)=>void 0===e?t:e.some(e=>"bold"===e)?sz:"normal",xY=e=>e?.some(e=>"italic"===e)?"italic":"normal",SY=e=>e?.some(e=>"underline"===e)?"underline":"none",wY=document.createElement("textarea");function CY(e){wY.value=e,document.body.appendChild(wY),wY.select(),wY.setSelectionRange(0,wY.value.length),document.execCommand("copy"),document.body.removeChild(wY)}wY.style.position="absolute",wY.style.left="-9999px",wY.setAttribute("readonly","");function EY(e){T?.((t,n)=>{const r=n.target,i=r?.closest(`.${DT}`);i?.title&&t.addItem({translation:"contextMenu.copyCellValue",icon:"lui-icon lui-icon--copy",tid:"copy-cell-context-item",id:"copy-cell-context-item",select:async()=>{(e=>{const t=e.title;t&&(navigator.clipboard?.writeText?navigator.clipboard.writeText(t).catch(()=>{CY(t)}):CY(t))})(i)}}),e?.forEach(e=>{e(t,n,i)})})}const IY=({model:e,layoutService:t,effectivePropertiesService:n,translator:r})=>Lz((i,o,a)=>{if(!e||n.qAlwaysFullyExpanded)return;const s=e,l=i.addItem({translation:"Object.PivotTable.ContextMenu.ExpandCollapse",tid:"expand-collapse-group",id:"expand-collapse-group"}),{qEffectiveDimensionName:u,label:c}=((e,t)=>{const n=((e,t)=>{const n=e?.getAttribute("data-dimension-info-index");if("string"==typeof n)return t.getDimensionInfo(+n)})(e,t);return"object"==typeof n?{qEffectiveDimensionName:n.qEffectiveDimensionName,label:n.qFallbackTitle}:{qEffectiveDimensionName:void 0,label:void 0}})(a,t);l.addItem((e=>({icon:"lui-icon lui-icon--plus",translation:"Object.PivotTable.ContextMenu.ExpandAll",tid:"expand-all",select:async()=>{try{await e.expandTop(P$,0,0,!0),await e.expandLeft(P$,0,0,!0)}catch(e){console.error("Failed to expand all",e)}}}))(s)),"string"==typeof u&&l.addItem((({model:e,effectivePropertiesService:t,qEffectiveDimensionName:n,label:r,translator:i})=>({icon:"lui-icon lui-icon--plus",translation:i.get("SNPivotTable.ContextMenu.ExpandDimension",[r??""]),tid:"expand-dimension",id:"expand-dimension",select:gU({model:e,qExpansionState:t.qExpansionState,qEffectiveDimensionName:n,action:fU.Expand})}))({model:s,effectivePropertiesService:n,qEffectiveDimensionName:u,label:c,translator:r})),l.addItem((e=>({icon:"lui-icon lui-icon--minus",translation:"Object.PivotTable.ContextMenu.CollapseAll",tid:"collapse-all",select:async()=>{try{await e.collapseTop(P$,0,0,!0),await e.collapseLeft(P$,0,0,!0)}catch(e){console.error("Failed to collapse all",e)}}}))(s)),"string"==typeof u&&l.addItem((({model:e,effectivePropertiesService:t,qEffectiveDimensionName:n,label:r,translator:i})=>({icon:"lui-icon lui-icon--minus",translation:i.get("SNPivotTable.ContextMenu.CollapseDimension",[r??""]),tid:"collapse-dimension",id:"collapse-dimension",select:gU({model:e,qExpansionState:t.qExpansionState,qEffectiveDimensionName:n,action:fU.Collapse})}))({model:s,effectivePropertiesService:n,qEffectiveDimensionName:u,label:c,translator:r}))},[e,t,n]),DY=(e,t)=>P(()=>(({layout:e})=>{const{qHyperCube:t,nullValueRepresentation:n,snapshotData:r}=e,{qNoOfLeftDims:i,qEffectiveInterColumnSortOrder:o,qMeasureInfo:a,qDimensionInfo:s}=t,l=!!r,u=r?.content?.rowsPerPage??15e3,c={x:Math.min(e.qHyperCube.qSize.qcx,lz),y:Math.min(e.qHyperCube.qSize.qcy,u)},d=o.slice(0,i),p=e=>d.some(t=>t===e),f=p(M$),h=new Map(o.map(e=>[s[e]??M$,e])),m=a.filter(e=>7005!==e.qError?.qErrorCode);return{layout:e,getNullValueText:()=>n?.text??"-",getMeasureInfoIndexFromCellIndex:(e,t=!1)=>{if(f)return 0;const n=e%m.length;return t?n:a.findIndex(e=>e===m[n])},getDimensionInfo:e=>e===M$?void 0:s.at(e),getDimensionInfoIndex:e=>h.get(e)??-1,size:c,isSnapshot:l,hasLimitedData:!l&&c.x<e.qHyperCube.qSize.qcx,hasData:c.x>0&&c.y>0,hasLeftDimensions:0!==e.qHyperCube.qNoOfLeftDims,hasPseudoDimOnLeft:f,leftDimensionInfoIndexes:d,isLeftDimension:p,triggerdByExpandOrCollapse:!!e.qHyperCube.qLastExpandedPos,visibleMeasureInfo:m,isIndentModeEnabled:Boolean(e.qHyperCube.qIndentMode),indentModeColumnWidth:e.qHyperCube.indentModeColumnWidth??{type:LT.Auto,pixels:MT.PixelsDefault,percentage:MT.PercentageDefault},searchSortFromDimension:"inherit"===e.search?.sorting}})({layout:e}),[e,t]),RY=({model:e,layoutService:t,viewService:n,pageInfo:r,rect:i})=>{const{layout:o,isSnapshot:a,triggerdByExpandOrCollapse:s}=t,l=(e=>{const t=kz(e);return t.current=e,t})($H(i));return _z(async()=>{const{qHyperCube:t}=o,{maxNumberOfVisibleRows:i,maxNumberOfVisibleColumns:u}=l.current;if(a)return o.snapshotData?.content?.qPivotDataPages??[];if(void 0!==e&&"getHyperCubePivotData"in e&&(((e,t,n,r)=>!!e&&(t.gridColumnStartIndex+t.gridWidth>=r||t.gridRowStartIndex+t.gridHeight>=n))(s,n,i,u)||((e,t,n,r)=>{const{qHyperCube:{qPivotDataPages:i,qSize:o}}=e,{qTop:a,qWidth:s,qHeight:l}=i[0]?.qArea??{qTop:0,qWidth:0,qHeight:0};return a<t.page*t.rowsPerPage||s<Math.min(r,o.qcx)||l<Math.min(n,o.qcy)})(o,r,i,u))){const t=((e,t,n,r,i,o)=>{const a=r.page*r.rowsPerPage,s=Math.min(a+r.rowsPerPage,n.qcy),l=Math.min(lz,n.qcx);if(n.qcy<a)return null;let u=0,c=a;if(e){u=t.gridColumnStartIndex,c=a+t.gridRowStartIndex;const e=c+t.gridHeight,n=t.gridColumnStartIndex+t.gridWidth;e>s&&(c=Math.max(0,s-i)),n>l&&(u=Math.max(0,l-o))}return{qLeft:u,qTop:c,qWidth:Math.min(l-u,o),qHeight:Math.min(s-c,i)}})(s,n,o.qHyperCube.qSize,r,i,u);return t?e.getHyperCubePivotData(P$,HH(t)):[]}return t.qPivotDataPages},[o,a,e,n,r.page,r.rowsPerPage,l,s])},PY=({rowsPerPage:e,totalRowCount:t,page:n})=>Math.min(e,t-n*e),MY=(e,t,n=15e3)=>({rowsPerPage:n,totalPages:Math.max(1,Math.ceil(e/n)),totalRowCount:e,rowsOnCurrentPage:PY({rowsPerPage:n,totalRowCount:e,page:t})}),LY=15,AY=({layoutService:e,viewService:t,rect:n,model:r,pageInfo:i})=>{const{freeResize:o}=M();return N(async e=>{const o=e;if(!o.snapshotData||!r||o.snapshotData.content)return o;if("getHyperCubePivotData"in r){const{scrollTop:e,scrollLeft:a,leftGridScrollLeft:s,topGridScrollTop:l}=t,u=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:i,gridWidth:o,gridHeight:a}=e,s=t.page*t.rowsPerPage,l=Math.max(r-LY,0),u=Math.max(s+i-LY,s,0),c=lz-l,d=s+t.rowsOnCurrentPage-u;if((e=>0===e.gridWidth&&0===e.gridHeight)(e)){const{maxNumberOfVisibleColumns:e,maxNumberOfVisibleRows:t}=$H(n);return{qLeft:l,qTop:u,qWidth:Math.min(c,e+30),qHeight:Math.min(d,t+30)}}return{qLeft:l,qTop:u,qWidth:Math.min(c,o+30),qHeight:Math.min(d,a+30)}})(t,i,n),c=HH(u),d={qLeft:0,qTop:i.page*i.rowsPerPage,qWidth:1,qHeight:1};o.snapshotData.content={qPivotDataPages:await r.getHyperCubePivotData(P$,[d,...c]),scrollTop:e,scrollLeft:a,leftGridScrollLeft:s,topGridScrollTop:l,page:i.page,rowsPerPage:i.rowsPerPage},o.snapshotData.object.size.w=n.width,o.snapshotData.object.size.h=n.height}return o}),j(()=>({getViewState:()=>((e,t)=>({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,leftGridScrollLeft:e.leftGridScrollLeft,topGridScrollTop:e.topGridScrollTop,renderPage:t.page}))(t,i)}),[t]),e.layout.snapshotData?.content&&!o?{left:n.left,top:n.top,width:e.layout.snapshotData.object.size.w,height:e.layout.snapshotData.object.size.h}:n};var kY={SNPivotTable_ContextMenu_CollapseDimension:{id:"SNPivotTable.ContextMenu.CollapseDimension",locale:{"de-DE":"{0} reduzieren","en-US":"Collapse {0}","es-ES":"Contraer {0}","fr-FR":"Réduire {0}","it-IT":"Comprimi {0}","ja-JP":"{0} を折りたたむ","ko-KR":"{0} 축소","nl-NL":"{0} samenvouwen","pl-PL":"Zwiń {0}","pt-BR":"Recolher {0}","ru-RU":"Свернуть {0}","sv-SE":"Dölj {0}","tr-TR":"{0} öğelerini daralt","zh-CN":"折叠 {0}","zh-TW":"收合 {0}"}},SNPivotTable_ContextMenu_ExpandDimension:{id:"SNPivotTable.ContextMenu.ExpandDimension",locale:{"de-DE":"{0} erweitern","en-US":"Expand {0}","es-ES":"Expandir {0}","fr-FR":"Développer {0}","it-IT":"Espandi {0}","ja-JP":"{0} を展開","ko-KR":"{0} 확장","nl-NL":"{0} uitvouwen","pl-PL":"Rozwiń {0}","pt-BR":"Expandir {0}","ru-RU":"Развернуть {0}","sv-SE":"Visa {0}","tr-TR":"{0} öğelerini genişlet","zh-CN":"展开 {0}","zh-TW":"展開 {0}"}},SNPivotTable_IndentMode_Rows:{id:"SNPivotTable.IndentMode.Rows",locale:{"de-DE":"Zeilen","en-US":"Rows","es-ES":"Filas","fr-FR":"Lignes","it-IT":"Righe","ja-JP":"行","ko-KR":"행","nl-NL":"Rijen","pl-PL":"Wiersze","pt-BR":"Linhas","ru-RU":"Строки","sv-SE":"Rader","tr-TR":"Satırlar","zh-CN":"行","zh-TW":"列"}},SNPivotTable_LimitedData:{id:"SNPivotTable.LimitedData",locale:{"de-DE":"* Derzeit wird eine begrenzte Anzahl Spalten angezeigt","en-US":"* Currently showing a limited number of columns","es-ES":"* Actualmente mostrando un número limitado de columnas","fr-FR":"*Affichage actuel d'un nombre limité de colonnes","it-IT":"* Attualmente visualizzato un numero limitato di colonne","ja-JP":"* 現在、限られた列の数を表示","ko-KR":"* 현재 제한된 수의 열만 표시","nl-NL":"* Op dit moment wordt slechts een beperkt aantal kolommen getoond","pl-PL":"* Obecnie wyświetlana jest ograniczona liczba kolumn","pt-BR":"* Atualmente mostrando um número limitado de colunas","ru-RU":"* В настоящее время отображается ограниченное количество столбцов","sv-SE":"* Visar för närvarande ett begränsat antal kolumner","tr-TR":"*Şu anda sınırlı sayıda sütun gösteriliyor","zh-CN":"* 当前显示的列数有限","zh-TW":"* 目前顯示有限欄數"}},SNPivotTable_NoData:{id:"SNPivotTable.NoData",locale:{"de-DE":"Das Diagramm wird nicht angezeigt, weil es keine Werte enthält.","en-US":"The chart is not displayed because it contains no values.","es-ES":"El gráfico no se muestra porque no contiene valores.","fr-FR":"Le graphique n'est pas affiché, car il ne contient aucune valeur.","it-IT":"Il grafico non è visualizzato poiché non contiene alcun valore.","ja-JP":"チャートには値が含まれていないため、チャートは表示されません。","ko-KR":"차트에 값이 없으므로 차트가 표시되지 않습니다.","nl-NL":"Het diagram wordt niet weergegeven omdat deze geen waarden bevat.","pl-PL":"Wykres nie jest wyświetlany, ponieważ nie zawiera wartości.","pt-BR":"O gráfico não foi exibido porque não contém valores.","ru-RU":"Диаграмма не отображается, так как не содержит значений.","sv-SE":"Diagrammet visas inte eftersom det inte innehåller några värden.","tr-TR":"Değer içermemesi nedeniyle grafik görüntülenmiyor.","zh-CN":"图表未显示,因为它不包含任何值。","zh-TW":"系統不會顯示圖表,因為這沒有包含任何值。"}}};const OY=()=>{const e=_(),t=e.language();return P(()=>{!function(e){const t="SNPivotTable_LimitedData";e.get(t)===t&&Object.keys(kY).forEach(t=>{e.add(kY[t])})}(e)},[e]),{translator:e,language:t}},qY=e=>{const t=P(()=>Iw(),[]),{flags:n}=e,r=F(),i=(e=>{const t=P(()=>Hz(e),[e]);return k(()=>()=>{t.unmount()},[t]),t})(r),o=z(),a=W(),s=$(),l=H(),u=V(),c=(()=>{const{viewState:e}=M(),t=kz(new Set),n=void 0!==window.qlikprinting,{promise:r,resolve:i}=P(()=>Mz(),[]),o=Lz(e=>{t.current.add(e)},[t]),a=Lz(e_(async()=>{await Promise.all(t.current),t.current.clear(),i()},1e3),[i,t]);return L(async()=>{await r},[r]),P(()=>({viewState:e,isDownloadedAsPDForImage:n,notifyIsDoneRendering:a,waitForPromise:o}),[a,n,e,o])})(),d=((e,t)=>{const[n]=_z(async()=>{if(void 0!==e&&!t.snapshotData&&"getEffectiveProperties"in e)return{...await e.getEffectiveProperties()}},[e,t]);return P(()=>{const e=void 0!==n?.qHyperCubeDef.qSortbyYValue&&1===Math.abs(n.qHyperCubeDef.qSortbyYValue),t=n?.qHyperCubeDef.qDimensions.map(e=>e.qDef?.qSortCriterias)??[];return{qAlwaysFullyExpanded:n?.qHyperCubeDef.qAlwaysFullyExpanded??!1,qExpansionState:n?.qHyperCubeDef.qExpansionState,isSortedByFirstMeasure:e,getSortCriteriaForDimension:e=>t[e]}},[n])})(a,o),p=DY(o,n),f=(e=>{const t=q();return{...t,select:!!t.active&&!!t.select&&!e,active:!!t.active&&!e,scroll:!!t.active}})(p.isSnapshot),h=B(),m=jz(o,r),{translator:g,language:v}=OY(),{pageInfo:y,updatePageInfo:b}=((e,t)=>{const{size:n,layout:{qHyperCube:{qSize:r}}}=e,i=t.isDownloadedAsPDForImage||e.isSnapshot,o=(e=>e.layout.snapshotData?.content?.rowsPerPage)(e),[a,s]=A(()=>{const a=((e,t)=>t.isDownloadedAsPDForImage?t.viewState?.renderPage??0:e.isSnapshot?e.layout.snapshotData?.content?.page??0:0)(e,t);return{page:a,shouldShowPagination:r.qcy>n.y&&!i,...MY(r.qcy,a,o)}}),l=e.layout.qHyperCube.qSize.qcy;return k(()=>{s(t=>({...t,...MY(l,t.page,o),shouldShowPagination:l>e.size.y&&!i}))},[l,e.size.y,s,i,o]),k(()=>{const{page:e,totalPages:t}=a;if(e+1>t){const e=t-1,n=PY({...a,page:e});s({...a,page:e,rowsOnCurrentPage:n})}},[a]),{pageInfo:a,updatePageInfo:e=>{s({...a,...e,rowsOnCurrentPage:PY({...a,...e})})}}})(p,c),x=((e,t,n)=>P(()=>((e,t)=>{if(e.isDownloadedAsPDForImage){const{viewState:t}=e;return{gridColumnStartIndex:0,gridRowStartIndex:0,gridWidth:0,gridHeight:0,scrollTop:t?.scrollTop??0,scrollLeft:t?.scrollLeft??0,leftGridScrollLeft:t?.leftGridScrollLeft??0,topGridScrollTop:t?.topGridScrollTop??0}}return{gridColumnStartIndex:0,gridRowStartIndex:0,gridWidth:0,gridHeight:0,scrollTop:t?.content?.scrollTop??0,scrollLeft:t?.content?.scrollLeft??0,leftGridScrollLeft:t?.content?.leftGridScrollLeft??0,topGridScrollTop:t?.content?.topGridScrollTop??0}})(n,t.snapshotData),[n,e.page,t.snapshotData]))(y,o,c),S=AY({rect:G(),layoutService:p,viewService:x,model:a,pageInfo:y}),[w,C]=RY({model:a,layoutService:p,viewService:x,pageInfo:y,rect:S}),E=P(()=>((e,t)=>{const n=t.layout.components?.find(e=>"theme"===e.key),r=n?.header,i=n?.dimensionValues,o=n?.measureValues,a=n?.measureLabels,s=n?.totalValues,l=n?.nullValues,u=n?.grid,c=(t,n,r)=>e.getStyle(t,n,r),d=+(u?.[pY.LineClamp]??c(fY.Grid,hY.Grid,mY.LineClamp)??1),p=+(u?.[pY.ColumnLineClamp]??c(fY.Grid,hY.Grid,mY.ColumnLineClamp)??1),f=vY(e,r?.[pY.Background])??c(fY.Dimension,hY.LabelName,mY.BackgroundColor)??cz.Transparent,h={header:{fontSize:gY(r?.[pY.FontSize])??c(fY.Dimension,hY.LabelName,mY.FontSize)??oz,fontFamily:r?.[pY.FontFamily]??c(fY.Dimension,hY.LabelName,mY.FontFamily)??az,fontWeight:bY(r?.[pY.FontStyle],sz),fontStyle:xY(r?.[pY.FontStyle]),textDecoration:SY(r?.[pY.FontStyle]),color:vY(e,r?.[pY.FontColor])??c(fY.Dimension,hY.LabelName,mY.FontColor)??gN.TEXT,background:f,hoverBackground:c_(f,AT),activeBackground:c_(f,kT)},dimensionValues:{fontSize:gY(i?.[pY.FontSize])??c(fY.Dimension,hY.LabelValue,mY.FontSize)??oz,fontFamily:i?.[pY.FontFamily]??c(fY.Dimension,hY.LabelValue,mY.FontFamily)??az,fontWeight:bY(i?.[pY.FontStyle],void 0),fontStyle:xY(i?.[pY.FontStyle]),textDecoration:SY(i?.[pY.FontStyle]),color:vY(e,i?.[pY.FontColor])??c(fY.Dimension,hY.LabelValue,mY.FontColor)??gN.TEXT,background:vY(e,i?.[pY.Background])??c(fY.Dimension,hY.LabelValue,mY.BackgroundColor)??cz.Transparent},measureValues:{fontSize:gY(o?.[pY.FontSize])??c(fY.Measure,hY.LabelValue,mY.FontSize)??oz,fontFamily:o?.[pY.FontFamily]??c(fY.Measure,hY.LabelValue,mY.FontFamily)??az,fontWeight:bY(o?.[pY.FontStyle],"normal"),fontStyle:xY(o?.[pY.FontStyle]),textDecoration:SY(o?.[pY.FontStyle]),color:vY(e,o?.[pY.FontColor])??c(fY.Measure,hY.LabelValue,mY.FontColor)??cz.FontSecondary,background:vY(e,o?.[pY.Background])??c(fY.Measure,hY.LabelValue,mY.BackgroundColor)??cz.Transparent},measureLabels:{fontWeight:bY(a?.[pY.FontStyle],"normal"),fontStyle:xY(a?.[pY.FontStyle]),textDecoration:SY(a?.[pY.FontStyle]),color:vY(e,a?.[pY.FontColor])??c(fY.Measure,hY.LabelName,mY.FontColor)??cz.FontSecondary,background:vY(e,a?.[pY.Background])??c(fY.Measure,hY.LabelName,mY.BackgroundColor)??cz.Transparent},totalValues:{fontWeight:bY(s?.[pY.FontStyle],sz),fontStyle:xY(s?.[pY.FontStyle]),textDecoration:SY(s?.[pY.FontStyle]),color:vY(e,s?.[pY.FontColor])??c(fY.Total,hY.LabelValue,mY.FontColor)??gN.TEXT,background:vY(e,s?.[pY.Background])??c(fY.Total,hY.LabelValue,mY.BackgroundColor)??cz.Transparent},nullValues:{fontWeight:bY(l?.[pY.FontStyle],"normal"),fontStyle:xY(l?.[pY.FontStyle]),textDecoration:SY(l?.[pY.FontStyle]),color:vY(e,l?.[pY.FontColor])??c(fY.Null,hY.LabelValue,mY.FontColor)??gN.TEXT,background:vY(e,l?.[pY.Background])??c(fY.Null,hY.LabelValue,mY.BackgroundColor)??cz.NullValueBackground},grid:{columnLineClamp:p,lineClamp:d,border:vY(e,u?.[pY.Border])??c(fY.Grid,hY.Grid,mY.BorderColor)??cz.DividerLight,divider:vY(e,u?.[pY.Divider])??c(fY.Grid,hY.Divider,mY.BorderColor)??cz.DividerDark,background:vY(e,u?.[pY.Background])??c(fY.Grid,hY.Grid,mY.BackgroundColor)??cz.Transparent},selectedColors:u_(e)};return h.headerCellHeight=Math.max(yY(h.header.fontSize,p),yY(h.dimensionValues.fontSize,p),32),h.contentCellHeight=Math.max(yY(h.measureValues.fontSize,d),yY(h.dimensionValues.fontSize,d),24),h.dimensionValueTextHeight=yY(h.dimensionValues.fontSize,1),h})(m,p),[m,p]),I=((e,t,n)=>{const[,r,i]=_z(async()=>{const t=UN(n.flags),r=e.getStyle("","","fontFamily"),i=e.getStyle("object","label.name","fontFamily"),o=e.getStyle("object","label.value","fontFamily"),a=e.getStyle("","","fontFamilies")??[];return Promise.all([...t,...a,r,i,o,Bz].filter(e=>void 0!==e).map(async e=>{await document.fonts.load(`600 12px ${e}`),await document.fonts.load(`12px ${e}`)}))},[t,e,n]);return i?(console.warn("Failed to load fonts:",i),!0):!r})(m,o,e),{direction:D}=M();EY([IY({model:a,layoutService:p,effectivePropertiesService:d,translator:g})]),k(()=>{!C&&a&&!!w&&I&&dY(i,{selections:h,baseObjects:{rect:S,pageInfo:y,qPivotDataPages:w,updatePageInfo:b,direction:D},nebulaObjects:{env:e,app:s,model:a,embed:l,theme:m,keyboard:u,translator:g,interactions:f},coreServices:{styleService:E,viewService:x,layoutService:p,downloadService:c,effectivePropertiesService:d}},t)},[a,s,S,f,h,x,p,c,C,w,E,i,I,g,v,y,b,d,l,u,m,e,D,t])},TY={version:"7.24.0",qHyperCubeDef:{qAlwaysFullyExpanded:!1,qDimensions:[],qMeasures:[],qMode:"P",qSuppressMissing:!0,qSuppressZero:!1,qShowTotalsAbove:!0,qInitialDataFetch:[{qTop:0,qLeft:0,qWidth:50,qHeight:50}],qIndentMode:!1},showTitles:!0,title:"",subtitle:"",footnote:"",nullValueRepresentation:{text:"-"},components:[]},NY=()=>({...TY,qHyperCubeDef:{...TY.qHyperCubeDef,qIndentMode:!1}})}}});