@nebula.js/sn-pivot-table 7.19.0 → 7.20.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.19.0
2
+ * @nebula.js/sn-pivot-table v7.20.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 r,n,i,o,a,s,l,u,c,d,p,f,h,m,g,v,y,b,x,S,w,C,E,I,D,P,R,M,L,A,k,O,q,T,N,_,j,F,z,W,$,H,V,B,G,U,Y;return{setters:[function(e){r=e.default,n=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){P=e.HyperCubeHandler,R=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,_=e.useImperativeHandle,j=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:vY()},data:sF(e)},ext:hz(e),component(){mY(e)}}});const K={black:"#000",white:"#fff"},X="#e57373",J="#ef5350",Z="#f44336",Q="#d32f2f",ee="#c62828",te="#f3e5f5",re="#ce93d8",ne="#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",Pe="#e65100",Re={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 r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ke.apply(null,arguments)}function Oe(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}var qe=function(){return qe=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},qe.apply(this,arguments)};function Te(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var Ne={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},_e="-ms-",je="-moz-",Fe="-webkit-",ze="comm",We="rule",$e="decl",He="@keyframes",Ve=Math.abs,Be=String.fromCharCode,Ge=Object.assign;function Ue(e){return e.trim()}function Ye(e,t){return(e=t.exec(e))?e[0]:e}function Ke(e,t,r){return e.replace(t,r)}function Xe(e,t,r){return e.indexOf(t,r)}function Je(e,t){return 0|e.charCodeAt(t)}function Ze(e,t,r){return e.slice(t,r)}function Qe(e){return e.length}function et(e){return e.length}function tt(e,t){return t.push(e),e}function rt(e,t){return e.filter(function(e){return!Ye(e,t)})}var nt=1,it=1,ot=0,at=0,st=0,lt="";function ut(e,t,r,n,i,o,a,s){return{value:e,root:t,parent:r,type:n,props:i,children:o,line:nt,column:it,length:a,return:"",siblings:s}}function ct(e,t){return Ge(ut("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function dt(e){for(;e.root;)e=ct(e.root,{children:[e]});tt(e,e.siblings)}function pt(){return st=at>0?Je(lt,--at):0,it--,10===st&&(it=1,nt--),st}function ft(){return st=at<ot?Je(lt,at++):0,it++,10===st&&(it=1,nt++),st}function ht(){return Je(lt,at)}function mt(){return at}function gt(e,t){return Ze(lt,e,t)}function vt(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 yt(e){return Ue(gt(at-1,St(91===e?e+2:40===e?e+1:e)))}function bt(e){for(;(st=ht())&&st<33;)ft();return vt(e)>2||vt(st)>3?"":" "}function xt(e,t){for(;--t&&ft()&&!(st<48||st>102||st>57&&st<65||st>70&&st<97););return gt(e,mt()+(t<6&&32==ht()&&32==ft()))}function St(e){for(;ft();)switch(st){case e:return at;case 34:case 39:34!==e&&39!==e&&St(st);break;case 40:41===e&&St(e);break;case 92:ft()}return at}function wt(e,t){for(;ft()&&e+st!==57&&(e+st!==84||47!==ht()););return"/*"+gt(t,at-1)+"*"+Be(47===e?e:ft())}function Ct(e){for(;!vt(ht());)ft();return gt(e,at)}function Et(e){return function(e){return lt="",e}(It("",null,null,null,[""],e=function(e){return nt=it=1,ot=Qe(lt=e),at=0,[]}(e),0,[0],e))}function It(e,t,r,n,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=n,C=b;g;)switch(h=y,y=ft()){case 40:if(108!=h&&58==Je(C,d-1)){-1!=Xe(C+=Ke(yt(y),"&","&\f"),"&\f",Ve(u?s[u-1]:0))&&(v=-1);break}case 34:case 39:case 91:C+=yt(y);break;case 9:case 10:case 13:case 32:C+=bt(h);break;case 92:C+=xt(mt()-1,7);continue;case 47:switch(ht()){case 42:case 47:tt(Pt(wt(ft(),mt()),t,r,l),l),5!=vt(h||1)&&5!=vt(ht()||1)||!Qe(C)||" "===Ze(C,-1,void 0)||(C+=" ");break;default:C+="/"}break;case 123*m:s[u++]=Qe(C)*v;case 125*m:case 59:case 0:switch(y){case 0:case 125:g=0;case 59+c:-1==v&&(C=Ke(C,/\f/g,"")),f>0&&(Qe(C)-d||0===m&&47===h)&&tt(f>32?Rt(C+";",n,r,d-1,l):Rt(Ke(C," ","")+";",n,r,d-2,l),l);break;case 59:C+=";";default:if(tt(w=Dt(C,t,r,u,c,i,s,b,x=[],S=[],d,o),o),123===y)if(0===c)It(C,t,w,w,x,o,d,s,S);else{switch(p){case 99:if(110===Je(C,3))break;case 108:if(97===Je(C,2))break;default:c=0;case 100:case 109:case 115:}c?It(e,w,w,n&&tt(Dt(e,w,w,0,0,i,s,b,i,x=[],d,S),S),i,S,d,s,n?x:S):It(C,w,w,w,[""],S,0,s,S)}}u=c=f=0,m=v=1,b=C="",d=a;break;case 58:d=1+Qe(C),f=h;default:if(m<1)if(123==y)--m;else if(125==y&&0==m++&&125==pt())continue;switch(C+=Be(y),y*m){case 38:v=c>0?1:(C+="\f",-1);break;case 44:s[u++]=(Qe(C)-1)*v,v=1;break;case 64:45===ht()&&(C+=yt(ft())),p=ht(),c=d=Qe(b=C+=Ct(mt())),y++;break;case 45:45===h&&2==Qe(C)&&(m=0)}}return o}function Dt(e,t,r,n,i,o,a,s,l,u,c,d){for(var p=i-1,f=0===i?o:[""],h=et(f),m=0,g=0,v=0;m<n;++m)for(var y=0,b=Ze(e,p+1,p=Ve(g=a[m])),x=e;y<h;++y)(x=Ue(g>0?f[y]+" "+b:Ke(b,/&\f/g,f[y])))&&(l[v++]=x);return ut(e,t,r,0===i?We:s,l,u,c,d)}function Pt(e,t,r,n){return ut(e,t,r,ze,Be(st),Ze(e,2,-2),0,n)}function Rt(e,t,r,n,i){return ut(e,t,r,$e,Ze(e,0,n),Ze(e,n+1,-1),n,i)}function Mt(e,t,r){switch(function(e,t){return 45^Je(e,0)?(((t<<2^Je(e,0))<<2^Je(e,1))<<2^Je(e,2))<<2^Je(e,3):0}(e,t)){case 5103:return Fe+"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 Fe+e+e;case 4855:return Fe+e.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+e;case 4789:return je+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Fe+e+je+e+_e+e+e;case 5936:switch(Je(e,t+11)){case 114:return Fe+e+_e+Ke(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Fe+e+_e+Ke(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Fe+e+_e+Ke(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return Fe+e+_e+e+e;case 6165:return Fe+e+_e+"flex-"+e+e;case 5187:return Fe+e+Ke(e,/(\w+).+(:[^]+)/,Fe+"box-$1$2"+_e+"flex-$1$2")+e;case 5443:return Fe+e+_e+"flex-item-"+Ke(e,/flex-|-self/g,"")+(Ye(e,/flex-|baseline/)?"":_e+"grid-row-"+Ke(e,/flex-|-self/g,""))+e;case 4675:return Fe+e+_e+"flex-line-pack"+Ke(e,/align-content|flex-|-self/g,"")+e;case 5548:return Fe+e+_e+Ke(e,"shrink","negative")+e;case 5292:return Fe+e+_e+Ke(e,"basis","preferred-size")+e;case 6060:return Fe+"box-"+Ke(e,"-grow","")+Fe+e+_e+Ke(e,"grow","positive")+e;case 4554:return Fe+Ke(e,/([^-])(transform)/g,"$1"+Fe+"$2")+e;case 6187:return Ke(Ke(Ke(e,/(zoom-|grab)/,Fe+"$1"),/(image-set)/,Fe+"$1"),e,"")+e;case 5495:case 3959:return Ke(e,/(image-set\([^]*)/,Fe+"$1$`$1");case 4968:return Ke(Ke(e,/(.+:)(flex-)?(.*)/,Fe+"box-pack:$3"+_e+"flex-pack:$3"),/space-between/,"justify")+Fe+e+e;case 4200:if(!Ye(e,/flex-|baseline/))return _e+"grid-column-align"+Ze(e,t)+e;break;case 2592:case 3360:return _e+Ke(e,"template-","")+e;case 4384:case 3616:return r&&r.some(function(e,r){return t=r,Ye(e.props,/grid-\w+-end/)})?~Xe(e+(r=r[t].value),"span",0)?e:_e+Ke(e,"-start","")+e+_e+"grid-row-span:"+(~Xe(r,"span",0)?Ye(r,/\d+/):+Ye(r,/\d+/)-+Ye(e,/\d+/))+";":_e+Ke(e,"-start","")+e;case 4896:case 4128:return r&&r.some(function(e){return Ye(e.props,/grid-\w+-start/)})?e:_e+Ke(Ke(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Ke(e,/(.+)-inline(.+)/,Fe+"$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(Qe(e)-1-t>6)switch(Je(e,t+1)){case 109:if(45!==Je(e,t+4))break;case 102:return Ke(e,/(.+:)(.+)-([^]+)/,"$1"+Fe+"$2-$3$1"+je+(108==Je(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Xe(e,"stretch",0)?Mt(Ke(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return Ke(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(t,r,n,i,o,a,s){return _e+r+":"+n+s+(i?_e+r+"-span:"+(o?a:+a-+n)+s:"")+e});case 4949:if(121===Je(e,t+6))return Ke(e,":",":"+Fe)+e;break;case 6444:switch(Je(e,45===Je(e,14)?18:11)){case 120:return Ke(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+Fe+(45===Je(e,14)?"inline-":"")+"box$3$1"+Fe+"$2$3$1"+_e+"$2box$3")+e;case 100:return Ke(e,":",":"+_e)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Ke(e,"scroll-","scroll-snap-")+e}return e}function Lt(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function At(e,t,r,n){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case"@namespace":case $e:return e.return=e.return||e.value;case ze:return"";case He:return e.return=e.value+"{"+Lt(e.children,n)+"}";case We:if(!Qe(e.value=e.props.join(",")))return""}return Qe(r=Lt(e.children,n))?e.return=e.value+"{"+r+"}":""}function kt(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case $e:return void(e.return=Mt(e.value,e.length,r));case He:return Lt([ct(e,{value:Ke(e.value,"@","@"+Fe)})],n);case We:if(e.length)return function(e,t){return e.map(t).join("")}(r=e.props,function(t){switch(Ye(t,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":dt(ct(e,{props:[Ke(t,/:(read-\w+)/,":-moz-$1")]})),dt(ct(e,{props:[t]})),Ge(e,{props:rt(r,n)});break;case"::placeholder":dt(ct(e,{props:[Ke(t,/:(plac\w+)/,":"+Fe+"input-$1")]})),dt(ct(e,{props:[Ke(t,/:(plac\w+)/,":-moz-$1")]})),dt(ct(e,{props:[Ke(t,/:(plac\w+)/,_e+"input-$1")]})),dt(ct(e,{props:[t]})),Ge(e,{props:rt(r,n)})}return""})}}var Ot="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",qt="active",Tt="data-styled-version",Nt="6.3.12",_t="/*!sc*/\n",jt="undefined"!=typeof window&&"undefined"!=typeof document,Ft=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY&&("false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY)),zt={};function Wt(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var $t=new Map,Ht=new Map,Vt=1,Bt=function(e){if($t.has(e))return $t.get(e);for(;Ht.has(Vt);)Vt++;var t=Vt++;return $t.set(e,t),Ht.set(t,e),t},Gt=function(e,t){Vt=t+1,$t.set(e,t),Ht.set(t,e)},Ut=Object.freeze([]),Yt=Object.freeze({});function Kt(e,t,r){return void 0===r&&(r=Yt),e.theme!==r.theme&&e.theme||t||r.theme}var Xt=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"]),Jt=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Zt=/(^-|-$)/g;function Qt(e){return e.replace(Jt,"-").replace(Zt,"")}var er=/(a)(d)/gi,tr=function(e){return String.fromCharCode(e+(e>25?39:97))};function rr(e){var t,r="";for(t=Math.abs(e);t>52;t=t/52|0)r=tr(t%52)+r;return(tr(t%52)+r).replace(er,"$1-$2")}var nr,ir=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},or=function(e){return ir(5381,e)};function ar(e){return rr(or(e)>>>0)}function sr(e){return"string"==typeof e&&!0}var lr="function"==typeof Symbol&&Symbol.for,ur=lr?Symbol.for("react.memo"):60115,cr=lr?Symbol.for("react.forward_ref"):60112,dr={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},pr={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},fr={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},hr=((nr={})[cr]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},nr[ur]=fr,nr);function mr(e){return("type"in(t=e)&&t.type.$$typeof)===ur?fr:"$$typeof"in e?hr[e.$$typeof]:dr;var t}var gr=Object.defineProperty,vr=Object.getOwnPropertyNames,yr=Object.getOwnPropertySymbols,br=Object.getOwnPropertyDescriptor,xr=Object.getPrototypeOf,Sr=Object.prototype;function wr(e,t,r){if("string"!=typeof t){if(Sr){var n=xr(t);n&&n!==Sr&&wr(e,n,r)}var i=vr(t);yr&&(i=i.concat(yr(t)));for(var o=mr(e),a=mr(t),s=0;s<i.length;++s){var l=i[s];if(!(l in pr||r&&r[l]||a&&l in a||o&&l in o)){var u=br(t,l);try{gr(e,l,u)}catch(e){}}}}return e}function Cr(e){return"function"==typeof e}function Er(e){return"object"==typeof e&&"styledComponentId"in e}function Ir(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function Dr(e,t){return e.join("")}function Pr(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function Rr(e,t,r){if(void 0===r&&(r=!1),!r&&!Pr(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var n=0;n<t.length;n++)e[n]=Rr(e[n],t[n]);else if(Pr(t))for(var n in t)e[n]=Rr(e[n],t[n]);return e}function Mr(e,t){Object.defineProperty(e,"toString",{value:t})}var Lr=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e,this._cGroup=0,this._cIndex=0}return e.prototype.indexOfGroup=function(e){if(e===this._cGroup)return this._cIndex;var t=this._cIndex;if(e>this._cGroup)for(var r=this._cGroup;r<e;r++)t+=this.groupSizes[r];else for(r=this._cGroup-1;r>=e;r--)t-=this.groupSizes[r];return this._cGroup=e,this._cIndex=t,t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var r=this.groupSizes,n=r.length,i=n;e>=i;)if((i<<=1)<0)throw Wt(16,"".concat(e));this.groupSizes=new Uint32Array(i),this.groupSizes.set(r),this.length=i;for(var o=n;o<i;o++)this.groupSizes[o]=0}for(var a=this.indexOfGroup(e+1),s=0,l=(o=0,t.length);o<l;o++)this.tag.insertRule(a,t[o])&&(this.groupSizes[e]++,a++,s++);s>0&&this._cGroup>e&&(this._cIndex+=s)},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],r=this.indexOfGroup(e),n=r+t;this.groupSizes[e]=0;for(var i=r;i<n;i++)this.tag.deleteRule(r);t>0&&this._cGroup>e&&(this._cIndex-=t)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var r=this.groupSizes[e],n=this.indexOfGroup(e),i=n+r,o=n;o<i;o++)t+=this.tag.getRule(o)+_t;return t},e}(),Ar="style[".concat(Ot,"][").concat(Tt,'="').concat(Nt,'"]'),kr=new RegExp("^".concat(Ot,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),Or=function(e){return"undefined"!=typeof ShadowRoot&&e instanceof ShadowRoot||"host"in e&&11===e.nodeType},qr=function(e){if(!e)return document;if(Or(e))return e;if("getRootNode"in e){var t=e.getRootNode();if(Or(t))return t}return document},Tr=function(e,t,r){for(var n,i=r.split(","),o=0,a=i.length;o<a;o++)(n=i[o])&&e.registerName(t,n)},Nr=function(e,t){for(var r,n=(null!==(r=t.textContent)&&void 0!==r?r:"").split(_t),i=[],o=0,a=n.length;o<a;o++){var s=n[o].trim();if(s){var l=s.match(kr);if(l){var u=0|parseInt(l[1],10),c=l[2];0!==u&&(Gt(c,u),Tr(e,c,l[3]),e.getTag().insertRules(u,i)),i.length=0}else i.push(s)}}},_r=function(e){for(var t=qr(e.options.target).querySelectorAll(Ar),r=0,n=t.length;r<n;r++){var i=t[r];i&&i.getAttribute(Ot)!==qt&&(Nr(e,i),i.parentNode&&i.parentNode.removeChild(i))}};var jr=function(e){var t=document.head,r=e||t,n=document.createElement("style"),i=function(e){var t=Array.from(e.querySelectorAll("style[".concat(Ot,"]")));return t[t.length-1]}(r),o=void 0!==i?i.nextSibling:null;n.setAttribute(Ot,qt),n.setAttribute(Tt,Nt);var a="undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null;return a&&n.setAttribute("nonce",a),r.insertBefore(n,o),n},Fr=function(){function e(e){this.element=jr(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){var t;if(e.sheet)return e.sheet;for(var r=null!==(t=e.getRootNode().styleSheets)&&void 0!==t?t:document.styleSheets,n=0,i=r.length;n<i;n++){var o=r[n];if(o.ownerNode===e)return o}throw Wt(17)}(this.element),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},e}(),zr=function(){function e(e){this.element=jr(e),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var r=document.createTextNode(t);return this.element.insertBefore(r,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),Wr=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(e===this.length?this.rules.push(t):this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),$r=jt,Hr={isServer:!jt,useCSSOMInjection:!Ft},Vr=function(){function e(e,t,r){void 0===e&&(e=Yt),void 0===t&&(t={});var n=this;this.options=qe(qe({},Hr),e),this.gs=t,this.names=new Map(r),this.server=!!e.isServer,!this.server&&jt&&$r&&($r=!1,_r(this)),Mr(this,function(){return function(e){for(var t=e.getTag(),r=t.length,n="",i=function(r){var i=function(e){return Ht.get(e)}(r);if(void 0===i)return"continue";var o=e.names.get(i);if(void 0===o||!o.size)return"continue";var a=t.getGroup(r);if(0===a.length)return"continue";var s=Ot+".g"+r+'[id="'+i+'"]',l="";o.forEach(function(e){e.length>0&&(l+=e+",")}),n+=a+s+'{content:"'+l+'"}'+_t},o=0;o<r;o++)i(o);return n}(n)})}return e.registerId=function(e){return Bt(e)},e.prototype.rehydrate=function(){!this.server&&jt&&_r(this)},e.prototype.reconstructWithOptions=function(t,r){void 0===r&&(r=!0);var n=new e(qe(qe({},this.options),t),this.gs,r&&this.names||void 0);return!this.server&&jt&&t.target!==this.options.target&&qr(this.options.target)!==qr(t.target)&&_r(n),n},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,r=e.target;return e.isServer?new Wr(r):t?new Fr(r):new zr(r)}(this.options),new Lr(e)));var e},e.prototype.hasNameForId=function(e,t){var r,n;return null!==(n=null===(r=this.names.get(e))||void 0===r?void 0:r.has(t))&&void 0!==n&&n},e.prototype.registerName=function(e,t){Bt(e);var r=this.names.get(e);r?r.add(t):this.names.set(e,new Set([t]))},e.prototype.insertRules=function(e,t,r){this.registerName(e,t),this.getTag().insertRules(Bt(e),r)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(Bt(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e}();function Br(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||e in Ne||e.startsWith("--")?String(t).trim():"".concat(t,"px")}var Gr=function(e){return e>="A"&&e<="Z"};function Ur(e){for(var t="",r=0;r<e.length;r++){var n=e[r];if(1===r&&"-"===n&&"-"===e[0])return e;Gr(n)?t+="-"+n.toLowerCase():t+=n}return t.startsWith("ms-")?"-"+t:t}var Yr=Symbol.for("sc-keyframes");var Kr=function(e){return null==e||!1===e||""===e},Xr=function(e){var t=[];for(var r in e){var n=e[r];e.hasOwnProperty(r)&&!Kr(n)&&(Array.isArray(n)&&n.isCss||Cr(n)?t.push("".concat(Ur(r),":"),n,";"):Pr(n)?t.push.apply(t,Te(Te(["".concat(r," {")],Xr(n),!1),["}"],!1)):t.push("".concat(Ur(r),": ").concat(Br(r,n),";")))}return t};function Jr(e,t,r,n,i){if(void 0===i&&(i=[]),"string"==typeof e)return e&&i.push(e),i;if(Kr(e))return i;if(Er(e))return i.push(".".concat(e.styledComponentId)),i;var o;if(Cr(e))return!Cr(o=e)||o.prototype&&o.prototype.isReactComponent||!t?(i.push(e),i):Jr(e(t),t,r,n,i);if(function(e){return"object"==typeof e&&null!==e&&Yr in e}(e))return r?(e.inject(r,n),i.push(e.getName(n))):i.push(e),i;if(Pr(e)){for(var a=Xr(e),s=0;s<a.length;s++)i.push(a[s]);return i}if(!Array.isArray(e))return i.push(e.toString()),i;for(s=0;s<e.length;s++)Jr(e[s],t,r,n,i);return i}function Zr(e){for(var t=0;t<e.length;t+=1){var r=e[t];if(Cr(r)&&!Er(r))return!1}return!0}var Qr=or(Nt),en=function(){function e(e,t,r){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===r||r.isStatic)&&Zr(e),this.componentId=t,this.baseHash=ir(Qr,t),this.baseStyle=r,Vr.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,r){var n=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,r).className:"";if(this.isStatic&&!r.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))n=Ir(n,this.staticRulesId);else{var i=Dr(Jr(this.rules,e,t,r)),o=rr(ir(this.baseHash,i)>>>0);if(!t.hasNameForId(this.componentId,o)){var a=r(i,".".concat(o),void 0,this.componentId);t.insertRules(this.componentId,o,a)}n=Ir(n,o),this.staticRulesId=o}else{for(var s=ir(this.baseHash,r.hash),l="",u=0;u<this.rules.length;u++){var c=this.rules[u];if("string"==typeof c)l+=c;else if(c){var d=Dr(Jr(c,e,t,r));s=ir(ir(s,String(u)),d),l+=d}}if(l){var p=rr(s>>>0);if(!t.hasNameForId(this.componentId,p)){var f=r(l,".".concat(p),void 0,this.componentId);t.insertRules(this.componentId,p,f)}n=Ir(n,p)}}return{className:n,css:"undefined"==typeof window?t.getTag().getGroup(Bt(this.componentId)):""}},e}(),tn=/&/g,rn=47,nn=42;function on(e){if(-1===e.indexOf("}"))return!1;for(var t=e.length,r=0,n=0,i=!1,o=0;o<t;o++){var a=e.charCodeAt(o);if(0!==n||i||a!==rn||e.charCodeAt(o+1)!==nn)if(i)a===nn&&e.charCodeAt(o+1)===rn&&(i=!1,o++);else if(34!==a&&39!==a||0!==o&&92===e.charCodeAt(o-1)){if(0===n)if(123===a)r++;else if(125===a&&--r<0)return!0}else 0===n?n=a:n===a&&(n=0);else i=!0,o++}return 0!==r||0!==n}function an(e,t){return e.map(function(e){return"rule"===e.type&&(e.value="".concat(t," ").concat(e.value),e.value=e.value.replaceAll(",",",".concat(t," ")),e.props=e.props.map(function(e){return"".concat(t," ").concat(e)})),Array.isArray(e.children)&&"@keyframes"!==e.type&&(e.children=an(e.children,t)),e})}var sn=new Vr,ln=function(){var e,t,r,n=Yt,i=n.options,o=void 0===i?Yt:i,a=n.plugins,s=void 0===a?Ut:a,l=function(r,n,i){return i.startsWith(t)&&i.endsWith(t)&&i.replaceAll(t,"").length>0?".".concat(e):r},u=s.slice();u.push(function(e){e.type===We&&e.value.includes("&")&&(r||(r=new RegExp("\\".concat(t,"\\b"),"g")),e.props[0]=e.props[0].replace(tn,t).replace(r,l))}),o.prefix&&u.push(kt),u.push(At);var c,d=[],p=function(e){var t=et(e);return function(r,n,i,o){for(var a="",s=0;s<t;s++)a+=e[s](r,n,i,o)||"";return a}}(u.concat((c=function(e){return d.push(e)},function(e){e.root||(e=e.return)&&c(e)}))),f=function(n,i,a,s){void 0===i&&(i=""),void 0===a&&(a=""),void 0===s&&(s="&"),e=s,t=i,r=void 0;var l=function(e){if(!on(e))return e;for(var t=e.length,r="",n=0,i=0,o=0,a=!1,s=0;s<t;s++){var l=e.charCodeAt(s);if(0!==o||a||l!==rn||e.charCodeAt(s+1)!==nn)if(a)l===nn&&e.charCodeAt(s+1)===rn&&(a=!1,s++);else if(34!==l&&39!==l||0!==s&&92===e.charCodeAt(s-1)){if(0===o)if(123===l)i++;else if(125===l){if(--i<0){for(var u=s+1;u<t;){var c=e.charCodeAt(u);if(59===c||10===c)break;u++}u<t&&59===e.charCodeAt(u)&&u++,i=0,s=u-1,n=u;continue}0===i&&(r+=e.substring(n,s+1),n=s+1)}else 59===l&&0===i&&(r+=e.substring(n,s+1),n=s+1)}else 0===o?o=l:o===l&&(o=0);else a=!0,s++}if(n<t){var d=e.substring(n);on(d)||(r+=d)}return r}(function(e){if(-1===e.indexOf("//"))return e;for(var t=e.length,r=[],n=0,i=0,o=0,a=0;i<t;){var s=e.charCodeAt(i);if(34!==s&&39!==s||0!==i&&92===e.charCodeAt(i-1))if(0===o)if(s===rn&&i+1<t&&e.charCodeAt(i+1)===nn){for(i+=2;i+1<t&&(e.charCodeAt(i)!==nn||e.charCodeAt(i+1)!==rn);)i++;i+=2}else if(40===s&&i>=3&&108==(32|e.charCodeAt(i-1))&&114==(32|e.charCodeAt(i-2))&&117==(32|e.charCodeAt(i-3)))a=1,i++;else if(a>0)41===s?a--:40===s&&a++,i++;else if(s===nn&&i+1<t&&e.charCodeAt(i+1)===rn)i>n&&r.push(e.substring(n,i)),n=i+=2;else if(s===rn&&i+1<t&&e.charCodeAt(i+1)===rn){for(i>n&&r.push(e.substring(n,i));i<t&&10!==e.charCodeAt(i);)i++;n=i}else i++;else i++;else 0===o?o=s:o===s&&(o=0),i++}return 0===n?e:(n<t&&r.push(e.substring(n)),r.join(""))}(n)),u=Et(a||i?"".concat(a," ").concat(i," { ").concat(l," }"):l);return o.namespace&&(u=an(u,o.namespace)),d=[],Lt(u,p),d};return f.hash=s.length?s.reduce(function(e,t){return t.name||Wt(15),ir(e,t.name)},5381).toString():"",f}(),un=r.createContext({shouldForwardProp:void 0,styleSheet:sn,stylis:ln});function cn(){return r.useContext(un)}un.Consumer;var dn=r.createContext(void 0);dn.Consumer;var pn={};function fn(e,t,i){var o=Er(e),a=e,s=!sr(e),l=t.attrs,u=void 0===l?Ut:l,c=t.componentId,d=void 0===c?function(e,t){var r="string"!=typeof e?"sc":Qt(e);pn[r]=(pn[r]||0)+1;var n="".concat(r,"-").concat(ar(Nt+r+pn[r]));return t?"".concat(t,"-").concat(n):n}(t.displayName,t.parentComponentId):c,p=t.displayName,f=void 0===p?function(e){return sr(e)?"styled.".concat(e):"Styled(".concat(function(e){return e.displayName||e.name||"Component"}(e),")")}(e):p,h=t.displayName&&t.componentId?"".concat(Qt(t.displayName),"-").concat(t.componentId):t.componentId||d,m=o&&a.attrs?a.attrs.concat(u).filter(Boolean):u,g=t.shouldForwardProp;if(o&&a.shouldForwardProp){var v=a.shouldForwardProp;if(t.shouldForwardProp){var y=t.shouldForwardProp;g=function(e,t){return v(e,t)&&y(e,t)}}else g=v}var b=new en(i,h,o?a.componentStyle:void 0);function x(e,t){return function(e,t,i){var o=e.attrs,a=e.componentStyle,s=e.defaultProps,l=e.foldedComponentIds,u=e.styledComponentId,c=e.target,d=r.useContext(dn),p=cn(),f=e.shouldForwardProp||p.shouldForwardProp,h=Kt(t,d,s)||Yt,m=function(e,t,r){for(var n,i=qe(qe({},t),{className:void 0,theme:r}),o=0;o<e.length;o+=1){var a=Cr(n=e[o])?n(i):n;for(var s in a)"className"===s?i.className=Ir(i.className,a[s]):"style"===s?i.style=qe(qe({},i.style),a[s]):s in t&&void 0===t[s]||(i[s]=a[s])}return"className"in t&&"string"==typeof t.className&&(i.className=Ir(i.className,t.className)),i}(o,t,h),g=m.as||c,v={};for(var y in m)void 0===m[y]||"$"===y[0]||"as"===y||"theme"===y&&m.theme===h||("forwardedAs"===y?v.as=m.forwardedAs:f&&!f(y,g)||(v[y]=m[y]));var b=function(e,t){var r=cn();return e.generateAndInjectStyles(t,r.styleSheet,r.stylis)}(a,m),x=b.className,S=Ir(l,u);return x&&(S+=" "+x),m.className&&(S+=" "+m.className),v[sr(g)&&!Xt.has(g)?"class":"className"]=S,i&&(v.ref=i),n(g,v)}(S,e,t)}x.displayName=f;var S=r.forwardRef(x);return S.attrs=m,S.componentStyle=b,S.displayName=f,S.shouldForwardProp=g,S.foldedComponentIds=o?Ir(a.foldedComponentIds,a.styledComponentId):"",S.styledComponentId=h,S.target=o?a.target:e,Object.defineProperty(S,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=o?function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=0,i=t;n<i.length;n++)Rr(e,i[n],!0);return e}({},a.defaultProps,e):e}}),Mr(S,function(){return".".concat(S.styledComponentId)}),s&&wr(S,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),S}function hn(e,t){for(var r=[e[0]],n=0,i=t.length;n<i;n+=1)r.push(t[n],e[n+1]);return r}var mn=function(e){return Object.assign(e,{isCss:!0})};function gn(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(Cr(e)||Pr(e))return mn(Jr(hn(Ut,Te([e],t,!0))));var n=e;return 0===t.length&&1===n.length&&"string"==typeof n[0]?Jr(n):mn(Jr(hn(n,t)))}function vn(e,t,r){if(void 0===r&&(r=Yt),!t)throw Wt(1,t);var n=function(n){for(var i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];return e(t,r,gn.apply(void 0,Te([n],i,!1)))};return n.attrs=function(n){return vn(e,t,qe(qe({},r),{attrs:Array.prototype.concat(r.attrs,n).filter(Boolean)}))},n.withConfig=function(n){return vn(e,t,qe(qe({},r),n))},n}var yn=function(e){return vn(fn,e)},bn=yn;Xt.forEach(function(e){bn[e]=yn(e)});var xn,Sn=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Zr(e),Vr.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,r,n){var i=n(Dr(Jr(this.rules,t,r,n)),""),o=this.componentId+e;r.insertRules(o,o,i)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,r,n){e>2&&Vr.registerId(this.componentId+e);var i=this.componentId+e;this.isStatic?r.hasNameForId(i,i)||this.createStyles(e,t,r,n):(this.removeStyles(e,r),this.createStyles(e,t,r,n))},e}();var wn=function(){function e(e,t){var r=this;this[xn]=!0,this.inject=function(e,t){void 0===t&&(t=ln);var n=r.name+t.hash;e.hasNameForId(r.id,n)||e.insertRules(r.id,n,t(r.rules,n,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,Mr(this,function(){throw Wt(12,String(r.name))})}return e.prototype.getName=function(e){return void 0===e&&(e=ln),this.name+e.hash},e}();function Cn(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=Dr(gn.apply(void 0,Te([e],t,!1))),i=ar(n);return new wn(i,n)}function En(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function In(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}xn=Yr;var Dn={exports:{}};function Pn(){}function Rn(){}Rn.resetWarningCache=Pn;Dn.exports=function(){function e(e,t,r,n,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 r={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:Rn,resetWarningCache:Pn};return r.PropTypes=r,r}();var Mn=En(Dn.exports);function Ln(e){const{injectFirst:t,children:r}=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 r}Ln.propTypes={children:Mn.node,injectFirst:Mn.bool};const An=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var i=gn.apply(void 0,Te([e],t,!1)),o="sc-global-".concat(ar(JSON.stringify(i))),a=new Sn(i,o),s=new WeakMap,l=function(e){var t=cn(),n=r.useContext(dn),i=s.get(t.styleSheet);return void 0===i&&(i=t.styleSheet.allocateGSInstance(o),s.set(t.styleSheet,i)),r.useLayoutEffect(function(){return t.styleSheet.server||function(e,t,r,n,i){if(a.isStatic)a.renderStyles(e,zt,r,i);else{var o=qe(qe({},t),{theme:Kt(t,n,l.defaultProps)});a.renderStyles(e,o,r,i)}}(i,e,t.styleSheet,n,t.stylis),function(){a.removeStyles(i,t.styleSheet)}},[i,e,t.styleSheet,n,t.stylis]),null};return r.memo(l)}(e=>{const{styles:t,defaultTheme:r={}}=e;return"function"==typeof t?t(null==(n=e.theme)||0===Object.keys(n).length?r:e.theme):t;var n});
7
+ System.register(["react","react-dom","@nebula.js/stardust","picasso-plugin-q","picasso.js"],function(e,t){"use strict";var r,n,i,o,a,s,l,u,c,d,p,f,h,m,g,v,y,b,x,S,w,C,E,I,D,P,R,M,L,A,k,O,q,T,N,_,j,F,z,W,$,H,V,B,G,U,Y;return{setters:[function(e){r=e.default,n=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){P=e.HyperCubeHandler,R=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,_=e.useImperativeHandle,j=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:CY()},data:fF(e)},ext:xz(e),component(){SY(e)}}});const K={black:"#000",white:"#fff"},X="#e57373",J="#ef5350",Z="#f44336",Q="#d32f2f",ee="#c62828",te="#f3e5f5",re="#ce93d8",ne="#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",Pe="#e65100",Re={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 r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ke.apply(null,arguments)}function Oe(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}var qe=function(){return qe=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},qe.apply(this,arguments)};function Te(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var Ne={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},_e="-ms-",je="-moz-",Fe="-webkit-",ze="comm",We="rule",$e="decl",He="@keyframes",Ve=Math.abs,Be=String.fromCharCode,Ge=Object.assign;function Ue(e){return e.trim()}function Ye(e,t){return(e=t.exec(e))?e[0]:e}function Ke(e,t,r){return e.replace(t,r)}function Xe(e,t,r){return e.indexOf(t,r)}function Je(e,t){return 0|e.charCodeAt(t)}function Ze(e,t,r){return e.slice(t,r)}function Qe(e){return e.length}function et(e){return e.length}function tt(e,t){return t.push(e),e}function rt(e,t){return e.filter(function(e){return!Ye(e,t)})}var nt=1,it=1,ot=0,at=0,st=0,lt="";function ut(e,t,r,n,i,o,a,s){return{value:e,root:t,parent:r,type:n,props:i,children:o,line:nt,column:it,length:a,return:"",siblings:s}}function ct(e,t){return Ge(ut("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function dt(e){for(;e.root;)e=ct(e.root,{children:[e]});tt(e,e.siblings)}function pt(){return st=at>0?Je(lt,--at):0,it--,10===st&&(it=1,nt--),st}function ft(){return st=at<ot?Je(lt,at++):0,it++,10===st&&(it=1,nt++),st}function ht(){return Je(lt,at)}function mt(){return at}function gt(e,t){return Ze(lt,e,t)}function vt(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 yt(e){return Ue(gt(at-1,St(91===e?e+2:40===e?e+1:e)))}function bt(e){for(;(st=ht())&&st<33;)ft();return vt(e)>2||vt(st)>3?"":" "}function xt(e,t){for(;--t&&ft()&&!(st<48||st>102||st>57&&st<65||st>70&&st<97););return gt(e,mt()+(t<6&&32==ht()&&32==ft()))}function St(e){for(;ft();)switch(st){case e:return at;case 34:case 39:34!==e&&39!==e&&St(st);break;case 40:41===e&&St(e);break;case 92:ft()}return at}function wt(e,t){for(;ft()&&e+st!==57&&(e+st!==84||47!==ht()););return"/*"+gt(t,at-1)+"*"+Be(47===e?e:ft())}function Ct(e){for(;!vt(ht());)ft();return gt(e,at)}function Et(e){return function(e){return lt="",e}(It("",null,null,null,[""],e=function(e){return nt=it=1,ot=Qe(lt=e),at=0,[]}(e),0,[0],e))}function It(e,t,r,n,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=n,C=b;g;)switch(h=y,y=ft()){case 40:if(108!=h&&58==Je(C,d-1)){-1!=Xe(C+=Ke(yt(y),"&","&\f"),"&\f",Ve(u?s[u-1]:0))&&(v=-1);break}case 34:case 39:case 91:C+=yt(y);break;case 9:case 10:case 13:case 32:C+=bt(h);break;case 92:C+=xt(mt()-1,7);continue;case 47:switch(ht()){case 42:case 47:tt(Pt(wt(ft(),mt()),t,r,l),l),5!=vt(h||1)&&5!=vt(ht()||1)||!Qe(C)||" "===Ze(C,-1,void 0)||(C+=" ");break;default:C+="/"}break;case 123*m:s[u++]=Qe(C)*v;case 125*m:case 59:case 0:switch(y){case 0:case 125:g=0;case 59+c:-1==v&&(C=Ke(C,/\f/g,"")),f>0&&(Qe(C)-d||0===m&&47===h)&&tt(f>32?Rt(C+";",n,r,d-1,l):Rt(Ke(C," ","")+";",n,r,d-2,l),l);break;case 59:C+=";";default:if(tt(w=Dt(C,t,r,u,c,i,s,b,x=[],S=[],d,o),o),123===y)if(0===c)It(C,t,w,w,x,o,d,s,S);else{switch(p){case 99:if(110===Je(C,3))break;case 108:if(97===Je(C,2))break;default:c=0;case 100:case 109:case 115:}c?It(e,w,w,n&&tt(Dt(e,w,w,0,0,i,s,b,i,x=[],d,S),S),i,S,d,s,n?x:S):It(C,w,w,w,[""],S,0,s,S)}}u=c=f=0,m=v=1,b=C="",d=a;break;case 58:d=1+Qe(C),f=h;default:if(m<1)if(123==y)--m;else if(125==y&&0==m++&&125==pt())continue;switch(C+=Be(y),y*m){case 38:v=c>0?1:(C+="\f",-1);break;case 44:s[u++]=(Qe(C)-1)*v,v=1;break;case 64:45===ht()&&(C+=yt(ft())),p=ht(),c=d=Qe(b=C+=Ct(mt())),y++;break;case 45:45===h&&2==Qe(C)&&(m=0)}}return o}function Dt(e,t,r,n,i,o,a,s,l,u,c,d){for(var p=i-1,f=0===i?o:[""],h=et(f),m=0,g=0,v=0;m<n;++m)for(var y=0,b=Ze(e,p+1,p=Ve(g=a[m])),x=e;y<h;++y)(x=Ue(g>0?f[y]+" "+b:Ke(b,/&\f/g,f[y])))&&(l[v++]=x);return ut(e,t,r,0===i?We:s,l,u,c,d)}function Pt(e,t,r,n){return ut(e,t,r,ze,Be(st),Ze(e,2,-2),0,n)}function Rt(e,t,r,n,i){return ut(e,t,r,$e,Ze(e,0,n),Ze(e,n+1,-1),n,i)}function Mt(e,t,r){switch(function(e,t){return 45^Je(e,0)?(((t<<2^Je(e,0))<<2^Je(e,1))<<2^Je(e,2))<<2^Je(e,3):0}(e,t)){case 5103:return Fe+"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 Fe+e+e;case 4855:return Fe+e.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+e;case 4789:return je+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Fe+e+je+e+_e+e+e;case 5936:switch(Je(e,t+11)){case 114:return Fe+e+_e+Ke(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Fe+e+_e+Ke(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Fe+e+_e+Ke(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return Fe+e+_e+e+e;case 6165:return Fe+e+_e+"flex-"+e+e;case 5187:return Fe+e+Ke(e,/(\w+).+(:[^]+)/,Fe+"box-$1$2"+_e+"flex-$1$2")+e;case 5443:return Fe+e+_e+"flex-item-"+Ke(e,/flex-|-self/g,"")+(Ye(e,/flex-|baseline/)?"":_e+"grid-row-"+Ke(e,/flex-|-self/g,""))+e;case 4675:return Fe+e+_e+"flex-line-pack"+Ke(e,/align-content|flex-|-self/g,"")+e;case 5548:return Fe+e+_e+Ke(e,"shrink","negative")+e;case 5292:return Fe+e+_e+Ke(e,"basis","preferred-size")+e;case 6060:return Fe+"box-"+Ke(e,"-grow","")+Fe+e+_e+Ke(e,"grow","positive")+e;case 4554:return Fe+Ke(e,/([^-])(transform)/g,"$1"+Fe+"$2")+e;case 6187:return Ke(Ke(Ke(e,/(zoom-|grab)/,Fe+"$1"),/(image-set)/,Fe+"$1"),e,"")+e;case 5495:case 3959:return Ke(e,/(image-set\([^]*)/,Fe+"$1$`$1");case 4968:return Ke(Ke(e,/(.+:)(flex-)?(.*)/,Fe+"box-pack:$3"+_e+"flex-pack:$3"),/space-between/,"justify")+Fe+e+e;case 4200:if(!Ye(e,/flex-|baseline/))return _e+"grid-column-align"+Ze(e,t)+e;break;case 2592:case 3360:return _e+Ke(e,"template-","")+e;case 4384:case 3616:return r&&r.some(function(e,r){return t=r,Ye(e.props,/grid-\w+-end/)})?~Xe(e+(r=r[t].value),"span",0)?e:_e+Ke(e,"-start","")+e+_e+"grid-row-span:"+(~Xe(r,"span",0)?Ye(r,/\d+/):+Ye(r,/\d+/)-+Ye(e,/\d+/))+";":_e+Ke(e,"-start","")+e;case 4896:case 4128:return r&&r.some(function(e){return Ye(e.props,/grid-\w+-start/)})?e:_e+Ke(Ke(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Ke(e,/(.+)-inline(.+)/,Fe+"$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(Qe(e)-1-t>6)switch(Je(e,t+1)){case 109:if(45!==Je(e,t+4))break;case 102:return Ke(e,/(.+:)(.+)-([^]+)/,"$1"+Fe+"$2-$3$1"+je+(108==Je(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Xe(e,"stretch",0)?Mt(Ke(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return Ke(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(t,r,n,i,o,a,s){return _e+r+":"+n+s+(i?_e+r+"-span:"+(o?a:+a-+n)+s:"")+e});case 4949:if(121===Je(e,t+6))return Ke(e,":",":"+Fe)+e;break;case 6444:switch(Je(e,45===Je(e,14)?18:11)){case 120:return Ke(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+Fe+(45===Je(e,14)?"inline-":"")+"box$3$1"+Fe+"$2$3$1"+_e+"$2box$3")+e;case 100:return Ke(e,":",":"+_e)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Ke(e,"scroll-","scroll-snap-")+e}return e}function Lt(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function At(e,t,r,n){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case"@namespace":case $e:return e.return=e.return||e.value;case ze:return"";case He:return e.return=e.value+"{"+Lt(e.children,n)+"}";case We:if(!Qe(e.value=e.props.join(",")))return""}return Qe(r=Lt(e.children,n))?e.return=e.value+"{"+r+"}":""}function kt(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case $e:return void(e.return=Mt(e.value,e.length,r));case He:return Lt([ct(e,{value:Ke(e.value,"@","@"+Fe)})],n);case We:if(e.length)return function(e,t){return e.map(t).join("")}(r=e.props,function(t){switch(Ye(t,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":dt(ct(e,{props:[Ke(t,/:(read-\w+)/,":-moz-$1")]})),dt(ct(e,{props:[t]})),Ge(e,{props:rt(r,n)});break;case"::placeholder":dt(ct(e,{props:[Ke(t,/:(plac\w+)/,":"+Fe+"input-$1")]})),dt(ct(e,{props:[Ke(t,/:(plac\w+)/,":-moz-$1")]})),dt(ct(e,{props:[Ke(t,/:(plac\w+)/,_e+"input-$1")]})),dt(ct(e,{props:[t]})),Ge(e,{props:rt(r,n)})}return""})}}var Ot="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",qt="active",Tt="data-styled-version",Nt="6.3.12",_t="/*!sc*/\n",jt="undefined"!=typeof window&&"undefined"!=typeof document,Ft=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY&&("false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY)),zt={};function Wt(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var $t=new Map,Ht=new Map,Vt=1,Bt=function(e){if($t.has(e))return $t.get(e);for(;Ht.has(Vt);)Vt++;var t=Vt++;return $t.set(e,t),Ht.set(t,e),t},Gt=function(e,t){Vt=t+1,$t.set(e,t),Ht.set(t,e)},Ut=Object.freeze([]),Yt=Object.freeze({});function Kt(e,t,r){return void 0===r&&(r=Yt),e.theme!==r.theme&&e.theme||t||r.theme}var Xt=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"]),Jt=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Zt=/(^-|-$)/g;function Qt(e){return e.replace(Jt,"-").replace(Zt,"")}var er=/(a)(d)/gi,tr=function(e){return String.fromCharCode(e+(e>25?39:97))};function rr(e){var t,r="";for(t=Math.abs(e);t>52;t=t/52|0)r=tr(t%52)+r;return(tr(t%52)+r).replace(er,"$1-$2")}var nr,ir=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},or=function(e){return ir(5381,e)};function ar(e){return rr(or(e)>>>0)}function sr(e){return"string"==typeof e&&!0}var lr="function"==typeof Symbol&&Symbol.for,ur=lr?Symbol.for("react.memo"):60115,cr=lr?Symbol.for("react.forward_ref"):60112,dr={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},pr={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},fr={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},hr=((nr={})[cr]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},nr[ur]=fr,nr);function mr(e){return("type"in(t=e)&&t.type.$$typeof)===ur?fr:"$$typeof"in e?hr[e.$$typeof]:dr;var t}var gr=Object.defineProperty,vr=Object.getOwnPropertyNames,yr=Object.getOwnPropertySymbols,br=Object.getOwnPropertyDescriptor,xr=Object.getPrototypeOf,Sr=Object.prototype;function wr(e,t,r){if("string"!=typeof t){if(Sr){var n=xr(t);n&&n!==Sr&&wr(e,n,r)}var i=vr(t);yr&&(i=i.concat(yr(t)));for(var o=mr(e),a=mr(t),s=0;s<i.length;++s){var l=i[s];if(!(l in pr||r&&r[l]||a&&l in a||o&&l in o)){var u=br(t,l);try{gr(e,l,u)}catch(e){}}}}return e}function Cr(e){return"function"==typeof e}function Er(e){return"object"==typeof e&&"styledComponentId"in e}function Ir(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function Dr(e,t){return e.join("")}function Pr(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function Rr(e,t,r){if(void 0===r&&(r=!1),!r&&!Pr(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var n=0;n<t.length;n++)e[n]=Rr(e[n],t[n]);else if(Pr(t))for(var n in t)e[n]=Rr(e[n],t[n]);return e}function Mr(e,t){Object.defineProperty(e,"toString",{value:t})}var Lr=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e,this._cGroup=0,this._cIndex=0}return e.prototype.indexOfGroup=function(e){if(e===this._cGroup)return this._cIndex;var t=this._cIndex;if(e>this._cGroup)for(var r=this._cGroup;r<e;r++)t+=this.groupSizes[r];else for(r=this._cGroup-1;r>=e;r--)t-=this.groupSizes[r];return this._cGroup=e,this._cIndex=t,t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var r=this.groupSizes,n=r.length,i=n;e>=i;)if((i<<=1)<0)throw Wt(16,"".concat(e));this.groupSizes=new Uint32Array(i),this.groupSizes.set(r),this.length=i;for(var o=n;o<i;o++)this.groupSizes[o]=0}for(var a=this.indexOfGroup(e+1),s=0,l=(o=0,t.length);o<l;o++)this.tag.insertRule(a,t[o])&&(this.groupSizes[e]++,a++,s++);s>0&&this._cGroup>e&&(this._cIndex+=s)},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],r=this.indexOfGroup(e),n=r+t;this.groupSizes[e]=0;for(var i=r;i<n;i++)this.tag.deleteRule(r);t>0&&this._cGroup>e&&(this._cIndex-=t)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var r=this.groupSizes[e],n=this.indexOfGroup(e),i=n+r,o=n;o<i;o++)t+=this.tag.getRule(o)+_t;return t},e}(),Ar="style[".concat(Ot,"][").concat(Tt,'="').concat(Nt,'"]'),kr=new RegExp("^".concat(Ot,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),Or=function(e){return"undefined"!=typeof ShadowRoot&&e instanceof ShadowRoot||"host"in e&&11===e.nodeType},qr=function(e){if(!e)return document;if(Or(e))return e;if("getRootNode"in e){var t=e.getRootNode();if(Or(t))return t}return document},Tr=function(e,t,r){for(var n,i=r.split(","),o=0,a=i.length;o<a;o++)(n=i[o])&&e.registerName(t,n)},Nr=function(e,t){for(var r,n=(null!==(r=t.textContent)&&void 0!==r?r:"").split(_t),i=[],o=0,a=n.length;o<a;o++){var s=n[o].trim();if(s){var l=s.match(kr);if(l){var u=0|parseInt(l[1],10),c=l[2];0!==u&&(Gt(c,u),Tr(e,c,l[3]),e.getTag().insertRules(u,i)),i.length=0}else i.push(s)}}},_r=function(e){for(var t=qr(e.options.target).querySelectorAll(Ar),r=0,n=t.length;r<n;r++){var i=t[r];i&&i.getAttribute(Ot)!==qt&&(Nr(e,i),i.parentNode&&i.parentNode.removeChild(i))}};var jr=function(e){var t=document.head,r=e||t,n=document.createElement("style"),i=function(e){var t=Array.from(e.querySelectorAll("style[".concat(Ot,"]")));return t[t.length-1]}(r),o=void 0!==i?i.nextSibling:null;n.setAttribute(Ot,qt),n.setAttribute(Tt,Nt);var a="undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null;return a&&n.setAttribute("nonce",a),r.insertBefore(n,o),n},Fr=function(){function e(e){this.element=jr(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){var t;if(e.sheet)return e.sheet;for(var r=null!==(t=e.getRootNode().styleSheets)&&void 0!==t?t:document.styleSheets,n=0,i=r.length;n<i;n++){var o=r[n];if(o.ownerNode===e)return o}throw Wt(17)}(this.element),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},e}(),zr=function(){function e(e){this.element=jr(e),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var r=document.createTextNode(t);return this.element.insertBefore(r,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),Wr=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(e===this.length?this.rules.push(t):this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),$r=jt,Hr={isServer:!jt,useCSSOMInjection:!Ft},Vr=function(){function e(e,t,r){void 0===e&&(e=Yt),void 0===t&&(t={});var n=this;this.options=qe(qe({},Hr),e),this.gs=t,this.names=new Map(r),this.server=!!e.isServer,!this.server&&jt&&$r&&($r=!1,_r(this)),Mr(this,function(){return function(e){for(var t=e.getTag(),r=t.length,n="",i=function(r){var i=function(e){return Ht.get(e)}(r);if(void 0===i)return"continue";var o=e.names.get(i);if(void 0===o||!o.size)return"continue";var a=t.getGroup(r);if(0===a.length)return"continue";var s=Ot+".g"+r+'[id="'+i+'"]',l="";o.forEach(function(e){e.length>0&&(l+=e+",")}),n+=a+s+'{content:"'+l+'"}'+_t},o=0;o<r;o++)i(o);return n}(n)})}return e.registerId=function(e){return Bt(e)},e.prototype.rehydrate=function(){!this.server&&jt&&_r(this)},e.prototype.reconstructWithOptions=function(t,r){void 0===r&&(r=!0);var n=new e(qe(qe({},this.options),t),this.gs,r&&this.names||void 0);return!this.server&&jt&&t.target!==this.options.target&&qr(this.options.target)!==qr(t.target)&&_r(n),n},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,r=e.target;return e.isServer?new Wr(r):t?new Fr(r):new zr(r)}(this.options),new Lr(e)));var e},e.prototype.hasNameForId=function(e,t){var r,n;return null!==(n=null===(r=this.names.get(e))||void 0===r?void 0:r.has(t))&&void 0!==n&&n},e.prototype.registerName=function(e,t){Bt(e);var r=this.names.get(e);r?r.add(t):this.names.set(e,new Set([t]))},e.prototype.insertRules=function(e,t,r){this.registerName(e,t),this.getTag().insertRules(Bt(e),r)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(Bt(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e}();function Br(e,t){return null==t||"boolean"==typeof t||""===t?"":"number"!=typeof t||0===t||e in Ne||e.startsWith("--")?String(t).trim():"".concat(t,"px")}var Gr=function(e){return e>="A"&&e<="Z"};function Ur(e){for(var t="",r=0;r<e.length;r++){var n=e[r];if(1===r&&"-"===n&&"-"===e[0])return e;Gr(n)?t+="-"+n.toLowerCase():t+=n}return t.startsWith("ms-")?"-"+t:t}var Yr=Symbol.for("sc-keyframes");var Kr=function(e){return null==e||!1===e||""===e},Xr=function(e){var t=[];for(var r in e){var n=e[r];e.hasOwnProperty(r)&&!Kr(n)&&(Array.isArray(n)&&n.isCss||Cr(n)?t.push("".concat(Ur(r),":"),n,";"):Pr(n)?t.push.apply(t,Te(Te(["".concat(r," {")],Xr(n),!1),["}"],!1)):t.push("".concat(Ur(r),": ").concat(Br(r,n),";")))}return t};function Jr(e,t,r,n,i){if(void 0===i&&(i=[]),"string"==typeof e)return e&&i.push(e),i;if(Kr(e))return i;if(Er(e))return i.push(".".concat(e.styledComponentId)),i;var o;if(Cr(e))return!Cr(o=e)||o.prototype&&o.prototype.isReactComponent||!t?(i.push(e),i):Jr(e(t),t,r,n,i);if(function(e){return"object"==typeof e&&null!==e&&Yr in e}(e))return r?(e.inject(r,n),i.push(e.getName(n))):i.push(e),i;if(Pr(e)){for(var a=Xr(e),s=0;s<a.length;s++)i.push(a[s]);return i}if(!Array.isArray(e))return i.push(e.toString()),i;for(s=0;s<e.length;s++)Jr(e[s],t,r,n,i);return i}function Zr(e){for(var t=0;t<e.length;t+=1){var r=e[t];if(Cr(r)&&!Er(r))return!1}return!0}var Qr=or(Nt),en=function(){function e(e,t,r){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===r||r.isStatic)&&Zr(e),this.componentId=t,this.baseHash=ir(Qr,t),this.baseStyle=r,Vr.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,r){var n=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,r).className:"";if(this.isStatic&&!r.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))n=Ir(n,this.staticRulesId);else{var i=Dr(Jr(this.rules,e,t,r)),o=rr(ir(this.baseHash,i)>>>0);if(!t.hasNameForId(this.componentId,o)){var a=r(i,".".concat(o),void 0,this.componentId);t.insertRules(this.componentId,o,a)}n=Ir(n,o),this.staticRulesId=o}else{for(var s=ir(this.baseHash,r.hash),l="",u=0;u<this.rules.length;u++){var c=this.rules[u];if("string"==typeof c)l+=c;else if(c){var d=Dr(Jr(c,e,t,r));s=ir(ir(s,String(u)),d),l+=d}}if(l){var p=rr(s>>>0);if(!t.hasNameForId(this.componentId,p)){var f=r(l,".".concat(p),void 0,this.componentId);t.insertRules(this.componentId,p,f)}n=Ir(n,p)}}return{className:n,css:"undefined"==typeof window?t.getTag().getGroup(Bt(this.componentId)):""}},e}(),tn=/&/g,rn=47,nn=42;function on(e){if(-1===e.indexOf("}"))return!1;for(var t=e.length,r=0,n=0,i=!1,o=0;o<t;o++){var a=e.charCodeAt(o);if(0!==n||i||a!==rn||e.charCodeAt(o+1)!==nn)if(i)a===nn&&e.charCodeAt(o+1)===rn&&(i=!1,o++);else if(34!==a&&39!==a||0!==o&&92===e.charCodeAt(o-1)){if(0===n)if(123===a)r++;else if(125===a&&--r<0)return!0}else 0===n?n=a:n===a&&(n=0);else i=!0,o++}return 0!==r||0!==n}function an(e,t){return e.map(function(e){return"rule"===e.type&&(e.value="".concat(t," ").concat(e.value),e.value=e.value.replaceAll(",",",".concat(t," ")),e.props=e.props.map(function(e){return"".concat(t," ").concat(e)})),Array.isArray(e.children)&&"@keyframes"!==e.type&&(e.children=an(e.children,t)),e})}var sn=new Vr,ln=function(){var e,t,r,n=Yt,i=n.options,o=void 0===i?Yt:i,a=n.plugins,s=void 0===a?Ut:a,l=function(r,n,i){return i.startsWith(t)&&i.endsWith(t)&&i.replaceAll(t,"").length>0?".".concat(e):r},u=s.slice();u.push(function(e){e.type===We&&e.value.includes("&")&&(r||(r=new RegExp("\\".concat(t,"\\b"),"g")),e.props[0]=e.props[0].replace(tn,t).replace(r,l))}),o.prefix&&u.push(kt),u.push(At);var c,d=[],p=function(e){var t=et(e);return function(r,n,i,o){for(var a="",s=0;s<t;s++)a+=e[s](r,n,i,o)||"";return a}}(u.concat((c=function(e){return d.push(e)},function(e){e.root||(e=e.return)&&c(e)}))),f=function(n,i,a,s){void 0===i&&(i=""),void 0===a&&(a=""),void 0===s&&(s="&"),e=s,t=i,r=void 0;var l=function(e){if(!on(e))return e;for(var t=e.length,r="",n=0,i=0,o=0,a=!1,s=0;s<t;s++){var l=e.charCodeAt(s);if(0!==o||a||l!==rn||e.charCodeAt(s+1)!==nn)if(a)l===nn&&e.charCodeAt(s+1)===rn&&(a=!1,s++);else if(34!==l&&39!==l||0!==s&&92===e.charCodeAt(s-1)){if(0===o)if(123===l)i++;else if(125===l){if(--i<0){for(var u=s+1;u<t;){var c=e.charCodeAt(u);if(59===c||10===c)break;u++}u<t&&59===e.charCodeAt(u)&&u++,i=0,s=u-1,n=u;continue}0===i&&(r+=e.substring(n,s+1),n=s+1)}else 59===l&&0===i&&(r+=e.substring(n,s+1),n=s+1)}else 0===o?o=l:o===l&&(o=0);else a=!0,s++}if(n<t){var d=e.substring(n);on(d)||(r+=d)}return r}(function(e){if(-1===e.indexOf("//"))return e;for(var t=e.length,r=[],n=0,i=0,o=0,a=0;i<t;){var s=e.charCodeAt(i);if(34!==s&&39!==s||0!==i&&92===e.charCodeAt(i-1))if(0===o)if(s===rn&&i+1<t&&e.charCodeAt(i+1)===nn){for(i+=2;i+1<t&&(e.charCodeAt(i)!==nn||e.charCodeAt(i+1)!==rn);)i++;i+=2}else if(40===s&&i>=3&&108==(32|e.charCodeAt(i-1))&&114==(32|e.charCodeAt(i-2))&&117==(32|e.charCodeAt(i-3)))a=1,i++;else if(a>0)41===s?a--:40===s&&a++,i++;else if(s===nn&&i+1<t&&e.charCodeAt(i+1)===rn)i>n&&r.push(e.substring(n,i)),n=i+=2;else if(s===rn&&i+1<t&&e.charCodeAt(i+1)===rn){for(i>n&&r.push(e.substring(n,i));i<t&&10!==e.charCodeAt(i);)i++;n=i}else i++;else i++;else 0===o?o=s:o===s&&(o=0),i++}return 0===n?e:(n<t&&r.push(e.substring(n)),r.join(""))}(n)),u=Et(a||i?"".concat(a," ").concat(i," { ").concat(l," }"):l);return o.namespace&&(u=an(u,o.namespace)),d=[],Lt(u,p),d};return f.hash=s.length?s.reduce(function(e,t){return t.name||Wt(15),ir(e,t.name)},5381).toString():"",f}(),un=r.createContext({shouldForwardProp:void 0,styleSheet:sn,stylis:ln});function cn(){return r.useContext(un)}un.Consumer;var dn=r.createContext(void 0);dn.Consumer;var pn={};function fn(e,t,i){var o=Er(e),a=e,s=!sr(e),l=t.attrs,u=void 0===l?Ut:l,c=t.componentId,d=void 0===c?function(e,t){var r="string"!=typeof e?"sc":Qt(e);pn[r]=(pn[r]||0)+1;var n="".concat(r,"-").concat(ar(Nt+r+pn[r]));return t?"".concat(t,"-").concat(n):n}(t.displayName,t.parentComponentId):c,p=t.displayName,f=void 0===p?function(e){return sr(e)?"styled.".concat(e):"Styled(".concat(function(e){return e.displayName||e.name||"Component"}(e),")")}(e):p,h=t.displayName&&t.componentId?"".concat(Qt(t.displayName),"-").concat(t.componentId):t.componentId||d,m=o&&a.attrs?a.attrs.concat(u).filter(Boolean):u,g=t.shouldForwardProp;if(o&&a.shouldForwardProp){var v=a.shouldForwardProp;if(t.shouldForwardProp){var y=t.shouldForwardProp;g=function(e,t){return v(e,t)&&y(e,t)}}else g=v}var b=new en(i,h,o?a.componentStyle:void 0);function x(e,t){return function(e,t,i){var o=e.attrs,a=e.componentStyle,s=e.defaultProps,l=e.foldedComponentIds,u=e.styledComponentId,c=e.target,d=r.useContext(dn),p=cn(),f=e.shouldForwardProp||p.shouldForwardProp,h=Kt(t,d,s)||Yt,m=function(e,t,r){for(var n,i=qe(qe({},t),{className:void 0,theme:r}),o=0;o<e.length;o+=1){var a=Cr(n=e[o])?n(i):n;for(var s in a)"className"===s?i.className=Ir(i.className,a[s]):"style"===s?i.style=qe(qe({},i.style),a[s]):s in t&&void 0===t[s]||(i[s]=a[s])}return"className"in t&&"string"==typeof t.className&&(i.className=Ir(i.className,t.className)),i}(o,t,h),g=m.as||c,v={};for(var y in m)void 0===m[y]||"$"===y[0]||"as"===y||"theme"===y&&m.theme===h||("forwardedAs"===y?v.as=m.forwardedAs:f&&!f(y,g)||(v[y]=m[y]));var b=function(e,t){var r=cn();return e.generateAndInjectStyles(t,r.styleSheet,r.stylis)}(a,m),x=b.className,S=Ir(l,u);return x&&(S+=" "+x),m.className&&(S+=" "+m.className),v[sr(g)&&!Xt.has(g)?"class":"className"]=S,i&&(v.ref=i),n(g,v)}(S,e,t)}x.displayName=f;var S=r.forwardRef(x);return S.attrs=m,S.componentStyle=b,S.displayName=f,S.shouldForwardProp=g,S.foldedComponentIds=o?Ir(a.foldedComponentIds,a.styledComponentId):"",S.styledComponentId=h,S.target=o?a.target:e,Object.defineProperty(S,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=o?function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=0,i=t;n<i.length;n++)Rr(e,i[n],!0);return e}({},a.defaultProps,e):e}}),Mr(S,function(){return".".concat(S.styledComponentId)}),s&&wr(S,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),S}function hn(e,t){for(var r=[e[0]],n=0,i=t.length;n<i;n+=1)r.push(t[n],e[n+1]);return r}var mn=function(e){return Object.assign(e,{isCss:!0})};function gn(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(Cr(e)||Pr(e))return mn(Jr(hn(Ut,Te([e],t,!0))));var n=e;return 0===t.length&&1===n.length&&"string"==typeof n[0]?Jr(n):mn(Jr(hn(n,t)))}function vn(e,t,r){if(void 0===r&&(r=Yt),!t)throw Wt(1,t);var n=function(n){for(var i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];return e(t,r,gn.apply(void 0,Te([n],i,!1)))};return n.attrs=function(n){return vn(e,t,qe(qe({},r),{attrs:Array.prototype.concat(r.attrs,n).filter(Boolean)}))},n.withConfig=function(n){return vn(e,t,qe(qe({},r),n))},n}var yn=function(e){return vn(fn,e)},bn=yn;Xt.forEach(function(e){bn[e]=yn(e)});var xn,Sn=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Zr(e),Vr.registerId(this.componentId+1)}return e.prototype.createStyles=function(e,t,r,n){var i=n(Dr(Jr(this.rules,t,r,n)),""),o=this.componentId+e;r.insertRules(o,o,i)},e.prototype.removeStyles=function(e,t){t.clearRules(this.componentId+e)},e.prototype.renderStyles=function(e,t,r,n){e>2&&Vr.registerId(this.componentId+e);var i=this.componentId+e;this.isStatic?r.hasNameForId(i,i)||this.createStyles(e,t,r,n):(this.removeStyles(e,r),this.createStyles(e,t,r,n))},e}();var wn=function(){function e(e,t){var r=this;this[xn]=!0,this.inject=function(e,t){void 0===t&&(t=ln);var n=r.name+t.hash;e.hasNameForId(r.id,n)||e.insertRules(r.id,n,t(r.rules,n,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,Mr(this,function(){throw Wt(12,String(r.name))})}return e.prototype.getName=function(e){return void 0===e&&(e=ln),this.name+e.hash},e}();function Cn(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=Dr(gn.apply(void 0,Te([e],t,!1))),i=ar(n);return new wn(i,n)}function En(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function In(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}xn=Yr;var Dn={exports:{}};function Pn(){}function Rn(){}Rn.resetWarningCache=Pn;Dn.exports=function(){function e(e,t,r,n,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 r={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:Rn,resetWarningCache:Pn};return r.PropTypes=r,r}();var Mn=En(Dn.exports);function Ln(e){const{injectFirst:t,children:r}=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 r}Ln.propTypes={children:Mn.node,injectFirst:Mn.bool};const An=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var i=gn.apply(void 0,Te([e],t,!1)),o="sc-global-".concat(ar(JSON.stringify(i))),a=new Sn(i,o),s=new WeakMap,l=function(e){var t=cn(),n=r.useContext(dn),i=s.get(t.styleSheet);return void 0===i&&(i=t.styleSheet.allocateGSInstance(o),s.set(t.styleSheet,i)),r.useLayoutEffect(function(){return t.styleSheet.server||function(e,t,r,n,i){if(a.isStatic)a.renderStyles(e,zt,r,i);else{var o=qe(qe({},t),{theme:Kt(t,n,l.defaultProps)});a.renderStyles(e,o,r,i)}}(i,e,t.styleSheet,n,t.stylis),function(){a.removeStyles(i,t.styleSheet)}},[i,e,t.styleSheet,n,t.stylis]),null};return r.memo(l)}(e=>{const{styles:t,defaultTheme:r={}}=e;return"function"==typeof t?t(null==(n=e.theme)||0===Object.keys(n).length?r:e.theme):t;var n});
8
8
  /**
9
9
  * @mui/styled-engine-sc v6.4.3
10
10
  *
@@ -97,6 +97,6 @@ function kn(e,t){let r;return r=t?bn(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 hS,mS,gS={},vS={};function yS(){if(hS)return vS;hS=1;var e=Va;Object.defineProperty(vS,"__esModule",{value:!0}),vS.default=void 0;var t=(0,e(cv()).default)();return vS.default=t,vS}var bS,xS,SS={},wS={};function CS(){if(xS)return SS;xS=1;var e=Va;Object.defineProperty(SS,"__esModule",{value:!0}),SS.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,n.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,n.isUnitless)(u)&&!l)throw new Error((0,r.formatMuiErrorMessage)(6));(0,n.isUnitless)(u)||(u=parseFloat(m(u,"rem"))/parseFloat(o));var d=null;l||(d=function(e){return(0,n.alignProperty)({size:e,grid:(0,n.fontGrid)({pixels:4,lineHeight:u,htmlFontSize:h.htmlFontSize})})}),h[e]=(0,t.default)({},i,(0,n.responsiveProperty)({cssProperty:"fontSize",min:s,max:a,unit:"rem",breakpoints:g,transform:d}))}}),f};var t=e(Ns()),r=Sh,n=function(){if(bS)return wS;bS=1;var e=Va;Object.defineProperty(wS,"__esModule",{value:!0}),wS.isUnitless=function(e){return String(parseFloat(e)).length===String(e).length},wS.getUnit=r,wS.toUnitless=n,wS.convertLength=function(e){return function(t,i){var o=r(t);if(o===i)return t;var a=n(t);if("px"!==o)if("em"===o)a=n(t)*n(e);else if("rem"===o)return a=n(t)*n(e),t;var s=a;if("px"!==i)if("em"===i)s=a/n(e);else{if("rem"!==i)return t;s=a/n(e)}return parseFloat(s.toFixed(5))+i}},wS.alignProperty=function(e){var t=e.size,r=e.grid,n=t-t%r,i=n+r;return t-n<i-t?n:i},wS.fontGrid=function(e){var t=e.lineHeight;return e.pixels/(t*e.htmlFontSize)},wS.responsiveProperty=function(e){var r=e.cssProperty,n=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)({},r,"".concat(n).concat(a)),p=(i-n)/l[l.length-1];return l.forEach(function(e){var i=n+p*e;null!==c&&(i=c(i)),d["@media (min-width:".concat(e,"px)")]=(0,t.default)({},r,"".concat(Math.round(1e4*i)/1e4).concat(a))}),d};var t=e(Wh());function r(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function n(e){return parseFloat(e)}return wS}();return SS}var ES,IS={};var DS,PS={};var RS,MS={};var LS,AS={};!function(e){var t=Va,n=Lf;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=Af;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=n(cv()),s=t(function(){if(dv)return pv;dv=1;var e=Va;Object.defineProperty(pv,"__esModule",{value:!0}),pv.default=function(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];return r.default.apply(void 0,[(0,t.deepmerge)({unstable_strictMode:!0},e)].concat(i))};var t=Sh,r=e(cv());return pv}()),l=t(function(){if(cS)return fv;cS=1,Object.defineProperty(fv,"__esModule",{value:!0}),fv.default=function(t){return(0,e.createStyles)(t)};var e=fS;return fv}()),u=t(function(){if(mS)return gS;mS=1;var e=Va;Object.defineProperty(gS,"__esModule",{value:!0}),gS.default=void 0;var t=e(Ns()),r=fS,n=e(yS()),i=function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,r.makeStyles)(e,(0,t.default)({defaultTheme:n.default},i))};return gS.default=i,gS}()),c=t(CS()),d=t(function(){if(ES)return IS;ES=1;var e=Va;Object.defineProperty(IS,"__esModule",{value:!0}),IS.default=void 0;var t=e(Ns()),r=fS,n=e(yS()),i=function(e){var i=(0,r.styled)(e);return function(e,r){return i(e,(0,t.default)({defaultTheme:n.default},r))}};return IS.default=i,IS}()),p=av();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(DS)return PS;DS=1;var e=Va;Object.defineProperty(PS,"__esModule",{value:!0}),PS.default=function(){return(0,t.useTheme)()||n.default};var t=fS;e(r);var n=e(yS());return PS}()),h=t(function(){if(RS)return MS;RS=1;var e=Va;Object.defineProperty(MS,"__esModule",{value:!0}),MS.default=void 0;var t=e(Ns()),r=fS,n=e(yS()),i=function(e,i){return(0,r.withStyles)(e,(0,t.default)({defaultTheme:n.default},i))};return MS.default=i,MS}()),m=t(function(){if(LS)return AS;LS=1;var e=Va;Object.defineProperty(AS,"__esModule",{value:!0}),AS.default=void 0;var t=fS,r=e(yS()),n=(0,t.withThemeCreator)({defaultTheme:r.default});return AS.default=n,AS}()),g=fS}(Df),Df.alpha(tf.GREYSCALE_0,.05),Df.alpha(tf.GREEN_PALE,.5),Df.alpha(tf.BLUE_PALE,.5),Df.alpha(tf.GREEN_PALE,.5),Df.alpha(tf.BLUE_PALE,.5),Df.alpha(tf.GREEN_PALE,.5),Df.alpha(tf.BLUE_PALE,.5),Df.alpha(tf.GREEN_PALE,.5),Df.alpha(tf.BLUE_PALE,.5),Df.alpha(tf.GREEN_PALE,.5),Df.alpha(tf.BLUE_PALE,.5);const kS=(e="light")=>Ef();function OS(e){return"init"in e}function qS(e){return!!e.write}function TS(e){return"v"in e||"e"in e}function NS(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 _S(e){return"function"==typeof(null==e?void 0:e.then)}function jS(e,t,r){if(!r.p.has(e)){r.p.add(e);const n=()=>r.p.delete(e);t.then(n,n)}}function FS(e,t,r){var n;const i=new Set;for(const t of(null==(n=r.get(e))?void 0:n.t)||[])i.add(t);for(const e of t.p)i.add(e);return i}const zS=()=>{const e={},t=new WeakMap,r=r=>{var n,i;null==(n=t.get(e))||n.forEach(e=>e(r)),null==(i=t.get(r))||i.forEach(e=>e())};return r.add=(r,n)=>{const i=r||e;let o=t.get(i);return o||(o=new Set,t.set(i,o)),o.add(n),()=>{o.delete(n),o.size||t.delete(i)}},r};function WS(e){return e.i||(e.i=zS()),e.r||(e.r=zS()),e.c||(e.c=zS()),e.m||(e.m=zS()),e.u||(e.u=zS()),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 $S=(e,t,...r)=>t.read(...r),HS=(e,t,...r)=>t.write(...r),VS=(e,t)=>{var r;return null==(r=t.INTERNAL_onInit)?void 0:r.call(t,e)},BS=(e,t,r)=>{var n;return null==(n=t.onMount)?void 0:n.call(t,r)},GS=(e,r)=>{var n;const i=uw(e),o=i[0],a=i[6],s=i[9];if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&!r)throw new Error("Atom is undefined or null");let l=o.get(r);return l||(l={d:new Map,p:new Set,n:0},o.set(r,l),null==(n=a.i)||n.call(a,r),null==s||s(e,r)),l},US=e=>{const t=uw(e),r=t[1],n=t[3],i=t[4],o=t[5],a=t[6],s=t[13],l=[],u=e=>{try{e()}catch(e){l.push(e)}};do{a.f&&u(a.f);const t=new Set,l=t.add.bind(t);n.forEach(e=>{var t;return null==(t=r.get(e))?void 0:t.l.forEach(l)}),n.clear(),o.forEach(l),o.clear(),i.forEach(l),i.clear(),t.forEach(u),n.size&&s(e)}while(n.size||o.size||i.size);if(l.length)throw new AggregateError(l)},YS=e=>{const r=uw(e),n=r[1],i=r[2],o=r[3],a=r[11],s=r[14],l=r[17],u=[],c=new WeakSet,d=new WeakSet,p=Array.from(o);for(;p.length;){const r=p[p.length-1],o=a(e,r);if(d.has(r))p.pop();else if(c.has(r)){if(i.get(r)===o.n)u.push([r,o]);else if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&i.has(r))throw new Error("[Bug] invalidated atom exists");d.add(r),p.pop()}else{c.add(r);for(const e of FS(r,o,n))c.has(e)||p.push(e)}}for(let t=u.length-1;t>=0;--t){const[r,n]=u[t];let a=!1;for(const e of n.d.keys())if(e!==r&&o.has(e)){a=!0;break}a&&(i.set(r,n.n),s(e,r),l(e,r)),i.delete(r)}},KS=new WeakSet,XS=(e,r)=>{var n,i;const o=uw(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,r),S=b[0];if(TS(x)){if(a.has(r)&&s.get(r)!==x.n||x.m===S)return x.m=S,x;let t=!1;for(const[r,n]of x.d)if(h(e,r).n!==n){t=!0;break}if(!t)return x.m=S,x}let w=!0;const C=new Set(x.d.keys()),E=new Map,I=()=>{for(const e of C)E.has(e)||x.d.delete(e)},D=()=>{if(a.has(r)){const t=!l.size;g(e,r),t&&(f(e),p(e))}},P=t=>{var n;if(t===r){const r=d(e,t);if(!TS(r)){if(!OS(t))throw new Error("no atom init");v(e,t,t.init)}return NS(r)}const i=h(e,t);try{return NS(i)}finally{E.set(t,i.n),x.d.set(t,i.n),_S(x.v)&&jS(r,x.v,i),a.has(r)&&(null==(n=a.get(t))||n.t.add(r)),w||D()}};let R,M;const L={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)||qS(r)||console.warn("setSelf function cannot be used with read-only atom"),!M&&qS(r)&&(M=(...n)=>{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,r,...n)}finally{f(e),p(e)}}),M}},A=x.n,k=s.get(r)===A;try{"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&KS.delete(e);const i=c(e,r,P,L);if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&KS.has(e)&&console.warn("Detected store mutation during atom read. This is not supported."),v(e,r,i),_S(i)){y(e,i,()=>null==R?void 0:R.abort());const t=()=>{I(),D()};i.then(t,t)}else I();return null==(n=u.r)||n.call(u,r),x.m=S,x}catch(e){return delete x.v,x.e=e,++x.n,x.m=S,x}finally{w=!1,x.n!==A&&k&&(s.set(r,x.n),l.add(r),null==(i=u.c)||i.call(u,r))}},JS=(e,t)=>{const r=uw(e),n=r[1],i=r[2],o=r[11],a=[t];for(;a.length;){const t=a.pop(),r=o(e,t);for(const s of FS(t,r,n)){const t=o(e,s);i.get(s)!==t.n&&(i.set(s,t.n),a.push(s))}}},ZS=(e,r,...n)=>{const i=uw(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=>NS(d(e,t)),b=(n,...i)=>{var s;const d=l(e,n);try{if(n===r){if(!OS(n))throw new Error("atom not writable");"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&KS.add(e);const r=d.n,l=i[0];return m(e,n,l),h(e,n),void(r!==d.n&&(++g[0],o.add(n),p(e,n),null==(s=a.c)||s.call(a,n)))}return f(e,n,...i)}finally{v||(c(e),u(e))}};try{return s(e,r,y,b,...n)}finally{v=!1}},QS=(e,t)=>{var r;const n=uw(e),i=n[1],o=n[3],a=n[6],s=n[11],l=n[15],u=n[18],c=n[19],d=s(e,t),p=i.get(t);if(p){for(const[n,i]of d.d)if(!p.d.has(n)){const c=s(e,n);u(e,n).t.add(t),p.d.add(n),i!==c.n&&(o.add(n),l(e,n),null==(r=a.c)||r.call(a,n))}for(const r of p.d)if(!d.d.has(r)){p.d.delete(r);const n=c(e,r);null==n||n.t.delete(t)}}},ew=(e,t)=>{var r;const n=uw(e),i=n[1],o=n[4],a=n[6],s=n[10],l=n[11],u=n[12],c=n[13],d=n[14],p=n[16],f=n[18],h=l(e,t);let m=i.get(t);if(!m){d(e,t);for(const r of h.d.keys()){f(e,r).t.add(t)}if(m={l:new Set,d:new Set(h.d.keys()),t:new Set},i.set(t,m),qS(t)){const r=()=>{let r=!0;const n=(...n)=>{try{return p(e,t,...n)}finally{r||(c(e),u(e))}};try{const i=s(e,t,n);i&&(m.u=()=>{r=!0;try{i()}finally{r=!1}})}finally{r=!1}};o.add(r)}null==(r=a.m)||r.call(a,t)}return m},tw=(e,t)=>{var r,n;const i=uw(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==(r=o.get(e))?void 0:r.d.has(t)){p=!0;break}if(p)return d;d.u&&a.add(d.u),d=void 0,o.delete(t);for(const r of c.d.keys()){const n=u(e,r);null==n||n.t.delete(t)}null==(n=s.u)||n.call(s,t)},rw=(e,t,r)=>{const n=uw(e),i=n[11],o=n[27],a=i(e,t),s="v"in a,l=a.v;if(_S(r))for(const n of a.d.keys())jS(t,r,i(e,n));a.v=r,delete a.e,s&&Object.is(l,a.v)||(++a.n,_S(l)&&o(e,l))},nw=(e,t)=>NS((0,uw(e)[14])(e,t)),iw=(e,t,...r)=>{const n=uw(e),i=n[3],o=n[12],a=n[13],s=n[16],l=i.size;try{return s(e,t,...r)}finally{i.size!==l&&(a(e),o(e))}},ow=(e,t,r)=>{const n=uw(e),i=n[12],o=n[18],a=n[19],s=o(e,t).l;return s.add(r),i(e),()=>{s.delete(r),a(e,t),i(e)}},aw=(e,t,r)=>{const n=uw(e)[25];let i=n.get(t);if(!i){i=new Set,n.set(t,i);const e=()=>n.delete(t);t.then(e,e)}i.add(r)},sw=(e,t)=>{const r=uw(e)[25].get(t);null==r||r.forEach(e=>e())},lw=new WeakMap,uw=e=>{const r=lw.get(e);if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&!r)throw new Error("Store must be created by buildStore to read its building blocks");return r};function cw(e){const t=uw(e),r=t[24];return r?r(t):t}function dw(...e){const t={get:e=>(0,uw(t)[21])(t,e),set:(e,...r)=>(0,uw(t)[22])(t,e,...r),sub:(e,r)=>(0,uw(t)[23])(t,e,r)},r=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},$S,HS,VS,BS,GS,US,YS,XS,JS,ZS,QS,ew,tw,rw,nw,iw,ow,void 0,new WeakMap,aw,sw,[0]].map((t,r)=>e[r]||t);return lw.set(t,Object.freeze(r)),t}let pw,fw=0;function hw(e,r){const n="atom"+ ++fw,i={toString(){return"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&this.debugLabel?n+":"+this.debugLabel:n}};return"function"==typeof e?i.read=e:(i.init=e,i.read=mw,i.write=gw),r&&(i.write=r),i}function mw(e){return e(this)}function gw(e,t,r){return t(this,"function"==typeof r?r(e(this)):r)}function vw(){return dw()}const yw=u(void 0);function bw(e){const r=h(yw);return(null==e?void 0:e.store)||r||(pw||(pw=vw(),"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=pw),globalThis.__JOTAI_DEFAULT_STORE__!==pw&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),pw)}function xw({children:e,store:t}){const r=l(null);return t?n(yw.Provider,{value:t},e):(null===r.current&&(r.current=vw()),n(yw.Provider,{value:r.current},e))}const Sw=e=>"function"==typeof(null==e?void 0:e.then),ww=e=>{e.status||(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}))},Cw=r.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(ww(e),e)}),Ew=new WeakMap,Iw=(e,t,r)=>{const n=cw(e)[26];let i=Ew.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=r();Sw(t)?(Ew.set(t,i),s=t,t.then(l(t),u(t)),n(e,t,c)):o(t)}catch(e){a(e)}};t.then(l(t),u(t)),n(e,t,c)}),Ew.set(t,i)),i};function Dw(e,t){const{delay:n,unstable_promiseStatus:i=!r.use}={},o=bw(t),[[a,s,l],u]=c(t=>{const r=o.get(e);return Object.is(t[0],r)&&t[1]===o&&t[2]===e?t:[r,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);Sw(t)&&ww(Iw(o,t,()=>o.get(e)))}catch(e){}if("number"==typeof n)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,n);u()});return u(),t},[o,e,n,i]),p(f),Sw(f)){const t=Iw(o,f,()=>o.get(e));return i&&ww(t),Cw(t)}return f}function Pw(e,r){const n=bw(r);return f((...r)=>{if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&!("write"in e))throw new Error("not writable atom");return n.set(e,...r)},[n,e])}function Rw(e,t){return[Dw(e,t),Pw(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))}},r){var n;let i,o;const a={getItem:(t,n)=>{var a,s;const l=e=>{if(i!==(e=e||"")){try{o=JSON.parse(e,null==r?void 0:r.reviver)}catch(e){return n}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,r)=>{var n;return null==(n=e())?void 0:n.setItem(t,JSON.stringify(r,void 0))},removeItem:t=>{var r;return null==(r=e())?void 0:r.removeItem(t)}};let s;try{s=null==(n=e())?void 0:n.subscribe}catch(e){}var l;!s&&"undefined"!=typeof window&&"function"==typeof window.addEventListener&&window.Storage&&(s=(t,r)=>{if(!(e()instanceof window.Storage))return()=>{};const n=n=>{n.storageArea===e()&&n.key===t&&r(n.newValue)};return window.addEventListener("storage",n),()=>{window.removeEventListener("storage",n)}}),s&&(a.subscribe=(l=s,(e,t,r)=>l(e,e=>{let n;try{n=JSON.parse(e||"")}catch(e){n=r}t(n)})))}();const Mw=(e,t,r)=>(t.has(r)?t:t.set(r,e())).get(r),Lw=new WeakMap,Aw=()=>{};const kw=new WeakMap;function Ow(e,t){const r=bw(t),n=qw(r);for(const[i,...o]of e)n.has(i)&&!(null==t?void 0:t.dangerouslyForceHydrate)||(n.add(i),r.set(i,...o))}const qw=e=>{let t=kw.get(e);return t||(t=new WeakSet,kw.set(e,t)),t};function Tw(){return Boolean("undefined"!=typeof process&&process.env?.NODE_ENV&&!1)}function Nw(e){const t=hw(()=>[]),r=hw(function(e){const[n,i,o]=e(t);o.has(r)&&(n.forEach(e),++i.n)});return r.effect=e,r.INTERNAL_onInit=e=>{const n=new Set;let i,o=0,a=!1,s=!1,l=!1;function u(){if(o)return;n.clear();let t=!0;const c=i=>{if(l)return e.get(i);if(i===r){const t=h(e,i);if(!TS(t)){if(!OS(i))throw new Error("no atom init");S(e,i,i.init)}return NS(t)}const o=v(e,i);try{return NS(o)}finally{C.d.set(i,o.n),d.get(i)?.t.add(r),t?n.add(i):d.has(i)&&(x(e,r),g(e),m(e))}};c.peek=e.get;const w=(n,...i)=>{const a=h(e,n);try{if(++o,n===r){if(!OS(n))throw new Error("atom not writable");const t=a.n,r=i[0];return S(e,n,r),x(e,n),void(t!==a.n&&(p.add(n),f.c?.(n),y(e,n)))}return b(e,n,...i)}finally{t||(g(e),m(e)),--o}};w.recurse=(t,...n)=>{if(l){if(Tw())throw new Error("set.recurse is not allowed in cleanup")}else try{return a=!0,x(e,r),w(t,...n)}finally{g(e),a=!1,s&&(s=!1,u())}};try{i?.();const e=r.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,n.forEach(t=>{C.d.set(t,h(e,t).n)}),x(e,r),g(e)}}const c=cw(e),d=c[1],p=c[3],f=WS(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 r=_w.get(e);r||(r=new Set,_w.set(e,r),t.f.add(function(){for(const e of r)r.delete(e),e()}));return r}(e,f),C=h(e,r);C.v=void 0,Object.assign(e.get(t),[n,C,d]),f.c.add(r,function(){p.delete(r)}),f.m.add(r,function(){w.add(u),i&&w.delete(i)}),f.u.add(r,function(){w.delete(u),i&&w.add(i)}),f.c.add(r,function(){a?s=!0:w.add(u)})},Tw()&&(Object.defineProperty(t,"debugLabel",{get:()=>r.debugLabel?`${r.debugLabel}:ref`:void 0,configurable:!0,enumerable:!0}),t.debugPrivate=!0),r}const _w=new WeakMap;const jw=async(e,t,r)=>{const n=e.get(r);void 0!==n&&("dimension"===n.type?await t.moveDimensionToAlternative(n.def.qDef.cId):await t.moveMeasureToAlternative(n.def.qDef.cId))},Fw=async(e,t,r)=>{const n=e.get(r);void 0!==n&&("dimension"===n.type?await t.moveDimensionFromAlternative(n.def.qDef.cId):await t.moveMeasureFromAlternative(n.def.qDef.cId))},zw=async e=>{const{type:t,handler:r,model:n,fieldInfo:i,handlerQueue:o}=e;void 0!==r&&void 0!==n&&o&&o.add(async()=>{switch(t){case"apply":for(const t of e.localChecked)await Fw(i,r,t);for(const t of e.localUnchecked)await jw(i,r,t);break;case"checked":await Fw(i,r,e.cId);break;case"unchecked":await jw(i,r,e.cId)}})},Ww=hw(),$w=hw(),Hw=hw(),Vw=hw(e=>e(Hw)?.translate??(e=>e)),Bw=hw(""),Gw=hw(e=>{const t=e(Bw).toLowerCase().trim();return({title:e})=>e.toLowerCase().trim().includes(t)}),Uw=e=>7005!==e.qError?.qErrorCode,Yw=new WeakMap,Kw={qInfo:{qType:"AlternativeLayout"},qHyperCubeDef:{qMode:"S",qDimensions:[],qMeasures:[],qInitialDataFetch:[{qTop:0,qLeft:0,qHeight:0,qWidth:0}],excludedNoOfLeftDims:-1,qCalcCond:{qv:"0"}}},Xw=function(e,r=Aw){return((e,t,r)=>{const n=Mw(()=>new WeakMap,Lw,t);return Mw(e,n,r)})(()=>{const n=new WeakMap,i=new WeakMap,o=hw(0),a=hw([]);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=hw(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[r]=t(a);r()},e=>{n.set(u,e);const[r]=t(a);r()}),n.has(u))throw n.get(u);return i.has(u)?{p:u,v:i.get(u)}:l&&"v"in l?{p:u,f:r(l.v),v:l.v}:{p:u,f:r()}});return s.init=void 0,"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&(s.debugPrivate=!0),hw(e=>{const t=e(s);return"f"in t?t.f:t.v},(t,r,...n)=>r(e,...n))},e,r)}(hw(async e=>{const t=e(Ww);if(t){if(Yw.has(t))return Yw.get(t);try{const e=await t.app.createSessionObject(Kw);return Yw.set(t,e),e}catch(e){return void console.error("Error creating alternative layout model:",e)}}})),Jw=hw(null),Zw=hw(),Qw=Nw((e,t)=>{const r=e(Ww),n=e(Xw);if(!r||!n)return;const i=async()=>{const e=await r.getLayout();if(e.qSelectionInfo?.qInSelections)return;const i=await r.getEffectiveProperties();await n.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 n.getLayout();t(Zw,{layout:structuredClone(e),properties:structuredClone(i),altLayout:structuredClone(o)}),t(Jw,null)};return i(),r.Invalidated?.bind(i),()=>{r.Invalidated?.unbind(i)}}),eC=hw(e=>e(Zw)?.layout),tC=hw(e=>e(Zw)?.altLayout),rC=hw(e=>e(Zw)?.properties),nC=hw(e=>{const t=e(Zw)?.layout;return t?.qHyperCube.qDimensionInfo.filter(Uw)??[]}),iC=hw(e=>{const t=e(Zw)?.layout;return t?.qHyperCube.qMeasureInfo.filter(Uw)??[]}),oC=hw(e=>{const t=e(eC),r=e(nC),n=e(iC),i=e(rC),o=new Map;return t&&i?(r.forEach((e,t)=>{o.set(e.cId,{id:e.cId,type:"dimension",def:i.qHyperCubeDef.qDimensions[t]})}),n.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 aC{#e=[];#t=!1;#r=!1;#n;#i;#o;#a;constructor({onQueueCompleted:e}){this.#n=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.#r=!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.#r=!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.#r||await(this.#n?.())}catch(e){console.error("[SequentialPromiseQueue] Error executing onQueueCompleted:",e)}finally{this.#t=!1,this.#e.length>0&&this.#l()}}}}const sC=hw(null),lC=Nw((e,t)=>{const r=e(Ww),n=e($w),i=new aC({onQueueCompleted:async()=>{r&&n&&await r.applyPatches([{qPath:"/qHyperCubeDef",qOp:"replace",qValue:JSON.stringify(n.properties.qHyperCubeDef)}],!0)}});t(sC,i);const o=()=>{i.pause()},a=()=>{i.continue(500)},s=()=>{i.abort()};return r?.Invalidated?.bind(o),r?.Validated?.bind(a),r?.Cancelled?.bind(s),r?.Closing?.bind(s),()=>{i.abort(),r?.Invalidated?.unbind(o),r?.Validated?.unbind(a),r?.Cancelled?.unbind(s),r?.Closing?.unbind(s)}}),uC=hw(e=>{const t=[...e(nC),...e(iC)].map(e=>e.cId);return new Set(t)}),cC=hw(new Set),dC=hw(new Set),pC=hw(e=>{const t=e(cC),r=e(dC);return e(uC).difference(r).union(t)}),fC=Nw((e,t)=>{e(uC),t(cC,new Set),t(dC,new Set)}),hC=hw(e=>e(pC),(e,t,r)=>{const n=e(pC).has(r),i=new Set(e(dC)),o=new Set(e(cC));n?(i.add(r),o.delete(r)):(o.add(r),i.delete(r)),t(dC,i),t(cC,o),zw({type:n?"unchecked":"checked",cId:r,handler:e($w),model:e(Ww),fieldInfo:e(oC),handlerQueue:e(sC)})}),mC=({props:e,children:t})=>(Ow([[Ww,e.args.model],[Hw,e.args.apis],[$w,e.args.handler]]),Dw(fC),Dw(Qw),Dw(lC),t);function gC(e,t){const r=new Set(e),n=new Set(t);return e===t||r.size===n.size&&Array.from(r).every(n.has.bind(n))}function vC(e){return"write"in e}const yC=new WeakMap,bC={},{read:xC,write:SC}=hw(null);function wC(e,t,r){const[n,i,o,,a]=e,s=n.get(t);if(s)return s;if(r===e){let n=i.get(t);return n||(n=[DC(e,t,r),r],i.set(t,n)),n}const l=r??bC;let u=o.get(l);u||(u=new WeakMap,o.set(l,u));let c=u.get(t);if(!c){const[n,i]=a?wC(a,t,r):[t];c=[t.read===xC?n:DC(e,t,i),i],u.set(t,c)}return c}function CC(e){for(const t of e[5])t()}function EC(e,t,r,n,i){if(r.read===xC&&vC(r)&&vC(t)&&r.write!==SC&&e!==n){const{write:o}=r;return t.write=IC(e,r.write.bind(r),n,i),()=>{t.write=o}}}function IC(e,t,r,n=r){return function(i,o,...a){return t(function(t){const[n]=wC(e,t,r);return i(n)},function(t,...i){const[a]=wC(e,t,r),s=EC(e,a,t,r,n);try{return o(a,...i)}finally{null==s||s()}},...a)}}function DC(e,t,r){const n=Object.getOwnPropertyDescriptors(t);Object.keys(n).filter(e=>["read","write","debugLabel"].includes(e)).forEach(e=>n[e].configurable=!0);const i=Object.getPrototypeOf(t),o=Object.create(i,n);return o.read!==xC&&(o.read=function(e,t,r){return function(n,i){return t(function(t){const[i]=wC(e,t,r);return n(i)},i)}}(e,t.read.bind(t),r)),vC(o)&&vC(t)&&o.write!==SC&&(o.write=IC(e,t.write.bind(t),r)),o}function PC({atoms:e=[],atomFamilies:t=[],parentStore:r,name:n}){const i=new WeakSet(e),o=yC.get(r),a=(null==o?void 0:o[3])??r,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],r=[...cw(t)],n=r[21],i=r[22],o=r[23],a=r[9],s={};r[9]=(e,t)=>a(l,t),r[21]=h(n),r[22]=p,r[23]=h(o),r[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=dw(...r);return l;function u(t){const r=new WeakMap;return function(n){let i=r.get(n);if(i)return i;const o=t(n);return o?(i={...o,d:m(o.d,function(t){return r=>t(wC(e,r)[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}},r.set(n,i),i):void 0}}function c(e){const t=new WeakMap;return function(r){let n=t.get(r);if(n)return n;const i=e(r);return i?(n={...i,d:g(i.d),t:g(i.t),get u(){return i.u},set u(e){i.u=e}},t.set(r,n),n):void 0}}function d(e,t){return function(r,n){return e.get(n)||(e.set(n,t(r,n)),e.get(n))}}function p(t,r,...n){const[o,a]=wC(e,r),s=EC(e,o,r,a,e);try{return i(t,o,...n)}finally{null==s||s()}}function f(t,r){return function(n,...i){const[o]=wC(e,n);return(r?r(t):t)(o,...i)}}function h(t,r){return function(n,i,...o){const[a]=wC(e,i);return(r?r(t):t)(n,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 r of t)yield wC(e,r)[0]}}}function v(t){if(!t)return;const r=f(t);return r.add=function(r,n){if(void 0===r)return t.add(void 0,n);const[i]=wC(e,r);return t.add(i,n)},r}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(r){delete s[t],e[t]=r},configurable:!0,enumerable:!0}]))),Object.assign(t,e)}}(s);s[6]=c,Object.assign(c,{name:n}),yC.set(c,s);for(const t of new Set(e))l.set(t,[DC(s,t,s),s]);for(const e of new Set(t)){for(const t of e.getParams()){const r=e(t);l.has(r)||l.set(r,[DC(s,r,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,[DC(s,t,s),s])});u.add(t)}return c}const RC=function(e,t){return function(r){const{atoms:i=[],atomFamilies:o=[],children:a,scope:s,name:l}=r,u=t(),c=Array.from(i,e=>Array.isArray(e)?e[0]:e);function p(){return[s??PC({atoms:c,atomFamilies:o,parentStore:u,name:l}),function(e){return u!==e.parentStore||!gC(c,e.atoms)||!gC(o,e.atomFamilies)||s!==e.providedScope}]}const[[f,h],g]=m(p);if(h({atoms:c,atomFamilies:o,parentStore:u,providedScope:s})){const e=yC.get(f);e&&CC(e),g(p)}return Ow(Array.from(i).filter(Array.isArray),{store:f}),d(()=>{const e=yC.get(f);return()=>{e&&CC(e)}},[f]),n(e,{store:f,children:a})}}(xw,bw);var MC=Object.defineProperty,LC=Object.defineProperties,AC=Object.getOwnPropertyDescriptors,kC=Object.getOwnPropertySymbols,OC=Object.prototype.hasOwnProperty,qC=Object.prototype.propertyIsEnumerable,TC=(e,t,r)=>t in e?MC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,NC=(e,t)=>{for(var r in t||(t={}))OC.call(t,r)&&TC(e,r,t[r]);if(kC)for(var r of kC(t))qC.call(t,r)&&TC(e,r,t[r]);return e},_C=(e,t)=>LC(e,AC(t));function jC(e,t,r){if(t===r)return e;const n=e.slice();return n.splice(r,0,n.splice(t,1)[0]),n}function FC(e){return"initialIndex"in e&&"number"==typeof e.initialIndex&&"index"in e&&"number"==typeof e.index}function zC(e,t){return function(e,t,r){var n,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 n=e.findIndex(e=>u(e,a.id)),i=e.findIndex(e=>u(e,s.id));if(-1===n||-1===i){if(FC(a)){const n=a.initialIndex,i=a.index;return n===i||n<0||n>=e.length?("preventDefault"in t&&t.preventDefault(),e):r(e,n,i)}return e}if(!l&&"index"in a&&"number"==typeof a.index){const t=a.index;if(t!==n)return r(e,n,t)}return r(e,n,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&&FC(a)){const n=a.initialGroup,i=a.initialIndex,o=a.group,s=a.index;if(null==n||null==o||!(n in e)||!(o in e))return"preventDefault"in t&&t.preventDefault(),e;if(n===o&&i===s)return"preventDefault"in t&&t.preventDefault(),e;if(n===o)return _C(NC({},e),{[n]:r(e[n],i,s)});const l=e[n][i];return _C(NC({},e),{[n]:[...e[n].slice(0,i),...e[n].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==(n=m.shape)?void 0:n.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&&FC(a)){const t=null!=a.group&&a.group!==d,n=a.index!==f;if(t||n){const t=null!=(o=a.group)?o:d;if(t in e){if(d===t)return _C(NC({},e),{[d]:r(e[d],f,a.index)});const n=e[d][f];return _C(NC({},e),{[d]:[...e[d].slice(0,f),...e[d].slice(f+1)],[t]:[...e[t].slice(0,a.index),n,...e[t].slice(a.index)]})}}}return"preventDefault"in t&&t.preventDefault(),e}if(d===p)return _C(NC({},e),{[d]:r(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 _C(NC({},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,jC)}function WC(e,t){let r=null;const n=new Map,i=new Set;function o(i){let s;if(void 0===t)s=n.get(i);else for(const[e,r]of n)if(t(e,i)){s=r;break}if(void 0!==s){if(!r?.(s[1],i))return s[0];o.remove(i)}const l=e(i);return n.set(i,[l,Date.now()]),a("CREATE",i,l),l}function a(e,t,r){for(const n of i)n({type:e,param:t,atom:r})}return o.unstable_listen=e=>(i.add(e),()=>{i.delete(e)}),o.getParams=()=>n.keys(),o.remove=e=>{if(void 0===t){if(!n.has(e))return;const[t]=n.get(e);n.delete(e),a("REMOVE",e,t)}else for(const[r,[i]]of n)if(t(r,e)){n.delete(r),a("REMOVE",r,i);break}},o.setShouldRemove=e=>{if(r=e,r)for(const[e,[t,i]]of n)r(i,e)&&(n.delete(e),a("REMOVE",e,t))},o}const $C=({itemIndex:e,sectionIndex:t})=>void 0!==e?`${t}-${e}`:`${t}`,HC=hw(),VC=hw(e=>e(HC)?.numberOfSections??0),BC=hw(e=>e(HC)?.numberOfItemsInSection??[]),GC=hw(e=>e(HC)?.keyExtractor??$C),UC=hw(e=>e(HC)?.emptyTexts??(()=>({title:"No items",message:"There are no items to display."}))),YC=hw(e=>e(HC)?.onDragEnd),KC=hw(e=>e(HC)?.onDragOver),XC=hw(e=>e(HC)?.itemRenderer),JC=hw(e=>e(HC)?.headerRenderer),ZC=hw(e=>e(HC)?.dragOverlayRenderer),QC=hw(e=>e(HC)?.onClick),eE=hw(e=>{const t=e(VC),r=e(BC),n=e(GC),i={};for(let e=0;e<t;e++)i[e]=Array.from({length:r[e]},(t,r)=>n({sectionIndex:e,itemIndex:r}));return i}),tE=hw(null),rE=hw(e=>e(tE),(e,t,r)=>{if(null===r)return void t(tE,null);const n=e(tE);t(tE,{...n,...r})}),nE=WC(e=>hw(null,(t,r,n)=>{let i;"over"===e?i=t(KC):"end"===e&&(i=t(YC),r(rE,null));const{source:o,target:a}=n.operation;if(null===a)return void r(rE,{toIndex:void 0,toSectionIndex:void 0});const s=zC(t(eE),n)[a.data.sectionIndex].indexOf(o.id),l=-1!==s?s:a.sortable?.index??0;"start"===e?r(rE,{id:o.id,startSection:o.data.sectionKey,startIndex:o.data.itemIndex,startSectionIndex:o.data.sectionIndex}):"over"===e&&r(rE,{toIndex:l,toSectionIndex:a.data.sectionIndex}),i?.({id:o.id,toIndex:l,toSection:a.data.sectionKey,fromSection:o.data.sectionKey,startSection:t(rE)?.startSection??o.data.sectionKey,event:n})})),iE=[HC,VC,BC,GC,UC,YC,XC,JC,QC,rE],oE=[nE],aE=({props:e,children:t})=>{const r=Pw(HC);return g(()=>{r(e)},[e,r]),t};var sE=Symbol.for("preact-signals");function lE(){if(fE>1)fE--;else{var e,t=!1;for(!function(){var e=vE;for(vE=void 0;void 0!==e;)e.S.v===e.v&&(e.S.i=e.i),e=e.o}();void 0!==pE;){var r=pE;for(pE=void 0,hE++;void 0!==r;){var n=r.u;if(r.u=void 0,r.f&=-3,!(8&r.f)&&wE(r))try{r.c()}catch(r){t||(e=r,t=!0)}r=n}}if(hE=0,fE--,t)throw e}}function uE(e){if(fE>0)return e();gE=++mE,fE++;try{return e()}finally{lE()}}var cE=void 0;function dE(e){var t=cE;cE=void 0;try{return e()}finally{cE=t}}var pE=void 0,fE=0,hE=0,mE=0,gE=0,vE=void 0,yE=0;function bE(e){if(void 0!==cE){var t=e.n;if(void 0===t||t.t!==cE)return t={i:0,S:e,p:cE.s,n:void 0,t:cE,e:void 0,x:void 0,r:t},void 0!==cE.s&&(cE.s.n=t),cE.s=t,e.n=t,32&cE.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=cE.s,t.n=void 0,cE.s.n=t,cE.s=t),t}}function xE(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 SE(e,t){return new xE(e,t)}function wE(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 CE(e){for(var t=e.s;void 0!==t;t=t.n){var r=t.S.n;if(void 0!==r&&(t.r=r),t.S.n=t,t.i=-1,void 0===t.n){e.s=t;break}}}function EE(e){for(var t=e.s,r=void 0;void 0!==t;){var n=t.p;-1===t.i?(t.S.U(t),void 0!==n&&(n.n=t.n),void 0!==t.n&&(t.n.p=n)):r=t,t.S.n=t.r,void 0!==t.r&&(t.r=void 0),t=n}e.s=r}function IE(e,t){xE.call(this,void 0),this.x=e,this.s=void 0,this.g=yE-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 DE(e,t){return new IE(e,t)}function PE(e){var t=e.m;if(e.m=void 0,"function"==typeof t){fE++;var r=cE;cE=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,RE(e),t}finally{cE=r,lE()}}}function RE(e){for(var t=e.s;void 0!==t;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,PE(e)}function ME(e){if(cE!==this)throw new Error("Out-of-order effect");EE(this),cE=e,this.f&=-2,8&this.f&&RE(this),lE()}function LE(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 AE(e,t){var r=new LE(e,t);try{r.c()}catch(e){throw r.d(),e}var n=r.d.bind(r);return n[Symbol.dispose]=n,n}xE.prototype.brand=sE,xE.prototype.h=function(){return!0},xE.prototype.S=function(e){var t=this,r=this.t;r!==e&&void 0===e.e&&(e.x=r,this.t=e,void 0!==r?r.e=e:dE(function(){var e;null==(e=t.W)||e.call(t)}))},xE.prototype.U=function(e){var t=this;if(void 0!==this.t){var r=e.e,n=e.x;void 0!==r&&(r.x=n,e.e=void 0),void 0!==n&&(n.e=r,e.x=void 0),e===this.t&&(this.t=n,void 0===n&&dE(function(){var e;null==(e=t.Z)||e.call(t)}))}},xE.prototype.subscribe=function(e){var t=this;return AE(function(){var r=t.value,n=cE;cE=void 0;try{e(r)}finally{cE=n}},{name:"sub"})},xE.prototype.valueOf=function(){return this.value},xE.prototype.toString=function(){return this.value+""},xE.prototype.toJSON=function(){return this.value},xE.prototype.peek=function(){var e=cE;cE=void 0;try{return this.value}finally{cE=e}},Object.defineProperty(xE.prototype,"value",{get:function(){var e=bE(this);return void 0!==e&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(hE>100)throw new Error("Cycle detected");!function(e){0!==fE&&0===hE&&e.l!==gE&&(e.l=gE,vE={S:e,v:e.v,i:e.i,o:vE})}(this),this.v=e,this.i++,yE++,fE++;try{for(var t=this.t;void 0!==t;t=t.x)t.t.N()}finally{lE()}}}}),IE.prototype=new xE,IE.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===yE)return!0;if(this.g=yE,this.f|=1,this.i>0&&!wE(this))return this.f&=-2,!0;var e=cE;try{CE(this),cE=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 cE=e,EE(this),this.f&=-2,!0},IE.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)}xE.prototype.S.call(this,e)},IE.prototype.U=function(e){if(void 0!==this.t&&(xE.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)}},IE.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(IE.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=bE(this);if(this.h(),void 0!==e&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),LE.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()}},LE.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,PE(this),CE(this),fE++;var e=cE;return cE=this,ME.bind(this,e)},LE.prototype.N=function(){2&this.f||(this.f|=2,this.u=pE,pE=this)},LE.prototype.d=function(){this.f|=8,1&this.f||RE(this)},LE.prototype.dispose=function(){this.d()};var kE,OE,qE,TE,NE,_E,jE,FE,zE,WE,$E,HE,VE,BE,GE,UE,YE,KE,XE,JE,ZE=Object.create,QE=Object.defineProperty,eI=Object.defineProperties,tI=Object.getOwnPropertyDescriptor,rI=Object.getOwnPropertyDescriptors,nI=Object.getOwnPropertySymbols,iI=Object.prototype.hasOwnProperty,oI=Object.prototype.propertyIsEnumerable,aI=e=>{throw TypeError(e)},sI=(e,t,r)=>t in e?QE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,lI=(e,t)=>QE(e,"name",{value:t,configurable:!0}),uI=["class","method","getter","setter","accessor","field","value","get","set"],cI=e=>void 0!==e&&"function"!=typeof e?aI("Function expected"):e,dI=(e,t,r,n,i)=>({kind:uI[e],name:t,metadata:n,addInitializer:e=>r._?aI("Already initialized"):i.push(cI(e||null))}),pI=(e,t)=>{return sI(t,(r="metadata",(n=Symbol[r])?n:Symbol.for("Symbol."+r)),e[3]);var r,n},fI=(e,t,r,n)=>{for(var i=0,o=e[t>>1],a=o&&o.length;i<a;i++)1&t?o[i].call(r):n=o[i].call(r,n);return n},hI=(e,t,r,n,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=uI[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)&&tI(d<4?i:{get[r](){return vI(this,o)},set[r](e){return bI(this,o,e)}},r));d?f&&d<4&&lI(o,(d>2?"set ":d>1?"get ":"")+r):lI(i,r);for(var b=n.length-1;b>=0;b--)u=dI(d,r,l={},e[3],v),d&&(u.static=p,u.private=f,c=u.access={has:f?e=>gI(i,e):e=>r in e},3^d&&(c.get=f?e=>(1^d?vI:xI)(e,i,4^d?o:y.get):e=>e[r]),d>2&&(c.set=f?(e,t)=>bI(e,i,t,4^d?o:y.set):(e,t)=>e[r]=t)),s=(0,n[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?cI(s)&&(d>4?g.unshift(s):d?f?o=s:y[m]=s:i=s):"object"!=typeof s||null===s?aI("Object expected"):(cI(a=s.get)&&(y.get=a),cI(a=s.set)&&(y.set=a),cI(a=s.init)&&g.unshift(a));return d||pI(e,i),y&&QE(i,r,y),f?4^d?o:y:i},mI=(e,t,r)=>t.has(e)||aI("Cannot "+r),gI=(e,t)=>Object(t)!==t?aI('Cannot use the "in" operator on this value'):e.has(t),vI=(e,t,r)=>(mI(e,t,"read from private field"),r?r.call(e):t.get(e)),yI=(e,t,r)=>t.has(e)?aI("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),bI=(e,t,r,n)=>(mI(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),xI=(e,t,r)=>(mI(e,t,"access private method"),r);function SI(e,t){if(t){let r;return DE(()=>{const n=e();return n&&r&&t(r,n)?r:(r=n,n)})}return DE(e)}function wI(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 r of e)if(!t.has(r))return!1;return!0}if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;return!e.some((e,r)=>!wI(e,t[r]))}if("object"==typeof e&&"object"==typeof t){const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;const i=r.some(r=>!wI(e[r],t[r]));return!i}return!1}function CI({get:e},t){return{init:e=>SE(e),get(){return e.call(this).value},set(t){const r=e.call(this);r.peek()!==t&&(r.value=t)}}}function EI(e,t){const r=new WeakMap;return function(){let t=r.get(this);return t||(t=SI(e.bind(this)),r.set(this,t)),t.value}}function II(e=!0){return function(t,r){r.addInitializer(function(){const t="field"===r.kind||r.static?this:Object.getPrototypeOf(this),n=Object.getOwnPropertyDescriptor(t,r.name);n&&Object.defineProperty(t,r.name,((e,t)=>eI(e,rI(t)))(((e,t)=>{for(var r in t||(t={}))iI.call(t,r)&&sI(e,r,t[r]);if(nI)for(var r of nI(t))oI.call(t,r)&&sI(e,r,t[r]);return e})({},n),{enumerable:e}))})}}function DI(...e){const t=e.map(e=>AE(e));return()=>t.forEach(e=>e())}_E=[CI],NE=[CI],TE=[CI],qE=[II()],OE=[II()],kE=[II()];var PI,RI=class{constructor(e,t=Object.is){this.defaultValue=e,this.equals=t,fI(jE,5,this),yI(this,HE),yI(this,FE,fI(jE,8,this)),fI(jE,11,this),yI(this,VE,fI(jE,12,this)),fI(jE,15,this),yI(this,YE,fI(jE,16,this)),fI(jE,19,this),this.reset=this.reset.bind(this),this.reset()}get current(){return vI(this,HE,XE)}get initial(){return vI(this,HE,WE)}get previous(){return vI(this,HE,GE)}set current(e){const t=dE(()=>vI(this,HE,XE));e&&t&&this.equals(t,e)||uE(()=>{vI(this,HE,WE)||bI(this,HE,e,$E),bI(this,HE,t,UE),bI(this,HE,e,JE)})}reset(e=this.defaultValue){uE(()=>{bI(this,HE,void 0,UE),bI(this,HE,e,$E),bI(this,HE,e,JE)})}};function MI(e){return dE(()=>{const t={};for(const r in e)t[r]=e[r];return t})}jE=[,,,ZE(null)],FE=new WeakMap,HE=new WeakSet,VE=new WeakMap,YE=new WeakMap,zE=hI(jE,20,"#initial",_E,HE,FE),WE=zE.get,$E=zE.set,BE=hI(jE,20,"#previous",NE,HE,VE),GE=BE.get,UE=BE.set,KE=hI(jE,20,"#current",TE,HE,YE),XE=KE.get,JE=KE.set,hI(jE,2,"current",qE,RI),hI(jE,2,"initial",OE,RI),hI(jE,2,"previous",kE,RI),pI(jE,RI);PI=new WeakMap;var LI,AI,kI,OI,qI,TI=Object.create,NI=Object.defineProperty,_I=Object.getOwnPropertyDescriptor,jI=Object.getOwnPropertySymbols,FI=Object.prototype.hasOwnProperty,zI=Object.prototype.propertyIsEnumerable,WI=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),$I=e=>{throw TypeError(e)},HI=Math.pow,VI=(e,t,r)=>t in e?NI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,BI=["class","method","getter","setter","accessor","field","value","get","set"],GI=e=>void 0!==e&&"function"!=typeof e?$I("Function expected"):e,UI=(e,t,r,n,i)=>({kind:BI[e],name:t,metadata:n,addInitializer:e=>r._?$I("Already initialized"):i.push(GI(e||null))}),YI=(e,t,r,n,i,o)=>{for(var a,s,l,u,c=7&t,d=BI[c+5],p=e[2]||(e[2]=[]),f=(i=i.prototype,_I(i,r)),h=n.length-1;h>=0;h--)(l=UI(c,r,s={},e[3],p)).static=false,l.private=false,u=l.access={has:e=>r in e},u.get=e=>e[r],a=(0,n[h])(f[d],l),s._=1,GI(a)&&(f[d]=a);return f&&NI(i,r,f),i},KI=(e,t,r)=>t.has(e)||$I("Cannot "+r),XI=class e{constructor(e,t){this.x=e,this.y=t}static delta(t,r){return new e(t.x-r.x,t.y-r.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:r}){return new e(t,r)}},JI=class e{constructor(e,t,r,n){this.left=e,this.top=t,this.width=r,this.height=n,this.scale={x:1,y:1}}get inverseScale(){return{x:1/this.scale.x,y:1/this.scale.y}}translate(t,r){const{top:n,left:i,width:o,height:a,scale:s}=this,l=new e(i+t,n+r,o,a);return l.scale=((e,t)=>{for(var r in t||(t={}))FI.call(t,r)&&VI(e,r,t[r]);if(jI)for(var r of jI(t))zI.call(t,r)&&VI(e,r,t[r]);return e})({},s),l}get boundingRectangle(){const{width:e,height:t,left:r,top:n,right:i,bottom:o}=this;return{width:e,height:t,left:r,top:n,right:i,bottom:o}}get center(){const{left:e,top:t,right:r,bottom:n}=this;return new XI((e+r)/2,(t+n)/2)}get area(){const{width:e,height:t}=this;return e*t}equals(t){if(!(t instanceof e))return!1;const{left:r,top:n,width:i,height:o}=this;return r===t.left&&n===t.top&&i===t.width&&o===t.height}containsPoint(e){const{top:t,left:r,bottom:n,right:i}=this;return t<=e.y&&e.y<=n&&r<=e.x&&e.x<=i}intersectionArea(t){return t instanceof e?function(e,t){const r=Math.max(t.top,e.top),n=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-n,s=o-r;if(n<i&&r<o){return a*s}return 0}(this,t):0}intersectionRatio(e){const{area:t}=this,r=this.intersectionArea(e);return r/(e.area+t-r)}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:r,width:n,height:i}){return new e(r,t,n,i)}static delta(e,t,r={x:"center",y:"center"}){const n=(e,t)=>{const n=r[t],i="x"===t?e.left:e.top,o="x"===t?e.width:e.height;return"start"==n?i:"end"==n?i+o:i+o/2};return XI.delta({x:n(e,"x"),y:n(e,"y")},{x:n(t,"x"),y:n(t,"y")})}static intersectionRatio(t,r){return e.from(t).intersectionRatio(e.from(r))}};var ZI,QI=class extends(kI=RI,AI=[EI],LI=[EI],kI){constructor(e){var t,r,n;super(XI.from(e),(e,t)=>XI.equals(e,t)),((e,t,r)=>{for(var n=0,i=e[t>>1],o=i&&i.length;n<o;n++)i[n].call(r)})(qI,5,this),t=this,n=0,(r=OI).has(t)?$I("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(t):r.set(t,n),this.velocity={x:0,y:0}}get delta(){return XI.delta(this.current,this.initial)}get direction(){const{current:e,previous:t}=this;if(!t)return null;const r={x:e.x-t.x,y:e.y-t.y};return r.x||r.y?Math.abs(r.x)>Math.abs(r.y)?r.x>0?"right":"left":r.y>0?"down":"up":null}get current(){return super.current}set current(e){const{current:t}=this,r=XI.from(e),n={x:r.x-t.x,y:r.y-t.y},i=Date.now(),o=i-(KI(a=this,s=OI,"read from private field"),s.get(a));var a,s;const l=e=>Math.round(e/o*100);uE(()=>{((e,t,r)=>{KI(e,t,"write to private field"),t.set(e,r)})(this,OI,i),this.velocity={x:l(n.x),y:l(n.y)},super.current=r})}reset(e=this.defaultValue){super.reset(XI.from(e)),this.velocity={x:0,y:0}}};function eD({x:e,y:t},r){const n=Math.abs(e),i=Math.abs(t);return"number"==typeof r?Math.sqrt(HI(n,2)+HI(i,2))>r:"x"in r&&"y"in r?n>r.x&&i>r.y:"x"in r?n>r.x:"y"in r&&i>r.y}qI=(e=>{var t;return[,,,TI(null!=(t=null==e?void 0:e[WI("metadata")])?t:null)]})(kI),OI=new WeakMap,YI(qI,2,"delta",AI,QI),YI(qI,2,"direction",LI,QI),ZI=qI,VI(QI,WI("metadata"),ZI[3]);var tD,rD,nD,iD,oD=(e=>(e.Horizontal="x",e.Vertical="y",e))(oD||{}),aD=Object.values(oD),sD=Object.create,lD=Object.defineProperty,uD=Object.defineProperties,cD=Object.getOwnPropertyDescriptor,dD=Object.getOwnPropertyDescriptors,pD=Object.getOwnPropertySymbols,fD=Object.prototype.hasOwnProperty,hD=Object.prototype.propertyIsEnumerable,mD=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),gD=e=>{throw TypeError(e)},vD=(e,t,r)=>t in e?lD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,yD=(e,t)=>{for(var r in t||(t={}))fD.call(t,r)&&vD(e,r,t[r]);if(pD)for(var r of pD(t))hD.call(t,r)&&vD(e,r,t[r]);return e},bD=(e,t)=>uD(e,dD(t)),xD=(e,t)=>lD(e,"name",{value:t,configurable:!0}),SD=(e,t)=>{var r={};for(var n in e)fD.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&pD)for(var n of pD(e))t.indexOf(n)<0&&hD.call(e,n)&&(r[n]=e[n]);return r},wD=e=>{var t;return[,,,sD(null!=(t=null==e?void 0:e[mD("metadata")])?t:null)]},CD=["class","method","getter","setter","accessor","field","value","get","set"],ED=e=>void 0!==e&&"function"!=typeof e?gD("Function expected"):e,ID=(e,t,r,n,i)=>({kind:CD[e],name:t,metadata:n,addInitializer:e=>r._?gD("Already initialized"):i.push(ED(e||null))}),DD=(e,t)=>vD(t,mD("metadata"),e[3]),PD=(e,t,r,n)=>{for(var i=0,o=e[t>>1],a=o&&o.length;i<a;i++)1&t?o[i].call(r):n=o[i].call(r,n);return n},RD=(e,t,r,n,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=CD[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)&&cD(d<4?i:{get[r](){return AD(this,o)},set[r](e){return OD(this,o,e)}},r));d?f&&d<4&&xD(o,(d>2?"set ":d>1?"get ":"")+r):xD(i,r);for(var b=n.length-1;b>=0;b--)u=ID(d,r,l={},e[3],v),d&&(u.static=p,u.private=f,c=u.access={has:f?e=>LD(i,e):e=>r in e},3^d&&(c.get=f?e=>(1^d?AD:qD)(e,i,4^d?o:y.get):e=>e[r]),d>2&&(c.set=f?(e,t)=>OD(e,i,t,4^d?o:y.set):(e,t)=>e[r]=t)),s=(0,n[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?ED(s)&&(d>4?g.unshift(s):d?f?o=s:y[m]=s:i=s):"object"!=typeof s||null===s?gD("Object expected"):(ED(a=s.get)&&(y.get=a),ED(a=s.set)&&(y.set=a),ED(a=s.init)&&g.unshift(a));return d||DD(e,i),y&&lD(i,r,y),f?4^d?o:y:i},MD=(e,t,r)=>t.has(e)||gD("Cannot "+r),LD=(e,t)=>Object(t)!==t?gD('Cannot use the "in" operator on this value'):e.has(t),AD=(e,t,r)=>(MD(e,t,"read from private field"),r?r.call(e):t.get(e)),kD=(e,t,r)=>t.has(e)?gD("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),OD=(e,t,r,n)=>(MD(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),qD=(e,t,r)=>(MD(e,t,"access private method"),r);function TD(e,t){return{plugin:e,options:t}}function ND(e){return t=>TD(e,t)}function _D(e){return"function"==typeof e?{plugin:e,options:void 0}:e}tD=[CI];var jD=class{constructor(e,t){this.manager=e,this.options=t,kD(this,nD,PD(rD,8,this,!1)),PD(rD,11,this),kD(this,iD,new Set)}enable(){this.disabled=!1}disable(){this.disabled=!0}isDisabled(){return dE(()=>this.disabled)}configure(e){this.options=e}registerEffect(e){const t=AE(e.bind(this));return AD(this,iD).add(t),t}destroy(){AD(this,iD).forEach(e=>e())}static configure(e){return TD(this,e)}};rD=wD(null),nD=new WeakMap,iD=new WeakMap,RD(rD,4,"disabled",tD,jD,nD),DD(rD,jD);var FD,zD=class extends jD{},WD=class{constructor(e){this.manager=e,this.instances=new Map,kD(this,FD,[])}get values(){return Array.from(this.instances.values())}set values(e){const t=e.map(_D).reduceRight((e,t)=>e.some(({plugin:e})=>e===t.plugin)?e:[t,...e],[]),r=t.map(({plugin:e})=>e);for(const e of AD(this,FD))if(!r.includes(e)){if(e.prototype instanceof zD)continue;this.unregister(e)}for(const{plugin:e,options:r}of t)this.register(e,r);OD(this,FD,r)}get(e){return this.instances.get(e)}register(e,t){const r=this.instances.get(e);if(r)return r.options!==t&&(r.options=t),r;const n=new e(this.manager,t);return this.instances.set(e,n),n}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 $D(e,t){return e.priority===t.priority?e.type===t.type?t.value-e.value:t.type-e.type:t.priority-e.priority}FD=new WeakMap;var HD,VD,BD=[],GD=class extends jD{constructor(e){super(e),kD(this,HD),kD(this,VD),this.computeCollisions=this.computeCollisions.bind(this),OD(this,VD,SE(BD)),this.destroy=DI(()=>{const e=this.computeCollisions(),t=dE(()=>this.manager.dragOperation.position.current);if(e!==BD){const e=AD(this,HD);if(OD(this,HD,t),e&&t.x==e.x&&t.y==e.y)return}else OD(this,HD,void 0);AD(this,VD).value=e},()=>{const{dragOperation:e}=this.manager;e.status.initialized&&this.forceUpdate()})}forceUpdate(e=!0){dE(()=>{e?AD(this,VD).value=this.computeCollisions():OD(this,HD,void 0)})}computeCollisions(e,t){const{registry:r,dragOperation:n}=this.manager,{source:i,shape:o,status:a}=n;if(!a.initialized||!o)return BD;const s=[],l=[];for(const o of null!=e?e:r.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 r=dE(()=>e({droppable:o,dragOperation:n}));r&&(null!=o.collisionPriority&&(r.priority=o.collisionPriority),s.push(r))}return 0===l.length?BD:(s.sort($D),s)}get collisions(){return AD(this,VD).value}};HD=new WeakMap,VD=new WeakMap;var UD=class{constructor(){this.registry=new Map}addEventListener(e,t){const{registry:r}=this,n=new Set(r.get(e));return n.add(t),r.set(e,n),()=>this.removeEventListener(e,t)}removeEventListener(e,t){const{registry:r}=this,n=new Set(r.get(e));n.delete(t),r.set(e,n)}dispatch(e,...t){const{registry:r}=this,n=r.get(e);if(n)for(const e of n)e(...t)}},YD=class extends UD{constructor(e){super(),this.manager=e}dispatch(e,t){const r=[t,this.manager];super.dispatch(e,...r)}};function KD(e,t=!0){let r=!1;return bD(yD({},e),{cancelable:t,get defaultPrevented(){return r},preventDefault(){t&&(r=!0)}})}var XD,JD,ZD,QD,eP,tP,rP,nP,iP,oP=class extends zD{constructor(e){super(e);let t=[];this.destroy=DI(()=>{const{dragOperation:r,collisionObserver:n}=e;r.status.initializing&&(t=[],n.enable())},()=>{const{collisionObserver:r,monitor:n}=e,{collisions:i}=r;if(r.isDisabled())return;const o=KD({collisions:i});if(n.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;dE(()=>{var t;(null==a?void 0:a.id)!==(null==(t=e.dragOperation.target)?void 0:t.id)&&(r.disable(),e.actions.setDropTarget(null==a?void 0:a.id).then(()=>{r.enable()}))})})}},aP=(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))(aP||{}),sP=(e=>(e[e.Collision=0]="Collision",e[e.ShapeIntersection=1]="ShapeIntersection",e[e.PointerIntersection=2]="PointerIntersection",e))(sP||{});rP=[CI],tP=[EI],eP=[EI],QD=[EI],ZD=[EI],JD=[EI],XD=[EI];var lP=class{constructor(){PD(nP,5,this),kD(this,iP,PD(nP,8,this,"idle")),PD(nP,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}};nP=wD(null),iP=new WeakMap,RD(nP,4,"value",rP,lP,iP),RD(nP,2,"current",tP,lP),RD(nP,2,"idle",eP,lP),RD(nP,2,"initializing",QD,lP),RD(nP,2,"initialized",ZD,lP),RD(nP,2,"dragging",JD,lP),RD(nP,2,"dropped",XD,lP),DD(nP,lP);var uP,cP,dP,pP,fP,hP,mP,gP,vP,yP=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 dE(()=>{const{dragOperation:t}=this.manager,r=null!=e?e:null;if(t.targetIdentifier===r)return Promise.resolve(!1);t.targetIdentifier=r;const n=KD({operation:t.snapshot()});return t.status.dragging&&this.manager.monitor.dispatch("dragover",n),this.manager.renderer.rendering.then(()=>n.defaultPrevented)})}start(e){return dE(()=>{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 r=new AbortController,{event:n,coordinates:i}=e;uE(()=>{t.status.set("initialization-pending"),t.shape=null,t.canceled=!1,t.activatorEvent=null!=n?n:null,t.position.reset(i)});const o=KD({operation:t.snapshot()});return this.manager.monitor.dispatch("beforedragstart",o),o.defaultPrevented?(t.reset(),r.abort(),r):(t.status.set("initializing"),t.controller=r,this.manager.renderer.rendering.then(()=>{if(r.signal.aborted)return;const{status:e}=t;"initializing"===e.current&&(t.status.set("dragging"),this.manager.monitor.dispatch("dragstart",{nativeEvent:n,operation:t.snapshot(),cancelable:!1}))}),r)})}move(e){return dE(()=>{var t,r;const{dragOperation:n}=this.manager,{status:i,controller:o}=n;if(!i.dragging||!o||o.signal.aborted)return;const a=KD({nativeEvent:e.event,operation:n.snapshot(),by:e.by,to:e.to},null==(t=e.cancelable)||t);(null==(r=e.propagate)||r)&&this.manager.monitor.dispatch("dragmove",a),queueMicrotask(()=>{var t,r,i,o,s;if(a.defaultPrevented)return;const l=null!=(s=e.to)?s:{x:n.position.current.x+(null!=(r=null==(t=e.by)?void 0:t.x)?r:0),y:n.position.current.y+(null!=(o=null==(i=e.by)?void 0:i.y)?o:0)};n.position.current=l})})}stop(e={}){return dE(()=>{var t,r;const{dragOperation:n}=this.manager,{controller:i}=n;if(!i||i.signal.aborted)return;let o;i.abort();const a=()=>{this.manager.renderer.rendering.then(()=>{n.status.set("dropped");const e=dE(()=>{var e;return"dropping"===(null==(e=n.source)?void 0:e.status)}),t=()=>{n.controller===i&&(n.controller=void 0),n.reset()};if(e){const{source:e}=n,r=AE(()=>{"idle"===(null==e?void 0:e.status)&&(r(),t())})}else this.manager.renderer.rendering.then(t)})};n.canceled=null!=(t=e.canceled)&&t,this.manager.monitor.dispatch("dragend",{nativeEvent:e.event,operation:n.snapshot(),canceled:null!=(r=e.canceled)&&r,suspend:()=>{const e={resume:()=>{},abort:()=>{}};return o=new Promise((t,r)=>{e.resume=t,e.abort=r}),e}}),o?o.then(a).catch(()=>n.reset()):a()})}};pP=[CI],dP=[CI],cP=[CI],uP=[CI];var bP=class{constructor(e,t){kD(this,hP,PD(fP,8,this)),PD(fP,11,this),kD(this,mP,PD(fP,12,this)),PD(fP,15,this),kD(this,gP,PD(fP,16,this)),PD(fP,19,this),kD(this,vP,PD(fP,20,this)),PD(fP,23,this);const{effects:r,id:n,data:i={},disabled:o=!1,register:a=!0}=e;let s=n;this.manager=t,this.id=n,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==r?void 0:r())?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)}};fP=wD(null),hP=new WeakMap,mP=new WeakMap,gP=new WeakMap,vP=new WeakMap,RD(fP,4,"manager",pP,bP,hP),RD(fP,4,"id",dP,bP,mP),RD(fP,4,"data",cP,bP,gP),RD(fP,4,"disabled",uP,bP,vP),DD(fP,bP);var xP,SP,wP,CP,EP,IP,DP,PP,RP,MP,LP,AP,kP,OP,qP,TP,NP,_P,jP,FP,zP,WP,$P,HP,VP=class{constructor(){this.map=SE(new Map),this.cleanupFunctions=new WeakMap,this.register=(e,t)=>{const r=this.map.peek(),n=r.get(e),i=()=>this.unregister(e,t);if(n===t)return i;if(n){const e=this.cleanupFunctions.get(n);null==e||e(),this.cleanupFunctions.delete(n)}const o=new Map(r);o.set(e,t),this.map.value=o;const a=DI(...t.effects());return this.cleanupFunctions.set(t,a),i},this.unregister=(e,t)=>{const r=this.map.peek();if(r.get(e)!==t)return;const n=this.cleanupFunctions.get(t);null==n||n(),this.cleanupFunctions.delete(t);const i=new Map(r);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}},BP=class extends(DP=bP,IP=[CI],EP=[CI],CP=[CI],wP=[EI],SP=[EI],xP=[EI],DP){constructor(e,t){var r=e,{modifiers:n,type:i,sensors:o}=r,a=SD(r,["modifiers","type","sensors"]);super(a,t),PD(PP,5,this),kD(this,RP,PD(PP,8,this)),PD(PP,11,this),kD(this,MP,PD(PP,12,this)),PD(PP,15,this),kD(this,LP,PD(PP,16,this,this.isDragSource?"dragging":"idle")),PD(PP,19,this),this.type=i,this.sensors=o,this.modifiers=n,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}};PP=wD(DP),RP=new WeakMap,MP=new WeakMap,LP=new WeakMap,RD(PP,4,"type",IP,BP,RP),RD(PP,4,"modifiers",EP,BP,MP),RD(PP,4,"status",CP,BP,LP),RD(PP,2,"isDropping",wP,BP),RD(PP,2,"isDragging",SP,BP),RD(PP,2,"isDragSource",xP,BP),DD(PP,BP);var GP=class extends(_P=bP,NP=[CI],TP=[CI],qP=[CI],OP=[CI],kP=[CI],AP=[EI],_P){constructor(e,t){var r=e,{accept:n,collisionDetector:i,collisionPriority:o,type:a}=r;super(SD(r,["accept","collisionDetector","collisionPriority","type"]),t),PD(jP,5,this),kD(this,FP,PD(jP,8,this)),PD(jP,11,this),kD(this,zP,PD(jP,12,this)),PD(jP,15,this),kD(this,WP,PD(jP,16,this)),PD(jP,19,this),kD(this,$P,PD(jP,20,this)),PD(jP,23,this),kD(this,HP,PD(jP,24,this)),PD(jP,27,this),this.accept=n,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}};jP=wD(_P),FP=new WeakMap,zP=new WeakMap,WP=new WeakMap,$P=new WeakMap,HP=new WeakMap,RD(jP,4,"accept",NP,GP,FP),RD(jP,4,"type",TP,GP,zP),RD(jP,4,"collisionDetector",qP,GP,WP),RD(jP,4,"collisionPriority",OP,GP,$P),RD(jP,4,"shape",kP,GP,HP),RD(jP,2,"isDropTarget",AP,GP),DD(jP,GP);var UP,YP=class extends jD{constructor(e,t){super(e,t),this.manager=e,this.options=t}},KP=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)}},XP=class{constructor(e){this.options=e,kD(this,UP)}set controller(e){OD(this,UP,e),e.signal.addEventListener("abort",()=>this.abort())}activate(e){var t;null==(t=AD(this,UP))||t.activate(e)}};UP=new WeakMap;var JP,ZP,QP,eR,tR,rR,nR,iR,oR,aR,sR,lR,uR,cR,dR,pR,fR,hR,mR,gR=class extends jD{constructor(e,t){super(e,t),this.manager=e,this.options=t}apply(e){return e.transform}},vR=class{constructor(e){this.draggables=new VP,this.droppables=new VP,this.plugins=new WD(e),this.sensors=new WD(e),this.modifiers=new WD(e)}register(e,t){if(e instanceof BP)return this.draggables.register(e.id,e);if(e instanceof GP)return this.droppables.register(e.id,e);if(e.prototype instanceof gR)return this.modifiers.register(e,t);if(e.prototype instanceof YP)return this.sensors.register(e,t);if(e.prototype instanceof jD)return this.plugins.register(e,t);throw new Error("Invalid instance type")}unregister(e){if(e instanceof bP)return e instanceof BP?this.draggables.unregister(e.id,e):e instanceof GP?this.droppables.unregister(e.id,e):()=>{};if(e.prototype instanceof gR)return this.modifiers.unregister(e);if(e.prototype instanceof YP)return this.sensors.unregister(e);if(e.prototype instanceof jD)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()}};oR=[EI],iR=[CI],nR=[CI],rR=[CI],tR=[CI],eR=[CI],QP=[EI],ZP=[EI],JP=[EI];var yR=class{constructor(e){PD(uR,5,this),kD(this,aR),kD(this,sR),kD(this,lR,new RI(void 0,(e,t)=>e&&t?e.equals(t):e===t)),this.status=new lP,kD(this,cR,PD(uR,8,this,!1)),PD(uR,11,this),kD(this,dR,PD(uR,12,this,null)),PD(uR,15,this),kD(this,pR,PD(uR,16,this,null)),PD(uR,19,this),kD(this,fR,PD(uR,20,this,null)),PD(uR,23,this),kD(this,hR,PD(uR,24,this,[])),PD(uR,27,this),this.position=new QI({x:0,y:0}),kD(this,mR,{x:0,y:0}),OD(this,aR,e)}get shape(){const{current:e,initial:t,previous:r}=AD(this,lR);return e&&t?{current:e,initial:t,previous:r}:null}set shape(e){e?AD(this,lR).current=e:AD(this,lR).reset()}get source(){var e;const t=this.sourceIdentifier;if(null==t)return null;const r=AD(this,aR).registry.draggables.get(t);return r&&OD(this,sR,r),null!=(e=null!=r?r:AD(this,sR))?e:null}get target(){var e;const t=this.targetIdentifier;return null!=t&&null!=(e=AD(this,aR).registry.droppables.get(t))?e:null}get transform(){const{x:e,y:t}=this.position.delta;let r={x:e,y:t};for(const e of this.modifiers)r=e.apply(bD(yD({},this.snapshot()),{transform:r}));return OD(this,mR,r),r}snapshot(){return dE(()=>({source:this.source,target:this.target,activatorEvent:this.activatorEvent,transform:AD(this,mR),shape:this.shape?MI(this.shape):null,position:MI(this.position),status:MI(this.status),canceled:this.canceled}))}reset(){uE(()=>{this.status.set("idle"),this.sourceIdentifier=null,this.targetIdentifier=null,AD(this,lR).reset(),this.position.reset({x:0,y:0}),OD(this,mR,{x:0,y:0}),this.modifiers=[]})}};uR=wD(null),aR=new WeakMap,sR=new WeakMap,lR=new WeakMap,cR=new WeakMap,dR=new WeakMap,pR=new WeakMap,fR=new WeakMap,hR=new WeakMap,mR=new WeakMap,RD(uR,2,"shape",oR,yR),RD(uR,4,"canceled",iR,yR,cR),RD(uR,4,"activatorEvent",nR,yR,dR),RD(uR,4,"sourceIdentifier",rR,yR,pR),RD(uR,4,"targetIdentifier",tR,yR,fR),RD(uR,4,"modifiers",eR,yR,hR),RD(uR,2,"source",QP,yR),RD(uR,2,"target",ZP,yR),RD(uR,2,"transform",JP,yR),DD(uR,yR);var bR={get rendering(){return Promise.resolve()}};function xR(e,t){return"function"==typeof e?e(t):null!=e?e:t}var SR=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 r=null!=e?e:{},n=xR(r.plugins,[]),i=xR(r.sensors,[]),o=xR(r.modifiers,[]),a=null!=(t=r.renderer)?t:bR,s=new YD(this),l=new vR(this);this.registry=l,this.monitor=s,this.renderer=a,this.actions=new yP(this),this.dragOperation=new yR(this),this.collisionObserver=new GD(this),this.plugins=[oP,...n],this.modifiers=o,this.sensors=i;const{destroy:u}=this,c=DI(()=>{var e,t,r;const n=dE(()=>this.dragOperation.modifiers),i=this.modifiers;for(const e of n)i.includes(e)||e.destroy();this.dragOperation.modifiers=null!=(r=null==(t=null==(e=this.dragOperation.source)?void 0:e.modifiers)?void 0:t.map(e=>{const{plugin:t,options:r}=_D(e);return new t(this,r)}))?r: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}},wR=e=>{throw TypeError(e)},CR=(e,t,r)=>t.has(e)||wR("Cannot "+r),ER=(e,t,r)=>(CR(e,t,"read from private field"),t.get(e)),IR=(e,t,r)=>t.has(e)?wR("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),DR=(e,t,r,n)=>(CR(e,t,"write to private field"),t.set(e,r),r),PR=(e,t,r)=>(CR(e,t,"access private method"),r);function RR(e){return!!e&&(e instanceof KeyframeEffect||"getKeyframes"in e&&"function"==typeof e.getKeyframes)}function MR(e,t){const r=e.getAnimations();if(r.length>0)for(const e of r){if("running"!==e.playState)continue;const{effect:r}=e,n=(RR(r)?r.getKeyframes():[]).filter(t);if(n.length>0)return[n[n.length-1],e]}return null}function LR(e){const{width:t,height:r,top:n,left:i,bottom:o,right:a}=e.getBoundingClientRect();return{width:t,height:r,top:n,left:i,bottom:o,right:a}}function AR(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function kR(e){return"nodeType"in e}function OR(e){var t,r,n;return e?AR(e)?e:kR(e)?"defaultView"in e?null!=(t=e.defaultView)?t:window:null!=(n=null==(r=e.ownerDocument)?void 0:r.defaultView)?n:window:window:window}function qR(e){const{Document:t}=OR(e);return e instanceof t||"nodeType"in e&&e.nodeType===Node.DOCUMENT_NODE}function TR(e){return!(!e||AR(e))&&(e instanceof OR(e).HTMLElement||"namespaceURI"in e&&"string"==typeof e.namespaceURI&&e.namespaceURI.endsWith("html"))}function NR(e){return e instanceof OR(e).SVGElement||"namespaceURI"in e&&"string"==typeof e.namespaceURI&&e.namespaceURI.endsWith("svg")}function _R(e){return e?AR(e)?e.document:kR(e)?qR(e)?e:TR(e)||NR(e)?e.ownerDocument:document:document:document}function jR(e,t){if(function(e){return"DETAILS"===e.tagName}(e)&&!1===e.open)return!1;const{overflow:r,overflowX:n,overflowY:i}=getComputedStyle(e);return"visible"===r&&"visible"===n&&"visible"===i}function FR(e,t=e.getBoundingClientRect(),r=0){var n,i,o,a,s;let l=t;const{ownerDocument:u}=e,c=null!=(n=u.defaultView)?n:window;let d=e.parentElement;for(;d&&d!==u.documentElement;){if(!jR(d)){const e=d.getBoundingClientRect(),t=r*(e.bottom-e.top),n=r*(e.right-e.left),i=r*(e.bottom-e.top),o=r*(e.right-e.left);l={top:Math.max(l.top,e.top-t),right:Math.min(l.right,e.right+n),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=r*g,y=r*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 zR(e){return{x:e.clientX,y:e.clientY}}var WR="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function $R(e=document,t=new Set){if(t.has(e))return[];t.add(e);const r=[e];for(const n of Array.from(e.querySelectorAll("iframe, frame")))try{const e=n.contentDocument;e&&!t.has(e)&&r.push(...$R(e,t))}catch(e){}try{const n=e.defaultView;if(n&&n!==window.top){const i=n.parent;i&&i.document&&i.document!==e&&r.push(...$R(i.document,t))}}catch(e){}return r}function HR(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function VR(){var e,t;const r=HR()?window.visualViewport:null;return{x:null!=(e=null==r?void 0:r.offsetLeft)?e:0,y:null!=(t=null==r?void 0:r.offsetTop)?t:0}}function BR(e){return!(!e||!kR(e))&&e instanceof OR(e).ShadowRoot}function GR(e){if(e&&kR(e)){let t=e.getRootNode();if(BR(t))return t;if(t instanceof Document)return t}return _R(e)}function UR(e){return e.matchMedia("(prefers-reduced-motion: reduce)").matches}function YR(e){return"value"in e}function KR(e){return"CANVAS"===e.tagName}function XR(e,{x:t,y:r}){const n=e.elementFromPoint(t,r);if(function(e){return"IFRAME"===(null==e?void 0:e.tagName)}(n)){const{contentDocument:e}=n;if(e){const{left:i,top:o}=n.getBoundingClientRect();return XR(e,{x:t-i,y:r-o})}}return n}var JR=new WeakMap;var ZR=class{constructor(){this.entries=new Set,this.clear=()=>{for(const e of this.entries){const[t,{type:r,listener:n,options:i}]=e;t.removeEventListener(r,n,i)}this.entries.clear()}}bind(e,t){const r=Array.isArray(e)?e:[e],n=Array.isArray(t)?t:[t],i=[];for(const e of r)for(const t of n){const{type:r,listener:n,options:o}=t,a=[e,t];e.addEventListener(r,n,o),this.entries.add(a),i.push(a)}return function(){for(const[e,{type:t,listener:r,options:n}]of i)e.removeEventListener(t,r,n)}}};function QR(e){const t=null==e?void 0:e.ownerDocument.defaultView;if(t&&t.self!==t.parent)return t.frameElement}function eM(e,t){const r=()=>performance.now();let n,i;return function(...o){const a=this;i?(null==n||n(),n=function(e,t){const r=setTimeout(e,t);return()=>clearTimeout(r)}(()=>{e.apply(a,o),i=r()},t-(r()-i))):(e.apply(a,o),i=r())}}var tM,rM=WR?ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},nM=class extends rM{constructor(e){super(t=>{ER(this,tM)?e(t,this):DR(this,tM,!0)}),IR(this,tM,!1)}};tM=new WeakMap;var iM,oM,aM,sM,lM,uM,cM,dM,pM,fM,hM,mM=Array.from({length:100},(e,t)=>t/100),gM=class{constructor(e,t,r={debug:!1,skipInitial:!1}){this.element=e,this.callback=t,IR(this,pM),this.disconnect=()=>{var e,t,r;DR(this,cM,!0),null==(e=ER(this,aM))||e.disconnect(),null==(t=ER(this,sM))||t.disconnect(),ER(this,lM).disconnect(),null==(r=ER(this,uM))||r.remove()},IR(this,iM,!0),IR(this,oM),IR(this,aM),IR(this,sM),IR(this,lM),IR(this,uM),IR(this,cM,!1),IR(this,dM,eM(()=>{var e,t,r;const{element:n}=this;if(null==(e=ER(this,sM))||e.disconnect(),ER(this,cM)||!ER(this,iM)||!n.isConnected)return;const i=null!=(t=n.ownerDocument)?t:document,{innerHeight:o,innerWidth:a}=null!=(r=i.defaultView)?r:window,s=n.getBoundingClientRect(),l=FR(n,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,DR(this,sM,new IntersectionObserver(e=>{const[t]=e,{intersectionRect:r}=t;1!==(1!==t.intersectionRatio?t.intersectionRatio:JI.intersectionRatio(r,FR(n)))&&ER(this,dM).call(this)},{threshold:mM,rootMargin:m,root:i})),ER(this,sM).observe(n),PR(this,pM,fM).call(this)},75)),this.boundingClientRect=e.getBoundingClientRect(),DR(this,iM,function(e,t=e.getBoundingClientRect()){const{width:r,height:n}=FR(e,t);return r>0&&n>0}(e,this.boundingClientRect));let n=!0;this.callback=e=>{n&&(n=!1,r.skipInitial)||t(e)};const i=e.ownerDocument;(null==r?void 0:r.debug)&&(DR(this,uM,document.createElement("div")),ER(this,uM).style.background="rgba(0,0,0,0.15)",ER(this,uM).style.position="fixed",ER(this,uM).style.pointerEvents="none",i.body.appendChild(ER(this,uM))),DR(this,lM,new IntersectionObserver(t=>{var r,n;const i=t[t.length-1],{boundingClientRect:o,isIntersecting:a}=i,{width:s,height:l}=o,u=ER(this,iM);DR(this,iM,a),(s||l)&&(u&&!a?(null==(r=ER(this,sM))||r.disconnect(),this.callback(null),null==(n=ER(this,aM))||n.disconnect(),DR(this,aM,void 0),ER(this,uM)&&(ER(this,uM).style.visibility="hidden")):ER(this,dM).call(this),a&&!ER(this,aM)&&(DR(this,aM,new nM(ER(this,dM))),ER(this,aM).observe(e)))},{threshold:mM,root:i})),ER(this,iM)&&!r.skipInitial&&this.callback(this.boundingClientRect),ER(this,lM).observe(e)}};iM=new WeakMap,oM=new WeakMap,aM=new WeakMap,sM=new WeakMap,lM=new WeakMap,uM=new WeakMap,cM=new WeakMap,dM=new WeakMap,pM=new WeakSet,fM=function(){ER(this,cM)||(PR(this,pM,hM).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,ER(this,oM))||(this.callback(this.boundingClientRect),DR(this,oM,this.boundingClientRect)))},hM=function(){if(ER(this,uM)){const{top:e,left:t,width:r,height:n}=FR(this.element);ER(this,uM).style.overflow="hidden",ER(this,uM).style.visibility="visible",ER(this,uM).style.top=`${Math.floor(e)}px`,ER(this,uM).style.left=`${Math.floor(t)}px`,ER(this,uM).style.width=`${Math.floor(r)}px`,ER(this,uM).style.height=`${Math.floor(n)}px`}};var vM,yM,bM,xM,SM=new WeakMap,wM=new WeakMap;function CM(e,t){let r=SM.get(e);if(!r){const t=new gM(e,t=>{const r=SM.get(e);r&&r.callbacks.forEach(e=>e(t))},{skipInitial:!0});r={disconnect:t.disconnect,callbacks:new Set}}return r.callbacks.add(t),SM.set(e,r),()=>{r.callbacks.delete(t),0===r.callbacks.size&&(SM.delete(e),r.disconnect())}}var EM=class{constructor(e,t,r){this.callback=t,IR(this,vM),IR(this,yM,!1),IR(this,bM),IR(this,xM,eM(e=>{if(!ER(this,yM)&&e.target&&"contains"in e.target&&"function"==typeof e.target.contains)for(const t of ER(this,bM))if(e.target.contains(t)){this.callback(ER(this,vM).boundingClientRect);break}},75));const n=function(e){const t=new Set;let r=QR(e);for(;r;)t.add(r),r=QR(r);return t}(e),i=function(e,t){const r=new Set;for(const n of e){const e=CM(n,t);r.add(e)}return()=>r.forEach(e=>e())}(n,t),o=function(e,t){var r;const n=e.ownerDocument;if(!wM.has(n)){const e=new AbortController,t=new Set;document.addEventListener("scroll",e=>t.forEach(t=>t(e)),{capture:!0,passive:!0,signal:e.signal}),wM.set(n,{disconnect:()=>e.abort(),listeners:t})}const{listeners:i,disconnect:o}=null!=(r=wM.get(n))?r:{};return i&&o?(i.add(t),()=>{i.delete(t),0===i.size&&(o(),wM.delete(n))}):()=>{}}(e,ER(this,xM));DR(this,bM,n),DR(this,vM,new gM(e,t,r)),this.disconnect=()=>{ER(this,yM)||(DR(this,yM,!0),i(),o(),ER(this,vM).disconnect())}}};function IM(e){return"showPopover"in e&&"hidePopover"in e&&"function"==typeof e.showPopover&&"function"==typeof e.hidePopover}function DM(e){try{IM(e)&&e.isConnected&&e.hasAttribute("popover")&&!e.matches(":popover-open")&&e.showPopover()}catch(e){}}function PM(e){return!(!WR||!e)&&e===_R(e).scrollingElement}function RM(e){var t,r;const n=OR(e),i=PM(e)?function(e){var t,r,n,i;const{documentElement:o}=_R(e),a=OR(e).visualViewport,s=null!=(t=null==a?void 0:a.width)?t:o.clientWidth,l=null!=(r=null==a?void 0:a.height)?r:o.clientHeight,u=null!=(n=null==a?void 0:a.offsetTop)?n: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):LR(e),o=n.visualViewport,a=PM(e)?{height:null!=(t=null==o?void 0:o.height)?t:n.innerHeight,width:null!=(r=null==o?void 0:o.width)?r:n.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 MM(e,t){const{isTop:r,isBottom:n,isLeft:i,isRight:o,position:a}=RM(e),{x:s,y:l}=null!=t?t:{x:0,y:0},u=!r&&a.current.y+l>0,c=!n&&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}}vM=new WeakMap,yM=new WeakMap,bM=new WeakMap,xM=new WeakMap;var LM=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))}},AM=new LM(e=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(e):e()}),kM=new LM(e=>setTimeout(e,50)),OM=new Map,qM=OM.clear.bind(OM);function TM(e,t=!1){if(!t)return NM(e);let r=OM.get(e);return r||(r=NM(e),OM.set(e,r),kM.schedule(qM),r)}function NM(e){return OR(e).getComputedStyle(e)}var _M={excludeElement:!0,escapeShadowDOM:!0};function jM(e,t=_M){const{limit:r,excludeElement:n,escapeShadowDOM:i}=t,o=new Set;return e?function t(a){if(null!=r&&o.size>=r)return o;if(!a)return o;if(qR(a)&&null!=a.scrollingElement&&!o.has(a.scrollingElement))return o.add(a.scrollingElement),o;if(i&&BR(a))return t(a.host);if(!TR(a))return NR(a)?t(a.parentElement):o;if(o.has(a))return o;const s=TM(a,!0);if(n&&a===e||function(e,t=TM(e,!0)){const r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const n=t[e];return"string"==typeof n&&r.test(n)})}(a,s)&&o.add(a),function(e,t=TM(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 FM(e,t=window.frameElement){const r={x:0,y:0,scaleX:1,scaleY:1};if(!e)return r;let n=QR(e);for(;n;){if(n===t)return r;const e=LR(n),{x:i,y:o}=zM(n,e);r.x=r.x+e.left,r.y=r.y+e.top,r.scaleX=r.scaleX*i,r.scaleY=r.scaleY*o,n=QR(n)}return r}function zM(e,t=LR(e)){const r=Math.round(t.width),n=Math.round(t.height);if(TR(e))return{x:r/e.offsetWidth,y:n/e.offsetHeight};const i=TM(e,!0);return{x:(parseFloat(i.width)||r)/r,y:(parseFloat(i.height)||n)/n}}function WM(e){if("none"===e)return null;const[t,r,n="0"]=e.split(" "),i={x:parseFloat(t),y:parseFloat(r),z:parseInt(n,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 $M(e){var t,r,n,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(" "),r=parseFloat(t[0]),n=parseFloat(t[1]);return isNaN(r)&&isNaN(n)?null:{x:isNaN(r)?n:r,y:isNaN(n)?r:n}}(c),h=WM(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!=(r=null==f?void 0:f.y)?r:1,y=null!=(n=null==h?void 0:h.x)?n: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 HM=(e=>(e[e.Idle=0]="Idle",e[e.Forward=1]="Forward",e[e.Reverse=-1]="Reverse",e))(HM||{}),VM={x:.2,y:.2},BM={x:10,y:10};function GM(e,t,r,n=25,i=VM,o=BM){const{x:a,y:s}=t,{rect:l,isTop:u,isBottom:c,isLeft:d,isRight:p}=RM(e),f=FM(e),h=$M(TM(e,!0)),m=null!==h&&(null==h?void 0:h.scaleX)<0,g=null!==h&&(null==h?void 0:h.scaleY)<0,v=new JI(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==r?void 0:r.y)&&a>=v.left-o.x&&a<=v.right+o.x?(y.y=g?1:-1,b.y=n*Math.abs((v.top+x-s)/x)):(!c||g&&!u)&&s>=v.bottom-x&&-1!==(null==r?void 0:r.y)&&a>=v.left-o.x&&a<=v.right+o.x&&(y.y=g?-1:1,b.y=n*Math.abs((v.bottom-x-s)/x)),(!p||m&&!d)&&a>=v.right-S&&-1!==(null==r?void 0:r.x)&&s>=v.top-o.y&&s<=v.bottom+o.y?(y.x=m?-1:1,b.x=n*Math.abs((v.right-S-a)/S)):(!d||m&&!p)&&a<=v.left+S&&1!==(null==r?void 0:r.x)&&s>=v.top-o.y&&s<=v.bottom+o.y&&(y.x=m?1:-1,b.x=n*Math.abs((v.left+S-a)/S)),{direction:y,speed:b}}function UM(e,t=!1){if("scrollIntoViewIfNeeded"in(r=e)&&"function"==typeof r.scrollIntoViewIfNeeded)return void e.scrollIntoViewIfNeeded(t);var r;if(!TR(e))return e.scrollIntoView();var n=function(e){const[t]=jM(e,{limit:1});return null!=t?t:null}(e);if(!TR(n))return;const i=TM(n,!0),o=parseInt(i.getPropertyValue("border-top-width")),a=parseInt(i.getPropertyValue("border-left-width")),s=e.offsetTop-n.offsetTop<n.scrollTop,l=e.offsetTop-n.offsetTop+e.clientHeight-o>n.scrollTop+n.clientHeight,u=e.offsetLeft-n.offsetLeft<n.scrollLeft,c=e.offsetLeft-n.offsetLeft+e.clientWidth-a>n.scrollLeft+n.clientWidth,d=s&&!l;(s||l)&&t&&(n.scrollTop=e.offsetTop-n.offsetTop-n.clientHeight/2-o+e.clientHeight/2),(u||c)&&t&&(n.scrollLeft=e.offsetLeft-n.offsetLeft-n.clientWidth/2-a+e.clientWidth/2),(s||l||u||c)&&!t&&e.scrollIntoView(d)}function YM({element:e,keyframes:t,options:r}){return e.animate(t,r).finished}function KM(e,t=TM(e).translate,r=!0){if(r){const t=MR(e,e=>"translate"in e);if(t){const{translate:e=""}=t[0];if("string"==typeof e){const t=WM(e);if(t)return t}}}if(t){const e=WM(t);if(e)return e}return{x:0,y:0,z:0}}var XM=new LM(e=>setTimeout(e,0)),JM=new Map,ZM=JM.clear.bind(JM);function QM(e,t){const r=function(e){const t=e.ownerDocument;let r=JM.get(t);if(r)return r;r=t.getAnimations(),JM.set(t,r),XM.schedule(ZM);const n=r.filter(t=>RR(t.effect)&&t.effect.target===e);return JM.set(e,n),r}(e).filter(e=>{var r,n;if(RR(e.effect)){const{target:i}=e.effect;if(null==(n=i&&(null==(r=t.isValidTarget)?void 0:r.call(t,i)))||n)return e.effect.getKeyframes().some(e=>{for(const r of t.properties)if(e[r])return!0})}}).map(e=>{const{effect:t,currentTime:r}=e,n=null==t?void 0:t.getComputedTiming().duration;if(!e.pending&&"finished"!==e.playState)return"number"==typeof n&&"number"==typeof r&&r<n?(e.currentTime=n,()=>{e.currentTime=r}):void 0});if(r.length>0)return()=>r.forEach(e=>null==e?void 0:e())}var eL=class extends JI{constructor(e,t={}){var r,n,i,o;const{frameTransform:a=FM(e),ignoreTransforms:s,getBoundingClientRect:l=LR}=t,u=QM(e,{properties:["transform","translate","scale","width","height"],isValidTarget:t=>(t!==e||HR())&&t.contains(e)}),c=l(e);let d,{top:p,left:f,width:h,height:m}=c;const g=TM(e),v=$M(g),y={x:null!=(r=null==v?void 0:v.scaleX)?r:1,y:null!=(n=null==v?void 0:v.scaleY)?n:1},b=function(e,t){var r;const n=e.getAnimations();let i=null;if(!n.length)return null;for(const e of n){if("running"!==e.playState)continue;const n=RR(e.effect)?e.effect.getKeyframes():[],o=n[n.length-1];if(!o)continue;const{transform:a,translate:s,scale:l}=o;if(a||s||l){const e=$M({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!=(r=i.z)?r: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,r){const{scaleX:n,scaleY:i,x:o,y:a}=t,s=e.left-o-(1-n)*parseFloat(r),l=e.top-a-(1-i)*parseFloat(r.slice(r.indexOf(" ")+1)),u=n?e.width/n: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,r){const{scaleX:n,scaleY:i,x:o,y:a}=t,s=e.left+o+(1-n)*parseFloat(r),l=e.top+a+(1-i)*parseFloat(r.slice(r.indexOf(" ")+1)),u=n?e.width*n: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 tL(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 rL=class{constructor(e){this.element=e,this.initial=new Map}set(e,t=""){const{element:r}=this;if(tL(r))for(const[n,i]of Object.entries(e)){const e=`${t}${n}`;this.initial.has(e)||this.initial.set(e,r.style.getPropertyValue(e)),r.style.setProperty(e,"string"==typeof i?i:`${i}px`)}}remove(e,t=""){const{element:r}=this;if(tL(r))for(const n of e){const e=`${t}${n}`;r.style.removeProperty(e)}}reset(){const{element:e}=this;if(tL(e)){for(const[t,r]of this.initial)e.style.setProperty(t,r);""===e.getAttribute("style")&&e.removeAttribute("style")}}};function nL(e){return!!e&&(e instanceof OR(e).Element||kR(e)&&e.nodeType===Node.ELEMENT_NODE)}function iL(e){if(!e)return!1;const{KeyboardEvent:t}=OR(e.target);return e instanceof t}var oL={};function aL(e){const t=null==oL[e]?0:oL[e]+1;return oL[e]=t,`${e}-${t}`}var sL=e=>{var t;return null!=(t=(({dragOperation:e,droppable:t})=>{const r=e.position.current;if(!r)return null;const{id:n}=t;if(!t.shape)return null;if(t.shape.containsPoint(r))return{id:n,value:1/XI.distance(t.shape.center,r),type:sP.PointerIntersection,priority:aP.High};return null})(e))?t:(({dragOperation:e,droppable:t})=>{const{shape:r}=e;if(!t.shape||!(null==r?void 0:r.current))return null;const n=r.current.intersectionArea(t.shape);if(n){const{position:i}=e,o=XI.distance(t.shape.center,i.current),a=n/(r.current.area+t.shape.area-n)/o;return{id:t.id,value:a,type:sP.ShapeIntersection,priority:aP.Normal}}return null})(e)},lL=e=>{const{dragOperation:t,droppable:r}=e,{shape:n,position:i}=t;if(!r.shape)return null;const o=n?JI.from(n.current.boundingRectangle).corners:void 0,a=JI.from(r.shape.boundingRectangle).corners.reduce((e,t,r)=>{var n;return e+XI.distance(XI.from(t),null!=(n=null==o?void 0:o[r])?n:i.current)},0),s=a/4;return{id:r.id,value:1/s,type:sP.Collision,priority:aP.Normal}},uL=Object.create,cL=Object.defineProperty,dL=Object.defineProperties,pL=Object.getOwnPropertyDescriptor,fL=Object.getOwnPropertyDescriptors,hL=Object.getOwnPropertySymbols,mL=Object.prototype.hasOwnProperty,gL=Object.prototype.propertyIsEnumerable,vL=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),yL=e=>{throw TypeError(e)},bL=(e,t,r)=>t in e?cL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,xL=(e,t)=>{for(var r in t||(t={}))mL.call(t,r)&&bL(e,r,t[r]);if(hL)for(var r of hL(t))gL.call(t,r)&&bL(e,r,t[r]);return e},SL=(e,t)=>dL(e,fL(t)),wL=(e,t)=>cL(e,"name",{value:t,configurable:!0}),CL=(e,t)=>{var r={};for(var n in e)mL.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&hL)for(var n of hL(e))t.indexOf(n)<0&&gL.call(e,n)&&(r[n]=e[n]);return r},EL=e=>{var t;return[,,,uL(null!=(t=null==e?void 0:e[vL("metadata")])?t:null)]},IL=["class","method","getter","setter","accessor","field","value","get","set"],DL=e=>void 0!==e&&"function"!=typeof e?yL("Function expected"):e,PL=(e,t,r,n,i)=>({kind:IL[e],name:t,metadata:n,addInitializer:e=>r._?yL("Already initialized"):i.push(DL(e||null))}),RL=(e,t)=>bL(t,vL("metadata"),e[3]),ML=(e,t,r,n)=>{for(var i=0,o=e[t>>1],a=o&&o.length;i<a;i++)1&t?o[i].call(r):n=o[i].call(r,n);return n},LL=(e,t,r,n,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=IL[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)&&pL(d<4?i:{get[r](){return OL(this,o)},set[r](e){return TL(this,o,e)}},r));d?f&&d<4&&wL(o,(d>2?"set ":d>1?"get ":"")+r):wL(i,r);for(var b=n.length-1;b>=0;b--)u=PL(d,r,l={},e[3],v),d&&(u.static=p,u.private=f,c=u.access={has:f?e=>kL(i,e):e=>r in e},3^d&&(c.get=f?e=>(1^d?OL:NL)(e,i,4^d?o:y.get):e=>e[r]),d>2&&(c.set=f?(e,t)=>TL(e,i,t,4^d?o:y.set):(e,t)=>e[r]=t)),s=(0,n[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?DL(s)&&(d>4?g.unshift(s):d?f?o=s:y[m]=s:i=s):"object"!=typeof s||null===s?yL("Object expected"):(DL(a=s.get)&&(y.get=a),DL(a=s.set)&&(y.set=a),DL(a=s.init)&&g.unshift(a));return d||RL(e,i),y&&cL(i,r,y),f?4^d?o:y:i},AL=(e,t,r)=>t.has(e)||yL("Cannot "+r),kL=(e,t)=>Object(t)!==t?yL('Cannot use the "in" operator on this value'):e.has(t),OL=(e,t,r)=>(AL(e,t,"read from private field"),r?r.call(e):t.get(e)),qL=(e,t,r)=>t.has(e)?yL("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),TL=(e,t,r,n)=>(AL(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),NL=(e,t,r)=>(AL(e,t,"access private method"),r),_L="button",jL="draggable",FL="dnd-kit-description",zL="dnd-kit-announcement",WL={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."},$L={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:r}){if(e)return r?`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 HL(e){const t=e.tagName.toLowerCase();return["input","select","textarea","a","button"].includes(t)}var VL=["dragover","dragmove"];var BL,GL,UL,YL,KL,XL,JL,ZL,QL,eA,tA,rA,nA,iA=new Map,oA=class extends(KL=zD,YL=[CI],UL=[EI],GL=[EI],BL=[EI],KL){constructor(e){super(e),ML(JL,5,this),qL(this,QL),qL(this,XL,new Set),qL(this,ZL,ML(JL,8,this,new Set)),ML(JL,11,this),this.registerEffect(NL(this,QL,eA))}register(e){return OL(this,XL).add(e),()=>{OL(this,XL).delete(e)}}addRoot(e){return dE(()=>{const t=new Set(this.additionalRoots);t.add(e),this.additionalRoots=t}),()=>{dE(()=>{const t=new Set(this.additionalRoots);t.delete(e),this.additionalRoots=t})}}get sourceRoot(){var e;const{source:t}=this.manager.dragOperation;return GR(null!=(e=null==t?void 0:t.element)?e:null)}get targetRoot(){var e;const{target:t}=this.manager.dragOperation;return GR(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}};JL=EL(KL),XL=new WeakMap,ZL=new WeakMap,QL=new WeakSet,eA=function(){const{roots:e}=this,t=[];for(const r of e)for(const e of OL(this,XL))t.push(NL(this,QL,tA).call(this,r,e));return()=>{for(const e of t)e()}},tA=function(e,t){let r=iA.get(e);r||(r=new Map,iA.set(e,r));let n=r.get(t);if(!n){const i=qR(e)?NL(this,QL,rA).call(this,e,r,t):NL(this,QL,nA).call(this,e,r,t);if(!i)return()=>{};n=i,r.set(t,n)}n.refCount++;let i=!1;return()=>{i||(i=!0,n.refCount--,0===n.refCount&&n.cleanup())}},rA=function(e,t,r){const n=e.createElement("style");n.textContent=r,e.head.prepend(n);const i=new MutationObserver(t=>{for(const r of t)for(const t of Array.from(r.removedNodes))if(t===n)return void e.head.prepend(n)});return i.observe(e.head,{childList:!0}),{refCount:0,cleanup:()=>{i.disconnect(),n.remove(),t.delete(r),0===t.size&&iA.delete(e)}}},nA=function(e,t,r){!("adoptedStyleSheets"in e)||Array.isArray(e.adoptedStyleSheets);const n=e.ownerDocument.defaultView,{CSSStyleSheet:i}=null!=n?n:{};if(!i)return null;const o=new i;return o.replaceSync(r),e.adoptedStyleSheets.push(o),{refCount:0,cleanup:()=>{var n;if(BR(e)&&(null==(n=e.host)?void 0:n.isConnected)){const t=e.adoptedStyleSheets.indexOf(o);-1!==t&&e.adoptedStyleSheets.splice(t,1)}t.delete(r),0===t.size&&iA.delete(e)}}},LL(JL,4,"additionalRoots",YL,oA,ZL),LL(JL,2,"sourceRoot",UL,oA),LL(JL,2,"targetRoot",GL,oA),LL(JL,2,"roots",BL,oA),RL(JL,oA);var aA="data-dnd-",sA=`${aA}dropping`,lA="--dnd-",uA=`${aA}dragging`,cA=`${aA}placeholder`,dA=[uA,cA,"popover","aria-pressed","aria-grabbing"],pA=["view-transition-name"],fA=`\n :is(:root,:host) [${uA}] {\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(${lA}top, 0px) !important;\n left: var(${lA}left, 0px) !important;\n right: unset !important;\n bottom: unset !important;\n width: var(${lA}width, auto);\n max-width: var(${lA}width, auto);\n height: var(${lA}height, auto);\n max-height: var(${lA}height, auto);\n transition: var(${lA}transition) !important;\n }\n\n :is(:root,:host) [${cA}] {\n transition: none;\n }\n\n :is(:root,:host) [${cA}='hidden'] {\n visibility: hidden;\n }\n\n [${uA}] * {\n pointer-events: none !important;\n }\n\n [${uA}]:not([${sA}]) {\n translate: var(${lA}translate) !important;\n }\n\n [${uA}][style*='${lA}scale'] {\n scale: var(${lA}scale) !important;\n transform-origin: var(${lA}transform-origin) !important;\n }\n\n @layer dnd-kit {\n :where([${uA}][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 [${uA}]::backdrop, [${aA}overlay]:not([${uA}]) {\n display: none;\n visibility: hidden;\n }\n`.replace(/\n+/g," ").replace(/\s+/g," ").trim();function hA(e,t="hidden"){return dE(()=>{const{element:r,manager:n}=e;if(!r||!n)return;const i=function(e,t){const r=new Map;for(const n of t)if(n.element&&(e===n.element||e.contains(n.element))){const e=`${aA}${aL("dom-id")}`;n.element.setAttribute(e,""),r.set(n,e)}return r}(r,n.registry.droppables),o=[],a=function(e){const t="input, textarea, select, canvas, [contenteditable]",r=e.cloneNode(!0),n=Array.from(e.querySelectorAll(t));return Array.from(r.querySelectorAll(t)).forEach((e,t)=>{const r=n[t];if(YR(e)&&YR(r)&&("file"!==e.type&&(e.value=r.value),"radio"===e.type&&e.name&&(e.name=`Cloned__${e.name}`)),KR(e)&&KR(r)&&r.width>0&&r.height>0){const t=e.getContext("2d");null==t||t.drawImage(r,0,0)}}),r}(r),{remove:s}=a;return function(e,t,r){for(const[n,i]of e){if(!n.element)continue;const e=`[${i}]`,o=t.matches(e)?t:t.querySelector(e);if(n.element.removeAttribute(i),!o)continue;const a=n.element;n.proxy=o,o.removeAttribute(i),JR.set(a,o),r.push(()=>{JR.delete(a),n.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(cA,t)}(a,t),a.remove=()=>{o.forEach(e=>e()),s.call(a)},a})}function mA(e,t){return e===t||QR(e)===QR(t)}function gA(e){const{target:t}=e;"newState"in e&&"closed"===e.newState&&nL(t)&&t.hasAttribute("popover")&&requestAnimationFrame(()=>DM(t))}function vA(e){return"TR"===e.tagName}var yA,bA,xA,SA,wA,CA,EA,IA=250,DA="ease";var PA=class extends(bA=jD,yA=[CI],bA){constructor(e,t){super(e,t),qL(this,wA),qL(this,SA,ML(xA,8,this)),ML(xA,11,this),this.state={initial:{},current:{}};const r=e.registry.plugins.get(oA),n=null==r?void 0:r.register(fA);if(n){const e=this.destroy.bind(this);this.destroy=()=>{n(),e()}}this.registerEffect(NL(this,wA,CA).bind(this,r)),this.registerEffect(NL(this,wA,EA))}};xA=EL(bA),SA=new WeakMap,wA=new WeakSet,CA=function(e){const{overlay:t}=this;if(!t||!e)return;const r=GR(t);return r?e.addRoot(r):void 0},EA=function(){var e,t,r;const{state:n,manager:i,options:o}=this,{dragOperation:a}=i,{position:s,source:l,status:u}=a;if(u.idle)return n.current={},void(n.initial={});if(!l)return;const{element:c,feedback:d}=l;if(!c||"none"===d||!u.initialized||u.initializing)return;const{initial:p}=n,f=null!=(e=this.overlay)?e:c,h=FM(f),m=FM(c),g=!mA(c,f),v=new eL(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 rL(f),{transition:I,translate:D,boxSizing:P,paddingBlockStart:R,paddingBlockEnd:M,paddingInlineStart:L,paddingInlineEnd:A,borderInlineStartWidth:k,borderInlineEndWidth:O,borderBlockStartWidth:q,borderBlockEndWidth:T}=TM(c),N="clone"===d,_="content-box"===P,j=_?parseInt(L)+parseInt(A)+parseInt(k)+parseInt(O):0,F=_?parseInt(R)+parseInt(M)+parseInt(q)+parseInt(T):0,z="move"===d||this.overlay?null:hA(l,N?"clone":"hidden"),W=dE(()=>iL(i.dragOperation.activatorEvent));if("none"!==D){const e=WM(D);e&&!p.translate&&(p.translate=e)}if(!p.transformOrigin){const e=dE(()=>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:r,y:n}=$;p.coordinates.x+=(x*e-x)*r,p.coordinates.y+=(S*t-S)*n}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(uA,"true");const Z=dE(()=>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,re=VR();if(E.set({width:x-j,height:S-F,top:J+re.y,left:X+re.x,translate:`${ee}px ${te}px 0`,transition:I?`${I}, translate 0ms linear`:"",scale:g?`${y} ${b}`:"","transform-origin":`${100*$.x}% ${100*$.y}%`},lA),z&&(c.insertAdjacentElement("afterend",z),null==o?void 0:o.rootElement)){("function"==typeof o.rootElement?o.rootElement(l):o.rootElement).appendChild(c)}let ne,ie,oe;IM(f)&&(f.hasAttribute("popover")||f.setAttribute("popover","manual"),DM(f),f.addEventListener("beforetoggle",gA));const ae=(se={placeholder:z,element:c,feedbackElement:f,frameTransform:h,transformOrigin:$,width:x,height:S,top:w,left:C,widthOffset:j,heightOffset:F,delta:K,styles:E,dragOperation:a,getElementMutationObserver:()=>ne,getSavedCellWidths:()=>oe,setSavedCellWidths:e=>{oe=e}},new ResizeObserver(()=>{var e,t;const r=new eL(se.placeholder,{frameTransform:se.frameTransform,ignoreTransforms:!0}),n=null!=(e=se.transformOrigin)?e:{x:1,y:1},i=(se.width-r.width)*n.x+se.delta.x,o=(se.height-r.height)*n.y+se.delta.y,a=VR();if(se.styles.set({width:r.width-se.widthOffset,height:r.height-se.heightOffset,top:se.top+o+a.y,left:se.left+i+a.x},lA),null==(t=se.getElementMutationObserver())||t.takeRecords(),vA(se.element)&&vA(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[r,n]of e.entries()){const e=t[r];n.style.width=`${e.getBoundingClientRect().width}px`}}se.dragOperation.shape=new eL(se.feedbackElement)}));var se;const le=new eL(f);dE(()=>a.shape=le);const ue=OR(f),ce=e=>{this.manager.actions.stop({event:e})},de=UR(ue);W&&ue.addEventListener("resize",ce),"idle"===dE(()=>l.status)&&requestAnimationFrame(()=>l.status="dragging"),z&&(ae.observe(z),ne=function(e,t,r){const n=new MutationObserver(n=>{let i=!1;for(const r of n){if(r.target!==e){i=!0;continue}if("attributes"!==r.type)continue;const n=r.attributeName;if(n.startsWith("aria-")||dA.includes(n))continue;const o=e.getAttribute(n);if("style"===n){if(tL(e)&&tL(t)){const r=e.style;for(const e of Array.from(t.style))""===r.getPropertyValue(e)&&t.style.removeProperty(e);for(const e of Array.from(r)){if(pA.includes(e)||e.startsWith(lA))continue;const n=r.getPropertyValue(e);t.style.setProperty(e,n)}}}else null!==o?t.setAttribute(n,o):t.removeAttribute(n)}i&&r&&(t.innerHTML=e.innerHTML)});return n.observe(e,{attributes:!0,subtree:!0,childList:!0}),n}(c,z,N),ie=function(e,t,r){const n=new MutationObserver(n=>{for(const i of n)if(0!==i.addedNodes.length)for(const n of Array.from(i.addedNodes)){if(n.contains(e)&&e.nextElementSibling!==t)return e.insertAdjacentElement("afterend",t),void DM(r);if(n.contains(t)&&t.previousElementSibling!==e)return t.insertAdjacentElement("beforebegin",e),void DM(r)}});return n.observe(e.ownerDocument.body,{childList:!0,subtree:!0}),n}(c,z,f));const pe=null==(r=i.dragOperation.source)?void 0:r.id,fe=()=>{var e;if(!W||null==pe)return;const t=i.registry.draggables.get(pe),r=null!=(e=null==t?void 0:t.handle)?e:null==t?void 0:t.element;TR(r)&&r.focus()},he=()=>{var e;if(null==ne||ne.disconnect(),null==ie||ie.disconnect(),ae.disconnect(),ue.removeEventListener("resize",ce),IM(f)&&(f.removeEventListener("beforetoggle",gA),f.removeAttribute("popover")),f.removeAttribute(uA),E.reset(),oe&&vA(c)){const t=Array.from(c.cells);for(const[r,n]of t.entries())n.style.width=null!=(e=oe[r])?e:""}l.status="idle";const t=null!=n.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=DI(()=>{var e;const{transform:t,status:r}=a;if((t.x||t.y||n.current.translate)&&r.dragging){const r=null!=(e=p.translate)?e:{x:0,y:0},i={x:t.x/h.scaleX+r.x,y:t.y/h.scaleY+r.y},o=n.current.translate,s=dE(()=>a.modifiers),l=dE(()=>{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`},lA),null==ne||ne.takeRecords(),l&&l!==le&&o&&!s.length){const e=XI.delta(i,o);a.shape=JI.from(l.boundingRectangle).translate(e.x*h.scaleX,e.y*h.scaleY)}else a.shape=new eL(f);n.current.translate=i}},function(){if(a.status.dropped){this.dispose(),l.status="dropping";const e=void 0!==ge.dropAnimation?ge.dropAnimation:me;let t=n.current.translate;const r=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,r,n,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=IA,easing:s=DA}=null!=o?o:{};DM(e.feedbackElement);const[,l]=null!=(t=MR(e.feedbackElement,e=>"translate"in e))?t:[];null==l||l.pause();const u=null!=(r=e.placeholder)?r:e.element,c={frameTransform:mA(e.feedbackElement,u)?null:void 0},d=new eL(e.feedbackElement,c),p=null!=(n=WM(TM(e.feedbackElement).translate))?n:e.translate,f=new eL(u,c),h=JI.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},lA),e.feedbackElement.setAttribute(sA,""),null==(i=e.getElementMutationObserver())||i.takeRecords(),YM({element:e.feedbackElement,keyframes:SL(xL(xL({},v),y),{translate:[`${p.x}px ${p.y}px 0`,`${m}px ${g}px 0`]}),options:{duration:UR(OR(e.feedbackElement))?0:e.moved||e.feedbackElement!==e.element?a:0,easing:s}}).then(()=>{e.feedbackElement.removeAttribute(sA),null==l||l.finish(),e.cleanup(),requestAnimationFrame(e.restoreFocus)})}({element:c,feedbackElement:f,placeholder:z,translate:t,moved:r,transition:I,alignment:l.alignment,styles:E,animation:null!=e?e:void 0,getElementMutationObserver:()=>ne,cleanup:he,restoreFocus:fe})})}});return()=>{he(),ve()}},LL(xA,4,"overlay",yA,PA,SA),RL(xA,PA),PA.configure=ND(PA);var RA,MA,LA,AA,kA,OA,qA,TA=PA,NA=!0;LA=[CI],AA=HM.Forward,RA=[CI],MA=HM.Reverse;var _A=class{constructor(){qL(this,OA,ML(kA,8,this,NA)),ML(kA,11,this),qL(this,qA,ML(kA,12,this,NA)),ML(kA,15,this)}isLocked(e){return e!==HM.Idle&&(null==e?this[HM.Forward]===NA&&this[HM.Reverse]===NA:this[e]===NA)}unlock(e){e!==HM.Idle&&(this[e]=false)}};kA=EL(null),OA=new WeakMap,qA=new WeakMap,LL(kA,4,AA,LA,_A,OA),LL(kA,4,MA,RA,_A,qA),RL(kA,_A);var jA,FA,zA,WA,$A,HA,VA=[HM.Forward,HM.Reverse],BA=class{constructor(){this.x=new _A,this.y=new _A}isLocked(){return this.x.isLocked()&&this.y.isLocked()}},GA=class extends jD{constructor(e){super(e);const t=SE(new BA);let r=null;this.signal=t,AE(()=>{const{status:n}=e.dragOperation;if(!n.initialized)return r=null,void(t.value=new BA);const{delta:i}=e.dragOperation.position;if(r){const e={x:UA(i.x,r.x),y:UA(i.y,r.y)},n=t.peek();uE(()=>{for(const t of aD)for(const r of VA)e[t]===r&&n[t].unlock(r);t.value=n})}r=i})}get current(){return this.signal.peek()}};function UA(e,t){return Math.sign(e-t)}var YA=class extends(FA=zD,jA=[CI],FA){constructor(e){super(e),qL(this,WA,ML(zA,8,this,!1)),ML(zA,11,this),qL(this,$A),qL(this,HA,()=>{if(!OL(this,$A))return;const{element:e,by:t}=OL(this,$A);t.y&&(e.scrollTop+=t.y),t.x&&(e.scrollLeft+=t.x)}),this.scroll=e=>{var t;if(this.disabled)return!1;const r=this.getScrollableElements();if(!r)return TL(this,$A,void 0),!1;const{position:n}=this.manager.dragOperation,i=null==n?void 0:n.current;if(i){const{by:n}=null!=e?e:{},o=n?{x:KA(n.x),y:KA(n.y)}:void 0,a=o?void 0:this.scrollIntentTracker.current;if(null==a?void 0:a.isLocked())return!1;for(const e of r){const r=MM(e,n);if(r.x||r.y){const{speed:r,direction:s}=GM(e,i,o);if(a)for(const e of aD)a[e].isLocked(s[e])&&(r[e]=0,s[e]=0);if(s.x||s.y){const{x:i,y:o}=null!=n?n:s,a=i*r.x,l=o*r.y;if(a||l){const r=null==(t=OL(this,$A))?void 0:t.by;if(this.autoScrolling&&r){if(r.x&&!a||r.y&&!l)continue}return TL(this,$A,{element:e,by:{x:a,y:l}}),AM.schedule(OL(this,HA)),!0}}}}}return TL(this,$A,void 0),!1};let t=null,r=null;const n=SI(()=>{const{position:r,source:n}=e.dragOperation;if(!r)return null;const i=XR(GR(null==n?void 0:n.element),r.current);return i&&(t=i),null!=i?i:t}),i=SI(()=>{const t=n.value,{documentElement:i}=_R(t);if(!t||t===i){const{target:t}=e.dragOperation,n=null==t?void 0:t.element;if(n){const e=jM(n,{excludeElement:!1});return r=e,e}}if(t){const e=jM(t,{excludeElement:!1});return this.autoScrolling&&r&&e.size<(null==r?void 0:r.size)?r:(r=e,e)}return r=null,null},wI);this.getScrollableElements=()=>i.value,this.scrollIntentTracker=new GA(e),this.destroy=e.monitor.addEventListener("dragmove",t=>{!this.disabled&&!t.defaultPrevented&&iL(e.dragOperation.activatorEvent)&&t.by&&this.scroll({by:t.by})&&t.preventDefault()})}};function KA(e){return e>0?HM.Forward:e<0?HM.Reverse:HM.Idle}zA=EL(FA),WA=new WeakMap,$A=new WeakMap,HA=new WeakMap,LL(zA,4,"autoScrolling",jA,YA,WA),RL(zA,YA);var XA,JA=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()}),ZA=class extends jD{constructor(e,t){super(e);const r=e.registry.plugins.get(YA);if(!r)throw new Error("AutoScroller plugin depends on Scroller plugin");this.destroy=AE(()=>{if(this.disabled)return;const{position:t,status:n}=e.dragOperation;if(n.dragging){if(r.scroll()){r.autoScrolling=!0;const e=setInterval(()=>JA.schedule(r.scroll),10);return()=>{clearInterval(e)}}r.autoScrolling=!1}})}},QA={capture:!0,passive:!0},ek=class extends zD{constructor(e){super(e),qL(this,XA),this.handleScroll=()=>{null==OL(this,XA)&&TL(this,XA,setTimeout(()=>{this.manager.collisionObserver.forceUpdate(!1),TL(this,XA,void 0)},50))};const{dragOperation:t}=this.manager;this.destroy=AE(()=>{var e,r,n;if(t.status.dragging){const i=null!=(n=null==(r=null==(e=t.source)?void 0:e.element)?void 0:r.ownerDocument)?n:document;return i.addEventListener("scroll",this.handleScroll,QA),()=>{i.removeEventListener("scroll",this.handleScroll,QA)}}})}};XA=new WeakMap;function tk(){var e;null==(e=document.getSelection())||e.removeAllRanges()}var rk,nk=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 r;const n=null!=(r=t.handle)?r:t.element;return e.target!==n}}),ik=class extends YP{constructor(e,t){super(e),this.manager=e,this.options=t,qL(this,rk,[]),this.listeners=new ZR,this.handleSourceKeyDown=(e,t,r)=>{if(this.disabled||e.defaultPrevented)return;if(!nL(e.target))return;if(t.disabled)return;const{keyboardCodes:n=nk.keyboardCodes,preventActivation:i=nk.preventActivation}=null!=r?r:{};n.start.includes(e.code)&&this.manager.dragOperation.status.idle&&((null==i?void 0:i(e,t))||this.handleStart(e,t,r))}}bind(e,t=this.options){const r=AE(()=>{var r;const n=null!=(r=e.handle)?r:e.element,i=r=>{iL(r)&&this.handleSourceKeyDown(r,e,t)};if(n)return n.addEventListener("keydown",i),()=>{n.removeEventListener("keydown",i)}});return r}handleStart(e,t,r){const{element:n}=t;if(!n)throw new Error("Source draggable does not have an associated element");e.preventDefault(),e.stopImmediatePropagation(),UM(n);const{center:i}=new eL(n);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=_R(n),a=[this.listeners.bind(o,[{type:"keydown",listener:e=>this.handleKeyDown(e,t,r),options:{capture:!0}}])];OL(this,rk).push(...a)}handleKeyDown(e,t,r){const{keyboardCodes:n=nk.keyboardCodes}=null!=r?r:{};if(sk(e,[...n.end,...n.cancel])){e.preventDefault();const t=sk(e,n.cancel);return void this.handleEnd(e,t)}sk(e,n.up)?this.handleMove("up",e):sk(e,n.down)&&this.handleMove("down",e),sk(e,n.left)?this.handleMove("left",e):sk(e,n.right)&&this.handleMove("right",e)}handleEnd(e,t){this.manager.actions.stop({event:e,canceled:t}),this.cleanup()}handleMove(e,t){var r,n;const{shape:i}=this.manager.dragOperation,o=t.shiftKey?5:1;let a={x:0,y:0},s=null!=(n=null==(r=this.options)?void 0:r.offset)?n:nk.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(ZA);!1===(null==e?void 0:e.disabled)&&(e.disable(),OL(this,rk).push(()=>{e.enable()}))}cleanup(){OL(this,rk).forEach(e=>e()),TL(this,rk,[])}destroy(){this.cleanup(),this.listeners.clear()}};rk=new WeakMap,ik.configure=ND(ik),ik.defaults=nk;var ok,ak=ik;function sk(e,t){return t.includes(e.code)}var lk,uk;ok=new WeakMap;lk=new WeakMap,uk=new WeakMap;var ck=class{};ck.Delay=class extends XP{constructor(){super(...arguments),qL(this,lk),qL(this,uk)}onEvent(e){switch(e.type){case"pointerdown":TL(this,uk,zR(e)),TL(this,lk,setTimeout(()=>this.activate(e),this.options.value));break;case"pointermove":if(!OL(this,uk))return;const{x:t,y:r}=zR(e);eD({x:t-OL(this,uk).x,y:r-OL(this,uk).y},this.options.tolerance)&&this.abort();break;case"pointerup":this.abort()}}abort(){OL(this,lk)&&(clearTimeout(OL(this,lk)),TL(this,uk,void 0),TL(this,lk,void 0))}},ck.Distance=class extends XP{constructor(){super(...arguments),qL(this,ok)}onEvent(e){switch(e.type){case"pointerdown":TL(this,ok,zR(e));break;case"pointermove":if(!OL(this,ok))return;const{x:t,y:r}=zR(e),n={x:t-OL(this,ok).x,y:r-OL(this,ok).y},{tolerance:i}=this.options;if(i&&eD(n,i))return void this.abort();eD(n,this.options.value)&&this.activate(e);break;case"pointerup":this.abort()}}abort(){TL(this,ok,void 0)}};var dk,pk=Object.freeze({activationConstraints(e,t){var r;const{pointerType:n,target:i}=e;if("mouse"!==n||!nL(i)||t.handle!==i&&!(null==(r=t.handle)?void 0:r.contains(i)))return"touch"===n?[new ck.Delay({value:250,tolerance:5})]:function(e){if(!nL(e))return!1;const{tagName:t}=e;return"INPUT"===t||"TEXTAREA"===t||(r=e).hasAttribute("contenteditable")&&"false"!==r.getAttribute("contenteditable");var r}(i)&&!e.defaultPrevented?[new ck.Delay({value:200,tolerance:0})]:[new ck.Delay({value:200,tolerance:10}),new ck.Distance({value:5})]},preventActivation(e,t){var r;const{target:n}=e;return n!==t.element&&(n!==t.handle&&(!!nL(n)&&(!(null==(r=t.handle)?void 0:r.contains(n))&&Boolean(n.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 ')))))}}),fk=class extends YP{constructor(e,t){super(e),this.manager=e,this.options=t,qL(this,dk,new Set),this.listeners=new ZR,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,r=this.options){const{activationConstraints:n=pk.activationConstraints}=null!=r?r:{};return"function"==typeof n?n(e,t):n}bind(e,t=this.options){const r=AE(()=>{var r;const n=new AbortController,{signal:i}=n,o=r=>{(function(e){if(!e)return!1;const{PointerEvent:t}=OR(e.target);return e instanceof t})(r)&&this.handlePointerDown(r,e,t)};let a=[null!=(r=e.handle)?r:e.element];(null==t?void 0:t.activatorElements)&&(a=Array.isArray(t.activatorElements)?t.activatorElements:t.activatorElements(e));for(const e of a)e&&(yk(e.ownerDocument.defaultView),e.addEventListener("pointerdown",o,{signal:i}));return()=>n.abort()});return r}handlePointerDown(e,t,r){if(this.disabled||!e.isPrimary||0!==e.button||!nL(e.target)||t.disabled||function(e){return"sensor"in e}(e)||!this.manager.dragOperation.status.idle)return;const{preventActivation:n=pk.preventActivation}=null!=r?r:{};if(null==n?void 0:n(e,t))return;const{target:i}=e,o=TR(i)&&i.draggable&&"true"===i.getAttribute("draggable"),a=FM(t.element),{x:s,y:l}=zR(e);this.initialCoordinates={x:s*a.scaleX+a.x,y:l*a.scaleY+a.y};const u=this.activationConstraints(e,t,r);e.sensor=this;const c=new KP(u,e=>this.handleStart(t,e));c.signal.onabort=()=>this.handleCancel(e),c.onEvent(e),this.controller=c;const d=$R(),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:mk,options:{capture:!0}}]);OL(this,dk).add(()=>{p(),this.initialCoordinates=void 0})}handlePointerMove(e,t){var r,n;if(!1!==(null==(r=this.controller)?void 0:r.activated)){if(this.manager.dragOperation.status.dragging){const r=zR(e),n=FM(t.element);r.x=r.x*n.scaleX+n.x,r.y=r.y*n.scaleY+n.y,e.preventDefault(),e.stopPropagation(),this.latest.event=e,this.latest.coordinates=r,AM.schedule(this.handleMove)}}else null==(n=this.controller)||n.onEvent(e)}handlePointerUp(e){const{status:t}=this.manager.dragOperation;if(!t.idle){e.preventDefault(),e.stopPropagation();const r=!t.initialized;this.manager.actions.stop({event:e,canceled:r})}this.cleanup()}handleKeyDown(e){"Escape"===e.key&&(e.preventDefault(),this.handleCancel(e))}handleStart(e,t){const{manager:r,initialCoordinates:n}=this;if(!n||!r.dragOperation.status.idle)return;if(t.defaultPrevented)return;if(r.actions.start({coordinates:n,event:t,source:e}).signal.aborted)return this.cleanup();t.preventDefault();const i=_R(t.target).body;i.setPointerCapture(t.pointerId);const o=nL(t.target)?[t.target,i]:i,a=this.listeners.bind(o,[{type:"touchmove",listener:mk,options:{passive:!1}},{type:"click",listener:mk},{type:"contextmenu",listener:mk},{type:"keydown",listener:this.handleKeyDown}]);OL(this,dk).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},OL(this,dk).forEach(e=>e()),OL(this,dk).clear()}destroy(){this.cleanup(),this.listeners.clear()}};dk=new WeakMap,fk.configure=ND(fk),fk.defaults=pk;var hk=fk;function mk(e){e.preventDefault()}function gk(){}var vk=new WeakSet;function yk(e){e&&!vk.has(e)&&(e.addEventListener("touchmove",gk,{capture:!1,passive:!1}),vk.add(e))}var bk,xk,Sk,wk,Ck,Ek,Ik,Dk,Pk,Rk,Mk,Lk,Ak,kk,Ok,qk,Tk,Nk,_k={modifiers:[],plugins:[class extends jD{constructor(e,t){super(e);const{id:r,idPrefix:{description:n=FL,announcement:i=zL}={},announcements:o=$L,screenReaderInstructions:a=WL,debounce:s=500}=null!=t?t:{},l=r?`${n}-${r}`:aL(n),u=r?`${i}-${r}`:aL(i);let c,d,p,f;const h=(e=f)=>{p&&e&&(null==p?void 0:p.nodeValue)!==e&&(p.nodeValue=e)},m=()=>AM.schedule(h),g=function(e,t){let r;const n=()=>{clearTimeout(r),r=setTimeout(e,t)};return n.cancel=()=>clearTimeout(r),n}(m,s),v=Object.entries(o).map(([e,t])=>this.manager.monitor.addEventListener(e,(r,n)=>{const i=p;if(!i)return;const o=null==t?void 0:t(r,n);o&&i.nodeValue!==o&&(f=o,VL.includes(e)?g():(m(),g.cancel()))})),y=()=>{let e=[];(null==c?void 0:c.isConnected)||(c=function(e,t){const r=document.createElement("div");return r.id=e,r.style.setProperty("display","none"),r.textContent=t,r}(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 r=null!=(e=t.handle)?e:t.element;if(r){c&&d||b.add(y),HL(r)&&!HR()||r.hasAttribute("tabindex")||b.add(()=>r.setAttribute("tabindex","0")),r.hasAttribute("role")||"button"===r.tagName.toLowerCase()||b.add(()=>r.setAttribute("role",_L)),r.hasAttribute("aria-roledescription")||b.add(()=>r.setAttribute("aria-roledescription",jL)),r.hasAttribute("aria-describedby")||b.add(()=>r.setAttribute("aria-describedby",l));for(const e of["aria-pressed","aria-grabbed"]){const n=String(t.isDragging);r.getAttribute(e)!==n&&b.add(()=>r.setAttribute(e,n))}const e=String(t.disabled);r.getAttribute("aria-disabled")!==e&&b.add(()=>r.setAttribute("aria-disabled",e))}}b.size>0&&AM.schedule(x)}),this.destroy=()=>{super.destroy(),null==c||c.remove(),null==d||d.remove(),v.forEach(e=>e())}}},ZA,class extends jD{constructor(e,t){super(e,t),this.manager=e;const r=SI(()=>{var e;return _R(null==(e=this.manager.dragOperation.source)?void 0:e.element)});this.destroy=AE(()=>{var e;const{dragOperation:t}=this.manager,{cursor:n="grabbing",nonce:i}=null!=(e=this.options)?e:{};if(t.status.initialized){const e=r.value,t=e.createElement("style");return i&&t.setAttribute("nonce",i),t.textContent=`* { cursor: ${n} !important; }`,e.head.appendChild(t),()=>t.remove()}})}},TA,class extends jD{constructor(e,t){super(e,t),this.manager=e,this.destroy=AE(()=>{var e;const{dragOperation:t}=this.manager,{nonce:r}=null!=(e=this.options)?e:{};if(t.status.initialized){const e=document.createElement("style");return r&&e.setAttribute("nonce",r),e.textContent="* { user-select: none !important; -webkit-user-select: none !important; }",document.head.appendChild(e),tk(),document.addEventListener("selectionchange",tk,{capture:!0}),()=>{document.removeEventListener("selectionchange",tk,{capture:!0}),e.remove()}}})}}],sensors:[hk,ak]},jk=class extends SR{constructor(e={}){const t=xR(e.plugins,_k.plugins),r=xR(e.sensors,_k.sensors),n=xR(e.modifiers,_k.modifiers);super(SL(xL({},e),{plugins:[ek,YA,oA,...t],sensors:r,modifiers:n}))}},Fk=class extends(wk=BP,Sk=[CI],xk=[CI],bk=[CI],wk){constructor(e,t){var r=e,{element:n,effects:i=()=>[],handle:o,feedback:a="default"}=r,s=CL(r,["element","effects","handle","feedback"]);super(xL({effects:()=>[...i(),()=>{var e,t;const{manager:r}=this;if(!r)return;const n=(null!=(t=null==(e=this.sensors)?void 0:e.map(_D))?t:[...r.sensors]).map(e=>{const t=e instanceof YP?e:r.registry.register(e.plugin),n=e instanceof YP?void 0:e.options;return t.bind(this,n)});return function(){n.forEach(e=>e())}}]},s),t),qL(this,Ek,ML(Ck,8,this)),ML(Ck,11,this),qL(this,Ik,ML(Ck,12,this)),ML(Ck,15,this),qL(this,Dk,ML(Ck,16,this)),ML(Ck,19,this),this.element=n,this.handle=o,this.feedback=a}};Ck=EL(wk),Ek=new WeakMap,Ik=new WeakMap,Dk=new WeakMap,LL(Ck,4,"handle",Sk,Fk,Ek),LL(Ck,4,"element",xk,Fk,Ik),LL(Ck,4,"feedback",bk,Fk,Dk),RL(Ck,Fk);var zk=class extends(Mk=GP,Rk=[CI],Pk=[CI],Mk){constructor(e,t){var r=e,{element:n,effects:i=()=>[]}=r,o=CL(r,["element","effects"]);const{collisionDetector:a=sL}=o,s=e=>{const{manager:t,element:r}=this;if(!r||null===e)return void(this.shape=void 0);if(!t)return;const n=new eL(r),i=dE(()=>this.shape);return n&&(null==i?void 0:i.equals(n))?i:(this.shape=n,n)},l=SE(!1);super(SL(xL({},o),{collisionDetector:a,effects:()=>[...i(),()=>{const{element:e,manager:t}=this;if(!t)return;const{dragOperation:r}=t,{source:n}=r;l.value=Boolean(n&&r.status.initialized&&e&&!this.disabled&&this.accepts(n))},()=>{const{element:e}=this;if(l.value&&e){const t=new EM(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),qL(this,Tk),qL(this,Ak,ML(Lk,8,this)),ML(Lk,11,this),qL(this,Nk,ML(Lk,12,this)),ML(Lk,15,this),this.element=n,this.refreshShape=()=>s()}set element(e){TL(this,Tk,e,qk)}get element(){var e;return null!=(e=this.proxy)?e:OL(this,Tk,Ok)}};function Wk(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}Lk=EL(Mk),Ak=new WeakMap,Tk=new WeakSet,Nk=new WeakMap,kk=LL(Lk,20,"#element",Rk,Tk,Ak),Ok=kk.get,qk=kk.set,LL(Lk,4,"proxy",Pk,zk,Nk),RL(Lk,zk);var $k="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?g:d;function Hk(){const e=m(0)[1];return f(()=>{e(e=>e+1)},[e])}function Vk(e,t=[],r=!1){const n=l(e);return n.current=e,function(e,t=!1){const r=l(e.peek()),n=l(!1),i=Hk();return $k(()=>AE(()=>{const o=r.current,a=e.value;if(o!==a){if(r.current=a,!n.current)return;t?D(i):i()}}),[e,t,i]),{get value(){return n.current=!0,e.peek()}}}(v(()=>SI(()=>n.current()),t),r)}function Bk(e,t){const r=l(new Map),n=Hk();return $k(()=>{if(e)return AE(()=>{var i;let o=!1,a=!1;for(const n of r.current){const[s]=n,l=dE(()=>n[1]),u=e[s];l!==u&&(o=!0,r.current.set(s,u),a=null!=(i=null==t?void 0:t(s,l,u))&&i)}o&&(a?D(n):n())});r.current.clear()},[e]),v(()=>e?new Proxy(e,{get(e,t){const n=e[t];return r.current.set(t,n),n}}):e,[e])}function Gk(e,t){e()}function Uk(e){const t=l(e);return $k(()=>{t.current=e},[e]),t}function Yk(e,t,r=d,n=Object.is){const i=l(e);r(()=>{const r=i.current;n(e,r)||(i.current=e,t(e,r))},[t,e])}function Kk(e,t){const r=l(Wk(e));$k(()=>{const n=Wk(e);n!==r.current&&(r.current=n,t(n))})}var Xk=Object.defineProperty,Jk=Object.defineProperties,Zk=Object.getOwnPropertyDescriptors,Qk=Object.getOwnPropertySymbols,eO=Object.prototype.hasOwnProperty,tO=Object.prototype.propertyIsEnumerable,rO=(e,t,r)=>t in e?Xk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,nO=new jk,iO=u(nO),oO=b(x(({children:e},t)=>{const[r,n]=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(),n(e=>e+1)})}}),[]);return $k(()=>{var e;null==(e=o.current)||e.call(o),i.current=null},[e,r]),w(t,()=>a),null})),aO=[void 0,wI];function sO(e){var t=e,{children:r,onCollision:n,onBeforeDragStart:i,onDragStart:o,onDragMove:a,onDragOver:s,onDragEnd:u}=t,c=((e,t)=>{var r={};for(var n in e)eO.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&Qk)for(var n of Qk(e))t.indexOf(n)<0&&tO.call(e,n)&&(r[n]=e[n]);return r})(t,["children","onCollision","onBeforeDragStart","onDragStart","onDragMove","onDragOver","onDragEnd"]);const p=l(null),{plugins:f,modifiers:h,sensors:m}=c,g=xR(f,_k.plugins),v=xR(m,_k.sensors),b=xR(h,_k.modifiers),x=Uk(i),S=Uk(o),w=Uk(s),C=Uk(a),E=Uk(u),I=Uk(n),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 jk(c)});return d(()=>{if(!p.current)throw new Error("Renderer not found");const{renderer:e,trackRendering:t}=p.current,{monitor:r}=D;D.renderer=e;const n=[r.addEventListener("beforedragstart",e=>{const r=x.current;r&&t(()=>r(e,D))}),r.addEventListener("dragstart",e=>{var t;return null==(t=S.current)?void 0:t.call(S,e,D)}),r.addEventListener("dragover",e=>{const r=w.current;r&&t(()=>r(e,D))}),r.addEventListener("dragmove",e=>{const r=C.current;r&&t(()=>r(e,D))}),r.addEventListener("dragend",e=>{const r=E.current;r&&t(()=>r(e,D))}),r.addEventListener("collision",e=>{var t;return null==(t=I.current)?void 0:t.call(I,e,D)})];return()=>n.forEach(e=>e())},[D]),Yk(g,()=>D&&(D.plugins=g),...aO),Yk(v,()=>D&&(D.sensors=v),...aO),Yk(b,()=>D&&(D.modifiers=b),...aO),io.jsxs(iO.Provider,{value:D,children:[io.jsx(oO,{ref:p,children:r}),r]})}function lO(){return h(iO)}function uO(e){var t;const r=null!=(t=lO())?t:void 0,[n]=m(()=>e(r));return n.manager!==r&&(n.manager=r),$k(n.register,[r,n]),n}function cO({children:e,className:t,dropAnimation:r,style:i,tag:o,disabled:a}){var s;const u=l(null),c=lO(),p=null!=(s=Vk(()=>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 TA);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 TA);return e?(e.dropAnimation=r,()=>{e.dropAnimation=void 0}):void 0},[c,r]);const h=v(()=>{if(!c)return null;const e=new Proxy(c.registry,{get:(e,t)=>"register"===t||"unregister"===t?dO:e[t]});return new Proxy(c,{get:(t,r)=>"registry"===r?e:t[r]})},[c]);return io.jsx(iO.Provider,{value:h,children:n(o||"div",{ref:u,className:t,style:i,"data-dnd-overlay":!0},function(){if(!p||f)return null;if("function"==typeof e)return io.jsx(pO,{source:p,children:e});return e}())})}function dO(){return()=>{}}function pO({children:e,source:t}){return e(Bk(t))}var fO,hO,mO,gO,vO,yO=Object.create,bO=Object.defineProperty,xO=Object.getOwnPropertyDescriptor,SO=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),wO=e=>{throw TypeError(e)},CO=["class","method","getter","setter","accessor","field","value","get","set"],EO=e=>void 0!==e&&"function"!=typeof e?wO("Function expected"):e,IO=(e,t,r,n,i)=>({kind:CO[e],name:t,metadata:n,addInitializer:e=>r._?wO("Already initialized"):i.push(EO(e||null))}),DO=(e,t,r,n,i,o)=>{for(var a,s,l,u,c=7&t,d=CO[c+5],p=e[2]||(e[2]=[]),f=(i=i.prototype,xO(i,r)),h=n.length-1;h>=0;h--)(l=IO(c,r,s={},e[3],p)).static=false,l.private=false,u=l.access={has:e=>r in e},u.get=e=>e[r],a=(0,n[h])(f[d],l),s._=1,EO(a)&&(f[d]=a);return f&&bO(i,r,f),i},PO=(e,t,r)=>t.has(e)||wO("Cannot "+r),RO=class e{constructor(e,t){this.x=e,this.y=t}static delta(t,r){return new e(t.x-r.x,t.y-r.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:r}){return new e(t,r)}},MO=class extends(mO=RI,hO=[EI],fO=[EI],mO){constructor(e){var t,r,n;super(RO.from(e),(e,t)=>RO.equals(e,t)),((e,t,r)=>{for(var n=0,i=e[t>>1],o=i&&i.length;n<o;n++)i[n].call(r)})(vO,5,this),t=this,n=0,(r=gO).has(t)?wO("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(t):r.set(t,n),this.velocity={x:0,y:0}}get delta(){return RO.delta(this.current,this.initial)}get direction(){const{current:e,previous:t}=this;if(!t)return null;const r={x:e.x-t.x,y:e.y-t.y};return r.x||r.y?Math.abs(r.x)>Math.abs(r.y)?r.x>0?"right":"left":r.y>0?"down":"up":null}get current(){return super.current}set current(e){const{current:t}=this,r=RO.from(e),n={x:r.x-t.x,y:r.y-t.y},i=Date.now(),o=i-(PO(a=this,s=gO,"read from private field"),s.get(a));var a,s;const l=e=>Math.round(e/o*100);uE(()=>{((e,t,r)=>{PO(e,t,"write to private field"),t.set(e,r)})(this,gO,i),this.velocity={x:l(n.x),y:l(n.y)},super.current=r})}reset(e=this.defaultValue){super.reset(RO.from(e)),this.velocity={x:0,y:0}}};vO=(e=>{var t;return[,,,yO(null!=(t=null==e?void 0:e[SO("metadata")])?t:null)]})(mO),gO=new WeakMap,DO(vO,2,"delta",hO,MO),DO(vO,2,"direction",fO,MO),((e,t)=>{((e,t,r)=>{t in e?bO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(t,SO("metadata"),e[3])})(vO,MO);var LO=(e=>(e.Horizontal="x",e.Vertical="y",e))(LO||{});Object.values(LO);var AO=e=>{var t;return null!=(t=(({dragOperation:e,droppable:t})=>{const r=e.position.current;if(!r)return null;const{id:n}=t;if(!t.shape)return null;if(t.shape.containsPoint(r))return{id:n,value:1/RO.distance(t.shape.center,r),type:sP.PointerIntersection,priority:aP.High};return null})(e))?t:(({dragOperation:e,droppable:t})=>{const{shape:r}=e;if(!t.shape||!(null==r?void 0:r.current))return null;const n=r.current.intersectionArea(t.shape);if(n){const{position:i}=e,o=RO.distance(t.shape.center,i.current),a=n/(r.current.area+t.shape.area-n)/o;return{id:t.id,value:a,type:sP.ShapeIntersection,priority:aP.Normal}}return null})(e)};function kO(e){const{collisionDetector:t,data:r,disabled:n,element:i,id:o,accept:a,type:s}=e,l=uO(t=>new zk(((e,t)=>Jk(e,Zk(t)))(((e,t)=>{for(var r in t||(t={}))eO.call(t,r)&&rO(e,r,t[r]);if(Qk)for(var r of Qk(t))tO.call(t,r)&&rO(e,r,t[r]);return e})({},e),{register:!1,element:Wk(i)}),t)),u=Bk(l);return Yk(o,()=>l.id=o),Kk(i,e=>l.element=e),Yk(a,()=>l.accept=a,void 0,wI),Yk(t,()=>l.collisionDetector=null!=t?t:AO),Yk(r,()=>r&&(l.data=r)),Yk(n,()=>l.disabled=!0===n),Yk(s,()=>l.type=s),{droppable:u,get isDropTarget(){return u.isDropTarget},ref:f(e=>{var t,r;(e||!(null==(t=l.element)?void 0:t.isConnected)||(null==(r=l.manager)?void 0:r.dragOperation.status.idle))&&(l.element=null!=e?e:void 0)},[l])}}const OO=e=>Array.from({length:e},(e,t)=>t),qO=({id:e,sectionIndex:t,itemIndex:r})=>io.jsx("span",{children:`${e}-${t}-${r}`}),TO=r.memo(()=>{const e=Dw(ZC)??qO,{startSectionIndex:t,startIndex:r,id:n}=Dw(rE)??{};return"number"!=typeof t||"number"!=typeof r||void 0===n?null:io.jsx(cO,{dropAnimation:null,children:io.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:io.jsx(e,{id:n,sectionIndex:t,itemIndex:r})})})}),NO=({sectionIndex:e,itemIndex:t,isDragging:r})=>{const n=Dw(rE),i=n?.toSectionIndex===e,o=n?.startSectionIndex===e,a=t>(n?.startIndex??t)&&e===n?.startSectionIndex?t-1:t;let s=!1;return o&&n.startIndex===a?s=!1:i&&n.toIndex===a&&(s=!0),io.jsx("div",{"data-key":"drop-target-indicator",style:{visibility:s&&!r?"visible":"hidden",padding:0,background:"rgba(64, 64, 64, 1)",borderRadius:2,marginLeft:"4px",width:"calc(100% - 8px)",height:"2px"}})},_O=(e,t)=>e?"2px solid rgba(0, 135, 61, 1)":t?"1px dashed rgba(0, 0, 0, 0.43)":void 0,jO=r.memo(({sectionIndex:e})=>{const t=Dw(BC)[e],r=Dw(GC),n=Dw(UC),i=null!==Dw(rE),o=n(e),a=r({sectionIndex:e}),{ref:s,isDropTarget:l}=kO({id:a,type:"section",accept:"item",collisionPriority:aP.Low,data:{id:a,sectionIndex:e,sectionKey:a}});return t>0?null:io.jsxs(Qu,{ref:s,sx:{margin:"4px",outline:_O(l,i),borderRadius:"4px",boxSizing:"border-box"},children:[io.jsx(Qu,{sx:{position:"relative",top:"4px"},children:io.jsx(NO,{sectionIndex:e,itemIndex:0,isDragging:!1})}),io.jsxs(Qu,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px",padding:"20px 4px"},children:[io.jsx(mu,{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}),io.jsx(mu,{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})]})]})}),FO=r.memo(({id:e,sectionIndex:t})=>{const r=Dw(JC);return void 0===r?null:io.jsx(r,{id:e,sectionIndex:t})});var zO=Object.defineProperty,WO=Object.defineProperties,$O=Object.getOwnPropertyDescriptors,HO=Object.getOwnPropertySymbols,VO=Object.prototype.hasOwnProperty,BO=Object.prototype.propertyIsEnumerable,GO=(e,t,r)=>t in e?zO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,UO=(e,t)=>{for(var r in t||(t={}))VO.call(t,r)&&GO(e,r,t[r]);if(HO)for(var r of HO(t))BO.call(t,r)&&GO(e,r,t[r]);return e},YO=(e,t)=>WO(e,$O(t)),KO=class extends gR{apply({transform:e}){if(!this.options)return e;const{axis:t,value:r}=this.options;return YO(UO({},e),{[t]:r})}};KO.configure=ND(KO);var XO=KO,JO=XO.configure({axis:"x",value:0});XO.configure({axis:"y",value:0});var ZO=class extends gR{apply({transform:e}){var t;const{size:r=20}=null!=(t=this.options)?t:{},n="number"==typeof r?r:r.x,i="number"==typeof r?r:r.y;return YO(UO({},e),{x:Math.ceil(e.x/n)*n,y:Math.ceil(e.y/i)*i})}};ZO.configure=ND(ZO);var QO=Object.create,eq=Object.defineProperty,tq=Object.defineProperties,rq=Object.getOwnPropertyDescriptor,nq=Object.getOwnPropertyDescriptors,iq=Object.getOwnPropertySymbols,oq=Object.prototype.hasOwnProperty,aq=Object.prototype.propertyIsEnumerable,sq=e=>{throw TypeError(e)},lq=(e,t,r)=>t in e?eq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,uq=(e,t)=>{for(var r in t||(t={}))oq.call(t,r)&&lq(e,r,t[r]);if(iq)for(var r of iq(t))aq.call(t,r)&&lq(e,r,t[r]);return e},cq=(e,t)=>tq(e,nq(t)),dq=["class","method","getter","setter","accessor","field","value","get","set"],pq=e=>void 0!==e&&"function"!=typeof e?sq("Function expected"):e,fq=(e,t,r,n,i)=>({kind:dq[e],name:t,metadata:n,addInitializer:e=>r._?sq("Already initialized"):i.push(pq(e||null))}),hq=(e,t,r,n)=>{for(var i=0,o=e[t>>1],a=o&&o.length;i<a;i++)1&t?o[i].call(r):n=o[i].call(r,n);return n},mq=(e,t,r,n,i,o)=>{for(var a,s,l,u,c,d=7&t,p=e.length+1,f=dq[d+5],h=e[p-1]=[],m=e[p]||(e[p]=[]),g=(i=i.prototype,rq({get[r](){return vq(this,o)},set[r](e){return bq(this,o,e)}},r)),v=n.length-1;v>=0;v--)(u=fq(d,r,l={},e[3],m)).static=false,u.private=false,c=u.access={has:e=>r in e},c.get=e=>e[r],c.set=(e,t)=>e[r]=t,s=(0,n[v])({get:g.get,set:g.set},u),l._=1,void 0===s?pq(s)&&(g[f]=s):"object"!=typeof s||null===s?sq("Object expected"):(pq(a=s.get)&&(g.get=a),pq(a=s.set)&&(g.set=a),pq(a=s.init)&&h.unshift(a));return g&&eq(i,r,g),i},gq=(e,t,r)=>t.has(e)||sq("Cannot "+r),vq=(e,t,r)=>(gq(e,t,"read from private field"),t.get(e)),yq=(e,t,r)=>t.has(e)?sq("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),bq=(e,t,r,n)=>(gq(e,t,"write to private field"),t.set(e,r),r);function xq(e){return e instanceof Jq||e instanceof Xq}var Sq=class extends jD{constructor(e){super(e);const t=AE(()=>{const{dragOperation:t}=e;if(iL(t.activatorEvent)&&xq(t.source)&&t.status.initialized){const t=e.registry.plugins.get(YA);if(t)return t.disable(),()=>t.enable()}}),r=e.monitor.addEventListener("dragmove",(e,t)=>{queueMicrotask(()=>{if(this.disabled||e.defaultPrevented||!e.nativeEvent)return;const{dragOperation:r}=t;if(!iL(e.nativeEvent))return;if(!xq(r.source))return;if(!r.shape)return;const{actions:n,collisionObserver:i,registry:o}=t,{by:a}=e;if(!a)return;const s=function(e){const{x:t,y:r}=e;if(t>0)return"right";if(t<0)return"left";if(r>0)return"down";if(r<0)return"up"}(a),{source:l,target:u}=r,{center:c}=r.shape.current,d=[],p=[];uE(()=>{for(const e of o.droppables){const{id:t}=e;if(!e.accepts(l)||t===(null==u?void 0:u.id)&&xq(e)||!e.element)continue;let r=e.shape;const n=new eL(e.element,{getBoundingClientRect:e=>FR(e,void 0,.2)});n.height&&n.width&&(("down"==s&&c.y+10<n.center.y||"up"==s&&c.y-10>n.center.y||"left"==s&&c.x-10>n.center.x||"right"==s&&c.x+10<n.center.x)&&(d.push(e),e.shape=n,p.push(()=>e.shape=r)))}}),e.preventDefault(),i.disable();const f=i.computeCollisions(d,lL);uE(()=>p.forEach(e=>e()));const[h]=f;if(!h)return;const{id:m}=h,{index:g,group:v}=l.sortable;n.setDropTarget(m).then(()=>{const{source:e,target:t,shape:o}=r;if(!e||!xq(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;UM(c);const d=new eL(c);if(!d)return;const p=JI.delta(d,JI.from(o.current.boundingRectangle),e.alignment);n.move({by:p}),u?n.setDropTarget(e.id).then(()=>i.enable()):i.enable()})})});this.destroy=()=>{r(),t()}}};var wq=Object.defineProperty,Cq=Object.defineProperties,Eq=Object.getOwnPropertyDescriptors,Iq=Object.getOwnPropertySymbols,Dq=Object.prototype.hasOwnProperty,Pq=Object.prototype.propertyIsEnumerable,Rq=(e,t,r)=>t in e?wq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Mq=(e,t)=>{for(var r in t||(t={}))Dq.call(t,r)&&Rq(e,r,t[r]);if(Iq)for(var r of Iq(t))Pq.call(t,r)&&Rq(e,r,t[r]);return e},Lq=(e,t)=>Cq(e,Eq(t));function Aq(e,t,r){if(t===r)return e;const n=e.slice();return n.splice(r,0,n.splice(t,1)[0]),n}function kq(e){return"initialIndex"in e&&"number"==typeof e.initialIndex&&"index"in e&&"number"==typeof e.index}function Oq(e,t){return function(e,t,r){var n,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 n=e.findIndex(e=>u(e,a.id)),i=e.findIndex(e=>u(e,s.id));if(-1===n||-1===i){if(kq(a)){const n=a.initialIndex,i=a.index;return n===i||n<0||n>=e.length?("preventDefault"in t&&t.preventDefault(),e):r(e,n,i)}return e}if(!l&&"index"in a&&"number"==typeof a.index){const t=a.index;if(t!==n)return r(e,n,t)}return r(e,n,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&&kq(a)){const n=a.initialGroup,i=a.initialIndex,o=a.group,s=a.index;if(null==n||null==o||!(n in e)||!(o in e))return"preventDefault"in t&&t.preventDefault(),e;if(n===o&&i===s)return"preventDefault"in t&&t.preventDefault(),e;if(n===o)return Lq(Mq({},e),{[n]:r(e[n],i,s)});const l=e[n][i];return Lq(Mq({},e),{[n]:[...e[n].slice(0,i),...e[n].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==(n=m.shape)?void 0:n.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&&kq(a)){const t=null!=a.group&&a.group!==d,n=a.index!==f;if(t||n){const t=null!=(o=a.group)?o:d;if(t in e){if(d===t)return Lq(Mq({},e),{[d]:r(e[d],f,a.index)});const n=e[d][f];return Lq(Mq({},e),{[d]:[...e[d].slice(0,f),...e[d].slice(f+1)],[t]:[...e[t].slice(0,a.index),n,...e[t].slice(a.index)]})}}}return"preventDefault"in t&&t.preventDefault(),e}if(d===p)return Lq(Mq({},e),{[d]:r(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 Lq(Mq({},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,Aq)}var qq="__default__";function Tq(e,t,r,n){const i=n<t?"afterend":"beforebegin";r.insertAdjacentElement(i,e)}function Nq(e,t){return e.index-t.index}function _q(e){return Array.from(e).sort(Nq)}var jq,Fq,zq,Wq,$q,Hq,Vq,Bq,Gq=[Sq,class extends jD{constructor(e){super(e);const t=()=>{const t=new Map;for(const r of e.registry.droppables)if(r instanceof Jq){const{sortable:e}=r,{group:n}=e;let i=t.get(n);i||(i=new Set,t.set(n,i)),i.add(e)}for(const[e,r]of t)t.set(e,new Set(_q(r)));return t},r=[e.monitor.addEventListener("dragover",(e,r)=>{if(this.disabled)return;const{dragOperation:n}=r,{source:i,target:o}=n;if(!xq(i)||!xq(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||r.renderer.rendering.then(()=>{var n,c,d;const p=t();for(const[e,t]of a.entries()){const r=Array.from(t).entries();for(const[t,i]of r)if(i.index!==t||i.group!==e||!(null==(n=p.get(e))?void 0:n.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=_q(l),g=s?m:_q(u),v=null!=(c=i.sortable.group)?c:qq,y=null!=(d=o.sortable.group)?d:qq,b={[v]:m,[y]:g},x=Oq(b,e);if(b===x)return;const S=x[y].indexOf(i.sortable),w=x[y].indexOf(o.sortable);r.collisionObserver.disable(),Tq(f,S,h,w),uE(()=>{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}),r.actions.setDropTarget(i.id).then(()=>r.collisionObserver.enable())})})}),e.monitor.addEventListener("dragend",(e,r)=>{if(!e.canceled)return;const{dragOperation:n}=r,{source:i}=n;xq(i)&&(i.sortable.initialIndex===i.sortable.index&&i.sortable.initialGroup===i.sortable.group||queueMicrotask(()=>{const e=t(),n=e.get(i.sortable.initialGroup);n&&r.renderer.rendering.then(()=>{for(const[t,r]of e.entries()){const e=Array.from(r).entries();for(const[r,n]of e)if(n.index!==r||n.group!==t)return}const t=_q(n),r=i.sortable.element,o=t[i.sortable.initialIndex],a=null==o?void 0:o.element;o&&a&&r&&(Tq(r,o.index,a,i.index),uE(()=>{for(const[t,r]of e.entries()){const e=Array.from(r).values();for(const t of e)t.index=t.initialIndex,t.group=t.initialGroup}}))})}))})];this.destroy=()=>{for(const e of r)e()}}}],Uq={duration:250,easing:"cubic-bezier(0.25, 1, 0.5, 1)",idle:!1},Yq=new class{constructor(){yI(this,PI,new WeakMap)}get(e,t){var r;return e?null==(r=vI(this,PI).get(e))?void 0:r.get(t):void 0}set(e,t,r){var n;if(e)return vI(this,PI).has(e)||vI(this,PI).set(e,new Map),null==(n=vI(this,PI).get(e))?void 0:n.set(t,r)}clear(e){var t;return e?null==(t=vI(this,PI).get(e))?void 0:t.clear():void 0}};Fq=[CI],jq=[CI];var Kq=class{constructor(e,t){yq(this,Wq,hq(zq,8,this)),hq(zq,11,this),yq(this,$q),yq(this,Hq),yq(this,Vq,hq(zq,12,this)),hq(zq,15,this),yq(this,Bq),this.register=()=>(uE(()=>{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=()=>{uE(()=>{var e,t;null==(e=this.manager)||e.registry.unregister(this.droppable),null==(t=this.manager)||t.registry.unregister(this.draggable)})},this.destroy=()=>{uE(()=>{this.droppable.destroy(),this.draggable.destroy()})};var r=e,{effects:n=()=>[],group:i,index:o,sensors:a,type:s,transition:l=Uq,plugins:u=Gq}=r,c=((e,t)=>{var r={};for(var n in e)oq.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&iq)for(var n of iq(e))t.indexOf(n)<0&&aq.call(e,n)&&(r[n]=e[n]);return r})(r,["effects","group","index","sensors","type","transition","plugins"]);this.droppable=new Jq(c,t,this),this.draggable=new Xq(cq(uq({},c),{effects:()=>[()=>{var e,t,r;const n=null==(e=this.manager)?void 0:e.dragOperation.status;(null==n?void 0:n.initializing)&&this.id===(null==(r=null==(t=this.manager)?void 0:t.dragOperation.source)?void 0:r.id)&&Yq.clear(this.manager),(null==n?void 0:n.dragging)&&Yq.set(this.manager,this.id,dE(()=>({initialIndex:this.index,initialGroup:this.group})))},()=>{const{index:e,group:t,manager:r}=this,n=vq(this,Hq),i=vq(this,$q);e===n&&t===i||(bq(this,Hq,e),bq(this,$q,t),this.animate())},()=>{const{target:e}=this,{feedback:t,isDragSource:r}=this.draggable;"move"==t&&r&&(this.droppable.disabled=!e)},()=>{const{manager:e}=this;for(const t of u)null==e||e.registry.register(t)},...n()],type:s,sensors:a}),t,this),bq(this,Bq,c.element),this.manager=t,this.index=o,bq(this,Hq,o),this.group=i,bq(this,$q,i),this.type=s,this.transition=l}get initialIndex(){var e,t;return null!=(t=null==(e=Yq.get(this.manager,this.id))?void 0:e.initialIndex)?t:this.index}get initialGroup(){var e,t;return null!=(t=null==(e=Yq.get(this.manager,this.id))?void 0:e.initialGroup)?t:this.group}animate(){dE(()=>{const{manager:e,transition:t}=this,{shape:r}=this.droppable;if(!e)return;const{idle:n}=e.dragOperation.status;r&&t&&(!n||t.idle)&&e.renderer.rendering.then(()=>{const{element:n}=this;if(!n)return;const i=this.refreshShape();if(!i)return;const o=r.boundingRectangle.left-i.boundingRectangle.left,a=r.boundingRectangle.top-i.boundingRectangle.top,{translate:s}=TM(n),l=KM(n,s,!1),u=KM(n,s);if(o||a){const r=UR(OR(n))?cq(uq({},t),{duration:0}):t;YM({element:n,keyframes:{translate:[`${l.x+o}px ${l.y+a}px ${l.z}`,`${u.x}px ${u.y}px ${u.z}`]},options:r}).then(()=>{e.dragOperation.status.dragging||(this.droppable.shape=void 0)})}})})}get manager(){return this.draggable.manager}set manager(e){uE(()=>{this.draggable.manager=e,this.droppable.manager=e})}set element(e){uE(()=>{const t=vq(this,Bq),r=this.droppable.element,n=this.draggable.element;r&&r!==t||(this.droppable.element=e),n&&n!==t||(this.draggable.element=e),bq(this,Bq,e)})}get element(){var e,t;const r=vq(this,Bq);if(r)return null!=(t=null!=(e=JR.get(r))?e:r)?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){uE(()=>{this.droppable.disabled=e,this.draggable.disabled=e})}set data(e){uE(()=>{this.droppable.data=e,this.draggable.data=e})}set handle(e){this.draggable.handle=e}set id(e){uE(()=>{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:sL}set alignment(e){this.draggable.alignment=e}get alignment(){return this.draggable.alignment}set type(e){uE(()=>{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)}};zq=[,,,QO(null)],Wq=new WeakMap,$q=new WeakMap,Hq=new WeakMap,Vq=new WeakMap,Bq=new WeakMap,mq(zq,4,"index",Fq,Kq,Wq),mq(zq,4,"group",jq,Kq,Vq),((e,t)=>{return lq(t,(r="metadata",(n=Symbol[r])?n:Symbol.for("Symbol."+r)),e[3]);var r,n})(zq,Kq);var Xq=class extends Fk{constructor(e,t,r){super(e,t),this.sortable=r}get index(){return this.sortable.index}get initialIndex(){return this.sortable.initialIndex}get group(){return this.sortable.group}get initialGroup(){return this.sortable.initialGroup}},Jq=class extends zk{constructor(e,t,r){super(e,t),this.sortable=r}get index(){return this.sortable.index}get group(){return this.sortable.group}},Zq=Object.defineProperty,Qq=Object.defineProperties,eT=Object.getOwnPropertyDescriptors,tT=Object.getOwnPropertySymbols,rT=Object.prototype.hasOwnProperty,nT=Object.prototype.propertyIsEnumerable,iT=(e,t,r)=>t in e?Zq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,oT=(e,t)=>{for(var r in t||(t={}))rT.call(t,r)&&iT(e,r,t[r]);if(tT)for(var r of tT(t))nT.call(t,r)&&iT(e,r,t[r]);return e};function aT(e){const{accept:t,collisionDetector:r,collisionPriority:n,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=oT(oT({},Uq),e.transition),y=uO(t=>new Kq(((e,t)=>Qq(e,eT(t)))(oT({},e),{transition:v,register:!1,handle:Wk(s),element:Wk(a),target:Wk(m),feedback:d}),t)),b=Bk(y,sT);return Yk(i,()=>y.id=i),$k(()=>{uE(()=>{y.group=u,y.index=l})},[y,u,l]),Yk(g,()=>y.type=g),Yk(t,()=>y.accept=t,void 0,wI),Yk(o,()=>o&&(y.data=o)),Yk(l,()=>{var e;(null==(e=y.manager)?void 0:e.dragOperation.status.idle)&&(null==v?void 0:v.idle)&&y.refreshShape()},Gk),Kk(s,e=>y.handle=e),Kk(a,e=>y.element=e),Kk(m,e=>y.target=e),Yk(c,()=>y.disabled=!0===c),Yk(h,()=>y.sensors=h),Yk(r,()=>y.collisionDetector=r),Yk(n,()=>y.collisionPriority=n),Yk(d,()=>y.feedback=null!=d?d:"default"),Yk(v,()=>y.transition=v,void 0,wI),Yk(p,()=>y.modifiers=p,void 0,wI),Yk(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,r;(e||!(null==(t=y.element)?void 0:t.isConnected)||(null==(r=y.manager)?void 0:r.dragOperation.status.idle))&&(y.element=null!=e?e:void 0)},[y]),sourceRef:f(e=>{var t,r;(e||!(null==(t=y.source)?void 0:t.isConnected)||(null==(r=y.manager)?void 0:r.dragOperation.status.idle))&&(y.source=null!=e?e:void 0)},[y]),targetRef:f(e=>{var t,r;(e||!(null==(t=y.target)?void 0:t.isConnected)||(null==(r=y.manager)?void 0:r.dragOperation.status.idle))&&(y.target=null!=e?e:void 0)},[y])}}function sT(e,t,r){return!("isDragSource"!==e||r||!t)}const lT=({id:e,itemIndex:t,sectionIndex:r})=>io.jsx("div",{children:`${r}:${t} - ${e}`}),uT=({id:e,itemIndex:t,sectionIndex:r})=>{const n=Dw(QC),i=Dw(XC),o=Dw(BC).at(r)??0,a=Dw(GC)({sectionIndex:r}),{ref:s,isDragging:l,handleRef:u}=aT({id:e,index:t,type:"item",accept:"item",group:a,modifiers:[JO],plugins:[Sq],data:{id:e,sectionIndex:r,sectionKey:a,itemIndex:t}}),c=void 0!==n?()=>{n({id:e,itemIndex:t,sectionIndex:r})}:void 0,d=i??lT;return io.jsx(Nd,{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:io.jsxs("div",{style:{width:"100%",opacity:l?.4:1},children:[io.jsx(NO,{isDragging:l,itemIndex:t,sectionIndex:r}),io.jsx(d,{id:e,itemIndex:t,sectionIndex:r,dragHandleRef:u}),t===o-1&&io.jsx(NO,{isDragging:l,itemIndex:t+1,sectionIndex:r})]})})},cT=r.memo(uT),dT=r.memo(({sectionIndex:e})=>{const t=Dw(GC),r=Dw(BC).at(e)??0,n=t({sectionIndex:e});return io.jsxs(Qu,{className:"exploration-list",style:{overflow:"auto"},children:[io.jsx(Uc,{}),io.jsx(FO,{id:n,sectionIndex:e}),io.jsx(Uc,{}),io.jsx(jO,{sectionIndex:e}),io.jsx(Ed,{sx:{padding:"2px 8px"},children:OO(r).map(r=>{const n=t({sectionIndex:e,itemIndex:r});return io.jsx(cT,{id:n,itemIndex:r,sectionIndex:e},n)})})]},n)}),pT=r.memo(()=>{const e=Dw(VC),t=Dw(GC),r=Pw(nE("start")),n=Pw(nE("over")),i=Pw(nE("end"));return io.jsxs(sO,{onDragEnd:i,onDragOver:n,onDragStart:r,children:[io.jsx(Qu,{style:{display:"flex",flexDirection:"column"},children:OO(e).map(e=>io.jsx(dT,{sectionIndex:e},t({sectionIndex:e})))}),io.jsx(TO,{})]})}),fT=r.memo(e=>io.jsx(RC,{atoms:iE,atomFamilies:oE,children:io.jsx(aE,{props:e,children:io.jsx(pT,{})})})),hT="12px",mT="nebula-table-utils-head-menu-button",gT="sn-copy-cell";let vT=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 yT="nebula-table-utils-column-adjuster";let bT=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}({}),xT=function(e){return e.Auto="auto",e.FitToContent="fitToContent",e.Pixels="pixels",e.Percentage="percentage",e}({});const ST={darker:.15,brighter:.3,opacity:.03},wT={darker:.3,brighter:.5,opacity:.05};let CT=function(e){return e.Cyclic="C",e}({});const ET=(e,t)=>{const r=new Map;for(const t of e)r.set(t.id,t);return t.reduce((e,t)=>{const n=r.get(t);return n&&e.push(n),e},[])},IT=WC(e=>hw(t=>{const r=t(eC),n=t($w),i=t(Jw)?.[e],o=r?.qHyperCube.rankedList?.[e];return i||(n?.isRankedListCorrupt(e)||void 0===o?n?.createRankedList(e):o)})),DT=(e,t=new Set)=>hw(r=>{const n=r(e),i=r(hC);if(!n||0===n.length)return"disabled";const o=n.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"}),PT=(e,t=new Set)=>hw(null,(r,n,i)=>{const o=r(e);o&&0!==o.length&&(e=>{const{items:t,shouldCheckAll:r,get:n,set:i,excludedIds:o}=e,a=t.filter(e=>!o?.has(e.id));if(0===a.length)return;const s=n(hC),l=new Set,u=new Set;if(a.forEach(e=>{const t=s.has(e.id);t&&!r&&u.add(e.id),!t&&r&&l.add(e.id)}),0===l.size&&0===u.size)return;const c=new Set(n(cC)),d=new Set(n(dC));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(cC,c),i(dC,d),zw({type:"apply",localChecked:l,localUnchecked:u,handler:n($w),model:n(Ww),fieldInfo:n(oC),handlerQueue:n(sC)})})({items:o,shouldCheckAll:i,get:r,set:n,excludedIds:t})}),RT=hw(e=>{const t=e(tC);return t?.qHyperCube.qDimensionInfo.filter(Uw).map(({cId:e,qFallbackTitle:t})=>({id:e,title:t??"",alternative:!0}))}),MT=hw(e=>{const t=e(eC),r=e(Vw),n=t?.qHyperCube.qEffectiveInterColumnSortOrder.map(e=>{if(-1===e)return{id:-1,title:r("Common.Values")};const{cId:n,qFallbackTitle:i}=t.qHyperCube.qDimensionInfo[e];return{id:n,title:i??""}});return n}),LT=hw(e=>{const t=e(Vw),r=e(RT),n=e(Gw),i=e(IT("columns")),o=e(IT("rows")),a=e(MT);if(void 0===r||void 0===i||void 0===o||void 0===a)return[];const s=[...a,...r].filter(n);return[{id:"rows",title:t("Common.Rows"),items:ET(s,o)},{id:"columns",title:t("Common.Columns"),items:ET(s,i)}]}),AT=WC(e=>hw(t=>t(LT).at(e))),kT=WC(({sectionIndex:e,itemIndex:t})=>hw(r=>r(AT(e))?.items.at(t)?.title),(e,t)=>e.sectionIndex===t.sectionIndex&&e.itemIndex===t.itemIndex),OT=WC(e=>hw(t=>t(AT(e))?.title)),qT=hw(e=>({sectionIndex:t,itemIndex:r})=>{const n=e(AT(t));return void 0===n?0===t?"rows":"columns":void 0===r?n.id:n.items.at(r)?.id??`missing-item-${t}-${r}`}),TT=hw(e=>e(LT).map(e=>e.items.length)),NT=WC(e=>DT(hw(t=>t(AT(e))?.items),new Set([-1]))),_T=WC(e=>PT(hw(t=>t(AT(e))?.items),new Set([-1]))),jT=hw(null,async(e,t,{event:r,id:n,toIndex:i,toSection:o,startSection:a})=>{const s=e($w),l=e(Ww),u=e(sC),c=e(IT("rows")),d=e(IT("columns")),p=o;if(void 0===s||void 0===l||void 0===c||void 0===d||null===u)return;if(r.operation.canceled)return void t(Jw,null);if("section"===r.operation.target?.type&&a===o)return void t(Jw,null);const f=zC({rows:c,columns:d},r);t(Jw,f),u.add(async()=>{"number"==typeof n?await s.movePseudoDimension({toIndex:i,toSection:p}):await s.moveDimension({cId:n,toIndex:i,toSection:p})})}),FT={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"}},zT="ChartExploration.PivotTable.DimensionSectionEmpty.Message",WT="ChartExploration.PivotTable.MeasureSectionEmpty.Message",$T="#177fe6",HT=(e,t,r,n)=>{if("measure"===t)return e(n?FT.noSearchFound.measure:FT.noItems.measure);const i=n?FT.noSearchFound:FT.noItems;return e(r?i.row:i.column)},VT=(e,t,r)=>r?"":e("measure"===t?WT:zT),BT=WC(e=>hw(t=>{const r=t(Vw),n=t(Bw).length>0;return t=>({title:HT(r,e,0===t,n),message:VT(r,e,n)})})),GT=BT("measure"),UT=BT("dimensions"),YT=({children:e})=>io.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e}),KT=e=>{const t=Dw(kT(e));return io.jsx(YT,{children:t})},XT=hw(e=>{const t=e(tC);return t?.qHyperCube.qMeasureInfo.filter(Uw).map(({cId:e,qFallbackTitle:t})=>({id:e,title:t??""}))}),JT=hw(e=>{const t=e(eC),r=e(XT),n=e(Gw),i=e(IT("measures"));if(void 0===t||void 0===r||void 0===i)return[];const o=t.qHyperCube.qMeasureInfo.filter(Uw).map(({cId:e,qFallbackTitle:t})=>({id:e,title:t??""}));o.push(...r);const a=o.filter(n);return ET(a,i)}),ZT=WC(e=>hw(t=>t(JT).at(e)?.title??"")),QT=hw(e=>({itemIndex:t})=>{const r=e(JT);return void 0===t?"measures":r.at(t)?.id??`missing-item-${t}`}),eN=hw(e=>[e(JT).length]),tN=DT(JT),rN=PT(JT),nN=hw(null,async(e,t,{id:r,toIndex:n,event:i})=>{const o=e($w),a=e(Ww),s=e(sC),l=e(IT("measures"));if(void 0===o||void 0===a||void 0===l||"string"!=typeof r||null===s)return;const u=zC({measures:l},i);t(Jw,u),s.add(async()=>{await o.moveMeasure({cId:r,toIndex:n})})}),iN=kS().palette,oN={TEXT:iN.text.primary,DISABLED:iN.text.disabled,HOVER:iN.action.hover,WHITE:If.GREYSCALE_100,BORDER_MEDIUM:If.GREYSCALE_85,DARK_MODE_TEXT:If.GREYSCALE_95,DARK_MODE_BORDER:If.GREYSCALE_95,DARK_MODE_DISABLED:If.GREYSCALE_70,TRANSPARENT:"transparent",SELECTED:iN.primary.main,LINK:iN.info.main,ERROR:iN.error.main};function aN(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 sN(e){if("object"==typeof e&&aN(e))return(e.r<<16)+(e.g<<8)+e.b;let t=0,r=0,n=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),r=parseInt(i[2],10),n=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),r=parseInt(i[2],16),n=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),r=parseInt(i[2]+i[2],16),n=parseInt(i[3]+i[3],16))}return(t<<16)+(r<<8)+n}const lN={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}};function uN(...e){const t={type:"qcm-color",r:0,g:0,b:0,a:1,invalid:!1,spaces:{}};let r=0,n=0,i=0,o=1;if(null!==(a=e[0])&&"object"==typeof a&&"type"in a&&"qcm-color"===a.type)({r:r,g:n,b:i,a:o}=e[0]),t.invalid=e[0].invalid,t.spaces={...e[0].spaces};else if(aN(e[0]))({r:r,g:n,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))r=parseInt(s[1],10),n=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))r=parseInt(s[1],10),n=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,r=parseInt(s[2],10),n=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))r=parseInt(s[1],16),n=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))r=parseInt(s[1]+s[1],16),n=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;r=d[0]+p,n=d[1]+p,i=d[2]+p,r=Math.round(255*r),n=Math.round(255*n),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;r=d[0]+p,n=d[1]+p,i=d[2]+p,r=Math.round(255*r),n=Math.round(255*n),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;r=d[0]+p,n=d[1]+p,i=d[2]+p,r=Math.round(255*r),n=Math.round(255*n),i=Math.round(255*i),o=1}else{const e=a.toLowerCase();if(function(e){return e in lN}(e)){const t=lN[e];({r:r,g:n,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,r=(16711680&e[0])>>16,n=(65280&e[0])>>8,i=255&e[0]):"number"==typeof e[0]&&e[0]>=0?(r=(16711680&e[0])>>16,n=(65280&e[0])>>8,i=255&e[0]):t.invalid=!0;else 3===e.length||4===e.length?(r=e[0],n=e[1],i=e[2],o=4===e.length?e[3]:1):t.invalid=!0;var a;return Number.isNaN(+r+n+i+o)&&(t.invalid=!0),t.r=Math.floor(r),t.g=Math.floor(n),t.b=Math.floor(i),t.a=o,t}function cN(e){let t,r,n;if(aN(e))return t=e.r.toString(16),r=e.g.toString(16),n=e.b.toString(16),1===t.length&&(t=`0${t}`),1===r.length&&(r=`0${r}`),1===n.length&&(n=`0${n}`),`#${[t,r,n].join("")}`;const i="string"==typeof e?sN(e):e;return t=((16711680&i)>>16).toString(16),r=((65280&i)>>8).toString(16),n=(255&i).toString(16),1===t.length&&(t=`0${t}`),1===r.length&&(r=`0${r}`),1===n.length&&(n=`0${n}`),`#${t}${r}${n}`}function dN(e){let t,r,n=0;const i="string"==typeof e?uN(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,n=0;else{switch(r=u-c,t=d>.5?r/(2-u-c):r/(u+c),u){case o:n=(a-s)/r+(a<s?6:0);break;case a:n=(s-o)/r+2;break;case s:n=(o-a)/r+4}n/=6}return{h:360*n,s:100*t,l:100*d,a:l}}function pN(e){let t,r,n=0;const i="string"==typeof e?uN(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,n=0;else{switch(r=l-u,t=0===r?0:r/c,l){case o:n=(a-s)/r+(a<s?6:0);break;case a:n=(s-o)/r+2;break;case s:n=(o-a)/r+4}n/=6}return{h:360*n%360,s:100*t,v:100*c}}function fN(e){if(aN(e))return`rgb(${e.r}, ${e.g}, ${e.b})`;const t="string"==typeof e?sN(e):e;return`rgb(${(16711680&t)>>16}, ${(65280&t)>>8}, ${255&t})`}function hN(e,t){return aN(e)?`rgba(${e.r}, ${e.g}, ${e.b}, ${e.a})`:hN(uN(e))}function mN(e){return aN(e)?1===e.a?fN(e):hN(e):mN(uN(e))}const gN=e=>{const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};function vN(e){return.2126*gN(e.r)+.7152*gN(e.g)+.0722*gN(e.b)}function yN(...e){const t=uN(...e);return t.invalid||vN(t)<.4}function bN(...e){const t=uN(...e),r={type:t.type,r:t.r,g:t.g,b:t.b,a:t.a,invalid:t.invalid,spaces:t.spaces},n=()=>(r.spaces.hslaObject||(r.spaces.hslaObject=dN(r)),r.spaces.hslaObject),i=e=>{const t=n(),{h:r,s:i,l:o,a:a}=t;return`hsla(${r}, ${i}, ${Math.max(0,Math.min(o+e,100))}, ${a})`};return{get type(){return r.type},isInvalid:()=>r.invalid,get r(){return r.r},get g(){return r.g},get b(){return r.b},get a(){return r.a},getR:()=>r.r,getG:()=>r.g,getB:()=>r.b,getAlpha:()=>r.a,setAlpha:e=>{r.a=e,r.spaces={}},isEqualTo:e=>{let t;if("string"==typeof e)t=uN(e);else{if(e.type!==r.type)return!1;t=e}return t.r===r.r&&t.g===r.g&&t.b===r.b&&t.a===r.a},isDark:()=>yN(r),getRGB:()=>(r.spaces.rgb||(r.spaces.rgb=fN(r)),r.spaces.rgb),getRGBA:()=>(r.spaces.rgba||(r.spaces.rgba=hN(r)),r.spaces.rgba),getString:()=>(r.spaces.string||(r.spaces.string=mN(r)),r.spaces.string),getHex:()=>(r.spaces.hex||(r.spaces.hex=cN(r)),r.spaces.hex),getHSL:()=>(r.spaces.hsl||(r.spaces.hsl=function(e){let t,r,n=0;const i="string"==typeof e?uN(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,n=0;else{switch(r=l-u,t=c>.5?r/(2-l-u):r/(l+u),l){case o:n=(a-s)/r+(a<s?6:0);break;case a:n=(s-o)/r+2;break;case s:n=(o-a)/r+4}n/=6}return`hsl(${360*n}, ${100*t}, ${100*c})`}(r)),r.spaces.hsl),getHSLA:()=>(r.spaces.hsla||(r.spaces.hsla=function(e){const{h:t,s:r,l:n,a:i}=dN(e);return`hsla(${t}, ${r}, ${n}, ${i})`}(r)),r.spaces.hsla),getHSLAObject:n,getShiftedHSLA:i,getHSV:()=>(r.spaces.hsv||(r.spaces.hsv=function(e){const{h:t,s:r,v:n}=pN(e);return`hsv(${t}, ${r}, ${n})`}(r)),r.spaces.hsv),getHSVObject:()=>(r.spaces.hsvObject||(r.spaces.hsvObject=pN(r)),r.spaces.hsvObject),blend:(e,t)=>`rgba(${Math.floor(r.r+(e.r-r.r)*t)}, ${Math.floor(r.g+(e.g-r.g)*t)}, ${Math.floor(r.b+(e.b-r.b)*t)}, ${Math.floor(r.a+(e.getAlpha()-r.a)*t)})`,getBrightenedColor:(e=1)=>bN(i(18*e)),getDarkenedColor:(e=1)=>bN(i(18*-e))}}function xN(e,t){if(!e||!t)return;const r=vN(e),n=vN(t);return r>n?(r+.05)/(n+.05):(n+.05)/(r+.05)}function SN(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;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:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var wN,CN="top",EN="top-right",IN="right",DN="bottom-right",PN="bottom",RN="bottom-left",MN="left",LN="top-left";SN(SN(SN(SN(SN(SN(SN(SN(SN(SN(wN={},"equal-equal",[CN,PN]),"equal-higher",[PN,DN]),"equal-lower",[CN,EN]),"equal-void",[CN,PN]),"higher-equal",[MN,RN,CN,EN]),"higher-higher-acute",[PN,RN,MN,EN]),"higher-higher-obtuse",[PN,CN]),"higher-lower-negative",[CN,EN,IN]),"higher-lower-positive",[PN,RN,MN]),"higher-void",[CN]),SN(SN(SN(SN(SN(SN(SN(SN(SN(SN(wN,"lower-equal",[CN]),"lower-higher-negative",[CN,LN]),"lower-higher-positive",[DN]),"lower-lower-acute",[CN,LN,MN,EN,IN]),"lower-lower-obtuse",[CN,PN]),"lower-void",[CN]),"void-equal",[CN]),"void-higher",[CN,PN]),"void-lower",[CN,PN,MN]),"void-void",[CN]),SN(wN,"unclassified",[CN,PN,IN,MN,EN,DN,RN,LN]);var AN,kN,ON=["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"],qN=["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 TN(e){return null!=e&&e.isEnabled("PS_20852_WYSIWYG_FONT_SUPPORT")?qN:ON}var NN=function(){if(kN)return AN;kN=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},o=function(r){if(!r||"[object Object]"!==t.call(r))return!1;var n,i=e.call(r,"constructor"),o=r.constructor&&r.constructor.prototype&&e.call(r.constructor.prototype,"isPrototypeOf");if(r.constructor&&!i&&!o)return!1;for(n in r);return void 0===n||e.call(r,n)},a=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},s=function(t,r){if("__proto__"===r){if(!e.call(t,r))return;if(n)return n(t,r).value}return t[r]};return AN=function e(){var t,r,n,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(r in t)n=s(d,r),d!==(l=s(t,r))&&(h&&l&&(o(l)||(u=i(l)))?(u?(u=!1,c=n&&i(n)?n:[]):c=n&&o(n)?n:{},a(d,{name:r,newValue:e(h,c,l)})):void 0!==l&&a(d,{name:r,newValue:l}));return d},AN}();function _N(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function jN(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function FN(){}!function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")&&e.default}(NN);var zN=1/.7,WN="\\s*([+-]?\\d+)\\s*",$N="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",HN="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",VN=/^#([0-9a-f]{3,8})$/,BN=new RegExp(`^rgb\\(${WN},${WN},${WN}\\)$`),GN=new RegExp(`^rgb\\(${HN},${HN},${HN}\\)$`),UN=new RegExp(`^rgba\\(${WN},${WN},${WN},${$N}\\)$`),YN=new RegExp(`^rgba\\(${HN},${HN},${HN},${$N}\\)$`),KN=new RegExp(`^hsl\\(${$N},${HN},${HN}\\)$`),XN=new RegExp(`^hsla\\(${$N},${HN},${HN},${$N}\\)$`),JN={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 ZN(){return this.rgb().formatHex()}function QN(){return this.rgb().formatRgb()}function e_(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=VN.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?t_(t):3===r?new o_(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?r_(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?r_(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=BN.exec(e))?new o_(t[1],t[2],t[3],1):(t=GN.exec(e))?new o_(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=UN.exec(e))?r_(t[1],t[2],t[3],t[4]):(t=YN.exec(e))?r_(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=KN.exec(e))?d_(t[1],t[2]/100,t[3]/100,1):(t=XN.exec(e))?d_(t[1],t[2]/100,t[3]/100,t[4]):JN.hasOwnProperty(e)?t_(JN[e]):"transparent"===e?new o_(NaN,NaN,NaN,0):null}function t_(e){return new o_(e>>16&255,e>>8&255,255&e,1)}function r_(e,t,r,n){return n<=0&&(e=t=r=NaN),new o_(e,t,r,n)}function n_(e){return e instanceof FN||(e=e_(e)),e?new o_((e=e.rgb()).r,e.g,e.b,e.opacity):new o_}function i_(e,t,r,n){return 1===arguments.length?n_(e):new o_(e,t,r,null==n?1:n)}function o_(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function a_(){return`#${c_(this.r)}${c_(this.g)}${c_(this.b)}`}function s_(){const e=l_(this.opacity);return`${1===e?"rgb(":"rgba("}${u_(this.r)}, ${u_(this.g)}, ${u_(this.b)}${1===e?")":`, ${e})`}`}function l_(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function u_(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function c_(e){return((e=u_(e))<16?"0":"")+e.toString(16)}function d_(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new f_(e,t,r,n)}function p_(e){if(e instanceof f_)return new f_(e.h,e.s,e.l,e.opacity);if(e instanceof FN||(e=e_(e)),!e)return new f_;if(e instanceof f_)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(r-n)/s+6*(r<n):r===o?(n-t)/s+2:(t-r)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new f_(a,s,l,e.opacity)}function f_(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function h_(e){return(e=(e||0)%360)<0?e+360:e}function m_(e){return Math.max(0,Math.min(1,e||0))}function g_(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}_N(FN,e_,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ZN,formatHex:ZN,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return p_(this).formatHsl()},formatRgb:QN,toString:QN}),_N(o_,i_,jN(FN,{brighter(e){return e=null==e?zN:Math.pow(zN,e),new o_(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new o_(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new o_(u_(this.r),u_(this.g),u_(this.b),l_(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:a_,formatHex:a_,formatHex8:function(){return`#${c_(this.r)}${c_(this.g)}${c_(this.b)}${c_(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:s_,toString:s_})),_N(f_,function(e,t,r,n){return 1===arguments.length?p_(e):new f_(e,t,r,null==n?1:n)},jN(FN,{brighter(e){return e=null==e?zN:Math.pow(zN,e),new f_(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new f_(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,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new o_(g_(e>=240?e-240:e+120,i,n),g_(e,i,n),g_(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new f_(h_(this.h),m_(this.s),m_(this.l),l_(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=l_(this.opacity);return`${1===e?"hsl(":"hsla("}${h_(this.h)}, ${100*m_(this.s)}%, ${100*m_(this.l)}%${1===e?")":`, ${e})`}`}}));const v_=Math.PI/180,y_=180/Math.PI,b_=4/29,x_=6/29,S_=3*x_*x_;function w_(e){if(e instanceof C_)return new C_(e.l,e.a,e.b,e.opacity);if(e instanceof R_)return M_(e);e instanceof o_||(e=n_(e));var t,r,n=P_(e.r),i=P_(e.g),o=P_(e.b),a=E_((.2225045*n+.7168786*i+.0606169*o)/1);return n===i&&i===o?t=r=a:(t=E_((.4360747*n+.3850649*i+.1430804*o)/.96422),r=E_((.0139322*n+.0971045*i+.7141733*o)/.82521)),new C_(116*a-16,500*(t-a),200*(a-r),e.opacity)}function C_(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function E_(e){return e>.008856451679035631?Math.pow(e,1/3):e/S_+b_}function I_(e){return e>x_?e*e*e:S_*(e-b_)}function D_(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function P_(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function R_(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}function M_(e){if(isNaN(e.h))return new C_(e.l,0,0,e.opacity);var t=e.h*v_;return new C_(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}_N(C_,function(e,t,r,n){return 1===arguments.length?w_(e):new C_(e,t,r,null==n?1:n)},jN(FN,{brighter(e){return new C_(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new C_(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,r=isNaN(this.b)?e:e-this.b/200;return new o_(D_(3.1338561*(t=.96422*I_(t))-1.6168667*(e=1*I_(e))-.4906146*(r=.82521*I_(r))),D_(-.9787684*t+1.9161415*e+.033454*r),D_(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}})),_N(R_,function(e,t,r,n){return 1===arguments.length?function(e){if(e instanceof R_)return new R_(e.h,e.c,e.l,e.opacity);if(e instanceof C_||(e=w_(e)),0===e.a&&0===e.b)return new R_(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*y_;return new R_(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new R_(e,t,r,null==n?1:n)},jN(FN,{brighter(e){return new R_(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new R_(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return M_(this).rgb()}}));var L_=e=>()=>e;function A_(e,t){var r=t-e;return r?function(e,t){return function(r){return e+r*t}}(e,r):L_(isNaN(e)?t:e)}!function e(t){var r=function(e){return 1==(e=+e)?A_:function(t,r){return r-t?function(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}(t,r,e):L_(isNaN(t)?r:t)}}(t);function n(e,t){var n=r((e=i_(e)).r,(t=i_(t)).r),i=r(e.g,t.g),o=r(e.b,t.b),a=A_(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return n.gamma=e,n}(1);var k_="center",O_="bottom";[{key:"NoDataExist",alignment:k_,condition:function(e){var t=e.layoutService;if(!t)return!1;var r=t.meta.size;return r.x*r.y==0}},{key:"OnlyNanDataMeasure",translationKey:"OnlyNanData",alignment:k_,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:k_,condition:function(e){var t=e.layoutService;if(!t)return!1;if(!t.meta.isContinuous)return!1;var r=t.getHyperCubeValue("qDimensionInfo.0");return r&&(r.qMax<r.qMin||"NaN"===r.qMax)}},{key:"OnlyNegativeOrZeroValues",alignment:k_},{key:"DataRangeIncludingZero",alignment:O_},{key:"LimitedData",alignment:O_},{key:"NegativeOrZeroValues",alignment:O_}].reduce(function(e,t){return e[t.key]=t,e},{});var q_,T_=["__proto__","constructor"];function N_(e,t,r){if(void 0!==e&&void 0!==t){var n=t.split("."),i=n[n.length-1];if(!T_.some(function(e){return n.includes(e)})){for(var o=e,a=0;a<n.length-1;++a){var s=n[a];void 0===o[s]&&(o[s]=Number.isNaN(+n[a+1])?{}:[]),o=o[s]}void 0!==r?o[i]=r:delete o[i]}}}function __(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return e},r=function(){var e={};return{get:function(t){return e[t]},set:function(t,r){return e[t]=r,r},has:function(t){return t in e},remove:function(t){delete e[t]},empty:function(){e={}}}}();return function(n){var i=t(n);return r.has(i)?r.get(i):r.set(i,e(n))}}function j_(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return function(){for(var n=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(n,o)},r)}}function F_(e){var t=0,r=e.children,n=r&&r.length;if(n)for(;--n>=0;)t+=r[n].value;else t=1;e.value=t}function z_(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=$_)):void 0===t&&(t=W_);for(var r,n,i,o,a,s=new B_(e),l=[s];r=l.pop();)if((i=t(r.data))&&(a=(i=Array.from(i)).length))for(r.children=i,o=a-1;o>=0;--o)l.push(n=i[o]=new B_(i[o])),n.parent=r,n.depth=r.depth+1;return s.eachBefore(V_)}function W_(e){return e.children}function $_(e){return Array.isArray(e)?e[1]:null}function H_(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function V_(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function B_(e){this.data=e,this.depth=this.height=0,this.parent=null}B_.prototype=z_.prototype={constructor:B_,count:function(){return this.eachAfter(F_)},each:function(e,t){let r=-1;for(const n of this)e.call(t,n,++r,this);return this},eachAfter:function(e,t){for(var r,n,i,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),r=o.children)for(n=0,i=r.length;n<i;++n)a.push(r[n]);for(;o=s.pop();)e.call(t,o,++l,this);return this},eachBefore:function(e,t){for(var r,n,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),r=i.children)for(n=r.length-1;n>=0;--n)o.push(r[n]);return this},find:function(e,t){let r=-1;for(const n of this)if(e.call(t,n,++r,this))return n},sum:function(e){return this.eachAfter(function(t){for(var r=+e(t.data)||0,n=t.children,i=n&&n.length;--i>=0;)r+=n[i].value;t.value=r})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(e){for(var t=this,r=function(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),i=null;for(e=r.pop(),t=n.pop();e===t;)i=e,e=r.pop(),t=n.pop();return i}(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var i=n.length;e!==r;)n.splice(i,0,e),e=e.parent;return n},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(r){r!==e&&t.push({source:r.parent,target:r})}),t},copy:function(){return z_(this).eachBefore(H_)},[Symbol.iterator]:function*(){var e,t,r,n,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(r=0,n=t.length;r<n;++r)o.push(t[r])}while(o.length)}},q_=function(e){
100
+ */var hS,mS,gS={},vS={};function yS(){if(hS)return vS;hS=1;var e=Va;Object.defineProperty(vS,"__esModule",{value:!0}),vS.default=void 0;var t=(0,e(cv()).default)();return vS.default=t,vS}var bS,xS,SS={},wS={};function CS(){if(xS)return SS;xS=1;var e=Va;Object.defineProperty(SS,"__esModule",{value:!0}),SS.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,n.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,n.isUnitless)(u)&&!l)throw new Error((0,r.formatMuiErrorMessage)(6));(0,n.isUnitless)(u)||(u=parseFloat(m(u,"rem"))/parseFloat(o));var d=null;l||(d=function(e){return(0,n.alignProperty)({size:e,grid:(0,n.fontGrid)({pixels:4,lineHeight:u,htmlFontSize:h.htmlFontSize})})}),h[e]=(0,t.default)({},i,(0,n.responsiveProperty)({cssProperty:"fontSize",min:s,max:a,unit:"rem",breakpoints:g,transform:d}))}}),f};var t=e(Ns()),r=Sh,n=function(){if(bS)return wS;bS=1;var e=Va;Object.defineProperty(wS,"__esModule",{value:!0}),wS.isUnitless=function(e){return String(parseFloat(e)).length===String(e).length},wS.getUnit=r,wS.toUnitless=n,wS.convertLength=function(e){return function(t,i){var o=r(t);if(o===i)return t;var a=n(t);if("px"!==o)if("em"===o)a=n(t)*n(e);else if("rem"===o)return a=n(t)*n(e),t;var s=a;if("px"!==i)if("em"===i)s=a/n(e);else{if("rem"!==i)return t;s=a/n(e)}return parseFloat(s.toFixed(5))+i}},wS.alignProperty=function(e){var t=e.size,r=e.grid,n=t-t%r,i=n+r;return t-n<i-t?n:i},wS.fontGrid=function(e){var t=e.lineHeight;return e.pixels/(t*e.htmlFontSize)},wS.responsiveProperty=function(e){var r=e.cssProperty,n=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)({},r,"".concat(n).concat(a)),p=(i-n)/l[l.length-1];return l.forEach(function(e){var i=n+p*e;null!==c&&(i=c(i)),d["@media (min-width:".concat(e,"px)")]=(0,t.default)({},r,"".concat(Math.round(1e4*i)/1e4).concat(a))}),d};var t=e(Wh());function r(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function n(e){return parseFloat(e)}return wS}();return SS}var ES,IS={};var DS,PS={};var RS,MS={};var LS,AS={};!function(e){var t=Va,n=Lf;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=Af;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=n(cv()),s=t(function(){if(dv)return pv;dv=1;var e=Va;Object.defineProperty(pv,"__esModule",{value:!0}),pv.default=function(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];return r.default.apply(void 0,[(0,t.deepmerge)({unstable_strictMode:!0},e)].concat(i))};var t=Sh,r=e(cv());return pv}()),l=t(function(){if(cS)return fv;cS=1,Object.defineProperty(fv,"__esModule",{value:!0}),fv.default=function(t){return(0,e.createStyles)(t)};var e=fS;return fv}()),u=t(function(){if(mS)return gS;mS=1;var e=Va;Object.defineProperty(gS,"__esModule",{value:!0}),gS.default=void 0;var t=e(Ns()),r=fS,n=e(yS()),i=function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,r.makeStyles)(e,(0,t.default)({defaultTheme:n.default},i))};return gS.default=i,gS}()),c=t(CS()),d=t(function(){if(ES)return IS;ES=1;var e=Va;Object.defineProperty(IS,"__esModule",{value:!0}),IS.default=void 0;var t=e(Ns()),r=fS,n=e(yS()),i=function(e){var i=(0,r.styled)(e);return function(e,r){return i(e,(0,t.default)({defaultTheme:n.default},r))}};return IS.default=i,IS}()),p=av();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(DS)return PS;DS=1;var e=Va;Object.defineProperty(PS,"__esModule",{value:!0}),PS.default=function(){return(0,t.useTheme)()||n.default};var t=fS;e(r);var n=e(yS());return PS}()),h=t(function(){if(RS)return MS;RS=1;var e=Va;Object.defineProperty(MS,"__esModule",{value:!0}),MS.default=void 0;var t=e(Ns()),r=fS,n=e(yS()),i=function(e,i){return(0,r.withStyles)(e,(0,t.default)({defaultTheme:n.default},i))};return MS.default=i,MS}()),m=t(function(){if(LS)return AS;LS=1;var e=Va;Object.defineProperty(AS,"__esModule",{value:!0}),AS.default=void 0;var t=fS,r=e(yS()),n=(0,t.withThemeCreator)({defaultTheme:r.default});return AS.default=n,AS}()),g=fS}(Df),Df.alpha(tf.GREYSCALE_0,.05),Df.alpha(tf.GREEN_PALE,.5),Df.alpha(tf.BLUE_PALE,.5),Df.alpha(tf.GREEN_PALE,.5),Df.alpha(tf.BLUE_PALE,.5),Df.alpha(tf.GREEN_PALE,.5),Df.alpha(tf.BLUE_PALE,.5),Df.alpha(tf.GREEN_PALE,.5),Df.alpha(tf.BLUE_PALE,.5),Df.alpha(tf.GREEN_PALE,.5),Df.alpha(tf.BLUE_PALE,.5);const kS=(e="light")=>Ef();function OS(e){return"init"in e}function qS(e){return!!e.write}function TS(e){return"v"in e||"e"in e}function NS(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 _S(e){return"function"==typeof(null==e?void 0:e.then)}function jS(e,t,r){if(!r.p.has(e)){r.p.add(e);const n=()=>r.p.delete(e);t.then(n,n)}}function FS(e,t,r){var n;const i=new Set;for(const t of(null==(n=r.get(e))?void 0:n.t)||[])i.add(t);for(const e of t.p)i.add(e);return i}const zS=()=>{const e={},t=new WeakMap,r=r=>{var n,i;null==(n=t.get(e))||n.forEach(e=>e(r)),null==(i=t.get(r))||i.forEach(e=>e())};return r.add=(r,n)=>{const i=r||e;let o=t.get(i);return o||(o=new Set,t.set(i,o)),o.add(n),()=>{o.delete(n),o.size||t.delete(i)}},r};function WS(e){return e.i||(e.i=zS()),e.r||(e.r=zS()),e.c||(e.c=zS()),e.m||(e.m=zS()),e.u||(e.u=zS()),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 $S=(e,t,...r)=>t.read(...r),HS=(e,t,...r)=>t.write(...r),VS=(e,t)=>{var r;return null==(r=t.INTERNAL_onInit)?void 0:r.call(t,e)},BS=(e,t,r)=>{var n;return null==(n=t.onMount)?void 0:n.call(t,r)},GS=(e,r)=>{var n;const i=uw(e),o=i[0],a=i[6],s=i[9];if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&!r)throw new Error("Atom is undefined or null");let l=o.get(r);return l||(l={d:new Map,p:new Set,n:0},o.set(r,l),null==(n=a.i)||n.call(a,r),null==s||s(e,r)),l},US=e=>{const t=uw(e),r=t[1],n=t[3],i=t[4],o=t[5],a=t[6],s=t[13],l=[],u=e=>{try{e()}catch(e){l.push(e)}};do{a.f&&u(a.f);const t=new Set,l=t.add.bind(t);n.forEach(e=>{var t;return null==(t=r.get(e))?void 0:t.l.forEach(l)}),n.clear(),o.forEach(l),o.clear(),i.forEach(l),i.clear(),t.forEach(u),n.size&&s(e)}while(n.size||o.size||i.size);if(l.length)throw new AggregateError(l)},YS=e=>{const r=uw(e),n=r[1],i=r[2],o=r[3],a=r[11],s=r[14],l=r[17],u=[],c=new WeakSet,d=new WeakSet,p=Array.from(o);for(;p.length;){const r=p[p.length-1],o=a(e,r);if(d.has(r))p.pop();else if(c.has(r)){if(i.get(r)===o.n)u.push([r,o]);else if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&i.has(r))throw new Error("[Bug] invalidated atom exists");d.add(r),p.pop()}else{c.add(r);for(const e of FS(r,o,n))c.has(e)||p.push(e)}}for(let t=u.length-1;t>=0;--t){const[r,n]=u[t];let a=!1;for(const e of n.d.keys())if(e!==r&&o.has(e)){a=!0;break}a&&(i.set(r,n.n),s(e,r),l(e,r)),i.delete(r)}},KS=new WeakSet,XS=(e,r)=>{var n,i;const o=uw(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,r),S=b[0];if(TS(x)){if(a.has(r)&&s.get(r)!==x.n||x.m===S)return x.m=S,x;let t=!1;for(const[r,n]of x.d)if(h(e,r).n!==n){t=!0;break}if(!t)return x.m=S,x}let w=!0;const C=new Set(x.d.keys()),E=new Map,I=()=>{for(const e of C)E.has(e)||x.d.delete(e)},D=()=>{if(a.has(r)){const t=!l.size;g(e,r),t&&(f(e),p(e))}},P=t=>{var n;if(t===r){const r=d(e,t);if(!TS(r)){if(!OS(t))throw new Error("no atom init");v(e,t,t.init)}return NS(r)}const i=h(e,t);try{return NS(i)}finally{E.set(t,i.n),x.d.set(t,i.n),_S(x.v)&&jS(r,x.v,i),a.has(r)&&(null==(n=a.get(t))||n.t.add(r)),w||D()}};let R,M;const L={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)||qS(r)||console.warn("setSelf function cannot be used with read-only atom"),!M&&qS(r)&&(M=(...n)=>{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,r,...n)}finally{f(e),p(e)}}),M}},A=x.n,k=s.get(r)===A;try{"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&KS.delete(e);const i=c(e,r,P,L);if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&KS.has(e)&&console.warn("Detected store mutation during atom read. This is not supported."),v(e,r,i),_S(i)){y(e,i,()=>null==R?void 0:R.abort());const t=()=>{I(),D()};i.then(t,t)}else I();return null==(n=u.r)||n.call(u,r),x.m=S,x}catch(e){return delete x.v,x.e=e,++x.n,x.m=S,x}finally{w=!1,x.n!==A&&k&&(s.set(r,x.n),l.add(r),null==(i=u.c)||i.call(u,r))}},JS=(e,t)=>{const r=uw(e),n=r[1],i=r[2],o=r[11],a=[t];for(;a.length;){const t=a.pop(),r=o(e,t);for(const s of FS(t,r,n)){const t=o(e,s);i.get(s)!==t.n&&(i.set(s,t.n),a.push(s))}}},ZS=(e,r,...n)=>{const i=uw(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=>NS(d(e,t)),b=(n,...i)=>{var s;const d=l(e,n);try{if(n===r){if(!OS(n))throw new Error("atom not writable");"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&KS.add(e);const r=d.n,l=i[0];return m(e,n,l),h(e,n),void(r!==d.n&&(++g[0],o.add(n),p(e,n),null==(s=a.c)||s.call(a,n)))}return f(e,n,...i)}finally{v||(c(e),u(e))}};try{return s(e,r,y,b,...n)}finally{v=!1}},QS=(e,t)=>{var r;const n=uw(e),i=n[1],o=n[3],a=n[6],s=n[11],l=n[15],u=n[18],c=n[19],d=s(e,t),p=i.get(t);if(p){for(const[n,i]of d.d)if(!p.d.has(n)){const c=s(e,n);u(e,n).t.add(t),p.d.add(n),i!==c.n&&(o.add(n),l(e,n),null==(r=a.c)||r.call(a,n))}for(const r of p.d)if(!d.d.has(r)){p.d.delete(r);const n=c(e,r);null==n||n.t.delete(t)}}},ew=(e,t)=>{var r;const n=uw(e),i=n[1],o=n[4],a=n[6],s=n[10],l=n[11],u=n[12],c=n[13],d=n[14],p=n[16],f=n[18],h=l(e,t);let m=i.get(t);if(!m){d(e,t);for(const r of h.d.keys()){f(e,r).t.add(t)}if(m={l:new Set,d:new Set(h.d.keys()),t:new Set},i.set(t,m),qS(t)){const r=()=>{let r=!0;const n=(...n)=>{try{return p(e,t,...n)}finally{r||(c(e),u(e))}};try{const i=s(e,t,n);i&&(m.u=()=>{r=!0;try{i()}finally{r=!1}})}finally{r=!1}};o.add(r)}null==(r=a.m)||r.call(a,t)}return m},tw=(e,t)=>{var r,n;const i=uw(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==(r=o.get(e))?void 0:r.d.has(t)){p=!0;break}if(p)return d;d.u&&a.add(d.u),d=void 0,o.delete(t);for(const r of c.d.keys()){const n=u(e,r);null==n||n.t.delete(t)}null==(n=s.u)||n.call(s,t)},rw=(e,t,r)=>{const n=uw(e),i=n[11],o=n[27],a=i(e,t),s="v"in a,l=a.v;if(_S(r))for(const n of a.d.keys())jS(t,r,i(e,n));a.v=r,delete a.e,s&&Object.is(l,a.v)||(++a.n,_S(l)&&o(e,l))},nw=(e,t)=>NS((0,uw(e)[14])(e,t)),iw=(e,t,...r)=>{const n=uw(e),i=n[3],o=n[12],a=n[13],s=n[16],l=i.size;try{return s(e,t,...r)}finally{i.size!==l&&(a(e),o(e))}},ow=(e,t,r)=>{const n=uw(e),i=n[12],o=n[18],a=n[19],s=o(e,t).l;return s.add(r),i(e),()=>{s.delete(r),a(e,t),i(e)}},aw=(e,t,r)=>{const n=uw(e)[25];let i=n.get(t);if(!i){i=new Set,n.set(t,i);const e=()=>n.delete(t);t.then(e,e)}i.add(r)},sw=(e,t)=>{const r=uw(e)[25].get(t);null==r||r.forEach(e=>e())},lw=new WeakMap,uw=e=>{const r=lw.get(e);if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&!r)throw new Error("Store must be created by buildStore to read its building blocks");return r};function cw(e){const t=uw(e),r=t[24];return r?r(t):t}function dw(...e){const t={get:e=>(0,uw(t)[21])(t,e),set:(e,...r)=>(0,uw(t)[22])(t,e,...r),sub:(e,r)=>(0,uw(t)[23])(t,e,r)},r=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},$S,HS,VS,BS,GS,US,YS,XS,JS,ZS,QS,ew,tw,rw,nw,iw,ow,void 0,new WeakMap,aw,sw,[0]].map((t,r)=>e[r]||t);return lw.set(t,Object.freeze(r)),t}let pw,fw=0;function hw(e,r){const n="atom"+ ++fw,i={toString(){return"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&this.debugLabel?n+":"+this.debugLabel:n}};return"function"==typeof e?i.read=e:(i.init=e,i.read=mw,i.write=gw),r&&(i.write=r),i}function mw(e){return e(this)}function gw(e,t,r){return t(this,"function"==typeof r?r(e(this)):r)}function vw(){return dw()}const yw=u(void 0);function bw(e){const r=h(yw);return(null==e?void 0:e.store)||r||(pw||(pw=vw(),"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=pw),globalThis.__JOTAI_DEFAULT_STORE__!==pw&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),pw)}function xw({children:e,store:t}){const r=l(null);return t?n(yw.Provider,{value:t},e):(null===r.current&&(r.current=vw()),n(yw.Provider,{value:r.current},e))}const Sw=e=>"function"==typeof(null==e?void 0:e.then),ww=e=>{e.status||(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}))},Cw=r.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(ww(e),e)}),Ew=new WeakMap,Iw=(e,t,r)=>{const n=cw(e)[26];let i=Ew.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=r();Sw(t)?(Ew.set(t,i),s=t,t.then(l(t),u(t)),n(e,t,c)):o(t)}catch(e){a(e)}};t.then(l(t),u(t)),n(e,t,c)}),Ew.set(t,i)),i};function Dw(e,t){const{delay:n,unstable_promiseStatus:i=!r.use}={},o=bw(t),[[a,s,l],u]=c(t=>{const r=o.get(e);return Object.is(t[0],r)&&t[1]===o&&t[2]===e?t:[r,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);Sw(t)&&ww(Iw(o,t,()=>o.get(e)))}catch(e){}if("number"==typeof n)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,n);u()});return u(),t},[o,e,n,i]),p(f),Sw(f)){const t=Iw(o,f,()=>o.get(e));return i&&ww(t),Cw(t)}return f}function Pw(e,r){const n=bw(r);return f((...r)=>{if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&!("write"in e))throw new Error("not writable atom");return n.set(e,...r)},[n,e])}function Rw(e,t){return[Dw(e,t),Pw(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))}},r){var n;let i,o;const a={getItem:(t,n)=>{var a,s;const l=e=>{if(i!==(e=e||"")){try{o=JSON.parse(e,null==r?void 0:r.reviver)}catch(e){return n}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,r)=>{var n;return null==(n=e())?void 0:n.setItem(t,JSON.stringify(r,void 0))},removeItem:t=>{var r;return null==(r=e())?void 0:r.removeItem(t)}};let s;try{s=null==(n=e())?void 0:n.subscribe}catch(e){}var l;!s&&"undefined"!=typeof window&&"function"==typeof window.addEventListener&&window.Storage&&(s=(t,r)=>{if(!(e()instanceof window.Storage))return()=>{};const n=n=>{n.storageArea===e()&&n.key===t&&r(n.newValue)};return window.addEventListener("storage",n),()=>{window.removeEventListener("storage",n)}}),s&&(a.subscribe=(l=s,(e,t,r)=>l(e,e=>{let n;try{n=JSON.parse(e||"")}catch(e){n=r}t(n)})))}();const Mw=(e,t,r)=>(t.has(r)?t:t.set(r,e())).get(r),Lw=new WeakMap,Aw=()=>{};const kw=new WeakMap;function Ow(e,t){const r=bw(t),n=qw(r);for(const[i,...o]of e)n.has(i)&&!(null==t?void 0:t.dangerouslyForceHydrate)||(n.add(i),r.set(i,...o))}const qw=e=>{let t=kw.get(e);return t||(t=new WeakSet,kw.set(e,t)),t};function Tw(){return Boolean("undefined"!=typeof process&&process.env?.NODE_ENV&&!1)}function Nw(e){const t=hw(()=>[]),r=hw(function(e){const[n,i,o]=e(t);o.has(r)&&(n.forEach(e),++i.n)});return r.effect=e,r.INTERNAL_onInit=e=>{const n=new Set;let i,o=0,a=!1,s=!1,l=!1;function u(){if(o)return;n.clear();let t=!0;const c=i=>{if(l)return e.get(i);if(i===r){const t=h(e,i);if(!TS(t)){if(!OS(i))throw new Error("no atom init");S(e,i,i.init)}return NS(t)}const o=v(e,i);try{return NS(o)}finally{C.d.set(i,o.n),d.get(i)?.t.add(r),t?n.add(i):d.has(i)&&(x(e,r),g(e),m(e))}};c.peek=e.get;const w=(n,...i)=>{const a=h(e,n);try{if(++o,n===r){if(!OS(n))throw new Error("atom not writable");const t=a.n,r=i[0];return S(e,n,r),x(e,n),void(t!==a.n&&(p.add(n),f.c?.(n),y(e,n)))}return b(e,n,...i)}finally{t||(g(e),m(e)),--o}};w.recurse=(t,...n)=>{if(l){if(Tw())throw new Error("set.recurse is not allowed in cleanup")}else try{return a=!0,x(e,r),w(t,...n)}finally{g(e),a=!1,s&&(s=!1,u())}};try{i?.();const e=r.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,n.forEach(t=>{C.d.set(t,h(e,t).n)}),x(e,r),g(e)}}const c=cw(e),d=c[1],p=c[3],f=WS(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 r=_w.get(e);r||(r=new Set,_w.set(e,r),t.f.add(function(){for(const e of r)r.delete(e),e()}));return r}(e,f),C=h(e,r);C.v=void 0,Object.assign(e.get(t),[n,C,d]),f.c.add(r,function(){p.delete(r)}),f.m.add(r,function(){w.add(u),i&&w.delete(i)}),f.u.add(r,function(){w.delete(u),i&&w.add(i)}),f.c.add(r,function(){a?s=!0:w.add(u)})},Tw()&&(Object.defineProperty(t,"debugLabel",{get:()=>r.debugLabel?`${r.debugLabel}:ref`:void 0,configurable:!0,enumerable:!0}),t.debugPrivate=!0),r}const _w=new WeakMap;const jw=async(e,t,r)=>{const n=e.get(r);void 0!==n&&("dimension"===n.type?await t.moveDimensionToAlternative(n.def.qDef.cId):await t.moveMeasureToAlternative(n.def.qDef.cId))},Fw=async(e,t,r)=>{const n=e.get(r);void 0!==n&&("dimension"===n.type?await t.moveDimensionFromAlternative(n.def.qDef.cId):await t.moveMeasureFromAlternative(n.def.qDef.cId))},zw=async e=>{const{type:t,handler:r,model:n,fieldInfo:i,handlerQueue:o}=e;void 0!==r&&void 0!==n&&o&&o.add(async()=>{switch(t){case"apply":for(const t of e.localChecked)await Fw(i,r,t);for(const t of e.localUnchecked)await jw(i,r,t);break;case"checked":await Fw(i,r,e.cId);break;case"unchecked":await jw(i,r,e.cId)}})},Ww=hw(),$w=hw(),Hw=hw(),Vw=hw(e=>e(Hw)?.translate??(e=>e)),Bw=hw(""),Gw=hw(e=>{const t=e(Bw).toLowerCase().trim();return({title:e})=>e.toLowerCase().trim().includes(t)}),Uw=e=>7005!==e.qError?.qErrorCode,Yw=new WeakMap,Kw={qInfo:{qType:"AlternativeLayout"},qHyperCubeDef:{qMode:"S",qDimensions:[],qMeasures:[],qInitialDataFetch:[{qTop:0,qLeft:0,qHeight:0,qWidth:0}],excludedNoOfLeftDims:-1,qCalcCond:{qv:"0"}}},Xw=function(e,r=Aw){return((e,t,r)=>{const n=Mw(()=>new WeakMap,Lw,t);return Mw(e,n,r)})(()=>{const n=new WeakMap,i=new WeakMap,o=hw(0),a=hw([]);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=hw(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[r]=t(a);r()},e=>{n.set(u,e);const[r]=t(a);r()}),n.has(u))throw n.get(u);return i.has(u)?{p:u,v:i.get(u)}:l&&"v"in l?{p:u,f:r(l.v),v:l.v}:{p:u,f:r()}});return s.init=void 0,"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&(s.debugPrivate=!0),hw(e=>{const t=e(s);return"f"in t?t.f:t.v},(t,r,...n)=>r(e,...n))},e,r)}(hw(async e=>{const t=e(Ww);if(t){if(Yw.has(t))return Yw.get(t);try{const e=await t.app.createSessionObject(Kw);return Yw.set(t,e),e}catch(e){return void console.error("Error creating alternative layout model:",e)}}})),Jw=hw(null),Zw=hw(),Qw=Nw((e,t)=>{const r=e(Ww),n=e(Xw);if(!r||!n)return;const i=async()=>{const e=await r.getLayout();if(e.qSelectionInfo?.qInSelections)return;const i=await r.getEffectiveProperties();await n.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 n.getLayout();t(Zw,{layout:structuredClone(e),properties:structuredClone(i),altLayout:structuredClone(o)}),t(Jw,null)};return i(),r.Invalidated?.bind(i),()=>{r.Invalidated?.unbind(i)}}),eC=hw(e=>e(Zw)?.layout),tC=hw(e=>e(Zw)?.altLayout),rC=hw(e=>e(Zw)?.properties),nC=hw(e=>{const t=e(Zw)?.layout;return t?.qHyperCube.qDimensionInfo.filter(Uw)??[]}),iC=hw(e=>{const t=e(Zw)?.layout;return t?.qHyperCube.qMeasureInfo.filter(Uw)??[]}),oC=hw(e=>{const t=e(eC),r=e(nC),n=e(iC),i=e(rC),o=new Map;return t&&i?(r.forEach((e,t)=>{o.set(e.cId,{id:e.cId,type:"dimension",def:i.qHyperCubeDef.qDimensions[t]})}),n.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 aC{#e=[];#t=!1;#r=!1;#n;#i;#o;#a;constructor({onQueueCompleted:e}){this.#n=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.#r=!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.#r=!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.#r||await(this.#n?.())}catch(e){console.error("[SequentialPromiseQueue] Error executing onQueueCompleted:",e)}finally{this.#t=!1,this.#e.length>0&&this.#l()}}}}const sC=hw(null),lC=Nw((e,t)=>{const r=e(Ww),n=e($w),i=new aC({onQueueCompleted:async()=>{r&&n&&await r.applyPatches([{qPath:"/qHyperCubeDef",qOp:"replace",qValue:JSON.stringify(n.properties.qHyperCubeDef)}],!0)}});t(sC,i);const o=()=>{i.pause()},a=()=>{i.continue(500)},s=()=>{i.abort()};return r?.Invalidated?.bind(o),r?.Validated?.bind(a),r?.Cancelled?.bind(s),r?.Closing?.bind(s),()=>{i.abort(),r?.Invalidated?.unbind(o),r?.Validated?.unbind(a),r?.Cancelled?.unbind(s),r?.Closing?.unbind(s)}}),uC=hw(e=>{const t=[...e(nC),...e(iC)].map(e=>e.cId);return new Set(t)}),cC=hw(new Set),dC=hw(new Set),pC=hw(e=>{const t=e(cC),r=e(dC);return e(uC).difference(r).union(t)}),fC=Nw((e,t)=>{e(uC),t(cC,new Set),t(dC,new Set)}),hC=hw(e=>e(pC),(e,t,r)=>{const n=e(pC).has(r),i=new Set(e(dC)),o=new Set(e(cC));n?(i.add(r),o.delete(r)):(o.add(r),i.delete(r)),t(dC,i),t(cC,o),zw({type:n?"unchecked":"checked",cId:r,handler:e($w),model:e(Ww),fieldInfo:e(oC),handlerQueue:e(sC)})}),mC=({props:e,children:t})=>(Ow([[Ww,e.args.model],[Hw,e.args.apis],[$w,e.args.handler]]),Dw(fC),Dw(Qw),Dw(lC),t);function gC(e,t){const r=new Set(e),n=new Set(t);return e===t||r.size===n.size&&Array.from(r).every(n.has.bind(n))}function vC(e){return"write"in e}const yC=new WeakMap,bC={},{read:xC,write:SC}=hw(null);function wC(e,t,r){const[n,i,o,,a]=e,s=n.get(t);if(s)return s;if(r===e){let n=i.get(t);return n||(n=[DC(e,t,r),r],i.set(t,n)),n}const l=r??bC;let u=o.get(l);u||(u=new WeakMap,o.set(l,u));let c=u.get(t);if(!c){const[n,i]=a?wC(a,t,r):[t];c=[t.read===xC?n:DC(e,t,i),i],u.set(t,c)}return c}function CC(e){for(const t of e[5])t()}function EC(e,t,r,n,i){if(r.read===xC&&vC(r)&&vC(t)&&r.write!==SC&&e!==n){const{write:o}=r;return t.write=IC(e,r.write.bind(r),n,i),()=>{t.write=o}}}function IC(e,t,r,n=r){return function(i,o,...a){return t(function(t){const[n]=wC(e,t,r);return i(n)},function(t,...i){const[a]=wC(e,t,r),s=EC(e,a,t,r,n);try{return o(a,...i)}finally{null==s||s()}},...a)}}function DC(e,t,r){const n=Object.getOwnPropertyDescriptors(t);Object.keys(n).filter(e=>["read","write","debugLabel"].includes(e)).forEach(e=>n[e].configurable=!0);const i=Object.getPrototypeOf(t),o=Object.create(i,n);return o.read!==xC&&(o.read=function(e,t,r){return function(n,i){return t(function(t){const[i]=wC(e,t,r);return n(i)},i)}}(e,t.read.bind(t),r)),vC(o)&&vC(t)&&o.write!==SC&&(o.write=IC(e,t.write.bind(t),r)),o}function PC({atoms:e=[],atomFamilies:t=[],parentStore:r,name:n}){const i=new WeakSet(e),o=yC.get(r),a=(null==o?void 0:o[3])??r,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],r=[...cw(t)],n=r[21],i=r[22],o=r[23],a=r[9],s={};r[9]=(e,t)=>a(l,t),r[21]=h(n),r[22]=p,r[23]=h(o),r[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=dw(...r);return l;function u(t){const r=new WeakMap;return function(n){let i=r.get(n);if(i)return i;const o=t(n);return o?(i={...o,d:m(o.d,function(t){return r=>t(wC(e,r)[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}},r.set(n,i),i):void 0}}function c(e){const t=new WeakMap;return function(r){let n=t.get(r);if(n)return n;const i=e(r);return i?(n={...i,d:g(i.d),t:g(i.t),get u(){return i.u},set u(e){i.u=e}},t.set(r,n),n):void 0}}function d(e,t){return function(r,n){return e.get(n)||(e.set(n,t(r,n)),e.get(n))}}function p(t,r,...n){const[o,a]=wC(e,r),s=EC(e,o,r,a,e);try{return i(t,o,...n)}finally{null==s||s()}}function f(t,r){return function(n,...i){const[o]=wC(e,n);return(r?r(t):t)(o,...i)}}function h(t,r){return function(n,i,...o){const[a]=wC(e,i);return(r?r(t):t)(n,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 r of t)yield wC(e,r)[0]}}}function v(t){if(!t)return;const r=f(t);return r.add=function(r,n){if(void 0===r)return t.add(void 0,n);const[i]=wC(e,r);return t.add(i,n)},r}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(r){delete s[t],e[t]=r},configurable:!0,enumerable:!0}]))),Object.assign(t,e)}}(s);s[6]=c,Object.assign(c,{name:n}),yC.set(c,s);for(const t of new Set(e))l.set(t,[DC(s,t,s),s]);for(const e of new Set(t)){for(const t of e.getParams()){const r=e(t);l.has(r)||l.set(r,[DC(s,r,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,[DC(s,t,s),s])});u.add(t)}return c}const RC=function(e,t){return function(r){const{atoms:i=[],atomFamilies:o=[],children:a,scope:s,name:l}=r,u=t(),c=Array.from(i,e=>Array.isArray(e)?e[0]:e);function p(){return[s??PC({atoms:c,atomFamilies:o,parentStore:u,name:l}),function(e){return u!==e.parentStore||!gC(c,e.atoms)||!gC(o,e.atomFamilies)||s!==e.providedScope}]}const[[f,h],g]=m(p);if(h({atoms:c,atomFamilies:o,parentStore:u,providedScope:s})){const e=yC.get(f);e&&CC(e),g(p)}return Ow(Array.from(i).filter(Array.isArray),{store:f}),d(()=>{const e=yC.get(f);return()=>{e&&CC(e)}},[f]),n(e,{store:f,children:a})}}(xw,bw);var MC=Object.defineProperty,LC=Object.defineProperties,AC=Object.getOwnPropertyDescriptors,kC=Object.getOwnPropertySymbols,OC=Object.prototype.hasOwnProperty,qC=Object.prototype.propertyIsEnumerable,TC=(e,t,r)=>t in e?MC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,NC=(e,t)=>{for(var r in t||(t={}))OC.call(t,r)&&TC(e,r,t[r]);if(kC)for(var r of kC(t))qC.call(t,r)&&TC(e,r,t[r]);return e},_C=(e,t)=>LC(e,AC(t));function jC(e,t,r){if(t===r)return e;const n=e.slice();return n.splice(r,0,n.splice(t,1)[0]),n}function FC(e){return"initialIndex"in e&&"number"==typeof e.initialIndex&&"index"in e&&"number"==typeof e.index}function zC(e,t){return function(e,t,r){var n,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 n=e.findIndex(e=>u(e,a.id)),i=e.findIndex(e=>u(e,s.id));if(-1===n||-1===i){if(FC(a)){const n=a.initialIndex,i=a.index;return n===i||n<0||n>=e.length?("preventDefault"in t&&t.preventDefault(),e):r(e,n,i)}return e}if(!l&&"index"in a&&"number"==typeof a.index){const t=a.index;if(t!==n)return r(e,n,t)}return r(e,n,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&&FC(a)){const n=a.initialGroup,i=a.initialIndex,o=a.group,s=a.index;if(null==n||null==o||!(n in e)||!(o in e))return"preventDefault"in t&&t.preventDefault(),e;if(n===o&&i===s)return"preventDefault"in t&&t.preventDefault(),e;if(n===o)return _C(NC({},e),{[n]:r(e[n],i,s)});const l=e[n][i];return _C(NC({},e),{[n]:[...e[n].slice(0,i),...e[n].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==(n=m.shape)?void 0:n.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&&FC(a)){const t=null!=a.group&&a.group!==d,n=a.index!==f;if(t||n){const t=null!=(o=a.group)?o:d;if(t in e){if(d===t)return _C(NC({},e),{[d]:r(e[d],f,a.index)});const n=e[d][f];return _C(NC({},e),{[d]:[...e[d].slice(0,f),...e[d].slice(f+1)],[t]:[...e[t].slice(0,a.index),n,...e[t].slice(a.index)]})}}}return"preventDefault"in t&&t.preventDefault(),e}if(d===p)return _C(NC({},e),{[d]:r(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 _C(NC({},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,jC)}function WC(e,t){let r=null;const n=new Map,i=new Set;function o(i){let s;if(void 0===t)s=n.get(i);else for(const[e,r]of n)if(t(e,i)){s=r;break}if(void 0!==s){if(!r?.(s[1],i))return s[0];o.remove(i)}const l=e(i);return n.set(i,[l,Date.now()]),a("CREATE",i,l),l}function a(e,t,r){for(const n of i)n({type:e,param:t,atom:r})}return o.unstable_listen=e=>(i.add(e),()=>{i.delete(e)}),o.getParams=()=>n.keys(),o.remove=e=>{if(void 0===t){if(!n.has(e))return;const[t]=n.get(e);n.delete(e),a("REMOVE",e,t)}else for(const[r,[i]]of n)if(t(r,e)){n.delete(r),a("REMOVE",r,i);break}},o.setShouldRemove=e=>{if(r=e,r)for(const[e,[t,i]]of n)r(i,e)&&(n.delete(e),a("REMOVE",e,t))},o}const $C=({itemIndex:e,sectionIndex:t})=>void 0!==e?`${t}-${e}`:`${t}`,HC=hw(),VC=hw(e=>e(HC)?.numberOfSections??0),BC=hw(e=>e(HC)?.numberOfItemsInSection??[]),GC=hw(e=>e(HC)?.keyExtractor??$C),UC=hw(e=>e(HC)?.emptyTexts??(()=>({title:"No items",message:"There are no items to display."}))),YC=hw(e=>e(HC)?.onDragEnd),KC=hw(e=>e(HC)?.onDragOver),XC=hw(e=>e(HC)?.itemRenderer),JC=hw(e=>e(HC)?.headerRenderer),ZC=hw(e=>e(HC)?.dragOverlayRenderer),QC=hw(e=>e(HC)?.onClick),eE=hw(e=>{const t=e(VC),r=e(BC),n=e(GC),i={};for(let e=0;e<t;e++)i[e]=Array.from({length:r[e]},(t,r)=>n({sectionIndex:e,itemIndex:r}));return i}),tE=hw(null),rE=hw(e=>e(tE),(e,t,r)=>{if(null===r)return void t(tE,null);const n=e(tE);t(tE,{...n,...r})}),nE=WC(e=>hw(null,(t,r,n)=>{let i;"over"===e?i=t(KC):"end"===e&&(i=t(YC),r(rE,null));const{source:o,target:a}=n.operation;if(null===a)return void r(rE,{toIndex:void 0,toSectionIndex:void 0});const s=zC(t(eE),n)[a.data.sectionIndex].indexOf(o.id),l=-1!==s?s:a.sortable?.index??0;"start"===e?r(rE,{id:o.id,startSection:o.data.sectionKey,startIndex:o.data.itemIndex,startSectionIndex:o.data.sectionIndex}):"over"===e&&r(rE,{toIndex:l,toSectionIndex:a.data.sectionIndex}),i?.({id:o.id,toIndex:l,toSection:a.data.sectionKey,fromSection:o.data.sectionKey,startSection:t(rE)?.startSection??o.data.sectionKey,event:n})})),iE=[HC,VC,BC,GC,UC,YC,XC,JC,QC,rE],oE=[nE],aE=({props:e,children:t})=>{const r=Pw(HC);return g(()=>{r(e)},[e,r]),t};var sE=Symbol.for("preact-signals");function lE(){if(fE>1)fE--;else{var e,t=!1;for(!function(){var e=vE;for(vE=void 0;void 0!==e;)e.S.v===e.v&&(e.S.i=e.i),e=e.o}();void 0!==pE;){var r=pE;for(pE=void 0,hE++;void 0!==r;){var n=r.u;if(r.u=void 0,r.f&=-3,!(8&r.f)&&wE(r))try{r.c()}catch(r){t||(e=r,t=!0)}r=n}}if(hE=0,fE--,t)throw e}}function uE(e){if(fE>0)return e();gE=++mE,fE++;try{return e()}finally{lE()}}var cE=void 0;function dE(e){var t=cE;cE=void 0;try{return e()}finally{cE=t}}var pE=void 0,fE=0,hE=0,mE=0,gE=0,vE=void 0,yE=0;function bE(e){if(void 0!==cE){var t=e.n;if(void 0===t||t.t!==cE)return t={i:0,S:e,p:cE.s,n:void 0,t:cE,e:void 0,x:void 0,r:t},void 0!==cE.s&&(cE.s.n=t),cE.s=t,e.n=t,32&cE.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=cE.s,t.n=void 0,cE.s.n=t,cE.s=t),t}}function xE(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 SE(e,t){return new xE(e,t)}function wE(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 CE(e){for(var t=e.s;void 0!==t;t=t.n){var r=t.S.n;if(void 0!==r&&(t.r=r),t.S.n=t,t.i=-1,void 0===t.n){e.s=t;break}}}function EE(e){for(var t=e.s,r=void 0;void 0!==t;){var n=t.p;-1===t.i?(t.S.U(t),void 0!==n&&(n.n=t.n),void 0!==t.n&&(t.n.p=n)):r=t,t.S.n=t.r,void 0!==t.r&&(t.r=void 0),t=n}e.s=r}function IE(e,t){xE.call(this,void 0),this.x=e,this.s=void 0,this.g=yE-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 DE(e,t){return new IE(e,t)}function PE(e){var t=e.m;if(e.m=void 0,"function"==typeof t){fE++;var r=cE;cE=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,RE(e),t}finally{cE=r,lE()}}}function RE(e){for(var t=e.s;void 0!==t;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,PE(e)}function ME(e){if(cE!==this)throw new Error("Out-of-order effect");EE(this),cE=e,this.f&=-2,8&this.f&&RE(this),lE()}function LE(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 AE(e,t){var r=new LE(e,t);try{r.c()}catch(e){throw r.d(),e}var n=r.d.bind(r);return n[Symbol.dispose]=n,n}xE.prototype.brand=sE,xE.prototype.h=function(){return!0},xE.prototype.S=function(e){var t=this,r=this.t;r!==e&&void 0===e.e&&(e.x=r,this.t=e,void 0!==r?r.e=e:dE(function(){var e;null==(e=t.W)||e.call(t)}))},xE.prototype.U=function(e){var t=this;if(void 0!==this.t){var r=e.e,n=e.x;void 0!==r&&(r.x=n,e.e=void 0),void 0!==n&&(n.e=r,e.x=void 0),e===this.t&&(this.t=n,void 0===n&&dE(function(){var e;null==(e=t.Z)||e.call(t)}))}},xE.prototype.subscribe=function(e){var t=this;return AE(function(){var r=t.value,n=cE;cE=void 0;try{e(r)}finally{cE=n}},{name:"sub"})},xE.prototype.valueOf=function(){return this.value},xE.prototype.toString=function(){return this.value+""},xE.prototype.toJSON=function(){return this.value},xE.prototype.peek=function(){var e=cE;cE=void 0;try{return this.value}finally{cE=e}},Object.defineProperty(xE.prototype,"value",{get:function(){var e=bE(this);return void 0!==e&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(hE>100)throw new Error("Cycle detected");!function(e){0!==fE&&0===hE&&e.l!==gE&&(e.l=gE,vE={S:e,v:e.v,i:e.i,o:vE})}(this),this.v=e,this.i++,yE++,fE++;try{for(var t=this.t;void 0!==t;t=t.x)t.t.N()}finally{lE()}}}}),IE.prototype=new xE,IE.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===yE)return!0;if(this.g=yE,this.f|=1,this.i>0&&!wE(this))return this.f&=-2,!0;var e=cE;try{CE(this),cE=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 cE=e,EE(this),this.f&=-2,!0},IE.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)}xE.prototype.S.call(this,e)},IE.prototype.U=function(e){if(void 0!==this.t&&(xE.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)}},IE.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(IE.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=bE(this);if(this.h(),void 0!==e&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),LE.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()}},LE.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,PE(this),CE(this),fE++;var e=cE;return cE=this,ME.bind(this,e)},LE.prototype.N=function(){2&this.f||(this.f|=2,this.u=pE,pE=this)},LE.prototype.d=function(){this.f|=8,1&this.f||RE(this)},LE.prototype.dispose=function(){this.d()};var kE,OE,qE,TE,NE,_E,jE,FE,zE,WE,$E,HE,VE,BE,GE,UE,YE,KE,XE,JE,ZE=Object.create,QE=Object.defineProperty,eI=Object.defineProperties,tI=Object.getOwnPropertyDescriptor,rI=Object.getOwnPropertyDescriptors,nI=Object.getOwnPropertySymbols,iI=Object.prototype.hasOwnProperty,oI=Object.prototype.propertyIsEnumerable,aI=e=>{throw TypeError(e)},sI=(e,t,r)=>t in e?QE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,lI=(e,t)=>QE(e,"name",{value:t,configurable:!0}),uI=["class","method","getter","setter","accessor","field","value","get","set"],cI=e=>void 0!==e&&"function"!=typeof e?aI("Function expected"):e,dI=(e,t,r,n,i)=>({kind:uI[e],name:t,metadata:n,addInitializer:e=>r._?aI("Already initialized"):i.push(cI(e||null))}),pI=(e,t)=>{return sI(t,(r="metadata",(n=Symbol[r])?n:Symbol.for("Symbol."+r)),e[3]);var r,n},fI=(e,t,r,n)=>{for(var i=0,o=e[t>>1],a=o&&o.length;i<a;i++)1&t?o[i].call(r):n=o[i].call(r,n);return n},hI=(e,t,r,n,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=uI[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)&&tI(d<4?i:{get[r](){return vI(this,o)},set[r](e){return bI(this,o,e)}},r));d?f&&d<4&&lI(o,(d>2?"set ":d>1?"get ":"")+r):lI(i,r);for(var b=n.length-1;b>=0;b--)u=dI(d,r,l={},e[3],v),d&&(u.static=p,u.private=f,c=u.access={has:f?e=>gI(i,e):e=>r in e},3^d&&(c.get=f?e=>(1^d?vI:xI)(e,i,4^d?o:y.get):e=>e[r]),d>2&&(c.set=f?(e,t)=>bI(e,i,t,4^d?o:y.set):(e,t)=>e[r]=t)),s=(0,n[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?cI(s)&&(d>4?g.unshift(s):d?f?o=s:y[m]=s:i=s):"object"!=typeof s||null===s?aI("Object expected"):(cI(a=s.get)&&(y.get=a),cI(a=s.set)&&(y.set=a),cI(a=s.init)&&g.unshift(a));return d||pI(e,i),y&&QE(i,r,y),f?4^d?o:y:i},mI=(e,t,r)=>t.has(e)||aI("Cannot "+r),gI=(e,t)=>Object(t)!==t?aI('Cannot use the "in" operator on this value'):e.has(t),vI=(e,t,r)=>(mI(e,t,"read from private field"),r?r.call(e):t.get(e)),yI=(e,t,r)=>t.has(e)?aI("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),bI=(e,t,r,n)=>(mI(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),xI=(e,t,r)=>(mI(e,t,"access private method"),r);function SI(e,t){if(t){let r;return DE(()=>{const n=e();return n&&r&&t(r,n)?r:(r=n,n)})}return DE(e)}function wI(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 r of e)if(!t.has(r))return!1;return!0}if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;return!e.some((e,r)=>!wI(e,t[r]))}if("object"==typeof e&&"object"==typeof t){const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;const i=r.some(r=>!wI(e[r],t[r]));return!i}return!1}function CI({get:e},t){return{init:e=>SE(e),get(){return e.call(this).value},set(t){const r=e.call(this);r.peek()!==t&&(r.value=t)}}}function EI(e,t){const r=new WeakMap;return function(){let t=r.get(this);return t||(t=SI(e.bind(this)),r.set(this,t)),t.value}}function II(e=!0){return function(t,r){r.addInitializer(function(){const t="field"===r.kind||r.static?this:Object.getPrototypeOf(this),n=Object.getOwnPropertyDescriptor(t,r.name);n&&Object.defineProperty(t,r.name,((e,t)=>eI(e,rI(t)))(((e,t)=>{for(var r in t||(t={}))iI.call(t,r)&&sI(e,r,t[r]);if(nI)for(var r of nI(t))oI.call(t,r)&&sI(e,r,t[r]);return e})({},n),{enumerable:e}))})}}function DI(...e){const t=e.map(e=>AE(e));return()=>t.forEach(e=>e())}_E=[CI],NE=[CI],TE=[CI],qE=[II()],OE=[II()],kE=[II()];var PI,RI=class{constructor(e,t=Object.is){this.defaultValue=e,this.equals=t,fI(jE,5,this),yI(this,HE),yI(this,FE,fI(jE,8,this)),fI(jE,11,this),yI(this,VE,fI(jE,12,this)),fI(jE,15,this),yI(this,YE,fI(jE,16,this)),fI(jE,19,this),this.reset=this.reset.bind(this),this.reset()}get current(){return vI(this,HE,XE)}get initial(){return vI(this,HE,WE)}get previous(){return vI(this,HE,GE)}set current(e){const t=dE(()=>vI(this,HE,XE));e&&t&&this.equals(t,e)||uE(()=>{vI(this,HE,WE)||bI(this,HE,e,$E),bI(this,HE,t,UE),bI(this,HE,e,JE)})}reset(e=this.defaultValue){uE(()=>{bI(this,HE,void 0,UE),bI(this,HE,e,$E),bI(this,HE,e,JE)})}};function MI(e){return dE(()=>{const t={};for(const r in e)t[r]=e[r];return t})}jE=[,,,ZE(null)],FE=new WeakMap,HE=new WeakSet,VE=new WeakMap,YE=new WeakMap,zE=hI(jE,20,"#initial",_E,HE,FE),WE=zE.get,$E=zE.set,BE=hI(jE,20,"#previous",NE,HE,VE),GE=BE.get,UE=BE.set,KE=hI(jE,20,"#current",TE,HE,YE),XE=KE.get,JE=KE.set,hI(jE,2,"current",qE,RI),hI(jE,2,"initial",OE,RI),hI(jE,2,"previous",kE,RI),pI(jE,RI);PI=new WeakMap;var LI,AI,kI,OI,qI,TI=Object.create,NI=Object.defineProperty,_I=Object.getOwnPropertyDescriptor,jI=Object.getOwnPropertySymbols,FI=Object.prototype.hasOwnProperty,zI=Object.prototype.propertyIsEnumerable,WI=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),$I=e=>{throw TypeError(e)},HI=Math.pow,VI=(e,t,r)=>t in e?NI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,BI=["class","method","getter","setter","accessor","field","value","get","set"],GI=e=>void 0!==e&&"function"!=typeof e?$I("Function expected"):e,UI=(e,t,r,n,i)=>({kind:BI[e],name:t,metadata:n,addInitializer:e=>r._?$I("Already initialized"):i.push(GI(e||null))}),YI=(e,t,r,n,i,o)=>{for(var a,s,l,u,c=7&t,d=BI[c+5],p=e[2]||(e[2]=[]),f=(i=i.prototype,_I(i,r)),h=n.length-1;h>=0;h--)(l=UI(c,r,s={},e[3],p)).static=false,l.private=false,u=l.access={has:e=>r in e},u.get=e=>e[r],a=(0,n[h])(f[d],l),s._=1,GI(a)&&(f[d]=a);return f&&NI(i,r,f),i},KI=(e,t,r)=>t.has(e)||$I("Cannot "+r),XI=class e{constructor(e,t){this.x=e,this.y=t}static delta(t,r){return new e(t.x-r.x,t.y-r.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:r}){return new e(t,r)}},JI=class e{constructor(e,t,r,n){this.left=e,this.top=t,this.width=r,this.height=n,this.scale={x:1,y:1}}get inverseScale(){return{x:1/this.scale.x,y:1/this.scale.y}}translate(t,r){const{top:n,left:i,width:o,height:a,scale:s}=this,l=new e(i+t,n+r,o,a);return l.scale=((e,t)=>{for(var r in t||(t={}))FI.call(t,r)&&VI(e,r,t[r]);if(jI)for(var r of jI(t))zI.call(t,r)&&VI(e,r,t[r]);return e})({},s),l}get boundingRectangle(){const{width:e,height:t,left:r,top:n,right:i,bottom:o}=this;return{width:e,height:t,left:r,top:n,right:i,bottom:o}}get center(){const{left:e,top:t,right:r,bottom:n}=this;return new XI((e+r)/2,(t+n)/2)}get area(){const{width:e,height:t}=this;return e*t}equals(t){if(!(t instanceof e))return!1;const{left:r,top:n,width:i,height:o}=this;return r===t.left&&n===t.top&&i===t.width&&o===t.height}containsPoint(e){const{top:t,left:r,bottom:n,right:i}=this;return t<=e.y&&e.y<=n&&r<=e.x&&e.x<=i}intersectionArea(t){return t instanceof e?function(e,t){const r=Math.max(t.top,e.top),n=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-n,s=o-r;if(n<i&&r<o){return a*s}return 0}(this,t):0}intersectionRatio(e){const{area:t}=this,r=this.intersectionArea(e);return r/(e.area+t-r)}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:r,width:n,height:i}){return new e(r,t,n,i)}static delta(e,t,r={x:"center",y:"center"}){const n=(e,t)=>{const n=r[t],i="x"===t?e.left:e.top,o="x"===t?e.width:e.height;return"start"==n?i:"end"==n?i+o:i+o/2};return XI.delta({x:n(e,"x"),y:n(e,"y")},{x:n(t,"x"),y:n(t,"y")})}static intersectionRatio(t,r){return e.from(t).intersectionRatio(e.from(r))}};var ZI,QI=class extends(kI=RI,AI=[EI],LI=[EI],kI){constructor(e){var t,r,n;super(XI.from(e),(e,t)=>XI.equals(e,t)),((e,t,r)=>{for(var n=0,i=e[t>>1],o=i&&i.length;n<o;n++)i[n].call(r)})(qI,5,this),t=this,n=0,(r=OI).has(t)?$I("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(t):r.set(t,n),this.velocity={x:0,y:0}}get delta(){return XI.delta(this.current,this.initial)}get direction(){const{current:e,previous:t}=this;if(!t)return null;const r={x:e.x-t.x,y:e.y-t.y};return r.x||r.y?Math.abs(r.x)>Math.abs(r.y)?r.x>0?"right":"left":r.y>0?"down":"up":null}get current(){return super.current}set current(e){const{current:t}=this,r=XI.from(e),n={x:r.x-t.x,y:r.y-t.y},i=Date.now(),o=i-(KI(a=this,s=OI,"read from private field"),s.get(a));var a,s;const l=e=>Math.round(e/o*100);uE(()=>{((e,t,r)=>{KI(e,t,"write to private field"),t.set(e,r)})(this,OI,i),this.velocity={x:l(n.x),y:l(n.y)},super.current=r})}reset(e=this.defaultValue){super.reset(XI.from(e)),this.velocity={x:0,y:0}}};function eD({x:e,y:t},r){const n=Math.abs(e),i=Math.abs(t);return"number"==typeof r?Math.sqrt(HI(n,2)+HI(i,2))>r:"x"in r&&"y"in r?n>r.x&&i>r.y:"x"in r?n>r.x:"y"in r&&i>r.y}qI=(e=>{var t;return[,,,TI(null!=(t=null==e?void 0:e[WI("metadata")])?t:null)]})(kI),OI=new WeakMap,YI(qI,2,"delta",AI,QI),YI(qI,2,"direction",LI,QI),ZI=qI,VI(QI,WI("metadata"),ZI[3]);var tD,rD,nD,iD,oD=(e=>(e.Horizontal="x",e.Vertical="y",e))(oD||{}),aD=Object.values(oD),sD=Object.create,lD=Object.defineProperty,uD=Object.defineProperties,cD=Object.getOwnPropertyDescriptor,dD=Object.getOwnPropertyDescriptors,pD=Object.getOwnPropertySymbols,fD=Object.prototype.hasOwnProperty,hD=Object.prototype.propertyIsEnumerable,mD=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),gD=e=>{throw TypeError(e)},vD=(e,t,r)=>t in e?lD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,yD=(e,t)=>{for(var r in t||(t={}))fD.call(t,r)&&vD(e,r,t[r]);if(pD)for(var r of pD(t))hD.call(t,r)&&vD(e,r,t[r]);return e},bD=(e,t)=>uD(e,dD(t)),xD=(e,t)=>lD(e,"name",{value:t,configurable:!0}),SD=(e,t)=>{var r={};for(var n in e)fD.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&pD)for(var n of pD(e))t.indexOf(n)<0&&hD.call(e,n)&&(r[n]=e[n]);return r},wD=e=>{var t;return[,,,sD(null!=(t=null==e?void 0:e[mD("metadata")])?t:null)]},CD=["class","method","getter","setter","accessor","field","value","get","set"],ED=e=>void 0!==e&&"function"!=typeof e?gD("Function expected"):e,ID=(e,t,r,n,i)=>({kind:CD[e],name:t,metadata:n,addInitializer:e=>r._?gD("Already initialized"):i.push(ED(e||null))}),DD=(e,t)=>vD(t,mD("metadata"),e[3]),PD=(e,t,r,n)=>{for(var i=0,o=e[t>>1],a=o&&o.length;i<a;i++)1&t?o[i].call(r):n=o[i].call(r,n);return n},RD=(e,t,r,n,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=CD[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)&&cD(d<4?i:{get[r](){return AD(this,o)},set[r](e){return OD(this,o,e)}},r));d?f&&d<4&&xD(o,(d>2?"set ":d>1?"get ":"")+r):xD(i,r);for(var b=n.length-1;b>=0;b--)u=ID(d,r,l={},e[3],v),d&&(u.static=p,u.private=f,c=u.access={has:f?e=>LD(i,e):e=>r in e},3^d&&(c.get=f?e=>(1^d?AD:qD)(e,i,4^d?o:y.get):e=>e[r]),d>2&&(c.set=f?(e,t)=>OD(e,i,t,4^d?o:y.set):(e,t)=>e[r]=t)),s=(0,n[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?ED(s)&&(d>4?g.unshift(s):d?f?o=s:y[m]=s:i=s):"object"!=typeof s||null===s?gD("Object expected"):(ED(a=s.get)&&(y.get=a),ED(a=s.set)&&(y.set=a),ED(a=s.init)&&g.unshift(a));return d||DD(e,i),y&&lD(i,r,y),f?4^d?o:y:i},MD=(e,t,r)=>t.has(e)||gD("Cannot "+r),LD=(e,t)=>Object(t)!==t?gD('Cannot use the "in" operator on this value'):e.has(t),AD=(e,t,r)=>(MD(e,t,"read from private field"),r?r.call(e):t.get(e)),kD=(e,t,r)=>t.has(e)?gD("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),OD=(e,t,r,n)=>(MD(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),qD=(e,t,r)=>(MD(e,t,"access private method"),r);function TD(e,t){return{plugin:e,options:t}}function ND(e){return t=>TD(e,t)}function _D(e){return"function"==typeof e?{plugin:e,options:void 0}:e}tD=[CI];var jD=class{constructor(e,t){this.manager=e,this.options=t,kD(this,nD,PD(rD,8,this,!1)),PD(rD,11,this),kD(this,iD,new Set)}enable(){this.disabled=!1}disable(){this.disabled=!0}isDisabled(){return dE(()=>this.disabled)}configure(e){this.options=e}registerEffect(e){const t=AE(e.bind(this));return AD(this,iD).add(t),t}destroy(){AD(this,iD).forEach(e=>e())}static configure(e){return TD(this,e)}};rD=wD(null),nD=new WeakMap,iD=new WeakMap,RD(rD,4,"disabled",tD,jD,nD),DD(rD,jD);var FD,zD=class extends jD{},WD=class{constructor(e){this.manager=e,this.instances=new Map,kD(this,FD,[])}get values(){return Array.from(this.instances.values())}set values(e){const t=e.map(_D).reduceRight((e,t)=>e.some(({plugin:e})=>e===t.plugin)?e:[t,...e],[]),r=t.map(({plugin:e})=>e);for(const e of AD(this,FD))if(!r.includes(e)){if(e.prototype instanceof zD)continue;this.unregister(e)}for(const{plugin:e,options:r}of t)this.register(e,r);OD(this,FD,r)}get(e){return this.instances.get(e)}register(e,t){const r=this.instances.get(e);if(r)return r.options!==t&&(r.options=t),r;const n=new e(this.manager,t);return this.instances.set(e,n),n}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 $D(e,t){return e.priority===t.priority?e.type===t.type?t.value-e.value:t.type-e.type:t.priority-e.priority}FD=new WeakMap;var HD,VD,BD=[],GD=class extends jD{constructor(e){super(e),kD(this,HD),kD(this,VD),this.computeCollisions=this.computeCollisions.bind(this),OD(this,VD,SE(BD)),this.destroy=DI(()=>{const e=this.computeCollisions(),t=dE(()=>this.manager.dragOperation.position.current);if(e!==BD){const e=AD(this,HD);if(OD(this,HD,t),e&&t.x==e.x&&t.y==e.y)return}else OD(this,HD,void 0);AD(this,VD).value=e},()=>{const{dragOperation:e}=this.manager;e.status.initialized&&this.forceUpdate()})}forceUpdate(e=!0){dE(()=>{e?AD(this,VD).value=this.computeCollisions():OD(this,HD,void 0)})}computeCollisions(e,t){const{registry:r,dragOperation:n}=this.manager,{source:i,shape:o,status:a}=n;if(!a.initialized||!o)return BD;const s=[],l=[];for(const o of null!=e?e:r.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 r=dE(()=>e({droppable:o,dragOperation:n}));r&&(null!=o.collisionPriority&&(r.priority=o.collisionPriority),s.push(r))}return 0===l.length?BD:(s.sort($D),s)}get collisions(){return AD(this,VD).value}};HD=new WeakMap,VD=new WeakMap;var UD=class{constructor(){this.registry=new Map}addEventListener(e,t){const{registry:r}=this,n=new Set(r.get(e));return n.add(t),r.set(e,n),()=>this.removeEventListener(e,t)}removeEventListener(e,t){const{registry:r}=this,n=new Set(r.get(e));n.delete(t),r.set(e,n)}dispatch(e,...t){const{registry:r}=this,n=r.get(e);if(n)for(const e of n)e(...t)}},YD=class extends UD{constructor(e){super(),this.manager=e}dispatch(e,t){const r=[t,this.manager];super.dispatch(e,...r)}};function KD(e,t=!0){let r=!1;return bD(yD({},e),{cancelable:t,get defaultPrevented(){return r},preventDefault(){t&&(r=!0)}})}var XD,JD,ZD,QD,eP,tP,rP,nP,iP,oP=class extends zD{constructor(e){super(e);let t=[];this.destroy=DI(()=>{const{dragOperation:r,collisionObserver:n}=e;r.status.initializing&&(t=[],n.enable())},()=>{const{collisionObserver:r,monitor:n}=e,{collisions:i}=r;if(r.isDisabled())return;const o=KD({collisions:i});if(n.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;dE(()=>{var t;(null==a?void 0:a.id)!==(null==(t=e.dragOperation.target)?void 0:t.id)&&(r.disable(),e.actions.setDropTarget(null==a?void 0:a.id).then(()=>{r.enable()}))})})}},aP=(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))(aP||{}),sP=(e=>(e[e.Collision=0]="Collision",e[e.ShapeIntersection=1]="ShapeIntersection",e[e.PointerIntersection=2]="PointerIntersection",e))(sP||{});rP=[CI],tP=[EI],eP=[EI],QD=[EI],ZD=[EI],JD=[EI],XD=[EI];var lP=class{constructor(){PD(nP,5,this),kD(this,iP,PD(nP,8,this,"idle")),PD(nP,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}};nP=wD(null),iP=new WeakMap,RD(nP,4,"value",rP,lP,iP),RD(nP,2,"current",tP,lP),RD(nP,2,"idle",eP,lP),RD(nP,2,"initializing",QD,lP),RD(nP,2,"initialized",ZD,lP),RD(nP,2,"dragging",JD,lP),RD(nP,2,"dropped",XD,lP),DD(nP,lP);var uP,cP,dP,pP,fP,hP,mP,gP,vP,yP=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 dE(()=>{const{dragOperation:t}=this.manager,r=null!=e?e:null;if(t.targetIdentifier===r)return Promise.resolve(!1);t.targetIdentifier=r;const n=KD({operation:t.snapshot()});return t.status.dragging&&this.manager.monitor.dispatch("dragover",n),this.manager.renderer.rendering.then(()=>n.defaultPrevented)})}start(e){return dE(()=>{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 r=new AbortController,{event:n,coordinates:i}=e;uE(()=>{t.status.set("initialization-pending"),t.shape=null,t.canceled=!1,t.activatorEvent=null!=n?n:null,t.position.reset(i)});const o=KD({operation:t.snapshot()});return this.manager.monitor.dispatch("beforedragstart",o),o.defaultPrevented?(t.reset(),r.abort(),r):(t.status.set("initializing"),t.controller=r,this.manager.renderer.rendering.then(()=>{if(r.signal.aborted)return;const{status:e}=t;"initializing"===e.current&&(t.status.set("dragging"),this.manager.monitor.dispatch("dragstart",{nativeEvent:n,operation:t.snapshot(),cancelable:!1}))}),r)})}move(e){return dE(()=>{var t,r;const{dragOperation:n}=this.manager,{status:i,controller:o}=n;if(!i.dragging||!o||o.signal.aborted)return;const a=KD({nativeEvent:e.event,operation:n.snapshot(),by:e.by,to:e.to},null==(t=e.cancelable)||t);(null==(r=e.propagate)||r)&&this.manager.monitor.dispatch("dragmove",a),queueMicrotask(()=>{var t,r,i,o,s;if(a.defaultPrevented)return;const l=null!=(s=e.to)?s:{x:n.position.current.x+(null!=(r=null==(t=e.by)?void 0:t.x)?r:0),y:n.position.current.y+(null!=(o=null==(i=e.by)?void 0:i.y)?o:0)};n.position.current=l})})}stop(e={}){return dE(()=>{var t,r;const{dragOperation:n}=this.manager,{controller:i}=n;if(!i||i.signal.aborted)return;let o;i.abort();const a=()=>{this.manager.renderer.rendering.then(()=>{n.status.set("dropped");const e=dE(()=>{var e;return"dropping"===(null==(e=n.source)?void 0:e.status)}),t=()=>{n.controller===i&&(n.controller=void 0),n.reset()};if(e){const{source:e}=n,r=AE(()=>{"idle"===(null==e?void 0:e.status)&&(r(),t())})}else this.manager.renderer.rendering.then(t)})};n.canceled=null!=(t=e.canceled)&&t,this.manager.monitor.dispatch("dragend",{nativeEvent:e.event,operation:n.snapshot(),canceled:null!=(r=e.canceled)&&r,suspend:()=>{const e={resume:()=>{},abort:()=>{}};return o=new Promise((t,r)=>{e.resume=t,e.abort=r}),e}}),o?o.then(a).catch(()=>n.reset()):a()})}};pP=[CI],dP=[CI],cP=[CI],uP=[CI];var bP=class{constructor(e,t){kD(this,hP,PD(fP,8,this)),PD(fP,11,this),kD(this,mP,PD(fP,12,this)),PD(fP,15,this),kD(this,gP,PD(fP,16,this)),PD(fP,19,this),kD(this,vP,PD(fP,20,this)),PD(fP,23,this);const{effects:r,id:n,data:i={},disabled:o=!1,register:a=!0}=e;let s=n;this.manager=t,this.id=n,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==r?void 0:r())?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)}};fP=wD(null),hP=new WeakMap,mP=new WeakMap,gP=new WeakMap,vP=new WeakMap,RD(fP,4,"manager",pP,bP,hP),RD(fP,4,"id",dP,bP,mP),RD(fP,4,"data",cP,bP,gP),RD(fP,4,"disabled",uP,bP,vP),DD(fP,bP);var xP,SP,wP,CP,EP,IP,DP,PP,RP,MP,LP,AP,kP,OP,qP,TP,NP,_P,jP,FP,zP,WP,$P,HP,VP=class{constructor(){this.map=SE(new Map),this.cleanupFunctions=new WeakMap,this.register=(e,t)=>{const r=this.map.peek(),n=r.get(e),i=()=>this.unregister(e,t);if(n===t)return i;if(n){const e=this.cleanupFunctions.get(n);null==e||e(),this.cleanupFunctions.delete(n)}const o=new Map(r);o.set(e,t),this.map.value=o;const a=DI(...t.effects());return this.cleanupFunctions.set(t,a),i},this.unregister=(e,t)=>{const r=this.map.peek();if(r.get(e)!==t)return;const n=this.cleanupFunctions.get(t);null==n||n(),this.cleanupFunctions.delete(t);const i=new Map(r);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}},BP=class extends(DP=bP,IP=[CI],EP=[CI],CP=[CI],wP=[EI],SP=[EI],xP=[EI],DP){constructor(e,t){var r=e,{modifiers:n,type:i,sensors:o}=r,a=SD(r,["modifiers","type","sensors"]);super(a,t),PD(PP,5,this),kD(this,RP,PD(PP,8,this)),PD(PP,11,this),kD(this,MP,PD(PP,12,this)),PD(PP,15,this),kD(this,LP,PD(PP,16,this,this.isDragSource?"dragging":"idle")),PD(PP,19,this),this.type=i,this.sensors=o,this.modifiers=n,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}};PP=wD(DP),RP=new WeakMap,MP=new WeakMap,LP=new WeakMap,RD(PP,4,"type",IP,BP,RP),RD(PP,4,"modifiers",EP,BP,MP),RD(PP,4,"status",CP,BP,LP),RD(PP,2,"isDropping",wP,BP),RD(PP,2,"isDragging",SP,BP),RD(PP,2,"isDragSource",xP,BP),DD(PP,BP);var GP=class extends(_P=bP,NP=[CI],TP=[CI],qP=[CI],OP=[CI],kP=[CI],AP=[EI],_P){constructor(e,t){var r=e,{accept:n,collisionDetector:i,collisionPriority:o,type:a}=r;super(SD(r,["accept","collisionDetector","collisionPriority","type"]),t),PD(jP,5,this),kD(this,FP,PD(jP,8,this)),PD(jP,11,this),kD(this,zP,PD(jP,12,this)),PD(jP,15,this),kD(this,WP,PD(jP,16,this)),PD(jP,19,this),kD(this,$P,PD(jP,20,this)),PD(jP,23,this),kD(this,HP,PD(jP,24,this)),PD(jP,27,this),this.accept=n,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}};jP=wD(_P),FP=new WeakMap,zP=new WeakMap,WP=new WeakMap,$P=new WeakMap,HP=new WeakMap,RD(jP,4,"accept",NP,GP,FP),RD(jP,4,"type",TP,GP,zP),RD(jP,4,"collisionDetector",qP,GP,WP),RD(jP,4,"collisionPriority",OP,GP,$P),RD(jP,4,"shape",kP,GP,HP),RD(jP,2,"isDropTarget",AP,GP),DD(jP,GP);var UP,YP=class extends jD{constructor(e,t){super(e,t),this.manager=e,this.options=t}},KP=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)}},XP=class{constructor(e){this.options=e,kD(this,UP)}set controller(e){OD(this,UP,e),e.signal.addEventListener("abort",()=>this.abort())}activate(e){var t;null==(t=AD(this,UP))||t.activate(e)}};UP=new WeakMap;var JP,ZP,QP,eR,tR,rR,nR,iR,oR,aR,sR,lR,uR,cR,dR,pR,fR,hR,mR,gR=class extends jD{constructor(e,t){super(e,t),this.manager=e,this.options=t}apply(e){return e.transform}},vR=class{constructor(e){this.draggables=new VP,this.droppables=new VP,this.plugins=new WD(e),this.sensors=new WD(e),this.modifiers=new WD(e)}register(e,t){if(e instanceof BP)return this.draggables.register(e.id,e);if(e instanceof GP)return this.droppables.register(e.id,e);if(e.prototype instanceof gR)return this.modifiers.register(e,t);if(e.prototype instanceof YP)return this.sensors.register(e,t);if(e.prototype instanceof jD)return this.plugins.register(e,t);throw new Error("Invalid instance type")}unregister(e){if(e instanceof bP)return e instanceof BP?this.draggables.unregister(e.id,e):e instanceof GP?this.droppables.unregister(e.id,e):()=>{};if(e.prototype instanceof gR)return this.modifiers.unregister(e);if(e.prototype instanceof YP)return this.sensors.unregister(e);if(e.prototype instanceof jD)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()}};oR=[EI],iR=[CI],nR=[CI],rR=[CI],tR=[CI],eR=[CI],QP=[EI],ZP=[EI],JP=[EI];var yR=class{constructor(e){PD(uR,5,this),kD(this,aR),kD(this,sR),kD(this,lR,new RI(void 0,(e,t)=>e&&t?e.equals(t):e===t)),this.status=new lP,kD(this,cR,PD(uR,8,this,!1)),PD(uR,11,this),kD(this,dR,PD(uR,12,this,null)),PD(uR,15,this),kD(this,pR,PD(uR,16,this,null)),PD(uR,19,this),kD(this,fR,PD(uR,20,this,null)),PD(uR,23,this),kD(this,hR,PD(uR,24,this,[])),PD(uR,27,this),this.position=new QI({x:0,y:0}),kD(this,mR,{x:0,y:0}),OD(this,aR,e)}get shape(){const{current:e,initial:t,previous:r}=AD(this,lR);return e&&t?{current:e,initial:t,previous:r}:null}set shape(e){e?AD(this,lR).current=e:AD(this,lR).reset()}get source(){var e;const t=this.sourceIdentifier;if(null==t)return null;const r=AD(this,aR).registry.draggables.get(t);return r&&OD(this,sR,r),null!=(e=null!=r?r:AD(this,sR))?e:null}get target(){var e;const t=this.targetIdentifier;return null!=t&&null!=(e=AD(this,aR).registry.droppables.get(t))?e:null}get transform(){const{x:e,y:t}=this.position.delta;let r={x:e,y:t};for(const e of this.modifiers)r=e.apply(bD(yD({},this.snapshot()),{transform:r}));return OD(this,mR,r),r}snapshot(){return dE(()=>({source:this.source,target:this.target,activatorEvent:this.activatorEvent,transform:AD(this,mR),shape:this.shape?MI(this.shape):null,position:MI(this.position),status:MI(this.status),canceled:this.canceled}))}reset(){uE(()=>{this.status.set("idle"),this.sourceIdentifier=null,this.targetIdentifier=null,AD(this,lR).reset(),this.position.reset({x:0,y:0}),OD(this,mR,{x:0,y:0}),this.modifiers=[]})}};uR=wD(null),aR=new WeakMap,sR=new WeakMap,lR=new WeakMap,cR=new WeakMap,dR=new WeakMap,pR=new WeakMap,fR=new WeakMap,hR=new WeakMap,mR=new WeakMap,RD(uR,2,"shape",oR,yR),RD(uR,4,"canceled",iR,yR,cR),RD(uR,4,"activatorEvent",nR,yR,dR),RD(uR,4,"sourceIdentifier",rR,yR,pR),RD(uR,4,"targetIdentifier",tR,yR,fR),RD(uR,4,"modifiers",eR,yR,hR),RD(uR,2,"source",QP,yR),RD(uR,2,"target",ZP,yR),RD(uR,2,"transform",JP,yR),DD(uR,yR);var bR={get rendering(){return Promise.resolve()}};function xR(e,t){return"function"==typeof e?e(t):null!=e?e:t}var SR=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 r=null!=e?e:{},n=xR(r.plugins,[]),i=xR(r.sensors,[]),o=xR(r.modifiers,[]),a=null!=(t=r.renderer)?t:bR,s=new YD(this),l=new vR(this);this.registry=l,this.monitor=s,this.renderer=a,this.actions=new yP(this),this.dragOperation=new yR(this),this.collisionObserver=new GD(this),this.plugins=[oP,...n],this.modifiers=o,this.sensors=i;const{destroy:u}=this,c=DI(()=>{var e,t,r;const n=dE(()=>this.dragOperation.modifiers),i=this.modifiers;for(const e of n)i.includes(e)||e.destroy();this.dragOperation.modifiers=null!=(r=null==(t=null==(e=this.dragOperation.source)?void 0:e.modifiers)?void 0:t.map(e=>{const{plugin:t,options:r}=_D(e);return new t(this,r)}))?r: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}},wR=e=>{throw TypeError(e)},CR=(e,t,r)=>t.has(e)||wR("Cannot "+r),ER=(e,t,r)=>(CR(e,t,"read from private field"),t.get(e)),IR=(e,t,r)=>t.has(e)?wR("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),DR=(e,t,r,n)=>(CR(e,t,"write to private field"),t.set(e,r),r),PR=(e,t,r)=>(CR(e,t,"access private method"),r);function RR(e){return!!e&&(e instanceof KeyframeEffect||"getKeyframes"in e&&"function"==typeof e.getKeyframes)}function MR(e,t){const r=e.getAnimations();if(r.length>0)for(const e of r){if("running"!==e.playState)continue;const{effect:r}=e,n=(RR(r)?r.getKeyframes():[]).filter(t);if(n.length>0)return[n[n.length-1],e]}return null}function LR(e){const{width:t,height:r,top:n,left:i,bottom:o,right:a}=e.getBoundingClientRect();return{width:t,height:r,top:n,left:i,bottom:o,right:a}}function AR(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function kR(e){return"nodeType"in e}function OR(e){var t,r,n;return e?AR(e)?e:kR(e)?"defaultView"in e?null!=(t=e.defaultView)?t:window:null!=(n=null==(r=e.ownerDocument)?void 0:r.defaultView)?n:window:window:window}function qR(e){const{Document:t}=OR(e);return e instanceof t||"nodeType"in e&&e.nodeType===Node.DOCUMENT_NODE}function TR(e){return!(!e||AR(e))&&(e instanceof OR(e).HTMLElement||"namespaceURI"in e&&"string"==typeof e.namespaceURI&&e.namespaceURI.endsWith("html"))}function NR(e){return e instanceof OR(e).SVGElement||"namespaceURI"in e&&"string"==typeof e.namespaceURI&&e.namespaceURI.endsWith("svg")}function _R(e){return e?AR(e)?e.document:kR(e)?qR(e)?e:TR(e)||NR(e)?e.ownerDocument:document:document:document}function jR(e,t){if(function(e){return"DETAILS"===e.tagName}(e)&&!1===e.open)return!1;const{overflow:r,overflowX:n,overflowY:i}=getComputedStyle(e);return"visible"===r&&"visible"===n&&"visible"===i}function FR(e,t=e.getBoundingClientRect(),r=0){var n,i,o,a,s;let l=t;const{ownerDocument:u}=e,c=null!=(n=u.defaultView)?n:window;let d=e.parentElement;for(;d&&d!==u.documentElement;){if(!jR(d)){const e=d.getBoundingClientRect(),t=r*(e.bottom-e.top),n=r*(e.right-e.left),i=r*(e.bottom-e.top),o=r*(e.right-e.left);l={top:Math.max(l.top,e.top-t),right:Math.min(l.right,e.right+n),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=r*g,y=r*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 zR(e){return{x:e.clientX,y:e.clientY}}var WR="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function $R(e=document,t=new Set){if(t.has(e))return[];t.add(e);const r=[e];for(const n of Array.from(e.querySelectorAll("iframe, frame")))try{const e=n.contentDocument;e&&!t.has(e)&&r.push(...$R(e,t))}catch(e){}try{const n=e.defaultView;if(n&&n!==window.top){const i=n.parent;i&&i.document&&i.document!==e&&r.push(...$R(i.document,t))}}catch(e){}return r}function HR(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function VR(){var e,t;const r=HR()?window.visualViewport:null;return{x:null!=(e=null==r?void 0:r.offsetLeft)?e:0,y:null!=(t=null==r?void 0:r.offsetTop)?t:0}}function BR(e){return!(!e||!kR(e))&&e instanceof OR(e).ShadowRoot}function GR(e){if(e&&kR(e)){let t=e.getRootNode();if(BR(t))return t;if(t instanceof Document)return t}return _R(e)}function UR(e){return e.matchMedia("(prefers-reduced-motion: reduce)").matches}function YR(e){return"value"in e}function KR(e){return"CANVAS"===e.tagName}function XR(e,{x:t,y:r}){const n=e.elementFromPoint(t,r);if(function(e){return"IFRAME"===(null==e?void 0:e.tagName)}(n)){const{contentDocument:e}=n;if(e){const{left:i,top:o}=n.getBoundingClientRect();return XR(e,{x:t-i,y:r-o})}}return n}var JR=new WeakMap;var ZR=class{constructor(){this.entries=new Set,this.clear=()=>{for(const e of this.entries){const[t,{type:r,listener:n,options:i}]=e;t.removeEventListener(r,n,i)}this.entries.clear()}}bind(e,t){const r=Array.isArray(e)?e:[e],n=Array.isArray(t)?t:[t],i=[];for(const e of r)for(const t of n){const{type:r,listener:n,options:o}=t,a=[e,t];e.addEventListener(r,n,o),this.entries.add(a),i.push(a)}return function(){for(const[e,{type:t,listener:r,options:n}]of i)e.removeEventListener(t,r,n)}}};function QR(e){const t=null==e?void 0:e.ownerDocument.defaultView;if(t&&t.self!==t.parent)return t.frameElement}function eM(e,t){const r=()=>performance.now();let n,i;return function(...o){const a=this;i?(null==n||n(),n=function(e,t){const r=setTimeout(e,t);return()=>clearTimeout(r)}(()=>{e.apply(a,o),i=r()},t-(r()-i))):(e.apply(a,o),i=r())}}var tM,rM=WR?ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},nM=class extends rM{constructor(e){super(t=>{ER(this,tM)?e(t,this):DR(this,tM,!0)}),IR(this,tM,!1)}};tM=new WeakMap;var iM,oM,aM,sM,lM,uM,cM,dM,pM,fM,hM,mM=Array.from({length:100},(e,t)=>t/100),gM=class{constructor(e,t,r={debug:!1,skipInitial:!1}){this.element=e,this.callback=t,IR(this,pM),this.disconnect=()=>{var e,t,r;DR(this,cM,!0),null==(e=ER(this,aM))||e.disconnect(),null==(t=ER(this,sM))||t.disconnect(),ER(this,lM).disconnect(),null==(r=ER(this,uM))||r.remove()},IR(this,iM,!0),IR(this,oM),IR(this,aM),IR(this,sM),IR(this,lM),IR(this,uM),IR(this,cM,!1),IR(this,dM,eM(()=>{var e,t,r;const{element:n}=this;if(null==(e=ER(this,sM))||e.disconnect(),ER(this,cM)||!ER(this,iM)||!n.isConnected)return;const i=null!=(t=n.ownerDocument)?t:document,{innerHeight:o,innerWidth:a}=null!=(r=i.defaultView)?r:window,s=n.getBoundingClientRect(),l=FR(n,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,DR(this,sM,new IntersectionObserver(e=>{const[t]=e,{intersectionRect:r}=t;1!==(1!==t.intersectionRatio?t.intersectionRatio:JI.intersectionRatio(r,FR(n)))&&ER(this,dM).call(this)},{threshold:mM,rootMargin:m,root:i})),ER(this,sM).observe(n),PR(this,pM,fM).call(this)},75)),this.boundingClientRect=e.getBoundingClientRect(),DR(this,iM,function(e,t=e.getBoundingClientRect()){const{width:r,height:n}=FR(e,t);return r>0&&n>0}(e,this.boundingClientRect));let n=!0;this.callback=e=>{n&&(n=!1,r.skipInitial)||t(e)};const i=e.ownerDocument;(null==r?void 0:r.debug)&&(DR(this,uM,document.createElement("div")),ER(this,uM).style.background="rgba(0,0,0,0.15)",ER(this,uM).style.position="fixed",ER(this,uM).style.pointerEvents="none",i.body.appendChild(ER(this,uM))),DR(this,lM,new IntersectionObserver(t=>{var r,n;const i=t[t.length-1],{boundingClientRect:o,isIntersecting:a}=i,{width:s,height:l}=o,u=ER(this,iM);DR(this,iM,a),(s||l)&&(u&&!a?(null==(r=ER(this,sM))||r.disconnect(),this.callback(null),null==(n=ER(this,aM))||n.disconnect(),DR(this,aM,void 0),ER(this,uM)&&(ER(this,uM).style.visibility="hidden")):ER(this,dM).call(this),a&&!ER(this,aM)&&(DR(this,aM,new nM(ER(this,dM))),ER(this,aM).observe(e)))},{threshold:mM,root:i})),ER(this,iM)&&!r.skipInitial&&this.callback(this.boundingClientRect),ER(this,lM).observe(e)}};iM=new WeakMap,oM=new WeakMap,aM=new WeakMap,sM=new WeakMap,lM=new WeakMap,uM=new WeakMap,cM=new WeakMap,dM=new WeakMap,pM=new WeakSet,fM=function(){ER(this,cM)||(PR(this,pM,hM).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,ER(this,oM))||(this.callback(this.boundingClientRect),DR(this,oM,this.boundingClientRect)))},hM=function(){if(ER(this,uM)){const{top:e,left:t,width:r,height:n}=FR(this.element);ER(this,uM).style.overflow="hidden",ER(this,uM).style.visibility="visible",ER(this,uM).style.top=`${Math.floor(e)}px`,ER(this,uM).style.left=`${Math.floor(t)}px`,ER(this,uM).style.width=`${Math.floor(r)}px`,ER(this,uM).style.height=`${Math.floor(n)}px`}};var vM,yM,bM,xM,SM=new WeakMap,wM=new WeakMap;function CM(e,t){let r=SM.get(e);if(!r){const t=new gM(e,t=>{const r=SM.get(e);r&&r.callbacks.forEach(e=>e(t))},{skipInitial:!0});r={disconnect:t.disconnect,callbacks:new Set}}return r.callbacks.add(t),SM.set(e,r),()=>{r.callbacks.delete(t),0===r.callbacks.size&&(SM.delete(e),r.disconnect())}}var EM=class{constructor(e,t,r){this.callback=t,IR(this,vM),IR(this,yM,!1),IR(this,bM),IR(this,xM,eM(e=>{if(!ER(this,yM)&&e.target&&"contains"in e.target&&"function"==typeof e.target.contains)for(const t of ER(this,bM))if(e.target.contains(t)){this.callback(ER(this,vM).boundingClientRect);break}},75));const n=function(e){const t=new Set;let r=QR(e);for(;r;)t.add(r),r=QR(r);return t}(e),i=function(e,t){const r=new Set;for(const n of e){const e=CM(n,t);r.add(e)}return()=>r.forEach(e=>e())}(n,t),o=function(e,t){var r;const n=e.ownerDocument;if(!wM.has(n)){const e=new AbortController,t=new Set;document.addEventListener("scroll",e=>t.forEach(t=>t(e)),{capture:!0,passive:!0,signal:e.signal}),wM.set(n,{disconnect:()=>e.abort(),listeners:t})}const{listeners:i,disconnect:o}=null!=(r=wM.get(n))?r:{};return i&&o?(i.add(t),()=>{i.delete(t),0===i.size&&(o(),wM.delete(n))}):()=>{}}(e,ER(this,xM));DR(this,bM,n),DR(this,vM,new gM(e,t,r)),this.disconnect=()=>{ER(this,yM)||(DR(this,yM,!0),i(),o(),ER(this,vM).disconnect())}}};function IM(e){return"showPopover"in e&&"hidePopover"in e&&"function"==typeof e.showPopover&&"function"==typeof e.hidePopover}function DM(e){try{IM(e)&&e.isConnected&&e.hasAttribute("popover")&&!e.matches(":popover-open")&&e.showPopover()}catch(e){}}function PM(e){return!(!WR||!e)&&e===_R(e).scrollingElement}function RM(e){var t,r;const n=OR(e),i=PM(e)?function(e){var t,r,n,i;const{documentElement:o}=_R(e),a=OR(e).visualViewport,s=null!=(t=null==a?void 0:a.width)?t:o.clientWidth,l=null!=(r=null==a?void 0:a.height)?r:o.clientHeight,u=null!=(n=null==a?void 0:a.offsetTop)?n: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):LR(e),o=n.visualViewport,a=PM(e)?{height:null!=(t=null==o?void 0:o.height)?t:n.innerHeight,width:null!=(r=null==o?void 0:o.width)?r:n.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 MM(e,t){const{isTop:r,isBottom:n,isLeft:i,isRight:o,position:a}=RM(e),{x:s,y:l}=null!=t?t:{x:0,y:0},u=!r&&a.current.y+l>0,c=!n&&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}}vM=new WeakMap,yM=new WeakMap,bM=new WeakMap,xM=new WeakMap;var LM=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))}},AM=new LM(e=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(e):e()}),kM=new LM(e=>setTimeout(e,50)),OM=new Map,qM=OM.clear.bind(OM);function TM(e,t=!1){if(!t)return NM(e);let r=OM.get(e);return r||(r=NM(e),OM.set(e,r),kM.schedule(qM),r)}function NM(e){return OR(e).getComputedStyle(e)}var _M={excludeElement:!0,escapeShadowDOM:!0};function jM(e,t=_M){const{limit:r,excludeElement:n,escapeShadowDOM:i}=t,o=new Set;return e?function t(a){if(null!=r&&o.size>=r)return o;if(!a)return o;if(qR(a)&&null!=a.scrollingElement&&!o.has(a.scrollingElement))return o.add(a.scrollingElement),o;if(i&&BR(a))return t(a.host);if(!TR(a))return NR(a)?t(a.parentElement):o;if(o.has(a))return o;const s=TM(a,!0);if(n&&a===e||function(e,t=TM(e,!0)){const r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const n=t[e];return"string"==typeof n&&r.test(n)})}(a,s)&&o.add(a),function(e,t=TM(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 FM(e,t=window.frameElement){const r={x:0,y:0,scaleX:1,scaleY:1};if(!e)return r;let n=QR(e);for(;n;){if(n===t)return r;const e=LR(n),{x:i,y:o}=zM(n,e);r.x=r.x+e.left,r.y=r.y+e.top,r.scaleX=r.scaleX*i,r.scaleY=r.scaleY*o,n=QR(n)}return r}function zM(e,t=LR(e)){const r=Math.round(t.width),n=Math.round(t.height);if(TR(e))return{x:r/e.offsetWidth,y:n/e.offsetHeight};const i=TM(e,!0);return{x:(parseFloat(i.width)||r)/r,y:(parseFloat(i.height)||n)/n}}function WM(e){if("none"===e)return null;const[t,r,n="0"]=e.split(" "),i={x:parseFloat(t),y:parseFloat(r),z:parseInt(n,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 $M(e){var t,r,n,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(" "),r=parseFloat(t[0]),n=parseFloat(t[1]);return isNaN(r)&&isNaN(n)?null:{x:isNaN(r)?n:r,y:isNaN(n)?r:n}}(c),h=WM(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!=(r=null==f?void 0:f.y)?r:1,y=null!=(n=null==h?void 0:h.x)?n: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 HM=(e=>(e[e.Idle=0]="Idle",e[e.Forward=1]="Forward",e[e.Reverse=-1]="Reverse",e))(HM||{}),VM={x:.2,y:.2},BM={x:10,y:10};function GM(e,t,r,n=25,i=VM,o=BM){const{x:a,y:s}=t,{rect:l,isTop:u,isBottom:c,isLeft:d,isRight:p}=RM(e),f=FM(e),h=$M(TM(e,!0)),m=null!==h&&(null==h?void 0:h.scaleX)<0,g=null!==h&&(null==h?void 0:h.scaleY)<0,v=new JI(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==r?void 0:r.y)&&a>=v.left-o.x&&a<=v.right+o.x?(y.y=g?1:-1,b.y=n*Math.abs((v.top+x-s)/x)):(!c||g&&!u)&&s>=v.bottom-x&&-1!==(null==r?void 0:r.y)&&a>=v.left-o.x&&a<=v.right+o.x&&(y.y=g?-1:1,b.y=n*Math.abs((v.bottom-x-s)/x)),(!p||m&&!d)&&a>=v.right-S&&-1!==(null==r?void 0:r.x)&&s>=v.top-o.y&&s<=v.bottom+o.y?(y.x=m?-1:1,b.x=n*Math.abs((v.right-S-a)/S)):(!d||m&&!p)&&a<=v.left+S&&1!==(null==r?void 0:r.x)&&s>=v.top-o.y&&s<=v.bottom+o.y&&(y.x=m?1:-1,b.x=n*Math.abs((v.left+S-a)/S)),{direction:y,speed:b}}function UM(e,t=!1){if("scrollIntoViewIfNeeded"in(r=e)&&"function"==typeof r.scrollIntoViewIfNeeded)return void e.scrollIntoViewIfNeeded(t);var r;if(!TR(e))return e.scrollIntoView();var n=function(e){const[t]=jM(e,{limit:1});return null!=t?t:null}(e);if(!TR(n))return;const i=TM(n,!0),o=parseInt(i.getPropertyValue("border-top-width")),a=parseInt(i.getPropertyValue("border-left-width")),s=e.offsetTop-n.offsetTop<n.scrollTop,l=e.offsetTop-n.offsetTop+e.clientHeight-o>n.scrollTop+n.clientHeight,u=e.offsetLeft-n.offsetLeft<n.scrollLeft,c=e.offsetLeft-n.offsetLeft+e.clientWidth-a>n.scrollLeft+n.clientWidth,d=s&&!l;(s||l)&&t&&(n.scrollTop=e.offsetTop-n.offsetTop-n.clientHeight/2-o+e.clientHeight/2),(u||c)&&t&&(n.scrollLeft=e.offsetLeft-n.offsetLeft-n.clientWidth/2-a+e.clientWidth/2),(s||l||u||c)&&!t&&e.scrollIntoView(d)}function YM({element:e,keyframes:t,options:r}){return e.animate(t,r).finished}function KM(e,t=TM(e).translate,r=!0){if(r){const t=MR(e,e=>"translate"in e);if(t){const{translate:e=""}=t[0];if("string"==typeof e){const t=WM(e);if(t)return t}}}if(t){const e=WM(t);if(e)return e}return{x:0,y:0,z:0}}var XM=new LM(e=>setTimeout(e,0)),JM=new Map,ZM=JM.clear.bind(JM);function QM(e,t){const r=function(e){const t=e.ownerDocument;let r=JM.get(t);if(r)return r;r=t.getAnimations(),JM.set(t,r),XM.schedule(ZM);const n=r.filter(t=>RR(t.effect)&&t.effect.target===e);return JM.set(e,n),r}(e).filter(e=>{var r,n;if(RR(e.effect)){const{target:i}=e.effect;if(null==(n=i&&(null==(r=t.isValidTarget)?void 0:r.call(t,i)))||n)return e.effect.getKeyframes().some(e=>{for(const r of t.properties)if(e[r])return!0})}}).map(e=>{const{effect:t,currentTime:r}=e,n=null==t?void 0:t.getComputedTiming().duration;if(!e.pending&&"finished"!==e.playState)return"number"==typeof n&&"number"==typeof r&&r<n?(e.currentTime=n,()=>{e.currentTime=r}):void 0});if(r.length>0)return()=>r.forEach(e=>null==e?void 0:e())}var eL=class extends JI{constructor(e,t={}){var r,n,i,o;const{frameTransform:a=FM(e),ignoreTransforms:s,getBoundingClientRect:l=LR}=t,u=QM(e,{properties:["transform","translate","scale","width","height"],isValidTarget:t=>(t!==e||HR())&&t.contains(e)}),c=l(e);let d,{top:p,left:f,width:h,height:m}=c;const g=TM(e),v=$M(g),y={x:null!=(r=null==v?void 0:v.scaleX)?r:1,y:null!=(n=null==v?void 0:v.scaleY)?n:1},b=function(e,t){var r;const n=e.getAnimations();let i=null;if(!n.length)return null;for(const e of n){if("running"!==e.playState)continue;const n=RR(e.effect)?e.effect.getKeyframes():[],o=n[n.length-1];if(!o)continue;const{transform:a,translate:s,scale:l}=o;if(a||s||l){const e=$M({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!=(r=i.z)?r: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,r){const{scaleX:n,scaleY:i,x:o,y:a}=t,s=e.left-o-(1-n)*parseFloat(r),l=e.top-a-(1-i)*parseFloat(r.slice(r.indexOf(" ")+1)),u=n?e.width/n: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,r){const{scaleX:n,scaleY:i,x:o,y:a}=t,s=e.left+o+(1-n)*parseFloat(r),l=e.top+a+(1-i)*parseFloat(r.slice(r.indexOf(" ")+1)),u=n?e.width*n: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 tL(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 rL=class{constructor(e){this.element=e,this.initial=new Map}set(e,t=""){const{element:r}=this;if(tL(r))for(const[n,i]of Object.entries(e)){const e=`${t}${n}`;this.initial.has(e)||this.initial.set(e,r.style.getPropertyValue(e)),r.style.setProperty(e,"string"==typeof i?i:`${i}px`)}}remove(e,t=""){const{element:r}=this;if(tL(r))for(const n of e){const e=`${t}${n}`;r.style.removeProperty(e)}}reset(){const{element:e}=this;if(tL(e)){for(const[t,r]of this.initial)e.style.setProperty(t,r);""===e.getAttribute("style")&&e.removeAttribute("style")}}};function nL(e){return!!e&&(e instanceof OR(e).Element||kR(e)&&e.nodeType===Node.ELEMENT_NODE)}function iL(e){if(!e)return!1;const{KeyboardEvent:t}=OR(e.target);return e instanceof t}var oL={};function aL(e){const t=null==oL[e]?0:oL[e]+1;return oL[e]=t,`${e}-${t}`}var sL=e=>{var t;return null!=(t=(({dragOperation:e,droppable:t})=>{const r=e.position.current;if(!r)return null;const{id:n}=t;if(!t.shape)return null;if(t.shape.containsPoint(r))return{id:n,value:1/XI.distance(t.shape.center,r),type:sP.PointerIntersection,priority:aP.High};return null})(e))?t:(({dragOperation:e,droppable:t})=>{const{shape:r}=e;if(!t.shape||!(null==r?void 0:r.current))return null;const n=r.current.intersectionArea(t.shape);if(n){const{position:i}=e,o=XI.distance(t.shape.center,i.current),a=n/(r.current.area+t.shape.area-n)/o;return{id:t.id,value:a,type:sP.ShapeIntersection,priority:aP.Normal}}return null})(e)},lL=e=>{const{dragOperation:t,droppable:r}=e,{shape:n,position:i}=t;if(!r.shape)return null;const o=n?JI.from(n.current.boundingRectangle).corners:void 0,a=JI.from(r.shape.boundingRectangle).corners.reduce((e,t,r)=>{var n;return e+XI.distance(XI.from(t),null!=(n=null==o?void 0:o[r])?n:i.current)},0),s=a/4;return{id:r.id,value:1/s,type:sP.Collision,priority:aP.Normal}},uL=Object.create,cL=Object.defineProperty,dL=Object.defineProperties,pL=Object.getOwnPropertyDescriptor,fL=Object.getOwnPropertyDescriptors,hL=Object.getOwnPropertySymbols,mL=Object.prototype.hasOwnProperty,gL=Object.prototype.propertyIsEnumerable,vL=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),yL=e=>{throw TypeError(e)},bL=(e,t,r)=>t in e?cL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,xL=(e,t)=>{for(var r in t||(t={}))mL.call(t,r)&&bL(e,r,t[r]);if(hL)for(var r of hL(t))gL.call(t,r)&&bL(e,r,t[r]);return e},SL=(e,t)=>dL(e,fL(t)),wL=(e,t)=>cL(e,"name",{value:t,configurable:!0}),CL=(e,t)=>{var r={};for(var n in e)mL.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&hL)for(var n of hL(e))t.indexOf(n)<0&&gL.call(e,n)&&(r[n]=e[n]);return r},EL=e=>{var t;return[,,,uL(null!=(t=null==e?void 0:e[vL("metadata")])?t:null)]},IL=["class","method","getter","setter","accessor","field","value","get","set"],DL=e=>void 0!==e&&"function"!=typeof e?yL("Function expected"):e,PL=(e,t,r,n,i)=>({kind:IL[e],name:t,metadata:n,addInitializer:e=>r._?yL("Already initialized"):i.push(DL(e||null))}),RL=(e,t)=>bL(t,vL("metadata"),e[3]),ML=(e,t,r,n)=>{for(var i=0,o=e[t>>1],a=o&&o.length;i<a;i++)1&t?o[i].call(r):n=o[i].call(r,n);return n},LL=(e,t,r,n,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=IL[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)&&pL(d<4?i:{get[r](){return OL(this,o)},set[r](e){return TL(this,o,e)}},r));d?f&&d<4&&wL(o,(d>2?"set ":d>1?"get ":"")+r):wL(i,r);for(var b=n.length-1;b>=0;b--)u=PL(d,r,l={},e[3],v),d&&(u.static=p,u.private=f,c=u.access={has:f?e=>kL(i,e):e=>r in e},3^d&&(c.get=f?e=>(1^d?OL:NL)(e,i,4^d?o:y.get):e=>e[r]),d>2&&(c.set=f?(e,t)=>TL(e,i,t,4^d?o:y.set):(e,t)=>e[r]=t)),s=(0,n[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?DL(s)&&(d>4?g.unshift(s):d?f?o=s:y[m]=s:i=s):"object"!=typeof s||null===s?yL("Object expected"):(DL(a=s.get)&&(y.get=a),DL(a=s.set)&&(y.set=a),DL(a=s.init)&&g.unshift(a));return d||RL(e,i),y&&cL(i,r,y),f?4^d?o:y:i},AL=(e,t,r)=>t.has(e)||yL("Cannot "+r),kL=(e,t)=>Object(t)!==t?yL('Cannot use the "in" operator on this value'):e.has(t),OL=(e,t,r)=>(AL(e,t,"read from private field"),r?r.call(e):t.get(e)),qL=(e,t,r)=>t.has(e)?yL("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),TL=(e,t,r,n)=>(AL(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),NL=(e,t,r)=>(AL(e,t,"access private method"),r),_L="button",jL="draggable",FL="dnd-kit-description",zL="dnd-kit-announcement",WL={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."},$L={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:r}){if(e)return r?`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 HL(e){const t=e.tagName.toLowerCase();return["input","select","textarea","a","button"].includes(t)}var VL=["dragover","dragmove"];var BL,GL,UL,YL,KL,XL,JL,ZL,QL,eA,tA,rA,nA,iA=new Map,oA=class extends(KL=zD,YL=[CI],UL=[EI],GL=[EI],BL=[EI],KL){constructor(e){super(e),ML(JL,5,this),qL(this,QL),qL(this,XL,new Set),qL(this,ZL,ML(JL,8,this,new Set)),ML(JL,11,this),this.registerEffect(NL(this,QL,eA))}register(e){return OL(this,XL).add(e),()=>{OL(this,XL).delete(e)}}addRoot(e){return dE(()=>{const t=new Set(this.additionalRoots);t.add(e),this.additionalRoots=t}),()=>{dE(()=>{const t=new Set(this.additionalRoots);t.delete(e),this.additionalRoots=t})}}get sourceRoot(){var e;const{source:t}=this.manager.dragOperation;return GR(null!=(e=null==t?void 0:t.element)?e:null)}get targetRoot(){var e;const{target:t}=this.manager.dragOperation;return GR(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}};JL=EL(KL),XL=new WeakMap,ZL=new WeakMap,QL=new WeakSet,eA=function(){const{roots:e}=this,t=[];for(const r of e)for(const e of OL(this,XL))t.push(NL(this,QL,tA).call(this,r,e));return()=>{for(const e of t)e()}},tA=function(e,t){let r=iA.get(e);r||(r=new Map,iA.set(e,r));let n=r.get(t);if(!n){const i=qR(e)?NL(this,QL,rA).call(this,e,r,t):NL(this,QL,nA).call(this,e,r,t);if(!i)return()=>{};n=i,r.set(t,n)}n.refCount++;let i=!1;return()=>{i||(i=!0,n.refCount--,0===n.refCount&&n.cleanup())}},rA=function(e,t,r){const n=e.createElement("style");n.textContent=r,e.head.prepend(n);const i=new MutationObserver(t=>{for(const r of t)for(const t of Array.from(r.removedNodes))if(t===n)return void e.head.prepend(n)});return i.observe(e.head,{childList:!0}),{refCount:0,cleanup:()=>{i.disconnect(),n.remove(),t.delete(r),0===t.size&&iA.delete(e)}}},nA=function(e,t,r){!("adoptedStyleSheets"in e)||Array.isArray(e.adoptedStyleSheets);const n=e.ownerDocument.defaultView,{CSSStyleSheet:i}=null!=n?n:{};if(!i)return null;const o=new i;return o.replaceSync(r),e.adoptedStyleSheets.push(o),{refCount:0,cleanup:()=>{var n;if(BR(e)&&(null==(n=e.host)?void 0:n.isConnected)){const t=e.adoptedStyleSheets.indexOf(o);-1!==t&&e.adoptedStyleSheets.splice(t,1)}t.delete(r),0===t.size&&iA.delete(e)}}},LL(JL,4,"additionalRoots",YL,oA,ZL),LL(JL,2,"sourceRoot",UL,oA),LL(JL,2,"targetRoot",GL,oA),LL(JL,2,"roots",BL,oA),RL(JL,oA);var aA="data-dnd-",sA=`${aA}dropping`,lA="--dnd-",uA=`${aA}dragging`,cA=`${aA}placeholder`,dA=[uA,cA,"popover","aria-pressed","aria-grabbing"],pA=["view-transition-name"],fA=`\n :is(:root,:host) [${uA}] {\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(${lA}top, 0px) !important;\n left: var(${lA}left, 0px) !important;\n right: unset !important;\n bottom: unset !important;\n width: var(${lA}width, auto);\n max-width: var(${lA}width, auto);\n height: var(${lA}height, auto);\n max-height: var(${lA}height, auto);\n transition: var(${lA}transition) !important;\n }\n\n :is(:root,:host) [${cA}] {\n transition: none;\n }\n\n :is(:root,:host) [${cA}='hidden'] {\n visibility: hidden;\n }\n\n [${uA}] * {\n pointer-events: none !important;\n }\n\n [${uA}]:not([${sA}]) {\n translate: var(${lA}translate) !important;\n }\n\n [${uA}][style*='${lA}scale'] {\n scale: var(${lA}scale) !important;\n transform-origin: var(${lA}transform-origin) !important;\n }\n\n @layer dnd-kit {\n :where([${uA}][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 [${uA}]::backdrop, [${aA}overlay]:not([${uA}]) {\n display: none;\n visibility: hidden;\n }\n`.replace(/\n+/g," ").replace(/\s+/g," ").trim();function hA(e,t="hidden"){return dE(()=>{const{element:r,manager:n}=e;if(!r||!n)return;const i=function(e,t){const r=new Map;for(const n of t)if(n.element&&(e===n.element||e.contains(n.element))){const e=`${aA}${aL("dom-id")}`;n.element.setAttribute(e,""),r.set(n,e)}return r}(r,n.registry.droppables),o=[],a=function(e){const t="input, textarea, select, canvas, [contenteditable]",r=e.cloneNode(!0),n=Array.from(e.querySelectorAll(t));return Array.from(r.querySelectorAll(t)).forEach((e,t)=>{const r=n[t];if(YR(e)&&YR(r)&&("file"!==e.type&&(e.value=r.value),"radio"===e.type&&e.name&&(e.name=`Cloned__${e.name}`)),KR(e)&&KR(r)&&r.width>0&&r.height>0){const t=e.getContext("2d");null==t||t.drawImage(r,0,0)}}),r}(r),{remove:s}=a;return function(e,t,r){for(const[n,i]of e){if(!n.element)continue;const e=`[${i}]`,o=t.matches(e)?t:t.querySelector(e);if(n.element.removeAttribute(i),!o)continue;const a=n.element;n.proxy=o,o.removeAttribute(i),JR.set(a,o),r.push(()=>{JR.delete(a),n.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(cA,t)}(a,t),a.remove=()=>{o.forEach(e=>e()),s.call(a)},a})}function mA(e,t){return e===t||QR(e)===QR(t)}function gA(e){const{target:t}=e;"newState"in e&&"closed"===e.newState&&nL(t)&&t.hasAttribute("popover")&&requestAnimationFrame(()=>DM(t))}function vA(e){return"TR"===e.tagName}var yA,bA,xA,SA,wA,CA,EA,IA=250,DA="ease";var PA=class extends(bA=jD,yA=[CI],bA){constructor(e,t){super(e,t),qL(this,wA),qL(this,SA,ML(xA,8,this)),ML(xA,11,this),this.state={initial:{},current:{}};const r=e.registry.plugins.get(oA),n=null==r?void 0:r.register(fA);if(n){const e=this.destroy.bind(this);this.destroy=()=>{n(),e()}}this.registerEffect(NL(this,wA,CA).bind(this,r)),this.registerEffect(NL(this,wA,EA))}};xA=EL(bA),SA=new WeakMap,wA=new WeakSet,CA=function(e){const{overlay:t}=this;if(!t||!e)return;const r=GR(t);return r?e.addRoot(r):void 0},EA=function(){var e,t,r;const{state:n,manager:i,options:o}=this,{dragOperation:a}=i,{position:s,source:l,status:u}=a;if(u.idle)return n.current={},void(n.initial={});if(!l)return;const{element:c,feedback:d}=l;if(!c||"none"===d||!u.initialized||u.initializing)return;const{initial:p}=n,f=null!=(e=this.overlay)?e:c,h=FM(f),m=FM(c),g=!mA(c,f),v=new eL(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 rL(f),{transition:I,translate:D,boxSizing:P,paddingBlockStart:R,paddingBlockEnd:M,paddingInlineStart:L,paddingInlineEnd:A,borderInlineStartWidth:k,borderInlineEndWidth:O,borderBlockStartWidth:q,borderBlockEndWidth:T}=TM(c),N="clone"===d,_="content-box"===P,j=_?parseInt(L)+parseInt(A)+parseInt(k)+parseInt(O):0,F=_?parseInt(R)+parseInt(M)+parseInt(q)+parseInt(T):0,z="move"===d||this.overlay?null:hA(l,N?"clone":"hidden"),W=dE(()=>iL(i.dragOperation.activatorEvent));if("none"!==D){const e=WM(D);e&&!p.translate&&(p.translate=e)}if(!p.transformOrigin){const e=dE(()=>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:r,y:n}=$;p.coordinates.x+=(x*e-x)*r,p.coordinates.y+=(S*t-S)*n}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(uA,"true");const Z=dE(()=>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,re=VR();if(E.set({width:x-j,height:S-F,top:J+re.y,left:X+re.x,translate:`${ee}px ${te}px 0`,transition:I?`${I}, translate 0ms linear`:"",scale:g?`${y} ${b}`:"","transform-origin":`${100*$.x}% ${100*$.y}%`},lA),z&&(c.insertAdjacentElement("afterend",z),null==o?void 0:o.rootElement)){("function"==typeof o.rootElement?o.rootElement(l):o.rootElement).appendChild(c)}let ne,ie,oe;IM(f)&&(f.hasAttribute("popover")||f.setAttribute("popover","manual"),DM(f),f.addEventListener("beforetoggle",gA));const ae=(se={placeholder:z,element:c,feedbackElement:f,frameTransform:h,transformOrigin:$,width:x,height:S,top:w,left:C,widthOffset:j,heightOffset:F,delta:K,styles:E,dragOperation:a,getElementMutationObserver:()=>ne,getSavedCellWidths:()=>oe,setSavedCellWidths:e=>{oe=e}},new ResizeObserver(()=>{var e,t;const r=new eL(se.placeholder,{frameTransform:se.frameTransform,ignoreTransforms:!0}),n=null!=(e=se.transformOrigin)?e:{x:1,y:1},i=(se.width-r.width)*n.x+se.delta.x,o=(se.height-r.height)*n.y+se.delta.y,a=VR();if(se.styles.set({width:r.width-se.widthOffset,height:r.height-se.heightOffset,top:se.top+o+a.y,left:se.left+i+a.x},lA),null==(t=se.getElementMutationObserver())||t.takeRecords(),vA(se.element)&&vA(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[r,n]of e.entries()){const e=t[r];n.style.width=`${e.getBoundingClientRect().width}px`}}se.dragOperation.shape=new eL(se.feedbackElement)}));var se;const le=new eL(f);dE(()=>a.shape=le);const ue=OR(f),ce=e=>{this.manager.actions.stop({event:e})},de=UR(ue);W&&ue.addEventListener("resize",ce),"idle"===dE(()=>l.status)&&requestAnimationFrame(()=>l.status="dragging"),z&&(ae.observe(z),ne=function(e,t,r){const n=new MutationObserver(n=>{let i=!1;for(const r of n){if(r.target!==e){i=!0;continue}if("attributes"!==r.type)continue;const n=r.attributeName;if(n.startsWith("aria-")||dA.includes(n))continue;const o=e.getAttribute(n);if("style"===n){if(tL(e)&&tL(t)){const r=e.style;for(const e of Array.from(t.style))""===r.getPropertyValue(e)&&t.style.removeProperty(e);for(const e of Array.from(r)){if(pA.includes(e)||e.startsWith(lA))continue;const n=r.getPropertyValue(e);t.style.setProperty(e,n)}}}else null!==o?t.setAttribute(n,o):t.removeAttribute(n)}i&&r&&(t.innerHTML=e.innerHTML)});return n.observe(e,{attributes:!0,subtree:!0,childList:!0}),n}(c,z,N),ie=function(e,t,r){const n=new MutationObserver(n=>{for(const i of n)if(0!==i.addedNodes.length)for(const n of Array.from(i.addedNodes)){if(n.contains(e)&&e.nextElementSibling!==t)return e.insertAdjacentElement("afterend",t),void DM(r);if(n.contains(t)&&t.previousElementSibling!==e)return t.insertAdjacentElement("beforebegin",e),void DM(r)}});return n.observe(e.ownerDocument.body,{childList:!0,subtree:!0}),n}(c,z,f));const pe=null==(r=i.dragOperation.source)?void 0:r.id,fe=()=>{var e;if(!W||null==pe)return;const t=i.registry.draggables.get(pe),r=null!=(e=null==t?void 0:t.handle)?e:null==t?void 0:t.element;TR(r)&&r.focus()},he=()=>{var e;if(null==ne||ne.disconnect(),null==ie||ie.disconnect(),ae.disconnect(),ue.removeEventListener("resize",ce),IM(f)&&(f.removeEventListener("beforetoggle",gA),f.removeAttribute("popover")),f.removeAttribute(uA),E.reset(),oe&&vA(c)){const t=Array.from(c.cells);for(const[r,n]of t.entries())n.style.width=null!=(e=oe[r])?e:""}l.status="idle";const t=null!=n.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=DI(()=>{var e;const{transform:t,status:r}=a;if((t.x||t.y||n.current.translate)&&r.dragging){const r=null!=(e=p.translate)?e:{x:0,y:0},i={x:t.x/h.scaleX+r.x,y:t.y/h.scaleY+r.y},o=n.current.translate,s=dE(()=>a.modifiers),l=dE(()=>{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`},lA),null==ne||ne.takeRecords(),l&&l!==le&&o&&!s.length){const e=XI.delta(i,o);a.shape=JI.from(l.boundingRectangle).translate(e.x*h.scaleX,e.y*h.scaleY)}else a.shape=new eL(f);n.current.translate=i}},function(){if(a.status.dropped){this.dispose(),l.status="dropping";const e=void 0!==ge.dropAnimation?ge.dropAnimation:me;let t=n.current.translate;const r=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,r,n,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=IA,easing:s=DA}=null!=o?o:{};DM(e.feedbackElement);const[,l]=null!=(t=MR(e.feedbackElement,e=>"translate"in e))?t:[];null==l||l.pause();const u=null!=(r=e.placeholder)?r:e.element,c={frameTransform:mA(e.feedbackElement,u)?null:void 0},d=new eL(e.feedbackElement,c),p=null!=(n=WM(TM(e.feedbackElement).translate))?n:e.translate,f=new eL(u,c),h=JI.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},lA),e.feedbackElement.setAttribute(sA,""),null==(i=e.getElementMutationObserver())||i.takeRecords(),YM({element:e.feedbackElement,keyframes:SL(xL(xL({},v),y),{translate:[`${p.x}px ${p.y}px 0`,`${m}px ${g}px 0`]}),options:{duration:UR(OR(e.feedbackElement))?0:e.moved||e.feedbackElement!==e.element?a:0,easing:s}}).then(()=>{e.feedbackElement.removeAttribute(sA),null==l||l.finish(),e.cleanup(),requestAnimationFrame(e.restoreFocus)})}({element:c,feedbackElement:f,placeholder:z,translate:t,moved:r,transition:I,alignment:l.alignment,styles:E,animation:null!=e?e:void 0,getElementMutationObserver:()=>ne,cleanup:he,restoreFocus:fe})})}});return()=>{he(),ve()}},LL(xA,4,"overlay",yA,PA,SA),RL(xA,PA),PA.configure=ND(PA);var RA,MA,LA,AA,kA,OA,qA,TA=PA,NA=!0;LA=[CI],AA=HM.Forward,RA=[CI],MA=HM.Reverse;var _A=class{constructor(){qL(this,OA,ML(kA,8,this,NA)),ML(kA,11,this),qL(this,qA,ML(kA,12,this,NA)),ML(kA,15,this)}isLocked(e){return e!==HM.Idle&&(null==e?this[HM.Forward]===NA&&this[HM.Reverse]===NA:this[e]===NA)}unlock(e){e!==HM.Idle&&(this[e]=false)}};kA=EL(null),OA=new WeakMap,qA=new WeakMap,LL(kA,4,AA,LA,_A,OA),LL(kA,4,MA,RA,_A,qA),RL(kA,_A);var jA,FA,zA,WA,$A,HA,VA=[HM.Forward,HM.Reverse],BA=class{constructor(){this.x=new _A,this.y=new _A}isLocked(){return this.x.isLocked()&&this.y.isLocked()}},GA=class extends jD{constructor(e){super(e);const t=SE(new BA);let r=null;this.signal=t,AE(()=>{const{status:n}=e.dragOperation;if(!n.initialized)return r=null,void(t.value=new BA);const{delta:i}=e.dragOperation.position;if(r){const e={x:UA(i.x,r.x),y:UA(i.y,r.y)},n=t.peek();uE(()=>{for(const t of aD)for(const r of VA)e[t]===r&&n[t].unlock(r);t.value=n})}r=i})}get current(){return this.signal.peek()}};function UA(e,t){return Math.sign(e-t)}var YA=class extends(FA=zD,jA=[CI],FA){constructor(e){super(e),qL(this,WA,ML(zA,8,this,!1)),ML(zA,11,this),qL(this,$A),qL(this,HA,()=>{if(!OL(this,$A))return;const{element:e,by:t}=OL(this,$A);t.y&&(e.scrollTop+=t.y),t.x&&(e.scrollLeft+=t.x)}),this.scroll=e=>{var t;if(this.disabled)return!1;const r=this.getScrollableElements();if(!r)return TL(this,$A,void 0),!1;const{position:n}=this.manager.dragOperation,i=null==n?void 0:n.current;if(i){const{by:n}=null!=e?e:{},o=n?{x:KA(n.x),y:KA(n.y)}:void 0,a=o?void 0:this.scrollIntentTracker.current;if(null==a?void 0:a.isLocked())return!1;for(const e of r){const r=MM(e,n);if(r.x||r.y){const{speed:r,direction:s}=GM(e,i,o);if(a)for(const e of aD)a[e].isLocked(s[e])&&(r[e]=0,s[e]=0);if(s.x||s.y){const{x:i,y:o}=null!=n?n:s,a=i*r.x,l=o*r.y;if(a||l){const r=null==(t=OL(this,$A))?void 0:t.by;if(this.autoScrolling&&r){if(r.x&&!a||r.y&&!l)continue}return TL(this,$A,{element:e,by:{x:a,y:l}}),AM.schedule(OL(this,HA)),!0}}}}}return TL(this,$A,void 0),!1};let t=null,r=null;const n=SI(()=>{const{position:r,source:n}=e.dragOperation;if(!r)return null;const i=XR(GR(null==n?void 0:n.element),r.current);return i&&(t=i),null!=i?i:t}),i=SI(()=>{const t=n.value,{documentElement:i}=_R(t);if(!t||t===i){const{target:t}=e.dragOperation,n=null==t?void 0:t.element;if(n){const e=jM(n,{excludeElement:!1});return r=e,e}}if(t){const e=jM(t,{excludeElement:!1});return this.autoScrolling&&r&&e.size<(null==r?void 0:r.size)?r:(r=e,e)}return r=null,null},wI);this.getScrollableElements=()=>i.value,this.scrollIntentTracker=new GA(e),this.destroy=e.monitor.addEventListener("dragmove",t=>{!this.disabled&&!t.defaultPrevented&&iL(e.dragOperation.activatorEvent)&&t.by&&this.scroll({by:t.by})&&t.preventDefault()})}};function KA(e){return e>0?HM.Forward:e<0?HM.Reverse:HM.Idle}zA=EL(FA),WA=new WeakMap,$A=new WeakMap,HA=new WeakMap,LL(zA,4,"autoScrolling",jA,YA,WA),RL(zA,YA);var XA,JA=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()}),ZA=class extends jD{constructor(e,t){super(e);const r=e.registry.plugins.get(YA);if(!r)throw new Error("AutoScroller plugin depends on Scroller plugin");this.destroy=AE(()=>{if(this.disabled)return;const{position:t,status:n}=e.dragOperation;if(n.dragging){if(r.scroll()){r.autoScrolling=!0;const e=setInterval(()=>JA.schedule(r.scroll),10);return()=>{clearInterval(e)}}r.autoScrolling=!1}})}},QA={capture:!0,passive:!0},ek=class extends zD{constructor(e){super(e),qL(this,XA),this.handleScroll=()=>{null==OL(this,XA)&&TL(this,XA,setTimeout(()=>{this.manager.collisionObserver.forceUpdate(!1),TL(this,XA,void 0)},50))};const{dragOperation:t}=this.manager;this.destroy=AE(()=>{var e,r,n;if(t.status.dragging){const i=null!=(n=null==(r=null==(e=t.source)?void 0:e.element)?void 0:r.ownerDocument)?n:document;return i.addEventListener("scroll",this.handleScroll,QA),()=>{i.removeEventListener("scroll",this.handleScroll,QA)}}})}};XA=new WeakMap;function tk(){var e;null==(e=document.getSelection())||e.removeAllRanges()}var rk,nk=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 r;const n=null!=(r=t.handle)?r:t.element;return e.target!==n}}),ik=class extends YP{constructor(e,t){super(e),this.manager=e,this.options=t,qL(this,rk,[]),this.listeners=new ZR,this.handleSourceKeyDown=(e,t,r)=>{if(this.disabled||e.defaultPrevented)return;if(!nL(e.target))return;if(t.disabled)return;const{keyboardCodes:n=nk.keyboardCodes,preventActivation:i=nk.preventActivation}=null!=r?r:{};n.start.includes(e.code)&&this.manager.dragOperation.status.idle&&((null==i?void 0:i(e,t))||this.handleStart(e,t,r))}}bind(e,t=this.options){const r=AE(()=>{var r;const n=null!=(r=e.handle)?r:e.element,i=r=>{iL(r)&&this.handleSourceKeyDown(r,e,t)};if(n)return n.addEventListener("keydown",i),()=>{n.removeEventListener("keydown",i)}});return r}handleStart(e,t,r){const{element:n}=t;if(!n)throw new Error("Source draggable does not have an associated element");e.preventDefault(),e.stopImmediatePropagation(),UM(n);const{center:i}=new eL(n);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=_R(n),a=[this.listeners.bind(o,[{type:"keydown",listener:e=>this.handleKeyDown(e,t,r),options:{capture:!0}}])];OL(this,rk).push(...a)}handleKeyDown(e,t,r){const{keyboardCodes:n=nk.keyboardCodes}=null!=r?r:{};if(sk(e,[...n.end,...n.cancel])){e.preventDefault();const t=sk(e,n.cancel);return void this.handleEnd(e,t)}sk(e,n.up)?this.handleMove("up",e):sk(e,n.down)&&this.handleMove("down",e),sk(e,n.left)?this.handleMove("left",e):sk(e,n.right)&&this.handleMove("right",e)}handleEnd(e,t){this.manager.actions.stop({event:e,canceled:t}),this.cleanup()}handleMove(e,t){var r,n;const{shape:i}=this.manager.dragOperation,o=t.shiftKey?5:1;let a={x:0,y:0},s=null!=(n=null==(r=this.options)?void 0:r.offset)?n:nk.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(ZA);!1===(null==e?void 0:e.disabled)&&(e.disable(),OL(this,rk).push(()=>{e.enable()}))}cleanup(){OL(this,rk).forEach(e=>e()),TL(this,rk,[])}destroy(){this.cleanup(),this.listeners.clear()}};rk=new WeakMap,ik.configure=ND(ik),ik.defaults=nk;var ok,ak=ik;function sk(e,t){return t.includes(e.code)}var lk,uk;ok=new WeakMap;lk=new WeakMap,uk=new WeakMap;var ck=class{};ck.Delay=class extends XP{constructor(){super(...arguments),qL(this,lk),qL(this,uk)}onEvent(e){switch(e.type){case"pointerdown":TL(this,uk,zR(e)),TL(this,lk,setTimeout(()=>this.activate(e),this.options.value));break;case"pointermove":if(!OL(this,uk))return;const{x:t,y:r}=zR(e);eD({x:t-OL(this,uk).x,y:r-OL(this,uk).y},this.options.tolerance)&&this.abort();break;case"pointerup":this.abort()}}abort(){OL(this,lk)&&(clearTimeout(OL(this,lk)),TL(this,uk,void 0),TL(this,lk,void 0))}},ck.Distance=class extends XP{constructor(){super(...arguments),qL(this,ok)}onEvent(e){switch(e.type){case"pointerdown":TL(this,ok,zR(e));break;case"pointermove":if(!OL(this,ok))return;const{x:t,y:r}=zR(e),n={x:t-OL(this,ok).x,y:r-OL(this,ok).y},{tolerance:i}=this.options;if(i&&eD(n,i))return void this.abort();eD(n,this.options.value)&&this.activate(e);break;case"pointerup":this.abort()}}abort(){TL(this,ok,void 0)}};var dk,pk=Object.freeze({activationConstraints(e,t){var r;const{pointerType:n,target:i}=e;if("mouse"!==n||!nL(i)||t.handle!==i&&!(null==(r=t.handle)?void 0:r.contains(i)))return"touch"===n?[new ck.Delay({value:250,tolerance:5})]:function(e){if(!nL(e))return!1;const{tagName:t}=e;return"INPUT"===t||"TEXTAREA"===t||(r=e).hasAttribute("contenteditable")&&"false"!==r.getAttribute("contenteditable");var r}(i)&&!e.defaultPrevented?[new ck.Delay({value:200,tolerance:0})]:[new ck.Delay({value:200,tolerance:10}),new ck.Distance({value:5})]},preventActivation(e,t){var r;const{target:n}=e;return n!==t.element&&(n!==t.handle&&(!!nL(n)&&(!(null==(r=t.handle)?void 0:r.contains(n))&&Boolean(n.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 ')))))}}),fk=class extends YP{constructor(e,t){super(e),this.manager=e,this.options=t,qL(this,dk,new Set),this.listeners=new ZR,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,r=this.options){const{activationConstraints:n=pk.activationConstraints}=null!=r?r:{};return"function"==typeof n?n(e,t):n}bind(e,t=this.options){const r=AE(()=>{var r;const n=new AbortController,{signal:i}=n,o=r=>{(function(e){if(!e)return!1;const{PointerEvent:t}=OR(e.target);return e instanceof t})(r)&&this.handlePointerDown(r,e,t)};let a=[null!=(r=e.handle)?r:e.element];(null==t?void 0:t.activatorElements)&&(a=Array.isArray(t.activatorElements)?t.activatorElements:t.activatorElements(e));for(const e of a)e&&(yk(e.ownerDocument.defaultView),e.addEventListener("pointerdown",o,{signal:i}));return()=>n.abort()});return r}handlePointerDown(e,t,r){if(this.disabled||!e.isPrimary||0!==e.button||!nL(e.target)||t.disabled||function(e){return"sensor"in e}(e)||!this.manager.dragOperation.status.idle)return;const{preventActivation:n=pk.preventActivation}=null!=r?r:{};if(null==n?void 0:n(e,t))return;const{target:i}=e,o=TR(i)&&i.draggable&&"true"===i.getAttribute("draggable"),a=FM(t.element),{x:s,y:l}=zR(e);this.initialCoordinates={x:s*a.scaleX+a.x,y:l*a.scaleY+a.y};const u=this.activationConstraints(e,t,r);e.sensor=this;const c=new KP(u,e=>this.handleStart(t,e));c.signal.onabort=()=>this.handleCancel(e),c.onEvent(e),this.controller=c;const d=$R(),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:mk,options:{capture:!0}}]);OL(this,dk).add(()=>{p(),this.initialCoordinates=void 0})}handlePointerMove(e,t){var r,n;if(!1!==(null==(r=this.controller)?void 0:r.activated)){if(this.manager.dragOperation.status.dragging){const r=zR(e),n=FM(t.element);r.x=r.x*n.scaleX+n.x,r.y=r.y*n.scaleY+n.y,e.preventDefault(),e.stopPropagation(),this.latest.event=e,this.latest.coordinates=r,AM.schedule(this.handleMove)}}else null==(n=this.controller)||n.onEvent(e)}handlePointerUp(e){const{status:t}=this.manager.dragOperation;if(!t.idle){e.preventDefault(),e.stopPropagation();const r=!t.initialized;this.manager.actions.stop({event:e,canceled:r})}this.cleanup()}handleKeyDown(e){"Escape"===e.key&&(e.preventDefault(),this.handleCancel(e))}handleStart(e,t){const{manager:r,initialCoordinates:n}=this;if(!n||!r.dragOperation.status.idle)return;if(t.defaultPrevented)return;if(r.actions.start({coordinates:n,event:t,source:e}).signal.aborted)return this.cleanup();t.preventDefault();const i=_R(t.target).body;i.setPointerCapture(t.pointerId);const o=nL(t.target)?[t.target,i]:i,a=this.listeners.bind(o,[{type:"touchmove",listener:mk,options:{passive:!1}},{type:"click",listener:mk},{type:"contextmenu",listener:mk},{type:"keydown",listener:this.handleKeyDown}]);OL(this,dk).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},OL(this,dk).forEach(e=>e()),OL(this,dk).clear()}destroy(){this.cleanup(),this.listeners.clear()}};dk=new WeakMap,fk.configure=ND(fk),fk.defaults=pk;var hk=fk;function mk(e){e.preventDefault()}function gk(){}var vk=new WeakSet;function yk(e){e&&!vk.has(e)&&(e.addEventListener("touchmove",gk,{capture:!1,passive:!1}),vk.add(e))}var bk,xk,Sk,wk,Ck,Ek,Ik,Dk,Pk,Rk,Mk,Lk,Ak,kk,Ok,qk,Tk,Nk,_k={modifiers:[],plugins:[class extends jD{constructor(e,t){super(e);const{id:r,idPrefix:{description:n=FL,announcement:i=zL}={},announcements:o=$L,screenReaderInstructions:a=WL,debounce:s=500}=null!=t?t:{},l=r?`${n}-${r}`:aL(n),u=r?`${i}-${r}`:aL(i);let c,d,p,f;const h=(e=f)=>{p&&e&&(null==p?void 0:p.nodeValue)!==e&&(p.nodeValue=e)},m=()=>AM.schedule(h),g=function(e,t){let r;const n=()=>{clearTimeout(r),r=setTimeout(e,t)};return n.cancel=()=>clearTimeout(r),n}(m,s),v=Object.entries(o).map(([e,t])=>this.manager.monitor.addEventListener(e,(r,n)=>{const i=p;if(!i)return;const o=null==t?void 0:t(r,n);o&&i.nodeValue!==o&&(f=o,VL.includes(e)?g():(m(),g.cancel()))})),y=()=>{let e=[];(null==c?void 0:c.isConnected)||(c=function(e,t){const r=document.createElement("div");return r.id=e,r.style.setProperty("display","none"),r.textContent=t,r}(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 r=null!=(e=t.handle)?e:t.element;if(r){c&&d||b.add(y),HL(r)&&!HR()||r.hasAttribute("tabindex")||b.add(()=>r.setAttribute("tabindex","0")),r.hasAttribute("role")||"button"===r.tagName.toLowerCase()||b.add(()=>r.setAttribute("role",_L)),r.hasAttribute("aria-roledescription")||b.add(()=>r.setAttribute("aria-roledescription",jL)),r.hasAttribute("aria-describedby")||b.add(()=>r.setAttribute("aria-describedby",l));for(const e of["aria-pressed","aria-grabbed"]){const n=String(t.isDragging);r.getAttribute(e)!==n&&b.add(()=>r.setAttribute(e,n))}const e=String(t.disabled);r.getAttribute("aria-disabled")!==e&&b.add(()=>r.setAttribute("aria-disabled",e))}}b.size>0&&AM.schedule(x)}),this.destroy=()=>{super.destroy(),null==c||c.remove(),null==d||d.remove(),v.forEach(e=>e())}}},ZA,class extends jD{constructor(e,t){super(e,t),this.manager=e;const r=SI(()=>{var e;return _R(null==(e=this.manager.dragOperation.source)?void 0:e.element)});this.destroy=AE(()=>{var e;const{dragOperation:t}=this.manager,{cursor:n="grabbing",nonce:i}=null!=(e=this.options)?e:{};if(t.status.initialized){const e=r.value,t=e.createElement("style");return i&&t.setAttribute("nonce",i),t.textContent=`* { cursor: ${n} !important; }`,e.head.appendChild(t),()=>t.remove()}})}},TA,class extends jD{constructor(e,t){super(e,t),this.manager=e,this.destroy=AE(()=>{var e;const{dragOperation:t}=this.manager,{nonce:r}=null!=(e=this.options)?e:{};if(t.status.initialized){const e=document.createElement("style");return r&&e.setAttribute("nonce",r),e.textContent="* { user-select: none !important; -webkit-user-select: none !important; }",document.head.appendChild(e),tk(),document.addEventListener("selectionchange",tk,{capture:!0}),()=>{document.removeEventListener("selectionchange",tk,{capture:!0}),e.remove()}}})}}],sensors:[hk,ak]},jk=class extends SR{constructor(e={}){const t=xR(e.plugins,_k.plugins),r=xR(e.sensors,_k.sensors),n=xR(e.modifiers,_k.modifiers);super(SL(xL({},e),{plugins:[ek,YA,oA,...t],sensors:r,modifiers:n}))}},Fk=class extends(wk=BP,Sk=[CI],xk=[CI],bk=[CI],wk){constructor(e,t){var r=e,{element:n,effects:i=()=>[],handle:o,feedback:a="default"}=r,s=CL(r,["element","effects","handle","feedback"]);super(xL({effects:()=>[...i(),()=>{var e,t;const{manager:r}=this;if(!r)return;const n=(null!=(t=null==(e=this.sensors)?void 0:e.map(_D))?t:[...r.sensors]).map(e=>{const t=e instanceof YP?e:r.registry.register(e.plugin),n=e instanceof YP?void 0:e.options;return t.bind(this,n)});return function(){n.forEach(e=>e())}}]},s),t),qL(this,Ek,ML(Ck,8,this)),ML(Ck,11,this),qL(this,Ik,ML(Ck,12,this)),ML(Ck,15,this),qL(this,Dk,ML(Ck,16,this)),ML(Ck,19,this),this.element=n,this.handle=o,this.feedback=a}};Ck=EL(wk),Ek=new WeakMap,Ik=new WeakMap,Dk=new WeakMap,LL(Ck,4,"handle",Sk,Fk,Ek),LL(Ck,4,"element",xk,Fk,Ik),LL(Ck,4,"feedback",bk,Fk,Dk),RL(Ck,Fk);var zk=class extends(Mk=GP,Rk=[CI],Pk=[CI],Mk){constructor(e,t){var r=e,{element:n,effects:i=()=>[]}=r,o=CL(r,["element","effects"]);const{collisionDetector:a=sL}=o,s=e=>{const{manager:t,element:r}=this;if(!r||null===e)return void(this.shape=void 0);if(!t)return;const n=new eL(r),i=dE(()=>this.shape);return n&&(null==i?void 0:i.equals(n))?i:(this.shape=n,n)},l=SE(!1);super(SL(xL({},o),{collisionDetector:a,effects:()=>[...i(),()=>{const{element:e,manager:t}=this;if(!t)return;const{dragOperation:r}=t,{source:n}=r;l.value=Boolean(n&&r.status.initialized&&e&&!this.disabled&&this.accepts(n))},()=>{const{element:e}=this;if(l.value&&e){const t=new EM(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),qL(this,Tk),qL(this,Ak,ML(Lk,8,this)),ML(Lk,11,this),qL(this,Nk,ML(Lk,12,this)),ML(Lk,15,this),this.element=n,this.refreshShape=()=>s()}set element(e){TL(this,Tk,e,qk)}get element(){var e;return null!=(e=this.proxy)?e:OL(this,Tk,Ok)}};function Wk(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}Lk=EL(Mk),Ak=new WeakMap,Tk=new WeakSet,Nk=new WeakMap,kk=LL(Lk,20,"#element",Rk,Tk,Ak),Ok=kk.get,qk=kk.set,LL(Lk,4,"proxy",Pk,zk,Nk),RL(Lk,zk);var $k="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?g:d;function Hk(){const e=m(0)[1];return f(()=>{e(e=>e+1)},[e])}function Vk(e,t=[],r=!1){const n=l(e);return n.current=e,function(e,t=!1){const r=l(e.peek()),n=l(!1),i=Hk();return $k(()=>AE(()=>{const o=r.current,a=e.value;if(o!==a){if(r.current=a,!n.current)return;t?D(i):i()}}),[e,t,i]),{get value(){return n.current=!0,e.peek()}}}(v(()=>SI(()=>n.current()),t),r)}function Bk(e,t){const r=l(new Map),n=Hk();return $k(()=>{if(e)return AE(()=>{var i;let o=!1,a=!1;for(const n of r.current){const[s]=n,l=dE(()=>n[1]),u=e[s];l!==u&&(o=!0,r.current.set(s,u),a=null!=(i=null==t?void 0:t(s,l,u))&&i)}o&&(a?D(n):n())});r.current.clear()},[e]),v(()=>e?new Proxy(e,{get(e,t){const n=e[t];return r.current.set(t,n),n}}):e,[e])}function Gk(e,t){e()}function Uk(e){const t=l(e);return $k(()=>{t.current=e},[e]),t}function Yk(e,t,r=d,n=Object.is){const i=l(e);r(()=>{const r=i.current;n(e,r)||(i.current=e,t(e,r))},[t,e])}function Kk(e,t){const r=l(Wk(e));$k(()=>{const n=Wk(e);n!==r.current&&(r.current=n,t(n))})}var Xk=Object.defineProperty,Jk=Object.defineProperties,Zk=Object.getOwnPropertyDescriptors,Qk=Object.getOwnPropertySymbols,eO=Object.prototype.hasOwnProperty,tO=Object.prototype.propertyIsEnumerable,rO=(e,t,r)=>t in e?Xk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,nO=new jk,iO=u(nO),oO=b(x(({children:e},t)=>{const[r,n]=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(),n(e=>e+1)})}}),[]);return $k(()=>{var e;null==(e=o.current)||e.call(o),i.current=null},[e,r]),w(t,()=>a),null})),aO=[void 0,wI];function sO(e){var t=e,{children:r,onCollision:n,onBeforeDragStart:i,onDragStart:o,onDragMove:a,onDragOver:s,onDragEnd:u}=t,c=((e,t)=>{var r={};for(var n in e)eO.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&Qk)for(var n of Qk(e))t.indexOf(n)<0&&tO.call(e,n)&&(r[n]=e[n]);return r})(t,["children","onCollision","onBeforeDragStart","onDragStart","onDragMove","onDragOver","onDragEnd"]);const p=l(null),{plugins:f,modifiers:h,sensors:m}=c,g=xR(f,_k.plugins),v=xR(m,_k.sensors),b=xR(h,_k.modifiers),x=Uk(i),S=Uk(o),w=Uk(s),C=Uk(a),E=Uk(u),I=Uk(n),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 jk(c)});return d(()=>{if(!p.current)throw new Error("Renderer not found");const{renderer:e,trackRendering:t}=p.current,{monitor:r}=D;D.renderer=e;const n=[r.addEventListener("beforedragstart",e=>{const r=x.current;r&&t(()=>r(e,D))}),r.addEventListener("dragstart",e=>{var t;return null==(t=S.current)?void 0:t.call(S,e,D)}),r.addEventListener("dragover",e=>{const r=w.current;r&&t(()=>r(e,D))}),r.addEventListener("dragmove",e=>{const r=C.current;r&&t(()=>r(e,D))}),r.addEventListener("dragend",e=>{const r=E.current;r&&t(()=>r(e,D))}),r.addEventListener("collision",e=>{var t;return null==(t=I.current)?void 0:t.call(I,e,D)})];return()=>n.forEach(e=>e())},[D]),Yk(g,()=>D&&(D.plugins=g),...aO),Yk(v,()=>D&&(D.sensors=v),...aO),Yk(b,()=>D&&(D.modifiers=b),...aO),io.jsxs(iO.Provider,{value:D,children:[io.jsx(oO,{ref:p,children:r}),r]})}function lO(){return h(iO)}function uO(e){var t;const r=null!=(t=lO())?t:void 0,[n]=m(()=>e(r));return n.manager!==r&&(n.manager=r),$k(n.register,[r,n]),n}function cO({children:e,className:t,dropAnimation:r,style:i,tag:o,disabled:a}){var s;const u=l(null),c=lO(),p=null!=(s=Vk(()=>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 TA);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 TA);return e?(e.dropAnimation=r,()=>{e.dropAnimation=void 0}):void 0},[c,r]);const h=v(()=>{if(!c)return null;const e=new Proxy(c.registry,{get:(e,t)=>"register"===t||"unregister"===t?dO:e[t]});return new Proxy(c,{get:(t,r)=>"registry"===r?e:t[r]})},[c]);return io.jsx(iO.Provider,{value:h,children:n(o||"div",{ref:u,className:t,style:i,"data-dnd-overlay":!0},function(){if(!p||f)return null;if("function"==typeof e)return io.jsx(pO,{source:p,children:e});return e}())})}function dO(){return()=>{}}function pO({children:e,source:t}){return e(Bk(t))}var fO,hO,mO,gO,vO,yO=Object.create,bO=Object.defineProperty,xO=Object.getOwnPropertyDescriptor,SO=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),wO=e=>{throw TypeError(e)},CO=["class","method","getter","setter","accessor","field","value","get","set"],EO=e=>void 0!==e&&"function"!=typeof e?wO("Function expected"):e,IO=(e,t,r,n,i)=>({kind:CO[e],name:t,metadata:n,addInitializer:e=>r._?wO("Already initialized"):i.push(EO(e||null))}),DO=(e,t,r,n,i,o)=>{for(var a,s,l,u,c=7&t,d=CO[c+5],p=e[2]||(e[2]=[]),f=(i=i.prototype,xO(i,r)),h=n.length-1;h>=0;h--)(l=IO(c,r,s={},e[3],p)).static=false,l.private=false,u=l.access={has:e=>r in e},u.get=e=>e[r],a=(0,n[h])(f[d],l),s._=1,EO(a)&&(f[d]=a);return f&&bO(i,r,f),i},PO=(e,t,r)=>t.has(e)||wO("Cannot "+r),RO=class e{constructor(e,t){this.x=e,this.y=t}static delta(t,r){return new e(t.x-r.x,t.y-r.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:r}){return new e(t,r)}},MO=class extends(mO=RI,hO=[EI],fO=[EI],mO){constructor(e){var t,r,n;super(RO.from(e),(e,t)=>RO.equals(e,t)),((e,t,r)=>{for(var n=0,i=e[t>>1],o=i&&i.length;n<o;n++)i[n].call(r)})(vO,5,this),t=this,n=0,(r=gO).has(t)?wO("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(t):r.set(t,n),this.velocity={x:0,y:0}}get delta(){return RO.delta(this.current,this.initial)}get direction(){const{current:e,previous:t}=this;if(!t)return null;const r={x:e.x-t.x,y:e.y-t.y};return r.x||r.y?Math.abs(r.x)>Math.abs(r.y)?r.x>0?"right":"left":r.y>0?"down":"up":null}get current(){return super.current}set current(e){const{current:t}=this,r=RO.from(e),n={x:r.x-t.x,y:r.y-t.y},i=Date.now(),o=i-(PO(a=this,s=gO,"read from private field"),s.get(a));var a,s;const l=e=>Math.round(e/o*100);uE(()=>{((e,t,r)=>{PO(e,t,"write to private field"),t.set(e,r)})(this,gO,i),this.velocity={x:l(n.x),y:l(n.y)},super.current=r})}reset(e=this.defaultValue){super.reset(RO.from(e)),this.velocity={x:0,y:0}}};vO=(e=>{var t;return[,,,yO(null!=(t=null==e?void 0:e[SO("metadata")])?t:null)]})(mO),gO=new WeakMap,DO(vO,2,"delta",hO,MO),DO(vO,2,"direction",fO,MO),((e,t)=>{((e,t,r)=>{t in e?bO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(t,SO("metadata"),e[3])})(vO,MO);var LO=(e=>(e.Horizontal="x",e.Vertical="y",e))(LO||{});Object.values(LO);var AO=e=>{var t;return null!=(t=(({dragOperation:e,droppable:t})=>{const r=e.position.current;if(!r)return null;const{id:n}=t;if(!t.shape)return null;if(t.shape.containsPoint(r))return{id:n,value:1/RO.distance(t.shape.center,r),type:sP.PointerIntersection,priority:aP.High};return null})(e))?t:(({dragOperation:e,droppable:t})=>{const{shape:r}=e;if(!t.shape||!(null==r?void 0:r.current))return null;const n=r.current.intersectionArea(t.shape);if(n){const{position:i}=e,o=RO.distance(t.shape.center,i.current),a=n/(r.current.area+t.shape.area-n)/o;return{id:t.id,value:a,type:sP.ShapeIntersection,priority:aP.Normal}}return null})(e)};function kO(e){const{collisionDetector:t,data:r,disabled:n,element:i,id:o,accept:a,type:s}=e,l=uO(t=>new zk(((e,t)=>Jk(e,Zk(t)))(((e,t)=>{for(var r in t||(t={}))eO.call(t,r)&&rO(e,r,t[r]);if(Qk)for(var r of Qk(t))tO.call(t,r)&&rO(e,r,t[r]);return e})({},e),{register:!1,element:Wk(i)}),t)),u=Bk(l);return Yk(o,()=>l.id=o),Kk(i,e=>l.element=e),Yk(a,()=>l.accept=a,void 0,wI),Yk(t,()=>l.collisionDetector=null!=t?t:AO),Yk(r,()=>r&&(l.data=r)),Yk(n,()=>l.disabled=!0===n),Yk(s,()=>l.type=s),{droppable:u,get isDropTarget(){return u.isDropTarget},ref:f(e=>{var t,r;(e||!(null==(t=l.element)?void 0:t.isConnected)||(null==(r=l.manager)?void 0:r.dragOperation.status.idle))&&(l.element=null!=e?e:void 0)},[l])}}const OO=e=>Array.from({length:e},(e,t)=>t),qO=({id:e,sectionIndex:t,itemIndex:r})=>io.jsx("span",{children:`${e}-${t}-${r}`}),TO=r.memo(()=>{const e=Dw(ZC)??qO,{startSectionIndex:t,startIndex:r,id:n}=Dw(rE)??{};return"number"!=typeof t||"number"!=typeof r||void 0===n?null:io.jsx(cO,{dropAnimation:null,children:io.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:io.jsx(e,{id:n,sectionIndex:t,itemIndex:r})})})}),NO=({sectionIndex:e,itemIndex:t,isDragging:r})=>{const n=Dw(rE),i=n?.toSectionIndex===e,o=n?.startSectionIndex===e,a=t>(n?.startIndex??t)&&e===n?.startSectionIndex?t-1:t;let s=!1;return o&&n.startIndex===a?s=!1:i&&n.toIndex===a&&(s=!0),io.jsx("div",{"data-key":"drop-target-indicator",style:{visibility:s&&!r?"visible":"hidden",padding:0,background:"rgba(64, 64, 64, 1)",borderRadius:2,marginLeft:"4px",width:"calc(100% - 8px)",height:"2px"}})},_O=(e,t)=>e?"2px solid rgba(0, 135, 61, 1)":t?"1px dashed rgba(0, 0, 0, 0.43)":void 0,jO=r.memo(({sectionIndex:e})=>{const t=Dw(BC)[e],r=Dw(GC),n=Dw(UC),i=null!==Dw(rE),o=n(e),a=r({sectionIndex:e}),{ref:s,isDropTarget:l}=kO({id:a,type:"section",accept:"item",collisionPriority:aP.Low,data:{id:a,sectionIndex:e,sectionKey:a}});return t>0?null:io.jsxs(Qu,{ref:s,sx:{margin:"4px",outline:_O(l,i),borderRadius:"4px",boxSizing:"border-box"},children:[io.jsx(Qu,{sx:{position:"relative",top:"4px"},children:io.jsx(NO,{sectionIndex:e,itemIndex:0,isDragging:!1})}),io.jsxs(Qu,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px",padding:"20px 4px"},children:[io.jsx(mu,{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}),io.jsx(mu,{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})]})]})}),FO=r.memo(({id:e,sectionIndex:t})=>{const r=Dw(JC);return void 0===r?null:io.jsx(r,{id:e,sectionIndex:t})});var zO=Object.defineProperty,WO=Object.defineProperties,$O=Object.getOwnPropertyDescriptors,HO=Object.getOwnPropertySymbols,VO=Object.prototype.hasOwnProperty,BO=Object.prototype.propertyIsEnumerable,GO=(e,t,r)=>t in e?zO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,UO=(e,t)=>{for(var r in t||(t={}))VO.call(t,r)&&GO(e,r,t[r]);if(HO)for(var r of HO(t))BO.call(t,r)&&GO(e,r,t[r]);return e},YO=(e,t)=>WO(e,$O(t)),KO=class extends gR{apply({transform:e}){if(!this.options)return e;const{axis:t,value:r}=this.options;return YO(UO({},e),{[t]:r})}};KO.configure=ND(KO);var XO=KO,JO=XO.configure({axis:"x",value:0});XO.configure({axis:"y",value:0});var ZO=class extends gR{apply({transform:e}){var t;const{size:r=20}=null!=(t=this.options)?t:{},n="number"==typeof r?r:r.x,i="number"==typeof r?r:r.y;return YO(UO({},e),{x:Math.ceil(e.x/n)*n,y:Math.ceil(e.y/i)*i})}};ZO.configure=ND(ZO);var QO=Object.create,eq=Object.defineProperty,tq=Object.defineProperties,rq=Object.getOwnPropertyDescriptor,nq=Object.getOwnPropertyDescriptors,iq=Object.getOwnPropertySymbols,oq=Object.prototype.hasOwnProperty,aq=Object.prototype.propertyIsEnumerable,sq=e=>{throw TypeError(e)},lq=(e,t,r)=>t in e?eq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,uq=(e,t)=>{for(var r in t||(t={}))oq.call(t,r)&&lq(e,r,t[r]);if(iq)for(var r of iq(t))aq.call(t,r)&&lq(e,r,t[r]);return e},cq=(e,t)=>tq(e,nq(t)),dq=["class","method","getter","setter","accessor","field","value","get","set"],pq=e=>void 0!==e&&"function"!=typeof e?sq("Function expected"):e,fq=(e,t,r,n,i)=>({kind:dq[e],name:t,metadata:n,addInitializer:e=>r._?sq("Already initialized"):i.push(pq(e||null))}),hq=(e,t,r,n)=>{for(var i=0,o=e[t>>1],a=o&&o.length;i<a;i++)1&t?o[i].call(r):n=o[i].call(r,n);return n},mq=(e,t,r,n,i,o)=>{for(var a,s,l,u,c,d=7&t,p=e.length+1,f=dq[d+5],h=e[p-1]=[],m=e[p]||(e[p]=[]),g=(i=i.prototype,rq({get[r](){return vq(this,o)},set[r](e){return bq(this,o,e)}},r)),v=n.length-1;v>=0;v--)(u=fq(d,r,l={},e[3],m)).static=false,u.private=false,c=u.access={has:e=>r in e},c.get=e=>e[r],c.set=(e,t)=>e[r]=t,s=(0,n[v])({get:g.get,set:g.set},u),l._=1,void 0===s?pq(s)&&(g[f]=s):"object"!=typeof s||null===s?sq("Object expected"):(pq(a=s.get)&&(g.get=a),pq(a=s.set)&&(g.set=a),pq(a=s.init)&&h.unshift(a));return g&&eq(i,r,g),i},gq=(e,t,r)=>t.has(e)||sq("Cannot "+r),vq=(e,t,r)=>(gq(e,t,"read from private field"),t.get(e)),yq=(e,t,r)=>t.has(e)?sq("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),bq=(e,t,r,n)=>(gq(e,t,"write to private field"),t.set(e,r),r);function xq(e){return e instanceof Jq||e instanceof Xq}var Sq=class extends jD{constructor(e){super(e);const t=AE(()=>{const{dragOperation:t}=e;if(iL(t.activatorEvent)&&xq(t.source)&&t.status.initialized){const t=e.registry.plugins.get(YA);if(t)return t.disable(),()=>t.enable()}}),r=e.monitor.addEventListener("dragmove",(e,t)=>{queueMicrotask(()=>{if(this.disabled||e.defaultPrevented||!e.nativeEvent)return;const{dragOperation:r}=t;if(!iL(e.nativeEvent))return;if(!xq(r.source))return;if(!r.shape)return;const{actions:n,collisionObserver:i,registry:o}=t,{by:a}=e;if(!a)return;const s=function(e){const{x:t,y:r}=e;if(t>0)return"right";if(t<0)return"left";if(r>0)return"down";if(r<0)return"up"}(a),{source:l,target:u}=r,{center:c}=r.shape.current,d=[],p=[];uE(()=>{for(const e of o.droppables){const{id:t}=e;if(!e.accepts(l)||t===(null==u?void 0:u.id)&&xq(e)||!e.element)continue;let r=e.shape;const n=new eL(e.element,{getBoundingClientRect:e=>FR(e,void 0,.2)});n.height&&n.width&&(("down"==s&&c.y+10<n.center.y||"up"==s&&c.y-10>n.center.y||"left"==s&&c.x-10>n.center.x||"right"==s&&c.x+10<n.center.x)&&(d.push(e),e.shape=n,p.push(()=>e.shape=r)))}}),e.preventDefault(),i.disable();const f=i.computeCollisions(d,lL);uE(()=>p.forEach(e=>e()));const[h]=f;if(!h)return;const{id:m}=h,{index:g,group:v}=l.sortable;n.setDropTarget(m).then(()=>{const{source:e,target:t,shape:o}=r;if(!e||!xq(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;UM(c);const d=new eL(c);if(!d)return;const p=JI.delta(d,JI.from(o.current.boundingRectangle),e.alignment);n.move({by:p}),u?n.setDropTarget(e.id).then(()=>i.enable()):i.enable()})})});this.destroy=()=>{r(),t()}}};var wq=Object.defineProperty,Cq=Object.defineProperties,Eq=Object.getOwnPropertyDescriptors,Iq=Object.getOwnPropertySymbols,Dq=Object.prototype.hasOwnProperty,Pq=Object.prototype.propertyIsEnumerable,Rq=(e,t,r)=>t in e?wq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Mq=(e,t)=>{for(var r in t||(t={}))Dq.call(t,r)&&Rq(e,r,t[r]);if(Iq)for(var r of Iq(t))Pq.call(t,r)&&Rq(e,r,t[r]);return e},Lq=(e,t)=>Cq(e,Eq(t));function Aq(e,t,r){if(t===r)return e;const n=e.slice();return n.splice(r,0,n.splice(t,1)[0]),n}function kq(e){return"initialIndex"in e&&"number"==typeof e.initialIndex&&"index"in e&&"number"==typeof e.index}function Oq(e,t){return function(e,t,r){var n,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 n=e.findIndex(e=>u(e,a.id)),i=e.findIndex(e=>u(e,s.id));if(-1===n||-1===i){if(kq(a)){const n=a.initialIndex,i=a.index;return n===i||n<0||n>=e.length?("preventDefault"in t&&t.preventDefault(),e):r(e,n,i)}return e}if(!l&&"index"in a&&"number"==typeof a.index){const t=a.index;if(t!==n)return r(e,n,t)}return r(e,n,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&&kq(a)){const n=a.initialGroup,i=a.initialIndex,o=a.group,s=a.index;if(null==n||null==o||!(n in e)||!(o in e))return"preventDefault"in t&&t.preventDefault(),e;if(n===o&&i===s)return"preventDefault"in t&&t.preventDefault(),e;if(n===o)return Lq(Mq({},e),{[n]:r(e[n],i,s)});const l=e[n][i];return Lq(Mq({},e),{[n]:[...e[n].slice(0,i),...e[n].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==(n=m.shape)?void 0:n.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&&kq(a)){const t=null!=a.group&&a.group!==d,n=a.index!==f;if(t||n){const t=null!=(o=a.group)?o:d;if(t in e){if(d===t)return Lq(Mq({},e),{[d]:r(e[d],f,a.index)});const n=e[d][f];return Lq(Mq({},e),{[d]:[...e[d].slice(0,f),...e[d].slice(f+1)],[t]:[...e[t].slice(0,a.index),n,...e[t].slice(a.index)]})}}}return"preventDefault"in t&&t.preventDefault(),e}if(d===p)return Lq(Mq({},e),{[d]:r(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 Lq(Mq({},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,Aq)}var qq="__default__";function Tq(e,t,r,n){const i=n<t?"afterend":"beforebegin";r.insertAdjacentElement(i,e)}function Nq(e,t){return e.index-t.index}function _q(e){return Array.from(e).sort(Nq)}var jq,Fq,zq,Wq,$q,Hq,Vq,Bq,Gq=[Sq,class extends jD{constructor(e){super(e);const t=()=>{const t=new Map;for(const r of e.registry.droppables)if(r instanceof Jq){const{sortable:e}=r,{group:n}=e;let i=t.get(n);i||(i=new Set,t.set(n,i)),i.add(e)}for(const[e,r]of t)t.set(e,new Set(_q(r)));return t},r=[e.monitor.addEventListener("dragover",(e,r)=>{if(this.disabled)return;const{dragOperation:n}=r,{source:i,target:o}=n;if(!xq(i)||!xq(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||r.renderer.rendering.then(()=>{var n,c,d;const p=t();for(const[e,t]of a.entries()){const r=Array.from(t).entries();for(const[t,i]of r)if(i.index!==t||i.group!==e||!(null==(n=p.get(e))?void 0:n.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=_q(l),g=s?m:_q(u),v=null!=(c=i.sortable.group)?c:qq,y=null!=(d=o.sortable.group)?d:qq,b={[v]:m,[y]:g},x=Oq(b,e);if(b===x)return;const S=x[y].indexOf(i.sortable),w=x[y].indexOf(o.sortable);r.collisionObserver.disable(),Tq(f,S,h,w),uE(()=>{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}),r.actions.setDropTarget(i.id).then(()=>r.collisionObserver.enable())})})}),e.monitor.addEventListener("dragend",(e,r)=>{if(!e.canceled)return;const{dragOperation:n}=r,{source:i}=n;xq(i)&&(i.sortable.initialIndex===i.sortable.index&&i.sortable.initialGroup===i.sortable.group||queueMicrotask(()=>{const e=t(),n=e.get(i.sortable.initialGroup);n&&r.renderer.rendering.then(()=>{for(const[t,r]of e.entries()){const e=Array.from(r).entries();for(const[r,n]of e)if(n.index!==r||n.group!==t)return}const t=_q(n),r=i.sortable.element,o=t[i.sortable.initialIndex],a=null==o?void 0:o.element;o&&a&&r&&(Tq(r,o.index,a,i.index),uE(()=>{for(const[t,r]of e.entries()){const e=Array.from(r).values();for(const t of e)t.index=t.initialIndex,t.group=t.initialGroup}}))})}))})];this.destroy=()=>{for(const e of r)e()}}}],Uq={duration:250,easing:"cubic-bezier(0.25, 1, 0.5, 1)",idle:!1},Yq=new class{constructor(){yI(this,PI,new WeakMap)}get(e,t){var r;return e?null==(r=vI(this,PI).get(e))?void 0:r.get(t):void 0}set(e,t,r){var n;if(e)return vI(this,PI).has(e)||vI(this,PI).set(e,new Map),null==(n=vI(this,PI).get(e))?void 0:n.set(t,r)}clear(e){var t;return e?null==(t=vI(this,PI).get(e))?void 0:t.clear():void 0}};Fq=[CI],jq=[CI];var Kq=class{constructor(e,t){yq(this,Wq,hq(zq,8,this)),hq(zq,11,this),yq(this,$q),yq(this,Hq),yq(this,Vq,hq(zq,12,this)),hq(zq,15,this),yq(this,Bq),this.register=()=>(uE(()=>{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=()=>{uE(()=>{var e,t;null==(e=this.manager)||e.registry.unregister(this.droppable),null==(t=this.manager)||t.registry.unregister(this.draggable)})},this.destroy=()=>{uE(()=>{this.droppable.destroy(),this.draggable.destroy()})};var r=e,{effects:n=()=>[],group:i,index:o,sensors:a,type:s,transition:l=Uq,plugins:u=Gq}=r,c=((e,t)=>{var r={};for(var n in e)oq.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&iq)for(var n of iq(e))t.indexOf(n)<0&&aq.call(e,n)&&(r[n]=e[n]);return r})(r,["effects","group","index","sensors","type","transition","plugins"]);this.droppable=new Jq(c,t,this),this.draggable=new Xq(cq(uq({},c),{effects:()=>[()=>{var e,t,r;const n=null==(e=this.manager)?void 0:e.dragOperation.status;(null==n?void 0:n.initializing)&&this.id===(null==(r=null==(t=this.manager)?void 0:t.dragOperation.source)?void 0:r.id)&&Yq.clear(this.manager),(null==n?void 0:n.dragging)&&Yq.set(this.manager,this.id,dE(()=>({initialIndex:this.index,initialGroup:this.group})))},()=>{const{index:e,group:t,manager:r}=this,n=vq(this,Hq),i=vq(this,$q);e===n&&t===i||(bq(this,Hq,e),bq(this,$q,t),this.animate())},()=>{const{target:e}=this,{feedback:t,isDragSource:r}=this.draggable;"move"==t&&r&&(this.droppable.disabled=!e)},()=>{const{manager:e}=this;for(const t of u)null==e||e.registry.register(t)},...n()],type:s,sensors:a}),t,this),bq(this,Bq,c.element),this.manager=t,this.index=o,bq(this,Hq,o),this.group=i,bq(this,$q,i),this.type=s,this.transition=l}get initialIndex(){var e,t;return null!=(t=null==(e=Yq.get(this.manager,this.id))?void 0:e.initialIndex)?t:this.index}get initialGroup(){var e,t;return null!=(t=null==(e=Yq.get(this.manager,this.id))?void 0:e.initialGroup)?t:this.group}animate(){dE(()=>{const{manager:e,transition:t}=this,{shape:r}=this.droppable;if(!e)return;const{idle:n}=e.dragOperation.status;r&&t&&(!n||t.idle)&&e.renderer.rendering.then(()=>{const{element:n}=this;if(!n)return;const i=this.refreshShape();if(!i)return;const o=r.boundingRectangle.left-i.boundingRectangle.left,a=r.boundingRectangle.top-i.boundingRectangle.top,{translate:s}=TM(n),l=KM(n,s,!1),u=KM(n,s);if(o||a){const r=UR(OR(n))?cq(uq({},t),{duration:0}):t;YM({element:n,keyframes:{translate:[`${l.x+o}px ${l.y+a}px ${l.z}`,`${u.x}px ${u.y}px ${u.z}`]},options:r}).then(()=>{e.dragOperation.status.dragging||(this.droppable.shape=void 0)})}})})}get manager(){return this.draggable.manager}set manager(e){uE(()=>{this.draggable.manager=e,this.droppable.manager=e})}set element(e){uE(()=>{const t=vq(this,Bq),r=this.droppable.element,n=this.draggable.element;r&&r!==t||(this.droppable.element=e),n&&n!==t||(this.draggable.element=e),bq(this,Bq,e)})}get element(){var e,t;const r=vq(this,Bq);if(r)return null!=(t=null!=(e=JR.get(r))?e:r)?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){uE(()=>{this.droppable.disabled=e,this.draggable.disabled=e})}set data(e){uE(()=>{this.droppable.data=e,this.draggable.data=e})}set handle(e){this.draggable.handle=e}set id(e){uE(()=>{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:sL}set alignment(e){this.draggable.alignment=e}get alignment(){return this.draggable.alignment}set type(e){uE(()=>{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)}};zq=[,,,QO(null)],Wq=new WeakMap,$q=new WeakMap,Hq=new WeakMap,Vq=new WeakMap,Bq=new WeakMap,mq(zq,4,"index",Fq,Kq,Wq),mq(zq,4,"group",jq,Kq,Vq),((e,t)=>{return lq(t,(r="metadata",(n=Symbol[r])?n:Symbol.for("Symbol."+r)),e[3]);var r,n})(zq,Kq);var Xq=class extends Fk{constructor(e,t,r){super(e,t),this.sortable=r}get index(){return this.sortable.index}get initialIndex(){return this.sortable.initialIndex}get group(){return this.sortable.group}get initialGroup(){return this.sortable.initialGroup}},Jq=class extends zk{constructor(e,t,r){super(e,t),this.sortable=r}get index(){return this.sortable.index}get group(){return this.sortable.group}},Zq=Object.defineProperty,Qq=Object.defineProperties,eT=Object.getOwnPropertyDescriptors,tT=Object.getOwnPropertySymbols,rT=Object.prototype.hasOwnProperty,nT=Object.prototype.propertyIsEnumerable,iT=(e,t,r)=>t in e?Zq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,oT=(e,t)=>{for(var r in t||(t={}))rT.call(t,r)&&iT(e,r,t[r]);if(tT)for(var r of tT(t))nT.call(t,r)&&iT(e,r,t[r]);return e};function aT(e){const{accept:t,collisionDetector:r,collisionPriority:n,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=oT(oT({},Uq),e.transition),y=uO(t=>new Kq(((e,t)=>Qq(e,eT(t)))(oT({},e),{transition:v,register:!1,handle:Wk(s),element:Wk(a),target:Wk(m),feedback:d}),t)),b=Bk(y,sT);return Yk(i,()=>y.id=i),$k(()=>{uE(()=>{y.group=u,y.index=l})},[y,u,l]),Yk(g,()=>y.type=g),Yk(t,()=>y.accept=t,void 0,wI),Yk(o,()=>o&&(y.data=o)),Yk(l,()=>{var e;(null==(e=y.manager)?void 0:e.dragOperation.status.idle)&&(null==v?void 0:v.idle)&&y.refreshShape()},Gk),Kk(s,e=>y.handle=e),Kk(a,e=>y.element=e),Kk(m,e=>y.target=e),Yk(c,()=>y.disabled=!0===c),Yk(h,()=>y.sensors=h),Yk(r,()=>y.collisionDetector=r),Yk(n,()=>y.collisionPriority=n),Yk(d,()=>y.feedback=null!=d?d:"default"),Yk(v,()=>y.transition=v,void 0,wI),Yk(p,()=>y.modifiers=p,void 0,wI),Yk(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,r;(e||!(null==(t=y.element)?void 0:t.isConnected)||(null==(r=y.manager)?void 0:r.dragOperation.status.idle))&&(y.element=null!=e?e:void 0)},[y]),sourceRef:f(e=>{var t,r;(e||!(null==(t=y.source)?void 0:t.isConnected)||(null==(r=y.manager)?void 0:r.dragOperation.status.idle))&&(y.source=null!=e?e:void 0)},[y]),targetRef:f(e=>{var t,r;(e||!(null==(t=y.target)?void 0:t.isConnected)||(null==(r=y.manager)?void 0:r.dragOperation.status.idle))&&(y.target=null!=e?e:void 0)},[y])}}function sT(e,t,r){return!("isDragSource"!==e||r||!t)}const lT=({id:e,itemIndex:t,sectionIndex:r})=>io.jsx("div",{children:`${r}:${t} - ${e}`}),uT=({id:e,itemIndex:t,sectionIndex:r})=>{const n=Dw(QC),i=Dw(XC),o=Dw(BC).at(r)??0,a=Dw(GC)({sectionIndex:r}),{ref:s,isDragging:l,handleRef:u}=aT({id:e,index:t,type:"item",accept:"item",group:a,modifiers:[JO],plugins:[Sq],data:{id:e,sectionIndex:r,sectionKey:a,itemIndex:t}}),c=void 0!==n?()=>{n({id:e,itemIndex:t,sectionIndex:r})}:void 0,d=i??lT;return io.jsx(Nd,{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:io.jsxs("div",{style:{width:"100%",opacity:l?.4:1},children:[io.jsx(NO,{isDragging:l,itemIndex:t,sectionIndex:r}),io.jsx(d,{id:e,itemIndex:t,sectionIndex:r,dragHandleRef:u}),t===o-1&&io.jsx(NO,{isDragging:l,itemIndex:t+1,sectionIndex:r})]})})},cT=r.memo(uT),dT=r.memo(({sectionIndex:e})=>{const t=Dw(GC),r=Dw(BC).at(e)??0,n=t({sectionIndex:e});return io.jsxs(Qu,{className:"exploration-list",style:{overflow:"auto"},children:[io.jsx(Uc,{}),io.jsx(FO,{id:n,sectionIndex:e}),io.jsx(Uc,{}),io.jsx(jO,{sectionIndex:e}),io.jsx(Ed,{sx:{padding:"2px 8px"},children:OO(r).map(r=>{const n=t({sectionIndex:e,itemIndex:r});return io.jsx(cT,{id:n,itemIndex:r,sectionIndex:e},n)})})]},n)}),pT=[hk.configure({activationConstraints:[new ck.Distance({value:5})]}),ak],fT=r.memo(()=>{const e=Dw(VC),t=Dw(GC),r=Pw(nE("start")),n=Pw(nE("over")),i=Pw(nE("end"));return io.jsxs(sO,{sensors:pT,onDragEnd:i,onDragOver:n,onDragStart:r,children:[io.jsx(Qu,{style:{display:"flex",flexDirection:"column"},children:OO(e).map(e=>io.jsx(dT,{sectionIndex:e},t({sectionIndex:e})))}),io.jsx(TO,{})]})}),hT=r.memo(e=>io.jsx(RC,{atoms:iE,atomFamilies:oE,children:io.jsx(aE,{props:e,children:io.jsx(fT,{})})})),mT="12px",gT="nebula-table-utils-head-menu-button",vT="sn-copy-cell";let yT=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 bT="nebula-table-utils-column-adjuster";let xT=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}({}),ST=function(e){return e.Auto="auto",e.FitToContent="fitToContent",e.Pixels="pixels",e.Percentage="percentage",e}({});const wT={darker:.15,brighter:.3,opacity:.03},CT={darker:.3,brighter:.5,opacity:.05};let ET=function(e){return e.Cyclic="C",e}({});const IT=(e,t)=>{const r=new Map;for(const t of e)r.set(t.id,t);return t.reduce((e,t)=>{const n=r.get(t);return n&&e.push(n),e},[])},DT=WC(e=>hw(t=>{const r=t(eC),n=t($w),i=t(Jw)?.[e],o=r?.qHyperCube.rankedList?.[e];return i||(n?.isRankedListCorrupt(e)||void 0===o?n?.createRankedList(e):o)})),PT=(e,t=new Set)=>hw(r=>{const n=r(e),i=r(hC);if(!n||0===n.length)return"disabled";const o=n.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"}),RT=(e,t=new Set)=>hw(null,(r,n,i)=>{const o=r(e);o&&0!==o.length&&(e=>{const{items:t,shouldCheckAll:r,get:n,set:i,excludedIds:o}=e,a=t.filter(e=>!o?.has(e.id));if(0===a.length)return;const s=n(hC),l=new Set,u=new Set;if(a.forEach(e=>{const t=s.has(e.id);t&&!r&&u.add(e.id),!t&&r&&l.add(e.id)}),0===l.size&&0===u.size)return;const c=new Set(n(cC)),d=new Set(n(dC));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(cC,c),i(dC,d),zw({type:"apply",localChecked:l,localUnchecked:u,handler:n($w),model:n(Ww),fieldInfo:n(oC),handlerQueue:n(sC)})})({items:o,shouldCheckAll:i,get:r,set:n,excludedIds:t})}),MT=hw(e=>{const t=e(tC);return t?.qHyperCube.qDimensionInfo.filter(Uw).map(({cId:e,qFallbackTitle:t})=>({id:e,title:t??"",alternative:!0}))}),LT=hw(e=>{const t=e(eC),r=e(Vw),n=t?.qHyperCube.qEffectiveInterColumnSortOrder.map(e=>{if(-1===e)return{id:-1,title:r("Common.Values")};const{cId:n,qFallbackTitle:i}=t.qHyperCube.qDimensionInfo[e];return{id:n,title:i??""}});return n}),AT=hw(e=>{const t=e(Vw),r=e(MT),n=e(Gw),i=e(DT("columns")),o=e(DT("rows")),a=e(LT);if(void 0===r||void 0===i||void 0===o||void 0===a)return[];const s=[...a,...r].filter(n);return[{id:"rows",title:t("Common.Rows"),items:IT(s,o)},{id:"columns",title:t("Common.Columns"),items:IT(s,i)}]}),kT=WC(e=>hw(t=>t(AT).at(e))),OT=WC(({sectionIndex:e,itemIndex:t})=>hw(r=>r(kT(e))?.items.at(t)?.title),(e,t)=>e.sectionIndex===t.sectionIndex&&e.itemIndex===t.itemIndex),qT=WC(e=>hw(t=>t(kT(e))?.title)),TT=hw(e=>({sectionIndex:t,itemIndex:r})=>{const n=e(kT(t));return void 0===n?0===t?"rows":"columns":void 0===r?n.id:n.items.at(r)?.id??`missing-item-${t}-${r}`}),NT=hw(e=>e(AT).map(e=>e.items.length)),_T=WC(e=>PT(hw(t=>t(kT(e))?.items),new Set([-1]))),jT=WC(e=>RT(hw(t=>t(kT(e))?.items),new Set([-1]))),FT=hw(null,async(e,t,{event:r,id:n,toIndex:i,toSection:o,startSection:a})=>{const s=e($w),l=e(Ww),u=e(sC),c=e(DT("rows")),d=e(DT("columns")),p=o;if(void 0===s||void 0===l||void 0===c||void 0===d||null===u)return;if(r.operation.canceled)return void t(Jw,null);if("section"===r.operation.target?.type&&a===o)return void t(Jw,null);const f=zC({rows:c,columns:d},r);t(Jw,f),u.add(async()=>{"number"==typeof n?await s.movePseudoDimension({toIndex:i,toSection:p}):await s.moveDimension({cId:n,toIndex:i,toSection:p})})}),zT={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"}},WT="ChartExploration.PivotTable.DimensionSectionEmpty.Message",$T="ChartExploration.PivotTable.MeasureSectionEmpty.Message",HT="#177fe6",VT=(e,t,r,n)=>{if("measure"===t)return e(n?zT.noSearchFound.measure:zT.noItems.measure);const i=n?zT.noSearchFound:zT.noItems;return e(r?i.row:i.column)},BT=(e,t,r)=>r?"":e("measure"===t?$T:WT),GT=WC(e=>hw(t=>{const r=t(Vw),n=t(Bw).length>0;return t=>({title:VT(r,e,0===t,n),message:BT(r,e,n)})})),UT=GT("measure"),YT=GT("dimensions"),KT=({children:e})=>io.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e}),XT=e=>{const t=Dw(OT(e));return io.jsx(KT,{children:t})},JT=hw(e=>{const t=e(tC);return t?.qHyperCube.qMeasureInfo.filter(Uw).map(({cId:e,qFallbackTitle:t})=>({id:e,title:t??""}))}),ZT=hw(e=>{const t=e(eC),r=e(JT),n=e(Gw),i=e(DT("measures"));if(void 0===t||void 0===r||void 0===i)return[];const o=t.qHyperCube.qMeasureInfo.filter(Uw).map(({cId:e,qFallbackTitle:t})=>({id:e,title:t??""}));o.push(...r);const a=o.filter(n);return IT(a,i)}),QT=WC(e=>hw(t=>t(ZT).at(e)?.title??"")),eN=hw(e=>({itemIndex:t})=>{const r=e(ZT);return void 0===t?"measures":r.at(t)?.id??`missing-item-${t}`}),tN=hw(e=>[e(ZT).length]),rN=PT(ZT),nN=RT(ZT),iN=hw(null,async(e,t,{id:r,toIndex:n,event:i})=>{const o=e($w),a=e(Ww),s=e(sC),l=e(DT("measures"));if(void 0===o||void 0===a||void 0===l||"string"!=typeof r||null===s)return;const u=zC({measures:l},i);t(Jw,u),s.add(async()=>{await o.moveMeasure({cId:r,toIndex:n})})}),oN=kS().palette,aN={TEXT:oN.text.primary,DISABLED:oN.text.disabled,HOVER:oN.action.hover,WHITE:If.GREYSCALE_100,BORDER_MEDIUM:If.GREYSCALE_85,DARK_MODE_TEXT:If.GREYSCALE_95,DARK_MODE_BORDER:If.GREYSCALE_95,DARK_MODE_DISABLED:If.GREYSCALE_70,TRANSPARENT:"transparent",SELECTED:oN.primary.main,LINK:oN.info.main,ERROR:oN.error.main};function sN(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 lN(e){if("object"==typeof e&&sN(e))return(e.r<<16)+(e.g<<8)+e.b;let t=0,r=0,n=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),r=parseInt(i[2],10),n=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),r=parseInt(i[2],16),n=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),r=parseInt(i[2]+i[2],16),n=parseInt(i[3]+i[3],16))}return(t<<16)+(r<<8)+n}const uN={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}},cN="qcm-color";function dN(...e){const t={type:cN,r:0,g:0,b:0,a:1,invalid:!1,spaces:{}};let r=0,n=0,i=0,o=1;if(null!==(a=e[0])&&"object"==typeof a&&"type"in a&&a.type===cN)({r:r,g:n,b:i,a:o}=e[0]),t.invalid=e[0].invalid,t.spaces={...e[0].spaces};else if(sN(e[0]))({r:r,g:n,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))r=parseInt(s[1],10),n=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))r=parseInt(s[1],10),n=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,r=parseInt(s[2],10),n=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))r=parseInt(s[1],16),n=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))r=parseInt(s[1]+s[1],16),n=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;r=d[0]+p,n=d[1]+p,i=d[2]+p,r=Math.round(255*r),n=Math.round(255*n),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;r=d[0]+p,n=d[1]+p,i=d[2]+p,r=Math.round(255*r),n=Math.round(255*n),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;r=d[0]+p,n=d[1]+p,i=d[2]+p,r=Math.round(255*r),n=Math.round(255*n),i=Math.round(255*i),o=1}else{const e=a.toLowerCase();if(function(e){return e in uN}(e)){const t=uN[e];({r:r,g:n,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,r=(16711680&e[0])>>16,n=(65280&e[0])>>8,i=255&e[0]):"number"==typeof e[0]&&e[0]>=0?(r=(16711680&e[0])>>16,n=(65280&e[0])>>8,i=255&e[0]):t.invalid=!0;else 3===e.length||4===e.length?(r=e[0],n=e[1],i=e[2],o=4===e.length?e[3]:1):t.invalid=!0;var a;return Number.isNaN(+r+n+i+o)&&(t.invalid=!0),t.r=Math.floor(r),t.g=Math.floor(n),t.b=Math.floor(i),t.a=o,t}function pN(e){let t,r,n;if(sN(e))return t=e.r.toString(16),r=e.g.toString(16),n=e.b.toString(16),1===t.length&&(t=`0${t}`),1===r.length&&(r=`0${r}`),1===n.length&&(n=`0${n}`),`#${[t,r,n].join("")}`;const i="string"==typeof e?lN(e):e;return t=((16711680&i)>>16).toString(16),r=((65280&i)>>8).toString(16),n=(255&i).toString(16),1===t.length&&(t=`0${t}`),1===r.length&&(r=`0${r}`),1===n.length&&(n=`0${n}`),`#${t}${r}${n}`}function fN(e){let t,r,n=0;const i="string"==typeof e?dN(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,n=0;else{switch(r=u-c,t=d>.5?r/(2-u-c):r/(u+c),u){case o:n=(a-s)/r+(a<s?6:0);break;case a:n=(s-o)/r+2;break;case s:n=(o-a)/r+4}n/=6}return{h:360*n,s:100*t,l:100*d,a:l}}function hN(e){let t,r,n=0;const i="string"==typeof e?dN(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,n=0;else{switch(r=l-u,t=0===r?0:r/c,l){case o:n=(a-s)/r+(a<s?6:0);break;case a:n=(s-o)/r+2;break;case s:n=(o-a)/r+4}n/=6}return{h:360*n%360,s:100*t,v:100*c}}function mN(e){if(sN(e))return`rgb(${e.r}, ${e.g}, ${e.b})`;const t="string"==typeof e?lN(e):e;return`rgb(${(16711680&t)>>16}, ${(65280&t)>>8}, ${255&t})`}function gN(e,t){return sN(e)?`rgba(${e.r}, ${e.g}, ${e.b}, ${e.a})`:gN(dN(e))}function vN(e){return sN(e)?1===e.a?mN(e):gN(e):vN(dN(e))}const yN=e=>{const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};function bN(e){return.2126*yN(e.r)+.7152*yN(e.g)+.0722*yN(e.b)}function xN(...e){const t=dN(...e),r={type:t.type,r:t.r,g:t.g,b:t.b,a:t.a,invalid:t.invalid,spaces:t.spaces},n=()=>(r.spaces.hslaObject||(r.spaces.hslaObject=fN(r)),r.spaces.hslaObject),i=e=>{const t=n(),{h:r,s:i,l:o,a:a}=t;return`hsla(${r}, ${i}, ${Math.max(0,Math.min(o+e,100))}, ${a})`};return{get type(){return r.type},isInvalid:()=>r.invalid,get r(){return r.r},get g(){return r.g},get b(){return r.b},get a(){return r.a},getR:()=>r.r,getG:()=>r.g,getB:()=>r.b,getAlpha:()=>r.a,setAlpha:e=>{r.a=e,r.spaces={}},isEqualTo:e=>{let t;if("string"==typeof e)t=dN(e);else{if(e.type!==r.type)return!1;t=e}return t.r===r.r&&t.g===r.g&&t.b===r.b&&t.a===r.a},isDark:()=>function(...e){const t=dN(...e);return t.invalid||bN(t)<.4}(r),getRGB:()=>(r.spaces.rgb||(r.spaces.rgb=mN(r)),r.spaces.rgb),getRGBA:()=>(r.spaces.rgba||(r.spaces.rgba=gN(r)),r.spaces.rgba),getString:()=>(r.spaces.string||(r.spaces.string=vN(r)),r.spaces.string),getHex:()=>(r.spaces.hex||(r.spaces.hex=pN(r)),r.spaces.hex),getHSL:()=>(r.spaces.hsl||(r.spaces.hsl=function(e){let t,r,n=0;const i="string"==typeof e?dN(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,n=0;else{switch(r=l-u,t=c>.5?r/(2-l-u):r/(l+u),l){case o:n=(a-s)/r+(a<s?6:0);break;case a:n=(s-o)/r+2;break;case s:n=(o-a)/r+4}n/=6}return`hsl(${360*n}, ${100*t}, ${100*c})`}(r)),r.spaces.hsl),getHSLA:()=>(r.spaces.hsla||(r.spaces.hsla=function(e){const{h:t,s:r,l:n,a:i}=fN(e);return`hsla(${t}, ${r}, ${n}, ${i})`}(r)),r.spaces.hsla),getHSLAObject:n,getShiftedHSLA:i,getHSV:()=>(r.spaces.hsv||(r.spaces.hsv=function(e){const{h:t,s:r,v:n}=hN(e);return`hsv(${t}, ${r}, ${n})`}(r)),r.spaces.hsv),getHSVObject:()=>(r.spaces.hsvObject||(r.spaces.hsvObject=hN(r)),r.spaces.hsvObject),blend:(e,t)=>`rgba(${Math.floor(r.r+(e.r-r.r)*t)}, ${Math.floor(r.g+(e.g-r.g)*t)}, ${Math.floor(r.b+(e.b-r.b)*t)}, ${Math.floor(r.a+(e.getAlpha()-r.a)*t)})`,getBrightenedColor:(e=1)=>xN(i(18*e)),getDarkenedColor:(e=1)=>xN(i(18*-e))}}function SN(e,t){if(!e||!t)return;const r=bN(e),n=bN(t);return r>n?(r+.05)/(n+.05):(n+.05)/(r+.05)}const wN="#FFFFFF";function CN(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;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:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var EN,IN="top",DN="top-right",PN="right",RN="bottom-right",MN="bottom",LN="bottom-left",AN="left",kN="top-left";CN(CN(CN(CN(CN(CN(CN(CN(CN(CN(EN={},"equal-equal",[IN,MN]),"equal-higher",[MN,RN]),"equal-lower",[IN,DN]),"equal-void",[IN,MN]),"higher-equal",[AN,LN,IN,DN]),"higher-higher-acute",[MN,LN,AN,DN]),"higher-higher-obtuse",[MN,IN]),"higher-lower-negative",[IN,DN,PN]),"higher-lower-positive",[MN,LN,AN]),"higher-void",[IN]),CN(CN(CN(CN(CN(CN(CN(CN(CN(CN(EN,"lower-equal",[IN]),"lower-higher-negative",[IN,kN]),"lower-higher-positive",[RN]),"lower-lower-acute",[IN,kN,AN,DN,PN]),"lower-lower-obtuse",[IN,MN]),"lower-void",[IN]),"void-equal",[IN]),"void-higher",[IN,MN]),"void-lower",[IN,MN,AN]),"void-void",[IN]),CN(EN,"unclassified",[IN,MN,PN,AN,DN,RN,LN,kN]);var ON,qN,TN=["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"],NN=["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 _N(e){return null!=e&&e.isEnabled("PS_20852_WYSIWYG_FONT_SUPPORT")?NN:TN}var jN=function(){if(qN)return ON;qN=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},o=function(r){if(!r||"[object Object]"!==t.call(r))return!1;var n,i=e.call(r,"constructor"),o=r.constructor&&r.constructor.prototype&&e.call(r.constructor.prototype,"isPrototypeOf");if(r.constructor&&!i&&!o)return!1;for(n in r);return void 0===n||e.call(r,n)},a=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},s=function(t,r){if("__proto__"===r){if(!e.call(t,r))return;if(n)return n(t,r).value}return t[r]};return ON=function e(){var t,r,n,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(r in t)n=s(d,r),d!==(l=s(t,r))&&(h&&l&&(o(l)||(u=i(l)))?(u?(u=!1,c=n&&i(n)?n:[]):c=n&&o(n)?n:{},a(d,{name:r,newValue:e(h,c,l)})):void 0!==l&&a(d,{name:r,newValue:l}));return d},ON}();function FN(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function zN(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function WN(){}!function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")&&e.default}(jN);var $N=.7,HN=1/$N,VN="\\s*([+-]?\\d+)\\s*",BN="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",GN="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",UN=/^#([0-9a-f]{3,8})$/,YN=new RegExp(`^rgb\\(${VN},${VN},${VN}\\)$`),KN=new RegExp(`^rgb\\(${GN},${GN},${GN}\\)$`),XN=new RegExp(`^rgba\\(${VN},${VN},${VN},${BN}\\)$`),JN=new RegExp(`^rgba\\(${GN},${GN},${GN},${BN}\\)$`),ZN=new RegExp(`^hsl\\(${BN},${GN},${GN}\\)$`),QN=new RegExp(`^hsla\\(${BN},${GN},${GN},${BN}\\)$`),e_={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 t_(){return this.rgb().formatHex()}function r_(){return this.rgb().formatRgb()}function n_(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=UN.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?i_(t):3===r?new l_(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?o_(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?o_(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=YN.exec(e))?new l_(t[1],t[2],t[3],1):(t=KN.exec(e))?new l_(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=XN.exec(e))?o_(t[1],t[2],t[3],t[4]):(t=JN.exec(e))?o_(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=ZN.exec(e))?h_(t[1],t[2]/100,t[3]/100,1):(t=QN.exec(e))?h_(t[1],t[2]/100,t[3]/100,t[4]):e_.hasOwnProperty(e)?i_(e_[e]):"transparent"===e?new l_(NaN,NaN,NaN,0):null}function i_(e){return new l_(e>>16&255,e>>8&255,255&e,1)}function o_(e,t,r,n){return n<=0&&(e=t=r=NaN),new l_(e,t,r,n)}function a_(e){return e instanceof WN||(e=n_(e)),e?new l_((e=e.rgb()).r,e.g,e.b,e.opacity):new l_}function s_(e,t,r,n){return 1===arguments.length?a_(e):new l_(e,t,r,null==n?1:n)}function l_(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function u_(){return`#${f_(this.r)}${f_(this.g)}${f_(this.b)}`}function c_(){const e=d_(this.opacity);return`${1===e?"rgb(":"rgba("}${p_(this.r)}, ${p_(this.g)}, ${p_(this.b)}${1===e?")":`, ${e})`}`}function d_(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function p_(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function f_(e){return((e=p_(e))<16?"0":"")+e.toString(16)}function h_(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new g_(e,t,r,n)}function m_(e){if(e instanceof g_)return new g_(e.h,e.s,e.l,e.opacity);if(e instanceof WN||(e=n_(e)),!e)return new g_;if(e instanceof g_)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(r-n)/s+6*(r<n):r===o?(n-t)/s+2:(t-r)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new g_(a,s,l,e.opacity)}function g_(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function v_(e){return(e=(e||0)%360)<0?e+360:e}function y_(e){return Math.max(0,Math.min(1,e||0))}function b_(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}FN(WN,n_,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:t_,formatHex:t_,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return m_(this).formatHsl()},formatRgb:r_,toString:r_}),FN(l_,s_,zN(WN,{brighter(e){return e=null==e?HN:Math.pow(HN,e),new l_(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?$N:Math.pow($N,e),new l_(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new l_(p_(this.r),p_(this.g),p_(this.b),d_(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:u_,formatHex:u_,formatHex8:function(){return`#${f_(this.r)}${f_(this.g)}${f_(this.b)}${f_(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:c_,toString:c_})),FN(g_,function(e,t,r,n){return 1===arguments.length?m_(e):new g_(e,t,r,null==n?1:n)},zN(WN,{brighter(e){return e=null==e?HN:Math.pow(HN,e),new g_(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?$N:Math.pow($N,e),new g_(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,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new l_(b_(e>=240?e-240:e+120,i,n),b_(e,i,n),b_(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new g_(v_(this.h),y_(this.s),y_(this.l),d_(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=d_(this.opacity);return`${1===e?"hsl(":"hsla("}${v_(this.h)}, ${100*y_(this.s)}%, ${100*y_(this.l)}%${1===e?")":`, ${e})`}`}}));const x_=Math.PI/180,S_=180/Math.PI,w_=.96422,C_=.82521,E_=4/29,I_=6/29,D_=3*I_*I_,P_=I_*I_*I_;function R_(e){if(e instanceof M_)return new M_(e.l,e.a,e.b,e.opacity);if(e instanceof q_)return T_(e);e instanceof l_||(e=a_(e));var t,r,n=O_(e.r),i=O_(e.g),o=O_(e.b),a=L_((.2225045*n+.7168786*i+.0606169*o)/1);return n===i&&i===o?t=r=a:(t=L_((.4360747*n+.3850649*i+.1430804*o)/w_),r=L_((.0139322*n+.0971045*i+.7141733*o)/C_)),new M_(116*a-16,500*(t-a),200*(a-r),e.opacity)}function M_(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function L_(e){return e>P_?Math.pow(e,1/3):e/D_+E_}function A_(e){return e>I_?e*e*e:D_*(e-E_)}function k_(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function O_(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function q_(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}function T_(e){if(isNaN(e.h))return new M_(e.l,0,0,e.opacity);var t=e.h*x_;return new M_(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}FN(M_,function(e,t,r,n){return 1===arguments.length?R_(e):new M_(e,t,r,null==n?1:n)},zN(WN,{brighter(e){return new M_(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new M_(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,r=isNaN(this.b)?e:e-this.b/200;return new l_(k_(3.1338561*(t=w_*A_(t))-1.6168667*(e=1*A_(e))-.4906146*(r=C_*A_(r))),k_(-.9787684*t+1.9161415*e+.033454*r),k_(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}})),FN(q_,function(e,t,r,n){return 1===arguments.length?function(e){if(e instanceof q_)return new q_(e.h,e.c,e.l,e.opacity);if(e instanceof M_||(e=R_(e)),0===e.a&&0===e.b)return new q_(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*S_;return new q_(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new q_(e,t,r,null==n?1:n)},zN(WN,{brighter(e){return new q_(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new q_(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return T_(this).rgb()}}));var N_=e=>()=>e;function __(e,t){var r=t-e;return r?function(e,t){return function(r){return e+r*t}}(e,r):N_(isNaN(e)?t:e)}!function e(t){var r=function(e){return 1===(e=+e)?__:function(t,r){return r-t?function(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}(t,r,e):N_(isNaN(t)?r:t)}}(t);function n(e,t){var n=r((e=s_(e)).r,(t=s_(t)).r),i=r(e.g,t.g),o=r(e.b,t.b),a=__(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return n.gamma=e,n}(1);var j_="center",F_="bottom";[{key:"NoDataExist",alignment:j_,condition:function(e){var t=e.layoutService;if(!t)return!1;var r=t.meta.size;return r.x*r.y===0}},{key:"OnlyNanDataMeasure",translationKey:"OnlyNanData",alignment:j_,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:j_,condition:function(e){var t=e.layoutService;if(!t)return!1;if(!t.meta.isContinuous)return!1;var r=t.getHyperCubeValue("qDimensionInfo.0");return r&&(r.qMax<r.qMin||"NaN"===r.qMax)}},{key:"OnlyNegativeOrZeroValues",alignment:j_},{key:"DataRangeIncludingZero",alignment:F_},{key:"LimitedData",alignment:F_},{key:"NegativeOrZeroValues",alignment:F_}].reduce(function(e,t){return e[t.key]=t,e},{});var z_,W_=["__proto__","constructor"];function $_(e,t,r){if(void 0!==e&&void 0!==t){var n=t.split("."),i=n[n.length-1];if(!W_.some(function(e){return n.includes(e)})){for(var o=e,a=0;a<n.length-1;++a){var s=n[a];void 0===o[s]&&(o[s]=Number.isNaN(+n[a+1])?{}:[]),o=o[s]}void 0!==r?o[i]=r:delete o[i]}}}function H_(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return e},r=function(){var e={};return{get:function(t){return e[t]},set:function(t,r){return e[t]=r,r},has:function(t){return t in e},remove:function(t){delete e[t]},empty:function(){e={}}}}();return function(n){var i=t(n);return r.has(i)?r.get(i):r.set(i,e(n))}}function V_(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return function(){for(var n=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(n,o)},r)}}function B_(e){var t=0,r=e.children,n=r&&r.length;if(n)for(;--n>=0;)t+=r[n].value;else t=1;e.value=t}function G_(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=Y_)):void 0===t&&(t=U_);for(var r,n,i,o,a,s=new J_(e),l=[s];r=l.pop();)if((i=t(r.data))&&(a=(i=Array.from(i)).length))for(r.children=i,o=a-1;o>=0;--o)l.push(n=i[o]=new J_(i[o])),n.parent=r,n.depth=r.depth+1;return s.eachBefore(X_)}function U_(e){return e.children}function Y_(e){return Array.isArray(e)?e[1]:null}function K_(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function X_(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function J_(e){this.data=e,this.depth=this.height=0,this.parent=null}J_.prototype=G_.prototype={constructor:J_,count:function(){return this.eachAfter(B_)},each:function(e,t){let r=-1;for(const n of this)e.call(t,n,++r,this);return this},eachAfter:function(e,t){for(var r,n,i,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),r=o.children)for(n=0,i=r.length;n<i;++n)a.push(r[n]);for(;o=s.pop();)e.call(t,o,++l,this);return this},eachBefore:function(e,t){for(var r,n,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),r=i.children)for(n=r.length-1;n>=0;--n)o.push(r[n]);return this},find:function(e,t){let r=-1;for(const n of this)if(e.call(t,n,++r,this))return n},sum:function(e){return this.eachAfter(function(t){for(var r=+e(t.data)||0,n=t.children,i=n&&n.length;--i>=0;)r+=n[i].value;t.value=r})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(e){for(var t=this,r=function(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),i=null;for(e=r.pop(),t=n.pop();e===t;)i=e,e=r.pop(),t=n.pop();return i}(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var i=n.length;e!==r;)n.splice(i,0,e),e=e.parent;return n},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(r){r!==e&&t.push({source:r.parent,target:r})}),t},copy:function(){return G_(this).eachBefore(K_)},[Symbol.iterator]:function*(){var e,t,r,n,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(r=0,n=t.length;r<n;++r)o.push(t[r])}while(o.length)}},z_=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 r,n,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(r=(t="-"===(e=e.substring(f,b)).charAt(0)?-t:+t)<0?t=-t:0,i=(n=e.match(/[^\d\-\+#]/g))&&n[n.length-1]||".",o=n&&n[1]&&n[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"!==(n=t.join(""))&&""!==n||(r=!1),h+(r?"-":"")+n+x}},q_({exports:{}});const G_=(e,t=oN.TEXT,r=oN.WHITE)=>{const n=bN(e??""),i=bN(t),o=bN(r);return n.isInvalid()?t:function(e,t,r){const n=xN(e,t),i=xN(e,r);if(void 0!==n&&void 0!==i)return n>i?t:r}(n,o,i).getRGB()},U_=e=>{const t=e.getStyle("","","dataColors.selected")||oN.SELECTED,r=function(e,t){const r=bN("#FFFFFF"),n=bN(e),i=bN(t);if(n.isInvalid()||i.isInvalid()||n.getAlpha()<1||i.getAlpha()<1)return t;const o=xN(r,n),a=xN(i,n),s=o>a||o>4.5;return!s&&a>3?i.getHex():s?"#FFFFFF":"#000000"}(t,oN.TEXT);return{background:t,color:r}},Y_=(e,t)=>{const r=bN(e);return 0===r.a?(r.setAlpha(t.opacity),r.getString()):r.isDark()?r.getBrightenedColor(t.brighter).getString():r.getDarkenedColor(t.darker).getString()},K_=e=>{const t=bN(e);return t.isInvalid()?null:1===t.a?t.getRGB():t.getRGBA()},X_=e=>{e.stopPropagation(),e.preventDefault()},J_=e=>{(e instanceof HTMLElement||e instanceof SVGElement)&&e.focus()},Z_=e=>{const{currentTarget:t}=e;if("true"===t.getAttribute("data-dragging"))return!0;const r=t.closest(".exploration-panel");if(!r)return!1;const n=r.getElementsByClassName("section-item-container");return Array.from(n).some(e=>"true"===e.getAttribute("data-dragging"))},Q_=(e,t)=>{const{key:r,currentTarget:n}=e;if(n===t.current&&r===vT.Tab)if(e.preventDefault(),e.shiftKey)((e,t)=>{const{currentTarget:r}=e;if(r!==t.current)return;const n=r.closest('[role="region"]')?.getElementsByTagName("button")[0];n&&J_(n)})(e,t);else{const e=n.parentElement?.getElementsByClassName("exploration-section-header")[0];e&&J_(e)}},ej=(e,t)=>{const{currentTarget:r}=e;if(r!==t.ref.current)return;const n=t.sectionIndex??2;if(0===n)return void((e,t)=>{const{currentTarget:r}=e;if(r!==t.ref.current)return;const n=r.closest(".exploration-panel")?.getElementsByTagName("input")[0];n&&J_(n)})(e,t);const i=r.closest(".exploration-panel")?.getElementsByClassName("exploration-list")[n-1],o=i?.getElementsByClassName("exploration-item-focus").length??0;if(o>0){const e=i?.getElementsByClassName("exploration-draggable-icon")[o-1];e&&J_(e)}},tj=(e,t)=>{const{key:r}=e;switch(r){case vT.Tab:X_(e),e.shiftKey?ej(e,t):((e,t)=>{const{currentTarget:r}=e;if(r!==t.ref.current)return;const n=r.closest(".exploration-list"),i=n?.getElementsByClassName("exploration-item-focus")[0];if(!i){const e=r.closest(".exploration-panel")?.getElementsByClassName("exploration-list")[2].getElementsByClassName("exploration-section-header")[0];return void(e&&J_(e))}J_(i)})(e,t);break;case vT.Down:if(Z_(e))break;e.preventDefault(),((e,t)=>{const{currentTarget:r}=e;if(r!==t.ref.current)return;const n=r.closest(".exploration-panel"),i=n?.getElementsByClassName("exploration-section-header").length??0;let o=null;if(0===i)return;const a=t.sectionIndex??2;o=a+1<i?n?.getElementsByClassName("exploration-section-header")[a+1]:n?.getElementsByClassName("exploration-section-header")[0],o&&J_(o)})(e,t);break;case vT.Up:if(Z_(e))break;e.preventDefault(),((e,t)=>{const{currentTarget:r}=e;if(r!==t.ref.current)return;const n=r.closest(".exploration-panel"),i=n?.getElementsByClassName("exploration-section-header").length??0;let o=null;if(0===i)return;const a=t.sectionIndex??2;o=a-1>=0?n?.getElementsByClassName("exploration-section-header")[a-1]:n?.getElementsByClassName("exploration-section-header")[i-1],o&&J_(o)})(e,t);break;case vT.Enter:case vT.Space:e.preventDefault(),((e,t)=>{const{currentTarget:r}=e;if(e.preventDefault(),r!==t.ref.current)return;const n="all"!==t.checkState;t.toggleAllCheckboxes(n)})(e,t)}},rj=({children:e})=>io.jsx("span",{style:{width:"fit-content",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",fontWeight:"bold"},children:e}),nj=({children:e,sectionIndex:t})=>{const n=Dw(void 0!==t?NT(t):tN),i=Pw(void 0!==t?_T(t):rN),o=r.useRef(null),a={ref:o,toggleAllCheckboxes:i,checkState:n,sectionIndex:t};return io.jsxs(Qu,{ref:o,className:"exploration-section-header",tabIndex:0,onKeyDown:e=>{tj(e,a)},sx:{display:"flex",alignItems:"center",width:"100%",padding:"2px 8px 2px 8px",boxSizing:"border-box",fontSize:"12px","&:focus-visible":{boxShadow:`0 0 0 2px ${$T} inset`}},children:[io.jsx(Ic,{disabled:"disabled"===n,checked:"all"===n,indeterminate:"some"===n,onChange:e=>{i(e.target.checked)},size:"small",style:{flexShrink:0,padding:9}}),io.jsx(rj,{children:e})]})},ij=({sectionIndex:e})=>{const t=Dw(OT(e));return io.jsx(nj,{sectionIndex:e,children:t})},oj=x((e,t)=>io.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:io.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"})})),aj=x((e,t)=>io.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:io.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"})})),sj=fl("div")({position:"absolute",width:"1px",height:"1px",padding:0,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0}),lj=fl(aj)(()=>({padding:"6px 6px",flexShrink:0,cursor:"grab","&:focus-visible":{boxShadow:`0 0 0 2px ${$T} inset`}})),uj=e=>"svg"===e.tagName?"exploration-draggable-icon":e.className,cj=(e,t)=>{const r=e.closest(".exploration-list"),n=r?.nextElementSibling||r?.parentElement?.nextElementSibling;if(null===n||!n){if(t===vT.Tab)return;return r?.closest(".exploration-panel")?.getElementsByClassName("exploration-section-header")[0]}return n.getElementsByClassName("exploration-section-header")[0]},dj=e=>{const{currentTarget:t}=e,r=uj(t);let n=t.closest("li")?.previousElementSibling?.getElementsByClassName(r)[0];if(!n){const e=t.closest(".exploration-list"),i=e?.querySelector(".exploration-section-header");if(i)return i;if(n=((e,t)=>{const r=e.closest(".exploration-list"),n=r?.previousElementSibling;if(null===n||!n)return e.closest(".exploration-panel")?.getElementsByClassName(t)[1];const i=n.getElementsByClassName(t);return i.length>0?i[i.length-1]:void 0})(t,r),!n){const e=t.closest(".exploration-panel")?.getElementsByClassName(r)[1];return e??null}}return n},pj=(e,t)=>{const{currentTarget:r}=e;if(r===t.items.draggableIconRef.current){const e=r.closest("li")?.getElementsByClassName("exploration-item")[0];return void(e&&J_(e))}if(r===t.items.explorationItemRef.current){const e=r.getElementsByClassName("exploration-draggable-icon")[0];return void J_(e)}r===t.items.explorationItemFocusRef.current&&t.toggleCheckedById(t.id)},fj=e=>{const t=e.key===vT.Down?(e=>{const{currentTarget:t,key:r}=e,n=uj(t),i=t.closest("li");let o=i?.nextElementSibling?.getElementsByClassName(n)[0];return o||(o=cj(t,r),o)?o:t.closest(".exploration-panel")?.getElementsByClassName(n)[0]})(e):dj(e);t&&J_(t)},hj=(e,t)=>{const{key:r}=e;switch(r){case vT.Tab:if(e.shiftKey)e.preventDefault(),((e,t)=>{const{currentTarget:r}=e,n=r.closest("ul")?.getElementsByClassName("exploration-item-focus");if(r===t.items.draggableIconRef.current){if(t.itemIndex>=0){const e=n&&n[t.itemIndex];return void(e&&J_(e))}const r=dj(e);r&&J_(r)}if(r===t.items.explorationItemFocusRef.current){const t=r.closest("li")?.previousElementSibling?.getElementsByClassName("exploration-draggable-icon")[0];if(t)return void J_(t);const n=dj(e);n&&J_(n)}})(e,t);else{const r=((e,t)=>{const{currentTarget:r,key:n}=e;if(e.shiftKey)return!0;if(r===t.items.explorationItemRef.current){const e=r.getElementsByClassName("exploration-draggable-icon")[0];return J_(e),!0}if(r===t.items.explorationItemFocusRef.current){const e=r.closest("li")?.getElementsByClassName("exploration-draggable-icon")[0];return e&&J_(e),!0}if(r===t.items.draggableIconRef.current){const e=r.closest("ul")?.getElementsByClassName("exploration-item-focus");if((e?.length||0)-1>t.itemIndex){const r=e&&e[t.itemIndex+1];return r&&J_(r),!0}const i=cj(r,n);if(!i)return!1;J_(i)}return!0})(e,t);r?X_(e):e.stopPropagation()}break;case vT.Down:case vT.Up:if(Z_(e))break;X_(e),fj(e);break;case vT.Enter:if(e.currentTarget===t.items.explorationItemRef.current&&t.dragHandleRef){t.dragHandleRef(e.currentTarget);break}X_(e),pj(e,t);break;case vT.Space:X_(e),pj(e,t)}},mj=({children:e})=>io.jsx("span",{style:{width:"fit-content",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flexGrow:1,paddingLeft:4},children:e}),gj=({icon:e,title:t,dragHandleRef:n,...i})=>{const[o,a]=Rw(hC),s=Dw(Vw),l=r.useRef(null),u=r.useRef(null),c=r.useRef(null),d={id:i.id,itemIndex:i.itemIndex,toggleCheckedById:a,items:{explorationItemRef:l,explorationItemFocusRef:u,draggableIconRef:c},dragHandleRef:n};return r.useEffect(()=>{n&&l.current&&n(l.current)},[n]),io.jsxs(Qu,{ref:l,className:"exploration-item",onClick:e=>{e.stopPropagation(),a(i.id)},onKeyDown:e=>{hj(e,d)},tabIndex:0,style:{display:"flex",alignItems:"center",width:"100%",cursor:"pointer",padding:0,boxSizing:"border-box",fontSize:"12px"},title:t,sx:{"&:hover":{backgroundColor:"action.hover"},"&:focus-visible":{boxShadow:`0 0 0 2px ${$T} inset`}},children:[io.jsxs(Qu,{ref:u,className:"exploration-item-focus",component:"div",tabIndex:0,onKeyDownCapture:e=>{hj(e,d)},sx:{display:"flex",minWidth:0,alignItems:"center",justifyContent:"space-between",flexGrow:1,marginRight:"4px","&:focus-visible":{boxShadow:`0 0 0 2px ${$T} inset`}},children:[io.jsx(Ic,{checked:o.has(i.id),"aria-label":s("ChartExploration.ListItem.Label",t),size:"small",tabIndex:-1,style:{padding:9,flexShrink:0,visibility:-1===i.id?"hidden":"visible"}}),io.jsx(e,{height:"12px",style:{flexShrink:0}}),io.jsx(mj,{children:t})]}),io.jsx(lj,{ref:c,className:"exploration-draggable-icon",tabIndex:0,height:"16px",onClick:e=>{e.stopPropagation()},onKeyDownCapture:e=>{hj(e,d)}})]})},vj=e=>{const t=Dw(kT(e))??"";return io.jsx(gj,{title:t,icon:oj,...e})},yj=()=>{const e=Dw(qT),t=Dw(TT),r=Dw(UT),n=Pw(jT);return io.jsx(fT,{numberOfSections:2,numberOfItemsInSection:t,keyExtractor:e,emptyTexts:r,onDragEnd:n,dragOverlayRenderer:KT,headerRenderer:ij,itemRenderer:vj})},bj=({itemIndex:e})=>{const t=Dw(ZT(e));return io.jsx(YT,{children:t})},xj=()=>{const e=Dw(Vw);return io.jsx(nj,{children:e("Common.Values")})},Sj=x((e,t)=>io.jsxs("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:[io.jsx("path",{d:"M1.5 0a.5.5 0 0 0-.5.5v14a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-6a.5.5 0 0 0-.5-.5H8V.5a.5.5 0 0 0-.5-.5zM2 4V1h5v7.293l-5 5V9h2V8H2V5h2V4zm.707 10 5-5H15v5h-3v-2h-1v2H8v-2H7v2z"}),io.jsx("path",{d:"M1.5 0a.5.5 0 0 0-.5.5v14a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-6a.5.5 0 0 0-.5-.5H8V.5a.5.5 0 0 0-.5-.5zM2 4V1h5v7.293l-5 5V9h2V8H2V5h2V4zm.707 10 5-5H15v5h-3v-2h-1v2H8v-2H7v2z"})]})),wj=e=>{const{itemIndex:t}=e,r=Dw(ZT(t));return io.jsx(gj,{title:r,icon:Sj,...e})},Cj=()=>{const e=Dw(QT),t=Dw(eN),r=Dw(GT),n=Pw(nN);return io.jsx(Qu,{className:"exploration-header-section",style:{height:"100%",display:"flex",flexDirection:"column-reverse"},children:io.jsx(fT,{numberOfSections:1,numberOfItemsInSection:t,keyExtractor:e,emptyTexts:r,onDragEnd:n,dragOverlayRenderer:bj,headerRenderer:xj,itemRenderer:wj})})},Ej=x((e,t)=>io.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:io.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"})})),Ij=()=>{const[e,t]=Rw(Bw),n=Dw(Vw),i=r.useRef(null),[o]=Dw(eN),[a=0,s=0]=Dw(TT),l=f(e=>{t(e.target.value)},[t]),u=0===e.length||0===a&&0===s&&0===o?n("Common.Search.NoResultsAvailable"):n("ChartExploration.Pivot.Search.ResultsFound",a.toString(),s.toString(),o.toString());return io.jsxs(Qu,{ref:i,onKeyDown:e=>{Q_(e,i)},style:{position:"sticky",top:0,zIndex:10,width:"calc(100% - 16px)",backgroundColor:"var(--sprout-common-background-color-weak)",paddingTop:2,paddingRight:8,paddingLeft:8,paddingBottom:8},children:[io.jsx(sj,{"data-testid":"screenOnly-search-results","aria-live":"polite","aria-atomic":"true",children:u}),io.jsx(Np,{size:"small",fullWidth:!0,"data-testid":"chart-exploration-search-input","aria-label":n("Common.Search.AccessibilityLabel"),type:"search",defaultValue:e,placeholder:n("Common.Search"),onChange:l,startAdornment:io.jsx(pd,{position:"start",children:io.jsx(Ej,{})}),inputProps:{style:{fontSize:"14px",paddingTop:6,paddingBottom:6}}})]})},Dj=e=>{const t=Ls(Ef());return io.jsx(ml,{theme:t,children:io.jsx(xw,{children:io.jsx(mC,{props:e,children:io.jsxs(Qu,{className:"exploration-panel",style:{display:"flex",flexDirection:"column"},children:[io.jsx(Ij,{}),io.jsx(yj,{}),io.jsx(Cj,{})]})})})})},Pj=e=>{if(e.flags.isEnabled("CLIENT_IM_5973_PIVOT_TABLE_EXPLORATION"))return{component:Dj,classification:{tags:["exploration"],exclusive:!0}}};var Rj=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}(Rj||{}),Mj=function(e){return e.COMPARE="compare",e.GENERAL="general",e}(Mj||{}),Lj=function(e){return e.VALUES="values",e.CONDITION="condition",e.SEARCH="search",e.CLEAR_SELECTION="clear_selection",e.TOP_BOTTOM="top_bottom",e}(Lj||{}),Aj=function(e){return e.FIXED_VALUE="fixed_value",e.CALCULATED_VALUE="calculated_value",e}(Aj||{});const kj=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,Oj=e=>{if(!Array.isArray(e))return"";let t="{<";const r=[];if(e.forEach(e=>{let t=`[${e.field}]${e.exclude?"-":""}={`,n="}",i="";switch(e.type){case Lj.SEARCH:i=(e=>{let t="",r="";const n=e.options?.mode;if(!n)return"";switch(n){case Rj.BEGINNING_OF_WORD:t="*^",r="*";break;case Rj.ENDS_WITH:t="*";break;case Rj.STARTS_WITH:r="*";break;case Rj.MATCHES_EXACTLY:break;case Rj.CONTAINS:default:t="*",r="*"}const i=e.options.values?.[0]??"";return""!==i?`"${t}${i}${r}"`:""})(e);break;case Lj.CONDITION:i=(e=>{const{options:t}=e,r=t?.mode===Mj.GENERAL,n=t?.modifier?.type===Aj.FIXED_VALUE,i=t?.modifier?.operator?t.modifier.operator.split(" "):[];if(0===i.length||!n&&(!t.firstValue?.aggregator||!t.firstValue?.field)||n&&!t.firstValue?.fixedValue||r&&(!t.conditionField?.aggregator||!t.conditionField?.field))return"";let o,a,s="=";r&&n?(o=`${t.conditionField?.aggregator}(${kj(t.conditionField?.field)})`,a=`${t.firstValue?.fixedValue}`):!r&&n?(o="",a=`${t.firstValue?.fixedValue}`,s=""):r||n?(o=`${t.conditionField?.aggregator}(${kj(t.conditionField?.field)})`,a=`${t.firstValue?.aggregator}(${kj(t.firstValue?.field)})`):(o=`${kj(e.field)}`,a=`${t.firstValue?.aggregator}(total ${kj(t.firstValue?.field)})`);const l=`${s}${o}${i[0]}${a}`;let u="";if(i.length>1){if(!n&&(!t.secondValue?.aggregator||!t.secondValue?.field)||n&&!t.secondValue?.fixedValue)return"";let e,a;r&&n?(e=`${t.secondValue?.fixedValue}`,a=` and ${o}`):!r&&n?(e=`${t.secondValue?.fixedValue}`,a=""):r||n?(e=`${t.secondValue?.aggregator}(${kj(t.secondValue?.field)})`,a=` and ${o}`):(e=`${t.secondValue?.aggregator}(total ${kj(t.secondValue?.field)})`,a=` and ${o}`),u=`${a}${i[1]}${e}`}return`"${l}${u}"`})(e);break;case Lj.CLEAR_SELECTION:i=`[${e.field}]=`,t="",n="";break;case Lj.VALUES:default:i=e.options?.values?e.options.values.map(e=>`'${e.replace(/'/g,"''")}'`).join(","):""}""!==i&&r.push(`${t}${i}${n}`)}),0===r.length)return;return t+=`${r.join(",")}>}`,t},qj=[];for(let e=0;e<256;++e)qj.push((e+256).toString(16).slice(1));let Tj;const Nj=new Uint8Array(16);var _j={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function jj(e,t,r){const n=(e=e||{}).random??e.rng?.()??function(){if(!Tj){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Tj=crypto.getRandomValues.bind(crypto)}return Tj(Nj)}();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=15&n[6]|64,n[8]=63&n[8]|128,function(e,t=0){return(qj[e[t+0]]+qj[e[t+1]]+qj[e[t+2]]+qj[e[t+3]]+"-"+qj[e[t+4]]+qj[e[t+5]]+"-"+qj[e[t+6]]+qj[e[t+7]]+"-"+qj[e[t+8]]+qj[e[t+9]]+"-"+qj[e[t+10]]+qj[e[t+11]]+qj[e[t+12]]+qj[e[t+13]]+qj[e[t+14]]+qj[e[t+15]]).toLowerCase()}(n)}const Fj=()=>crypto?.randomUUID?.()??function(e){return _j.randomUUID&&!e?_j.randomUUID():jj(e)}(),zj=1e3,Wj=1e3,$j=e=>{if(0===e.qInterColumnSortOrder.length)return;const t=e.qDimensions,r=((e,t)=>{const r=new Set;for(const t of e){if(r.has(t))return!0;r.add(t)}const n=e.includes(-1),i=e.filter(e=>-1!==e);if(t){const r=n?t.length+1:t.length;if(e.length!==r)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);r&&(e.qInterColumnSortOrder=((e,t)=>{const r=[];if(t)for(let e=0;e<t.length;e++)r.push(e);return e.qMeasures.length>=2&&r.push(-1),r})(e,t))},Hj=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]},Vj=e=>{if(!e)return;$j(e);const t=e.qDimensions,{qInterColumnSortOrder:r}=e;((e,t=[])=>{const r=t.filter(e=>-1!==e);for(let n=0;n<r.length;n++)if(-1!==r[n]&&r[n]!==n){const i=r[n],o=r.indexOf(n),a=r[o];Hj(r,n,o),Hj(e,n,o),Hj(t,t.indexOf(i),t.indexOf(a))}})(t,r)},Bj=P;class Gj extends Bj{#u;constructor(e,t){super(e),this.path=e.path,this.#u=t}async addDimension(e,t,r,n){if(!e||this.#c(e))return;const i=t??!1;if(e.qDef.cId||(e.qDef.cId=Fj()),n)return this.addAlternativeDimension(e,i,r);if(this.getDimensions().length<this.maxDimensions()){const t=await(async(e,t,r,n)=>{const i=e.getDimensions(),o=e.hcProperties.qNoOfLeftDims;return await e.autoSortDimension(t),Vj(e.hcProperties),(-1===o||Number.isNaN(+o))&&(e.hcProperties.qNoOfLeftDims=i.length),r?((e,t,r,n)=>{if(!e)return;const{qInterColumnSortOrder:i,qNoOfLeftDims:o}=e,a=t.length,s=i.indexOf(-1),l=-1!==s,u=void 0!==n?n+(o||0):void 0;if(l&&void 0!==u&&s>=u?((e,t,r)=>{t.splice(r,1),t.push(e),t.splice(r+1,0,-1)})(a,i,s):i.push(a),void 0===n)t.push(r);else if(void 0!==u){const e=l&&u>s?u-1:u;t.splice(e,0,r)}})(e.hcProperties,i,t,n):((e,t,r,n)=>{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===n?t.splice(i-1,0,r):s<n?t.splice(n-1,0,r):(t.splice(n,0,r),o.splice(s,1),o.splice(s+1,0,-1));else{const e=n??i;t.splice(e,0,r),-1!==s&&(o.splice(s,1),o.splice(s+1,0,-1))}e.qNoOfLeftDims++})(e.hcProperties,i,t,n),t})(this,e,i,r);return this.#d({section:i?"columns":"rows",cId:e.qDef.cId,addLast:void 0===r}),t}}async addDimensions(e,t,r){const n=[];for await(const i of e){const e=await this.addDimension(i,r,void 0,t);e&&n.push(e)}return n}addAlternativeDimension(e,t,r){if(!e||this.#c(e))return;const n=this.getAlternativeDimensions();void 0===this.hcProperties.excludedNoOfLeftDims&&(this.hcProperties.excludedNoOfLeftDims=n.length);let i=r;return i=void 0===i?t?n.length:this.hcProperties.excludedNoOfLeftDims:t?this.hcProperties.excludedNoOfLeftDims+i:Math.min(i,this.hcProperties.excludedNoOfLeftDims),n.splice(i,0,e),t||this.hcProperties.excludedNoOfLeftDims++,this.#d({section:t?"columns":"rows",cId:e.qDef.cId,alternative:!0,addLast:void 0===r}),e}async addFieldDimension(e,t,r,n={}){const i=this.createFieldDimension(e,t,r);return this.addDimension(i,n.asColumn,void 0,!1)}async addFieldDimensions(e,t={}){const r=e.map(e=>this.createFieldDimension(e.field,e.label,e.defaults));return this.addDimensions(r,void 0,t.asColumn)}async addLibraryDimensions(e,t={}){const r=e.map(e=>this.createLibraryDimension(e.id,e.defaults));return this.addDimensions(r,void 0,t.asColumn)}reinsertDimension(e,t,r){e.qDef.cId||(e.qDef.cId=Fj());if(this.getDimensions().length<this.maxDimensions())return this.addDimension(e,t,r);return this.reinsertAlternativeDimension(e,r,t)}reinsertAlternativeDimension(e,t,r){const n=this.getDimensions(),i=this.getAlternativeDimensions();if(n.length>=zj)return Promise.resolve();const o="number"==typeof t?t:i.length;return i.splice(o,0,e),this.#d({section:r?"columns":"rows",cId:e.qDef.cId,alternative:!0}),Promise.resolve(e)}async removeDimensions(e,t,r){return Promise.all([...e].reverse().map(e=>this.removeDimension(e,t,r)))}async removeDimension(e,t,r){if(t){const t=this.getAlternativeDimensions().splice(e,1)[0];return!r&&this.hcProperties.excludedNoOfLeftDims&&this.hcProperties.excludedNoOfLeftDims--,this.#p({cId:t.qDef.cId,section:r?"columns":"rows"}),t}const n=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=n.splice(e,1).at(0);if(s)return((e,t)=>{if(!e)return-1;const r=e.indexOf(t);if(-1===r)return-1;for(let r=0;r<e.length;++r)e[r]>t&&e[r]--;e.splice(r,1)})(this.hcProperties.qInterColumnSortOrder,e),Vj(this.hcProperties),this.#p({cId:s.qDef.cId,section:r?"columns":"rows"}),s}#c(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 r=[];for await(const n of e){const e=await this.addMeasure(n,t,void 0,!0);e&&r.push(e)}return r}addAlternativeMeasures(e,t){if(this.#f(e))return;const r=this.getAlternativeMeasures(),n=void 0===t?r.length:t,i=r.splice(n,0,e);return this.#h({cId:e.qDef.cId,alternative:!0,addLast:void 0===t}),i}async addMeasure(e,t,r,n){if(this.#f(e))return;if(e.qDef.cId||(e.qDef.cId=Fj()),t)return this.addAlternativeMeasures(e,r);n||delete e.qDef.qNumFormat;const i=this.getMeasures();if(i.length<this.maxMeasures()){const t=1===i.length;return void 0!==r&&r>=0?i.splice(r,0,e):i.push(e),this.autoSortMeasure(e).then(()=>(t&&(this.hcProperties.qInterColumnSortOrder.push(-1),0===this.getDimensions().length&&(this.hcProperties.qNoOfLeftDims=0)),this.#h({cId:e.qDef.cId,addLast:void 0===r}),e))}return i.length<Wj?(this.getAlternativeMeasures().push(e),this.#h({cId:e.qDef.cId,alternative:!0,addLast:void 0===r}),Promise.resolve(e)):Promise.resolve()}reinsertMeasure(e,t){const r=this.getMeasures(),n=this.getAlternativeMeasures(),i=this.hcProperties.qInterColumnSortOrder;if(e.qDef.cId||(e.qDef.cId=Fj()),t=void 0!==t?t:r.length,r.length<this.maxMeasures()){if(r.splice(t,0,e),2===r.length){-1===i.indexOf(-1)&&i.push(-1)}this.#h({cId:e.qDef.cId})}else r.length<Wj&&(t=n.length,n.splice(t,0,e),this.#h({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.#p({cId:t.qDef.cId,section:"measures"}),t}const r=this.getMeasures();let n,i,o;if("number"==typeof e&&e<r.length){n=2===r.length,i=this.getMeasures().splice(e,1)[0];const t=this.hcProperties.qInterColumnSortOrder;n&&(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-r.length,1)[0]);if(i)return this.#p({cId:i.qDef.cId,section:"measures"}),i}async removeMeasures(e,t){return await Promise.all([...e].reverse().map(e=>this.removeMeasure(e,t))),e}#f(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.#m("rows"),t=this.getDimensions();return e.filter(e=>e>=0).map(e=>t[e])}getColumnDimensions(){const e=this.#m("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)}#g(e){const t=this.hcProperties.rankedList?.[e];return t||this.createRankedList(e)}#v(e){return[...this.#g(e)]}#y(e,t){return void 0===this.hcProperties.rankedList&&(this.hcProperties.rankedList={}),this.hcProperties.rankedList[e]=t,t}#b(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}#x(e){const t=({qDef:t})=>t.cId===e;return!(!this.getAlternativeDimensions().some(t)&&!this.getAlternativeMeasures().some(t))}#m(e){const{qInterColumnSortOrder:t,qNoOfLeftDims:r}=this.hcProperties;if(this.#S())return"columns"===e?t:[];switch(e){case"rows":return-1===r?t:t.slice(0,r);case"columns":return-1===r?[]:t.slice(r);default:throw new Error(`Unknown section in #getInterColumnSortOrderBySection: ${e}`)}}#S(){const{qNoOfLeftDims:e}=this.hcProperties,t=-1===e||Number.isNaN(+e);return 0===this.getDimensions().length&&this.getMeasures().length>0&&t}#w(e){const t=this.hcProperties.qInterColumnSortOrder.indexOf(-1);if(-1===t)return!1;if(this.#S())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}}#C(e,t=!0){const r=e=>-1===e?-1:e.qDef.cId;if("measures"===e)return this.getMeasures().concat(t?this.getAlternativeMeasures():[]).map(r);const n=this.#m(e),i=this.getDimensions(),o=n.map(e=>-1===e?-1:i[e]);switch(e){case"rows":return o.concat(t?this.getAlternativeRowDimensions():[]).map(r);case"columns":return o.concat(t?this.getAlternativeColumnDimensions():[]).map(r);default:throw new Error(`Unknown section in #isCorruptRankedList: ${e}`)}}isRankedListCorrupt(e){const t=this.hcProperties.rankedList?.[e],r=this.properties.qInfo?.qId;if(!t)return!0;if(new Set(t).size!==t.length){const n=t.filter((e,r)=>t.indexOf(e)!==r);return console.warn("Corrupt ranked list detected: duplicate ids",{duplicates:n,section:e,chartId:r}),!0}const n=this.#C(e);if(t.length!==n.length)return console.warn("Corrupt ranked list detected: length mismatch",{section:e,chartId:r,fieldIds:n,rankedList:t,diff:new Set(n).symmetricDifference(new Set(t))}),!0;const i=n.filter(e=>!t.includes(e));if(i.length>0)return console.warn("Corrupt ranked list detected: missing ids",{missingIds:i,section:e,chartId:r}),!0;const o=this.#C(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:r,orderMismatchIds:s}),!0)}createRankedList(e){switch(e){case"rows":case"columns":return this.#E({section:e});case"measures":return this.#I();default:throw new Error(`Unknown section in getRankedList: ${e}`)}}#E({section:e}){const t=this.getDimensions(),r=this.#m(e),n="columns"===e?this.getAlternativeColumnDimensions():this.getAlternativeRowDimensions(),i=r.map(e=>-1===e?-1:t[e].qDef.cId);return i.push(...n.map(e=>e.qDef.cId)),this.#y(e,i)}#I(){if(void 0!==this.hcProperties.rankedList?.measures)return this.hcProperties.rankedList.measures;const e=[...this.getMeasures(),...this.getAlternativeMeasures()].map(e=>e.qDef.cId);return this.#y("measures",e)}#D({section:e,cId:t,fields:r,addLast:n}){const i=this.#g(e),o=r.findIndex(e=>e.qDef.cId===t),a=r[o+1]?.qDef.cId,s=r[o-1]?.qDef.cId;if(n)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]}#d({section:e,cId:t,alternative:r=!1,addLast:n=!1}){if(void 0===this.hcProperties.rankedList?.[e])return this.#E({section:e});let i=[];return i="columns"===e?r?this.getAlternativeColumnDimensions():this.getColumnDimensions():r?this.getAlternativeRowDimensions():this.getRowDimensions(),this.#D({section:e,cId:t,fields:i,addLast:n})}#h({cId:e,alternative:t=!1,addLast:r=!1}){if(void 0===this.hcProperties.rankedList?.measures)return this.#I();const n=t?this.getAlternativeMeasures():this.getMeasures();return this.#P(),this.#D({section:"measures",cId:e,fields:n,addLast:r})}#P(){const e=this.#g("rows"),t=this.#g("columns");this.#w("rows")&&!e.includes(-1)?e.push(-1):this.#w("columns")&&!t.includes(-1)&&t.push(-1)}#R(){if(this.hcProperties.qInterColumnSortOrder.includes(-1))return;const e=this.#g("rows"),t=this.#g("columns"),r=e.indexOf(-1),n=t.indexOf(-1);-1!==r&&e.splice(r,1),-1!==n&&t.splice(n,1)}#p({cId:e,section:t}){const r=this.#g(t),n=r.indexOf(e);-1!==n&&(r.splice(n,1),this.#R())}async moveMeasureToAlternative(e){const t=this.getMeasures().findIndex(t=>t.qDef.cId===e),r=this.#v("measures"),n=r.indexOf(e);if(-1===t)return;const i=await this.removeMeasure(t);if(void 0===i)return;const o=r.slice(n+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.#y("measures",r)}async moveMeasureFromAlternative(e){const t=this.getAlternativeMeasures().findIndex(t=>t.qDef.cId===e),r=this.#v("measures"),n=r.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=r.slice(n+1).find(e=>o.includes(e)),s=o.findIndex(e=>e===a);await this.addMeasure(i,!1,-1===s?void 0:s),this.#y("measures",r)}async moveDimensionToAlternative(e){const t=this.#b(e),r=this.getDimensions().findIndex(t=>t.qDef.cId===e);if(-1===r||null===t)return;const n=this.#v(t),i=n.indexOf(e),o="columns"===t,a=await this.removeDimension(r,!1,o);if(void 0===a)return;const s=n.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.#y(t,n)}async moveDimensionFromAlternative(e){const t=this.#b(e),r=this.getAlternativeDimensions().findIndex(t=>t.qDef.cId===e);if(-1===r||null===t)return;const n=this.#v(t),i=n.indexOf(e),o="columns"===t,a=await this.removeDimension(r,!0,o);if(void 0===a)return;const s=this.#C(t,!1),l=n.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.#y(t,n)}movePseudoDimension({toIndex:e,toSection:t}){const r=this.#b(-1);if(null===r)return void console.error("Cannot move pseudo dimension, unable to find it in any section",{toIndex:e,toSection:t});const n="columns"===t,i=r===t,o=this.#v(t);if(i){const e=o.indexOf(-1);o.splice(e,1)}else{const i=this.#g(r),o=i.indexOf(-1);if(-1===o)return void console.error("Couldn't delete pseudo dimension from current section",{toIndex:e,toSection:t,fromSection:r});i.splice(o,1),this.hcProperties.qNoOfLeftDims=n?Math.max(0,this.hcProperties.qNoOfLeftDims-1):this.hcProperties.qNoOfLeftDims+1}const a=e-o.slice(0,e).filter(e=>this.#x(e)).length,s=n?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.#y(t,o)}async moveDimension({cId:e,toIndex:t,toSection:r}){const n=this.#b(e),i=this.#x(e);if(null===n)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:r});const a=this.#v(r),s=a.indexOf(e);-1!==s&&a.splice(s,1);const l=t-a.slice(0,t).filter(e=>this.#x(e)!==i).length,u="columns"===r,c="columns"===n,d=await this.removeDimension(o,i,c);if(void 0===d)return;void 0!==await this.addDimension(d,u,l,i)&&(a.splice(t,0,e),this.#y(r,a))}async moveMeasure({cId:e,toIndex:t}){const r=this.#x(e),n=(r?this.getAlternativeMeasures():this.getMeasures()).findIndex(t=>t.qDef.cId===e);if(-1===n)return void console.error("Cannot move measure, unable to find it in any section",{cId:e});const i=this.#v("measures"),o=i.indexOf(e);-1!==o&&i.splice(o,1);const a=t-i.slice(0,t).filter(e=>this.#x(e)!==r).length,s=await this.removeMeasure(n,r);if(void 0===s)return;void 0!==await this.addMeasure(s,r,a)&&(i.splice(t,0,e),this.#y("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,r=Array.isArray(t)&&t.includes("$numeric"),n=e.isDerived,i=Array.isArray(this.properties.filters)?this.properties.filters:[],o={type:"values",field:n?e.value??e.fullname:e.name??e.label??e.field,options:{values:[]},exclude:!1,id:Fj(),qTags:Array.isArray(t)?t:[],isNumeric:r};return i.push(o),this.properties.filters=i,this.properties.qHyperCubeDef.qContextSetExpression=Oj(i),o}addFilters(e){const t=[];for(const r of e)t.push(this.addFilterField(r));return t}#M(e){const t=this.getFilters();return t.splice(e,1),this.properties.qHyperCubeDef.qContextSetExpression=Oj(t),t}removeFilters(e){if(0===e.length)return[];let t=[];const r=[...e].sort((e,t)=>t-e);t=this.getFilters().filter((t,r)=>e.includes(r));for(const e of r)this.#M(e);return t}getAddDimensionLabel(){return this.#u.get("Visualization.Requirements.AddDimension")}canColorBy(){return!1}}var Uj={exports:{}};!function(e){self,e.exports=(()=>{var e={909:e=>{var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},a=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var n,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(n in e);return void 0===n||t.call(e,n)},s=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},l=function(e,r){if("__proto__"===r){if(!t.call(e,r))return;if(i)return i(e,r).value}return e[r]};e.exports=function e(){var t,r,n,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(r in t)n=l(d,r),d!==(i=l(t,r))&&(h&&i&&(a(i)||(u=o(i)))?(u?(u=!1,c=n&&o(n)?n:[]):c=n&&a(n)?n:{},s(d,{name:r,newValue:e(h,c,i)})):void 0!==i&&s(d,{name:r,newValue:i}));return d}},8:(e,t)=>{(()=>{var e={229:e=>{var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},a=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var n,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(n in e);return void 0===n||t.call(e,n)},s=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},l=function(e,r){if("__proto__"===r){if(!t.call(e,r))return;if(i)return i(e,r).value}return e[r]};e.exports=function e(){var t,r,n,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(r in t)n=l(d,r),d!==(i=l(t,r))&&(h&&i&&(a(i)||(u=o(i)))?(u?(u=!1,c=n&&o(n)?n:[]):c=n&&a(n)?n:{},s(d,{name:r,newValue:e(h,c,i)})):void 0!==i&&s(d,{name:r,newValue:i}));return d}}},r={};function n(t){var i=r[t];if(void 0!==i)return i.exports;var o=r[t]={exports:{}};return e[t](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),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};(()=>{n.r(i),n.d(i,{default:()=>Ae});var e=n(229),t=n.n(e);const r=function(e,t,r){if(!t)return!1;var n,i=t.split("."),o=i[i.length-1],a=e;for(n=0;n<i.length-1;++n)void 0===a[i[n]]&&(a[i[n]]=Number.isNaN(+i[n+1])?{}:[]),a=a[i[n]];if(void 0!==r){var s=a[o];return a[o]=r,{updated:r,previous:s}}return delete a[o],!1},o=function(e,t,r){var n,i=t.split("."),o=e;if(void 0===o)return r;for(n=0;n<i.length;++n){if(void 0===o[i[n]])return r;o=o[i[n]]}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 r=function(e,t){if(!t)return null;var r,n;for(r=0;r<t.length;r++)if((n=t[r]).qInfo.qId===e)return n;return null}(e.qLibraryId,t.dimensionList);return r&&r.qData.info[0].qTags.indexOf("$numeric")>-1}var n=function(e,t){if(!t)return null;var r,n,i=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var r=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(r)&&(t=(t=t.substring(1,r)).trim()),t}(e);for(r=0;r<t.length;r++){if((n=t[r]).qName===i)return n;if(n.qDerivedFieldData)for(var o=0;o<n.qDerivedFieldData.qDerivedFieldLists.length;++o)for(var a=n.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 n&&n.qTags.indexOf("$numeric")>-1}function d(e){return!(!e.fullAccumulation&&!e.fullRange)}function p(e,t){var r=e.crossAllDimensions;return 2===t&&r?"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),r=t.trim();return"="===r.substring(0,1)?r.substring(1).trim():r}function h(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function m(e,t){var r=e.crossAllDimensions;return 2===t&&r?"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,r=void 0===t?{}:t,n=e.dimensions,i=e.dimensionAndFieldList,o=e.funcComp,a=void 0===o?"Sum":o,s=e.valueComp,l=void 0===s?"0":s;if(!r.showExcludedValues)return"";if(n&&1===n.length){var u=y(c(n[0],i),h(0));return"".concat(a,"({1<").concat(u,">}").concat(l,")")}if(n&&2===n.length){var d=c(n[0],i),p=c(n[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,r=e.layout;return o(t,"qHyperCubeDef.qDimensions",o(r,"qHyperCube.qDimensionInfo",[])).length}const w={isFullRange:d,getNumDimensions:S,getExpressionWithExcludedComp:function(e){var t=e.expression,r=e.modifier,n=e.dimensions,i=e.dimensionAndFieldList,o=e.treatMissingAsNull,a=u(f(t));if(!r.showExcludedValues)return a;var s=b({modifier:r,dimensions:n,dimensionAndFieldList:i}),l=o?"":", 0";if(n&&1===n.length){var c=h(0);return"If(Count(".concat(c,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(n&&2===n.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 r=e.steps;return"number"!=typeof r||Number.isNaN(r)?6:r}return p(e,t)},getAboveCompPrefix:m,getAboveCompSuffix:g,getAboveComp:function(e,t,r,n){return m(e,t)+r+g(n)},getFunctionPrefix:x,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return x(e)+t+")"},getAggrComp:function(e,t,r){return"Aggr(".concat(e,", ").concat(t,", ").concat(r,")")},getExcludedComp:b,needDimension:function(e){var t=e.modifier,r=e.properties,n=e.layout,i=function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t);return 0===i&&2===S({properties:r,layout:n})},getDimComp:function(e,t){var r=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),n=h(t);if(!r.qSortByExpression&&!r.qSortByNumeric&&!r.qSortByAscii)return n;var i=["Descending","Ascending"],o=r.qSortByNumeric?"(Numeric, ".concat(i[(r.qSortByNumeric+1)/2],")"):"",a=r.qSortByAscii?"(Text, ".concat(i[(r.qSortByAscii+1)/2],")"):"";return r.qSortByNumeric&&r.qSortByAscii?"(".concat(n,", ").concat(o,", ").concat(a,")"):r.qSortByNumeric?"(".concat(n,", ").concat(o,")"):r.qSortByAscii?"(".concat(n,", ").concat(a,")"):n},simplifyExpression:f,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var r=t.indexOf(s);if(-1!==r){var n=t.indexOf(l);if(-1!==n)return t.substring(r+s.length,n)}}},initModifier:function(e,t){Object.keys(t).forEach(function(r){void 0===e[r]&&(e[r]=t[r])})},isNumeric:c,isApplicable:function(e){var t=e.properties,r=e.layout,n=e.minDimensions,i=void 0===n?1:n,o=e.maxDimensions,a=void 0===o?2:o;if(!t&&!r)return!0;var s=S({properties:t,layout:r});return s>=i&&s<=a},getExpressionWithMarkers:u,canExtract:function(e){var t=e.indexOf(s),r=e.indexOf(l);return t>-1&&r>-1&&t<r},getDimDefWithWrapper:h,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")},generateTSDExpression:function(e,t,r){var n=t||e.outputExpression;if(e.base&&e.base.qDef&&(n=t!==e.base.qDef?t:e.base.qDef),"observed"!==e.decomposition){var i=r.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&&(n=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);n=n.startsWith("=")?n.substr(1):n,n="".concat(o,"(").concat(n,", ").concat(e.steps,")")}return n},getDecomposition:function(e){var t="observed";return Object.values(a.EXPRESSIONS).find(function(r){var n=e.qDef.base.qDef.toLowerCase()||e.qDef.qDef.toLowerCase();return a.EXPRESSIONS[r]&&n.includes(a.EXPRESSIONS[r].toLowerCase())&&(t=r),r}),t}};function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}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={},P=Array.isArray;function R(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 r,n=t.substring(1).split("/").slice(0,-1);return n.forEach(function(t,i){if(i!==n.length){r=+t;var o=Number.isNaN(r)?{}:[];e[r||t]=M(e[r||t])?o:e[t],e=e[r||t]}}),e}function k(e,t){var r=!0;if(R(e)&&R(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach(function(n){k(e[n],t[n])||(r=!1)}),r);if(P(e)&&P(t)){if(e.length!==t.length)return!1;for(var n=0,i=e.length;n<i;n+=1)if(!k(e[n],t[n]))return!1;return!0}return e===t}D.generate=function(e,t,r){r=r||"";var n=[];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(r,"/").concat(i);k(o,a)||L(t,i)||(M(a)?n.push({op:"add",path:s,value:o}):R(o)&&R(a)?n=n.concat(D.generate(a,o,s)):P(o)&&P(a)?n=n.concat(function(e,t,r){var n=[],i=e.slice(),o=-1;function a(e,t,r){if(e[r]&&M(e[r].qInfo))return null;if(e[r]&&e[r].qInfo.qId===t)return r;for(var n=0,i=e.length;n<i;n+=1)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(k(t,i))return n;if(!M(t[0])&&M(t[0].qInfo))return n.push({op:"replace",path:r,value:t}),n;for(var s=i.length-1;s>=0;s-=1)-1===(o=a(t,i[s].qInfo&&i[s].qInfo.qId,s))?(n.push({op:"remove",path:"".concat(r,"/").concat(s)}),i.splice(s,1)):n=n.concat(D.generate(i[s],t[o],"".concat(r,"/").concat(s)));for(var l=0,u=t.length;l<u;l+=1)-1===(o=a(i,t[l].qInfo&&t[l].qInfo.qId))?(n.push({op:"add",path:"".concat(r,"/").concat(l),value:t[l]}),i.splice(l,0,t[l])):o!==l&&(n.push({op:"move",path:"".concat(r,"/").concat(l),from:"".concat(r,"/").concat(o)}),i.splice(l,0,i.splice(o,1)[0]));return n}(a,o,s)):n.push({op:"replace",path:"".concat(r,"/").concat(i),value:o}))}),Object.keys(e).forEach(function(i){M(t[i])&&!L(e,i)&&n.push({op:"remove",path:"".concat(r,"/").concat(i)})}),n},D.apply=function(e,t){t.forEach(function(t){var r,n,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(P(i))"-"===o&&(o=i.length),i.splice(+o,"add"===t.op?0:1,t.value);else if(P(a)&&P(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)}(n=u)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?C(e,t):void 0}}(n)||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(R(a)&&R(t.value))r=a,Object.keys(r).forEach(function(e){Object.getOwnPropertyDescriptor(r,e).configurable&&!L(r,e)&&delete r[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);P(i)?i.splice(+o,0,c.splice(+s,1)[0]):(i[o]=c[s],delete c[s])}else"remove"===t.op&&(P(i)?i.splice(+o,1):delete i[o])})},D.clone=function(e){return I({},e)},D.createPatch=function(e,t,r){var n={op:e.toLowerCase(),path:r};return"move"===n.op?n.from=t:void 0!==t&&(n.value=t),n},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,r,n){if(!e)return Promise.resolve();var i=O.generate(r,n);return t()(!0,r,n),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 r=o(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===T)return r[n]}function _(e,t){var r=function(e,t){var r=o(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===T)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var j={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,r=e.layout;return w.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=a;void 0===l&&(l=w.getNumDimensions({properties:n,layout:i}));var u=o(n,"qHyperCubeDef.qDimensions",[]),c=w.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),d=w.getNumStepComp(r,l),p=w.getAboveComp(r,l,c,d),f=w.getRangeComp("RangeSum",p);if(w.needDimension({modifier:r,properties:n,layout:i})){var h=w.getDimComp(u,1),m=w.getDimComp(u,0),g=w.getAggrComp(f,h,m);f=r.showExcludedValues?w.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:s,valueComp:g}):g}return f},extractInputExpression:w.extractInputExpression,initModifier:function(e){w.initModifier(e,j)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={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(_(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(_(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(_(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(_(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var r=N(t,e);if(r){var n=r.steps;r.steps="number"!=typeof n||Number.isNaN(n)?6:Math.abs(n)}},show:function(t){var r=N(t,e);return r&&!r.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(_(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,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(T))return!1;var o=N(t,e);return o&&!o.disabled}};return r}};var z="movingAverage";function W(e,t){var r=o(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===z)return r[n]}function $(e,t){var r=function(e,t){var r=o(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===z)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):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,r=e.layout;return w.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,r=e.expression,n=e.modifier,i=e.properties,a=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!n)return r;var u=s;void 0===u&&(u=w.getNumDimensions({properties:i,layout:a}));var c=o(i,"qHyperCubeDef.qDimensions",[]),d=n.showExcludedValues&&n.nullSuppression,p=w.getExpressionWithExcludedComp({expression:r,modifier:n,dimensions:c,dimensionAndFieldList:l,treatMissingAsNull:d}),f=w.getNumStepComp(n,u),h=w.getAboveComp(n,u,p,f);if(n.nullSuppression)t=w.getRangeComp("RangeAvg",h);else{var m=w.getRangeComp("RangeSum",h),g=function(e,t){var r=w.getRowNoComp(e,t);if(!w.isFullRange(e)){var n=e.steps,i="number"!=typeof n||Number.isNaN(n)?6:n;return"RangeMin(".concat(i,", ").concat(r,")")}return r}(n,u);t="".concat(m," / ").concat(g)}var v=t;if(w.needDimension({modifier:n,properties:i,layout:a})){var y=w.getDimComp(c,1),b=w.getDimComp(c,0),x=w.getAggrComp(v,y,b);v=n.showExcludedValues?w.getExcludedComp({modifier:n,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]:{},r={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 r=W(t,e);if(r){var n=r.steps;r.steps="number"!=typeof n||Number.isNaN(n)?6:Math.abs(n)}},show:function(t){var r=W(t,e);return r&&!r.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,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(z))return!1;var o=W(t,e);return o&&!o.disabled}};return r}};var B="timeSeriesDecomposition";function G(e,t){var r=o(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===B)return r[n]}function U(e,t){var r=function(e,t){var r=o(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===B)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):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,r=e.layout;return w.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties;return r?w.generateTSDExpression(r,t,n):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]:{},r={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,r){var n=G(t,e);if(n){var i=n.steps;n.steps="number"!=typeof i||Number.isNaN(i)?2:Math.abs(i),r.properties.qHyperCubeDef.qMeasures=r.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 r=G(t,e);return r&&!r.fullRange}}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(B))return!1;var o=G(t,e);return o&&!o.disabled}};return r}};var X="difference";function J(e,t){var r=o(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===X)return r[n]}function Z(e,t){var r=function(e,t){var r=o(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===X)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):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,r=e.layout;return w.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:w.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=a;void 0===l&&(l=w.getNumDimensions({properties:n,layout:i}));var u=o(n,"qHyperCubeDef.qDimensions",[]),c=w.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),d=w.getAboveComp(r,l,c),p="".concat(c," - ").concat(d);if(w.needDimension({modifier:r,properties:n,layout:i})){var f=w.getDimComp(u,1),h=w.getDimComp(u,0),m=w.getAggrComp(p,f,h);p=r.showExcludedValues?w.getExcludedComp({modifier:r,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]:{},r={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,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(X))return!1;var o=J(t,e);return o&&!o.disabled}};return r}};var te="normalization";function re(e,t){var r=o(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===te)return r[n]}function ne(e,t){var r=function(e,t){var r=o(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===te)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}function ie(e,t){for(var r=0;r<e.length;r++)if(e[r].value===t)return r;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,r){return 1===e?"{$<".concat(w.getFieldWithWrapper(t),"={'").concat(r,"'}>}"):""}function le(e,t){return 0===e&&t>1||2===e?"Total":""}function ue(e,t,r){return 0===e&&t>1?"<".concat(w.getDimDefWithWrapper(r),">"):""}const ce={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,r=e.layout;return w.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:w.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=a;void 0===l&&(l=w.getNumDimensions({properties:n,layout:i}));var u=o(n,"qHyperCubeDef.qDimensions",[]),c=w.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),d=r.selectionScope,p=r.dimensionalScope;return function(e,t,r,n,i,o,a){var s=ae(t),l=se(t,r,n),u=""===s&&""===l?"":s||l,c=le(i,o),d=ue(i,o,a),p=function(e){for(var t=[],r=0;r<e;r++)t[r]=w.getDimDefWithWrapper(r);return t.join(", ")}(o);return"".concat(e,"/ Sum(").concat(u," ").concat(c).concat(d," Aggr(").concat(u," ").concat(e,", ").concat(p,"))")}(c,d,r.field,r.value,p,l,r.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]:{},r={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(ne(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(r){return function(e,t,r){var n=[{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 n=function(e,t){if(1===e){var r=ie(t,0);t.splice(r,1)}return t}(re(e,r).dimensionalScope,n),n}(r,t,e)}},field:{refFn:function(t){return"".concat(ne(t,e),".field")},type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:function(e,t,r){return r.app.getFieldList().then(function(e){return e.map(function(e){return{label:e.qName,value:e.qName}})})},show:function(t){return 1===re(t,e).selectionScope}},value:{refFn:function(t){return"".concat(ne(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return 1===re(t,e).selectionScope}},dimensionalScope:{refFn:function(t){return"".concat(ne(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(r,n){return function(e,t,r,n){var i=t.layout.qHyperCube.qDimensionInfo.length,o=[{value:0,translation:r.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:r.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:1,translation:r.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension"),tooltipTranslation:r.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension",".tooltip")},{value:2,translation:r.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:r.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension",".tooltip")}];return o=function(e,t){if(e<2){var r=ie(t,0);t.splice(r,1)}return t}(i,o),o=function(e,t){if(0===e){var r=ie(t,1);t.splice(r,1)}return t}(re(e,n).selectionScope,o),o}(r,n,t,e)}},primaryDimension:{refFn:function(t){return"".concat(ne(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,r){return 0===(re(t,e).dimensionalScope||0)&&r.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(te))return!1;var o=re(t,e);return o&&!o.disabled}};return r},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",Pe={initBase:function(e,t){(t||Pe.isValid(e))&&(r(e,ye,o(e,ve)),r(e,xe,o(e,be)),r(e,Ce,o(e,Se)),r(e,Ee,o(e,we)))},restoreBase:function(e){Pe.isValid(e)&&(r(e,ve,o(e,ye)),r(e,be,o(e,xe)),r(e,Se,o(e,Ce)),r(e,we,o(e,Ee)),o(e,Ie)&&o(e,De)&&r(e,Ie,o(e,De)),delete e.qDef.base)},isValid:function(e){var t=o(e,ye),r=o(e,xe);return void 0!==t||void 0!==r}};const Re=Pe;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:_e,initBase:Re.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some(function(e){return Le[e]})},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some(function(e){return Le[e]&&Le[e].isApplicable({properties:r,layout:n})})},measureBase:ge,limitedSorting:function(e){var t=e.measures,r=e.properties,n=e.layout,i=!1,o=!1;return t.forEach(function(e){var t=ze(e);Ue({modifiers:t,properties:r,layout:n})&&(i=!0,o=o||Ze({modifiers:t,properties:r,layout:n}))}),i&&!o},ifEnableTotalsFunction:je};var ke={};function Oe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.model,n=e.properties,i=e.isSnapshot,a=void 0!==i&&i,s=e.masterItem,l=!1;ke[r.id]=ke[r.id]||{isFirstTime:!0};var u=ke[r.id].isFirstTime;if(ke[r.id].isFirstTime=!1,n&&"object"===Me(n))return qe({model:r,properties:n});var c=r?r.layout:void 0,d=o(c,"qSelectionInfo.qInSelections");if(a||d)return Promise.resolve(l);var p=o(c,"qHyperCube.qMeasureInfo"),f=ke[r.id].lastReloadTime;if(ke[r.id].lastReloadTime=o(r,"app.layout.qLastReloadTime"),Ne({measures:p,layout:c})){var h=function(e){var t=e.measures,r=e.layout,n=e.lastReloadTime;return o(e.model,"app.layout.qLastReloadTime")!==n&&function(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some(function(e){return Ge({measure:e,properties:r,layout:n})})}({measures:t,layout:r})}({measures:p,layout:c,model:r,lastReloadTime:f});return h||function(e){var t=e.measures,r=e.layout,n=e.masterItem,i=e.isFirstTime;return!!Array.isArray(t)&&(i||n||t.some(function(e){return function(e){var t=e.measure,r=e.layout;return Ue({modifiers:ze(t),layout:r})?!t.base:!!t.base}({measure:e,layout:r})}))}({measures:p,layout:c,masterItem:s,isFirstTime:u})?r.getEffectiveProperties().then(function(e){var n=t()(!0,{},e);$e(n);var i=Qe(n);return Ye({model:r}).then(function(t){return Ke({libraryIds:i,model:r}).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 r=0,n=t.qDef.modifiers;Array.isArray(n)&&n.forEach(function(e){if("object"===Me(e)&&!e.disabled){if(r++,"object"!==Me(Le[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(r>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var n=Le[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==n&&Ve(t)&&w.simplifyExpression(t.qDef.base.qDef)!==w.simplifyExpression(n)&&(t.qDef.base.qDef=n)}})}}({measure:e,properties:t})})}({properties:n}),qe({model:r,oldProperties:e,properties:n,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)?r.getEffectiveProperties().then(function(e){return function(e){var r=e.model,n=e.properties,i=Qe(n);return et({model:r,libraryIds:i}).then(function(){var e=t()(!0,{},n);return Fe(n).forEach(function(e){return Te(e)}),Je({oldProperties:e,newProperties:n,model:r})})}({model:r,properties:e})}):Promise.resolve(l)}function qe(e){var r=e.model,n=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===n&&(n=l?t()(!0,{},i):i),$e(i);var p=Qe(i);return et({model:r,libraryIds:p,masterItem:u}).then(function(){return function(e){var r=e.measures,n=e.properties,i=e.model,a=e.libraryItemsProps,s=e.dimensionAndFieldList;if(r||(r=Fe(n)),!r.length)return Promise.resolve();if(!Ne({measures:r,properties:n}))return r.forEach(function(e){return Te(e)}),Promise.resolve();var l=a?void 0:Qe(n);return Ye({model:i,dimensionAndFieldList:s}).then(function(e){return Ke({libraryIds:l,model:i,libraryItemsProps:a}).then(function(i){r.forEach(function(r){Ue({modifiers:r.qDef.modifiers,properties:n})?(function(e){var r=e.measure,n=e.properties,i=e.libraryItemsProps,a=e.dimensionAndFieldList,s=0;Re.isValid(r)||Re.initBase(r,!0);var l=r.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,r);var l=r.qLibraryId||c&&c.qLibraryId;l?function(e){var r=e.measure,n=e.modifier,i=e.properties,o=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=""===s?s:Le[n.type].generateExpression({expression:s,modifier:n,properties:i,dimensionAndFieldList:o});n.outputExpression=l,r.qDef.qDef=n.outputExpression,(r.qDef.qLabel||a.qMeasure.qLabel)&&(r.qDef.qLabel=a.qMeasure.qLabel),(r.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(r.qDef.qLabelExpression=a.qMeasure.qLabelExpression),r.qDef.quarantine&&r.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(r.qDef.qNumFormat=a.qMeasure.qNumFormat,r.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete r.qLibraryId,r.qDef.coloring=a.qMeasure.coloring,n.base=t()(!0,{},r.qDef.base)}({measure:r,modifier:e,libraryId:l,properties:n,libraryItemsProps:i,dimensionAndFieldList:a}):function(e){var r=e.measure,n=e.modifier,i=e.properties,o=e.dimensionAndFieldList;"function"==typeof Le[n.type].updateModifier&&Le[n.type].updateModifier(n,i.qHyperCubeDef);var a=ge.getExpression(r),s=""===a?a:Le[n.type].generateExpression({expression:a,modifier:n,properties:i,dimensionAndFieldList:o});n.outputExpression=s,r.qDef.qDef=n.outputExpression,r.qDef.base.qLabelExpression?r.qDef.qLabelExpression=r.qDef.base.qLabelExpression:r.qDef.qLabel=r.qDef.base.qLabel||a,n.base=t()(!0,{},r.qDef.base)}({measure:r,modifier:e,properties:n,dimensionAndFieldList:a}),function(e){var t=o(e,"qDef.qAggrFunc");"Expr"!==t||je(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&je(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(r)}})}({measure:r,properties:n,libraryItemsProps:i,dimensionAndFieldList:e}),He(r)):Te(r)})})})}({measures:a,properties:i,model:r,libraryItemsProps:c,dimensionAndFieldList:d}).then(function(){return l?Je({oldProperties:n,newProperties:i,model:r}):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)?Re.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,He(e)}function Ne(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some(function(e){return Ue({modifiers:ze(e),properties:r,layout:n})})}function _e(e){var t=ze(e);if(Array.isArray(t))for(var r=0;r<t.length;r++){var n=t[r];if(Le[n.type]&&!n.disabled)return n}}function je(e){var t=_e(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 r=_e(e);r&&(void 0!==r.outputExpression&&We(r)!==e.qDef.qDef?delete e.qDef.base:!Re.isValid(e)&&r.base&&(e.qDef.base=t()(!0,{},r.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,r=e.properties,n=e.layout;return!Be(t)&&Ue({modifiers:ze(t),properties:r,layout:n})}function Ue(e){var t=e.modifiers,r=e.properties,n=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:r,layout:n})),i[e.type])})}function Ye(e){var t=e.model,r=e.dimensionAndFieldList;if(r)return Promise.resolve(r);var n=[],i={},o=t.app.getDimensionList().then(function(e){i.dimensionList=e});n.push(o);var a=t.app.getFieldList().then(function(e){i.fieldList=e});return n.push(a),Promise.all(n).then(function(){return i})}function Ke(e){var t=e.libraryIds,r=e.model,n=e.libraryItemsProps;if(n)return Promise.resolve(n);var i=t.measureLibraryIds,o=t.dimensionLibraryIds,a={},s=[];return i.forEach(function(e){var t=r.app.getMeasure(e).then(function(t){return t.getProperties().then(function(t){a[e]=t})});s.push(t)}),o.forEach(function(e){var t=r.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,r=e.newProperties,n=e.model,i=JSON.stringify(o(t,"qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(o(r,"qHyperCubeDef.qMeasures"),Xe)||JSON.stringify(o(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(o(r,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe);return i?function(e){var t=e.model,r=e.oldProperties,n=e.newProperties,i=t.layout;return i&&!i.qHasSoftPatches&&!i.qExtendsId&&o(i,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(n):q(t,r,n)}({model:n,oldProperties:t,newProperties:r}).then(function(){return i}):Promise.resolve(i)}function Ze(e){var t=e.modifiers,r=e.properties,n=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:r,layout:n})})}function Qe(e){var t=Fe(e),r=[],n=[],i=!1;return t.forEach(function(t){var n=ze(t);if(Ue({modifiers:n,properties:e})){var o=Be(t);o&&r.push(o),i=i||Ze({modifiers:n,properties:e})}}),o(e,"qHyperCubeDef.qDimensions",[]).forEach(function(e){var t=e.qLibraryId;t&&n.push(t)}),{measureLibraryIds:r,dimensionLibraryIds:n}}function et(e){var t=e.model,r=e.libraryIds;return!e.masterItem&&r&&(r.measureLibraryIds.length||r.dimensionLibraryIds.length)?(ke[t.id].masterItemSubscriber=ke[t.id].masterItemSubscriber||function(e){var t=e.model,r=e.callback,n={},i={},a={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},r=o(e,"qInfo.qType");return r&&s[r]&&s[r].forEach(function(r){t[r]=o(e,r)}),JSON.stringify(t)}function u(e){var t=e.qInfo.qId;if(n[t]){var i=l(e);n[t].properties!==i&&(n[t].properties=i,"function"==typeof r&&n[t].enabled&&r(e)),n[t].enabled=!0}}function c(e,r){return t.app[r](e).then(function(t){n[e]={listener:t.layoutSubscribe(u),enabled:!1,properties:l(t.layout)}})}return{subscribe:function(e){var r=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:r,dimensionLibraryIds:o}),Object.keys(n).forEach(function(e){i[e]||a[e]||(n[e].listener.dispose(),delete n[e])}),t.app&&(Object.keys(i).forEach(function(e){i[e]&&!n[e]&&s.push(c(e,"getMeasure"))}),Object.keys(a).forEach(function(e){a[e]&&!n[e]&&s.push(c(e,"getDimension"))})),Promise.all(s)},unsubscribe:function(){Object.keys(n).forEach(function(e){n[e].listener.dispose()}),n={}}}}({model:t,callback:function(e){return Oe({model:t,masterItem:e}).then(function(){return t.app.clearUndoBuffer()})}}),ke[t.id].masterItemSubscriber.subscribe(r)):Promise.resolve()}})(),t.default=i.default,Object.defineProperty(t,"__esModule",{value:!0})})()}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n](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);var n={};return(()=>{function e(t){var r,n=t;return n>9?(r=65+n-10)>90&&(r+=6):n="".concat(n).charCodeAt(0),[48,111,79,105,73,108].indexOf(r)>-1?e(n+1):String.fromCharCode(r)}function t(r){var n=e(r%62),i=Math.floor(r/62);return i>0?t(i)+n:n}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)}r.d(n,{default:()=>$e});const o={getValue:function(e,t,r){if(null==e||null==t)return r;for(var n=t.split("."),i=e,o=0;o<n.length;++o){var a=n[o];if(""!==a){if(void 0===i[a]||null===i[a])return r;i=i[a]}}return i},setValue:function(e,t,r){if(null!=e&&null!=t){for(var n=t.split("."),i=n[n.length-1],o=e,a=0;a<n.length-1;++a){var s=n[a];void 0!==o[s]&&null!==o[s]||(o[s]=Number.isNaN(+n[a+1])?{}:[]),o=o[s]}void 0!==r?o[i]=r: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 r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?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 r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}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 r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?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 r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t,r){if(e){for(var n=0;n<e.length;n++)if(e[n][t]===r)return n;return-1}return-1}const d={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;var r=e.indexOf(t[0]);if(-1!==r){for(var n=0;n<t.length;n++){var i=e.indexOf(t[n]);if(r>i)return!1;r=i}return!0}return!1},indexAdded:function(e,t){var r;for(r=0;r<e.length;++r)e[r]>=0&&e[r]>=t&&++e[r];e.push(t)},indexRemoved:function(e,t){var r,n=0;for(r=0;r<e.length;++r)e[r]>t?--e[r]:e[r]===t&&(n=r);return e.splice(n,1),n},findItemByPropertyValue:function(e,t,r){if(e){for(var n=0;n<e.length;n++)if(e[n][t]===r)return e[n];return null}return null},findIndexByPropertyValue:c};var p=r(8),f=r.n(p);const h=function(e){var t,r=e.exportFormat,n=e.qHyperCubeDef,i=r.data[0];(t=i.dimensions).push.apply(t,a(n.qDimensions));var s,l=o.getValue(n,"qLayoutExclude.qHyperCubeDef.qDimensions");l&&(s=i.excludedDimensions).push.apply(s,a(l))},m=function(e){var t,r=e.exportFormat,n=e.qHyperCubeDef,i=r.data[0];(t=i.measures).push.apply(t,l(n.qMeasures));var a,s=o.getValue(n,"qLayoutExclude.qHyperCubeDef.qMeasures");s&&(a=i.excludedMeasures).push.apply(a,l(s))},g=function(e){var t=e.exportFormat,r=e.qHyperCubeDef,n=t.data[0];r.qInterColumnSortOrder||(r.qInterColumnSortOrder=[]),n.interColumnSortOrder=r.qInterColumnSortOrder.concat();var i=o.getValue(r,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");i&&d.isOrderedSubset(i,n.interColumnSortOrder)&&(n.interColumnSortOrder=i.concat())},v=function(e){var t=e.exportFormat,r=e.properties;Object.keys(r).forEach(function(e){t.properties[e]=r[e]})},y=function(e){var t=e.exportFormat,r=e.properties;r.qLayoutExclude||(r.qLayoutExclude={}),r.qLayoutExclude.disabled&&(Object.keys(r.qLayoutExclude.disabled).forEach(function(e){t.properties.hasOwnProperty(e)||(t.properties[e]=r.qLayoutExclude.disabled[e])}),delete r.qLayoutExclude.disabled),r.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)})}(r),delete r.qLayoutExclude.changed),r.qLayoutExclude.quarantine&&!o.isEmpty(r.qLayoutExclude.quarantine)||delete r.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,r){var n,i,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=o.getValue(e,t);if(!o.isAtomicValue(s))try{if((i=(i=(n=JSON.stringify(s)).match(/:\{/g))?i.length:0)>2&&!a)return;s=JSON.parse(n)}catch(e){return}o.getValue(e,"qLayoutExclude.quarantine")||o.setValue(e,"qLayoutExclude.quarantine",{});var l=o.getValue(e,"qLayoutExclude.quarantine");l[r]||(l[r]={}),l[r][t]=s}var S=r(909),w=r.n(S);function C(e,t){var r=w()(!0,{},t,e);return o.getValue(r,"qOtherTotalSpec.qOtherCounted")||o.setValue(r,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),o.getValue(r,"qOtherTotalSpec.qOtherLimit")||o.setValue(r,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),r.hasOwnProperty("othersLabel")||(r.othersLabel="Others"),r}function E(e,t){return w()(!0,{},t,e)}function I(e,t,r){return"function"==typeof e?e(t):Number.isNaN(+e)?r:e}var D=Math.pow(2,53)-1;function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}const M=function(e,t,r){var n="masterobject"===o.getValue(t,"properties.qInfo.qType")?"masterobject":o.getValue(r,"qInfo.qType");o.setValue(e,"qInfo.qType",n),e.visualization=r.visualization},L=function(e,t,r){t.hasOwnProperty(e)&&(r[e]=t[e])},A=function(e,t,r,n){t.hasOwnProperty(e)?r[e]=t[e]:r[e]=n},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,r=e.exportFormat,n=e.maxDimensions,i=e.minDimensions,o=e.newHyperCubeDef,a=e.defaultDimension,s=r.data[0];for(t=0;t<s.dimensions.length;++t){var l=C(s.dimensions[t],a);o.qDimensions.length<n?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,r=e.exportFormat,n=e.maxMeasures,i=e.minMeasures,o=e.newHyperCubeDef,a=e.defaultMeasure,s=r.data[0];for(t=0;t<s.measures.length;++t){var l=E(s.measures[t],a);o.qMeasures.length<n?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,r=e.dataDefinition,n=void 0===r?{}:r,i=t.data[0],o=n.dimensions||{max:0},a=n.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}},_=function(e){var t=e.exportFormat,r=e.newHyperCubeDef,n=t.data[0],i=r.qDimensions.length+r.qMeasures.length;r.qInterColumnSortOrder=n.interColumnSortOrder.concat();var o=r.qInterColumnSortOrder.length;if(o!==i)for(r.qLayoutExclude&&(r.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=n.interColumnSortOrder.concat());o!==i;)o<i?(d.indexAdded(r.qInterColumnSortOrder,o),++o):(--o,d.indexRemoved(r.qInterColumnSortOrder,o))},j=function(e){var t=e.exportFormat,r=e.initialProperties,n=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&&n?o.setValue(i,"".concat(n,".qHyperCubeDef"),t.properties.qHyperCubeDef):r.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,{},r,i)).components&&(i.components=[]),i},F=function(e){var t=e.exportFormat,r=e.maxDimensions,n=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=t.data[0];return a.dimensions.length>r&&r>0||a.measures.length>i&&i>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>n||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>o||!i&&a.measures.length>0||!r&&a.dimensions.length>0},z=function(e){var t=e.exportFormat,r=e.maxDimensions,n=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>r&&r>0||s.excludedDimensions&&s.excludedDimensions.length&&s.dimensions.length+s.excludedDimensions.length>n)&&(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=[])),!r&&s.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))},W=function(e){var t,r=e.newProperties,n=e.dataDefinition,i=e.hypercubePath;if(n.dimensions&&"function"==typeof n.dimensions.added){var a=o.getValue(r,i||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return P(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 P(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?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.qDimensions=[],s.forEach(function(e){a.qDimensions.push(e),n.dimensions.added(e,r)})}},$=function(e){var t,r=e.newProperties,n=e.dataDefinition,i=e.hypercubePath;if(n.measures&&"function"==typeof n.measures.added){var a=o.getValue(r,i||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return R(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 R(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?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.qMeasures=[],s.forEach(function(e){a.qMeasures.push(e),n.measures.added(e,r)})}},H=function(e){var t=e.measures,r=e.modifierTypes;t&&r&&f().isSupportedModifiers(r)&&t.forEach(function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store})};function V(e,t){var r=o.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!r&&(Object.keys(r).forEach(function(t){o.setValue(e,t,r[t])}),delete e.qLayoutExclude.quarantine[t],!0)}const B={exportProperties:function(e){var t=e.propertyTree,r=e.hypercubePath,n=e.viewDataMode,i=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t={data:[],properties:{}},r=0;r<e;++r)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}(),a=t.qProperty,s=o.getValue(a,r||""),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}),r&&(i.properties.qHyperCubeDef=l,delete s.qHyperCubeDef),y({exportFormat:i,properties:a}),n||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,r=e.initialProperties,n=void 0===r?{}:r,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=j({exportFormat:t,initialProperties:n,hypercubePath:u}),v=o.getValue(n,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,P=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:P}),W({newProperties:g,dataDefinition:a,hypercubePath:u}),$({newProperties:g,dataDefinition:a,hypercubePath:u}),_({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,n),m.qProperty=g;var R=o.getValue(c||{},"support.modifiers");return H({measures:y.qMeasures,modifierTypes:R}),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,r,n){t=t||[];var i=c(e,n,r),o=c(t,n,r);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 r={};return t&&Object.keys(t).forEach(function(e){r[e]=t[e]}),r.id=e,r.qAttribute=!0,r},moveByIdFromGroup:function(e,t,r,n,i){r=r||"qAttributeExpressions",i=i||"id";for(var o=0;o<e.length;o++){var a=e[o][r],s=t.length;if(U(a,t,n,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,r){if(Array.isArray(e[t])){var n=d.findIndexByPropertyValue(e[t],"id",r);n>=0&&e[t].splice(n,1)}else e[t]=[]}function te(e,t){var r=K.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach(function(e){ee(e,"qAttributeDimensions",r),ee(e,"qAttributeExpressions",r)}),t.forEach(function(e){ee(e,"qAttributeDimensions",r),ee(e,"qAttributeExpressions",r)})}function re(e,t){if(t){var r="="===t.charAt(0);e.color.altLabel=r?{qStringExpression:{qExpr:t.substr(1)}}:t}}function ne(e){var t=e.properties,r=e.isDimension,n=e.dimensions,i=e.excludedDimensions,a=e.measures,s=e.label;te(n,i);var l=n[n.length-1];if(l){var u=r?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,r=e.label,n=e.item,i=e.isDimension,o=e.qNumFormat,a=e.isCustomFormatted;t.label=r||n.label,i?t.qDef=n.key:(t.qExpression=n.key,o&&(t.qNumFormat=o,t.isCustomFormatted=a)),t.matchMeasure=n.activeMeasureIndex,t.label&&"="===t.label.charAt(0)&&(t.labelExpRef="color.altLabel")}({attributeExpression:f,label:s,item:u,isDimension:r,qNumFormat:c,isCustomFormatted:p});break;case"libraryItem":!function(e){var t=e.attributeExpression,r=e.measures,n=e.item,i=e.qNumFormat,o=e.isCustomFormatted;e.isDimension||(t.matchMeasure=d.findIndexByPropertyValue(r,"qLibraryId",n.key),i&&(t.qNumFormat=i,t.isCustomFormatted=o)),void 0!==n.expression?t.qExpression=n.expression:t.qLibraryId=n.key,t.colorMapRef=n.key}({attributeExpression:f,measures:a,item:u,isDimension:r,qNumFormat:c,isCustomFormatted:p})}r?(f.qSortBy={qSortByAscii:1},l.qAttributeDimensions.push(f)):l.qAttributeExpressions.push(f)}}}function ie(e,t,r,n){var i,o,a,s={};switch(e){case"dimension":r.qLibraryId?(s.type="dimension",s.name=r.qLibraryId,s.id=r.qLibraryId):(s.type="field",t?(s.name=r.label||r.qDef,s.id=r.qDef):(s.name=r.qDef.qFieldDefs[0],s.label=(a=r.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)}(r,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}(r,n),o&&(s.expression=o)):(s.type="expression",t?(s.name=r.label||r.qExpression,s.id=r.qExpression):(s.name=r.qDef.qDef,s.label=function(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qLabel?t.qLabel:t.qDef}(r)));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,r,n){var i=t.type,o=e.color,a=o.mode,s=X.getItemLabel(t);switch(re(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 r=o.getValue(e,"".concat(t,"qDimensions"),[]),n=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byDimDef");if(a&&re(e,a.label),function(e){return!!(e&&e.activeDimensionIndex>-1)}(a))!function(e,t){var r=o.getValue(e,"".concat(t,"qDimensions"),[]),n=o.getValue(e,"color.byDimDef");n.activeDimensionIndex=Math.min(n.activeDimensionIndex,r.length-1);var i=ie("dimension",!1,r[n.activeDimensionIndex]);i.activeDimensionIndex=n.activeDimensionIndex,ae(e,i)}(e,t);else if(function(e){return!e||!e.key}(a)&&function(e,t){var r=o.getValue(e,"".concat(t,"qDimensions"),[]),n=r[function(e,t,r){var n=o.getValue(t,"visualization"),i=r.split("."),a=Number(i[1]),s=o.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===n&&"point"===s}(r,e,t)?0:r.length-1],i=K.IDMAP.COLOR_BY_ALTERNATIVE,a=d.findItemByPropertyValue(n.qAttributeDimensions,"id",i);return ae(e,ie("dimension",!!a,a||n)),!!a}(e,t))return;ne({properties:e,isDimension:!0,dimensions:r,excludedDimensions:i,measures:n,label:o.getValue(e,"color.byDimDef.label")})}const le=function(e,t,r){o.setValue(e,t,r),o.isAtomicValue(r)&&function(e,t,r){var n=e.qLayoutExclude;n&&(n.changed||(n.changed={}),n.changed[t]={from:o.getValue(e,t),to:r})}(e,t,r)},ue=function(e,t){var r={primary:!0};if(e){var n=(Q[t]||J).colorModeOptions||J.colorModeOptions;r.byDimension=n.dimension(e),r.byMeasure=n.measure(e),r.byMultiple=n.multiColor(e),r.byExpression=n.expression(e)}return r},ce=function(e){var t=e.canColorBy,r=e.autoColor,n=e.colorMode,i=e.dimensions;return!(t[n]&&!r&&("byDimension"!==n&&"byMeasure"!==n||!i.length))},de=function(e,t){var r,n=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):!(r={auto:i,colorMode:n,dimensions:a}).auto&&"byDimension"===r.colorMode&&r.dimensions.length>0?se(e,t):function(e){var t=e.auto,r=e.colorMode,n=e.dimensions,i=e.measures,a=e.properties,s=o.getValue(a,"visualization");return!(t||"byMeasure"!==r||!n.length||"map"!==s&&!i.length)}({auto:i,colorMode:n,dimensions:a,measures:s,properties:e})?function(e,t){var r=o.getValue(e,"".concat(t,"qDimensions"),[]),n=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byMeasureDef");if(a&&re(e,a.label),function(e){return!!(e&&e.activeMeasureIndex>-1)}(a))!function(e,t){var r=o.getValue(e,"".concat(t,"qMeasures"),[]),n=o.getValue(e,"color.byMeasureDef");if(n.activeMeasureIndex=Math.min(n.activeMeasureIndex,r.length-1),n.activeMeasureIndex>-1){var i=ie("measure",!1,r[n.activeMeasureIndex],!0);i.activeMeasureIndex=n.activeMeasureIndex,ae(e,i)}}(e,t);else if(function(e,t){return(!e||!e.key)&&t.length>0}(a,n)&&function(e,t){var r=o.getValue(e,"".concat(t,"qDimensions"),[]),n=o.getValue(e,"".concat(t,"qMeasures"),[]),i=r[r.length-1],a=K.IDMAP.COLOR_BY_ALTERNATIVE,s=d.findItemByPropertyValue(i.qAttributeExpressions,"id",a);return ae(e,ie("measure",!!s,s||n[0])),!!s}(e,t))return;ne({properties:e,isDimension:!1,dimensions:r,excludedDimensions:i,measures:n,label:o.getValue(e,"color.byMeasureDef.label")})}(e,t):function(e,t){var r=o.getValue(e,"color.mode"),n=o.getValue(e,"".concat(t,"qDimensions"),[]),i=o.getValue(e,"".concat(t,"qMeasures"),[]),a=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===r&&i.length<2&&o.setValue(e,"color.mode","primary"),te(n,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,r=e.properties,n=o.getValue(r,"qHyperCubeDef.qMeasures",[]),i=o.getValue(r,"color.mode","");return!t&&"byExpression"===i&&n.length>0},he=function(e){var t=o.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),r=o.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:r,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",[]),r=o.getValue(e,"color.persistent",!1);return t.length>1&&!r},ve={exportProperties:function(e){var t=e.propertyTree,r=e.hypercubePath,n=e.viewDataMode,i=B.exportProperties({propertyTree:t,hypercubePath:r,viewDataMode:n}),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,r=e.initialProperties,n=e.dataDefinition,i=e.defaultPropertyValues,a=e.hypercubePath,s=e.extension,l=e.supportedFilters,u=e.isHCModifierSupported,c=B.importProperties({exportFormat:t,initialProperties:r,dataDefinition:n,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,r=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?V(r,"unsupportedAutoMinMax")||w()(r.measureAxis,t.measureAxis):V(r,"supportedAutoMinMax")||w()(r.measureAxis,t.measureAxis)},xe=function(e){var t,r=e.exportFormat,n=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:r,initialProperties:n})){var l=function(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach(function(e){if(e.qDef.series){var r=e.qDef.series,n=r.type,i=r.axis;t[i]||(t[i]={axis:i,type:{line:0,marker:0,bar:0,total:0}}),ye.includes(n)&&t[i].type[n]++,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,r.properties.measureAxes[t[0].axis])):w()(s,r.properties.measureAxes[0])}},Se=function(e){if(e.qDimensions.length>1){var t=e.qInterColumnSortOrder.indexOf(0);if(0!==t){var r=e.qInterColumnSortOrder[0];e.qInterColumnSortOrder[0]=0,e.qInterColumnSortOrder[t]=r}}},we={exportProperties:function(e){var t=e.propertyTree,r=e.hypercubePath,n=e.viewDataMode,i=e.supportedAutoMinMax,o=void 0===i||i,a=ve.exportProperties({propertyTree:t,hypercubePath:r,viewDataMode:n}),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,r=e.initialProperties,n=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:r,dataDefinition:n,defaultPropertyValues:i,hypercubePath:o,extension:s,supportedFilters:l,isHCModifierSupported:u}),d=c.qProperty;return be({initialProperties:r,properties:d}),xe({exportFormat:t,initialProperties:r,properties:d,measureType:a}),Se(d.qHyperCubeDef),d.qHyperCubeDef.qColumnOrder=[],d.qHyperCubeDef.columnOrder=[],c}};function Ce(e,t,r){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(r)}function Ee(e){var t=e.properties,r=e.arrayPath,n=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,r,[]).forEach(function(e){return function(e){var t=e.properties,r=e.quarantineName,n=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(r,n,l);o.setValue(t,u,s),o.setValue(i,a,void 0)}}({properties:t,quarantineName:n,arrayName:i,item:e,itemPath:a})})}function Ie(e){var t=e.properties,r=e.arrayPath,n=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,r,[]).forEach(function(e){return function(e){var t=e.properties,r=e.quarantineName,n=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,"qDef.cId");if(s){var l=Ce(r,n,s),u=o.getValue(t,l);void 0!==u&&(o.setValue(i,a,u),o.setValue(t,l,void 0))}}({properties:t,quarantineName:n,arrayName:i,item:e,itemPath:a})})}var De="qHyperCubeDef.qMeasures",Pe="conditionalColoring",Re="measures",Me="qDef.conditionalColoring";const Le={quarantine:function(e){Ee({properties:e,arrayPath:De,quarantineName:Pe,arrayName:Re,itemPath:Me})},unquarantine:function(e){Ie({properties:e,arrayPath:De,itemPath:Me,arrayName:Re,quarantineName:Pe})}};var Ae="qHyperCubeDef.qMeasures",ke="measures",Oe="qHyperCubeDef.qDimensions",qe="dimensions",Te="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",Ne="alternativeMeasures",_e="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",je="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:_e,quarantineName:ze,arrayName:je,itemPath:Fe})},unquarantineAlternative:function(e){Ie({properties:e,arrayPath:Te,quarantineName:ze,arrayName:Ne,itemPath:Fe}),Ie({properties:e,arrayPath:_e,quarantineName:ze,arrayName:je,itemPath:Fe})}},$e={hypercube:B,colorChart:ve,axisChart:we,quarantineProperty:x,unquarantineProperty:V,quarantineArrayProp:Ee,unquarantineArrayProp:Ie,conditionalColoring:Le,conditionalShow:We}})(),n.default})()}(Uj);var Yj=En(Uj.exports);const Kj="qHyperCubeDef.qMeasures",Xj="measures",Jj="qHyperCubeDef.qDimensions",Zj="dimensions",Qj="qDef.representation",eF="tableRepresentation",tF="qDef.conditionalColoring",rF="conditionalColoring",nF="qMiniChartDef",iF="miniChartDef",oF=e=>{Yj.unquarantineArrayProp({properties:e,arrayPath:Jj,itemPath:Qj,arrayName:Zj,quarantineName:eF}),Yj.unquarantineArrayProp({properties:e,arrayPath:Kj,itemPath:Qj,arrayName:Xj,quarantineName:eF}),Yj.unquarantineArrayProp({properties:e,arrayPath:Kj,itemPath:tF,arrayName:Xj,quarantineName:rF}),Yj.unquarantineArrayProp({properties:e,arrayPath:Kj,itemPath:nF,arrayName:Xj,quarantineName:iF})},aF=e=>{Yj.quarantineArrayProp({properties:e,arrayPath:Jj,itemPath:Qj,arrayName:Zj,quarantineName:eF}),Yj.quarantineArrayProp({properties:e,arrayPath:Kj,itemPath:Qj,arrayName:Xj,quarantineName:eF}),Yj.quarantineArrayProp({properties:e,arrayPath:Kj,itemPath:tF,arrayName:Xj,quarantineName:rF}),Yj.quarantineArrayProp({properties:e,arrayPath:Kj,itemPath:nF,arrayName:Xj,quarantineName:iF})};function sF(e){const{translator:t}=e;return{targets:[{path:"/qHyperCubeDef",dimensions:{min:1,max:1e3,description(e,r,n){const i="rows"===n?.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 lF="qHyperCubeDef.qDimensions",uF="dimensions",cF="qOtherTotalSpec.qTotalMode",dF="totalMode",pF={quarantine(e){Yj.quarantineArrayProp({properties:e,arrayPath:lF,quarantineName:dF,arrayName:uF,itemPath:cF})},unquarantine(e){Yj.unquarantineArrayProp({properties:e,arrayPath:lF,quarantineName:dF,arrayName:uF,itemPath:cF})}};function fF(e){const t=sF(e);return(e,r,n,i)=>{const o=Yj.hypercube.importProperties({exportFormat:e,initialProperties:r,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&&N_(o,"qProperty.qLayoutExclude.quarantine.interColSortOrder",u.concat());const d=o.qProperty.qLayoutExclude.quarantine?.pivotInterColSortOrder;d?(u=d,l=[...d],N_(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&&N_(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&&(Yj.unquarantineProperty(o.qProperty,"noOfLeftDims"),Yj.unquarantineProperty(o.qProperty,"excludedNoOfLeftDims "))}return Yj.unquarantineProperty(o.qProperty,"rankedList"),Yj.conditionalShow.unquarantine(o.qProperty),pF.unquarantine(o.qProperty),oF(o.qProperty),Yj.unquarantineProperty(o.qProperty,"pivotTableIndentMode"),o}}function hF(e,t){const r=e.qProperty.qHyperCubeDef.qInterColumnSortOrder,n=r.slice(),i=r.indexOf(-1);i>-1&&r.splice(i,1);const o=Yj.hypercube.exportProperties({propertyTree:e,hyperCubePath:t}),a=o.properties.qHyperCubeDef,s=a.qDimensions.length,l=a.qMeasures.length;let u=a.qInterColumnSortOrder;N_(o,"properties.qLayoutExclude.quarantine.pivotInterColSortOrder",n),Yj.quarantineProperty(o.properties,"qHyperCubeDef.qNoOfLeftDims","noOfLeftDims"),delete o.properties.qHyperCubeDef.qNoOfLeftDims,Yj.quarantineProperty(o.properties,"qHyperCubeDef.rankedList","rankedList"),delete o.properties.qHyperCubeDef.rankedList;const c=o.properties.qLayoutExclude.quarantine?.interColSortOrder;c&&(u=c,N_(o,"properties.qHyperCubeDef.qInterColumnSortOrder",u),N_(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 Yj.quarantineProperty(o.properties,"qHyperCubeDef.qIndentMode","pivotTableIndentMode"),Yj.quarantineProperty(o.properties,"qHyperCubeDef.excludedNoOfLeftDims ","excludedNoOfLeftDims "),Yj.conditionalShow.quarantine(o.properties),pF.quarantine(o.properties),aF(o.properties),o}const mF=e=>({dimensions:{min:1,max:1e3,description(t,r,n){const i="rows"===n?.type?"Visualizations.Descriptions.Row":"Visualizations.Descriptions.Column";return e.translator.get(i)}},measures:{min:1,max:1e3,description:()=>e.translator.get("Visualizations.Descriptions.Values")}}),gF={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}}}};let vF=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}({}),yF=function(e){return e.Attribute="attribute",e.Dimension="dimension",e}({});const bF=e=>{switch(e?.type){case"url":return vF.Link;case"image":return vF.Image;case"indicator":return vF.Indicator;case"miniChart":return vF.MiniChart;default:return vF.Text}},xF=({isImagesEnabled:e})=>({uses:"dimensionRepresentationItems.representationType",options(t,r,n){const{qIndentMode:i}=n.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}}),SF=e=>{if(e)return{representationImage:{uses:"dimensionRepresentationItems.representationImage",show:e=>bF(e.qDef.representation)===vF.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,r)=>{if(!r.properties.qHyperCubeDef)return!1;const{qInterColumnSortOrder:n,qNoOfLeftDims:i,qDimensions:o,qIndentMode:a}=r.properties.qHyperCubeDef;let s=!1;n?.indexOf(-1);const l=o?.indexOf(e)??1/0;return(n?.slice(0,i)??[]).indexOf(l)>-1&&(s=!0),s&&a}}}}}},wF=e=>{const{anything:t}=e,r=!t.sense?.isUnsupportedFeature?.("tableImages");return{representationType:xF({isImagesEnabled:r}),representationUrlPosition:{uses:"dimensionRepresentationItems.representationUrlPosition",show:e=>bF(e.qDef.representation)===vF.Link},representationUrlLabel:{uses:"dimensionRepresentationItems.representationUrlLabel",show:e=>bF(e.qDef.representation)===vF.Link&&e.qDef.representation?.urlPosition===yF.Dimension},representationLinkUrl:{uses:"dimensionRepresentationItems.representationLinkUrl",show:e=>bF(e.qDef.representation)===vF.Link&&e.qDef.representation?.urlPosition===yF.Attribute},...SF(r)}},CF=(e,t)=>{const{anything:r}=e,n=r.sense?.isUnsupportedFeature,i=!n?.("tableImages")&&t[vF.Image],o=!n?.("qMiniChartDef")&&t[vF.MiniChart],a=!n?.("tableIndicators")&&t[vF.Indicator],s=i&&t[vF.ImagesInIndentMode];return{representationType:{uses:"measureRepresentationItems.representationType",options:(e,t,r)=>(e=>{const{qIndentMode:t}=e.properties.qHyperCubeDef??{},r=[{value:"text",translation:"Object.Table.Representation.Text"}];return(!t&&i||t&&s)&&r.push({value:"image",translation:"Object.Table.Representation.Image"}),a&&r.push({value:"indicator",translation:"Object.Table.Representation.Indicator"}),o&&r.push({value:"miniChart",translation:"Common.MiniChart"}),r})(r)},representationImage:i?{uses:"measureRepresentationItems.representationImage",show:e=>bF(e.qDef.representation)===vF.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 EF=function(e){return e.Dimension="dimensions",e.Measures="measures",e.Pivot="pivot",e}({}),IF=function(e){return e.CellForegroundColor="cellForegroundColor",e.CellBackgroundColor="cellBackgroundColor",e.ImageUrl="imageUrl",e.ImageLabel="imageLabel",e.Link="url",e.LinkLabel="urlLabel",e}({}),DF=function(e){return e.TopGrid="topGrid",e.LeftGrid="leftGrid",e.DataGrid="dataGrid",e}({}),PF=function(e){return e.Forward="forward",e.Backward="backward",e.None="none",e}({});const RF="image",MF=(e,t,r)=>{if(!r.properties.qHyperCubeDef.qIndentMode)return!0;const n=r.properties.qHyperCubeDef.qInterColumnSortOrder?.indexOf(-1)??-1;let i=r.properties.qHyperCubeDef.qNoOfLeftDims??-1;n>-1&&n<i&&(i-=1);const o=r.properties.qHyperCubeDef.qDimensions.indexOf(e);return 0===o||o>=i},LF=()=>({type:{type:"string",component:"dropdown",ref:"qDef.columnWidth.type",translation:"Object.Table.Column.Width",options:[{value:xT.Auto,translation:"Common.Auto"},{value:xT.FitToContent,translation:"Object.Table.Column.FitToContent"},{value:xT.Pixels,translation:"Object.Table.Column.Pixels"},{value:xT.Percentage,translation:"Object.Table.Column.Percentage"}],defaultValue:xT.Auto},sizePixels:{ref:"qDef.columnWidth.pixels",translation:"Object.Table.Column.Pixels",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:bT.PixelsDefault,show:e=>e.qDef.columnWidth?.type===xT.Pixels},sizePercentage:{ref:"qDef.columnWidth.percentage",translation:"Object.Table.Column.Percentage",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:bT.PercentageDefault,show:e=>e.qDef.columnWidth?.type===xT.Percentage}}),AF=({key:e,translation:t,env:r})=>{const n=!r.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=>!n||"labelTextAlign"===e||t.qDef.representation?.type!==RF},[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&&(!n||"labelTextAlign"===e||t.qDef.representation?.type!==RF)}}},kF="TOTAL_OFF",OF={component:"attribute-expression-reference",defaultValue:[],ref:"qAttributeExpressions",items:[{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.BackgroundExpression",defaultValue:"",id:IF.CellBackgroundColor},{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.ForegroundExpression",defaultValue:"",id:IF.CellForegroundColor},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:IF.LinkLabel,tid:"URLLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:IF.Link,tid:"URLByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:IF.ImageLabel,tid:"ImageLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:IF.ImageUrl,tid:"ImageUrlByExpression",show:!1}]},qF="TOTAL_OFF",TF={component:"attribute-expression-reference",defaultValue:[],ref:"qAttributeExpressions",items:[{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.BackgroundExpression",defaultValue:"",id:IF.CellBackgroundColor},{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.ForegroundExpression",defaultValue:"",id:IF.CellForegroundColor},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:IF.LinkLabel,tid:"URLLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:IF.Link,tid:"URLByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:IF.ImageLabel,tid:"ImageLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:IF.ImageUrl,tid:"ImageUrlByExpression",show:!1}]},NF=e=>{const{translator:t,anything:r,flags:n}=e,i=(e=>{const{translator:t,anything:r}=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:kF,trueOption:{value:"TOTAL_EXPR",translation:"properties.on"},falseOption:{value:kF,translation:"properties.off"},show:!r.sense?.isUnsupportedFeature?.("totals")&&MF},totalsLabel:{type:"string",component:"expression",expressionType:"StringExpr",ref:"qTotalLabel",translation:"properties.totals.label",defaultValue:()=>t.get("Object.Table.Totals"),show:(e,t,n)=>!r.sense?.isUnsupportedFeature?.("totals")&&e.qOtherTotalSpec?.qTotalMode!==kF&&MF(e,0,n)},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:OF,...AF({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...AF({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...wF(e),...LF()}}}},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:OF,...AF({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...AF({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...CF(e,{[vF.Image]:!0,[vF.Indicator]:!0}),...LF()}}}},filter:{type:"object",component:"filter-item-react",ref:"filter",tabName:"SimpleProperties.Filters.Filters"}}}})(e);return n.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:qF,trueOption:{value:"TOTAL_EXPR",translation:"properties.on"},falseOption:{value:qF,translation:"properties.off"},show:!r.sense?.isUnsupportedFeature?.("totals")&&MF},totalsLabel:{type:"string",component:"expression",expressionType:"StringExpr",ref:"qTotalLabel",translation:"properties.totals.label",defaultValue:()=>t.get("Object.Table.Totals"),show:(e,t,n)=>!r.sense?.isUnsupportedFeature?.("totals")&&e.qOtherTotalSpec?.qTotalMode!==qF&&MF(e,0,n)},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:TF,...AF({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...AF({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...wF(e),...LF()}},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:TF,...AF({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...AF({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...CF(e,{[vF.Image]:!0,[vF.ImagesInIndentMode]:!0,[vF.Indicator]:!0}),...LF()}},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"}}}}}},_F=(e,t,r,n)=>({ref:e,translation:t,dualOutput:!0,type:"object",component:"color-picker",width:"auto",disableNone:n??!1,defaultValue(e,t,i){const o=n?.(e,t,i)??!1,a=i.theme.current(),s=r(a,o);return{color:"transparent"===s?"none":s}}}),jF=(e,t=!1)=>{return{value:e,label:t?(r=e,r.charAt(0).toUpperCase()+r.slice(1)):e,groupHeader:!1,disabled:!1,styles:t?{fontFamily:e}:void 0};var r},FF=({ref:e,themeAccessor:t,translator:r,flags:n})=>({component:"dropdown",ref:e,options:(e,i,o)=>{const a=o.theme.current();return((e,t,r,n)=>{const i=t.fontFamily??"Source Sans Pro, sans-serif",o=t.fontFamilies??[],a=Array.from(new Set([e,i,...o])),s=[{value:"ThemeHeader",label:r.get("properties.themeFonts"),metaText:r.get("properties.theme"),groupHeader:!0},...a.sort().map(e=>jF(e,!0))],l=[{value:"DefaultHeader",label:r.get("properties.allFonts"),metaText:r.get("properties.default"),groupHeader:!0},...TN(n).filter(e=>!a.includes(e)).map(e=>jF(e,!0))];return[...s,...l.length>1?l:[]]})(t(a),a,r,n)},defaultValue:(e,r,n)=>t(n.theme.current())}),zF=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],WF=({ref:e,themeAccessor:t,translator:r})=>({component:"dropdown",ref:e,options:(e,n,i)=>{const o=i.theme.current();return((e,t,r)=>{const n=t.fontSize,i=t.fontSizes??[],o=Array.from(new Set([e,n,...i])),a=[{value:"ThemeHeader",label:r.get("properties.themeFontSizes"),metaText:r.get("properties.theme"),groupHeader:!0},...o.sort((e,t)=>parseInt(e,10)-parseInt(t,10)).map(e=>jF(e,!1))],s=[{value:"DefaultHeader",label:r.get("properties.allFontSizes"),metaText:r.get("properties.default"),groupHeader:!0},...zF.filter(e=>!o.includes(e)).map(e=>jF(e,!1))];return[...a,...s.length>1?s:[]]})(t(o),o,r)},defaultValue:(e,r,n)=>t(n.theme.current())}),$F=({section:e,defaultFontStyle:t,translator:r,flags:n,getThemeValue:i,translation:o,disableNoneCallback:a})=>({component:"panel-section",translation:o??`properties.pivot.${e}`,items:{content:{component:"items",ref:"components",key:"theme",items:{fontFamily:FF({ref:`${e}.fontFamily`,themeAccessor:t=>i(t,e,"fontFamily")??t.fontFamily,translator:r,flags:n}),fontWrapperItem:{component:"inline-wrapper",items:{fontStyle:{component:"font-style-buttons",width:!1,ref:`${e}.fontStyle`,defaultValue:t??[]},fontSize:WF({ref:`${e}.fontSize`,themeAccessor:t=>i(t,e,"fontSize")??t.fontSize,translator:r}),fontColor:_F(`${e}.fontColor`,void 0,t=>i(t,e,"color")??t.color)}},background:_F(`${e}.background`,"properties.background",(t,r)=>{const n=r?oN.WHITE:oN.TRANSPARENT;return i(t,e,"backgroundColor")??n},a)}}}}),HF=({section:e,defaultFontStyle:t,fallbackBackground:r,getThemeValue:n})=>({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:_F(`${e}.fontColor`,void 0,t=>n(t,e,"color")??t.color)}},background:_F(`${e}.background`,"properties.background",t=>n(t,e,"backgroundColor")??r??"transparent")}}}}),VF=(e,t)=>({component:"dropdown",ref:e,translation:t,options:[...Array(10).keys()].map(e=>({value:e+1,translation:e+1})),defaultValue:1}),BF="12px",GF="Source Sans Pro, sans-serif",UF="600",YF=15e3,KF=4/3;let XF=function(e){return e.Transparent="transparent",e.FontSecondary="#737373",e.DividerDark="#595959",e.DividerLight="#D9D9D9",e.NullValueBackground="#F2F2F2",e}({}),JF=function(e){return e.Solid="solid",e.None="none",e}({});const ZF={display:"flex",justifyContent:"center",alignItems:"center"},QF={borderStyle:"solid"},ez={boxSizing:"border-box",padding:"4px 8px",userSelect:"none",WebkitUserSelect:"none"},tz={lineHeight:KF,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},rz=e=>({whiteSpace:"unset",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",wordBreak:e>1?"break-word":"break-all"}),nz=(e,t)=>e>0?`${e}px ${JF.Solid} ${t}`:JF.None,iz=(e,t,r,n,i)=>{const o=Number(!t||i?.right),a=Number(!e||i?.bottom);return{borderRight:"rtl"!==n?nz(o,r):JF.None,borderBottom:nz(a,r),borderLeft:"rtl"===n?nz(o,r):JF.None,borderTop:JF.None}},oz=(e,t,r,n,i,o,a)=>{const s=iz(t,n,i,o,a);return e.isLeftDimension||(e.isLastDimension&&!t&&(s.borderBottom=nz(2,i)),r||(s.borderLeft="rtl"!==o?nz(1,i):"none",s.borderRight="rtl"===o?nz(1,i):"none")),s},az=({bottomDivider:e,rightDivider:t,borderColor:r})=>{const n={};return e&&(n.borderBottom=nz(1,r)),t&&(n.borderRight=nz(1,r)),n},sz=(e,t,r)=>{switch(t){case"header":return e.object?.pivotTableV2?.dimension?.label?.name?.[r];case"dimensionValues":return e.object?.pivotTableV2?.dimension?.label?.value?.[r];case"measureLabels":return e.object?.pivotTableV2?.measure?.label?.name?.[r];case"measureValues":return e.object?.pivotTableV2?.measure?.label?.value?.[r];case"totalValues":return e.object?.pivotTableV2?.total?.label?.value?.[r];case"nullValues":return e.object?.pivotTableV2?.null?.label?.value?.[r];default:return}},lz=(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:$F({section:"header",defaultFontStyle:["bold"],translator:e,flags:t,getThemeValue:sz}),dimensionValueSection:$F({section:"dimensionValues",translator:e,flags:t,getThemeValue:sz}),measureValueSection:$F({section:"measureValues",translator:e,flags:t,getThemeValue:sz}),measureLabelSection:HF({section:"measureLabels",getThemeValue:sz}),totalValuesSection:HF({section:"totalValues",defaultFontStyle:["bold"],getThemeValue:sz}),nullValuesSection:HF({section:"nullValues",fallbackBackground:XF.NullValueBackground,getThemeValue:sz}),gridSection:{translation:"properties.pivot.grid",component:"panel-section",items:{gridItems:{component:"items",ref:"components",key:"theme",items:{lineClamp:VF("grid.lineClamp","ThemeStyleEditor.style.rowHeight"),columnLineClamp:VF("grid.columnLineClamp","ThemeStyleEditor.style.columnHeight"),border:_F("grid.border","properties.border",e=>e.object?.pivotTableV2?.grid?.borderColor??XF.DividerLight),divider:_F("grid.divider","properties.pivot.divider",e=>e.object?.pivotTableV2?.grid?.divider?.borderColor??XF.DividerDark),background:_F("grid.background","properties.background",e=>e.object?.pivotTableV2?.grid?.backgroundColor??XF.Transparent)}}}}}}]}),uz=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}}},cz=(e,t)=>({uses:"settings",items:{presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:[lz(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:xT.Auto,translation:"Common.Auto"},{value:xT.Pixels,translation:"Object.Table.Column.Pixels"},{value:xT.Percentage,translation:"Object.Table.Column.Percentage"}],defaultValue:xT.Auto,show:e=>!!e.qHyperCubeDef.qIndentMode},sizePixels:{ref:"qHyperCubeDef.indentModeColumnWidth.pixels",translation:"Object.Table.Column.Pixels",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:bT.PixelsDefault,show:e=>{const t=e.qHyperCubeDef;return t.qIndentMode&&t.indentModeColumnWidth?.type===xT.Pixels}},sizePercentage:{ref:"qHyperCubeDef.indentModeColumnWidth.percentage",translation:"Object.Table.Column.Percentage",component:"expression",expressionType:"ValueExpression",expression:"optional",defaultValue:bT.PercentageDefault,show:e=>{const t=e.qHyperCubeDef;return t.qIndentMode&&t.indentModeColumnWidth?.type===xT.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,r,n){e.qHyperCubeDef.qExpansionState=[],n.$emit("saveProperties",e)}}}}]},...uz(t)}}),dz="auto",pz={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:dz,translation:"Object.Table.SortingInSearch",options:[{value:dz,translation:"Common.Auto"},{value:"inherit",translation:"Object.Table.SortingInSearch.InheritFromDimension"}]}}};function fz(e){const{translator:t,flags:r}=e;return{type:"items",component:"accordion",items:{data:NF(e),sorting:pz,addons:gF,settings:cz(t,r)}}}function hz(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:fz(e),importProperties:fF(e),exportProperties:hF,exploration:Pj(e),data:mF(e),propertyHandler:e.flags.isEnabled("VNA-147_NEBULA_PIVOT_DATA_HANDLERS")?t=>new Gj(t,e.translator):void 0}}const mz=()=>{let e;return{promise:new Promise(t=>{e=t}),resolve:e}};function gz(e,t){return R(()=>e,t)}const vz={},yz=e=>{const t=R(()=>({current:vz}),[]);return t.current=t.current===vz?e:t.current,t},bz=e=>!!e&&0===bN(e).a,xz="#grid",Sz=(e,t)=>{const r=t?.closest(e);return r&&window.getComputedStyle(r).backgroundColor},wz=(e,t,r,n,i)=>{const o=Sz(".qv-object .qv-inner-object",r),a=Sz(".qv-panel-sheet",r),s=Sz(xz,r)??a,l=(e=>{const t=e.components?.find(e=>"general"===e.key),r=t?.bgColor?.colorExpression,n=t?.bgColor?.color?.color,i=t?.bgColor?.useColorExpression;if(i&&r)return K_(r);if("none"===n)return"transparent";if(void 0===n)return;const o=bN(n);return o.setAlpha(t?.bgColor?.color?.alpha??o.a),o.getRGBA()})(e),u=n?.(t),c=i?.(t),d=l||u||o||c,p=bz(d),f=!bz(h=p?s:d)&&G_(h,oN.TEXT,oN.DARK_MODE_TEXT)===fN(oN.DARK_MODE_TEXT);var h;const m=((e,t,r,n=oN.WHITE)=>e&&!bz(e)?e:bz(t)?r&&!bz(r)?r:n:t)(l,d,s);return{color:d,headerColor:m,isDark:f}},Cz=(e,t,r,n)=>{const i=O(),o=((e,t={attributeFilter:["style"],childList:!1,subtree:!1})=>{const[r,n]=A([]);return k(()=>{let r;return e&&(r=new MutationObserver(e=>{n(e)}),r.observe(e,t)),()=>{r?.disconnect()}},[e,t]),r})(t.closest(xz),{attributeFilter:["style"],childList:!1,subtree:!1,attributeOldValue:!0}).filter(({oldValue:e})=>e?.includes("background")).map(({oldValue:e})=>e).join(",");return R(()=>({...i,background:wz(e,i,t,r,n)}),[i.name(),t,r,n,e,o])};function Ez(e,t){const r=R(()=>({isLoading:!0}),t),[n,i]=L(async()=>{try{return await e()}finally{r.isLoading=!1}},t);return[n,r.isLoading,i]}const Iz=3,Dz=/\n/g;function Pz(e,t,r){let n=0,i=e.length;if(Number.isNaN(t))return null;if(e.length<=1)return null;if(r(e)<=t)return null;for(;n<=i;){const o=Math.floor((n+i)/2),a=e.slice(0,o),s=e.slice(0,o-1),l=r(a),u=r(s);if(l>t&&u<=t)return e.slice(o-1)||null;if(l===t)return e.slice(o)||null;l<t?n=o+1:i=o}return null}function Rz({fontSize:e="12px",fontFamily:t="Source Sans Pro, Arial, sans-serif",fontStyle:r="normal",fontWeight:n="normal"},i){const{maxNbrLinesOfText:o=Iz,allowLineBreaks:a=!0}=i??{},{estimateWidth:s,measureText:l,estimateLineCount:u}=v(()=>(({fontSize:e="12px",fontFamily:t="Source Sans Pro, Arial, sans-serif",fontStyle:r="normal",fontWeight:n="normal"},i)=>{const{maxNbrLinesOfText:o=Iz,allowLineBreaks:a=!0}=i??{};return()=>{const i=document.createElement("canvas").getContext("2d");i.font=`${r} ${n} ${e} ${t}`;const s=i.measureText.bind(i),l=__(e=>{if(void 0===e)return 0;if(a){const t=e.split(Dz).map(e=>s(e).width);return t.reduce((e,t)=>t>e?t:e,0)}const t=e.replace(Dz," ");return s(t).width}),u=e=>+l(e).toFixed(2),c=__(({text:e,maxWidth:t,isNumeric:r=!1})=>{if(r)return 1;const n=a?e.split(Dz):[e];let i=0;for(const e of n){let r=e;do{i+=1,r=Pz(r,t,u)}while(null!==r&&i<o);if(i>=o)break}return i},({text:e,maxWidth:t,isNumeric:r})=>`${e}-${t}-${r?"true":"false"}`);return{measureText:e=>l(e),estimateWidth:e=>l("N")*e,estimateLineCount:c}}})({fontStyle:r,fontWeight:n,fontSize:e,fontFamily:t},{maxNbrLinesOfText:o,allowLineBreaks:a})(),[r,n,e,t,o,a]);return{estimateWidth:s,measureText:l,estimateLineCount:u}}var Mz,Lz=E;Mz=Lz.createRoot,Lz.hydrateRoot;const Az="Source Sans Pro, sans-serif";function kz(e,t){const[r,n]=m(t);r.some((e,r)=>e!==t[r])&&(n(t),e())}var Oz={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 qz=({translator:e})=>(v(()=>{!function(e){if(e&&e.get&&e.add){const t="NebulaTableUtils.MenuGroupLabel.Sorting";if(e.get(t)!==t)return;Object.keys(Oz).forEach(t=>{e.add(Oz[t])})}}(e)},[e]),e),Tz={width:"100%",height:"100%",color:"transparent",background:"transparent",borderColor:"transparent"},Nz={border:0,boxShadow:"none",borderRadius:0,outline:0,width:0,height:0,background:"transparent",cursor:"pointer",visibility:"hidden"},_z=fl("input",{shouldForwardProp:e=>"isLastColumn"!==e&&"hoverColor"!==e})(({isLastColumn:e,hoverColor:t,dir:r})=>({position:"absolute",display:"flex",height:"100%",top:0,marginLeft:"-4px",marginRight:"rtl"===r?"-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":{...Tz},"&::-moz-range-track":{...Tz},"&::-ms-track":{...Tz},"&::-webkit-slider-thumb":{appearance:"none",WebkitAppearance:"none",...Nz},"&::-moz-range-thumb":{...Nz},"&::-ms-thumb":{...Nz},"&: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"}})),jz=({columnWidth:e,keyValue:t,isLastColumn:r,isPivot:n,hoverColor:i,updateWidthCallback:o,confirmWidthCallback:a,handleBlur:s,setIsAdjustingWidth:u,isLeftColumn:c,accessibilityRelatedArgs:d,direction:p="ltr"})=>{const f=qz({translator:d.translator}),h=l({initWidth:e,columnWidth:e,initX:0}),m=r?0:1,g=n&&!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}};kz(()=>{g&&b()},[e]);const x=e=>{const t=Math.max(e,bT.PixelsMin);h.current.columnWidth=t,o(t)},S=()=>{if(h.current.columnWidth!==h.current.initWidth){const e={type:xT.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=>{X_(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=>{X_(e),document.removeEventListener("touchmove",E),document.removeEventListener("touchend",I),S()},D=!n&&s?e=>{if(e.key===vT.Left||e.key===vT.Right){X_(e);const t=5,r=e.key===vT.Left?t:-t,n="rtl"===p?r:-r;u?.(!0),x(h.current.columnWidth+n)}else e.key===vT.Space||e.key===vT.Enter?(X_(e),s(e),u?.(!1),S()):e.key===vT.Esc&&(X_(e),s(e),u?.(!1),x(h.current.initWidth))}:void 0,P=f.get("NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",[String(d.columnLabel)]);return io.jsx(_z,{style:y,hoverColor:i,isLastColumn:r,className:yT,"data-testid":yT,onMouseDown:e=>{X_(e),document.addEventListener("mousemove",w),document.addEventListener("mouseup",C),u?.(!0),b(e.clientX)},onDoubleClick:()=>{a({type:xT.FitToContent})},onTouchStart:e=>{1===e.touches.length&&(X_(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":P,"aria-valuemin":bT.PixelsMin,"aria-valuemax":bT.PixelsMax,"aria-valuenow":Number(e.toFixed(1)),dir:p},t)},Fz=x((e,t)=>io.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:io.jsx("path",{d:"M15 4H1V2h14zm0 10H1v-2h14zm0-5H1V7h14z"})})),zz=fl(Qu,{shouldForwardProp:e=>"rightAligned"!==e&&"shouldShowMenuIcon"!==e&&"isAccessibleHeader"!==e})(({rightAligned:e,shouldShowMenuIcon:t,isAccessibleHeader:r})=>({...e?{marginRight:"auto"}:{marginLeft:"auto"},height:r?24:void 0,display:t?"flex":"none",fontWeight:"bold",width:r?"100%":void 0,alignItems:"center",justifyContent:"center"})),Wz=fl(Fz,{shouldForwardProp:e=>"isInteractionsActive"!==e})(({isInteractionsActive:e})=>({minWidth:"unset",position:"relative",cursor:e?"pointer":"default"})),$z=fl(hp)(({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}})),Hz=fl(Uc)(({theme:e})=>({"&.MuiDivider-root":{margin:e.spacing(.5)}})),Vz=fl(bp)(({theme:e})=>({fontSize:"12px",height:24,fontWeight:"bold",padding:`${e.spacing(.25,2)} !important`,marginBottom:e.spacing(.5)})),Bz=fl(bp,{shouldForwardProp:e=>"isSubMenu"!==e&&"isActive"!==e})(({theme:e,isSubMenu:t,isActive:r})=>({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:r?"rgba(0, 0, 0, 0.05)":"transparent"})),Gz=fl("div",{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})(({theme:e,direction:t,isPagination:r})=>({position:"absolute",width:e.spacing(.5),height:16,left:0,right:r||"rtl"!==t?void 0:0,top:"50%",transform:"TranslateY(-50%)",borderRadius:"0 2px 2px 0",background:"#01873d"})),Uz=fl("div")(()=>({display:"flex",justifyContent:"space-between",alignItems:"center",maxWidth:"100%"})),Yz=fl(mu)(()=>({fontFamily:'"Source Sans Pro", HelveticaNeue, "Helvetica Neue", Helvetica, Arial, sans-serif',fontSize:"14px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"})),Kz=fl(Wd,{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})(({theme:e,direction:t,isPagination:r})=>({width:16,minWidth:"unset !important",marginRight:r||"rtl"!==t?e.spacing(1.5):0,marginLeft:r||"rtl"!==t?void 0:e.spacing(1.5),lineHeight:0})),Xz=x((e,t)=>io.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:io.jsx("path",{d:"M8.5 8 4 3.5 5.5 2l6 6-6 6L4 12.5z"})})),Jz=e=>{const t=e.nextElementSibling;return t?"HR"===t.tagName?Jz(t):t:e.parentElement?.children?.[0]},Zz=e=>{const t=e.previousElementSibling;if(!t){const t=e.parentElement?.children?.length;return e.parentElement?.children?.[t-1]}return"HR"===t.tagName?Zz(t):t},Qz=e=>{const{key:t,currentTarget:r}=e,n=document.activeElement??r;if(t===vT.Down||t===vT.Up){const r=e=>t===vT.Down?Jz(e):Zz(e);e.preventDefault(),e.stopPropagation();let i=r(n);for(;i;){if("true"!==i.ariaDisabled){i.focus();break}i=r(i)}}},eW=(e,t)=>e.map(e=>e.map(e=>({...e.groupHeading?{groupHeading:e.groupHeading}:{},items:e.items.map(({onClick:e,...r})=>({...r,...e?{onClick:async r=>{Object.entries(t).forEach(([,e])=>{e(!1)}),await e(r)}}:{}}))})));let tW={};const rW=({autoFocus:e,id:t,onClick:n,itemTitle:i,icon:o,enabled:a,subMenus:s,isSubMenu:l,isActive:u,direction:c,isPagination:d})=>{const[p,h]=m(!1),g=r.useRef(null),v=f(e=>{e.stopPropagation(),h(!1)},[h]);return io.jsxs(io.Fragment,{children:[io.jsxs(Bz,{ref:s?g:null,"data-testid":`menu-item-${t}`,className:"nebula-table-utils-head-menu-item",onClick:async e=>{"keyup"!==e.type&&(n&&(await n(e),tW={}),s?.length&&(h(!0),tW[i]=h,e.stopPropagation()))},disabled:!a,autoFocus:e,isSubMenu:!!l,isActive:!!u,onKeyDown:Qz,children:[u?io.jsx(Gz,{direction:c,isPagination:d}):null,io.jsxs(Uz,{children:[io.jsx(Kz,{direction:c,isPagination:d,children:io.jsx(o,{})}),io.jsx(Yz,{variant:"body2",children:i})]}),s?.length?io.jsx(Xz,{}):null]},t),s?.length?io.jsx(aW,{isSubMenu:!0,open:p,anchorEl:g.current,onClose:v,menuGroups:eW(s,tW),transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},direction:c,isPagination:d}):null]})},nW=({menuGroup:e,isSubMenu:t,direction:r,isPagination:n})=>e.map(e=>[[e.groupHeading&&io.jsx(Vz,{disabled:!0,style:{opacity:1},children:e.groupHeading},e.groupHeading),e.items.map(e=>io.jsx(rW,{...e,isSubMenu:t,direction:r,isPagination:n},e.id))].filter(Boolean)]),iW=({itemGroups:e,isSubMenu:t,direction:r,isPagination:n})=>e.map((i,o)=>[nW({menuGroup:i,isSubMenu:t,direction:r,isPagination:n}),o<e.length-1?io.jsx(Hz,{"data-testid":"group-divider",variant:"middle"}):void 0]),oW={appear:0,enter:0,exit:0},aW=({anchorEl:e,open:t,onClose:r,menuGroups:n,transformOrigin:i,anchorOrigin:o,isSubMenu:a,direction:s,isPagination:l})=>n.length?io.jsx($z,{className:"nebula-table-utils-head-menu",open:t,anchorEl:e,onClose:r,transitionDuration:oW,MenuListProps:{id:"nebula-table-utils-head-menu-list-id"},...o?{anchorOrigin:o}:{},...i?{transformOrigin:i}:{},dir:s,children:iW({itemGroups:n,isSubMenu:a,direction:s,isPagination:l})}):null,sW=(e,t)=>e.some(e=>t[e]>0),lW={canSelectAll:!1,canClearSelections:!1,canSelectPossible:!1,canSelectAlternative:!1,canSelectExcluded:!1},uW=({open:e,qStateName:t="$",headerData:r,app:n})=>{const[i,o]=m(null),[a,s]=m(lW);return kz(()=>{e||(s(lW),o(null))},[e]),d(()=>{if(!n?.createSessionObject||!r.isDim||!e)return()=>{};let i,a=!1;const l=()=>{i&&n.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,r),u=await n.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,n,r,t]),{fieldInstance:i,selectionActionsEnabledStatus:a}},cW=x((e,t)=>io.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:io.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"})})),dW=x((e,t)=>io.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:io.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"})})),pW=x((e,t)=>io.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:io.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"})})),fW=x((e,t)=>io.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:io.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"})})),hW=x((e,t)=>io.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:io.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"})})),mW=x((e,t)=>io.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:io.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"})})),gW=x((e,t)=>io.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:io.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"})})),vW=x((e,t)=>io.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:io.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"})})),yW=x((e,t)=>io.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:io.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"})})),bW=x((e,t)=>io.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:io.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"})})),xW=x((e,t)=>io.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:io.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"})})),SW=x((e,t)=>io.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:io.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"})})),wW=x((e,t)=>io.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:io.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 CW=function(e){return e.Sorting="sorting",e.Searching="searching",e.Selections="selections",e.AdjusterHeaderSize="adjustHeaderSize",e}({});const EW="/qListObjectDef",IW=({headerData:e,translator:t,menuAvailabilityFlags:r,setOpen:n,sortFromMenu:i,interactions:o,embedListbox:a,fieldInstance:s,selectionActionsEnabledStatus:l,anchorRef:u,focusColumnAdjuster:c,setActiveFieldCallback:d,expandOrCollapseArgs:p})=>{const f=[];if(r[CW.Sorting]){const{isActivelySorted:r,sortDirection:o}=e,{ascendingEnabled:a,descendingEnabled:s}=(({isActivelySorted:e,sortDirection:t,isPivot:r,isSortedByFirstMeasure:n})=>{let i=!r&&!e||"D"===t,o=!r&&!e||"A"===t;return n&&(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")),n(!1)},icon:cW,enabled:a,isActive:!!r&&"A"===o,autoFocus:a},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortDescending"),onClick:async e=>{e.stopPropagation(),await(i?.(e,"D")),n(!1)},icon:fW,enabled:s,isActive:!!r&&"D"===o,autoFocus:!a&&s}]}])}if(e.isCyclic&&d){const t=[];t.push([{items:[{id:1,itemTitle:e.groupDimensionLabels[e.groupDimensionPos],enabled:!0,icon:gW,subMenus:[[{items:e.groupDimensionLabels.map((t,r)=>({id:r+1,itemTitle:t,onClick:async e=>{e.stopPropagation(),n(!1),d(r)},enabled:!0,icon:oj,isActive:e.groupDimensionPos===r}))}]]}]}]),t.length>0&&f.push(...t)}if(e.isDim&&o?.select){const i=[];r[CW.Searching]&&i.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Search"),onClick:e=>{e.stopPropagation(),n(!1),a()},icon:vW,enabled:!0}]}]),!e.isLocked&&r[CW.Selections]&&i.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Selections"),icon:wW,enabled:!!s,subMenus:[[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAll"),onClick:async e=>{e.stopPropagation(),n(!1),await(s?.selectListObjectAll(EW))},icon:yW,enabled:l.canSelectAll},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectPossible"),onClick:async e=>{e.stopPropagation(),n(!1),await(s?.selectListObjectPossible(EW))},icon:SW,enabled:l.canSelectPossible},{id:3,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAlternative"),onClick:async e=>{e.stopPropagation(),n(!1),await(s?.selectListObjectAlternative(EW))},icon:bW,enabled:l.canSelectAlternative},{id:4,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectExcluded"),onClick:async e=>{e.stopPropagation(),n(!1),await(s?.selectListObjectExcluded(EW))},icon:xW,enabled:l.canSelectExcluded}]}],[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.ClearSelections"),onClick:async e=>{e.stopPropagation(),n(!1),await(s?.clearSelections(EW))},icon:dW,enabled:l.canClearSelections}]}]]}]}]),p&&!p.alwaysFullyExpanded&&f.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Expand"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),n(!1),await p.expandCallback()},icon:mW,enabled:!0},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Collapse"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),n(!1),await p.collapseCallback()},icon:hW,enabled:!0}]}]),i.length>0&&f.push(...i)}return r[CW.AdjusterHeaderSize]&&f.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.AdjustColumnSize"),onClick:e=>{e.stopPropagation(),e.preventDefault(),n(!1),c?.(u)},icon:pW,enabled:!0}]}]),f},DW=({open:e,setOpen:t,anchorRef:r,headerData:n,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=hT})=>{const x=l(null),S=qz({translator:i}),{qLibraryId:w,fieldId:C,headTextAlign:E}=n,I=d?.app,{fieldInstance:D,selectionActionsEnabledStatus:P}=uW({open:e,headerData:n,app:I,qStateName:d?.qStateName}),R=(({model:e,headerData:t})=>{if(e&&"setActiveField"in e&&void 0!==t.dimensionInfoIndex){const r=t.dimensionInfoIndex;return async t=>{try{await e.setActiveField("/qHyperCubeDef",r,t)}catch(e){console.error(e)}}}return null})({model:m,headerData:n}),M=(({qLibraryId:e,fieldId:t,searchRelatedArgs:r,selectionRelatedArgs:n,direction:i,onPopoverClose:o})=>f(()=>{const a=e?{qLibraryId:e,type:"dimension"}:t;if(r?.embed){const{embed:e,listboxRef:t}=r;e.__DO_NOT_USE__.popover(t.current,a,{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"rtl"===i?"right":"left"},sortCriteria:r.sortCriteria,stateName:n?.qStateName,direction:i,onPopoverClose:o})}},[e,t,r,n?.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?io.jsxs(zz,{rightAligned:"right"===E,shouldShowMenuIcon:s,className:"nebula-table-utils-head-menu-wrapper",onClick:!1===y?A:void 0,ref:x,isAccessibleHeader:y,children:[s?io.jsx(Wz,{height:b,className:mT,"data-testid":mT,isInteractionsActive:o.active??!1,children:io.jsx(Fz,{})}):null,io.jsx(aW,{open:e,anchorEl:!1===y?x.current:r.current,onClose:L,menuGroups:IW({headerData:n,translator:S,menuAvailabilityFlags:a,setOpen:t,...u,embedListbox:M,interactions:o,fieldInstance:D,selectionActionsEnabledStatus:P,anchorRef:r,focusColumnAdjuster:p?.focusColumnAdjuster,setActiveFieldCallback:R,expandOrCollapseArgs:h}),direction:g,isPagination:v})]}):null},PW=e=>e.isDark?{background:e.color,borderColor:oN.DARK_MODE_BORDER,color:oN.DARK_MODE_TEXT,disabledColor:oN.DARK_MODE_DISABLED,iconColor:oN.DARK_MODE_TEXT}:{background:e.color,borderColor:oN.BORDER_MEDIUM,color:oN.TEXT,disabledColor:oN.DISABLED},RW=fl(Qu,{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}`})),MW=fl(Qp,{shouldForwardProp:e=>"footerStyle"!==e})(({footerStyle:e,theme:t})=>({background:"inherit",marginRight:t.spacing(1),color:e.color,"& .MuiNativeSelect-icon, .MuiNativeSelect-select":{color:e.iconColor}})),LW=fl(uc,{shouldForwardProp:e=>"disabledCondition"!==e&&"footerStyle"!==e})(({disabledCondition:e,footerStyle:t,theme:r})=>({color:e?t.disabledColor:t.color,cursor:e?"default":"pointer",marginLeft:r.spacing(1)})),AW=fl(mu)(({theme:e})=>({color:"inherit",margin:e.spacing(0,1,0,1)})),kW=({children:e,footerContainer:t,interactions:r,theme:n,paginationNeeded:i=!0})=>{const o=v(()=>PW(n.background),[n]);if(!r.active)return null;const a=i?io.jsx(RW,{footerStyle:o,children:e}):null;return t?E.createPortal(e,t):a},OW=u({}),qW=()=>h(OW),TW=({children:e,direction:t,pageInfo:r,handleChangeRowsPerPage:n,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(()=>PW(p.background),[p]),x=i?i.getBoundingClientRect().width:h.width,S=qz({translator:d}),w=v(()=>({direction:t,pageInfo:r,handleChangeRowsPerPage:n,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,r,n,i,o,a,s,l,u,c,S,p,f,h,m,b,y,x,g]);return io.jsx(OW.Provider,{value:w,children:e})};let NW=function(e){return e.FirstPage="FirstPage",e.LastPage="LastPage",e.NextPage="NextPage",e.PreviousPage="PreviousPage",e}({}),_W=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 jW=x((e,t)=>io.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:io.jsx("path",{d:"m7 8 4.5 4.5L10 14 4 8l6-6 1.5 1.5z"})})),FW=x((e,t)=>io.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:io.jsx("path",{d:"m12 2 1.5 1.5L9 8l4.5 4.5L12 14 6 8zM4 2v12H2V2z"})})),zW=x((e,t)=>io.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:io.jsx("path",{d:"m3.5 2 6 6-6 6L2 12.5 6.5 8 2 3.5zM14 2v12h-2V2z"})})),WW={FirstPage:FW,PreviousPage:jW,NextPage:Xz,LastPage:zW,FirstPageRTL:zW,PreviousPageRTL:Xz,NextPageRTL:jW,LastPageRTL:FW},$W=({disabledCondition:e,pageNumber:t,type:r})=>{const{direction:n,footerStyle:i,handleChangePage:o,translator:a,interactions:s,tabIndex:l}=qW(),u=r.concat("rtl"===n?"RTL":""),c=WW[u];return{styledProps:{footerStyle:i,disabledCondition:e,size:"small","data-testid":"pagination-action-icon-button","aria-disabled":e,"aria-label":a.get(`NebulaTableUtils.Pagination.${r}`),title:s.passive?a.get(`NebulaTableUtils.Pagination.${r}`):void 0,tabIndex:l,onClick:e?void 0:()=>{o(t)}},IconComponent:c}},HW=()=>{const{pageInfo:e,width:t,interactions:r,visibilityThreshold:n}=qW(),i=0===e.page,{IconComponent:o,styledProps:a}=$W({type:NW.FirstPage,disabledCondition:i,pageNumber:0});return t<=(n?.firstPage||_W.FirstPage)?null:io.jsx(LW,{...a,disabled:!r.active,children:io.jsx(o,{height:hT})})},VW=(e,t,r=!1)=>{r&&e.key===vT.Tab&&!e.shiftKey&&(X_(e),((e,t,r)=>{const n=e.closest(".qv-object-wrapper")?.querySelector(".sel-toolbar-confirm")?.parentElement??document.querySelector("#qv-selection-toolbar-popover .sel-toolbar-confirm")?.parentElement;n?n.focus():t.focusSelection?.(r)})(e.target,t,!1))},BW=()=>{const{pageInfo:e,keyboard:t,totalPages:r,isSelectionMode:n,width:i,interactions:o,visibilityThreshold:a}=qW(),s=e.page>=r-1,{IconComponent:l,styledProps:u}=$W({type:NW.LastPage,disabledCondition:s,pageNumber:r-1}),c=t.enabled?e=>{VW(e,t,n)}:void 0;return i<=(a?.lastPage||_W.LastPage)?null:io.jsx(LW,{...u,onKeyDown:c,disabled:!o.active,children:io.jsx(l,{height:hT})})},GW=()=>{const{pageInfo:e,keyboard:t,totalPages:r,isSelectionMode:n,width:i,interactions:o}=qW(),a=e.page>=r-1,{IconComponent:s,styledProps:l}=$W({type:NW.NextPage,disabledCondition:a,pageNumber:e.page+1}),u=!(i>_W.FirstPage&&i>_W.LastPage)&&t.enabled?e=>{VW(e,t,n)}:void 0;return io.jsx(LW,{...l,onKeyDown:u,disabled:!o.active,children:io.jsx(s,{height:hT})})},UW=()=>{const{pageInfo:e,interactions:t}=qW(),r=0===e.page,{IconComponent:n,styledProps:i}=$W({type:NW.PreviousPage,disabledCondition:r,pageNumber:e.page-1});return io.jsx(LW,{...i,disabled:!t.active,children:io.jsx(n,{height:hT})})},YW=()=>{const{translator:e,width:t,pageInfo:r,totalRowCount:n,visibilityThreshold:i}=qW(),{page:o,rowsPerPage:a}=r;if(t<=(i?.displayedRowsLabel||_W.DisplayedRowsLabel))return null;const s=e.get("NebulaTableUtils.Pagination.DisplayedRowsLabel",[`${o*a+1} - ${Math.min((o+1)*a,n)}`,n.toString()]);return io.jsx(AW,{variant:"caption",dir:"ltr",children:s})},KW=({name:e,value:t,options:r,handleChange:n})=>{const{layout:i,footerStyle:o,translator:a,tabIndex:s,interactions:l}=qW(),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 io.jsxs(io.Fragment,{children:[io.jsxs(AW,{variant:"caption",id:p,children:[c,":"]}),io.jsx(MW,{footerStyle:o,size:"small",native:!0,value:t,onChange:n,inputProps:f,disabled:!l.active,children:r})]})},XW=()=>{const{pageInfo:e,isSelectionMode:t,totalColumnCount:r,width:n,handleChangeRowsPerPage:i,visibilityThreshold:o}=qW();if(!(!!e.rowsPerPageOptions?.length&&!t&&n>(o?.rowsPerPage||_W.RowsPerPage)&&r<=100)||void 0===e.rowsPerPageOptions)return null;const a=io.jsx(io.Fragment,{children:e.rowsPerPageOptions.map(e=>io.jsx("option",{value:e,children:e},e))});return io.jsx(KW,{name:"RowsPerPage",value:e.rowsPerPage,options:a,handleChange:e=>{i?.(+e.target.value)}})},JW=1e3,ZW="…",QW=({totalPages:e,page:t})=>{const r=Math.min(e,JW),n=r<e&&t>500,i=n?Math.min(500+t,e):r,o=n?Math.max(0,i-JW):0,a=Array.from(Array(r).keys()).map(e=>{const t=e+o;return io.jsx("option",{value:t,children:t+1},t)});return o>0&&a.unshift(io.jsx("option",{value:ZW,disabled:!0,children:ZW},"startMoreOptions")),i<e-1&&a.push(io.jsx("option",{value:ZW,disabled:!0,children:ZW},"endMoreOptions")),io.jsx(io.Fragment,{children:a})},e$=()=>{const{pageInfo:e,width:t,totalPages:r,handleChangePage:n,visibilityThreshold:i}=qW(),{page:o}=e;if(t<=(i?.selectPage||_W.SelectPage))return null;const a=io.jsx(QW,{totalPages:r,page:o});return io.jsx(KW,{name:"SelectPage",value:o,options:a,handleChange:e=>{n(+e.target.value)}})};var t$=b(e=>io.jsxs(TW,{...e,children:[io.jsx(XW,{}),io.jsx(e$,{}),io.jsx(YW,{}),io.jsx(HW,{}),io.jsx(UW,{}),io.jsx(GW,{}),io.jsx(BW,{})]}));const r$=e=>io.jsx(kW,{...e,children:io.jsx(t$,{...e})}),n$=u({}),i$=()=>h(n$),o$=({rect:e,pageInfo:t,qPivotDataPages:r,updatePageInfo:n,direction:i,children:o})=>{const a=v(()=>({rect:e,pageInfo:t,qPivotDataPages:r,updatePageInfo:n,direction:i}),[e,t,r,n,i]);return io.jsx(n$.Provider,{value:a,children:o})},a$=u({}),s$=()=>h(a$),l$=({app:e,model:t,theme:r,embed:n,keyboard:i,translator:o,interactions:a,env:s,children:l})=>{const u=v(()=>({model:t,app:e,interactions:a,embed:n,theme:r,keyboard:i,env:s,translator:o}),[e,a,t,n,r,i,s,o]);return io.jsx(a$.Provider,{value:u,children:l})},u$=u({}),c$=()=>h(u$),d$=({children:e,...t})=>io.jsx(u$.Provider,{value:t,children:e}),p$=()=>{const{text:e,fontFamily:t,fontSize:r,justifyContent:n,alignItems:i,height:o}=(()=>{const{theme:e,translator:t}=s$(),{layoutService:r}=c$(),n=e.getStyle("","","fontFamily")??GF;return r.hasData?r.hasLimitedData?{text:t.get("SNPivotTable.LimitedData"),fontSize:"13px",fontFamily:n,alignItems:"center",height:"22px"}:{}:{text:t.get("SNPivotTable.NoData"),fontSize:"16px",fontFamily:n,justifyContent:"center",alignItems:"center",height:"100%"}})();return void 0===e?null:io.jsx("div",{style:{display:"flex",justifyContent:n,alignItems:i,width:"100%",height:o},children:io.jsx("span",{style:{...tz,fontFamily:t,fontSize:r,fontStyle:"italic",color:"#7b7a78"},children:e})})},f$="/qHyperCubeDef",h$=-1,m$="PSEUDO-DIM",g$=e=>e===h$?m$:(({cId:e})=>e??Fj())(e),v$=({layoutService:e,visibleLeftDimensionInfos:t,cell:r,colIdx:n})=>{r&&(r.canBeResized=!0,r.colIdx=r.colIdx||n,r.dimensionInfoIndex===h$?r.columnWidthLocation=EF.Measures:r.isLeftDimension?r.columnWidthLocation=EF.Dimension:t.at(-1)===h$?r.columnWidthLocation=EF.Measures:e.hasPseudoDimOnLeft&&(r.columnWidthLocation=EF.Pivot))},y$=(e,t,r,n)=>{const i=g$(r),o=e.getDimensionInfoIndex(r),a=e.isLeftDimension(o);return r===h$?{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:n,columnWidthLocation:EF.Measures,isPivot:!0,qEffectiveDimensionName:void 0}:{id:i,colIdx:0,label:r.qFallbackTitle??"",qReverseSort:r.qReverseSort,sortDirection:r.qSortIndicator&&"N"!==r.qSortIndicator?r.qSortIndicator:"A",qLibraryId:r.qLibraryId,fieldId:r.qGroupFieldDefs[r.qGroupPos],isLocked:r.qLocked??!1,columnWidth:r.columnWidth,qApprMaxGlyphCount:r.qApprMaxGlyphCount,isDim:!0,isCyclic:r.qGrouping===CT.Cyclic,groupDimensionPos:r.qGroupPos,groupDimensionLabels:r.qGroupFallbackTitles,headTextAlign:"left",dimensionInfoIndex:o,canBeResized:!1,isLeftDimension:a,isLastDimension:n,columnWidthLocation:EF.Dimension,isPivot:!0,isSortedByFirstMeasure:t.isSortedByFirstMeasure,qEffectiveDimensionName:r.qEffectiveDimensionName}},b$=({layoutService:e,effectivePropertiesService:t,lastRow:r,lastCol:n})=>{let i=n;var o;r.length>0&&(i=(o=n).at(-1)===h$?o.slice(0,-1):o);const a=i.length+(r.length?1:0),s=Math.max(1,r.length),l=((e,t)=>Array(e).fill(null).map(()=>Array.from({length:t},()=>null)))(a,s);return r.forEach((r,n,i)=>{const o=n===i.length-1;l[a-1][n]=y$(e,t,r,o)}),i.forEach((r,n,i)=>{const o=n===i.length-1;l[n][s-1]=y$(e,t,r,o)}),l},x$=(e,t,r,n)=>{const i=((e,t,r,n)=>{let i;return i=0===r.length||r.includes(h$)?b$({layoutService:e,effectivePropertiesService:t,lastRow:n,lastCol:r}):(e=>e[0].map((t,r)=>e.map(e=>e[r])))(b$({layoutService:e,effectivePropertiesService:t,lastRow:r,lastCol:n})),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,r)=>{Array.isArray(t)?t.forEach((t,r)=>{v$({layoutService:e,visibleLeftDimensionInfos:n,cell:t,colIdx:r})}):v$({layoutService:e,visibleLeftDimensionInfos:n,cell:t,colIdx:r})}),i})(e,t,r,n);return{data:i,size:{x:i[0]?.length??0,y:i.length}}};var S$={fromSearchString:function(e){if(!e)return[];"?"===e[0]&&(e=e.substr(1));const t=[];return e.split("&").forEach(e=>{if(!e)return;const r=e.indexOf("=");let n,i="",o=!1;-1===r?n=e:(n=e.slice(0,r),i=e.slice(r+1),o=!0),t.push(function(e,t,r){return{key:C$(e),value:C$(t.replace(/%2B/g,"shouldNotDecodePlus")),useEqualSign:r}}(n,i,o))}),t}},w$=S$;function C$(e){try{return decodeURIComponent(e)}catch{return e}}function E$(e){if(!(this instanceof E$))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 r=e.indexOf("#");-1!==r&&(t.hash=e.substr(r),e=e.substr(0,r));r=e.indexOf("?"),-1!==r&&(t.search=e.substr(r),e=e.substr(0,r));return t.authorityAndPath=e,t}(e);Object.defineProperties(this,{authorityAndPath:{value:t.authorityAndPath},search:{value:t.search},hash:{value:t.hash},searchParams:{get:()=>w$.fromSearchString(t.search)}})}function I$(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")}E$.encodeAuthorityAndPath=function(e){return encodeURI(e).replace(/%5B/gi,"[").replace(/%5D/gi,"]").replace(/%25/gi,"%")},E$.encodeSearchParams=function(e){let t,r="";for(let n=0;n<e.length;n++)t=e[n],r+=0===n?"?":"&",r+=I$(t.key),t.value?r+=`=${I$(t.value)}`:r+=t.useEqualSign?"=":"";return r};var D$=E$;var P$,R$=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}},M$=class{decode(e){let t="";const r=new R$(e);let n;for(;r.hasNext();)n=this.decodeCharacter(r),t+=null!=n?n:r.next();return t}decodeCharacter(e){return e.next()}},L$=e=>e>=0&&e<=1114111,A$=e=>e.match(/[\s]/),k$=class extends M${decodeCharacter(e){e.mark();const t=e.next();let r,n,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(r=o,n=0;n<5&&(i=e.next(),null!=i&&!A$(i));n++){if("NaN"===parseInt(i,16)){e.pushback(i);break}r+=i}const a=parseInt(r,16);return L$(a)?String.fromCharCode(a):"�"}},O$=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,r,n=arguments[0];return"string"==typeof arguments[1]?(t=arguments[1],r=n.length):(r=arguments[1],t=arguments[2]),t&&n?(n.length>r&&(n=n.substr(0,r)),new e(n,t)):null}},q$=class e{setValue(e){this._nextMap=null,this._value=e}getNextNode(e){return this._nextMap?this._nextMap[e]:null}put(t,r,n){let i,o;if(t.length===r)return o=this._value,this.setValue(n),o;const a=t.charAt(r);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,r+1,n)}get(e,t){if(e.length<=t)return this._value;const r=this.getNextNode(e.charAt(t));return r?r.get(e,t+1):null}getLongestMatch(e,t){if(e.length<=t)return O$.newInstanceIfNeeded(e,this._value);const r=this.getNextNode(e.charAt(t));if(!r)return O$.newInstanceIfNeeded(e,t,this._value);const n=r.getLongestMatch(e,t+1);return n||O$.newInstanceIfNeeded(e,t,this._value)}},T$=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 q$);const r=this.root.put(e,0,t);return r||(e.length>this.maxKeyLen&&(this.maxKeyLen=e.length),this.size++,null)}},N$=(()=>{const e=[],t=[],r=new T$;let n,i,o;for(n 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[n]&&e.hasOwnProperty(n)&&(t[e[n]]=n);for(i in t)"function"!=typeof t[i]&&t.hasOwnProperty(i)&&(o=t[i].toLowerCase().substr(1),r.put(o,String.fromCharCode(i)));return r})(),_$=class extends M${decodeCharacter(e){let t;e.mark();const r=e.next();if(null==r||"&"!==r)return e.reset(),null;const n=e.next();if(null==n)return e.reset(),null;if("#"===n){if(t=this._getNumericEntity(e),null!=t)return t}else if(n.match(/[A-Za-z]/)&&(e.pushback(n),t=this._getNamedEntity(e),null!=t))return t;return e.reset(),null}_getNamedEntity(e){let t,r,n,i="";for(t=Math.min(e.remainder().length,N$.getMaxKeyLength()),n=0;n<t;n++)i+=e.next().toLowerCase();const o=N$.getLongestMatch(i);if(null==o)return null;for(e.reset(),e.next(),t=o.getKey().length,r=0;r<t;r++)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,r="";for(;e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,16))){if(";"===t){e.next();break}break}r+=t,e.next()}const n=parseInt(r,16);return!Number.isNaN(+n)&&L$(n)?String.fromCharCode(n):null}_parseNumber(e){let t,r="";for(;e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,10))){if(";"===t){e.next();break}break}r+=t,e.next()}const n=parseInt(r,10);return!Number.isNaN(+n)&&L$(n)?String.fromCharCode(n):null}},j$=class extends M${decodeCharacter(e){e.mark();const t=e.next();let r,n,i,o;if(null==t)return e.reset(),null;if("%"!==t)return e.reset(),null;for(r="",n=0;n<2;n++)i=e.nextHex(),null!=i&&(r+=i);return 2===r.length&&(o=parseInt(r,16),L$(o))?String.fromCharCode(o):(e.reset(),null)}},F$=/^data:(?<!\s)\s*(image\/[\w+-.]+)(?<!\s)\s*(;.*?){0,1}(?<!\s)\s*,(.*)/i,z$=5e6,W$=5e5,$$=(e,t)=>{const{maxByteSizeSvg:r=W$,maxByteSizeImage:n=z$}=t??{},{mimeType:i,encoding:o,data:a}=(e=>{const[,t,r,n]=F$.exec(e.trim())??[];return{encoding:r,data:n,mimeType:t?.toLocaleLowerCase()}})(e);if(!a)return!0;const s=((e,t,r)=>{const n={type:e};if(t?.includes(";base64"))try{return new Blob([atob(r)],n).size}catch{return new Blob([r],n).size}return"image/svg+xml"===e?new Blob([r],n).size:0})(i,o,a);return"image/svg+xml"===i?s<=r:s<=n};"undefined"!=typeof document&&(P$=document.createElement("div"));var H$=Array.prototype.indexOf,V$=[",",".","_"," "],B$=[",",".","-","_"," "],G$={width:["%"],height:["%"]},U$={default:["-"," ","%"],color:["#"," ","(",")"],image:["(",")",":","/","?","&","-",".",'"',"="," "]},Y$={background:["(",")",":","%","/","?","&","-"," ",".",'"',"=","#"],"background-image":U$.image,"background-color":U$.color,"border-color":U$.color,"border-image":U$.image,color:U$.color,icon:U$.image,"list-style-image":U$.image,"outline-color":U$.color},K$={attr_name:["^on[a-z]{1,}","style","href","src"],attr_val:["javascript:","data:"],css_key:["behavior","-moz-behavior","-ms-behavior"],css_val:["expression"]};function X$(e,t,r){let n;if(t){if(H$)return H$.call(t,e,r);for(n=t.length,r=r?r<0?Math.max(0,n+r):r:0;r<n;r++)if(r in t&&t[r]===e)return r}return-1}function J$(e){if(null==e)return"";let t="";const r=document.createTextNode(e);return P$.appendChild(r),t=P$.innerHTML,P$.removeChild(r),t}function Z$(e,t,r){let n,i,o,a,s,l,u,c,d;for(e=eH(e).toLowerCase(),t=eH(t),o=0;o<K$.attr_name.length;o++)if(e.match(K$.attr_name[o]))throw new Error(`Unsafe attribute name used: ${e}`);for(o=0;o<K$.attr_val.length;o++)if(t.toLowerCase().match(K$.attr_val[o]))throw new Error(`Unsafe attribute value used: ${t}`);if(n=G$[e],n||(n=B$),i="",!r){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]/)&&X$(u,n)<0?(d=c.toString(16),i+=`&#x${d};`):i+=u;return r||(i+='"'),i}function Q$(e,t,r){let n,i,o,a,s,l,u,c,d,p;if(e=eH(e).toLowerCase(),t=eH(t),X$(e,K$.css_key)>=0)throw new Error(`Unsafe property name used: ${e}`);for(n=0;n<K$.css_val.length;n++)if(t.toLowerCase().indexOf(K$.css_val[n])>=0)throw new Error(`Unsafe property value used: ${t}`);if(i=Y$[e],i||(i=U$.default),o="",!r){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]/)&&X$(u,i)<0?(d=c.toString(16),p="000000".substr(d.length),o+=`\\${p}${d}`):o+=u;return o}function eH(e,t){let r,n,i,o,a=!1;if(null===e)return null;r=e,n=e,i=0;const s=[new _$,new j$,new k$];for(;!a;){n=r;for(let e=0;e<s.length;e++)o=s[e].decode(r),o!==r&&(i++,r=o);n!==r||(a=!0)}if(t&&i>1)throw new Error("Attack Detected - Multiple/Double Encodings used in input");return r}var tH=[];for(let e=0;e<255;e++)tH[e]=e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122?null:e.toString(16);var rH={html:e=>J$(e.unsafe),css(e){let t,r=[];const n=[],i={};let o="";for(t in e.map?r=e.map:r[e.name]=e.unsafe,r)"function"!=typeof r[t]&&r.hasOwnProperty(t)&&(n[t]=Q$(t,r[t],!0),o+=Q$(t,r[t],!0),i[t]=n[t]);return e.map?i:o},attr(e){let t=[];const r=[],n={};let i="";e.map?t=e.map:t[e.name]=e.unsafe;for(const e in t)"function"!=typeof t[e]&&t.hasOwnProperty(e)&&(r[e]=Z$(e,t[e],!0),i+=Z$(e,t[e],!0),n[e]=r[e]);return e.map?n:i}};function nH(e,t){throw new Error(t)}var iH={canonicalize:eH,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,r;const n=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(r=e[t],n===r)continue;void 0!==r&&(n[t]=r)}}(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?rH.html(e):"css"===e.context?(null!=e.map&&"object"!=typeof e.map&&nH(this,"Invalid parameter type"),rH.css(e)):"attr"===e.context?(null!=e.map&&"object"!=typeof e.map&&nH(this,"Invalid parameter type"),rH.attr(e)):void nH(this,"Invalid parameter type")},encodeForAttr:Z$,encodeForAttr2:function(e){return Z$("nonsens",e,!0)},encodeForCSS:Q$,encodeForHref:function(e){eH(e),0!==e.search("[a-zA-Z0-9]+:")&&(e=`http://${e}`);const t=new D$(e),r=D$.encodeAuthorityAndPath(t.authorityAndPath),n=t.searchParams;e=r+D$.encodeSearchParams(n)+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 r,n,i,o,a,s;for(t||(t=V$),s="",r=0;r<e.length;r++)i=e.charAt(r),o=e.charCodeAt(r),X$(i,t)>=0||null==tH[o]?s+=i:(n=o.toString(16),o<256?(a="00".substr(n.length),s+=`\\x${a}${n.toUpperCase()}`):(a="0000".substr(n.length),s+=`\\u${a}${n.toUpperCase()}`));return s},encodeForHTML:J$,encodeForURL:function(e,t){let r="";return t&&(t.match(/^[A-Za-z\-0-9]{1,}$/)?r+=eH(t).toLowerCase():nH(this,"Illegal Attribute Name Specified"),r+='="'),r+=encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A"),r+=t?'"':"",r},isSafeDataURL:$$,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 r=function(e){let t=e,r="";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=r.lastIndexOf("/");-1!==e&&(r=r.slice(0,e))}else if("/.."===t){t="/";const e=r.lastIndexOf("/");-1!==e&&(r=r.slice(0,e))}else if("."===t||".."===t)t="";else{const e=t.match(/^\/?[^/]*/),n=e?e[0]:"";t=t.slice(n.length),r+=n}return r}(t);return""!==r&&"/"!==r&&r}};const oH=(e,t)=>t.qAttrExps?.qValues?.[e],aH=(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"}}},sH=({text:e,url:t,imageSize:r,imagePosition:n,labelStructure:i,imageBox:o,direction:a})=>!n||t&&(t.toLowerCase().includes("javascript:")||!iH.isSafeDataURL(t))?{type:vF.Text,url:void 0,text:e,labelStructure:i}:{type:vF.Image,url:t||"",text:e,imageSize:r,resolvedImagePosition:aH(n,a),labelStructure:i,imageBox:o},lH=(e,t,r,n)=>{if(!e.qMiniChart||!t?.miniChart||!r)return{type:vF.Text,text:n};const{minY:i,maxY:o}=((e,t,r)=>{const n="global"===t.yAxis?.scale,i="zeroCenter"===t.yAxis?.position,o=n?r.qYMin:e.qMiniChart.qMin,a=n?r.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,r),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:vF.MiniChart,text:n,miniChart:a}},uH=(e,t,r)=>{const n=Array.isArray(t.qAttrExps)?t.qAttrExps[0]:t.qAttrExps,i=n?.qValues?.[e];if(i){const e=Number.isNaN(+i.qNum)?void 0:`${i.qNum}`;return i.qText||e}return r?.urlPosition===yF.Attribute?void 0:r?.urlLabel},cH=({labelStructure:e,text:t,url:r})=>{try{if(!r)throw Error("Invalid url");return{type:vF.Link,url:iH.encodeForHref(r),text:t,labelStructure:e}}catch{return{type:vF.Text,url:void 0,text:t,labelStructure:e}}},dH=({cell:e,representationProperties:t,attrExprInfoIndex:r,env:n,conditionalColoring:i,miniChartOnMeasure:o,labelStructure:a,getText:s=e=>e.qText,direction:l,enabledFeatures:u})=>{const c=bF(t),d=s(e);return c===vF.Image&&u[vF.Image]&&!n.anything.sense?.isUnsupportedFeature?.("tableImages")?((e,t,r,n,i,o)=>{const{imageSize:a,imagePosition:s,imageSetting:l,imageLabel:u,imageBox:c}=t??{};if("url"===l){const t=oH(r.imageUrl??-1,e)?.qText;return o&&(o.maskedValue=t??""),sH({text:n,url:t,imageSize:a,imagePosition:s,labelStructure:o,imageBox:c,direction:i})}if("label"===l){const t=o?o.originalValue:n;if(-1===r.imageLabel)return sH({text:u||t||"",url:t,imageSize:a,imagePosition:s,labelStructure:o,imageBox:c,direction:i});const l=oH(r.imageLabel??-1,e)?.qText??n;return sH({text:l,url:t,imageSize:a,imagePosition:s,labelStructure:o,imageBox:c,direction:i})}return{type:vF.Text,url:void 0,labelStructure:o,text:n}})(e,t,r,d,l,a):c===vF.Link?((e,t,r,n,i)=>{const{urlPosition:o}=t??{};if(o===yF.Attribute){const o=uH(r.url??-1,e,t);return cH({labelStructure:n,text:i||o||"",url:o})}if(o===yF.Dimension){const o=uH(r.urlLabel??-1,e,t)||i;return n&&(n.maskedValue=o),cH({text:o,labelStructure:n,url:n?.originalValue??i})}return{type:vF.Text,url:void 0,text:i,labelStructure:n}})(e,t,r,a,d):c===vF.Indicator&&u[vF.Indicator]&&!n.anything.sense?.isUnsupportedFeature?.("tableIndicators")?((e,t,r)=>{const{indicator:n}=e??{};return{type:vF.Indicator,url:void 0,text:r,indicator:{applySegmentColors:n?.applySegmentColors,position:n?.position,showTextValues:n?.showTextValues},indicatorConditionalColoring:t}})(t,i,d):c===vF.MiniChart&&u[vF.MiniChart]&&!n.anything.sense?.isUnsupportedFeature?.("qMiniChartDef")?lH(e,t,o,d):{type:vF.Text,url:void 0,text:d,labelStructure:a}},pH=(e,t)=>{const r=t.qAttrExps,n=r?.qValues?.[e?.cellForegroundColor??-1]?.qText,i=r?.qValues?.[e?.cellBackgroundColor??-1]?.qText,o=i?K_(i):null,a=n?K_(n):null,s=((e,t)=>e||!t?null:G_(t))(a,o);return{color:s??a,background:o}},fH=(e,t)=>t.qSubNodes.reduce((e,t)=>0===t.qSubNodes.length?e+1:fH(e,t),e),hH=(e,t,r,n,i,o)=>{const a=i?o.rowsPerPage-r:YF-n;let s=e.qUp+e.qDown;if(i&&0===r){const r=(t+e.qUp)%o.rowsPerPage;s=e.qDown+r}return Math.min(a,fH(s,e))},mH=({node:e,parent:t,root:r,x:n,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!==h$){if(t){const t=bF(e.representation);return t===vF.Link||t===vF.Image?e.representation:{type:vF.Text}}return e.representation}})(s,c),y=(({node:e,isLeftColumn:t,isIndentModeEnabled:r,labelStructure:n,representationType:i,parentOrRootOriginalValue:o})=>{let a=e.qText;if(t&&r&&n){const{originalValue:t,delimeter:r,suffix:s}=n;a=i===vF.Link?"P"===e.qType?o:t:`${t} ${!s||!t&&s?"":r} ${s}`.trim()}return a})({node:e,isLeftColumn:u,isIndentModeEnabled:c,labelStructure:p,representationType:bF(v),parentOrRootOriginalValue:(t||r)?.representation?.labelStructure?.originalValue??""}),b=dH({cell:{...e,qText:y},representationProperties:v,attrExprInfoIndex:l,env:f,labelStructure:p,direction:m,enabledFeatures:{[vF.Image]:!0,[vF.Indicator]:!0}}),x={id:Fj(),ref:e,x:n,y:i,pageX:n,pageY:o,mainAxisPageCoord:u?o:n,isLeftColumn:u,parent:t,root:r,children:[],isLeafNode:0===e.qSubNodes.length,leafCount:hH(e,i,o,n,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:pH(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},gH=(e,t,r,n,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(h$);f.forEach((f,v)=>{const y={originalValue:f.qText??"",maskedValue:"",delimeter:"-",suffix:""};c+=0===v?0:1;const b=r.qTop-n.page*n.rowsPerPage,x=Math.max(0,b+c-f.qUp),S=r.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?mH({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:n,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},vH=(e,t)=>{e.slice(0,-1).forEach(e=>{Object.values(e).forEach((e,r,n)=>{const i=n.at(r+1);e.distanceToNextCell=i?i.mainAxisPageCoord-(e.mainAxisPageCoord+e.leafCount):t-(e.mainAxisPageCoord+e.leafCount)})})},yH=(e,t)=>{const r=e[0],n=r?Object.values(r):[],i=t?.isIndentModeEnabled&&t.hasPseudoDimOnLeft?t.visibleMeasureInfo.length-1:0,o=r?.[i],a=n.at(-1);return o?.isTotal?o.isLeafNode?o.mainAxisPageCoord:o.mainAxisPageCoord+o.leafCount-1:a?.isTotal?a.mainAxisPageCoord-1:-1},bH=({prevData:e,nextDataPage:t,pageInfo:r,layoutService:n,visibleLeftDimensionInfo:i,attrExprInfoIndexes:o,env:a,direction:s})=>{const{qLeft:l,qArea:u}=t;if(!l.length)return e;const c=gH(e.grid,l,u,r,n,i,o,a,s);vH(c,r.rowsOnCurrentPage);const d=yH(c,n);return{...e,grid:c,columnCount:c.length,totalDividerIndex:d}},xH=({qArea:e,prevData:t,pivotValuePoints:r,pageInfo:n})=>{const i=[...t];return r.forEach((t,r)=>{t.forEach((t,o)=>{const a=e.qTop-n.page*n.rowsPerPage+r,s=e.qLeft+o;Array.isArray(i[a])||(i[a]=[]);const l="U"===t.qType;i[a][s]=i[a][s]??{id:Fj(),ref:t,isNull:l}})}),i},SH=({prevData:e,dataPage:t,pageInfo:r})=>{const{qData:n,qArea:i}=t;return n?.length?xH({qArea:i,prevData:e,pivotValuePoints:n,pageInfo:r}):e},wH=(e,t,r,n,i,o,a,s,l,u)=>{const{isIndentModeEnabled:c}=n;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=r.qLeft+d-f.qUp,v=e[h][g]??mH({node:f,parent:p,root:a,x:g,y:h,pageY:h,layoutService:n,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},CH=({prevData:e,nextDataPage:t,layoutService:r,visibleTopDimensionInfo:n,attrExprInfoIndexes:i,headerRows:o,env:a,pageInfo:s,direction:l})=>{const{qTop:u,qArea:c}=t;if(!u.length)return e;const d=wH(e.grid,u,c,r,n,i,o,a,s,l);vH(d,r.size.x);const p=yH(d);return{...e,grid:d,rowCount:d.length,totalDividerIndex:p}},EH=e=>-1===e?{}:e.qAttrExprInfo.reduce((e,{id:t},r)=>(e[t]=r,e),{}),IH=(e,t)=>{const{env:r}=s$(),{direction:n}=i$(),{layoutService:i,effectivePropertiesService:o}=c$(),{qPivotDataPages:a,pageInfo:s}=i$(),[l,u]=m(null),c=((e,t,r)=>v(()=>({left:e.map(EH),top:t.map(EH),measures:r.map(EH)}),[r,e,t]))(e,t,i.visibleMeasureInfo),d=v(()=>x$(i,o,t,e),[i,o,t,e]),p=f(()=>a.slice(1).reduce((e,t)=>SH({prevData:e,dataPage:t,pageInfo:s}),((e,t)=>{const{qData:r,qArea:n}=e;return xH({qArea:n,prevData:[],pivotValuePoints:r,pageInfo:t})})(a[0],s)),[a,s]),h=f(()=>a.slice(1).reduce((e,o)=>CH({prevData:e,nextDataPage:o,layoutService:i,visibleTopDimensionInfo:t,attrExprInfoIndexes:c.top,headerRows:d.size.y,env:r,pageInfo:s,direction:n}),((e,t,r,n,i,o,a,s)=>{const{qArea:l,qTop:u}=e,c=wH([],u,l,t,r,n,i,o,a,s);vH(c,t.size.x);const d=yH(c);return{grid:c,rowCount:c.length,layoutSize:t.size,totalDividerIndex:d}})(a[0],i,t,c.top,d.size.y,r,s,n)),[a,i,t,c.top,d.size.y,r,s,n]),g=f(()=>a.slice(1).reduce((t,o)=>bH({prevData:t,nextDataPage:o,pageInfo:s,layoutService:i,visibleLeftDimensionInfo:e,attrExprInfoIndexes:c.left,env:r,direction:n}),((e,t,r,n,i,o,a)=>{const{qArea:s,qLeft:l}=e,u=gH([],l,s,r,t,n,i,o,a);vH(u,r.rowsOnCurrentPage);const c=yH(u,t);return{grid:u,columnCount:u.length,layoutSize:t.size,totalDividerIndex:c}})(a[0],i,s,e,c.left,r,n)),[a,i,s,e,c,r,n]),[y,b]=m(()=>p()),[x,S]=m(()=>h()),[w,C]=m(()=>g());kz(()=>{b(p())},[p]),kz(()=>{S(h())},[h]),kz(()=>{C(g())},[g]),kz(()=>{l&&l.forEach(o=>{b(e=>SH({prevData:e,dataPage:o,pageInfo:s})),S(e=>CH({prevData:e,nextDataPage:o,layoutService:i,visibleTopDimensionInfo:t,attrExprInfoIndexes:c.top,headerRows:d.size.y,env:r,pageInfo:s,direction:n})),C(t=>bH({prevData:t,nextDataPage:o,pageInfo:s,layoutService:i,visibleLeftDimensionInfo:e,attrExprInfoIndexes:c.left,env:r,direction:n}))})},[l]);const E=f(e=>{u(e)},[]);return{headersData:d,measureData:y,topDimensionData:x,leftDimensionData:w,attrExprInfoIndexes:c,nextPageHandler:E}},DH=Math.sqrt(1e4),PH=e=>({maxNumberOfVisibleRows:Math.ceil(e.height/24),maxNumberOfVisibleColumns:Math.ceil(e.width/bT.PixelsMin)}),RH=e=>{if(null===e)return[];if(e.qWidth*e.qHeight<1e4)return[e];const t=[],r=Math.ceil(e.qWidth/DH),n=Math.ceil(e.qHeight/DH);for(let i=0;i<r;i++)for(let r=0;r<n;r++)t.push({qLeft:e.qLeft+i*DH,qTop:e.qTop+r*DH,qWidth:Math.min(DH,e.qWidth-i*DH),qHeight:Math.min(DH,e.qHeight-r*DH)});return t};function MH({nextPageHandler:e}){const{model:t}=s$(),{pageInfo:r}=i$(),{layoutService:n}=c$(),i=(e=>{const t=l(e);return t.current=e,t})(r.page),o=t,a=f(async(e,t)=>{await(o?.collapseLeft(f$,e,t,!1))},[o]),s=f(async(e,t)=>{await(o?.collapseTop(f$,e,t,!1))},[o]),u=f(async(e,t)=>{await(o?.expandLeft(f$,e,t,!1))},[o]),c=f(async(e,t)=>{await(o?.expandTop(f$,e,t,!1))},[o]),d=f(async t=>{if(o?.getHyperCubePivotData&&0!==t.length)try{const n=await o.getHyperCubePivotData(f$,t.reduce((e,t)=>[...e,...RH(t)],[]));i.current===r.page&&e(n)}catch(e){console.error(e)}},[o,e,r,i]),p=f((e,{dimensionInfoIndex:r,isLeftColumn:i,x:o=0,columnWidthLocation:a})=>{const{qMeasureInfo:s,qDimensionInfo:l,topHeadersColumnWidth:u}=n.layout.qHyperCube;let c=[];switch(a){case EF.Dimension:c=[{qPath:`${f$}/qDimensions/${r}/qDef/columnWidth`,oldValue:l[r].columnWidth}];break;case EF.Measures:if(i)c=s.map((e,t)=>({qPath:`${f$}/qMeasures/${t}/qDef/columnWidth`,oldValue:e.columnWidth}));else{const e=n.getMeasureInfoIndexFromCellIndex(o);c=[{qPath:`${f$}/qMeasures/${e}/qDef/columnWidth`,oldValue:s[e].columnWidth}]}break;case EF.Pivot:c=[{qPath:`${f$}/topHeadersColumnWidth`,oldValue:u}]}const d=c.map(t=>{const{qPath:r,oldValue:n}=t;return{qPath:r,qOp:n?"Replace":"Add",qValue:JSON.stringify({...n,...e})}});t?.applyPatches(d,!0)},[t,n]),h=f(async e=>{await(o?.applyPatches([{qPath:`${f$}/indentModeColumnWidth`,qOp:n.layout.qHyperCube.indentModeColumnWidth?"Replace":"Add",qValue:JSON.stringify({...n.indentModeColumnWidth,...e})}],!0))},[o,n]);return v(()=>({collapseLeft:a,collapseTop:s,expandLeft:u,expandTop:c,applyColumnWidth:p,applyIndentModeColumnWidth:h,fetchPages:d}),[a,s,u,c,p,h,d])}const LH=(e,t,r)=>(n,i)=>{if("P"===n)return h$;const o=t[r+i];return e[o]},AH=e=>{const t=[],r=(e,n=0)=>{e.slice(0,1).forEach(e=>{t[n]=e.qType,e.qSubNodes.length&&r(e.qSubNodes,n+1)})};return r(e),t},kH=u({}),OH=()=>h(kH),qH=({children:e})=>{const{visibleLeftDimensionInfo:t,visibleTopDimensionInfo:r}=(()=>{const{layoutService:{layout:{qHyperCube:{qNoOfLeftDims:e,qEffectiveInterColumnSortOrder:t,qDimensionInfo:r}}}}=c$(),{qPivotDataPages:n}=i$();return v(()=>{const i=AH(n[0]?.qLeft??[]),o=AH(n[0]?.qTop??[]);return{visibleLeftDimensionInfo:i.map(LH(r,t,0)),visibleTopDimensionInfo:o.map(LH(r,t,e))}},[r,t,e,n])})(),{headersData:n,measureData:i,topDimensionData:o,leftDimensionData:a,attrExprInfoIndexes:s,nextPageHandler:l}=IH(t,r),u=MH({nextPageHandler:l}),c=v(()=>({gridSectionsData:{headersData:n,topDimensionData:o,leftDimensionData:a,measureData:i},visibleDimensionsInfo:{visibleLeftDimensionInfo:t,visibleTopDimensionInfo:r},attrExprInfoIndexes:s,dataModel:u}),[t,r,n,i,o,a,s,u]);return io.jsx(kH.Provider,{value:c,children:e})},TH=20,NH=18,_H=.75,jH=e=>-1!==e&&e?.representation?.type===vF.Image,FH=({isLeftColumn:e,layoutService:t,representation:r})=>Boolean(e)&&t.isIndentModeEnabled&&r.type===vF.Image,zH=e=>void 0===e?UF:e,WH=(e,t)=>{if(void 0!==e&&!Number.isNaN(+e)){const r=+e;return r>=0?r:t}return t},$H=e=>WH(e,bT.PixelsDefault),HH=(e,t)=>WH(e,bT.PercentageDefault)*t/100,VH=(e,t,r)=>{switch(t?.type){case xT.Pixels:return $H(t.pixels);case xT.Percentage:return HH(t.percentage,e);case xT.FitToContent:case xT.Auto:default:return r}},BH=({headers:e,layoutService:t,effectivePropertiesService:r,estimateWidthForDimensionValue:n,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===m$)return e+0;const v=FH({isLeftColumn:h,layoutService:t,representation:m?.representation||{type:vF.Text}})?g.width+8+4:n(f),y=!r.qAlwaysFullyExpanded&&p<u-1?21:0;let b=0;if(i&&o&&a){b=o("- ")+a}return Math.max(e,24*l+NH+y+v+b)},0),GH=(e,t,r)=>e.reduce((e,n)=>{const i=(r?0:1)*NH;return Math.max(e,i+t(n.qFallbackTitle??""))},0),UH=(e,t,r,n)=>{const i=100*e/t,o=n*_H*(i/100),a=i/100*+r;return Math.min(a,o)},YH=(e,t,r,n)=>n*(+r/100)*(100*e/t/100),KH=(e,t)=>e.some(e=>e>=t*_H),XH=({layoutService:e,effectivePropertiesService:t,headersData:r,columnWidths:n,tableWidth:i,widthOverride:o,measureTextForHeader:a,estimateWidthForDimensionValue:s,measureTextWidthForMeasuresCombinedWithDimensions:l,translator:u})=>{let c=[];const d=i*_H,p=r.data[r.data.length-1][0];if(!Array.isArray(p))return{leftGridWidth:0,leftGridColumnWidths:[],leftGridFullWidth:0};const f=Math.min(d,n.at(-1)),h=Math.min(d,BH({headers:p,layoutService:e,effectivePropertiesService:t,estimateWidthForDimensionValue:s})),m=Math.min(d,GH(e.visibleMeasureInfo,a));let g=0;const v=p.findIndex(e=>e.id===m$),y=(({layoutService:e,measureTextForHeader:t,translator:r,headersData:n})=>{const{type:i}=e.indentModeColumnWidth;return i===xT.Auto&&n.size.y<=1?t(r.get("SNPivotTable.IndentMode.Rows"))+8+NH+16:24})({layoutService:e,measureTextForHeader:a,translator:u,headersData:r});if(e.hasPseudoDimOnLeft)if(0===v){const e=Math.max(f,h,m);c=[Math.max(y,e-f),f]}else{const r=Math.min(d,GH(e.visibleMeasureInfo,l,!0));g=Math.min(d,BH({headers:p.slice(0,v),layoutService:e,effectivePropertiesService:t,estimateWidthForDimensionValue:s,shouldConsiderCombinatedLength:!0,measureTextForHeader:a,longestMeasureValuePossible:r}));const n=Math.max(f,h,g);c=[Math.max(y,n-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=xT.Pixels,x.pixels=o);return[xT.Pixels,xT.Percentage].includes(x.type)||KH(c,i)?((e,t,r,n)=>{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=WH(u,bT.PixelsDefault),p=WH(c,bT.PercentageDefault),f=KH(e,r);l===xT.Auto&&f&&(i>o?i-=o:o-=i),l===xT.Pixels&&d&&(i=UH(e[0],s,d,r),o=UH(e[1],s,d,r)),l===xT.Percentage&&p&&(i=YH(e[0],s,p,r),o=YH(e[1],s,p,r));let h=0;o<=n&&(h=i-5,h>0&&(i-=h,o+=h)),h=o-n,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 JH({tableWidth:e}){const t=e*_H,{styleService:r,layoutService:n,effectivePropertiesService:i}=c$(),{translator:o}=s$(),{gridSectionsData:{headersData:a}}=OH(),{measureText:s}=Rz(r.header,{allowLineBreaks:!1}),{estimateWidth:l,measureText:u}=Rz({...r.dimensionValues,fontWeight:zH(r.dimensionValues.fontWeight)}),{measureText:c}=Rz({...r.dimensionValues,...r.measureLabels}),d=f((r,d)=>{const{layout:{qHyperCube:{qNoOfLeftDims:p,topHeadersColumnWidth:f}},visibleMeasureInfo:h,isIndentModeEnabled:m,hasPseudoDimOnLeft:g}=n,v=(t=0)=>h.reduce((r,{qFallbackTitle:n,columnWidth:i})=>{const o=c(n)+NH,a=Math.max(o,t);return Math.max(r,m?a:VH(e,i,a))},0),y=e=>a.data.reduce((t,r)=>{const n=r.at(e);if(!n||Array.isArray(n))return t;if(n.id===m$)return t;const i=(e=>{const{label:t,isLocked:r}=e,n=r?TH:0;return NH+s(t)+TH+n})(n);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=NH;if(m&&1!==a.size.x||!r||void 0===d||d!==o.colIdx){let t;o.columnWidthLocation===EF.Pivot?t=m?void 0:f:o.columnWidthLocation===EF.Dimension&&({columnWidth:t}=o);let r=0;if(o.isLeftDimension)if(o.id===m$)r=v();else{const e=y(s),t=((e,t)=>{const{qApprMaxGlyphCount:r,isLeftDimension:o,dimensionInfoIndex:a}=e,s=n.getDimensionInfo(a);if(jH(s))return bT.PixelsDefault;const u=!i.qAlwaysFullyExpanded&&o&&t<p-1?21:0;return NH+l(r)+u})(o,s);r=Math.max(e,t),m&&!g&&s+1===p&&o.columnWidthLocation===EF.Dimension&&a.size.x>1&&(r=e)}else r=y(s),o.columnWidthLocation===EF.Measures&&(r=v(r));m&&1===a.size.x&&(t=n.indentModeColumnWidth),u=m&&!g&&a.size.x>1?r:VH(e,t,r)}else u=m?Math.min(t,r):r;return b+=u,u});return m&&a.size.x>1?XH({layoutService:n,effectivePropertiesService:i,headersData:a,columnWidths:S,tableWidth:e,widthOverride:r,measureTextForHeader:s,estimateWidthForDimensionValue:l,measureTextWidthForMeasuresCombinedWithDimensions:u,translator:o}):{leftGridWidth:Math.min(t,b),leftGridColumnWidths:S,leftGridFullWidth:b}},[e,a,n,t,s,c,l,u,o,i]),[p,h]=m(d);kz(()=>{h(d())},[d]);const g=f((e,t)=>{h(d(e,t))},[d]);return{...p,overrideLeftGridWidth:g}}function ZH({tableWidth:e,verticalScrollbarWidth:t,leftGridWidth:r}){const{styleService:n,layoutService:i}=c$(),{visibleDimensionsInfo:{visibleTopDimensionInfo:o}}=OH(),{layout:{qHyperCube:{qNoOfLeftDims:a,qEffectiveInterColumnSortOrder:s}},size:l,visibleMeasureInfo:u}=i,{estimateWidth:c,measureText:d}=Rz(n.measureValues,{allowLineBreaks:!1}),{estimateWidth:p}=Rz({...n.dimensionValues,fontWeight:zH(n.dimensionValues.fontWeight)},{allowLineBreaks:!1}),h=e-r-1,m=o.at(-1),g=m===h$,y=s.length-a>o.length?21:0,b=v(()=>{const e=g?u:[m],t=l.x/e.length,r=[],n=[];let i=h;const o=(e,n)=>{r[e]=Math.min(bT.PixelsMax,Math.max(bT.PixelsMin,n)),i-=r[e]*t};if(e.forEach((e,t)=>{if(e?.columnWidth){const{columnWidth:{type:r,pixels:i,percentage:a},qApprMaxGlyphCount:s,qFallbackTitle:l}=e;switch(r){case xT.Pixels:o(t,$H(i));break;case xT.Percentage:o(t,HH(a,h));break;case xT.FitToContent:o(t,((e,t,r)=>r?bT.PixelsDefault:NH+(g?Math.max(c(e),d(t)):Math.max(Math.max(...u.map(e=>c(e.qApprMaxGlyphCount))),p(e)+y)))(s,l??"",jH(e)));break;case xT.Auto:default:n.push(t)}}else n.push(t)}),n.length){const e=n.length*t,o=i/e;n.forEach(e=>{r[e]=Math.max(bT.AutoMinPivot,o)})}return r},[g,u,m,l.x,h,c,d,p,y]),x=v(()=>{if(g){return u.reduce((e,t,r)=>e+b[r],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 QH=`scrollable-container--${DF.TopGrid}`,eV=`scrollable-container--${DF.LeftGrid}`,tV=`scrollable-container--${DF.DataGrid}`,rV=e=>e&&e instanceof HTMLDivElement?{width:e.offsetWidth-e.clientWidth,height:e.offsetHeight-e.clientHeight}:{width:0,height:0},nV=(e,t)=>e>t?PF.Forward:e<t?PF.Backward:PF.None,iV=({gridRefs:{topGridRef:e,leftGridRef:t,dataGridRef:r},getWrapperElements:n,updateViewService:i,trackScrollDirection:o,interactions:a})=>{const{direction:s}=i$();d(()=>{const{headerGridWrapperElement:l,topGridWrapperElement:u,leftGridWrapperElement:c,dataGridWrapperElement:d}=n(),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=n=>{const a=n.target,l=((e,t)=>{const{scrollWidth:r,clientWidth:n,scrollLeft:i}=e,o=r-n;if("rtl"===t){if(i>o)return o;if(i<0)return Math.abs(i)}return i})(a,s);r.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(n),i?.(n)};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,r,n,s])},oV=()=>{const{interactions:e}=s$(),t=l(null),r=l(null),n=l(null),i=l(null),o=l([]),a=l([]),s=l(null),{scrollbarsDimensions:{verticalScrollbarWidth:u,horizontalScrollbarHeight:c},resetHorizontalScrollbarHeight:p}=(({topGridWrapperRef:e,leftGridWrapperRef:t,dataGridWrapperRef:r})=>{const[n,i]=m(0),[o,a]=m(0);return g(()=>{if(e.current||r.current){const t=Math.max(rV(e.current).width,rV(r.current).width);n!==t&&i(t)}}),g(()=>{if(t.current||r.current){const e=Math.max(rV(t.current).height,rV(r.current).height);o!==e&&a(e)}}),{scrollbarsDimensions:{verticalScrollbarWidth:n,horizontalScrollbarHeight:o},resetHorizontalScrollbarHeight:()=>{a(0)}}})({topGridWrapperRef:r,leftGridWrapperRef:n,dataGridWrapperRef:i});(({gridSectionsWrapperRefs:{headerGridWrapperRef:e,topGridWrapperRef:t,leftGridWrapperRef:r,dataGridWrapperRef:n},gridRefs:{topGridRef:i,leftGridRef:o,dataGridRef:a}})=>{const{pageInfo:s}=i$(),{downloadService:l,viewService:u,layoutService:c}=c$(),d=f(()=>{const i={left:0,top:0};e.current?.scrollTo(i),t.current?.scrollTo(i),r.current?.scrollTo(i),n.current?.scrollTo(i)},[e,t,r,n]);g(()=>{d()},[s.page,d]),g(()=>{c.triggerdByExpandOrCollapse||d()},[c,d]),g(()=>{if(c.triggerdByExpandOrCollapse){const e=n.current?.scrollLeft??0,t=n.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,n,a,o,i]),g(()=>{(l.isDownloadedAsPDForImage||c.isSnapshot)&&n.current&&r.current&&t.current&&(n.current.scrollTop=u.scrollTop,n.current.scrollLeft=u.scrollLeft,r.current.scrollLeft=u.leftGridScrollLeft,t.current.scrollTop=u.topGridScrollTop)},[u,l,c,n,r,t])})({gridSectionsWrapperRefs:{headerGridWrapperRef:t,topGridWrapperRef:r,leftGridWrapperRef:n,dataGridWrapperRef:i},gridRefs:{topGridRef:o,leftGridRef:a,dataGridRef:s}});const{trackScrollDirection:h,scrollDirectionRefs:{verticalScrollDirection:v,horizontalScrollDirection:y}}=(()=>{const e=l(PF.None),t=l(PF.None),r=l({prevScrollTop:0,prevScrollLeft:0}),n=f(n=>{if(n instanceof WheelEvent&&(e.current=nV(n.deltaY,0),t.current=nV(n.deltaX,0)),n instanceof Event&&!(n instanceof WheelEvent)){const i=n.target;e.current=nV(i.scrollTop,r.current.prevScrollTop),r.current.prevScrollTop=i.scrollTop,t.current=nV(i.scrollLeft,r.current.prevScrollLeft),r.current.prevScrollLeft=i.scrollLeft}},[e,t,r]);return{trackScrollDirection:n,scrollDirectionRefs:{verticalScrollDirection:e,horizontalScrollDirection:t}}})(),b=(()=>{const{viewService:e}=c$();return f(t=>{const r=t.target,n=t.currentTarget,i=r.dataset.key;i===eV&&(e.leftGridScrollLeft=n.scrollLeft),i===tV&&(e.scrollLeft=n.scrollLeft),i===QH&&(e.topGridScrollTop=n.scrollTop),i!==eV&&i!==tV||(e.scrollTop=n.scrollTop)},[e])})(),x={gridRefs:{topGridRef:o,leftGridRef:a,dataGridRef:s},getWrapperElements:f(()=>({headerGridWrapperElement:t.current,topGridWrapperElement:r.current,leftGridWrapperElement:n.current,dataGridWrapperElement:i.current}),[t,r,n,i]),updateViewService:b,trackScrollDirection:h,interactions:e};return(({gridRefs:{topGridRef:e,leftGridRef:t,dataGridRef:r},getWrapperElements:n,updateViewService:i,trackScrollDirection:o,interactions:a})=>{d(()=>{const{headerGridWrapperElement:i,topGridWrapperElement:s,leftGridWrapperElement:l,dataGridWrapperElement:u}=n(),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,r.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,r.current?.scrollTo({scrollLeft:s.scrollLeft}),o(t))},f=n=>{n.ctrlKey||(n.preventDefault(),u.scrollLeft+=n.deltaX,u.scrollTop+=n.deltaY,r.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(n))};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,r,n])})(x),iV(x),{gridSectionsWrapperRefs:{headerGridWrapperRef:t,topGridWrapperRef:r,leftGridWrapperRef:n,dataGridWrapperRef:i},gridRefs:{topGridRef:o,leftGridRef:a,dataGridRef:s},scrollDirectionRefs:{verticalScrollDirection:v,horizontalScrollDirection:y},scrollbarsDimensions:{verticalScrollbarWidth:u,horizontalScrollbarHeight:c,resetHorizontalScrollbarHeight:p}}},aV=()=>{const{layoutService:e}=c$(),{rect:t,pageInfo:r}=i$();return v(()=>{let{height:n}=t;return e.hasLimitedData&&(n-=22),r.shouldShowPagination&&(n-=41),{...t,height:n}},[t,e,r.shouldShowPagination])},sV=({children:e,style:t})=>io.jsx("div",{"data-testid":"fullSize",style:t,children:e}),lV=({children:e,style:t})=>{const{direction:r}=i$();return io.jsx("div",{"data-section-id":"GRID",style:{direction:r,display:"grid",...t},children:e})},uV=e=>e&&`scrollable-container--${e}`,cV=({children:e,style:t,origin:r},n)=>{const{interactions:i}=s$(),o=i.scroll?t:{overflow:"hidden"};return io.jsx("div",{"data-testid":"scrollable","data-key":uV(r),style:o,ref:n,children:e})};var dV=r.forwardRef(cV);const pV=({children:e,style:t})=>{const{direction:r}=i$();return io.jsx("div",{"data-testid":"sticky",style:{position:"sticky",top:0,["rtl"===r?"right":"left"]:0,...t},children:e})};var fV=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function hV(e,t){return e===t||!(!fV(e)||!fV(t))}function mV(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(!hV(e[r],t[r]))return!1;return!0}function gV(e,t){var r;void 0===t&&(t=mV);var n,i=[],o=!1;return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return o&&r===this&&t(a,i)||(n=e.apply(this,a),o=!0,r=this,i=a),n}}var vV="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function yV(e){cancelAnimationFrame(e.id)}function bV(e,t){var r=vV();var n={id:requestAnimationFrame(function i(){vV()-r>=t?e.call(null):n.id=requestAnimationFrame(i)})};return n}var xV=-1;function SV(e){if(void 0===e&&(e=!1),-1===xV||e){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",document.body.appendChild(t),xV=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return xV}var wV=null;function CV(e){if(void 0===e&&(e=!1),null===wV||e){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",r.direction="rtl";var n=document.createElement("div"),i=n.style;return i.width="100px",i.height="100px",t.appendChild(n),document.body.appendChild(t),t.scrollLeft>0?wV="positive-descending":(t.scrollLeft=1,wV=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),wV}return wV}var EV=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function IV(e){var t,r=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 n;return(n=e.call(this,t)||this)._instanceProps=m(n.props,ql(n)),n._resetIsScrollingTimeoutId=null,n._outerRef=void 0,n.state={instance:ql(n),isScrolling:!1,horizontalScrollDirection:"forward",scrollLeft:"number"==typeof n.props.initialScrollLeft?n.props.initialScrollLeft:0,scrollTop:"number"==typeof n.props.initialScrollTop?n.props.initialScrollTop:0,scrollUpdateWasRequested:!1,verticalScrollDirection:"forward"},n._callOnItemsRendered=void 0,n._callOnItemsRendered=gV(function(e,t,r,i,o,a,s,l){return n.props.onItemsRendered({overscanColumnStartIndex:e,overscanColumnStopIndex:t,overscanRowStartIndex:r,overscanRowStopIndex:i,visibleColumnStartIndex:o,visibleColumnStopIndex:a,visibleRowStartIndex:s,visibleRowStopIndex:l})}),n._callOnScroll=void 0,n._callOnScroll=gV(function(e,t,r,i,o){return n.props.onScroll({horizontalScrollDirection:r,scrollLeft:e,scrollTop:t,verticalScrollDirection:i,scrollUpdateWasRequested:o})}),n._getItemStyle=void 0,n._getItemStyle=function(e,t){var i,o=n.props,s=o.columnWidth,l=o.direction,u=o.rowHeight,c=n._getItemStyleCache(g&&s,g&&l,g&&u),f=e+":"+t;if(c.hasOwnProperty(f))i=c[f];else{var h=r(n.props,t,n._instanceProps),m="rtl"===l;c[f]=i={position:"absolute",left:m?void 0:h,right:m?h:void 0,top:p(n.props,e,n._instanceProps),height:d(n.props,e,n._instanceProps),width:a(n.props,t,n._instanceProps)}}return i},n._getItemStyleCache=void 0,n._getItemStyleCache=gV(function(e,t,r){return{}}),n._onScroll=function(e){var t=e.currentTarget,r=t.clientHeight,i=t.clientWidth,o=t.scrollLeft,a=t.scrollTop,s=t.scrollHeight,l=t.scrollWidth;n.setState(function(e){if(e.scrollLeft===o&&e.scrollTop===a)return null;var t=n.props.direction,u=o;if("rtl"===t)switch(CV()){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-r));return{isScrolling:!0,horizontalScrollDirection:e.scrollLeft<o?"forward":"backward",scrollLeft:u,scrollTop:c,verticalScrollDirection:e.scrollTop<a?"forward":"backward",scrollUpdateWasRequested:!1}},n._resetIsScrollingDebounced)},n._outerRefSetter=function(e){var t=n.props.outerRef;n._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},n._resetIsScrollingDebounced=function(){null!==n._resetIsScrollingTimeoutId&&yV(n._resetIsScrollingTimeoutId),n._resetIsScrollingTimeoutId=bV(n._resetIsScrolling,150)},n._resetIsScrolling=function(){n._resetIsScrollingTimeoutId=null,n.setState({isScrolling:!1},function(){n._getItemStyleCache(-1)})},n}El(t,e),t.getDerivedStateFromProps=function(e,t){return DV(e,t),v(e),null};var y=t.prototype;return y.scrollTo=function(e){var t=e.scrollLeft,r=e.scrollTop;void 0!==t&&(t=Math.max(0,t)),void 0!==r&&(r=Math.max(0,r)),this.setState(function(e){return void 0===t&&(t=e.scrollLeft),void 0===r&&(r=e.scrollTop),e.scrollLeft===t&&e.scrollTop===r?null:{horizontalScrollDirection:e.scrollLeft<t?"forward":"backward",scrollLeft:t,scrollTop:r,scrollUpdateWasRequested:!0,verticalScrollDirection:e.scrollTop<r?"forward":"backward"}},this._resetIsScrollingDebounced)},y.scrollToItem=function(e){var t=e.align,r=void 0===t?"auto":t,n=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=SV();void 0!==n&&(n=Math.max(0,Math.min(n,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!==n?u(this.props,n,r,m,this._instanceProps,x):m,scrollTop:void 0!==i?c(this.props,i,r,g,this._instanceProps,b):g})},y.componentDidMount=function(){var e=this.props,t=e.initialScrollLeft,r=e.initialScrollTop;if(null!=this._outerRef){var n=this._outerRef;"number"==typeof t&&(n.scrollLeft=t),"number"==typeof r&&(n.scrollTop=r)}this._callPropsCallbacks()},y.componentDidUpdate=function(){var e=this.props.direction,t=this.state,r=t.scrollLeft,n=t.scrollTop;if(t.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("rtl"===e)switch(CV()){case"negative":i.scrollLeft=-r;break;case"positive-ascending":i.scrollLeft=r;break;default:var o=i.clientWidth,a=i.scrollWidth;i.scrollLeft=a-o-r}else i.scrollLeft=Math.max(0,r);i.scrollTop=Math.max(0,n)}this._callPropsCallbacks()},y.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&yV(this._resetIsScrollingTimeoutId)},y.render=function(){var e=this.props,t=e.children,r=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?EV: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],P=I[1],R=[];if(i>0&&v)for(var M=D;M<=P;M++)for(var L=C;L<=E;L++)R.push(n(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 n(m||g||"div",{className:r,onScroll:this._onScroll,ref:this._outerRefSetter,style:ke({position:"relative",height:a,width:x,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},y)},n(c||d||"div",{children:R,ref:u,style:{height:A,pointerEvents:S?"none":void 0,width:k}}))},y._callPropsCallbacks=function(){var e=this.props,t=e.columnCount,r=e.onItemsRendered,n=e.onScroll,i=e.rowCount;if("function"==typeof r&&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 n){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,r=e.overscanColumnCount,n=e.overscanColumnsCount,a=e.overscanCount,s=e.rowCount,l=this.state,u=l.horizontalScrollDirection,c=l.isScrolling,d=l.scrollLeft,p=r||n||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,r=e.overscanCount,n=e.overscanRowCount,i=e.overscanRowsCount,o=e.rowCount,a=this.state,s=a.isScrolling,l=a.verticalScrollDirection,u=a.scrollTop,c=n||i||r||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 DV=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},PV=function(e,t){var r=e.rowCount,n=t.rowMetadataMap,i=t.estimatedRowHeight,o=t.lastMeasuredRowIndex,a=0;if(o>=r&&(o=r-1),o>=0){var s=n[o];a=s.offset+s.size}return a+(r-o-1)*i},RV=function(e,t){var r=e.columnCount,n=t.columnMetadataMap,i=t.estimatedColumnWidth,o=t.lastMeasuredColumnIndex,a=0;if(o>=r&&(o=r-1),o>=0){var s=n[o];a=s.offset+s.size}return a+(r-o-1)*i},MV=function(e,t,r,n){var i,o,a;if("column"===e?(i=n.columnMetadataMap,o=t.columnWidth,a=n.lastMeasuredColumnIndex):(i=n.rowMetadataMap,o=t.rowHeight,a=n.lastMeasuredRowIndex),r>a){var s=0;if(a>=0){var l=i[a];s=l.offset+l.size}for(var u=a+1;u<=r;u++){var c=o(u);i[u]={offset:s,size:c},s+=c}"column"===e?n.lastMeasuredColumnIndex=r:n.lastMeasuredRowIndex=r}return i[r]},LV=function(e,t,r,n){var i,o;return"column"===e?(i=r.columnMetadataMap,o=r.lastMeasuredColumnIndex):(i=r.rowMetadataMap,o=r.lastMeasuredRowIndex),(o>0?i[o].offset:0)>=n?AV(e,t,r,o,0,n):kV(e,t,r,Math.max(0,o),n)},AV=function(e,t,r,n,i,o){for(;i<=n;){var a=i+Math.floor((n-i)/2),s=MV(e,t,a,r).offset;if(s===o)return a;s<o?i=a+1:s>o&&(n=a-1)}return i>0?i-1:0},kV=function(e,t,r,n,i){for(var o="column"===e?t.columnCount:t.rowCount,a=1;n<o&&MV(e,t,n,r).offset<i;)n+=a,a*=2;return AV(e,t,r,Math.min(n,o-1),Math.floor(n/2),i)},OV=function(e,t,r,n,i,o,a){var s="column"===e?t.width:t.height,l=MV(e,t,r,o),u="column"===e?RV(t,o):PV(t,o),c=Math.max(0,Math.min(u-s,l.offset)),d=Math.max(0,l.offset-s+a+l.size);switch("smart"===n&&(n=i>=d-s&&i<=c+s?"auto":"center"),n){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}},qV=IV({getColumnOffset:function(e,t,r){return MV("column",e,t,r).offset},getColumnStartIndexForOffset:function(e,t,r){return LV("column",e,r,t)},getColumnStopIndexForStartIndex:function(e,t,r,n){for(var i=e.columnCount,o=e.width,a=MV("column",e,t,n),s=r+o,l=a.offset+a.size,u=t;u<i-1&&l<s;)u++,l+=MV("column",e,u,n).size;return u},getColumnWidth:function(e,t,r){return r.columnMetadataMap[t].size},getEstimatedTotalHeight:PV,getEstimatedTotalWidth:RV,getOffsetForColumnAndAlignment:function(e,t,r,n,i,o){return OV("column",e,t,r,n,i,o)},getOffsetForRowAndAlignment:function(e,t,r,n,i,o){return OV("row",e,t,r,n,i,o)},getRowOffset:function(e,t,r){return MV("row",e,t,r).offset},getRowHeight:function(e,t,r){return r.rowMetadataMap[t].size},getRowStartIndexForOffset:function(e,t,r){return LV("row",e,r,t)},getRowStopIndexForStartIndex:function(e,t,r,n){for(var i=e.rowCount,o=e.height,a=MV("row",e,t,n),s=r+o,l=a.offset+a.size,u=t;u<i-1&&l<s;)u++,l+=MV("row",e,u,n).size;return u},initInstanceProps:function(e,t){var r=e,n={columnMetadataMap:{},estimatedColumnWidth:r.estimatedColumnWidth||50,estimatedRowHeight:r.estimatedRowHeight||50,lastMeasuredColumnIndex:-1,lastMeasuredRowIndex:-1,rowMetadataMap:{}};return t.resetAfterColumnIndex=function(e,r){void 0===r&&(r=!0),t.resetAfterIndices({columnIndex:e,shouldForceUpdate:r})},t.resetAfterRowIndex=function(e,r){void 0===r&&(r=!0),t.resetAfterIndices({rowIndex:e,shouldForceUpdate:r})},t.resetAfterIndices=function(e){var r=e.columnIndex,i=e.rowIndex,o=e.shouldForceUpdate,a=void 0===o||o;"number"==typeof r&&(n.lastMeasuredColumnIndex=Math.min(n.lastMeasuredColumnIndex,r-1)),"number"==typeof i&&(n.lastMeasuredRowIndex=Math.min(n.lastMeasuredRowIndex,i-1)),t._getItemStyleCache(-1),a&&t.forceUpdate()},n},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.columnWidth,e.rowHeight}}),TV=function(e,t){return e};function NV(e){var t,r=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 n;return(n=e.call(this,t)||this)._instanceProps=u(n.props,ql(n)),n._outerRef=void 0,n._resetIsScrollingTimeoutId=null,n.state={instance:ql(n),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof n.props.initialScrollOffset?n.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},n._callOnItemsRendered=void 0,n._callOnItemsRendered=gV(function(e,t,r,i){return n.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:r,visibleStopIndex:i})}),n._callOnScroll=void 0,n._callOnScroll=gV(function(e,t,r){return n.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:r})}),n._getItemStyle=void 0,n._getItemStyle=function(e){var t,i=n.props,a=i.direction,s=i.itemSize,l=i.layout,u=n._getItemStyleCache(c&&s,c&&l,c&&a);if(u.hasOwnProperty(e))t=u[e];else{var d=r(n.props,e,n._instanceProps),p=o(n.props,e,n._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},n._getItemStyleCache=void 0,n._getItemStyleCache=gV(function(e,t,r){return{}}),n._onScrollHorizontal=function(e){var t=e.currentTarget,r=t.clientWidth,i=t.scrollLeft,o=t.scrollWidth;n.setState(function(e){if(e.scrollOffset===i)return null;var t=n.props.direction,a=i;if("rtl"===t)switch(CV()){case"negative":a=-i;break;case"positive-descending":a=o-r-i}return a=Math.max(0,Math.min(a,o-r)),{isScrolling:!0,scrollDirection:e.scrollOffset<a?"forward":"backward",scrollOffset:a,scrollUpdateWasRequested:!1}},n._resetIsScrollingDebounced)},n._onScrollVertical=function(e){var t=e.currentTarget,r=t.clientHeight,i=t.scrollHeight,o=t.scrollTop;n.setState(function(e){if(e.scrollOffset===o)return null;var t=Math.max(0,Math.min(o,i-r));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!1}},n._resetIsScrollingDebounced)},n._outerRefSetter=function(e){var t=n.props.outerRef;n._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},n._resetIsScrollingDebounced=function(){null!==n._resetIsScrollingTimeoutId&&yV(n._resetIsScrollingTimeoutId),n._resetIsScrollingTimeoutId=bV(n._resetIsScrolling,150)},n._resetIsScrolling=function(){n._resetIsScrollingTimeoutId=null,n.setState({isScrolling:!1},function(){n._getItemStyleCache(-1,null)})},n}El(t,e),t.getDerivedStateFromProps=function(e,t){return _V(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 r=this.props,n=r.itemCount,i=r.layout,o=this.state.scrollOffset;e=Math.max(0,Math.min(e,n-1));var s=0;if(this._outerRef){var l=this._outerRef;s="vertical"===i?l.scrollWidth>l.clientWidth?SV():0:l.scrollHeight>l.clientHeight?SV():0}this.scrollTo(a(this.props,e,t,o,this._instanceProps,s))},p.componentDidMount=function(){var e=this.props,t=e.direction,r=e.initialScrollOffset,n=e.layout;if("number"==typeof r&&null!=this._outerRef){var i=this._outerRef;"horizontal"===t||"horizontal"===n?i.scrollLeft=r:i.scrollTop=r}this._callPropsCallbacks()},p.componentDidUpdate=function(){var e=this.props,t=e.direction,r=e.layout,n=this.state,i=n.scrollOffset;if(n.scrollUpdateWasRequested&&null!=this._outerRef){var o=this._outerRef;if("horizontal"===t||"horizontal"===r)if("rtl"===t)switch(CV()){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&&yV(this._resetIsScrollingTimeoutId)},p.render=function(){var e=this.props,t=e.children,r=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?TV: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 P=E;P<=I;P++)D.push(n(t,{data:d,key:f(P,d),index:P,isScrolling:y?x:void 0,style:this._getItemStyle(P)}));var R=i(this.props,this._instanceProps);return n(m||g||"div",{className:r,onScroll:w,ref:this._outerRefSetter,style:ke({position:"relative",height:a,width:b,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},v)},n(l||u||"div",{children:D,ref:s,style:{height:S?"100%":R,pointerEvents:x?"none":void 0,width:S?R:"100%"}}))},p._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],r=e[1],n=e[2],i=e[3];this._callOnItemsRendered(t,r,n,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,r=e.overscanCount,n=this.state,i=n.isScrolling,o=n.scrollDirection,a=n.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,r),p=i&&"forward"!==o?1:Math.max(1,r);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 _V=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},jV=function(e,t,r){var n=e.itemSize,i=r.itemMetadataMap,o=r.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=n(l);i[l]={offset:a,size:u},a+=u}r.lastMeasuredIndex=t}return i[t]},FV=function(e,t,r,n,i){for(;n<=r;){var o=n+Math.floor((r-n)/2),a=jV(e,o,t).offset;if(a===i)return o;a<i?n=o+1:a>i&&(r=o-1)}return n>0?n-1:0},zV=function(e,t,r,n){for(var i=e.itemCount,o=1;r<i&&jV(e,r,t).offset<n;)r+=o,o*=2;return FV(e,t,Math.min(r,i-1),Math.floor(r/2),n)},WV=function(e,t){var r=e.itemCount,n=t.itemMetadataMap,i=t.estimatedItemSize,o=t.lastMeasuredIndex,a=0;if(o>=r&&(o=r-1),o>=0){var s=n[o];a=s.offset+s.size}return a+(r-o-1)*i},$V=NV({getItemOffset:function(e,t,r){return jV(e,t,r).offset},getItemSize:function(e,t,r){return r.itemMetadataMap[t].size},getEstimatedTotalSize:WV,getOffsetForIndexAndAlignment:function(e,t,r,n,i,o){var a=e.direction,s=e.height,l=e.layout,u=e.width,c="horizontal"===a||"horizontal"===l?u:s,d=jV(e,t,i),p=WV(e,i),f=Math.max(0,Math.min(p-c,d.offset)),h=Math.max(0,d.offset-c+d.size+o);switch("smart"===r&&(r=n>=h-c&&n<=f+c?"auto":"center"),r){case"start":return f;case"end":return h;case"center":return Math.round(h+(f-h)/2);default:return n>=h&&n<=f?n:n<h?h:f}},getStartIndexForOffset:function(e,t,r){return function(e,t,r){var n=t.itemMetadataMap,i=t.lastMeasuredIndex;return(i>0?n[i].offset:0)>=r?FV(e,t,i,0,r):zV(e,t,Math.max(0,i),r)}(e,r,t)},getStopIndexForStartIndex:function(e,t,r,n){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=jV(e,t,n),d=r+u,p=c.offset+c.size,f=t;f<a-1&&p<d;)f++,p+=jV(e,f,n).size;return f},initInstanceProps:function(e,t){var r={itemMetadataMap:{},estimatedItemSize:e.estimatedItemSize||50,lastMeasuredIndex:-1};return t.resetAfterIndex=function(e,n){void 0===n&&(n=!0),r.lastMeasuredIndex=Math.min(r.lastMeasuredIndex,e-1),t._getItemStyleCache(-1),n&&t.forceUpdate()},r},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.itemSize}});function HV(e,t){for(var r in e)if(!(r in t))return!0;for(var n in t)if(e[n]!==t[n])return!0;return!1}var VV=["style"],BV=["style"];function GV(e,t){var r=e.style,n=Oe(e,VV),i=t.style,o=Oe(t,BV);return!HV(r,i)&&!HV(n,o)}const UV=10,YV=(e,t)=>e.current===PF.Backward?t:0,KV=(e,t,r,n)=>{for(let i=r;i<r+n;i++){const r=e.at(i);if(void 0===r||void 0===r.at(t))return!0}return!1},XV=(e,t)=>e.qLeft+e.qWidth===t.qLeft&&e.qTop===t.qTop&&e.qHeight===t.qHeight,JV=({pageInfo:e,measureData:t,pageTop:r,qHeight:n,startLeft:i,endLeft:o})=>{const a=[],s=e.page*e.rowsPerPage;for(let e=i;e<o;e++)if(KV(t,e,r,n)){const t=a[a.length-1],i={qLeft:e,qTop:r+s,qWidth:1,qHeight:n};void 0!==t&&XV(t,i)?t.qWidth+=i.qWidth:a.push(i)}return a},ZV=({pageInfo:e,measureData:t,scrollDirection:r,viewService:n,minBufferStartLeft:i,minBufferEndLeft:o,columnEndIndex:a})=>{const{gridRowStartIndex:s,gridHeight:l}=n,u=r.current===PF.Backward?Math.max(0,i-25):o,c=Math.min(u+25,a);return JV({pageInfo:e,measureData:t,startLeft:u,endLeft:c,pageTop:s,qHeight:l})},QV=({pageInfo:e,measureData:t,scrollDirection:r,layoutService:n,viewService:i})=>{const{startLeft:o,endLeft:a,pageTop:s,qHeight:l}=((e,t,r)=>{const{gridColumnStartIndex:n,gridRowStartIndex:i,gridWidth:o,gridHeight:a}=t,s=e.size.x,l=YV(r,UV),u=Math.max(n-l,0);return{startLeft:u,endLeft:u+Math.min(o+UV,s-u),pageTop:i,qHeight:a}})(n,i,r),u=JV({pageInfo:e,measureData:t,startLeft:o,endLeft:a,pageTop:s,qHeight:l});return u.length>0?[...u,...ZV({pageInfo:e,measureData:t,scrollDirection:r,viewService:i,minBufferStartLeft:o,minBufferEndLeft:a,columnEndIndex:n.size.x})]:u},eB=(e,t,r,n)=>{const i=e[r];if(void 0===i)return!0;for(let e=t;e<t+n;e++){if(void 0===i[e])return!0}return!1},tB=(e,t)=>e.qTop+e.qHeight===t.qTop&&e.qLeft===t.qLeft&&e.qWidth===t.qWidth,rB=({startTop:e,endTop:t,qLeft:r,qWidth:n,measureData:i,pageInfo:o})=>{const a=[],s=o.page*o.rowsPerPage;for(let o=e;o<t;o++)if(eB(i,r,o,n)){const e=a.at(-1),t={qLeft:r,qTop:o+s,qWidth:n,qHeight:1};void 0!==e&&tB(e,t)?e.qHeight+=t.qHeight:a.push(t)}return a},nB=({pageInfo:e,measureData:t,scrollDirection:r,viewService:n})=>{const{startTop:i,endTop:o,qLeft:a,qWidth:s}=((e,t,r)=>{const{gridColumnStartIndex:n,gridRowStartIndex:i,gridWidth:o,gridHeight:a}=t,s=YV(r,UV),l=Math.max(i-s,0);return{startTop:l,endTop:l+Math.min(a+UV,e.rowsOnCurrentPage-l),qLeft:n,qWidth:o}})(e,n,r),l=rB({startTop:i,endTop:o,qLeft:a,qWidth:s,measureData:t,pageInfo:e});if(l.length>0){const n=r.current===PF.Backward?Math.max(0,i-25):o,u=Math.min(n+25,e.rowsOnCurrentPage),c=rB({startTop:n,endTop:u,qLeft:a,qWidth:s,measureData:t,pageInfo:e});return[...l,...c]}return l},iB=async(e,t,r,n,i,o,a,s)=>{const{gridColumnStartIndex:l,gridRowStartIndex:u,gridWidth:c,gridHeight:d}=i;let p=[],f=[];o.current!==PF.None&&(p=nB({pageInfo:n,measureData:r,scrollDirection:o,viewService:i})),a.current!==PF.None&&(f=QV({pageInfo:n,measureData:r,scrollDirection:a,layoutService:t,viewService:i})),o.current===PF.None&&a.current===PF.None&&(p=rB({measureData:r,pageInfo:n,qLeft:l,qWidth:c,startTop:u,endTop:u+d}));const h=e.fetchPages([...p,...f]);s.isDownloadedAsPDForImage&&s.waitForPromise(h)},oB=function(e){var t,r,n,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];r=s;var u=Date.now()-o,c=function(){o=Date.now(),n=0,e.apply(t,r)};n||(u>=i?c():n=setTimeout(c,i-u))}}(iB,100),aB=j_(iB,75),sB=(e,t,r=!1)=>void 0!==e&&(e.isLeafNode||r&&e.isLeftColumn?e.mainAxisPageCoord===t:e.mainAxisPageCoord+e.leafCount-1===t),lB=({style:e,index:t,isLastRow:r,isLastColumn:n,showLastBorder:i,isLeftColumn:o,showTotalCellDivider:a})=>{const{direction:s}=i$(),{styleService:{grid:{border:l,divider:u}}}=c$();return io.jsx("div",{style:{...e,...ez,...iz(r,n,l,s,i),...az({bottomDivider:a&&o,rightDivider:a&&!o,borderColor:u})},"data-testid":"empty-cell","data-index":t})},uB=({children:e,verticalAlign:t,width:r,right:n,isLeftColumn:i})=>{const{layoutService:{isIndentModeEnabled:o}}=c$(),a=i&&o;return io.jsx("div",{"data-key":"sticky-cell-container",style:{display:"flex",flexDirection:"row",width:r,maxWidth:"100%",maxHeight:"100%",position:"sticky",left:4,top:0,bottom:0,right:n,...!a&&{alignItems:t,alignSelf:t,overflow:"hidden"}},children:e})},cB=e=>{const{type:t,imageSize:r}=e;return t!==vF.Image||"fill"!==r&&"fitWidth"!==r?"fit-content":"100%"},dB=e=>"number"==typeof e&&!Number.isNaN(+e),pB=e=>"string"==typeof e&&e.length>0||"number"==typeof e?+e:NaN,fB=x((e,t)=>io.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:io.jsx("path",{d:"M7.5 8.5H2v-1h5.5V2h1v5.5H14v1H8.5V14h-1z"})})),hB=x((e,t)=>io.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:io.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"})})),mB=x((e,t)=>io.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:[io.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"}),io.jsx("use",{fillRule:"evenodd"})]})),gB=x((e,t)=>io.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:io.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"})})),vB=x((e,t)=>io.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:io.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"})})),yB=x((e,t)=>io.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:io.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"})})),bB=x((e,t)=>io.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:io.jsx("path",{d:"M2 7.5h12v1H2z"})})),xB=x((e,t)=>io.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:io.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"})})),SB=x((e,t)=>io.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:io.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"})})),wB=x((e,t)=>io.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:io.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"})})),CB=x((e,t)=>io.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:io.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"})})),EB=x((e,t)=>io.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:io.jsx("path",{d:"m6 10 7-7 2 2-7 7-2 2-5-5 2-2z"})})),IB=x((e,t)=>io.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:io.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"})})),DB=x((e,t)=>io.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:io.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"})})),PB=x((e,t)=>io.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:io.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"})})),RB={m:EB,"ï":wB,R:x((e,t)=>io.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:io.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:IB,T:DB,U:PB,P:SB,Q:yB,"è":x((e,t)=>io.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:io.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"})})),"¢":gB,"©":mB,"23F4":vB,2013:CB,"&":xB,add:fB,"minus-2":bB,dot:hB},MB=({size:e,iconKey:t,color:r,pvStyle:n})=>{const i=t&&RB[t];return i&&io.jsx("div",{"data-testid":"representation-indicator-icon",style:{color:r,height:e,...n},children:io.jsx(i,{style:{height:e}})})},LB=(e,t)=>e.max===e.min?.5:(t-e.min)/(e.max-e.min),AB=(e,t,r)=>{const n=e.paletteColors?e.paletteColors[t]:e.localPaletteColors[t];return r.getColorPickerColor(n)},kB=(e,t,r)=>{const n={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 r=e.limits&&e.limits.concat().sort((e,t)=>e.value-t.value);return{lowerLimit:r&&t>0?r[t-1]:{value:0,gradient:!1},upperLimit:r&&r[t]?r[t]:{value:1,gradient:!1}}})(e,t),s=((e,t,r,n,i)=>{const{upperLimit:o,lowerLimit:a}=e,{previousColor:s,nextColor:l}=t,u=n===o.value?1:(n-a.value)/(o.value-a.value);return a.gradient&&o.gradient?n-a.value<o.value-n?{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[r].color,t:n}})(a,n,t,r,e);return bN(e.localPaletteColors[t].color??"").blend(bN(s.color??""),s.t)},OB=(e,t,r)=>{const n=((e,t)=>{const{limits:r}=e;return r&&(e.limits=r.sort((e,t)=>e.value-t.value),e.limits=r.map(e=>({...e,value:LB(t,e.value)}))),e})({...e},t),i=n.paletteColors||n.localPaletteColors;return i&&(n.localPaletteColors=i.concat().map((e,t)=>({color:AB(n,t,r)}))),n},qB=(e,t,r,n)=>{const i=OB(e,r,n),{localPaletteColors:o}=i;if(t<=0)return o[0].color;if(t>=1)return o[o.length-1].color;const a=((e,t)=>{let r="",n=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>=n&&t<o){r=kB(e,a,t);break}n=o}return r})(i,t);return a},TB=(e,t)=>{const r=(e=>e.map(e=>e.value??e).sort((e,t)=>e-t))(e),n=r.some(e=>!dB(e));return 0===r.length||n?(e=>{const t=0===e?0:.5*e;return{min:e-t,max:e+t}})(t):1===r.length?((e,t)=>{const r=e[0]-t;if(0===r||!dB(r)){const e=0===t?.5:Math.abs(.5*t);return{min:t-e,max:t+e}}return r>0?{min:t-.5*Math.abs(t),max:e[0]+2*r}:{min:e[0]+2*r,max:t+.5*Math.abs(t)}})(r,t):((e,t)=>{let r=e[e.length-1]-e[0];return r=r>0?r:1,{min:Math.min(t,e[0])-r/2,max:Math.max(t,e[e.length-1])+r/2}})(r,t)},NB=(e,t)=>{const{limits:r}=e.segments;if(!r)return;const n=((e,t)=>{const{min:r,max:n}=TB(e,t),i=Math.abs(t);return{min:r??t-i,max:n??t+i}})(r,t),i=((e,t,r)=>{const{limits:n,paletteColors:i,localPaletteColors:o}=e.segments;if(!n||!dB(t))return 0;let a=r&&dB(r)?Math.min(r,t):0;const s=n.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,n.min);return{limitRange:n,limitPaletteColorIndex:i}},_B=e=>"flex-start"===e?"flex-end":"flex-start",jB=(e,t,r,n)=>{const i=e.indicatorConditionalColoring;if(!i)return;const o=NB(i,t),a=((e,t,r,n)=>{const{segments:i}=e;if(!i||!r)return;const{limits:o}=i;if(!o?.length||!((e,t)=>!(!e||0===e.length||!(e[t]?.gradient??e[t-1]?.gradient)))(o,r.limitPaletteColorIndex))return AB(i,r.limitPaletteColorIndex,n);const a=LB(r.limitRange,t);return qB(i,a,r.limitRange,n)})(i,t,o,n),s=i.segments.paletteColors[o?.limitPaletteColorIndex||0].icon,{indicator:l}=e;let u=l?.position||"right";return"rtl"===r&&(u="right"===u?"left":"right"),{color:a,iconKey:s,position:u}},FB=({representation:e,cellValue:t,textStyle:r})=>{const{styleService:n}=c$(),{theme:i}=s$(),{direction:o}=i$(),{text:a,indicator:s}=e,{showTextValues:l,applySegmentColors:u}=s??{},c=jB(e,t,o,i),{fontSize:d,fontFamily:p,fontStyle:f,fontWeight:h,textDecoration:m}=n.measureValues,g={fontSize:d,fontFamily:p,fontStyle:f,fontWeight:h,textDecoration:m},v=parseInt(d||BF,10),{iconKey:y,color:b,position:x}=c||{},S={display:"flex",paddingTop:2};return l?io.jsxs("div",{"data-key":"representation-indicator",style:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"4px",overflow:r?.overflow,color:u?b:r?.color},children:["left"===x&&MB({size:v,iconKey:y,color:b,pvStyle:S}),io.jsx("span",{style:{paddingTop:4,overflow:r?.overflow,textOverflow:r?.textOverflow,whiteSpace:"nowrap",direction:t<0?"ltr":void 0,...g},children:a}),"right"===x&&MB({size:v,iconKey:y,color:b,pvStyle:S})]}):(S.paddingTop=5,MB({size:v,iconKey:y,color:b,pvStyle:S}))},zB=(e,t,r)=>{if(e?.auto)return t;switch(e?.align){case"center":return"center";case"left":return"rtl"===r?"flex-end":"flex-start";case"right":return"rtl"===r?"flex-start":"flex-end";default:return t}},WB=(e,t)=>{let{textAlign:r}=t.getDimensionInfo(e.dimensionInfoIndex)??{};return e.isPseudoDimension&&void 0!==e.visibleMeasureInfoIndex&&({labelTextAlign:r}=t.visibleMeasureInfo.at(e.visibleMeasureInfoIndex)??{}),r?.auto||void 0===r?"left":r.align},$B=(e,t,r,n,i)=>{if(i)return;const o=e.representation,a=FH({isLeftColumn:r,layoutService:t,representation:o}),s=r?"flex-start":"center",l=e.representation.resolvedImagePosition?.horizontal;if(e.representation.type===vF.Image)return a&&l&&"center"!==l&&"rtl"===n?_B(l):l??s;if(e.isPseudoDimension&&void 0!==e.visibleMeasureInfoIndex){const{labelTextAlign:r}=t.visibleMeasureInfo[e.visibleMeasureInfoIndex]??{};return zB(r,s,n)}const{textAlign:u}=t.getDimensionInfo(e.dimensionInfoIndex)??{};return zB(u,s,n)},HB=e=>!!e.target?.getAttribute("class")?.includes(yT),VB=(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:r}=t.payload,n=Math.min(r,e.activeSelection.startIndex),i=Math.max(r,e.activeSelection.endIndex);if(n===e.activeSelection.startIndex&&i===e.activeSelection.endIndex)return e;const o={...e.activeSelection,startIndex:n,endIndex:i};return o.clientSelectedCells=(e=>{const{getCellFromIndex:t,startIndex:r,endIndex:n,clientSelectedCells:i}=e,o=new Map(i);for(let e=r;e<=n;e++){const r=t(e);"N"===r?.ref.qType&&o.set(r.ref.qElemNo,r)}return o})(o),{...e,activeSelection:o}}default:return e}},BB=e=>null!==e.target?.closest("[data-prevent-selection]"),GB=e=>"A"===e.target?.tagName,UB=({startIndex:e,getCellFromIndex:t,cell:r})=>({type:"mousedown",payload:{activeSelection:{startIndex:e,endIndex:e,getCellFromIndex:t,clientSelectedCells:(new Map).set(r.ref.qElemNo,r)},selectedField:{selectionCellType:r.selectionCellType,index:"L"===r.selectionCellType?r.x:r.y}}});const YB=u({createMouseDownHandler:()=>()=>{},createMouseOverHandler:()=>()=>{},createPointerUpHandler:()=>()=>{},isSelected:()=>!1,isActive:!1,isLocked:()=>!1}),KB=()=>h(YB),XB=({children:e,selections:t})=>{const r=function(e){const{updatePageInfo:t}=i$(),r=e.isActive(),[n,i]=c(VB,{engineSelectedCells:null,selectedField:null,activeSelection:null});d(()=>{const r=()=>{i({type:"clearSelections"})},n=()=>{r(),t({page:0})};return e.on("deactivated",r),e.on("canceled",r),e.on("confirmed",n),e.on("cleared",r),()=>{e.removeListener("deactivated",r),e.removeListener("canceled",r),e.removeListener("confirmed",n),e.removeListener("cleared",r)}},[e,t]);const o=f(async()=>{if(!n.activeSelection)return;var t,r;1===n.activeSelection.clientSelectedCells.size&&(t=n.engineSelectedCells,(r=n.activeSelection).clientSelectedCells.forEach((e,n)=>{t?.has(n)&&(r.clientSelectedCells.delete(n),t.delete(n))}));const o=new Map([...n.engineSelectedCells??new Map,...n.activeSelection.clientSelectedCells]);try{i({type:"mouseup",payload:{engineSelectedCells:o}}),await e.select({method:"selectPivotCells",params:[f$,Array.from(o,([,e])=>({qType:e.selectionCellType,qRow:e.y,qCol:e.x}))]})}catch(e){console.error(e),i({type:"mouseup",payload:{engineSelectedCells:n.engineSelectedCells}})}},[n,e]);d(()=>{if(n.activeSelection)return document.addEventListener("mouseup",o),()=>{document.removeEventListener("mouseup",o)}},[o,n.activeSelection]);const a=f((e,t)=>r=>{const n=t(e);HB(r)||BB(r)||GB(r)||!(e=>1===e.buttons)(r)||!n||i(UB({startIndex:e,getCellFromIndex:t,cell:n}))},[]),s=f(t=>async()=>{n.activeSelection&&(e.isActive()||await e.begin([f$]),i({type:"mouseover",payload:{index:t}}))},[n.activeSelection,e]),l=f((e,t)=>r=>{if("touch"!==r.pointerType)return;const n=t(e);HB(r)||BB(r)||GB(r)||!n||(i(UB({startIndex:e,getCellFromIndex:t,cell:n})),o())},[o]),u=f(e=>!(!n.engineSelectedCells?.size&&!n.activeSelection?.clientSelectedCells.size||!n.selectedField||e.selectionCellType===n.selectedField.selectionCellType&&("L"===e.selectionCellType?n.selectedField.index===e.x:n.selectedField.index===e.y)),[n.activeSelection?.clientSelectedCells.size,n.engineSelectedCells?.size,n.selectedField]),p=f(e=>!u(e)&&(n.engineSelectedCells?.has(e.ref.qElemNo)||!!n.activeSelection?.clientSelectedCells.has(e.ref.qElemNo)),[u,n.activeSelection?.clientSelectedCells,n.engineSelectedCells]);return v(()=>({isSelected:p,isActive:r,isLocked:u,createMouseDownHandler:a,createMouseOverHandler:s,createPointerUpHandler:l}),[p,r,u,a,s,l])}(t);return io.jsx(YB.Provider,{value:r,children:e})},JB=e=>"fill"===e.representation.imageSize,ZB=(e,t)=>{let r=e.isLeftColumn?"flex-start":"center";return e.isLeftColumn&&JB(e)&&t&&(r="center"),e.representation.type!==vF.Image||JB(e)?r:e.representation.resolvedImagePosition?.vertical};var QB=function(e){return e.Background="background",e.Color="color",e.FontWeight="fontWeight",e.FontStyle="fontStyle",e.TextDecoration="textDecoration",e}(QB||{});const eG={brighter:.5,darker:.3,opacity:.03},tG=(e,{cell:t,styleService:r})=>{if(e===QB.Background||e===QB.Color){const r=t.expressionColor[e];if(r)return r}return t.isNull?r.nullValues[e]:t.isPseudoDimension?r.measureLabels[e]:t.isTotal?r.totalValues[e]:r.dimensionValues[e]},rG=({styleService:e,isCellSelected:t,cell:r,isCellLocked:n})=>{if(t)return e.selectedColors.background;const i=tG(QB.Background,{cell:r,styleService:e});return!n||!i||r.isPseudoDimension||r.isEmpty||r.isNull||r.isTotal?tG(QB.Background,{cell:r,styleService:e}):`repeating-linear-gradient(\n -45deg,\n ${Y_(o=i,eG)} 0px 2px,\n ${o} 0px 4px\n ) border-box`;var o},nG=({cell:e,styleService:t,isCellSelected:r})=>r?t.selectedColors.color:tG(QB.Color,{cell:e,styleService:t}),iG=({cell:e,styleService:t})=>{const{qCanCollapse:r,qCanExpand:n}=e.ref,i=tG(QB.FontWeight,{cell:e,styleService:t});return void 0===i&&(n||r)?UF:i},oG=({cell:e,styleService:t})=>tG(QB.FontStyle,{cell:e,styleService:t}),aG=({cell:e,styleService:t})=>tG(QB.TextDecoration,{cell:e,styleService:t}),sG=e=>e?"pointer":"default",lG=({expandOrCollapse:e,cell:t})=>r=>{e?.(t.y,t.x),r.stopPropagation()},uG=(e,t)=>{if(!e.isLeftColumn||e.representation.type===vF.Image)return{padding:4};return{padding:4,marginTop:t.dimensionValueTextHeight/2-6.5-4}},cG=({cell:e,isLeftColumn:t,isCellSelected:r})=>{const{styleService:n,layoutService:i}=c$(),{interactions:o}=s$(),{isActive:a}=KB(),{dataModel:s}=OH();if(!e.ref.qCanExpand&&!e.ref.qCanCollapse)return null;const l=!o.active||a||!s,u=nG({cell:e,styleService:n,isCellSelected:r}),c=a?.4:1,d=e.ref.qCanExpand?mW:hW;let p;p=e.ref.qCanExpand?t?s.expandLeft:s.expandTop:t?s.collapseLeft:s.collapseTop;const f=FH({isLeftColumn:t,layoutService:i,representation:e.representation});return io.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,...uG(e,n),...f&&{alignSelf:ZB(e)}},onClick:l?void 0:lG({cell:e,expandOrCollapse:p})})},dG=e=>{switch(e){case"fitHeight":case"fill":case"alwaysFit":return"100%";case"originalSize":return"fit-content";default:return"auto"}},pG=(e,t,r)=>{if("alwaysFit"===e&&t&&!r)return"fit-content";switch(e){case"fitHeight":return"auto";case"originalSize":return"fit-content";case"alwaysFit":return r?"unset":"100%";default:return"100%"}},fG=(e,t)=>{if("alwaysFit"===e)switch(t?.vertical){case"flex-start":return"center top";case"flex-end":return"center bottom";default:return"center center"}},hG=({representation:e,canExpandOrCollapse:t,leafCount:r,isLeftColumn:n,styleService:i,layoutService:o,isMeasureCell:a})=>{const{isIndentModeEnabled:s}=o,l=FH({isLeftColumn:n,layoutService:o,representation:e}),u=t?21:0,c=e.imageBox?.width??24;let d=`calc(100% - ${u}px)`,p=i.headerCellHeight;n&&l&&(d=c),(a||n)&&(p=i.contentCellHeight);let f=p;switch(n&&void 0!==r&&!s&&(f=p*Math.max(r,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}}},mG=e=>{if("alwaysFit"===e)return"contain"},gG=({suffix:e,delimeter:t})=>` ${e?t:""} ${e}`.trim(),vG=({imageSize:e,resolvedImagePosition:t,isImagesInIndentModeEnabled:r,isMeasureCell:n})=>({width:pG(e,r,n),height:dG(e),objectFit:mG(e),objectPosition:fG(e,t),...r&&"alwaysFit"===e?{"max-width":"100%"}:{}}),yG=({representation:e,textStyle:t,isMeasureCell:r})=>{const{imageRef:n,onLoad:i}=(()=>{const{downloadService:e}=c$(),t=l(null),{promise:r,resolve:n}=v(()=>mz(),[]);return d(()=>(e.isDownloadedAsPDForImage&&(e.waitForPromise(r),t.current?.complete&&n()),()=>{n()}),[t,e,r,n]),{onLoad:f(()=>{n()},[n]),imageRef:t}})(),{layoutService:{isIndentModeEnabled:o}}=c$(),{url:a,text:s,imageSize:u,resolvedImagePosition:c}=e,{overflow:p,...h}=t;return io.jsx("img",{src:a,alt:s,style:{...vG({imageSize:u,resolvedImagePosition:c,isImagesInIndentModeEnabled:o,isMeasureCell:r}),...h},onLoad:i,ref:n})},bG=({representation:e,textStyle:t,canExpandOrCollapse:r,leafCount:n,isLeftColumn:i=!1,imageContainerHorizontalAlignment:o,isMeasureCell:a})=>{const{styleService:s,layoutService:l}=c$(),{resolvedImagePosition:u}=e;return io.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",...hG({representation:e,canExpandOrCollapse:r,leafCount:n,styleService:s,layoutService:l,isLeftColumn:i,isMeasureCell:a})},children:io.jsx(yG,{representation:e,textStyle:t,isMeasureCell:!0})})},xG={display:"flex",flexDirection:"row",alignItems:"center"},SG={alignItems:"center",display:"flex",flexDirection:"row",backgroundClip:"padding-box"},wG=(e,t,r,n)=>t?{...SG,...e.nullValues}:r?{...xG,color:e.totalValues.color,background:n??e.totalValues.background}:{...xG,color:e.measureValues.color,background:n??e.measureValues.background},CG=(e,t,r,n,i)=>{const{fontFamily:o,fontSize:a}=e.measureValues,s={...tz,...!r&&rz(e.grid.lineClamp),...t&&{color:t},fontFamily:o,fontSize:a};if(i){const{fontWeight:t,fontStyle:r,textDecoration:n}=e.nullValues;return{...s,fontWeight:t,fontStyle:r,textDecoration:n}}if(n){const{fontWeight:t,fontStyle:r,textDecoration:n}=e.totalValues;return{...s,fontWeight:t,fontStyle:r,textDecoration:n}}const{fontWeight:l,fontStyle:u,textDecoration:c}=e.measureValues;return{...s,fontWeight:void 0===l?UF:l,fontStyle:u,textDecoration:c}},EG=({cell:e,representation:t,color:r,isTotalValueCell:n,cellHorizontalAlignment:i})=>{const{layoutService:o,styleService:a}=c$(),{isIndentModeEnabled:s}=o,l=e.isNull?o.getNullValueText():t.text,u=t.type===vF.Image,c=t.type===vF.Indicator,d=dB(pB(l)),p=CG(a,r,d,n,e.isNull);if(!s&&u&&!e.isNull||s&&u&&!e.isNull)return io.jsx(bG,{isMeasureCell:!0,textStyle:p,representation:t,imageContainerHorizontalAlignment:i});const f=pB(e.isNull?t.text:e.ref.qNum);return c&&dB(f)?io.jsx(FB,{representation:t,cellValue:f,textStyle:p}):io.jsx("span",{style:{padding:4,direction:d?"ltr":void 0,...p},children:l})},IG=(e,t)=>e?.[t]?.visibleMeasureInfoIndex??0,DG="flex-start",PG=(e,t)=>e.isNull?DG:t.type===vF.Image&&"fill"!==t.imageSize?t.resolvedImagePosition?.vertical:DG,RG=({columnIndex:e,rowIndex:t,style:r,data:n})=>{const{env:i}=s$(),{pageInfo:o,direction:a}=i$(),{styleService:s,layoutService:l}=c$(),{attrExprInfoIndexes:u,gridSectionsData:{measureData:c,leftDimensionData:d,topDimensionData:p},visibleDimensionsInfo:{visibleLeftDimensionInfo:h,visibleTopDimensionInfo:m}}=OH(),g=(()=>{const{layoutService:{isIndentModeEnabled:e}}=c$(),{gridSectionsData:{leftDimensionData:t,topDimensionData:r},visibleDimensionsInfo:{visibleLeftDimensionInfo:n,visibleTopDimensionInfo:i}}=OH(),o=n.length,a=i.length;return f((n,i)=>!(!r.grid.at(a-1)?.[n]?.isTotal&&!t.grid.at(e?0:o-1)?.[i]?.isTotal),[r,t,o,a,e])})(),v=(()=>{const{gridSectionsData:{topDimensionData:e},visibleDimensionsInfo:{visibleTopDimensionInfo:t}}=OH(),r=t.length;return f(t=>{const n=e.grid.at(r-1)?.[t];return sB(n,e.totalDividerIndex)},[e,r])})(),y=(()=>{const{layoutService:{isIndentModeEnabled:e}}=c$(),{gridSectionsData:{leftDimensionData:t},visibleDimensionsInfo:{visibleLeftDimensionInfo:r}}=OH(),n=r.length;return f(r=>{const i=e?0:n-1,o=t.grid.at(i)?.[r];return sB(o,t.totalDividerIndex,e)},[t,e,n])})(),{showLastBorder:b}=n,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 io.jsx(lB,{style:{...r,background:w},isLastRow:E,isLastColumn:I,showLastBorder:b,index:t,isLeftColumn:!1,showTotalCellDivider:!1});const D=l.hasPseudoDimOnLeft?IG(S,t):IG(x,e),P=l.visibleMeasureInfo[D],R=dH({cell:C.ref,representationProperties:P.representation,attrExprInfoIndex:u.measures[D],env:i,direction:a,conditionalColoring:P.conditionalColoring,enabledFeatures:{[vF.Image]:!0,[vF.Indicator]:!0}}),M=!C.isNull&&g(e,t),L=C.isNull?l.getNullValueText():R.text,A=!C.isNull||!Number.isNaN(+L),k=pH(u.measures[D],C.ref),O=((e,t,r,n,i)=>{const{textAlign:o}=t,a=n?"flex-end":"center";return e.isNull||r.type!==vF.Image?zB(o,a,i):r.resolvedImagePosition?.horizontal??"center"})(C,P,R,A,a),q={...wG(s,C.isNull,M,k.background),...iz(E,I,s.grid.border,a,b),...az({bottomDivider:y(t),rightDivider:v(e),borderColor:s.grid.divider}),...ez,padding:"0px 4px",display:"flex",justifyContent:O};return io.jsx("div",{className:gT,title:L,style:{...q,...r},"data-testid":"measure-value","data-row-index":t,"data-col-index":e,children:io.jsx(uB,{width:cB(R),verticalAlign:PG(C,R),children:io.jsx(EG,{cell:C,representation:R,isTotalValueCell:M,color:k.color,cellHorizontalAlignment:O})})})};var MG=r.memo(RG,GV);const LG=(e,t)=>t.list[e]?.id??e.toString(),AG=({columnIndex:e,rowIndex:t,data:r})=>r.grid[t]?.[e]?.id??`${t}-${e}`,kG=e=>({...QF,overflow:"hidden",boxSizing:"content-box",borderWidth:"rtl"===e?"1px 1px 0px 0px":"1px 0px 0px 1px"}),OG=({dataGridRef:e,height:t,rowHightCallback:r,width:n,showLastBorder:i,getRightGridColumnWidth:o,verticalScrollDirection:a,horizontalScrollDirection:s})=>{const{pageInfo:l,direction:u}=i$(),{layoutService:c,styleService:{grid:{divider:d},contentCellHeight:p}}=c$(),{dataModel:h,gridSectionsData:{measureData:m}}=OH(),v={...kG(u),borderColor:d,willChange:"auto",userSelect:"none",WebkitUserSelect:"none"},y=(({verticalScrollDirection:e,horizontalScrollDirection:t})=>{const{pageInfo:r}=i$(),{downloadService:n,viewService:i,layoutService:o}=c$(),{dataModel:a,gridSectionsData:{leftDimensionData:s,topDimensionData:l,measureData:u}}=OH(),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===PF.None?0:UV),m=i.gridHeight+d+(e.current===PF.None?0:UV);let g=oB;m*h>1500&&(g=aB),g(a,o,u,r,i,e,t,n)},[i,o,a,u,e,t,r,c,d,n])})({verticalScrollDirection:a,horizontalScrollDirection:s});return kz(()=>{e.current&&e.current.resetAfterColumnIndex(0,!1)},[e,h,m]),g(()=>{e.current&&e.current.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!0})},[n,t,e,p,u]),0===c.size.x?null:io.jsx(qV,{"data-section-id":"DATA_GRID",ref:e,style:v,columnCount:c.size.x,columnWidth:o,height:t,rowCount:l.rowsOnCurrentPage,rowHeight:r,width:n,itemData:{showLastBorder:i,grid:m},onItemsRendered:y,estimatedRowHeight:r(),estimatedColumnWidth:o(),itemKey:AG,direction:u,children:MG})};var qG=b(OG);const TG=x((e,t)=>io.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:[io.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"}),io.jsx("use",{fillRule:"evenodd"})]})),NG=e=>{const[t,r]=m(!1);return kz(()=>{r(!1)},e),{isAdjustingWidth:t,setIsAdjustingWidth:r}},_G=()=>{const[e,t]=m(!1),{dataModel:r}=OH(),{interactions:n}=s$(),{isAdjustingWidth:i,setIsAdjustingWidth:o}=NG([r]);return{open:e,setOpen:t,handleOpenMenu:e=>{!n.active||HB(e)||i||t(!0)},setIsAdjustingWidth:o}};function jG(e,t){const r=t.expressionColor?.background??e.dimensionValues.background,n=t.isLeftColumn?e.header.background:r,i=n===XF.Transparent?oN.WHITE:n,o=bN(e.grid.border),a=bN(i);return a.isInvalid()||o.isInvalid()||1===o.a?e.grid.border:function(e,t,r){return bN(e.r+(t.r-e.r)*r,e.g+(t.g-e.g)*r,e.b+(t.b-e.b)*r,e.a+(t.a-e.a)*r)}(a,o,o.a).getRGB()}const FG=({cellInfo:e,columnWidth:t,isLastColumn:r,overrideLeftGridWidth:n,setIsAdjustingWidth:i,shouldApplyIndentModeColumnWidth:o,tableWidth:a})=>{const{direction:s}=i$(),{interactions:l,translator:u}=s$(),{isActive:c}=KB(),{dataModel:d}=OH(),{styleService:p}=c$(),[,f]=m({});if(!(e.canBeResized&&!!l.active&&!c))return null;const h=jG(p,e);return io.jsx(jz,{isPivot:!0,columnWidth:t,isLastColumn:r,keyValue:`adjuster-${e.dimensionInfoIndex}`,hoverColor:h,updateWidthCallback:t=>{f({}),n&&void 0!==e.colIdx&&n(t,e.colIdx)},confirmWidthCallback:t=>{o?d.applyIndentModeColumnWidth({...t,pixels:Math.min((a??0)*_H,t.pixels??0)}):d.applyColumnWidth(t,e)},setIsAdjustingWidth:i,isLeftColumn:e.isLeftColumn,accessibilityRelatedArgs:{translator:u,columnLabel:e.label??""},direction:s})},zG=fl(Qu,{shouldForwardProp:e=>!["interactions","hoverBackground","background","shouldShowMenuIcon","isDimension"].includes(e)})(({interactions:e,background:t,hoverBackground:r,shouldShowMenuIcon:n,isDimension:i})=>({pointerEvents:i?"all":"none",position:"relative",display:"grid",gridTemplateColumns:n?"1fr 12px":"1fr",gap:8,alignItems:"center",cursor:e.active?"pointer":"default",background:t,"&&:hover":{background:e.active&&i?r:t}})),WG=fl("div",{shouldForwardProp:e=>!["direction"].includes(e)})(({direction:e})=>({position:"absolute",left:"rtl"!==e?0:void 0,bottom:0})),$G=fl("div",{shouldForwardProp:e=>"justifyContent"!==e})(({justifyContent:e})=>({...ZF,justifyContent:e??ZF.justifyContent,flexDirection:"row",overflow:"hidden",position:"relative",gap:8})),HG=fl("div")(()=>({...ZF})),VG=fl("div",{shouldForwardProp:e=>!["fontSize","fontFamily","fontWeight","fontStyle","textDecoration","justifyContent"].includes(e)})(({fontSize:e,fontFamily:t,fontWeight:r,fontStyle:n,textDecoration:i,justifyContent:o})=>({display:"flex",justifyContent:o,alignSelf:"center",flexGrow:1,maxWidth:"100%",fontWeight:r,fontSize:e,fontFamily:t,fontStyle:n,textDecoration:i})),BG=fl(hp)(({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}})),GG=fl(bp,{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}}})),UG=fl("span")({textOverflow:"ellipsis",overflow:"hidden"}),YG=fl("div",{shouldForwardProp:e=>"visible"!==e})(({visible:e})=>({opacity:e?1:0,width:TH,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"})),KG=fl("span",{shouldForwardProp:e=>!["padding","alignSelf"].includes(e)})(({padding:e,alignSelf:t})=>({padding:e,alignSelf:t,position:"sticky",top:0}));let XG=function(e){return e.Expand="Expand",e.Collapse="Collapse",e}({});const JG=(e,t)=>({qExcludeList:t===XG.Expand,qPos:{qDimName:e,qElemNo:[]}}),ZG=`${f$}/qExpansionState`,QG=({model:e,qExpansionState:t,qEffectiveDimensionName:r,action:n})=>async()=>{const i=(({qEffectiveDimensionName:e,oldExpansionState:t,action:r})=>{const n=t?.findIndex(t=>t.qPos?.qDimName===e);return{expansionData:JG(e,r),index:n}})({qEffectiveDimensionName:r,oldExpansionState:t,action:n});await(async({model:e,newExpansionState:t,errorMsg:r})=>{const{index:n,expansionData:i}=t;try{let t,r=ZG,o="Add";void 0===n?t=JSON.stringify([i]):-1===n?(r=`${ZG}/-`,t=JSON.stringify(i)):(r=`${ZG}/${n}`,o="Replace",t=JSON.stringify(i)),await e.applyPatches([{qPath:r,qOp:o,qValue:t}],!0)}catch(e){console.error(r,e)}})({model:e,newExpansionState:i,errorMsg:`Failed to ${n} dimension`})},eU=({model:e,effectivePropertiesService:t,cell:r})=>{if(void 0===r.qEffectiveDimensionName)return;const n={model:e,qExpansionState:t.qExpansionState,qEffectiveDimensionName:r.qEffectiveDimensionName};return{expandCallback:QG({...n,action:XG.Expand}),collapseCallback:QG({...n,action:XG.Collapse}),alwaysFullyExpanded:t.qAlwaysFullyExpanded}},tU={[CW.Sorting]:!0,[CW.Selections]:!0,[CW.Searching]:!0},rU=({cell:e,style:t,isFirstColumn:r,isLastColumn:n,isLastRow:i,changeSortOrder:o,iconsVisibilityStatus:a,columnWidth:s,overrideLeftGridWidth:u,shouldApplyIndentModeColumnWidth:c,tableWidth:d})=>{const p=l(null),{styleService:f,layoutService:h,effectivePropertiesService:m}=c$(),{app:g,interactions:v,embed:y,translator:b,model:x}=s$(),{fontSize:S,fontFamily:w,fontStyle:C,fontWeight:E,textDecoration:I,color:D,background:P,hoverBackground:R,activeBackground:M}=f.header,L=l(null),{shouldShowLockIcon:A,shouldShowMenuIcon:k}=a,{open:O,setOpen:q,handleOpenMenu:T,setIsAdjustingWidth:N}=_G(),{direction:_}=i$(),j={sortFromMenu:async(t,r)=>{t.stopPropagation(),await o(e,r)}},F={embed:y,listboxRef:p,sortCriteria:h.searchSortFromDimension&&e.isDim?m.getSortCriteriaForDimension(e.dimensionInfoIndex):void 0},z={app:g,qStateName:h.layout.qStateName},{labelTextAlign:W}=h.getDimensionInfo(e.dimensionInfoIndex)??{},$=zB(W,"flex-start",_);return io.jsxs(zG,{className:gT,title:e.label,interactions:v,background:O?M:P,hoverBackground:R,shouldShowMenuIcon:k,isDimension:e.isDim,style:{...t,...ez,...oz(e,i,r,n,f.grid.border,_),color:D},"data-testid":"title-cell",onClick:T,children:[io.jsxs($G,{children:[A?io.jsx(HG,{children:io.jsx(TG,{height:12})}):null,io.jsx(VG,{fontFamily:w,fontSize:S,fontStyle:C,fontWeight:E,textDecoration:I,justifyContent:$,children:io.jsx("span",{style:tz,children:e.label})})]}),e.isDim?io.jsxs(io.Fragment,{children:[io.jsx(DW,{headerData:e,translator:b,anchorRef:L,open:O,setOpen:q,interactions:v,menuAvailabilityFlags:tU,sortRelatedArgs:j,searchRelatedArgs:F,selectionRelatedArgs:z,expandOrCollapseArgs:eU({model:x,effectivePropertiesService:m,cell:e}),shouldShowMenuIcon:k,model:x&&"setActiveField"in x?x:void 0,direction:_,isAccessibleHeader:!0}),io.jsx(WG,{ref:p,direction:_}),io.jsx(WG,{ref:L,direction:_})]}):null,io.jsx(FG,{cellInfo:{...e,isLeftColumn:!0},columnWidth:s,isLastColumn:n,overrideLeftGridWidth:u,setIsAdjustingWidth:N,shouldApplyIndentModeColumnWidth:c,tableWidth:d})]})},nU=({rowSpan:e,columnSpan:t})=>{const{styleService:r}=c$(),{direction:n}=i$();return e>0&&t>0?io.jsx("div",{style:{...QF,gridRowStart:1,gridRowEnd:`span ${e}`,gridColumnStart:1,gridColumnEnd:`span ${t}`,borderWidth:"rtl"===n?"0px 0px 0px 1px":"0px 1px 0px 0px",borderColor:r.grid.border,background:r.grid.background},"data-testid":"empty-header-cell"}):null},iU=x((e,t)=>io.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:io.jsx("path",{d:"m8 9 4.5-4.5L14 6l-4.5 4.5L8 12 2 6l1.5-1.5z"})})),oU=x((e,t)=>io.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:[io.jsx("path",{d:"m8 7-4.5 4.5L2 10l6-6 6 6-1.5 1.5z"}),io.jsx("use",{fillRule:"evenodd"})]})),aU=({tableWidth:e,leftGridWidth:t,overrideLeftGridWidth:r})=>{const{direction:n}=i$(),{styleService:i}=c$(),{interactions:o,translator:a}=s$(),{isActive:s}=KB(),{dataModel:l}=OH(),{setIsAdjustingWidth:u}=NG([l]);if(!(!!o.active&&!s))return null;const c=jG(i,{isLeftColumn:!0});return io.jsx(jz,{isPivot:!0,isLastColumn:!0,isLeftColumn:!0,keyValue:"adjuster-indent-row",hoverColor:c,columnWidth:t,updateWidthCallback:t=>{r(Math.min(t,e*_H))},confirmWidthCallback:n=>{if(n.type===xT.FitToContent)return void l.applyIndentModeColumnWidth({type:xT.Auto});const i=Math.min(n.pixels??t,e*_H);r(i),l.applyIndentModeColumnWidth({type:xT.Pixels,pixels:i})},setIsAdjustingWidth:u,accessibilityRelatedArgs:{translator:a,columnLabel:a.get("SNPivotTable.IndentMode.Rows")},direction:n})},sU=x((e,t)=>io.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:io.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"})})),lU=({cell:e,changeSortOrder:t})=>{const r=l(null),n=l(null),{app:i,interactions:o,embed:a,translator:s,model:u}=s$(),{layoutService:c,effectivePropertiesService:d}=c$(),{open:p,setOpen:f,handleOpenMenu:h}=_G();return io.jsxs(GG,{onClick:h,isActive:p,children:[io.jsx(UG,{children:e.label}),io.jsxs(YG,{className:"indent-mode-dropdown-more",visible:p,children:[io.jsx(sU,{}),e.isDim?io.jsxs(io.Fragment,{children:[io.jsx(DW,{headerData:e,translator:s,anchorRef:r,open:p,setOpen:f,interactions:o,menuAvailabilityFlags:tU,sortRelatedArgs:{sortFromMenu:async(r,n)=>{r.stopPropagation(),await t(e,n)}},searchRelatedArgs:{embed:a,listboxRef:n},selectionRelatedArgs:{app:i,qStateName:c.layout.qStateName},expandOrCollapseArgs:eU({model:u,effectivePropertiesService:d,cell:e}),shouldShowMenuIcon:!1,model:u&&"setActiveField"in u?u:void 0}),io.jsx(WG,{ref:n}),io.jsx(WG,{ref:r})]}):null]})]})},uU=({idx:e,menu:t,menuItems:r,isOnlyOneRow:n})=>{const i=r.at(-1)?.id===m$,o=e+1<r.length&&r[e+1]?.id===m$;return!(n&&i&&o)&&(t?.id!==m$&&e<r.length-1)},cU=({menuItems:e,changeSortOrder:t,overrideLeftGridWidth:r,leftGridWidth:n,tableWidth:i})=>{const{styleService:o}=c$(),{interactions:a,translator:s}=s$(),{dataModel:u,gridSectionsData:{headersData:c}}=OH(),[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}=NG([u]),D=e=>{e.stopPropagation()},P={height:h,gridColumn:`1 / span ${c.size.x}`,gridRow:c.size.y,zIndex:c.size.x-0};return io.jsxs(zG,{isDimension:!0,background:d?b:v,interactions:a,hoverBackground:y,style:{...P,...ez,color:g},onClick:e=>{!a.active||HB(e)||I||p(!d)},"data-testid":"indentModeHeaderCellWrapper",children:[io.jsxs($G,{justifyContent:"flex-start",children:[io.jsx(VG,{fontFamily:x,fontSize:S,fontStyle:w,fontWeight:C,textDecoration:E,justifyContent:"flex-start",children:io.jsx("span",{style:tz,children:s.get("SNPivotTable.IndentMode.Rows")})}),d?io.jsx(oU,{}):io.jsx(iU,{}),io.jsx(WG,{ref:f})]}),io.jsx(BG,{open:d,anchorEl:f.current,disableEnforceFocus:!0,children:e.map((r,n)=>[r&&r.id!==m$&&io.jsx("li",{role:"presentation",onClick:D,onKeyDown:D,children:io.jsx(lU,{cell:r,changeSortOrder:t})}),uU({idx:n,menu:r,menuItems:e,isOnlyOneRow:1===c.size.y})&&io.jsx(Hz,{"data-testid":"group-divider",variant:"middle"})])}),io.jsx(aU,{tableWidth:i,leftGridWidth:n,overrideLeftGridWidth:r})]})},dU=({layoutService:e,headersData:t,topRowIndex:r})=>e.isIndentModeEnabled&&t.size.x>1&&r+1===t.size.y,pU={display:"grid",width:"fit-content"},fU=({tableWidth:e,leftGridWidth:t,columnWidths:r,rowHight:n,changeSortOrder:i,getHeaderCellsIconsVisibilityStatus:o,height:a,overrideLeftGridWidth:s})=>{const{layoutService:l}=c$(),{gridSectionsData:{headersData:u}}=OH();return io.jsxs("div",{"data-testid":"HEADER_GRID",style:{...pU,gridTemplateColumns:r.map(e=>`${e}px`).join(" "),gridTemplateRows:u.data.map(()=>`${n}px`).join(" "),height:a},children:[u.size.y>1&&io.jsx(nU,{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 r=a.at(0);return Array.isArray(r)&&d.push(io.jsx(cU,{menuItems:r,changeSortOrder:i,overrideLeftGridWidth:s,leftGridWidth:t,tableWidth:e},r.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(io.jsx(rU,{style:{width:r[d],height:n,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:r[d],overrideLeftGridWidth:s,shouldApplyIndentModeColumnWidth:f,tableWidth:e},a.id))}return t},[]),d})]})};var hU=b(fU);const mU=(e,t,r,n)=>{const{layoutService:i}=c$();g(()=>{e.current?.forEach(e=>e?.resetAfterIndex(0,!0))},[e,t,r,n,i])},gU=(e,t)=>{kz(()=>{e.current?.forEach(e=>e?.resetAfterIndex(0,!1))},[e,t])},vU=(e,t)=>{const{isLast:r,list:n,listValues:i}=t;return r?n[e]:i[e]},yU=()=>{},bU=({children:e,reactWindowStyle:t,cell:r,data:n,showTotalCellDivider:i,isLastRow:o,isLastColumn:a,isLeftColumn:s,isCellSelected:l,isAdjustingWidth:u,index:c})=>{const{styleService:d,layoutService:p}=c$(),{interactions:f}=s$(),{direction:h}=i$(),{isLocked:m,createMouseDownHandler:g,createMouseOverHandler:v,createPointerUpHandler:y}=KB(),{showLastBorder:b}=n,x=m(r)||r.isLockedByDimension,S=!(x||!f.active||!f.select||r.isEmpty||r.isNull||r.isPseudoDimension||r.isTotal||u),w=S?g(c,e=>vU(e,n)):void 0,C=S?v(c):void 0,E=S?y(c,e=>vU(e,n)):void 0,I=FH({isLeftColumn:s,layoutService:p,representation:r.representation});return io.jsx("div",{className:gT,title:f.passive?r.representation.text:void 0,style:{...t,...iz(o,a,d.grid.border,h,b),...az({bottomDivider:i&&s,rightDivider:i&&!s,borderColor:d.grid.divider}),...ez,padding:"rtl"===h?"0px 0px 0px 4px":"0px 4px",cursor:sG(S),background:rG({styleService:d,isCellSelected:l,cell:r,isCellLocked:x}),zIndex:s?void 0:p.size.x-r.x,justifyContent:$B(r,p,s,h,I),display:"flex",...p.isIndentModeEnabled&&s&&{["rtl"===h?"paddingRight":"paddingLeft"]:Math.max(4,24*(r.indentLevel??0))},textAlign:WB(r,p)},"aria-hidden":"true",onMouseDown:w,onMouseOver:C,onPointerUp:E,onKeyUp:yU,role:"button",tabIndex:-1,"data-testid":"dimension-cell","data-x":r.x,"data-page-x":r.pageX,"data-y":r.y,"data-page-y":r.pageY,"data-cell-type":r.ref.qType,"data-dimension-info-index":r.dimensionInfoIndex,children:e})},xU=e=>{e.stopPropagation()},SU=({href:e,text:t,interactions:r,color:n})=>({href:e,title:t,rel:"noreferrer",target:"_blank",underline:"hover",onClick:xU,color:oN.LINK,style:{pointerEvents:r.active?"auto":"none",color:n??void 0,opacity:r.active&&r.passive||n?void 0:.4}}),wU=({href:e,text:t,interactions:r,color:n})=>io.jsx(bd,{...SU({href:e,text:t,interactions:r,color:n}),children:t}),CU=Y();CU.use(U),CU.renderer.prio(["canvas"]);const EU=(e,t)=>e&&"center"!==e&&"rtl"===t?_B(e):e,IU=({cell:e,representation:t,textStyle:r,imageContainerHorizontalAlignment:n})=>{const{imageBox:i}=t,{styleService:{grid:{lineClamp:o}}}=c$(),{direction:a}=i$();return io.jsxs("div",{style:{display:"grid",gridTemplateColumns:`${i?.width??24}px 1fr`,maxHeight:"fit-content",alignItems:"center",justifyContent:"flex-start",boxSizing:"border-box"},children:[io.jsx("div",{"data-key":"image-container--partial-image",style:{display:"flex",flexDirection:"column",justifyContent:ZB(e),alignItems:EU(n,a),overflow:"hidden",boxSizing:"border-box",border:"4px solid transparent",width:i?.width??24,height:"100%"},children:io.jsx(yG,{representation:t,textStyle:r})}),io.jsx(KG,{padding:4/(o<=2?2:1),alignSelf:ZB(e,!0),children:!!t.labelStructure&&gG(t.labelStructure)})]})},DU=({suffix:e,delimeter:t})=>` ${e?t:""} ${e}`,PU=({href:e,text:t,labelStructure:r,interactions:n,color:i})=>io.jsxs("span",{children:[io.jsx(bd,{...SU({href:e,text:t,interactions:n,color:i}),children:r?.maskedValue?r.maskedValue:r?.originalValue}),!!r&&DU(r)]}),RU=({children:e,textStyle:t,shouldEnableStickyText:r})=>io.jsx("span",{style:{...t,border:"4px solid transparent",boxSizing:"border-box",...r&&{alignSelf:"flex-start",position:"sticky",top:0}},children:e}),MU=({isLeftColumn:e,styleService:t,cell:r,isIndentModeEnabled:n})=>e?n?t.grid.lineClamp:Math.max(t.grid.lineClamp,r.leafCount*t.grid.lineClamp):t.grid.columnLineClamp,LU=({cell:e,isCellSelected:t,isLeftColumn:r})=>{const{direction:n}=i$(),{isActive:i}=KB(),{layoutService:o,styleService:a}=c$(),{interactions:s}=s$(),l=r&&o.isIndentModeEnabled;let u=r&&!e.isNull?(e=>{const{representation:{text:t,labelStructure:r}}=e;if(!r||!r.originalValue)return t;const{originalValue:n,maskedValue:i,suffix:o,delimeter:a}=r;return`${0!==i.length?i:n} ${o?a:""} ${o}`.trim()})(e):e.representation.text;if(e.isEmpty)return null;const c=(({cell:e,styleService:t,isCellSelected:r,isLeftColumn:n,isIndentModeEnabled:i})=>({...tz,...rz(MU({cell:e,isLeftColumn:n,styleService:t,isIndentModeEnabled:i})),color:nG({cell:e,styleService:t,isCellSelected:r}),fontWeight:iG({cell:e,styleService:t}),fontStyle:oG({cell:e,styleService:t}),textDecoration:aG({cell:e,styleService:t}),fontFamily:t.dimensionValues.fontFamily,fontSize:t.dimensionValues.fontSize}))({cell:e,styleService:a,isCellSelected:t,isLeftColumn:r,isIndentModeEnabled:o.isIndentModeEnabled});if(e.representation.type===vF.Image&&!e.isTotal&&!e.isNull){const{labelStructure:t}=e.representation,i=r&&t&&t.suffix?IU:bG;return io.jsx(i,{cell:e,representation:e.representation,leafCount:e.leafCount,textStyle:c,isLeftColumn:r,canExpandOrCollapse:e.ref.qCanCollapse||e.ref.qCanExpand,imageContainerHorizontalAlignment:$B(e,o,r,n)})}if(e.representation.type===vF.Link&&!i&&!e.isTotal){const t=r&&e.representation.labelStructure?PU:wU;u=io.jsx(t,{text:e.representation.text,labelStructure:e.representation.labelStructure,href:e.representation.url,interactions:s,color:e.expressionColor.color})}return io.jsx(RU,{shouldEnableStickyText:l,textStyle:{...c,...e.representation.type===vF.Image&&e.isNull?{alignSelf:ZB(e)}:{}},children:u})},AU=({index:e,style:t,data:r})=>{const{styleService:n,layoutService:i}=c$(),{isSelected:o}=KB(),{isLeftColumn:a=!1,showLastBorder:s,itemCount:l,isLast:u,totalDividerIndex:c}=r,{isAdjustingWidth:d,setIsAdjustingWidth:p}=NG([r]),f=vU(e,r),h=a?e===l-1:u,m=a?u:e===l-1,g=sB(f,c,i.isIndentModeEnabled);if(void 0===f){const{background:r}=n.dimensionValues;return io.jsx(lB,{style:{...t,background:r},index:e,isLastRow:h,isLastColumn:m,showLastBorder:s,isLeftColumn:a,showTotalCellDivider:g})}const v=o(f);return io.jsxs(bU,{reactWindowStyle:t,isLeftColumn:a,isLastRow:h,isLastColumn:m,isCellSelected:v,showTotalCellDivider:g,cell:f,data:r,isAdjustingWidth:d,index:e,children:[io.jsxs(uB,{verticalAlign:ZB(f),width:cB(f.representation),right:f.isLeftColumn?void 0:4,isLeftColumn:a,children:[io.jsx(cG,{isLeftColumn:a,isCellSelected:v,cell:f}),io.jsx(LU,{isLeftColumn:a,isCellSelected:v,cell:f})]}),io.jsx(FG,{cellInfo:{...f,columnWidthLocation:f.isPseudoDimension?EF.Measures:EF.Dimension},columnWidth:t.width,isLastColumn:m,setIsAdjustingWidth:p})]})};var kU=r.memo(AU,GV);const OU=({list:e,listValues:t,isLastRow:r,getRightGridColumnWidth:n})=>i=>{const o=r?e[i]:t.at(i);return o&&0===i&&o.x>0?(o.leafCount+o.x+o.distanceToNextCell)*n():!r&&o?(o.leafCount+o.distanceToNextCell)*n():n(o?.x??i)},qU=(e,t,r,n)=>{const i=Object.values(e);let o,a=i.length;return n&&(a=r,o=t/a),{itemCount:a,estimatedItemSize:o,listValues:i}},TU=(e,t)=>r=>{e.current&&(e.current[t]=r)},NU={display:"flex",height:"fit-content",borderWidth:"1px 0px 0px 0px",...QF},_U={overflow:"hidden",willChange:"auto",flexShrink:0},jU=({leftGridRef:e,width:t,height:r,columnWidths:n,showLastBorder:i})=>{const{pageInfo:o,direction:a}=i$(),{layoutService:s,styleService:{contentCellHeight:l,grid:{divider:u}}}=c$(),{qSize:c}=s.layout.qHyperCube,{gridSectionsData:{leftDimensionData:d},visibleDimensionsInfo:{visibleLeftDimensionInfo:p}}=OH();gU(e,d),mU(e,t,r,l);const f=o.rowsOnCurrentPage*l,h={...NU,borderColor:u,width:n.reduce((e,t)=>e+t,0)};return io.jsx("div",{style:h,"data-section-id":"LEFT_GRID",children:d.grid.map((t,u)=>{const h=u===d.columnCount-1,m=g$(p[u]),{itemCount:g,estimatedItemSize:v,listValues:y}=qU(t,f,o.rowsOnCurrentPage,h),b=s.isIndentModeEnabled?()=>l:((e,t,r,n,i)=>o=>{const a=n?e[o]:t.at(o);if(a&&0===o&&a.pageY>0)return(a.leafCount+a.pageY+a.distanceToNextCell)*r;if(a&&a.leafCount>0){const e=a.y===i-a.leafCount;return(a.leafCount-(e?a.ref.qUp:0)+a.distanceToNextCell)*r}return r})(t,y,l,h,c.qcy);return io.jsx($V,{ref:TU(e,u),style:{..._U,flexGrow:h?1:0,direction:a},height:r,width:n[u],itemCount:g,itemSize:b,layout:"vertical",itemData:{list:t,isLeftColumn:!0,isLast:h,itemCount:g,showLastBorder:i,listValues:y,totalDividerIndex:d.totalDividerIndex},itemKey:LG,estimatedItemSize:v,children:kU},m)})})};var FU=b(jU);const zU={overflow:"hidden",willChange:"auto"},WU=e=>({...QF,borderWidth:"rtl"===e?"0px 1px 0px 0px":"0px 0px 0px 1px"}),$U=({topGridRef:e,rowHightCallback:t,width:r,height:n,showLastBorder:i,getRightGridColumnWidth:o})=>{const{direction:a}=i$(),{layoutService:s,styleService:{grid:{divider:l},headerCellHeight:u}}=c$(),{gridSectionsData:{headersData:c,topDimensionData:d}}=OH(),p={...WU(a),borderColor:l,height:n};gU(e,d),mU(e,r,n,u);const f=s.size.x*o();return 0===d.rowCount?io.jsx("div",{style:{width:r,height:n,...WU(a)}}):io.jsx("div",{style:p,"data-section-id":"TOP_GRID",children:d.grid.map((n,l)=>{const u=l===d.rowCount-1,{itemCount:p,estimatedItemSize:h,listValues:m}=qU(n,f,s.size.x,u),g=(({layoutService:e,headersData:t,topRowIndex:r})=>{const n=t.data.at(r);if(void 0===n)return;const i=t.size.x-1,o=dU({layoutService:e,headersData:t,topRowIndex:r})?0:i,a=n.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?g$(g):`empty ${l}`;return io.jsx($V,{ref:TU(e,l),style:zU,height:t(),width:r,itemCount:p,itemSize:OU({list:n,listValues:m,isLastRow:u,getRightGridColumnWidth:o}),layout:"horizontal",itemData:{list:n,isLast:u,itemCount:p,showLastBorder:i,listValues:m,totalDividerIndex:d.totalDividerIndex},itemKey:LG,estimatedItemSize:h,direction:a,children:kU},v)})})};var HU=b($U);const VU=()=>{const{styleService:{headerCellHeight:e,contentCellHeight:t}}=c$(),r=aV(),n=(()=>{const{model:e}=s$(),t=f(async(t,r)=>{if(!e)throw new Error("No Model provided!");const{qReverseSort:n,dimensionInfoIndex:i,sortDirection:o}=t,a=[];if(r===o)return!1;a.push({qPath:`/qHyperCubeDef/qDimensions/${i}/qDef/qReverseSort`,qOp:"Replace",qValue:(!n).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}}=oV(),{leftGridWidth:y,leftGridFullWidth:b,leftGridColumnWidths:x,rightGridFullWidth:S,showLastRightBorder:w,getRightGridColumnWidth:C,getHeaderCellsIconsVisibilityStatus:E,overrideLeftGridWidth:I}=function({tableWidth:e,verticalScrollbarWidth:t,resetHorizontalScrollbarHeight:r}){const{layoutService:n,styleService:i}=c$(),{gridSectionsData:{headersData:o}}=OH(),{measureText:a}=Rz(i.header,{allowLineBreaks:!1}),s=JH({tableWidth:e}),l=ZH({tableWidth:e,verticalScrollbarWidth:t,leftGridWidth:s.leftGridWidth}),u=s.leftGridWidth+l.rightGridFullWidth+1<e,c=f((e,t,r="")=>{let i=e;n.isIndentModeEnabled&&(i=1,1===o.size.x&&(i=0));const l=s.leftGridColumnWidths[i];let u=!1,c=!1,d=a(r)+NH;return t&&d+TH<=l&&(c=!0,d+=TH),d+TH<=l&&(u=!0),{shouldShowMenuIcon:u,shouldShowLockIcon:c}},[s.leftGridColumnWidths,a,n.isIndentModeEnabled,o.size.x]);return d(()=>{const e=s.leftGridWidth===s.leftGridFullWidth,t=l.rightGridWidth===l.rightGridFullWidth;e&&t&&r()},[r,s.leftGridWidth,s.leftGridFullWidth,l.rightGridWidth,l.rightGridFullWidth]),{...s,...l,showLastRightBorder:u,getHeaderCellsIconsVisibilityStatus:c}}({tableWidth:r.width,verticalScrollbarWidth:m,resetHorizontalScrollbarHeight:v}),{gridScaffoldDimensions:D,headerGridDims:P,topGridDims:R,leftGridDims:M,dataGridDims:L,metadata:{everyThingFitsInTableRectHeight:A,scrollbarsVisibilityStatus:k}}=(({cellHeights:{headerCellHeight:e,contentCellHeight:t},horizontalWidths:{leftGridWidth:r,leftGridOriginalWidth:n,rightGridOriginalWidth:i},scrollBarsDimensions:{verticalScrollbarWidth:o,horizontalScrollbarHeight:a}})=>{const s=aV(),{pageInfo:l}=i$(),{gridSectionsData:{headersData:u,topDimensionData:c}}=OH(),d=Math.min(s.height*_H,Math.max(s.height*_H-25,s.height-t-a)),p=s.width*_H,f=l.rowsOnCurrentPage*t,h=Math.max(u.size.y,c.rowCount,1),m=e*h,g=e*h,v=Math.min(p,r),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,r)=>{const n=t+1+r+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:n}})(x,v,b),E=S-d,I=Math.max(E,S-x),D=Math.min(I,f),P=Math.min(I,f),R=m+1+f,{visibilityStatus:M,metadata:{hasLeftGridOverflowX:L,hasDataGridOverflowX:A}}=(e=>{const{gridScaffold:{X_AXIS:{leftSectionWidth:t,rightSectionWidth:r},Y_AXIS:{topSectionHeight:n,bottomSectionHeight:i}},gridOriginalWidth:{X_AXIS:{leftSectionFullWidth:o,rightSectionFullWidth:a},Y_AXIS:{topSectionFullHeight:s,bottomSectionFullHeight:l}}}=e,u=s>n,c=o>t,d=a>r,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:n,rightSectionFullWidth:i},Y_AXIS:{topSectionFullHeight:g,bottomSectionFullHeight:R-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:R-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:R-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,P-(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}=c$();d(()=>{e.notifyIsDoneRendering()})})(),io.jsxs(lV,{style:D,children:[io.jsx("div",{style:{overflow:"hidden"},ref:i,children:io.jsx(hU,{tableWidth:r.width,leftGridWidth:y,columnWidths:x,getHeaderCellsIconsVisibilityStatus:E,rowHight:e,height:P.height,changeSortOrder:n,overrideLeftGridWidth:I})}),io.jsx(dV,{style:k.topGrid,origin:DF.TopGrid,ref:o,children:io.jsx(sV,{style:R.fullSizeWrapper,children:io.jsx(pV,{style:R.stickyWrapper,children:io.jsx(HU,{topGridRef:l,rowHightCallback:O,...R.self,showLastBorder:{right:w,bottom:!1},getRightGridColumnWidth:C})})})}),io.jsx(dV,{style:k.leftGrid,origin:DF.LeftGrid,ref:a,children:io.jsx(sV,{style:M.fullSizeWrapper,children:io.jsx(pV,{style:M.stickyWrapper,children:io.jsx(FU,{leftGridRef:u,...M.self,columnWidths:x,showLastBorder:{right:!1,bottom:A}})})})}),io.jsx(dV,{style:k.dataGrid,origin:DF.DataGrid,ref:s,children:io.jsx(sV,{style:L.fullSizeWrapper,children:io.jsx(pV,{style:L.stickyWrapper,children:io.jsx(qG,{dataGridRef:c,rowHightCallback:q,...L.self,showLastBorder:{right:w,bottom:A},getRightGridColumnWidth:C,verticalScrollDirection:p,horizontalScrollDirection:h})})})})]})},BU=()=>{const{keyboard:e,theme:t,interactions:r,translator:n}=s$(),{pageInfo:i,updatePageInfo:o,rect:a}=i$(),{layoutService:s}=c$(),{layout:l,hasData:u}=s;return io.jsxs(io.Fragment,{children:[u?io.jsx(VU,{}):null,io.jsx(p$,{}),io.jsx(r$,{paginationNeeded:i.shouldShowPagination,handleChangePage:e=>{o({page:e})},pageInfo:i,totalRowCount:i.totalRowCount,totalColumnCount:0,totalPages:i.totalPages,keyboard:e,translator:n,theme:t,interactions:r,rect:a,layout:l})]})};const GU=(e,{selections:t,baseObjects:n,coreServices:i,nebulaObjects:o})=>{const a=function(e){const t=kS();return t?.components?.MuiTable?.styleOverrides&&(t.components.MuiTable.styleOverrides.root={}),Ls({...t,direction:e})}(n.direction);e.render(io.jsx(r.StrictMode,{children:io.jsx(ml,{theme:a,children:io.jsx(l$,{...o,children:io.jsx(o$,{...n,children:io.jsx(XB,{selections:t,children:io.jsx(d$,{...i,children:io.jsx(qH,{children:io.jsx(BU,{})})})})})})})}))};var UU=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}(UU||{}),YU=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}(YU||{}),KU=function(e){return e.Grid="grid",e.Divider="grid.divider",e.LabelName="label.name",e.LabelValue="label.value",e}(KU||{}),XU=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}(XU||{});const JU=e=>e?`${parseInt(e,10)}px`:void 0,ZU=(e,t)=>{if(t){const r=e.getColorPickerColor(t);return"none"===r?XF.Transparent:r}},QU=(e,t)=>+(parseInt(e,10)*KF*t+8).toFixed(2),eY=(e,t)=>void 0===e?t:e.some(e=>"bold"===e)?UF:"normal",tY=e=>e?.some(e=>"italic"===e)?"italic":"normal",rY=e=>e?.some(e=>"underline"===e)?"underline":"none",nY=document.createElement("textarea");function iY(e){nY.value=e,document.body.appendChild(nY),nY.select(),nY.setSelectionRange(0,nY.value.length),document.execCommand("copy"),document.body.removeChild(nY)}nY.style.position="absolute",nY.style.left="-9999px",nY.setAttribute("readonly","");function oY(e){T?.((t,r)=>{const n=r.target,i=n?.closest(`.${gT}`);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(()=>{iY(t)}):iY(t))})(i)}}),e?.forEach(e=>{e(t,r,i)})})}const aY=({model:e,layoutService:t,effectivePropertiesService:r,translator:n})=>gz((i,o,a)=>{if(!e||r.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 r=((e,t)=>{const r=e?.getAttribute("data-dimension-info-index");if("string"==typeof r)return t.getDimensionInfo(+r)})(e,t);return"object"==typeof r?{qEffectiveDimensionName:r.qEffectiveDimensionName,label:r.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(f$,0,0,!0),await e.expandLeft(f$,0,0,!0)}catch(e){console.error("Failed to expand all",e)}}}))(s)),"string"==typeof u&&l.addItem((({model:e,effectivePropertiesService:t,qEffectiveDimensionName:r,label:n,translator:i})=>({icon:"lui-icon lui-icon--plus",translation:i.get("SNPivotTable.ContextMenu.ExpandDimension",[n??""]),tid:"expand-dimension",id:"expand-dimension",select:QG({model:e,qExpansionState:t.qExpansionState,qEffectiveDimensionName:r,action:XG.Expand})}))({model:s,effectivePropertiesService:r,qEffectiveDimensionName:u,label:c,translator:n})),l.addItem((e=>({icon:"lui-icon lui-icon--minus",translation:"Object.PivotTable.ContextMenu.CollapseAll",tid:"collapse-all",select:async()=>{try{await e.collapseTop(f$,0,0,!0),await e.collapseLeft(f$,0,0,!0)}catch(e){console.error("Failed to collapse all",e)}}}))(s)),"string"==typeof u&&l.addItem((({model:e,effectivePropertiesService:t,qEffectiveDimensionName:r,label:n,translator:i})=>({icon:"lui-icon lui-icon--minus",translation:i.get("SNPivotTable.ContextMenu.CollapseDimension",[n??""]),tid:"collapse-dimension",id:"collapse-dimension",select:QG({model:e,qExpansionState:t.qExpansionState,qEffectiveDimensionName:r,action:XG.Collapse})}))({model:s,effectivePropertiesService:r,qEffectiveDimensionName:u,label:c,translator:n}))},[e,t,r]),sY=(e,t)=>R(()=>(({layout:e})=>{const{qHyperCube:t,nullValueRepresentation:r,snapshotData:n}=e,{qNoOfLeftDims:i,qEffectiveInterColumnSortOrder:o,qMeasureInfo:a,qDimensionInfo:s}=t,l=!!n,u=n?.content?.rowsPerPage??15e3,c={x:Math.min(e.qHyperCube.qSize.qcx,YF),y:Math.min(e.qHyperCube.qSize.qcy,u)},d=o.slice(0,i),p=e=>d.some(t=>t===e),f=p(h$),h=new Map(o.map(e=>[s[e]??h$,e])),m=a.filter(e=>7005!==e.qError?.qErrorCode);return{layout:e,getNullValueText:()=>r?.text??"-",getMeasureInfoIndexFromCellIndex:(e,t=!1)=>{if(f)return 0;const r=e%m.length;return t?r:a.findIndex(e=>e===m[r])},getDimensionInfo:e=>e===h$?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:xT.Auto,pixels:bT.PixelsDefault,percentage:bT.PercentageDefault},searchSortFromDimension:"inherit"===e.search?.sorting}})({layout:e}),[e,t]),lY=({model:e,layoutService:t,viewService:r,pageInfo:n,rect:i})=>{const{layout:o,isSnapshot:a,triggerdByExpandOrCollapse:s}=t,l=(e=>{const t=yz(e);return t.current=e,t})(PH(i));return Ez(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,r,n)=>!!e&&(t.gridColumnStartIndex+t.gridWidth>=n||t.gridRowStartIndex+t.gridHeight>=r))(s,r,i,u)||((e,t,r,n)=>{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(n,o.qcx)||l<Math.min(r,o.qcy)})(o,n,i,u))){const t=((e,t,r,n,i,o)=>{const a=n.page*n.rowsPerPage,s=Math.min(a+n.rowsPerPage,r.qcy),l=Math.min(YF,r.qcx);if(r.qcy<a)return null;let u=0,c=a;if(e){u=t.gridColumnStartIndex,c=a+t.gridRowStartIndex;const e=c+t.gridHeight,r=t.gridColumnStartIndex+t.gridWidth;e>s&&(c=Math.max(0,s-i)),r>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,r,o.qHyperCube.qSize,n,i,u);return t?e.getHyperCubePivotData(f$,RH(t)):[]}return t.qPivotDataPages},[o,a,e,r,n.page,n.rowsPerPage,l,s])},uY=({rowsPerPage:e,totalRowCount:t,page:r})=>Math.min(e,t-r*e),cY=(e,t,r=15e3)=>({rowsPerPage:r,totalPages:Math.max(1,Math.ceil(e/r)),totalRowCount:e,rowsOnCurrentPage:uY({rowsPerPage:r,totalRowCount:e,page:t})}),dY=15,pY=({layoutService:e,viewService:t,rect:r,model:n,pageInfo:i})=>{const{freeResize:o}=M();return N(async e=>{const o=e;if(!o.snapshotData||!n||o.snapshotData.content)return o;if("getHyperCubePivotData"in n){const{scrollTop:e,scrollLeft:a,leftGridScrollLeft:s,topGridScrollTop:l}=t,u=((e,t,r)=>{const{gridColumnStartIndex:n,gridRowStartIndex:i,gridWidth:o,gridHeight:a}=e,s=t.page*t.rowsPerPage,l=Math.max(n-dY,0),u=Math.max(s+i-dY,s,0),c=YF-l,d=s+t.rowsOnCurrentPage-u;if((e=>0===e.gridWidth&&0===e.gridHeight)(e)){const{maxNumberOfVisibleColumns:e,maxNumberOfVisibleRows:t}=PH(r);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,r),c=RH(u),d={qLeft:0,qTop:i.page*i.rowsPerPage,qWidth:1,qHeight:1};o.snapshotData.content={qPivotDataPages:await n.getHyperCubePivotData(f$,[d,...c]),scrollTop:e,scrollLeft:a,leftGridScrollLeft:s,topGridScrollTop:l,page:i.page,rowsPerPage:i.rowsPerPage},o.snapshotData.object.size.w=r.width,o.snapshotData.object.size.h=r.height}return o}),_(()=>({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:r.left,top:r.top,width:e.layout.snapshotData.object.size.w,height:e.layout.snapshotData.object.size.h}:r};var fY={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 hY=()=>{const e=j(),t=e.language();return R(()=>{!function(e){const t="SNPivotTable_LimitedData";e.get(t)===t&&Object.keys(fY).forEach(t=>{e.add(fY[t])})}(e)},[e]),{translator:e,language:t}},mY=e=>{const{flags:t}=e,r=F(),n=(e=>{const t=R(()=>Mz(e),[e]);return k(()=>()=>{t.unmount()},[t]),t})(r),i=z(),o=W(),a=$(),s=H(),l=V(),u=(()=>{const{viewState:e}=M(),t=yz(new Set),r=void 0!==window.qlikprinting,{promise:n,resolve:i}=R(()=>mz(),[]),o=gz(e=>{t.current.add(e)},[t]),a=gz(j_(async()=>{await Promise.all(t.current),t.current.clear(),i()},1e3),[i,t]);return L(async()=>{await n},[n]),R(()=>({viewState:e,isDownloadedAsPDForImage:r,notifyIsDoneRendering:a,waitForPromise:o}),[a,r,e,o])})(),c=((e,t)=>{const[r]=Ez(async()=>{if(void 0!==e&&!t.snapshotData&&"getEffectiveProperties"in e)return{...await e.getEffectiveProperties()}},[e,t]);return R(()=>{const e=void 0!==r?.qHyperCubeDef.qSortbyYValue&&1===Math.abs(r.qHyperCubeDef.qSortbyYValue),t=r?.qHyperCubeDef.qDimensions.map(e=>e.qDef?.qSortCriterias)??[];return{qAlwaysFullyExpanded:r?.qHyperCubeDef.qAlwaysFullyExpanded??!1,qExpansionState:r?.qHyperCubeDef.qExpansionState,isSortedByFirstMeasure:e,getSortCriteriaForDimension:e=>t[e]}},[r])})(o,i),d=sY(i,t),p=(e=>{const t=q();return{...t,select:!!t.active&&!!t.select&&!e,active:!!t.active&&!e,scroll:!!t.active}})(d.isSnapshot),f=B(),h=Cz(i,r),{translator:m,language:g}=hY(),{pageInfo:v,updatePageInfo:y}=((e,t)=>{const{size:r,layout:{qHyperCube:{qSize:n}}}=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:n.qcy>r.y&&!i,...cY(n.qcy,a,o)}}),l=e.layout.qHyperCube.qSize.qcy;return k(()=>{s(t=>({...t,...cY(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,r=uY({...a,page:e});s({...a,page:e,rowsOnCurrentPage:r})}},[a]),{pageInfo:a,updatePageInfo:e=>{s({...a,...e,rowsOnCurrentPage:uY({...a,...e})})}}})(d,u),b=((e,t,r)=>R(()=>((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}})(r,t.snapshotData),[r,e.page,t.snapshotData]))(v,i,u),x=pY({rect:G(),layoutService:d,viewService:b,model:o,pageInfo:v}),[S,w]=lY({model:o,layoutService:d,viewService:b,pageInfo:v,rect:x}),C=R(()=>((e,t)=>{const r=t.layout.components?.find(e=>"theme"===e.key),n=r?.header,i=r?.dimensionValues,o=r?.measureValues,a=r?.measureLabels,s=r?.totalValues,l=r?.nullValues,u=r?.grid,c=(t,r,n)=>e.getStyle(t,r,n),d=+(u?.[UU.LineClamp]??c(YU.Grid,KU.Grid,XU.LineClamp)??1),p=+(u?.[UU.ColumnLineClamp]??c(YU.Grid,KU.Grid,XU.ColumnLineClamp)??1),f=ZU(e,n?.[UU.Background])??c(YU.Dimension,KU.LabelName,XU.BackgroundColor)??XF.Transparent,h={header:{fontSize:JU(n?.[UU.FontSize])??c(YU.Dimension,KU.LabelName,XU.FontSize)??BF,fontFamily:n?.[UU.FontFamily]??c(YU.Dimension,KU.LabelName,XU.FontFamily)??GF,fontWeight:eY(n?.[UU.FontStyle],UF),fontStyle:tY(n?.[UU.FontStyle]),textDecoration:rY(n?.[UU.FontStyle]),color:ZU(e,n?.[UU.FontColor])??c(YU.Dimension,KU.LabelName,XU.FontColor)??oN.TEXT,background:f,hoverBackground:Y_(f,ST),activeBackground:Y_(f,wT)},dimensionValues:{fontSize:JU(i?.[UU.FontSize])??c(YU.Dimension,KU.LabelValue,XU.FontSize)??BF,fontFamily:i?.[UU.FontFamily]??c(YU.Dimension,KU.LabelValue,XU.FontFamily)??GF,fontWeight:eY(i?.[UU.FontStyle],void 0),fontStyle:tY(i?.[UU.FontStyle]),textDecoration:rY(i?.[UU.FontStyle]),color:ZU(e,i?.[UU.FontColor])??c(YU.Dimension,KU.LabelValue,XU.FontColor)??oN.TEXT,background:ZU(e,i?.[UU.Background])??c(YU.Dimension,KU.LabelValue,XU.BackgroundColor)??XF.Transparent},measureValues:{fontSize:JU(o?.[UU.FontSize])??c(YU.Measure,KU.LabelValue,XU.FontSize)??BF,fontFamily:o?.[UU.FontFamily]??c(YU.Measure,KU.LabelValue,XU.FontFamily)??GF,fontWeight:eY(o?.[UU.FontStyle],"normal"),fontStyle:tY(o?.[UU.FontStyle]),textDecoration:rY(o?.[UU.FontStyle]),color:ZU(e,o?.[UU.FontColor])??c(YU.Measure,KU.LabelValue,XU.FontColor)??XF.FontSecondary,background:ZU(e,o?.[UU.Background])??c(YU.Measure,KU.LabelValue,XU.BackgroundColor)??XF.Transparent},measureLabels:{fontWeight:eY(a?.[UU.FontStyle],"normal"),fontStyle:tY(a?.[UU.FontStyle]),textDecoration:rY(a?.[UU.FontStyle]),color:ZU(e,a?.[UU.FontColor])??c(YU.Measure,KU.LabelName,XU.FontColor)??XF.FontSecondary,background:ZU(e,a?.[UU.Background])??c(YU.Measure,KU.LabelName,XU.BackgroundColor)??XF.Transparent},totalValues:{fontWeight:eY(s?.[UU.FontStyle],UF),fontStyle:tY(s?.[UU.FontStyle]),textDecoration:rY(s?.[UU.FontStyle]),color:ZU(e,s?.[UU.FontColor])??c(YU.Total,KU.LabelValue,XU.FontColor)??oN.TEXT,background:ZU(e,s?.[UU.Background])??c(YU.Total,KU.LabelValue,XU.BackgroundColor)??XF.Transparent},nullValues:{fontWeight:eY(l?.[UU.FontStyle],"normal"),fontStyle:tY(l?.[UU.FontStyle]),textDecoration:rY(l?.[UU.FontStyle]),color:ZU(e,l?.[UU.FontColor])??c(YU.Null,KU.LabelValue,XU.FontColor)??oN.TEXT,background:ZU(e,l?.[UU.Background])??c(YU.Null,KU.LabelValue,XU.BackgroundColor)??XF.NullValueBackground},grid:{columnLineClamp:p,lineClamp:d,border:ZU(e,u?.[UU.Border])??c(YU.Grid,KU.Grid,XU.BorderColor)??XF.DividerLight,divider:ZU(e,u?.[UU.Divider])??c(YU.Grid,KU.Divider,XU.BorderColor)??XF.DividerDark,background:ZU(e,u?.[UU.Background])??c(YU.Grid,KU.Grid,XU.BackgroundColor)??XF.Transparent},selectedColors:U_(e)};return h.headerCellHeight=Math.max(QU(h.header.fontSize,p),QU(h.dimensionValues.fontSize,p),32),h.contentCellHeight=Math.max(QU(h.measureValues.fontSize,d),QU(h.dimensionValues.fontSize,d),24),h.dimensionValueTextHeight=QU(h.dimensionValues.fontSize,1),h})(h,d),[h,d]),E=((e,t,r)=>{const[,n,i]=Ez(async()=>{const t=TN(r.flags),n=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,n,i,o,Az].filter(e=>void 0!==e).map(async e=>{await document.fonts.load(`600 12px ${e}`),await document.fonts.load(`12px ${e}`)}))},[t,e,r]);return i?(console.warn("Failed to load fonts:",i),!0):!n})(h,i,e),{direction:I}=M();oY([aY({model:o,layoutService:d,effectivePropertiesService:c,translator:m})]),k(()=>{!w&&o&&!!S&&E&&GU(n,{selections:f,baseObjects:{rect:x,pageInfo:v,qPivotDataPages:S,updatePageInfo:y,direction:I},nebulaObjects:{env:e,app:a,model:o,embed:s,theme:h,keyboard:l,translator:m,interactions:p},coreServices:{styleService:C,viewService:b,layoutService:d,downloadService:u,effectivePropertiesService:c}})},[o,a,x,p,f,b,d,u,w,S,C,n,E,m,g,v,y,c,s,l,h,e,I])},gY={version:"7.19.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:[]},vY=()=>({...gY,qHyperCubeDef:{...gY.qHyperCubeDef,qIndentMode:!1}})}}});
102
+ e.exports=function(e,t){if(!e||isNaN(+t))return t;var r,n,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(r=(t="-"===(e=e.substring(f,b)).charAt(0)?-t:+t)<0?t=-t:0,i=(n=e.match(/[^\d\-\+#]/g))&&n[n.length-1]||".",o=n&&n[1]&&n[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"!==(n=t.join(""))&&""!==n||(r=!1),h+(r?"-":"")+n+x}},z_({exports:{}});const Z_=(e,t=aN.TEXT,r=aN.WHITE)=>{const n=xN(e??""),i=xN(t),o=xN(r);return n.isInvalid()?t:function(e,t,r){const n=SN(e,t),i=SN(e,r);if(void 0!==n&&void 0!==i)return n>i?t:r}(n,o,i).getRGB()},Q_=e=>{const t=e.getStyle("","","dataColors.selected")||aN.SELECTED,r=function(e,t){const r=xN(wN),n=xN(e),i=xN(t);if(n.isInvalid()||i.isInvalid()||n.getAlpha()<1||i.getAlpha()<1)return t;const o=SN(r,n),a=SN(i,n),s=o>a||o>4.5;return!s&&a>3?i.getHex():s?wN:"#000000"}(t,aN.TEXT);return{background:t,color:r}},ej=(e,t)=>{const r=xN(e);return 0===r.a?(r.setAlpha(t.opacity),r.getString()):r.isDark()?r.getBrightenedColor(t.brighter).getString():r.getDarkenedColor(t.darker).getString()},tj=e=>{const t=xN(e);return t.isInvalid()?null:1===t.a?t.getRGB():t.getRGBA()},rj=e=>{e.stopPropagation(),e.preventDefault()},nj=e=>{(e instanceof HTMLElement||e instanceof SVGElement)&&e.focus()},ij=e=>{const{currentTarget:t}=e;if("true"===t.getAttribute("data-dragging"))return!0;const r=t.closest(".exploration-panel");if(!r)return!1;const n=r.getElementsByClassName("section-item-container");return Array.from(n).some(e=>"true"===e.getAttribute("data-dragging"))},oj=(e,t)=>{const{key:r,currentTarget:n}=e;if(n===t.current&&r===yT.Tab)if(e.preventDefault(),e.shiftKey)((e,t)=>{const{currentTarget:r}=e;if(r!==t.current)return;const n=r.closest('[role="region"]')?.getElementsByTagName("button")[0];n&&nj(n)})(e,t);else{const e=n.parentElement?.getElementsByClassName("exploration-section-header")[0];e&&nj(e)}},aj=(e,t)=>{const{currentTarget:r}=e;if(r!==t.ref.current)return;const n=t.sectionIndex??2;if(0===n)return void((e,t)=>{const{currentTarget:r}=e;if(r!==t.ref.current)return;const n=r.closest(".exploration-panel")?.getElementsByTagName("input")[0];n&&nj(n)})(e,t);const i=r.closest(".exploration-panel")?.getElementsByClassName("exploration-list")[n-1],o=i?.getElementsByClassName("exploration-item-focus").length??0;if(o>0){const e=i?.getElementsByClassName("exploration-draggable-icon")[o-1];e&&nj(e)}},sj=(e,t)=>{const{key:r}=e;switch(r){case yT.Tab:rj(e),e.shiftKey?aj(e,t):((e,t)=>{const{currentTarget:r}=e;if(r!==t.ref.current)return;const n=r.closest(".exploration-list"),i=n?.getElementsByClassName("exploration-item-focus")[0];if(!i){const e=r.closest(".exploration-panel")?.getElementsByClassName("exploration-list")[2].getElementsByClassName("exploration-section-header")[0];return void(e&&nj(e))}nj(i)})(e,t);break;case yT.Down:if(ij(e))break;e.preventDefault(),((e,t)=>{const{currentTarget:r}=e;if(r!==t.ref.current)return;const n=r.closest(".exploration-panel"),i=n?.getElementsByClassName("exploration-section-header").length??0;let o=null;if(0===i)return;const a=t.sectionIndex??2;o=a+1<i?n?.getElementsByClassName("exploration-section-header")[a+1]:n?.getElementsByClassName("exploration-section-header")[0],o&&nj(o)})(e,t);break;case yT.Up:if(ij(e))break;e.preventDefault(),((e,t)=>{const{currentTarget:r}=e;if(r!==t.ref.current)return;const n=r.closest(".exploration-panel"),i=n?.getElementsByClassName("exploration-section-header").length??0;let o=null;if(0===i)return;const a=t.sectionIndex??2;o=a-1>=0?n?.getElementsByClassName("exploration-section-header")[a-1]:n?.getElementsByClassName("exploration-section-header")[i-1],o&&nj(o)})(e,t);break;case yT.Enter:case yT.Space:e.preventDefault(),((e,t)=>{const{currentTarget:r}=e;if(e.preventDefault(),r!==t.ref.current)return;const n="all"!==t.checkState;t.toggleAllCheckboxes(n)})(e,t)}},lj=({children:e})=>io.jsx("span",{style:{width:"fit-content",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",fontWeight:"bold"},children:e}),uj=({children:e,sectionIndex:t})=>{const n=Dw(void 0!==t?_T(t):rN),i=Pw(void 0!==t?jT(t):nN),o=r.useRef(null),a={ref:o,toggleAllCheckboxes:i,checkState:n,sectionIndex:t};return io.jsxs(Qu,{ref:o,className:"exploration-section-header",tabIndex:0,onKeyDown:e=>{sj(e,a)},sx:{display:"flex",alignItems:"center",width:"100%",padding:"2px 8px 2px 8px",boxSizing:"border-box",fontSize:"12px","&:focus-visible":{boxShadow:`0 0 0 2px ${HT} inset`}},children:[io.jsx(Ic,{disabled:"disabled"===n,checked:"all"===n,indeterminate:"some"===n,onChange:e=>{i(e.target.checked)},size:"small",style:{flexShrink:0,padding:9}}),io.jsx(lj,{children:e})]})},cj=({sectionIndex:e})=>{const t=Dw(qT(e));return io.jsx(uj,{sectionIndex:e,children:t})},dj=x((e,t)=>io.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:io.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"})})),pj=x((e,t)=>io.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:io.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"})})),fj=fl("div")({position:"absolute",width:"1px",height:"1px",padding:0,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0}),hj=fl(pj)(()=>({padding:"6px 6px",flexShrink:0,cursor:"grab","&:focus-visible":{boxShadow:`0 0 0 2px ${HT} inset`}})),mj=e=>"svg"===e.tagName?"exploration-draggable-icon":e.className,gj=(e,t)=>{const r=e.closest(".exploration-list"),n=r?.nextElementSibling||r?.parentElement?.nextElementSibling;if(null===n||!n){if(t===yT.Tab)return;return r?.closest(".exploration-panel")?.getElementsByClassName("exploration-section-header")[0]}return n.getElementsByClassName("exploration-section-header")[0]},vj=e=>{const{currentTarget:t}=e,r=mj(t);let n=t.closest("li")?.previousElementSibling?.getElementsByClassName(r)[0];if(!n){const e=t.closest(".exploration-list"),i=e?.querySelector(".exploration-section-header");if(i)return i;if(n=((e,t)=>{const r=e.closest(".exploration-list"),n=r?.previousElementSibling;if(null===n||!n)return e.closest(".exploration-panel")?.getElementsByClassName(t)[1];const i=n.getElementsByClassName(t);return i.length>0?i[i.length-1]:void 0})(t,r),!n){const e=t.closest(".exploration-panel")?.getElementsByClassName(r)[1];return e??null}}return n},yj=(e,t)=>{const{currentTarget:r}=e;if(r===t.items.draggableIconRef.current){const e=r.closest("li")?.getElementsByClassName("exploration-item")[0];return void(e&&nj(e))}if(r===t.items.explorationItemRef.current){const e=r.getElementsByClassName("exploration-draggable-icon")[0];return void nj(e)}r===t.items.explorationItemFocusRef.current&&t.toggleCheckedById(t.id)},bj=e=>{const t=e.key===yT.Down?(e=>{const{currentTarget:t,key:r}=e,n=mj(t),i=t.closest("li");let o=i?.nextElementSibling?.getElementsByClassName(n)[0];return o||(o=gj(t,r),o)?o:t.closest(".exploration-panel")?.getElementsByClassName(n)[0]})(e):vj(e);t&&nj(t)},xj=(e,t)=>{const{key:r}=e;switch(r){case yT.Tab:if(e.shiftKey)e.preventDefault(),((e,t)=>{const{currentTarget:r}=e,n=r.closest("ul")?.getElementsByClassName("exploration-item-focus");if(r===t.items.draggableIconRef.current){if(t.itemIndex>=0){const e=n&&n[t.itemIndex];return void(e&&nj(e))}const r=vj(e);r&&nj(r)}if(r===t.items.explorationItemFocusRef.current){const t=r.closest("li")?.previousElementSibling?.getElementsByClassName("exploration-draggable-icon")[0];if(t)return void nj(t);const n=vj(e);n&&nj(n)}})(e,t);else{const r=((e,t)=>{const{currentTarget:r,key:n}=e;if(e.shiftKey)return!0;if(r===t.items.explorationItemRef.current){const e=r.getElementsByClassName("exploration-draggable-icon")[0];return nj(e),!0}if(r===t.items.explorationItemFocusRef.current){const e=r.closest("li")?.getElementsByClassName("exploration-draggable-icon")[0];return e&&nj(e),!0}if(r===t.items.draggableIconRef.current){const e=r.closest("ul")?.getElementsByClassName("exploration-item-focus");if((e?.length||0)-1>t.itemIndex){const r=e&&e[t.itemIndex+1];return r&&nj(r),!0}const i=gj(r,n);if(!i)return!1;nj(i)}return!0})(e,t);r?rj(e):e.stopPropagation()}break;case yT.Down:case yT.Up:if(ij(e))break;rj(e),bj(e);break;case yT.Enter:if(e.currentTarget===t.items.explorationItemRef.current&&t.dragHandleRef){t.dragHandleRef(e.currentTarget);break}rj(e),yj(e,t);break;case yT.Space:rj(e),yj(e,t)}},Sj=({children:e})=>io.jsx("span",{style:{width:"fit-content",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flexGrow:1,paddingLeft:4},children:e}),wj=({icon:e,title:t,dragHandleRef:n,...i})=>{const[o,a]=Rw(hC),s=Dw(Vw),l=r.useRef(null),u=r.useRef(null),c=r.useRef(null),d={id:i.id,itemIndex:i.itemIndex,toggleCheckedById:a,items:{explorationItemRef:l,explorationItemFocusRef:u,draggableIconRef:c},dragHandleRef:n};return r.useEffect(()=>{n&&l.current&&n(l.current)},[n]),io.jsxs(Qu,{ref:l,className:"exploration-item",onClick:e=>{e.stopPropagation(),a(i.id)},onKeyDown:e=>{xj(e,d)},tabIndex:0,style:{display:"flex",alignItems:"center",width:"100%",cursor:"pointer",padding:0,boxSizing:"border-box",fontSize:"12px"},title:t,sx:{"&:hover":{backgroundColor:"action.hover"},"&:focus-visible":{boxShadow:`0 0 0 2px ${HT} inset`}},children:[io.jsxs(Qu,{ref:u,className:"exploration-item-focus",component:"div",tabIndex:0,onKeyDownCapture:e=>{xj(e,d)},sx:{display:"flex",minWidth:0,alignItems:"center",justifyContent:"space-between",flexGrow:1,marginRight:"4px","&:focus-visible":{boxShadow:`0 0 0 2px ${HT} inset`}},children:[io.jsx(Ic,{checked:o.has(i.id),"aria-label":s("ChartExploration.ListItem.Label",t),size:"small",tabIndex:-1,style:{padding:9,flexShrink:0,visibility:-1===i.id?"hidden":"visible"}}),io.jsx(e,{height:"12px",style:{flexShrink:0}}),io.jsx(Sj,{children:t})]}),io.jsx(hj,{ref:c,className:"exploration-draggable-icon",tabIndex:0,height:"16px",onClick:e=>{e.stopPropagation()},onKeyDownCapture:e=>{xj(e,d)}})]})},Cj=e=>{const t=Dw(OT(e))??"";return io.jsx(wj,{title:t,icon:dj,...e})},Ej=()=>{const e=Dw(TT),t=Dw(NT),r=Dw(YT),n=Pw(FT);return io.jsx(hT,{numberOfSections:2,numberOfItemsInSection:t,keyExtractor:e,emptyTexts:r,onDragEnd:n,dragOverlayRenderer:XT,headerRenderer:cj,itemRenderer:Cj})},Ij=({itemIndex:e})=>{const t=Dw(QT(e));return io.jsx(KT,{children:t})},Dj=()=>{const e=Dw(Vw);return io.jsx(uj,{children:e("Common.Values")})},Pj=x((e,t)=>io.jsxs("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:[io.jsx("path",{d:"M1.5 0a.5.5 0 0 0-.5.5v14a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-6a.5.5 0 0 0-.5-.5H8V.5a.5.5 0 0 0-.5-.5zM2 4V1h5v7.293l-5 5V9h2V8H2V5h2V4zm.707 10 5-5H15v5h-3v-2h-1v2H8v-2H7v2z"}),io.jsx("path",{d:"M1.5 0a.5.5 0 0 0-.5.5v14a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-6a.5.5 0 0 0-.5-.5H8V.5a.5.5 0 0 0-.5-.5zM2 4V1h5v7.293l-5 5V9h2V8H2V5h2V4zm.707 10 5-5H15v5h-3v-2h-1v2H8v-2H7v2z"})]})),Rj=e=>{const{itemIndex:t}=e,r=Dw(QT(t));return io.jsx(wj,{title:r,icon:Pj,...e})},Mj=()=>{const e=Dw(eN),t=Dw(tN),r=Dw(UT),n=Pw(iN);return io.jsx(Qu,{className:"exploration-header-section",style:{height:"100%",display:"flex",flexDirection:"column-reverse"},children:io.jsx(hT,{numberOfSections:1,numberOfItemsInSection:t,keyExtractor:e,emptyTexts:r,onDragEnd:n,dragOverlayRenderer:Ij,headerRenderer:Dj,itemRenderer:Rj})})},Lj=x((e,t)=>io.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:io.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"})})),Aj=()=>{const[e,t]=Rw(Bw),n=Dw(Vw),i=r.useRef(null),[o]=Dw(tN),[a=0,s=0]=Dw(NT),l=f(e=>{t(e.target.value)},[t]),u=0===e.length||0===a&&0===s&&0===o?n("Common.Search.NoResultsAvailable"):n("ChartExploration.Pivot.Search.ResultsFound",a.toString(),s.toString(),o.toString());return io.jsxs(Qu,{ref:i,onKeyDown:e=>{oj(e,i)},style:{position:"sticky",top:0,zIndex:10,width:"calc(100% - 16px)",backgroundColor:"var(--sprout-common-background-color-weak)",paddingTop:2,paddingRight:8,paddingLeft:8,paddingBottom:8},children:[io.jsx(fj,{"data-testid":"screenOnly-search-results","aria-live":"polite","aria-atomic":"true",children:u}),io.jsx(Np,{size:"small",fullWidth:!0,"data-testid":"chart-exploration-search-input","aria-label":n("Common.Search.AccessibilityLabel"),type:"search",defaultValue:e,placeholder:n("Common.Search"),onChange:l,startAdornment:io.jsx(pd,{position:"start",children:io.jsx(Lj,{})}),inputProps:{style:{fontSize:"14px",paddingTop:6,paddingBottom:6}}})]})},kj=e=>{const t=Ls(Ef());return io.jsx(ml,{theme:t,children:io.jsx(xw,{children:io.jsx(mC,{props:e,children:io.jsxs(Qu,{className:"exploration-panel",style:{display:"flex",flexDirection:"column"},children:[io.jsx(Aj,{}),io.jsx(Ej,{}),io.jsx(Mj,{})]})})})})},Oj=e=>{if(e.flags.isEnabled("CLIENT_IM_5973_PIVOT_TABLE_EXPLORATION"))return{component:kj,classification:{tags:["exploration"],exclusive:!0}}};var qj=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}(qj||{}),Tj=function(e){return e.COMPARE="compare",e.GENERAL="general",e}(Tj||{}),Nj=function(e){return e.VALUES="values",e.CONDITION="condition",e.SEARCH="search",e.CLEAR_SELECTION="clear_selection",e.TOP_BOTTOM="top_bottom",e}(Nj||{}),_j=function(e){return e.FIXED_VALUE="fixed_value",e.CALCULATED_VALUE="calculated_value",e}(_j||{});const jj=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,Fj=e=>{if(!Array.isArray(e))return"";let t="{<";const r=[];if(e.forEach(e=>{let t=`[${e.field}]${e.exclude?"-":""}={`,n="}",i="";switch(e.type){case Nj.SEARCH:i=(e=>{let t="",r="";const n=e.options?.mode;if(!n)return"";switch(n){case qj.BEGINNING_OF_WORD:t="*^",r="*";break;case qj.ENDS_WITH:t="*";break;case qj.STARTS_WITH:r="*";break;case qj.MATCHES_EXACTLY:break;case qj.CONTAINS:default:t="*",r="*"}const i=e.options.values?.[0]??"";return""!==i?`"${t}${i}${r}"`:""})(e);break;case Nj.CONDITION:i=(e=>{const{options:t}=e,r=t?.mode===Tj.GENERAL,n=t?.modifier?.type===_j.FIXED_VALUE,i=t?.modifier?.operator?t.modifier.operator.split(" "):[];if(0===i.length||!n&&(!t.firstValue?.aggregator||!t.firstValue?.field)||n&&!t.firstValue?.fixedValue||r&&(!t.conditionField?.aggregator||!t.conditionField?.field))return"";let o,a,s="=";r&&n?(o=`${t.conditionField?.aggregator}(${jj(t.conditionField?.field)})`,a=`${t.firstValue?.fixedValue}`):!r&&n?(o="",a=`${t.firstValue?.fixedValue}`,s=""):r||n?(o=`${t.conditionField?.aggregator}(${jj(t.conditionField?.field)})`,a=`${t.firstValue?.aggregator}(${jj(t.firstValue?.field)})`):(o=`${jj(e.field)}`,a=`${t.firstValue?.aggregator}(total ${jj(t.firstValue?.field)})`);const l=`${s}${o}${i[0]}${a}`;let u="";if(i.length>1){if(!n&&(!t.secondValue?.aggregator||!t.secondValue?.field)||n&&!t.secondValue?.fixedValue)return"";let e,a;r&&n?(e=`${t.secondValue?.fixedValue}`,a=` and ${o}`):!r&&n?(e=`${t.secondValue?.fixedValue}`,a=""):r||n?(e=`${t.secondValue?.aggregator}(${jj(t.secondValue?.field)})`,a=` and ${o}`):(e=`${t.secondValue?.aggregator}(total ${jj(t.secondValue?.field)})`,a=` and ${o}`),u=`${a}${i[1]}${e}`}return`"${l}${u}"`})(e);break;case Nj.CLEAR_SELECTION:i=`[${e.field}]=`,t="",n="";break;case Nj.VALUES:default:i=e.options?.values?e.options.values.map(e=>`'${e.replace(/'/g,"''")}'`).join(","):""}""!==i&&r.push(`${t}${i}${n}`)}),0===r.length)return;return t+=`${r.join(",")}>}`,t},zj=[];for(let e=0;e<256;++e)zj.push((e+256).toString(16).slice(1));let Wj;const $j=new Uint8Array(16);var Hj={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Vj(e,t,r){const n=(e=e||{}).random??e.rng?.()??function(){if(!Wj){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Wj=crypto.getRandomValues.bind(crypto)}return Wj($j)}();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=15&n[6]|64,n[8]=63&n[8]|128,function(e,t=0){return(zj[e[t+0]]+zj[e[t+1]]+zj[e[t+2]]+zj[e[t+3]]+"-"+zj[e[t+4]]+zj[e[t+5]]+"-"+zj[e[t+6]]+zj[e[t+7]]+"-"+zj[e[t+8]]+zj[e[t+9]]+"-"+zj[e[t+10]]+zj[e[t+11]]+zj[e[t+12]]+zj[e[t+13]]+zj[e[t+14]]+zj[e[t+15]]).toLowerCase()}(n)}const Bj=()=>crypto?.randomUUID?.()??function(e){return Hj.randomUUID&&!e?Hj.randomUUID():Vj(e)}(),Gj=1e3,Uj=1e3,Yj=e=>{if(0===e.qInterColumnSortOrder.length)return;const t=e.qDimensions,r=((e,t)=>{const r=new Set;for(const t of e){if(r.has(t))return!0;r.add(t)}const n=e.includes(-1),i=e.filter(e=>-1!==e);if(t){const r=n?t.length+1:t.length;if(e.length!==r)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);r&&(e.qInterColumnSortOrder=((e,t)=>{const r=[];if(t)for(let e=0;e<t.length;e++)r.push(e);return e.qMeasures.length>=2&&r.push(-1),r})(e,t))},Kj=(e,t,r)=>{[e[t],e[r]]=[e[r],e[t]]},Xj=e=>{if(!e)return;Yj(e);const t=e.qDimensions,{qInterColumnSortOrder:r}=e;((e,t=[])=>{const r=t.filter(e=>-1!==e);for(let n=0;n<r.length;n++)if(-1!==r[n]&&r[n]!==n){const i=r[n],o=r.indexOf(n),a=r[o];Kj(r,n,o),Kj(e,n,o),Kj(t,t.indexOf(i),t.indexOf(a))}})(t,r)},Jj=P;class Zj extends Jj{#u;constructor(e,t){super(e),this.path=e.path,this.#u=t}async addDimension(e,t,r,n){if(!e||this.#c(e))return;const i=t??!1;if(e.qDef.cId||(e.qDef.cId=Bj()),n)return this.addAlternativeDimension(e,i,r);if(this.getDimensions().length<this.maxDimensions()){const t=await(async(e,t,r,n)=>{const i=e.getDimensions(),o=e.hcProperties.qNoOfLeftDims;return await e.autoSortDimension(t),Xj(e.hcProperties),(-1===o||Number.isNaN(+o))&&(e.hcProperties.qNoOfLeftDims=i.length),r?((e,t,r,n)=>{if(!e)return;const{qInterColumnSortOrder:i,qNoOfLeftDims:o}=e,a=t.length,s=i.indexOf(-1),l=-1!==s,u=void 0!==n?n+(o||0):void 0;if(l&&void 0!==u&&s>=u?((e,t,r)=>{t.splice(r,1),t.push(e),t.splice(r+1,0,-1)})(a,i,s):i.push(a),void 0===n)t.push(r);else if(void 0!==u){const e=l&&u>s?u-1:u;t.splice(e,0,r)}})(e.hcProperties,i,t,n):((e,t,r,n)=>{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===n?t.splice(i-1,0,r):s<n?t.splice(n-1,0,r):(t.splice(n,0,r),o.splice(s,1),o.splice(s+1,0,-1));else{const e=n??i;t.splice(e,0,r),-1!==s&&(o.splice(s,1),o.splice(s+1,0,-1))}e.qNoOfLeftDims++})(e.hcProperties,i,t,n),t})(this,e,i,r);return this.#d({section:i?"columns":"rows",cId:e.qDef.cId,addLast:void 0===r}),t}}async addDimensions(e,t,r){const n=[];for await(const i of e){const e=await this.addDimension(i,r,void 0,t);e&&n.push(e)}return n}addAlternativeDimension(e,t,r){if(!e||this.#c(e))return;const n=this.getAlternativeDimensions();void 0===this.hcProperties.excludedNoOfLeftDims&&(this.hcProperties.excludedNoOfLeftDims=n.length);let i=r;return i=void 0===i?t?n.length:this.hcProperties.excludedNoOfLeftDims:t?this.hcProperties.excludedNoOfLeftDims+i:Math.min(i,this.hcProperties.excludedNoOfLeftDims),n.splice(i,0,e),t||this.hcProperties.excludedNoOfLeftDims++,this.#d({section:t?"columns":"rows",cId:e.qDef.cId,alternative:!0,addLast:void 0===r}),e}async addFieldDimension(e,t,r,n={}){const i=this.createFieldDimension(e,t,r);return this.addDimension(i,n.asColumn,void 0,!1)}async addFieldDimensions(e,t={}){const r=e.map(e=>this.createFieldDimension(e.field,e.label,e.defaults));return this.addDimensions(r,void 0,t.asColumn)}async addLibraryDimensions(e,t={}){const r=e.map(e=>this.createLibraryDimension(e.id,e.defaults));return this.addDimensions(r,void 0,t.asColumn)}reinsertDimension(e,t,r){e.qDef.cId||(e.qDef.cId=Bj());if(this.getDimensions().length<this.maxDimensions())return this.addDimension(e,t,r);return this.reinsertAlternativeDimension(e,r,t)}reinsertAlternativeDimension(e,t,r){const n=this.getDimensions(),i=this.getAlternativeDimensions();if(n.length>=Gj)return Promise.resolve();const o="number"==typeof t?t:i.length;return i.splice(o,0,e),this.#d({section:r?"columns":"rows",cId:e.qDef.cId,alternative:!0}),Promise.resolve(e)}async removeDimensions(e,t,r){return Promise.all([...e].reverse().map(e=>this.removeDimension(e,t,r)))}async removeDimension(e,t,r){if(t){const t=this.getAlternativeDimensions().splice(e,1)[0];return!r&&this.hcProperties.excludedNoOfLeftDims&&this.hcProperties.excludedNoOfLeftDims--,this.#p({cId:t.qDef.cId,section:r?"columns":"rows"}),t}const n=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=n.splice(e,1).at(0);if(s)return((e,t)=>{if(!e)return-1;const r=e.indexOf(t);if(-1===r)return-1;for(let r=0;r<e.length;++r)e[r]>t&&e[r]--;e.splice(r,1)})(this.hcProperties.qInterColumnSortOrder,e),Xj(this.hcProperties),this.#p({cId:s.qDef.cId,section:r?"columns":"rows"}),s}#c(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 r=[];for await(const n of e){const e=await this.addMeasure(n,t,void 0,!0);e&&r.push(e)}return r}addAlternativeMeasures(e,t){if(this.#f(e))return;const r=this.getAlternativeMeasures(),n=void 0===t?r.length:t,i=r.splice(n,0,e);return this.#h({cId:e.qDef.cId,alternative:!0,addLast:void 0===t}),i}async addMeasure(e,t,r,n){if(this.#f(e))return;if(e.qDef.cId||(e.qDef.cId=Bj()),t)return this.addAlternativeMeasures(e,r);n||delete e.qDef.qNumFormat;const i=this.getMeasures();if(i.length<this.maxMeasures()){const t=1===i.length;return void 0!==r&&r>=0?i.splice(r,0,e):i.push(e),this.autoSortMeasure(e).then(()=>(t&&(this.hcProperties.qInterColumnSortOrder.push(-1),0===this.getDimensions().length&&(this.hcProperties.qNoOfLeftDims=0)),this.#h({cId:e.qDef.cId,addLast:void 0===r}),e))}return i.length<Uj?(this.getAlternativeMeasures().push(e),this.#h({cId:e.qDef.cId,alternative:!0,addLast:void 0===r}),Promise.resolve(e)):Promise.resolve()}reinsertMeasure(e,t){const r=this.getMeasures(),n=this.getAlternativeMeasures(),i=this.hcProperties.qInterColumnSortOrder;if(e.qDef.cId||(e.qDef.cId=Bj()),t=void 0!==t?t:r.length,r.length<this.maxMeasures()){if(r.splice(t,0,e),2===r.length){-1===i.indexOf(-1)&&i.push(-1)}this.#h({cId:e.qDef.cId})}else r.length<Uj&&(t=n.length,n.splice(t,0,e),this.#h({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.#p({cId:t.qDef.cId,section:"measures"}),t}const r=this.getMeasures();let n,i,o;if("number"==typeof e&&e<r.length){n=2===r.length,i=this.getMeasures().splice(e,1)[0];const t=this.hcProperties.qInterColumnSortOrder;n&&(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-r.length,1)[0]);if(i)return this.#p({cId:i.qDef.cId,section:"measures"}),i}async removeMeasures(e,t){return await Promise.all([...e].reverse().map(e=>this.removeMeasure(e,t))),e}#f(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.#m("rows"),t=this.getDimensions();return e.filter(e=>e>=0).map(e=>t[e])}getColumnDimensions(){const e=this.#m("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)}#g(e){const t=this.hcProperties.rankedList?.[e];return t||this.createRankedList(e)}#v(e){return[...this.#g(e)]}#y(e,t){return void 0===this.hcProperties.rankedList&&(this.hcProperties.rankedList={}),this.hcProperties.rankedList[e]=t,t}#b(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}#x(e){const t=({qDef:t})=>t.cId===e;return!(!this.getAlternativeDimensions().some(t)&&!this.getAlternativeMeasures().some(t))}#m(e){const{qInterColumnSortOrder:t,qNoOfLeftDims:r}=this.hcProperties;if(this.#S())return"columns"===e?t:[];switch(e){case"rows":return-1===r?t:t.slice(0,r);case"columns":return-1===r?[]:t.slice(r);default:throw new Error(`Unknown section in #getInterColumnSortOrderBySection: ${e}`)}}#S(){const{qNoOfLeftDims:e}=this.hcProperties,t=-1===e||Number.isNaN(+e);return 0===this.getDimensions().length&&this.getMeasures().length>0&&t}#w(e){const t=this.hcProperties.qInterColumnSortOrder.indexOf(-1);if(-1===t)return!1;if(this.#S())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}}#C(e,t=!0){const r=e=>-1===e?-1:e.qDef.cId;if("measures"===e)return this.getMeasures().concat(t?this.getAlternativeMeasures():[]).map(r);const n=this.#m(e),i=this.getDimensions(),o=n.map(e=>-1===e?-1:i[e]);switch(e){case"rows":return o.concat(t?this.getAlternativeRowDimensions():[]).map(r);case"columns":return o.concat(t?this.getAlternativeColumnDimensions():[]).map(r);default:throw new Error(`Unknown section in #isCorruptRankedList: ${e}`)}}isRankedListCorrupt(e){const t=this.hcProperties.rankedList?.[e],r=this.properties.qInfo?.qId;if(!t)return!0;if(new Set(t).size!==t.length){const n=t.filter((e,r)=>t.indexOf(e)!==r);return console.warn("Corrupt ranked list detected: duplicate ids",{duplicates:n,section:e,chartId:r}),!0}const n=this.#C(e);if(t.length!==n.length)return console.warn("Corrupt ranked list detected: length mismatch",{section:e,chartId:r,fieldIds:n,rankedList:t,diff:new Set(n).symmetricDifference(new Set(t))}),!0;const i=n.filter(e=>!t.includes(e));if(i.length>0)return console.warn("Corrupt ranked list detected: missing ids",{missingIds:i,section:e,chartId:r}),!0;const o=this.#C(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:r,orderMismatchIds:s}),!0)}createRankedList(e){switch(e){case"rows":case"columns":return this.#E({section:e});case"measures":return this.#I();default:throw new Error(`Unknown section in getRankedList: ${e}`)}}#E({section:e}){const t=this.getDimensions(),r=this.#m(e),n="columns"===e?this.getAlternativeColumnDimensions():this.getAlternativeRowDimensions(),i=r.map(e=>-1===e?-1:t[e].qDef.cId);return i.push(...n.map(e=>e.qDef.cId)),this.#y(e,i)}#I(){if(void 0!==this.hcProperties.rankedList?.measures)return this.hcProperties.rankedList.measures;const e=[...this.getMeasures(),...this.getAlternativeMeasures()].map(e=>e.qDef.cId);return this.#y("measures",e)}#D({section:e,cId:t,fields:r,addLast:n}){const i=this.#g(e),o=r.findIndex(e=>e.qDef.cId===t),a=r[o+1]?.qDef.cId,s=r[o-1]?.qDef.cId;if(n)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]}#d({section:e,cId:t,alternative:r=!1,addLast:n=!1}){if(void 0===this.hcProperties.rankedList?.[e])return this.#E({section:e});let i=[];return i="columns"===e?r?this.getAlternativeColumnDimensions():this.getColumnDimensions():r?this.getAlternativeRowDimensions():this.getRowDimensions(),this.#D({section:e,cId:t,fields:i,addLast:n})}#h({cId:e,alternative:t=!1,addLast:r=!1}){if(void 0===this.hcProperties.rankedList?.measures)return this.#I();const n=t?this.getAlternativeMeasures():this.getMeasures();return this.#P(),this.#D({section:"measures",cId:e,fields:n,addLast:r})}#P(){const e=this.#g("rows"),t=this.#g("columns");this.#w("rows")&&!e.includes(-1)?e.push(-1):this.#w("columns")&&!t.includes(-1)&&t.push(-1)}#R(){if(this.hcProperties.qInterColumnSortOrder.includes(-1))return;const e=this.#g("rows"),t=this.#g("columns"),r=e.indexOf(-1),n=t.indexOf(-1);-1!==r&&e.splice(r,1),-1!==n&&t.splice(n,1)}#p({cId:e,section:t}){const r=this.#g(t),n=r.indexOf(e);-1!==n&&(r.splice(n,1),this.#R())}async moveMeasureToAlternative(e){const t=this.getMeasures().findIndex(t=>t.qDef.cId===e),r=this.#v("measures"),n=r.indexOf(e);if(-1===t)return;const i=await this.removeMeasure(t);if(void 0===i)return;const o=r.slice(n+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.#y("measures",r)}async moveMeasureFromAlternative(e){const t=this.getAlternativeMeasures().findIndex(t=>t.qDef.cId===e),r=this.#v("measures"),n=r.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=r.slice(n+1).find(e=>o.includes(e)),s=o.findIndex(e=>e===a);await this.addMeasure(i,!1,-1===s?void 0:s),this.#y("measures",r)}async moveDimensionToAlternative(e){const t=this.#b(e),r=this.getDimensions().findIndex(t=>t.qDef.cId===e);if(-1===r||null===t)return;const n=this.#v(t),i=n.indexOf(e),o="columns"===t,a=await this.removeDimension(r,!1,o);if(void 0===a)return;const s=n.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.#y(t,n)}async moveDimensionFromAlternative(e){const t=this.#b(e),r=this.getAlternativeDimensions().findIndex(t=>t.qDef.cId===e);if(-1===r||null===t)return;const n=this.#v(t),i=n.indexOf(e),o="columns"===t,a=await this.removeDimension(r,!0,o);if(void 0===a)return;const s=this.#C(t,!1),l=n.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.#y(t,n)}movePseudoDimension({toIndex:e,toSection:t}){const r=this.#b(-1);if(null===r)return void console.error("Cannot move pseudo dimension, unable to find it in any section",{toIndex:e,toSection:t});const n="columns"===t,i=r===t,o=this.#v(t);if(i){const e=o.indexOf(-1);o.splice(e,1)}else{const i=this.#g(r),o=i.indexOf(-1);if(-1===o)return void console.error("Couldn't delete pseudo dimension from current section",{toIndex:e,toSection:t,fromSection:r});i.splice(o,1),this.hcProperties.qNoOfLeftDims=n?Math.max(0,this.hcProperties.qNoOfLeftDims-1):this.hcProperties.qNoOfLeftDims+1}const a=e-o.slice(0,e).filter(e=>this.#x(e)).length,s=n?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.#y(t,o)}async moveDimension({cId:e,toIndex:t,toSection:r}){const n=this.#b(e),i=this.#x(e);if(null===n)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:r});const a=this.#v(r),s=a.indexOf(e);-1!==s&&a.splice(s,1);const l=t-a.slice(0,t).filter(e=>this.#x(e)!==i).length,u="columns"===r,c="columns"===n,d=await this.removeDimension(o,i,c);if(void 0===d)return;void 0!==await this.addDimension(d,u,l,i)&&(a.splice(t,0,e),this.#y(r,a))}async moveMeasure({cId:e,toIndex:t}){const r=this.#x(e),n=(r?this.getAlternativeMeasures():this.getMeasures()).findIndex(t=>t.qDef.cId===e);if(-1===n)return void console.error("Cannot move measure, unable to find it in any section",{cId:e});const i=this.#v("measures"),o=i.indexOf(e);-1!==o&&i.splice(o,1);const a=t-i.slice(0,t).filter(e=>this.#x(e)!==r).length,s=await this.removeMeasure(n,r);if(void 0===s)return;void 0!==await this.addMeasure(s,r,a)&&(i.splice(t,0,e),this.#y("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,r=Array.isArray(t)&&t.includes("$numeric"),n=e.isDerived,i=Array.isArray(this.properties.filters)?this.properties.filters:[],o={type:"values",field:n?e.value??e.fullname:e.name??e.label??e.field,options:{values:[]},exclude:!1,id:Bj(),qTags:Array.isArray(t)?t:[],isNumeric:r};return i.push(o),this.properties.filters=i,this.properties.qHyperCubeDef.qContextSetExpression=Fj(i),o}addFilters(e){const t=[];for(const r of e)t.push(this.addFilterField(r));return t}#M(e){const t=this.getFilters();return t.splice(e,1),this.properties.qHyperCubeDef.qContextSetExpression=Fj(t),t}removeFilters(e){if(0===e.length)return[];let t=[];const r=[...e].sort((e,t)=>t-e);t=this.getFilters().filter((t,r)=>e.includes(r));for(const e of r)this.#M(e);return t}getAddDimensionLabel(){return this.#u.get("Visualization.Requirements.AddDimension")}canColorBy(){return!1}}var Qj={exports:{}};!function(e){self,e.exports=(()=>{var e={909:e=>{var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},a=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var n,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(n in e);return void 0===n||t.call(e,n)},s=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},l=function(e,r){if("__proto__"===r){if(!t.call(e,r))return;if(i)return i(e,r).value}return e[r]};e.exports=function e(){var t,r,n,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(r in t)n=l(d,r),d!==(i=l(t,r))&&(h&&i&&(a(i)||(u=o(i)))?(u?(u=!1,c=n&&o(n)?n:[]):c=n&&a(n)?n:{},s(d,{name:r,newValue:e(h,c,i)})):void 0!==i&&s(d,{name:r,newValue:i}));return d}},8:(e,t)=>{(()=>{var e={229:e=>{var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},a=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var n,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(n in e);return void 0===n||t.call(e,n)},s=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},l=function(e,r){if("__proto__"===r){if(!t.call(e,r))return;if(i)return i(e,r).value}return e[r]};e.exports=function e(){var t,r,n,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(r in t)n=l(d,r),d!==(i=l(t,r))&&(h&&i&&(a(i)||(u=o(i)))?(u?(u=!1,c=n&&o(n)?n:[]):c=n&&a(n)?n:{},s(d,{name:r,newValue:e(h,c,i)})):void 0!==i&&s(d,{name:r,newValue:i}));return d}}},r={};function n(t){var i=r[t];if(void 0!==i)return i.exports;var o=r[t]={exports:{}};return e[t](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),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};(()=>{n.r(i),n.d(i,{default:()=>Ae});var e=n(229),t=n.n(e);const r=function(e,t,r){if(!t)return!1;var n,i=t.split("."),o=i[i.length-1],a=e;for(n=0;n<i.length-1;++n)void 0===a[i[n]]&&(a[i[n]]=Number.isNaN(+i[n+1])?{}:[]),a=a[i[n]];if(void 0!==r){var s=a[o];return a[o]=r,{updated:r,previous:s}}return delete a[o],!1},o=function(e,t,r){var n,i=t.split("."),o=e;if(void 0===o)return r;for(n=0;n<i.length;++n){if(void 0===o[i[n]])return r;o=o[i[n]]}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 r=function(e,t){if(!t)return null;var r,n;for(r=0;r<t.length;r++)if((n=t[r]).qInfo.qId===e)return n;return null}(e.qLibraryId,t.dimensionList);return r&&r.qData.info[0].qTags.indexOf("$numeric")>-1}var n=function(e,t){if(!t)return null;var r,n,i=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var r=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(r)&&(t=(t=t.substring(1,r)).trim()),t}(e);for(r=0;r<t.length;r++){if((n=t[r]).qName===i)return n;if(n.qDerivedFieldData)for(var o=0;o<n.qDerivedFieldData.qDerivedFieldLists.length;++o)for(var a=n.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 n&&n.qTags.indexOf("$numeric")>-1}function d(e){return!(!e.fullAccumulation&&!e.fullRange)}function p(e,t){var r=e.crossAllDimensions;return 2===t&&r?"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),r=t.trim();return"="===r.substring(0,1)?r.substring(1).trim():r}function h(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function m(e,t){var r=e.crossAllDimensions;return 2===t&&r?"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,r=void 0===t?{}:t,n=e.dimensions,i=e.dimensionAndFieldList,o=e.funcComp,a=void 0===o?"Sum":o,s=e.valueComp,l=void 0===s?"0":s;if(!r.showExcludedValues)return"";if(n&&1===n.length){var u=y(c(n[0],i),h(0));return"".concat(a,"({1<").concat(u,">}").concat(l,")")}if(n&&2===n.length){var d=c(n[0],i),p=c(n[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,r=e.layout;return o(t,"qHyperCubeDef.qDimensions",o(r,"qHyperCube.qDimensionInfo",[])).length}const w={isFullRange:d,getNumDimensions:S,getExpressionWithExcludedComp:function(e){var t=e.expression,r=e.modifier,n=e.dimensions,i=e.dimensionAndFieldList,o=e.treatMissingAsNull,a=u(f(t));if(!r.showExcludedValues)return a;var s=b({modifier:r,dimensions:n,dimensionAndFieldList:i}),l=o?"":", 0";if(n&&1===n.length){var c=h(0);return"If(Count(".concat(c,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(n&&2===n.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 r=e.steps;return"number"!=typeof r||Number.isNaN(r)?6:r}return p(e,t)},getAboveCompPrefix:m,getAboveCompSuffix:g,getAboveComp:function(e,t,r,n){return m(e,t)+r+g(n)},getFunctionPrefix:x,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return x(e)+t+")"},getAggrComp:function(e,t,r){return"Aggr(".concat(e,", ").concat(t,", ").concat(r,")")},getExcludedComp:b,needDimension:function(e){var t=e.modifier,r=e.properties,n=e.layout,i=function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t);return 0===i&&2===S({properties:r,layout:n})},getDimComp:function(e,t){var r=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),n=h(t);if(!r.qSortByExpression&&!r.qSortByNumeric&&!r.qSortByAscii)return n;var i=["Descending","Ascending"],o=r.qSortByNumeric?"(Numeric, ".concat(i[(r.qSortByNumeric+1)/2],")"):"",a=r.qSortByAscii?"(Text, ".concat(i[(r.qSortByAscii+1)/2],")"):"";return r.qSortByNumeric&&r.qSortByAscii?"(".concat(n,", ").concat(o,", ").concat(a,")"):r.qSortByNumeric?"(".concat(n,", ").concat(o,")"):r.qSortByAscii?"(".concat(n,", ").concat(a,")"):n},simplifyExpression:f,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var r=t.indexOf(s);if(-1!==r){var n=t.indexOf(l);if(-1!==n)return t.substring(r+s.length,n)}}},initModifier:function(e,t){Object.keys(t).forEach(function(r){void 0===e[r]&&(e[r]=t[r])})},isNumeric:c,isApplicable:function(e){var t=e.properties,r=e.layout,n=e.minDimensions,i=void 0===n?1:n,o=e.maxDimensions,a=void 0===o?2:o;if(!t&&!r)return!0;var s=S({properties:t,layout:r});return s>=i&&s<=a},getExpressionWithMarkers:u,canExtract:function(e){var t=e.indexOf(s),r=e.indexOf(l);return t>-1&&r>-1&&t<r},getDimDefWithWrapper:h,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")},generateTSDExpression:function(e,t,r){var n=t||e.outputExpression;if(e.base&&e.base.qDef&&(n=t!==e.base.qDef?t:e.base.qDef),"observed"!==e.decomposition){var i=r.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&&(n=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);n=n.startsWith("=")?n.substr(1):n,n="".concat(o,"(").concat(n,", ").concat(e.steps,")")}return n},getDecomposition:function(e){var t="observed";return Object.values(a.EXPRESSIONS).find(function(r){var n=e.qDef.base.qDef.toLowerCase()||e.qDef.qDef.toLowerCase();return a.EXPRESSIONS[r]&&n.includes(a.EXPRESSIONS[r].toLowerCase())&&(t=r),r}),t}};function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}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={},P=Array.isArray;function R(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 r,n=t.substring(1).split("/").slice(0,-1);return n.forEach(function(t,i){if(i!==n.length){r=+t;var o=Number.isNaN(r)?{}:[];e[r||t]=M(e[r||t])?o:e[t],e=e[r||t]}}),e}function k(e,t){var r=!0;if(R(e)&&R(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach(function(n){k(e[n],t[n])||(r=!1)}),r);if(P(e)&&P(t)){if(e.length!==t.length)return!1;for(var n=0,i=e.length;n<i;n+=1)if(!k(e[n],t[n]))return!1;return!0}return e===t}D.generate=function(e,t,r){r=r||"";var n=[];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(r,"/").concat(i);k(o,a)||L(t,i)||(M(a)?n.push({op:"add",path:s,value:o}):R(o)&&R(a)?n=n.concat(D.generate(a,o,s)):P(o)&&P(a)?n=n.concat(function(e,t,r){var n=[],i=e.slice(),o=-1;function a(e,t,r){if(e[r]&&M(e[r].qInfo))return null;if(e[r]&&e[r].qInfo.qId===t)return r;for(var n=0,i=e.length;n<i;n+=1)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(k(t,i))return n;if(!M(t[0])&&M(t[0].qInfo))return n.push({op:"replace",path:r,value:t}),n;for(var s=i.length-1;s>=0;s-=1)-1===(o=a(t,i[s].qInfo&&i[s].qInfo.qId,s))?(n.push({op:"remove",path:"".concat(r,"/").concat(s)}),i.splice(s,1)):n=n.concat(D.generate(i[s],t[o],"".concat(r,"/").concat(s)));for(var l=0,u=t.length;l<u;l+=1)-1===(o=a(i,t[l].qInfo&&t[l].qInfo.qId))?(n.push({op:"add",path:"".concat(r,"/").concat(l),value:t[l]}),i.splice(l,0,t[l])):o!==l&&(n.push({op:"move",path:"".concat(r,"/").concat(l),from:"".concat(r,"/").concat(o)}),i.splice(l,0,i.splice(o,1)[0]));return n}(a,o,s)):n.push({op:"replace",path:"".concat(r,"/").concat(i),value:o}))}),Object.keys(e).forEach(function(i){M(t[i])&&!L(e,i)&&n.push({op:"remove",path:"".concat(r,"/").concat(i)})}),n},D.apply=function(e,t){t.forEach(function(t){var r,n,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(P(i))"-"===o&&(o=i.length),i.splice(+o,"add"===t.op?0:1,t.value);else if(P(a)&&P(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)}(n=u)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?C(e,t):void 0}}(n)||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(R(a)&&R(t.value))r=a,Object.keys(r).forEach(function(e){Object.getOwnPropertyDescriptor(r,e).configurable&&!L(r,e)&&delete r[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);P(i)?i.splice(+o,0,c.splice(+s,1)[0]):(i[o]=c[s],delete c[s])}else"remove"===t.op&&(P(i)?i.splice(+o,1):delete i[o])})},D.clone=function(e){return I({},e)},D.createPatch=function(e,t,r){var n={op:e.toLowerCase(),path:r};return"move"===n.op?n.from=t:void 0!==t&&(n.value=t),n},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,r,n){if(!e)return Promise.resolve();var i=O.generate(r,n);return t()(!0,r,n),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 r=o(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===T)return r[n]}function _(e,t){var r=function(e,t){var r=o(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===T)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var j={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,r=e.layout;return w.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=a;void 0===l&&(l=w.getNumDimensions({properties:n,layout:i}));var u=o(n,"qHyperCubeDef.qDimensions",[]),c=w.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),d=w.getNumStepComp(r,l),p=w.getAboveComp(r,l,c,d),f=w.getRangeComp("RangeSum",p);if(w.needDimension({modifier:r,properties:n,layout:i})){var h=w.getDimComp(u,1),m=w.getDimComp(u,0),g=w.getAggrComp(f,h,m);f=r.showExcludedValues?w.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:s,valueComp:g}):g}return f},extractInputExpression:w.extractInputExpression,initModifier:function(e){w.initModifier(e,j)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={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(_(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(_(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(_(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(_(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var r=N(t,e);if(r){var n=r.steps;r.steps="number"!=typeof n||Number.isNaN(n)?6:Math.abs(n)}},show:function(t){var r=N(t,e);return r&&!r.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(_(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,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(T))return!1;var o=N(t,e);return o&&!o.disabled}};return r}};var z="movingAverage";function W(e,t){var r=o(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===z)return r[n]}function $(e,t){var r=function(e,t){var r=o(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===z)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):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,r=e.layout;return w.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,r=e.expression,n=e.modifier,i=e.properties,a=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!n)return r;var u=s;void 0===u&&(u=w.getNumDimensions({properties:i,layout:a}));var c=o(i,"qHyperCubeDef.qDimensions",[]),d=n.showExcludedValues&&n.nullSuppression,p=w.getExpressionWithExcludedComp({expression:r,modifier:n,dimensions:c,dimensionAndFieldList:l,treatMissingAsNull:d}),f=w.getNumStepComp(n,u),h=w.getAboveComp(n,u,p,f);if(n.nullSuppression)t=w.getRangeComp("RangeAvg",h);else{var m=w.getRangeComp("RangeSum",h),g=function(e,t){var r=w.getRowNoComp(e,t);if(!w.isFullRange(e)){var n=e.steps,i="number"!=typeof n||Number.isNaN(n)?6:n;return"RangeMin(".concat(i,", ").concat(r,")")}return r}(n,u);t="".concat(m," / ").concat(g)}var v=t;if(w.needDimension({modifier:n,properties:i,layout:a})){var y=w.getDimComp(c,1),b=w.getDimComp(c,0),x=w.getAggrComp(v,y,b);v=n.showExcludedValues?w.getExcludedComp({modifier:n,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]:{},r={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 r=W(t,e);if(r){var n=r.steps;r.steps="number"!=typeof n||Number.isNaN(n)?6:Math.abs(n)}},show:function(t){var r=W(t,e);return r&&!r.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,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(z))return!1;var o=W(t,e);return o&&!o.disabled}};return r}};var B="timeSeriesDecomposition";function G(e,t){var r=o(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===B)return r[n]}function U(e,t){var r=function(e,t){var r=o(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===B)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):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,r=e.layout;return w.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties;return r?w.generateTSDExpression(r,t,n):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]:{},r={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,r){var n=G(t,e);if(n){var i=n.steps;n.steps="number"!=typeof i||Number.isNaN(i)?2:Math.abs(i),r.properties.qHyperCubeDef.qMeasures=r.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 r=G(t,e);return r&&!r.fullRange}}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(B))return!1;var o=G(t,e);return o&&!o.disabled}};return r}};var X="difference";function J(e,t){var r=o(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===X)return r[n]}function Z(e,t){var r=function(e,t){var r=o(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===X)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):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,r=e.layout;return w.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:w.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=a;void 0===l&&(l=w.getNumDimensions({properties:n,layout:i}));var u=o(n,"qHyperCubeDef.qDimensions",[]),c=w.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),d=w.getAboveComp(r,l,c),p="".concat(c," - ").concat(d);if(w.needDimension({modifier:r,properties:n,layout:i})){var f=w.getDimComp(u,1),h=w.getDimComp(u,0),m=w.getAggrComp(p,f,h);p=r.showExcludedValues?w.getExcludedComp({modifier:r,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]:{},r={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,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(X))return!1;var o=J(t,e);return o&&!o.disabled}};return r}};var te="normalization";function re(e,t){var r=o(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===te)return r[n]}function ne(e,t){var r=function(e,t){var r=o(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===te)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}function ie(e,t){for(var r=0;r<e.length;r++)if(e[r].value===t)return r;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,r){return 1===e?"{$<".concat(w.getFieldWithWrapper(t),"={'").concat(r,"'}>}"):""}function le(e,t){return 0===e&&t>1||2===e?"Total":""}function ue(e,t,r){return 0===e&&t>1?"<".concat(w.getDimDefWithWrapper(r),">"):""}const ce={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,r=e.layout;return w.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:w.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=a;void 0===l&&(l=w.getNumDimensions({properties:n,layout:i}));var u=o(n,"qHyperCubeDef.qDimensions",[]),c=w.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),d=r.selectionScope,p=r.dimensionalScope;return function(e,t,r,n,i,o,a){var s=ae(t),l=se(t,r,n),u=""===s&&""===l?"":s||l,c=le(i,o),d=ue(i,o,a),p=function(e){for(var t=[],r=0;r<e;r++)t[r]=w.getDimDefWithWrapper(r);return t.join(", ")}(o);return"".concat(e,"/ Sum(").concat(u," ").concat(c).concat(d," Aggr(").concat(u," ").concat(e,", ").concat(p,"))")}(c,d,r.field,r.value,p,l,r.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]:{},r={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(ne(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(r){return function(e,t,r){var n=[{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 n=function(e,t){if(1===e){var r=ie(t,0);t.splice(r,1)}return t}(re(e,r).dimensionalScope,n),n}(r,t,e)}},field:{refFn:function(t){return"".concat(ne(t,e),".field")},type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:function(e,t,r){return r.app.getFieldList().then(function(e){return e.map(function(e){return{label:e.qName,value:e.qName}})})},show:function(t){return 1===re(t,e).selectionScope}},value:{refFn:function(t){return"".concat(ne(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return 1===re(t,e).selectionScope}},dimensionalScope:{refFn:function(t){return"".concat(ne(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(r,n){return function(e,t,r,n){var i=t.layout.qHyperCube.qDimensionInfo.length,o=[{value:0,translation:r.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:r.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:1,translation:r.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension"),tooltipTranslation:r.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension",".tooltip")},{value:2,translation:r.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:r.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension",".tooltip")}];return o=function(e,t){if(e<2){var r=ie(t,0);t.splice(r,1)}return t}(i,o),o=function(e,t){if(0===e){var r=ie(t,1);t.splice(r,1)}return t}(re(e,n).selectionScope,o),o}(r,n,t,e)}},primaryDimension:{refFn:function(t){return"".concat(ne(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,r){return 0===(re(t,e).dimensionalScope||0)&&r.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(te))return!1;var o=re(t,e);return o&&!o.disabled}};return r},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",Pe={initBase:function(e,t){(t||Pe.isValid(e))&&(r(e,ye,o(e,ve)),r(e,xe,o(e,be)),r(e,Ce,o(e,Se)),r(e,Ee,o(e,we)))},restoreBase:function(e){Pe.isValid(e)&&(r(e,ve,o(e,ye)),r(e,be,o(e,xe)),r(e,Se,o(e,Ce)),r(e,we,o(e,Ee)),o(e,Ie)&&o(e,De)&&r(e,Ie,o(e,De)),delete e.qDef.base)},isValid:function(e){var t=o(e,ye),r=o(e,xe);return void 0!==t||void 0!==r}};const Re=Pe;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:_e,initBase:Re.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some(function(e){return Le[e]})},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some(function(e){return Le[e]&&Le[e].isApplicable({properties:r,layout:n})})},measureBase:ge,limitedSorting:function(e){var t=e.measures,r=e.properties,n=e.layout,i=!1,o=!1;return t.forEach(function(e){var t=ze(e);Ue({modifiers:t,properties:r,layout:n})&&(i=!0,o=o||Ze({modifiers:t,properties:r,layout:n}))}),i&&!o},ifEnableTotalsFunction:je};var ke={};function Oe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.model,n=e.properties,i=e.isSnapshot,a=void 0!==i&&i,s=e.masterItem,l=!1;ke[r.id]=ke[r.id]||{isFirstTime:!0};var u=ke[r.id].isFirstTime;if(ke[r.id].isFirstTime=!1,n&&"object"===Me(n))return qe({model:r,properties:n});var c=r?r.layout:void 0,d=o(c,"qSelectionInfo.qInSelections");if(a||d)return Promise.resolve(l);var p=o(c,"qHyperCube.qMeasureInfo"),f=ke[r.id].lastReloadTime;if(ke[r.id].lastReloadTime=o(r,"app.layout.qLastReloadTime"),Ne({measures:p,layout:c})){var h=function(e){var t=e.measures,r=e.layout,n=e.lastReloadTime;return o(e.model,"app.layout.qLastReloadTime")!==n&&function(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some(function(e){return Ge({measure:e,properties:r,layout:n})})}({measures:t,layout:r})}({measures:p,layout:c,model:r,lastReloadTime:f});return h||function(e){var t=e.measures,r=e.layout,n=e.masterItem,i=e.isFirstTime;return!!Array.isArray(t)&&(i||n||t.some(function(e){return function(e){var t=e.measure,r=e.layout;return Ue({modifiers:ze(t),layout:r})?!t.base:!!t.base}({measure:e,layout:r})}))}({measures:p,layout:c,masterItem:s,isFirstTime:u})?r.getEffectiveProperties().then(function(e){var n=t()(!0,{},e);$e(n);var i=Qe(n);return Ye({model:r}).then(function(t){return Ke({libraryIds:i,model:r}).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 r=0,n=t.qDef.modifiers;Array.isArray(n)&&n.forEach(function(e){if("object"===Me(e)&&!e.disabled){if(r++,"object"!==Me(Le[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(r>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var n=Le[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==n&&Ve(t)&&w.simplifyExpression(t.qDef.base.qDef)!==w.simplifyExpression(n)&&(t.qDef.base.qDef=n)}})}}({measure:e,properties:t})})}({properties:n}),qe({model:r,oldProperties:e,properties:n,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)?r.getEffectiveProperties().then(function(e){return function(e){var r=e.model,n=e.properties,i=Qe(n);return et({model:r,libraryIds:i}).then(function(){var e=t()(!0,{},n);return Fe(n).forEach(function(e){return Te(e)}),Je({oldProperties:e,newProperties:n,model:r})})}({model:r,properties:e})}):Promise.resolve(l)}function qe(e){var r=e.model,n=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===n&&(n=l?t()(!0,{},i):i),$e(i);var p=Qe(i);return et({model:r,libraryIds:p,masterItem:u}).then(function(){return function(e){var r=e.measures,n=e.properties,i=e.model,a=e.libraryItemsProps,s=e.dimensionAndFieldList;if(r||(r=Fe(n)),!r.length)return Promise.resolve();if(!Ne({measures:r,properties:n}))return r.forEach(function(e){return Te(e)}),Promise.resolve();var l=a?void 0:Qe(n);return Ye({model:i,dimensionAndFieldList:s}).then(function(e){return Ke({libraryIds:l,model:i,libraryItemsProps:a}).then(function(i){r.forEach(function(r){Ue({modifiers:r.qDef.modifiers,properties:n})?(function(e){var r=e.measure,n=e.properties,i=e.libraryItemsProps,a=e.dimensionAndFieldList,s=0;Re.isValid(r)||Re.initBase(r,!0);var l=r.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,r);var l=r.qLibraryId||c&&c.qLibraryId;l?function(e){var r=e.measure,n=e.modifier,i=e.properties,o=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=""===s?s:Le[n.type].generateExpression({expression:s,modifier:n,properties:i,dimensionAndFieldList:o});n.outputExpression=l,r.qDef.qDef=n.outputExpression,(r.qDef.qLabel||a.qMeasure.qLabel)&&(r.qDef.qLabel=a.qMeasure.qLabel),(r.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(r.qDef.qLabelExpression=a.qMeasure.qLabelExpression),r.qDef.quarantine&&r.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(r.qDef.qNumFormat=a.qMeasure.qNumFormat,r.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete r.qLibraryId,r.qDef.coloring=a.qMeasure.coloring,n.base=t()(!0,{},r.qDef.base)}({measure:r,modifier:e,libraryId:l,properties:n,libraryItemsProps:i,dimensionAndFieldList:a}):function(e){var r=e.measure,n=e.modifier,i=e.properties,o=e.dimensionAndFieldList;"function"==typeof Le[n.type].updateModifier&&Le[n.type].updateModifier(n,i.qHyperCubeDef);var a=ge.getExpression(r),s=""===a?a:Le[n.type].generateExpression({expression:a,modifier:n,properties:i,dimensionAndFieldList:o});n.outputExpression=s,r.qDef.qDef=n.outputExpression,r.qDef.base.qLabelExpression?r.qDef.qLabelExpression=r.qDef.base.qLabelExpression:r.qDef.qLabel=r.qDef.base.qLabel||a,n.base=t()(!0,{},r.qDef.base)}({measure:r,modifier:e,properties:n,dimensionAndFieldList:a}),function(e){var t=o(e,"qDef.qAggrFunc");"Expr"!==t||je(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&je(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(r)}})}({measure:r,properties:n,libraryItemsProps:i,dimensionAndFieldList:e}),He(r)):Te(r)})})})}({measures:a,properties:i,model:r,libraryItemsProps:c,dimensionAndFieldList:d}).then(function(){return l?Je({oldProperties:n,newProperties:i,model:r}):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)?Re.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,He(e)}function Ne(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some(function(e){return Ue({modifiers:ze(e),properties:r,layout:n})})}function _e(e){var t=ze(e);if(Array.isArray(t))for(var r=0;r<t.length;r++){var n=t[r];if(Le[n.type]&&!n.disabled)return n}}function je(e){var t=_e(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 r=_e(e);r&&(void 0!==r.outputExpression&&We(r)!==e.qDef.qDef?delete e.qDef.base:!Re.isValid(e)&&r.base&&(e.qDef.base=t()(!0,{},r.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,r=e.properties,n=e.layout;return!Be(t)&&Ue({modifiers:ze(t),properties:r,layout:n})}function Ue(e){var t=e.modifiers,r=e.properties,n=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:r,layout:n})),i[e.type])})}function Ye(e){var t=e.model,r=e.dimensionAndFieldList;if(r)return Promise.resolve(r);var n=[],i={},o=t.app.getDimensionList().then(function(e){i.dimensionList=e});n.push(o);var a=t.app.getFieldList().then(function(e){i.fieldList=e});return n.push(a),Promise.all(n).then(function(){return i})}function Ke(e){var t=e.libraryIds,r=e.model,n=e.libraryItemsProps;if(n)return Promise.resolve(n);var i=t.measureLibraryIds,o=t.dimensionLibraryIds,a={},s=[];return i.forEach(function(e){var t=r.app.getMeasure(e).then(function(t){return t.getProperties().then(function(t){a[e]=t})});s.push(t)}),o.forEach(function(e){var t=r.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,r=e.newProperties,n=e.model,i=JSON.stringify(o(t,"qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(o(r,"qHyperCubeDef.qMeasures"),Xe)||JSON.stringify(o(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(o(r,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe);return i?function(e){var t=e.model,r=e.oldProperties,n=e.newProperties,i=t.layout;return i&&!i.qHasSoftPatches&&!i.qExtendsId&&o(i,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(n):q(t,r,n)}({model:n,oldProperties:t,newProperties:r}).then(function(){return i}):Promise.resolve(i)}function Ze(e){var t=e.modifiers,r=e.properties,n=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:r,layout:n})})}function Qe(e){var t=Fe(e),r=[],n=[],i=!1;return t.forEach(function(t){var n=ze(t);if(Ue({modifiers:n,properties:e})){var o=Be(t);o&&r.push(o),i=i||Ze({modifiers:n,properties:e})}}),o(e,"qHyperCubeDef.qDimensions",[]).forEach(function(e){var t=e.qLibraryId;t&&n.push(t)}),{measureLibraryIds:r,dimensionLibraryIds:n}}function et(e){var t=e.model,r=e.libraryIds;return!e.masterItem&&r&&(r.measureLibraryIds.length||r.dimensionLibraryIds.length)?(ke[t.id].masterItemSubscriber=ke[t.id].masterItemSubscriber||function(e){var t=e.model,r=e.callback,n={},i={},a={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},r=o(e,"qInfo.qType");return r&&s[r]&&s[r].forEach(function(r){t[r]=o(e,r)}),JSON.stringify(t)}function u(e){var t=e.qInfo.qId;if(n[t]){var i=l(e);n[t].properties!==i&&(n[t].properties=i,"function"==typeof r&&n[t].enabled&&r(e)),n[t].enabled=!0}}function c(e,r){return t.app[r](e).then(function(t){n[e]={listener:t.layoutSubscribe(u),enabled:!1,properties:l(t.layout)}})}return{subscribe:function(e){var r=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:r,dimensionLibraryIds:o}),Object.keys(n).forEach(function(e){i[e]||a[e]||(n[e].listener.dispose(),delete n[e])}),t.app&&(Object.keys(i).forEach(function(e){i[e]&&!n[e]&&s.push(c(e,"getMeasure"))}),Object.keys(a).forEach(function(e){a[e]&&!n[e]&&s.push(c(e,"getDimension"))})),Promise.all(s)},unsubscribe:function(){Object.keys(n).forEach(function(e){n[e].listener.dispose()}),n={}}}}({model:t,callback:function(e){return Oe({model:t,masterItem:e}).then(function(){return t.app.clearUndoBuffer()})}}),ke[t.id].masterItemSubscriber.subscribe(r)):Promise.resolve()}})(),t.default=i.default,Object.defineProperty(t,"__esModule",{value:!0})})()}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n](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);var n={};return(()=>{function e(t){var r,n=t;return n>9?(r=65+n-10)>90&&(r+=6):n="".concat(n).charCodeAt(0),[48,111,79,105,73,108].indexOf(r)>-1?e(n+1):String.fromCharCode(r)}function t(r){var n=e(r%62),i=Math.floor(r/62);return i>0?t(i)+n:n}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)}r.d(n,{default:()=>$e});const o={getValue:function(e,t,r){if(null==e||null==t)return r;for(var n=t.split("."),i=e,o=0;o<n.length;++o){var a=n[o];if(""!==a){if(void 0===i[a]||null===i[a])return r;i=i[a]}}return i},setValue:function(e,t,r){if(null!=e&&null!=t){for(var n=t.split("."),i=n[n.length-1],o=e,a=0;a<n.length-1;++a){var s=n[a];void 0!==o[s]&&null!==o[s]||(o[s]=Number.isNaN(+n[a+1])?{}:[]),o=o[s]}void 0!==r?o[i]=r: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 r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?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 r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}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 r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?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 r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t,r){if(e){for(var n=0;n<e.length;n++)if(e[n][t]===r)return n;return-1}return-1}const d={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;var r=e.indexOf(t[0]);if(-1!==r){for(var n=0;n<t.length;n++){var i=e.indexOf(t[n]);if(r>i)return!1;r=i}return!0}return!1},indexAdded:function(e,t){var r;for(r=0;r<e.length;++r)e[r]>=0&&e[r]>=t&&++e[r];e.push(t)},indexRemoved:function(e,t){var r,n=0;for(r=0;r<e.length;++r)e[r]>t?--e[r]:e[r]===t&&(n=r);return e.splice(n,1),n},findItemByPropertyValue:function(e,t,r){if(e){for(var n=0;n<e.length;n++)if(e[n][t]===r)return e[n];return null}return null},findIndexByPropertyValue:c};var p=r(8),f=r.n(p);const h=function(e){var t,r=e.exportFormat,n=e.qHyperCubeDef,i=r.data[0];(t=i.dimensions).push.apply(t,a(n.qDimensions));var s,l=o.getValue(n,"qLayoutExclude.qHyperCubeDef.qDimensions");l&&(s=i.excludedDimensions).push.apply(s,a(l))},m=function(e){var t,r=e.exportFormat,n=e.qHyperCubeDef,i=r.data[0];(t=i.measures).push.apply(t,l(n.qMeasures));var a,s=o.getValue(n,"qLayoutExclude.qHyperCubeDef.qMeasures");s&&(a=i.excludedMeasures).push.apply(a,l(s))},g=function(e){var t=e.exportFormat,r=e.qHyperCubeDef,n=t.data[0];r.qInterColumnSortOrder||(r.qInterColumnSortOrder=[]),n.interColumnSortOrder=r.qInterColumnSortOrder.concat();var i=o.getValue(r,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");i&&d.isOrderedSubset(i,n.interColumnSortOrder)&&(n.interColumnSortOrder=i.concat())},v=function(e){var t=e.exportFormat,r=e.properties;Object.keys(r).forEach(function(e){t.properties[e]=r[e]})},y=function(e){var t=e.exportFormat,r=e.properties;r.qLayoutExclude||(r.qLayoutExclude={}),r.qLayoutExclude.disabled&&(Object.keys(r.qLayoutExclude.disabled).forEach(function(e){t.properties.hasOwnProperty(e)||(t.properties[e]=r.qLayoutExclude.disabled[e])}),delete r.qLayoutExclude.disabled),r.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)})}(r),delete r.qLayoutExclude.changed),r.qLayoutExclude.quarantine&&!o.isEmpty(r.qLayoutExclude.quarantine)||delete r.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,r){var n,i,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=o.getValue(e,t);if(!o.isAtomicValue(s))try{if((i=(i=(n=JSON.stringify(s)).match(/:\{/g))?i.length:0)>2&&!a)return;s=JSON.parse(n)}catch(e){return}o.getValue(e,"qLayoutExclude.quarantine")||o.setValue(e,"qLayoutExclude.quarantine",{});var l=o.getValue(e,"qLayoutExclude.quarantine");l[r]||(l[r]={}),l[r][t]=s}var S=r(909),w=r.n(S);function C(e,t){var r=w()(!0,{},t,e);return o.getValue(r,"qOtherTotalSpec.qOtherCounted")||o.setValue(r,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),o.getValue(r,"qOtherTotalSpec.qOtherLimit")||o.setValue(r,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),r.hasOwnProperty("othersLabel")||(r.othersLabel="Others"),r}function E(e,t){return w()(!0,{},t,e)}function I(e,t,r){return"function"==typeof e?e(t):Number.isNaN(+e)?r:e}var D=Math.pow(2,53)-1;function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}const M=function(e,t,r){var n="masterobject"===o.getValue(t,"properties.qInfo.qType")?"masterobject":o.getValue(r,"qInfo.qType");o.setValue(e,"qInfo.qType",n),e.visualization=r.visualization},L=function(e,t,r){t.hasOwnProperty(e)&&(r[e]=t[e])},A=function(e,t,r,n){t.hasOwnProperty(e)?r[e]=t[e]:r[e]=n},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,r=e.exportFormat,n=e.maxDimensions,i=e.minDimensions,o=e.newHyperCubeDef,a=e.defaultDimension,s=r.data[0];for(t=0;t<s.dimensions.length;++t){var l=C(s.dimensions[t],a);o.qDimensions.length<n?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,r=e.exportFormat,n=e.maxMeasures,i=e.minMeasures,o=e.newHyperCubeDef,a=e.defaultMeasure,s=r.data[0];for(t=0;t<s.measures.length;++t){var l=E(s.measures[t],a);o.qMeasures.length<n?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,r=e.dataDefinition,n=void 0===r?{}:r,i=t.data[0],o=n.dimensions||{max:0},a=n.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}},_=function(e){var t=e.exportFormat,r=e.newHyperCubeDef,n=t.data[0],i=r.qDimensions.length+r.qMeasures.length;r.qInterColumnSortOrder=n.interColumnSortOrder.concat();var o=r.qInterColumnSortOrder.length;if(o!==i)for(r.qLayoutExclude&&(r.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=n.interColumnSortOrder.concat());o!==i;)o<i?(d.indexAdded(r.qInterColumnSortOrder,o),++o):(--o,d.indexRemoved(r.qInterColumnSortOrder,o))},j=function(e){var t=e.exportFormat,r=e.initialProperties,n=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&&n?o.setValue(i,"".concat(n,".qHyperCubeDef"),t.properties.qHyperCubeDef):r.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,{},r,i)).components&&(i.components=[]),i},F=function(e){var t=e.exportFormat,r=e.maxDimensions,n=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=t.data[0];return a.dimensions.length>r&&r>0||a.measures.length>i&&i>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>n||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>o||!i&&a.measures.length>0||!r&&a.dimensions.length>0},z=function(e){var t=e.exportFormat,r=e.maxDimensions,n=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>r&&r>0||s.excludedDimensions&&s.excludedDimensions.length&&s.dimensions.length+s.excludedDimensions.length>n)&&(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=[])),!r&&s.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))},W=function(e){var t,r=e.newProperties,n=e.dataDefinition,i=e.hypercubePath;if(n.dimensions&&"function"==typeof n.dimensions.added){var a=o.getValue(r,i||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return P(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 P(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?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.qDimensions=[],s.forEach(function(e){a.qDimensions.push(e),n.dimensions.added(e,r)})}},$=function(e){var t,r=e.newProperties,n=e.dataDefinition,i=e.hypercubePath;if(n.measures&&"function"==typeof n.measures.added){var a=o.getValue(r,i||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return R(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 R(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?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.qMeasures=[],s.forEach(function(e){a.qMeasures.push(e),n.measures.added(e,r)})}},H=function(e){var t=e.measures,r=e.modifierTypes;t&&r&&f().isSupportedModifiers(r)&&t.forEach(function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store})};function V(e,t){var r=o.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!r&&(Object.keys(r).forEach(function(t){o.setValue(e,t,r[t])}),delete e.qLayoutExclude.quarantine[t],!0)}const B={exportProperties:function(e){var t=e.propertyTree,r=e.hypercubePath,n=e.viewDataMode,i=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t={data:[],properties:{}},r=0;r<e;++r)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}(),a=t.qProperty,s=o.getValue(a,r||""),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}),r&&(i.properties.qHyperCubeDef=l,delete s.qHyperCubeDef),y({exportFormat:i,properties:a}),n||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,r=e.initialProperties,n=void 0===r?{}:r,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=j({exportFormat:t,initialProperties:n,hypercubePath:u}),v=o.getValue(n,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,P=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:P}),W({newProperties:g,dataDefinition:a,hypercubePath:u}),$({newProperties:g,dataDefinition:a,hypercubePath:u}),_({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,n),m.qProperty=g;var R=o.getValue(c||{},"support.modifiers");return H({measures:y.qMeasures,modifierTypes:R}),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,r,n){t=t||[];var i=c(e,n,r),o=c(t,n,r);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 r={};return t&&Object.keys(t).forEach(function(e){r[e]=t[e]}),r.id=e,r.qAttribute=!0,r},moveByIdFromGroup:function(e,t,r,n,i){r=r||"qAttributeExpressions",i=i||"id";for(var o=0;o<e.length;o++){var a=e[o][r],s=t.length;if(U(a,t,n,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,r){if(Array.isArray(e[t])){var n=d.findIndexByPropertyValue(e[t],"id",r);n>=0&&e[t].splice(n,1)}else e[t]=[]}function te(e,t){var r=K.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach(function(e){ee(e,"qAttributeDimensions",r),ee(e,"qAttributeExpressions",r)}),t.forEach(function(e){ee(e,"qAttributeDimensions",r),ee(e,"qAttributeExpressions",r)})}function re(e,t){if(t){var r="="===t.charAt(0);e.color.altLabel=r?{qStringExpression:{qExpr:t.substr(1)}}:t}}function ne(e){var t=e.properties,r=e.isDimension,n=e.dimensions,i=e.excludedDimensions,a=e.measures,s=e.label;te(n,i);var l=n[n.length-1];if(l){var u=r?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,r=e.label,n=e.item,i=e.isDimension,o=e.qNumFormat,a=e.isCustomFormatted;t.label=r||n.label,i?t.qDef=n.key:(t.qExpression=n.key,o&&(t.qNumFormat=o,t.isCustomFormatted=a)),t.matchMeasure=n.activeMeasureIndex,t.label&&"="===t.label.charAt(0)&&(t.labelExpRef="color.altLabel")}({attributeExpression:f,label:s,item:u,isDimension:r,qNumFormat:c,isCustomFormatted:p});break;case"libraryItem":!function(e){var t=e.attributeExpression,r=e.measures,n=e.item,i=e.qNumFormat,o=e.isCustomFormatted;e.isDimension||(t.matchMeasure=d.findIndexByPropertyValue(r,"qLibraryId",n.key),i&&(t.qNumFormat=i,t.isCustomFormatted=o)),void 0!==n.expression?t.qExpression=n.expression:t.qLibraryId=n.key,t.colorMapRef=n.key}({attributeExpression:f,measures:a,item:u,isDimension:r,qNumFormat:c,isCustomFormatted:p})}r?(f.qSortBy={qSortByAscii:1},l.qAttributeDimensions.push(f)):l.qAttributeExpressions.push(f)}}}function ie(e,t,r,n){var i,o,a,s={};switch(e){case"dimension":r.qLibraryId?(s.type="dimension",s.name=r.qLibraryId,s.id=r.qLibraryId):(s.type="field",t?(s.name=r.label||r.qDef,s.id=r.qDef):(s.name=r.qDef.qFieldDefs[0],s.label=(a=r.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)}(r,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}(r,n),o&&(s.expression=o)):(s.type="expression",t?(s.name=r.label||r.qExpression,s.id=r.qExpression):(s.name=r.qDef.qDef,s.label=function(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qLabel?t.qLabel:t.qDef}(r)));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,r,n){var i=t.type,o=e.color,a=o.mode,s=X.getItemLabel(t);switch(re(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 r=o.getValue(e,"".concat(t,"qDimensions"),[]),n=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byDimDef");if(a&&re(e,a.label),function(e){return!!(e&&e.activeDimensionIndex>-1)}(a))!function(e,t){var r=o.getValue(e,"".concat(t,"qDimensions"),[]),n=o.getValue(e,"color.byDimDef");n.activeDimensionIndex=Math.min(n.activeDimensionIndex,r.length-1);var i=ie("dimension",!1,r[n.activeDimensionIndex]);i.activeDimensionIndex=n.activeDimensionIndex,ae(e,i)}(e,t);else if(function(e){return!e||!e.key}(a)&&function(e,t){var r=o.getValue(e,"".concat(t,"qDimensions"),[]),n=r[function(e,t,r){var n=o.getValue(t,"visualization"),i=r.split("."),a=Number(i[1]),s=o.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===n&&"point"===s}(r,e,t)?0:r.length-1],i=K.IDMAP.COLOR_BY_ALTERNATIVE,a=d.findItemByPropertyValue(n.qAttributeDimensions,"id",i);return ae(e,ie("dimension",!!a,a||n)),!!a}(e,t))return;ne({properties:e,isDimension:!0,dimensions:r,excludedDimensions:i,measures:n,label:o.getValue(e,"color.byDimDef.label")})}const le=function(e,t,r){o.setValue(e,t,r),o.isAtomicValue(r)&&function(e,t,r){var n=e.qLayoutExclude;n&&(n.changed||(n.changed={}),n.changed[t]={from:o.getValue(e,t),to:r})}(e,t,r)},ue=function(e,t){var r={primary:!0};if(e){var n=(Q[t]||J).colorModeOptions||J.colorModeOptions;r.byDimension=n.dimension(e),r.byMeasure=n.measure(e),r.byMultiple=n.multiColor(e),r.byExpression=n.expression(e)}return r},ce=function(e){var t=e.canColorBy,r=e.autoColor,n=e.colorMode,i=e.dimensions;return!(t[n]&&!r&&("byDimension"!==n&&"byMeasure"!==n||!i.length))},de=function(e,t){var r,n=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):!(r={auto:i,colorMode:n,dimensions:a}).auto&&"byDimension"===r.colorMode&&r.dimensions.length>0?se(e,t):function(e){var t=e.auto,r=e.colorMode,n=e.dimensions,i=e.measures,a=e.properties,s=o.getValue(a,"visualization");return!(t||"byMeasure"!==r||!n.length||"map"!==s&&!i.length)}({auto:i,colorMode:n,dimensions:a,measures:s,properties:e})?function(e,t){var r=o.getValue(e,"".concat(t,"qDimensions"),[]),n=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byMeasureDef");if(a&&re(e,a.label),function(e){return!!(e&&e.activeMeasureIndex>-1)}(a))!function(e,t){var r=o.getValue(e,"".concat(t,"qMeasures"),[]),n=o.getValue(e,"color.byMeasureDef");if(n.activeMeasureIndex=Math.min(n.activeMeasureIndex,r.length-1),n.activeMeasureIndex>-1){var i=ie("measure",!1,r[n.activeMeasureIndex],!0);i.activeMeasureIndex=n.activeMeasureIndex,ae(e,i)}}(e,t);else if(function(e,t){return(!e||!e.key)&&t.length>0}(a,n)&&function(e,t){var r=o.getValue(e,"".concat(t,"qDimensions"),[]),n=o.getValue(e,"".concat(t,"qMeasures"),[]),i=r[r.length-1],a=K.IDMAP.COLOR_BY_ALTERNATIVE,s=d.findItemByPropertyValue(i.qAttributeExpressions,"id",a);return ae(e,ie("measure",!!s,s||n[0])),!!s}(e,t))return;ne({properties:e,isDimension:!1,dimensions:r,excludedDimensions:i,measures:n,label:o.getValue(e,"color.byMeasureDef.label")})}(e,t):function(e,t){var r=o.getValue(e,"color.mode"),n=o.getValue(e,"".concat(t,"qDimensions"),[]),i=o.getValue(e,"".concat(t,"qMeasures"),[]),a=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===r&&i.length<2&&o.setValue(e,"color.mode","primary"),te(n,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,r=e.properties,n=o.getValue(r,"qHyperCubeDef.qMeasures",[]),i=o.getValue(r,"color.mode","");return!t&&"byExpression"===i&&n.length>0},he=function(e){var t=o.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),r=o.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:r,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",[]),r=o.getValue(e,"color.persistent",!1);return t.length>1&&!r},ve={exportProperties:function(e){var t=e.propertyTree,r=e.hypercubePath,n=e.viewDataMode,i=B.exportProperties({propertyTree:t,hypercubePath:r,viewDataMode:n}),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,r=e.initialProperties,n=e.dataDefinition,i=e.defaultPropertyValues,a=e.hypercubePath,s=e.extension,l=e.supportedFilters,u=e.isHCModifierSupported,c=B.importProperties({exportFormat:t,initialProperties:r,dataDefinition:n,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,r=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?V(r,"unsupportedAutoMinMax")||w()(r.measureAxis,t.measureAxis):V(r,"supportedAutoMinMax")||w()(r.measureAxis,t.measureAxis)},xe=function(e){var t,r=e.exportFormat,n=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:r,initialProperties:n})){var l=function(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach(function(e){if(e.qDef.series){var r=e.qDef.series,n=r.type,i=r.axis;t[i]||(t[i]={axis:i,type:{line:0,marker:0,bar:0,total:0}}),ye.includes(n)&&t[i].type[n]++,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,r.properties.measureAxes[t[0].axis])):w()(s,r.properties.measureAxes[0])}},Se=function(e){if(e.qDimensions.length>1){var t=e.qInterColumnSortOrder.indexOf(0);if(0!==t){var r=e.qInterColumnSortOrder[0];e.qInterColumnSortOrder[0]=0,e.qInterColumnSortOrder[t]=r}}},we={exportProperties:function(e){var t=e.propertyTree,r=e.hypercubePath,n=e.viewDataMode,i=e.supportedAutoMinMax,o=void 0===i||i,a=ve.exportProperties({propertyTree:t,hypercubePath:r,viewDataMode:n}),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,r=e.initialProperties,n=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:r,dataDefinition:n,defaultPropertyValues:i,hypercubePath:o,extension:s,supportedFilters:l,isHCModifierSupported:u}),d=c.qProperty;return be({initialProperties:r,properties:d}),xe({exportFormat:t,initialProperties:r,properties:d,measureType:a}),Se(d.qHyperCubeDef),d.qHyperCubeDef.qColumnOrder=[],d.qHyperCubeDef.columnOrder=[],c}};function Ce(e,t,r){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(r)}function Ee(e){var t=e.properties,r=e.arrayPath,n=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,r,[]).forEach(function(e){return function(e){var t=e.properties,r=e.quarantineName,n=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(r,n,l);o.setValue(t,u,s),o.setValue(i,a,void 0)}}({properties:t,quarantineName:n,arrayName:i,item:e,itemPath:a})})}function Ie(e){var t=e.properties,r=e.arrayPath,n=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,r,[]).forEach(function(e){return function(e){var t=e.properties,r=e.quarantineName,n=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,"qDef.cId");if(s){var l=Ce(r,n,s),u=o.getValue(t,l);void 0!==u&&(o.setValue(i,a,u),o.setValue(t,l,void 0))}}({properties:t,quarantineName:n,arrayName:i,item:e,itemPath:a})})}var De="qHyperCubeDef.qMeasures",Pe="conditionalColoring",Re="measures",Me="qDef.conditionalColoring";const Le={quarantine:function(e){Ee({properties:e,arrayPath:De,quarantineName:Pe,arrayName:Re,itemPath:Me})},unquarantine:function(e){Ie({properties:e,arrayPath:De,itemPath:Me,arrayName:Re,quarantineName:Pe})}};var Ae="qHyperCubeDef.qMeasures",ke="measures",Oe="qHyperCubeDef.qDimensions",qe="dimensions",Te="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",Ne="alternativeMeasures",_e="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",je="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:_e,quarantineName:ze,arrayName:je,itemPath:Fe})},unquarantineAlternative:function(e){Ie({properties:e,arrayPath:Te,quarantineName:ze,arrayName:Ne,itemPath:Fe}),Ie({properties:e,arrayPath:_e,quarantineName:ze,arrayName:je,itemPath:Fe})}},$e={hypercube:B,colorChart:ve,axisChart:we,quarantineProperty:x,unquarantineProperty:V,quarantineArrayProp:Ee,unquarantineArrayProp:Ie,conditionalColoring:Le,conditionalShow:We}})(),n.default})()}(Qj);var eF=En(Qj.exports);const tF="qHyperCubeDef.qMeasures",rF="measures",nF="qHyperCubeDef.qDimensions",iF="dimensions",oF="qDef.representation",aF="tableRepresentation",sF="qDef.conditionalColoring",lF="conditionalColoring",uF="qMiniChartDef",cF="miniChartDef",dF=e=>{eF.unquarantineArrayProp({properties:e,arrayPath:nF,itemPath:oF,arrayName:iF,quarantineName:aF}),eF.unquarantineArrayProp({properties:e,arrayPath:tF,itemPath:oF,arrayName:rF,quarantineName:aF}),eF.unquarantineArrayProp({properties:e,arrayPath:tF,itemPath:sF,arrayName:rF,quarantineName:lF}),eF.unquarantineArrayProp({properties:e,arrayPath:tF,itemPath:uF,arrayName:rF,quarantineName:cF})},pF=e=>{eF.quarantineArrayProp({properties:e,arrayPath:nF,itemPath:oF,arrayName:iF,quarantineName:aF}),eF.quarantineArrayProp({properties:e,arrayPath:tF,itemPath:oF,arrayName:rF,quarantineName:aF}),eF.quarantineArrayProp({properties:e,arrayPath:tF,itemPath:sF,arrayName:rF,quarantineName:lF}),eF.quarantineArrayProp({properties:e,arrayPath:tF,itemPath:uF,arrayName:rF,quarantineName:cF})};function fF(e){const{translator:t}=e;return{targets:[{path:"/qHyperCubeDef",dimensions:{min:1,max:1e3,description(e,r,n){const i="rows"===n?.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 hF="qHyperCubeDef.qDimensions",mF="dimensions",gF="qOtherTotalSpec.qTotalMode",vF="totalMode",yF={quarantine(e){eF.quarantineArrayProp({properties:e,arrayPath:hF,quarantineName:vF,arrayName:mF,itemPath:gF})},unquarantine(e){eF.unquarantineArrayProp({properties:e,arrayPath:hF,quarantineName:vF,arrayName:mF,itemPath:gF})}};function bF(e){const t=fF(e);return(e,r,n,i)=>{const o=eF.hypercube.importProperties({exportFormat:e,initialProperties:r,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&&$_(o,"qProperty.qLayoutExclude.quarantine.interColSortOrder",u.concat());const d=o.qProperty.qLayoutExclude.quarantine?.pivotInterColSortOrder;d?(u=d,l=[...d],$_(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&&$_(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&&(eF.unquarantineProperty(o.qProperty,"noOfLeftDims"),eF.unquarantineProperty(o.qProperty,"excludedNoOfLeftDims "))}return eF.unquarantineProperty(o.qProperty,"rankedList"),eF.conditionalShow.unquarantine(o.qProperty),yF.unquarantine(o.qProperty),dF(o.qProperty),eF.unquarantineProperty(o.qProperty,"pivotTableIndentMode"),o}}function xF(e,t){const r=e.qProperty.qHyperCubeDef.qInterColumnSortOrder,n=r.slice(),i=r.indexOf(-1);i>-1&&r.splice(i,1);const o=eF.hypercube.exportProperties({propertyTree:e,hyperCubePath:t}),a=o.properties.qHyperCubeDef,s=a.qDimensions.length,l=a.qMeasures.length;let u=a.qInterColumnSortOrder;$_(o,"properties.qLayoutExclude.quarantine.pivotInterColSortOrder",n),eF.quarantineProperty(o.properties,"qHyperCubeDef.qNoOfLeftDims","noOfLeftDims"),delete o.properties.qHyperCubeDef.qNoOfLeftDims,eF.quarantineProperty(o.properties,"qHyperCubeDef.rankedList","rankedList"),delete o.properties.qHyperCubeDef.rankedList;const c=o.properties.qLayoutExclude.quarantine?.interColSortOrder;c&&(u=c,$_(o,"properties.qHyperCubeDef.qInterColumnSortOrder",u),$_(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 eF.quarantineProperty(o.properties,"qHyperCubeDef.qIndentMode","pivotTableIndentMode"),eF.quarantineProperty(o.properties,"qHyperCubeDef.excludedNoOfLeftDims ","excludedNoOfLeftDims "),eF.conditionalShow.quarantine(o.properties),yF.quarantine(o.properties),pF(o.properties),o}const SF=e=>({dimensions:{min:1,max:1e3,description(t,r,n){const i="rows"===n?.type?"Visualizations.Descriptions.Row":"Visualizations.Descriptions.Column";return e.translator.get(i)}},measures:{min:1,max:1e3,description:()=>e.translator.get("Visualizations.Descriptions.Values")}}),wF={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}}}};let CF=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}({}),EF=function(e){return e.Attribute="attribute",e.Dimension="dimension",e}({});const IF=e=>{switch(e?.type){case"url":return CF.Link;case"image":return CF.Image;case"indicator":return CF.Indicator;case"miniChart":return CF.MiniChart;default:return CF.Text}},DF=({isImagesEnabled:e})=>({uses:"dimensionRepresentationItems.representationType",options(t,r,n){const{qIndentMode:i}=n.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}}),PF=e=>{if(e)return{representationImage:{uses:"dimensionRepresentationItems.representationImage",show:e=>IF(e.qDef.representation)===CF.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,r)=>{if(!r.properties.qHyperCubeDef)return!1;const{qInterColumnSortOrder:n,qNoOfLeftDims:i,qDimensions:o,qIndentMode:a}=r.properties.qHyperCubeDef;let s=!1;n?.indexOf(-1);const l=o?.indexOf(e)??1/0;return(n?.slice(0,i)??[]).indexOf(l)>-1&&(s=!0),s&&a}}}}}},RF=e=>{const{anything:t}=e,r=!t.sense?.isUnsupportedFeature?.("tableImages");return{representationType:DF({isImagesEnabled:r}),representationUrlPosition:{uses:"dimensionRepresentationItems.representationUrlPosition",show:e=>IF(e.qDef.representation)===CF.Link},representationUrlLabel:{uses:"dimensionRepresentationItems.representationUrlLabel",show:e=>IF(e.qDef.representation)===CF.Link&&e.qDef.representation?.urlPosition===EF.Dimension},representationLinkUrl:{uses:"dimensionRepresentationItems.representationLinkUrl",show:e=>IF(e.qDef.representation)===CF.Link&&e.qDef.representation?.urlPosition===EF.Attribute},...PF(r)}},MF=(e,t)=>{const{anything:r}=e,n=r.sense?.isUnsupportedFeature,i=!n?.("tableImages")&&t[CF.Image],o=!n?.("qMiniChartDef")&&t[CF.MiniChart],a=!n?.("tableIndicators")&&t[CF.Indicator],s=i&&t[CF.ImagesInIndentMode];return{representationType:{uses:"measureRepresentationItems.representationType",options:(e,t,r)=>(e=>{const{qIndentMode:t}=e.properties.qHyperCubeDef??{},r=[{value:"text",translation:"Object.Table.Representation.Text"}];return(!t&&i||t&&s)&&r.push({value:"image",translation:"Object.Table.Representation.Image"}),a&&r.push({value:"indicator",translation:"Object.Table.Representation.Indicator"}),o&&r.push({value:"miniChart",translation:"Common.MiniChart"}),r})(r)},representationImage:i?{uses:"measureRepresentationItems.representationImage",show:e=>IF(e.qDef.representation)===CF.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 LF=function(e){return e.Dimension="dimensions",e.Measures="measures",e.Pivot="pivot",e}({}),AF=function(e){return e.CellForegroundColor="cellForegroundColor",e.CellBackgroundColor="cellBackgroundColor",e.ImageUrl="imageUrl",e.ImageLabel="imageLabel",e.Link="url",e.LinkLabel="urlLabel",e}({}),kF=function(e){return e.TopGrid="topGrid",e.LeftGrid="leftGrid",e.DataGrid="dataGrid",e}({}),OF=function(e){return e.Forward="forward",e.Backward="backward",e.None="none",e}({});const qF="image",TF=(e,t,r)=>{if(!r.properties.qHyperCubeDef.qIndentMode)return!0;const n=r.properties.qHyperCubeDef.qInterColumnSortOrder?.indexOf(-1)??-1;let i=r.properties.qHyperCubeDef.qNoOfLeftDims??-1;n>-1&&n<i&&(i-=1);const o=r.properties.qHyperCubeDef.qDimensions.indexOf(e);return 0===o||o>=i},NF=()=>({type:{type:"string",component:"dropdown",ref:"qDef.columnWidth.type",translation:"Object.Table.Column.Width",options:[{value:ST.Auto,translation:"Common.Auto"},{value:ST.FitToContent,translation:"Object.Table.Column.FitToContent"},{value:ST.Pixels,translation:"Object.Table.Column.Pixels"},{value:ST.Percentage,translation:"Object.Table.Column.Percentage"}],defaultValue:ST.Auto},sizePixels:{ref:"qDef.columnWidth.pixels",translation:"Object.Table.Column.Pixels",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:xT.PixelsDefault,show:e=>e.qDef.columnWidth?.type===ST.Pixels},sizePercentage:{ref:"qDef.columnWidth.percentage",translation:"Object.Table.Column.Percentage",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:xT.PercentageDefault,show:e=>e.qDef.columnWidth?.type===ST.Percentage}}),_F=({key:e,translation:t,env:r})=>{const n=!r.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=>!n||"labelTextAlign"===e||t.qDef.representation?.type!==qF},[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&&(!n||"labelTextAlign"===e||t.qDef.representation?.type!==qF)}}},jF="TOTAL_OFF",FF={component:"attribute-expression-reference",defaultValue:[],ref:"qAttributeExpressions",items:[{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.BackgroundExpression",defaultValue:"",id:AF.CellBackgroundColor},{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.ForegroundExpression",defaultValue:"",id:AF.CellForegroundColor},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:AF.LinkLabel,tid:"URLLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:AF.Link,tid:"URLByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:AF.ImageLabel,tid:"ImageLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:AF.ImageUrl,tid:"ImageUrlByExpression",show:!1}]},zF="TOTAL_OFF",WF={component:"attribute-expression-reference",defaultValue:[],ref:"qAttributeExpressions",items:[{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.BackgroundExpression",defaultValue:"",id:AF.CellBackgroundColor},{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.ForegroundExpression",defaultValue:"",id:AF.CellForegroundColor},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:AF.LinkLabel,tid:"URLLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:AF.Link,tid:"URLByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:AF.ImageLabel,tid:"ImageLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:AF.ImageUrl,tid:"ImageUrlByExpression",show:!1}]},$F=e=>{const{translator:t,anything:r,flags:n}=e,i=(e=>{const{translator:t,anything:r}=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:jF,trueOption:{value:"TOTAL_EXPR",translation:"properties.on"},falseOption:{value:jF,translation:"properties.off"},show:!r.sense?.isUnsupportedFeature?.("totals")&&TF},totalsLabel:{type:"string",component:"expression",expressionType:"StringExpr",ref:"qTotalLabel",translation:"properties.totals.label",defaultValue:()=>t.get("Object.Table.Totals"),show:(e,t,n)=>!r.sense?.isUnsupportedFeature?.("totals")&&e.qOtherTotalSpec?.qTotalMode!==jF&&TF(e,0,n)},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:FF,..._F({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),..._F({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...RF(e),...NF()}}}},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:FF,..._F({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),..._F({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...MF(e,{[CF.Image]:!0,[CF.Indicator]:!0}),...NF()}}}},filter:{type:"object",component:"filter-item-react",ref:"filter",tabName:"SimpleProperties.Filters.Filters"}}}})(e);return n.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:zF,trueOption:{value:"TOTAL_EXPR",translation:"properties.on"},falseOption:{value:zF,translation:"properties.off"},show:!r.sense?.isUnsupportedFeature?.("totals")&&TF},totalsLabel:{type:"string",component:"expression",expressionType:"StringExpr",ref:"qTotalLabel",translation:"properties.totals.label",defaultValue:()=>t.get("Object.Table.Totals"),show:(e,t,n)=>!r.sense?.isUnsupportedFeature?.("totals")&&e.qOtherTotalSpec?.qTotalMode!==zF&&TF(e,0,n)},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:WF,..._F({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),..._F({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...RF(e),...NF()}},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:WF,..._F({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),..._F({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...MF(e,{[CF.Image]:!0,[CF.ImagesInIndentMode]:!0,[CF.Indicator]:!0}),...NF()}},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"}}}}}},HF=(e,t,r,n)=>({ref:e,translation:t,dualOutput:!0,type:"object",component:"color-picker",width:"auto",disableNone:n??!1,defaultValue(e,t,i){const o=n?.(e,t,i)??!1,a=i.theme.current(),s=r(a,o);return{color:"transparent"===s?"none":s}}}),VF=(e,t=!1)=>{return{value:e,label:t?(r=e,r.charAt(0).toUpperCase()+r.slice(1)):e,groupHeader:!1,disabled:!1,styles:t?{fontFamily:e}:void 0};var r},BF=({ref:e,themeAccessor:t,translator:r,flags:n})=>({component:"dropdown",ref:e,options:(e,i,o)=>{const a=o.theme.current();return((e,t,r,n)=>{const i=t.fontFamily??"Source Sans Pro, sans-serif",o=t.fontFamilies??[],a=Array.from(new Set([e,i,...o])),s=[{value:"ThemeHeader",label:r.get("properties.themeFonts"),metaText:r.get("properties.theme"),groupHeader:!0},...a.sort().map(e=>VF(e,!0))],l=[{value:"DefaultHeader",label:r.get("properties.allFonts"),metaText:r.get("properties.default"),groupHeader:!0},..._N(n).filter(e=>!a.includes(e)).map(e=>VF(e,!0))];return[...s,...l.length>1?l:[]]})(t(a),a,r,n)},defaultValue:(e,r,n)=>t(n.theme.current())}),GF=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],UF=({ref:e,themeAccessor:t,translator:r})=>({component:"dropdown",ref:e,options:(e,n,i)=>{const o=i.theme.current();return((e,t,r)=>{const n=t.fontSize,i=t.fontSizes??[],o=Array.from(new Set([e,n,...i])),a=[{value:"ThemeHeader",label:r.get("properties.themeFontSizes"),metaText:r.get("properties.theme"),groupHeader:!0},...o.sort((e,t)=>parseInt(e,10)-parseInt(t,10)).map(e=>VF(e,!1))],s=[{value:"DefaultHeader",label:r.get("properties.allFontSizes"),metaText:r.get("properties.default"),groupHeader:!0},...GF.filter(e=>!o.includes(e)).map(e=>VF(e,!1))];return[...a,...s.length>1?s:[]]})(t(o),o,r)},defaultValue:(e,r,n)=>t(n.theme.current())}),YF=({section:e,defaultFontStyle:t,translator:r,flags:n,getThemeValue:i,translation:o,disableNoneCallback:a})=>({component:"panel-section",translation:o??`properties.pivot.${e}`,items:{content:{component:"items",ref:"components",key:"theme",items:{fontFamily:BF({ref:`${e}.fontFamily`,themeAccessor:t=>i(t,e,"fontFamily")??t.fontFamily,translator:r,flags:n}),fontWrapperItem:{component:"inline-wrapper",items:{fontStyle:{component:"font-style-buttons",width:!1,ref:`${e}.fontStyle`,defaultValue:t??[]},fontSize:UF({ref:`${e}.fontSize`,themeAccessor:t=>i(t,e,"fontSize")??t.fontSize,translator:r}),fontColor:HF(`${e}.fontColor`,void 0,t=>i(t,e,"color")??t.color)}},background:HF(`${e}.background`,"properties.background",(t,r)=>{const n=r?aN.WHITE:aN.TRANSPARENT;return i(t,e,"backgroundColor")??n},a)}}}}),KF=({section:e,defaultFontStyle:t,fallbackBackground:r,getThemeValue:n})=>({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:HF(`${e}.fontColor`,void 0,t=>n(t,e,"color")??t.color)}},background:HF(`${e}.background`,"properties.background",t=>n(t,e,"backgroundColor")??r??"transparent")}}}}),XF=(e,t)=>({component:"dropdown",ref:e,translation:t,options:[...Array(10).keys()].map(e=>({value:e+1,translation:e+1})),defaultValue:1}),JF="12px",ZF="Source Sans Pro, sans-serif",QF="600",ez=15e3,tz=4/3;let rz=function(e){return e.Transparent="transparent",e.FontSecondary="#737373",e.DividerDark="#595959",e.DividerLight="#D9D9D9",e.NullValueBackground="#F2F2F2",e}({}),nz=function(e){return e.Solid="solid",e.None="none",e}({});const iz={display:"flex",justifyContent:"center",alignItems:"center"},oz={borderStyle:"solid"},az={boxSizing:"border-box",padding:"4px 8px",userSelect:"none",WebkitUserSelect:"none"},sz={lineHeight:tz,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},lz=e=>({whiteSpace:"unset",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",wordBreak:e>1?"break-word":"break-all"}),uz=(e,t)=>e>0?`${e}px ${nz.Solid} ${t}`:nz.None,cz=(e,t,r,n,i)=>{const o=Number(!t||i?.right),a=Number(!e||i?.bottom);return{borderRight:"rtl"!==n?uz(o,r):nz.None,borderBottom:uz(a,r),borderLeft:"rtl"===n?uz(o,r):nz.None,borderTop:nz.None}},dz=(e,t,r,n,i,o,a)=>{const s=cz(t,n,i,o,a);return e.isLeftDimension||(e.isLastDimension&&!t&&(s.borderBottom=uz(2,i)),r||(s.borderLeft="rtl"!==o?uz(1,i):"none",s.borderRight="rtl"===o?uz(1,i):"none")),s},pz=({bottomDivider:e,rightDivider:t,borderColor:r})=>{const n={};return e&&(n.borderBottom=uz(1,r)),t&&(n.borderRight=uz(1,r)),n},fz=(e,t,r)=>{switch(t){case"header":return e.object?.pivotTableV2?.dimension?.label?.name?.[r];case"dimensionValues":return e.object?.pivotTableV2?.dimension?.label?.value?.[r];case"measureLabels":return e.object?.pivotTableV2?.measure?.label?.name?.[r];case"measureValues":return e.object?.pivotTableV2?.measure?.label?.value?.[r];case"totalValues":return e.object?.pivotTableV2?.total?.label?.value?.[r];case"nullValues":return e.object?.pivotTableV2?.null?.label?.value?.[r];default:return}},hz=(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:YF({section:"header",defaultFontStyle:["bold"],translator:e,flags:t,getThemeValue:fz}),dimensionValueSection:YF({section:"dimensionValues",translator:e,flags:t,getThemeValue:fz}),measureValueSection:YF({section:"measureValues",translator:e,flags:t,getThemeValue:fz}),measureLabelSection:KF({section:"measureLabels",getThemeValue:fz}),totalValuesSection:KF({section:"totalValues",defaultFontStyle:["bold"],getThemeValue:fz}),nullValuesSection:KF({section:"nullValues",fallbackBackground:rz.NullValueBackground,getThemeValue:fz}),gridSection:{translation:"properties.pivot.grid",component:"panel-section",items:{gridItems:{component:"items",ref:"components",key:"theme",items:{lineClamp:XF("grid.lineClamp","ThemeStyleEditor.style.rowHeight"),columnLineClamp:XF("grid.columnLineClamp","ThemeStyleEditor.style.columnHeight"),border:HF("grid.border","properties.border",e=>e.object?.pivotTableV2?.grid?.borderColor??rz.DividerLight),divider:HF("grid.divider","properties.pivot.divider",e=>e.object?.pivotTableV2?.grid?.divider?.borderColor??rz.DividerDark),background:HF("grid.background","properties.background",e=>e.object?.pivotTableV2?.grid?.backgroundColor??rz.Transparent)}}}}}}]}),mz=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}}},gz=(e,t)=>({uses:"settings",items:{presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:[hz(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:ST.Auto,translation:"Common.Auto"},{value:ST.Pixels,translation:"Object.Table.Column.Pixels"},{value:ST.Percentage,translation:"Object.Table.Column.Percentage"}],defaultValue:ST.Auto,show:e=>!!e.qHyperCubeDef.qIndentMode},sizePixels:{ref:"qHyperCubeDef.indentModeColumnWidth.pixels",translation:"Object.Table.Column.Pixels",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:xT.PixelsDefault,show:e=>{const t=e.qHyperCubeDef;return t.qIndentMode&&t.indentModeColumnWidth?.type===ST.Pixels}},sizePercentage:{ref:"qHyperCubeDef.indentModeColumnWidth.percentage",translation:"Object.Table.Column.Percentage",component:"expression",expressionType:"ValueExpression",expression:"optional",defaultValue:xT.PercentageDefault,show:e=>{const t=e.qHyperCubeDef;return t.qIndentMode&&t.indentModeColumnWidth?.type===ST.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,r,n){e.qHyperCubeDef.qExpansionState=[],n.$emit("saveProperties",e)}}}}]},...mz(t)}}),vz="auto",yz={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:vz,translation:"Object.Table.SortingInSearch",options:[{value:vz,translation:"Common.Auto"},{value:"inherit",translation:"Object.Table.SortingInSearch.InheritFromDimension"}]}}};function bz(e){const{translator:t,flags:r}=e;return{type:"items",component:"accordion",items:{data:$F(e),sorting:yz,addons:wF,settings:gz(t,r)}}}function xz(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:bz(e),importProperties:bF(e),exportProperties:xF,exploration:Oj(e),data:SF(e),propertyHandler:e.flags.isEnabled("VNA-147_NEBULA_PIVOT_DATA_HANDLERS")?t=>new Zj(t,e.translator):void 0}}const Sz=()=>{let e;return{promise:new Promise(t=>{e=t}),resolve:e}};function wz(e,t){return R(()=>e,t)}const Cz={},Ez=e=>{const t=R(()=>({current:Cz}),[]);return t.current=t.current===Cz?e:t.current,t},Iz=e=>!!e&&0===xN(e).a,Dz="#grid",Pz=(e,t)=>{const r=t?.closest(e);return r&&window.getComputedStyle(r).backgroundColor},Rz=(e,t,r,n,i)=>{const o=Pz(".qv-object .qv-inner-object",r),a=Pz(".qv-panel-sheet",r),s=Pz(Dz,r)??a,l=(e=>{const t=e.components?.find(e=>"general"===e.key),r=t?.bgColor?.colorExpression,n=t?.bgColor?.color?.color,i=t?.bgColor?.useColorExpression;if(i&&r)return tj(r);if("none"===n)return"transparent";if(void 0===n)return;const o=xN(n);return o.setAlpha(t?.bgColor?.color?.alpha??o.a),o.getRGBA()})(e),u=n?.(t),c=i?.(t),d=l||u||o||c,p=Iz(d),f=!Iz(h=p?s:d)&&Z_(h,aN.TEXT,aN.DARK_MODE_TEXT)===mN(aN.DARK_MODE_TEXT);var h;const m=((e,t,r,n=aN.WHITE)=>e&&!Iz(e)?e:Iz(t)?r&&!Iz(r)?r:n:t)(l,d,s);return{color:d,headerColor:m,isDark:f}},Mz=(e,t,r,n)=>{const i=O(),o=((e,t={attributeFilter:["style"],childList:!1,subtree:!1})=>{const[r,n]=A([]);return k(()=>{let r;return e&&(r=new MutationObserver(e=>{n(e)}),r.observe(e,t)),()=>{r?.disconnect()}},[e,t]),r})(t.closest(Dz),{attributeFilter:["style"],childList:!1,subtree:!1,attributeOldValue:!0}).filter(({oldValue:e})=>e?.includes("background")).map(({oldValue:e})=>e).join(",");return R(()=>({...i,background:Rz(e,i,t,r,n)}),[i.name(),t,r,n,e,o])};function Lz(e,t){const r=R(()=>({isLoading:!0}),t),[n,i]=L(async()=>{try{return await e()}finally{r.isLoading=!1}},t);return[n,r.isLoading,i]}const Az=3,kz=/\n/g;function Oz(e,t,r){let n=0,i=e.length;if(Number.isNaN(t))return null;if(e.length<=1)return null;if(r(e)<=t)return null;for(;n<=i;){const o=Math.floor((n+i)/2),a=e.slice(0,o),s=e.slice(0,o-1),l=r(a),u=r(s);if(l>t&&u<=t)return e.slice(o-1)||null;if(l===t)return e.slice(o)||null;l<t?n=o+1:i=o}return null}function qz({fontSize:e="12px",fontFamily:t="Source Sans Pro, Arial, sans-serif",fontStyle:r="normal",fontWeight:n="normal"},i){const{maxNbrLinesOfText:o=Az,allowLineBreaks:a=!0}=i??{},{estimateWidth:s,measureText:l,estimateLineCount:u}=v(()=>(({fontSize:e="12px",fontFamily:t="Source Sans Pro, Arial, sans-serif",fontStyle:r="normal",fontWeight:n="normal"},i)=>{const{maxNbrLinesOfText:o=Az,allowLineBreaks:a=!0}=i??{};return()=>{const i=document.createElement("canvas").getContext("2d");i.font=`${r} ${n} ${e} ${t}`;const s=i.measureText.bind(i),l=H_(e=>{if(void 0===e)return 0;if(a){const t=e.split(kz).map(e=>s(e).width);return t.reduce((e,t)=>t>e?t:e,0)}const t=e.replace(kz," ");return s(t).width}),u=e=>+l(e).toFixed(2),c=H_(({text:e,maxWidth:t,isNumeric:r=!1})=>{if(r)return 1;const n=a?e.split(kz):[e];let i=0;for(const e of n){let r=e;do{i+=1,r=Oz(r,t,u)}while(null!==r&&i<o);if(i>=o)break}return i},({text:e,maxWidth:t,isNumeric:r})=>`${e}-${t}-${r?"true":"false"}`);return{measureText:e=>l(e),estimateWidth:e=>l("N")*e,estimateLineCount:c}}})({fontStyle:r,fontWeight:n,fontSize:e,fontFamily:t},{maxNbrLinesOfText:o,allowLineBreaks:a})(),[r,n,e,t,o,a]);return{estimateWidth:s,measureText:l,estimateLineCount:u}}var Tz,Nz=E;Tz=Nz.createRoot,Nz.hydrateRoot;const _z="Source Sans Pro, sans-serif";function jz(e,t){const[r,n]=m(t);r.some((e,r)=>e!==t[r])&&(n(t),e())}var Fz={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 zz=({translator:e})=>(v(()=>{!function(e){if(e&&e.get&&e.add){const t="NebulaTableUtils.MenuGroupLabel.Sorting";if(e.get(t)!==t)return;Object.keys(Fz).forEach(t=>{e.add(Fz[t])})}}(e)},[e]),e),Wz={width:"100%",height:"100%",color:"transparent",background:"transparent",borderColor:"transparent"},$z={border:0,boxShadow:"none",borderRadius:0,outline:0,width:0,height:0,background:"transparent",cursor:"pointer",visibility:"hidden"},Hz=fl("input",{shouldForwardProp:e=>"isLastColumn"!==e&&"hoverColor"!==e})(({isLastColumn:e,hoverColor:t,dir:r})=>({position:"absolute",display:"flex",height:"100%",top:0,marginLeft:"-4px",marginRight:"rtl"===r?"-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":{...Wz},"&::-moz-range-track":{...Wz},"&::-ms-track":{...Wz},"&::-webkit-slider-thumb":{appearance:"none",WebkitAppearance:"none",...$z},"&::-moz-range-thumb":{...$z},"&::-ms-thumb":{...$z},"&: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"}})),Vz=({columnWidth:e,keyValue:t,isLastColumn:r,isPivot:n,hoverColor:i,updateWidthCallback:o,confirmWidthCallback:a,handleBlur:s,setIsAdjustingWidth:u,isLeftColumn:c,accessibilityRelatedArgs:d,direction:p="ltr"})=>{const f=zz({translator:d.translator}),h=l({initWidth:e,columnWidth:e,initX:0}),m=r?0:1,g=n&&!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}};jz(()=>{g&&b()},[e]);const x=e=>{const t=Math.max(e,xT.PixelsMin);h.current.columnWidth=t,o(t)},S=()=>{if(h.current.columnWidth!==h.current.initWidth){const e={type:ST.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=>{rj(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=>{rj(e),document.removeEventListener("touchmove",E),document.removeEventListener("touchend",I),S()},D=!n&&s?e=>{if(e.key===yT.Left||e.key===yT.Right){rj(e);const t=5,r=e.key===yT.Left?t:-t,n="rtl"===p?r:-r;u?.(!0),x(h.current.columnWidth+n)}else e.key===yT.Space||e.key===yT.Enter?(rj(e),s(e),u?.(!1),S()):e.key===yT.Esc&&(rj(e),s(e),u?.(!1),x(h.current.initWidth))}:void 0,P=f.get("NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",[String(d.columnLabel)]);return io.jsx(Hz,{style:y,hoverColor:i,isLastColumn:r,className:bT,"data-testid":bT,onMouseDown:e=>{rj(e),document.addEventListener("mousemove",w),document.addEventListener("mouseup",C),u?.(!0),b(e.clientX)},onDoubleClick:()=>{a({type:ST.FitToContent})},onTouchStart:e=>{1===e.touches.length&&(rj(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":P,"aria-valuemin":xT.PixelsMin,"aria-valuemax":xT.PixelsMax,"aria-valuenow":Number(e.toFixed(1)),dir:p},t)},Bz=x((e,t)=>io.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:io.jsx("path",{d:"M15 4H1V2h14zm0 10H1v-2h14zm0-5H1V7h14z"})})),Gz=fl(Qu,{shouldForwardProp:e=>"rightAligned"!==e&&"shouldShowMenuIcon"!==e&&"isAccessibleHeader"!==e})(({rightAligned:e,shouldShowMenuIcon:t,isAccessibleHeader:r})=>({...e?{marginRight:"auto"}:{marginLeft:"auto"},height:r?24:void 0,display:t?"flex":"none",fontWeight:"bold",width:r?"100%":void 0,alignItems:"center",justifyContent:"center"})),Uz=fl(Bz,{shouldForwardProp:e=>"isInteractionsActive"!==e})(({isInteractionsActive:e})=>({minWidth:"unset",position:"relative",cursor:e?"pointer":"default"})),Yz=fl(hp)(({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}})),Kz=fl(Uc)(({theme:e})=>({"&.MuiDivider-root":{margin:e.spacing(.5)}})),Xz=fl(bp)(({theme:e})=>({fontSize:"12px",height:24,fontWeight:"bold",padding:`${e.spacing(.25,2)} !important`,marginBottom:e.spacing(.5)})),Jz=fl(bp,{shouldForwardProp:e=>"isSubMenu"!==e&&"isActive"!==e})(({theme:e,isSubMenu:t,isActive:r})=>({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:r?"rgba(0, 0, 0, 0.05)":"transparent"})),Zz=fl("div",{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})(({theme:e,direction:t,isPagination:r})=>({position:"absolute",width:e.spacing(.5),height:16,left:0,right:r||"rtl"!==t?void 0:0,top:"50%",transform:"TranslateY(-50%)",borderRadius:"0 2px 2px 0",background:"#01873d"})),Qz=fl("div")(()=>({display:"flex",justifyContent:"space-between",alignItems:"center",maxWidth:"100%"})),eW=fl(mu)(()=>({fontFamily:'"Source Sans Pro", HelveticaNeue, "Helvetica Neue", Helvetica, Arial, sans-serif',fontSize:"14px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"})),tW=fl(Wd,{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})(({theme:e,direction:t,isPagination:r})=>({width:16,minWidth:"unset !important",marginRight:r||"rtl"!==t?e.spacing(1.5):0,marginLeft:r||"rtl"!==t?void 0:e.spacing(1.5),lineHeight:0})),rW=x((e,t)=>io.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:io.jsx("path",{d:"M8.5 8 4 3.5 5.5 2l6 6-6 6L4 12.5z"})})),nW=e=>{const t=e.nextElementSibling;return t?"HR"===t.tagName?nW(t):t:e.parentElement?.children?.[0]},iW=e=>{const t=e.previousElementSibling;if(!t){const t=e.parentElement?.children?.length;return e.parentElement?.children?.[t-1]}return"HR"===t.tagName?iW(t):t},oW=e=>{const{key:t,currentTarget:r}=e,n=document.activeElement??r;if(t===yT.Down||t===yT.Up){const r=e=>t===yT.Down?nW(e):iW(e);e.preventDefault(),e.stopPropagation();let i=r(n);for(;i;){if("true"!==i.ariaDisabled){i.focus();break}i=r(i)}}},aW=(e,t)=>e.map(e=>e.map(e=>({...e.groupHeading?{groupHeading:e.groupHeading}:{},items:e.items.map(({onClick:e,...r})=>({...r,...e?{onClick:async r=>{Object.entries(t).forEach(([,e])=>{e(!1)}),await e(r)}}:{}}))})));let sW={};const lW=({autoFocus:e,id:t,onClick:n,itemTitle:i,icon:o,enabled:a,subMenus:s,isSubMenu:l,isActive:u,direction:c,isPagination:d})=>{const[p,h]=m(!1),g=r.useRef(null),v=f(e=>{e.stopPropagation(),h(!1)},[h]);return io.jsxs(io.Fragment,{children:[io.jsxs(Jz,{ref:s?g:null,"data-testid":`menu-item-${t}`,className:"nebula-table-utils-head-menu-item",onClick:async e=>{"keyup"!==e.type&&(n&&(await n(e),sW={}),s?.length&&(h(!0),sW[i]=h,e.stopPropagation()))},disabled:!a,autoFocus:e,isSubMenu:!!l,isActive:!!u,onKeyDown:oW,children:[u?io.jsx(Zz,{direction:c,isPagination:d}):null,io.jsxs(Qz,{children:[io.jsx(tW,{direction:c,isPagination:d,children:io.jsx(o,{})}),io.jsx(eW,{variant:"body2",children:i})]}),s?.length?io.jsx(rW,{}):null]},t),s?.length?io.jsx(pW,{isSubMenu:!0,open:p,anchorEl:g.current,onClose:v,menuGroups:aW(s,sW),transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},direction:c,isPagination:d}):null]})},uW=({menuGroup:e,isSubMenu:t,direction:r,isPagination:n})=>e.map(e=>[[e.groupHeading&&io.jsx(Xz,{disabled:!0,style:{opacity:1},children:e.groupHeading},e.groupHeading),e.items.map(e=>io.jsx(lW,{...e,isSubMenu:t,direction:r,isPagination:n},e.id))].filter(Boolean)]),cW=({itemGroups:e,isSubMenu:t,direction:r,isPagination:n})=>e.map((i,o)=>[uW({menuGroup:i,isSubMenu:t,direction:r,isPagination:n}),o<e.length-1?io.jsx(Kz,{"data-testid":"group-divider",variant:"middle"}):void 0]),dW={appear:0,enter:0,exit:0},pW=({anchorEl:e,open:t,onClose:r,menuGroups:n,transformOrigin:i,anchorOrigin:o,isSubMenu:a,direction:s,isPagination:l})=>n.length?io.jsx(Yz,{className:"nebula-table-utils-head-menu",open:t,anchorEl:e,onClose:r,transitionDuration:dW,MenuListProps:{id:"nebula-table-utils-head-menu-list-id"},...o?{anchorOrigin:o}:{},...i?{transformOrigin:i}:{},dir:s,children:cW({itemGroups:n,isSubMenu:a,direction:s,isPagination:l})}):null,fW=(e,t)=>e.some(e=>t[e]>0),hW={canSelectAll:!1,canClearSelections:!1,canSelectPossible:!1,canSelectAlternative:!1,canSelectExcluded:!1},mW=({open:e,qStateName:t="$",headerData:r,app:n})=>{const[i,o]=m(null),[a,s]=m(hW);return jz(()=>{e||(s(hW),o(null))},[e]),d(()=>{if(!n?.createSessionObject||!r.isDim||!e)return()=>{};let i,a=!1;const l=()=>{i&&n.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,r),u=await n.createSessionObject(e),c=await u.getLayout(),{qStateCounts:d}=c.qListObject?.qDimensionInfo??{};i=c.qInfo?.qId,a?l():(o(u),d&&s((e=>({canSelectAll:fW(["qOption","qAlternative","qExcluded","qDeselected"],e),canClearSelections:fW(["qSelected"],e),canSelectPossible:fW(["qOption"],e),canSelectAlternative:fW(["qAlternative"],e),canSelectExcluded:fW(["qAlternative","qExcluded"],e)}))(d)))}catch(e){console.error(e)}})(),()=>{a=!0,l()}},[e,n,r,t]),{fieldInstance:i,selectionActionsEnabledStatus:a}},gW=x((e,t)=>io.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:io.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"})})),vW=x((e,t)=>io.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:io.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"})})),yW=x((e,t)=>io.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:io.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"})})),bW=x((e,t)=>io.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:io.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"})})),xW=x((e,t)=>io.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:io.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"})})),SW=x((e,t)=>io.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:io.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"})})),wW=x((e,t)=>io.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:io.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"})})),CW=x((e,t)=>io.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:io.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"})})),EW=x((e,t)=>io.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:io.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"})})),IW=x((e,t)=>io.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:io.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"})})),DW=x((e,t)=>io.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:io.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"})})),PW=x((e,t)=>io.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:io.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"})})),RW=x((e,t)=>io.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:io.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 MW=function(e){return e.Sorting="sorting",e.Searching="searching",e.Selections="selections",e.AdjusterHeaderSize="adjustHeaderSize",e}({});const LW="/qListObjectDef",AW=({headerData:e,translator:t,menuAvailabilityFlags:r,setOpen:n,sortFromMenu:i,interactions:o,embedListbox:a,fieldInstance:s,selectionActionsEnabledStatus:l,anchorRef:u,focusColumnAdjuster:c,setActiveFieldCallback:d,expandOrCollapseArgs:p})=>{const f=[];if(r[MW.Sorting]){const{isActivelySorted:r,sortDirection:o}=e,{ascendingEnabled:a,descendingEnabled:s}=(({isActivelySorted:e,sortDirection:t,isPivot:r,isSortedByFirstMeasure:n})=>{let i=!r&&!e||"D"===t,o=!r&&!e||"A"===t;return n&&(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")),n(!1)},icon:gW,enabled:a,isActive:!!r&&"A"===o,autoFocus:a},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortDescending"),onClick:async e=>{e.stopPropagation(),await(i?.(e,"D")),n(!1)},icon:bW,enabled:s,isActive:!!r&&"D"===o,autoFocus:!a&&s}]}])}if(e.isCyclic&&d){const t=[];t.push([{items:[{id:1,itemTitle:e.groupDimensionLabels[e.groupDimensionPos],enabled:!0,icon:wW,subMenus:[[{items:e.groupDimensionLabels.map((t,r)=>({id:r+1,itemTitle:t,onClick:async e=>{e.stopPropagation(),n(!1),d(r)},enabled:!0,icon:dj,isActive:e.groupDimensionPos===r}))}]]}]}]),t.length>0&&f.push(...t)}if(e.isDim&&o?.select){const i=[];r[MW.Searching]&&i.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Search"),onClick:e=>{e.stopPropagation(),n(!1),a()},icon:CW,enabled:!0}]}]),!e.isLocked&&r[MW.Selections]&&i.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Selections"),icon:RW,enabled:!!s,subMenus:[[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAll"),onClick:async e=>{e.stopPropagation(),n(!1),await(s?.selectListObjectAll(LW))},icon:EW,enabled:l.canSelectAll},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectPossible"),onClick:async e=>{e.stopPropagation(),n(!1),await(s?.selectListObjectPossible(LW))},icon:PW,enabled:l.canSelectPossible},{id:3,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAlternative"),onClick:async e=>{e.stopPropagation(),n(!1),await(s?.selectListObjectAlternative(LW))},icon:IW,enabled:l.canSelectAlternative},{id:4,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectExcluded"),onClick:async e=>{e.stopPropagation(),n(!1),await(s?.selectListObjectExcluded(LW))},icon:DW,enabled:l.canSelectExcluded}]}],[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.ClearSelections"),onClick:async e=>{e.stopPropagation(),n(!1),await(s?.clearSelections(LW))},icon:vW,enabled:l.canClearSelections}]}]]}]}]),p&&!p.alwaysFullyExpanded&&f.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Expand"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),n(!1),await p.expandCallback()},icon:SW,enabled:!0},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Collapse"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),n(!1),await p.collapseCallback()},icon:xW,enabled:!0}]}]),i.length>0&&f.push(...i)}return r[MW.AdjusterHeaderSize]&&f.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.AdjustColumnSize"),onClick:e=>{e.stopPropagation(),e.preventDefault(),n(!1),c?.(u)},icon:yW,enabled:!0}]}]),f},kW=({open:e,setOpen:t,anchorRef:r,headerData:n,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=mT})=>{const x=l(null),S=zz({translator:i}),{qLibraryId:w,fieldId:C,headTextAlign:E}=n,I=d?.app,{fieldInstance:D,selectionActionsEnabledStatus:P}=mW({open:e,headerData:n,app:I,qStateName:d?.qStateName}),R=(({model:e,headerData:t})=>{if(e&&"setActiveField"in e&&void 0!==t.dimensionInfoIndex){const r=t.dimensionInfoIndex;return async t=>{try{await e.setActiveField("/qHyperCubeDef",r,t)}catch(e){console.error(e)}}}return null})({model:m,headerData:n}),M=(({qLibraryId:e,fieldId:t,searchRelatedArgs:r,selectionRelatedArgs:n,direction:i,onPopoverClose:o})=>f(()=>{const a=e?{qLibraryId:e,type:"dimension"}:t;if(r?.embed){const{embed:e,listboxRef:t}=r;e.__DO_NOT_USE__.popover(t.current,a,{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"rtl"===i?"right":"left"},sortCriteria:r.sortCriteria,stateName:n?.qStateName,direction:i,onPopoverClose:o})}},[e,t,r,n?.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?io.jsxs(Gz,{rightAligned:"right"===E,shouldShowMenuIcon:s,className:"nebula-table-utils-head-menu-wrapper",onClick:!1===y?A:void 0,ref:x,isAccessibleHeader:y,children:[s?io.jsx(Uz,{height:b,className:gT,"data-testid":gT,isInteractionsActive:o.active??!1,children:io.jsx(Bz,{})}):null,io.jsx(pW,{open:e,anchorEl:!1===y?x.current:r.current,onClose:L,menuGroups:AW({headerData:n,translator:S,menuAvailabilityFlags:a,setOpen:t,...u,embedListbox:M,interactions:o,fieldInstance:D,selectionActionsEnabledStatus:P,anchorRef:r,focusColumnAdjuster:p?.focusColumnAdjuster,setActiveFieldCallback:R,expandOrCollapseArgs:h}),direction:g,isPagination:v})]}):null},OW=e=>e.isDark?{background:e.color,borderColor:aN.DARK_MODE_BORDER,color:aN.DARK_MODE_TEXT,disabledColor:aN.DARK_MODE_DISABLED,iconColor:aN.DARK_MODE_TEXT}:{background:e.color,borderColor:aN.BORDER_MEDIUM,color:aN.TEXT,disabledColor:aN.DISABLED},qW=fl(Qu,{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}`})),TW=fl(Qp,{shouldForwardProp:e=>"footerStyle"!==e})(({footerStyle:e,theme:t})=>({background:"inherit",marginRight:t.spacing(1),color:e.color,"& .MuiNativeSelect-icon, .MuiNativeSelect-select":{color:e.iconColor}})),NW=fl(uc,{shouldForwardProp:e=>"disabledCondition"!==e&&"footerStyle"!==e})(({disabledCondition:e,footerStyle:t,theme:r})=>({color:e?t.disabledColor:t.color,cursor:e?"default":"pointer",marginLeft:r.spacing(1)})),_W=fl(mu)(({theme:e})=>({color:"inherit",margin:e.spacing(0,1,0,1)})),jW=({children:e,footerContainer:t,interactions:r,theme:n,paginationNeeded:i=!0})=>{const o=v(()=>OW(n.background),[n]);if(!r.active)return null;const a=i?io.jsx(qW,{footerStyle:o,children:e}):null;return t?E.createPortal(e,t):a},FW=u({}),zW=()=>h(FW),WW=({children:e,direction:t,pageInfo:r,handleChangeRowsPerPage:n,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(()=>OW(p.background),[p]),x=i?i.getBoundingClientRect().width:h.width,S=zz({translator:d}),w=v(()=>({direction:t,pageInfo:r,handleChangeRowsPerPage:n,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,r,n,i,o,a,s,l,u,c,S,p,f,h,m,b,y,x,g]);return io.jsx(FW.Provider,{value:w,children:e})};let $W=function(e){return e.FirstPage="FirstPage",e.LastPage="LastPage",e.NextPage="NextPage",e.PreviousPage="PreviousPage",e}({}),HW=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 VW=x((e,t)=>io.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:io.jsx("path",{d:"m7 8 4.5 4.5L10 14 4 8l6-6 1.5 1.5z"})})),BW=x((e,t)=>io.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:io.jsx("path",{d:"m12 2 1.5 1.5L9 8l4.5 4.5L12 14 6 8zM4 2v12H2V2z"})})),GW=x((e,t)=>io.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:io.jsx("path",{d:"m3.5 2 6 6-6 6L2 12.5 6.5 8 2 3.5zM14 2v12h-2V2z"})})),UW={FirstPage:BW,PreviousPage:VW,NextPage:rW,LastPage:GW,FirstPageRTL:GW,PreviousPageRTL:rW,NextPageRTL:VW,LastPageRTL:BW},YW=({disabledCondition:e,pageNumber:t,type:r})=>{const{direction:n,footerStyle:i,handleChangePage:o,translator:a,interactions:s,tabIndex:l}=zW(),u=r.concat("rtl"===n?"RTL":""),c=UW[u];return{styledProps:{footerStyle:i,disabledCondition:e,size:"small","data-testid":"pagination-action-icon-button","aria-disabled":e,"aria-label":a.get(`NebulaTableUtils.Pagination.${r}`),title:s.passive?a.get(`NebulaTableUtils.Pagination.${r}`):void 0,tabIndex:l,onClick:e?void 0:()=>{o(t)}},IconComponent:c}},KW=()=>{const{pageInfo:e,width:t,interactions:r,visibilityThreshold:n}=zW(),i=0===e.page,{IconComponent:o,styledProps:a}=YW({type:$W.FirstPage,disabledCondition:i,pageNumber:0});return t<=(n?.firstPage||HW.FirstPage)?null:io.jsx(NW,{...a,disabled:!r.active,children:io.jsx(o,{height:mT})})},XW=(e,t,r=!1)=>{r&&e.key===yT.Tab&&!e.shiftKey&&(rj(e),((e,t,r)=>{const n=e.closest(".qv-object-wrapper")?.querySelector(".sel-toolbar-confirm")?.parentElement??document.querySelector("#qv-selection-toolbar-popover .sel-toolbar-confirm")?.parentElement;n?n.focus():t.focusSelection?.(r)})(e.target,t,!1))},JW=()=>{const{pageInfo:e,keyboard:t,totalPages:r,isSelectionMode:n,width:i,interactions:o,visibilityThreshold:a}=zW(),s=e.page>=r-1,{IconComponent:l,styledProps:u}=YW({type:$W.LastPage,disabledCondition:s,pageNumber:r-1}),c=t.enabled?e=>{XW(e,t,n)}:void 0;return i<=(a?.lastPage||HW.LastPage)?null:io.jsx(NW,{...u,onKeyDown:c,disabled:!o.active,children:io.jsx(l,{height:mT})})},ZW=()=>{const{pageInfo:e,keyboard:t,totalPages:r,isSelectionMode:n,width:i,interactions:o}=zW(),a=e.page>=r-1,{IconComponent:s,styledProps:l}=YW({type:$W.NextPage,disabledCondition:a,pageNumber:e.page+1}),u=!(i>HW.FirstPage&&i>HW.LastPage)&&t.enabled?e=>{XW(e,t,n)}:void 0;return io.jsx(NW,{...l,onKeyDown:u,disabled:!o.active,children:io.jsx(s,{height:mT})})},QW=()=>{const{pageInfo:e,interactions:t}=zW(),r=0===e.page,{IconComponent:n,styledProps:i}=YW({type:$W.PreviousPage,disabledCondition:r,pageNumber:e.page-1});return io.jsx(NW,{...i,disabled:!t.active,children:io.jsx(n,{height:mT})})},e$=()=>{const{translator:e,width:t,pageInfo:r,totalRowCount:n,visibilityThreshold:i}=zW(),{page:o,rowsPerPage:a}=r;if(t<=(i?.displayedRowsLabel||HW.DisplayedRowsLabel))return null;const s=e.get("NebulaTableUtils.Pagination.DisplayedRowsLabel",[`${o*a+1} - ${Math.min((o+1)*a,n)}`,n.toString()]);return io.jsx(_W,{variant:"caption",dir:"ltr",children:s})},t$=({name:e,value:t,options:r,handleChange:n})=>{const{layout:i,footerStyle:o,translator:a,tabIndex:s,interactions:l}=zW(),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 io.jsxs(io.Fragment,{children:[io.jsxs(_W,{variant:"caption",id:p,children:[c,":"]}),io.jsx(TW,{footerStyle:o,size:"small",native:!0,value:t,onChange:n,inputProps:f,disabled:!l.active,children:r})]})},r$=()=>{const{pageInfo:e,isSelectionMode:t,totalColumnCount:r,width:n,handleChangeRowsPerPage:i,visibilityThreshold:o}=zW();if(!(!!e.rowsPerPageOptions?.length&&!t&&n>(o?.rowsPerPage||HW.RowsPerPage)&&r<=100)||void 0===e.rowsPerPageOptions)return null;const a=io.jsx(io.Fragment,{children:e.rowsPerPageOptions.map(e=>io.jsx("option",{value:e,children:e},e))});return io.jsx(t$,{name:"RowsPerPage",value:e.rowsPerPage,options:a,handleChange:e=>{i?.(+e.target.value)}})},n$=1e3,i$="…",o$=({totalPages:e,page:t})=>{const r=Math.min(e,n$),n=r<e&&t>500,i=n?Math.min(500+t,e):r,o=n?Math.max(0,i-n$):0,a=Array.from(Array(r).keys()).map(e=>{const t=e+o;return io.jsx("option",{value:t,children:t+1},t)});return o>0&&a.unshift(io.jsx("option",{value:i$,disabled:!0,children:i$},"startMoreOptions")),i<e-1&&a.push(io.jsx("option",{value:i$,disabled:!0,children:i$},"endMoreOptions")),io.jsx(io.Fragment,{children:a})},a$=()=>{const{pageInfo:e,width:t,totalPages:r,handleChangePage:n,visibilityThreshold:i}=zW(),{page:o}=e;if(t<=(i?.selectPage||HW.SelectPage))return null;const a=io.jsx(o$,{totalPages:r,page:o});return io.jsx(t$,{name:"SelectPage",value:o,options:a,handleChange:e=>{n(+e.target.value)}})};var s$=b(e=>io.jsxs(WW,{...e,children:[io.jsx(r$,{}),io.jsx(a$,{}),io.jsx(e$,{}),io.jsx(KW,{}),io.jsx(QW,{}),io.jsx(ZW,{}),io.jsx(JW,{})]}));const l$=e=>io.jsx(jW,{...e,children:io.jsx(s$,{...e})}),u$=u({}),c$=()=>h(u$),d$=({rect:e,pageInfo:t,qPivotDataPages:r,updatePageInfo:n,direction:i,children:o})=>{const a=v(()=>({rect:e,pageInfo:t,qPivotDataPages:r,updatePageInfo:n,direction:i}),[e,t,r,n,i]);return io.jsx(u$.Provider,{value:a,children:o})},p$=u({}),f$=()=>h(p$),h$=({app:e,model:t,theme:r,embed:n,keyboard:i,translator:o,interactions:a,env:s,children:l})=>{const u=v(()=>({model:t,app:e,interactions:a,embed:n,theme:r,keyboard:i,env:s,translator:o}),[e,a,t,n,r,i,s,o]);return io.jsx(p$.Provider,{value:u,children:l})},m$=u({}),g$=()=>h(m$),v$=({children:e,...t})=>io.jsx(m$.Provider,{value:t,children:e}),y$=()=>{const{text:e,fontFamily:t,fontSize:r,justifyContent:n,alignItems:i,height:o}=(()=>{const{theme:e,translator:t}=f$(),{layoutService:r}=g$(),n=e.getStyle("","","fontFamily")??ZF;return r.hasData?r.hasLimitedData?{text:t.get("SNPivotTable.LimitedData"),fontSize:"13px",fontFamily:n,alignItems:"center",height:"22px"}:{}:{text:t.get("SNPivotTable.NoData"),fontSize:"16px",fontFamily:n,justifyContent:"center",alignItems:"center",height:"100%"}})();return void 0===e?null:io.jsx("div",{style:{display:"flex",justifyContent:n,alignItems:i,width:"100%",height:o},children:io.jsx("span",{style:{...sz,fontFamily:t,fontSize:r,fontStyle:"italic",color:"#7b7a78"},children:e})})},b$="/qHyperCubeDef",x$=-1,S$="PSEUDO-DIM",w$=e=>e===x$?S$:(({cId:e})=>e??Bj())(e),C$=({layoutService:e,visibleLeftDimensionInfos:t,cell:r,colIdx:n})=>{r&&(r.canBeResized=!0,r.colIdx=r.colIdx||n,r.dimensionInfoIndex===x$?r.columnWidthLocation=LF.Measures:r.isLeftDimension?r.columnWidthLocation=LF.Dimension:t.at(-1)===x$?r.columnWidthLocation=LF.Measures:e.hasPseudoDimOnLeft&&(r.columnWidthLocation=LF.Pivot))},E$=(e,t,r,n)=>{const i=w$(r),o=e.getDimensionInfoIndex(r),a=e.isLeftDimension(o);return r===x$?{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:n,columnWidthLocation:LF.Measures,isPivot:!0,qEffectiveDimensionName:void 0}:{id:i,colIdx:0,label:r.qFallbackTitle??"",qReverseSort:r.qReverseSort,sortDirection:r.qSortIndicator&&"N"!==r.qSortIndicator?r.qSortIndicator:"A",qLibraryId:r.qLibraryId,fieldId:r.qGroupFieldDefs[r.qGroupPos],isLocked:r.qLocked??!1,columnWidth:r.columnWidth,qApprMaxGlyphCount:r.qApprMaxGlyphCount,isDim:!0,isCyclic:r.qGrouping===ET.Cyclic,groupDimensionPos:r.qGroupPos,groupDimensionLabels:r.qGroupFallbackTitles,headTextAlign:"left",dimensionInfoIndex:o,canBeResized:!1,isLeftDimension:a,isLastDimension:n,columnWidthLocation:LF.Dimension,isPivot:!0,isSortedByFirstMeasure:t.isSortedByFirstMeasure,qEffectiveDimensionName:r.qEffectiveDimensionName}},I$=({layoutService:e,effectivePropertiesService:t,lastRow:r,lastCol:n})=>{let i=n;var o;r.length>0&&(i=(o=n).at(-1)===x$?o.slice(0,-1):o);const a=i.length+(r.length?1:0),s=Math.max(1,r.length),l=((e,t)=>Array(e).fill(null).map(()=>Array.from({length:t},()=>null)))(a,s);return r.forEach((r,n,i)=>{const o=n===i.length-1;l[a-1][n]=E$(e,t,r,o)}),i.forEach((r,n,i)=>{const o=n===i.length-1;l[n][s-1]=E$(e,t,r,o)}),l},D$=(e,t,r,n)=>{const i=((e,t,r,n)=>{let i;return i=0===r.length||r.includes(x$)?I$({layoutService:e,effectivePropertiesService:t,lastRow:n,lastCol:r}):(e=>e[0].map((t,r)=>e.map(e=>e[r])))(I$({layoutService:e,effectivePropertiesService:t,lastRow:r,lastCol:n})),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,r)=>{Array.isArray(t)?t.forEach((t,r)=>{C$({layoutService:e,visibleLeftDimensionInfos:n,cell:t,colIdx:r})}):C$({layoutService:e,visibleLeftDimensionInfos:n,cell:t,colIdx:r})}),i})(e,t,r,n);return{data:i,size:{x:i[0]?.length??0,y:i.length}}};var P$={fromSearchString:function(e){if(!e)return[];"?"===e[0]&&(e=e.substr(1));const t=[];return e.split("&").forEach(e=>{if(!e)return;const r=e.indexOf("=");let n,i="",o=!1;-1===r?n=e:(n=e.slice(0,r),i=e.slice(r+1),o=!0),t.push(function(e,t,r){return{key:M$(e),value:M$(t.replace(/%2B/g,"shouldNotDecodePlus")),useEqualSign:r}}(n,i,o))}),t}},R$=P$;function M$(e){try{return decodeURIComponent(e)}catch{return e}}function L$(e){if(!(this instanceof L$))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 r=e.indexOf("#");-1!==r&&(t.hash=e.substr(r),e=e.substr(0,r));r=e.indexOf("?"),-1!==r&&(t.search=e.substr(r),e=e.substr(0,r));return t.authorityAndPath=e,t}(e);Object.defineProperties(this,{authorityAndPath:{value:t.authorityAndPath},search:{value:t.search},hash:{value:t.hash},searchParams:{get:()=>R$.fromSearchString(t.search)}})}function A$(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")}L$.encodeAuthorityAndPath=function(e){return encodeURI(e).replace(/%5B/gi,"[").replace(/%5D/gi,"]").replace(/%25/gi,"%")},L$.encodeSearchParams=function(e){let t,r="";for(let n=0;n<e.length;n++)t=e[n],r+=0===n?"?":"&",r+=A$(t.key),t.value?r+=`=${A$(t.value)}`:r+=t.useEqualSign?"=":"";return r};var k$=L$;var O$,q$=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}},T$=class{decode(e){let t="";const r=new q$(e);let n;for(;r.hasNext();)n=this.decodeCharacter(r),t+=null!=n?n:r.next();return t}decodeCharacter(e){return e.next()}},N$=e=>e>=0&&e<=1114111,_$=e=>e.match(/[\s]/),j$=class extends T${decodeCharacter(e){e.mark();const t=e.next();let r,n,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(r=o,n=0;n<5&&(i=e.next(),null!=i&&!_$(i));n++){if("NaN"===parseInt(i,16)){e.pushback(i);break}r+=i}const a=parseInt(r,16);return N$(a)?String.fromCharCode(a):"�"}},F$=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,r,n=arguments[0];return"string"==typeof arguments[1]?(t=arguments[1],r=n.length):(r=arguments[1],t=arguments[2]),t&&n?(n.length>r&&(n=n.substr(0,r)),new e(n,t)):null}},z$=class e{setValue(e){this._nextMap=null,this._value=e}getNextNode(e){return this._nextMap?this._nextMap[e]:null}put(t,r,n){let i,o;if(t.length===r)return o=this._value,this.setValue(n),o;const a=t.charAt(r);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,r+1,n)}get(e,t){if(e.length<=t)return this._value;const r=this.getNextNode(e.charAt(t));return r?r.get(e,t+1):null}getLongestMatch(e,t){if(e.length<=t)return F$.newInstanceIfNeeded(e,this._value);const r=this.getNextNode(e.charAt(t));if(!r)return F$.newInstanceIfNeeded(e,t,this._value);const n=r.getLongestMatch(e,t+1);return n||F$.newInstanceIfNeeded(e,t,this._value)}},W$=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 z$);const r=this.root.put(e,0,t);return r||(e.length>this.maxKeyLen&&(this.maxKeyLen=e.length),this.size++,null)}},$$=(()=>{const e=[],t=[],r=new W$;let n,i,o;for(n 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[n]&&e.hasOwnProperty(n)&&(t[e[n]]=n);for(i in t)"function"!=typeof t[i]&&t.hasOwnProperty(i)&&(o=t[i].toLowerCase().substr(1),r.put(o,String.fromCharCode(i)));return r})(),H$=class extends T${decodeCharacter(e){let t;e.mark();const r=e.next();if(null==r||"&"!==r)return e.reset(),null;const n=e.next();if(null==n)return e.reset(),null;if("#"===n){if(t=this._getNumericEntity(e),null!=t)return t}else if(n.match(/[A-Za-z]/)&&(e.pushback(n),t=this._getNamedEntity(e),null!=t))return t;return e.reset(),null}_getNamedEntity(e){let t,r,n,i="";for(t=Math.min(e.remainder().length,$$.getMaxKeyLength()),n=0;n<t;n++)i+=e.next().toLowerCase();const o=$$.getLongestMatch(i);if(null==o)return null;for(e.reset(),e.next(),t=o.getKey().length,r=0;r<t;r++)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,r="";for(;e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,16))){if(";"===t){e.next();break}break}r+=t,e.next()}const n=parseInt(r,16);return!Number.isNaN(+n)&&N$(n)?String.fromCharCode(n):null}_parseNumber(e){let t,r="";for(;e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,10))){if(";"===t){e.next();break}break}r+=t,e.next()}const n=parseInt(r,10);return!Number.isNaN(+n)&&N$(n)?String.fromCharCode(n):null}},V$=class extends T${decodeCharacter(e){e.mark();const t=e.next();let r,n,i,o;if(null==t)return e.reset(),null;if("%"!==t)return e.reset(),null;for(r="",n=0;n<2;n++)i=e.nextHex(),null!=i&&(r+=i);return 2===r.length&&(o=parseInt(r,16),N$(o))?String.fromCharCode(o):(e.reset(),null)}},B$=/^data:(?<!\s)\s*(image\/[\w+-.]+)(?<!\s)\s*(;.*?){0,1}(?<!\s)\s*,(.*)/i,G$=5e6,U$=5e5,Y$=(e,t)=>{const{maxByteSizeSvg:r=U$,maxByteSizeImage:n=G$}=t??{},{mimeType:i,encoding:o,data:a}=(e=>{const[,t,r,n]=B$.exec(e.trim())??[];return{encoding:r,data:n,mimeType:t?.toLocaleLowerCase()}})(e);if(!a)return!0;const s=((e,t,r)=>{const n={type:e};if(t?.includes(";base64"))try{return new Blob([atob(r)],n).size}catch{return new Blob([r],n).size}return"image/svg+xml"===e?new Blob([r],n).size:0})(i,o,a);return"image/svg+xml"===i?s<=r:s<=n};"undefined"!=typeof document&&(O$=document.createElement("div"));var K$=Array.prototype.indexOf,X$=[",",".","_"," "],J$=[",",".","-","_"," "],Z$={width:["%"],height:["%"]},Q$={default:["-"," ","%"],color:["#"," ","(",")"],image:["(",")",":","/","?","&","-",".",'"',"="," "]},eH={background:["(",")",":","%","/","?","&","-"," ",".",'"',"=","#"],"background-image":Q$.image,"background-color":Q$.color,"border-color":Q$.color,"border-image":Q$.image,color:Q$.color,icon:Q$.image,"list-style-image":Q$.image,"outline-color":Q$.color},tH={attr_name:["^on[a-z]{1,}","style","href","src"],attr_val:["javascript:","data:"],css_key:["behavior","-moz-behavior","-ms-behavior"],css_val:["expression"]};function rH(e,t,r){let n;if(t){if(K$)return K$.call(t,e,r);for(n=t.length,r=r?r<0?Math.max(0,n+r):r:0;r<n;r++)if(r in t&&t[r]===e)return r}return-1}function nH(e){if(null==e)return"";let t="";const r=document.createTextNode(e);return O$.appendChild(r),t=O$.innerHTML,O$.removeChild(r),t}function iH(e,t,r){let n,i,o,a,s,l,u,c,d;for(e=aH(e).toLowerCase(),t=aH(t),o=0;o<tH.attr_name.length;o++)if(e.match(tH.attr_name[o]))throw new Error(`Unsafe attribute name used: ${e}`);for(o=0;o<tH.attr_val.length;o++)if(t.toLowerCase().match(tH.attr_val[o]))throw new Error(`Unsafe attribute value used: ${t}`);if(n=Z$[e],n||(n=J$),i="",!r){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]/)&&rH(u,n)<0?(d=c.toString(16),i+=`&#x${d};`):i+=u;return r||(i+='"'),i}function oH(e,t,r){let n,i,o,a,s,l,u,c,d,p;if(e=aH(e).toLowerCase(),t=aH(t),rH(e,tH.css_key)>=0)throw new Error(`Unsafe property name used: ${e}`);for(n=0;n<tH.css_val.length;n++)if(t.toLowerCase().indexOf(tH.css_val[n])>=0)throw new Error(`Unsafe property value used: ${t}`);if(i=eH[e],i||(i=Q$.default),o="",!r){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]/)&&rH(u,i)<0?(d=c.toString(16),p="000000".substr(d.length),o+=`\\${p}${d}`):o+=u;return o}function aH(e,t){let r,n,i,o,a=!1;if(null===e)return null;r=e,n=e,i=0;const s=[new H$,new V$,new j$];for(;!a;){n=r;for(let e=0;e<s.length;e++)o=s[e].decode(r),o!==r&&(i++,r=o);n!==r||(a=!0)}if(t&&i>1)throw new Error("Attack Detected - Multiple/Double Encodings used in input");return r}var sH=[];for(let e=0;e<255;e++)sH[e]=e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122?null:e.toString(16);var lH={html:e=>nH(e.unsafe),css(e){let t,r=[];const n=[],i={};let o="";for(t in e.map?r=e.map:r[e.name]=e.unsafe,r)"function"!=typeof r[t]&&r.hasOwnProperty(t)&&(n[t]=oH(t,r[t],!0),o+=oH(t,r[t],!0),i[t]=n[t]);return e.map?i:o},attr(e){let t=[];const r=[],n={};let i="";e.map?t=e.map:t[e.name]=e.unsafe;for(const e in t)"function"!=typeof t[e]&&t.hasOwnProperty(e)&&(r[e]=iH(e,t[e],!0),i+=iH(e,t[e],!0),n[e]=r[e]);return e.map?n:i}};function uH(e,t){throw new Error(t)}var cH={canonicalize:aH,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,r;const n=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(r=e[t],n===r)continue;void 0!==r&&(n[t]=r)}}(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?lH.html(e):"css"===e.context?(null!=e.map&&"object"!=typeof e.map&&uH(this,"Invalid parameter type"),lH.css(e)):"attr"===e.context?(null!=e.map&&"object"!=typeof e.map&&uH(this,"Invalid parameter type"),lH.attr(e)):void uH(this,"Invalid parameter type")},encodeForAttr:iH,encodeForAttr2:function(e){return iH("nonsens",e,!0)},encodeForCSS:oH,encodeForHref:function(e){aH(e),0!==e.search("[a-zA-Z0-9]+:")&&(e=`http://${e}`);const t=new k$(e),r=k$.encodeAuthorityAndPath(t.authorityAndPath),n=t.searchParams;e=r+k$.encodeSearchParams(n)+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 r,n,i,o,a,s;for(t||(t=X$),s="",r=0;r<e.length;r++)i=e.charAt(r),o=e.charCodeAt(r),rH(i,t)>=0||null==sH[o]?s+=i:(n=o.toString(16),o<256?(a="00".substr(n.length),s+=`\\x${a}${n.toUpperCase()}`):(a="0000".substr(n.length),s+=`\\u${a}${n.toUpperCase()}`));return s},encodeForHTML:nH,encodeForURL:function(e,t){let r="";return t&&(t.match(/^[A-Za-z\-0-9]{1,}$/)?r+=aH(t).toLowerCase():uH(this,"Illegal Attribute Name Specified"),r+='="'),r+=encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A"),r+=t?'"':"",r},isSafeDataURL:Y$,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 r=function(e){let t=e,r="";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=r.lastIndexOf("/");-1!==e&&(r=r.slice(0,e))}else if("/.."===t){t="/";const e=r.lastIndexOf("/");-1!==e&&(r=r.slice(0,e))}else if("."===t||".."===t)t="";else{const e=t.match(/^\/?[^/]*/),n=e?e[0]:"";t=t.slice(n.length),r+=n}return r}(t);return""!==r&&"/"!==r&&r}};const dH=(e,t)=>t.qAttrExps?.qValues?.[e],pH=(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"}}},fH=({text:e,url:t,imageSize:r,imagePosition:n,labelStructure:i,imageBox:o,direction:a})=>!n||t&&(t.toLowerCase().includes("javascript:")||!cH.isSafeDataURL(t))?{type:CF.Text,url:void 0,text:e,labelStructure:i}:{type:CF.Image,url:t||"",text:e,imageSize:r,resolvedImagePosition:pH(n,a),labelStructure:i,imageBox:o},hH=(e,t,r,n)=>{if(!e.qMiniChart||!t?.miniChart||!r)return{type:CF.Text,text:n};const{minY:i,maxY:o}=((e,t,r)=>{const n="global"===t.yAxis?.scale,i="zeroCenter"===t.yAxis?.position,o=n?r.qYMin:e.qMiniChart.qMin,a=n?r.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,r),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:CF.MiniChart,text:n,miniChart:a}},mH=(e,t,r)=>{const n=Array.isArray(t.qAttrExps)?t.qAttrExps[0]:t.qAttrExps,i=n?.qValues?.[e];if(i){const e=Number.isNaN(+i.qNum)?void 0:`${i.qNum}`;return i.qText||e}return r?.urlPosition===EF.Attribute?void 0:r?.urlLabel},gH=({labelStructure:e,text:t,url:r})=>{try{if(!r)throw Error("Invalid url");return{type:CF.Link,url:cH.encodeForHref(r),text:t,labelStructure:e}}catch{return{type:CF.Text,url:void 0,text:t,labelStructure:e}}},vH=({cell:e,representationProperties:t,attrExprInfoIndex:r,env:n,conditionalColoring:i,miniChartOnMeasure:o,labelStructure:a,getText:s=e=>e.qText,direction:l,enabledFeatures:u})=>{const c=IF(t),d=s(e);return c===CF.Image&&u[CF.Image]&&!n.anything.sense?.isUnsupportedFeature?.("tableImages")?((e,t,r,n,i,o)=>{const{imageSize:a,imagePosition:s,imageSetting:l,imageLabel:u,imageBox:c}=t??{};if("url"===l){const t=dH(r.imageUrl??-1,e)?.qText;return o&&(o.maskedValue=t??""),fH({text:n,url:t,imageSize:a,imagePosition:s,labelStructure:o,imageBox:c,direction:i})}if("label"===l){const t=o?o.originalValue:n;if(-1===r.imageLabel)return fH({text:u||t||"",url:t,imageSize:a,imagePosition:s,labelStructure:o,imageBox:c,direction:i});const l=dH(r.imageLabel??-1,e)?.qText??n;return fH({text:l,url:t,imageSize:a,imagePosition:s,labelStructure:o,imageBox:c,direction:i})}return{type:CF.Text,url:void 0,labelStructure:o,text:n}})(e,t,r,d,l,a):c===CF.Link?((e,t,r,n,i)=>{const{urlPosition:o}=t??{};if(o===EF.Attribute){const o=mH(r.url??-1,e,t);return gH({labelStructure:n,text:i||o||"",url:o})}if(o===EF.Dimension){const o=mH(r.urlLabel??-1,e,t)||i;return n&&(n.maskedValue=o),gH({text:o,labelStructure:n,url:n?.originalValue??i})}return{type:CF.Text,url:void 0,text:i,labelStructure:n}})(e,t,r,a,d):c===CF.Indicator&&u[CF.Indicator]&&!n.anything.sense?.isUnsupportedFeature?.("tableIndicators")?((e,t,r)=>{const{indicator:n}=e??{};return{type:CF.Indicator,url:void 0,text:r,indicator:{applySegmentColors:n?.applySegmentColors,position:n?.position,showTextValues:n?.showTextValues},indicatorConditionalColoring:t}})(t,i,d):c===CF.MiniChart&&u[CF.MiniChart]&&!n.anything.sense?.isUnsupportedFeature?.("qMiniChartDef")?hH(e,t,o,d):{type:CF.Text,url:void 0,text:d,labelStructure:a}},yH=(e,t)=>{const r=t.qAttrExps,n=r?.qValues?.[e?.cellForegroundColor??-1]?.qText,i=r?.qValues?.[e?.cellBackgroundColor??-1]?.qText,o=i?tj(i):null,a=n?tj(n):null,s=((e,t)=>e||!t?null:Z_(t))(a,o);return{color:s??a,background:o}},bH=(e,t)=>t.qSubNodes.reduce((e,t)=>0===t.qSubNodes.length?e+1:bH(e,t),e),xH=(e,t,r,n,i,o)=>{const a=i?o.rowsPerPage-r:ez-n;let s=e.qUp+e.qDown;if(i&&0===r){const r=(t+e.qUp)%o.rowsPerPage;s=e.qDown+r}return Math.min(a,bH(s,e))},SH=({node:e,parent:t,root:r,x:n,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!==x$){if(t){const t=IF(e.representation);return t===CF.Link||t===CF.Image?e.representation:{type:CF.Text}}return e.representation}})(s,c),y=(({node:e,isLeftColumn:t,isIndentModeEnabled:r,labelStructure:n,representationType:i,parentOrRootOriginalValue:o})=>{let a=e.qText;if(t&&r&&n){const{originalValue:t,delimeter:r,suffix:s}=n;a=i===CF.Link?"P"===e.qType?o:t:`${t} ${!s||!t&&s?"":r} ${s}`.trim()}return a})({node:e,isLeftColumn:u,isIndentModeEnabled:c,labelStructure:p,representationType:IF(v),parentOrRootOriginalValue:(t||r)?.representation?.labelStructure?.originalValue??""}),b=vH({cell:{...e,qText:y},representationProperties:v,attrExprInfoIndex:l,env:f,labelStructure:p,direction:m,enabledFeatures:{[CF.Image]:!0,[CF.Indicator]:!0}}),x={id:Bj(),ref:e,x:n,y:i,pageX:n,pageY:o,mainAxisPageCoord:u?o:n,isLeftColumn:u,parent:t,root:r,children:[],isLeafNode:0===e.qSubNodes.length,leafCount:xH(e,i,o,n,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:yH(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},wH=(e,t,r,n,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(x$);f.forEach((f,v)=>{const y={originalValue:f.qText??"",maskedValue:"",delimeter:"-",suffix:""};c+=0===v?0:1;const b=r.qTop-n.page*n.rowsPerPage,x=Math.max(0,b+c-f.qUp),S=r.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?SH({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:n,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},CH=(e,t)=>{e.slice(0,-1).forEach(e=>{Object.values(e).forEach((e,r,n)=>{const i=n.at(r+1);e.distanceToNextCell=i?i.mainAxisPageCoord-(e.mainAxisPageCoord+e.leafCount):t-(e.mainAxisPageCoord+e.leafCount)})})},EH=(e,t)=>{const r=e[0],n=r?Object.values(r):[],i=t?.isIndentModeEnabled&&t.hasPseudoDimOnLeft?t.visibleMeasureInfo.length-1:0,o=r?.[i],a=n.at(-1);return o?.isTotal?o.isLeafNode?o.mainAxisPageCoord:o.mainAxisPageCoord+o.leafCount-1:a?.isTotal?a.mainAxisPageCoord-1:-1},IH=({prevData:e,nextDataPage:t,pageInfo:r,layoutService:n,visibleLeftDimensionInfo:i,attrExprInfoIndexes:o,env:a,direction:s})=>{const{qLeft:l,qArea:u}=t;if(!l.length)return e;const c=wH(e.grid,l,u,r,n,i,o,a,s);CH(c,r.rowsOnCurrentPage);const d=EH(c,n);return{...e,grid:c,columnCount:c.length,totalDividerIndex:d}},DH=({qArea:e,prevData:t,pivotValuePoints:r,pageInfo:n})=>{const i=[...t];return r.forEach((t,r)=>{t.forEach((t,o)=>{const a=e.qTop-n.page*n.rowsPerPage+r,s=e.qLeft+o;Array.isArray(i[a])||(i[a]=[]);const l="U"===t.qType;i[a][s]=i[a][s]??{id:Bj(),ref:t,isNull:l}})}),i},PH=({prevData:e,dataPage:t,pageInfo:r})=>{const{qData:n,qArea:i}=t;return n?.length?DH({qArea:i,prevData:e,pivotValuePoints:n,pageInfo:r}):e},RH=(e,t,r,n,i,o,a,s,l,u)=>{const{isIndentModeEnabled:c}=n;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=r.qLeft+d-f.qUp,v=e[h][g]??SH({node:f,parent:p,root:a,x:g,y:h,pageY:h,layoutService:n,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},MH=({prevData:e,nextDataPage:t,layoutService:r,visibleTopDimensionInfo:n,attrExprInfoIndexes:i,headerRows:o,env:a,pageInfo:s,direction:l})=>{const{qTop:u,qArea:c}=t;if(!u.length)return e;const d=RH(e.grid,u,c,r,n,i,o,a,s,l);CH(d,r.size.x);const p=EH(d);return{...e,grid:d,rowCount:d.length,totalDividerIndex:p}},LH=e=>-1===e?{}:e.qAttrExprInfo.reduce((e,{id:t},r)=>(e[t]=r,e),{}),AH=(e,t)=>{const{env:r}=f$(),{direction:n}=c$(),{layoutService:i,effectivePropertiesService:o}=g$(),{qPivotDataPages:a,pageInfo:s}=c$(),[l,u]=m(null),c=((e,t,r)=>v(()=>({left:e.map(LH),top:t.map(LH),measures:r.map(LH)}),[r,e,t]))(e,t,i.visibleMeasureInfo),d=v(()=>D$(i,o,t,e),[i,o,t,e]),p=f(()=>a.slice(1).reduce((e,t)=>PH({prevData:e,dataPage:t,pageInfo:s}),((e,t)=>{const{qData:r,qArea:n}=e;return DH({qArea:n,prevData:[],pivotValuePoints:r,pageInfo:t})})(a[0],s)),[a,s]),h=f(()=>a.slice(1).reduce((e,o)=>MH({prevData:e,nextDataPage:o,layoutService:i,visibleTopDimensionInfo:t,attrExprInfoIndexes:c.top,headerRows:d.size.y,env:r,pageInfo:s,direction:n}),((e,t,r,n,i,o,a,s)=>{const{qArea:l,qTop:u}=e,c=RH([],u,l,t,r,n,i,o,a,s);CH(c,t.size.x);const d=EH(c);return{grid:c,rowCount:c.length,layoutSize:t.size,totalDividerIndex:d}})(a[0],i,t,c.top,d.size.y,r,s,n)),[a,i,t,c.top,d.size.y,r,s,n]),g=f(()=>a.slice(1).reduce((t,o)=>IH({prevData:t,nextDataPage:o,pageInfo:s,layoutService:i,visibleLeftDimensionInfo:e,attrExprInfoIndexes:c.left,env:r,direction:n}),((e,t,r,n,i,o,a)=>{const{qArea:s,qLeft:l}=e,u=wH([],l,s,r,t,n,i,o,a);CH(u,r.rowsOnCurrentPage);const c=EH(u,t);return{grid:u,columnCount:u.length,layoutSize:t.size,totalDividerIndex:c}})(a[0],i,s,e,c.left,r,n)),[a,i,s,e,c,r,n]),[y,b]=m(()=>p()),[x,S]=m(()=>h()),[w,C]=m(()=>g());jz(()=>{b(p())},[p]),jz(()=>{S(h())},[h]),jz(()=>{C(g())},[g]),jz(()=>{l&&l.forEach(o=>{b(e=>PH({prevData:e,dataPage:o,pageInfo:s})),S(e=>MH({prevData:e,nextDataPage:o,layoutService:i,visibleTopDimensionInfo:t,attrExprInfoIndexes:c.top,headerRows:d.size.y,env:r,pageInfo:s,direction:n})),C(t=>IH({prevData:t,nextDataPage:o,pageInfo:s,layoutService:i,visibleLeftDimensionInfo:e,attrExprInfoIndexes:c.left,env:r,direction:n}))})},[l]);const E=f(e=>{u(e)},[]);return{headersData:d,measureData:y,topDimensionData:x,leftDimensionData:w,attrExprInfoIndexes:c,nextPageHandler:E}},kH=Math.sqrt(1e4),OH=e=>({maxNumberOfVisibleRows:Math.ceil(e.height/24),maxNumberOfVisibleColumns:Math.ceil(e.width/xT.PixelsMin)}),qH=e=>{if(null===e)return[];if(e.qWidth*e.qHeight<1e4)return[e];const t=[],r=Math.ceil(e.qWidth/kH),n=Math.ceil(e.qHeight/kH);for(let i=0;i<r;i++)for(let r=0;r<n;r++)t.push({qLeft:e.qLeft+i*kH,qTop:e.qTop+r*kH,qWidth:Math.min(kH,e.qWidth-i*kH),qHeight:Math.min(kH,e.qHeight-r*kH)});return t};function TH({nextPageHandler:e}){const{model:t}=f$(),{pageInfo:r}=c$(),{layoutService:n}=g$(),i=(e=>{const t=l(e);return t.current=e,t})(r.page),o=t,a=f(async(e,t)=>{await(o?.collapseLeft(b$,e,t,!1))},[o]),s=f(async(e,t)=>{await(o?.collapseTop(b$,e,t,!1))},[o]),u=f(async(e,t)=>{await(o?.expandLeft(b$,e,t,!1))},[o]),c=f(async(e,t)=>{await(o?.expandTop(b$,e,t,!1))},[o]),d=f(async t=>{if(o?.getHyperCubePivotData&&0!==t.length)try{const n=await o.getHyperCubePivotData(b$,t.reduce((e,t)=>[...e,...qH(t)],[]));i.current===r.page&&e(n)}catch(e){console.error(e)}},[o,e,r,i]),p=f((e,{dimensionInfoIndex:r,isLeftColumn:i,x:o=0,columnWidthLocation:a})=>{const{qMeasureInfo:s,qDimensionInfo:l,topHeadersColumnWidth:u}=n.layout.qHyperCube;let c=[];switch(a){case LF.Dimension:c=[{qPath:`${b$}/qDimensions/${r}/qDef/columnWidth`,oldValue:l[r].columnWidth}];break;case LF.Measures:if(i)c=s.map((e,t)=>({qPath:`${b$}/qMeasures/${t}/qDef/columnWidth`,oldValue:e.columnWidth}));else{const e=n.getMeasureInfoIndexFromCellIndex(o);c=[{qPath:`${b$}/qMeasures/${e}/qDef/columnWidth`,oldValue:s[e].columnWidth}]}break;case LF.Pivot:c=[{qPath:`${b$}/topHeadersColumnWidth`,oldValue:u}]}const d=c.map(t=>{const{qPath:r,oldValue:n}=t;return{qPath:r,qOp:n?"Replace":"Add",qValue:JSON.stringify({...n,...e})}});t?.applyPatches(d,!0)},[t,n]),h=f(async e=>{await(o?.applyPatches([{qPath:`${b$}/indentModeColumnWidth`,qOp:n.layout.qHyperCube.indentModeColumnWidth?"Replace":"Add",qValue:JSON.stringify({...n.indentModeColumnWidth,...e})}],!0))},[o,n]);return v(()=>({collapseLeft:a,collapseTop:s,expandLeft:u,expandTop:c,applyColumnWidth:p,applyIndentModeColumnWidth:h,fetchPages:d}),[a,s,u,c,p,h,d])}const NH=(e,t,r)=>(n,i)=>{if("P"===n)return x$;const o=t[r+i];return e[o]},_H=e=>{const t=[],r=(e,n=0)=>{e.slice(0,1).forEach(e=>{t[n]=e.qType,e.qSubNodes.length&&r(e.qSubNodes,n+1)})};return r(e),t},jH=u({}),FH=()=>h(jH),zH=({children:e})=>{const{visibleLeftDimensionInfo:t,visibleTopDimensionInfo:r}=(()=>{const{layoutService:{layout:{qHyperCube:{qNoOfLeftDims:e,qEffectiveInterColumnSortOrder:t,qDimensionInfo:r}}}}=g$(),{qPivotDataPages:n}=c$();return v(()=>{const i=_H(n[0]?.qLeft??[]),o=_H(n[0]?.qTop??[]);return{visibleLeftDimensionInfo:i.map(NH(r,t,0)),visibleTopDimensionInfo:o.map(NH(r,t,e))}},[r,t,e,n])})(),{headersData:n,measureData:i,topDimensionData:o,leftDimensionData:a,attrExprInfoIndexes:s,nextPageHandler:l}=AH(t,r),u=TH({nextPageHandler:l}),c=v(()=>({gridSectionsData:{headersData:n,topDimensionData:o,leftDimensionData:a,measureData:i},visibleDimensionsInfo:{visibleLeftDimensionInfo:t,visibleTopDimensionInfo:r},attrExprInfoIndexes:s,dataModel:u}),[t,r,n,i,o,a,s,u]);return io.jsx(jH.Provider,{value:c,children:e})},WH=20,$H=18,HH=.75,VH=e=>-1!==e&&e?.representation?.type===CF.Image,BH=({isLeftColumn:e,layoutService:t,representation:r})=>Boolean(e)&&t.isIndentModeEnabled&&r.type===CF.Image,GH=e=>void 0===e?QF:e,UH=(e,t)=>{if(void 0!==e&&!Number.isNaN(+e)){const r=+e;return r>=0?r:t}return t},YH=e=>UH(e,xT.PixelsDefault),KH=(e,t)=>UH(e,xT.PercentageDefault)*t/100,XH=(e,t,r)=>{switch(t?.type){case ST.Pixels:return YH(t.pixels);case ST.Percentage:return KH(t.percentage,e);case ST.FitToContent:case ST.Auto:default:return r}},JH=({headers:e,layoutService:t,effectivePropertiesService:r,estimateWidthForDimensionValue:n,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===S$)return e+0;const v=BH({isLeftColumn:h,layoutService:t,representation:m?.representation||{type:CF.Text}})?g.width+8+4:n(f),y=!r.qAlwaysFullyExpanded&&p<u-1?21:0;let b=0;if(i&&o&&a){b=o("- ")+a}return Math.max(e,24*l+$H+y+v+b)},0),ZH=(e,t,r)=>e.reduce((e,n)=>{const i=(r?0:1)*$H;return Math.max(e,i+t(n.qFallbackTitle??""))},0),QH=(e,t,r,n)=>{const i=100*e/t,o=n*HH*(i/100),a=i/100*+r;return Math.min(a,o)},eV=(e,t,r,n)=>n*(+r/100)*(100*e/t/100),tV=(e,t)=>e.some(e=>e>=t*HH),rV=({layoutService:e,effectivePropertiesService:t,headersData:r,columnWidths:n,tableWidth:i,widthOverride:o,measureTextForHeader:a,estimateWidthForDimensionValue:s,measureTextWidthForMeasuresCombinedWithDimensions:l,translator:u})=>{let c=[];const d=i*HH,p=r.data[r.data.length-1][0];if(!Array.isArray(p))return{leftGridWidth:0,leftGridColumnWidths:[],leftGridFullWidth:0};const f=Math.min(d,n.at(-1)),h=Math.min(d,JH({headers:p,layoutService:e,effectivePropertiesService:t,estimateWidthForDimensionValue:s})),m=Math.min(d,ZH(e.visibleMeasureInfo,a));let g=0;const v=p.findIndex(e=>e.id===S$),y=(({layoutService:e,measureTextForHeader:t,translator:r,headersData:n})=>{const{type:i}=e.indentModeColumnWidth;return i===ST.Auto&&n.size.y<=1?t(r.get("SNPivotTable.IndentMode.Rows"))+8+$H+16:24})({layoutService:e,measureTextForHeader:a,translator:u,headersData:r});if(e.hasPseudoDimOnLeft)if(0===v){const e=Math.max(f,h,m);c=[Math.max(y,e-f),f]}else{const r=Math.min(d,ZH(e.visibleMeasureInfo,l,!0));g=Math.min(d,JH({headers:p.slice(0,v),layoutService:e,effectivePropertiesService:t,estimateWidthForDimensionValue:s,shouldConsiderCombinatedLength:!0,measureTextForHeader:a,longestMeasureValuePossible:r}));const n=Math.max(f,h,g);c=[Math.max(y,n-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=ST.Pixels,x.pixels=o);return[ST.Pixels,ST.Percentage].includes(x.type)||tV(c,i)?((e,t,r,n)=>{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=UH(u,xT.PixelsDefault),p=UH(c,xT.PercentageDefault),f=tV(e,r);l===ST.Auto&&f&&(i>o?i-=o:o-=i),l===ST.Pixels&&d&&(i=QH(e[0],s,d,r),o=QH(e[1],s,d,r)),l===ST.Percentage&&p&&(i=eV(e[0],s,p,r),o=eV(e[1],s,p,r));let h=0;o<=n&&(h=i-5,h>0&&(i-=h,o+=h)),h=o-n,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 nV({tableWidth:e}){const t=e*HH,{styleService:r,layoutService:n,effectivePropertiesService:i}=g$(),{translator:o}=f$(),{gridSectionsData:{headersData:a}}=FH(),{measureText:s}=qz(r.header,{allowLineBreaks:!1}),{estimateWidth:l,measureText:u}=qz({...r.dimensionValues,fontWeight:GH(r.dimensionValues.fontWeight)}),{measureText:c}=qz({...r.dimensionValues,...r.measureLabels}),d=f((r,d)=>{const{layout:{qHyperCube:{qNoOfLeftDims:p,topHeadersColumnWidth:f}},visibleMeasureInfo:h,isIndentModeEnabled:m,hasPseudoDimOnLeft:g}=n,v=(t=0)=>h.reduce((r,{qFallbackTitle:n,columnWidth:i})=>{const o=c(n)+$H,a=Math.max(o,t);return Math.max(r,m?a:XH(e,i,a))},0),y=e=>a.data.reduce((t,r)=>{const n=r.at(e);if(!n||Array.isArray(n))return t;if(n.id===S$)return t;const i=(e=>{const{label:t,isLocked:r}=e,n=r?WH:0;return $H+s(t)+WH+n})(n);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=$H;if(m&&1!==a.size.x||!r||void 0===d||d!==o.colIdx){let t;o.columnWidthLocation===LF.Pivot?t=m?void 0:f:o.columnWidthLocation===LF.Dimension&&({columnWidth:t}=o);let r=0;if(o.isLeftDimension)if(o.id===S$)r=v();else{const e=y(s),t=((e,t)=>{const{qApprMaxGlyphCount:r,isLeftDimension:o,dimensionInfoIndex:a}=e,s=n.getDimensionInfo(a);if(VH(s))return xT.PixelsDefault;const u=!i.qAlwaysFullyExpanded&&o&&t<p-1?21:0;return $H+l(r)+u})(o,s);r=Math.max(e,t),m&&!g&&s+1===p&&o.columnWidthLocation===LF.Dimension&&a.size.x>1&&(r=e)}else r=y(s),o.columnWidthLocation===LF.Measures&&(r=v(r));m&&1===a.size.x&&(t=n.indentModeColumnWidth),u=m&&!g&&a.size.x>1?r:XH(e,t,r)}else u=m?Math.min(t,r):r;return b+=u,u});return m&&a.size.x>1?rV({layoutService:n,effectivePropertiesService:i,headersData:a,columnWidths:S,tableWidth:e,widthOverride:r,measureTextForHeader:s,estimateWidthForDimensionValue:l,measureTextWidthForMeasuresCombinedWithDimensions:u,translator:o}):{leftGridWidth:Math.min(t,b),leftGridColumnWidths:S,leftGridFullWidth:b}},[e,a,n,t,s,c,l,u,o,i]),[p,h]=m(d);jz(()=>{h(d())},[d]);const g=f((e,t)=>{h(d(e,t))},[d]);return{...p,overrideLeftGridWidth:g}}function iV({tableWidth:e,verticalScrollbarWidth:t,leftGridWidth:r}){const{styleService:n,layoutService:i}=g$(),{visibleDimensionsInfo:{visibleTopDimensionInfo:o}}=FH(),{layout:{qHyperCube:{qNoOfLeftDims:a,qEffectiveInterColumnSortOrder:s}},size:l,visibleMeasureInfo:u}=i,{estimateWidth:c,measureText:d}=qz(n.measureValues,{allowLineBreaks:!1}),{estimateWidth:p}=qz({...n.dimensionValues,fontWeight:GH(n.dimensionValues.fontWeight)},{allowLineBreaks:!1}),h=e-r-1,m=o.at(-1),g=m===x$,y=s.length-a>o.length?21:0,b=v(()=>{const e=g?u:[m],t=l.x/e.length,r=[],n=[];let i=h;const o=(e,n)=>{r[e]=Math.min(xT.PixelsMax,Math.max(xT.PixelsMin,n)),i-=r[e]*t};if(e.forEach((e,t)=>{if(e?.columnWidth){const{columnWidth:{type:r,pixels:i,percentage:a},qApprMaxGlyphCount:s,qFallbackTitle:l}=e;switch(r){case ST.Pixels:o(t,YH(i));break;case ST.Percentage:o(t,KH(a,h));break;case ST.FitToContent:o(t,((e,t,r)=>r?xT.PixelsDefault:$H+(g?Math.max(c(e),d(t)):Math.max(Math.max(...u.map(e=>c(e.qApprMaxGlyphCount))),p(e)+y)))(s,l??"",VH(e)));break;case ST.Auto:default:n.push(t)}}else n.push(t)}),n.length){const e=n.length*t,o=i/e;n.forEach(e=>{r[e]=Math.max(xT.AutoMinPivot,o)})}return r},[g,u,m,l.x,h,c,d,p,y]),x=v(()=>{if(g){return u.reduce((e,t,r)=>e+b[r],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 oV=`scrollable-container--${kF.TopGrid}`,aV=`scrollable-container--${kF.LeftGrid}`,sV=`scrollable-container--${kF.DataGrid}`,lV=e=>e&&e instanceof HTMLDivElement?{width:e.offsetWidth-e.clientWidth,height:e.offsetHeight-e.clientHeight}:{width:0,height:0},uV=(e,t)=>e>t?OF.Forward:e<t?OF.Backward:OF.None,cV=({gridRefs:{topGridRef:e,leftGridRef:t,dataGridRef:r},getWrapperElements:n,updateViewService:i,trackScrollDirection:o,interactions:a})=>{const{direction:s}=c$();d(()=>{const{headerGridWrapperElement:l,topGridWrapperElement:u,leftGridWrapperElement:c,dataGridWrapperElement:d}=n(),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=n=>{const a=n.target,l=((e,t)=>{const{scrollWidth:r,clientWidth:n,scrollLeft:i}=e,o=r-n;if("rtl"===t){if(i>o)return o;if(i<0)return Math.abs(i)}return i})(a,s);r.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(n),i?.(n)};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,r,n,s])},dV=()=>{const{interactions:e}=f$(),t=l(null),r=l(null),n=l(null),i=l(null),o=l([]),a=l([]),s=l(null),{scrollbarsDimensions:{verticalScrollbarWidth:u,horizontalScrollbarHeight:c},resetHorizontalScrollbarHeight:p}=(({topGridWrapperRef:e,leftGridWrapperRef:t,dataGridWrapperRef:r})=>{const[n,i]=m(0),[o,a]=m(0);return g(()=>{if(e.current||r.current){const t=Math.max(lV(e.current).width,lV(r.current).width);n!==t&&i(t)}}),g(()=>{if(t.current||r.current){const e=Math.max(lV(t.current).height,lV(r.current).height);o!==e&&a(e)}}),{scrollbarsDimensions:{verticalScrollbarWidth:n,horizontalScrollbarHeight:o},resetHorizontalScrollbarHeight:()=>{a(0)}}})({topGridWrapperRef:r,leftGridWrapperRef:n,dataGridWrapperRef:i});(({gridSectionsWrapperRefs:{headerGridWrapperRef:e,topGridWrapperRef:t,leftGridWrapperRef:r,dataGridWrapperRef:n},gridRefs:{topGridRef:i,leftGridRef:o,dataGridRef:a}})=>{const{pageInfo:s}=c$(),{downloadService:l,viewService:u,layoutService:c}=g$(),d=f(()=>{const i={left:0,top:0};e.current?.scrollTo(i),t.current?.scrollTo(i),r.current?.scrollTo(i),n.current?.scrollTo(i)},[e,t,r,n]);g(()=>{d()},[s.page,d]),g(()=>{c.triggerdByExpandOrCollapse||d()},[c,d]),g(()=>{if(c.triggerdByExpandOrCollapse){const e=n.current?.scrollLeft??0,t=n.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,n,a,o,i]),g(()=>{(l.isDownloadedAsPDForImage||c.isSnapshot)&&n.current&&r.current&&t.current&&(n.current.scrollTop=u.scrollTop,n.current.scrollLeft=u.scrollLeft,r.current.scrollLeft=u.leftGridScrollLeft,t.current.scrollTop=u.topGridScrollTop)},[u,l,c,n,r,t])})({gridSectionsWrapperRefs:{headerGridWrapperRef:t,topGridWrapperRef:r,leftGridWrapperRef:n,dataGridWrapperRef:i},gridRefs:{topGridRef:o,leftGridRef:a,dataGridRef:s}});const{trackScrollDirection:h,scrollDirectionRefs:{verticalScrollDirection:v,horizontalScrollDirection:y}}=(()=>{const e=l(OF.None),t=l(OF.None),r=l({prevScrollTop:0,prevScrollLeft:0}),n=f(n=>{if(n instanceof WheelEvent&&(e.current=uV(n.deltaY,0),t.current=uV(n.deltaX,0)),n instanceof Event&&!(n instanceof WheelEvent)){const i=n.target;e.current=uV(i.scrollTop,r.current.prevScrollTop),r.current.prevScrollTop=i.scrollTop,t.current=uV(i.scrollLeft,r.current.prevScrollLeft),r.current.prevScrollLeft=i.scrollLeft}},[e,t,r]);return{trackScrollDirection:n,scrollDirectionRefs:{verticalScrollDirection:e,horizontalScrollDirection:t}}})(),b=(()=>{const{viewService:e}=g$();return f(t=>{const r=t.target,n=t.currentTarget,i=r.dataset.key;i===aV&&(e.leftGridScrollLeft=n.scrollLeft),i===sV&&(e.scrollLeft=n.scrollLeft),i===oV&&(e.topGridScrollTop=n.scrollTop),i!==aV&&i!==sV||(e.scrollTop=n.scrollTop)},[e])})(),x={gridRefs:{topGridRef:o,leftGridRef:a,dataGridRef:s},getWrapperElements:f(()=>({headerGridWrapperElement:t.current,topGridWrapperElement:r.current,leftGridWrapperElement:n.current,dataGridWrapperElement:i.current}),[t,r,n,i]),updateViewService:b,trackScrollDirection:h,interactions:e};return(({gridRefs:{topGridRef:e,leftGridRef:t,dataGridRef:r},getWrapperElements:n,updateViewService:i,trackScrollDirection:o,interactions:a})=>{d(()=>{const{headerGridWrapperElement:i,topGridWrapperElement:s,leftGridWrapperElement:l,dataGridWrapperElement:u}=n(),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,r.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,r.current?.scrollTo({scrollLeft:s.scrollLeft}),o(t))},f=n=>{n.ctrlKey||(n.preventDefault(),u.scrollLeft+=n.deltaX,u.scrollTop+=n.deltaY,r.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(n))};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,r,n])})(x),cV(x),{gridSectionsWrapperRefs:{headerGridWrapperRef:t,topGridWrapperRef:r,leftGridWrapperRef:n,dataGridWrapperRef:i},gridRefs:{topGridRef:o,leftGridRef:a,dataGridRef:s},scrollDirectionRefs:{verticalScrollDirection:v,horizontalScrollDirection:y},scrollbarsDimensions:{verticalScrollbarWidth:u,horizontalScrollbarHeight:c,resetHorizontalScrollbarHeight:p}}},pV=()=>{const{layoutService:e}=g$(),{rect:t,pageInfo:r}=c$();return v(()=>{let{height:n}=t;return e.hasLimitedData&&(n-=22),r.shouldShowPagination&&(n-=41),{...t,height:n}},[t,e,r.shouldShowPagination])},fV=({children:e,style:t})=>io.jsx("div",{"data-testid":"fullSize",style:t,children:e}),hV=({children:e,style:t})=>{const{direction:r}=c$();return io.jsx("div",{"data-section-id":"GRID",style:{direction:r,display:"grid",...t},children:e})},mV=e=>e&&`scrollable-container--${e}`,gV=({children:e,style:t,origin:r},n)=>{const{interactions:i}=f$(),o=i.scroll?t:{overflow:"hidden"};return io.jsx("div",{"data-testid":"scrollable","data-key":mV(r),style:o,ref:n,children:e})};var vV=r.forwardRef(gV);const yV=({children:e,style:t})=>{const{direction:r}=c$();return io.jsx("div",{"data-testid":"sticky",style:{position:"sticky",top:0,["rtl"===r?"right":"left"]:0,...t},children:e})};var bV=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function xV(e,t){return e===t||!(!bV(e)||!bV(t))}function SV(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(!xV(e[r],t[r]))return!1;return!0}function wV(e,t){var r;void 0===t&&(t=SV);var n,i=[],o=!1;return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return o&&r===this&&t(a,i)||(n=e.apply(this,a),o=!0,r=this,i=a),n}}var CV="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function EV(e){cancelAnimationFrame(e.id)}function IV(e,t){var r=CV();var n={id:requestAnimationFrame(function i(){CV()-r>=t?e.call(null):n.id=requestAnimationFrame(i)})};return n}var DV=-1;function PV(e){if(void 0===e&&(e=!1),-1===DV||e){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",document.body.appendChild(t),DV=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return DV}var RV=null;function MV(e){if(void 0===e&&(e=!1),null===RV||e){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",r.direction="rtl";var n=document.createElement("div"),i=n.style;return i.width="100px",i.height="100px",t.appendChild(n),document.body.appendChild(t),t.scrollLeft>0?RV="positive-descending":(t.scrollLeft=1,RV=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),RV}return RV}var LV=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function AV(e){var t,r=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 n;return(n=e.call(this,t)||this)._instanceProps=m(n.props,ql(n)),n._resetIsScrollingTimeoutId=null,n._outerRef=void 0,n.state={instance:ql(n),isScrolling:!1,horizontalScrollDirection:"forward",scrollLeft:"number"==typeof n.props.initialScrollLeft?n.props.initialScrollLeft:0,scrollTop:"number"==typeof n.props.initialScrollTop?n.props.initialScrollTop:0,scrollUpdateWasRequested:!1,verticalScrollDirection:"forward"},n._callOnItemsRendered=void 0,n._callOnItemsRendered=wV(function(e,t,r,i,o,a,s,l){return n.props.onItemsRendered({overscanColumnStartIndex:e,overscanColumnStopIndex:t,overscanRowStartIndex:r,overscanRowStopIndex:i,visibleColumnStartIndex:o,visibleColumnStopIndex:a,visibleRowStartIndex:s,visibleRowStopIndex:l})}),n._callOnScroll=void 0,n._callOnScroll=wV(function(e,t,r,i,o){return n.props.onScroll({horizontalScrollDirection:r,scrollLeft:e,scrollTop:t,verticalScrollDirection:i,scrollUpdateWasRequested:o})}),n._getItemStyle=void 0,n._getItemStyle=function(e,t){var i,o=n.props,s=o.columnWidth,l=o.direction,u=o.rowHeight,c=n._getItemStyleCache(g&&s,g&&l,g&&u),f=e+":"+t;if(c.hasOwnProperty(f))i=c[f];else{var h=r(n.props,t,n._instanceProps),m="rtl"===l;c[f]=i={position:"absolute",left:m?void 0:h,right:m?h:void 0,top:p(n.props,e,n._instanceProps),height:d(n.props,e,n._instanceProps),width:a(n.props,t,n._instanceProps)}}return i},n._getItemStyleCache=void 0,n._getItemStyleCache=wV(function(e,t,r){return{}}),n._onScroll=function(e){var t=e.currentTarget,r=t.clientHeight,i=t.clientWidth,o=t.scrollLeft,a=t.scrollTop,s=t.scrollHeight,l=t.scrollWidth;n.setState(function(e){if(e.scrollLeft===o&&e.scrollTop===a)return null;var t=n.props.direction,u=o;if("rtl"===t)switch(MV()){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-r));return{isScrolling:!0,horizontalScrollDirection:e.scrollLeft<o?"forward":"backward",scrollLeft:u,scrollTop:c,verticalScrollDirection:e.scrollTop<a?"forward":"backward",scrollUpdateWasRequested:!1}},n._resetIsScrollingDebounced)},n._outerRefSetter=function(e){var t=n.props.outerRef;n._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},n._resetIsScrollingDebounced=function(){null!==n._resetIsScrollingTimeoutId&&EV(n._resetIsScrollingTimeoutId),n._resetIsScrollingTimeoutId=IV(n._resetIsScrolling,150)},n._resetIsScrolling=function(){n._resetIsScrollingTimeoutId=null,n.setState({isScrolling:!1},function(){n._getItemStyleCache(-1)})},n}El(t,e),t.getDerivedStateFromProps=function(e,t){return kV(e,t),v(e),null};var y=t.prototype;return y.scrollTo=function(e){var t=e.scrollLeft,r=e.scrollTop;void 0!==t&&(t=Math.max(0,t)),void 0!==r&&(r=Math.max(0,r)),this.setState(function(e){return void 0===t&&(t=e.scrollLeft),void 0===r&&(r=e.scrollTop),e.scrollLeft===t&&e.scrollTop===r?null:{horizontalScrollDirection:e.scrollLeft<t?"forward":"backward",scrollLeft:t,scrollTop:r,scrollUpdateWasRequested:!0,verticalScrollDirection:e.scrollTop<r?"forward":"backward"}},this._resetIsScrollingDebounced)},y.scrollToItem=function(e){var t=e.align,r=void 0===t?"auto":t,n=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=PV();void 0!==n&&(n=Math.max(0,Math.min(n,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!==n?u(this.props,n,r,m,this._instanceProps,x):m,scrollTop:void 0!==i?c(this.props,i,r,g,this._instanceProps,b):g})},y.componentDidMount=function(){var e=this.props,t=e.initialScrollLeft,r=e.initialScrollTop;if(null!=this._outerRef){var n=this._outerRef;"number"==typeof t&&(n.scrollLeft=t),"number"==typeof r&&(n.scrollTop=r)}this._callPropsCallbacks()},y.componentDidUpdate=function(){var e=this.props.direction,t=this.state,r=t.scrollLeft,n=t.scrollTop;if(t.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("rtl"===e)switch(MV()){case"negative":i.scrollLeft=-r;break;case"positive-ascending":i.scrollLeft=r;break;default:var o=i.clientWidth,a=i.scrollWidth;i.scrollLeft=a-o-r}else i.scrollLeft=Math.max(0,r);i.scrollTop=Math.max(0,n)}this._callPropsCallbacks()},y.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&EV(this._resetIsScrollingTimeoutId)},y.render=function(){var e=this.props,t=e.children,r=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?LV: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],P=I[1],R=[];if(i>0&&v)for(var M=D;M<=P;M++)for(var L=C;L<=E;L++)R.push(n(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 n(m||g||"div",{className:r,onScroll:this._onScroll,ref:this._outerRefSetter,style:ke({position:"relative",height:a,width:x,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},y)},n(c||d||"div",{children:R,ref:u,style:{height:A,pointerEvents:S?"none":void 0,width:k}}))},y._callPropsCallbacks=function(){var e=this.props,t=e.columnCount,r=e.onItemsRendered,n=e.onScroll,i=e.rowCount;if("function"==typeof r&&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 n){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,r=e.overscanColumnCount,n=e.overscanColumnsCount,a=e.overscanCount,s=e.rowCount,l=this.state,u=l.horizontalScrollDirection,c=l.isScrolling,d=l.scrollLeft,p=r||n||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,r=e.overscanCount,n=e.overscanRowCount,i=e.overscanRowsCount,o=e.rowCount,a=this.state,s=a.isScrolling,l=a.verticalScrollDirection,u=a.scrollTop,c=n||i||r||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 kV=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},OV=function(e,t){var r=e.rowCount,n=t.rowMetadataMap,i=t.estimatedRowHeight,o=t.lastMeasuredRowIndex,a=0;if(o>=r&&(o=r-1),o>=0){var s=n[o];a=s.offset+s.size}return a+(r-o-1)*i},qV=function(e,t){var r=e.columnCount,n=t.columnMetadataMap,i=t.estimatedColumnWidth,o=t.lastMeasuredColumnIndex,a=0;if(o>=r&&(o=r-1),o>=0){var s=n[o];a=s.offset+s.size}return a+(r-o-1)*i},TV=function(e,t,r,n){var i,o,a;if("column"===e?(i=n.columnMetadataMap,o=t.columnWidth,a=n.lastMeasuredColumnIndex):(i=n.rowMetadataMap,o=t.rowHeight,a=n.lastMeasuredRowIndex),r>a){var s=0;if(a>=0){var l=i[a];s=l.offset+l.size}for(var u=a+1;u<=r;u++){var c=o(u);i[u]={offset:s,size:c},s+=c}"column"===e?n.lastMeasuredColumnIndex=r:n.lastMeasuredRowIndex=r}return i[r]},NV=function(e,t,r,n){var i,o;return"column"===e?(i=r.columnMetadataMap,o=r.lastMeasuredColumnIndex):(i=r.rowMetadataMap,o=r.lastMeasuredRowIndex),(o>0?i[o].offset:0)>=n?_V(e,t,r,o,0,n):jV(e,t,r,Math.max(0,o),n)},_V=function(e,t,r,n,i,o){for(;i<=n;){var a=i+Math.floor((n-i)/2),s=TV(e,t,a,r).offset;if(s===o)return a;s<o?i=a+1:s>o&&(n=a-1)}return i>0?i-1:0},jV=function(e,t,r,n,i){for(var o="column"===e?t.columnCount:t.rowCount,a=1;n<o&&TV(e,t,n,r).offset<i;)n+=a,a*=2;return _V(e,t,r,Math.min(n,o-1),Math.floor(n/2),i)},FV=function(e,t,r,n,i,o,a){var s="column"===e?t.width:t.height,l=TV(e,t,r,o),u="column"===e?qV(t,o):OV(t,o),c=Math.max(0,Math.min(u-s,l.offset)),d=Math.max(0,l.offset-s+a+l.size);switch("smart"===n&&(n=i>=d-s&&i<=c+s?"auto":"center"),n){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=AV({getColumnOffset:function(e,t,r){return TV("column",e,t,r).offset},getColumnStartIndexForOffset:function(e,t,r){return NV("column",e,r,t)},getColumnStopIndexForStartIndex:function(e,t,r,n){for(var i=e.columnCount,o=e.width,a=TV("column",e,t,n),s=r+o,l=a.offset+a.size,u=t;u<i-1&&l<s;)u++,l+=TV("column",e,u,n).size;return u},getColumnWidth:function(e,t,r){return r.columnMetadataMap[t].size},getEstimatedTotalHeight:OV,getEstimatedTotalWidth:qV,getOffsetForColumnAndAlignment:function(e,t,r,n,i,o){return FV("column",e,t,r,n,i,o)},getOffsetForRowAndAlignment:function(e,t,r,n,i,o){return FV("row",e,t,r,n,i,o)},getRowOffset:function(e,t,r){return TV("row",e,t,r).offset},getRowHeight:function(e,t,r){return r.rowMetadataMap[t].size},getRowStartIndexForOffset:function(e,t,r){return NV("row",e,r,t)},getRowStopIndexForStartIndex:function(e,t,r,n){for(var i=e.rowCount,o=e.height,a=TV("row",e,t,n),s=r+o,l=a.offset+a.size,u=t;u<i-1&&l<s;)u++,l+=TV("row",e,u,n).size;return u},initInstanceProps:function(e,t){var r=e,n={columnMetadataMap:{},estimatedColumnWidth:r.estimatedColumnWidth||50,estimatedRowHeight:r.estimatedRowHeight||50,lastMeasuredColumnIndex:-1,lastMeasuredRowIndex:-1,rowMetadataMap:{}};return t.resetAfterColumnIndex=function(e,r){void 0===r&&(r=!0),t.resetAfterIndices({columnIndex:e,shouldForceUpdate:r})},t.resetAfterRowIndex=function(e,r){void 0===r&&(r=!0),t.resetAfterIndices({rowIndex:e,shouldForceUpdate:r})},t.resetAfterIndices=function(e){var r=e.columnIndex,i=e.rowIndex,o=e.shouldForceUpdate,a=void 0===o||o;"number"==typeof r&&(n.lastMeasuredColumnIndex=Math.min(n.lastMeasuredColumnIndex,r-1)),"number"==typeof i&&(n.lastMeasuredRowIndex=Math.min(n.lastMeasuredRowIndex,i-1)),t._getItemStyleCache(-1),a&&t.forceUpdate()},n},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.columnWidth,e.rowHeight}}),WV=function(e,t){return e};function $V(e){var t,r=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 n;return(n=e.call(this,t)||this)._instanceProps=u(n.props,ql(n)),n._outerRef=void 0,n._resetIsScrollingTimeoutId=null,n.state={instance:ql(n),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof n.props.initialScrollOffset?n.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},n._callOnItemsRendered=void 0,n._callOnItemsRendered=wV(function(e,t,r,i){return n.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:r,visibleStopIndex:i})}),n._callOnScroll=void 0,n._callOnScroll=wV(function(e,t,r){return n.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:r})}),n._getItemStyle=void 0,n._getItemStyle=function(e){var t,i=n.props,a=i.direction,s=i.itemSize,l=i.layout,u=n._getItemStyleCache(c&&s,c&&l,c&&a);if(u.hasOwnProperty(e))t=u[e];else{var d=r(n.props,e,n._instanceProps),p=o(n.props,e,n._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},n._getItemStyleCache=void 0,n._getItemStyleCache=wV(function(e,t,r){return{}}),n._onScrollHorizontal=function(e){var t=e.currentTarget,r=t.clientWidth,i=t.scrollLeft,o=t.scrollWidth;n.setState(function(e){if(e.scrollOffset===i)return null;var t=n.props.direction,a=i;if("rtl"===t)switch(MV()){case"negative":a=-i;break;case"positive-descending":a=o-r-i}return a=Math.max(0,Math.min(a,o-r)),{isScrolling:!0,scrollDirection:e.scrollOffset<a?"forward":"backward",scrollOffset:a,scrollUpdateWasRequested:!1}},n._resetIsScrollingDebounced)},n._onScrollVertical=function(e){var t=e.currentTarget,r=t.clientHeight,i=t.scrollHeight,o=t.scrollTop;n.setState(function(e){if(e.scrollOffset===o)return null;var t=Math.max(0,Math.min(o,i-r));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!1}},n._resetIsScrollingDebounced)},n._outerRefSetter=function(e){var t=n.props.outerRef;n._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},n._resetIsScrollingDebounced=function(){null!==n._resetIsScrollingTimeoutId&&EV(n._resetIsScrollingTimeoutId),n._resetIsScrollingTimeoutId=IV(n._resetIsScrolling,150)},n._resetIsScrolling=function(){n._resetIsScrollingTimeoutId=null,n.setState({isScrolling:!1},function(){n._getItemStyleCache(-1,null)})},n}El(t,e),t.getDerivedStateFromProps=function(e,t){return HV(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 r=this.props,n=r.itemCount,i=r.layout,o=this.state.scrollOffset;e=Math.max(0,Math.min(e,n-1));var s=0;if(this._outerRef){var l=this._outerRef;s="vertical"===i?l.scrollWidth>l.clientWidth?PV():0:l.scrollHeight>l.clientHeight?PV():0}this.scrollTo(a(this.props,e,t,o,this._instanceProps,s))},p.componentDidMount=function(){var e=this.props,t=e.direction,r=e.initialScrollOffset,n=e.layout;if("number"==typeof r&&null!=this._outerRef){var i=this._outerRef;"horizontal"===t||"horizontal"===n?i.scrollLeft=r:i.scrollTop=r}this._callPropsCallbacks()},p.componentDidUpdate=function(){var e=this.props,t=e.direction,r=e.layout,n=this.state,i=n.scrollOffset;if(n.scrollUpdateWasRequested&&null!=this._outerRef){var o=this._outerRef;if("horizontal"===t||"horizontal"===r)if("rtl"===t)switch(MV()){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&&EV(this._resetIsScrollingTimeoutId)},p.render=function(){var e=this.props,t=e.children,r=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?WV: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 P=E;P<=I;P++)D.push(n(t,{data:d,key:f(P,d),index:P,isScrolling:y?x:void 0,style:this._getItemStyle(P)}));var R=i(this.props,this._instanceProps);return n(m||g||"div",{className:r,onScroll:w,ref:this._outerRefSetter,style:ke({position:"relative",height:a,width:b,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},v)},n(l||u||"div",{children:D,ref:s,style:{height:S?"100%":R,pointerEvents:x?"none":void 0,width:S?R:"100%"}}))},p._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],r=e[1],n=e[2],i=e[3];this._callOnItemsRendered(t,r,n,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,r=e.overscanCount,n=this.state,i=n.isScrolling,o=n.scrollDirection,a=n.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,r),p=i&&"forward"!==o?1:Math.max(1,r);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 HV=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},VV=function(e,t,r){var n=e.itemSize,i=r.itemMetadataMap,o=r.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=n(l);i[l]={offset:a,size:u},a+=u}r.lastMeasuredIndex=t}return i[t]},BV=function(e,t,r,n,i){for(;n<=r;){var o=n+Math.floor((r-n)/2),a=VV(e,o,t).offset;if(a===i)return o;a<i?n=o+1:a>i&&(r=o-1)}return n>0?n-1:0},GV=function(e,t,r,n){for(var i=e.itemCount,o=1;r<i&&VV(e,r,t).offset<n;)r+=o,o*=2;return BV(e,t,Math.min(r,i-1),Math.floor(r/2),n)},UV=function(e,t){var r=e.itemCount,n=t.itemMetadataMap,i=t.estimatedItemSize,o=t.lastMeasuredIndex,a=0;if(o>=r&&(o=r-1),o>=0){var s=n[o];a=s.offset+s.size}return a+(r-o-1)*i},YV=$V({getItemOffset:function(e,t,r){return VV(e,t,r).offset},getItemSize:function(e,t,r){return r.itemMetadataMap[t].size},getEstimatedTotalSize:UV,getOffsetForIndexAndAlignment:function(e,t,r,n,i,o){var a=e.direction,s=e.height,l=e.layout,u=e.width,c="horizontal"===a||"horizontal"===l?u:s,d=VV(e,t,i),p=UV(e,i),f=Math.max(0,Math.min(p-c,d.offset)),h=Math.max(0,d.offset-c+d.size+o);switch("smart"===r&&(r=n>=h-c&&n<=f+c?"auto":"center"),r){case"start":return f;case"end":return h;case"center":return Math.round(h+(f-h)/2);default:return n>=h&&n<=f?n:n<h?h:f}},getStartIndexForOffset:function(e,t,r){return function(e,t,r){var n=t.itemMetadataMap,i=t.lastMeasuredIndex;return(i>0?n[i].offset:0)>=r?BV(e,t,i,0,r):GV(e,t,Math.max(0,i),r)}(e,r,t)},getStopIndexForStartIndex:function(e,t,r,n){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=VV(e,t,n),d=r+u,p=c.offset+c.size,f=t;f<a-1&&p<d;)f++,p+=VV(e,f,n).size;return f},initInstanceProps:function(e,t){var r={itemMetadataMap:{},estimatedItemSize:e.estimatedItemSize||50,lastMeasuredIndex:-1};return t.resetAfterIndex=function(e,n){void 0===n&&(n=!0),r.lastMeasuredIndex=Math.min(r.lastMeasuredIndex,e-1),t._getItemStyleCache(-1),n&&t.forceUpdate()},r},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.itemSize}});function KV(e,t){for(var r in e)if(!(r in t))return!0;for(var n in t)if(e[n]!==t[n])return!0;return!1}var XV=["style"],JV=["style"];function ZV(e,t){var r=e.style,n=Oe(e,XV),i=t.style,o=Oe(t,JV);return!KV(r,i)&&!KV(n,o)}const QV=10,eB=(e,t)=>e.current===OF.Backward?t:0,tB=(e,t,r,n)=>{for(let i=r;i<r+n;i++){const r=e.at(i);if(void 0===r||void 0===r.at(t))return!0}return!1},rB=(e,t)=>e.qLeft+e.qWidth===t.qLeft&&e.qTop===t.qTop&&e.qHeight===t.qHeight,nB=({pageInfo:e,measureData:t,pageTop:r,qHeight:n,startLeft:i,endLeft:o})=>{const a=[],s=e.page*e.rowsPerPage;for(let e=i;e<o;e++)if(tB(t,e,r,n)){const t=a[a.length-1],i={qLeft:e,qTop:r+s,qWidth:1,qHeight:n};void 0!==t&&rB(t,i)?t.qWidth+=i.qWidth:a.push(i)}return a},iB=({pageInfo:e,measureData:t,scrollDirection:r,viewService:n,minBufferStartLeft:i,minBufferEndLeft:o,columnEndIndex:a})=>{const{gridRowStartIndex:s,gridHeight:l}=n,u=r.current===OF.Backward?Math.max(0,i-25):o,c=Math.min(u+25,a);return nB({pageInfo:e,measureData:t,startLeft:u,endLeft:c,pageTop:s,qHeight:l})},oB=({pageInfo:e,measureData:t,scrollDirection:r,layoutService:n,viewService:i})=>{const{startLeft:o,endLeft:a,pageTop:s,qHeight:l}=((e,t,r)=>{const{gridColumnStartIndex:n,gridRowStartIndex:i,gridWidth:o,gridHeight:a}=t,s=e.size.x,l=eB(r,QV),u=Math.max(n-l,0);return{startLeft:u,endLeft:u+Math.min(o+QV,s-u),pageTop:i,qHeight:a}})(n,i,r),u=nB({pageInfo:e,measureData:t,startLeft:o,endLeft:a,pageTop:s,qHeight:l});return u.length>0?[...u,...iB({pageInfo:e,measureData:t,scrollDirection:r,viewService:i,minBufferStartLeft:o,minBufferEndLeft:a,columnEndIndex:n.size.x})]:u},aB=(e,t,r,n)=>{const i=e[r];if(void 0===i)return!0;for(let e=t;e<t+n;e++){if(void 0===i[e])return!0}return!1},sB=(e,t)=>e.qTop+e.qHeight===t.qTop&&e.qLeft===t.qLeft&&e.qWidth===t.qWidth,lB=({startTop:e,endTop:t,qLeft:r,qWidth:n,measureData:i,pageInfo:o})=>{const a=[],s=o.page*o.rowsPerPage;for(let o=e;o<t;o++)if(aB(i,r,o,n)){const e=a.at(-1),t={qLeft:r,qTop:o+s,qWidth:n,qHeight:1};void 0!==e&&sB(e,t)?e.qHeight+=t.qHeight:a.push(t)}return a},uB=({pageInfo:e,measureData:t,scrollDirection:r,viewService:n})=>{const{startTop:i,endTop:o,qLeft:a,qWidth:s}=((e,t,r)=>{const{gridColumnStartIndex:n,gridRowStartIndex:i,gridWidth:o,gridHeight:a}=t,s=eB(r,QV),l=Math.max(i-s,0);return{startTop:l,endTop:l+Math.min(a+QV,e.rowsOnCurrentPage-l),qLeft:n,qWidth:o}})(e,n,r),l=lB({startTop:i,endTop:o,qLeft:a,qWidth:s,measureData:t,pageInfo:e});if(l.length>0){const n=r.current===OF.Backward?Math.max(0,i-25):o,u=Math.min(n+25,e.rowsOnCurrentPage),c=lB({startTop:n,endTop:u,qLeft:a,qWidth:s,measureData:t,pageInfo:e});return[...l,...c]}return l},cB=async(e,t,r,n,i,o,a,s)=>{const{gridColumnStartIndex:l,gridRowStartIndex:u,gridWidth:c,gridHeight:d}=i;let p=[],f=[];o.current!==OF.None&&(p=uB({pageInfo:n,measureData:r,scrollDirection:o,viewService:i})),a.current!==OF.None&&(f=oB({pageInfo:n,measureData:r,scrollDirection:a,layoutService:t,viewService:i})),o.current===OF.None&&a.current===OF.None&&(p=lB({measureData:r,pageInfo:n,qLeft:l,qWidth:c,startTop:u,endTop:u+d}));const h=e.fetchPages([...p,...f]);s.isDownloadedAsPDForImage&&s.waitForPromise(h)},dB=function(e){var t,r,n,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];r=s;var u=Date.now()-o,c=function(){o=Date.now(),n=0,e.apply(t,r)};n||(u>=i?c():n=setTimeout(c,i-u))}}(cB,100),pB=V_(cB,75),fB=(e,t,r=!1)=>void 0!==e&&(e.isLeafNode||r&&e.isLeftColumn?e.mainAxisPageCoord===t:e.mainAxisPageCoord+e.leafCount-1===t),hB=({style:e,index:t,isLastRow:r,isLastColumn:n,showLastBorder:i,isLeftColumn:o,showTotalCellDivider:a})=>{const{direction:s}=c$(),{styleService:{grid:{border:l,divider:u}}}=g$();return io.jsx("div",{style:{...e,...az,...cz(r,n,l,s,i),...pz({bottomDivider:a&&o,rightDivider:a&&!o,borderColor:u})},"data-testid":"empty-cell","data-index":t})},mB=({children:e,verticalAlign:t,width:r,right:n,isLeftColumn:i})=>{const{layoutService:{isIndentModeEnabled:o}}=g$(),a=i&&o;return io.jsx("div",{"data-key":"sticky-cell-container",style:{display:"flex",flexDirection:"row",width:r,maxWidth:"100%",maxHeight:"100%",position:"sticky",left:4,top:0,bottom:0,right:n,...!a&&{alignItems:t,alignSelf:t,overflow:"hidden"}},children:e})},gB=e=>{const{type:t,imageSize:r}=e;return t!==CF.Image||"fill"!==r&&"fitWidth"!==r?"fit-content":"100%"},vB=e=>"number"==typeof e&&!Number.isNaN(+e),yB=e=>"string"==typeof e&&e.length>0||"number"==typeof e?+e:NaN,bB=x((e,t)=>io.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:io.jsx("path",{d:"M7.5 8.5H2v-1h5.5V2h1v5.5H14v1H8.5V14h-1z"})})),xB=x((e,t)=>io.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:io.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"})})),SB=x((e,t)=>io.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:[io.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"}),io.jsx("use",{fillRule:"evenodd"})]})),wB=x((e,t)=>io.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:io.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"})})),CB=x((e,t)=>io.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:io.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"})})),EB=x((e,t)=>io.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:io.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"})})),IB=x((e,t)=>io.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:io.jsx("path",{d:"M2 7.5h12v1H2z"})})),DB=x((e,t)=>io.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:io.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"})})),PB=x((e,t)=>io.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:io.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"})})),RB=x((e,t)=>io.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:io.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"})})),MB=x((e,t)=>io.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:io.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"})})),LB=x((e,t)=>io.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:io.jsx("path",{d:"m6 10 7-7 2 2-7 7-2 2-5-5 2-2z"})})),AB=x((e,t)=>io.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:io.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"})})),kB=x((e,t)=>io.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:io.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"})})),OB=x((e,t)=>io.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:io.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"})})),qB={m:LB,"ï":RB,R:x((e,t)=>io.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:io.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:AB,T:kB,U:OB,P:PB,Q:EB,"è":x((e,t)=>io.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:io.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"})})),"¢":wB,"©":SB,"23F4":CB,2013:MB,"&":DB,add:bB,"minus-2":IB,dot:xB},TB=({size:e,iconKey:t,color:r,pvStyle:n})=>{const i=t&&qB[t];return i&&io.jsx("div",{"data-testid":"representation-indicator-icon",style:{color:r,height:e,...n},children:io.jsx(i,{style:{height:e}})})},NB=(e,t)=>e.max===e.min?.5:(t-e.min)/(e.max-e.min),_B=(e,t,r)=>{const n=e.paletteColors?e.paletteColors[t]:e.localPaletteColors[t];return r.getColorPickerColor(n)},jB=(e,t,r)=>{const n={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 r=e.limits&&e.limits.concat().sort((e,t)=>e.value-t.value);return{lowerLimit:r&&t>0?r[t-1]:{value:0,gradient:!1},upperLimit:r&&r[t]?r[t]:{value:1,gradient:!1}}})(e,t),s=((e,t,r,n,i)=>{const{upperLimit:o,lowerLimit:a}=e,{previousColor:s,nextColor:l}=t,u=n===o.value?1:(n-a.value)/(o.value-a.value);return a.gradient&&o.gradient?n-a.value<o.value-n?{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[r].color,t:n}})(a,n,t,r,e);return xN(e.localPaletteColors[t].color??"").blend(xN(s.color??""),s.t)},FB=(e,t,r)=>{const n=((e,t)=>{const{limits:r}=e;return r&&(e.limits=r.sort((e,t)=>e.value-t.value),e.limits=r.map(e=>({...e,value:NB(t,e.value)}))),e})({...e},t),i=n.paletteColors||n.localPaletteColors;return i&&(n.localPaletteColors=i.concat().map((e,t)=>({color:_B(n,t,r)}))),n},zB=(e,t,r,n)=>{const i=FB(e,r,n),{localPaletteColors:o}=i;if(t<=0)return o[0].color;if(t>=1)return o[o.length-1].color;const a=((e,t)=>{let r="",n=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>=n&&t<o){r=jB(e,a,t);break}n=o}return r})(i,t);return a},WB=(e,t)=>{const r=(e=>e.map(e=>e.value??e).sort((e,t)=>e-t))(e),n=r.some(e=>!vB(e));return 0===r.length||n?(e=>{const t=0===e?0:.5*e;return{min:e-t,max:e+t}})(t):1===r.length?((e,t)=>{const r=e[0]-t;if(0===r||!vB(r)){const e=0===t?.5:Math.abs(.5*t);return{min:t-e,max:t+e}}return r>0?{min:t-.5*Math.abs(t),max:e[0]+2*r}:{min:e[0]+2*r,max:t+.5*Math.abs(t)}})(r,t):((e,t)=>{let r=e[e.length-1]-e[0];return r=r>0?r:1,{min:Math.min(t,e[0])-r/2,max:Math.max(t,e[e.length-1])+r/2}})(r,t)},$B=(e,t)=>{const{limits:r}=e.segments;if(!r)return;const n=((e,t)=>{const{min:r,max:n}=WB(e,t),i=Math.abs(t);return{min:r??t-i,max:n??t+i}})(r,t),i=((e,t,r)=>{const{limits:n,paletteColors:i,localPaletteColors:o}=e.segments;if(!n||!vB(t))return 0;let a=r&&vB(r)?Math.min(r,t):0;const s=n.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,n.min);return{limitRange:n,limitPaletteColorIndex:i}},HB=e=>"flex-start"===e?"flex-end":"flex-start",VB=(e,t,r,n)=>{const i=e.indicatorConditionalColoring;if(!i)return;const o=$B(i,t),a=((e,t,r,n)=>{const{segments:i}=e;if(!i||!r)return;const{limits:o}=i;if(!o?.length||!((e,t)=>!(!e||0===e.length||!(e[t]?.gradient??e[t-1]?.gradient)))(o,r.limitPaletteColorIndex))return _B(i,r.limitPaletteColorIndex,n);const a=NB(r.limitRange,t);return zB(i,a,r.limitRange,n)})(i,t,o,n),s=i.segments.paletteColors[o?.limitPaletteColorIndex||0].icon,{indicator:l}=e;let u=l?.position||"right";return"rtl"===r&&(u="right"===u?"left":"right"),{color:a,iconKey:s,position:u}},BB=({representation:e,cellValue:t,textStyle:r})=>{const{styleService:n}=g$(),{theme:i}=f$(),{direction:o}=c$(),{text:a,indicator:s}=e,{showTextValues:l,applySegmentColors:u}=s??{},c=VB(e,t,o,i),{fontSize:d,fontFamily:p,fontStyle:f,fontWeight:h,textDecoration:m}=n.measureValues,g={fontSize:d,fontFamily:p,fontStyle:f,fontWeight:h,textDecoration:m},v=parseInt(d||JF,10),{iconKey:y,color:b,position:x}=c||{},S={display:"flex",paddingTop:2};return l?io.jsxs("div",{"data-key":"representation-indicator",style:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"4px",overflow:r?.overflow,color:u?b:r?.color},children:["left"===x&&TB({size:v,iconKey:y,color:b,pvStyle:S}),io.jsx("span",{style:{paddingTop:4,overflow:r?.overflow,textOverflow:r?.textOverflow,whiteSpace:"nowrap",direction:t<0?"ltr":void 0,...g},children:a}),"right"===x&&TB({size:v,iconKey:y,color:b,pvStyle:S})]}):(S.paddingTop=5,TB({size:v,iconKey:y,color:b,pvStyle:S}))},GB=(e,t,r)=>{if(e?.auto)return t;switch(e?.align){case"center":return"center";case"left":return"rtl"===r?"flex-end":"flex-start";case"right":return"rtl"===r?"flex-start":"flex-end";default:return t}},UB=(e,t)=>{let{textAlign:r}=t.getDimensionInfo(e.dimensionInfoIndex)??{};return e.isPseudoDimension&&void 0!==e.visibleMeasureInfoIndex&&({labelTextAlign:r}=t.visibleMeasureInfo.at(e.visibleMeasureInfoIndex)??{}),r?.auto||void 0===r?"left":r.align},YB=(e,t,r,n,i)=>{if(i)return;const o=e.representation,a=BH({isLeftColumn:r,layoutService:t,representation:o}),s=r?"flex-start":"center",l=e.representation.resolvedImagePosition?.horizontal;if(e.representation.type===CF.Image)return a&&l&&"center"!==l&&"rtl"===n?HB(l):l??s;if(e.isPseudoDimension&&void 0!==e.visibleMeasureInfoIndex){const{labelTextAlign:r}=t.visibleMeasureInfo[e.visibleMeasureInfoIndex]??{};return GB(r,s,n)}const{textAlign:u}=t.getDimensionInfo(e.dimensionInfoIndex)??{};return GB(u,s,n)},KB=e=>!!e.target?.getAttribute("class")?.includes(bT),XB=(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:r}=t.payload,n=Math.min(r,e.activeSelection.startIndex),i=Math.max(r,e.activeSelection.endIndex);if(n===e.activeSelection.startIndex&&i===e.activeSelection.endIndex)return e;const o={...e.activeSelection,startIndex:n,endIndex:i};return o.clientSelectedCells=(e=>{const{getCellFromIndex:t,startIndex:r,endIndex:n,clientSelectedCells:i}=e,o=new Map(i);for(let e=r;e<=n;e++){const r=t(e);"N"===r?.ref.qType&&o.set(r.ref.qElemNo,r)}return o})(o),{...e,activeSelection:o}}default:return e}},JB=e=>null!==e.target?.closest("[data-prevent-selection]"),ZB=e=>"A"===e.target?.tagName,QB=({startIndex:e,getCellFromIndex:t,cell:r})=>({type:"mousedown",payload:{activeSelection:{startIndex:e,endIndex:e,getCellFromIndex:t,clientSelectedCells:(new Map).set(r.ref.qElemNo,r)},selectedField:{selectionCellType:r.selectionCellType,index:"L"===r.selectionCellType?r.x:r.y}}});const eG=u({createMouseDownHandler:()=>()=>{},createMouseOverHandler:()=>()=>{},createPointerUpHandler:()=>()=>{},isSelected:()=>!1,isActive:!1,isLocked:()=>!1}),tG=()=>h(eG),rG=({children:e,selections:t})=>{const r=function(e){const{updatePageInfo:t}=c$(),r=e.isActive(),[n,i]=c(XB,{engineSelectedCells:null,selectedField:null,activeSelection:null});d(()=>{const r=()=>{i({type:"clearSelections"})},n=()=>{r(),t({page:0})};return e.on("deactivated",r),e.on("canceled",r),e.on("confirmed",n),e.on("cleared",r),()=>{e.removeListener("deactivated",r),e.removeListener("canceled",r),e.removeListener("confirmed",n),e.removeListener("cleared",r)}},[e,t]);const o=f(async()=>{if(!n.activeSelection)return;var t,r;1===n.activeSelection.clientSelectedCells.size&&(t=n.engineSelectedCells,(r=n.activeSelection).clientSelectedCells.forEach((e,n)=>{t?.has(n)&&(r.clientSelectedCells.delete(n),t.delete(n))}));const o=new Map([...n.engineSelectedCells??new Map,...n.activeSelection.clientSelectedCells]);try{i({type:"mouseup",payload:{engineSelectedCells:o}}),await e.select({method:"selectPivotCells",params:[b$,Array.from(o,([,e])=>({qType:e.selectionCellType,qRow:e.y,qCol:e.x}))]})}catch(e){console.error(e),i({type:"mouseup",payload:{engineSelectedCells:n.engineSelectedCells}})}},[n,e]);d(()=>{if(n.activeSelection)return document.addEventListener("mouseup",o),()=>{document.removeEventListener("mouseup",o)}},[o,n.activeSelection]);const a=f((e,t)=>r=>{const n=t(e);KB(r)||JB(r)||ZB(r)||!(e=>1===e.buttons)(r)||!n||i(QB({startIndex:e,getCellFromIndex:t,cell:n}))},[]),s=f(t=>async()=>{n.activeSelection&&(e.isActive()||await e.begin([b$]),i({type:"mouseover",payload:{index:t}}))},[n.activeSelection,e]),l=f((e,t)=>r=>{if("touch"!==r.pointerType)return;const n=t(e);KB(r)||JB(r)||ZB(r)||!n||(i(QB({startIndex:e,getCellFromIndex:t,cell:n})),o())},[o]),u=f(e=>!(!n.engineSelectedCells?.size&&!n.activeSelection?.clientSelectedCells.size||!n.selectedField||e.selectionCellType===n.selectedField.selectionCellType&&("L"===e.selectionCellType?n.selectedField.index===e.x:n.selectedField.index===e.y)),[n.activeSelection?.clientSelectedCells.size,n.engineSelectedCells?.size,n.selectedField]),p=f(e=>!u(e)&&(n.engineSelectedCells?.has(e.ref.qElemNo)||!!n.activeSelection?.clientSelectedCells.has(e.ref.qElemNo)),[u,n.activeSelection?.clientSelectedCells,n.engineSelectedCells]);return v(()=>({isSelected:p,isActive:r,isLocked:u,createMouseDownHandler:a,createMouseOverHandler:s,createPointerUpHandler:l}),[p,r,u,a,s,l])}(t);return io.jsx(eG.Provider,{value:r,children:e})},nG=e=>"fill"===e.representation.imageSize,iG=(e,t)=>{let r=e.isLeftColumn?"flex-start":"center";return e.isLeftColumn&&nG(e)&&t&&(r="center"),e.representation.type!==CF.Image||nG(e)?r:e.representation.resolvedImagePosition?.vertical};var oG=function(e){return e.Background="background",e.Color="color",e.FontWeight="fontWeight",e.FontStyle="fontStyle",e.TextDecoration="textDecoration",e}(oG||{});const aG={brighter:.5,darker:.3,opacity:.03},sG=(e,{cell:t,styleService:r})=>{if(e===oG.Background||e===oG.Color){const r=t.expressionColor[e];if(r)return r}return t.isNull?r.nullValues[e]:t.isPseudoDimension?r.measureLabels[e]:t.isTotal?r.totalValues[e]:r.dimensionValues[e]},lG=({styleService:e,isCellSelected:t,cell:r,isCellLocked:n})=>{if(t)return e.selectedColors.background;const i=sG(oG.Background,{cell:r,styleService:e});return!n||!i||r.isPseudoDimension||r.isEmpty||r.isNull||r.isTotal?sG(oG.Background,{cell:r,styleService:e}):`repeating-linear-gradient(\n -45deg,\n ${ej(o=i,aG)} 0px 2px,\n ${o} 0px 4px\n ) border-box`;var o},uG=({cell:e,styleService:t,isCellSelected:r})=>r?t.selectedColors.color:sG(oG.Color,{cell:e,styleService:t}),cG=({cell:e,styleService:t})=>{const{qCanCollapse:r,qCanExpand:n}=e.ref,i=sG(oG.FontWeight,{cell:e,styleService:t});return void 0===i&&(n||r)?QF:i},dG=({cell:e,styleService:t})=>sG(oG.FontStyle,{cell:e,styleService:t}),pG=({cell:e,styleService:t})=>sG(oG.TextDecoration,{cell:e,styleService:t}),fG=e=>e?"pointer":"default",hG=({expandOrCollapse:e,cell:t})=>r=>{e?.(t.y,t.x),r.stopPropagation()},mG=(e,t)=>{if(!e.isLeftColumn||e.representation.type===CF.Image)return{padding:4};return{padding:4,marginTop:t.dimensionValueTextHeight/2-6.5-4}},gG=({cell:e,isLeftColumn:t,isCellSelected:r})=>{const{styleService:n,layoutService:i}=g$(),{interactions:o}=f$(),{isActive:a}=tG(),{dataModel:s}=FH();if(!e.ref.qCanExpand&&!e.ref.qCanCollapse)return null;const l=!o.active||a||!s,u=uG({cell:e,styleService:n,isCellSelected:r}),c=a?.4:1,d=e.ref.qCanExpand?SW:xW;let p;p=e.ref.qCanExpand?t?s.expandLeft:s.expandTop:t?s.collapseLeft:s.collapseTop;const f=BH({isLeftColumn:t,layoutService:i,representation:e.representation});return io.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,...mG(e,n),...f&&{alignSelf:iG(e)}},onClick:l?void 0:hG({cell:e,expandOrCollapse:p})})},vG=e=>{switch(e){case"fitHeight":case"fill":case"alwaysFit":return"100%";case"originalSize":return"fit-content";default:return"auto"}},yG=(e,t,r)=>{if("alwaysFit"===e&&t&&!r)return"fit-content";switch(e){case"fitHeight":return"auto";case"originalSize":return"fit-content";case"alwaysFit":return r?"unset":"100%";default:return"100%"}},bG=(e,t)=>{if("alwaysFit"===e)switch(t?.vertical){case"flex-start":return"center top";case"flex-end":return"center bottom";default:return"center center"}},xG=({representation:e,canExpandOrCollapse:t,leafCount:r,isLeftColumn:n,styleService:i,layoutService:o,isMeasureCell:a})=>{const{isIndentModeEnabled:s}=o,l=BH({isLeftColumn:n,layoutService:o,representation:e}),u=t?21:0,c=e.imageBox?.width??24;let d=`calc(100% - ${u}px)`,p=i.headerCellHeight;n&&l&&(d=c),(a||n)&&(p=i.contentCellHeight);let f=p;switch(n&&void 0!==r&&!s&&(f=p*Math.max(r,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}}},SG=e=>{if("alwaysFit"===e)return"contain"},wG=({suffix:e,delimeter:t})=>` ${e?t:""} ${e}`.trim(),CG=({imageSize:e,resolvedImagePosition:t,isImagesInIndentModeEnabled:r,isMeasureCell:n})=>({width:yG(e,r,n),height:vG(e),objectFit:SG(e),objectPosition:bG(e,t),...r&&"alwaysFit"===e?{"max-width":"100%"}:{}}),EG=({representation:e,textStyle:t,isMeasureCell:r})=>{const{imageRef:n,onLoad:i}=(()=>{const{downloadService:e}=g$(),t=l(null),{promise:r,resolve:n}=v(()=>Sz(),[]);return d(()=>(e.isDownloadedAsPDForImage&&(e.waitForPromise(r),t.current?.complete&&n()),()=>{n()}),[t,e,r,n]),{onLoad:f(()=>{n()},[n]),imageRef:t}})(),{layoutService:{isIndentModeEnabled:o}}=g$(),{url:a,text:s,imageSize:u,resolvedImagePosition:c}=e,{overflow:p,...h}=t;return io.jsx("img",{src:a,alt:s,style:{...CG({imageSize:u,resolvedImagePosition:c,isImagesInIndentModeEnabled:o,isMeasureCell:r}),...h},onLoad:i,ref:n})},IG=({representation:e,textStyle:t,canExpandOrCollapse:r,leafCount:n,isLeftColumn:i=!1,imageContainerHorizontalAlignment:o,isMeasureCell:a})=>{const{styleService:s,layoutService:l}=g$(),{resolvedImagePosition:u}=e;return io.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",...xG({representation:e,canExpandOrCollapse:r,leafCount:n,styleService:s,layoutService:l,isLeftColumn:i,isMeasureCell:a})},children:io.jsx(EG,{representation:e,textStyle:t,isMeasureCell:!0})})},DG={display:"flex",flexDirection:"row",alignItems:"center"},PG={alignItems:"center",display:"flex",flexDirection:"row",backgroundClip:"padding-box"},RG=(e,t,r,n)=>t?{...PG,...e.nullValues}:r?{...DG,color:e.totalValues.color,background:n??e.totalValues.background}:{...DG,color:e.measureValues.color,background:n??e.measureValues.background},MG=(e,t,r,n,i)=>{const{fontFamily:o,fontSize:a}=e.measureValues,s={...sz,...!r&&lz(e.grid.lineClamp),...t&&{color:t},fontFamily:o,fontSize:a};if(i){const{fontWeight:t,fontStyle:r,textDecoration:n}=e.nullValues;return{...s,fontWeight:t,fontStyle:r,textDecoration:n}}if(n){const{fontWeight:t,fontStyle:r,textDecoration:n}=e.totalValues;return{...s,fontWeight:t,fontStyle:r,textDecoration:n}}const{fontWeight:l,fontStyle:u,textDecoration:c}=e.measureValues;return{...s,fontWeight:void 0===l?QF:l,fontStyle:u,textDecoration:c}},LG=({cell:e,representation:t,color:r,isTotalValueCell:n,cellHorizontalAlignment:i})=>{const{layoutService:o,styleService:a}=g$(),{isIndentModeEnabled:s}=o,l=e.isNull?o.getNullValueText():t.text,u=t.type===CF.Image,c=t.type===CF.Indicator,d=vB(yB(l)),p=MG(a,r,d,n,e.isNull);if(!s&&u&&!e.isNull||s&&u&&!e.isNull)return io.jsx(IG,{isMeasureCell:!0,textStyle:p,representation:t,imageContainerHorizontalAlignment:i});const f=yB(e.isNull?t.text:e.ref.qNum);return c&&vB(f)?io.jsx(BB,{representation:t,cellValue:f,textStyle:p}):io.jsx("span",{style:{padding:4,direction:d?"ltr":void 0,...p},children:l})},AG=(e,t)=>e?.[t]?.visibleMeasureInfoIndex??0,kG="flex-start",OG=(e,t)=>e.isNull?kG:t.type===CF.Image&&"fill"!==t.imageSize?t.resolvedImagePosition?.vertical:kG,qG=({columnIndex:e,rowIndex:t,style:r,data:n})=>{const{env:i}=f$(),{pageInfo:o,direction:a}=c$(),{styleService:s,layoutService:l}=g$(),{attrExprInfoIndexes:u,gridSectionsData:{measureData:c,leftDimensionData:d,topDimensionData:p},visibleDimensionsInfo:{visibleLeftDimensionInfo:h,visibleTopDimensionInfo:m}}=FH(),g=(()=>{const{layoutService:{isIndentModeEnabled:e}}=g$(),{gridSectionsData:{leftDimensionData:t,topDimensionData:r},visibleDimensionsInfo:{visibleLeftDimensionInfo:n,visibleTopDimensionInfo:i}}=FH(),o=n.length,a=i.length;return f((n,i)=>!(!r.grid.at(a-1)?.[n]?.isTotal&&!t.grid.at(e?0:o-1)?.[i]?.isTotal),[r,t,o,a,e])})(),v=(()=>{const{gridSectionsData:{topDimensionData:e},visibleDimensionsInfo:{visibleTopDimensionInfo:t}}=FH(),r=t.length;return f(t=>{const n=e.grid.at(r-1)?.[t];return fB(n,e.totalDividerIndex)},[e,r])})(),y=(()=>{const{layoutService:{isIndentModeEnabled:e}}=g$(),{gridSectionsData:{leftDimensionData:t},visibleDimensionsInfo:{visibleLeftDimensionInfo:r}}=FH(),n=r.length;return f(r=>{const i=e?0:n-1,o=t.grid.at(i)?.[r];return fB(o,t.totalDividerIndex,e)},[t,e,n])})(),{showLastBorder:b}=n,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 io.jsx(hB,{style:{...r,background:w},isLastRow:E,isLastColumn:I,showLastBorder:b,index:t,isLeftColumn:!1,showTotalCellDivider:!1});const D=l.hasPseudoDimOnLeft?AG(S,t):AG(x,e),P=l.visibleMeasureInfo[D],R=vH({cell:C.ref,representationProperties:P.representation,attrExprInfoIndex:u.measures[D],env:i,direction:a,conditionalColoring:P.conditionalColoring,enabledFeatures:{[CF.Image]:!0,[CF.Indicator]:!0}}),M=!C.isNull&&g(e,t),L=C.isNull?l.getNullValueText():R.text,A=!C.isNull||!Number.isNaN(+L),k=yH(u.measures[D],C.ref),O=((e,t,r,n,i)=>{const{textAlign:o}=t,a=n?"flex-end":"center";return e.isNull||r.type!==CF.Image?GB(o,a,i):r.resolvedImagePosition?.horizontal??"center"})(C,P,R,A,a),q={...RG(s,C.isNull,M,k.background),...cz(E,I,s.grid.border,a,b),...pz({bottomDivider:y(t),rightDivider:v(e),borderColor:s.grid.divider}),...az,padding:"0px 4px",display:"flex",justifyContent:O};return io.jsx("div",{className:vT,title:L,style:{...q,...r},"data-testid":"measure-value","data-row-index":t,"data-col-index":e,children:io.jsx(mB,{width:gB(R),verticalAlign:OG(C,R),children:io.jsx(LG,{cell:C,representation:R,isTotalValueCell:M,color:k.color,cellHorizontalAlignment:O})})})};var TG=r.memo(qG,ZV);const NG=(e,t)=>t.list[e]?.id??e.toString(),_G=({columnIndex:e,rowIndex:t,data:r})=>r.grid[t]?.[e]?.id??`${t}-${e}`,jG=e=>({...oz,overflow:"hidden",boxSizing:"content-box",borderWidth:"rtl"===e?"1px 1px 0px 0px":"1px 0px 0px 1px"}),FG=({dataGridRef:e,height:t,rowHightCallback:r,width:n,showLastBorder:i,getRightGridColumnWidth:o,verticalScrollDirection:a,horizontalScrollDirection:s})=>{const{pageInfo:l,direction:u}=c$(),{layoutService:c,styleService:{grid:{divider:d},contentCellHeight:p}}=g$(),{dataModel:h,gridSectionsData:{measureData:m}}=FH(),v={...jG(u),borderColor:d,willChange:"auto",userSelect:"none",WebkitUserSelect:"none"},y=(({verticalScrollDirection:e,horizontalScrollDirection:t})=>{const{pageInfo:r}=c$(),{downloadService:n,viewService:i,layoutService:o}=g$(),{dataModel:a,gridSectionsData:{leftDimensionData:s,topDimensionData:l,measureData:u}}=FH(),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===OF.None?0:QV),m=i.gridHeight+d+(e.current===OF.None?0:QV);let g=dB;m*h>1500&&(g=pB),g(a,o,u,r,i,e,t,n)},[i,o,a,u,e,t,r,c,d,n])})({verticalScrollDirection:a,horizontalScrollDirection:s});return jz(()=>{e.current&&e.current.resetAfterColumnIndex(0,!1)},[e,h,m]),g(()=>{e.current&&e.current.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!0})},[n,t,e,p,u]),0===c.size.x?null:io.jsx(zV,{"data-section-id":"DATA_GRID",ref:e,style:v,columnCount:c.size.x,columnWidth:o,height:t,rowCount:l.rowsOnCurrentPage,rowHeight:r,width:n,itemData:{showLastBorder:i,grid:m},onItemsRendered:y,estimatedRowHeight:r(),estimatedColumnWidth:o(),itemKey:_G,direction:u,children:TG})};var zG=b(FG);const WG=x((e,t)=>io.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:[io.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"}),io.jsx("use",{fillRule:"evenodd"})]})),$G=e=>{const[t,r]=m(!1);return jz(()=>{r(!1)},e),{isAdjustingWidth:t,setIsAdjustingWidth:r}},HG=()=>{const[e,t]=m(!1),{dataModel:r}=FH(),{interactions:n}=f$(),{isAdjustingWidth:i,setIsAdjustingWidth:o}=$G([r]);return{open:e,setOpen:t,handleOpenMenu:e=>{!n.active||KB(e)||i||t(!0)},setIsAdjustingWidth:o}};function VG(e,t){const r=t.expressionColor?.background??e.dimensionValues.background,n=t.isLeftColumn?e.header.background:r,i=n===rz.Transparent?aN.WHITE:n,o=xN(e.grid.border),a=xN(i);return a.isInvalid()||o.isInvalid()||1===o.a?e.grid.border:function(e,t,r){return xN(e.r+(t.r-e.r)*r,e.g+(t.g-e.g)*r,e.b+(t.b-e.b)*r,e.a+(t.a-e.a)*r)}(a,o,o.a).getRGB()}const BG=({cellInfo:e,columnWidth:t,isLastColumn:r,overrideLeftGridWidth:n,setIsAdjustingWidth:i,shouldApplyIndentModeColumnWidth:o,tableWidth:a})=>{const{direction:s}=c$(),{interactions:l,translator:u}=f$(),{isActive:c}=tG(),{dataModel:d}=FH(),{styleService:p}=g$(),[,f]=m({});if(!(e.canBeResized&&!!l.active&&!c))return null;const h=VG(p,e);return io.jsx(Vz,{isPivot:!0,columnWidth:t,isLastColumn:r,keyValue:`adjuster-${e.dimensionInfoIndex}`,hoverColor:h,updateWidthCallback:t=>{f({}),n&&void 0!==e.colIdx&&n(t,e.colIdx)},confirmWidthCallback:t=>{o?d.applyIndentModeColumnWidth({...t,pixels:Math.min((a??0)*HH,t.pixels??0)}):d.applyColumnWidth(t,e)},setIsAdjustingWidth:i,isLeftColumn:e.isLeftColumn,accessibilityRelatedArgs:{translator:u,columnLabel:e.label??""},direction:s})},GG=fl(Qu,{shouldForwardProp:e=>!["interactions","hoverBackground","background","shouldShowMenuIcon","isDimension"].includes(e)})(({interactions:e,background:t,hoverBackground:r,shouldShowMenuIcon:n,isDimension:i})=>({pointerEvents:i?"all":"none",position:"relative",display:"grid",gridTemplateColumns:n?"1fr 12px":"1fr",gap:8,alignItems:"center",cursor:e.active?"pointer":"default",background:t,"&&:hover":{background:e.active&&i?r:t}})),UG=fl("div",{shouldForwardProp:e=>!["direction"].includes(e)})(({direction:e})=>({position:"absolute",left:"rtl"!==e?0:void 0,bottom:0})),YG=fl("div",{shouldForwardProp:e=>"justifyContent"!==e})(({justifyContent:e})=>({...iz,justifyContent:e??iz.justifyContent,flexDirection:"row",overflow:"hidden",position:"relative",gap:8})),KG=fl("div")(()=>({...iz})),XG=fl("div",{shouldForwardProp:e=>!["fontSize","fontFamily","fontWeight","fontStyle","textDecoration","justifyContent"].includes(e)})(({fontSize:e,fontFamily:t,fontWeight:r,fontStyle:n,textDecoration:i,justifyContent:o})=>({display:"flex",justifyContent:o,alignSelf:"center",flexGrow:1,maxWidth:"100%",fontWeight:r,fontSize:e,fontFamily:t,fontStyle:n,textDecoration:i})),JG=fl(hp)(({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}})),ZG=fl(bp,{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}}})),QG=fl("span")({textOverflow:"ellipsis",overflow:"hidden"}),eU=fl("div",{shouldForwardProp:e=>"visible"!==e})(({visible:e})=>({opacity:e?1:0,width:WH,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"})),tU=fl("span",{shouldForwardProp:e=>!["padding","alignSelf"].includes(e)})(({padding:e,alignSelf:t})=>({padding:e,alignSelf:t,position:"sticky",top:0}));let rU=function(e){return e.Expand="Expand",e.Collapse="Collapse",e}({});const nU=(e,t)=>({qExcludeList:t===rU.Expand,qPos:{qDimName:e,qElemNo:[]}}),iU=`${b$}/qExpansionState`,oU=({model:e,qExpansionState:t,qEffectiveDimensionName:r,action:n})=>async()=>{const i=(({qEffectiveDimensionName:e,oldExpansionState:t,action:r})=>{const n=t?.findIndex(t=>t.qPos?.qDimName===e);return{expansionData:nU(e,r),index:n}})({qEffectiveDimensionName:r,oldExpansionState:t,action:n});await(async({model:e,newExpansionState:t,errorMsg:r})=>{const{index:n,expansionData:i}=t;try{let t,r=iU,o="Add";void 0===n?t=JSON.stringify([i]):-1===n?(r=`${iU}/-`,t=JSON.stringify(i)):(r=`${iU}/${n}`,o="Replace",t=JSON.stringify(i)),await e.applyPatches([{qPath:r,qOp:o,qValue:t}],!0)}catch(e){console.error(r,e)}})({model:e,newExpansionState:i,errorMsg:`Failed to ${n} dimension`})},aU=({model:e,effectivePropertiesService:t,cell:r})=>{if(void 0===r.qEffectiveDimensionName)return;const n={model:e,qExpansionState:t.qExpansionState,qEffectiveDimensionName:r.qEffectiveDimensionName};return{expandCallback:oU({...n,action:rU.Expand}),collapseCallback:oU({...n,action:rU.Collapse}),alwaysFullyExpanded:t.qAlwaysFullyExpanded}},sU={[MW.Sorting]:!0,[MW.Selections]:!0,[MW.Searching]:!0},lU=({cell:e,style:t,isFirstColumn:r,isLastColumn:n,isLastRow:i,changeSortOrder:o,iconsVisibilityStatus:a,columnWidth:s,overrideLeftGridWidth:u,shouldApplyIndentModeColumnWidth:c,tableWidth:d})=>{const p=l(null),{styleService:f,layoutService:h,effectivePropertiesService:m}=g$(),{app:g,interactions:v,embed:y,translator:b,model:x,env:S}=f$(),{fontSize:w,fontFamily:C,fontStyle:E,fontWeight:I,textDecoration:D,color:P,background:R,hoverBackground:M,activeBackground:L}=f.header,A=l(null),{shouldShowLockIcon:k,shouldShowMenuIcon:O}=a,{open:q,setOpen:T,handleOpenMenu:N,setIsAdjustingWidth:_}=HG(),{direction:j}=c$(),F={sortFromMenu:async(t,r)=>{t.stopPropagation(),await o(e,r)}},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=GB($,"flex-start",j);return io.jsxs(GG,{className:vT,title:e.label,interactions:v,background:q?L:R,hoverBackground:M,shouldShowMenuIcon:O,isDimension:e.isDim,style:{...t,...az,...dz(e,i,r,n,f.grid.border,j),color:P},"data-testid":"title-cell",onClick:N,children:[io.jsxs(YG,{children:[k?io.jsx(KG,{children:io.jsx(WG,{height:12})}):null,io.jsx(XG,{fontFamily:C,fontSize:w,fontStyle:E,fontWeight:I,textDecoration:D,justifyContent:H,children:io.jsx("span",{style:S.flags.isEnabled("VNA-135-WRAP_HEADER_TEXT")?{...sz,...lz(f.grid.columnLineClamp)}:sz,children:e.label})})]}),e.isDim?io.jsxs(io.Fragment,{children:[io.jsx(kW,{headerData:e,translator:b,anchorRef:A,open:q,setOpen:T,interactions:v,menuAvailabilityFlags:sU,sortRelatedArgs:F,searchRelatedArgs:z,selectionRelatedArgs:W,expandOrCollapseArgs:aU({model:x,effectivePropertiesService:m,cell:e}),shouldShowMenuIcon:O,model:x&&"setActiveField"in x?x:void 0,direction:j,isAccessibleHeader:!0}),io.jsx(UG,{ref:p,direction:j}),io.jsx(UG,{ref:A,direction:j})]}):null,io.jsx(BG,{cellInfo:{...e,isLeftColumn:!0},columnWidth:s,isLastColumn:n,overrideLeftGridWidth:u,setIsAdjustingWidth:_,shouldApplyIndentModeColumnWidth:c,tableWidth:d})]})},uU=({rowSpan:e,columnSpan:t})=>{const{styleService:r}=g$(),{direction:n}=c$();return e>0&&t>0?io.jsx("div",{style:{...oz,gridRowStart:1,gridRowEnd:`span ${e}`,gridColumnStart:1,gridColumnEnd:`span ${t}`,borderWidth:"rtl"===n?"0px 0px 0px 1px":"0px 1px 0px 0px",borderColor:r.grid.border,background:r.grid.background},"data-testid":"empty-header-cell"}):null},cU=x((e,t)=>io.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:io.jsx("path",{d:"m8 9 4.5-4.5L14 6l-4.5 4.5L8 12 2 6l1.5-1.5z"})})),dU=x((e,t)=>io.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:[io.jsx("path",{d:"m8 7-4.5 4.5L2 10l6-6 6 6-1.5 1.5z"}),io.jsx("use",{fillRule:"evenodd"})]})),pU=({tableWidth:e,leftGridWidth:t,overrideLeftGridWidth:r})=>{const{direction:n}=c$(),{styleService:i}=g$(),{interactions:o,translator:a}=f$(),{isActive:s}=tG(),{dataModel:l}=FH(),{setIsAdjustingWidth:u}=$G([l]);if(!(!!o.active&&!s))return null;const c=VG(i,{isLeftColumn:!0});return io.jsx(Vz,{isPivot:!0,isLastColumn:!0,isLeftColumn:!0,keyValue:"adjuster-indent-row",hoverColor:c,columnWidth:t,updateWidthCallback:t=>{r(Math.min(t,e*HH))},confirmWidthCallback:n=>{if(n.type===ST.FitToContent)return void l.applyIndentModeColumnWidth({type:ST.Auto});const i=Math.min(n.pixels??t,e*HH);r(i),l.applyIndentModeColumnWidth({type:ST.Pixels,pixels:i})},setIsAdjustingWidth:u,accessibilityRelatedArgs:{translator:a,columnLabel:a.get("SNPivotTable.IndentMode.Rows")},direction:n})},fU=x((e,t)=>io.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:io.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"})})),hU=({cell:e,changeSortOrder:t})=>{const r=l(null),n=l(null),{app:i,interactions:o,embed:a,translator:s,model:u}=f$(),{layoutService:c,effectivePropertiesService:d}=g$(),{open:p,setOpen:f,handleOpenMenu:h}=HG();return io.jsxs(ZG,{onClick:h,isActive:p,children:[io.jsx(QG,{children:e.label}),io.jsxs(eU,{className:"indent-mode-dropdown-more",visible:p,children:[io.jsx(fU,{}),e.isDim?io.jsxs(io.Fragment,{children:[io.jsx(kW,{headerData:e,translator:s,anchorRef:r,open:p,setOpen:f,interactions:o,menuAvailabilityFlags:sU,sortRelatedArgs:{sortFromMenu:async(r,n)=>{r.stopPropagation(),await t(e,n)}},searchRelatedArgs:{embed:a,listboxRef:n},selectionRelatedArgs:{app:i,qStateName:c.layout.qStateName},expandOrCollapseArgs:aU({model:u,effectivePropertiesService:d,cell:e}),shouldShowMenuIcon:!1,model:u&&"setActiveField"in u?u:void 0}),io.jsx(UG,{ref:n}),io.jsx(UG,{ref:r})]}):null]})]})},mU=({idx:e,menu:t,menuItems:r,isOnlyOneRow:n})=>{const i=r.at(-1)?.id===S$,o=e+1<r.length&&r[e+1]?.id===S$;return!(n&&i&&o)&&(t?.id!==S$&&e<r.length-1)},gU=({menuItems:e,changeSortOrder:t,overrideLeftGridWidth:r,leftGridWidth:n,tableWidth:i})=>{const{styleService:o}=g$(),{interactions:a,translator:s}=f$(),{dataModel:u,gridSectionsData:{headersData:c}}=FH(),[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}=$G([u]),D=e=>{e.stopPropagation()},P={height:h,gridColumn:`1 / span ${c.size.x}`,gridRow:c.size.y,zIndex:c.size.x-0};return io.jsxs(GG,{isDimension:!0,background:d?b:v,interactions:a,hoverBackground:y,style:{...P,...az,color:g},onClick:e=>{!a.active||KB(e)||I||p(!d)},"data-testid":"indentModeHeaderCellWrapper",children:[io.jsxs(YG,{justifyContent:"flex-start",children:[io.jsx(XG,{fontFamily:x,fontSize:S,fontStyle:w,fontWeight:C,textDecoration:E,justifyContent:"flex-start",children:io.jsx("span",{style:sz,children:s.get("SNPivotTable.IndentMode.Rows")})}),d?io.jsx(dU,{}):io.jsx(cU,{}),io.jsx(UG,{ref:f})]}),io.jsx(JG,{open:d,anchorEl:f.current,disableEnforceFocus:!0,children:e.map((r,n)=>[r&&r.id!==S$&&io.jsx("li",{role:"presentation",onClick:D,onKeyDown:D,children:io.jsx(hU,{cell:r,changeSortOrder:t})}),mU({idx:n,menu:r,menuItems:e,isOnlyOneRow:1===c.size.y})&&io.jsx(Kz,{"data-testid":"group-divider",variant:"middle"})])}),io.jsx(pU,{tableWidth:i,leftGridWidth:n,overrideLeftGridWidth:r})]})},vU=({layoutService:e,headersData:t,topRowIndex:r})=>e.isIndentModeEnabled&&t.size.x>1&&r+1===t.size.y,yU={display:"grid",width:"fit-content"},bU=({tableWidth:e,leftGridWidth:t,columnWidths:r,rowHight:n,changeSortOrder:i,getHeaderCellsIconsVisibilityStatus:o,height:a,overrideLeftGridWidth:s})=>{const{layoutService:l}=g$(),{gridSectionsData:{headersData:u}}=FH();return io.jsxs("div",{"data-testid":"HEADER_GRID",style:{...yU,gridTemplateColumns:r.map(e=>`${e}px`).join(" "),gridTemplateRows:u.data.map(()=>`${n}px`).join(" "),height:a},children:[u.size.y>1&&io.jsx(uU,{columnSpan:u.size.x-1,rowSpan:u.size.y-1}),u.data.map((a,c)=>{let d=[];if(vU({layoutService:l,headersData:u,topRowIndex:c})){const r=a.at(0);return Array.isArray(r)&&d.push(io.jsx(gU,{menuItems:r,changeSortOrder:i,overrideLeftGridWidth:s,leftGridWidth:t,tableWidth:e},r.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(io.jsx(lU,{style:{width:r[d],height:n,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:r[d],overrideLeftGridWidth:s,shouldApplyIndentModeColumnWidth:f,tableWidth:e},a.id))}return t},[]),d})]})};var xU=b(bU);const SU=(e,t,r,n)=>{const{layoutService:i}=g$();g(()=>{e.current?.forEach(e=>e?.resetAfterIndex(0,!0))},[e,t,r,n,i])},wU=(e,t)=>{jz(()=>{e.current?.forEach(e=>e?.resetAfterIndex(0,!1))},[e,t])},CU=(e,t)=>{const{isLast:r,list:n,listValues:i}=t;return r?n[e]:i[e]},EU=()=>{},IU=({children:e,reactWindowStyle:t,cell:r,data:n,showTotalCellDivider:i,isLastRow:o,isLastColumn:a,isLeftColumn:s,isCellSelected:l,isAdjustingWidth:u,index:c})=>{const{styleService:d,layoutService:p}=g$(),{interactions:f}=f$(),{direction:h}=c$(),{isLocked:m,createMouseDownHandler:g,createMouseOverHandler:v,createPointerUpHandler:y}=tG(),{showLastBorder:b}=n,x=m(r)||r.isLockedByDimension,S=!(x||!f.active||!f.select||r.isEmpty||r.isNull||r.isPseudoDimension||r.isTotal||u),w=S?g(c,e=>CU(e,n)):void 0,C=S?v(c):void 0,E=S?y(c,e=>CU(e,n)):void 0,I=BH({isLeftColumn:s,layoutService:p,representation:r.representation});return io.jsx("div",{className:vT,title:f.passive?r.representation.text:void 0,style:{...t,...cz(o,a,d.grid.border,h,b),...pz({bottomDivider:i&&s,rightDivider:i&&!s,borderColor:d.grid.divider}),...az,padding:"rtl"===h?"0px 0px 0px 4px":"0px 4px",cursor:fG(S),background:lG({styleService:d,isCellSelected:l,cell:r,isCellLocked:x}),zIndex:s?void 0:p.size.x-r.x,justifyContent:YB(r,p,s,h,I),display:"flex",...p.isIndentModeEnabled&&s&&{["rtl"===h?"paddingRight":"paddingLeft"]:Math.max(4,24*(r.indentLevel??0))},textAlign:UB(r,p)},"aria-hidden":"true",onMouseDown:w,onMouseOver:C,onPointerUp:E,onKeyUp:EU,role:"button",tabIndex:-1,"data-testid":"dimension-cell","data-x":r.x,"data-page-x":r.pageX,"data-y":r.y,"data-page-y":r.pageY,"data-cell-type":r.ref.qType,"data-dimension-info-index":r.dimensionInfoIndex,children:e})},DU=e=>{e.stopPropagation()},PU=({href:e,text:t,interactions:r,color:n})=>({href:e,title:t,rel:"noreferrer",target:"_blank",underline:"hover",onClick:DU,color:aN.LINK,style:{pointerEvents:r.active?"auto":"none",color:n??void 0,opacity:r.active&&r.passive||n?void 0:.4}}),RU=({href:e,text:t,interactions:r,color:n})=>io.jsx(bd,{...PU({href:e,text:t,interactions:r,color:n}),children:t}),MU=Y();MU.use(U),MU.renderer.prio(["canvas"]);const LU=(e,t)=>e&&"center"!==e&&"rtl"===t?HB(e):e,AU=({cell:e,representation:t,textStyle:r,imageContainerHorizontalAlignment:n})=>{const{imageBox:i}=t,{styleService:{grid:{lineClamp:o}}}=g$(),{direction:a}=c$();return io.jsxs("div",{style:{display:"grid",gridTemplateColumns:`${i?.width??24}px 1fr`,maxHeight:"fit-content",alignItems:"center",justifyContent:"flex-start",boxSizing:"border-box"},children:[io.jsx("div",{"data-key":"image-container--partial-image",style:{display:"flex",flexDirection:"column",justifyContent:iG(e),alignItems:LU(n,a),overflow:"hidden",boxSizing:"border-box",border:"4px solid transparent",width:i?.width??24,height:"100%"},children:io.jsx(EG,{representation:t,textStyle:r})}),io.jsx(tU,{padding:4/(o<=2?2:1),alignSelf:iG(e,!0),children:!!t.labelStructure&&wG(t.labelStructure)})]})},kU=({suffix:e,delimeter:t})=>` ${e?t:""} ${e}`,OU=({href:e,text:t,labelStructure:r,interactions:n,color:i})=>io.jsxs("span",{children:[io.jsx(bd,{...PU({href:e,text:t,interactions:n,color:i}),children:r?.maskedValue?r.maskedValue:r?.originalValue}),!!r&&kU(r)]}),qU=({children:e,textStyle:t,shouldEnableStickyText:r})=>io.jsx("span",{style:{...t,border:"4px solid transparent",boxSizing:"border-box",...r&&{alignSelf:"flex-start",position:"sticky",top:0}},children:e}),TU=({isLeftColumn:e,styleService:t,cell:r,isIndentModeEnabled:n})=>e?n?t.grid.lineClamp:Math.max(t.grid.lineClamp,r.leafCount*t.grid.lineClamp):t.grid.columnLineClamp,NU=({cell:e,isCellSelected:t,isLeftColumn:r})=>{const{direction:n}=c$(),{isActive:i}=tG(),{layoutService:o,styleService:a}=g$(),{interactions:s}=f$(),l=r&&o.isIndentModeEnabled;let u=r&&!e.isNull?(e=>{const{representation:{text:t,labelStructure:r}}=e;if(!r||!r.originalValue)return t;const{originalValue:n,maskedValue:i,suffix:o,delimeter:a}=r;return`${0!==i.length?i:n} ${o?a:""} ${o}`.trim()})(e):e.representation.text;if(e.isEmpty)return null;const c=(({cell:e,styleService:t,isCellSelected:r,isLeftColumn:n,isIndentModeEnabled:i})=>({...sz,...lz(TU({cell:e,isLeftColumn:n,styleService:t,isIndentModeEnabled:i})),color:uG({cell:e,styleService:t,isCellSelected:r}),fontWeight:cG({cell:e,styleService:t}),fontStyle:dG({cell:e,styleService:t}),textDecoration:pG({cell:e,styleService:t}),fontFamily:t.dimensionValues.fontFamily,fontSize:t.dimensionValues.fontSize}))({cell:e,styleService:a,isCellSelected:t,isLeftColumn:r,isIndentModeEnabled:o.isIndentModeEnabled});if(e.representation.type===CF.Image&&!e.isTotal&&!e.isNull){const{labelStructure:t}=e.representation,i=r&&t&&t.suffix?AU:IG;return io.jsx(i,{cell:e,representation:e.representation,leafCount:e.leafCount,textStyle:c,isLeftColumn:r,canExpandOrCollapse:e.ref.qCanCollapse||e.ref.qCanExpand,imageContainerHorizontalAlignment:YB(e,o,r,n)})}if(e.representation.type===CF.Link&&!i&&!e.isTotal){const t=r&&e.representation.labelStructure?OU:RU;u=io.jsx(t,{text:e.representation.text,labelStructure:e.representation.labelStructure,href:e.representation.url,interactions:s,color:e.expressionColor.color})}return io.jsx(qU,{shouldEnableStickyText:l,textStyle:{...c,...e.representation.type===CF.Image&&e.isNull?{alignSelf:iG(e)}:{}},children:u})},_U=({index:e,style:t,data:r})=>{const{styleService:n,layoutService:i}=g$(),{isSelected:o}=tG(),{isLeftColumn:a=!1,showLastBorder:s,itemCount:l,isLast:u,totalDividerIndex:c}=r,{isAdjustingWidth:d,setIsAdjustingWidth:p}=$G([r]),f=CU(e,r),h=a?e===l-1:u,m=a?u:e===l-1,g=fB(f,c,i.isIndentModeEnabled);if(void 0===f){const{background:r}=n.dimensionValues;return io.jsx(hB,{style:{...t,background:r},index:e,isLastRow:h,isLastColumn:m,showLastBorder:s,isLeftColumn:a,showTotalCellDivider:g})}const v=o(f);return io.jsxs(IU,{reactWindowStyle:t,isLeftColumn:a,isLastRow:h,isLastColumn:m,isCellSelected:v,showTotalCellDivider:g,cell:f,data:r,isAdjustingWidth:d,index:e,children:[io.jsxs(mB,{verticalAlign:iG(f),width:gB(f.representation),right:f.isLeftColumn?void 0:4,isLeftColumn:a,children:[io.jsx(gG,{isLeftColumn:a,isCellSelected:v,cell:f}),io.jsx(NU,{isLeftColumn:a,isCellSelected:v,cell:f})]}),io.jsx(BG,{cellInfo:{...f,columnWidthLocation:f.isPseudoDimension?LF.Measures:LF.Dimension},columnWidth:t.width,isLastColumn:m,setIsAdjustingWidth:p})]})};var jU=r.memo(_U,ZV);const FU=({list:e,listValues:t,isLastRow:r,getRightGridColumnWidth:n})=>i=>{const o=r?e[i]:t.at(i);return o&&0===i&&o.x>0?(o.leafCount+o.x+o.distanceToNextCell)*n():!r&&o?(o.leafCount+o.distanceToNextCell)*n():n(o?.x??i)},zU=(e,t,r,n)=>{const i=Object.values(e);let o,a=i.length;return n&&(a=r,o=t/a),{itemCount:a,estimatedItemSize:o,listValues:i}},WU=(e,t)=>r=>{e.current&&(e.current[t]=r)},$U={display:"flex",height:"fit-content",borderWidth:"1px 0px 0px 0px",...oz},HU={overflow:"hidden",willChange:"auto",flexShrink:0},VU=({leftGridRef:e,width:t,height:r,columnWidths:n,showLastBorder:i})=>{const{pageInfo:o,direction:a}=c$(),{layoutService:s,styleService:{contentCellHeight:l,grid:{divider:u}}}=g$(),{qSize:c}=s.layout.qHyperCube,{gridSectionsData:{leftDimensionData:d},visibleDimensionsInfo:{visibleLeftDimensionInfo:p}}=FH();wU(e,d),SU(e,t,r,l);const f=o.rowsOnCurrentPage*l,h={...$U,borderColor:u,width:n.reduce((e,t)=>e+t,0)};return io.jsx("div",{style:h,"data-section-id":"LEFT_GRID",children:d.grid.map((t,u)=>{const h=u===d.columnCount-1,m=w$(p[u]),{itemCount:g,estimatedItemSize:v,listValues:y}=zU(t,f,o.rowsOnCurrentPage,h),b=s.isIndentModeEnabled?()=>l:((e,t,r,n,i)=>o=>{const a=n?e[o]:t.at(o);if(a&&0===o&&a.pageY>0)return(a.leafCount+a.pageY+a.distanceToNextCell)*r;if(a&&a.leafCount>0){const e=a.y===i-a.leafCount;return(a.leafCount-(e?a.ref.qUp:0)+a.distanceToNextCell)*r}return r})(t,y,l,h,c.qcy);return io.jsx(YV,{ref:WU(e,u),style:{...HU,flexGrow:h?1:0,direction:a},height:r,width:n[u],itemCount:g,itemSize:b,layout:"vertical",itemData:{list:t,isLeftColumn:!0,isLast:h,itemCount:g,showLastBorder:i,listValues:y,totalDividerIndex:d.totalDividerIndex},itemKey:NG,estimatedItemSize:v,children:jU},m)})})};var BU=b(VU);const GU={overflow:"hidden",willChange:"auto"},UU=e=>({...oz,borderWidth:"rtl"===e?"0px 1px 0px 0px":"0px 0px 0px 1px"}),YU=({topGridRef:e,rowHightCallback:t,width:r,height:n,showLastBorder:i,getRightGridColumnWidth:o})=>{const{direction:a}=c$(),{layoutService:s,styleService:{grid:{divider:l},headerCellHeight:u}}=g$(),{gridSectionsData:{headersData:c,topDimensionData:d}}=FH(),p={...UU(a),borderColor:l,height:n};wU(e,d),SU(e,r,n,u);const f=s.size.x*o();return 0===d.rowCount?io.jsx("div",{style:{width:r,height:n,...UU(a)}}):io.jsx("div",{style:p,"data-section-id":"TOP_GRID",children:d.grid.map((n,l)=>{const u=l===d.rowCount-1,{itemCount:p,estimatedItemSize:h,listValues:m}=zU(n,f,s.size.x,u),g=(({layoutService:e,headersData:t,topRowIndex:r})=>{const n=t.data.at(r);if(void 0===n)return;const i=t.size.x-1,o=vU({layoutService:e,headersData:t,topRowIndex:r})?0:i,a=n.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?w$(g):`empty ${l}`;return io.jsx(YV,{ref:WU(e,l),style:GU,height:t(),width:r,itemCount:p,itemSize:FU({list:n,listValues:m,isLastRow:u,getRightGridColumnWidth:o}),layout:"horizontal",itemData:{list:n,isLast:u,itemCount:p,showLastBorder:i,listValues:m,totalDividerIndex:d.totalDividerIndex},itemKey:NG,estimatedItemSize:h,direction:a,children:jU},v)})})};var KU=b(YU);const XU=()=>{const{styleService:{headerCellHeight:e,contentCellHeight:t}}=g$(),r=pV(),n=(()=>{const{model:e}=f$(),t=f(async(t,r)=>{if(!e)throw new Error("No Model provided!");const{qReverseSort:n,dimensionInfoIndex:i,sortDirection:o}=t,a=[];if(r===o)return!1;a.push({qPath:`/qHyperCubeDef/qDimensions/${i}/qDef/qReverseSort`,qOp:"Replace",qValue:(!n).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}}=dV(),{leftGridWidth:y,leftGridFullWidth:b,leftGridColumnWidths:x,rightGridFullWidth:S,showLastRightBorder:w,getRightGridColumnWidth:C,getHeaderCellsIconsVisibilityStatus:E,overrideLeftGridWidth:I}=function({tableWidth:e,verticalScrollbarWidth:t,resetHorizontalScrollbarHeight:r}){const{layoutService:n,styleService:i}=g$(),{gridSectionsData:{headersData:o}}=FH(),{measureText:a}=qz(i.header,{allowLineBreaks:!1}),s=nV({tableWidth:e}),l=iV({tableWidth:e,verticalScrollbarWidth:t,leftGridWidth:s.leftGridWidth}),u=s.leftGridWidth+l.rightGridFullWidth+1<e,c=f((e,t,r="")=>{let i=e;n.isIndentModeEnabled&&(i=1,1===o.size.x&&(i=0));const l=s.leftGridColumnWidths[i];let u=!1,c=!1,d=a(r)+$H;return t&&d+WH<=l&&(c=!0,d+=WH),d+WH<=l&&(u=!0),{shouldShowMenuIcon:u,shouldShowLockIcon:c}},[s.leftGridColumnWidths,a,n.isIndentModeEnabled,o.size.x]);return d(()=>{const e=s.leftGridWidth===s.leftGridFullWidth,t=l.rightGridWidth===l.rightGridFullWidth;e&&t&&r()},[r,s.leftGridWidth,s.leftGridFullWidth,l.rightGridWidth,l.rightGridFullWidth]),{...s,...l,showLastRightBorder:u,getHeaderCellsIconsVisibilityStatus:c}}({tableWidth:r.width,verticalScrollbarWidth:m,resetHorizontalScrollbarHeight:v}),{gridScaffoldDimensions:D,headerGridDims:P,topGridDims:R,leftGridDims:M,dataGridDims:L,metadata:{everyThingFitsInTableRectHeight:A,scrollbarsVisibilityStatus:k}}=(({cellHeights:{headerCellHeight:e,contentCellHeight:t},horizontalWidths:{leftGridWidth:r,leftGridOriginalWidth:n,rightGridOriginalWidth:i},scrollBarsDimensions:{verticalScrollbarWidth:o,horizontalScrollbarHeight:a}})=>{const s=pV(),{pageInfo:l}=c$(),{gridSectionsData:{headersData:u,topDimensionData:c}}=FH(),d=Math.min(s.height*HH,Math.max(s.height*HH-25,s.height-t-a)),p=s.width*HH,f=l.rowsOnCurrentPage*t,h=Math.max(u.size.y,c.rowCount,1),m=e*h,g=e*h,v=Math.min(p,r),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,r)=>{const n=t+1+r+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:n}})(x,v,b),E=S-d,I=Math.max(E,S-x),D=Math.min(I,f),P=Math.min(I,f),R=m+1+f,{visibilityStatus:M,metadata:{hasLeftGridOverflowX:L,hasDataGridOverflowX:A}}=(e=>{const{gridScaffold:{X_AXIS:{leftSectionWidth:t,rightSectionWidth:r},Y_AXIS:{topSectionHeight:n,bottomSectionHeight:i}},gridOriginalWidth:{X_AXIS:{leftSectionFullWidth:o,rightSectionFullWidth:a},Y_AXIS:{topSectionFullHeight:s,bottomSectionFullHeight:l}}}=e,u=s>n,c=o>t,d=a>r,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:n,rightSectionFullWidth:i},Y_AXIS:{topSectionFullHeight:g,bottomSectionFullHeight:R-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:R-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:R-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,P-(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}=g$();d(()=>{e.notifyIsDoneRendering()})})(),io.jsxs(hV,{style:D,children:[io.jsx("div",{style:{overflow:"hidden"},ref:i,children:io.jsx(xU,{tableWidth:r.width,leftGridWidth:y,columnWidths:x,getHeaderCellsIconsVisibilityStatus:E,rowHight:e,height:P.height,changeSortOrder:n,overrideLeftGridWidth:I})}),io.jsx(vV,{style:k.topGrid,origin:kF.TopGrid,ref:o,children:io.jsx(fV,{style:R.fullSizeWrapper,children:io.jsx(yV,{style:R.stickyWrapper,children:io.jsx(KU,{topGridRef:l,rowHightCallback:O,...R.self,showLastBorder:{right:w,bottom:!1},getRightGridColumnWidth:C})})})}),io.jsx(vV,{style:k.leftGrid,origin:kF.LeftGrid,ref:a,children:io.jsx(fV,{style:M.fullSizeWrapper,children:io.jsx(yV,{style:M.stickyWrapper,children:io.jsx(BU,{leftGridRef:u,...M.self,columnWidths:x,showLastBorder:{right:!1,bottom:A}})})})}),io.jsx(vV,{style:k.dataGrid,origin:kF.DataGrid,ref:s,children:io.jsx(fV,{style:L.fullSizeWrapper,children:io.jsx(yV,{style:L.stickyWrapper,children:io.jsx(zG,{dataGridRef:c,rowHightCallback:q,...L.self,showLastBorder:{right:w,bottom:A},getRightGridColumnWidth:C,verticalScrollDirection:p,horizontalScrollDirection:h})})})})]})},JU=()=>{const{keyboard:e,theme:t,interactions:r,translator:n}=f$(),{pageInfo:i,updatePageInfo:o,rect:a}=c$(),{layoutService:s}=g$(),{layout:l,hasData:u}=s;return io.jsxs(io.Fragment,{children:[u?io.jsx(XU,{}):null,io.jsx(y$,{}),io.jsx(l$,{paginationNeeded:i.shouldShowPagination,handleChangePage:e=>{o({page:e})},pageInfo:i,totalRowCount:i.totalRowCount,totalColumnCount:0,totalPages:i.totalPages,keyboard:e,translator:n,theme:t,interactions:r,rect:a,layout:l})]})};const ZU=(e,{selections:t,baseObjects:n,coreServices:i,nebulaObjects:o},a)=>{const s=function(e){const t=kS();return t?.components?.MuiTable?.styleOverrides&&(t.components.MuiTable.styleOverrides.root={}),Ls({...t,direction:e})}(n.direction);e.render(io.jsx(r.StrictMode,{children:io.jsx(xw,{store:a,children:io.jsx(ml,{theme:s,children:io.jsx(h$,{...o,children:io.jsx(d$,{...n,children:io.jsx(rG,{selections:t,children:io.jsx(v$,{...i,children:io.jsx(zH,{children:io.jsx(JU,{})})})})})})})})}))};var QU=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}(QU||{}),eY=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}(eY||{}),tY=function(e){return e.Grid="grid",e.Divider="grid.divider",e.LabelName="label.name",e.LabelValue="label.value",e}(tY||{}),rY=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}(rY||{});const nY=e=>e?`${parseInt(e,10)}px`:void 0,iY=(e,t)=>{if(t){const r=e.getColorPickerColor(t);return"none"===r?rz.Transparent:r}},oY=(e,t)=>+(parseInt(e,10)*tz*t+8).toFixed(2),aY=(e,t)=>void 0===e?t:e.some(e=>"bold"===e)?QF:"normal",sY=e=>e?.some(e=>"italic"===e)?"italic":"normal",lY=e=>e?.some(e=>"underline"===e)?"underline":"none",uY=document.createElement("textarea");function cY(e){uY.value=e,document.body.appendChild(uY),uY.select(),uY.setSelectionRange(0,uY.value.length),document.execCommand("copy"),document.body.removeChild(uY)}uY.style.position="absolute",uY.style.left="-9999px",uY.setAttribute("readonly","");function dY(e){T?.((t,r)=>{const n=r.target,i=n?.closest(`.${vT}`);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,r,i)})})}const pY=({model:e,layoutService:t,effectivePropertiesService:r,translator:n})=>wz((i,o,a)=>{if(!e||r.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 r=((e,t)=>{const r=e?.getAttribute("data-dimension-info-index");if("string"==typeof r)return t.getDimensionInfo(+r)})(e,t);return"object"==typeof r?{qEffectiveDimensionName:r.qEffectiveDimensionName,label:r.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(b$,0,0,!0),await e.expandLeft(b$,0,0,!0)}catch(e){console.error("Failed to expand all",e)}}}))(s)),"string"==typeof u&&l.addItem((({model:e,effectivePropertiesService:t,qEffectiveDimensionName:r,label:n,translator:i})=>({icon:"lui-icon lui-icon--plus",translation:i.get("SNPivotTable.ContextMenu.ExpandDimension",[n??""]),tid:"expand-dimension",id:"expand-dimension",select:oU({model:e,qExpansionState:t.qExpansionState,qEffectiveDimensionName:r,action:rU.Expand})}))({model:s,effectivePropertiesService:r,qEffectiveDimensionName:u,label:c,translator:n})),l.addItem((e=>({icon:"lui-icon lui-icon--minus",translation:"Object.PivotTable.ContextMenu.CollapseAll",tid:"collapse-all",select:async()=>{try{await e.collapseTop(b$,0,0,!0),await e.collapseLeft(b$,0,0,!0)}catch(e){console.error("Failed to collapse all",e)}}}))(s)),"string"==typeof u&&l.addItem((({model:e,effectivePropertiesService:t,qEffectiveDimensionName:r,label:n,translator:i})=>({icon:"lui-icon lui-icon--minus",translation:i.get("SNPivotTable.ContextMenu.CollapseDimension",[n??""]),tid:"collapse-dimension",id:"collapse-dimension",select:oU({model:e,qExpansionState:t.qExpansionState,qEffectiveDimensionName:r,action:rU.Collapse})}))({model:s,effectivePropertiesService:r,qEffectiveDimensionName:u,label:c,translator:n}))},[e,t,r]),fY=(e,t)=>R(()=>(({layout:e})=>{const{qHyperCube:t,nullValueRepresentation:r,snapshotData:n}=e,{qNoOfLeftDims:i,qEffectiveInterColumnSortOrder:o,qMeasureInfo:a,qDimensionInfo:s}=t,l=!!n,u=n?.content?.rowsPerPage??15e3,c={x:Math.min(e.qHyperCube.qSize.qcx,ez),y:Math.min(e.qHyperCube.qSize.qcy,u)},d=o.slice(0,i),p=e=>d.some(t=>t===e),f=p(x$),h=new Map(o.map(e=>[s[e]??x$,e])),m=a.filter(e=>7005!==e.qError?.qErrorCode);return{layout:e,getNullValueText:()=>r?.text??"-",getMeasureInfoIndexFromCellIndex:(e,t=!1)=>{if(f)return 0;const r=e%m.length;return t?r:a.findIndex(e=>e===m[r])},getDimensionInfo:e=>e===x$?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:ST.Auto,pixels:xT.PixelsDefault,percentage:xT.PercentageDefault},searchSortFromDimension:"inherit"===e.search?.sorting}})({layout:e}),[e,t]),hY=({model:e,layoutService:t,viewService:r,pageInfo:n,rect:i})=>{const{layout:o,isSnapshot:a,triggerdByExpandOrCollapse:s}=t,l=(e=>{const t=Ez(e);return t.current=e,t})(OH(i));return Lz(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,r,n)=>!!e&&(t.gridColumnStartIndex+t.gridWidth>=n||t.gridRowStartIndex+t.gridHeight>=r))(s,r,i,u)||((e,t,r,n)=>{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(n,o.qcx)||l<Math.min(r,o.qcy)})(o,n,i,u))){const t=((e,t,r,n,i,o)=>{const a=n.page*n.rowsPerPage,s=Math.min(a+n.rowsPerPage,r.qcy),l=Math.min(ez,r.qcx);if(r.qcy<a)return null;let u=0,c=a;if(e){u=t.gridColumnStartIndex,c=a+t.gridRowStartIndex;const e=c+t.gridHeight,r=t.gridColumnStartIndex+t.gridWidth;e>s&&(c=Math.max(0,s-i)),r>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,r,o.qHyperCube.qSize,n,i,u);return t?e.getHyperCubePivotData(b$,qH(t)):[]}return t.qPivotDataPages},[o,a,e,r,n.page,n.rowsPerPage,l,s])},mY=({rowsPerPage:e,totalRowCount:t,page:r})=>Math.min(e,t-r*e),gY=(e,t,r=15e3)=>({rowsPerPage:r,totalPages:Math.max(1,Math.ceil(e/r)),totalRowCount:e,rowsOnCurrentPage:mY({rowsPerPage:r,totalRowCount:e,page:t})}),vY=15,yY=({layoutService:e,viewService:t,rect:r,model:n,pageInfo:i})=>{const{freeResize:o}=M();return N(async e=>{const o=e;if(!o.snapshotData||!n||o.snapshotData.content)return o;if("getHyperCubePivotData"in n){const{scrollTop:e,scrollLeft:a,leftGridScrollLeft:s,topGridScrollTop:l}=t,u=((e,t,r)=>{const{gridColumnStartIndex:n,gridRowStartIndex:i,gridWidth:o,gridHeight:a}=e,s=t.page*t.rowsPerPage,l=Math.max(n-vY,0),u=Math.max(s+i-vY,s,0),c=ez-l,d=s+t.rowsOnCurrentPage-u;if((e=>0===e.gridWidth&&0===e.gridHeight)(e)){const{maxNumberOfVisibleColumns:e,maxNumberOfVisibleRows:t}=OH(r);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,r),c=qH(u),d={qLeft:0,qTop:i.page*i.rowsPerPage,qWidth:1,qHeight:1};o.snapshotData.content={qPivotDataPages:await n.getHyperCubePivotData(b$,[d,...c]),scrollTop:e,scrollLeft:a,leftGridScrollLeft:s,topGridScrollTop:l,page:i.page,rowsPerPage:i.rowsPerPage},o.snapshotData.object.size.w=r.width,o.snapshotData.object.size.h=r.height}return o}),_(()=>({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:r.left,top:r.top,width:e.layout.snapshotData.object.size.w,height:e.layout.snapshotData.object.size.h}:r};var bY={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 xY=()=>{const e=j(),t=e.language();return R(()=>{!function(e){const t="SNPivotTable_LimitedData";e.get(t)===t&&Object.keys(bY).forEach(t=>{e.add(bY[t])})}(e)},[e]),{translator:e,language:t}},SY=e=>{const t=R(()=>vw(),[]),{flags:r}=e,n=F(),i=(e=>{const t=R(()=>Tz(e),[e]);return k(()=>()=>{t.unmount()},[t]),t})(n),o=z(),a=W(),s=$(),l=H(),u=V(),c=(()=>{const{viewState:e}=M(),t=Ez(new Set),r=void 0!==window.qlikprinting,{promise:n,resolve:i}=R(()=>Sz(),[]),o=wz(e=>{t.current.add(e)},[t]),a=wz(V_(async()=>{await Promise.all(t.current),t.current.clear(),i()},1e3),[i,t]);return L(async()=>{await n},[n]),R(()=>({viewState:e,isDownloadedAsPDForImage:r,notifyIsDoneRendering:a,waitForPromise:o}),[a,r,e,o])})(),d=((e,t)=>{const[r]=Lz(async()=>{if(void 0!==e&&!t.snapshotData&&"getEffectiveProperties"in e)return{...await e.getEffectiveProperties()}},[e,t]);return R(()=>{const e=void 0!==r?.qHyperCubeDef.qSortbyYValue&&1===Math.abs(r.qHyperCubeDef.qSortbyYValue),t=r?.qHyperCubeDef.qDimensions.map(e=>e.qDef?.qSortCriterias)??[];return{qAlwaysFullyExpanded:r?.qHyperCubeDef.qAlwaysFullyExpanded??!1,qExpansionState:r?.qHyperCubeDef.qExpansionState,isSortedByFirstMeasure:e,getSortCriteriaForDimension:e=>t[e]}},[r])})(a,o),p=fY(o,r),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=Mz(o,n),{translator:g,language:v}=xY(),{pageInfo:y,updatePageInfo:b}=((e,t)=>{const{size:r,layout:{qHyperCube:{qSize:n}}}=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:n.qcy>r.y&&!i,...gY(n.qcy,a,o)}}),l=e.layout.qHyperCube.qSize.qcy;return k(()=>{s(t=>({...t,...gY(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,r=mY({...a,page:e});s({...a,page:e,rowsOnCurrentPage:r})}},[a]),{pageInfo:a,updatePageInfo:e=>{s({...a,...e,rowsOnCurrentPage:mY({...a,...e})})}}})(p,c),x=((e,t,r)=>R(()=>((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}})(r,t.snapshotData),[r,e.page,t.snapshotData]))(y,o,c),S=yY({rect:G(),layoutService:p,viewService:x,model:a,pageInfo:y}),[w,C]=hY({model:a,layoutService:p,viewService:x,pageInfo:y,rect:S}),E=R(()=>((e,t)=>{const r=t.layout.components?.find(e=>"theme"===e.key),n=r?.header,i=r?.dimensionValues,o=r?.measureValues,a=r?.measureLabels,s=r?.totalValues,l=r?.nullValues,u=r?.grid,c=(t,r,n)=>e.getStyle(t,r,n),d=+(u?.[QU.LineClamp]??c(eY.Grid,tY.Grid,rY.LineClamp)??1),p=+(u?.[QU.ColumnLineClamp]??c(eY.Grid,tY.Grid,rY.ColumnLineClamp)??1),f=iY(e,n?.[QU.Background])??c(eY.Dimension,tY.LabelName,rY.BackgroundColor)??rz.Transparent,h={header:{fontSize:nY(n?.[QU.FontSize])??c(eY.Dimension,tY.LabelName,rY.FontSize)??JF,fontFamily:n?.[QU.FontFamily]??c(eY.Dimension,tY.LabelName,rY.FontFamily)??ZF,fontWeight:aY(n?.[QU.FontStyle],QF),fontStyle:sY(n?.[QU.FontStyle]),textDecoration:lY(n?.[QU.FontStyle]),color:iY(e,n?.[QU.FontColor])??c(eY.Dimension,tY.LabelName,rY.FontColor)??aN.TEXT,background:f,hoverBackground:ej(f,wT),activeBackground:ej(f,CT)},dimensionValues:{fontSize:nY(i?.[QU.FontSize])??c(eY.Dimension,tY.LabelValue,rY.FontSize)??JF,fontFamily:i?.[QU.FontFamily]??c(eY.Dimension,tY.LabelValue,rY.FontFamily)??ZF,fontWeight:aY(i?.[QU.FontStyle],void 0),fontStyle:sY(i?.[QU.FontStyle]),textDecoration:lY(i?.[QU.FontStyle]),color:iY(e,i?.[QU.FontColor])??c(eY.Dimension,tY.LabelValue,rY.FontColor)??aN.TEXT,background:iY(e,i?.[QU.Background])??c(eY.Dimension,tY.LabelValue,rY.BackgroundColor)??rz.Transparent},measureValues:{fontSize:nY(o?.[QU.FontSize])??c(eY.Measure,tY.LabelValue,rY.FontSize)??JF,fontFamily:o?.[QU.FontFamily]??c(eY.Measure,tY.LabelValue,rY.FontFamily)??ZF,fontWeight:aY(o?.[QU.FontStyle],"normal"),fontStyle:sY(o?.[QU.FontStyle]),textDecoration:lY(o?.[QU.FontStyle]),color:iY(e,o?.[QU.FontColor])??c(eY.Measure,tY.LabelValue,rY.FontColor)??rz.FontSecondary,background:iY(e,o?.[QU.Background])??c(eY.Measure,tY.LabelValue,rY.BackgroundColor)??rz.Transparent},measureLabels:{fontWeight:aY(a?.[QU.FontStyle],"normal"),fontStyle:sY(a?.[QU.FontStyle]),textDecoration:lY(a?.[QU.FontStyle]),color:iY(e,a?.[QU.FontColor])??c(eY.Measure,tY.LabelName,rY.FontColor)??rz.FontSecondary,background:iY(e,a?.[QU.Background])??c(eY.Measure,tY.LabelName,rY.BackgroundColor)??rz.Transparent},totalValues:{fontWeight:aY(s?.[QU.FontStyle],QF),fontStyle:sY(s?.[QU.FontStyle]),textDecoration:lY(s?.[QU.FontStyle]),color:iY(e,s?.[QU.FontColor])??c(eY.Total,tY.LabelValue,rY.FontColor)??aN.TEXT,background:iY(e,s?.[QU.Background])??c(eY.Total,tY.LabelValue,rY.BackgroundColor)??rz.Transparent},nullValues:{fontWeight:aY(l?.[QU.FontStyle],"normal"),fontStyle:sY(l?.[QU.FontStyle]),textDecoration:lY(l?.[QU.FontStyle]),color:iY(e,l?.[QU.FontColor])??c(eY.Null,tY.LabelValue,rY.FontColor)??aN.TEXT,background:iY(e,l?.[QU.Background])??c(eY.Null,tY.LabelValue,rY.BackgroundColor)??rz.NullValueBackground},grid:{columnLineClamp:p,lineClamp:d,border:iY(e,u?.[QU.Border])??c(eY.Grid,tY.Grid,rY.BorderColor)??rz.DividerLight,divider:iY(e,u?.[QU.Divider])??c(eY.Grid,tY.Divider,rY.BorderColor)??rz.DividerDark,background:iY(e,u?.[QU.Background])??c(eY.Grid,tY.Grid,rY.BackgroundColor)??rz.Transparent},selectedColors:Q_(e)};return h.headerCellHeight=Math.max(oY(h.header.fontSize,p),oY(h.dimensionValues.fontSize,p),32),h.contentCellHeight=Math.max(oY(h.measureValues.fontSize,d),oY(h.dimensionValues.fontSize,d),24),h.dimensionValueTextHeight=oY(h.dimensionValues.fontSize,1),h})(m,p),[m,p]),I=((e,t,r)=>{const[,n,i]=Lz(async()=>{const t=_N(r.flags),n=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,n,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,r]);return i?(console.warn("Failed to load fonts:",i),!0):!n})(m,o,e),{direction:D}=M();dY([pY({model:a,layoutService:p,effectivePropertiesService:d,translator:g})]),k(()=>{!C&&a&&!!w&&I&&ZU(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])},wY={version:"7.20.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:[]},CY=()=>({...wY,qHyperCubeDef:{...wY.qHyperCubeDef,qIndentMode:!1}})}}});