@nebula.js/sn-pivot-table 7.26.0 → 7.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api-specifications/properties.json +1 -1
- package/core/esm/index.js +4 -4
- package/dist/sn-pivot-table.js +10 -10
- package/dist/sn-pivot-table.systemjs.js +4 -4
- package/package.json +9 -9
- package/sn-pivot-table-ext/dist/sn-pivot-table.js +10 -10
- package/sn-pivot-table-ext/sn-pivot-table.qext +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @nebula.js/sn-pivot-table v7.
|
|
2
|
+
* @nebula.js/sn-pivot-table v7.27.0
|
|
3
3
|
* Copyright (c) 2026 QlikTech International AB
|
|
4
4
|
* Released under the MIT license.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
System.register(["react","react-dom","@nebula.js/stardust","picasso-plugin-q","picasso.js"],function(e,t){"use strict";var n,r,i,o,a,s,l,u,c,d,p,f,h,m,g,v,y,b,x,S,w,C,E,I,D,P,M,R,k,L,A,O,T,q,_,N,j,F,z,W,$,H,V,B,G,U,Y;return{setters:[function(e){n=e,r=e.forwardRef,i=e.useContext,o=e.default,a=e.isValidElement,s=e.cloneElement,l=e.Children,u=e.useRef,c=e.createElement,d=e.createContext,p=e.useReducer,f=e.useEffect,h=e.useDebugValue,m=e.useCallback,g=e.useState,v=e.useLayoutEffect,y=e.useMemo,b=e.useInsertionEffect,x=e.memo,S=e.startTransition,w=e.useImperativeHandle,C=e.PureComponent},function(e){E=e.default,I=e,D=e.flushSync},function(e){P=e.HyperCubeHandler,M=e.useMemo,R=e.useOptions,k=e.usePromise,L=e.useState,A=e.useEffect,O=e.useTheme,T=e.useInteractionState,q=e.onContextMenu,_=e.onTakeSnapshot,N=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:sG()},data:H_(e)},ext:ZN(e),component(){oG(e)}}});const K={black:"#000",white:"#fff"},X="#e57373",J="#ef5350",Z="#f44336",Q="#d32f2f",ee="#c62828",te="#f3e5f5",ne="#ce93d8",re="#ba68c8",ie="#ab47bc",oe="#9c27b0",ae="#7b1fa2",se="#e3f2fd",le="#90caf9",ue="#42a5f5",ce="#1976d2",de="#1565c0",pe="#4fc3f7",fe="#29b6f6",he="#03a9f4",me="#0288d1",ge="#01579b",ve="#81c784",ye="#66bb6a",be="#4caf50",xe="#388e3c",Se="#2e7d32",we="#1b5e20",Ce="#ffb74d",Ee="#ffa726",Ie="#ff9800",De="#f57c00",Pe="#e65100",Me={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 Re(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 ke=Object.freeze({__proto__:null,default:Re}),Le="$$material";function Ae(){return Ae=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ae.apply(null,arguments)}function Oe(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}var Te=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),qe="-ms-",_e="-moz-",Ne="-webkit-",je="comm",Fe="rule",ze="decl",We="@keyframes",$e=Math.abs,He=String.fromCharCode,Ve=Object.assign;function Be(e){return e.trim()}function Ge(e,t,n){return e.replace(t,n)}function Ue(e,t){return e.indexOf(t)}function Ye(e,t){return 0|e.charCodeAt(t)}function Ke(e,t,n){return e.slice(t,n)}function Xe(e){return e.length}function Je(e){return e.length}function Ze(e,t){return t.push(e),e}var Qe=1,et=1,tt=0,nt=0,rt=0,it="";function ot(e,t,n,r,i,o,a){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:Qe,column:et,length:a,return:""}}function at(e,t){return Ve(ot("",null,null,"",null,null,0),e,{length:-e.length},t)}function st(){return rt=nt>0?Ye(it,--nt):0,et--,10===rt&&(et=1,Qe--),rt}function lt(){return rt=nt<tt?Ye(it,nt++):0,et++,10===rt&&(et=1,Qe++),rt}function ut(){return Ye(it,nt)}function ct(){return nt}function dt(e,t){return Ke(it,e,t)}function pt(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 ft(e){return Qe=et=1,tt=Xe(it=e),nt=0,[]}function ht(e){return it="",e}function mt(e){return Be(dt(nt-1,yt(91===e?e+2:40===e?e+1:e)))}function gt(e){for(;(rt=ut())&&rt<33;)lt();return pt(e)>2||pt(rt)>3?"":" "}function vt(e,t){for(;--t&<()&&!(rt<48||rt>102||rt>57&&rt<65||rt>70&&rt<97););return dt(e,ct()+(t<6&&32==ut()&&32==lt()))}function yt(e){for(;lt();)switch(rt){case e:return nt;case 34:case 39:34!==e&&39!==e&&yt(rt);break;case 40:41===e&&yt(e);break;case 92:lt()}return nt}function bt(e,t){for(;lt()&&e+rt!==57&&(e+rt!==84||47!==ut()););return"/*"+dt(t,nt-1)+"*"+He(47===e?e:lt())}function xt(e){for(;!pt(ut());)lt();return dt(e,nt)}function St(e){return ht(wt("",null,null,null,[""],e=ft(e),0,[0],e))}function wt(e,t,n,r,i,o,a,s,l){for(var u=0,c=0,d=a,p=0,f=0,h=0,m=1,g=1,v=1,y=0,b="",x=i,S=o,w=r,C=b;g;)switch(h=y,y=lt()){case 40:if(108!=h&&58==Ye(C,d-1)){-1!=Ue(C+=Ge(mt(y),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:C+=mt(y);break;case 9:case 10:case 13:case 32:C+=gt(h);break;case 92:C+=vt(ct()-1,7);continue;case 47:switch(ut()){case 42:case 47:Ze(Et(bt(lt(),ct()),t,n),l);break;default:C+="/"}break;case 123*m:s[u++]=Xe(C)*v;case 125*m:case 59:case 0:switch(y){case 0:case 125:g=0;case 59+c:-1==v&&(C=Ge(C,/\f/g,"")),f>0&&Xe(C)-d&&Ze(f>32?It(C+";",r,n,d-1):It(Ge(C," ","")+";",r,n,d-2),l);break;case 59:C+=";";default:if(Ze(w=Ct(C,t,n,u,c,i,s,b,x=[],S=[],d),o),123===y)if(0===c)wt(C,t,w,w,x,o,d,s,S);else switch(99===p&&110===Ye(C,3)?100:p){case 100:case 108:case 109:case 115:wt(e,w,w,r&&Ze(Ct(e,w,w,0,0,i,s,b,i,x=[],d),S),i,S,d,s,r?x:S);break;default:wt(C,w,w,w,[""],S,0,s,S)}}u=c=f=0,m=v=1,b=C="",d=a;break;case 58:d=1+Xe(C),f=h;default:if(m<1)if(123==y)--m;else if(125==y&&0==m++&&125==st())continue;switch(C+=He(y),y*m){case 38:v=c>0?1:(C+="\f",-1);break;case 44:s[u++]=(Xe(C)-1)*v,v=1;break;case 64:45===ut()&&(C+=mt(lt())),p=ut(),c=d=Xe(b=C+=xt(ct())),y++;break;case 45:45===h&&2==Xe(C)&&(m=0)}}return o}function Ct(e,t,n,r,i,o,a,s,l,u,c){for(var d=i-1,p=0===i?o:[""],f=Je(p),h=0,m=0,g=0;h<r;++h)for(var v=0,y=Ke(e,d+1,d=$e(m=a[h])),b=e;v<f;++v)(b=Be(m>0?p[v]+" "+y:Ge(y,/&\f/g,p[v])))&&(l[g++]=b);return ot(e,t,n,0===i?Fe:s,l,u,c)}function Et(e,t,n){return ot(e,t,n,je,He(rt),Ke(e,2,-2),0)}function It(e,t,n,r){return ot(e,t,n,ze,Ke(e,0,r),Ke(e,r+1,-1),r)}function Dt(e,t){for(var n="",r=Je(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function Pt(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case ze:return e.return=e.return||e.value;case je:return"";case We:return e.return=e.value+"{"+Dt(e.children,r)+"}";case Fe:e.value=e.props.join(",")}return Xe(n=Dt(e.children,r))?e.return=e.value+"{"+n+"}":""}function Mt(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var Rt=function(e,t,n){for(var r=0,i=0;r=i,i=ut(),38===r&&12===i&&(t[n]=1),!pt(i);)lt();return dt(e,nt)},kt=function(e,t){return ht(function(e,t){var n=-1,r=44;do{switch(pt(r)){case 0:38===r&&12===ut()&&(t[n]=1),e[n]+=Rt(nt-1,t,n);break;case 2:e[n]+=mt(r);break;case 4:if(44===r){e[++n]=58===ut()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=He(r)}}while(r=lt());return e}(ft(e),t))},Lt=new WeakMap,At=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Lt.get(n))&&!r){Lt.set(e,!0);for(var i=[],o=kt(t,i),a=n.props,s=0,l=0;s<o.length;s++)for(var u=0;u<a.length;u++,l++)e.props[l]=i[s]?o[s].replace(/&\f/g,a[u]):a[u]+" "+o[s]}}},Ot=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function Tt(e,t){switch(function(e,t){return 45^Ye(e,0)?(((t<<2^Ye(e,0))<<2^Ye(e,1))<<2^Ye(e,2))<<2^Ye(e,3):0}(e,t)){case 5103:return Ne+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Ne+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ne+e+_e+e+qe+e+e;case 6828:case 4268:return Ne+e+qe+e+e;case 6165:return Ne+e+qe+"flex-"+e+e;case 5187:return Ne+e+Ge(e,/(\w+).+(:[^]+)/,Ne+"box-$1$2"+qe+"flex-$1$2")+e;case 5443:return Ne+e+qe+"flex-item-"+Ge(e,/flex-|-self/,"")+e;case 4675:return Ne+e+qe+"flex-line-pack"+Ge(e,/align-content|flex-|-self/,"")+e;case 5548:return Ne+e+qe+Ge(e,"shrink","negative")+e;case 5292:return Ne+e+qe+Ge(e,"basis","preferred-size")+e;case 6060:return Ne+"box-"+Ge(e,"-grow","")+Ne+e+qe+Ge(e,"grow","positive")+e;case 4554:return Ne+Ge(e,/([^-])(transform)/g,"$1"+Ne+"$2")+e;case 6187:return Ge(Ge(Ge(e,/(zoom-|grab)/,Ne+"$1"),/(image-set)/,Ne+"$1"),e,"")+e;case 5495:case 3959:return Ge(e,/(image-set\([^]*)/,Ne+"$1$`$1");case 4968:return Ge(Ge(e,/(.+:)(flex-)?(.*)/,Ne+"box-pack:$3"+qe+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Ne+e+e;case 4095:case 3583:case 4068:case 2532:return Ge(e,/(.+)-inline(.+)/,Ne+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Xe(e)-1-t>6)switch(Ye(e,t+1)){case 109:if(45!==Ye(e,t+4))break;case 102:return Ge(e,/(.+:)(.+)-([^]+)/,"$1"+Ne+"$2-$3$1"+_e+(108==Ye(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Ue(e,"stretch")?Tt(Ge(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==Ye(e,t+1))break;case 6444:switch(Ye(e,Xe(e)-3-(~Ue(e,"!important")&&10))){case 107:return Ge(e,":",":"+Ne)+e;case 101:return Ge(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ne+(45===Ye(e,14)?"inline-":"")+"box$3$1"+Ne+"$2$3$1"+qe+"$2box$3")+e}break;case 5936:switch(Ye(e,t+11)){case 114:return Ne+e+qe+Ge(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ne+e+qe+Ge(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ne+e+qe+Ge(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ne+e+qe+e+e}return e}var qt=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case ze:e.return=Tt(e.value,e.length);break;case We:return Dt([at(e,{value:Ge(e.value,"@","@"+Ne)})],r);case Fe:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Dt([at(e,{props:[Ge(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return Dt([at(e,{props:[Ge(t,/:(plac\w+)/,":"+Ne+"input-$1")]}),at(e,{props:[Ge(t,/:(plac\w+)/,":-moz-$1")]}),at(e,{props:[Ge(t,/:(plac\w+)/,qe+"input-$1")]})],r)}return""})}}],_t=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var r,i,o=e.stylisPlugins||qt,a={},s=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;s.push(e)});var l,u,c=[Pt,(u=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&u(e)})],d=function(e){var t=Je(e);return function(n,r,i,o){for(var a="",s=0;s<t;s++)a+=e[s](n,r,i,o)||"";return a}}([At,Ot].concat(o,c));i=function(e,t,n,r){l=n,function(e){Dt(St(e),d)}(e?e+"{"+t.styles+"}":t.styles),r&&(p.inserted[t.name]=!0)};var p={key:t,sheet:new Te({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:i};return p.sheet.hydrate(s),p};function Nt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function jt(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){var n=!1;try{n=this instanceof e}catch{}return n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var Ft,zt,Wt,$t,Ht={exports:{}},Vt={};function Bt(){return zt||(zt=1,Ht.exports=function(){if(Ft)return Vt;Ft=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:switch(e=e.type){case l:case u:case r:case o:case i:case d:return e;default:switch(e=e&&e.$$typeof){case s:case c:case h:case f:case a:return e;default:return p}}case n:return p}}}function x(e){return b(e)===u}return Vt.AsyncMode=l,Vt.ConcurrentMode=u,Vt.ContextConsumer=s,Vt.ContextProvider=a,Vt.Element=t,Vt.ForwardRef=c,Vt.Fragment=r,Vt.Lazy=h,Vt.Memo=f,Vt.Portal=n,Vt.Profiler=o,Vt.StrictMode=i,Vt.Suspense=d,Vt.isAsyncMode=function(e){return x(e)||b(e)===l},Vt.isConcurrentMode=x,Vt.isContextConsumer=function(e){return b(e)===s},Vt.isContextProvider=function(e){return b(e)===a},Vt.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Vt.isForwardRef=function(e){return b(e)===c},Vt.isFragment=function(e){return b(e)===r},Vt.isLazy=function(e){return b(e)===h},Vt.isMemo=function(e){return b(e)===f},Vt.isPortal=function(e){return b(e)===n},Vt.isProfiler=function(e){return b(e)===o},Vt.isStrictMode=function(e){return b(e)===i},Vt.isSuspense=function(e){return b(e)===d},Vt.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===u||e===o||e===i||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===f||e.$$typeof===a||e.$$typeof===s||e.$$typeof===c||e.$$typeof===g||e.$$typeof===v||e.$$typeof===y||e.$$typeof===m)},Vt.typeOf=b,Vt}()),Ht.exports}var Gt=function(){if($t)return Wt;$t=1;var e=Bt(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},i={};function o(n){return e.isMemo(n)?r:i[n.$$typeof]||t}i[e.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i[e.Memo]=r;var a=Object.defineProperty,s=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,c=Object.getPrototypeOf,d=Object.prototype;return Wt=function e(t,r,i){if("string"!=typeof r){if(d){var p=c(r);p&&p!==d&&e(t,p,i)}var f=s(r);l&&(f=f.concat(l(r)));for(var h=o(t),m=o(r),g=0;g<f.length;++g){var v=f[g];if(!(n[v]||i&&i[v]||m&&m[v]||h&&h[v])){var y=u(r,v);try{a(t,v,y)}catch(e){}}}}return t},Wt}(),Ut=Nt(Gt);function Yt(e,t,n){var r="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")}),r}var Kt=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},Xt=function(e,t,n){Kt(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+r:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}};var Jt={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},Zt=/[A-Z]|^ms/g,Qt=/_EMO_([^_]+?)_([^]*?)_EMO_/g,en=function(e){return 45===e.charCodeAt(1)},tn=function(e){return null!=e&&"boolean"!=typeof e},nn=Mt(function(e){return en(e)?e:e.replace(Zt,"-$&").toLowerCase()}),rn=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Qt,function(e,t,n){return an={name:t,styles:n,next:an},t})}return 1===Jt[e]||en(e)||"number"!=typeof t||0===t?t:t+"px"};function on(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var i=n;if(1===i.anim)return an={name:i.name,styles:i.styles,next:an},i.name;var o=n;if(void 0!==o.styles){var a=o.next;if(void 0!==a)for(;void 0!==a;)an={name:a.name,styles:a.styles,next:an},a=a.next;return o.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=on(e,t,n[i])+";";else for(var o in n){var a=n[o];if("object"!=typeof a){var s=a;null!=t&&void 0!==t[s]?r+=o+"{"+t[s]+"}":tn(s)&&(r+=nn(o)+":"+rn(o,s)+";")}else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var l=on(e,t,a);switch(o){case"animation":case"animationName":r+=nn(o)+":"+l+";";break;default:r+=o+"{"+l+"}"}}else for(var u=0;u<a.length;u++)tn(a[u])&&(r+=nn(o)+":"+rn(o,a[u])+";")}return r}(e,t,n);case"function":if(void 0!==e){var s=an,l=n(e);return an=s,on(e,t,l)}}var u=n;if(null==t)return u;var c=t[u];return void 0!==c?c:u}var an,sn=/label:\s*([^\s;{]+)\s*(;|$)/g;function ln(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,i="";an=void 0;var o=e[0];null==o||void 0===o.raw?(r=!1,i+=on(n,t,o)):i+=o[0];for(var a=1;a<e.length;a++){if(i+=on(n,t,e[a]),r)i+=o[a]}sn.lastIndex=0;for(var s,l="";null!==(s=sn.exec(i));)l+="-"+s[1];var u=function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+l;return{name:u,styles:i,next:an}}var un,cn,dn=!!n.useInsertionEffect&&n.useInsertionEffect,pn=dn||function(e){return e()},fn=dn||n.useLayoutEffect,hn=n.createContext("undefined"!=typeof HTMLElement?_t({key:"css"}):null),mn=hn.Provider,gn=function(e){return r(function(t,n){var r=i(hn);return e(t,r,n)})},vn=n.createContext({}),yn={}.hasOwnProperty,bn="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",xn=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Kt(t,n,r),pn(function(){return Xt(t,n,r)}),null},Sn=gn(function(e,t,r){var i=e.css;"string"==typeof i&&void 0!==t.registered[i]&&(i=t.registered[i]);var o=e[bn],a=[i],s="";"string"==typeof e.className?s=Yt(t.registered,a,e.className):null!=e.className&&(s=e.className+" ");var l=ln(a,void 0,n.useContext(vn));s+=t.key+"-"+l.name;var u={};for(var c in e)yn.call(e,c)&&"css"!==c&&c!==bn&&(u[c]=e[c]);return u.className=s,r&&(u.ref=r),n.createElement(n.Fragment,null,n.createElement(xn,{cache:t,serialized:l,isStringTag:"string"==typeof o}),n.createElement(o,u))}),wn=Sn,Cn=function(e,t){var r=arguments;if(null==t||!yn.call(t,"css"))return n.createElement.apply(void 0,r);var i=r.length,o=new Array(i);o[0]=wn,o[1]=function(e,t){var n={};for(var r in t)yn.call(t,r)&&(n[r]=t[r]);return n[bn]=e,n}(e,t);for(var a=2;a<i;a++)o[a]=r[a];return n.createElement.apply(null,o)};un=Cn||(Cn={}),cn||(cn=un.JSX||(un.JSX={}));var En=gn(function(e,t){var r=ln([e.styles],void 0,n.useContext(vn)),i=n.useRef();return fn(function(){var e=t.key+"-global",n=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),o=!1,a=document.querySelector('style[data-emotion="'+e+" "+r.name+'"]');return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),null!==a&&(o=!0,a.setAttribute("data-emotion",e),n.hydrate([a])),i.current=[n,o],function(){n.flush()}},[t]),fn(function(){var e=i.current,n=e[0];if(e[1])e[1]=!1;else{if(void 0!==r.next&&Xt(t,r.next,!0),n.tags.length){var o=n.tags[n.tags.length-1].nextElementSibling;n.before=o,n.flush()}t.insert("",r,n,!1)}},[t,r.name]),null});function In(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ln(t)}function Dn(){var e=In.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var Pn=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Mn=Mt(function(e){return Pn.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}),Rn=function(e){return"theme"!==e},kn=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?Mn:Rn},Ln=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},An=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Kt(t,n,r),pn(function(){return Xt(t,n,r)}),null},On=function e(t,r){var i,o,a=t.__emotion_real===t,s=a&&t.__emotion_base||t;void 0!==r&&(i=r.label,o=r.target);var l=Ln(t,r,a),u=l||kn(s),c=!u("as");return function(){var d=arguments,p=a&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==i&&p.push("label:"+i+";"),null==d[0]||void 0===d[0].raw)p.push.apply(p,d);else{var f=d[0];p.push(f[0]);for(var h=d.length,m=1;m<h;m++)p.push(d[m],f[m])}var g=gn(function(e,t,r){var i=c&&e.as||s,a="",d=[],f=e;if(null==e.theme){for(var h in f={},e)f[h]=e[h];f.theme=n.useContext(vn)}"string"==typeof e.className?a=Yt(t.registered,d,e.className):null!=e.className&&(a=e.className+" ");var m=ln(p.concat(d),t.registered,f);a+=t.key+"-"+m.name,void 0!==o&&(a+=" "+o);var g=c&&void 0===l?kn(i):u,v={};for(var y in e)c&&"as"===y||g(y)&&(v[y]=e[y]);return v.className=a,r&&(v.ref=r),n.createElement(n.Fragment,null,n.createElement(An,{cache:t,serialized:m,isStringTag:"string"==typeof i}),n.createElement(i,v))});return g.displayName=void 0!==i?i:"Styled("+("string"==typeof s?s:s.displayName||s.name||"Component")+")",g.defaultProps=t.defaultProps,g.__emotion_real=g,g.__emotion_base=s,g.__emotion_styles=p,g.__emotion_forwardProp=l,Object.defineProperty(g,"toString",{value:function(){return"."+o}}),g.withComponent=function(t,n){return e(t,Ae({},r,n,{shouldForwardProp:Ln(g,n,!0)})).apply(void 0,p)},g}}.bind(null);["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach(function(e){On[e]=On(e)});var Tn,qn,_n,Nn,jn,Fn={exports:{}};function zn(){if(qn)return Tn;qn=1;return Tn="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function Wn(){if(Nn)return _n;Nn=1;var e=zn();function t(){}function n(){}return n.resetWarningCache=t,_n=function(){function r(t,n,r,i,o,a){if(a!==e){var s=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 s.name="Invariant Violation",s}}function i(){return r}r.isRequired=r;var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o}}function $n(){return jn||(jn=1,Fn.exports=Wn()()),Fn.exports}var Hn,Vn,Bn=Nt($n()),Gn={exports:{}},Un={};var Yn=(Vn||(Vn=1,Gn.exports=function(){if(Hn)return Un;Hn=1;var e=o,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function s(e,n,o){var s,l={},u=null,c=null;for(s in void 0!==o&&(u=""+o),void 0!==n.key&&(u=""+n.key),void 0!==n.ref&&(c=n.ref),n)r.call(n,s)&&!a.hasOwnProperty(s)&&(l[s]=n[s]);if(e&&e.defaultProps)for(s in n=e.defaultProps)void 0===l[s]&&(l[s]=n[s]);return{$$typeof:t,type:e,key:u,ref:c,props:l,_owner:i.current}}return Un.Fragment=n,Un.jsx=s,Un.jsxs=s,Un}()),Gn.exports);const Kn=new Map;function Xn(e){const{styles:t,defaultTheme:n={}}=e,r="function"==typeof t?e=>{return t(null==(r=e)||0===Object.keys(r).length?n:e);var r}:t;return Yn.jsx(En,{styles:r})}
|
|
7
|
+
System.register(["react","react-dom","@nebula.js/stardust","picasso-plugin-q","picasso.js"],function(e,t){"use strict";var n,r,i,o,a,s,l,u,c,d,p,f,h,m,g,v,y,b,x,S,w,C,E,I,D,P,M,R,k,L,A,O,T,q,_,N,j,F,z,W,$,H,V,B,G,U,Y;return{setters:[function(e){n=e,r=e.forwardRef,i=e.useContext,o=e.default,a=e.isValidElement,s=e.cloneElement,l=e.Children,u=e.useRef,c=e.createElement,d=e.createContext,p=e.useReducer,f=e.useEffect,h=e.useDebugValue,m=e.useCallback,g=e.useState,v=e.useLayoutEffect,y=e.useMemo,b=e.useInsertionEffect,x=e.memo,S=e.startTransition,w=e.useImperativeHandle,C=e.PureComponent},function(e){E=e.default,I=e,D=e.flushSync},function(e){P=e.HyperCubeHandler,M=e.useMemo,R=e.useOptions,k=e.usePromise,L=e.useState,A=e.useEffect,O=e.useTheme,T=e.useInteractionState,q=e.onContextMenu,_=e.onTakeSnapshot,N=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:cG()},data:G_(e)},ext:tj(e),component(){lG(e)}}});const K={black:"#000",white:"#fff"},X="#e57373",J="#ef5350",Z="#f44336",Q="#d32f2f",ee="#c62828",te="#f3e5f5",ne="#ce93d8",re="#ba68c8",ie="#ab47bc",oe="#9c27b0",ae="#7b1fa2",se="#e3f2fd",le="#90caf9",ue="#42a5f5",ce="#1976d2",de="#1565c0",pe="#4fc3f7",fe="#29b6f6",he="#03a9f4",me="#0288d1",ge="#01579b",ve="#81c784",ye="#66bb6a",be="#4caf50",xe="#388e3c",Se="#2e7d32",we="#1b5e20",Ce="#ffb74d",Ee="#ffa726",Ie="#ff9800",De="#f57c00",Pe="#e65100",Me={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 Re(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 ke=Object.freeze({__proto__:null,default:Re}),Le="$$material";function Ae(){return Ae=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ae.apply(null,arguments)}function Oe(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}var Te=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),qe="-ms-",_e="-moz-",Ne="-webkit-",je="comm",Fe="rule",ze="decl",We="@keyframes",$e=Math.abs,He=String.fromCharCode,Ve=Object.assign;function Be(e){return e.trim()}function Ge(e,t,n){return e.replace(t,n)}function Ue(e,t){return e.indexOf(t)}function Ye(e,t){return 0|e.charCodeAt(t)}function Ke(e,t,n){return e.slice(t,n)}function Xe(e){return e.length}function Je(e){return e.length}function Ze(e,t){return t.push(e),e}var Qe=1,et=1,tt=0,nt=0,rt=0,it="";function ot(e,t,n,r,i,o,a){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:Qe,column:et,length:a,return:""}}function at(e,t){return Ve(ot("",null,null,"",null,null,0),e,{length:-e.length},t)}function st(){return rt=nt>0?Ye(it,--nt):0,et--,10===rt&&(et=1,Qe--),rt}function lt(){return rt=nt<tt?Ye(it,nt++):0,et++,10===rt&&(et=1,Qe++),rt}function ut(){return Ye(it,nt)}function ct(){return nt}function dt(e,t){return Ke(it,e,t)}function pt(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 ft(e){return Qe=et=1,tt=Xe(it=e),nt=0,[]}function ht(e){return it="",e}function mt(e){return Be(dt(nt-1,yt(91===e?e+2:40===e?e+1:e)))}function gt(e){for(;(rt=ut())&&rt<33;)lt();return pt(e)>2||pt(rt)>3?"":" "}function vt(e,t){for(;--t&<()&&!(rt<48||rt>102||rt>57&&rt<65||rt>70&&rt<97););return dt(e,ct()+(t<6&&32==ut()&&32==lt()))}function yt(e){for(;lt();)switch(rt){case e:return nt;case 34:case 39:34!==e&&39!==e&&yt(rt);break;case 40:41===e&&yt(e);break;case 92:lt()}return nt}function bt(e,t){for(;lt()&&e+rt!==57&&(e+rt!==84||47!==ut()););return"/*"+dt(t,nt-1)+"*"+He(47===e?e:lt())}function xt(e){for(;!pt(ut());)lt();return dt(e,nt)}function St(e){return ht(wt("",null,null,null,[""],e=ft(e),0,[0],e))}function wt(e,t,n,r,i,o,a,s,l){for(var u=0,c=0,d=a,p=0,f=0,h=0,m=1,g=1,v=1,y=0,b="",x=i,S=o,w=r,C=b;g;)switch(h=y,y=lt()){case 40:if(108!=h&&58==Ye(C,d-1)){-1!=Ue(C+=Ge(mt(y),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:C+=mt(y);break;case 9:case 10:case 13:case 32:C+=gt(h);break;case 92:C+=vt(ct()-1,7);continue;case 47:switch(ut()){case 42:case 47:Ze(Et(bt(lt(),ct()),t,n),l);break;default:C+="/"}break;case 123*m:s[u++]=Xe(C)*v;case 125*m:case 59:case 0:switch(y){case 0:case 125:g=0;case 59+c:-1==v&&(C=Ge(C,/\f/g,"")),f>0&&Xe(C)-d&&Ze(f>32?It(C+";",r,n,d-1):It(Ge(C," ","")+";",r,n,d-2),l);break;case 59:C+=";";default:if(Ze(w=Ct(C,t,n,u,c,i,s,b,x=[],S=[],d),o),123===y)if(0===c)wt(C,t,w,w,x,o,d,s,S);else switch(99===p&&110===Ye(C,3)?100:p){case 100:case 108:case 109:case 115:wt(e,w,w,r&&Ze(Ct(e,w,w,0,0,i,s,b,i,x=[],d),S),i,S,d,s,r?x:S);break;default:wt(C,w,w,w,[""],S,0,s,S)}}u=c=f=0,m=v=1,b=C="",d=a;break;case 58:d=1+Xe(C),f=h;default:if(m<1)if(123==y)--m;else if(125==y&&0==m++&&125==st())continue;switch(C+=He(y),y*m){case 38:v=c>0?1:(C+="\f",-1);break;case 44:s[u++]=(Xe(C)-1)*v,v=1;break;case 64:45===ut()&&(C+=mt(lt())),p=ut(),c=d=Xe(b=C+=xt(ct())),y++;break;case 45:45===h&&2==Xe(C)&&(m=0)}}return o}function Ct(e,t,n,r,i,o,a,s,l,u,c){for(var d=i-1,p=0===i?o:[""],f=Je(p),h=0,m=0,g=0;h<r;++h)for(var v=0,y=Ke(e,d+1,d=$e(m=a[h])),b=e;v<f;++v)(b=Be(m>0?p[v]+" "+y:Ge(y,/&\f/g,p[v])))&&(l[g++]=b);return ot(e,t,n,0===i?Fe:s,l,u,c)}function Et(e,t,n){return ot(e,t,n,je,He(rt),Ke(e,2,-2),0)}function It(e,t,n,r){return ot(e,t,n,ze,Ke(e,0,r),Ke(e,r+1,-1),r)}function Dt(e,t){for(var n="",r=Je(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function Pt(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case ze:return e.return=e.return||e.value;case je:return"";case We:return e.return=e.value+"{"+Dt(e.children,r)+"}";case Fe:e.value=e.props.join(",")}return Xe(n=Dt(e.children,r))?e.return=e.value+"{"+n+"}":""}function Mt(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var Rt=function(e,t,n){for(var r=0,i=0;r=i,i=ut(),38===r&&12===i&&(t[n]=1),!pt(i);)lt();return dt(e,nt)},kt=function(e,t){return ht(function(e,t){var n=-1,r=44;do{switch(pt(r)){case 0:38===r&&12===ut()&&(t[n]=1),e[n]+=Rt(nt-1,t,n);break;case 2:e[n]+=mt(r);break;case 4:if(44===r){e[++n]=58===ut()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=He(r)}}while(r=lt());return e}(ft(e),t))},Lt=new WeakMap,At=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Lt.get(n))&&!r){Lt.set(e,!0);for(var i=[],o=kt(t,i),a=n.props,s=0,l=0;s<o.length;s++)for(var u=0;u<a.length;u++,l++)e.props[l]=i[s]?o[s].replace(/&\f/g,a[u]):a[u]+" "+o[s]}}},Ot=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function Tt(e,t){switch(function(e,t){return 45^Ye(e,0)?(((t<<2^Ye(e,0))<<2^Ye(e,1))<<2^Ye(e,2))<<2^Ye(e,3):0}(e,t)){case 5103:return Ne+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Ne+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ne+e+_e+e+qe+e+e;case 6828:case 4268:return Ne+e+qe+e+e;case 6165:return Ne+e+qe+"flex-"+e+e;case 5187:return Ne+e+Ge(e,/(\w+).+(:[^]+)/,Ne+"box-$1$2"+qe+"flex-$1$2")+e;case 5443:return Ne+e+qe+"flex-item-"+Ge(e,/flex-|-self/,"")+e;case 4675:return Ne+e+qe+"flex-line-pack"+Ge(e,/align-content|flex-|-self/,"")+e;case 5548:return Ne+e+qe+Ge(e,"shrink","negative")+e;case 5292:return Ne+e+qe+Ge(e,"basis","preferred-size")+e;case 6060:return Ne+"box-"+Ge(e,"-grow","")+Ne+e+qe+Ge(e,"grow","positive")+e;case 4554:return Ne+Ge(e,/([^-])(transform)/g,"$1"+Ne+"$2")+e;case 6187:return Ge(Ge(Ge(e,/(zoom-|grab)/,Ne+"$1"),/(image-set)/,Ne+"$1"),e,"")+e;case 5495:case 3959:return Ge(e,/(image-set\([^]*)/,Ne+"$1$`$1");case 4968:return Ge(Ge(e,/(.+:)(flex-)?(.*)/,Ne+"box-pack:$3"+qe+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Ne+e+e;case 4095:case 3583:case 4068:case 2532:return Ge(e,/(.+)-inline(.+)/,Ne+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Xe(e)-1-t>6)switch(Ye(e,t+1)){case 109:if(45!==Ye(e,t+4))break;case 102:return Ge(e,/(.+:)(.+)-([^]+)/,"$1"+Ne+"$2-$3$1"+_e+(108==Ye(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Ue(e,"stretch")?Tt(Ge(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==Ye(e,t+1))break;case 6444:switch(Ye(e,Xe(e)-3-(~Ue(e,"!important")&&10))){case 107:return Ge(e,":",":"+Ne)+e;case 101:return Ge(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ne+(45===Ye(e,14)?"inline-":"")+"box$3$1"+Ne+"$2$3$1"+qe+"$2box$3")+e}break;case 5936:switch(Ye(e,t+11)){case 114:return Ne+e+qe+Ge(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ne+e+qe+Ge(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ne+e+qe+Ge(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ne+e+qe+e+e}return e}var qt=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case ze:e.return=Tt(e.value,e.length);break;case We:return Dt([at(e,{value:Ge(e.value,"@","@"+Ne)})],r);case Fe:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Dt([at(e,{props:[Ge(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return Dt([at(e,{props:[Ge(t,/:(plac\w+)/,":"+Ne+"input-$1")]}),at(e,{props:[Ge(t,/:(plac\w+)/,":-moz-$1")]}),at(e,{props:[Ge(t,/:(plac\w+)/,qe+"input-$1")]})],r)}return""})}}],_t=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var r,i,o=e.stylisPlugins||qt,a={},s=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;s.push(e)});var l,u,c=[Pt,(u=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&u(e)})],d=function(e){var t=Je(e);return function(n,r,i,o){for(var a="",s=0;s<t;s++)a+=e[s](n,r,i,o)||"";return a}}([At,Ot].concat(o,c));i=function(e,t,n,r){l=n,function(e){Dt(St(e),d)}(e?e+"{"+t.styles+"}":t.styles),r&&(p.inserted[t.name]=!0)};var p={key:t,sheet:new Te({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:i};return p.sheet.hydrate(s),p};function Nt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function jt(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){var n=!1;try{n=this instanceof e}catch{}return n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var Ft,zt,Wt,$t,Ht={exports:{}},Vt={};function Bt(){return zt||(zt=1,Ht.exports=function(){if(Ft)return Vt;Ft=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:switch(e=e.type){case l:case u:case r:case o:case i:case d:return e;default:switch(e=e&&e.$$typeof){case s:case c:case h:case f:case a:return e;default:return p}}case n:return p}}}function x(e){return b(e)===u}return Vt.AsyncMode=l,Vt.ConcurrentMode=u,Vt.ContextConsumer=s,Vt.ContextProvider=a,Vt.Element=t,Vt.ForwardRef=c,Vt.Fragment=r,Vt.Lazy=h,Vt.Memo=f,Vt.Portal=n,Vt.Profiler=o,Vt.StrictMode=i,Vt.Suspense=d,Vt.isAsyncMode=function(e){return x(e)||b(e)===l},Vt.isConcurrentMode=x,Vt.isContextConsumer=function(e){return b(e)===s},Vt.isContextProvider=function(e){return b(e)===a},Vt.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Vt.isForwardRef=function(e){return b(e)===c},Vt.isFragment=function(e){return b(e)===r},Vt.isLazy=function(e){return b(e)===h},Vt.isMemo=function(e){return b(e)===f},Vt.isPortal=function(e){return b(e)===n},Vt.isProfiler=function(e){return b(e)===o},Vt.isStrictMode=function(e){return b(e)===i},Vt.isSuspense=function(e){return b(e)===d},Vt.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===u||e===o||e===i||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===f||e.$$typeof===a||e.$$typeof===s||e.$$typeof===c||e.$$typeof===g||e.$$typeof===v||e.$$typeof===y||e.$$typeof===m)},Vt.typeOf=b,Vt}()),Ht.exports}var Gt=function(){if($t)return Wt;$t=1;var e=Bt(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},i={};function o(n){return e.isMemo(n)?r:i[n.$$typeof]||t}i[e.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i[e.Memo]=r;var a=Object.defineProperty,s=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,c=Object.getPrototypeOf,d=Object.prototype;return Wt=function e(t,r,i){if("string"!=typeof r){if(d){var p=c(r);p&&p!==d&&e(t,p,i)}var f=s(r);l&&(f=f.concat(l(r)));for(var h=o(t),m=o(r),g=0;g<f.length;++g){var v=f[g];if(!(n[v]||i&&i[v]||m&&m[v]||h&&h[v])){var y=u(r,v);try{a(t,v,y)}catch(e){}}}}return t},Wt}(),Ut=Nt(Gt);function Yt(e,t,n){var r="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")}),r}var Kt=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},Xt=function(e,t,n){Kt(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+r:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}};var Jt={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},Zt=/[A-Z]|^ms/g,Qt=/_EMO_([^_]+?)_([^]*?)_EMO_/g,en=function(e){return 45===e.charCodeAt(1)},tn=function(e){return null!=e&&"boolean"!=typeof e},nn=Mt(function(e){return en(e)?e:e.replace(Zt,"-$&").toLowerCase()}),rn=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Qt,function(e,t,n){return an={name:t,styles:n,next:an},t})}return 1===Jt[e]||en(e)||"number"!=typeof t||0===t?t:t+"px"};function on(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var i=n;if(1===i.anim)return an={name:i.name,styles:i.styles,next:an},i.name;var o=n;if(void 0!==o.styles){var a=o.next;if(void 0!==a)for(;void 0!==a;)an={name:a.name,styles:a.styles,next:an},a=a.next;return o.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=on(e,t,n[i])+";";else for(var o in n){var a=n[o];if("object"!=typeof a){var s=a;null!=t&&void 0!==t[s]?r+=o+"{"+t[s]+"}":tn(s)&&(r+=nn(o)+":"+rn(o,s)+";")}else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var l=on(e,t,a);switch(o){case"animation":case"animationName":r+=nn(o)+":"+l+";";break;default:r+=o+"{"+l+"}"}}else for(var u=0;u<a.length;u++)tn(a[u])&&(r+=nn(o)+":"+rn(o,a[u])+";")}return r}(e,t,n);case"function":if(void 0!==e){var s=an,l=n(e);return an=s,on(e,t,l)}}var u=n;if(null==t)return u;var c=t[u];return void 0!==c?c:u}var an,sn=/label:\s*([^\s;{]+)\s*(;|$)/g;function ln(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,i="";an=void 0;var o=e[0];null==o||void 0===o.raw?(r=!1,i+=on(n,t,o)):i+=o[0];for(var a=1;a<e.length;a++){if(i+=on(n,t,e[a]),r)i+=o[a]}sn.lastIndex=0;for(var s,l="";null!==(s=sn.exec(i));)l+="-"+s[1];var u=function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+l;return{name:u,styles:i,next:an}}var un,cn,dn=!!n.useInsertionEffect&&n.useInsertionEffect,pn=dn||function(e){return e()},fn=dn||n.useLayoutEffect,hn=n.createContext("undefined"!=typeof HTMLElement?_t({key:"css"}):null),mn=hn.Provider,gn=function(e){return r(function(t,n){var r=i(hn);return e(t,r,n)})},vn=n.createContext({}),yn={}.hasOwnProperty,bn="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",xn=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Kt(t,n,r),pn(function(){return Xt(t,n,r)}),null},Sn=gn(function(e,t,r){var i=e.css;"string"==typeof i&&void 0!==t.registered[i]&&(i=t.registered[i]);var o=e[bn],a=[i],s="";"string"==typeof e.className?s=Yt(t.registered,a,e.className):null!=e.className&&(s=e.className+" ");var l=ln(a,void 0,n.useContext(vn));s+=t.key+"-"+l.name;var u={};for(var c in e)yn.call(e,c)&&"css"!==c&&c!==bn&&(u[c]=e[c]);return u.className=s,r&&(u.ref=r),n.createElement(n.Fragment,null,n.createElement(xn,{cache:t,serialized:l,isStringTag:"string"==typeof o}),n.createElement(o,u))}),wn=Sn,Cn=function(e,t){var r=arguments;if(null==t||!yn.call(t,"css"))return n.createElement.apply(void 0,r);var i=r.length,o=new Array(i);o[0]=wn,o[1]=function(e,t){var n={};for(var r in t)yn.call(t,r)&&(n[r]=t[r]);return n[bn]=e,n}(e,t);for(var a=2;a<i;a++)o[a]=r[a];return n.createElement.apply(null,o)};un=Cn||(Cn={}),cn||(cn=un.JSX||(un.JSX={}));var En=gn(function(e,t){var r=ln([e.styles],void 0,n.useContext(vn)),i=n.useRef();return fn(function(){var e=t.key+"-global",n=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),o=!1,a=document.querySelector('style[data-emotion="'+e+" "+r.name+'"]');return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),null!==a&&(o=!0,a.setAttribute("data-emotion",e),n.hydrate([a])),i.current=[n,o],function(){n.flush()}},[t]),fn(function(){var e=i.current,n=e[0];if(e[1])e[1]=!1;else{if(void 0!==r.next&&Xt(t,r.next,!0),n.tags.length){var o=n.tags[n.tags.length-1].nextElementSibling;n.before=o,n.flush()}t.insert("",r,n,!1)}},[t,r.name]),null});function In(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ln(t)}function Dn(){var e=In.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var Pn=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Mn=Mt(function(e){return Pn.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}),Rn=function(e){return"theme"!==e},kn=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?Mn:Rn},Ln=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},An=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Kt(t,n,r),pn(function(){return Xt(t,n,r)}),null},On=function e(t,r){var i,o,a=t.__emotion_real===t,s=a&&t.__emotion_base||t;void 0!==r&&(i=r.label,o=r.target);var l=Ln(t,r,a),u=l||kn(s),c=!u("as");return function(){var d=arguments,p=a&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==i&&p.push("label:"+i+";"),null==d[0]||void 0===d[0].raw)p.push.apply(p,d);else{var f=d[0];p.push(f[0]);for(var h=d.length,m=1;m<h;m++)p.push(d[m],f[m])}var g=gn(function(e,t,r){var i=c&&e.as||s,a="",d=[],f=e;if(null==e.theme){for(var h in f={},e)f[h]=e[h];f.theme=n.useContext(vn)}"string"==typeof e.className?a=Yt(t.registered,d,e.className):null!=e.className&&(a=e.className+" ");var m=ln(p.concat(d),t.registered,f);a+=t.key+"-"+m.name,void 0!==o&&(a+=" "+o);var g=c&&void 0===l?kn(i):u,v={};for(var y in e)c&&"as"===y||g(y)&&(v[y]=e[y]);return v.className=a,r&&(v.ref=r),n.createElement(n.Fragment,null,n.createElement(An,{cache:t,serialized:m,isStringTag:"string"==typeof i}),n.createElement(i,v))});return g.displayName=void 0!==i?i:"Styled("+("string"==typeof s?s:s.displayName||s.name||"Component")+")",g.defaultProps=t.defaultProps,g.__emotion_real=g,g.__emotion_base=s,g.__emotion_styles=p,g.__emotion_forwardProp=l,Object.defineProperty(g,"toString",{value:function(){return"."+o}}),g.withComponent=function(t,n){return e(t,Ae({},r,n,{shouldForwardProp:Ln(g,n,!0)})).apply(void 0,p)},g}}.bind(null);["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach(function(e){On[e]=On(e)});var Tn,qn,_n,Nn,jn,Fn={exports:{}};function zn(){if(qn)return Tn;qn=1;return Tn="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function Wn(){if(Nn)return _n;Nn=1;var e=zn();function t(){}function n(){}return n.resetWarningCache=t,_n=function(){function r(t,n,r,i,o,a){if(a!==e){var s=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 s.name="Invariant Violation",s}}function i(){return r}r.isRequired=r;var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o}}function $n(){return jn||(jn=1,Fn.exports=Wn()()),Fn.exports}var Hn,Vn,Bn=Nt($n()),Gn={exports:{}},Un={};var Yn=(Vn||(Vn=1,Gn.exports=function(){if(Hn)return Un;Hn=1;var e=o,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function s(e,n,o){var s,l={},u=null,c=null;for(s in void 0!==o&&(u=""+o),void 0!==n.key&&(u=""+n.key),void 0!==n.ref&&(c=n.ref),n)r.call(n,s)&&!a.hasOwnProperty(s)&&(l[s]=n[s]);if(e&&e.defaultProps)for(s in n=e.defaultProps)void 0===l[s]&&(l[s]=n[s]);return{$$typeof:t,type:e,key:u,ref:c,props:l,_owner:i.current}}return Un.Fragment=n,Un.jsx=s,Un.jsxs=s,Un}()),Gn.exports);const Kn=new Map;function Xn(e){const{styles:t,defaultTheme:n={}}=e,r="function"==typeof t?e=>{return t(null==(r=e)||0===Object.keys(r).length?n:e);var r}:t;return Yn.jsx(En,{styles:r})}
|
|
8
8
|
/**
|
|
9
9
|
* @mui/styled-engine v5.18.0
|
|
10
10
|
*
|
|
@@ -96,6 +96,6 @@ System.register(["react","react-dom","@nebula.js/stardust","picasso-plugin-q","p
|
|
|
96
96
|
*
|
|
97
97
|
* This source code is licensed under the MIT license found in the
|
|
98
98
|
* LICENSE file in the root directory of this source tree.
|
|
99
|
-
*/function Ty(){if(ky)return gm;ky=1,Object.defineProperty(gm,"__esModule",{value:!0}),gm.default=function(t){return(0,e.createStyles)(t)};var e=Oy;return gm}var qy,_y,Ny={},jy={};function Fy(){if(qy)return jy;qy=1;var e=Ho();Object.defineProperty(jy,"__esModule",{value:!0}),jy.default=void 0;var t=(0,e(pm()).default)();return jy.default=t,jy}function zy(){if(_y)return Ny;_y=1;var e=Ho();Object.defineProperty(Ny,"__esModule",{value:!0}),Ny.default=void 0;var t=e(xa()),n=Oy,r=e(Fy());var i=function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,n.makeStyles)(e,(0,t.default)({defaultTheme:r.default},i))};return Ny.default=i,Ny}var Wy,$y,Hy={},Vy={};function By(){if(Wy)return Vy;Wy=1;var e=Ho();Object.defineProperty(Vy,"__esModule",{value:!0}),Vy.isUnitless=function(e){return String(parseFloat(e)).length===String(e).length},Vy.getUnit=n,Vy.toUnitless=r,Vy.convertLength=function(e){return function(t,i){var o=n(t);if(o===i)return t;var a=r(t);if("px"!==o)if("em"===o)a=r(t)*r(e);else if("rem"===o)return a=r(t)*r(e),t;var s=a;if("px"!==i)if("em"===i)s=a/r(e);else{if("rem"!==i)return t;s=a/r(e)}return parseFloat(s.toFixed(5))+i}},Vy.alignProperty=function(e){var t=e.size,n=e.grid,r=t-t%n,i=r+n;return t-r<i-t?r:i},Vy.fontGrid=function(e){var t=e.lineHeight,n=e.pixels,r=e.htmlFontSize;return n/(t*r)},Vy.responsiveProperty=function(e){var n=e.cssProperty,r=e.min,i=e.max,o=e.unit,a=void 0===o?"rem":o,s=e.breakpoints,l=void 0===s?[600,960,1280]:s,u=e.transform,c=void 0===u?null:u,d=(0,t.default)({},n,"".concat(r).concat(a)),p=(i-r)/l[l.length-1];return l.forEach(function(e){var i=r+p*e;null!==c&&(i=c(i)),d["@media (min-width:".concat(e,"px)")]=(0,t.default)({},n,"".concat(Math.round(1e4*i)/1e4).concat(a))}),d};var t=e(Pp());function n(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function r(e){return parseFloat(e)}return Vy}function Gy(){if($y)return Hy;$y=1;var e=Ho();Object.defineProperty(Hy,"__esModule",{value:!0}),Hy.default=function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.breakpoints,a=void 0===o?["sm","md","lg"]:o,s=i.disableAlign,l=void 0!==s&&s,u=i.factor,c=void 0===u?2:u,d=i.variants,p=void 0===d?["h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","caption","button","overline"]:d,f=(0,t.default)({},e);f.typography=(0,t.default)({},f.typography);var h=f.typography,m=(0,r.convertLength)(h.htmlFontSize),g=a.map(function(e){return f.breakpoints.values[e]});return p.forEach(function(e){var i=h[e],o=parseFloat(m(i.fontSize,"rem"));if(!(o<=1)){var a=o,s=1+(a-1)/c,u=i.lineHeight;if(!(0,r.isUnitless)(u)&&!l)throw new Error((0,n.formatMuiErrorMessage)(6));(0,r.isUnitless)(u)||(u=parseFloat(m(u,"rem"))/parseFloat(o));var d=null;l||(d=function(e){return(0,r.alignProperty)({size:e,grid:(0,r.fontGrid)({pixels:4,lineHeight:u,htmlFontSize:h.htmlFontSize})})}),h[e]=(0,t.default)({},i,(0,r.responsiveProperty)({cssProperty:"fontSize",min:s,max:a,unit:"rem",breakpoints:g,transform:d}))}}),f};var t=e(xa()),n=gp,r=By();return Hy}var Uy,Yy={};function Ky(){if(Uy)return Yy;Uy=1;var e=Ho();Object.defineProperty(Yy,"__esModule",{value:!0}),Yy.default=void 0;var t=e(xa()),n=Oy,r=e(Fy()),i=function(e){var i=(0,n.styled)(e);return function(e,n){return i(e,(0,t.default)({defaultTheme:r.default},n))}};return Yy.default=i,Yy}var Xy,Jy={};function Zy(){if(Xy)return Jy;Xy=1;var e=Ho();Object.defineProperty(Jy,"__esModule",{value:!0}),Jy.default=function(){return(0,t.useTheme)()||n.default};var t=Oy;e(o);var n=e(Fy());return Jy}var Qy,eb={};function tb(){if(Qy)return eb;Qy=1;var e=Ho();Object.defineProperty(eb,"__esModule",{value:!0}),eb.default=void 0;var t=e(xa()),n=Oy,r=e(Fy());var i=function(e,i){return(0,n.withStyles)(e,(0,t.default)({defaultTheme:r.default},i))};return eb.default=i,eb}var nb,rb,ib={};function ob(){if(nb)return ib;nb=1;var e=Ho();Object.defineProperty(ib,"__esModule",{value:!0}),ib.default=void 0;var t=Oy,n=e(Fy()),r=(0,t.withThemeCreator)({defaultTheme:n.default});return ib.default=r,ib}function ab(){return rb||(rb=1,function(e){var t=Ho(),n=(Ud||(Ud=1,function(e){var t=Jd().default;function n(r,i){if("function"==typeof WeakMap)var o=new WeakMap,a=new WeakMap;return(e.exports=n=function(e,n){if(!n&&e&&e.__esModule)return e;var r,i,s={__proto__:null,default:e};if(null===e||"object"!=t(e)&&"function"!=typeof e)return s;if(r=n?a:o){if(r.has(e))return r.get(e);r.set(e,s)}for(var l in e)"default"!==l&&{}.hasOwnProperty.call(e,l)&&((i=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,l))&&(i.get||i.set)?r(s,l,i):s[l]=e[l]);return s},e.exports.__esModule=!0,e.exports.default=e.exports)(r,i)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}(Kd)),Kd.exports);Object.defineProperty(e,"__esModule",{value:!0});var r={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 o.default}}),Object.defineProperty(e,"createMuiTheme",{enumerable:!0,get:function(){return o.createMuiTheme}}),Object.defineProperty(e,"unstable_createMuiStrictModeTheme",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"createStyles",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"makeStyles",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"responsiveFontSizes",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"styled",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"useTheme",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(e,"withStyles",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"withTheme",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"createGenerateClassName",{enumerable:!0,get:function(){return m.createGenerateClassName}}),Object.defineProperty(e,"jssPreset",{enumerable:!0,get:function(){return m.jssPreset}}),Object.defineProperty(e,"ServerStyleSheets",{enumerable:!0,get:function(){return m.ServerStyleSheets}}),Object.defineProperty(e,"StylesProvider",{enumerable:!0,get:function(){return m.StylesProvider}}),Object.defineProperty(e,"MuiThemeProvider",{enumerable:!0,get:function(){return m.ThemeProvider}}),Object.defineProperty(e,"ThemeProvider",{enumerable:!0,get:function(){return m.ThemeProvider}});var i=vp();Object.keys(i).forEach(function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(r,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return i[t]}}))});var o=n(pm()),a=t(mm()),s=t(Ty()),l=t(zy()),u=t(Gy()),c=t(Ky()),d=sm();Object.keys(d).forEach(function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(r,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return d[t]}}))});var p=t(Zy()),f=t(tb()),h=t(ob()),m=Oy}(Yd)),Yd}var sb=ab();sb.alpha(wd.GREYSCALE_0,.05),sb.alpha(wd.GREEN_PALE,.5),sb.alpha(wd.BLUE_PALE,.5),sb.alpha(wd.GREEN_PALE,.5),sb.alpha(wd.BLUE_PALE,.5),sb.alpha(wd.GREEN_PALE,.5),sb.alpha(wd.BLUE_PALE,.5),sb.alpha(wd.GREEN_PALE,.5),sb.alpha(wd.BLUE_PALE,.5),sb.alpha(wd.GREEN_PALE,.5),sb.alpha(wd.BLUE_PALE,.5);const lb=(e="light")=>Vd();function ub(e){return"init"in e}function cb(e){return!!e.write}function db(e){return"v"in e||"e"in e}function pb(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 fb(e){return"function"==typeof(null==e?void 0:e.then)}function hb(e,t,n){if(!n.p.has(e)){n.p.add(e);const r=()=>n.p.delete(e);t.then(r,r)}}function mb(e,t,n){const r=n.get(e),i=null==r?void 0:r.t,o=t.p;if(!(null==i?void 0:i.size))return o;if(!o.size)return i;const a=new Set(i);for(const e of o)a.add(e);return a}const gb=()=>{const e={},t=new WeakMap,n=n=>{var r,i;null==(r=t.get(e))||r.forEach(e=>e(n)),null==(i=t.get(n))||i.forEach(e=>e())};return n.add=(n,r)=>{const i=n||e;let o=t.get(i);return o||(o=new Set,t.set(i,o)),o.add(r),()=>{o.delete(r),o.size||t.delete(i)}},n};function vb(e){return e.i||(e.i=gb()),e.r||(e.r=gb()),e.c||(e.c=gb()),e.m||(e.m=gb()),e.u||(e.u=gb()),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 yb=(e,t,...n)=>t.read(...n),bb=(e,t,...n)=>t.write(...n),xb=(e,t)=>{var n;return null==(n=t.INTERNAL_onInit)?void 0:n.call(t,e)},Sb=(e,t,n)=>{var r;return null==(r=t.onMount)?void 0:r.call(t,n)},wb=(e,n)=>{var r;const i=Fb(e),o=i[0],a=i[6],s=i[9];if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&!n)throw new Error("Atom is undefined or null");let l=o.get(n);return l||(l={d:new Map,p:new Set,n:0},o.set(n,l),null==(r=a.i)||r.call(a,n),null==s||s(e,n)),l},Cb=e=>{var t;const n=Fb(e),r=n[1],i=n[3],o=n[4],a=n[5],s=n[6],l=n[13];if(!(s.f||i.size||o.size||a.size))return;const u=[],c=e=>{try{e()}catch(e){u.push(e)}};do{s.f&&c(s.f);const n=new Set;for(const e of i){const i=null==(t=r.get(e))?void 0:t.l;if(i)for(const e of i)n.add(e)}i.clear();for(const e of a)n.add(e);a.clear();for(const e of o)n.add(e);o.clear();for(const e of n)c(e);i.size&&l(e)}while(i.size||a.size||o.size);if(u.length)throw new AggregateError(u)},Eb=e=>{const n=Fb(e),r=n[1],i=n[2],o=n[3],a=n[11],s=n[14],l=n[17];if(!o.size)return;const u=[],c=[],d=new WeakSet,p=new WeakSet,f=[],h=[];for(const t of o)f.push(t),h.push(a(e,t));for(;f.length;){const n=f.length-1,o=f[n],s=h[n];if(p.has(o))f.pop(),h.pop();else if(d.has(o)){if(i.get(o)===s.n)u.push(o),c.push(s);else if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&i.has(o))throw new Error("[Bug] invalidated atom exists");p.add(o),f.pop(),h.pop()}else{d.add(o);for(const t of mb(o,s,r))d.has(t)||(f.push(t),h.push(a(e,t)))}}for(let t=u.length-1;t>=0;--t){const n=u[t],r=c[t];let a=!1;for(const e of r.d.keys())if(e!==n&&o.has(e)){a=!0;break}a&&(i.set(n,r.n),s(e,n),l(e,n)),i.delete(n)}},Ib=new WeakSet,Db=(e,n)=>{var r,i;const o=Fb(e),a=o[1],s=o[2],l=o[3],u=o[6],c=o[7],d=o[11],p=o[12],f=o[13],h=o[14],m=o[16],g=o[17],v=o[20],y=o[26],b=o[28],x=d(e,n),S=b[0];if(db(x)){if(a.has(n)&&s.get(n)!==x.n||x.m===S)return x.m=S,x;let t=!1;for(const[n,r]of x.d)if(h(e,n).n!==r){t=!0;break}if(!t)return x.m=S,x}let w=!0;const C=new Set(x.d.keys()),E=()=>{for(const e of C)x.d.delete(e)},I=()=>{if(a.has(n)){const t=!l.size;g(e,n),t&&(f(e),p(e))}},D=t=>{var r;if(t===n){const n=d(e,t);if(!db(n)){if(!ub(t))throw new Error("no atom init");v(e,t,t.init)}return pb(n)}const i=h(e,t);try{return pb(i)}finally{C.delete(t),x.d.set(t,i.n),fb(x.v)&&hb(n,x.v,i),a.has(n)&&(null==(r=a.get(t))||r.t.add(n)),w||I()}};let P,M;const R={get signal(){return P||(P=new AbortController),P.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)||cb(n)||console.warn("setSelf function cannot be used with read-only atom"),!M&&cb(n)&&(M=(...r)=>{if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&w&&console.warn("setSelf function cannot be called in sync"),!w)try{return m(e,n,...r)}finally{f(e),p(e)}}),M}},k=x.n,L=s.get(n)===k;try{"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&Ib.delete(e);const i=c(e,n,D,R);if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&Ib.has(e)&&console.warn("Detected store mutation during atom read. This is not supported."),v(e,n,i),fb(i)){y(e,i,()=>null==P?void 0:P.abort());const t=()=>{E(),I()};i.then(t,t)}else E();return null==(r=u.r)||r.call(u,n),x.m=S,x}catch(e){return delete x.v,x.e=e,++x.n,x.m=S,x}finally{w=!1,x.n!==k&&L&&(s.set(n,x.n),l.add(n),null==(i=u.c)||i.call(u,n))}},Pb=(e,t)=>{const n=Fb(e),r=n[1],i=n[2],o=n[11],a=[t];for(;a.length;){const t=a.pop(),n=o(e,t);for(const s of mb(t,n,r)){const t=o(e,s);i.get(s)!==t.n&&(i.set(s,t.n),a.push(s))}}},Mb=(e,n,...r)=>{const i=Fb(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=>pb(d(e,t)),b=(r,...i)=>{var s;const d=l(e,r);try{if(r===n){if(!ub(r))throw new Error("atom not writable");"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&Ib.add(e);const n=d.n,l=i[0];return m(e,r,l),h(e,r),void(n!==d.n&&(++g[0],o.add(r),p(e,r),null==(s=a.c)||s.call(a,r)))}return f(e,r,...i)}finally{v||(c(e),u(e))}};try{return s(e,n,y,b,...r)}finally{v=!1}},Rb=(e,t)=>{var n;const r=Fb(e),i=r[1],o=r[3],a=r[6],s=r[11],l=r[15],u=r[18],c=r[19],d=s(e,t),p=i.get(t);if(p&&d.d.size>0){for(const[r,i]of d.d)if(!p.d.has(r)){const c=s(e,r);u(e,r).t.add(t),p.d.add(r),i!==c.n&&(o.add(r),l(e,r),null==(n=a.c)||n.call(a,r))}for(const n of p.d)if(!d.d.has(n)){p.d.delete(n);const r=c(e,n);null==r||r.t.delete(t)}}},kb=(e,t)=>{var n;const r=Fb(e),i=r[1],o=r[4],a=r[6],s=r[10],l=r[11],u=r[12],c=r[13],d=r[14],p=r[16],f=r[18],h=l(e,t);let m=i.get(t);if(!m){d(e,t);for(const n of h.d.keys()){f(e,n).t.add(t)}if(m={l:new Set,d:new Set(h.d.keys()),t:new Set},i.set(t,m),cb(t)&&function(e){return!!e.onMount}(t)){const n=()=>{let n=!0;const r=(...r)=>{try{return p(e,t,...r)}finally{n||(c(e),u(e))}};try{const i=s(e,t,r);i&&(m.u=()=>{n=!0;try{i()}finally{n=!1}})}finally{n=!1}};o.add(n)}null==(n=a.m)||n.call(a,t)}return m},Lb=(e,t)=>{var n,r;const i=Fb(e),o=i[1],a=i[5],s=i[6],l=i[11],u=i[19],c=l(e,t);let d=o.get(t);if(!d||d.l.size)return d;let p=!1;for(const e of d.t)if(null==(n=o.get(e))?void 0:n.d.has(t)){p=!0;break}if(p)return d;d.u&&a.add(d.u),d=void 0,o.delete(t);for(const n of c.d.keys()){const r=u(e,n);null==r||r.t.delete(t)}null==(r=s.u)||r.call(s,t)},Ab=(e,t,n)=>{const r=Fb(e),i=r[11],o=r[27],a=i(e,t),s="v"in a,l=a.v;if(fb(n))for(const r of a.d.keys())hb(t,n,i(e,r));a.v=n,delete a.e,s&&Object.is(l,a.v)||(++a.n,fb(l)&&o(e,l))},Ob=(e,t)=>pb((0,Fb(e)[14])(e,t)),Tb=(e,t,...n)=>{const r=Fb(e),i=r[3],o=r[12],a=r[13],s=r[16],l=i.size;try{return s(e,t,...n)}finally{i.size!==l&&(a(e),o(e))}},qb=(e,t,n)=>{const r=Fb(e),i=r[12],o=r[18],a=r[19],s=o(e,t).l;return s.add(n),i(e),()=>{s.delete(n),a(e,t),i(e)}},_b=(e,t,n)=>{const r=Fb(e)[25];let i=r.get(t);if(!i){i=new Set,r.set(t,i);const e=()=>r.delete(t);t.then(e,e)}i.add(n)},Nb=(e,t)=>{const n=Fb(e)[25].get(t);null==n||n.forEach(e=>e())},jb=new WeakMap,Fb=e=>{const n=jb.get(e);if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&!n)throw new Error("Store must be created by buildStore to read its building blocks");return n};function zb(e){const t=Fb(e),n=t[24];return n?n(t):t}function Wb(...e){const t={get:e=>(0,Fb(t)[21])(t,e),set:(e,...n)=>(0,Fb(t)[22])(t,e,...n),sub:(e,n)=>(0,Fb(t)[23])(t,e,n)},n=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},yb,bb,xb,Sb,wb,Cb,Eb,Db,Pb,Mb,Rb,kb,Lb,Ab,Ob,Tb,qb,void 0,new WeakMap,_b,Nb,[0]].map((t,n)=>e[n]||t);return jb.set(t,Object.freeze(n)),t}let $b,Hb=0;function Vb(e,n){const r="atom"+ ++Hb,i={toString(){return"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&this.debugLabel?r+":"+this.debugLabel:r}};return"function"==typeof e?i.read=e:(i.init=e,i.read=Bb,i.write=Gb),n&&(i.write=n),i}function Bb(e){return e(this)}function Gb(e,t,n){return t(this,"function"==typeof n?n(e(this)):n)}function Ub(){return Wb()}const Yb=d(void 0);function Kb(e){const n=i(Yb);return(null==e?void 0:e.store)||n||($b||($b=Ub(),"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=$b),globalThis.__JOTAI_DEFAULT_STORE__!==$b&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),$b)}function Xb({children:e,store:t}){const n=u(null);return t?c(Yb.Provider,{value:t},e):(null===n.current&&(n.current=Ub()),c(Yb.Provider,{value:n.current},e))}const Jb=e=>"function"==typeof(null==e?void 0:e.then),Zb=e=>{e.status||(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}))},Qb=o.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(Zb(e),e)}),ex=new WeakMap,tx=(e,t,n)=>{const r=zb(e)[26];let i=ex.get(t);return i||(i=new Promise((o,a)=>{let s=t;const l=e=>t=>{s===e&&o(t)},u=e=>t=>{s===e&&a(t)},c=()=>{try{const t=n();Jb(t)?(ex.set(t,i),s=t,t.then(l(t),u(t)),r(e,t,c)):o(t)}catch(e){a(e)}};t.then(l(t),u(t)),r(e,t,c)}),ex.set(t,i)),i};function nx(e,t){const{delay:n,unstable_promiseStatus:r=!o.use}={},i=Kb(t),[[a,s,l],u]=p(t=>{const n=i.get(e);return Object.is(t[0],n)&&t[1]===i&&t[2]===e?t:[n,i,e]},void 0,()=>[i.get(e),i,e]);let c=a;if(s===i&&l===e||(u(),c=i.get(e)),f(()=>{const t=i.sub(e,()=>{if(r)try{const t=i.get(e);Jb(t)&&Zb(tx(i,t,()=>i.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},[i,e,n,r]),h(c),Jb(c)){const t=tx(i,c,()=>i.get(e));return r&&Zb(t),Qb(t)}return c}function rx(e,n){const r=Kb(n);return m((...n)=>{if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&!("write"in e))throw new Error("not writable atom");return r.set(e,...n)},[r,e])}function ix(e,t){return[nx(e,t),rx(e,t)]}t.meta.env&&t.meta.env.MODE;!function(e=()=>{try{return window.localStorage}catch(e){return void("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&"undefined"!=typeof window&&console.warn(e))}},n){var r;let i,o;const a={getItem:(t,r)=>{var a,s;const l=e=>{if(i!==(e=e||"")){try{o=JSON.parse(e,null==n?void 0:n.reviver)}catch(e){return r}i=e}return o},u=null!=(s=null==(a=e())?void 0:a.getItem(t))?s:null;return(e=>"function"==typeof(null==e?void 0:e.then))(u)?u.then(l):l(u)},setItem:(t,n)=>{var r;return null==(r=e())?void 0:r.setItem(t,JSON.stringify(n,void 0))},removeItem:t=>{var n;return null==(n=e())?void 0:n.removeItem(t)}};let s;try{s=null==(r=e())?void 0:r.subscribe}catch(e){}var l;!s&&"undefined"!=typeof window&&"function"==typeof window.addEventListener&&window.Storage&&(s=(t,n)=>{if(!(e()instanceof window.Storage))return()=>{};const r=r=>{r.storageArea===e()&&r.key===t&&n(r.newValue)};return window.addEventListener("storage",r),()=>{window.removeEventListener("storage",r)}}),s&&(a.subscribe=(l=s,(e,t,n)=>l(e,e=>{let r;try{r=JSON.parse(e||"")}catch(e){r=n}t(r)})))}();const ox=(e,t,n)=>(t.has(n)?t:t.set(n,e())).get(n),ax=new WeakMap,sx=()=>{};const lx=new WeakMap;function ux(e,t){const n=Kb(t),r=cx(n);for(const[i,...o]of e)r.has(i)&&!(null==t?void 0:t.dangerouslyForceHydrate)||(r.add(i),n.set(i,...o))}const cx=e=>{let t=lx.get(e);return t||(t=new WeakSet,lx.set(e,t)),t};function dx(){return Boolean("undefined"!=typeof process&&process.env?.NODE_ENV&&!1)}function px(e){const t=Vb(()=>[]),n=Vb(function(e){const[r,i,o]=e(t);o.has(n)&&(r.forEach(e),++i.n)});return n.effect=e,n.INTERNAL_onInit=e=>{const r=new Set;let i,o=0,a=!1,s=!1,l=!1;function u(){if(o)return;r.clear();let t=!0;const c=i=>{if(l)return e.get(i);if(i===n){const t=h(e,i);if(!db(t)){if(!ub(i))throw new Error("no atom init");S(e,i,i.init)}return pb(t)}const o=v(e,i);try{return pb(o)}finally{C.d.set(i,o.n),d.get(i)?.t.add(n),t?r.add(i):d.has(i)&&(x(e,n),g(e),m(e))}};c.peek=e.get;const w=(r,...i)=>{const a=h(e,r);try{if(++o,r===n){if(!ub(r))throw new Error("atom not writable");const t=a.n,n=i[0];return S(e,r,n),x(e,r),void(t!==a.n&&(p.add(r),f.c?.(r),y(e,r)))}return b(e,r,...i)}finally{t||(g(e),m(e)),--o}};w.recurse=(t,...r)=>{if(l){if(dx())throw new Error("set.recurse is not allowed in cleanup")}else try{return a=!0,x(e,n),w(t,...r)}finally{g(e),a=!1,s&&(s=!1,u())}};try{i?.();const e=n.effect(c,w);if("function"!=typeof e)return;i=()=>{if(!o)try{return t=!0,l=!0,e()}finally{t=!1,l=!1,i=void 0}}}finally{t=!1,r.forEach(t=>{C.d.set(t,h(e,t).n)}),x(e,n),g(e)}}const c=zb(e),d=c[1],p=c[3],f=vb(c[6]),h=c[11],m=c[12],g=c[13],v=c[14],y=c[15],b=c[16],x=c[17],S=c[20],w=function(e,t){let n=fx.get(e);n||(n=new Set,fx.set(e,n),t.f.add(function(){for(const e of n)n.delete(e),e()}));return n}(e,f),C=h(e,n);C.v=void 0,Object.assign(e.get(t),[r,C,d]),f.c.add(n,function(){p.delete(n)}),f.m.add(n,function(){w.add(u),i&&w.delete(i)}),f.u.add(n,function(){w.delete(u),i&&w.add(i)}),f.c.add(n,function(){a?s=!0:w.add(u)})},dx()&&(Object.defineProperty(t,"debugLabel",{get:()=>n.debugLabel?`${n.debugLabel}:ref`:void 0,configurable:!0,enumerable:!0}),t.debugPrivate=!0),n}const fx=new WeakMap;const hx=async(e,t,n)=>{const r=e.get(n);void 0!==r&&("dimension"===r.type?await t.moveDimensionToAlternative(r.def.qDef.cId):await t.moveMeasureToAlternative(r.def.qDef.cId))},mx=async(e,t,n)=>{const r=e.get(n);void 0!==r&&("dimension"===r.type?await t.moveDimensionFromAlternative(r.def.qDef.cId):await t.moveMeasureFromAlternative(r.def.qDef.cId))},gx=e=>{const{type:t,handler:n,model:r,fieldInfo:i,handlerQueue:o}=e;void 0!==n&&void 0!==r&&o&&o.add(async()=>{switch(t){case"apply":for(const t of e.localChecked)await mx(i,n,t);for(const t of e.localUnchecked)await hx(i,n,t);break;case"checked":await mx(i,n,e.cId);break;case"unchecked":await hx(i,n,e.cId)}})},vx=Vb(),yx=Vb(),bx=Vb(),xx=Vb(e=>e(bx)?.translate??(e=>e)),Sx=Vb(""),wx=Vb(e=>{const t=e(Sx).toLowerCase().trim();return({title:e})=>e.toLowerCase().trim().includes(t)}),Cx=Vb(e=>e(bx)?.getBooleanFlag??(()=>!1)),Ex=e=>7005!==e.qError?.qErrorCode,Ix=new WeakMap,Dx={qInfo:{qType:"AlternativeLayout"},qHyperCubeDef:{qMode:"S",qDimensions:[],qMeasures:[],qInitialDataFetch:[{qTop:0,qLeft:0,qHeight:0,qWidth:0}],excludedNoOfLeftDims:-1,qCalcCond:{qv:"0"}}},Px=function(e,n=sx){return((e,t,n)=>{const r=ox(()=>new WeakMap,ax,t);return ox(e,r,n)})(()=>{const r=new WeakMap,i=new WeakMap,o=Vb(0),a=Vb([]);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=Vb(t=>{let l;t(o);try{l=t(s)}catch(e){}const u=t(e);if(!(e=>"function"==typeof(null==e?void 0:e.then))(u))return{v:u};if(u!==(null==l?void 0:l.p)&&u.then(e=>{i.set(u,e);const[n]=t(a);n()},e=>{r.set(u,e);const[n]=t(a);n()}),r.has(u))throw r.get(u);return i.has(u)?{p:u,v:i.get(u)}:l&&"v"in l?{p:u,f:n(l.v),v:l.v}:{p:u,f:n()}});return s.init=void 0,"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&(s.debugPrivate=!0),Vb(e=>{const t=e(s);return"f"in t?t.f:t.v},(t,n,...r)=>n(e,...r))},e,n)}(Vb(async e=>{const t=e(vx);if(t){if(Ix.has(t))return Ix.get(t);try{const e=await t.app.createSessionObject(Dx);return Ix.set(t,e),e}catch(e){return void console.error("Error creating alternative layout model:",e)}}})),Mx=Vb(null),Rx=Vb(),kx=px((e,t)=>{const n=e(vx),r=e(Px);if(!n||!r)return;const i=async()=>{const e=await n.getLayout();if(e.qSelectionInfo?.qInSelections)return;const i=await n.getEffectiveProperties();await r.applyPatches([{qOp:"replace",qPath:"/qHyperCubeDef/qDimensions",qValue:JSON.stringify(i.qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions)},{qOp:"replace",qPath:"/qHyperCubeDef/qMeasures",qValue:JSON.stringify(i.qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures)}]);const o=await r.getLayout();t(Rx,{layout:structuredClone(e),properties:structuredClone(i),altLayout:structuredClone(o)}),t(Mx,null)};return i(),n.Invalidated?.bind(i),()=>{n.Invalidated?.unbind(i)}}),Lx=Vb(e=>e(Rx)?.layout),Ax=Vb(e=>e(Rx)?.altLayout),Ox=Vb(e=>e(Rx)?.properties),Tx=Vb(e=>{const t=e(Rx)?.layout;return t?.qHyperCube.qDimensionInfo.filter(Ex)??[]}),qx=Vb(e=>{const t=e(Rx)?.layout;return t?.qHyperCube.qMeasureInfo.filter(Ex)??[]}),_x=Vb(e=>{const t=e(Lx),n=e(Tx),r=e(qx),i=e(Ox),o=new Map;return t&&i?(n.forEach((e,t)=>{o.set(e.cId,{id:e.cId,type:"dimension",def:i.qHyperCubeDef.qDimensions[t]})}),r.forEach((e,t)=>{o.set(e.cId,{id:e.cId,type:"measure",def:i.qHyperCubeDef.qMeasures[t]})}),i.qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions?.forEach(e=>{o.set(e.qDef.cId,{id:e.qDef.cId,type:"dimension",def:e})}),i.qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures?.forEach(e=>{o.set(e.qDef.cId,{id:e.qDef.cId,type:"measure",def:e})}),o):o});class Nx{#e=[];#t=!1;#n=!1;#r;#i;#o;#a;constructor({onQueueCompleted:e}){this.#r=e}#s(){this.#i=void 0,this.#o=void 0,this.#a=void 0}pause(){this.#i&&(clearTimeout(this.#a),this.#o?.(),this.#s());const{promise:e,resolve:t}=Promise.withResolvers();this.#i=e,this.#o=t,this.#a=setTimeout(()=>{this.abort("Aborting queue after being paused for too long")},6e4)}async continue(e=0){const t=this.#o;await(e=>new Promise(t=>{setTimeout(t,e)}))(e),t===this.#o&&(t?.(),clearTimeout(this.#a),this.#s())}abort(e="Queue aborted"){clearTimeout(this.#a),(this.#e.length>0||this.#t)&&console.warn(`[SequentialPromiseQueue] ${e}`),this.#n=!0,this.#e=[],this.#o?.(),this.#s()}add(e){this.#e.push(e),this.#t||this.#l()}async#l(){if(!this.#t){for(this.#t=!0,this.#n=!1;this.#e.length>0;)if(this.#i)await this.#i;else try{const e=this.#e.shift();await(e?.())}catch(e){return console.error("[SequentialPromiseQueue] Error executing action:",e),this.#e=[],void(this.#t=!1)}try{this.#n||await(this.#r?.())}catch(e){console.error("[SequentialPromiseQueue] Error executing onQueueCompleted:",e)}finally{this.#t=!1,this.#e.length>0&&this.#l()}}}}const jx=Vb(null),Fx=px((e,t)=>{const n=e(vx),r=e(yx),i=new Nx({onQueueCompleted:async()=>{n&&r&&await n.applyPatches([{qPath:"/qHyperCubeDef",qOp:"replace",qValue:JSON.stringify(r.properties.qHyperCubeDef)}],!0)}});t(jx,i);const o=()=>{i.pause()},a=()=>{i.continue(500)},s=()=>{i.abort()};return n?.Invalidated?.bind(o),n?.Validated?.bind(a),n?.Cancelled?.bind(s),n?.Closing?.bind(s),()=>{i.abort(),n?.Invalidated?.unbind(o),n?.Validated?.unbind(a),n?.Cancelled?.unbind(s),n?.Closing?.unbind(s)}}),zx=Vb(e=>{const t=[...e(Tx),...e(qx)].map(e=>e.cId);return new Set(t)}),Wx=Vb(new Set),$x=Vb(new Set),Hx=Vb(e=>{const t=e(Wx),n=e($x);return e(zx).difference(n).union(t)}),Vx=px((e,t)=>{e(zx),t(Wx,new Set),t($x,new Set)}),Bx=Vb(e=>e(Hx),(e,t,n)=>{const r=e(Hx).has(n),i=new Set(e($x)),o=new Set(e(Wx));r?(i.add(n),o.delete(n)):(o.add(n),i.delete(n)),t($x,i),t(Wx,o),gx({type:r?"unchecked":"checked",cId:n,handler:e(yx),model:e(vx),fieldInfo:e(_x),handlerQueue:e(jx)})}),Gx=({props:e,children:t})=>(ux([[vx,e.args.model],[bx,e.args.apis],[yx,e.args.handler]]),nx(Vx),nx(kx),nx(Fx),t);function Ux(e,t){const n=new Set(e),r=new Set(t);return e===t||n.size===r.size&&Array.from(n).every(r.has.bind(r))}function Yx(e){return"write"in e}const Kx=new WeakMap,Xx={},{read:Jx,write:Zx}=Vb(null);function Qx(e,t,n){const[r,i,o,,a]=e,s=r.get(t);if(s)return s;if(n===e){let r=i.get(t);return r||(r=[rS(e,t,n),n],i.set(t,r)),r}const l=n??Xx;let u=o.get(l);u||(u=new WeakMap,o.set(l,u));let c=u.get(t);if(!c){const[r,i]=a?Qx(a,t,n):[t];c=[t.read===Jx?r:rS(e,t,i),i],u.set(t,c)}return c}function eS(e){for(const t of e[5])t()}function tS(e,t,n,r,i){if(n.read===Jx&&Yx(n)&&Yx(t)&&n.write!==Zx&&e!==r){const{write:o}=n;return t.write=nS(e,n.write.bind(n),r,i),()=>{t.write=o}}}function nS(e,t,n,r=n){return function(i,o,...a){return t(function(t){const[r]=Qx(e,t,n);return i(r)},function(t,...i){const[a]=Qx(e,t,n),s=tS(e,a,t,n,r);try{return o(a,...i)}finally{null==s||s()}},...a)}}function rS(e,t,n){const r=Object.getOwnPropertyDescriptors(t);Object.keys(r).filter(e=>["read","write","debugLabel"].includes(e)).forEach(e=>r[e].configurable=!0);const i=Object.getPrototypeOf(t),o=Object.create(i,r);return o.read!==Jx&&(o.read=function(e,t,n){return function(r,i){return t(function(t){const[i]=Qx(e,t,n);return r(i)},i)}}(e,t.read.bind(t),n)),Yx(o)&&Yx(t)&&o.write!==Zx&&(o.write=nS(e,t.write.bind(t),n)),o}function iS({atoms:e=[],atomFamilies:t=[],parentStore:n,name:r}){const i=new WeakSet(e),o=Kx.get(n),a=(null==o?void 0:o[3])??n,s=[new WeakMap,new WeakMap,new WeakMap,a,o,new Set,void 0],l=s[0],u=s[5],c=function(e){const t=e[3],n=[...zb(t)],r=n[21],i=n[22],o=n[23],a=n[9],s={};n[9]=(e,t)=>a(l,t),n[21]=h(r),n[22]=p,n[23]=h(o),n[24]=([...e])=>{const t=[m(e[0],u),m(e[1],c),m(e[2]),g(e[3]),e[4],e[5],y(e[6]),h(e[7]),h(e[8]),e[9],h(e[10]),h(e[11],e=>d(t[0],e)),e[12],e[13],h(e[14]),h(e[15]),h(e[16]),h(e[17]),h(e[18]),h(e[19]),h(e[20]),h(e[21]),h(e[22]),h(e[23]),()=>e];return t};const l=Wb(...n);return l;function u(t){const n=new WeakMap;return function(r){let i=n.get(r);if(i)return i;const o=t(r);return o?(i={...o,d:m(o.d,function(t){return n=>t(Qx(e,n)[0])}),p:g(o.p),get n(){return o.n},set n(e){o.n=e},get v(){return o.v},set v(e){o.v=e},get e(){return o.e},set e(e){o.e=e}},n.set(r,i),i):void 0}}function c(e){const t=new WeakMap;return function(n){let r=t.get(n);if(r)return r;const i=e(n);return i?(r={...i,d:g(i.d),t:g(i.t),get u(){return i.u},set u(e){i.u=e}},t.set(n,r),r):void 0}}function d(e,t){return function(n,r){return e.get(r)||(e.set(r,t(n,r)),e.get(r))}}function p(t,n,...r){const[o,a]=Qx(e,n),s=tS(e,o,n,a,e);try{return i(t,o,...r)}finally{null==s||s()}}function f(t,n){return function(r,...i){const[o]=Qx(e,r);return(n?n(t):t)(o,...i)}}function h(t,n){return function(r,i,...o){const[a]=Qx(e,i);return(n?n(t):t)(r,a,...o)}}function m(e,t){return{get:f(e.get.bind(e),t),set:f(e.set.bind(e)),has:f(e.has.bind(e)),delete:f(e.delete.bind(e))}}function g(t){return{get size(){return t.size},add:f(t.add.bind(t)),has:f(t.has.bind(t)),delete:f(t.delete.bind(t)),clear:t.clear.bind(t),forEach:e=>t.forEach(f(e)),*[Symbol.iterator](){for(const n of t)yield Qx(e,n)[0]}}}function v(t){if(!t)return;const n=f(t);return n.add=function(n,r){if(void 0===n)return t.add(void 0,r);const[i]=Qx(e,n);return t.add(i,r)},n}function y(e){const t={get f(){return e.f},set f(t){e.f=t}};return Object.defineProperties(t,Object.fromEntries(["r","c","m","u"].map(t=>[t,{get:()=>s[t]??(s[t]=v(e[t])),set(n){delete s[t],e[t]=n},configurable:!0,enumerable:!0}]))),Object.assign(t,e)}}(s);s[6]=c,Object.assign(c,{name:r}),Kx.set(c,s);for(const t of new Set(e))l.set(t,[rS(s,t,s),s]);for(const e of new Set(t)){for(const t of e.getParams()){const n=e(t);l.has(n)||l.set(n,[rS(s,n,s),s])}const t=e.unstable_listen(({type:e,atom:t})=>{"CREATE"!==e||l.has(t)?"REMOVE"===e&&!i.has(t)&&l.delete(t):l.set(t,[rS(s,t,s),s])});u.add(t)}return c}const oS=function(e,t){return function(n){const{atoms:r=[],atomFamilies:i=[],children:o,scope:a,name:s}=n,l=t(),u=Array.from(r,e=>Array.isArray(e)?e[0]:e);function d(){return[a??iS({atoms:u,atomFamilies:i,parentStore:l,name:s}),function(e){return l!==e.parentStore||!Ux(u,e.atoms)||!Ux(i,e.atomFamilies)||a!==e.providedScope}]}const[[p,h],m]=g(d);if(h({atoms:u,atomFamilies:i,parentStore:l,providedScope:a})){const e=Kx.get(p);e&&eS(e),m(d)}return ux(Array.from(r).filter(Array.isArray),{store:p}),f(()=>{const e=Kx.get(p);return()=>{e&&eS(e)}},[p]),c(e,{store:p,children:o})}}(Xb,Kb);var aS=Object.defineProperty,sS=Object.defineProperties,lS=Object.getOwnPropertyDescriptors,uS=Object.getOwnPropertySymbols,cS=Object.prototype.hasOwnProperty,dS=Object.prototype.propertyIsEnumerable,pS=(e,t,n)=>t in e?aS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fS=(e,t)=>{for(var n in t||(t={}))cS.call(t,n)&&pS(e,n,t[n]);if(uS)for(var n of uS(t))dS.call(t,n)&&pS(e,n,t[n]);return e},hS=(e,t)=>sS(e,lS(t));function mS(e,t,n){if(t===n)return e;const r=e.slice();return r.splice(n,0,r.splice(t,1)[0]),r}function gS(e){return"initialIndex"in e&&"number"==typeof e.initialIndex&&"index"in e&&"number"==typeof e.index}function vS(e,t){return function(e,t,n){var r,i,o;const{source:a,target:s,canceled:l}=t.operation;if(!a||!s||l)return"preventDefault"in t&&t.preventDefault(),e;const u=(e,t)=>e===t||"object"==typeof e&&"id"in e&&e.id===t;if(Array.isArray(e)){const r=e.findIndex(e=>u(e,a.id)),i=e.findIndex(e=>u(e,s.id));if(-1===r||-1===i){if(gS(a)){const r=a.initialIndex,i=a.index;return r===i||r<0||r>=e.length?("preventDefault"in t&&t.preventDefault(),e):n(e,r,i)}return e}if(!l&&"index"in a&&"number"==typeof a.index){const t=a.index;if(t!==r)return n(e,r,t)}return n(e,r,i)}const c=Object.entries(e);let d,p,f=-1,h=-1;for(const[e,t]of c)if(-1===f&&(f=t.findIndex(e=>u(e,a.id)),-1!==f&&(d=e)),-1===h&&(h=t.findIndex(e=>u(e,s.id)),-1!==h&&(p=e)),-1!==f&&-1!==h)break;if(-1===f&&gS(a)){const r=a.initialGroup,i=a.initialIndex,o=a.group,s=a.index;if(null==r||null==o||!(r in e)||!(o in e))return"preventDefault"in t&&t.preventDefault(),e;if(r===o&&i===s)return"preventDefault"in t&&t.preventDefault(),e;if(r===o)return hS(fS({},e),{[r]:n(e[r],i,s)});const l=e[r][i];return hS(fS({},e),{[r]:[...e[r].slice(0,i),...e[r].slice(i+1)],[o]:[...e[o].slice(0,s),l,...e[o].slice(s)]})}if(!a.manager)return e;const{dragOperation:m}=a.manager,g=null!=(i=null==(r=m.shape)?void 0:r.current.center)?i:m.position.current;if(null==p&&s.id in e){const t=s.shape&&g.y>s.shape.center.y?e[s.id].length:0;p=s.id,h=t}if(null==d||null==p||d===p&&f===h){if(null!=d&&d===p&&f===h&&gS(a)){const t=null!=a.group&&a.group!==d,r=a.index!==f;if(t||r){const t=null!=(o=a.group)?o:d;if(t in e){if(d===t)return hS(fS({},e),{[d]:n(e[d],f,a.index)});const r=e[d][f];return hS(fS({},e),{[d]:[...e[d].slice(0,f),...e[d].slice(f+1)],[t]:[...e[t].slice(0,a.index),r,...e[t].slice(a.index)]})}}}return"preventDefault"in t&&t.preventDefault(),e}if(d===p)return hS(fS({},e),{[d]:n(e[d],f,h)});const v=s.shape&&Math.round(g.y)>Math.round(s.shape.center.y)?1:0,y=e[d][f];return hS(fS({},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,mS)}function yS(e,t){let n=null;const r=new Map,i=new Set;function o(i){let s;if(void 0===t)s=r.get(i);else for(const[e,n]of r)if(t(e,i)){s=n;break}if(void 0!==s){if(!n?.(s[1],i))return s[0];o.remove(i)}const l=e(i);return r.set(i,[l,Date.now()]),a("CREATE",i,l),l}function a(e,t,n){for(const r of i)r({type:e,param:t,atom:n})}return o.unstable_listen=e=>(i.add(e),()=>{i.delete(e)}),o.getParams=()=>r.keys(),o.remove=e=>{if(void 0===t){if(!r.has(e))return;const[t]=r.get(e);r.delete(e),a("REMOVE",e,t)}else for(const[n,[i]]of r)if(t(n,e)){r.delete(n),a("REMOVE",n,i);break}},o.setShouldRemove=e=>{if(n=e,n)for(const[e,[t,i]]of r)n(i,e)&&(r.delete(e),a("REMOVE",e,t))},o}const bS=({itemIndex:e,sectionIndex:t})=>void 0!==e?`${t}-${e}`:`${t}`,xS=Vb(),SS=Vb(e=>e(xS)?.numberOfSections??0),wS=Vb(e=>e(xS)?.numberOfItemsInSection??[]),CS=Vb(e=>e(xS)?.keyExtractor??bS),ES=Vb(e=>e(xS)?.emptyTexts??(()=>({title:"No items",message:"There are no items to display."}))),IS=Vb(e=>e(xS)?.onDragEnd),DS=Vb(e=>e(xS)?.onDragOver),PS=Vb(e=>e(xS)?.itemRenderer),MS=Vb(e=>e(xS)?.headerRenderer),RS=Vb(e=>e(xS)?.dragOverlayRenderer),kS=Vb(e=>e(xS)?.onClick),LS=Vb(e=>{const t=e(SS),n=e(wS),r=e(CS),i={};for(let e=0;e<t;e++)i[e]=Array.from({length:n[e]},(t,n)=>r({sectionIndex:e,itemIndex:n}));return i}),AS=Vb(null),OS=Vb(e=>e(AS),(e,t,n)=>{if(null===n)return void t(AS,null);const r=e(AS);t(AS,{...r,...n})}),TS=yS(e=>Vb(null,(t,n,r)=>{let i;"over"===e?i=t(DS):"end"===e&&(i=t(IS),n(OS,null));const{source:o,target:a}=r.operation;if(null===a)return void n(OS,{toIndex:void 0,toSectionIndex:void 0});const s=o.data.sectionIndex!==a.data.sectionIndex;let l;if(s){const e=vS(t(LS),r)[a.data.sectionIndex].indexOf(o.id);l=-1!==e?e:a.sortable?.index??0}else l=a.sortable?.index??0;if("start"===e)n(OS,{id:o.id,startSection:o.data.sectionKey,startIndex:o.data.itemIndex,startSectionIndex:o.data.sectionIndex});else if("over"===e){const e=t(OS)?.startIndex;n(OS,{toIndex:!s&&void 0!==e&&l>e?l+1:l,toSectionIndex:a.data.sectionIndex})}i?.({id:o.id,toIndex:l,toSection:a.data.sectionKey,fromSection:o.data.sectionKey,startSection:t(OS)?.startSection??o.data.sectionKey,event:r})})),qS=[xS,SS,wS,CS,ES,IS,PS,MS,kS,OS],_S=[TS],NS=({props:e,children:t})=>{const n=rx(xS);return v(()=>{n(e)},[e,n]),t};var jS=Symbol.for("preact-signals");function FS(){if(VS>1)VS--;else{var e,t=!1;for(!function(){var e=YS;for(YS=void 0;void 0!==e;)e.S.v===e.v&&(e.S.i=e.i),e=e.o}();void 0!==HS;){var n=HS;for(HS=void 0,BS++;void 0!==n;){var r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&QS(n))try{n.c()}catch(n){t||(e=n,t=!0)}n=r}}if(BS=0,VS--,t)throw e}}function zS(e){if(VS>0)return e();US=++GS,VS++;try{return e()}finally{FS()}}var WS=void 0;function $S(e){var t=WS;WS=void 0;try{return e()}finally{WS=t}}var HS=void 0,VS=0,BS=0,GS=0,US=0,YS=void 0,KS=0;function XS(e){if(void 0!==WS){var t=e.n;if(void 0===t||t.t!==WS)return t={i:0,S:e,p:WS.s,n:void 0,t:WS,e:void 0,x:void 0,r:t},void 0!==WS.s&&(WS.s.n=t),WS.s=t,e.n=t,32&WS.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=WS.s,t.n=void 0,WS.s.n=t,WS.s=t),t}}function JS(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 ZS(e,t){return new JS(e,t)}function QS(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 ew(e){for(var t=e.s;void 0!==t;t=t.n){var n=t.S.n;if(void 0!==n&&(t.r=n),t.S.n=t,t.i=-1,void 0===t.n){e.s=t;break}}}function tw(e){for(var t=e.s,n=void 0;void 0!==t;){var r=t.p;-1===t.i?(t.S.U(t),void 0!==r&&(r.n=t.n),void 0!==t.n&&(t.n.p=r)):n=t,t.S.n=t.r,void 0!==t.r&&(t.r=void 0),t=r}e.s=n}function nw(e,t){JS.call(this,void 0),this.x=e,this.s=void 0,this.g=KS-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 rw(e,t){return new nw(e,t)}function iw(e){var t=e.m;if(e.m=void 0,"function"==typeof t){VS++;var n=WS;WS=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,ow(e),t}finally{WS=n,FS()}}}function ow(e){for(var t=e.s;void 0!==t;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,iw(e)}function aw(e){if(WS!==this)throw new Error("Out-of-order effect");tw(this),WS=e,this.f&=-2,8&this.f&&ow(this),FS()}function sw(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 lw(e,t){var n=new sw(e,t);try{n.c()}catch(e){throw n.d(),e}var r=n.d.bind(n);return r[Symbol.dispose]=r,r}JS.prototype.brand=jS,JS.prototype.h=function(){return!0},JS.prototype.S=function(e){var t=this,n=this.t;n!==e&&void 0===e.e&&(e.x=n,this.t=e,void 0!==n?n.e=e:$S(function(){var e;null==(e=t.W)||e.call(t)}))},JS.prototype.U=function(e){var t=this;if(void 0!==this.t){var n=e.e,r=e.x;void 0!==n&&(n.x=r,e.e=void 0),void 0!==r&&(r.e=n,e.x=void 0),e===this.t&&(this.t=r,void 0===r&&$S(function(){var e;null==(e=t.Z)||e.call(t)}))}},JS.prototype.subscribe=function(e){var t=this;return lw(function(){var n=t.value,r=WS;WS=void 0;try{e(n)}finally{WS=r}},{name:"sub"})},JS.prototype.valueOf=function(){return this.value},JS.prototype.toString=function(){return this.value+""},JS.prototype.toJSON=function(){return this.value},JS.prototype.peek=function(){var e=WS;WS=void 0;try{return this.value}finally{WS=e}},Object.defineProperty(JS.prototype,"value",{get:function(){var e=XS(this);return void 0!==e&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(BS>100)throw new Error("Cycle detected");!function(e){0!==VS&&0===BS&&e.l!==US&&(e.l=US,YS={S:e,v:e.v,i:e.i,o:YS})}(this),this.v=e,this.i++,KS++,VS++;try{for(var t=this.t;void 0!==t;t=t.x)t.t.N()}finally{FS()}}}}),nw.prototype=new JS,nw.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===KS)return!0;if(this.g=KS,this.f|=1,this.i>0&&!QS(this))return this.f&=-2,!0;var e=WS;try{ew(this),WS=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 WS=e,tw(this),this.f&=-2,!0},nw.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)}JS.prototype.S.call(this,e)},nw.prototype.U=function(e){if(void 0!==this.t&&(JS.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)}},nw.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(nw.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=XS(this);if(this.h(),void 0!==e&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),sw.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()}},sw.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,iw(this),ew(this),VS++;var e=WS;return WS=this,aw.bind(this,e)},sw.prototype.N=function(){2&this.f||(this.f|=2,this.u=HS,HS=this)},sw.prototype.d=function(){this.f|=8,1&this.f||ow(this)},sw.prototype.dispose=function(){this.d()};var uw,cw,dw,pw,fw,hw,mw,gw,vw,yw,bw,xw,Sw,ww,Cw,Ew,Iw,Dw,Pw,Mw,Rw=Object.create,kw=Object.defineProperty,Lw=Object.defineProperties,Aw=Object.getOwnPropertyDescriptor,Ow=Object.getOwnPropertyDescriptors,Tw=Object.getOwnPropertySymbols,qw=Object.prototype.hasOwnProperty,_w=Object.prototype.propertyIsEnumerable,Nw=e=>{throw TypeError(e)},jw=(e,t,n)=>t in e?kw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Fw=(e,t)=>kw(e,"name",{value:t,configurable:!0}),zw=["class","method","getter","setter","accessor","field","value","get","set"],Ww=e=>void 0!==e&&"function"!=typeof e?Nw("Function expected"):e,$w=(e,t,n,r,i)=>({kind:zw[e],name:t,metadata:r,addInitializer:e=>n._?Nw("Already initialized"):i.push(Ww(e||null))}),Hw=(e,t)=>{return jw(t,(n="metadata",(r=Symbol[n])?r:Symbol.for("Symbol."+n)),e[3]);var n,r},Vw=(e,t,n,r)=>{for(var i=0,o=e[t>>1],a=o&&o.length;i<a;i++)1&t?o[i].call(n):r=o[i].call(n,r);return r},Bw=(e,t,n,r,i,o)=>{var a,s,l,u,c,d=7&t,p=!!(8&t),f=!!(16&t),h=d>3?e.length+1:d?p?1:2:0,m=zw[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)&&Aw(d<4?i:{get[n](){return Yw(this,o)},set[n](e){return Xw(this,o,e)}},n));d?f&&d<4&&Fw(o,(d>2?"set ":d>1?"get ":"")+n):Fw(i,n);for(var b=r.length-1;b>=0;b--)u=$w(d,n,l={},e[3],v),d&&(u.static=p,u.private=f,c=u.access={has:f?e=>Uw(i,e):e=>n in e},3^d&&(c.get=f?e=>(1^d?Yw:Jw)(e,i,4^d?o:y.get):e=>e[n]),d>2&&(c.set=f?(e,t)=>Xw(e,i,t,4^d?o:y.set):(e,t)=>e[n]=t)),s=(0,r[b])(d?d<4?f?o:y[m]:d>4?void 0:{get:y.get,set:y.set}:i,u),l._=1,4^d||void 0===s?Ww(s)&&(d>4?g.unshift(s):d?f?o=s:y[m]=s:i=s):"object"!=typeof s||null===s?Nw("Object expected"):(Ww(a=s.get)&&(y.get=a),Ww(a=s.set)&&(y.set=a),Ww(a=s.init)&&g.unshift(a));return d||Hw(e,i),y&&kw(i,n,y),f?4^d?o:y:i},Gw=(e,t,n)=>t.has(e)||Nw("Cannot "+n),Uw=(e,t)=>Object(t)!==t?Nw('Cannot use the "in" operator on this value'):e.has(t),Yw=(e,t,n)=>(Gw(e,t,"read from private field"),n?n.call(e):t.get(e)),Kw=(e,t,n)=>t.has(e)?Nw("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Xw=(e,t,n,r)=>(Gw(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Jw=(e,t,n)=>(Gw(e,t,"access private method"),n);function Zw(e,t){if(t){let n;return rw(()=>{const r=e();return r&&n&&t(n,r)?n:(n=r,r)})}return rw(e)}function Qw(e,t){if(Object.is(e,t))return!0;if(null===e||null===t)return!1;if("function"==typeof e&&"function"==typeof t)return e===t;if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;return!e.some((e,n)=>!Qw(e,t[n]))}if("object"==typeof e&&"object"==typeof t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const i=n.some(n=>!Qw(e[n],t[n]));return!i}return!1}function eC({get:e},t){return{init:e=>ZS(e),get(){return e.call(this).value},set(t){const n=e.call(this);n.peek()!==t&&(n.value=t)}}}function tC(e,t){const n=new WeakMap;return function(){let t=n.get(this);return t||(t=Zw(e.bind(this)),n.set(this,t)),t.value}}function nC(e=!0){return function(t,n){n.addInitializer(function(){const t="field"===n.kind||n.static?this:Object.getPrototypeOf(this),r=Object.getOwnPropertyDescriptor(t,n.name);r&&Object.defineProperty(t,n.name,((e,t)=>Lw(e,Ow(t)))(((e,t)=>{for(var n in t||(t={}))qw.call(t,n)&&jw(e,n,t[n]);if(Tw)for(var n of Tw(t))_w.call(t,n)&&jw(e,n,t[n]);return e})({},r),{enumerable:e}))})}}function rC(...e){const t=e.map(e=>lw(e));return()=>t.forEach(e=>e())}hw=[eC],fw=[eC],pw=[eC],dw=[nC()],cw=[nC()],uw=[nC()];var iC,oC=class{constructor(e,t=Object.is){this.defaultValue=e,this.equals=t,Vw(mw,5,this),Kw(this,xw),Kw(this,gw,Vw(mw,8,this)),Vw(mw,11,this),Kw(this,Sw,Vw(mw,12,this)),Vw(mw,15,this),Kw(this,Iw,Vw(mw,16,this)),Vw(mw,19,this),this.reset=this.reset.bind(this),this.reset()}get current(){return Yw(this,xw,Pw)}get initial(){return Yw(this,xw,yw)}get previous(){return Yw(this,xw,Cw)}set current(e){const t=$S(()=>Yw(this,xw,Pw));e&&t&&this.equals(t,e)||zS(()=>{Yw(this,xw,yw)||Xw(this,xw,e,bw),Xw(this,xw,t,Ew),Xw(this,xw,e,Mw)})}reset(e=this.defaultValue){zS(()=>{Xw(this,xw,void 0,Ew),Xw(this,xw,e,bw),Xw(this,xw,e,Mw)})}};function aC(e){return $S(()=>{const t={};for(const n in e)t[n]=e[n];return t})}mw=[,,,Rw(null)],gw=new WeakMap,xw=new WeakSet,Sw=new WeakMap,Iw=new WeakMap,vw=Bw(mw,20,"#initial",hw,xw,gw),yw=vw.get,bw=vw.set,ww=Bw(mw,20,"#previous",fw,xw,Sw),Cw=ww.get,Ew=ww.set,Dw=Bw(mw,20,"#current",pw,xw,Iw),Pw=Dw.get,Mw=Dw.set,Bw(mw,2,"current",dw,oC),Bw(mw,2,"initial",cw,oC),Bw(mw,2,"previous",uw,oC),Hw(mw,oC);iC=new WeakMap;var sC,lC,uC,cC,dC,pC=Object.create,fC=Object.defineProperty,hC=Object.getOwnPropertyDescriptor,mC=Object.getOwnPropertySymbols,gC=Object.prototype.hasOwnProperty,vC=Object.prototype.propertyIsEnumerable,yC=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),bC=e=>{throw TypeError(e)},xC=Math.pow,SC=(e,t,n)=>t in e?fC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wC=["class","method","getter","setter","accessor","field","value","get","set"],CC=e=>void 0!==e&&"function"!=typeof e?bC("Function expected"):e,EC=(e,t,n,r,i)=>({kind:wC[e],name:t,metadata:r,addInitializer:e=>n._?bC("Already initialized"):i.push(CC(e||null))}),IC=(e,t,n,r,i,o)=>{for(var a,s,l,u,c=7&t,d=wC[c+5],p=e[2]||(e[2]=[]),f=(i=i.prototype,hC(i,n)),h=r.length-1;h>=0;h--)(l=EC(c,n,s={},e[3],p)).static=false,l.private=false,u=l.access={has:e=>n in e},u.get=e=>e[n],a=(0,r[h])(f[d],l),s._=1,CC(a)&&(f[d]=a);return f&&fC(i,n,f),i},DC=(e,t,n)=>t.has(e)||bC("Cannot "+n),PC=class e{constructor(e,t){this.x=e,this.y=t}static delta(t,n){return new e(t.x-n.x,t.y-n.y)}static distance(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}static equals(e,t){return e.x===t.x&&e.y===t.y}static from({x:t,y:n}){return new e(t,n)}},MC=class e{constructor(e,t,n,r){this.left=e,this.top=t,this.width=n,this.height=r,this.scale={x:1,y:1}}get inverseScale(){return{x:1/this.scale.x,y:1/this.scale.y}}translate(t,n){const{top:r,left:i,width:o,height:a,scale:s}=this,l=new e(i+t,r+n,o,a);return l.scale=((e,t)=>{for(var n in t||(t={}))gC.call(t,n)&&SC(e,n,t[n]);if(mC)for(var n of mC(t))vC.call(t,n)&&SC(e,n,t[n]);return e})({},s),l}get boundingRectangle(){const{width:e,height:t,left:n,top:r,right:i,bottom:o}=this;return{width:e,height:t,left:n,top:r,right:i,bottom:o}}get center(){const{left:e,top:t,right:n,bottom:r}=this;return new PC((e+n)/2,(t+r)/2)}get area(){const{width:e,height:t}=this;return e*t}equals(t){if(!(t instanceof e))return!1;const{left:n,top:r,width:i,height:o}=this;return n===t.left&&r===t.top&&i===t.width&&o===t.height}containsPoint(e){const{top:t,left:n,bottom:r,right:i}=this;return t<=e.y&&e.y<=r&&n<=e.x&&e.x<=i}intersectionArea(t){return t instanceof e?function(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),a=i-r,s=o-n;if(r<i&&n<o){return a*s}return 0}(this,t):0}intersectionRatio(e){const{area:t}=this,n=this.intersectionArea(e);return n/(e.area+t-n)}get bottom(){const{top:e,height:t}=this;return e+t}get right(){const{left:e,width:t}=this;return e+t}get aspectRatio(){const{width:e,height:t}=this;return e/t}get corners(){return[{x:this.left,y:this.top},{x:this.right,y:this.top},{x:this.left,y:this.bottom},{x:this.right,y:this.bottom}]}static from({top:t,left:n,width:r,height:i}){return new e(n,t,r,i)}static delta(e,t,n={x:"center",y:"center"}){const r=(e,t)=>{const r=n[t],i="x"===t?e.left:e.top,o="x"===t?e.width:e.height;return"start"==r?i:"end"==r?i+o:i+o/2};return PC.delta({x:r(e,"x"),y:r(e,"y")},{x:r(t,"x"),y:r(t,"y")})}static intersectionRatio(t,n){return e.from(t).intersectionRatio(e.from(n))}};var RC,kC=class extends(uC=oC,lC=[tC],sC=[tC],uC){constructor(e){var t,n,r;super(PC.from(e),(e,t)=>PC.equals(e,t)),((e,t,n)=>{for(var r=0,i=e[t>>1],o=i&&i.length;r<o;r++)i[r].call(n)})(dC,5,this),t=this,r=0,(n=cC).has(t)?bC("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(t):n.set(t,r),this.velocity={x:0,y:0}}get delta(){return PC.delta(this.current,this.initial)}get direction(){const{current:e,previous:t}=this;if(!t)return null;const n={x:e.x-t.x,y:e.y-t.y};return n.x||n.y?Math.abs(n.x)>Math.abs(n.y)?n.x>0?"right":"left":n.y>0?"down":"up":null}get current(){return super.current}set current(e){const{current:t}=this,n=PC.from(e),r={x:n.x-t.x,y:n.y-t.y},i=Date.now(),o=i-(DC(a=this,s=cC,"read from private field"),s.get(a));var a,s;const l=e=>Math.round(e/o*100);zS(()=>{((e,t,n)=>{DC(e,t,"write to private field"),t.set(e,n)})(this,cC,i),this.velocity={x:l(r.x),y:l(r.y)},super.current=n})}reset(e=this.defaultValue){super.reset(PC.from(e)),this.velocity={x:0,y:0}}};function LC({x:e,y:t},n){const r=Math.abs(e),i=Math.abs(t);return"number"==typeof n?Math.sqrt(xC(r,2)+xC(i,2))>n:"x"in n&&"y"in n?r>n.x&&i>n.y:"x"in n?r>n.x:"y"in n&&i>n.y}dC=(e=>{var t;return[,,,pC(null!=(t=null==e?void 0:e[yC("metadata")])?t:null)]})(uC),cC=new WeakMap,IC(dC,2,"delta",lC,kC),IC(dC,2,"direction",sC,kC),RC=dC,SC(kC,yC("metadata"),RC[3]);var AC,OC,TC,qC,_C=(e=>(e.Horizontal="x",e.Vertical="y",e))(_C||{}),NC=Object.values(_C),jC=Object.create,FC=Object.defineProperty,zC=Object.defineProperties,WC=Object.getOwnPropertyDescriptor,$C=Object.getOwnPropertyDescriptors,HC=Object.getOwnPropertySymbols,VC=Object.prototype.hasOwnProperty,BC=Object.prototype.propertyIsEnumerable,GC=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),UC=e=>{throw TypeError(e)},YC=(e,t,n)=>t in e?FC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,KC=(e,t)=>{for(var n in t||(t={}))VC.call(t,n)&&YC(e,n,t[n]);if(HC)for(var n of HC(t))BC.call(t,n)&&YC(e,n,t[n]);return e},XC=(e,t)=>zC(e,$C(t)),JC=(e,t)=>FC(e,"name",{value:t,configurable:!0}),ZC=(e,t)=>{var n={};for(var r in e)VC.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&HC)for(var r of HC(e))t.indexOf(r)<0&&BC.call(e,r)&&(n[r]=e[r]);return n},QC=e=>{var t;return[,,,jC(null!=(t=null==e?void 0:e[GC("metadata")])?t:null)]},eE=["class","method","getter","setter","accessor","field","value","get","set"],tE=e=>void 0!==e&&"function"!=typeof e?UC("Function expected"):e,nE=(e,t,n,r,i)=>({kind:eE[e],name:t,metadata:r,addInitializer:e=>n._?UC("Already initialized"):i.push(tE(e||null))}),rE=(e,t)=>YC(t,GC("metadata"),e[3]),iE=(e,t,n,r)=>{for(var i=0,o=e[t>>1],a=o&&o.length;i<a;i++)1&t?o[i].call(n):r=o[i].call(n,r);return r},oE=(e,t,n,r,i,o)=>{var a,s,l,u,c,d=7&t,p=!!(8&t),f=!!(16&t),h=d>3?e.length+1:d?p?1:2:0,m=eE[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)&&WC(d<4?i:{get[n](){return lE(this,o)},set[n](e){return cE(this,o,e)}},n));d?f&&d<4&&JC(o,(d>2?"set ":d>1?"get ":"")+n):JC(i,n);for(var b=r.length-1;b>=0;b--)u=nE(d,n,l={},e[3],v),d&&(u.static=p,u.private=f,c=u.access={has:f?e=>sE(i,e):e=>n in e},3^d&&(c.get=f?e=>(1^d?lE:dE)(e,i,4^d?o:y.get):e=>e[n]),d>2&&(c.set=f?(e,t)=>cE(e,i,t,4^d?o:y.set):(e,t)=>e[n]=t)),s=(0,r[b])(d?d<4?f?o:y[m]:d>4?void 0:{get:y.get,set:y.set}:i,u),l._=1,4^d||void 0===s?tE(s)&&(d>4?g.unshift(s):d?f?o=s:y[m]=s:i=s):"object"!=typeof s||null===s?UC("Object expected"):(tE(a=s.get)&&(y.get=a),tE(a=s.set)&&(y.set=a),tE(a=s.init)&&g.unshift(a));return d||rE(e,i),y&&FC(i,n,y),f?4^d?o:y:i},aE=(e,t,n)=>t.has(e)||UC("Cannot "+n),sE=(e,t)=>Object(t)!==t?UC('Cannot use the "in" operator on this value'):e.has(t),lE=(e,t,n)=>(aE(e,t,"read from private field"),n?n.call(e):t.get(e)),uE=(e,t,n)=>t.has(e)?UC("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),cE=(e,t,n,r)=>(aE(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),dE=(e,t,n)=>(aE(e,t,"access private method"),n);function pE(e,t){return{plugin:e,options:t}}function fE(e){return t=>pE(e,t)}function hE(e){return"function"==typeof e?{plugin:e,options:void 0}:e}AC=[eC];var mE=class{constructor(e,t){this.manager=e,this.options=t,uE(this,TC,iE(OC,8,this,!1)),iE(OC,11,this),uE(this,qC,new Set)}enable(){this.disabled=!1}disable(){this.disabled=!0}isDisabled(){return $S(()=>this.disabled)}configure(e){this.options=e}registerEffect(e){const t=lw(e.bind(this));return lE(this,qC).add(t),t}destroy(){lE(this,qC).forEach(e=>e())}static configure(e){return pE(this,e)}};OC=QC(null),TC=new WeakMap,qC=new WeakMap,oE(OC,4,"disabled",AC,mE,TC),rE(OC,mE);var gE,vE=class extends mE{},yE=class{constructor(e){this.manager=e,this.instances=new Map,uE(this,gE,[])}get values(){return Array.from(this.instances.values())}set values(e){const t=e.map(hE).reduceRight((e,t)=>e.some(({plugin:e})=>e===t.plugin)?e:[t,...e],[]),n=t.map(({plugin:e})=>e);for(const e of lE(this,gE))if(!n.includes(e)){if(e.prototype instanceof vE)continue;this.unregister(e)}for(const{plugin:e,options:n}of t)this.register(e,n);cE(this,gE,n)}get(e){return this.instances.get(e)}register(e,t){const n=this.instances.get(e);if(n)return n.options!==t&&(n.options=t),n;const r=new e(this.manager,t);return this.instances.set(e,r),r}unregister(e){const t=this.instances.get(e);t&&(t.destroy(),this.instances.delete(e))}destroy(){for(const e of this.instances.values())e.destroy();this.instances.clear()}};function bE(e,t){return e.priority===t.priority?e.type===t.type?t.value-e.value:t.type-e.type:t.priority-e.priority}gE=new WeakMap;var xE,SE,wE=[],CE=class extends mE{constructor(e){super(e),uE(this,xE),uE(this,SE),this.computeCollisions=this.computeCollisions.bind(this),cE(this,SE,ZS(wE)),this.destroy=rC(()=>{const e=this.computeCollisions(),t=$S(()=>this.manager.dragOperation.position.current);if(e!==wE){const e=lE(this,xE);if(cE(this,xE,t),e&&t.x==e.x&&t.y==e.y)return}else cE(this,xE,void 0);lE(this,SE).value=e},()=>{const{dragOperation:e}=this.manager;e.status.initialized&&this.forceUpdate()})}forceUpdate(e=!0){$S(()=>{e?lE(this,SE).value=this.computeCollisions():cE(this,xE,void 0)})}computeCollisions(e,t){const{registry:n,dragOperation:r}=this.manager,{source:i,shape:o,status:a}=r;if(!a.initialized||!o)return wE;const s=[],l=[];for(const o of null!=e?e:n.droppables){if(o.disabled)continue;if(i&&!o.accepts(i))continue;const e=null!=t?t:o.collisionDetector;if(!e)continue;l.push(o),o.shape;const n=$S(()=>e({droppable:o,dragOperation:r}));n&&(null!=o.collisionPriority&&(n.priority=o.collisionPriority),s.push(n))}return 0===l.length?wE:(s.sort(bE),s)}get collisions(){return lE(this,SE).value}};xE=new WeakMap,SE=new WeakMap;var EE=class{constructor(){this.registry=new Map}addEventListener(e,t){const{registry:n}=this,r=new Set(n.get(e));return r.add(t),n.set(e,r),()=>this.removeEventListener(e,t)}removeEventListener(e,t){const{registry:n}=this,r=new Set(n.get(e));r.delete(t),n.set(e,r)}dispatch(e,...t){const{registry:n}=this,r=n.get(e);if(r)for(const e of r)e(...t)}},IE=class extends EE{constructor(e){super(),this.manager=e}dispatch(e,t){const n=[t,this.manager];super.dispatch(e,...n)}};function DE(e,t=!0){let n=!1;return XC(KC({},e),{cancelable:t,get defaultPrevented(){return n},preventDefault(){t&&(n=!0)}})}var PE,ME,RE,kE,LE,AE,OE,TE,qE,_E=class extends vE{constructor(e){super(e);let t=[];this.destroy=rC(()=>{const{dragOperation:n,collisionObserver:r}=e;n.status.initializing&&(t=[],r.enable())},()=>{const{collisionObserver:n,monitor:r}=e,{collisions:i}=n;if(n.isDisabled())return;const o=DE({collisions:i});if(r.dispatch("collision",o),o.defaultPrevented)return;if(((e,t)=>e.map(({id:e})=>e).join("")===t.map(({id:e})=>e).join(""))(i,t))return;t=i;const[a]=i;$S(()=>{var t;(null==a?void 0:a.id)!==(null==(t=e.dragOperation.target)?void 0:t.id)&&(n.disable(),e.actions.setDropTarget(null==a?void 0:a.id).then(()=>{n.enable()}))})})}},NE=(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))(NE||{}),jE=(e=>(e[e.Collision=0]="Collision",e[e.ShapeIntersection=1]="ShapeIntersection",e[e.PointerIntersection=2]="PointerIntersection",e))(jE||{});OE=[eC],AE=[tC],LE=[tC],kE=[tC],RE=[tC],ME=[tC],PE=[tC];var FE=class{constructor(){iE(TE,5,this),uE(this,qE,iE(TE,8,this,"idle")),iE(TE,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}};TE=QC(null),qE=new WeakMap,oE(TE,4,"value",OE,FE,qE),oE(TE,2,"current",AE,FE),oE(TE,2,"idle",LE,FE),oE(TE,2,"initializing",kE,FE),oE(TE,2,"initialized",RE,FE),oE(TE,2,"dragging",ME,FE),oE(TE,2,"dropped",PE,FE),rE(TE,FE);var zE,WE,$E,HE,VE,BE,GE,UE,YE,KE=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 $S(()=>{const{dragOperation:t}=this.manager,n=null!=e?e:null;if(t.targetIdentifier===n)return Promise.resolve(!1);t.targetIdentifier=n;const r=DE({operation:t.snapshot()});return t.status.dragging&&this.manager.monitor.dispatch("dragover",r),this.manager.renderer.rendering.then(()=>r.defaultPrevented)})}start(e){return $S(()=>{const{dragOperation:t}=this.manager;null!=e.source&&this.setDragSource(e.source);if(!t.source)throw new Error("Cannot start a drag operation without a drag source");if(!t.status.idle)throw new Error("Cannot start a drag operation while another is active");const n=new AbortController,{event:r,coordinates:i}=e;zS(()=>{t.status.set("initialization-pending"),t.shape=null,t.canceled=!1,t.activatorEvent=null!=r?r:null,t.position.reset(i)});const o=DE({operation:t.snapshot()});return this.manager.monitor.dispatch("beforedragstart",o),o.defaultPrevented?(t.reset(),n.abort(),n):(t.status.set("initializing"),t.controller=n,this.manager.renderer.rendering.then(()=>{if(n.signal.aborted)return;const{status:e}=t;"initializing"===e.current&&(t.status.set("dragging"),this.manager.monitor.dispatch("dragstart",{nativeEvent:r,operation:t.snapshot(),cancelable:!1}))}),n)})}move(e){return $S(()=>{var t,n;const{dragOperation:r}=this.manager,{status:i,controller:o}=r;if(!i.dragging||!o||o.signal.aborted)return;const a=DE({nativeEvent:e.event,operation:r.snapshot(),by:e.by,to:e.to},null==(t=e.cancelable)||t);(null==(n=e.propagate)||n)&&this.manager.monitor.dispatch("dragmove",a),queueMicrotask(()=>{var t,n,i,o,s;if(a.defaultPrevented)return;const l=null!=(s=e.to)?s:{x:r.position.current.x+(null!=(n=null==(t=e.by)?void 0:t.x)?n:0),y:r.position.current.y+(null!=(o=null==(i=e.by)?void 0:i.y)?o:0)};r.position.current=l})})}stop(e={}){return $S(()=>{var t,n;const{dragOperation:r}=this.manager,{controller:i}=r;if(!i||i.signal.aborted)return;let o;i.abort();const a=()=>{this.manager.renderer.rendering.then(()=>{r.status.set("dropped");const e=$S(()=>{var e;return"dropping"===(null==(e=r.source)?void 0:e.status)}),t=()=>{r.controller===i&&(r.controller=void 0),r.reset()};if(e){const{source:e}=r,n=lw(()=>{"idle"===(null==e?void 0:e.status)&&(n(),t())})}else this.manager.renderer.rendering.then(t)})};r.canceled=null!=(t=e.canceled)&&t,this.manager.monitor.dispatch("dragend",{nativeEvent:e.event,operation:r.snapshot(),canceled:null!=(n=e.canceled)&&n,suspend:()=>{const e={resume:()=>{},abort:()=>{}};return o=new Promise((t,n)=>{e.resume=t,e.abort=n}),e}}),o?o.then(a).catch(()=>r.reset()):a()})}};HE=[eC],$E=[eC],WE=[eC],zE=[eC];var XE=class{constructor(e,t){uE(this,BE,iE(VE,8,this)),iE(VE,11,this),uE(this,GE,iE(VE,12,this)),iE(VE,15,this),uE(this,UE,iE(VE,16,this)),iE(VE,19,this),uE(this,YE,iE(VE,20,this)),iE(VE,23,this);const{effects:n,id:r,data:i={},disabled:o=!1,register:a=!0}=e;let s=r;this.manager=t,this.id=r,this.data=i,this.disabled=o,this.effects=()=>{var e;return[()=>{const{id:e,manager:t}=this;if(e!==s)return null==t||t.registry.register(this),()=>null==t?void 0:t.registry.unregister(this)},...null!=(e=null==n?void 0:n())?e:[]]},this.register=this.register.bind(this),this.unregister=this.unregister.bind(this),this.destroy=this.destroy.bind(this),t&&a&&queueMicrotask(this.register)}register(){var e;return null==(e=this.manager)?void 0:e.registry.register(this)}unregister(){var e;null==(e=this.manager)||e.registry.unregister(this)}destroy(){var e;null==(e=this.manager)||e.registry.unregister(this)}};VE=QC(null),BE=new WeakMap,GE=new WeakMap,UE=new WeakMap,YE=new WeakMap,oE(VE,4,"manager",HE,XE,BE),oE(VE,4,"id",$E,XE,GE),oE(VE,4,"data",WE,XE,UE),oE(VE,4,"disabled",zE,XE,YE),rE(VE,XE);var JE,ZE,QE,eI,tI,nI,rI,iI,oI,aI,sI,lI,uI,cI,dI,pI,fI,hI,mI,gI,vI,yI,bI,xI,SI=class{constructor(){this.map=ZS(new Map),this.cleanupFunctions=new WeakMap,this.register=(e,t)=>{const n=this.map.peek(),r=n.get(e),i=()=>this.unregister(e,t);if(r===t)return i;if(r){const e=this.cleanupFunctions.get(r);null==e||e(),this.cleanupFunctions.delete(r)}const o=new Map(n);o.set(e,t),this.map.value=o;const a=rC(...t.effects());return this.cleanupFunctions.set(t,a),i},this.unregister=(e,t)=>{const n=this.map.peek();if(n.get(e)!==t)return;const r=this.cleanupFunctions.get(t);null==r||r(),this.cleanupFunctions.delete(t);const i=new Map(n);i.delete(e),this.map.value=i}}[Symbol.iterator](){return this.map.peek().values()}get value(){return this.map.value.values()}has(e){return this.map.value.has(e)}get(e){return this.map.value.get(e)}destroy(){for(const e of this){const t=this.cleanupFunctions.get(e);null==t||t(),e.destroy()}this.map.value=new Map}},wI=class extends(rI=XE,nI=[eC],tI=[eC],eI=[eC],QE=[tC],ZE=[tC],JE=[tC],rI){constructor(e,t){var n=e,{modifiers:r,type:i,sensors:o}=n,a=ZC(n,["modifiers","type","sensors"]);super(a,t),iE(iI,5,this),uE(this,oI,iE(iI,8,this)),iE(iI,11,this),uE(this,aI,iE(iI,12,this)),iE(iI,15,this),uE(this,sI,iE(iI,16,this,this.isDragSource?"dragging":"idle")),iE(iI,19,this),this.type=i,this.sensors=o,this.modifiers=r,this.alignment=a.alignment}get isDropping(){return"dropping"===this.status&&this.isDragSource}get isDragging(){return"dragging"===this.status&&this.isDragSource}get isDragSource(){var e,t;return(null==(t=null==(e=this.manager)?void 0:e.dragOperation.source)?void 0:t.id)===this.id}};iI=QC(rI),oI=new WeakMap,aI=new WeakMap,sI=new WeakMap,oE(iI,4,"type",nI,wI,oI),oE(iI,4,"modifiers",tI,wI,aI),oE(iI,4,"status",eI,wI,sI),oE(iI,2,"isDropping",QE,wI),oE(iI,2,"isDragging",ZE,wI),oE(iI,2,"isDragSource",JE,wI),rE(iI,wI);var CI=class extends(hI=XE,fI=[eC],pI=[eC],dI=[eC],cI=[eC],uI=[eC],lI=[tC],hI){constructor(e,t){var n=e,{accept:r,collisionDetector:i,collisionPriority:o,type:a}=n;super(ZC(n,["accept","collisionDetector","collisionPriority","type"]),t),iE(mI,5,this),uE(this,gI,iE(mI,8,this)),iE(mI,11,this),uE(this,vI,iE(mI,12,this)),iE(mI,15,this),uE(this,yI,iE(mI,16,this)),iE(mI,19,this),uE(this,bI,iE(mI,20,this)),iE(mI,23,this),uE(this,xI,iE(mI,24,this)),iE(mI,27,this),this.accept=r,this.collisionDetector=i,this.collisionPriority=o,this.type=a}accepts(e){const{accept:t}=this;return!t||("function"==typeof t?t(e):!!e.type&&(Array.isArray(t)?t.includes(e.type):e.type===t))}get isDropTarget(){var e,t;return(null==(t=null==(e=this.manager)?void 0:e.dragOperation.target)?void 0:t.id)===this.id}};mI=QC(hI),gI=new WeakMap,vI=new WeakMap,yI=new WeakMap,bI=new WeakMap,xI=new WeakMap,oE(mI,4,"accept",fI,CI,gI),oE(mI,4,"type",pI,CI,vI),oE(mI,4,"collisionDetector",dI,CI,yI),oE(mI,4,"collisionPriority",cI,CI,bI),oE(mI,4,"shape",uI,CI,xI),oE(mI,2,"isDropTarget",lI,CI),rE(mI,CI);var EI,II=class extends mE{constructor(e,t){super(e,t),this.manager=e,this.options=t}},DI=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)}},PI=class{constructor(e){this.options=e,uE(this,EI)}set controller(e){cE(this,EI,e),e.signal.addEventListener("abort",()=>this.abort())}activate(e){var t;null==(t=lE(this,EI))||t.activate(e)}};EI=new WeakMap;var MI,RI,kI,LI,AI,OI,TI,qI,_I,NI,jI,FI,zI,WI,$I,HI,VI,BI,GI,UI=class extends mE{constructor(e,t){super(e,t),this.manager=e,this.options=t}apply(e){return e.transform}},YI=class{constructor(e){this.draggables=new SI,this.droppables=new SI,this.plugins=new yE(e),this.sensors=new yE(e),this.modifiers=new yE(e)}register(e,t){if(e instanceof wI)return this.draggables.register(e.id,e);if(e instanceof CI)return this.droppables.register(e.id,e);if(e.prototype instanceof UI)return this.modifiers.register(e,t);if(e.prototype instanceof II)return this.sensors.register(e,t);if(e.prototype instanceof mE)return this.plugins.register(e,t);throw new Error("Invalid instance type")}unregister(e){if(e instanceof XE)return e instanceof wI?this.draggables.unregister(e.id,e):e instanceof CI?this.droppables.unregister(e.id,e):()=>{};if(e.prototype instanceof UI)return this.modifiers.unregister(e);if(e.prototype instanceof II)return this.sensors.unregister(e);if(e.prototype instanceof mE)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()}};_I=[tC],qI=[eC],TI=[eC],OI=[eC],AI=[eC],LI=[eC],kI=[tC],RI=[tC],MI=[tC];var KI=class{constructor(e){iE(zI,5,this),uE(this,NI),uE(this,jI),uE(this,FI,new oC(void 0,(e,t)=>e&&t?e.equals(t):e===t)),this.status=new FE,uE(this,WI,iE(zI,8,this,!1)),iE(zI,11,this),uE(this,$I,iE(zI,12,this,null)),iE(zI,15,this),uE(this,HI,iE(zI,16,this,null)),iE(zI,19,this),uE(this,VI,iE(zI,20,this,null)),iE(zI,23,this),uE(this,BI,iE(zI,24,this,[])),iE(zI,27,this),this.position=new kC({x:0,y:0}),uE(this,GI,{x:0,y:0}),cE(this,NI,e)}get shape(){const{current:e,initial:t,previous:n}=lE(this,FI);return e&&t?{current:e,initial:t,previous:n}:null}set shape(e){e?lE(this,FI).current=e:lE(this,FI).reset()}get source(){var e;const t=this.sourceIdentifier;if(null==t)return null;const n=lE(this,NI).registry.draggables.get(t);return n&&cE(this,jI,n),null!=(e=null!=n?n:lE(this,jI))?e:null}get target(){var e;const t=this.targetIdentifier;return null!=t&&null!=(e=lE(this,NI).registry.droppables.get(t))?e:null}get transform(){const{x:e,y:t}=this.position.delta;let n={x:e,y:t};for(const e of this.modifiers)n=e.apply(XC(KC({},this.snapshot()),{transform:n}));return cE(this,GI,n),n}snapshot(){return $S(()=>({source:this.source,target:this.target,activatorEvent:this.activatorEvent,transform:lE(this,GI),shape:this.shape?aC(this.shape):null,position:aC(this.position),status:aC(this.status),canceled:this.canceled}))}reset(){zS(()=>{this.status.set("idle"),this.sourceIdentifier=null,this.targetIdentifier=null,lE(this,FI).reset(),this.position.reset({x:0,y:0}),cE(this,GI,{x:0,y:0}),this.modifiers=[]})}};zI=QC(null),NI=new WeakMap,jI=new WeakMap,FI=new WeakMap,WI=new WeakMap,$I=new WeakMap,HI=new WeakMap,VI=new WeakMap,BI=new WeakMap,GI=new WeakMap,oE(zI,2,"shape",_I,KI),oE(zI,4,"canceled",qI,KI,WI),oE(zI,4,"activatorEvent",TI,KI,$I),oE(zI,4,"sourceIdentifier",OI,KI,HI),oE(zI,4,"targetIdentifier",AI,KI,VI),oE(zI,4,"modifiers",LI,KI,BI),oE(zI,2,"source",kI,KI),oE(zI,2,"target",RI,KI),oE(zI,2,"transform",MI,KI),rE(zI,KI);var XI={get rendering(){return Promise.resolve()}};function JI(e,t){return"function"==typeof e?e(t):null!=e?e:t}var ZI=class{constructor(e){var t;this.destroy=()=>{this.dragOperation.status.idle||this.actions.stop({canceled:!0}),this.dragOperation.modifiers.forEach(e=>e.destroy()),this.registry.destroy(),this.collisionObserver.destroy()};const n=null!=e?e:{},r=JI(n.plugins,[]),i=JI(n.sensors,[]),o=JI(n.modifiers,[]),a=null!=(t=n.renderer)?t:XI,s=new IE(this),l=new YI(this);this.registry=l,this.monitor=s,this.renderer=a,this.actions=new KE(this),this.dragOperation=new KI(this),this.collisionObserver=new CE(this),this.plugins=[_E,...r],this.modifiers=o,this.sensors=i;const{destroy:u}=this,c=rC(()=>{var e,t,n;const r=$S(()=>this.dragOperation.modifiers),i=this.modifiers;for(const e of r)i.includes(e)||e.destroy();this.dragOperation.modifiers=null!=(n=null==(t=null==(e=this.dragOperation.source)?void 0:e.modifiers)?void 0:t.map(e=>{const{plugin:t,options:n}=hE(e);return new t(this,n)}))?n:i});this.destroy=()=>{c(),u()}}get plugins(){return this.registry.plugins.values}set plugins(e){this.registry.plugins.values=e}get modifiers(){return this.registry.modifiers.values}set modifiers(e){this.registry.modifiers.values=e}get sensors(){return this.registry.sensors.values}set sensors(e){this.registry.sensors.values=e}},QI=e=>{throw TypeError(e)},eD=(e,t,n)=>t.has(e)||QI("Cannot "+n),tD=(e,t,n)=>(eD(e,t,"read from private field"),t.get(e)),nD=(e,t,n)=>t.has(e)?QI("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),rD=(e,t,n,r)=>(eD(e,t,"write to private field"),t.set(e,n),n),iD=(e,t,n)=>(eD(e,t,"access private method"),n);function oD(e){return!!e&&(e instanceof KeyframeEffect||"getKeyframes"in e&&"function"==typeof e.getKeyframes)}function aD(e,t){const n=e.getAnimations();if(n.length>0)for(const e of n){if("running"!==e.playState)continue;const{effect:n}=e,r=(oD(n)?n.getKeyframes():[]).filter(t);if(r.length>0)return[r[r.length-1],e]}return null}function sD(e){const{width:t,height:n,top:r,left:i,bottom:o,right:a}=e.getBoundingClientRect();return{width:t,height:n,top:r,left:i,bottom:o,right:a}}function lD(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function uD(e){return"nodeType"in e}function cD(e){var t,n,r;return e?lD(e)?e:uD(e)?"defaultView"in e?null!=(t=e.defaultView)?t:window:null!=(r=null==(n=e.ownerDocument)?void 0:n.defaultView)?r:window:window:window}function dD(e){const{Document:t}=cD(e);return e instanceof t||"nodeType"in e&&e.nodeType===Node.DOCUMENT_NODE}function pD(e){return!(!e||lD(e))&&(e instanceof cD(e).HTMLElement||"namespaceURI"in e&&"string"==typeof e.namespaceURI&&e.namespaceURI.endsWith("html"))}function fD(e){return e instanceof cD(e).SVGElement||"namespaceURI"in e&&"string"==typeof e.namespaceURI&&e.namespaceURI.endsWith("svg")}function hD(e){return e?lD(e)?e.document:uD(e)?dD(e)?e:pD(e)||fD(e)?e.ownerDocument:document:document:document}function mD(e,t){if(function(e){return"DETAILS"===e.tagName}(e)&&!1===e.open)return!1;const{overflow:n,overflowX:r,overflowY:i}=getComputedStyle(e);return"visible"===n&&"visible"===r&&"visible"===i}function gD(e,t=e.getBoundingClientRect(),n=0){var r,i,o,a,s;let l=t;const{ownerDocument:u}=e,c=null!=(r=u.defaultView)?r:window;let d=e.parentElement;for(;d&&d!==u.documentElement;){if(!mD(d)){const e=d.getBoundingClientRect(),t=n*(e.bottom-e.top),r=n*(e.right-e.left),i=n*(e.bottom-e.top),o=n*(e.right-e.left);l={top:Math.max(l.top,e.top-t),right:Math.min(l.right,e.right+r),bottom:Math.min(l.bottom,e.bottom+i),left:Math.max(l.left,e.left-o),width:0,height:0},l.width=l.right-l.left,l.height=l.bottom-l.top}d=d.parentElement}const p=c.visualViewport,f=null!=(i=null==p?void 0:p.offsetTop)?i:0,h=null!=(o=null==p?void 0:p.offsetLeft)?o:0,m=null!=(a=null==p?void 0:p.width)?a:c.innerWidth,g=null!=(s=null==p?void 0:p.height)?s:c.innerHeight,v=n*g,y=n*m;return l={top:Math.max(l.top,f-v),right:Math.min(l.right,h+m+y),bottom:Math.min(l.bottom,f+g+v),left:Math.max(l.left,h-y),width:0,height:0},l.width=l.right-l.left,l.height=l.bottom-l.top,l.width<0&&(l.width=0),l.height<0&&(l.height=0),l}function vD(e){return{x:e.clientX,y:e.clientY}}var yD="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function bD(e=document,t=new Set){if(t.has(e))return[];t.add(e);const n=[e];for(const r of Array.from(e.querySelectorAll("iframe, frame")))try{const e=r.contentDocument;e&&!t.has(e)&&n.push(...bD(e,t))}catch(e){}try{const r=e.defaultView;if(r&&r!==window.top){const i=r.parent;i&&i.document&&i.document!==e&&n.push(...bD(i.document,t))}}catch(e){}return n}function xD(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function SD(){var e,t;const n=xD()?window.visualViewport:null;return{x:null!=(e=null==n?void 0:n.offsetLeft)?e:0,y:null!=(t=null==n?void 0:n.offsetTop)?t:0}}function wD(e){return!(!e||!uD(e))&&e instanceof cD(e).ShadowRoot}function CD(e){if(e&&uD(e)){let t=e.getRootNode();if(wD(t))return t;if(t instanceof Document)return t}return hD(e)}function ED(e){return e.matchMedia("(prefers-reduced-motion: reduce)").matches}function ID(e){return"value"in e}function DD(e){return"CANVAS"===e.tagName}function PD(e,{x:t,y:n}){const r=e.elementFromPoint(t,n);if(function(e){return"IFRAME"===(null==e?void 0:e.tagName)}(r)){const{contentDocument:e}=r;if(e){const{left:i,top:o}=r.getBoundingClientRect();return PD(e,{x:t-i,y:n-o})}}return r}var MD=new WeakMap;var RD=class{constructor(){this.entries=new Set,this.clear=()=>{for(const e of this.entries){const[t,{type:n,listener:r,options:i}]=e;t.removeEventListener(n,r,i)}this.entries.clear()}}bind(e,t){const n=Array.isArray(e)?e:[e],r=Array.isArray(t)?t:[t],i=[];for(const e of n)for(const t of r){const{type:n,listener:r,options:o}=t,a=[e,t];e.addEventListener(n,r,o),this.entries.add(a),i.push(a)}return function(){for(const[e,{type:t,listener:n,options:r}]of i)e.removeEventListener(t,n,r)}}};function kD(e){const t=null==e?void 0:e.ownerDocument.defaultView;if(t&&t.self!==t.parent)return t.frameElement}function LD(e,t){const n=()=>performance.now();let r,i;return function(...o){const a=this;i?(null==r||r(),r=function(e,t){const n=setTimeout(e,t);return()=>clearTimeout(n)}(()=>{e.apply(a,o),i=n()},t-(n()-i))):(e.apply(a,o),i=n())}}var AD,OD=yD?ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},TD=class extends OD{constructor(e){super(t=>{tD(this,AD)?e(t,this):rD(this,AD,!0)}),nD(this,AD,!1)}};AD=new WeakMap;var qD,_D,ND,jD,FD,zD,WD,$D,HD,VD,BD,GD=Array.from({length:100},(e,t)=>t/100),UD=class{constructor(e,t,n={debug:!1,skipInitial:!1}){this.element=e,this.callback=t,nD(this,HD),this.disconnect=()=>{var e,t,n;rD(this,WD,!0),null==(e=tD(this,ND))||e.disconnect(),null==(t=tD(this,jD))||t.disconnect(),tD(this,FD).disconnect(),null==(n=tD(this,zD))||n.remove()},nD(this,qD,!0),nD(this,_D),nD(this,ND),nD(this,jD),nD(this,FD),nD(this,zD),nD(this,WD,!1),nD(this,$D,LD(()=>{var e,t,n;const{element:r}=this;if(null==(e=tD(this,jD))||e.disconnect(),tD(this,WD)||!tD(this,qD)||!r.isConnected)return;const i=null!=(t=r.ownerDocument)?t:document,{innerHeight:o,innerWidth:a}=null!=(n=i.defaultView)?n:window,s=r.getBoundingClientRect(),l=gD(r,s),{top:u,left:c,bottom:d,right:p}=l,f=-Math.floor(u),h=-Math.floor(c),m=`${f}px ${-Math.floor(a-p)}px ${-Math.floor(o-d)}px ${h}px`;this.boundingClientRect=s,rD(this,jD,new IntersectionObserver(e=>{const[t]=e,{intersectionRect:n}=t;1!==(1!==t.intersectionRatio?t.intersectionRatio:MC.intersectionRatio(n,gD(r)))&&tD(this,$D).call(this)},{threshold:GD,rootMargin:m,root:i})),tD(this,jD).observe(r),iD(this,HD,VD).call(this)},75)),this.boundingClientRect=e.getBoundingClientRect(),rD(this,qD,function(e,t=e.getBoundingClientRect()){const{width:n,height:r}=gD(e,t);return n>0&&r>0}(e,this.boundingClientRect));let r=!0;this.callback=e=>{r&&(r=!1,n.skipInitial)||t(e)};const i=e.ownerDocument;(null==n?void 0:n.debug)&&(rD(this,zD,document.createElement("div")),tD(this,zD).style.background="rgba(0,0,0,0.15)",tD(this,zD).style.position="fixed",tD(this,zD).style.pointerEvents="none",i.body.appendChild(tD(this,zD))),rD(this,FD,new IntersectionObserver(t=>{var n,r;const i=t[t.length-1],{boundingClientRect:o,isIntersecting:a}=i,{width:s,height:l}=o,u=tD(this,qD);rD(this,qD,a),(s||l)&&(u&&!a?(null==(n=tD(this,jD))||n.disconnect(),this.callback(null),null==(r=tD(this,ND))||r.disconnect(),rD(this,ND,void 0),tD(this,zD)&&(tD(this,zD).style.visibility="hidden")):tD(this,$D).call(this),a&&!tD(this,ND)&&(rD(this,ND,new TD(tD(this,$D))),tD(this,ND).observe(e)))},{threshold:GD,root:i})),tD(this,qD)&&!n.skipInitial&&this.callback(this.boundingClientRect),tD(this,FD).observe(e)}};qD=new WeakMap,_D=new WeakMap,ND=new WeakMap,jD=new WeakMap,FD=new WeakMap,zD=new WeakMap,WD=new WeakMap,$D=new WeakMap,HD=new WeakSet,VD=function(){tD(this,WD)||(iD(this,HD,BD).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,tD(this,_D))||(this.callback(this.boundingClientRect),rD(this,_D,this.boundingClientRect)))},BD=function(){if(tD(this,zD)){const{top:e,left:t,width:n,height:r}=gD(this.element);tD(this,zD).style.overflow="hidden",tD(this,zD).style.visibility="visible",tD(this,zD).style.top=`${Math.floor(e)}px`,tD(this,zD).style.left=`${Math.floor(t)}px`,tD(this,zD).style.width=`${Math.floor(n)}px`,tD(this,zD).style.height=`${Math.floor(r)}px`}};var YD,KD,XD,JD,ZD=new WeakMap,QD=new WeakMap;function eP(e,t){let n=ZD.get(e);if(!n){const t=new UD(e,t=>{const n=ZD.get(e);n&&n.callbacks.forEach(e=>e(t))},{skipInitial:!0});n={disconnect:t.disconnect,callbacks:new Set}}return n.callbacks.add(t),ZD.set(e,n),()=>{n.callbacks.delete(t),0===n.callbacks.size&&(ZD.delete(e),n.disconnect())}}var tP=class{constructor(e,t,n){this.callback=t,nD(this,YD),nD(this,KD,!1),nD(this,XD),nD(this,JD,LD(e=>{if(!tD(this,KD)&&e.target&&"contains"in e.target&&"function"==typeof e.target.contains)for(const t of tD(this,XD))if(e.target.contains(t)){this.callback(tD(this,YD).boundingClientRect);break}},75));const r=function(e){const t=new Set;let n=kD(e);for(;n;)t.add(n),n=kD(n);return t}(e),i=function(e,t){const n=new Set;for(const r of e){const e=eP(r,t);n.add(e)}return()=>n.forEach(e=>e())}(r,t),o=function(e,t){var n;const r=e.ownerDocument;if(!QD.has(r)){const e=new AbortController,t=new Set;document.addEventListener("scroll",e=>t.forEach(t=>t(e)),{capture:!0,passive:!0,signal:e.signal}),QD.set(r,{disconnect:()=>e.abort(),listeners:t})}const{listeners:i,disconnect:o}=null!=(n=QD.get(r))?n:{};return i&&o?(i.add(t),()=>{i.delete(t),0===i.size&&(o(),QD.delete(r))}):()=>{}}(e,tD(this,JD));rD(this,XD,r),rD(this,YD,new UD(e,t,n)),this.disconnect=()=>{tD(this,KD)||(rD(this,KD,!0),i(),o(),tD(this,YD).disconnect())}}};function nP(e){return"showPopover"in e&&"hidePopover"in e&&"function"==typeof e.showPopover&&"function"==typeof e.hidePopover}function rP(e){try{nP(e)&&e.isConnected&&e.hasAttribute("popover")&&!e.matches(":popover-open")&&e.showPopover()}catch(e){}}function iP(e){return!(!yD||!e)&&e===hD(e).scrollingElement}function oP(e){var t,n;const r=cD(e),i=iP(e)?function(e){var t,n,r,i;const{documentElement:o}=hD(e),a=cD(e).visualViewport,s=null!=(t=null==a?void 0:a.width)?t:o.clientWidth,l=null!=(n=null==a?void 0:a.height)?n:o.clientHeight,u=null!=(r=null==a?void 0:a.offsetTop)?r:0,c=null!=(i=null==a?void 0:a.offsetLeft)?i:0;return{top:u,left:c,right:c+s,bottom:u+l,width:s,height:l}}(e):sD(e),o=r.visualViewport,a=iP(e)?{height:null!=(t=null==o?void 0:o.height)?t:r.innerHeight,width:null!=(n=null==o?void 0:o.width)?n:r.innerWidth}:{height:e.clientHeight,width:e.clientWidth},s={current:{x:e.scrollLeft,y:e.scrollTop},max:{x:e.scrollWidth-a.width,y:e.scrollHeight-a.height}};return{rect:i,position:s,isTop:s.current.y<=0,isLeft:s.current.x<=0,isBottom:s.current.y>=s.max.y,isRight:s.current.x>=s.max.x}}function aP(e,t){const{isTop:n,isBottom:r,isLeft:i,isRight:o,position:a}=oP(e),{x:s,y:l}=null!=t?t:{x:0,y:0},u=!n&&a.current.y+l>0,c=!r&&a.current.y+l<a.max.y,d=!i&&a.current.x+s>0,p=!o&&a.current.x+s<a.max.x;return{top:u,bottom:c,left:d,right:p,x:d||p,y:u||c}}YD=new WeakMap,KD=new WeakMap,XD=new WeakMap,JD=new WeakMap;var sP=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))}},lP=new sP(e=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(e):e()}),uP=new sP(e=>setTimeout(e,50)),cP=new Map,dP=cP.clear.bind(cP);function pP(e,t=!1){if(!t)return fP(e);let n=cP.get(e);return n||(n=fP(e),cP.set(e,n),uP.schedule(dP),n)}function fP(e){return cD(e).getComputedStyle(e)}var hP={excludeElement:!0,escapeShadowDOM:!0};function mP(e,t=hP){const{limit:n,excludeElement:r,escapeShadowDOM:i}=t,o=new Set;return e?function t(a){if(null!=n&&o.size>=n)return o;if(!a)return o;if(dD(a)&&null!=a.scrollingElement&&!o.has(a.scrollingElement))return o.add(a.scrollingElement),o;if(i&&wD(a))return t(a.host);if(!pD(a))return fD(a)?t(a.parentElement):o;if(o.has(a))return o;const s=pP(a,!0);if(r&&a===e||function(e,t=pP(e,!0)){const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const r=t[e];return"string"==typeof r&&n.test(r)})}(a,s)&&o.add(a),function(e,t=pP(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 gP(e,t=window.frameElement){const n={x:0,y:0,scaleX:1,scaleY:1};if(!e)return n;let r=kD(e);for(;r;){if(r===t)return n;const e=sD(r),{x:i,y:o}=vP(r,e);n.x=n.x+e.left,n.y=n.y+e.top,n.scaleX=n.scaleX*i,n.scaleY=n.scaleY*o,r=kD(r)}return n}function vP(e,t=sD(e)){const n=Math.round(t.width),r=Math.round(t.height);if(pD(e))return{x:n/e.offsetWidth,y:r/e.offsetHeight};const i=pP(e,!0);return{x:(parseFloat(i.width)||n)/n,y:(parseFloat(i.height)||r)/r}}function yP(e){if("none"===e)return null;const[t,n,r="0"]=e.split(" "),i={x:parseFloat(t),y:parseFloat(n),z:parseInt(r,10)};return isNaN(i.x)&&isNaN(i.y)?null:{x:isNaN(i.x)?0:i.x,y:isNaN(i.y)?0:i.y,z:isNaN(i.z)?0:i.z}}function bP(e){var t,n,r,i,o,a,s,l,u;const{scale:c,transform:d,translate:p}=e,f=function(e){if("none"===e)return null;const t=e.split(" "),n=parseFloat(t[0]),r=parseFloat(t[1]);return isNaN(n)&&isNaN(r)?null:{x:isNaN(n)?r:n,y:isNaN(r)?n:r}}(c),h=yP(p),m=function(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(d);if(!m&&!f&&!h)return null;const g=null!=(t=null==f?void 0:f.x)?t:1,v=null!=(n=null==f?void 0:f.y)?n:1,y=null!=(r=null==h?void 0:h.x)?r:0,b=null!=(i=null==h?void 0:h.y)?i:0,x=null!=(o=null==m?void 0:m.x)?o:0,S=null!=(a=null==m?void 0:m.y)?a:0,w=null!=(s=null==m?void 0:m.scaleX)?s:1,C=null!=(l=null==m?void 0:m.scaleY)?l:1;return{x:y+x,y:b+S,z:null!=(u=null==h?void 0:h.z)?u:0,scaleX:g*w,scaleY:v*C}}var xP=(e=>(e[e.Idle=0]="Idle",e[e.Forward=1]="Forward",e[e.Reverse=-1]="Reverse",e))(xP||{}),SP={x:.2,y:.2},wP={x:10,y:10};function CP(e,t,n,r=25,i=SP,o=wP){const{x:a,y:s}=t,{rect:l,isTop:u,isBottom:c,isLeft:d,isRight:p}=oP(e),f=gP(e),h=bP(pP(e,!0)),m=null!==h&&(null==h?void 0:h.scaleX)<0,g=null!==h&&(null==h?void 0:h.scaleY)<0,v=new MC(l.left*f.scaleX+f.x,l.top*f.scaleY+f.y,l.width*f.scaleX,l.height*f.scaleY),y={x:0,y:0},b={x:0,y:0},x=v.height*i.y,S=v.width*i.x;return(!u||g&&!c)&&s<=v.top+x&&1!==(null==n?void 0:n.y)&&a>=v.left-o.x&&a<=v.right+o.x?(y.y=g?1:-1,b.y=r*Math.abs((v.top+x-s)/x)):(!c||g&&!u)&&s>=v.bottom-x&&-1!==(null==n?void 0:n.y)&&a>=v.left-o.x&&a<=v.right+o.x&&(y.y=g?-1:1,b.y=r*Math.abs((v.bottom-x-s)/x)),(!p||m&&!d)&&a>=v.right-S&&-1!==(null==n?void 0:n.x)&&s>=v.top-o.y&&s<=v.bottom+o.y?(y.x=m?-1:1,b.x=r*Math.abs((v.right-S-a)/S)):(!d||m&&!p)&&a<=v.left+S&&1!==(null==n?void 0:n.x)&&s>=v.top-o.y&&s<=v.bottom+o.y&&(y.x=m?1:-1,b.x=r*Math.abs((v.left+S-a)/S)),{direction:y,speed:b}}function EP(e,t=!1){if("scrollIntoViewIfNeeded"in(n=e)&&"function"==typeof n.scrollIntoViewIfNeeded)return void e.scrollIntoViewIfNeeded(t);var n;if(!pD(e))return e.scrollIntoView();var r=function(e){const[t]=mP(e,{limit:1});return null!=t?t:null}(e);if(!pD(r))return;const i=pP(r,!0),o=parseInt(i.getPropertyValue("border-top-width")),a=parseInt(i.getPropertyValue("border-left-width")),s=e.offsetTop-r.offsetTop<r.scrollTop,l=e.offsetTop-r.offsetTop+e.clientHeight-o>r.scrollTop+r.clientHeight,u=e.offsetLeft-r.offsetLeft<r.scrollLeft,c=e.offsetLeft-r.offsetLeft+e.clientWidth-a>r.scrollLeft+r.clientWidth,d=s&&!l;(s||l)&&t&&(r.scrollTop=e.offsetTop-r.offsetTop-r.clientHeight/2-o+e.clientHeight/2),(u||c)&&t&&(r.scrollLeft=e.offsetLeft-r.offsetLeft-r.clientWidth/2-a+e.clientWidth/2),(s||l||u||c)&&!t&&e.scrollIntoView(d)}function IP({element:e,keyframes:t,options:n}){return e.animate(t,n).finished}function DP(e,t=pP(e).translate,n=!0){if(n){const t=aD(e,e=>"translate"in e);if(t){const{translate:e=""}=t[0];if("string"==typeof e){const t=yP(e);if(t)return t}}}if(t){const e=yP(t);if(e)return e}return{x:0,y:0,z:0}}var PP=new sP(e=>setTimeout(e,0)),MP=new Map,RP=MP.clear.bind(MP);function kP(e,t){const n=function(e){const t=e.ownerDocument;let n=MP.get(t);if(n)return n;n=t.getAnimations(),MP.set(t,n),PP.schedule(RP);const r=n.filter(t=>oD(t.effect)&&t.effect.target===e);return MP.set(e,r),n}(e).filter(e=>{var n,r;if(oD(e.effect)){const{target:i}=e.effect;if(null==(r=i&&(null==(n=t.isValidTarget)?void 0:n.call(t,i)))||r)return e.effect.getKeyframes().some(e=>{for(const n of t.properties)if(e[n])return!0})}}).map(e=>{const{effect:t,currentTime:n}=e,r=null==t?void 0:t.getComputedTiming().duration;if(!e.pending&&"finished"!==e.playState)return"number"==typeof r&&"number"==typeof n&&n<r?(e.currentTime=r,()=>{e.currentTime=n}):void 0});if(n.length>0)return()=>n.forEach(e=>null==e?void 0:e())}var LP=class extends MC{constructor(e,t={}){var n,r,i,o;const{frameTransform:a=gP(e),ignoreTransforms:s,getBoundingClientRect:l=sD}=t,u=kP(e,{properties:["transform","translate","scale","width","height"],isValidTarget:t=>(t!==e||xD())&&t.contains(e)}),c=l(e);let d,{top:p,left:f,width:h,height:m}=c;const g=pP(e),v=bP(g),y={x:null!=(n=null==v?void 0:v.scaleX)?n:1,y:null!=(r=null==v?void 0:v.scaleY)?r:1},b=function(e,t){var n;const r=e.getAnimations();let i=null;if(!r.length)return null;for(const e of r){if("running"!==e.playState)continue;const r=oD(e.effect)?e.effect.getKeyframes():[],o=r[r.length-1];if(!o)continue;const{transform:a,translate:s,scale:l}=o;if(a||s||l){const e=bP({transform:"string"==typeof a&&a?a:t.transform,translate:"string"==typeof s&&s?s:t.translate,scale:"string"==typeof l&&l?l:t.scale});e&&(i=i?{x:i.x+e.x,y:i.y+e.y,z:null!=(n=i.z)?n:e.z,scaleX:i.scaleX*e.scaleX,scaleY:i.scaleY*e.scaleY}:e)}}return i}(e,g);null==u||u(),v&&(d=function(e,t,n){const{scaleX:r,scaleY:i,x:o,y:a}=t,s=e.left-o-(1-r)*parseFloat(n),l=e.top-a-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),u=r?e.width/r:e.width,c=i?e.height/i:e.height;return{width:u,height:c,top:l,right:s+u,bottom:l+c,left:s}}(c,v,g.transformOrigin),(s||b)&&(p=d.top,f=d.left,h=d.width,m=d.height));const x={width:null!=(i=null==d?void 0:d.width)?i:h,height:null!=(o=null==d?void 0:d.height)?o:m};if(b&&!s&&d){const e=function(e,t,n){const{scaleX:r,scaleY:i,x:o,y:a}=t,s=e.left+o+(1-r)*parseFloat(n),l=e.top+a+(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),u=r?e.width*r:e.width,c=i?e.height*i:e.height;return{width:u,height:c,top:l,right:s+u,bottom:l+c,left:s}}(d,b,g.transformOrigin);p=e.top,f=e.left,h=e.width,m=e.height,y.x=b.scaleX,y.y=b.scaleY}a&&(s||(f*=a.scaleX,h*=a.scaleX,p*=a.scaleY,m*=a.scaleY),f+=a.x,p+=a.y),super(f,p,h,m),this.scale=y,this.intrinsicWidth=x.width,this.intrinsicHeight=x.height}};function AP(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 OP=class{constructor(e){this.element=e,this.initial=new Map}set(e,t=""){const{element:n}=this;if(AP(n))for(const[r,i]of Object.entries(e)){const e=`${t}${r}`;this.initial.has(e)||this.initial.set(e,n.style.getPropertyValue(e)),n.style.setProperty(e,"string"==typeof i?i:`${i}px`)}}remove(e,t=""){const{element:n}=this;if(AP(n))for(const r of e){const e=`${t}${r}`;n.style.removeProperty(e)}}reset(){const{element:e}=this;if(AP(e)){for(const[t,n]of this.initial)e.style.setProperty(t,n);""===e.getAttribute("style")&&e.removeAttribute("style")}}};function TP(e){return!!e&&(e instanceof cD(e).Element||uD(e)&&e.nodeType===Node.ELEMENT_NODE)}function qP(e){if(!e)return!1;const{KeyboardEvent:t}=cD(e.target);return e instanceof t}var _P={};function NP(e){const t=null==_P[e]?0:_P[e]+1;return _P[e]=t,`${e}-${t}`}var jP=e=>{var t;return null!=(t=(({dragOperation:e,droppable:t})=>{const n=e.position.current;if(!n)return null;const{id:r}=t;if(!t.shape)return null;if(t.shape.containsPoint(n))return{id:r,value:1/PC.distance(t.shape.center,n),type:jE.PointerIntersection,priority:NE.High};return null})(e))?t:(({dragOperation:e,droppable:t})=>{const{shape:n}=e;if(!t.shape||!(null==n?void 0:n.current))return null;const r=n.current.intersectionArea(t.shape);if(r){const{position:i}=e,o=PC.distance(t.shape.center,i.current),a=r/(n.current.area+t.shape.area-r)/o;return{id:t.id,value:a,type:jE.ShapeIntersection,priority:NE.Normal}}return null})(e)},FP=e=>{const{dragOperation:t,droppable:n}=e,{shape:r,position:i}=t;if(!n.shape)return null;const o=r?MC.from(r.current.boundingRectangle).corners:void 0,a=MC.from(n.shape.boundingRectangle).corners.reduce((e,t,n)=>{var r;return e+PC.distance(PC.from(t),null!=(r=null==o?void 0:o[n])?r:i.current)},0),s=a/4;return{id:n.id,value:1/s,type:jE.Collision,priority:NE.Normal}},zP=Object.create,WP=Object.defineProperty,$P=Object.defineProperties,HP=Object.getOwnPropertyDescriptor,VP=Object.getOwnPropertyDescriptors,BP=Object.getOwnPropertySymbols,GP=Object.prototype.hasOwnProperty,UP=Object.prototype.propertyIsEnumerable,YP=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),KP=e=>{throw TypeError(e)},XP=(e,t,n)=>t in e?WP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,JP=(e,t)=>{for(var n in t||(t={}))GP.call(t,n)&&XP(e,n,t[n]);if(BP)for(var n of BP(t))UP.call(t,n)&&XP(e,n,t[n]);return e},ZP=(e,t)=>$P(e,VP(t)),QP=(e,t)=>WP(e,"name",{value:t,configurable:!0}),eM=(e,t)=>{var n={};for(var r in e)GP.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&BP)for(var r of BP(e))t.indexOf(r)<0&&UP.call(e,r)&&(n[r]=e[r]);return n},tM=e=>{var t;return[,,,zP(null!=(t=null==e?void 0:e[YP("metadata")])?t:null)]},nM=["class","method","getter","setter","accessor","field","value","get","set"],rM=e=>void 0!==e&&"function"!=typeof e?KP("Function expected"):e,iM=(e,t,n,r,i)=>({kind:nM[e],name:t,metadata:r,addInitializer:e=>n._?KP("Already initialized"):i.push(rM(e||null))}),oM=(e,t)=>XP(t,YP("metadata"),e[3]),aM=(e,t,n,r)=>{for(var i=0,o=e[t>>1],a=o&&o.length;i<a;i++)1&t?o[i].call(n):r=o[i].call(n,r);return r},sM=(e,t,n,r,i,o)=>{var a,s,l,u,c,d=7&t,p=!!(8&t),f=!!(16&t),h=d>3?e.length+1:d?p?1:2:0,m=nM[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)&&HP(d<4?i:{get[n](){return cM(this,o)},set[n](e){return pM(this,o,e)}},n));d?f&&d<4&&QP(o,(d>2?"set ":d>1?"get ":"")+n):QP(i,n);for(var b=r.length-1;b>=0;b--)u=iM(d,n,l={},e[3],v),d&&(u.static=p,u.private=f,c=u.access={has:f?e=>uM(i,e):e=>n in e},3^d&&(c.get=f?e=>(1^d?cM:fM)(e,i,4^d?o:y.get):e=>e[n]),d>2&&(c.set=f?(e,t)=>pM(e,i,t,4^d?o:y.set):(e,t)=>e[n]=t)),s=(0,r[b])(d?d<4?f?o:y[m]:d>4?void 0:{get:y.get,set:y.set}:i,u),l._=1,4^d||void 0===s?rM(s)&&(d>4?g.unshift(s):d?f?o=s:y[m]=s:i=s):"object"!=typeof s||null===s?KP("Object expected"):(rM(a=s.get)&&(y.get=a),rM(a=s.set)&&(y.set=a),rM(a=s.init)&&g.unshift(a));return d||oM(e,i),y&&WP(i,n,y),f?4^d?o:y:i},lM=(e,t,n)=>t.has(e)||KP("Cannot "+n),uM=(e,t)=>Object(t)!==t?KP('Cannot use the "in" operator on this value'):e.has(t),cM=(e,t,n)=>(lM(e,t,"read from private field"),n?n.call(e):t.get(e)),dM=(e,t,n)=>t.has(e)?KP("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),pM=(e,t,n,r)=>(lM(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),fM=(e,t,n)=>(lM(e,t,"access private method"),n),hM="button",mM="draggable",gM="dnd-kit-description",vM="dnd-kit-announcement",yM={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."},bM={dragstart({operation:{source:e}}){if(e)return`Picked up draggable item ${e.id}.`},dragover({operation:{source:e,target:t}}){if(e&&e.id!==(null==t?void 0:t.id))return t?`Draggable item ${e.id} was moved over droppable target ${t.id}.`:`Draggable item ${e.id} is no longer over a droppable target.`},dragend({operation:{source:e,target:t},canceled:n}){if(e)return n?`Dragging was cancelled. Draggable item ${e.id} was dropped.`:t?`Draggable item ${e.id} was dropped over droppable target ${t.id}`:`Draggable item ${e.id} was dropped.`}};function xM(e){const t=e.tagName.toLowerCase();return["input","select","textarea","a","button"].includes(t)}var SM=["dragover","dragmove"];var wM,CM,EM,IM,DM,PM,MM,RM,kM,LM,AM,OM,TM,qM=new Map,_M=class extends(DM=vE,IM=[eC],EM=[tC],CM=[tC],wM=[tC],DM){constructor(e){super(e),aM(MM,5,this),dM(this,kM),dM(this,PM,new Set),dM(this,RM,aM(MM,8,this,new Set)),aM(MM,11,this),this.registerEffect(fM(this,kM,LM))}register(e){return cM(this,PM).add(e),()=>{cM(this,PM).delete(e)}}addRoot(e){return $S(()=>{const t=new Set(this.additionalRoots);t.add(e),this.additionalRoots=t}),()=>{$S(()=>{const t=new Set(this.additionalRoots);t.delete(e),this.additionalRoots=t})}}get sourceRoot(){var e;const{source:t}=this.manager.dragOperation;return CD(null!=(e=null==t?void 0:t.element)?e:null)}get targetRoot(){var e;const{target:t}=this.manager.dragOperation;return CD(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}};MM=tM(DM),PM=new WeakMap,RM=new WeakMap,kM=new WeakSet,LM=function(){const{roots:e}=this,t=[];for(const n of e)for(const e of cM(this,PM))t.push(fM(this,kM,AM).call(this,n,e));return()=>{for(const e of t)e()}},AM=function(e,t){let n=qM.get(e);n||(n=new Map,qM.set(e,n));let r=n.get(t);if(!r){const i=dD(e)?fM(this,kM,OM).call(this,e,n,t):fM(this,kM,TM).call(this,e,n,t);if(!i)return()=>{};r=i,n.set(t,r)}r.refCount++;let i=!1;return()=>{i||(i=!0,r.refCount--,0===r.refCount&&r.cleanup())}},OM=function(e,t,n){const r=e.createElement("style");r.textContent=n,e.head.prepend(r);const i=new MutationObserver(t=>{for(const n of t)for(const t of Array.from(n.removedNodes))if(t===r)return void e.head.prepend(r)});return i.observe(e.head,{childList:!0}),{refCount:0,cleanup:()=>{i.disconnect(),r.remove(),t.delete(n),0===t.size&&qM.delete(e)}}},TM=function(e,t,n){!("adoptedStyleSheets"in e)||Array.isArray(e.adoptedStyleSheets);const r=e.ownerDocument.defaultView,{CSSStyleSheet:i}=null!=r?r:{};if(!i)return null;const o=new i;return o.replaceSync(n),e.adoptedStyleSheets.push(o),{refCount:0,cleanup:()=>{var r;if(wD(e)&&(null==(r=e.host)?void 0:r.isConnected)){const t=e.adoptedStyleSheets.indexOf(o);-1!==t&&e.adoptedStyleSheets.splice(t,1)}t.delete(n),0===t.size&&qM.delete(e)}}},sM(MM,4,"additionalRoots",IM,_M,RM),sM(MM,2,"sourceRoot",EM,_M),sM(MM,2,"targetRoot",CM,_M),sM(MM,2,"roots",wM,_M),oM(MM,_M);var NM="data-dnd-",jM=`${NM}dropping`,FM="--dnd-",zM=`${NM}dragging`,WM=`${NM}placeholder`,$M=[zM,WM,"popover","aria-pressed","aria-grabbing"],HM=["view-transition-name"],VM=`\n :is(:root,:host) [${zM}] {\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(${FM}top, 0px) !important;\n left: var(${FM}left, 0px) !important;\n right: unset !important;\n bottom: unset !important;\n width: var(${FM}width, auto);\n max-width: var(${FM}width, auto);\n height: var(${FM}height, auto);\n max-height: var(${FM}height, auto);\n transition: var(${FM}transition) !important;\n }\n\n :is(:root,:host) [${WM}] {\n transition: none;\n }\n\n :is(:root,:host) [${WM}='hidden'] {\n visibility: hidden;\n }\n\n [${zM}] * {\n pointer-events: none !important;\n }\n\n [${zM}]:not([${jM}]) {\n translate: var(${FM}translate) !important;\n }\n\n [${zM}][style*='${FM}scale'] {\n scale: var(${FM}scale) !important;\n transform-origin: var(${FM}transform-origin) !important;\n }\n\n @layer dnd-kit {\n :where([${zM}][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 [${zM}]::backdrop, [${NM}overlay]:not([${zM}]) {\n display: none;\n visibility: hidden;\n }\n`.replace(/\n+/g," ").replace(/\s+/g," ").trim();function BM(e,t="hidden"){return $S(()=>{const{element:n,manager:r}=e;if(!n||!r)return;const i=function(e,t){const n=new Map;for(const r of t)if(r.element&&(e===r.element||e.contains(r.element))){const e=`${NM}${NP("dom-id")}`;r.element.setAttribute(e,""),n.set(r,e)}return n}(n,r.registry.droppables),o=[],a=function(e){const t="input, textarea, select, canvas, [contenteditable]",n=e.cloneNode(!0),r=Array.from(e.querySelectorAll(t));return Array.from(n.querySelectorAll(t)).forEach((e,t)=>{const n=r[t];if(ID(e)&&ID(n)&&("file"!==e.type&&(e.value=n.value),"radio"===e.type&&e.name&&(e.name=`Cloned__${e.name}`)),DD(e)&&DD(n)&&n.width>0&&n.height>0){const t=e.getContext("2d");null==t||t.drawImage(n,0,0)}}),n}(n),{remove:s}=a;return function(e,t,n){for(const[r,i]of e){if(!r.element)continue;const e=`[${i}]`,o=t.matches(e)?t:t.querySelector(e);if(r.element.removeAttribute(i),!o)continue;const a=r.element;r.proxy=o,o.removeAttribute(i),MD.set(a,o),n.push(()=>{MD.delete(a),r.proxy=void 0})}}(i,a,o),function(e,t="hidden"){e.setAttribute("inert","true"),e.setAttribute("tab-index","-1"),e.setAttribute("aria-hidden","true"),e.setAttribute(WM,t)}(a,t),a.remove=()=>{o.forEach(e=>e()),s.call(a)},a})}function GM(e,t){return e===t||kD(e)===kD(t)}function UM(e){const{target:t}=e;"newState"in e&&"closed"===e.newState&&TP(t)&&t.hasAttribute("popover")&&requestAnimationFrame(()=>rP(t))}function YM(e){return"TR"===e.tagName}var KM,XM,JM,ZM,QM,eR,tR,nR=250,rR="ease";var iR=class extends(XM=mE,KM=[eC],XM){constructor(e,t){super(e,t),dM(this,QM),dM(this,ZM,aM(JM,8,this)),aM(JM,11,this),this.state={initial:{},current:{}};const n=e.registry.plugins.get(_M),r=null==n?void 0:n.register(VM);if(r){const e=this.destroy.bind(this);this.destroy=()=>{r(),e()}}this.registerEffect(fM(this,QM,eR).bind(this,n)),this.registerEffect(fM(this,QM,tR))}};JM=tM(XM),ZM=new WeakMap,QM=new WeakSet,eR=function(e){const{overlay:t}=this;if(!t||!e)return;const n=CD(t);return n?e.addRoot(n):void 0},tR=function(){var e,t,n;const{state:r,manager:i,options:o}=this,{dragOperation:a}=i,{position:s,source:l,status:u}=a;if(u.idle)return r.current={},void(r.initial={});if(!l)return;const{element:c,feedback:d}=l;if(!c||"none"===d||!u.initialized||u.initializing)return;const{initial:p}=r,f=null!=(e=this.overlay)?e:c,h=gP(f),m=gP(c),g=!GM(c,f),v=new LP(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 OP(f),{transition:I,translate:D,boxSizing:P,paddingBlockStart:M,paddingBlockEnd:R,paddingInlineStart:k,paddingInlineEnd:L,borderInlineStartWidth:A,borderInlineEndWidth:O,borderBlockStartWidth:T,borderBlockEndWidth:q}=pP(c),_="clone"===d,N="content-box"===P,j=N?parseInt(k)+parseInt(L)+parseInt(A)+parseInt(O):0,F=N?parseInt(M)+parseInt(R)+parseInt(T)+parseInt(q):0,z="move"===d||this.overlay?null:BM(l,_?"clone":"hidden"),W=$S(()=>qP(i.dragOperation.activatorEvent));if("none"!==D){const e=yP(D);e&&!p.translate&&(p.translate=e)}if(!p.transformOrigin){const e=$S(()=>s.current);p.transformOrigin={x:(e.x-C*h.scaleX-h.x)/(x*h.scaleX),y:(e.y-w*h.scaleY-h.y)/(S*h.scaleY)}}const{transformOrigin:$}=p,H=w*h.scaleY+h.y,V=C*h.scaleX+h.x;if(!p.coordinates&&(p.coordinates={x:V,y:H},1!==y||1!==b)){const{scaleX:e,scaleY:t}=m,{x:n,y:r}=$;p.coordinates.x+=(x*e-x)*n,p.coordinates.y+=(S*t-S)*r}p.dimensions||(p.dimensions={width:x,height:S}),p.frameTransform||(p.frameTransform=h);const B=p.coordinates.x-V,G=p.coordinates.y-H,U=(p.dimensions.width*p.frameTransform.scaleX-x*h.scaleX)*$.x,Y=(p.dimensions.height*p.frameTransform.scaleY-S*h.scaleY)*$.y,K={x:B/h.scaleX+U,y:G/h.scaleY+Y},X=C+K.x,J=w+K.y;f.setAttribute(zM,"true");const Z=$S(()=>a.transform),Q=null!=(t=p.translate)?t:{x:0,y:0},ee=Z.x*h.scaleX+Q.x,te=Z.y*h.scaleY+Q.y,ne=SD();if(E.set({width:x-j,height:S-F,top:J+ne.y,left:X+ne.x,translate:`${ee}px ${te}px 0`,transition:I?`${I}, translate 0ms linear`:"",scale:g?`${y} ${b}`:"","transform-origin":`${100*$.x}% ${100*$.y}%`},FM),z&&(c.insertAdjacentElement("afterend",z),null==o?void 0:o.rootElement)){("function"==typeof o.rootElement?o.rootElement(l):o.rootElement).appendChild(c)}let re,ie,oe;nP(f)&&(f.hasAttribute("popover")||f.setAttribute("popover","manual"),rP(f),f.addEventListener("beforetoggle",UM));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:()=>re,getSavedCellWidths:()=>oe,setSavedCellWidths:e=>{oe=e}},new ResizeObserver(()=>{var e,t;const n=new LP(se.placeholder,{frameTransform:se.frameTransform,ignoreTransforms:!0}),r=null!=(e=se.transformOrigin)?e:{x:1,y:1},i=(se.width-n.width)*r.x+se.delta.x,o=(se.height-n.height)*r.y+se.delta.y,a=SD();if(se.styles.set({width:n.width-se.widthOffset,height:n.height-se.heightOffset,top:se.top+o+a.y,left:se.left+i+a.x},FM),null==(t=se.getElementMutationObserver())||t.takeRecords(),YM(se.element)&&YM(se.placeholder)){const e=Array.from(se.element.cells),t=Array.from(se.placeholder.cells);se.getSavedCellWidths()||se.setSavedCellWidths(e.map(e=>e.style.width));for(const[n,r]of e.entries()){const e=t[n];r.style.width=`${e.getBoundingClientRect().width}px`}}se.dragOperation.shape=new LP(se.feedbackElement)}));var se;const le=new LP(f);$S(()=>a.shape=le);const ue=cD(f),ce=e=>{this.manager.actions.stop({event:e})},de=ED(ue);W&&ue.addEventListener("resize",ce),"idle"===$S(()=>l.status)&&requestAnimationFrame(()=>l.status="dragging"),z&&(ae.observe(z),re=function(e,t,n){const r=new MutationObserver(r=>{let i=!1;for(const n of r){if(n.target!==e){i=!0;continue}if("attributes"!==n.type)continue;const r=n.attributeName;if(r.startsWith("aria-")||$M.includes(r))continue;const o=e.getAttribute(r);if("style"===r){if(AP(e)&&AP(t)){const n=e.style;for(const e of Array.from(t.style))""===n.getPropertyValue(e)&&t.style.removeProperty(e);for(const e of Array.from(n)){if(HM.includes(e)||e.startsWith(FM))continue;const r=n.getPropertyValue(e);t.style.setProperty(e,r)}}}else null!==o?t.setAttribute(r,o):t.removeAttribute(r)}i&&n&&(t.innerHTML=e.innerHTML)});return r.observe(e,{attributes:!0,subtree:!0,childList:!0}),r}(c,z,_),ie=function(e,t,n){const r=new MutationObserver(r=>{for(const i of r)if(0!==i.addedNodes.length)for(const r of Array.from(i.addedNodes)){if(r.contains(e)&&e.nextElementSibling!==t)return e.insertAdjacentElement("afterend",t),void rP(n);if(r.contains(t)&&t.previousElementSibling!==e)return t.insertAdjacentElement("beforebegin",e),void rP(n)}});return r.observe(e.ownerDocument.body,{childList:!0,subtree:!0}),r}(c,z,f));const pe=null==(n=i.dragOperation.source)?void 0:n.id,fe=()=>{var e;if(!W||null==pe)return;const t=i.registry.draggables.get(pe),n=null!=(e=null==t?void 0:t.handle)?e:null==t?void 0:t.element;pD(n)&&n.focus()},he=()=>{var e;if(null==re||re.disconnect(),null==ie||ie.disconnect(),ae.disconnect(),ue.removeEventListener("resize",ce),nP(f)&&(f.removeEventListener("beforetoggle",UM),f.removeAttribute("popover")),f.removeAttribute(zM),E.reset(),oe&&YM(c)){const t=Array.from(c.cells);for(const[n,r]of t.entries())r.style.width=null!=(e=oe[n])?e:""}l.status="idle";const t=null!=r.current.translate;z&&(t||z.parentElement!==f.parentElement)&&f.isConnected&&z.replaceWith(f),null==z||z.remove()},me=null==o?void 0:o.dropAnimation,ge=this,ve=rC(()=>{var e;const{transform:t,status:n}=a;if((t.x||t.y||r.current.translate)&&n.dragging){const n=null!=(e=p.translate)?e:{x:0,y:0},i={x:t.x/h.scaleX+n.x,y:t.y/h.scaleY+n.y},o=r.current.translate,s=$S(()=>a.modifiers),l=$S(()=>{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`},FM),null==re||re.takeRecords(),l&&l!==le&&o&&!s.length){const e=PC.delta(i,o);a.shape=MC.from(l.boundingRectangle).translate(e.x*h.scaleX,e.y*h.scaleY)}else a.shape=new LP(f);r.current.translate=i}},function(){if(a.status.dropped){this.dispose(),l.status="dropping";const e=void 0!==ge.dropAnimation?ge.dropAnimation:me;let t=r.current.translate;const n=null!=t;if(t||c===f||(t={x:0,y:0}),!t||null===e)return void he();i.renderer.rendering.then(()=>{!function(e){var t,n,r,i;const{animation:o}=e;if("function"==typeof o){const t=o({element:e.element,feedbackElement:e.feedbackElement,placeholder:e.placeholder,translate:e.translate,moved:e.moved});return void Promise.resolve(t).then(()=>{e.cleanup(),requestAnimationFrame(e.restoreFocus)})}const{duration:a=nR,easing:s=rR}=null!=o?o:{};rP(e.feedbackElement);const[,l]=null!=(t=aD(e.feedbackElement,e=>"translate"in e))?t:[];null==l||l.pause();const u=null!=(n=e.placeholder)?n:e.element,c={frameTransform:GM(e.feedbackElement,u)?null:void 0},d=new LP(e.feedbackElement,c),p=null!=(r=yP(pP(e.feedbackElement).translate))?r:e.translate,f=new LP(u,c),h=MC.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},FM),e.feedbackElement.setAttribute(jM,""),null==(i=e.getElementMutationObserver())||i.takeRecords(),IP({element:e.feedbackElement,keyframes:ZP(JP(JP({},v),y),{translate:[`${p.x}px ${p.y}px 0`,`${m}px ${g}px 0`]}),options:{duration:ED(cD(e.feedbackElement))?0:e.moved||e.feedbackElement!==e.element?a:0,easing:s}}).then(()=>{e.feedbackElement.removeAttribute(jM),null==l||l.finish(),e.cleanup(),requestAnimationFrame(e.restoreFocus)})}({element:c,feedbackElement:f,placeholder:z,translate:t,moved:n,transition:I,alignment:l.alignment,styles:E,animation:null!=e?e:void 0,getElementMutationObserver:()=>re,cleanup:he,restoreFocus:fe})})}});return()=>{he(),ve()}},sM(JM,4,"overlay",KM,iR,ZM),oM(JM,iR),iR.configure=fE(iR);var oR,aR,sR,lR,uR,cR,dR,pR=iR,fR=!0;sR=[eC],lR=xP.Forward,oR=[eC],aR=xP.Reverse;var hR=class{constructor(){dM(this,cR,aM(uR,8,this,fR)),aM(uR,11,this),dM(this,dR,aM(uR,12,this,fR)),aM(uR,15,this)}isLocked(e){return e!==xP.Idle&&(null==e?this[xP.Forward]===fR&&this[xP.Reverse]===fR:this[e]===fR)}unlock(e){e!==xP.Idle&&(this[e]=false)}};uR=tM(null),cR=new WeakMap,dR=new WeakMap,sM(uR,4,lR,sR,hR,cR),sM(uR,4,aR,oR,hR,dR),oM(uR,hR);var mR,gR,vR,yR,bR,xR,SR=[xP.Forward,xP.Reverse],wR=class{constructor(){this.x=new hR,this.y=new hR}isLocked(){return this.x.isLocked()&&this.y.isLocked()}},CR=class extends mE{constructor(e){super(e);const t=ZS(new wR);let n=null;this.signal=t,lw(()=>{const{status:r}=e.dragOperation;if(!r.initialized)return n=null,void(t.value=new wR);const{delta:i}=e.dragOperation.position;if(n){const e={x:ER(i.x,n.x),y:ER(i.y,n.y)},r=t.peek();zS(()=>{for(const t of NC)for(const n of SR)e[t]===n&&r[t].unlock(n);t.value=r})}n=i})}get current(){return this.signal.peek()}};function ER(e,t){return Math.sign(e-t)}var IR=class extends(gR=vE,mR=[eC],gR){constructor(e){super(e),dM(this,yR,aM(vR,8,this,!1)),aM(vR,11,this),dM(this,bR),dM(this,xR,()=>{if(!cM(this,bR))return;const{element:e,by:t}=cM(this,bR);t.y&&(e.scrollTop+=t.y),t.x&&(e.scrollLeft+=t.x)}),this.scroll=e=>{var t;if(this.disabled)return!1;const n=this.getScrollableElements();if(!n)return pM(this,bR,void 0),!1;const{position:r}=this.manager.dragOperation,i=null==r?void 0:r.current;if(i){const{by:r}=null!=e?e:{},o=r?{x:DR(r.x),y:DR(r.y)}:void 0,a=o?void 0:this.scrollIntentTracker.current;if(null==a?void 0:a.isLocked())return!1;for(const e of n){const n=aP(e,r);if(n.x||n.y){const{speed:n,direction:s}=CP(e,i,o);if(a)for(const e of NC)a[e].isLocked(s[e])&&(n[e]=0,s[e]=0);if(s.x||s.y){const{x:i,y:o}=null!=r?r:s,a=i*n.x,l=o*n.y;if(a||l){const n=null==(t=cM(this,bR))?void 0:t.by;if(this.autoScrolling&&n){if(n.x&&!a||n.y&&!l)continue}return pM(this,bR,{element:e,by:{x:a,y:l}}),lP.schedule(cM(this,xR)),!0}}}}}return pM(this,bR,void 0),!1};let t=null,n=null;const r=Zw(()=>{const{position:n,source:r}=e.dragOperation;if(!n)return null;const i=PD(CD(null==r?void 0:r.element),n.current);return i&&(t=i),null!=i?i:t}),i=Zw(()=>{const t=r.value,{documentElement:i}=hD(t);if(!t||t===i){const{target:t}=e.dragOperation,r=null==t?void 0:t.element;if(r){const e=mP(r,{excludeElement:!1});return n=e,e}}if(t){const e=mP(t,{excludeElement:!1});return this.autoScrolling&&n&&e.size<(null==n?void 0:n.size)?n:(n=e,e)}return n=null,null},Qw);this.getScrollableElements=()=>i.value,this.scrollIntentTracker=new CR(e),this.destroy=e.monitor.addEventListener("dragmove",t=>{!this.disabled&&!t.defaultPrevented&&qP(e.dragOperation.activatorEvent)&&t.by&&this.scroll({by:t.by})&&t.preventDefault()})}};function DR(e){return e>0?xP.Forward:e<0?xP.Reverse:xP.Idle}vR=tM(gR),yR=new WeakMap,bR=new WeakMap,xR=new WeakMap,sM(vR,4,"autoScrolling",mR,IR,yR),oM(vR,IR);var PR,MR=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()}),RR=class extends mE{constructor(e,t){super(e);const n=e.registry.plugins.get(IR);if(!n)throw new Error("AutoScroller plugin depends on Scroller plugin");this.destroy=lw(()=>{if(this.disabled)return;const{position:t,status:r}=e.dragOperation;if(r.dragging){if(n.scroll()){n.autoScrolling=!0;const e=setInterval(()=>MR.schedule(n.scroll),10);return()=>{clearInterval(e)}}n.autoScrolling=!1}})}},kR={capture:!0,passive:!0},LR=class extends vE{constructor(e){super(e),dM(this,PR),this.handleScroll=()=>{null==cM(this,PR)&&pM(this,PR,setTimeout(()=>{this.manager.collisionObserver.forceUpdate(!1),pM(this,PR,void 0)},50))};const{dragOperation:t}=this.manager;this.destroy=lw(()=>{var e,n,r;if(t.status.dragging){const i=null!=(r=null==(n=null==(e=t.source)?void 0:e.element)?void 0:n.ownerDocument)?r:document;return i.addEventListener("scroll",this.handleScroll,kR),()=>{i.removeEventListener("scroll",this.handleScroll,kR)}}})}};PR=new WeakMap;function AR(){var e;null==(e=document.getSelection())||e.removeAllRanges()}var OR,TR=Object.freeze({offset:10,keyboardCodes:{start:["Space","Enter"],cancel:["Escape"],end:["Space","Enter","Tab"],up:["ArrowUp"],down:["ArrowDown"],left:["ArrowLeft"],right:["ArrowRight"]},preventActivation(e,t){var n;const r=null!=(n=t.handle)?n:t.element;return e.target!==r}}),qR=class extends II{constructor(e,t){super(e),this.manager=e,this.options=t,dM(this,OR,[]),this.listeners=new RD,this.handleSourceKeyDown=(e,t,n)=>{if(this.disabled||e.defaultPrevented)return;if(!TP(e.target))return;if(t.disabled)return;const{keyboardCodes:r=TR.keyboardCodes,preventActivation:i=TR.preventActivation}=null!=n?n:{};r.start.includes(e.code)&&this.manager.dragOperation.status.idle&&((null==i?void 0:i(e,t))||this.handleStart(e,t,n))}}bind(e,t=this.options){const n=lw(()=>{var n;const r=null!=(n=e.handle)?n:e.element,i=n=>{qP(n)&&this.handleSourceKeyDown(n,e,t)};if(r)return r.addEventListener("keydown",i),()=>{r.removeEventListener("keydown",i)}});return n}handleStart(e,t,n){const{element:r}=t;if(!r)throw new Error("Source draggable does not have an associated element");e.preventDefault(),e.stopImmediatePropagation(),EP(r);const{center:i}=new LP(r);if(this.manager.actions.start({event:e,coordinates:{x:i.x,y:i.y},source:t}).signal.aborted)return this.cleanup();this.sideEffects();const o=hD(r),a=[this.listeners.bind(o,[{type:"keydown",listener:e=>this.handleKeyDown(e,t,n),options:{capture:!0}}])];cM(this,OR).push(...a)}handleKeyDown(e,t,n){const{keyboardCodes:r=TR.keyboardCodes}=null!=n?n:{};if(jR(e,[...r.end,...r.cancel])){e.preventDefault();const t=jR(e,r.cancel);return void this.handleEnd(e,t)}jR(e,r.up)?this.handleMove("up",e):jR(e,r.down)&&this.handleMove("down",e),jR(e,r.left)?this.handleMove("left",e):jR(e,r.right)&&this.handleMove("right",e)}handleEnd(e,t){this.manager.actions.stop({event:e,canceled:t}),this.cleanup()}handleMove(e,t){var n,r;const{shape:i}=this.manager.dragOperation,o=t.shiftKey?5:1;let a={x:0,y:0},s=null!=(r=null==(n=this.options)?void 0:n.offset)?r:TR.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(RR);!1===(null==e?void 0:e.disabled)&&(e.disable(),cM(this,OR).push(()=>{e.enable()}))}cleanup(){cM(this,OR).forEach(e=>e()),pM(this,OR,[])}destroy(){this.cleanup(),this.listeners.clear()}};OR=new WeakMap,qR.configure=fE(qR),qR.defaults=TR;var _R,NR=qR;function jR(e,t){return t.includes(e.code)}var FR,zR;_R=new WeakMap;FR=new WeakMap,zR=new WeakMap;var WR=class{};WR.Delay=class extends PI{constructor(){super(...arguments),dM(this,FR),dM(this,zR)}onEvent(e){switch(e.type){case"pointerdown":pM(this,zR,vD(e)),pM(this,FR,setTimeout(()=>this.activate(e),this.options.value));break;case"pointermove":if(!cM(this,zR))return;const{x:t,y:n}=vD(e);LC({x:t-cM(this,zR).x,y:n-cM(this,zR).y},this.options.tolerance)&&this.abort();break;case"pointerup":this.abort()}}abort(){cM(this,FR)&&(clearTimeout(cM(this,FR)),pM(this,zR,void 0),pM(this,FR,void 0))}},WR.Distance=class extends PI{constructor(){super(...arguments),dM(this,_R)}onEvent(e){switch(e.type){case"pointerdown":pM(this,_R,vD(e));break;case"pointermove":if(!cM(this,_R))return;const{x:t,y:n}=vD(e),r={x:t-cM(this,_R).x,y:n-cM(this,_R).y},{tolerance:i}=this.options;if(i&&LC(r,i))return void this.abort();LC(r,this.options.value)&&this.activate(e);break;case"pointerup":this.abort()}}abort(){pM(this,_R,void 0)}};var $R,HR=Object.freeze({activationConstraints(e,t){var n;const{pointerType:r,target:i}=e;if("mouse"!==r||!TP(i)||t.handle!==i&&!(null==(n=t.handle)?void 0:n.contains(i)))return"touch"===r?[new WR.Delay({value:250,tolerance:5})]:function(e){if(!TP(e))return!1;const{tagName:t}=e;return"INPUT"===t||"TEXTAREA"===t||(n=e).hasAttribute("contenteditable")&&"false"!==n.getAttribute("contenteditable");var n}(i)&&!e.defaultPrevented?[new WR.Delay({value:200,tolerance:0})]:[new WR.Delay({value:200,tolerance:10}),new WR.Distance({value:5})]},preventActivation(e,t){var n;const{target:r}=e;return r!==t.element&&(r!==t.handle&&(!!TP(r)&&(!(null==(n=t.handle)?void 0:n.contains(r))&&Boolean(r.closest('\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n a[href],\n [contenteditable]:not([contenteditable="false"])\n ')))))}}),VR=class extends II{constructor(e,t){super(e),this.manager=e,this.options=t,dM(this,$R,new Set),this.listeners=new RD,this.latest={event:void 0,coordinates:void 0},this.handleMove=()=>{const{event:e,coordinates:t}=this.latest;e&&t&&this.manager.actions.move({event:e,to:t})},this.handleCancel=this.handleCancel.bind(this),this.handlePointerUp=this.handlePointerUp.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}activationConstraints(e,t,n=this.options){const{activationConstraints:r=HR.activationConstraints}=null!=n?n:{};return"function"==typeof r?r(e,t):r}bind(e,t=this.options){const n=lw(()=>{var n;const r=new AbortController,{signal:i}=r,o=n=>{(function(e){if(!e)return!1;const{PointerEvent:t}=cD(e.target);return e instanceof t})(n)&&this.handlePointerDown(n,e,t)};let a=[null!=(n=e.handle)?n:e.element];(null==t?void 0:t.activatorElements)&&(a=Array.isArray(t.activatorElements)?t.activatorElements:t.activatorElements(e));for(const e of a)e&&(KR(e.ownerDocument.defaultView),e.addEventListener("pointerdown",o,{signal:i}));return()=>r.abort()});return n}handlePointerDown(e,t,n){if(this.disabled||!e.isPrimary||0!==e.button||!TP(e.target)||t.disabled||function(e){return"sensor"in e}(e)||!this.manager.dragOperation.status.idle)return;const{preventActivation:r=HR.preventActivation}=null!=n?n:{};if(null==r?void 0:r(e,t))return;const{target:i}=e,o=pD(i)&&i.draggable&&"true"===i.getAttribute("draggable"),a=gP(t.element),{x:s,y:l}=vD(e);this.initialCoordinates={x:s*a.scaleX+a.x,y:l*a.scaleY+a.y};const u=this.activationConstraints(e,t,n);e.sensor=this;const c=new DI(u,e=>this.handleStart(t,e));c.signal.onabort=()=>this.handleCancel(e),c.onEvent(e),this.controller=c;const d=bD(),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:GR,options:{capture:!0}}]);cM(this,$R).add(()=>{p(),this.initialCoordinates=void 0})}handlePointerMove(e,t){var n,r;if(!1!==(null==(n=this.controller)?void 0:n.activated)){if(this.manager.dragOperation.status.dragging){const n=vD(e),r=gP(t.element);n.x=n.x*r.scaleX+r.x,n.y=n.y*r.scaleY+r.y,e.preventDefault(),e.stopPropagation(),this.latest.event=e,this.latest.coordinates=n,lP.schedule(this.handleMove)}}else null==(r=this.controller)||r.onEvent(e)}handlePointerUp(e){const{status:t}=this.manager.dragOperation;if(!t.idle){e.preventDefault(),e.stopPropagation();const n=!t.initialized;this.manager.actions.stop({event:e,canceled:n})}this.cleanup()}handleKeyDown(e){"Escape"===e.key&&(e.preventDefault(),this.handleCancel(e))}handleStart(e,t){const{manager:n,initialCoordinates:r}=this;if(!r||!n.dragOperation.status.idle)return;if(t.defaultPrevented)return;if(n.actions.start({coordinates:r,event:t,source:e}).signal.aborted)return this.cleanup();t.preventDefault();const i=hD(t.target).body;i.setPointerCapture(t.pointerId);const o=TP(t.target)?[t.target,i]:i,a=this.listeners.bind(o,[{type:"touchmove",listener:GR,options:{passive:!1}},{type:"click",listener:GR},{type:"contextmenu",listener:GR},{type:"keydown",listener:this.handleKeyDown}]);cM(this,$R).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},cM(this,$R).forEach(e=>e()),cM(this,$R).clear()}destroy(){this.cleanup(),this.listeners.clear()}};$R=new WeakMap,VR.configure=fE(VR),VR.defaults=HR;var BR=VR;function GR(e){e.preventDefault()}function UR(){}var YR=new WeakSet;function KR(e){e&&!YR.has(e)&&(e.addEventListener("touchmove",UR,{capture:!1,passive:!1}),YR.add(e))}var XR,JR,ZR,QR,ek,tk,nk,rk,ik,ok,ak,sk,lk,uk,ck,dk,pk,fk,hk={modifiers:[],plugins:[class extends mE{constructor(e,t){super(e);const{id:n,idPrefix:{description:r=gM,announcement:i=vM}={},announcements:o=bM,screenReaderInstructions:a=yM,debounce:s=500}=null!=t?t:{},l=n?`${r}-${n}`:NP(r),u=n?`${i}-${n}`:NP(i);let c,d,p,f;const h=(e=f)=>{p&&e&&(null==p?void 0:p.nodeValue)!==e&&(p.nodeValue=e)},m=()=>lP.schedule(h),g=function(e,t){let n;const r=()=>{clearTimeout(n),n=setTimeout(e,t)};return r.cancel=()=>clearTimeout(n),r}(m,s),v=Object.entries(o).map(([e,t])=>this.manager.monitor.addEventListener(e,(n,r)=>{const i=p;if(!i)return;const o=null==t?void 0:t(n,r);o&&i.nodeValue!==o&&(f=o,SM.includes(e)?g():(m(),g.cancel()))})),y=()=>{let e=[];(null==c?void 0:c.isConnected)||(c=function(e,t){const n=document.createElement("div");return n.id=e,n.style.setProperty("display","none"),n.textContent=t,n}(l,a.draggable),e.push(c)),(null==d?void 0:d.isConnected)||(d=function(e){const t=document.createElement("div");return t.id=e,t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true"),t.style.setProperty("position","fixed"),t.style.setProperty("width","1px"),t.style.setProperty("height","1px"),t.style.setProperty("margin","-1px"),t.style.setProperty("border","0"),t.style.setProperty("padding","0"),t.style.setProperty("overflow","hidden"),t.style.setProperty("clip","rect(0 0 0 0)"),t.style.setProperty("clip-path","inset(100%)"),t.style.setProperty("white-space","nowrap"),t}(u),p=document.createTextNode(""),d.appendChild(p),e.push(d)),e.length>0&&document.body.append(...e)},b=new Set;function x(){for(const e of b)e()}this.registerEffect(()=>{var e;b.clear();for(const t of this.manager.registry.draggables.value){const n=null!=(e=t.handle)?e:t.element;if(n){c&&d||b.add(y),xM(n)&&!xD()||n.hasAttribute("tabindex")||b.add(()=>n.setAttribute("tabindex","0")),n.hasAttribute("role")||"button"===n.tagName.toLowerCase()||b.add(()=>n.setAttribute("role",hM)),n.hasAttribute("aria-roledescription")||b.add(()=>n.setAttribute("aria-roledescription",mM)),n.hasAttribute("aria-describedby")||b.add(()=>n.setAttribute("aria-describedby",l));for(const e of["aria-pressed","aria-grabbed"]){const r=String(t.isDragging);n.getAttribute(e)!==r&&b.add(()=>n.setAttribute(e,r))}const e=String(t.disabled);n.getAttribute("aria-disabled")!==e&&b.add(()=>n.setAttribute("aria-disabled",e))}}b.size>0&&lP.schedule(x)}),this.destroy=()=>{super.destroy(),null==c||c.remove(),null==d||d.remove(),v.forEach(e=>e())}}},RR,class extends mE{constructor(e,t){super(e,t),this.manager=e;const n=Zw(()=>{var e;return hD(null==(e=this.manager.dragOperation.source)?void 0:e.element)});this.destroy=lw(()=>{var e;const{dragOperation:t}=this.manager,{cursor:r="grabbing",nonce:i}=null!=(e=this.options)?e:{};if(t.status.initialized){const e=n.value,t=e.createElement("style");return i&&t.setAttribute("nonce",i),t.textContent=`* { cursor: ${r} !important; }`,e.head.appendChild(t),()=>t.remove()}})}},pR,class extends mE{constructor(e,t){super(e,t),this.manager=e,this.destroy=lw(()=>{var e;const{dragOperation:t}=this.manager,{nonce:n}=null!=(e=this.options)?e:{};if(t.status.initialized){const e=document.createElement("style");return n&&e.setAttribute("nonce",n),e.textContent="* { user-select: none !important; -webkit-user-select: none !important; }",document.head.appendChild(e),AR(),document.addEventListener("selectionchange",AR,{capture:!0}),()=>{document.removeEventListener("selectionchange",AR,{capture:!0}),e.remove()}}})}}],sensors:[BR,NR]},mk=class extends ZI{constructor(e={}){const t=JI(e.plugins,hk.plugins),n=JI(e.sensors,hk.sensors),r=JI(e.modifiers,hk.modifiers);super(ZP(JP({},e),{plugins:[LR,IR,_M,...t],sensors:n,modifiers:r}))}},gk=class extends(QR=wI,ZR=[eC],JR=[eC],XR=[eC],QR){constructor(e,t){var n=e,{element:r,effects:i=()=>[],handle:o,feedback:a="default"}=n,s=eM(n,["element","effects","handle","feedback"]);super(JP({effects:()=>[...i(),()=>{var e,t;const{manager:n}=this;if(!n)return;const r=(null!=(t=null==(e=this.sensors)?void 0:e.map(hE))?t:[...n.sensors]).map(e=>{const t=e instanceof II?e:n.registry.register(e.plugin),r=e instanceof II?void 0:e.options;return t.bind(this,r)});return function(){r.forEach(e=>e())}}]},s),t),dM(this,tk,aM(ek,8,this)),aM(ek,11,this),dM(this,nk,aM(ek,12,this)),aM(ek,15,this),dM(this,rk,aM(ek,16,this)),aM(ek,19,this),this.element=r,this.handle=o,this.feedback=a}};ek=tM(QR),tk=new WeakMap,nk=new WeakMap,rk=new WeakMap,sM(ek,4,"handle",ZR,gk,tk),sM(ek,4,"element",JR,gk,nk),sM(ek,4,"feedback",XR,gk,rk),oM(ek,gk);var vk=class extends(ak=CI,ok=[eC],ik=[eC],ak){constructor(e,t){var n=e,{element:r,effects:i=()=>[]}=n,o=eM(n,["element","effects"]);const{collisionDetector:a=jP}=o,s=e=>{const{manager:t,element:n}=this;if(!n||null===e)return void(this.shape=void 0);if(!t)return;const r=new LP(n),i=$S(()=>this.shape);return r&&(null==i?void 0:i.equals(r))?i:(this.shape=r,r)},l=ZS(!1);super(ZP(JP({},o),{collisionDetector:a,effects:()=>[...i(),()=>{const{element:e,manager:t}=this;if(!t)return;const{dragOperation:n}=t,{source:r}=n;l.value=Boolean(r&&n.status.initialized&&e&&!this.disabled&&this.accepts(r))},()=>{const{element:e}=this;if(l.value&&e){const t=new tP(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),dM(this,pk),dM(this,lk,aM(sk,8,this)),aM(sk,11,this),dM(this,fk,aM(sk,12,this)),aM(sk,15,this),this.element=r,this.refreshShape=()=>s()}set element(e){pM(this,pk,e,dk)}get element(){var e;return null!=(e=this.proxy)?e:cM(this,pk,ck)}};function yk(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}sk=tM(ak),lk=new WeakMap,pk=new WeakSet,fk=new WeakMap,uk=sM(sk,20,"#element",ok,pk,lk),ck=uk.get,dk=uk.set,sM(sk,4,"proxy",ik,vk,fk),oM(sk,vk);var bk="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?v:f;function xk(){const e=g(0)[1];return m(()=>{e(e=>e+1)},[e])}function Sk(e,t=[],n=!1){const r=u(e);return r.current=e,function(e,t=!1){const n=u(e.peek()),r=u(!1),i=xk();return bk(()=>lw(()=>{const o=n.current,a=e.value;if(o!==a){if(n.current=a,!r.current)return;t?D(i):i()}}),[e,t,i]),{get value(){return r.current=!0,e.peek()}}}(y(()=>Zw(()=>r.current()),t),n)}function wk(e,t){const n=u(new Map),r=xk();return bk(()=>{if(e)return lw(()=>{var i;let o=!1,a=!1;for(const r of n.current){const[s]=r,l=$S(()=>r[1]),u=e[s];l!==u&&(o=!0,n.current.set(s,u),a=null!=(i=null==t?void 0:t(s,l,u))&&i)}o&&(a?D(r):r())});n.current.clear()},[e]),y(()=>e?new Proxy(e,{get(e,t){const r=e[t];return n.current.set(t,r),r}}):e,[e])}function Ck(e,t){e()}function Ek(e){const t=u(e);return bk(()=>{t.current=e},[e]),t}function Ik(e,t,n=f,r=Object.is){const i=u(e);n(()=>{const n=i.current;r(e,n)||(i.current=e,t(e,n))},[t,e])}function Dk(e,t){const n=u(yk(e));bk(()=>{const r=yk(e);r!==n.current&&(n.current=r,t(r))})}var Pk=Object.defineProperty,Mk=Object.defineProperties,Rk=Object.getOwnPropertyDescriptors,kk=Object.getOwnPropertySymbols,Lk=Object.prototype.hasOwnProperty,Ak=Object.prototype.propertyIsEnumerable,Ok=(e,t,n)=>t in e?Pk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Tk=new mk,qk=d(Tk),_k=x(r(({children:e},t)=>{const[n,r]=g(0),i=u(null),o=u(null),a=y(()=>({renderer:{get rendering(){var e;return null!=(e=i.current)?e:Promise.resolve()}},trackRendering(e){i.current||(i.current=new Promise(e=>{o.current=e})),S(()=>{e(),r(e=>e+1)})}}),[]);return bk(()=>{var e;null==(e=o.current)||e.call(o),i.current=null},[e,n]),w(t,()=>a),null})),Nk=[void 0,Qw];function jk(e){var t=e,{children:n,onCollision:r,onBeforeDragStart:i,onDragStart:o,onDragMove:a,onDragOver:s,onDragEnd:l}=t,c=((e,t)=>{var n={};for(var r in e)Lk.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&kk)for(var r of kk(e))t.indexOf(r)<0&&Ak.call(e,r)&&(n[r]=e[r]);return n})(t,["children","onCollision","onBeforeDragStart","onDragStart","onDragMove","onDragOver","onDragEnd"]);const d=u(null),{plugins:p,modifiers:h,sensors:m}=c,g=JI(p,hk.plugins),v=JI(m,hk.sensors),y=JI(h,hk.modifiers),x=Ek(i),S=Ek(o),w=Ek(s),C=Ek(a),E=Ek(l),I=Ek(r),D=function(e){const t=u(null);t.current||(t.current=e());return b(()=>()=>{var e;return null==(e=t.current)?void 0:e.destroy()},[]),t.current}(()=>{var e;return null!=(e=c.manager)?e:new mk(c)});return f(()=>{if(!d.current)throw new Error("Renderer not found");const{renderer:e,trackRendering:t}=d.current,{monitor:n}=D;D.renderer=e;const r=[n.addEventListener("beforedragstart",e=>{const n=x.current;n&&t(()=>n(e,D))}),n.addEventListener("dragstart",e=>{var t;return null==(t=S.current)?void 0:t.call(S,e,D)}),n.addEventListener("dragover",e=>{const n=w.current;n&&t(()=>n(e,D))}),n.addEventListener("dragmove",e=>{const n=C.current;n&&t(()=>n(e,D))}),n.addEventListener("dragend",e=>{const n=E.current;n&&t(()=>n(e,D))}),n.addEventListener("collision",e=>{var t;return null==(t=I.current)?void 0:t.call(I,e,D)})];return()=>r.forEach(e=>e())},[D]),Ik(g,()=>D&&(D.plugins=g),...Nk),Ik(v,()=>D&&(D.sensors=v),...Nk),Ik(y,()=>D&&(D.modifiers=y),...Nk),Yn.jsxs(qk.Provider,{value:D,children:[Yn.jsx(_k,{ref:d,children:n}),n]})}function Fk(){return i(qk)}function zk(e){var t;const n=null!=(t=Fk())?t:void 0,[r]=g(()=>e(n));return r.manager!==n&&(r.manager=n),bk(r.register,[n,r]),r}function Wk({children:e,className:t,dropAnimation:n,style:r,tag:i,disabled:o}){var a;const s=u(null),l=Fk(),d=null!=(a=Sk(()=>null==l?void 0:l.dragOperation.source,[l]).value)?a:null,p="function"==typeof o?o(d):o;f(()=>{if(!s.current||!l||p)return;const e=l.plugins.find(e=>e instanceof pR);return e?(e.overlay=s.current,()=>{e.overlay=void 0}):void 0},[l,p]),f(()=>{if(!l)return;const e=l.plugins.find(e=>e instanceof pR);return e?(e.dropAnimation=n,()=>{e.dropAnimation=void 0}):void 0},[l,n]);const h=y(()=>{if(!l)return null;const e=new Proxy(l.registry,{get:(e,t)=>"register"===t||"unregister"===t?$k:e[t]});return new Proxy(l,{get:(t,n)=>"registry"===n?e:t[n]})},[l]);return Yn.jsx(qk.Provider,{value:h,children:c(i||"div",{ref:s,className:t,style:r,"data-dnd-overlay":!0},function(){if(!d||p)return null;if("function"==typeof e)return Yn.jsx(Hk,{source:d,children:e});return e}())})}function $k(){return()=>{}}function Hk({children:e,source:t}){return e(wk(t))}var Vk,Bk,Gk,Uk,Yk,Kk=Object.create,Xk=Object.defineProperty,Jk=Object.getOwnPropertyDescriptor,Zk=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Qk=e=>{throw TypeError(e)},eL=["class","method","getter","setter","accessor","field","value","get","set"],tL=e=>void 0!==e&&"function"!=typeof e?Qk("Function expected"):e,nL=(e,t,n,r,i)=>({kind:eL[e],name:t,metadata:r,addInitializer:e=>n._?Qk("Already initialized"):i.push(tL(e||null))}),rL=(e,t,n,r,i,o)=>{for(var a,s,l,u,c=7&t,d=eL[c+5],p=e[2]||(e[2]=[]),f=(i=i.prototype,Jk(i,n)),h=r.length-1;h>=0;h--)(l=nL(c,n,s={},e[3],p)).static=false,l.private=false,u=l.access={has:e=>n in e},u.get=e=>e[n],a=(0,r[h])(f[d],l),s._=1,tL(a)&&(f[d]=a);return f&&Xk(i,n,f),i},iL=(e,t,n)=>t.has(e)||Qk("Cannot "+n),oL=class e{constructor(e,t){this.x=e,this.y=t}static delta(t,n){return new e(t.x-n.x,t.y-n.y)}static distance(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}static equals(e,t){return e.x===t.x&&e.y===t.y}static from({x:t,y:n}){return new e(t,n)}},aL=class extends(Gk=oC,Bk=[tC],Vk=[tC],Gk){constructor(e){var t,n,r;super(oL.from(e),(e,t)=>oL.equals(e,t)),((e,t,n)=>{for(var r=0,i=e[t>>1],o=i&&i.length;r<o;r++)i[r].call(n)})(Yk,5,this),t=this,r=0,(n=Uk).has(t)?Qk("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(t):n.set(t,r),this.velocity={x:0,y:0}}get delta(){return oL.delta(this.current,this.initial)}get direction(){const{current:e,previous:t}=this;if(!t)return null;const n={x:e.x-t.x,y:e.y-t.y};return n.x||n.y?Math.abs(n.x)>Math.abs(n.y)?n.x>0?"right":"left":n.y>0?"down":"up":null}get current(){return super.current}set current(e){const{current:t}=this,n=oL.from(e),r={x:n.x-t.x,y:n.y-t.y},i=Date.now(),o=i-(iL(a=this,s=Uk,"read from private field"),s.get(a));var a,s;const l=e=>Math.round(e/o*100);zS(()=>{((e,t,n)=>{iL(e,t,"write to private field"),t.set(e,n)})(this,Uk,i),this.velocity={x:l(r.x),y:l(r.y)},super.current=n})}reset(e=this.defaultValue){super.reset(oL.from(e)),this.velocity={x:0,y:0}}};Yk=(e=>{var t;return[,,,Kk(null!=(t=null==e?void 0:e[Zk("metadata")])?t:null)]})(Gk),Uk=new WeakMap,rL(Yk,2,"delta",Bk,aL),rL(Yk,2,"direction",Vk,aL),((e,t)=>{((e,t,n)=>{t in e?Xk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(t,Zk("metadata"),e[3])})(Yk,aL);var sL=(e=>(e.Horizontal="x",e.Vertical="y",e))(sL||{});Object.values(sL);var lL=e=>{var t;return null!=(t=(({dragOperation:e,droppable:t})=>{const n=e.position.current;if(!n)return null;const{id:r}=t;if(!t.shape)return null;if(t.shape.containsPoint(n))return{id:r,value:1/oL.distance(t.shape.center,n),type:jE.PointerIntersection,priority:NE.High};return null})(e))?t:(({dragOperation:e,droppable:t})=>{const{shape:n}=e;if(!t.shape||!(null==n?void 0:n.current))return null;const r=n.current.intersectionArea(t.shape);if(r){const{position:i}=e,o=oL.distance(t.shape.center,i.current),a=r/(n.current.area+t.shape.area-r)/o;return{id:t.id,value:a,type:jE.ShapeIntersection,priority:NE.Normal}}return null})(e)};function uL(e){const{collisionDetector:t,data:n,disabled:r,element:i,id:o,accept:a,type:s}=e,l=zk(t=>new vk(((e,t)=>Mk(e,Rk(t)))(((e,t)=>{for(var n in t||(t={}))Lk.call(t,n)&&Ok(e,n,t[n]);if(kk)for(var n of kk(t))Ak.call(t,n)&&Ok(e,n,t[n]);return e})({},e),{register:!1,element:yk(i)}),t)),u=wk(l);return Ik(o,()=>l.id=o),Dk(i,e=>l.element=e),Ik(a,()=>l.accept=a,void 0,Qw),Ik(t,()=>l.collisionDetector=null!=t?t:lL),Ik(n,()=>n&&(l.data=n)),Ik(r,()=>l.disabled=!0===r),Ik(s,()=>l.type=s),{droppable:u,get isDropTarget(){return u.isDropTarget},ref:m(e=>{var t,n;(e||!(null==(t=l.element)?void 0:t.isConnected)||(null==(n=l.manager)?void 0:n.dragOperation.status.idle))&&(l.element=null!=e?e:void 0)},[l])}}const cL=e=>Array.from({length:e},(e,t)=>t),dL=({id:e,sectionIndex:t,itemIndex:n})=>Yn.jsx("span",{children:`${e}-${t}-${n}`}),pL=o.memo(()=>{const e=nx(RS)??dL,{startSectionIndex:t,startIndex:n,id:r}=nx(OS)??{};return"number"!=typeof t||"number"!=typeof n||void 0===r?null:Yn.jsx(Wk,{dropAnimation:null,children:Yn.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:Yn.jsx(e,{id:r,sectionIndex:t,itemIndex:n})})})}),fL=({sectionIndex:e,itemIndex:t,isDragging:n})=>{const r=nx(OS),i=r?.toSectionIndex===e&&r.toIndex===t;return Yn.jsx("div",{"data-key":"drop-target-indicator","data-testid":"drop-target-indicator",style:{visibility:i&&!n?"visible":"hidden",padding:0,background:"rgba(64, 64, 64, 1)",borderRadius:2,marginLeft:"4px",width:"calc(100% - 8px)",height:"2px"}})},hL=(e,t)=>e?"2px solid rgba(0, 135, 61, 1)":t?"1px dashed rgba(0, 0, 0, 0.43)":void 0,mL=o.memo(({sectionIndex:e})=>{const t=nx(wS)[e],n=nx(CS),r=nx(ES),i=null!==nx(OS),o=r(e),a=n({sectionIndex:e}),{ref:s,isDropTarget:l}=uL({id:a,type:"section",accept:"item",collisionPriority:NE.Low,data:{id:a,sectionIndex:e,sectionKey:a}});return t>0?null:Yn.jsxs(xl,{ref:s,sx:{margin:"4px",outline:hL(l,i),borderRadius:"4px",boxSizing:"border-box"},children:[Yn.jsx(xl,{sx:{position:"relative",top:"4px"},children:Yn.jsx(fL,{sectionIndex:e,itemIndex:0,isDragging:!1})}),Yn.jsxs(xl,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px",padding:"20px 4px"},children:[Yn.jsx(_s,{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}),Yn.jsx(_s,{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})]})]})}),gL=o.memo(({id:e,sectionIndex:t})=>{const n=nx(MS);return void 0===n?null:Yn.jsx(n,{id:e,sectionIndex:t})});var vL=Object.defineProperty,yL=Object.defineProperties,bL=Object.getOwnPropertyDescriptors,xL=Object.getOwnPropertySymbols,SL=Object.prototype.hasOwnProperty,wL=Object.prototype.propertyIsEnumerable,CL=(e,t,n)=>t in e?vL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,EL=(e,t)=>{for(var n in t||(t={}))SL.call(t,n)&&CL(e,n,t[n]);if(xL)for(var n of xL(t))wL.call(t,n)&&CL(e,n,t[n]);return e},IL=(e,t)=>yL(e,bL(t)),DL=class extends UI{apply({transform:e}){if(!this.options)return e;const{axis:t,value:n}=this.options;return IL(EL({},e),{[t]:n})}};DL.configure=fE(DL);var PL=DL,ML=PL.configure({axis:"x",value:0});PL.configure({axis:"y",value:0});var RL=class extends UI{apply({transform:e}){var t;const{size:n=20}=null!=(t=this.options)?t:{},r="number"==typeof n?n:n.x,i="number"==typeof n?n:n.y;return IL(EL({},e),{x:Math.ceil(e.x/r)*r,y:Math.ceil(e.y/i)*i})}};RL.configure=fE(RL);var kL=Object.create,LL=Object.defineProperty,AL=Object.defineProperties,OL=Object.getOwnPropertyDescriptor,TL=Object.getOwnPropertyDescriptors,qL=Object.getOwnPropertySymbols,_L=Object.prototype.hasOwnProperty,NL=Object.prototype.propertyIsEnumerable,jL=e=>{throw TypeError(e)},FL=(e,t,n)=>t in e?LL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zL=(e,t)=>{for(var n in t||(t={}))_L.call(t,n)&&FL(e,n,t[n]);if(qL)for(var n of qL(t))NL.call(t,n)&&FL(e,n,t[n]);return e},WL=(e,t)=>AL(e,TL(t)),$L=["class","method","getter","setter","accessor","field","value","get","set"],HL=e=>void 0!==e&&"function"!=typeof e?jL("Function expected"):e,VL=(e,t,n,r,i)=>({kind:$L[e],name:t,metadata:r,addInitializer:e=>n._?jL("Already initialized"):i.push(HL(e||null))}),BL=(e,t,n,r)=>{for(var i=0,o=e[t>>1],a=o&&o.length;i<a;i++)1&t?o[i].call(n):r=o[i].call(n,r);return r},GL=(e,t,n,r,i,o)=>{for(var a,s,l,u,c,d=7&t,p=e.length+1,f=$L[d+5],h=e[p-1]=[],m=e[p]||(e[p]=[]),g=(i=i.prototype,OL({get[n](){return YL(this,o)},set[n](e){return XL(this,o,e)}},n)),v=r.length-1;v>=0;v--)(u=VL(d,n,l={},e[3],m)).static=false,u.private=false,c=u.access={has:e=>n in e},c.get=e=>e[n],c.set=(e,t)=>e[n]=t,s=(0,r[v])({get:g.get,set:g.set},u),l._=1,void 0===s?HL(s)&&(g[f]=s):"object"!=typeof s||null===s?jL("Object expected"):(HL(a=s.get)&&(g.get=a),HL(a=s.set)&&(g.set=a),HL(a=s.init)&&h.unshift(a));return g&&LL(i,n,g),i},UL=(e,t,n)=>t.has(e)||jL("Cannot "+n),YL=(e,t,n)=>(UL(e,t,"read from private field"),t.get(e)),KL=(e,t,n)=>t.has(e)?jL("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),XL=(e,t,n,r)=>(UL(e,t,"write to private field"),t.set(e,n),n);function JL(e){return e instanceof MA||e instanceof PA}var ZL=class extends mE{constructor(e){super(e);const t=lw(()=>{const{dragOperation:t}=e;if(qP(t.activatorEvent)&&JL(t.source)&&t.status.initialized){const t=e.registry.plugins.get(IR);if(t)return t.disable(),()=>t.enable()}}),n=e.monitor.addEventListener("dragmove",(e,t)=>{queueMicrotask(()=>{if(this.disabled||e.defaultPrevented||!e.nativeEvent)return;const{dragOperation:n}=t;if(!qP(e.nativeEvent))return;if(!JL(n.source))return;if(!n.shape)return;const{actions:r,collisionObserver:i,registry:o}=t,{by:a}=e;if(!a)return;const s=function(e){const{x:t,y:n}=e;if(t>0)return"right";if(t<0)return"left";if(n>0)return"down";if(n<0)return"up"}(a),{source:l,target:u}=n,{center:c}=n.shape.current,d=[],p=[];zS(()=>{for(const e of o.droppables){const{id:t}=e;if(!e.accepts(l)||t===(null==u?void 0:u.id)&&JL(e)||!e.element)continue;let n=e.shape;const r=new LP(e.element,{getBoundingClientRect:e=>gD(e,void 0,.2)});r.height&&r.width&&(("down"==s&&c.y+10<r.center.y||"up"==s&&c.y-10>r.center.y||"left"==s&&c.x-10>r.center.x||"right"==s&&c.x+10<r.center.x)&&(d.push(e),e.shape=r,p.push(()=>e.shape=n)))}}),e.preventDefault(),i.disable();const f=i.computeCollisions(d,FP);zS(()=>p.forEach(e=>e()));const[h]=f;if(!h)return;const{id:m}=h,{index:g,group:v}=l.sortable;r.setDropTarget(m).then(()=>{const{source:e,target:t,shape:o}=n;if(!e||!JL(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;EP(c);const d=new LP(c);if(!d)return;const p=MC.delta(d,MC.from(o.current.boundingRectangle),e.alignment);r.move({by:p}),u?r.setDropTarget(e.id).then(()=>i.enable()):i.enable()})})});this.destroy=()=>{n(),t()}}};var QL=Object.defineProperty,eA=Object.defineProperties,tA=Object.getOwnPropertyDescriptors,nA=Object.getOwnPropertySymbols,rA=Object.prototype.hasOwnProperty,iA=Object.prototype.propertyIsEnumerable,oA=(e,t,n)=>t in e?QL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,aA=(e,t)=>{for(var n in t||(t={}))rA.call(t,n)&&oA(e,n,t[n]);if(nA)for(var n of nA(t))iA.call(t,n)&&oA(e,n,t[n]);return e},sA=(e,t)=>eA(e,tA(t));function lA(e,t,n){if(t===n)return e;const r=e.slice();return r.splice(n,0,r.splice(t,1)[0]),r}function uA(e){return"initialIndex"in e&&"number"==typeof e.initialIndex&&"index"in e&&"number"==typeof e.index}function cA(e,t){return function(e,t,n){var r,i,o;const{source:a,target:s,canceled:l}=t.operation;if(!a||!s||l)return"preventDefault"in t&&t.preventDefault(),e;const u=(e,t)=>e===t||"object"==typeof e&&"id"in e&&e.id===t;if(Array.isArray(e)){const r=e.findIndex(e=>u(e,a.id)),i=e.findIndex(e=>u(e,s.id));if(-1===r||-1===i){if(uA(a)){const r=a.initialIndex,i=a.index;return r===i||r<0||r>=e.length?("preventDefault"in t&&t.preventDefault(),e):n(e,r,i)}return e}if(!l&&"index"in a&&"number"==typeof a.index){const t=a.index;if(t!==r)return n(e,r,t)}return n(e,r,i)}const c=Object.entries(e);let d,p,f=-1,h=-1;for(const[e,t]of c)if(-1===f&&(f=t.findIndex(e=>u(e,a.id)),-1!==f&&(d=e)),-1===h&&(h=t.findIndex(e=>u(e,s.id)),-1!==h&&(p=e)),-1!==f&&-1!==h)break;if(-1===f&&uA(a)){const r=a.initialGroup,i=a.initialIndex,o=a.group,s=a.index;if(null==r||null==o||!(r in e)||!(o in e))return"preventDefault"in t&&t.preventDefault(),e;if(r===o&&i===s)return"preventDefault"in t&&t.preventDefault(),e;if(r===o)return sA(aA({},e),{[r]:n(e[r],i,s)});const l=e[r][i];return sA(aA({},e),{[r]:[...e[r].slice(0,i),...e[r].slice(i+1)],[o]:[...e[o].slice(0,s),l,...e[o].slice(s)]})}if(!a.manager)return e;const{dragOperation:m}=a.manager,g=null!=(i=null==(r=m.shape)?void 0:r.current.center)?i:m.position.current;if(null==p&&s.id in e){const t=s.shape&&g.y>s.shape.center.y?e[s.id].length:0;p=s.id,h=t}if(null==d||null==p||d===p&&f===h){if(null!=d&&d===p&&f===h&&uA(a)){const t=null!=a.group&&a.group!==d,r=a.index!==f;if(t||r){const t=null!=(o=a.group)?o:d;if(t in e){if(d===t)return sA(aA({},e),{[d]:n(e[d],f,a.index)});const r=e[d][f];return sA(aA({},e),{[d]:[...e[d].slice(0,f),...e[d].slice(f+1)],[t]:[...e[t].slice(0,a.index),r,...e[t].slice(a.index)]})}}}return"preventDefault"in t&&t.preventDefault(),e}if(d===p)return sA(aA({},e),{[d]:n(e[d],f,h)});const v=s.shape&&Math.round(g.y)>Math.round(s.shape.center.y)?1:0,y=e[d][f];return sA(aA({},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,lA)}var dA="__default__";function pA(e,t,n,r){const i=r<t?"afterend":"beforebegin";n.insertAdjacentElement(i,e)}function fA(e,t){return e.index-t.index}function hA(e){return Array.from(e).sort(fA)}var mA,gA,vA,yA,bA,xA,SA,wA,CA=[ZL,class extends mE{constructor(e){super(e);const t=()=>{const t=new Map;for(const n of e.registry.droppables)if(n instanceof MA){const{sortable:e}=n,{group:r}=e;let i=t.get(r);i||(i=new Set,t.set(r,i)),i.add(e)}for(const[e,n]of t)t.set(e,new Set(hA(n)));return t},n=[e.monitor.addEventListener("dragover",(e,n)=>{if(this.disabled)return;const{dragOperation:r}=n,{source:i,target:o}=r;if(!JL(i)||!JL(o))return;if(i.sortable===o.sortable)return;const a=t(),s=i.sortable.group===o.sortable.group,l=a.get(i.sortable.group),u=s?l:a.get(o.sortable.group);l&&u&&queueMicrotask(()=>{e.defaultPrevented||n.renderer.rendering.then(()=>{var r,c,d;const p=t();for(const[e,t]of a.entries()){const n=Array.from(t).entries();for(const[t,i]of n)if(i.index!==t||i.group!==e||!(null==(r=p.get(e))?void 0:r.has(i)))return}const f=i.sortable.element,h=o.sortable.element;if(!h||!f)return;if(!s&&o.id===i.sortable.group)return;const m=hA(l),g=s?m:hA(u),v=null!=(c=i.sortable.group)?c:dA,y=null!=(d=o.sortable.group)?d:dA,b={[v]:m,[y]:g},x=cA(b,e);if(b===x)return;const S=x[y].indexOf(i.sortable),w=x[y].indexOf(o.sortable);n.collisionObserver.disable(),pA(f,S,h,w),zS(()=>{for(const[e,t]of x[v].entries())t.index=e;if(!s)for(const[e,t]of x[y].entries())t.group=o.sortable.group,t.index=e}),n.actions.setDropTarget(i.id).then(()=>n.collisionObserver.enable())})})}),e.monitor.addEventListener("dragend",(e,n)=>{if(!e.canceled)return;const{dragOperation:r}=n,{source:i}=r;JL(i)&&(i.sortable.initialIndex===i.sortable.index&&i.sortable.initialGroup===i.sortable.group||queueMicrotask(()=>{const e=t(),r=e.get(i.sortable.initialGroup);r&&n.renderer.rendering.then(()=>{for(const[t,n]of e.entries()){const e=Array.from(n).entries();for(const[n,r]of e)if(r.index!==n||r.group!==t)return}const t=hA(r),n=i.sortable.element,o=t[i.sortable.initialIndex],a=null==o?void 0:o.element;o&&a&&n&&(pA(n,o.index,a,i.index),zS(()=>{for(const[t,n]of e.entries()){const e=Array.from(n).values();for(const t of e)t.index=t.initialIndex,t.group=t.initialGroup}}))})}))})];this.destroy=()=>{for(const e of n)e()}}}],EA={duration:250,easing:"cubic-bezier(0.25, 1, 0.5, 1)",idle:!1},IA=new class{constructor(){Kw(this,iC,new WeakMap)}get(e,t){var n;return e?null==(n=Yw(this,iC).get(e))?void 0:n.get(t):void 0}set(e,t,n){var r;if(e)return Yw(this,iC).has(e)||Yw(this,iC).set(e,new Map),null==(r=Yw(this,iC).get(e))?void 0:r.set(t,n)}clear(e){var t;return e?null==(t=Yw(this,iC).get(e))?void 0:t.clear():void 0}};gA=[eC],mA=[eC];var DA=class{constructor(e,t){KL(this,yA,BL(vA,8,this)),BL(vA,11,this),KL(this,bA),KL(this,xA),KL(this,SA,BL(vA,12,this)),BL(vA,15,this),KL(this,wA),this.register=()=>(zS(()=>{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=()=>{zS(()=>{var e,t;null==(e=this.manager)||e.registry.unregister(this.droppable),null==(t=this.manager)||t.registry.unregister(this.draggable)})},this.destroy=()=>{zS(()=>{this.droppable.destroy(),this.draggable.destroy()})};var n=e,{effects:r=()=>[],group:i,index:o,sensors:a,type:s,transition:l=EA,plugins:u=CA}=n,c=((e,t)=>{var n={};for(var r in e)_L.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&qL)for(var r of qL(e))t.indexOf(r)<0&&NL.call(e,r)&&(n[r]=e[r]);return n})(n,["effects","group","index","sensors","type","transition","plugins"]);this.droppable=new MA(c,t,this),this.draggable=new PA(WL(zL({},c),{effects:()=>[()=>{var e,t,n;const r=null==(e=this.manager)?void 0:e.dragOperation.status;(null==r?void 0:r.initializing)&&this.id===(null==(n=null==(t=this.manager)?void 0:t.dragOperation.source)?void 0:n.id)&&IA.clear(this.manager),(null==r?void 0:r.dragging)&&IA.set(this.manager,this.id,$S(()=>({initialIndex:this.index,initialGroup:this.group})))},()=>{const{index:e,group:t,manager:n}=this,r=YL(this,xA),i=YL(this,bA);e===r&&t===i||(XL(this,xA,e),XL(this,bA,t),this.animate())},()=>{const{target:e}=this,{feedback:t,isDragSource:n}=this.draggable;"move"==t&&n&&(this.droppable.disabled=!e)},()=>{const{manager:e}=this;for(const t of u)null==e||e.registry.register(t)},...r()],type:s,sensors:a}),t,this),XL(this,wA,c.element),this.manager=t,this.index=o,XL(this,xA,o),this.group=i,XL(this,bA,i),this.type=s,this.transition=l}get initialIndex(){var e,t;return null!=(t=null==(e=IA.get(this.manager,this.id))?void 0:e.initialIndex)?t:this.index}get initialGroup(){var e,t;return null!=(t=null==(e=IA.get(this.manager,this.id))?void 0:e.initialGroup)?t:this.group}animate(){$S(()=>{const{manager:e,transition:t}=this,{shape:n}=this.droppable;if(!e)return;const{idle:r}=e.dragOperation.status;n&&t&&(!r||t.idle)&&e.renderer.rendering.then(()=>{const{element:r}=this;if(!r)return;const i=this.refreshShape();if(!i)return;const o=n.boundingRectangle.left-i.boundingRectangle.left,a=n.boundingRectangle.top-i.boundingRectangle.top,{translate:s}=pP(r),l=DP(r,s,!1),u=DP(r,s);if(o||a){const n=ED(cD(r))?WL(zL({},t),{duration:0}):t;IP({element:r,keyframes:{translate:[`${l.x+o}px ${l.y+a}px ${l.z}`,`${u.x}px ${u.y}px ${u.z}`]},options:n}).then(()=>{e.dragOperation.status.dragging||(this.droppable.shape=void 0)})}})})}get manager(){return this.draggable.manager}set manager(e){zS(()=>{this.draggable.manager=e,this.droppable.manager=e})}set element(e){zS(()=>{const t=YL(this,wA),n=this.droppable.element,r=this.draggable.element;n&&n!==t||(this.droppable.element=e),r&&r!==t||(this.draggable.element=e),XL(this,wA,e)})}get element(){var e,t;const n=YL(this,wA);if(n)return null!=(t=null!=(e=MD.get(n))?e:n)?t:this.droppable.element}set target(e){this.droppable.element=e}get target(){return this.droppable.element}set source(e){this.draggable.element=e}get source(){return this.draggable.element}get disabled(){return this.draggable.disabled&&this.droppable.disabled}set feedback(e){this.draggable.feedback=e}set disabled(e){zS(()=>{this.droppable.disabled=e,this.draggable.disabled=e})}set data(e){zS(()=>{this.droppable.data=e,this.draggable.data=e})}set handle(e){this.draggable.handle=e}set id(e){zS(()=>{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:jP}set alignment(e){this.draggable.alignment=e}get alignment(){return this.draggable.alignment}set type(e){zS(()=>{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)}};vA=[,,,kL(null)],yA=new WeakMap,bA=new WeakMap,xA=new WeakMap,SA=new WeakMap,wA=new WeakMap,GL(vA,4,"index",gA,DA,yA),GL(vA,4,"group",mA,DA,SA),((e,t)=>{return FL(t,(n="metadata",(r=Symbol[n])?r:Symbol.for("Symbol."+n)),e[3]);var n,r})(vA,DA);var PA=class extends gk{constructor(e,t,n){super(e,t),this.sortable=n}get index(){return this.sortable.index}get initialIndex(){return this.sortable.initialIndex}get group(){return this.sortable.group}get initialGroup(){return this.sortable.initialGroup}},MA=class extends vk{constructor(e,t,n){super(e,t),this.sortable=n}get index(){return this.sortable.index}get group(){return this.sortable.group}},RA=Object.defineProperty,kA=Object.defineProperties,LA=Object.getOwnPropertyDescriptors,AA=Object.getOwnPropertySymbols,OA=Object.prototype.hasOwnProperty,TA=Object.prototype.propertyIsEnumerable,qA=(e,t,n)=>t in e?RA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_A=(e,t)=>{for(var n in t||(t={}))OA.call(t,n)&&qA(e,n,t[n]);if(AA)for(var n of AA(t))TA.call(t,n)&&qA(e,n,t[n]);return e};function NA(e){const{accept:t,collisionDetector:n,collisionPriority:r,id:i,data:o,element:a,handle:s,index:l,group:u,disabled:c,feedback:d,modifiers:p,sensors:f,target:h,type:g}=e,v=_A(_A({},EA),e.transition),y=zk(t=>new DA(((e,t)=>kA(e,LA(t)))(_A({},e),{transition:v,register:!1,handle:yk(s),element:yk(a),target:yk(h),feedback:d}),t)),b=wk(y,jA);return Ik(i,()=>y.id=i),bk(()=>{zS(()=>{y.group=u,y.index=l})},[y,u,l]),Ik(g,()=>y.type=g),Ik(t,()=>y.accept=t,void 0,Qw),Ik(o,()=>o&&(y.data=o)),Ik(l,()=>{var e;(null==(e=y.manager)?void 0:e.dragOperation.status.idle)&&(null==v?void 0:v.idle)&&y.refreshShape()},Ck),Dk(s,e=>y.handle=e),Dk(a,e=>y.element=e),Dk(h,e=>y.target=e),Ik(c,()=>y.disabled=!0===c),Ik(f,()=>y.sensors=f),Ik(n,()=>y.collisionDetector=n),Ik(r,()=>y.collisionPriority=r),Ik(d,()=>y.feedback=null!=d?d:"default"),Ik(v,()=>y.transition=v,void 0,Qw),Ik(p,()=>y.modifiers=p,void 0,Qw),Ik(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:m(e=>{y.handle=null!=e?e:void 0},[y]),ref:m(e=>{var t,n;(e||!(null==(t=y.element)?void 0:t.isConnected)||(null==(n=y.manager)?void 0:n.dragOperation.status.idle))&&(y.element=null!=e?e:void 0)},[y]),sourceRef:m(e=>{var t,n;(e||!(null==(t=y.source)?void 0:t.isConnected)||(null==(n=y.manager)?void 0:n.dragOperation.status.idle))&&(y.source=null!=e?e:void 0)},[y]),targetRef:m(e=>{var t,n;(e||!(null==(t=y.target)?void 0:t.isConnected)||(null==(n=y.manager)?void 0:n.dragOperation.status.idle))&&(y.target=null!=e?e:void 0)},[y])}}function jA(e,t,n){return!("isDragSource"!==e||n||!t)}const FA=({id:e,itemIndex:t,sectionIndex:n})=>Yn.jsx("div",{children:`${n}:${t} - ${e}`}),zA=({id:e,itemIndex:t,sectionIndex:n})=>{const r=nx(kS),i=nx(PS),o=nx(wS).at(n)??0,a=nx(CS)({sectionIndex:n}),{ref:s,isDragging:l,handleRef:u}=NA({id:e,index:t,type:"item",accept:"item",group:a,modifiers:[ML],plugins:[ZL],data:{id:e,sectionIndex:n,sectionKey:a,itemIndex:t}}),c=void 0!==r?()=>{r({id:e,itemIndex:t,sectionIndex:n})}:void 0,d=i??FA;return Yn.jsx(rc,{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:Yn.jsxs("div",{style:{width:"100%",opacity:l?.4:1},children:[Yn.jsx(fL,{isDragging:l,itemIndex:t,sectionIndex:n}),Yn.jsx(d,{id:e,itemIndex:t,sectionIndex:n,dragHandleRef:u}),t===o-1&&Yn.jsx(fL,{isDragging:!1,itemIndex:t+1,sectionIndex:n})]})})},WA=o.memo(zA),$A=o.memo(({sectionIndex:e})=>{const t=nx(CS),n=nx(wS).at(e)??0,r=t({sectionIndex:e});return Yn.jsxs(xl,{className:"exploration-list",style:{overflow:"auto"},children:[Yn.jsx(hu,{}),Yn.jsx(gL,{id:r,sectionIndex:e}),Yn.jsx(hu,{}),Yn.jsx(mL,{sectionIndex:e}),Yn.jsx(Bu,{sx:{padding:"2px 8px"},children:cL(n).map(n=>{const r=t({sectionIndex:e,itemIndex:n});return Yn.jsx(WA,{id:r,itemIndex:n,sectionIndex:e},r)})})]},r)}),HA=[BR.configure({activationConstraints:[new WR.Distance({value:5})]}),NR],VA=o.memo(()=>{const e=nx(SS),t=nx(CS),n=rx(TS("start")),r=rx(TS("over")),i=rx(TS("end"));return Yn.jsxs(jk,{sensors:HA,onDragEnd:i,onDragOver:r,onDragStart:n,children:[Yn.jsx(xl,{style:{display:"flex",flexDirection:"column"},children:cL(e).map(e=>Yn.jsx($A,{sectionIndex:e},t({sectionIndex:e})))}),Yn.jsx(pL,{})]})}),BA=o.memo(e=>Yn.jsx(oS,{atoms:qS,atomFamilies:_S,children:Yn.jsx(NS,{props:e,children:Yn.jsx(VA,{})})})),GA="12px",UA="nebula-table-utils-head-menu-button",YA="sn-copy-cell";let KA=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 XA="nebula-table-utils-column-adjuster";let JA=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}({}),ZA=function(e){return e.Auto="auto",e.FitToContent="fitToContent",e.Pixels="pixels",e.Percentage="percentage",e}({});const QA={darker:.15,brighter:.3,opacity:.03},eO={darker:.3,brighter:.5,opacity:.05};let tO=function(e){return e.Cyclic="C",e}({});const nO=(e,t)=>{const n=new Map;for(const t of e)n.set(t.id,t);return t.reduce((e,t)=>{const r=n.get(t);return r&&e.push(r),e},[])},rO=yS(e=>Vb(t=>{const n=t(Ox),r=t(Mx)?.[e];return r||n?.qHyperCubeDef.rankedList?.[e]})),iO=yS(e=>Vb(t=>{const n=t(Cx),r=t(yx),i=t(Lx),o=t(Mx)?.[e],a=n("SUPPORT-9810-MISSING-MEASURES",!1)?r?.properties.qHyperCubeDef.rankedList?.[e]:i?.qHyperCube.rankedList?.[e];return o||(r?.isRankedListCorrupt(e)||void 0===a?r?.createRankedList(e):a)})),oO=(e,t=new Set)=>Vb(n=>{const r=n(e),i=n(Bx);if(!r||0===r.length)return"disabled";const o=r.filter(e=>!t.has(e.id));if(0===o.length)return"disabled";const a=o.filter(e=>i.has(e.id)).length;return 0===a?"none":a===o.length?"all":"some"}),aO=(e,t=new Set)=>Vb(null,(n,r,i)=>{const o=n(e);o&&0!==o.length&&(e=>{const{items:t,shouldCheckAll:n,get:r,set:i,excludedIds:o}=e,a=t.filter(e=>!o?.has(e.id));if(0===a.length)return;const s=r(Bx),l=new Set,u=new Set;if(a.forEach(e=>{const t=s.has(e.id);t&&!n&&u.add(e.id),!t&&n&&l.add(e.id)}),0===l.size&&0===u.size)return;const c=new Set(r(Wx)),d=new Set(r($x));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(Wx,c),i($x,d),gx({type:"apply",localChecked:l,localUnchecked:u,handler:r(yx),model:r(vx),fieldInfo:r(_x),handlerQueue:r(jx)})})({items:o,shouldCheckAll:i,get:n,set:r,excludedIds:t})}),sO=Vb(e=>{const t=e(Ax);return t?.qHyperCube.qDimensionInfo.filter(Ex).map(({cId:e,qFallbackTitle:t})=>({id:e,title:t??"",alternative:!0}))}),lO=Vb(e=>{const t=e(Lx),n=e(xx),r=t?.qHyperCube.qEffectiveInterColumnSortOrder.map(e=>{if(-1===e)return{id:-1,title:n("Common.Values")};const{cId:r,qFallbackTitle:i}=t.qHyperCube.qDimensionInfo[e];return{id:r,title:i??""}});return r}),uO=Vb(e=>{const t=e(xx),n=e(sO),r=e(wx),i=e(Cx)("SUPPORT-9810-MIGRATE-RANKED-LISTS",!1),o=e(i?rO("columns"):iO("columns")),a=e(i?rO("rows"):iO("rows")),s=e(lO);if(void 0===n||void 0===o||void 0===a||void 0===s)return[];const l=[...s,...n].filter(r);return[{id:"rows",title:t("Common.Rows"),items:nO(l,a)},{id:"columns",title:t("Common.Columns"),items:nO(l,o)}]}),cO=yS(e=>Vb(t=>t(uO).at(e))),dO=yS(({sectionIndex:e,itemIndex:t})=>Vb(n=>n(cO(e))?.items.at(t)?.title),(e,t)=>e.sectionIndex===t.sectionIndex&&e.itemIndex===t.itemIndex),pO=yS(e=>Vb(t=>t(cO(e))?.title)),fO=Vb(e=>({sectionIndex:t,itemIndex:n})=>{const r=e(cO(t));return void 0===r?0===t?"rows":"columns":void 0===n?r.id:r.items.at(n)?.id??`missing-item-${t}-${n}`}),hO=Vb(e=>e(uO).map(e=>e.items.length)),mO=yS(e=>oO(Vb(t=>t(cO(e))?.items),new Set([-1]))),gO=yS(e=>aO(Vb(t=>t(cO(e))?.items),new Set([-1]))),vO=Vb(null,(e,t,{event:n,id:r,toIndex:i,toSection:o,startSection:a})=>{const s=e(yx),l=e(vx),u=e(jx),c=e(rO("rows")),d=e(rO("columns")),p=o;if(void 0===s||void 0===l||void 0===c||void 0===d||null===u)return;if(n.operation.canceled)return void t(Mx,null);if("section"===n.operation.target?.type&&a===o)return void t(Mx,null);const f=vS({rows:c,columns:d},n);t(Mx,f),u.add(async()=>{"number"==typeof r?await s.movePseudoDimension({toIndex:i,toSection:p}):await s.moveDimension({cId:r,toIndex:i,toSection:p})})}),yO={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"}},bO="ChartExploration.PivotTable.DimensionSectionEmpty.Message",xO="ChartExploration.PivotTable.MeasureSectionEmpty.Message",SO="#177fe6",wO=(e,t,n,r)=>{if("measure"===t)return e(r?yO.noSearchFound.measure:yO.noItems.measure);const i=r?yO.noSearchFound:yO.noItems;return e(n?i.row:i.column)},CO=(e,t,n)=>n?"":e("measure"===t?xO:bO),EO=yS(e=>Vb(t=>{const n=t(xx),r=t(Sx).length>0;return t=>({title:wO(n,e,0===t,r),message:CO(n,e,r)})})),IO=EO("measure"),DO=EO("dimensions"),PO=({children:e})=>Yn.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e}),MO=e=>{const t=nx(dO(e));return Yn.jsx(PO,{children:t})},RO=Vb(e=>{const t=e(Ax);return t?.qHyperCube.qMeasureInfo.filter(Ex).map(({cId:e,qFallbackTitle:t})=>({id:e,title:t??""}))}),kO=Vb(e=>{const t=e(Cx)("SUPPORT-9810-MIGRATE-RANKED-LISTS",!1),n=e(Lx),r=e(RO),i=e(wx),o=e(t?rO("measures"):iO("measures"));if(void 0===n||void 0===r||void 0===o)return[];const a=n.qHyperCube.qMeasureInfo.filter(Ex).map(({cId:e,qFallbackTitle:t})=>({id:e,title:t??""}));a.push(...r);const s=a.filter(i);return nO(s,o)}),LO=yS(e=>Vb(t=>t(kO).at(e)?.title??"")),AO=Vb(e=>({itemIndex:t})=>{const n=e(kO);return void 0===t?"measures":n.at(t)?.id??`missing-item-${t}`}),OO=Vb(e=>[e(kO).length]),TO=oO(kO),qO=aO(kO),_O=Vb(null,(e,t,{id:n,toIndex:r,event:i})=>{const o=e(yx),a=e(vx),s=e(jx),l=e(rO("measures"));if(void 0===o||void 0===a||void 0===l||"string"!=typeof n||null===s)return;const u=vS({measures:l},i);t(Mx,u),s.add(async()=>{await o.moveMeasure({cId:n,toIndex:r})})}),NO=lb().palette,jO={TEXT:NO.text.primary,DISABLED:NO.text.disabled,HOVER:NO.action.hover,WHITE:Bd.GREYSCALE_100,BORDER_MEDIUM:Bd.GREYSCALE_85,DARK_MODE_TEXT:Bd.GREYSCALE_95,DARK_MODE_BORDER:Bd.GREYSCALE_95,DARK_MODE_DISABLED:Bd.GREYSCALE_70,TRANSPARENT:"transparent",SELECTED:NO.primary.main,LINK:NO.info.main,ERROR:NO.error.main};function FO(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 zO(e){if("object"==typeof e&&FO(e))return(e.r<<16)+(e.g<<8)+e.b;let t=0,n=0,r=0;if("string"==typeof e){let i;(i=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e))?(t=parseInt(i[1],10),n=parseInt(i[2],10),r=parseInt(i[3],10)):(i=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(e))?(t=parseInt(i[1],16),n=parseInt(i[2],16),r=parseInt(i[3],16)):(i=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(e))&&(t=parseInt(i[1]+i[1],16),n=parseInt(i[2]+i[2],16),r=parseInt(i[3]+i[3],16))}return(t<<16)+(n<<8)+r}const WO={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}},$O="qcm-color";function HO(...e){const t={type:$O,r:0,g:0,b:0,a:1,invalid:!1,spaces:{}};let n=0,r=0,i=0,o=1;if(null!==(a=e[0])&&"object"==typeof a&&"type"in a&&a.type===$O)({r:n,g:r,b:i,a:o}=e[0]),t.invalid=e[0].invalid,t.spaces={...e[0].spaces};else if(FO(e[0]))({r:n,g:r,b:i}=e[0]),"a"in e[0]&&({a:o}=e[0]);else if(e.length<3)if("string"==typeof e[0]){const a=e[0];let s;if(s=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(a))n=parseInt(s[1],10),r=parseInt(s[2],10),i=parseInt(s[3],10);else if(s=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(a))n=parseInt(s[1],10),r=parseInt(s[2],10),i=parseInt(s[3],10),o=parseFloat(s[4]);else if(s=/^ARGB\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(a))o=parseInt(s[1],10)/255,n=parseInt(s[2],10),r=parseInt(s[3],10),i=parseInt(s[4],10);else if(s=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(a))n=parseInt(s[1],16),r=parseInt(s[2],16),i=parseInt(s[3],16),o=1;else if(s=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(a))n=parseInt(s[1]+s[1],16),r=parseInt(s[2]+s[2],16),i=parseInt(s[3]+s[3],16),o=1;else if(s=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a<=.5?2*a*t:(2-2*a)*t;let u=e/60;const c=l*(1-Math.abs(u%2-1));let d=[];switch(u=Math.floor(u),u){case 0:d=[l,c,0];break;case 1:d=[c,l,0];break;case 2:d=[0,l,c];break;case 3:d=[0,c,l];break;case 4:d=[c,0,l];break;case 5:d=[l,0,c];break;default:d=[0,0,0]}const p=a-.5*l;n=d[0]+p,r=d[1]+p,i=d[2]+p,n=Math.round(255*n),r=Math.round(255*r),i=Math.round(255*i),o=1}else if(s=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);o=parseFloat(s[7]),e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a<=.5?2*a*t:(2-2*a)*t;let u=e/60;const c=l*(1-Math.abs(u%2-1));let d=[];switch(u=Math.floor(u),u){case 0:d=[l,c,0];break;case 1:d=[c,l,0];break;case 2:d=[0,l,c];break;case 3:d=[0,c,l];break;case 4:d=[c,0,l];break;case 5:d=[l,0,c];break;default:d=[0,0,0]}const p=a-.5*l;n=d[0]+p,r=d[1]+p,i=d[2]+p,n=Math.round(255*n),r=Math.round(255*r),i=Math.round(255*i)}else if(s=/^hsv\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a*t;let u=e/60;const c=l*(1-Math.abs(u%2-1));let d=[];switch(u=Math.floor(u),u){case 0:d=[l,c,0];break;case 1:d=[c,l,0];break;case 2:d=[0,l,c];break;case 3:d=[0,c,l];break;case 4:d=[c,0,l];break;case 5:d=[l,0,c];break;default:d=[0,0,0]}const p=a-l;n=d[0]+p,r=d[1]+p,i=d[2]+p,n=Math.round(255*n),r=Math.round(255*r),i=Math.round(255*i),o=1}else{const e=a.toLowerCase();if(function(e){return e in WO}(e)){const t=WO[e];({r:n,g:r,b:i}=t),o="a"in t?t.a:1}else t.invalid=!0}}else"number"==typeof e[0]&&e[0]>=0&&"argb"===e[1]?(o=(4278190080&e[0])>>>24,o/=255,n=(16711680&e[0])>>16,r=(65280&e[0])>>8,i=255&e[0]):"number"==typeof e[0]&&e[0]>=0?(n=(16711680&e[0])>>16,r=(65280&e[0])>>8,i=255&e[0]):t.invalid=!0;else 3===e.length||4===e.length?(n=e[0],r=e[1],i=e[2],o=4===e.length?e[3]:1):t.invalid=!0;var a;return Number.isNaN(+n+r+i+o)&&(t.invalid=!0),t.r=Math.floor(n),t.g=Math.floor(r),t.b=Math.floor(i),t.a=o,t}function VO(e){let t,n,r;if(FO(e))return t=e.r.toString(16),n=e.g.toString(16),r=e.b.toString(16),1===t.length&&(t=`0${t}`),1===n.length&&(n=`0${n}`),1===r.length&&(r=`0${r}`),`#${[t,n,r].join("")}`;const i="string"==typeof e?zO(e):e;return t=((16711680&i)>>16).toString(16),n=((65280&i)>>8).toString(16),r=(255&i).toString(16),1===t.length&&(t=`0${t}`),1===n.length&&(n=`0${n}`),1===r.length&&(r=`0${r}`),`#${t}${n}${r}`}function BO(e){let t,n,r=0;const i="string"==typeof e?HO(e):e,o=i.r/255,a=i.g/255,s=i.b/255,{a:l}=i,u=Math.max(o,a,s),c=Math.min(o,a,s),d=(u+c)/2;if(u===c)t=0,r=0;else{switch(n=u-c,t=d>.5?n/(2-u-c):n/(u+c),u){case o:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-o)/n+2;break;case s:r=(o-a)/n+4}r/=6}return{h:360*r,s:100*t,l:100*d,a:l}}function GO(e){let t,n,r=0;const i="string"==typeof e?HO(e):e,o=i.r/255,a=i.g/255,s=i.b/255,l=Math.max(o,a,s),u=Math.min(o,a,s),c=l;if(l===u)t=0,r=0;else{switch(n=l-u,t=0===n?0:n/c,l){case o:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-o)/n+2;break;case s:r=(o-a)/n+4}r/=6}return{h:360*r%360,s:100*t,v:100*c}}function UO(e){if(FO(e))return`rgb(${e.r}, ${e.g}, ${e.b})`;const t="string"==typeof e?zO(e):e;return`rgb(${(16711680&t)>>16}, ${(65280&t)>>8}, ${255&t})`}function YO(e,t){return FO(e)?`rgba(${e.r}, ${e.g}, ${e.b}, ${e.a})`:YO(HO(e))}function KO(e){return FO(e)?1===e.a?UO(e):YO(e):KO(HO(e))}const XO=e=>{const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};function JO(e){return.2126*XO(e.r)+.7152*XO(e.g)+.0722*XO(e.b)}function ZO(...e){const t=HO(...e),n={type:t.type,r:t.r,g:t.g,b:t.b,a:t.a,invalid:t.invalid,spaces:t.spaces},r=()=>(n.spaces.hslaObject||(n.spaces.hslaObject=BO(n)),n.spaces.hslaObject),i=e=>{const t=r(),{h:n,s:i,l:o,a:a}=t;return`hsla(${n}, ${i}, ${Math.max(0,Math.min(o+e,100))}, ${a})`};return{get type(){return n.type},isInvalid:()=>n.invalid,get r(){return n.r},get g(){return n.g},get b(){return n.b},get a(){return n.a},getR:()=>n.r,getG:()=>n.g,getB:()=>n.b,getAlpha:()=>n.a,setAlpha:e=>{n.a=e,n.spaces={}},isEqualTo:e=>{let t;if("string"==typeof e)t=HO(e);else{if(e.type!==n.type)return!1;t=e}return t.r===n.r&&t.g===n.g&&t.b===n.b&&t.a===n.a},isDark:()=>function(...e){const t=HO(...e);return t.invalid||JO(t)<.4}(n),getRGB:()=>(n.spaces.rgb||(n.spaces.rgb=UO(n)),n.spaces.rgb),getRGBA:()=>(n.spaces.rgba||(n.spaces.rgba=YO(n)),n.spaces.rgba),getString:()=>(n.spaces.string||(n.spaces.string=KO(n)),n.spaces.string),getHex:()=>(n.spaces.hex||(n.spaces.hex=VO(n)),n.spaces.hex),getHSL:()=>(n.spaces.hsl||(n.spaces.hsl=function(e){let t,n,r=0;const i="string"==typeof e?HO(e):e,o=i.r/255,a=i.g/255,s=i.b/255,l=Math.max(o,a,s),u=Math.min(o,a,s),c=(l+u)/2;if(l===u)t=0,r=0;else{switch(n=l-u,t=c>.5?n/(2-l-u):n/(l+u),l){case o:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-o)/n+2;break;case s:r=(o-a)/n+4}r/=6}return`hsl(${360*r}, ${100*t}, ${100*c})`}(n)),n.spaces.hsl),getHSLA:()=>(n.spaces.hsla||(n.spaces.hsla=function(e){const{h:t,s:n,l:r,a:i}=BO(e);return`hsla(${t}, ${n}, ${r}, ${i})`}(n)),n.spaces.hsla),getHSLAObject:r,getShiftedHSLA:i,getHSV:()=>(n.spaces.hsv||(n.spaces.hsv=function(e){const{h:t,s:n,v:r}=GO(e);return`hsv(${t}, ${n}, ${r})`}(n)),n.spaces.hsv),getHSVObject:()=>(n.spaces.hsvObject||(n.spaces.hsvObject=GO(n)),n.spaces.hsvObject),blend:(e,t)=>`rgba(${Math.floor(n.r+(e.r-n.r)*t)}, ${Math.floor(n.g+(e.g-n.g)*t)}, ${Math.floor(n.b+(e.b-n.b)*t)}, ${Math.floor(n.a+(e.getAlpha()-n.a)*t)})`,getBrightenedColor:(e=1)=>ZO(i(18*e)),getDarkenedColor:(e=1)=>ZO(i(18*-e))}}function QO(e,t){if(!e||!t)return;const n=JO(e),r=JO(t);return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)}const eT="#FFFFFF";function tT(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var nT,rT="top",iT="top-right",oT="right",aT="bottom-right",sT="bottom",lT="bottom-left",uT="left",cT="top-left";tT(tT(tT(tT(tT(tT(tT(tT(tT(tT(nT={},"equal-equal",[rT,sT]),"equal-higher",[sT,aT]),"equal-lower",[rT,iT]),"equal-void",[rT,sT]),"higher-equal",[uT,lT,rT,iT]),"higher-higher-acute",[sT,lT,uT,iT]),"higher-higher-obtuse",[sT,rT]),"higher-lower-negative",[rT,iT,oT]),"higher-lower-positive",[sT,lT,uT]),"higher-void",[rT]),tT(tT(tT(tT(tT(tT(tT(tT(tT(tT(nT,"lower-equal",[rT]),"lower-higher-negative",[rT,cT]),"lower-higher-positive",[aT]),"lower-lower-acute",[rT,cT,uT,iT,oT]),"lower-lower-obtuse",[rT,sT]),"lower-void",[rT]),"void-equal",[rT]),"void-higher",[rT,sT]),"void-lower",[rT,sT,uT]),"void-void",[rT]),tT(nT,"unclassified",[rT,sT,oT,uT,iT,aT,lT,cT]);var dT,pT,fT=["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"],hT=["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 mT(e){return null!=e&&e.isEnabled("PS_20852_WYSIWYG_FONT_SUPPORT")?hT:fT}var gT=function(){if(pT)return dT;pT=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},o=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,i=e.call(n,"constructor"),o=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!i&&!o)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return dT=function e(){var t,n,r,l,u,c,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=s(d,n),d!==(l=s(t,n))&&(h&&l&&(o(l)||(u=i(l)))?(u?(u=!1,c=r&&i(r)?r:[]):c=r&&o(r)?r:{},a(d,{name:n,newValue:e(h,c,l)})):void 0!==l&&a(d,{name:n,newValue:l}));return d},dT}();function vT(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function yT(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function bT(){}!function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")&&e.default}(gT);var xT=.7,ST=1/xT,wT="\\s*([+-]?\\d+)\\s*",CT="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ET="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",IT=/^#([0-9a-f]{3,8})$/,DT=new RegExp(`^rgb\\(${wT},${wT},${wT}\\)$`),PT=new RegExp(`^rgb\\(${ET},${ET},${ET}\\)$`),MT=new RegExp(`^rgba\\(${wT},${wT},${wT},${CT}\\)$`),RT=new RegExp(`^rgba\\(${ET},${ET},${ET},${CT}\\)$`),kT=new RegExp(`^hsl\\(${CT},${ET},${ET}\\)$`),LT=new RegExp(`^hsla\\(${CT},${ET},${ET},${CT}\\)$`),AT={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 OT(){return this.rgb().formatHex()}function TT(){return this.rgb().formatRgb()}function qT(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=IT.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?_T(t):3===n?new zT(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?NT(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?NT(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=DT.exec(e))?new zT(t[1],t[2],t[3],1):(t=PT.exec(e))?new zT(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=MT.exec(e))?NT(t[1],t[2],t[3],t[4]):(t=RT.exec(e))?NT(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=kT.exec(e))?GT(t[1],t[2]/100,t[3]/100,1):(t=LT.exec(e))?GT(t[1],t[2]/100,t[3]/100,t[4]):AT.hasOwnProperty(e)?_T(AT[e]):"transparent"===e?new zT(NaN,NaN,NaN,0):null}function _T(e){return new zT(e>>16&255,e>>8&255,255&e,1)}function NT(e,t,n,r){return r<=0&&(e=t=n=NaN),new zT(e,t,n,r)}function jT(e){return e instanceof bT||(e=qT(e)),e?new zT((e=e.rgb()).r,e.g,e.b,e.opacity):new zT}function FT(e,t,n,r){return 1===arguments.length?jT(e):new zT(e,t,n,null==r?1:r)}function zT(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function WT(){return`#${BT(this.r)}${BT(this.g)}${BT(this.b)}`}function $T(){const e=HT(this.opacity);return`${1===e?"rgb(":"rgba("}${VT(this.r)}, ${VT(this.g)}, ${VT(this.b)}${1===e?")":`, ${e})`}`}function HT(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function VT(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function BT(e){return((e=VT(e))<16?"0":"")+e.toString(16)}function GT(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new YT(e,t,n,r)}function UT(e){if(e instanceof YT)return new YT(e.h,e.s,e.l,e.opacity);if(e instanceof bT||(e=qT(e)),!e)return new YT;if(e instanceof YT)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new YT(a,s,l,e.opacity)}function YT(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function KT(e){return(e=(e||0)%360)<0?e+360:e}function XT(e){return Math.max(0,Math.min(1,e||0))}function JT(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}vT(bT,qT,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:OT,formatHex:OT,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return UT(this).formatHsl()},formatRgb:TT,toString:TT}),vT(zT,FT,yT(bT,{brighter(e){return e=null==e?ST:Math.pow(ST,e),new zT(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?xT:Math.pow(xT,e),new zT(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new zT(VT(this.r),VT(this.g),VT(this.b),HT(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:WT,formatHex:WT,formatHex8:function(){return`#${BT(this.r)}${BT(this.g)}${BT(this.b)}${BT(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:$T,toString:$T})),vT(YT,function(e,t,n,r){return 1===arguments.length?UT(e):new YT(e,t,n,null==r?1:r)},yT(bT,{brighter(e){return e=null==e?ST:Math.pow(ST,e),new YT(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?xT:Math.pow(xT,e),new YT(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new zT(JT(e>=240?e-240:e+120,i,r),JT(e,i,r),JT(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new YT(KT(this.h),XT(this.s),XT(this.l),HT(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=HT(this.opacity);return`${1===e?"hsl(":"hsla("}${KT(this.h)}, ${100*XT(this.s)}%, ${100*XT(this.l)}%${1===e?")":`, ${e})`}`}}));const ZT=Math.PI/180,QT=180/Math.PI,eq=.96422,tq=.82521,nq=4/29,rq=6/29,iq=3*rq*rq,oq=rq*rq*rq;function aq(e){if(e instanceof sq)return new sq(e.l,e.a,e.b,e.opacity);if(e instanceof pq)return fq(e);e instanceof zT||(e=jT(e));var t,n,r=dq(e.r),i=dq(e.g),o=dq(e.b),a=lq((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?t=n=a:(t=lq((.4360747*r+.3850649*i+.1430804*o)/eq),n=lq((.0139322*r+.0971045*i+.7141733*o)/tq)),new sq(116*a-16,500*(t-a),200*(a-n),e.opacity)}function sq(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function lq(e){return e>oq?Math.pow(e,1/3):e/iq+nq}function uq(e){return e>rq?e*e*e:iq*(e-nq)}function cq(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function dq(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function pq(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function fq(e){if(isNaN(e.h))return new sq(e.l,0,0,e.opacity);var t=e.h*ZT;return new sq(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}vT(sq,function(e,t,n,r){return 1===arguments.length?aq(e):new sq(e,t,n,null==r?1:r)},yT(bT,{brighter(e){return new sq(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new sq(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new zT(cq(3.1338561*(t=eq*uq(t))-1.6168667*(e=1*uq(e))-.4906146*(n=tq*uq(n))),cq(-.9787684*t+1.9161415*e+.033454*n),cq(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),vT(pq,function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof pq)return new pq(e.h,e.c,e.l,e.opacity);if(e instanceof sq||(e=aq(e)),0===e.a&&0===e.b)return new pq(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*QT;return new pq(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new pq(e,t,n,null==r?1:r)},yT(bT,{brighter(e){return new pq(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new pq(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return fq(this).rgb()}}));var hq=e=>()=>e;function mq(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):hq(isNaN(e)?t:e)}!function e(t){var n=function(e){return 1===(e=+e)?mq:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):hq(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=FT(e)).r,(t=FT(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=mq(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);var gq="center",vq="bottom";[{key:"NoDataExist",alignment:gq,condition:function(e){var t=e.layoutService;if(!t)return!1;var n=t.meta.size;return n.x*n.y===0}},{key:"OnlyNanDataMeasure",translationKey:"OnlyNanData",alignment:gq,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:gq,condition:function(e){var t=e.layoutService;if(!t)return!1;if(!t.meta.isContinuous)return!1;var n=t.getHyperCubeValue("qDimensionInfo.0");return n&&(n.qMax<n.qMin||"NaN"===n.qMax)}},{key:"OnlyNegativeOrZeroValues",alignment:gq},{key:"DataRangeIncludingZero",alignment:vq},{key:"LimitedData",alignment:vq},{key:"NegativeOrZeroValues",alignment:vq}].reduce(function(e,t){return e[t.key]=t,e},{});var yq,bq=["__proto__","constructor"];function xq(e,t,n){if(void 0!==e&&void 0!==t){var r=t.split("."),i=r[r.length-1];if(!bq.some(function(e){return r.includes(e)})){for(var o=e,a=0;a<r.length-1;++a){var s=r[a];void 0===o[s]&&(o[s]=Number.isNaN(+r[a+1])?{}:[]),o=o[s]}void 0!==n?o[i]=n:delete o[i]}}}function Sq(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return e},n=function(){var e={};return{get:function(t){return e[t]},set:function(t,n){return e[t]=n,n},has:function(t){return t in e},remove:function(t){delete e[t]},empty:function(){e={}}}}();return function(r){var i=t(r);return n.has(i)?n.get(i):n.set(i,e(r))}}function wq(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return function(){for(var r=this,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];clearTimeout(t),t=setTimeout(function(){return e.apply(r,o)},n)}}function Cq(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function Eq(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=Dq)):void 0===t&&(t=Iq);for(var n,r,i,o,a,s=new Rq(e),l=[s];n=l.pop();)if((i=t(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)l.push(r=i[o]=new Rq(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Mq)}function Iq(e){return e.children}function Dq(e){return Array.isArray(e)?e[1]:null}function Pq(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function Mq(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function Rq(e){this.data=e,this.depth=this.height=0,this.parent=null}Rq.prototype=Eq.prototype={constructor:Rq,count:function(){return this.eachAfter(Cq)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,i,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=s.pop();)e.call(t,o,++l,this);return this},eachBefore:function(e,t){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t},copy:function(){return Eq(this).eachBefore(Pq)},[Symbol.iterator]:function*(){var e,t,n,r,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n])}while(o.length)}},yq=function(e){
|
|
99
|
+
*/function Ty(){if(ky)return gm;ky=1,Object.defineProperty(gm,"__esModule",{value:!0}),gm.default=function(t){return(0,e.createStyles)(t)};var e=Oy;return gm}var qy,_y,Ny={},jy={};function Fy(){if(qy)return jy;qy=1;var e=Ho();Object.defineProperty(jy,"__esModule",{value:!0}),jy.default=void 0;var t=(0,e(pm()).default)();return jy.default=t,jy}function zy(){if(_y)return Ny;_y=1;var e=Ho();Object.defineProperty(Ny,"__esModule",{value:!0}),Ny.default=void 0;var t=e(xa()),n=Oy,r=e(Fy());var i=function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,n.makeStyles)(e,(0,t.default)({defaultTheme:r.default},i))};return Ny.default=i,Ny}var Wy,$y,Hy={},Vy={};function By(){if(Wy)return Vy;Wy=1;var e=Ho();Object.defineProperty(Vy,"__esModule",{value:!0}),Vy.isUnitless=function(e){return String(parseFloat(e)).length===String(e).length},Vy.getUnit=n,Vy.toUnitless=r,Vy.convertLength=function(e){return function(t,i){var o=n(t);if(o===i)return t;var a=r(t);if("px"!==o)if("em"===o)a=r(t)*r(e);else if("rem"===o)return a=r(t)*r(e),t;var s=a;if("px"!==i)if("em"===i)s=a/r(e);else{if("rem"!==i)return t;s=a/r(e)}return parseFloat(s.toFixed(5))+i}},Vy.alignProperty=function(e){var t=e.size,n=e.grid,r=t-t%n,i=r+n;return t-r<i-t?r:i},Vy.fontGrid=function(e){var t=e.lineHeight,n=e.pixels,r=e.htmlFontSize;return n/(t*r)},Vy.responsiveProperty=function(e){var n=e.cssProperty,r=e.min,i=e.max,o=e.unit,a=void 0===o?"rem":o,s=e.breakpoints,l=void 0===s?[600,960,1280]:s,u=e.transform,c=void 0===u?null:u,d=(0,t.default)({},n,"".concat(r).concat(a)),p=(i-r)/l[l.length-1];return l.forEach(function(e){var i=r+p*e;null!==c&&(i=c(i)),d["@media (min-width:".concat(e,"px)")]=(0,t.default)({},n,"".concat(Math.round(1e4*i)/1e4).concat(a))}),d};var t=e(Pp());function n(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function r(e){return parseFloat(e)}return Vy}function Gy(){if($y)return Hy;$y=1;var e=Ho();Object.defineProperty(Hy,"__esModule",{value:!0}),Hy.default=function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.breakpoints,a=void 0===o?["sm","md","lg"]:o,s=i.disableAlign,l=void 0!==s&&s,u=i.factor,c=void 0===u?2:u,d=i.variants,p=void 0===d?["h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","caption","button","overline"]:d,f=(0,t.default)({},e);f.typography=(0,t.default)({},f.typography);var h=f.typography,m=(0,r.convertLength)(h.htmlFontSize),g=a.map(function(e){return f.breakpoints.values[e]});return p.forEach(function(e){var i=h[e],o=parseFloat(m(i.fontSize,"rem"));if(!(o<=1)){var a=o,s=1+(a-1)/c,u=i.lineHeight;if(!(0,r.isUnitless)(u)&&!l)throw new Error((0,n.formatMuiErrorMessage)(6));(0,r.isUnitless)(u)||(u=parseFloat(m(u,"rem"))/parseFloat(o));var d=null;l||(d=function(e){return(0,r.alignProperty)({size:e,grid:(0,r.fontGrid)({pixels:4,lineHeight:u,htmlFontSize:h.htmlFontSize})})}),h[e]=(0,t.default)({},i,(0,r.responsiveProperty)({cssProperty:"fontSize",min:s,max:a,unit:"rem",breakpoints:g,transform:d}))}}),f};var t=e(xa()),n=gp,r=By();return Hy}var Uy,Yy={};function Ky(){if(Uy)return Yy;Uy=1;var e=Ho();Object.defineProperty(Yy,"__esModule",{value:!0}),Yy.default=void 0;var t=e(xa()),n=Oy,r=e(Fy()),i=function(e){var i=(0,n.styled)(e);return function(e,n){return i(e,(0,t.default)({defaultTheme:r.default},n))}};return Yy.default=i,Yy}var Xy,Jy={};function Zy(){if(Xy)return Jy;Xy=1;var e=Ho();Object.defineProperty(Jy,"__esModule",{value:!0}),Jy.default=function(){return(0,t.useTheme)()||n.default};var t=Oy;e(o);var n=e(Fy());return Jy}var Qy,eb={};function tb(){if(Qy)return eb;Qy=1;var e=Ho();Object.defineProperty(eb,"__esModule",{value:!0}),eb.default=void 0;var t=e(xa()),n=Oy,r=e(Fy());var i=function(e,i){return(0,n.withStyles)(e,(0,t.default)({defaultTheme:r.default},i))};return eb.default=i,eb}var nb,rb,ib={};function ob(){if(nb)return ib;nb=1;var e=Ho();Object.defineProperty(ib,"__esModule",{value:!0}),ib.default=void 0;var t=Oy,n=e(Fy()),r=(0,t.withThemeCreator)({defaultTheme:n.default});return ib.default=r,ib}function ab(){return rb||(rb=1,function(e){var t=Ho(),n=(Ud||(Ud=1,function(e){var t=Jd().default;function n(r,i){if("function"==typeof WeakMap)var o=new WeakMap,a=new WeakMap;return(e.exports=n=function(e,n){if(!n&&e&&e.__esModule)return e;var r,i,s={__proto__:null,default:e};if(null===e||"object"!=t(e)&&"function"!=typeof e)return s;if(r=n?a:o){if(r.has(e))return r.get(e);r.set(e,s)}for(var l in e)"default"!==l&&{}.hasOwnProperty.call(e,l)&&((i=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,l))&&(i.get||i.set)?r(s,l,i):s[l]=e[l]);return s},e.exports.__esModule=!0,e.exports.default=e.exports)(r,i)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}(Kd)),Kd.exports);Object.defineProperty(e,"__esModule",{value:!0});var r={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 o.default}}),Object.defineProperty(e,"createMuiTheme",{enumerable:!0,get:function(){return o.createMuiTheme}}),Object.defineProperty(e,"unstable_createMuiStrictModeTheme",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"createStyles",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"makeStyles",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"responsiveFontSizes",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"styled",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"useTheme",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(e,"withStyles",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"withTheme",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"createGenerateClassName",{enumerable:!0,get:function(){return m.createGenerateClassName}}),Object.defineProperty(e,"jssPreset",{enumerable:!0,get:function(){return m.jssPreset}}),Object.defineProperty(e,"ServerStyleSheets",{enumerable:!0,get:function(){return m.ServerStyleSheets}}),Object.defineProperty(e,"StylesProvider",{enumerable:!0,get:function(){return m.StylesProvider}}),Object.defineProperty(e,"MuiThemeProvider",{enumerable:!0,get:function(){return m.ThemeProvider}}),Object.defineProperty(e,"ThemeProvider",{enumerable:!0,get:function(){return m.ThemeProvider}});var i=vp();Object.keys(i).forEach(function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(r,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return i[t]}}))});var o=n(pm()),a=t(mm()),s=t(Ty()),l=t(zy()),u=t(Gy()),c=t(Ky()),d=sm();Object.keys(d).forEach(function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(r,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return d[t]}}))});var p=t(Zy()),f=t(tb()),h=t(ob()),m=Oy}(Yd)),Yd}var sb=ab();sb.alpha(wd.GREYSCALE_0,.05),sb.alpha(wd.GREEN_PALE,.5),sb.alpha(wd.BLUE_PALE,.5),sb.alpha(wd.GREEN_PALE,.5),sb.alpha(wd.BLUE_PALE,.5),sb.alpha(wd.GREEN_PALE,.5),sb.alpha(wd.BLUE_PALE,.5),sb.alpha(wd.GREEN_PALE,.5),sb.alpha(wd.BLUE_PALE,.5),sb.alpha(wd.GREEN_PALE,.5),sb.alpha(wd.BLUE_PALE,.5);const lb=(e="light")=>Vd();function ub(e){return"init"in e}function cb(e){return"function"==typeof e.write}function db(e){return"v"in e||"e"in e}function pb(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 fb(e){return"function"==typeof(null==e?void 0:e.then)}function hb(e,t,n){if(!n.p.has(e)){n.p.add(e);const r=()=>n.p.delete(e);t.then(r,r)}}function mb(e,t,n){const r=n.get(e),i=null==r?void 0:r.t,o=t.p;if(!(null==i?void 0:i.size))return o;if(!o.size)return i;const a=new Set(i);for(const e of o)a.add(e);return a}const gb=()=>{const e={},t=new WeakMap,n=n=>{var r,i;null==(r=t.get(e))||r.forEach(e=>e(n)),null==(i=t.get(n))||i.forEach(e=>e())};return n.add=(n,r)=>{const i=n||e;let o=t.get(i);return o||(o=new Set,t.set(i,o)),o.add(r),()=>{o.delete(r),o.size||t.delete(i)}},n};function vb(e){return e.i||(e.i=gb()),e.r||(e.r=gb()),e.c||(e.c=gb()),e.m||(e.m=gb()),e.u||(e.u=gb()),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 yb=(e,t,n,...r)=>n.read(...r),bb=(e,t,n,...r)=>n.write(...r),xb=(e,t,n)=>n.INTERNAL_onInit(t),Sb=(e,t,n,r)=>{var i;return null==(i=n.onMount)?void 0:i.call(n,r)},wb=(e,t,n)=>{var r;const i=e[0];let o=i.get(n);if(!o){const a=e[6],s=e[9];o={d:new Map,p:new Set,n:0},i.set(n,o),null==(r=a.i)||r.call(a,n),function(e){return!!e.INTERNAL_onInit}(n)&&s(e,t,n)}return o},Cb=(e,t)=>{var n;const r=e[1],i=e[3],o=e[4],a=e[5],s=e[6],l=e[13];if(!(s.f||i.size||o.size||a.size))return;const u=[],c=e=>{try{e()}catch(e){u.push(e)}};do{s.f&&c(s.f);const u=new Set;for(const e of i){const t=null==(n=r.get(e))?void 0:n.l;if(t)for(const e of t)u.add(e)}i.clear();for(const e of a)u.add(e);a.clear();for(const e of o)u.add(e);o.clear();for(const e of u)c(e);i.size&&l(e,t)}while(i.size||a.size||o.size);if(u.length)throw new AggregateError(u)},Eb=(e,n)=>{const r=e[1],i=e[2],o=e[3],a=e[11],s=e[14],l=e[17];if(!o.size)return;const u=[],c=[],d=new WeakSet,p=new WeakSet,f=[],h=[];for(const t of o)f.push(t),h.push(a(e,n,t));for(;f.length;){const o=f.length-1,s=f[o],l=h[o];if(p.has(s))f.pop(),h.pop();else if(d.has(s)){if(i.get(s)===l.n)u.push(s),c.push(l);else if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&i.has(s))throw new Error("[Bug] invalidated atom exists");p.add(s),f.pop(),h.pop()}else{d.add(s);for(const t of mb(s,l,r))d.has(t)||(f.push(t),h.push(a(e,n,t)))}}for(let t=u.length-1;t>=0;--t){const r=u[t],a=c[t];let d=!1;for(const e of a.d.keys())if(e!==r&&o.has(e)){d=!0;break}d&&(i.set(r,a.n),s(e,n,r),l(e,n,r)),i.delete(r)}},Ib=new WeakSet,Db=(e,n,r)=>{var i,o;const a=e[1],s=e[2],l=e[3],u=e[6],c=e[7],d=e[11],p=e[12],f=e[13],h=e[14],m=e[16],g=e[17],v=e[20],y=e[26],b=e[28],x=d(e,n,r),S=b[0];if(db(x)){if(a.has(r)&&s.get(r)!==x.n||x.m===S)return x.m=S,x;let t=!1;for(const[r,i]of x.d)if(h(e,n,r).n!==i){t=!0;break}if(!t)return x.m=S,x}let w=!0;const C=new Set(x.d.keys()),E=()=>{for(const e of C)x.d.delete(e)},I=()=>{if(a.has(r)){const t=!l.size;g(e,n,r),t&&(f(e,n),p(e,n))}},D=t=>{var i;if(t===r){const r=d(e,n,t);if(!db(r)){if(!ub(t))throw new Error("no atom init");v(e,n,t,t.init)}return pb(r)}const o=h(e,n,t);try{return pb(o)}finally{C.delete(t),x.d.set(t,o.n),fb(x.v)&&hb(r,x.v,o),a.has(r)&&(null==(i=a.get(t))||i.t.add(r)),w||I()}};let P,M;const R={get signal(){return P||(P=new AbortController),P.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)||cb(r)||console.warn("setSelf function cannot be used with read-only atom"),!M&&cb(r)&&(M=(...i)=>{if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&w&&console.warn("setSelf function cannot be called in sync"),!w)try{return m(e,n,r,i)}finally{f(e,n),p(e,n)}}),M}},k=x.n,L=s.get(r)===k;try{"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&Ib.delete(n);const o=c(e,n,r,D,R);if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&Ib.has(n)&&console.warn("Detected store mutation during atom read. This is not supported."),v(e,n,r,o),fb(o)){y(e,n,o,()=>null==P?void 0:P.abort());const t=()=>{E(),I()};o.then(t,t)}else E();return null==(i=u.r)||i.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!==k&&L&&(s.set(r,x.n),l.add(r),null==(o=u.c)||o.call(u,r))}},Pb=(e,t,n)=>{const r=e[1],i=e[2],o=e[11],a=[n];for(;a.length;){const n=a.pop(),s=o(e,t,n);for(const l of mb(n,s,r)){const n=o(e,t,l);i.get(l)!==n.n&&(i.set(l,n.n),a.push(l))}}},Mb=(e,n,r,i)=>{const o=e[3],a=e[6],s=e[8],l=e[11],u=e[12],c=e[13],d=e[14],p=e[15],f=e[16],h=e[17],m=e[20],g=e[28];let v=!0;const y=t=>pb(d(e,n,t)),b=(i,...s)=>{var d;const y=l(e,n,i);try{if(i===r){if(!ub(i))throw new Error("atom not writable");"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&Ib.add(n);const r=y.n,l=s[0];return m(e,n,i,l),h(e,n,i),void(r!==y.n&&(++g[0],o.add(i),p(e,n,i),null==(d=a.c)||d.call(a,i)))}return f(e,n,i,s)}finally{v||(c(e,n),u(e,n))}};try{return s(e,n,r,y,b,...i)}finally{v=!1}},Rb=(e,t,n)=>{var r;const i=e[1],o=e[3],a=e[6],s=e[11],l=e[15],u=e[18],c=e[19],d=s(e,t,n),p=i.get(n);if(p&&d.d.size>0){for(const[i,c]of d.d)if(!p.d.has(i)){const d=s(e,t,i);u(e,t,i).t.add(n),p.d.add(i),c!==d.n&&(o.add(i),l(e,t,i),null==(r=a.c)||r.call(a,i))}for(const r of p.d)if(!d.d.has(r)){p.d.delete(r);const i=c(e,t,r);null==i||i.t.delete(n)}}},kb=(e,t,n)=>{var r;const i=e[1],o=e[4],a=e[6],s=e[10],l=e[11],u=e[12],c=e[13],d=e[14],p=e[16],f=e[18],h=l(e,t,n);let m=i.get(n);if(!m){d(e,t,n);for(const r of h.d.keys()){f(e,t,r).t.add(n)}if(m={l:new Set,d:new Set(h.d.keys()),t:new Set},i.set(n,m),cb(n)&&function(e){return!!e.onMount}(n)){const r=()=>{let r=!0;const i=(...i)=>{try{return p(e,t,n,i)}finally{r||(c(e,t),u(e,t))}};try{const o=s(e,t,n,i);o&&(m.u=()=>{r=!0;try{o()}finally{r=!1}})}finally{r=!1}};o.add(r)}null==(r=a.m)||r.call(a,n)}return m},Lb=(e,t,n)=>{var r,i;const o=e[1],a=e[5],s=e[6],l=e[11],u=e[19],c=l(e,t,n);let d=o.get(n);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(n)){p=!0;break}if(p)return d;d.u&&a.add(d.u),d=void 0,o.delete(n);for(const r of c.d.keys()){const i=u(e,t,r);null==i||i.t.delete(n)}null==(i=s.u)||i.call(s,n)},Ab=(e,t,n,r)=>{const i=e[11],o=e[27],a=i(e,t,n),s="v"in a,l=a.v;if(fb(r))for(const o of a.d.keys())hb(n,r,i(e,t,o));a.v=r,delete a.e,s&&Object.is(l,a.v)||(++a.n,fb(l)&&o(e,t,l))},Ob=(e,t,n)=>pb((0,e[14])(e,t,n)),Tb=(e,t,n,...r)=>{const i=e[3],o=e[12],a=e[13],s=e[16],l=i.size;try{return s(e,t,n,r)}finally{i.size!==l&&(a(e,t),o(e,t))}},qb=(e,t,n,r)=>{const i=e[12],o=e[18],a=e[19],s=o(e,t,n).l;return s.add(r),i(e,t),()=>{s.delete(r),a(e,t,n),i(e,t)}},_b=(e,t,n,r)=>{const i=e[25];let o=i.get(n);if(!o){o=new Set,i.set(n,o);const e=()=>i.delete(n);n.then(e,e)}o.add(r)},Nb=(e,t,n)=>{const r=e[25].get(n);null==r||r.forEach(e=>e())},jb=new WeakMap;function Fb(e){const n=jb.get(e);if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&!n)throw new Error("Store must be created by buildStore to read its building blocks");const r=n[24];return r?r(n,e):n}function zb(...e){const t={get:e=>r(n,t,e),set:(e,...r)=>i(n,t,e,...r),sub:(e,r)=>o(n,t,e,r)},n=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},yb,bb,xb,Sb,wb,Cb,Eb,Db,Pb,Mb,Rb,kb,Lb,Ab,Ob,Tb,qb,void 0,new WeakMap,_b,Nb,[0]].map((t,n)=>e[n]||t);jb.set(t,Object.freeze(n));const r=n[21],i=n[22],o=n[23];return t}let Wb,$b=0;function Hb(e,n){const r="atom"+ ++$b,i={toString(){return"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&this.debugLabel?r+":"+this.debugLabel:r}};return"function"==typeof e?i.read=e:(i.init=e,i.read=Vb,i.write=Bb),n&&(i.write=n),i}function Vb(e){return e(this)}function Bb(e,t,n){return t(this,"function"==typeof n?n(e(this)):n)}function Gb(){return zb()}const Ub=d(void 0);function Yb(e){const n=i(Ub);return(null==e?void 0:e.store)||n||(Wb||(Wb=Gb(),"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=Wb),globalThis.__JOTAI_DEFAULT_STORE__!==Wb&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),Wb)}function Kb({children:e,store:t}){const n=u(null);return t?c(Ub.Provider,{value:t},e):(null===n.current&&(n.current=Gb()),c(Ub.Provider,{value:n.current},e))}const Xb=e=>"function"==typeof(null==e?void 0:e.then),Jb=e=>{e.status||(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}))},Zb=o.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(Jb(e),e)}),Qb=new WeakMap,ex=(e,t,n)=>{const r=Fb(e),i=r[26];let o=Qb.get(t);return o||(o=new Promise((a,s)=>{let l=t;const u=e=>t=>{l===e&&a(t)},c=e=>t=>{l===e&&s(t)},d=()=>{try{const t=n();Xb(t)?(Qb.set(t,o),l=t,t.then(u(t),c(t)),i(r,e,t,d)):a(t)}catch(e){s(e)}};t.then(u(t),c(t)),i(r,e,t,d)}),Qb.set(t,o)),o};function tx(e,t){const{delay:n,unstable_promiseStatus:r=!o.use}={},i=Yb(t),[[a,s,l],u]=p(t=>{const n=i.get(e);return Object.is(t[0],n)&&t[1]===i&&t[2]===e?t:[n,i,e]},void 0,()=>[i.get(e),i,e]);let c=a;if(s===i&&l===e||(u(),c=i.get(e)),f(()=>{const t=i.sub(e,()=>{if(r)try{const t=i.get(e);Xb(t)&&Jb(ex(i,t,()=>i.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},[i,e,n,r]),h(c),Xb(c)){const t=ex(i,c,()=>i.get(e));return r&&Jb(t),Zb(t)}return c}function nx(e,n){const r=Yb(n);return m((...n)=>{if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&!("write"in e))throw new Error("not writable atom");return r.set(e,...n)},[r,e])}function rx(e,t){return[tx(e,t),nx(e,t)]}t.meta.env&&t.meta.env.MODE;!function(e=()=>{try{return window.localStorage}catch(e){return void("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&"undefined"!=typeof window&&console.warn(e))}},n){var r;let i,o;const a={getItem:(t,r)=>{var a,s;const l=e=>{if(i!==(e=e||"")){try{o=JSON.parse(e,null==n?void 0:n.reviver)}catch(e){return r}i=e}return o},u=null!=(s=null==(a=e())?void 0:a.getItem(t))?s:null;return(e=>"function"==typeof(null==e?void 0:e.then))(u)?u.then(l):l(u)},setItem:(t,n)=>{var r;return null==(r=e())?void 0:r.setItem(t,JSON.stringify(n,void 0))},removeItem:t=>{var n;return null==(n=e())?void 0:n.removeItem(t)}};let s;try{s=null==(r=e())?void 0:r.subscribe}catch(e){}var l;!s&&"undefined"!=typeof window&&"function"==typeof window.addEventListener&&window.Storage&&(s=(t,n)=>{if(!(e()instanceof window.Storage))return()=>{};const r=r=>{r.storageArea===e()&&r.key===t&&n(r.newValue)};return window.addEventListener("storage",r),()=>{window.removeEventListener("storage",r)}}),s&&(a.subscribe=(l=s,(e,t,n)=>l(e,e=>{let r;try{r=JSON.parse(e||"")}catch(e){r=n}t(r)})))}();const ix=(e,t,n)=>(t.has(n)?t:t.set(n,e())).get(n),ox=new WeakMap,ax=()=>{};const sx=new WeakMap;function lx(e,t){const n=Yb(t),r=ux(n);for(const[i,...o]of e)r.has(i)&&!(null==t?void 0:t.dangerouslyForceHydrate)||(r.add(i),n.set(i,...o))}const ux=e=>{let t=sx.get(e);return t||(t=new WeakSet,sx.set(e,t)),t};function cx(){return Boolean("undefined"!=typeof process&&process.env?.NODE_ENV&&!1)}function dx(e){const t=Hb(()=>[]),n=Hb(function(e){const[r,i,o]=e(t);o.has(n)&&(r.forEach(e),++i.n)});return n.effect=e,n.INTERNAL_onInit=e=>{const r=Fb(e),i=r[1],o=r[3],a=vb(r[6]),s=r[11],l=r[12],u=r[13],c=r[14],d=r[15],p=r[16],f=r[17],h=r[20],m=new Set;let g,v=0,y=!1,b=!1,x=!1;function S(){if(v)return;m.clear();let t=!0;const w=o=>{if(x)return e.get(o);if(o===n){const t=s(r,e,o);if(!db(t)){if(!ub(o))throw new Error("no atom init");h(r,e,o,o.init)}return pb(t)}const a=c(r,e,o);try{return pb(a)}finally{C.d.set(o,a.n),i.get(o)?.t.add(n),t?m.add(o):i.has(o)&&(f(r,e,n),u(r,e),l(r,e))}};w.peek=e.get;const E=(i,...c)=>{const m=s(r,e,i);try{if(++v,i===n){if(!ub(i))throw new Error("atom not writable");const t=m.n,n=c[0];return h(r,e,i,n),f(r,e,i),void(t!==m.n&&(o.add(i),a.c?.(i),d(r,e,i)))}return p(r,e,i,c)}finally{t||(u(r,e),l(r,e)),--v}};E.recurse=(t,...i)=>{if(x){if(cx())throw new Error("set.recurse is not allowed in cleanup")}else try{return y=!0,f(r,e,n),E(t,...i)}finally{u(r,e),y=!1,b&&(b=!1,S())}};try{g?.();const e=n.effect(w,E);if("function"!=typeof e)return;g=()=>{if(!v)try{return t=!0,x=!0,e()}finally{t=!1,x=!1,g=void 0}}}finally{t=!1,m.forEach(t=>{C.d.set(t,s(r,e,t).n)}),f(r,e,n),u(r,e)}}const w=function(e,t){let n=px.get(e);n||(n=new Set,px.set(e,n),t.f.add(function(){for(const e of n)n.delete(e),e()}));return n}(e,a),C=s(r,e,n);C.v=void 0,Object.assign(e.get(t),[m,C,i]),a.c.add(n,function(){o.delete(n)}),a.m.add(n,function(){w.add(S),g&&w.delete(g)}),a.u.add(n,function(){w.delete(S),g&&w.add(g)}),a.c.add(n,function(){y?b=!0:w.add(S)})},cx()&&(Object.defineProperty(t,"debugLabel",{get:()=>n.debugLabel?`${n.debugLabel}:ref`:void 0,configurable:!0,enumerable:!0}),t.debugPrivate=!0),n}const px=new WeakMap;const fx=async(e,t,n)=>{const r=e.get(n);void 0!==r&&("dimension"===r.type?await t.moveDimensionToAlternative(r.def.qDef.cId):await t.moveMeasureToAlternative(r.def.qDef.cId))},hx=async(e,t,n)=>{const r=e.get(n);void 0!==r&&("dimension"===r.type?await t.moveDimensionFromAlternative(r.def.qDef.cId):await t.moveMeasureFromAlternative(r.def.qDef.cId))},mx=e=>{const{type:t,handler:n,model:r,fieldInfo:i,handlerQueue:o}=e;void 0!==n&&void 0!==r&&o&&o.add(async()=>{switch(t){case"apply":for(const t of e.localChecked)await hx(i,n,t);for(const t of e.localUnchecked)await fx(i,n,t);break;case"checked":await hx(i,n,e.cId);break;case"unchecked":await fx(i,n,e.cId)}})},gx=Hb(),vx=Hb(),yx=Hb(),bx=Hb(e=>e(yx)?.translate??(e=>e)),xx=Hb(""),Sx=Hb(e=>{const t=e(xx).toLowerCase().trim();return({title:e})=>e.toLowerCase().trim().includes(t)}),wx=Hb(e=>e(yx)?.getBooleanFlag??(()=>!1)),Cx=e=>7005!==e.qError?.qErrorCode,Ex=new WeakMap,Ix={qInfo:{qType:"AlternativeLayout"},qHyperCubeDef:{qMode:"S",qDimensions:[],qMeasures:[],qInitialDataFetch:[{qTop:0,qLeft:0,qHeight:0,qWidth:0}],excludedNoOfLeftDims:-1,qCalcCond:{qv:"0"}}},Dx=function(e,n=ax){return((e,t,n)=>{const r=ix(()=>new WeakMap,ox,t);return ix(e,r,n)})(()=>{const r=new WeakMap,i=new WeakMap,o=Hb(0),a=Hb([]);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=Hb(t=>{let l;t(o);try{l=t(s)}catch(e){}const u=t(e);if(!(e=>"function"==typeof(null==e?void 0:e.then))(u))return{v:u};if(u!==(null==l?void 0:l.p)&&u.then(e=>{i.set(u,e);const[n]=t(a);n()},e=>{r.set(u,e);const[n]=t(a);n()}),r.has(u))throw r.get(u);return i.has(u)?{p:u,v:i.get(u)}:l&&"v"in l?{p:u,f:n(l.v),v:l.v}:{p:u,f:n()}});return s.init=void 0,"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&(s.debugPrivate=!0),Hb(e=>{const t=e(s);return"f"in t?t.f:t.v},(t,n,...r)=>n(e,...r))},e,n)}(Hb(async e=>{const t=e(gx);if(t){if(Ex.has(t))return Ex.get(t);try{const e=await t.app.createSessionObject(Ix);return Ex.set(t,e),e}catch(e){return void console.error("Error creating alternative layout model:",e)}}})),Px=Hb(null),Mx=Hb(),Rx=dx((e,t)=>{const n=e(gx),r=e(Dx);if(!n||!r)return;const i=async()=>{const e=await n.getLayout();if(e.qSelectionInfo?.qInSelections)return;const i=await n.getEffectiveProperties();await r.applyPatches([{qOp:"replace",qPath:"/qHyperCubeDef/qDimensions",qValue:JSON.stringify(i.qHyperCubeDef.qLayoutExclude?.qHyperCubeDef.qDimensions??[])},{qOp:"replace",qPath:"/qHyperCubeDef/qMeasures",qValue:JSON.stringify(i.qHyperCubeDef.qLayoutExclude?.qHyperCubeDef.qMeasures??[])}]);const o=await r.getLayout();t(Mx,{layout:structuredClone(e),properties:structuredClone(i),altLayout:structuredClone(o)}),t(Px,null)};return i(),n.Invalidated?.bind(i),()=>{n.Invalidated?.unbind(i)}}),kx=Hb(e=>e(Mx)?.layout),Lx=Hb(e=>e(Mx)?.altLayout),Ax=Hb(e=>e(Mx)?.properties),Ox=Hb(e=>{const t=e(Mx)?.layout;return t?.qHyperCube.qDimensionInfo.filter(Cx)??[]}),Tx=Hb(e=>{const t=e(Mx)?.layout;return t?.qHyperCube.qMeasureInfo.filter(Cx)??[]}),qx=Hb(e=>{const t=e(kx),n=e(Ox),r=e(Tx),i=e(Ax),o=new Map;return t&&i?(n.forEach((e,t)=>{o.set(e.cId,{id:e.cId,type:"dimension",def:i.qHyperCubeDef.qDimensions[t]})}),r.forEach((e,t)=>{o.set(e.cId,{id:e.cId,type:"measure",def:i.qHyperCubeDef.qMeasures[t]})}),i.qHyperCubeDef.qLayoutExclude?.qHyperCubeDef.qDimensions?.forEach(e=>{o.set(e.qDef.cId,{id:e.qDef.cId,type:"dimension",def:e})}),i.qHyperCubeDef.qLayoutExclude?.qHyperCubeDef.qMeasures?.forEach(e=>{o.set(e.qDef.cId,{id:e.qDef.cId,type:"measure",def:e})}),o):o});class _x{#e=[];#t=!1;#n=!1;#r;#i;#o;#a;constructor({onQueueCompleted:e}){this.#r=e}#s(){this.#i=void 0,this.#o=void 0,this.#a=void 0}pause(){this.#i&&(clearTimeout(this.#a),this.#o?.(),this.#s());const{promise:e,resolve:t}=Promise.withResolvers();this.#i=e,this.#o=t,this.#a=setTimeout(()=>{this.abort("Aborting queue after being paused for too long")},6e4)}async continue(e=0){const t=this.#o;await(e=>new Promise(t=>{setTimeout(t,e)}))(e),t===this.#o&&(t?.(),clearTimeout(this.#a),this.#s())}abort(e="Queue aborted"){clearTimeout(this.#a),(this.#e.length>0||this.#t)&&console.warn(`[SequentialPromiseQueue] ${e}`),this.#n=!0,this.#e=[],this.#o?.(),this.#s()}add(e){this.#e.push(e),this.#t||this.#l()}async#l(){if(!this.#t){for(this.#t=!0,this.#n=!1;this.#e.length>0;)if(this.#i)await this.#i;else try{const e=this.#e.shift();await(e?.())}catch(e){return console.error("[SequentialPromiseQueue] Error executing action:",e),this.#e=[],void(this.#t=!1)}try{this.#n||await(this.#r?.())}catch(e){console.error("[SequentialPromiseQueue] Error executing onQueueCompleted:",e)}finally{this.#t=!1,this.#e.length>0&&this.#l()}}}}const Nx=Hb(null),jx=dx((e,t)=>{const n=e(gx),r=e(vx),i=new _x({onQueueCompleted:async()=>{n&&r&&await n.applyPatches([{qPath:"/qHyperCubeDef",qOp:"replace",qValue:JSON.stringify(r.properties.qHyperCubeDef)}],!0)}});t(Nx,i);const o=()=>{i.pause()},a=()=>{i.continue(500)},s=()=>{i.abort()};return n?.Invalidated?.bind(o),n?.Validated?.bind(a),n?.Cancelled?.bind(s),n?.Closing?.bind(s),()=>{i.abort(),n?.Invalidated?.unbind(o),n?.Validated?.unbind(a),n?.Cancelled?.unbind(s),n?.Closing?.unbind(s)}}),Fx=Hb(e=>{const t=[...e(Ox),...e(Tx)].map(e=>e.cId);return new Set(t)}),zx=Hb(new Set),Wx=Hb(new Set),$x=Hb(e=>{const t=e(zx),n=e(Wx);return e(Fx).difference(n).union(t)}),Hx=dx((e,t)=>{e(Fx),t(zx,new Set),t(Wx,new Set)}),Vx=Hb(e=>e($x),(e,t,n)=>{const r=e($x).has(n),i=new Set(e(Wx)),o=new Set(e(zx));r?(i.add(n),o.delete(n)):(o.add(n),i.delete(n)),t(Wx,i),t(zx,o),mx({type:r?"unchecked":"checked",cId:n,handler:e(vx),model:e(gx),fieldInfo:e(qx),handlerQueue:e(Nx)})}),Bx=({props:e,children:t})=>(lx([[gx,e.args.model],[yx,e.args.apis],[vx,e.args.handler]]),tx(Hx),tx(Rx),tx(jx),t);function Gx(e,t){const n=new Set(e),r=new Set(t);return e===t||n.size===r.size&&Array.from(n).every(r.has.bind(r))}function Ux(e){return"write"in e}const Yx=new WeakMap,Kx={},{read:Xx,write:Jx}=Hb(null);function Zx(e,t,n){const[r,i,o,,a]=e,s=r.get(t);if(s)return s;if(n===e){let r=i.get(t);return r||(r=[nS(e,t,n),n],i.set(t,r)),r}const l=n??Kx;let u=o.get(l);u||(u=new WeakMap,o.set(l,u));let c=u.get(t);if(!c){const[r,i]=a?Zx(a,t,n):[t];c=[t.read===Xx?r:nS(e,t,i),i],u.set(t,c)}return c}function Qx(e){for(const t of e[5])t()}function eS(e,t,n,r,i){if(n.read===Xx&&Ux(n)&&Ux(t)&&n.write!==Jx&&e!==r){const{write:o}=n;return t.write=tS(e,n.write.bind(n),r,i),()=>{t.write=o}}}function tS(e,t,n,r=n){return function(i,o,...a){return t(function(t){const[r]=Zx(e,t,n);return i(r)},function(t,...i){const[a]=Zx(e,t,n),s=eS(e,a,t,n,r);try{return o(a,...i)}finally{null==s||s()}},...a)}}function nS(e,t,n){const r=Object.getOwnPropertyDescriptors(t);Object.keys(r).filter(e=>["read","write","debugLabel"].includes(e)).forEach(e=>r[e].configurable=!0);const i=Object.getPrototypeOf(t),o=Object.create(i,r);return o.read!==Xx&&(o.read=function(e,t,n){return function(r,i){return t(function(t){const[i]=Zx(e,t,n);return r(i)},i)}}(e,t.read.bind(t),n)),Ux(o)&&Ux(t)&&o.write!==Jx&&(o.write=tS(e,t.write.bind(t),n)),o}function rS({atoms:e=[],atomFamilies:t=[],parentStore:n,name:r}){const i=new WeakSet(e),o=Yx.get(n),a=(null==o?void 0:o[3])??n,s=[new WeakMap,new WeakMap,new WeakMap,a,o,new Set,void 0],l=s[0],u=s[5],c=function(e){const t=e[3],n=[...Fb(t)],r=n[21],i=n[22],o=n[23],a={};let s,l;return n[21]=h(r),n[22]=p,n[23]=h(o),n[24]=function(e){return s??(s=m(e[0],u)),l??(l=[s,m(e[1],c),m(e[2]),g(e[3]),e[4],e[5],y(e[6]),h(e[7]),h(e[8]),h(e[9]),h(e[10]),d(s,e[11]),(t,...r)=>e[12](n,...r),(t,...r)=>e[13](n,...r),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,e[25],(t,...r)=>e[26](n,...r),(t,...r)=>e[27](n,...r),e[28],...e.slice(25)]),l},zb(...n);function u(t){const n=new WeakMap;return function(r){let i=n.get(r);if(i)return i;const o=t(r);if(!o)return;let a,s;return i=new Proxy(o,{get:(t,n)=>"d"===n?a??(a=m(o.d,function(t){return n=>t(Zx(e,n)[0])})):"p"===n?s??(s=g(o.p)):Reflect.get(o,n)}),n.set(r,i),i}}function c(e){const t=new WeakMap;return function(n){let r=t.get(n);if(r)return r;const i=e(n);return i?(r={...i,d:g(i.d),t:g(i.t),get u(){return i.u},set u(e){i.u=e}},t.set(n,r),r):void 0}}function d(e,t){const n=h(t);return function(t,r,i){const o=e.get(i);if(o)return o;const a=n(t,r,i);return e.set(i,a),e.get(i)}}function p(t,n,r,...o){const[a,s]=Zx(e,r),l=eS(e,a,r,s,e);try{return i(t,n,a,...o)}finally{null==l||l()}}function f(t,n){return function(r,...i){const[o]=Zx(e,r);return(n?n(t):t)(o,...i)}}function h(t){return function(r,i,o,...a){const[s]=Zx(e,o);return t(n,i,s,...a)}}function m(e,t){const n={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))};if("function"==typeof e.keys){const t=e,r=n;r.keys=t.keys.bind(t),r[Symbol.iterator]=t[Symbol.iterator].bind(t),Object.defineProperty(n,"size",{enumerable:!1,configurable:!0,get:()=>t.size})}return n}function g(t){return{get size(){return t.size},add:f(t.add.bind(t)),has:f(t.has.bind(t)),delete:f(t.delete.bind(t)),clear:t.clear.bind(t),forEach:e=>t.forEach(f(e)),*[Symbol.iterator](){for(const n of t)yield Zx(e,n)[0]}}}function v(t){if(!t)return;const n=f(t);return n.add=function(n,r){if(void 0===n)return t.add(void 0,r);const[i]=Zx(e,n);return t.add(i,r)},n}function y(e){const t={get f(){return e.f},set f(t){e.f=t}};return Object.defineProperties(t,Object.fromEntries(["r","c","m","u"].map(t=>[t,{get:()=>a[t]??(a[t]=v(e[t])),set(n){delete a[t],e[t]=n},configurable:!0,enumerable:!0}]))),Object.assign(t,e)}}(s);s[6]=c,Object.assign(c,{name:r}),Yx.set(c,s);for(const t of new Set(e))l.set(t,[nS(s,t,s),s]);for(const e of new Set(t)){for(const t of e.getParams()){const n=e(t);l.has(n)||l.set(n,[nS(s,n,s),s])}const t=e.unstable_listen(({type:e,atom:t})=>{"CREATE"!==e||l.has(t)?"REMOVE"===e&&!i.has(t)&&l.delete(t):l.set(t,[nS(s,t,s),s])});u.add(t)}return c}const iS=function(e,t){return function(n){const{atoms:r=[],atomFamilies:i=[],children:o,scope:a,name:s}=n,l=t(),u=Array.from(r,e=>Array.isArray(e)?e[0]:e);function d(){return[a??rS({atoms:u,atomFamilies:i,parentStore:l,name:s}),function(e){return l!==e.parentStore||!Gx(u,e.atoms)||!Gx(i,e.atomFamilies)||a!==e.providedScope}]}const[[p,h],m]=g(d);if(h({atoms:u,atomFamilies:i,parentStore:l,providedScope:a})){const e=Yx.get(p);e&&Qx(e),m(d)}return lx(Array.from(r).filter(Array.isArray),{store:p}),f(()=>{const e=Yx.get(p);return()=>{e&&Qx(e)}},[p]),c(e,{store:p,children:o})}}(Kb,Yb);var oS=Object.defineProperty,aS=Object.defineProperties,sS=Object.getOwnPropertyDescriptors,lS=Object.getOwnPropertySymbols,uS=Object.prototype.hasOwnProperty,cS=Object.prototype.propertyIsEnumerable,dS=(e,t,n)=>t in e?oS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pS=(e,t)=>{for(var n in t||(t={}))uS.call(t,n)&&dS(e,n,t[n]);if(lS)for(var n of lS(t))cS.call(t,n)&&dS(e,n,t[n]);return e},fS=(e,t)=>aS(e,sS(t));function hS(e,t,n){if(t===n)return e;const r=e.slice();return r.splice(n,0,r.splice(t,1)[0]),r}function mS(e){return"initialIndex"in e&&"number"==typeof e.initialIndex&&"index"in e&&"number"==typeof e.index}function gS(e,t){return function(e,t,n){var r,i,o;const{source:a,target:s,canceled:l}=t.operation;if(!a||!s||l)return"preventDefault"in t&&t.preventDefault(),e;const u=(e,t)=>e===t||"object"==typeof e&&"id"in e&&e.id===t;if(Array.isArray(e)){const r=e.findIndex(e=>u(e,a.id)),i=e.findIndex(e=>u(e,s.id));if(-1===r||-1===i){if(mS(a)){const r=a.initialIndex,i=a.index;return r===i||r<0||r>=e.length?("preventDefault"in t&&t.preventDefault(),e):n(e,r,i)}return e}if(!l&&"index"in a&&"number"==typeof a.index){const t=a.index;if(t!==r)return n(e,r,t)}return n(e,r,i)}const c=Object.entries(e);let d,p,f=-1,h=-1;for(const[e,t]of c)if(-1===f&&(f=t.findIndex(e=>u(e,a.id)),-1!==f&&(d=e)),-1===h&&(h=t.findIndex(e=>u(e,s.id)),-1!==h&&(p=e)),-1!==f&&-1!==h)break;if(-1===f&&mS(a)){const r=a.initialGroup,i=a.initialIndex,o=a.group,s=a.index;if(null==r||null==o||!(r in e)||!(o in e))return"preventDefault"in t&&t.preventDefault(),e;if(r===o&&i===s)return"preventDefault"in t&&t.preventDefault(),e;if(r===o)return fS(pS({},e),{[r]:n(e[r],i,s)});const l=e[r][i];return fS(pS({},e),{[r]:[...e[r].slice(0,i),...e[r].slice(i+1)],[o]:[...e[o].slice(0,s),l,...e[o].slice(s)]})}if(!a.manager)return e;const{dragOperation:m}=a.manager,g=null!=(i=null==(r=m.shape)?void 0:r.current.center)?i:m.position.current;if(null==p&&s.id in e){const t=s.shape&&g.y>s.shape.center.y?e[s.id].length:0;p=s.id,h=t}if(null==d||null==p||d===p&&f===h){if(null!=d&&d===p&&f===h&&mS(a)){const t=null!=a.group&&a.group!==d,r=a.index!==f;if(t||r){const t=null!=(o=a.group)?o:d;if(t in e){if(d===t)return fS(pS({},e),{[d]:n(e[d],f,a.index)});const r=e[d][f];return fS(pS({},e),{[d]:[...e[d].slice(0,f),...e[d].slice(f+1)],[t]:[...e[t].slice(0,a.index),r,...e[t].slice(a.index)]})}}}return"preventDefault"in t&&t.preventDefault(),e}if(d===p)return fS(pS({},e),{[d]:n(e[d],f,h)});const v=s.shape&&Math.round(g.y)>Math.round(s.shape.center.y)?1:0,y=e[d][f];return fS(pS({},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,hS)}function vS(e,t){let n=null;const r=new Map,i=new Set;function o(i){let s;if(void 0===t)s=r.get(i);else for(const[e,n]of r)if(t(e,i)){s=n;break}if(void 0!==s){if(!n?.(s[1],i))return s[0];o.remove(i)}const l=e(i);return r.set(i,[l,Date.now()]),a("CREATE",i,l),l}function a(e,t,n){for(const r of i)r({type:e,param:t,atom:n})}return o.unstable_listen=e=>(i.add(e),()=>{i.delete(e)}),o.getParams=()=>r.keys(),o.remove=e=>{if(void 0===t){if(!r.has(e))return;const[t]=r.get(e);r.delete(e),a("REMOVE",e,t)}else for(const[n,[i]]of r)if(t(n,e)){r.delete(n),a("REMOVE",n,i);break}},o.setShouldRemove=e=>{if(n=e,n)for(const[e,[t,i]]of r)n(i,e)&&(r.delete(e),a("REMOVE",e,t))},o}const yS=({itemIndex:e,sectionIndex:t})=>void 0!==e?`${t}-${e}`:`${t}`,bS=Hb(),xS=Hb(e=>e(bS)?.numberOfSections??0),SS=Hb(e=>e(bS)?.numberOfItemsInSection??[]),wS=Hb(e=>e(bS)?.keyExtractor??yS),CS=Hb(e=>e(bS)?.emptyTexts??(()=>({title:"No items",message:"There are no items to display."}))),ES=Hb(e=>e(bS)?.onDragEnd),IS=Hb(e=>e(bS)?.onDragOver),DS=Hb(e=>e(bS)?.itemRenderer),PS=Hb(e=>e(bS)?.headerRenderer),MS=Hb(e=>e(bS)?.dragOverlayRenderer),RS=Hb(e=>e(bS)?.onClick),kS=Hb(e=>{const t=e(xS),n=e(SS),r=e(wS),i={};for(let e=0;e<t;e++)i[e]=Array.from({length:n[e]},(t,n)=>r({sectionIndex:e,itemIndex:n}));return i}),LS=Hb(null),AS=Hb(e=>e(LS),(e,t,n)=>{if(null===n)return void t(LS,null);const r=e(LS);t(LS,{...r,...n})}),OS=vS(e=>Hb(null,(t,n,r)=>{let i;"over"===e?i=t(IS):"end"===e&&(i=t(ES),n(AS,null));const{source:o,target:a}=r.operation;if("start"===e)return void n(AS,{id:o.id,startSection:o.data.sectionKey,startIndex:o.data.itemIndex,startSectionIndex:o.data.sectionIndex});if(null===a)return void n(AS,{toIndex:void 0,toSectionIndex:void 0});const s=o.data.sectionIndex!==a.data.sectionIndex;let l;if(s){const e=gS(t(kS),r)[a.data.sectionIndex].indexOf(o.id);l=-1!==e?e:a.sortable?.index??0}else l=a.sortable?.index??0;if("over"===e){const e=t(AS)?.startIndex;n(AS,{toIndex:!s&&void 0!==e&&l>e?l+1:l,toSectionIndex:a.data.sectionIndex})}i?.({id:o.id,toIndex:l,toSection:a.data.sectionKey,fromSection:o.data.sectionKey,startSection:t(AS)?.startSection??o.data.sectionKey,event:r})})),TS=[bS,xS,SS,wS,CS,ES,DS,PS,RS,AS],qS=[OS],_S=({props:e,children:t})=>{const n=nx(bS);return v(()=>{n(e)},[e,n]),t};var NS=Symbol.for("preact-signals");function jS(){if(HS>1)HS--;else{var e,t=!1;for(!function(){var e=US;for(US=void 0;void 0!==e;)e.S.v===e.v&&(e.S.i=e.i),e=e.o}();void 0!==$S;){var n=$S;for($S=void 0,VS++;void 0!==n;){var r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&ZS(n))try{n.c()}catch(n){t||(e=n,t=!0)}n=r}}if(VS=0,HS--,t)throw e}}function FS(e){if(HS>0)return e();GS=++BS,HS++;try{return e()}finally{jS()}}var zS=void 0;function WS(e){var t=zS;zS=void 0;try{return e()}finally{zS=t}}var $S=void 0,HS=0,VS=0,BS=0,GS=0,US=void 0,YS=0;function KS(e){if(void 0!==zS){var t=e.n;if(void 0===t||t.t!==zS)return t={i:0,S:e,p:zS.s,n:void 0,t:zS,e:void 0,x:void 0,r:t},void 0!==zS.s&&(zS.s.n=t),zS.s=t,e.n=t,32&zS.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=zS.s,t.n=void 0,zS.s.n=t,zS.s=t),t}}function XS(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 JS(e,t){return new XS(e,t)}function ZS(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 QS(e){for(var t=e.s;void 0!==t;t=t.n){var n=t.S.n;if(void 0!==n&&(t.r=n),t.S.n=t,t.i=-1,void 0===t.n){e.s=t;break}}}function ew(e){for(var t=e.s,n=void 0;void 0!==t;){var r=t.p;-1===t.i?(t.S.U(t),void 0!==r&&(r.n=t.n),void 0!==t.n&&(t.n.p=r)):n=t,t.S.n=t.r,void 0!==t.r&&(t.r=void 0),t=r}e.s=n}function tw(e,t){XS.call(this,void 0),this.x=e,this.s=void 0,this.g=YS-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 nw(e,t){return new tw(e,t)}function rw(e){var t=e.m;if(e.m=void 0,"function"==typeof t){HS++;var n=zS;zS=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,iw(e),t}finally{zS=n,jS()}}}function iw(e){for(var t=e.s;void 0!==t;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,rw(e)}function ow(e){if(zS!==this)throw new Error("Out-of-order effect");ew(this),zS=e,this.f&=-2,8&this.f&&iw(this),jS()}function aw(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 sw(e,t){var n=new aw(e,t);try{n.c()}catch(e){throw n.d(),e}var r=n.d.bind(n);return r[Symbol.dispose]=r,r}XS.prototype.brand=NS,XS.prototype.h=function(){return!0},XS.prototype.S=function(e){var t=this,n=this.t;n!==e&&void 0===e.e&&(e.x=n,this.t=e,void 0!==n?n.e=e:WS(function(){var e;null==(e=t.W)||e.call(t)}))},XS.prototype.U=function(e){var t=this;if(void 0!==this.t){var n=e.e,r=e.x;void 0!==n&&(n.x=r,e.e=void 0),void 0!==r&&(r.e=n,e.x=void 0),e===this.t&&(this.t=r,void 0===r&&WS(function(){var e;null==(e=t.Z)||e.call(t)}))}},XS.prototype.subscribe=function(e){var t=this;return sw(function(){var n=t.value,r=zS;zS=void 0;try{e(n)}finally{zS=r}},{name:"sub"})},XS.prototype.valueOf=function(){return this.value},XS.prototype.toString=function(){return this.value+""},XS.prototype.toJSON=function(){return this.value},XS.prototype.peek=function(){var e=zS;zS=void 0;try{return this.value}finally{zS=e}},Object.defineProperty(XS.prototype,"value",{get:function(){var e=KS(this);return void 0!==e&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(VS>100)throw new Error("Cycle detected");!function(e){0!==HS&&0===VS&&e.l!==GS&&(e.l=GS,US={S:e,v:e.v,i:e.i,o:US})}(this),this.v=e,this.i++,YS++,HS++;try{for(var t=this.t;void 0!==t;t=t.x)t.t.N()}finally{jS()}}}}),tw.prototype=new XS,tw.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===YS)return!0;if(this.g=YS,this.f|=1,this.i>0&&!ZS(this))return this.f&=-2,!0;var e=zS;try{QS(this),zS=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 zS=e,ew(this),this.f&=-2,!0},tw.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)}XS.prototype.S.call(this,e)},tw.prototype.U=function(e){if(void 0!==this.t&&(XS.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)}},tw.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(tw.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=KS(this);if(this.h(),void 0!==e&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),aw.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()}},aw.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,rw(this),QS(this),HS++;var e=zS;return zS=this,ow.bind(this,e)},aw.prototype.N=function(){2&this.f||(this.f|=2,this.u=$S,$S=this)},aw.prototype.d=function(){this.f|=8,1&this.f||iw(this)},aw.prototype.dispose=function(){this.d()};var lw,uw,cw,dw,pw,fw,hw,mw,gw,vw,yw,bw,xw,Sw,ww,Cw,Ew,Iw,Dw,Pw,Mw=Object.create,Rw=Object.defineProperty,kw=Object.defineProperties,Lw=Object.getOwnPropertyDescriptor,Aw=Object.getOwnPropertyDescriptors,Ow=Object.getOwnPropertySymbols,Tw=Object.prototype.hasOwnProperty,qw=Object.prototype.propertyIsEnumerable,_w=e=>{throw TypeError(e)},Nw=(e,t,n)=>t in e?Rw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jw=(e,t)=>Rw(e,"name",{value:t,configurable:!0}),Fw=["class","method","getter","setter","accessor","field","value","get","set"],zw=e=>void 0!==e&&"function"!=typeof e?_w("Function expected"):e,Ww=(e,t,n,r,i)=>({kind:Fw[e],name:t,metadata:r,addInitializer:e=>n._?_w("Already initialized"):i.push(zw(e||null))}),$w=(e,t)=>{return Nw(t,(n="metadata",(r=Symbol[n])?r:Symbol.for("Symbol."+n)),e[3]);var n,r},Hw=(e,t,n,r)=>{for(var i=0,o=e[t>>1],a=o&&o.length;i<a;i++)1&t?o[i].call(n):r=o[i].call(n,r);return r},Vw=(e,t,n,r,i,o)=>{var a,s,l,u,c,d=7&t,p=!!(8&t),f=!!(16&t),h=d>3?e.length+1:d?p?1:2:0,m=Fw[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)&&Lw(d<4?i:{get[n](){return Uw(this,o)},set[n](e){return Kw(this,o,e)}},n));d?f&&d<4&&jw(o,(d>2?"set ":d>1?"get ":"")+n):jw(i,n);for(var b=r.length-1;b>=0;b--)u=Ww(d,n,l={},e[3],v),d&&(u.static=p,u.private=f,c=u.access={has:f?e=>Gw(i,e):e=>n in e},3^d&&(c.get=f?e=>(1^d?Uw:Xw)(e,i,4^d?o:y.get):e=>e[n]),d>2&&(c.set=f?(e,t)=>Kw(e,i,t,4^d?o:y.set):(e,t)=>e[n]=t)),s=(0,r[b])(d?d<4?f?o:y[m]:d>4?void 0:{get:y.get,set:y.set}:i,u),l._=1,4^d||void 0===s?zw(s)&&(d>4?g.unshift(s):d?f?o=s:y[m]=s:i=s):"object"!=typeof s||null===s?_w("Object expected"):(zw(a=s.get)&&(y.get=a),zw(a=s.set)&&(y.set=a),zw(a=s.init)&&g.unshift(a));return d||$w(e,i),y&&Rw(i,n,y),f?4^d?o:y:i},Bw=(e,t,n)=>t.has(e)||_w("Cannot "+n),Gw=(e,t)=>Object(t)!==t?_w('Cannot use the "in" operator on this value'):e.has(t),Uw=(e,t,n)=>(Bw(e,t,"read from private field"),n?n.call(e):t.get(e)),Yw=(e,t,n)=>t.has(e)?_w("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Kw=(e,t,n,r)=>(Bw(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Xw=(e,t,n)=>(Bw(e,t,"access private method"),n);function Jw(e,t){if(t){let n;return nw(()=>{const r=e();return r&&n&&t(n,r)?n:(n=r,r)})}return nw(e)}function Zw(e,t){if(Object.is(e,t))return!0;if(null===e||null===t)return!1;if("function"==typeof e&&"function"==typeof t)return e===t;if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;return!e.some((e,n)=>!Zw(e,t[n]))}if("object"==typeof e&&"object"==typeof t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const i=n.some(n=>!Zw(e[n],t[n]));return!i}return!1}function Qw({get:e},t){return{init:e=>JS(e),get(){return e.call(this).value},set(t){const n=e.call(this);n.peek()!==t&&(n.value=t)}}}function eC(e,t){const n=new WeakMap;return function(){let t=n.get(this);return t||(t=Jw(e.bind(this)),n.set(this,t)),t.value}}function tC(e=!0){return function(t,n){n.addInitializer(function(){const t="field"===n.kind||n.static?this:Object.getPrototypeOf(this),r=Object.getOwnPropertyDescriptor(t,n.name);r&&Object.defineProperty(t,n.name,((e,t)=>kw(e,Aw(t)))(((e,t)=>{for(var n in t||(t={}))Tw.call(t,n)&&Nw(e,n,t[n]);if(Ow)for(var n of Ow(t))qw.call(t,n)&&Nw(e,n,t[n]);return e})({},r),{enumerable:e}))})}}function nC(...e){const t=e.map(e=>sw(e));return()=>t.forEach(e=>e())}fw=[Qw],pw=[Qw],dw=[Qw],cw=[tC()],uw=[tC()],lw=[tC()];var rC,iC=class{constructor(e,t=Object.is){this.defaultValue=e,this.equals=t,Hw(hw,5,this),Yw(this,bw),Yw(this,mw,Hw(hw,8,this)),Hw(hw,11,this),Yw(this,xw,Hw(hw,12,this)),Hw(hw,15,this),Yw(this,Ew,Hw(hw,16,this)),Hw(hw,19,this),this.reset=this.reset.bind(this),this.reset()}get current(){return Uw(this,bw,Dw)}get initial(){return Uw(this,bw,vw)}get previous(){return Uw(this,bw,ww)}set current(e){const t=WS(()=>Uw(this,bw,Dw));e&&t&&this.equals(t,e)||FS(()=>{Uw(this,bw,vw)||Kw(this,bw,e,yw),Kw(this,bw,t,Cw),Kw(this,bw,e,Pw)})}reset(e=this.defaultValue){FS(()=>{Kw(this,bw,void 0,Cw),Kw(this,bw,e,yw),Kw(this,bw,e,Pw)})}};function oC(e){return WS(()=>{const t={};for(const n in e)t[n]=e[n];return t})}hw=[,,,Mw(null)],mw=new WeakMap,bw=new WeakSet,xw=new WeakMap,Ew=new WeakMap,gw=Vw(hw,20,"#initial",fw,bw,mw),vw=gw.get,yw=gw.set,Sw=Vw(hw,20,"#previous",pw,bw,xw),ww=Sw.get,Cw=Sw.set,Iw=Vw(hw,20,"#current",dw,bw,Ew),Dw=Iw.get,Pw=Iw.set,Vw(hw,2,"current",cw,iC),Vw(hw,2,"initial",uw,iC),Vw(hw,2,"previous",lw,iC),$w(hw,iC);rC=new WeakMap;var aC,sC,lC,uC,cC,dC=Object.create,pC=Object.defineProperty,fC=Object.getOwnPropertyDescriptor,hC=Object.getOwnPropertySymbols,mC=Object.prototype.hasOwnProperty,gC=Object.prototype.propertyIsEnumerable,vC=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),yC=e=>{throw TypeError(e)},bC=Math.pow,xC=(e,t,n)=>t in e?pC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,SC=["class","method","getter","setter","accessor","field","value","get","set"],wC=e=>void 0!==e&&"function"!=typeof e?yC("Function expected"):e,CC=(e,t,n,r,i)=>({kind:SC[e],name:t,metadata:r,addInitializer:e=>n._?yC("Already initialized"):i.push(wC(e||null))}),EC=(e,t,n,r,i,o)=>{for(var a,s,l,u,c=7&t,d=SC[c+5],p=e[2]||(e[2]=[]),f=(i=i.prototype,fC(i,n)),h=r.length-1;h>=0;h--)(l=CC(c,n,s={},e[3],p)).static=false,l.private=false,u=l.access={has:e=>n in e},u.get=e=>e[n],a=(0,r[h])(f[d],l),s._=1,wC(a)&&(f[d]=a);return f&&pC(i,n,f),i},IC=(e,t,n)=>t.has(e)||yC("Cannot "+n),DC=class e{constructor(e,t){this.x=e,this.y=t}static delta(t,n){return new e(t.x-n.x,t.y-n.y)}static distance(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}static equals(e,t){return e.x===t.x&&e.y===t.y}static from({x:t,y:n}){return new e(t,n)}},PC=class e{constructor(e,t,n,r){this.left=e,this.top=t,this.width=n,this.height=r,this.scale={x:1,y:1}}get inverseScale(){return{x:1/this.scale.x,y:1/this.scale.y}}translate(t,n){const{top:r,left:i,width:o,height:a,scale:s}=this,l=new e(i+t,r+n,o,a);return l.scale=((e,t)=>{for(var n in t||(t={}))mC.call(t,n)&&xC(e,n,t[n]);if(hC)for(var n of hC(t))gC.call(t,n)&&xC(e,n,t[n]);return e})({},s),l}get boundingRectangle(){const{width:e,height:t,left:n,top:r,right:i,bottom:o}=this;return{width:e,height:t,left:n,top:r,right:i,bottom:o}}get center(){const{left:e,top:t,right:n,bottom:r}=this;return new DC((e+n)/2,(t+r)/2)}get area(){const{width:e,height:t}=this;return e*t}equals(t){if(!(t instanceof e))return!1;const{left:n,top:r,width:i,height:o}=this;return n===t.left&&r===t.top&&i===t.width&&o===t.height}containsPoint(e){const{top:t,left:n,bottom:r,right:i}=this;return t<=e.y&&e.y<=r&&n<=e.x&&e.x<=i}intersectionArea(t){return t instanceof e?function(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),a=i-r,s=o-n;if(r<i&&n<o){return a*s}return 0}(this,t):0}intersectionRatio(e){const{area:t}=this,n=this.intersectionArea(e);return n/(e.area+t-n)}get bottom(){const{top:e,height:t}=this;return e+t}get right(){const{left:e,width:t}=this;return e+t}get aspectRatio(){const{width:e,height:t}=this;return e/t}get corners(){return[{x:this.left,y:this.top},{x:this.right,y:this.top},{x:this.left,y:this.bottom},{x:this.right,y:this.bottom}]}static from({top:t,left:n,width:r,height:i}){return new e(n,t,r,i)}static delta(e,t,n={x:"center",y:"center"}){const r=(e,t)=>{const r=n[t],i="x"===t?e.left:e.top,o="x"===t?e.width:e.height;return"start"==r?i:"end"==r?i+o:i+o/2};return DC.delta({x:r(e,"x"),y:r(e,"y")},{x:r(t,"x"),y:r(t,"y")})}static intersectionRatio(t,n){return e.from(t).intersectionRatio(e.from(n))}};var MC,RC=class extends(lC=iC,sC=[eC],aC=[eC],lC){constructor(e){var t,n,r;super(DC.from(e),(e,t)=>DC.equals(e,t)),((e,t,n)=>{for(var r=0,i=e[t>>1],o=i&&i.length;r<o;r++)i[r].call(n)})(cC,5,this),t=this,r=0,(n=uC).has(t)?yC("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(t):n.set(t,r),this.velocity={x:0,y:0}}get delta(){return DC.delta(this.current,this.initial)}get direction(){const{current:e,previous:t}=this;if(!t)return null;const n={x:e.x-t.x,y:e.y-t.y};return n.x||n.y?Math.abs(n.x)>Math.abs(n.y)?n.x>0?"right":"left":n.y>0?"down":"up":null}get current(){return super.current}set current(e){const{current:t}=this,n=DC.from(e),r={x:n.x-t.x,y:n.y-t.y},i=Date.now(),o=i-(IC(a=this,s=uC,"read from private field"),s.get(a));var a,s;const l=e=>Math.round(e/o*100);FS(()=>{((e,t,n)=>{IC(e,t,"write to private field"),t.set(e,n)})(this,uC,i),this.velocity={x:l(r.x),y:l(r.y)},super.current=n})}reset(e=this.defaultValue){super.reset(DC.from(e)),this.velocity={x:0,y:0}}};function kC({x:e,y:t},n){const r=Math.abs(e),i=Math.abs(t);return"number"==typeof n?Math.sqrt(bC(r,2)+bC(i,2))>n:"x"in n&&"y"in n?r>n.x&&i>n.y:"x"in n?r>n.x:"y"in n&&i>n.y}cC=(e=>{var t;return[,,,dC(null!=(t=null==e?void 0:e[vC("metadata")])?t:null)]})(lC),uC=new WeakMap,EC(cC,2,"delta",sC,RC),EC(cC,2,"direction",aC,RC),MC=cC,xC(RC,vC("metadata"),MC[3]);var LC,AC,OC,TC,qC=(e=>(e.Horizontal="x",e.Vertical="y",e))(qC||{}),_C=Object.values(qC),NC=Object.create,jC=Object.defineProperty,FC=Object.defineProperties,zC=Object.getOwnPropertyDescriptor,WC=Object.getOwnPropertyDescriptors,$C=Object.getOwnPropertySymbols,HC=Object.prototype.hasOwnProperty,VC=Object.prototype.propertyIsEnumerable,BC=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),GC=e=>{throw TypeError(e)},UC=(e,t,n)=>t in e?jC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,YC=(e,t)=>{for(var n in t||(t={}))HC.call(t,n)&&UC(e,n,t[n]);if($C)for(var n of $C(t))VC.call(t,n)&&UC(e,n,t[n]);return e},KC=(e,t)=>FC(e,WC(t)),XC=(e,t)=>jC(e,"name",{value:t,configurable:!0}),JC=(e,t)=>{var n={};for(var r in e)HC.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&$C)for(var r of $C(e))t.indexOf(r)<0&&VC.call(e,r)&&(n[r]=e[r]);return n},ZC=e=>{var t;return[,,,NC(null!=(t=null==e?void 0:e[BC("metadata")])?t:null)]},QC=["class","method","getter","setter","accessor","field","value","get","set"],eE=e=>void 0!==e&&"function"!=typeof e?GC("Function expected"):e,tE=(e,t,n,r,i)=>({kind:QC[e],name:t,metadata:r,addInitializer:e=>n._?GC("Already initialized"):i.push(eE(e||null))}),nE=(e,t)=>UC(t,BC("metadata"),e[3]),rE=(e,t,n,r)=>{for(var i=0,o=e[t>>1],a=o&&o.length;i<a;i++)1&t?o[i].call(n):r=o[i].call(n,r);return r},iE=(e,t,n,r,i,o)=>{var a,s,l,u,c,d=7&t,p=!!(8&t),f=!!(16&t),h=d>3?e.length+1:d?p?1:2:0,m=QC[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)&&zC(d<4?i:{get[n](){return sE(this,o)},set[n](e){return uE(this,o,e)}},n));d?f&&d<4&&XC(o,(d>2?"set ":d>1?"get ":"")+n):XC(i,n);for(var b=r.length-1;b>=0;b--)u=tE(d,n,l={},e[3],v),d&&(u.static=p,u.private=f,c=u.access={has:f?e=>aE(i,e):e=>n in e},3^d&&(c.get=f?e=>(1^d?sE:cE)(e,i,4^d?o:y.get):e=>e[n]),d>2&&(c.set=f?(e,t)=>uE(e,i,t,4^d?o:y.set):(e,t)=>e[n]=t)),s=(0,r[b])(d?d<4?f?o:y[m]:d>4?void 0:{get:y.get,set:y.set}:i,u),l._=1,4^d||void 0===s?eE(s)&&(d>4?g.unshift(s):d?f?o=s:y[m]=s:i=s):"object"!=typeof s||null===s?GC("Object expected"):(eE(a=s.get)&&(y.get=a),eE(a=s.set)&&(y.set=a),eE(a=s.init)&&g.unshift(a));return d||nE(e,i),y&&jC(i,n,y),f?4^d?o:y:i},oE=(e,t,n)=>t.has(e)||GC("Cannot "+n),aE=(e,t)=>Object(t)!==t?GC('Cannot use the "in" operator on this value'):e.has(t),sE=(e,t,n)=>(oE(e,t,"read from private field"),n?n.call(e):t.get(e)),lE=(e,t,n)=>t.has(e)?GC("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),uE=(e,t,n,r)=>(oE(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),cE=(e,t,n)=>(oE(e,t,"access private method"),n);function dE(e,t){return{plugin:e,options:t}}function pE(e){return t=>dE(e,t)}function fE(e){return"function"==typeof e?{plugin:e,options:void 0}:e}LC=[Qw];var hE=class{constructor(e,t){this.manager=e,this.options=t,lE(this,OC,rE(AC,8,this,!1)),rE(AC,11,this),lE(this,TC,new Set)}enable(){this.disabled=!1}disable(){this.disabled=!0}isDisabled(){return WS(()=>this.disabled)}configure(e){this.options=e}registerEffect(e){const t=sw(e.bind(this));return sE(this,TC).add(t),t}destroy(){sE(this,TC).forEach(e=>e())}static configure(e){return dE(this,e)}};AC=ZC(null),OC=new WeakMap,TC=new WeakMap,iE(AC,4,"disabled",LC,hE,OC),nE(AC,hE);var mE,gE=class extends hE{},vE=class{constructor(e){this.manager=e,this.instances=new Map,lE(this,mE,[])}get values(){return Array.from(this.instances.values())}set values(e){const t=e.map(fE).reduce((e,t)=>{const n=e.find(({plugin:e})=>e===t.plugin);return n?(n.options=t.options,e):[...e,t]},[]),n=t.map(({plugin:e})=>e);for(const e of sE(this,mE))if(!n.includes(e)){if(e.prototype instanceof gE)continue;this.unregister(e)}for(const{plugin:e,options:n}of t)this.register(e,n);uE(this,mE,n)}get(e){return this.instances.get(e)}register(e,t){const n=this.instances.get(e);if(n)return n.options!==t&&(n.options=t),n;const r=new e(this.manager,t);return this.instances.set(e,r),r}unregister(e){const t=this.instances.get(e);t&&(t.destroy(),this.instances.delete(e))}destroy(){for(const e of this.instances.values())e.destroy();this.instances.clear()}};function yE(e,t){return e.priority===t.priority?e.type===t.type?t.value-e.value:t.type-e.type:t.priority-e.priority}mE=new WeakMap;var bE,xE,SE,wE,CE,EE,IE,DE,PE,ME,RE,kE,LE=[],AE=class extends hE{constructor(e){super(e),lE(this,bE),lE(this,xE),this.computeCollisions=this.computeCollisions.bind(this),uE(this,xE,JS(LE)),this.destroy=nC(()=>{const e=this.computeCollisions(),t=WS(()=>this.manager.dragOperation.position.current);if(e!==LE){const e=sE(this,bE);if(uE(this,bE,t),e&&t.x==e.x&&t.y==e.y)return}else uE(this,bE,void 0);sE(this,xE).value=e},()=>{const{dragOperation:e}=this.manager;e.status.initialized&&this.forceUpdate()})}forceUpdate(e=!0){WS(()=>{e?sE(this,xE).value=this.computeCollisions():uE(this,bE,void 0)})}computeCollisions(e,t){const{registry:n,dragOperation:r}=this.manager,{source:i,shape:o,status:a}=r;if(!a.initialized||!o)return LE;const s=[],l=[];for(const o of null!=e?e:n.droppables){if(o.disabled)continue;if(i&&!o.accepts(i))continue;const e=null!=t?t:o.collisionDetector;if(!e)continue;l.push(o),o.shape;const n=WS(()=>e({droppable:o,dragOperation:r}));n&&(null!=o.collisionPriority&&(n.priority=o.collisionPriority),s.push(n))}return 0===l.length?LE:(s.sort(yE),s)}get collisions(){return sE(this,xE).value}};bE=new WeakMap,xE=new WeakMap,CE=[Qw],wE=[Qw],SE=[Qw];var OE=class e{constructor(e,t){lE(this,PE,rE(DE,8,this)),rE(DE,11,this),lE(this,ME),lE(this,RE,rE(DE,12,this)),rE(DE,15,this),lE(this,kE,rE(DE,16,this)),rE(DE,19,this);const{effects:n,id:r,data:i={},disabled:o=!1,register:a=!0}=e;let s=r;uE(this,ME,JS(r)),this.manager=t,this.data=i,this.disabled=o,this.effects=()=>{var e;return[()=>{const{id:e,manager:t}=this;if(e!==s)return s=e,null==t||t.registry.register(this),()=>null==t?void 0:t.registry.unregister(this)},...null!=(e=null==n?void 0:n())?e:[]]},this.register=this.register.bind(this),this.unregister=this.unregister.bind(this),this.destroy=this.destroy.bind(this),t&&a&&queueMicrotask(this.register)}get id(){var t,n;const r=sE(this,ME).value;return null!=(n=null==(t=e.pendingIdChanges)?void 0:t.get(this))?n:r}set id(t){var n,r;t!==(null!=(r=null==(n=e.pendingIdChanges)?void 0:n.get(this))?r:sE(this,ME).peek())&&(e.pendingIdChanges||(e.pendingIdChanges=new Map,queueMicrotask(()=>{var t;return cE(t=e,EE,IE).call(t)})),e.pendingIdChanges.set(this,t))}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)}};DE=ZC(null),EE=new WeakSet,IE=function(){const e=OE.pendingIdChanges;OE.pendingIdChanges=null,e&&FS(()=>{for(const[t,n]of e)sE(t,ME).value=n})},PE=new WeakMap,ME=new WeakMap,RE=new WeakMap,kE=new WeakMap,iE(DE,4,"manager",CE,OE,PE),iE(DE,4,"data",wE,OE,RE),iE(DE,4,"disabled",SE,OE,kE),lE(OE,EE),nE(DE,OE),OE.pendingIdChanges=null;var TE,qE,_E,NE,jE,FE,zE,WE,$E,HE,VE,BE,GE,UE,YE,KE,XE,JE,ZE,QE,eI,tI,nI,rI,iI=OE,oI=class{constructor(){this.map=JS(new Map),this.cleanupFunctions=new WeakMap,this.register=(e,t)=>{const n=this.map.peek(),r=n.get(e),i=()=>this.unregister(e,t);if(r===t)return i;if(r&&r.id===e){const e=this.cleanupFunctions.get(r);null==e||e(),this.cleanupFunctions.delete(r)}const o=new Map(n);for(const[r,i]of n)if(i===t&&r!==e){o.delete(r);break}o.set(e,t),this.map.value=o;const a=nC(...t.effects());return this.cleanupFunctions.set(t,a),i},this.unregister=(e,t)=>{const n=this.map.peek();if(n.get(e)!==t)return;const r=this.cleanupFunctions.get(t);null==r||r(),this.cleanupFunctions.delete(t);const i=new Map(n);i.delete(e),this.map.value=i}}[Symbol.iterator](){return this.map.peek().values()}get value(){return this.map.value.values()}has(e){return this.map.value.has(e)}get(e){return this.map.value.get(e)}destroy(){for(const e of this){const t=this.cleanupFunctions.get(e);null==t||t(),e.destroy()}this.map.value=new Map}},aI=class extends(zE=iI,FE=[Qw],jE=[Qw],NE=[Qw],_E=[eC],qE=[eC],TE=[eC],zE){constructor(e,t){var n=e,{modifiers:r,type:i,sensors:o,plugins:a,effects:s}=n,l=JC(n,["modifiers","type","sensors","plugins","effects"]);super(KC(YC({},l),{effects:()=>{var e;return[...null!=(e=null==s?void 0:s())?e:[],()=>{const{manager:e,plugins:t}=this;if(e&&t)for(const n of t){const{plugin:t}=fE(n);e.registry.plugins.register(t)}}]}}),t),rE(WE,5,this),lE(this,$E,rE(WE,8,this)),rE(WE,11,this),lE(this,HE,rE(WE,12,this)),rE(WE,15,this),lE(this,VE,rE(WE,16,this,this.isDragSource?"dragging":"idle")),rE(WE,19,this),this.type=i,this.sensors=o,this.modifiers=r,this.alignment=l.alignment,this.plugins=a}pluginConfig(e){if(this.plugins)for(const t of this.plugins){const n=fE(t);if(n.plugin===e)return n.options}}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}};WE=ZC(zE),$E=new WeakMap,HE=new WeakMap,VE=new WeakMap,iE(WE,4,"type",FE,aI,$E),iE(WE,4,"modifiers",jE,aI,HE),iE(WE,4,"status",NE,aI,VE),iE(WE,2,"isDropping",_E,aI),iE(WE,2,"isDragging",qE,aI),iE(WE,2,"isDragSource",TE,aI),nE(WE,aI);var sI=class extends(JE=iI,XE=[Qw],KE=[Qw],YE=[Qw],UE=[Qw],GE=[Qw],BE=[eC],JE){constructor(e,t){var n=e,{accept:r,collisionDetector:i,collisionPriority:o,type:a}=n;super(JC(n,["accept","collisionDetector","collisionPriority","type"]),t),rE(ZE,5,this),lE(this,QE,rE(ZE,8,this)),rE(ZE,11,this),lE(this,eI,rE(ZE,12,this)),rE(ZE,15,this),lE(this,tI,rE(ZE,16,this)),rE(ZE,19,this),lE(this,nI,rE(ZE,20,this)),rE(ZE,23,this),lE(this,rI,rE(ZE,24,this)),rE(ZE,27,this),this.accept=r,this.collisionDetector=i,this.collisionPriority=o,this.type=a}accepts(e){const{accept:t}=this;return!t||("function"==typeof t?t(e):!!e.type&&(Array.isArray(t)?t.includes(e.type):e.type===t))}get isDropTarget(){var e,t;return(null==(t=null==(e=this.manager)?void 0:e.dragOperation.target)?void 0:t.id)===this.id}};ZE=ZC(JE),QE=new WeakMap,eI=new WeakMap,tI=new WeakMap,nI=new WeakMap,rI=new WeakMap,iE(ZE,4,"accept",XE,sI,QE),iE(ZE,4,"type",KE,sI,eI),iE(ZE,4,"collisionDetector",YE,sI,tI),iE(ZE,4,"collisionPriority",UE,sI,nI),iE(ZE,4,"shape",GE,sI,rI),iE(ZE,2,"isDropTarget",BE,sI),nE(ZE,sI);var lI=class{constructor(){this.registry=new Map}addEventListener(e,t){const{registry:n}=this,r=new Set(n.get(e));return r.add(t),n.set(e,r),()=>this.removeEventListener(e,t)}removeEventListener(e,t){const{registry:n}=this,r=new Set(n.get(e));r.delete(t),n.set(e,r)}dispatch(e,...t){const{registry:n}=this,r=n.get(e);if(r)for(const e of r)e(...t)}},uI=class extends lI{constructor(e){super(),this.manager=e}dispatch(e,t){const n=[t,this.manager];super.dispatch(e,...n)}};function cI(e,t=!0){let n=!1;return KC(YC({},e),{cancelable:t,get defaultPrevented(){return n},preventDefault(){t&&(n=!0)}})}var dI,pI,fI,hI,mI,gI,vI,yI,bI,xI=class extends gE{constructor(e){super(e);let t=[];this.destroy=nC(()=>{const{dragOperation:n,collisionObserver:r}=e;n.status.initializing&&(t=[],r.enable())},()=>{const{collisionObserver:n,monitor:r}=e,{collisions:i}=n;if(n.isDisabled())return;if(iI.pendingIdChanges)return;const o=cI({collisions:i});if(r.dispatch("collision",o),o.defaultPrevented)return;if(((e,t)=>e.map(({id:e})=>e).join("")===t.map(({id:e})=>e).join(""))(i,t))return;t=i;const[a]=i;WS(()=>{var t;(null==a?void 0:a.id)!==(null==(t=e.dragOperation.target)?void 0:t.id)&&(n.disable(),e.actions.setDropTarget(null==a?void 0:a.id).then(()=>{n.enable()}))})})}},SI=(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))(SI||{}),wI=(e=>(e[e.Collision=0]="Collision",e[e.ShapeIntersection=1]="ShapeIntersection",e[e.PointerIntersection=2]="PointerIntersection",e))(wI||{});vI=[Qw],gI=[eC],mI=[eC],hI=[eC],fI=[eC],pI=[eC],dI=[eC];var CI=class{constructor(){rE(yI,5,this),lE(this,bI,rE(yI,8,this,"idle")),rE(yI,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}};yI=ZC(null),bI=new WeakMap,iE(yI,4,"value",vI,CI,bI),iE(yI,2,"current",gI,CI),iE(yI,2,"idle",mI,CI),iE(yI,2,"initializing",hI,CI),iE(yI,2,"initialized",fI,CI),iE(yI,2,"dragging",pI,CI),iE(yI,2,"dropped",dI,CI),nE(yI,CI);var EI,II=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 WS(()=>{const{dragOperation:t}=this.manager,n=null!=e?e:null;if(t.targetIdentifier===n)return Promise.resolve(!1);t.targetIdentifier=n;const r=cI({operation:t.snapshot()});return t.status.dragging&&this.manager.monitor.dispatch("dragover",r),this.manager.renderer.rendering.then(()=>r.defaultPrevented)})}start(e){return WS(()=>{const{dragOperation:t}=this.manager;null!=e.source&&this.setDragSource(e.source);if(!t.source)throw new Error("Cannot start a drag operation without a drag source");if(!t.status.idle)throw new Error("Cannot start a drag operation while another is active");const n=new AbortController,{event:r,coordinates:i}=e;FS(()=>{t.status.set("initialization-pending"),t.shape=null,t.canceled=!1,t.activatorEvent=null!=r?r:null,t.position.reset(i)});const o=cI({operation:t.snapshot()});return this.manager.monitor.dispatch("beforedragstart",o),o.defaultPrevented?(t.reset(),n.abort(),n):(t.status.set("initializing"),t.controller=n,this.manager.renderer.rendering.then(()=>{if(n.signal.aborted)return;const{status:e}=t;"initializing"===e.current&&FS(()=>{t.status.set("dragging"),this.manager.monitor.dispatch("dragstart",{nativeEvent:r,operation:t.snapshot(),cancelable:!1})})}),n)})}move(e){return WS(()=>{var t,n;const{dragOperation:r}=this.manager,{status:i,controller:o}=r;if(!i.dragging||!o||o.signal.aborted)return;const a=cI({nativeEvent:e.event,operation:r.snapshot(),by:e.by,to:e.to},null==(t=e.cancelable)||t);(null==(n=e.propagate)||n)&&this.manager.monitor.dispatch("dragmove",a),queueMicrotask(()=>{var t,n,i,o,s;if(a.defaultPrevented)return;const l=null!=(s=e.to)?s:{x:r.position.current.x+(null!=(n=null==(t=e.by)?void 0:t.x)?n:0),y:r.position.current.y+(null!=(o=null==(i=e.by)?void 0:i.y)?o:0)};r.position.current=l})})}stop(e={}){return WS(()=>{var t,n;const{dragOperation:r}=this.manager,{controller:i}=r;if(!i||i.signal.aborted)return;let o;i.abort();const a=()=>{this.manager.renderer.rendering.then(()=>{r.status.set("dropped");const e=WS(()=>{var e;return"dropping"===(null==(e=r.source)?void 0:e.status)}),t=()=>{r.controller===i&&(r.controller=void 0),r.reset()};if(e){const{source:e}=r,n=sw(()=>{"idle"===(null==e?void 0:e.status)&&(n(),t())})}else this.manager.renderer.rendering.then(t)})};r.canceled=null!=(t=e.canceled)&&t,this.manager.monitor.dispatch("dragend",{nativeEvent:e.event,operation:r.snapshot(),canceled:null!=(n=e.canceled)&&n,suspend:()=>{const e={resume:()=>{},abort:()=>{}};return o=new Promise((t,n)=>{e.resume=t,e.abort=n}),e}}),o?o.then(a).catch(()=>r.reset()):a()})}},DI=class extends hE{constructor(e,t){super(e,t),this.manager=e,this.options=t}},PI=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)}},MI=class{constructor(e){this.options=e,lE(this,EI)}set controller(e){uE(this,EI,e),e.signal.addEventListener("abort",()=>this.abort())}activate(e){var t;null==(t=sE(this,EI))||t.activate(e)}};EI=new WeakMap;var RI,kI,LI,AI,OI,TI,qI,_I,NI,jI,FI,zI,WI,$I,HI,VI,BI,GI,UI,YI=class extends hE{constructor(e,t){super(e,t),this.manager=e,this.options=t}apply(e){return e.transform}},KI=class{constructor(e){this.draggables=new oI,this.droppables=new oI,this.plugins=new vE(e),this.sensors=new vE(e),this.modifiers=new vE(e)}register(e,t){if(e instanceof aI)return this.draggables.register(e.id,e);if(e instanceof sI)return this.droppables.register(e.id,e);if(e.prototype instanceof YI)return this.modifiers.register(e,t);if(e.prototype instanceof DI)return this.sensors.register(e,t);if(e.prototype instanceof hE)return this.plugins.register(e,t);throw new Error("Invalid instance type")}unregister(e){if(e instanceof iI)return e instanceof aI?this.draggables.unregister(e.id,e):e instanceof sI?this.droppables.unregister(e.id,e):()=>{};if(e.prototype instanceof YI)return this.modifiers.unregister(e);if(e.prototype instanceof DI)return this.sensors.unregister(e);if(e.prototype instanceof hE)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()}};NI=[eC],_I=[Qw],qI=[Qw],TI=[Qw],OI=[Qw],AI=[Qw],LI=[eC],kI=[eC],RI=[eC];var XI=class{constructor(e){rE(WI,5,this),lE(this,jI),lE(this,FI),lE(this,zI,new iC(void 0,(e,t)=>e&&t?e.equals(t):e===t)),this.status=new CI,lE(this,$I,rE(WI,8,this,!1)),rE(WI,11,this),lE(this,HI,rE(WI,12,this,null)),rE(WI,15,this),lE(this,VI,rE(WI,16,this,null)),rE(WI,19,this),lE(this,BI,rE(WI,20,this,null)),rE(WI,23,this),lE(this,GI,rE(WI,24,this,[])),rE(WI,27,this),this.position=new RC({x:0,y:0}),lE(this,UI,{x:0,y:0}),uE(this,jI,e)}get shape(){const{current:e,initial:t,previous:n}=sE(this,zI);return e&&t?{current:e,initial:t,previous:n}:null}set shape(e){e?sE(this,zI).current=e:sE(this,zI).reset()}get source(){var e;const t=this.sourceIdentifier;if(null==t)return null;const n=sE(this,jI).registry.draggables.get(t);return n&&uE(this,FI,n),null!=(e=null!=n?n:sE(this,FI))?e:null}get target(){var e;const t=this.targetIdentifier;return null!=t&&null!=(e=sE(this,jI).registry.droppables.get(t))?e:null}get transform(){const{x:e,y:t}=this.position.delta;let n={x:e,y:t};for(const e of this.modifiers)n=e.apply(KC(YC({},this.snapshot()),{transform:n}));return uE(this,UI,n),n}snapshot(){return WS(()=>({source:this.source,target:this.target,activatorEvent:this.activatorEvent,transform:sE(this,UI),shape:this.shape?oC(this.shape):null,position:oC(this.position),status:oC(this.status),canceled:this.canceled}))}reset(){FS(()=>{this.status.set("idle"),this.sourceIdentifier=null,this.targetIdentifier=null,sE(this,zI).reset(),this.position.reset({x:0,y:0}),uE(this,UI,{x:0,y:0}),this.modifiers=[]})}};WI=ZC(null),jI=new WeakMap,FI=new WeakMap,zI=new WeakMap,$I=new WeakMap,HI=new WeakMap,VI=new WeakMap,BI=new WeakMap,GI=new WeakMap,UI=new WeakMap,iE(WI,2,"shape",NI,XI),iE(WI,4,"canceled",_I,XI,$I),iE(WI,4,"activatorEvent",qI,XI,HI),iE(WI,4,"sourceIdentifier",TI,XI,VI),iE(WI,4,"targetIdentifier",OI,XI,BI),iE(WI,4,"modifiers",AI,XI,GI),iE(WI,2,"source",LI,XI),iE(WI,2,"target",kI,XI),iE(WI,2,"transform",RI,XI),nE(WI,XI);var JI={get rendering(){return Promise.resolve()}};function ZI(e,t){return"function"==typeof e?e(t):null!=e?e:t}var QI=class{constructor(e){var t;this.destroy=()=>{this.dragOperation.status.idle||this.actions.stop({canceled:!0}),this.dragOperation.modifiers.forEach(e=>e.destroy()),this.registry.destroy(),this.collisionObserver.destroy()};const n=null!=e?e:{},r=ZI(n.plugins,[]),i=ZI(n.sensors,[]),o=ZI(n.modifiers,[]),a=null!=(t=n.renderer)?t:JI,s=new uI(this),l=new KI(this);this.registry=l,this.monitor=s,this.renderer=a,this.actions=new II(this),this.dragOperation=new XI(this),this.collisionObserver=new AE(this),this.plugins=[xI,...r],this.modifiers=o,this.sensors=i;const{destroy:u}=this,c=nC(()=>{var e,t,n;const r=WS(()=>this.dragOperation.modifiers),i=this.modifiers;for(const e of r)i.includes(e)||e.destroy();this.dragOperation.modifiers=null!=(n=null==(t=null==(e=this.dragOperation.source)?void 0:e.modifiers)?void 0:t.map(e=>{const{plugin:t,options:n}=fE(e);return new t(this,n)}))?n:i});this.destroy=()=>{c(),u()}}get plugins(){return this.registry.plugins.values}set plugins(e){this.registry.plugins.values=e}get modifiers(){return this.registry.modifiers.values}set modifiers(e){this.registry.modifiers.values=e}get sensors(){return this.registry.sensors.values}set sensors(e){this.registry.sensors.values=e}},eD=e=>{throw TypeError(e)},tD=(e,t,n)=>t.has(e)||eD("Cannot "+n),nD=(e,t,n)=>(tD(e,t,"read from private field"),t.get(e)),rD=(e,t,n)=>t.has(e)?eD("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),iD=(e,t,n,r)=>(tD(e,t,"write to private field"),t.set(e,n),n),oD=(e,t,n)=>(tD(e,t,"access private method"),n);function aD(e){return!!e&&(e instanceof KeyframeEffect||"getKeyframes"in e&&"function"==typeof e.getKeyframes)}function sD(e,t){const n=e.getAnimations();let r=null;for(const e of n){if("running"!==e.playState)continue;const{effect:n}=e,i=(aD(n)?n.getKeyframes():[]).filter(t);i.length>0&&(r=[i[i.length-1],e])}return r}function lD(e){const{width:t,height:n,top:r,left:i,bottom:o,right:a}=e.getBoundingClientRect();return{width:t,height:n,top:r,left:i,bottom:o,right:a}}function uD(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function cD(e){return"nodeType"in e}function dD(e){var t,n,r;return e?uD(e)?e:cD(e)?"defaultView"in e?null!=(t=e.defaultView)?t:window:null!=(r=null==(n=e.ownerDocument)?void 0:n.defaultView)?r:window:window:window}function pD(e){const{Document:t}=dD(e);return e instanceof t||"nodeType"in e&&e.nodeType===Node.DOCUMENT_NODE}function fD(e){return!(!e||uD(e))&&(e instanceof dD(e).HTMLElement||"namespaceURI"in e&&"string"==typeof e.namespaceURI&&e.namespaceURI.endsWith("html"))}function hD(e){return e instanceof dD(e).SVGElement||"namespaceURI"in e&&"string"==typeof e.namespaceURI&&e.namespaceURI.endsWith("svg")}function mD(e){return e?uD(e)?e.document:cD(e)?pD(e)?e:fD(e)||hD(e)?e.ownerDocument:document:document:document}function gD(e,t){if(function(e){return"DETAILS"===e.tagName}(e)&&!1===e.open)return!1;const{overflow:n,overflowX:r,overflowY:i}=getComputedStyle(e);return"visible"===n&&"visible"===r&&"visible"===i}function vD(e,t=e.getBoundingClientRect(),n=0){var r,i,o,a,s;let l=t;const{ownerDocument:u}=e,c=null!=(r=u.defaultView)?r:window;let d=e.parentElement;for(;d&&d!==u.documentElement;){if(!gD(d)){const e=d.getBoundingClientRect(),t=n*(e.bottom-e.top),r=n*(e.right-e.left),i=n*(e.bottom-e.top),o=n*(e.right-e.left);l={top:Math.max(l.top,e.top-t),right:Math.min(l.right,e.right+r),bottom:Math.min(l.bottom,e.bottom+i),left:Math.max(l.left,e.left-o),width:0,height:0},l.width=l.right-l.left,l.height=l.bottom-l.top}d=d.parentElement}const p=c.visualViewport,f=null!=(i=null==p?void 0:p.offsetTop)?i:0,h=null!=(o=null==p?void 0:p.offsetLeft)?o:0,m=null!=(a=null==p?void 0:p.width)?a:c.innerWidth,g=null!=(s=null==p?void 0:p.height)?s:c.innerHeight,v=n*g,y=n*m;return l={top:Math.max(l.top,f-v),right:Math.min(l.right,h+m+y),bottom:Math.min(l.bottom,f+g+v),left:Math.max(l.left,h-y),width:0,height:0},l.width=l.right-l.left,l.height=l.bottom-l.top,l.width<0&&(l.width=0),l.height<0&&(l.height=0),l}function yD(e){return{x:e.clientX,y:e.clientY}}var bD="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function xD(e=document,t=new Set){if(t.has(e))return[];t.add(e);const n=[e];for(const r of Array.from(e.querySelectorAll("iframe, frame")))try{const e=r.contentDocument;e&&!t.has(e)&&n.push(...xD(e,t))}catch(e){}try{const r=e.defaultView;if(r&&r!==window.top){const i=r.parent;i&&i.document&&i.document!==e&&n.push(...xD(i.document,t))}}catch(e){}return n}function SD(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function wD(){var e,t;const n=SD()?window.visualViewport:null;return{x:null!=(e=null==n?void 0:n.offsetLeft)?e:0,y:null!=(t=null==n?void 0:n.offsetTop)?t:0}}function CD(e){return!(!e||!cD(e))&&e instanceof dD(e).ShadowRoot}function ED(e){if(e&&cD(e)){let t=e.getRootNode();if(CD(t))return t;if(t instanceof Document)return t}return mD(e)}function ID(e){return e.matchMedia("(prefers-reduced-motion: reduce)").matches}function DD(e){return"value"in e}function PD(e){return"CANVAS"===e.tagName}function MD(e,{x:t,y:n}){const r=e.elementFromPoint(t,n);if(function(e){return"IFRAME"===(null==e?void 0:e.tagName)}(r)){const{contentDocument:e}=r;if(e){const{left:i,top:o}=r.getBoundingClientRect();return MD(e,{x:t-i,y:n-o})}}return r}var RD=new WeakMap;var kD=class{constructor(){this.entries=new Set,this.clear=()=>{for(const e of this.entries){const[t,{type:n,listener:r,options:i}]=e;t.removeEventListener(n,r,i)}this.entries.clear()}}bind(e,t){const n=Array.isArray(e)?e:[e],r=Array.isArray(t)?t:[t],i=[];for(const e of n)for(const t of r){const{type:n,listener:r,options:o}=t,a=[e,t];e.addEventListener(n,r,o),this.entries.add(a),i.push(a)}const o=this.entries;return function(){for(const e of i){const[t,{type:n,listener:r,options:i}]=e;t.removeEventListener(n,r,i),o.delete(e)}}}};function LD(e){const t=null==e?void 0:e.ownerDocument.defaultView;if(t&&t.self!==t.parent)return t.frameElement}function AD(e,t){const n=()=>performance.now();let r,i;return function(...o){const a=this;i?(null==r||r(),r=function(e,t){const n=setTimeout(e,t);return()=>clearTimeout(n)}(()=>{e.apply(a,o),i=n()},t-(n()-i))):(e.apply(a,o),i=n())}}var OD,TD=bD?ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},qD=class extends TD{constructor(e){super(t=>{nD(this,OD)?e(t,this):iD(this,OD,!0)}),rD(this,OD,!1)}};OD=new WeakMap;var _D,ND,jD,FD,zD,WD,$D,HD,VD,BD,GD,UD=Array.from({length:100},(e,t)=>t/100),YD=class{constructor(e,t,n={debug:!1,skipInitial:!1}){this.element=e,this.callback=t,rD(this,VD),this.disconnect=()=>{var e,t,n;iD(this,$D,!0),null==(e=nD(this,jD))||e.disconnect(),null==(t=nD(this,FD))||t.disconnect(),nD(this,zD).disconnect(),null==(n=nD(this,WD))||n.remove()},rD(this,_D,!0),rD(this,ND),rD(this,jD),rD(this,FD),rD(this,zD),rD(this,WD),rD(this,$D,!1),rD(this,HD,AD(()=>{var e,t,n;const{element:r}=this;if(null==(e=nD(this,FD))||e.disconnect(),nD(this,$D)||!nD(this,_D)||!r.isConnected)return;const i=null!=(t=r.ownerDocument)?t:document,{innerHeight:o,innerWidth:a}=null!=(n=i.defaultView)?n:window,s=r.getBoundingClientRect(),l=vD(r,s),{top:u,left:c,bottom:d,right:p}=l,f=-Math.floor(u),h=-Math.floor(c),m=`${f}px ${-Math.floor(a-p)}px ${-Math.floor(o-d)}px ${h}px`;this.boundingClientRect=s,iD(this,FD,new IntersectionObserver(e=>{const[t]=e,{intersectionRect:n}=t;1!==(1!==t.intersectionRatio?t.intersectionRatio:PC.intersectionRatio(n,vD(r)))&&nD(this,HD).call(this)},{threshold:UD,rootMargin:m,root:i})),nD(this,FD).observe(r),oD(this,VD,BD).call(this)},75)),this.boundingClientRect=e.getBoundingClientRect(),iD(this,_D,function(e,t=e.getBoundingClientRect()){const{width:n,height:r}=vD(e,t);return n>0&&r>0}(e,this.boundingClientRect));let r=!0;this.callback=e=>{r&&(r=!1,n.skipInitial)||t(e)};const i=e.ownerDocument;(null==n?void 0:n.debug)&&(iD(this,WD,document.createElement("div")),nD(this,WD).style.background="rgba(0,0,0,0.15)",nD(this,WD).style.position="fixed",nD(this,WD).style.pointerEvents="none",i.body.appendChild(nD(this,WD))),iD(this,zD,new IntersectionObserver(t=>{var n,r;const i=t[t.length-1],{boundingClientRect:o,isIntersecting:a}=i,{width:s,height:l}=o,u=nD(this,_D);iD(this,_D,a),(s||l)&&(u&&!a?(null==(n=nD(this,FD))||n.disconnect(),this.callback(null),null==(r=nD(this,jD))||r.disconnect(),iD(this,jD,void 0),nD(this,WD)&&(nD(this,WD).style.visibility="hidden")):nD(this,HD).call(this),a&&!nD(this,jD)&&(iD(this,jD,new qD(nD(this,HD))),nD(this,jD).observe(e)))},{threshold:UD,root:i})),nD(this,_D)&&!n.skipInitial&&this.callback(this.boundingClientRect),nD(this,zD).observe(e)}};_D=new WeakMap,ND=new WeakMap,jD=new WeakMap,FD=new WeakMap,zD=new WeakMap,WD=new WeakMap,$D=new WeakMap,HD=new WeakMap,VD=new WeakSet,BD=function(){nD(this,$D)||(oD(this,VD,GD).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,nD(this,ND))||(this.callback(this.boundingClientRect),iD(this,ND,this.boundingClientRect)))},GD=function(){if(nD(this,WD)){const{top:e,left:t,width:n,height:r}=vD(this.element);nD(this,WD).style.overflow="hidden",nD(this,WD).style.visibility="visible",nD(this,WD).style.top=`${Math.floor(e)}px`,nD(this,WD).style.left=`${Math.floor(t)}px`,nD(this,WD).style.width=`${Math.floor(n)}px`,nD(this,WD).style.height=`${Math.floor(r)}px`}};var KD,XD,JD,ZD,QD=new WeakMap,eP=new WeakMap;function tP(e,t){let n=QD.get(e);if(!n){const t=new YD(e,t=>{const n=QD.get(e);n&&n.callbacks.forEach(e=>e(t))},{skipInitial:!0});n={disconnect:t.disconnect,callbacks:new Set}}return n.callbacks.add(t),QD.set(e,n),()=>{n.callbacks.delete(t),0===n.callbacks.size&&(QD.delete(e),n.disconnect())}}var nP=class{constructor(e,t,n){this.callback=t,rD(this,KD),rD(this,XD,!1),rD(this,JD),rD(this,ZD,AD(e=>{if(!nD(this,XD)&&e.target&&"contains"in e.target&&"function"==typeof e.target.contains)for(const t of nD(this,JD))if(e.target.contains(t)){this.callback(nD(this,KD).boundingClientRect);break}},75));const r=function(e){const t=new Set;let n=LD(e);for(;n;)t.add(n),n=LD(n);return t}(e),i=function(e,t){const n=new Set;for(const r of e){const e=tP(r,t);n.add(e)}return()=>n.forEach(e=>e())}(r,t),o=function(e,t){var n;const r=e.ownerDocument;if(!eP.has(r)){const e=new AbortController,t=new Set;document.addEventListener("scroll",e=>t.forEach(t=>t(e)),{capture:!0,passive:!0,signal:e.signal}),eP.set(r,{disconnect:()=>e.abort(),listeners:t})}const{listeners:i,disconnect:o}=null!=(n=eP.get(r))?n:{};return i&&o?(i.add(t),()=>{i.delete(t),0===i.size&&(o(),eP.delete(r))}):()=>{}}(e,nD(this,ZD));iD(this,JD,r),iD(this,KD,new YD(e,t,n)),this.disconnect=()=>{nD(this,XD)||(iD(this,XD,!0),i(),o(),nD(this,KD).disconnect())}}};function rP(e){return"showPopover"in e&&"hidePopover"in e&&"function"==typeof e.showPopover&&"function"==typeof e.hidePopover}function iP(e){try{rP(e)&&e.isConnected&&e.hasAttribute("popover")&&!e.matches(":popover-open")&&e.showPopover()}catch(e){}}function oP(e){return!(!bD||!e)&&e===mD(e).scrollingElement}function aP(e){var t,n;const r=dD(e),i=oP(e)?function(e){var t,n,r,i;const{documentElement:o}=mD(e),a=dD(e).visualViewport,s=null!=(t=null==a?void 0:a.width)?t:o.clientWidth,l=null!=(n=null==a?void 0:a.height)?n:o.clientHeight,u=null!=(r=null==a?void 0:a.offsetTop)?r:0,c=null!=(i=null==a?void 0:a.offsetLeft)?i:0;return{top:u,left:c,right:c+s,bottom:u+l,width:s,height:l}}(e):lD(e),o=r.visualViewport,a=oP(e)?{height:null!=(t=null==o?void 0:o.height)?t:r.innerHeight,width:null!=(n=null==o?void 0:o.width)?n:r.innerWidth}:{height:e.clientHeight,width:e.clientWidth},s={current:{x:e.scrollLeft,y:e.scrollTop},max:{x:e.scrollWidth-a.width,y:e.scrollHeight-a.height}};return{rect:i,position:s,isTop:s.current.y<=0,isLeft:s.current.x<=0,isBottom:s.current.y>=s.max.y,isRight:s.current.x>=s.max.x}}function sP(e,t){const{isTop:n,isBottom:r,isLeft:i,isRight:o,position:a}=aP(e),{x:s,y:l}=null!=t?t:{x:0,y:0},u=!n&&a.current.y+l>0,c=!r&&a.current.y+l<a.max.y,d=!i&&a.current.x+s>0,p=!o&&a.current.x+s<a.max.x;return{top:u,bottom:c,left:d,right:p,x:d||p,y:u||c}}KD=new WeakMap,XD=new WeakMap,JD=new WeakMap,ZD=new WeakMap;var lP=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))}},uP=new lP(e=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(e):e()}),cP=new lP(e=>setTimeout(e,50)),dP=new Map,pP=dP.clear.bind(dP);function fP(e,t=!1){if(!t)return hP(e);let n=dP.get(e);return n||(n=hP(e),dP.set(e,n),cP.schedule(pP),n)}function hP(e){return dD(e).getComputedStyle(e)}var mP={excludeElement:!0,escapeShadowDOM:!0};function gP(e,t=mP){const{limit:n,excludeElement:r,escapeShadowDOM:i}=t,o=new Set;return e?function t(a){if(null!=n&&o.size>=n)return o;if(!a)return o;if(pD(a)&&null!=a.scrollingElement&&!o.has(a.scrollingElement))return o.add(a.scrollingElement),o;if(i&&CD(a))return t(a.host);if(!fD(a))return hD(a)?t(a.parentElement):o;if(o.has(a))return o;const s=fP(a,!0);if(r&&a===e||function(e,t=fP(e,!0)){const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const r=t[e];return"string"==typeof r&&n.test(r)})}(a,s)&&o.add(a),function(e,t=fP(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 vP(e,t=window.frameElement){const n={x:0,y:0,scaleX:1,scaleY:1};if(!e)return n;let r=LD(e);for(;r;){if(r===t)return n;const e=lD(r),{x:i,y:o}=yP(r,e);n.x=n.x+e.left,n.y=n.y+e.top,n.scaleX=n.scaleX*i,n.scaleY=n.scaleY*o,r=LD(r)}return n}function yP(e,t=lD(e)){const n=Math.round(t.width),r=Math.round(t.height);if(fD(e))return{x:n/e.offsetWidth,y:r/e.offsetHeight};const i=fP(e,!0);return{x:(parseFloat(i.width)||n)/n,y:(parseFloat(i.height)||r)/r}}function bP(e){if("none"===e)return null;const[t,n,r="0"]=e.split(" "),i={x:parseFloat(t),y:parseFloat(n),z:parseInt(r,10)};return isNaN(i.x)&&isNaN(i.y)?null:{x:isNaN(i.x)?0:i.x,y:isNaN(i.y)?0:i.y,z:isNaN(i.z)?0:i.z}}function xP(e){var t,n,r,i,o,a,s,l,u;const{scale:c,transform:d,translate:p}=e,f=function(e){if("none"===e)return null;const t=e.split(" "),n=parseFloat(t[0]),r=parseFloat(t[1]);return isNaN(n)&&isNaN(r)?null:{x:isNaN(n)?r:n,y:isNaN(r)?n:r}}(c),h=bP(p),m=function(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(d);if(!m&&!f&&!h)return null;const g=null!=(t=null==f?void 0:f.x)?t:1,v=null!=(n=null==f?void 0:f.y)?n:1,y=null!=(r=null==h?void 0:h.x)?r:0,b=null!=(i=null==h?void 0:h.y)?i:0,x=null!=(o=null==m?void 0:m.x)?o:0,S=null!=(a=null==m?void 0:m.y)?a:0,w=null!=(s=null==m?void 0:m.scaleX)?s:1,C=null!=(l=null==m?void 0:m.scaleY)?l:1;return{x:y+x,y:b+S,z:null!=(u=null==h?void 0:h.z)?u:0,scaleX:g*w,scaleY:v*C}}var SP=(e=>(e[e.Idle=0]="Idle",e[e.Forward=1]="Forward",e[e.Reverse=-1]="Reverse",e))(SP||{}),wP={x:.2,y:.2},CP={x:10,y:10};function EP(e,t,n,r=25,i=wP,o=CP){const{x:a,y:s}=t,{rect:l,isTop:u,isBottom:c,isLeft:d,isRight:p}=aP(e),f=vP(e),h=xP(fP(e,!0)),m=null!==h&&(null==h?void 0:h.scaleX)<0,g=null!==h&&(null==h?void 0:h.scaleY)<0,v=new PC(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 x>0&&(!u||g&&!c)&&s<=v.top+x&&1!==(null==n?void 0:n.y)&&a>=v.left-o.x&&a<=v.right+o.x?(y.y=g?1:-1,b.y=r*Math.abs((v.top+x-s)/x)):x>0&&(!c||g&&!u)&&s>=v.bottom-x&&-1!==(null==n?void 0:n.y)&&a>=v.left-o.x&&a<=v.right+o.x&&(y.y=g?-1:1,b.y=r*Math.abs((v.bottom-x-s)/x)),S>0&&(!p||m&&!d)&&a>=v.right-S&&-1!==(null==n?void 0:n.x)&&s>=v.top-o.y&&s<=v.bottom+o.y?(y.x=m?-1:1,b.x=r*Math.abs((v.right-S-a)/S)):S>0&&(!d||m&&!p)&&a<=v.left+S&&1!==(null==n?void 0:n.x)&&s>=v.top-o.y&&s<=v.bottom+o.y&&(y.x=m?1:-1,b.x=r*Math.abs((v.left+S-a)/S)),{direction:y,speed:b}}function IP(e,{block:t="nearest",inline:n="nearest"}={}){if(!fD(e))return;const r=gP(e),i=[];for(const o of r){if(!fD(o))continue;const{top:r,left:a}=PP(e,o);let s=r,l=a;for(const e of i)s-=e.scrollTop,l-=e.scrollLeft;if("none"!==t){const n=s<o.scrollTop;n!==s+e.offsetHeight>o.scrollTop+o.clientHeight&&(o.scrollTop="center"===t?s-o.clientHeight/2+e.offsetHeight/2:n?s:s+e.offsetHeight-o.clientHeight)}if("none"!==n){const t=l<o.scrollLeft;t!==l+e.offsetWidth>o.scrollLeft+o.clientWidth&&(o.scrollLeft="center"===n?l-o.clientWidth/2+e.offsetWidth/2:t?l:l+e.offsetWidth-o.clientWidth)}i.push(o)}}function DP(e){let t=0,n=0,r=e;for(;r;){t+=r.offsetTop,n+=r.offsetLeft;const e=r.offsetParent;if(!fD(e))break;t+=e.clientTop,n+=e.clientLeft,r=e}return{top:t,left:n}}function PP(e,t){const n=DP(e),r=DP(t);return{top:n.top-r.top-t.clientTop,left:n.left-r.left-t.clientLeft}}function MP({element:e,keyframes:t,options:n}){return e.animate(t,n).finished}function RP(e,t=fP(e).translate,n=!0){if(n){const t=sD(e,e=>"translate"in e);if(t){const{translate:e=""}=t[0];if("string"==typeof e){const t=bP(e);if(t)return t}}}if(t){const e=bP(t);if(e)return e}return{x:0,y:0,z:0}}var kP=new lP(e=>setTimeout(e,0)),LP=new Map,AP=LP.clear.bind(LP);function OP(e,t){const n=function(e){const t=e.ownerDocument;let n=LP.get(t);if(n)return n;n=t.getAnimations(),LP.set(t,n),kP.schedule(AP);const r=n.filter(t=>aD(t.effect)&&t.effect.target===e);return LP.set(e,r),n}(e).filter(e=>{var n,r;if(aD(e.effect)){const{target:i}=e.effect;if(null==(r=i&&(null==(n=t.isValidTarget)?void 0:n.call(t,i)))||r)return e.effect.getKeyframes().some(e=>{for(const n of t.properties)if(e[n])return!0})}}).map(e=>{const{effect:t,currentTime:n}=e,r=null==t?void 0:t.getComputedTiming().duration;if(!e.pending&&"finished"!==e.playState)return"number"==typeof r&&"number"==typeof n&&n<r?(e.currentTime=r,()=>{e.currentTime=n}):void 0});if(n.length>0)return()=>n.forEach(e=>null==e?void 0:e())}var TP=class extends PC{constructor(e,t={}){var n,r,i,o;const{frameTransform:a=vP(e),ignoreTransforms:s,getBoundingClientRect:l=lD}=t,u=OP(e,{properties:["transform","translate","scale","width","height"],isValidTarget:t=>(t!==e||SD())&&t.contains(e)}),c=l(e);let d,{top:p,left:f,width:h,height:m}=c;const g=fP(e),v=xP(g),y={x:null!=(n=null==v?void 0:v.scaleX)?n:1,y:null!=(r=null==v?void 0:v.scaleY)?r:1},b=function(e,t){const n=e.getAnimations();if(!n.length)return null;let r,i,o,a=!1;for(const e of n){if("running"!==e.playState)continue;const t=aD(e.effect)?e.effect.getKeyframes():[],n=t[t.length-1];if(!n)continue;const{transform:s,translate:l,scale:u}=n;"string"==typeof s&&s&&(r=s,a=!0),"string"==typeof l&&l&&(i=l,a=!0),"string"==typeof u&&u&&(o=u,a=!0)}return a?xP({transform:null!=r?r:t.transform,translate:null!=i?i:t.translate,scale:null!=o?o:t.scale}):null}(e,g);null==u||u(),v&&(d=function(e,t,n){const{scaleX:r,scaleY:i,x:o,y:a}=t,s=e.left-o-(1-r)*parseFloat(n),l=e.top-a-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),u=r?e.width/r:e.width,c=i?e.height/i:e.height;return{width:u,height:c,top:l,right:s+u,bottom:l+c,left:s}}(c,v,g.transformOrigin),(s||b)&&(p=d.top,f=d.left,h=d.width,m=d.height));const x={width:null!=(i=null==d?void 0:d.width)?i:h,height:null!=(o=null==d?void 0:d.height)?o:m};if(b&&!s&&d){const e=function(e,t,n){const{scaleX:r,scaleY:i,x:o,y:a}=t,s=e.left+o+(1-r)*parseFloat(n),l=e.top+a+(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),u=r?e.width*r:e.width,c=i?e.height*i:e.height;return{width:u,height:c,top:l,right:s+u,bottom:l+c,left:s}}(d,b,g.transformOrigin);p=e.top,f=e.left,h=e.width,m=e.height,y.x=b.scaleX,y.y=b.scaleY}a&&(s||(f*=a.scaleX,h*=a.scaleX,p*=a.scaleY,m*=a.scaleY),f+=a.x,p+=a.y),super(f,p,h,m),this.scale=y,this.intrinsicWidth=x.width,this.intrinsicHeight=x.height}};function qP(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 _P=class{constructor(e){this.element=e,this.initial=new Map}set(e,t=""){const{element:n}=this;if(qP(n))for(const[r,i]of Object.entries(e)){const e=`${t}${r}`;this.initial.has(e)||this.initial.set(e,n.style.getPropertyValue(e)),n.style.setProperty(e,"string"==typeof i?i:`${i}px`)}}remove(e,t=""){const{element:n}=this;if(qP(n))for(const r of e){const e=`${t}${r}`;n.style.removeProperty(e)}}reset(){const{element:e}=this;if(qP(e)){for(const[t,n]of this.initial)e.style.setProperty(t,n);""===e.getAttribute("style")&&e.removeAttribute("style")}}};function NP(e){return!!e&&(e instanceof dD(e).Element||cD(e)&&e.nodeType===Node.ELEMENT_NODE)}function jP(e){if(!e)return!1;const{KeyboardEvent:t}=dD(e.target);return e instanceof t}var FP={};function zP(e){const t=null==FP[e]?0:FP[e]+1;return FP[e]=t,`${e}-${t}`}var WP=e=>{var t;return null!=(t=(({dragOperation:e,droppable:t})=>{const n=e.position.current;if(!n)return null;const{id:r}=t;if(!t.shape)return null;if(t.shape.containsPoint(n))return{id:r,value:1/DC.distance(t.shape.center,n),type:wI.PointerIntersection,priority:SI.High};return null})(e))?t:(({dragOperation:e,droppable:t})=>{const{shape:n}=e;if(!t.shape||!(null==n?void 0:n.current))return null;const r=n.current.intersectionArea(t.shape);if(r){const{position:i}=e,o=DC.distance(t.shape.center,i.current),a=r/(n.current.area+t.shape.area-r)/o;return{id:t.id,value:a,type:wI.ShapeIntersection,priority:SI.Normal}}return null})(e)},$P=e=>{const{dragOperation:t,droppable:n}=e,{shape:r,position:i}=t;if(!n.shape)return null;const o=r?PC.from(r.current.boundingRectangle).corners:void 0,a=PC.from(n.shape.boundingRectangle).corners.reduce((e,t,n)=>{var r;return e+DC.distance(DC.from(t),null!=(r=null==o?void 0:o[n])?r:i.current)},0),s=a/4;return{id:n.id,value:1/s,type:wI.Collision,priority:SI.Normal}},HP=Object.create,VP=Object.defineProperty,BP=Object.defineProperties,GP=Object.getOwnPropertyDescriptor,UP=Object.getOwnPropertyDescriptors,YP=Object.getOwnPropertySymbols,KP=Object.prototype.hasOwnProperty,XP=Object.prototype.propertyIsEnumerable,JP=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),ZP=e=>{throw TypeError(e)},QP=(e,t,n)=>t in e?VP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,eM=(e,t)=>{for(var n in t||(t={}))KP.call(t,n)&&QP(e,n,t[n]);if(YP)for(var n of YP(t))XP.call(t,n)&&QP(e,n,t[n]);return e},tM=(e,t)=>BP(e,UP(t)),nM=(e,t)=>VP(e,"name",{value:t,configurable:!0}),rM=(e,t)=>{var n={};for(var r in e)KP.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&YP)for(var r of YP(e))t.indexOf(r)<0&&XP.call(e,r)&&(n[r]=e[r]);return n},iM=e=>{var t;return[,,,HP(null!=(t=null==e?void 0:e[JP("metadata")])?t:null)]},oM=["class","method","getter","setter","accessor","field","value","get","set"],aM=e=>void 0!==e&&"function"!=typeof e?ZP("Function expected"):e,sM=(e,t,n,r,i)=>({kind:oM[e],name:t,metadata:r,addInitializer:e=>n._?ZP("Already initialized"):i.push(aM(e||null))}),lM=(e,t)=>QP(t,JP("metadata"),e[3]),uM=(e,t,n,r)=>{for(var i=0,o=e[t>>1],a=o&&o.length;i<a;i++)1&t?o[i].call(n):r=o[i].call(n,r);return r},cM=(e,t,n,r,i,o)=>{var a,s,l,u,c,d=7&t,p=!!(8&t),f=!!(16&t),h=d>3?e.length+1:d?p?1:2:0,m=oM[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)&&GP(d<4?i:{get[n](){return fM(this,o)},set[n](e){return mM(this,o,e)}},n));d?f&&d<4&&nM(o,(d>2?"set ":d>1?"get ":"")+n):nM(i,n);for(var b=r.length-1;b>=0;b--)u=sM(d,n,l={},e[3],v),d&&(u.static=p,u.private=f,c=u.access={has:f?e=>pM(i,e):e=>n in e},3^d&&(c.get=f?e=>(1^d?fM:gM)(e,i,4^d?o:y.get):e=>e[n]),d>2&&(c.set=f?(e,t)=>mM(e,i,t,4^d?o:y.set):(e,t)=>e[n]=t)),s=(0,r[b])(d?d<4?f?o:y[m]:d>4?void 0:{get:y.get,set:y.set}:i,u),l._=1,4^d||void 0===s?aM(s)&&(d>4?g.unshift(s):d?f?o=s:y[m]=s:i=s):"object"!=typeof s||null===s?ZP("Object expected"):(aM(a=s.get)&&(y.get=a),aM(a=s.set)&&(y.set=a),aM(a=s.init)&&g.unshift(a));return d||lM(e,i),y&&VP(i,n,y),f?4^d?o:y:i},dM=(e,t,n)=>t.has(e)||ZP("Cannot "+n),pM=(e,t)=>Object(t)!==t?ZP('Cannot use the "in" operator on this value'):e.has(t),fM=(e,t,n)=>(dM(e,t,"read from private field"),n?n.call(e):t.get(e)),hM=(e,t,n)=>t.has(e)?ZP("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),mM=(e,t,n,r)=>(dM(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),gM=(e,t,n)=>(dM(e,t,"access private method"),n),vM="button",yM="draggable",bM="dnd-kit-description",xM="dnd-kit-announcement",SM={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."},wM={dragstart({operation:{source:e}}){if(e)return`Picked up draggable item ${e.id}.`},dragover({operation:{source:e,target:t}}){if(e&&e.id!==(null==t?void 0:t.id))return t?`Draggable item ${e.id} was moved over droppable target ${t.id}.`:`Draggable item ${e.id} is no longer over a droppable target.`},dragend({operation:{source:e,target:t},canceled:n}){if(e)return n?`Dragging was cancelled. Draggable item ${e.id} was dropped.`:t?`Draggable item ${e.id} was dropped over droppable target ${t.id}`:`Draggable item ${e.id} was dropped.`}};function CM(e){const t=e.tagName.toLowerCase();return["input","select","textarea","a","button"].includes(t)}var EM=["dragover","dragmove"];var IM,DM,PM,MM,RM,kM,LM,AM,OM,TM,qM,_M,NM,jM=new Map,FM=class extends(RM=gE,MM=[Qw],PM=[eC],DM=[eC],IM=[eC],RM){constructor(e,t){super(e,t),uM(LM,5,this),hM(this,OM),hM(this,kM,new Set),hM(this,AM,uM(LM,8,this,new Set)),uM(LM,11,this),this.registerEffect(gM(this,OM,TM))}register(e){return fM(this,kM).add(e),()=>{fM(this,kM).delete(e)}}addRoot(e){return WS(()=>{const t=new Set(this.additionalRoots);t.add(e),this.additionalRoots=t}),()=>{WS(()=>{const t=new Set(this.additionalRoots);t.delete(e),this.additionalRoots=t})}}get sourceRoot(){var e;const{source:t}=this.manager.dragOperation;return ED(null!=(e=null==t?void 0:t.element)?e:null)}get targetRoot(){var e;const{target:t}=this.manager.dragOperation;return ED(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}};LM=iM(RM),kM=new WeakMap,AM=new WeakMap,OM=new WeakSet,TM=function(){const{roots:e}=this,t=[];for(const n of e)for(const e of fM(this,kM))t.push(gM(this,OM,qM).call(this,n,e));return()=>{for(const e of t)e()}},qM=function(e,t){let n=jM.get(e);n||(n=new Map,jM.set(e,n));let r=n.get(t);if(!r){const i=pD(e)?gM(this,OM,_M).call(this,e,n,t):gM(this,OM,NM).call(this,e,n,t);if(!i)return()=>{};r=i,n.set(t,r)}r.refCount++;let i=!1;return()=>{i||(i=!0,r.refCount--,0===r.refCount&&r.cleanup())}},_M=function(e,t,n){var r;const i=e.createElement("style"),{nonce:o}=null!=(r=this.options)?r:{};o&&i.setAttribute("nonce",o),i.textContent=n,e.head.prepend(i);const a=new MutationObserver(t=>{for(const n of t)for(const t of Array.from(n.removedNodes))if(t===i)return void e.head.prepend(i)});return a.observe(e.head,{childList:!0}),{refCount:0,cleanup:()=>{a.disconnect(),i.remove(),t.delete(n),0===t.size&&jM.delete(e)}}},NM=function(e,t,n){!("adoptedStyleSheets"in e)||Array.isArray(e.adoptedStyleSheets);const r=e.ownerDocument.defaultView,{CSSStyleSheet:i}=null!=r?r:{};if(!i)return null;const o=new i;return o.replaceSync(n),e.adoptedStyleSheets.push(o),{refCount:0,cleanup:()=>{var r;if(CD(e)&&(null==(r=e.host)?void 0:r.isConnected)){const t=e.adoptedStyleSheets.indexOf(o);-1!==t&&e.adoptedStyleSheets.splice(t,1)}t.delete(n),0===t.size&&jM.delete(e)}}},cM(LM,4,"additionalRoots",MM,FM,AM),cM(LM,2,"sourceRoot",PM,FM),cM(LM,2,"targetRoot",DM,FM),cM(LM,2,"roots",IM,FM),lM(LM,FM),FM.configure=pE(FM);var zM=FM,WM="data-dnd-",$M=`${WM}dropping`,HM="--dnd-",VM=`${WM}dragging`,BM=`${WM}placeholder`,GM=[VM,BM,"popover","aria-pressed","aria-grabbing"],UM=["view-transition-name"],YM=`\n :is(:root,:host) [${VM}] {\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(${HM}top, 0px) !important;\n left: var(${HM}left, 0px) !important;\n right: unset !important;\n bottom: unset !important;\n width: var(${HM}width, auto);\n max-width: var(${HM}width, auto);\n height: var(${HM}height, auto);\n max-height: var(${HM}height, auto);\n transform: var(${HM}transform, none) !important;\n transition: var(${HM}transition) !important;\n }\n\n :is(:root,:host) [${BM}] {\n transition: none;\n }\n\n :is(:root,:host) [${BM}='hidden'] {\n visibility: hidden;\n }\n\n [${VM}] * {\n pointer-events: none !important;\n }\n\n [${VM}]:not([${$M}]) {\n translate: var(${HM}translate) !important;\n }\n\n [${VM}][style*='${HM}scale'] {\n scale: var(${HM}scale) !important;\n transform-origin: var(${HM}transform-origin) !important;\n }\n\n @layer dnd-kit {\n :where([${VM}][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 [${VM}]::backdrop, [${WM}overlay]:not([${VM}]) {\n display: none;\n visibility: hidden;\n }\n`.replace(/\n+/g," ").replace(/\s+/g," ").trim();function KM(e,t="hidden"){return WS(()=>{const{element:n,manager:r}=e;if(!n||!r)return;const i=function(e,t){const n=new Map;for(const r of t)if(r.element&&(e===r.element||e.contains(r.element))){const e=`${WM}${zP("dom-id")}`;r.element.setAttribute(e,""),n.set(r,e)}return n}(n,r.registry.droppables),o=[],a=function(e){const t="input, textarea, select, canvas, [contenteditable]",n=e.cloneNode(!0),r=Array.from(e.querySelectorAll(t));return Array.from(n.querySelectorAll(t)).forEach((e,t)=>{const n=r[t];if(DD(e)&&DD(n)&&("file"!==e.type&&(e.value=n.value),"radio"===e.type&&e.name&&(e.name=`Cloned__${e.name}`)),PD(e)&&PD(n)&&n.width>0&&n.height>0){const t=e.getContext("2d");null==t||t.drawImage(n,0,0)}}),n}(n),{remove:s}=a;return function(e,t,n){for(const[r,i]of e){if(!r.element)continue;const e=`[${i}]`,o=t.matches(e)?t:t.querySelector(e);if(r.element.removeAttribute(i),!o)continue;const a=r.element;r.proxy=o,o.removeAttribute(i),RD.set(a,o),n.push(()=>{RD.delete(a),r.proxy=void 0})}}(i,a,o),function(e,t="hidden"){e.setAttribute("inert","true"),e.setAttribute("tab-index","-1"),e.setAttribute("aria-hidden","true"),e.setAttribute(BM,t)}(a,t),a.remove=()=>{o.forEach(e=>e()),s.call(a)},a})}function XM(e,t){return e===t||LD(e)===LD(t)}function JM(e){const{target:t}=e;"newState"in e&&"closed"===e.newState&&NP(t)&&t.hasAttribute("popover")&&requestAnimationFrame(()=>iP(t))}function ZM(e){return"TR"===e.tagName}var QM,eR,tR,nR,rR,iR,oR,aR=250,sR="ease";var lR=class extends(eR=hE,QM=[Qw],eR){constructor(e,t){super(e,t),hM(this,rR),hM(this,nR,uM(tR,8,this)),uM(tR,11,this),this.state={initial:{},current:{}};const n=e.registry.plugins.get(zM),r=null==n?void 0:n.register(YM);if(r){const e=this.destroy.bind(this);this.destroy=()=>{r(),e()}}this.registerEffect(gM(this,rR,iR).bind(this,n)),this.registerEffect(gM(this,rR,oR))}};tR=iM(eR),nR=new WeakMap,rR=new WeakSet,iR=function(e){const{overlay:t}=this;if(!t||!e)return;const n=ED(t);return n?e.addRoot(n):void 0},oR=function(){var e,t,n,r,i,o,a;const{state:s,manager:l,options:u}=this,{dragOperation:c}=l,{position:d,source:p,status:f}=c;if(f.idle)return s.current={},void(s.initial={});if(!p)return;const{element:h}=p,m=p.pluginConfig(lR),g=null!=(t=null!=(e=null==m?void 0:m.feedback)?e:null==u?void 0:u.feedback)?t:"default",v="function"==typeof g?g(p,l):g;if(!h||"none"===v||!f.initialized||f.initializing)return;const{initial:y}=s,b=null!=(n=this.overlay)?n:h,x=vP(b),S=vP(h),w=!XM(h,b),C=new TP(h,{frameTransform:w?S:null,ignoreTransforms:!w}),E=S.scaleX/x.scaleX,I=S.scaleY/x.scaleY;let{width:D,height:P,top:M,left:R}=C;w&&(D/=E,P/=I);const k=new _P(b),L=fP(h),{transition:A,translate:O,boxSizing:T,paddingBlockStart:q,paddingBlockEnd:_,paddingInlineStart:N,paddingInlineEnd:j,borderInlineStartWidth:F,borderInlineEndWidth:z,borderBlockStartWidth:W,borderBlockEndWidth:$}=L,H=A.split(",").filter(e=>!/^\s*(transform|translate|scale)\b/.test(e)).join(","),V=xP(L),B=L.transform,G="clone"===v,U="content-box"===T,Y=U?parseInt(N)+parseInt(j)+parseInt(F)+parseInt(z):0,K=U?parseInt(q)+parseInt(_)+parseInt(W)+parseInt($):0,X="move"===v||this.overlay?null:KM(p,G?"clone":"hidden"),J=WS(()=>jP(l.dragOperation.activatorEvent));if(!y.translate)if(this.overlay&&V)y.translate={x:V.x,y:V.y};else if("none"!==O){const e=bP(O);e&&(y.translate=e)}if(!y.transformOrigin){const e=WS(()=>d.current),t=R+(null!=(r=null==V?void 0:V.x)?r:0),n=M+(null!=(i=null==V?void 0:V.y)?i:0);y.transformOrigin={x:(e.x-t*x.scaleX-x.x)/(D*x.scaleX),y:(e.y-n*x.scaleY-x.y)/(P*x.scaleY)}}const{transformOrigin:Z}=y,Q=M*x.scaleY+x.y,ee=R*x.scaleX+x.x;if(!y.coordinates&&(y.coordinates={x:ee,y:Q},1!==E||1!==I)){const{scaleX:e,scaleY:t}=S,{x:n,y:r}=Z;y.coordinates.x+=(D*e-D)*n,y.coordinates.y+=(P*t-P)*r}y.dimensions||(y.dimensions={width:D,height:P}),y.frameTransform||(y.frameTransform=x);const te=y.coordinates.x-ee,ne=y.coordinates.y-Q,re=(y.dimensions.width*y.frameTransform.scaleX-D*x.scaleX)*Z.x,ie=(y.dimensions.height*y.frameTransform.scaleY-P*x.scaleY)*Z.y,oe={x:te/x.scaleX+re,y:ne/x.scaleY+ie},ae=R+oe.x,se=M+oe.y;b.setAttribute(VM,"true");const le=WS(()=>c.transform),ue=null!=(o=y.translate)?o:{x:0,y:0},ce=le.x*x.scaleX+ue.x,de=le.y*x.scaleY+ue.y,pe=wD();if(k.set({width:D-Y,height:P-K,top:se+pe.y,left:ae+pe.x,translate:`${ce}px ${de}px 0`,transform:this.overlay?"none":B,transition:H?`${H}, translate 0ms linear`:"translate 0ms linear",scale:w?`${E} ${I}`:"","transform-origin":`${100*Z.x}% ${100*Z.y}%`},HM),X&&(h.insertAdjacentElement("afterend",X),null==u?void 0:u.rootElement)){("function"==typeof u.rootElement?u.rootElement(p):u.rootElement).appendChild(h)}let fe,he,me;rP(b)&&(b.hasAttribute("popover")||b.setAttribute("popover","manual"),iP(b),b.addEventListener("beforetoggle",JM));const ge=(ve={placeholder:X,element:h,feedbackElement:b,frameTransform:x,transformOrigin:Z,width:D,height:P,top:M,left:R,widthOffset:Y,heightOffset:K,delta:oe,styles:k,dragOperation:c,getTranslate:()=>s.current.translate,getElementMutationObserver:()=>fe,getSavedCellWidths:()=>me,setSavedCellWidths:e=>{me=e}},new ResizeObserver(()=>{var e,t,n;const r=new TP(ve.placeholder,{frameTransform:ve.frameTransform,ignoreTransforms:!0}),i=null!=(e=ve.transformOrigin)?e:{x:1,y:1},o=(ve.width-r.width)*i.x+ve.delta.x,a=(ve.height-r.height)*i.y+ve.delta.y,s=wD();if(ve.styles.set({width:r.width-ve.widthOffset,height:r.height-ve.heightOffset,top:ve.top+a+s.y,left:ve.left+o+s.x},HM),null==(t=ve.getElementMutationObserver())||t.takeRecords(),ZM(ve.element)&&ZM(ve.placeholder)){const e=Array.from(ve.element.cells),t=Array.from(ve.placeholder.cells);ve.getSavedCellWidths()||ve.setSavedCellWidths(e.map(e=>e.style.width));for(const[n,r]of e.entries()){const e=t[n];r.style.width=`${e.getBoundingClientRect().width}px`}}const l=null!=(n=ve.getTranslate())?n:{x:0,y:0},u=ve.left+o+s.x+l.x,c=ve.top+a+s.y+l.y,d=r.width-ve.widthOffset,p=r.height-ve.heightOffset,f=ve.frameTransform;ve.dragOperation.shape=new PC(u*f.scaleX+f.x,c*f.scaleY+f.y,d*f.scaleX,p*f.scaleY)}));var ve;const ye=new TP(b);WS(()=>c.shape=ye);const be=dD(b),xe=e=>{this.manager.actions.stop({event:e})},Se=ID(be);J&&be.addEventListener("resize",xe),"idle"===WS(()=>p.status)&&requestAnimationFrame(()=>p.status="dragging"),X&&(ge.observe(X),fe=function(e,t,n){const r=new MutationObserver(r=>{let i=!1;for(const n of r){if(n.target!==e){i=!0;continue}if("attributes"!==n.type)continue;const r=n.attributeName;if(r.startsWith("aria-")||GM.includes(r))continue;const o=e.getAttribute(r);if("style"===r){if(qP(e)&&qP(t)){const n=e.style;for(const e of Array.from(t.style))""===n.getPropertyValue(e)&&t.style.removeProperty(e);for(const e of Array.from(n)){if(UM.includes(e)||e.startsWith(HM))continue;const r=n.getPropertyValue(e);t.style.setProperty(e,r)}}}else null!==o?t.setAttribute(r,o):t.removeAttribute(r)}i&&n&&t.replaceChildren(...e.cloneNode(!0).childNodes)});return r.observe(e,{attributes:!0,subtree:!0,childList:!0}),r}(h,X,G),he=function(e,t,n){const r=new MutationObserver(r=>{for(const i of r)if(0!==i.addedNodes.length)for(const r of Array.from(i.addedNodes)){if(r.contains(e)&&e.nextElementSibling!==t)return e.insertAdjacentElement("afterend",t),void iP(n);if(r.contains(t)&&t.previousElementSibling!==e)return t.insertAdjacentElement("beforebegin",e),void iP(n)}e.isConnected&&t.isConnected&&e.nextElementSibling!==t&&(e.insertAdjacentElement("afterend",t),iP(n))});return r.observe(e.ownerDocument.body,{childList:!0,subtree:!0}),r}(h,X,b));const we=null==(a=l.dragOperation.source)?void 0:a.id,Ce=()=>{var e;if(!J||null==we)return;const t=l.registry.draggables.get(we),n=null!=(e=null==t?void 0:t.handle)?e:null==t?void 0:t.element;fD(n)&&n.focus()},Ee=()=>{var e;if(null==fe||fe.disconnect(),null==he||he.disconnect(),ge.disconnect(),be.removeEventListener("resize",xe),rP(b)&&(b.removeEventListener("beforetoggle",JM),b.removeAttribute("popover")),b.removeAttribute(VM),k.reset(),me&&ZM(h)){const t=Array.from(h.cells);for(const[n,r]of t.entries())r.style.width=null!=(e=me[n])?e:""}p.status="idle";const t=null!=s.current.translate,n=c.status.dragging;X&&(!n&&t||X.parentElement!==b.parentElement)&&b.isConnected&&X.replaceWith(b),null==X||X.remove()},Ie=null==u?void 0:u.dropAnimation,De=this,Pe=nC(()=>{var e,t,n;const{transform:r,status:i}=c;if((r.x||r.y||s.current.translate)&&i.dragging){const i=null!=(e=y.translate)?e:{x:0,y:0},o={x:r.x/x.scaleX+i.x,y:r.y/x.scaleY+i.y},a=s.current.translate,l=WS(()=>c.modifiers),d=WS(()=>{var e;return null==(e=c.shape)?void 0:e.current}),p=null==u?void 0:u.keyboardTransition,f=J&&!Se&&null!==p?`${null!=(t=null==p?void 0:p.duration)?t:250}ms ${null!=(n=null==p?void 0:p.easing)?n:"cubic-bezier(0.25, 1, 0.5, 1)"}`:"0ms linear";if(k.set({transition:H?`${H}, translate ${f}`:`translate ${f}`,translate:`${o.x}px ${o.y}px 0`},HM),null==fe||fe.takeRecords(),d&&d!==ye&&a&&!l.length){const e=DC.delta(o,a);c.shape=PC.from(d.boundingRectangle).translate(e.x*x.scaleX,e.y*x.scaleY)}else c.shape=new TP(b);s.current.translate=o}},function(){if(c.status.dropped){this.dispose(),p.status="dropping";const e=void 0!==(null==m?void 0:m.dropAnimation)?m.dropAnimation:void 0!==De.dropAnimation?De.dropAnimation:Ie;let t=s.current.translate;const n=null!=t;if(t||h===b||(t={x:0,y:0}),!t||null===e)return void Ee();l.renderer.rendering.then(()=>{!function(e){var t,n,r,i;const{animation:o}=e;if("function"==typeof o){const t=o({source:e.source,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=aR,easing:s=sR}=null!=o?o:{};iP(e.feedbackElement);const[,l]=null!=(t=sD(e.feedbackElement,e=>"translate"in e))?t:[];null==l||l.pause();const u=null!=(n=e.placeholder)?n:e.element,c={frameTransform:XM(e.feedbackElement,u)?null:void 0},d=new TP(e.feedbackElement,c),p=null!=(r=bP(fP(e.feedbackElement).translate))?r:e.translate,f=new TP(u,c),h=PC.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},HM),e.feedbackElement.setAttribute($M,""),null==(i=e.getElementMutationObserver())||i.takeRecords(),MP({element:e.feedbackElement,keyframes:tM(eM(eM({},v),y),{translate:[`${p.x}px ${p.y}px 0`,`${m}px ${g}px 0`]}),options:{duration:ID(dD(e.feedbackElement))?0:e.moved||e.feedbackElement!==e.element?a:0,easing:s}}).then(()=>{e.feedbackElement.removeAttribute($M),null==l||l.finish(),e.cleanup(),requestAnimationFrame(e.restoreFocus)})}({source:p,element:h,feedbackElement:b,placeholder:X,translate:t,moved:n,transition:A,alignment:p.alignment,styles:k,animation:null!=e?e:void 0,getElementMutationObserver:()=>fe,cleanup:Ee,restoreFocus:Ce})})}});return()=>{Ee(),Pe()}},cM(tR,4,"overlay",QM,lR,nR),lM(tR,lR),lR.configure=pE(lR);var uR,cR,dR,pR,fR,hR,mR,gR=lR,vR=!0;dR=[Qw],pR=SP.Forward,uR=[Qw],cR=SP.Reverse;var yR=class{constructor(){hM(this,hR,uM(fR,8,this,vR)),uM(fR,11,this),hM(this,mR,uM(fR,12,this,vR)),uM(fR,15,this)}isLocked(e){return e!==SP.Idle&&(null==e?this[SP.Forward]===vR&&this[SP.Reverse]===vR:this[e]===vR)}unlock(e){e!==SP.Idle&&(this[e]=false)}};fR=iM(null),hR=new WeakMap,mR=new WeakMap,cM(fR,4,pR,dR,yR,hR),cM(fR,4,cR,uR,yR,mR),lM(fR,yR);var bR,xR,SR,wR,CR,ER,IR=[SP.Forward,SP.Reverse],DR=class{constructor(){this.x=new yR,this.y=new yR}isLocked(){return this.x.isLocked()&&this.y.isLocked()}},PR=class extends hE{constructor(e){super(e);const t=JS(new DR);let n=null;this.signal=t,sw(()=>{const{status:r}=e.dragOperation;if(!r.initialized)return n=null,void(t.value=new DR);const{delta:i}=e.dragOperation.position;if(n){const e={x:MR(i.x,n.x),y:MR(i.y,n.y)},r=t.peek();FS(()=>{for(const t of _C)for(const n of IR)e[t]===n&&r[t].unlock(n);t.value=r})}n=i})}get current(){return this.signal.peek()}};function MR(e,t){return Math.sign(e-t)}var RR=class extends(xR=gE,bR=[Qw],xR){constructor(e){super(e),hM(this,wR,uM(SR,8,this,!1)),uM(SR,11,this),hM(this,CR),hM(this,ER,()=>{if(!fM(this,CR))return;const{element:e,by:t}=fM(this,CR);t.y&&(e.scrollTop+=t.y),t.x&&(e.scrollLeft+=t.x)}),this.scroll=(e,t)=>{var n;if(this.disabled)return!1;const r=this.getScrollableElements();if(!r)return mM(this,CR,void 0),!1;const{position:i}=this.manager.dragOperation,o=null==i?void 0:i.current;if(o){const{by:i}=null!=e?e:{},a=i?{x:kR(i.x),y:kR(i.y)}:void 0,s=a?void 0:this.scrollIntentTracker.current;if(null==s?void 0:s.isLocked())return!1;for(const e of r){const r=sP(e,i);if(r.x||r.y){const{speed:r,direction:l}=EP(e,o,a,null==t?void 0:t.acceleration,null==t?void 0:t.threshold);if(s)for(const e of _C)s[e].isLocked(l[e])&&(r[e]=0,l[e]=0);if(l.x||l.y){const{x:t,y:o}=null!=i?i:l,a=t*r.x,s=o*r.y;if(a||s){const t=null==(n=fM(this,CR))?void 0:n.by;if(this.autoScrolling&&t){if(t.x&&!a||t.y&&!s)continue}return mM(this,CR,{element:e,by:{x:a,y:s}}),uP.schedule(fM(this,ER)),!0}}}}}return mM(this,CR,void 0),!1};let t=null,n=null;const r=Jw(()=>{const{position:n,source:r}=e.dragOperation;if(!n)return null;const i=MD(ED(null==r?void 0:r.element),n.current);return i&&(t=i),null!=i?i:t}),i=Jw(()=>{const t=r.value,{documentElement:i}=mD(t);if(!t||t===i){const{target:t}=e.dragOperation,r=null==t?void 0:t.element;if(r){const e=gP(r,{excludeElement:!1});return n=e,e}}if(t){const e=gP(t,{excludeElement:!1});return this.autoScrolling&&n&&e.size<(null==n?void 0:n.size)?n:(n=e,e)}return n=null,null},Zw);this.getScrollableElements=()=>i.value,this.scrollIntentTracker=new PR(e),this.destroy=e.monitor.addEventListener("dragmove",t=>{!this.disabled&&!t.defaultPrevented&&jP(e.dragOperation.activatorEvent)&&t.by&&this.scroll({by:t.by})&&t.preventDefault()})}};function kR(e){return e>0?SP.Forward:e<0?SP.Reverse:SP.Idle}SR=iM(xR),wR=new WeakMap,CR=new WeakMap,ER=new WeakMap,cM(SR,4,"autoScrolling",bR,RR,wR),lM(SR,RR);var LR=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()}),AR=class extends hE{constructor(e,t){super(e,t);const n=e.registry.plugins.get(RR);if(!n)throw new Error("AutoScroller plugin depends on Scroller plugin");this.destroy=sw(()=>{var t,r,i;if(this.disabled)return;const{position:o,status:a}=e.dragOperation;if(a.dragging){const e={acceleration:null==(t=this.options)?void 0:t.acceleration,threshold:"number"==typeof(null==(r=this.options)?void 0:r.threshold)?{x:this.options.threshold,y:this.options.threshold}:null==(i=this.options)?void 0:i.threshold};if(n.scroll(void 0,e)){n.autoScrolling=!0;const t=setInterval(()=>LR.schedule(()=>n.scroll(void 0,e)),10);return()=>{clearInterval(t)}}n.autoScrolling=!1}})}};AR.configure=pE(AR);var OR,TR=AR,qR={capture:!0,passive:!0},_R=class extends gE{constructor(e){super(e),hM(this,OR),this.handleScroll=()=>{null==fM(this,OR)&&mM(this,OR,setTimeout(()=>{this.manager.collisionObserver.forceUpdate(!1),mM(this,OR,void 0)},50))};const{dragOperation:t}=this.manager;this.destroy=sw(()=>{var e,n,r;if(t.status.dragging){const i=null!=(r=null==(n=null==(e=t.source)?void 0:e.element)?void 0:n.ownerDocument)?r:document;return i.addEventListener("scroll",this.handleScroll,qR),()=>{i.removeEventListener("scroll",this.handleScroll,qR)}}})}};OR=new WeakMap;function NR(){var e;null==(e=document.getSelection())||e.removeAllRanges()}var jR,FR=Object.freeze({offset:10,keyboardCodes:{start:["Space","Enter"],cancel:["Escape"],end:["Space","Enter","Tab"],up:["ArrowUp"],down:["ArrowDown"],left:["ArrowLeft"],right:["ArrowRight"]},preventActivation(e,t){var n;const r=null!=(n=t.handle)?n:t.element;return e.target!==r}}),zR=class extends DI{constructor(e,t){super(e),this.manager=e,this.options=t,hM(this,jR,[]),this.listeners=new kD,this.handleSourceKeyDown=(e,t,n)=>{if(this.disabled||e.defaultPrevented)return;if(!NP(e.target))return;if(t.disabled)return;const{keyboardCodes:r=FR.keyboardCodes,preventActivation:i=FR.preventActivation}=null!=n?n:{};r.start.includes(e.code)&&this.manager.dragOperation.status.idle&&((null==i?void 0:i(e,t))||this.handleStart(e,t,n))}}bind(e,t=this.options){const n=sw(()=>{var n;const r=null!=(n=e.handle)?n:e.element,i=n=>{jP(n)&&this.handleSourceKeyDown(n,e,t)};if(r)return r.addEventListener("keydown",i),()=>{r.removeEventListener("keydown",i)}});return n}handleStart(e,t,n){const{element:r}=t;if(!r)throw new Error("Source draggable does not have an associated element");e.preventDefault(),e.stopImmediatePropagation(),IP(r);const{center:i}=new TP(r);if(this.manager.actions.start({event:e,coordinates:{x:i.x,y:i.y},source:t}).signal.aborted)return this.cleanup();this.sideEffects();const o=mD(r),a=[this.listeners.bind(o,[{type:"keydown",listener:e=>this.handleKeyDown(e,t,n),options:{capture:!0}}])];fM(this,jR).push(...a)}handleKeyDown(e,t,n){const{keyboardCodes:r=FR.keyboardCodes}=null!=n?n:{};if(HR(e,[...r.end,...r.cancel])){e.preventDefault();const t=HR(e,r.cancel);return void this.handleEnd(e,t)}HR(e,r.up)?this.handleMove("up",e):HR(e,r.down)&&this.handleMove("down",e),HR(e,r.left)?this.handleMove("left",e):HR(e,r.right)&&this.handleMove("right",e)}handleEnd(e,t){this.manager.actions.stop({event:e,canceled:t}),this.cleanup()}handleMove(e,t){var n,r;const{shape:i}=this.manager.dragOperation,o=t.shiftKey?5:1;let a={x:0,y:0},s=null!=(r=null==(n=this.options)?void 0:n.offset)?r:FR.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(TR);!1===(null==e?void 0:e.disabled)&&(e.disable(),fM(this,jR).push(()=>{e.enable()}))}cleanup(){fM(this,jR).forEach(e=>e()),mM(this,jR,[])}destroy(){this.cleanup(),this.listeners.clear()}};jR=new WeakMap,zR.configure=pE(zR),zR.defaults=FR;var WR,$R=zR;function HR(e,t){return t.includes(e.code)}var VR,BR;WR=new WeakMap;VR=new WeakMap,BR=new WeakMap;var GR=class{};GR.Delay=class extends MI{constructor(){super(...arguments),hM(this,VR),hM(this,BR)}onEvent(e){switch(e.type){case"pointerdown":mM(this,BR,yD(e)),mM(this,VR,setTimeout(()=>this.activate(e),this.options.value));break;case"pointermove":if(!fM(this,BR))return;const{x:t,y:n}=yD(e);kC({x:t-fM(this,BR).x,y:n-fM(this,BR).y},this.options.tolerance)&&this.abort();break;case"pointerup":this.abort()}}abort(){fM(this,VR)&&(clearTimeout(fM(this,VR)),mM(this,BR,void 0),mM(this,VR,void 0))}},GR.Distance=class extends MI{constructor(){super(...arguments),hM(this,WR)}onEvent(e){switch(e.type){case"pointerdown":mM(this,WR,yD(e));break;case"pointermove":if(!fM(this,WR))return;const{x:t,y:n}=yD(e),r={x:t-fM(this,WR).x,y:n-fM(this,WR).y},{tolerance:i}=this.options;if(i&&kC(r,i))return void this.abort();kC(r,this.options.value)&&this.activate(e);break;case"pointerup":this.abort()}}abort(){mM(this,WR,void 0)}};var UR,YR=Object.freeze({activationConstraints(e,t){var n;const{pointerType:r,target:i}=e;if("mouse"!==r||!NP(i)||t.handle!==i&&!(null==(n=t.handle)?void 0:n.contains(i)))return"touch"===r?[new GR.Delay({value:250,tolerance:5})]:function(e){if(!NP(e))return!1;const{tagName:t}=e;return"INPUT"===t||"TEXTAREA"===t||(n=e).hasAttribute("contenteditable")&&"false"!==n.getAttribute("contenteditable");var n}(i)&&!e.defaultPrevented?[new GR.Delay({value:200,tolerance:0})]:[new GR.Delay({value:200,tolerance:10}),new GR.Distance({value:5})]},preventActivation(e,t){var n;const{target:r}=e;return r!==t.element&&(r!==t.handle&&(!!NP(r)&&(!(null==(n=t.handle)?void 0:n.contains(r))&&Boolean(r.closest('\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n a[href],\n [contenteditable]:not([contenteditable="false"])\n ')))))}}),KR=class extends DI{constructor(e,t){super(e),this.manager=e,this.options=t,hM(this,UR,new Set),this.listeners=new kD,this.latest={event:void 0,coordinates:void 0},this.handleMove=()=>{const{event:e,coordinates:t}=this.latest;e&&t&&this.manager.actions.move({event:e,to:t})},this.handleCancel=this.handleCancel.bind(this),this.handlePointerUp=this.handlePointerUp.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}activationConstraints(e,t,n=this.options){const{activationConstraints:r=YR.activationConstraints}=null!=n?n:{};return"function"==typeof r?r(e,t):r}bind(e,t=this.options){const n=sw(()=>{var n;const r=new AbortController,{signal:i}=r,o=n=>{(function(e){if(!e)return!1;const{PointerEvent:t}=dD(e.target);return e instanceof t})(n)&&this.handlePointerDown(n,e,t)};let a=[null!=(n=e.handle)?n:e.element];(null==t?void 0:t.activatorElements)&&(a=Array.isArray(t.activatorElements)?t.activatorElements:t.activatorElements(e));for(const e of a)e&&(ek(e.ownerDocument.defaultView),e.addEventListener("pointerdown",o,{signal:i}));return()=>r.abort()});return n}handlePointerDown(e,t,n){if(this.disabled||!e.isPrimary||0!==e.button||!NP(e.target)||t.disabled||function(e){return"sensor"in e}(e)||!this.manager.dragOperation.status.idle)return;const{preventActivation:r=YR.preventActivation}=null!=n?n:{};if(null==r?void 0:r(e,t))return;const{target:i}=e,o=fD(i)&&i.draggable&&"true"===i.getAttribute("draggable"),a=vP(t.element),{x:s,y:l}=yD(e);this.initialCoordinates={x:s*a.scaleX+a.x,y:l*a.scaleY+a.y};const u=this.activationConstraints(e,t,n);e.sensor=this;const c=new PI(u,e=>this.handleStart(t,e));c.signal.onabort=()=>this.handleCancel(e),c.onEvent(e),this.controller=c;const d=xD(),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:JR,options:{capture:!0}}]);fM(this,UR).add(()=>{p(),this.initialCoordinates=void 0})}handlePointerMove(e,t){var n,r;if(!1!==(null==(n=this.controller)?void 0:n.activated)){if(this.manager.dragOperation.status.dragging){const n=yD(e),r=vP(t.element);n.x=n.x*r.scaleX+r.x,n.y=n.y*r.scaleY+r.y,e.preventDefault(),e.stopPropagation(),this.latest.event=e,this.latest.coordinates=n,uP.schedule(this.handleMove)}}else null==(r=this.controller)||r.onEvent(e)}handlePointerUp(e){const{status:t}=this.manager.dragOperation;if(!t.idle){e.preventDefault(),e.stopPropagation();const n=!t.initialized;this.manager.actions.stop({event:e,canceled:n})}this.cleanup()}handleKeyDown(e){"Escape"===e.key&&(e.preventDefault(),this.handleCancel(e))}handleStart(e,t){const{manager:n,initialCoordinates:r}=this;if(!r||!n.dragOperation.status.idle)return;if(t.defaultPrevented)return;if(n.actions.start({coordinates:r,event:t,source:e}).signal.aborted)return this.cleanup();t.preventDefault();const i=mD(t.target).body;try{i.setPointerCapture(t.pointerId)}catch(e){return void this.handleCancel(t)}const o=NP(t.target)?[t.target,i]:i,a=this.listeners.bind(o,[{type:"touchmove",listener:JR,options:{passive:!1}},{type:"click",listener:JR},{type:"contextmenu",listener:JR},{type:"keydown",listener:this.handleKeyDown}]);fM(this,UR).add(a)}handleCancel(e){const{dragOperation:t}=this.manager;t.status.initialized&&this.manager.actions.stop({event:e,canceled:!0}),this.cleanup()}cleanup(){const{controller:e}=this;this.controller=void 0,e&&!e.signal.aborted&&e.abort(),this.latest={event:void 0,coordinates:void 0},fM(this,UR).forEach(e=>e()),fM(this,UR).clear()}destroy(){this.cleanup(),this.listeners.clear()}};UR=new WeakMap,KR.configure=pE(KR),KR.defaults=YR;var XR=KR;function JR(e){e.preventDefault()}function ZR(){}var QR=new WeakSet;function ek(e){e&&!QR.has(e)&&(e.addEventListener("touchmove",ZR,{capture:!1,passive:!1}),QR.add(e))}var tk,nk,rk,ik,ok,ak,sk,lk,uk,ck,dk,pk,fk,hk,mk,gk,vk={modifiers:[],plugins:[class extends hE{constructor(e,t){super(e);const{id:n,idPrefix:{description:r=bM,announcement:i=xM}={},announcements:o=wM,screenReaderInstructions:a=SM,debounce:s=500}=null!=t?t:{},l=n?`${r}-${n}`:zP(r),u=n?`${i}-${n}`:zP(i);let c,d,p,f;const h=(e=f)=>{p&&e&&(null==p?void 0:p.nodeValue)!==e&&(p.nodeValue=e)},m=()=>uP.schedule(h),g=function(e,t){let n;const r=()=>{clearTimeout(n),n=setTimeout(e,t)};return r.cancel=()=>clearTimeout(n),r}(m,s),v=Object.entries(o).map(([e,t])=>this.manager.monitor.addEventListener(e,(n,r)=>{const i=p;if(!i)return;const o=null==t?void 0:t(n,r);o&&i.nodeValue!==o&&(f=o,EM.includes(e)?g():(m(),g.cancel()))})),y=()=>{let e=[];(null==c?void 0:c.isConnected)||(c=function(e,t){const n=document.createElement("div");return n.id=e,n.style.setProperty("display","none"),n.textContent=t,n}(l,a.draggable),e.push(c)),(null==d?void 0:d.isConnected)||(d=function(e){const t=document.createElement("div");return t.id=e,t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true"),t.style.setProperty("position","fixed"),t.style.setProperty("width","1px"),t.style.setProperty("height","1px"),t.style.setProperty("margin","-1px"),t.style.setProperty("border","0"),t.style.setProperty("padding","0"),t.style.setProperty("overflow","hidden"),t.style.setProperty("clip","rect(0 0 0 0)"),t.style.setProperty("clip-path","inset(100%)"),t.style.setProperty("white-space","nowrap"),t}(u),p=document.createTextNode(""),d.appendChild(p),e.push(d)),e.length>0&&document.body.append(...e)},b=new Set;function x(){for(const e of b)e()}this.registerEffect(()=>{var e;b.clear();for(const t of this.manager.registry.draggables.value){const n=null!=(e=t.handle)?e:t.element;if(n){c&&d||b.add(y),CM(n)&&!SD()||n.hasAttribute("tabindex")||b.add(()=>n.setAttribute("tabindex","0")),n.hasAttribute("role")||"button"===n.tagName.toLowerCase()||b.add(()=>n.setAttribute("role",vM)),n.hasAttribute("aria-roledescription")||b.add(()=>n.setAttribute("aria-roledescription",yM)),n.hasAttribute("aria-describedby")||b.add(()=>n.setAttribute("aria-describedby",l));for(const e of["aria-pressed","aria-grabbed"]){const r=String(t.isDragging);n.getAttribute(e)!==r&&b.add(()=>n.setAttribute(e,r))}const e=String(t.disabled);n.getAttribute("aria-disabled")!==e&&b.add(()=>n.setAttribute("aria-disabled",e))}}b.size>0&&uP.schedule(x)}),this.destroy=()=>{super.destroy(),null==c||c.remove(),null==d||d.remove(),v.forEach(e=>e())}}},TR,class extends hE{constructor(e,t){super(e,t),this.manager=e;const{cursor:n="grabbing"}=null!=t?t:{},r=e.registry.plugins.get(zM),i=null==r?void 0:r.register(`* { cursor: ${n} !important; }`);if(i){const e=this.destroy.bind(this);this.destroy=()=>{i(),e()}}}},gR,class extends hE{constructor(e){super(e),this.manager=e;const t=e.registry.plugins.get(zM),n=null==t?void 0:t.register("* { user-select: none !important; -webkit-user-select: none !important; }");if(this.destroy=sw(()=>{const{dragOperation:e}=this.manager;if(e.status.initialized)return NR(),document.addEventListener("selectionchange",NR,{capture:!0}),()=>{document.removeEventListener("selectionchange",NR,{capture:!0})}}),n){const e=this.destroy.bind(this);this.destroy=()=>{n(),e()}}}}],sensors:[XR,$R]},yk=class extends QI{constructor(e={}){const t=ZI(e.plugins,vk.plugins),n=ZI(e.sensors,vk.sensors),r=ZI(e.modifiers,vk.modifiers);super(tM(eM({},e),{plugins:[_R,RR,zM,...t],sensors:n,modifiers:r}))}},bk=class extends(rk=aI,nk=[Qw],tk=[Qw],rk){constructor(e,t){var n=e,{element:r,effects:i=()=>[],handle:o}=n,a=rM(n,["element","effects","handle"]);super(eM({effects:()=>[...i(),()=>{var e,t;const{manager:n}=this;if(!n)return;const r=(null!=(t=null==(e=this.sensors)?void 0:e.map(fE))?t:[...n.sensors]).map(e=>{const t=e instanceof DI?e:n.registry.register(e.plugin),r=e instanceof DI?void 0:e.options;return t.bind(this,r)});return function(){r.forEach(e=>e())}}]},a),t),hM(this,ok,uM(ik,8,this)),uM(ik,11,this),hM(this,ak,uM(ik,12,this)),uM(ik,15,this),this.element=r,this.handle=o}};ik=iM(rk),ok=new WeakMap,ak=new WeakMap,cM(ik,4,"handle",nk,bk,ok),cM(ik,4,"element",tk,bk,ak),lM(ik,bk);var xk=class extends(uk=sI,lk=[Qw],sk=[Qw],uk){constructor(e,t){var n=e,{element:r,effects:i=()=>[]}=n,o=rM(n,["element","effects"]);const{collisionDetector:a=WP}=o,s=e=>{const{manager:t,element:n}=this;if(!n||null===e)return void(this.shape=void 0);if(!t)return;const r=new TP(n),i=WS(()=>this.shape);return r&&(null==i?void 0:i.equals(r))?i:(this.shape=r,r)},l=JS(!1);super(tM(eM({},o),{collisionDetector:a,effects:()=>[...i(),()=>{const{element:e,manager:t}=this;if(!t)return;const{dragOperation:n}=t,{source:r}=n;l.value=Boolean(r&&n.status.initialized&&e&&!this.disabled&&this.accepts(r))},()=>{const{element:e}=this;if(l.value&&e){const t=new nP(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),hM(this,mk),hM(this,dk,uM(ck,8,this)),uM(ck,11,this),hM(this,gk,uM(ck,12,this)),uM(ck,15,this),this.element=r,this.refreshShape=()=>s()}set element(e){mM(this,mk,e,hk)}get element(){var e;return null!=(e=this.proxy)?e:fM(this,mk,fk)}};function Sk(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}ck=iM(uk),dk=new WeakMap,mk=new WeakSet,gk=new WeakMap,pk=cM(ck,20,"#element",lk,mk,dk),fk=pk.get,hk=pk.set,cM(ck,4,"proxy",sk,xk,gk),lM(ck,xk);var wk="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?v:f;function Ck(){const e=g(0)[1];return m(()=>{e(e=>e+1)},[e])}function Ek(e,t=[],n=!1){const r=u(e);return r.current=e,function(e,t=!1){const n=u(e.peek()),r=u(!1),i=Ck();return wk(()=>sw(()=>{const o=n.current,a=e.value;if(o!==a){if(n.current=a,!r.current)return;t?D(i):i()}}),[e,t,i]),{get value(){return r.current=!0,e.peek()}}}(y(()=>Jw(()=>r.current()),t),n)}function Ik(e,t){const n=u(new Map),r=Ck();return wk(()=>{if(e)return sw(()=>{var i;let o=!1,a=!1;for(const r of n.current){const[s]=r,l=WS(()=>r[1]),u=e[s];l!==u&&(o=!0,n.current.set(s,u),a=null!=(i=null==t?void 0:t(s,l,u))&&i)}o&&(a?queueMicrotask(()=>D(r)):r())});n.current.clear()},[e]),y(()=>e?new Proxy(e,{get(e,t){const r=e[t];return n.current.set(t,r),r}}):e,[e])}function Dk(e,t){e()}function Pk(e){const t=u(e);return wk(()=>{t.current=e},[e]),t}function Mk(e,t,n=f,r=Object.is){const i=u(e);n(()=>{const n=i.current;r(e,n)||(i.current=e,t(e,n))},[t,e])}function Rk(e,t){const n=u(Sk(e));wk(()=>{const r=Sk(e);r!==n.current&&(n.current=r,t(r))})}var kk=Object.defineProperty,Lk=Object.defineProperties,Ak=Object.getOwnPropertyDescriptors,Ok=Object.getOwnPropertySymbols,Tk=Object.prototype.hasOwnProperty,qk=Object.prototype.propertyIsEnumerable,_k=(e,t,n)=>t in e?kk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Nk=new yk,jk=d(Nk),Fk=x(r(({children:e},t)=>{const[n,r]=g(0),i=u(null),o=u(null),a=y(()=>({renderer:{get rendering(){var e;return null!=(e=i.current)?e:Promise.resolve()}},trackRendering(e){i.current||(i.current=new Promise(e=>{o.current=e})),S(()=>{e(),r(e=>e+1)})}}),[]);return wk(()=>{var e;null==(e=o.current)||e.call(o),i.current=null},[e,n]),w(t,()=>a),null})),zk=[void 0,Zw];function Wk(e){var t=e,{children:n,onCollision:r,onBeforeDragStart:i,onDragStart:o,onDragMove:a,onDragOver:s,onDragEnd:l}=t,c=((e,t)=>{var n={};for(var r in e)Tk.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&Ok)for(var r of Ok(e))t.indexOf(r)<0&&qk.call(e,r)&&(n[r]=e[r]);return n})(t,["children","onCollision","onBeforeDragStart","onDragStart","onDragMove","onDragOver","onDragEnd"]);const d=u(null),{plugins:p,modifiers:h,sensors:m}=c,g=ZI(p,vk.plugins),v=ZI(m,vk.sensors),y=ZI(h,vk.modifiers),x=Pk(i),S=Pk(o),w=Pk(s),C=Pk(a),E=Pk(l),I=Pk(r),D=function(e){const t=u(null);t.current||(t.current=e());return b(()=>()=>{var e;return null==(e=t.current)?void 0:e.destroy()},[]),t.current}(()=>{var e;return null!=(e=c.manager)?e:new yk(c)});return f(()=>{if(!d.current)throw new Error("Renderer not found");const{renderer:e,trackRendering:t}=d.current,{monitor:n}=D;D.renderer=e;const r=[n.addEventListener("beforedragstart",e=>{const n=x.current;n&&t(()=>n(e,D))}),n.addEventListener("dragstart",e=>{var t;return null==(t=S.current)?void 0:t.call(S,e,D)}),n.addEventListener("dragover",e=>{const n=w.current;n&&t(()=>n(e,D))}),n.addEventListener("dragmove",e=>{const n=C.current;n&&t(()=>n(e,D))}),n.addEventListener("dragend",e=>{const n=E.current;n&&t(()=>n(e,D))}),n.addEventListener("collision",e=>{var t;return null==(t=I.current)?void 0:t.call(I,e,D)})];return()=>r.forEach(e=>e())},[D]),Mk(g,()=>D&&(D.plugins=g),...zk),Mk(v,()=>D&&(D.sensors=v),...zk),Mk(y,()=>D&&(D.modifiers=y),...zk),Yn.jsxs(jk.Provider,{value:D,children:[Yn.jsx(Fk,{ref:d,children:n}),n]})}function $k(){return i(jk)}function Hk(e){var t;const n=null!=(t=$k())?t:void 0,[r]=g(()=>e(n));return r.manager!==n&&(r.manager=n),wk(r.register,[n,r]),r}function Vk({children:e,className:t,dropAnimation:n,style:r,tag:i,disabled:o}){var a;const s=u(null),l=$k(),d=null!=(a=Ek(()=>null==l?void 0:l.dragOperation.source,[l]).value)?a:null,p="function"==typeof o?o(d):o;f(()=>{if(!s.current||!l||p)return;const e=l.plugins.find(e=>e instanceof gR);return e?(e.overlay=s.current,()=>{e.overlay=void 0}):void 0},[l,p]),f(()=>{if(!l)return;const e=l.plugins.find(e=>e instanceof gR);return e?(e.dropAnimation=n,()=>{e.dropAnimation=void 0}):void 0},[l,n]);const h=y(()=>{if(!l)return null;const e=new Proxy(l.registry,{get:(e,t)=>"register"===t||"unregister"===t?Bk:e[t]});return new Proxy(l,{get:(t,n)=>"registry"===n?e:t[n]})},[l]);return Yn.jsx(jk.Provider,{value:h,children:c(i||"div",{ref:s,className:t,style:r,"data-dnd-overlay":!0},function(){if(!d||p)return null;if("function"==typeof e)return Yn.jsx(Gk,{source:d,children:e});return e}())})}function Bk(){return()=>{}}function Gk({children:e,source:t}){return e(Ik(t))}var Uk,Yk,Kk,Xk,Jk,Zk=Object.create,Qk=Object.defineProperty,eL=Object.getOwnPropertyDescriptor,tL=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),nL=e=>{throw TypeError(e)},rL=["class","method","getter","setter","accessor","field","value","get","set"],iL=e=>void 0!==e&&"function"!=typeof e?nL("Function expected"):e,oL=(e,t,n,r,i)=>({kind:rL[e],name:t,metadata:r,addInitializer:e=>n._?nL("Already initialized"):i.push(iL(e||null))}),aL=(e,t,n,r,i,o)=>{for(var a,s,l,u,c=7&t,d=rL[c+5],p=e[2]||(e[2]=[]),f=(i=i.prototype,eL(i,n)),h=r.length-1;h>=0;h--)(l=oL(c,n,s={},e[3],p)).static=false,l.private=false,u=l.access={has:e=>n in e},u.get=e=>e[n],a=(0,r[h])(f[d],l),s._=1,iL(a)&&(f[d]=a);return f&&Qk(i,n,f),i},sL=(e,t,n)=>t.has(e)||nL("Cannot "+n),lL=class e{constructor(e,t){this.x=e,this.y=t}static delta(t,n){return new e(t.x-n.x,t.y-n.y)}static distance(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}static equals(e,t){return e.x===t.x&&e.y===t.y}static from({x:t,y:n}){return new e(t,n)}},uL=class extends(Kk=iC,Yk=[eC],Uk=[eC],Kk){constructor(e){var t,n,r;super(lL.from(e),(e,t)=>lL.equals(e,t)),((e,t,n)=>{for(var r=0,i=e[t>>1],o=i&&i.length;r<o;r++)i[r].call(n)})(Jk,5,this),t=this,r=0,(n=Xk).has(t)?nL("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(t):n.set(t,r),this.velocity={x:0,y:0}}get delta(){return lL.delta(this.current,this.initial)}get direction(){const{current:e,previous:t}=this;if(!t)return null;const n={x:e.x-t.x,y:e.y-t.y};return n.x||n.y?Math.abs(n.x)>Math.abs(n.y)?n.x>0?"right":"left":n.y>0?"down":"up":null}get current(){return super.current}set current(e){const{current:t}=this,n=lL.from(e),r={x:n.x-t.x,y:n.y-t.y},i=Date.now(),o=i-(sL(a=this,s=Xk,"read from private field"),s.get(a));var a,s;const l=e=>Math.round(e/o*100);FS(()=>{((e,t,n)=>{sL(e,t,"write to private field"),t.set(e,n)})(this,Xk,i),this.velocity={x:l(r.x),y:l(r.y)},super.current=n})}reset(e=this.defaultValue){super.reset(lL.from(e)),this.velocity={x:0,y:0}}};Jk=(e=>{var t;return[,,,Zk(null!=(t=null==e?void 0:e[tL("metadata")])?t:null)]})(Kk),Xk=new WeakMap,aL(Jk,2,"delta",Yk,uL),aL(Jk,2,"direction",Uk,uL),((e,t)=>{((e,t,n)=>{t in e?Qk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(t,tL("metadata"),e[3])})(Jk,uL);var cL=(e=>(e.Horizontal="x",e.Vertical="y",e))(cL||{});Object.values(cL);var dL=e=>{var t;return null!=(t=(({dragOperation:e,droppable:t})=>{const n=e.position.current;if(!n)return null;const{id:r}=t;if(!t.shape)return null;if(t.shape.containsPoint(n))return{id:r,value:1/lL.distance(t.shape.center,n),type:wI.PointerIntersection,priority:SI.High};return null})(e))?t:(({dragOperation:e,droppable:t})=>{const{shape:n}=e;if(!t.shape||!(null==n?void 0:n.current))return null;const r=n.current.intersectionArea(t.shape);if(r){const{position:i}=e,o=lL.distance(t.shape.center,i.current),a=r/(n.current.area+t.shape.area-r)/o;return{id:t.id,value:a,type:wI.ShapeIntersection,priority:SI.Normal}}return null})(e)};function pL(e){const{collisionDetector:t,data:n,disabled:r,element:i,id:o,accept:a,type:s}=e,l=Hk(t=>new xk(((e,t)=>Lk(e,Ak(t)))(((e,t)=>{for(var n in t||(t={}))Tk.call(t,n)&&_k(e,n,t[n]);if(Ok)for(var n of Ok(t))qk.call(t,n)&&_k(e,n,t[n]);return e})({},e),{register:!1,element:Sk(i)}),t)),u=Ik(l);return Mk(o,()=>l.id=o),Rk(i,e=>l.element=e),Mk(a,()=>l.accept=a,void 0,Zw),Mk(t,()=>l.collisionDetector=null!=t?t:dL),Mk(n,()=>n&&(l.data=n)),Mk(r,()=>l.disabled=!0===r),Mk(s,()=>l.type=s),{droppable:u,get isDropTarget(){return u.isDropTarget},ref:m(e=>{var t,n;(e||!(null==(t=l.element)?void 0:t.isConnected)||(null==(n=l.manager)?void 0:n.dragOperation.status.idle))&&(l.element=null!=e?e:void 0)},[l])}}const fL=e=>Array.from({length:e},(e,t)=>t),hL=({id:e,sectionIndex:t,itemIndex:n})=>Yn.jsx("span",{children:`${e}-${t}-${n}`}),mL=o.memo(()=>{const e=tx(MS)??hL,{startSectionIndex:t,startIndex:n,id:r}=tx(AS)??{};return"number"!=typeof t||"number"!=typeof n||void 0===r?null:Yn.jsx(Vk,{dropAnimation:null,children:Yn.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:Yn.jsx(e,{id:r,sectionIndex:t,itemIndex:n})})})}),gL=({sectionIndex:e,itemIndex:t,isDragging:n})=>{const r=tx(AS),i=r?.toSectionIndex===e&&r.toIndex===t;return Yn.jsx("div",{"data-key":"drop-target-indicator","data-testid":"drop-target-indicator",style:{visibility:i&&!n?"visible":"hidden",padding:0,background:"rgba(64, 64, 64, 1)",borderRadius:2,marginLeft:"4px",width:"calc(100% - 8px)",height:"2px"}})},vL=(e,t)=>e?"2px solid rgba(0, 135, 61, 1)":t?"1px dashed rgba(0, 0, 0, 0.43)":void 0,yL=o.memo(({sectionIndex:e})=>{const t=tx(SS)[e],n=tx(wS),r=tx(CS),i=null!==tx(AS),o=r(e),a=n({sectionIndex:e}),{ref:s,isDropTarget:l}=pL({id:a,type:"section",accept:"item",collisionPriority:SI.Low,data:{id:a,sectionIndex:e,sectionKey:a}});return t>0?null:Yn.jsxs(xl,{ref:s,sx:{margin:"4px",outline:vL(l,i),borderRadius:"4px",boxSizing:"border-box"},children:[Yn.jsx(xl,{sx:{position:"relative",top:"4px"},children:Yn.jsx(gL,{sectionIndex:e,itemIndex:0,isDragging:!1})}),Yn.jsxs(xl,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px",padding:"20px 4px"},children:[Yn.jsx(_s,{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}),Yn.jsx(_s,{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})]})]})}),bL=o.memo(({id:e,sectionIndex:t})=>{const n=tx(PS);return void 0===n?null:Yn.jsx(n,{id:e,sectionIndex:t})});var xL=Object.defineProperty,SL=Object.defineProperties,wL=Object.getOwnPropertyDescriptors,CL=Object.getOwnPropertySymbols,EL=Object.prototype.hasOwnProperty,IL=Object.prototype.propertyIsEnumerable,DL=(e,t,n)=>t in e?xL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,PL=(e,t)=>{for(var n in t||(t={}))EL.call(t,n)&&DL(e,n,t[n]);if(CL)for(var n of CL(t))IL.call(t,n)&&DL(e,n,t[n]);return e},ML=(e,t)=>SL(e,wL(t)),RL=class extends YI{apply({transform:e}){if(!this.options)return e;const{axis:t,value:n}=this.options;return ML(PL({},e),{[t]:n})}};RL.configure=pE(RL);var kL=RL,LL=kL.configure({axis:"x",value:0});kL.configure({axis:"y",value:0});var AL=class extends YI{apply({transform:e}){var t;const{size:n=20}=null!=(t=this.options)?t:{},r="number"==typeof n?n:n.x,i="number"==typeof n?n:n.y;return ML(PL({},e),{x:Math.ceil(e.x/r)*r,y:Math.ceil(e.y/i)*i})}};AL.configure=pE(AL);var OL=Object.create,TL=Object.defineProperty,qL=Object.defineProperties,_L=Object.getOwnPropertyDescriptor,NL=Object.getOwnPropertyDescriptors,jL=Object.getOwnPropertySymbols,FL=Object.prototype.hasOwnProperty,zL=Object.prototype.propertyIsEnumerable,WL=e=>{throw TypeError(e)},$L=(e,t,n)=>t in e?TL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,HL=(e,t)=>{for(var n in t||(t={}))FL.call(t,n)&&$L(e,n,t[n]);if(jL)for(var n of jL(t))zL.call(t,n)&&$L(e,n,t[n]);return e},VL=(e,t)=>qL(e,NL(t)),BL=["class","method","getter","setter","accessor","field","value","get","set"],GL=e=>void 0!==e&&"function"!=typeof e?WL("Function expected"):e,UL=(e,t,n,r,i)=>({kind:BL[e],name:t,metadata:r,addInitializer:e=>n._?WL("Already initialized"):i.push(GL(e||null))}),YL=(e,t,n,r)=>{for(var i=0,o=e[t>>1],a=o&&o.length;i<a;i++)1&t?o[i].call(n):r=o[i].call(n,r);return r},KL=(e,t,n,r,i,o)=>{for(var a,s,l,u,c,d=7&t,p=e.length+1,f=BL[d+5],h=e[p-1]=[],m=e[p]||(e[p]=[]),g=(i=i.prototype,_L({get[n](){return JL(this,o)},set[n](e){return QL(this,o,e)}},n)),v=r.length-1;v>=0;v--)(u=UL(d,n,l={},e[3],m)).static=false,u.private=false,c=u.access={has:e=>n in e},c.get=e=>e[n],c.set=(e,t)=>e[n]=t,s=(0,r[v])({get:g.get,set:g.set},u),l._=1,void 0===s?GL(s)&&(g[f]=s):"object"!=typeof s||null===s?WL("Object expected"):(GL(a=s.get)&&(g.get=a),GL(a=s.set)&&(g.set=a),GL(a=s.init)&&h.unshift(a));return g&&TL(i,n,g),i},XL=(e,t,n)=>t.has(e)||WL("Cannot "+n),JL=(e,t,n)=>(XL(e,t,"read from private field"),t.get(e)),ZL=(e,t,n)=>t.has(e)?WL("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),QL=(e,t,n,r)=>(XL(e,t,"write to private field"),t.set(e,n),n);function eA(e){return e instanceof LA||e instanceof kA}var tA=class extends hE{constructor(e){super(e);const t=sw(()=>{const{dragOperation:t}=e;if(jP(t.activatorEvent)&&eA(t.source)&&t.status.initialized){const t=e.registry.plugins.get(RR);if(t)return t.disable(),()=>t.enable()}}),n=e.monitor.addEventListener("dragmove",(e,t)=>{queueMicrotask(()=>{if(this.disabled||e.defaultPrevented||!e.nativeEvent)return;const{dragOperation:n}=t;if(!jP(e.nativeEvent))return;if(!eA(n.source))return;if(!n.shape)return;const{actions:r,collisionObserver:i,registry:o}=t,{by:a}=e;if(!a)return;const s=function(e){const{x:t,y:n}=e;if(t>0)return"right";if(t<0)return"left";if(n>0)return"down";if(n<0)return"up"}(a),{source:l,target:u}=n,{center:c}=n.shape.current,d=[],p=[];FS(()=>{for(const e of o.droppables){const{id:t}=e;if(!e.accepts(l)||t===(null==u?void 0:u.id)&&eA(e)||!e.element)continue;let n=e.shape;const r=new TP(e.element,{getBoundingClientRect:e=>vD(e,void 0,.2)});r.height&&r.width&&(("down"==s&&c.y+10<r.center.y||"up"==s&&c.y-10>r.center.y||"left"==s&&c.x-10>r.center.x||"right"==s&&c.x+10<r.center.x)&&(d.push(e),e.shape=r,p.push(()=>e.shape=n)))}}),e.preventDefault(),i.disable();const f=i.computeCollisions(d,$P);FS(()=>p.forEach(e=>e()));const[h]=f;if(!h)return;const{id:m}=h,{index:g,group:v}=l.sortable;r.setDropTarget(m).then(()=>{const{source:e,target:t,shape:o}=n;if(!e||!eA(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;IP(c);const d=new TP(c);if(!d)return;const p=PC.delta(d,PC.from(o.current.boundingRectangle),e.alignment);r.move({by:p}),u?r.setDropTarget(e.id).then(()=>i.enable()):i.enable()})})});this.destroy=()=>{n(),t()}}};var nA=Object.defineProperty,rA=Object.defineProperties,iA=Object.getOwnPropertyDescriptors,oA=Object.getOwnPropertySymbols,aA=Object.prototype.hasOwnProperty,sA=Object.prototype.propertyIsEnumerable,lA=(e,t,n)=>t in e?nA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,uA=(e,t)=>{for(var n in t||(t={}))aA.call(t,n)&&lA(e,n,t[n]);if(oA)for(var n of oA(t))sA.call(t,n)&&lA(e,n,t[n]);return e},cA=(e,t)=>rA(e,iA(t));function dA(e,t,n){if(t===n)return e;const r=e.slice();return r.splice(n,0,r.splice(t,1)[0]),r}function pA(e){return"initialIndex"in e&&"number"==typeof e.initialIndex&&"index"in e&&"number"==typeof e.index}function fA(e,t){return function(e,t,n){var r,i,o;const{source:a,target:s,canceled:l}=t.operation;if(!a||!s||l)return"preventDefault"in t&&t.preventDefault(),e;const u=(e,t)=>e===t||"object"==typeof e&&"id"in e&&e.id===t;if(Array.isArray(e)){const r=e.findIndex(e=>u(e,a.id)),i=e.findIndex(e=>u(e,s.id));if(-1===r||-1===i){if(pA(a)){const r=a.initialIndex,i=a.index;return r===i||r<0||r>=e.length?("preventDefault"in t&&t.preventDefault(),e):n(e,r,i)}return e}if(!l&&"index"in a&&"number"==typeof a.index){const t=a.index;if(t!==r)return n(e,r,t)}return n(e,r,i)}const c=Object.entries(e);let d,p,f=-1,h=-1;for(const[e,t]of c)if(-1===f&&(f=t.findIndex(e=>u(e,a.id)),-1!==f&&(d=e)),-1===h&&(h=t.findIndex(e=>u(e,s.id)),-1!==h&&(p=e)),-1!==f&&-1!==h)break;if(-1===f&&pA(a)){const r=a.initialGroup,i=a.initialIndex,o=a.group,s=a.index;if(null==r||null==o||!(r in e)||!(o in e))return"preventDefault"in t&&t.preventDefault(),e;if(r===o&&i===s)return"preventDefault"in t&&t.preventDefault(),e;if(r===o)return cA(uA({},e),{[r]:n(e[r],i,s)});const l=e[r][i];return cA(uA({},e),{[r]:[...e[r].slice(0,i),...e[r].slice(i+1)],[o]:[...e[o].slice(0,s),l,...e[o].slice(s)]})}if(!a.manager)return e;const{dragOperation:m}=a.manager,g=null!=(i=null==(r=m.shape)?void 0:r.current.center)?i:m.position.current;if(null==p&&s.id in e){const t=s.shape&&g.y>s.shape.center.y?e[s.id].length:0;p=s.id,h=t}if(null==d||null==p||d===p&&f===h){if(null!=d&&d===p&&f===h&&pA(a)){const t=null!=a.group&&a.group!==d,r=a.index!==f;if(t||r){const t=null!=(o=a.group)?o:d;if(t in e){if(d===t)return cA(uA({},e),{[d]:n(e[d],f,a.index)});const r=e[d][f];return cA(uA({},e),{[d]:[...e[d].slice(0,f),...e[d].slice(f+1)],[t]:[...e[t].slice(0,a.index),r,...e[t].slice(a.index)]})}}}return"preventDefault"in t&&t.preventDefault(),e}if(d===p)return cA(uA({},e),{[d]:n(e[d],f,h)});const v=s.shape&&Math.round(g.y)>Math.round(s.shape.center.y)?1:0,y=e[d][f];return cA(uA({},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,dA)}var hA="__default__";function mA(e,t,n,r){const i=r<t?"afterend":"beforebegin";n.insertAdjacentElement(i,e)}function gA(e,t){return e.index-t.index}function vA(e){return Array.from(e).sort(gA)}var yA,bA,xA,SA,wA,CA,EA,IA,DA=[tA,class extends hE{constructor(e){super(e);const t=()=>{const t=new Map;for(const n of e.registry.droppables)if(n instanceof LA){const{sortable:e}=n,{group:r}=e;let i=t.get(r);i||(i=new Set,t.set(r,i)),i.add(e)}for(const[e,n]of t)t.set(e,new Set(vA(n)));return t},n=[e.monitor.addEventListener("dragover",(e,n)=>{if(this.disabled)return;const{dragOperation:r}=n,{source:i,target:o}=r;if(!eA(i)||!eA(o))return;if(i.sortable===o.sortable)return;const a=t(),s=i.sortable.group===o.sortable.group,l=a.get(i.sortable.group),u=s?l:a.get(o.sortable.group);l&&u&&queueMicrotask(()=>{e.defaultPrevented||n.renderer.rendering.then(()=>{var r,c,d;const p=t();for(const[e,t]of a.entries()){const n=Array.from(t).entries();for(const[t,i]of n)if(i.index!==t||i.group!==e||!(null==(r=p.get(e))?void 0:r.has(i)))return}const f=i.sortable.element,h=o.sortable.element;if(!h||!f)return;if(!s&&o.id===i.sortable.group)return;const m=vA(l),g=s?m:vA(u),v=null!=(c=i.sortable.group)?c:hA,y=null!=(d=o.sortable.group)?d:hA,b={[v]:m,[y]:g},x=fA(b,e);if(b===x)return;const S=x[y].indexOf(i.sortable),w=x[y].indexOf(o.sortable);n.collisionObserver.disable(),mA(f,S,h,w),FS(()=>{for(const[e,t]of x[v].entries())t.index=e;if(!s)for(const[e,t]of x[y].entries())t.group=o.sortable.group,t.index=e}),n.actions.setDropTarget(i.id).then(()=>n.collisionObserver.enable())})})}),e.monitor.addEventListener("dragend",(e,n)=>{if(!e.canceled)return;const{dragOperation:r}=n,{source:i}=r;eA(i)&&(i.sortable.initialIndex===i.sortable.index&&i.sortable.initialGroup===i.sortable.group||queueMicrotask(()=>{const e=t(),r=e.get(i.sortable.initialGroup);r&&n.renderer.rendering.then(()=>{for(const[t,n]of e.entries()){const e=Array.from(n).entries();for(const[n,r]of e)if(r.index!==n||r.group!==t)return}const t=vA(r),n=i.sortable.element,o=t[i.sortable.initialIndex],a=null==o?void 0:o.element;o&&a&&n&&(mA(n,o.index,a,i.index),FS(()=>{for(const[t,n]of e.entries()){const e=Array.from(n).values();for(const t of e)t.index=t.initialIndex,t.group=t.initialGroup}}))})}))})];this.destroy=()=>{for(const e of n)e()}}}],PA={duration:250,easing:"cubic-bezier(0.25, 1, 0.5, 1)",idle:!1},MA=new class{constructor(){Yw(this,rC,new WeakMap)}get(e,t){var n;return e?null==(n=Uw(this,rC).get(e))?void 0:n.get(t):void 0}set(e,t,n){var r;if(e)return Uw(this,rC).has(e)||Uw(this,rC).set(e,new Map),null==(r=Uw(this,rC).get(e))?void 0:r.set(t,n)}clear(e){var t;return e?null==(t=Uw(this,rC).get(e))?void 0:t.clear():void 0}};bA=[Qw],yA=[Qw];var RA=class{constructor(e,t){ZL(this,SA,YL(xA,8,this)),YL(xA,11,this),ZL(this,wA),ZL(this,CA),ZL(this,EA,YL(xA,12,this)),YL(xA,15,this),ZL(this,IA),this.register=()=>(FS(()=>{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=()=>{FS(()=>{var e,t;null==(e=this.manager)||e.registry.unregister(this.droppable),null==(t=this.manager)||t.registry.unregister(this.draggable)})},this.destroy=()=>{FS(()=>{this.droppable.destroy(),this.draggable.destroy()})};var n=e,{effects:r=()=>[],group:i,index:o,sensors:a,type:s,transition:l=PA,plugins:u}=n,c=((e,t)=>{var n={};for(var r in e)FL.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&jL)for(var r of jL(e))t.indexOf(r)<0&&zL.call(e,r)&&(n[r]=e[r]);return n})(n,["effects","group","index","sensors","type","transition","plugins"]);const d=ZI(u,DA);this.droppable=new LA(c,t,this),this.draggable=new kA(VL(HL({},c),{plugins:d,effects:()=>[()=>{var e,t,n;const r=null==(e=this.manager)?void 0:e.dragOperation.status;(null==r?void 0:r.initializing)&&this.id===(null==(n=null==(t=this.manager)?void 0:t.dragOperation.source)?void 0:n.id)&&MA.clear(this.manager),(null==r?void 0:r.dragging)&&MA.set(this.manager,this.id,WS(()=>({initialIndex:this.index,initialGroup:this.group})))},()=>{const{index:e,group:t,manager:n}=this,r=JL(this,CA),i=JL(this,wA);e===r&&t===i||(QL(this,CA,e),QL(this,wA,t),this.animate())},()=>{var e,t;const{target:n}=this,{isDragSource:r}=this.draggable;"move"===(null!=(t=null==(e=this.draggable.pluginConfig(gR))?void 0:e.feedback)?t:"default")&&r&&(this.droppable.disabled=!n)},...r()],type:s,sensors:a}),t,this),QL(this,IA,c.element),this.manager=t,this.index=o,QL(this,CA,o),this.group=i,QL(this,wA,i),this.type=s,this.transition=l}get initialIndex(){var e,t;return null!=(t=null==(e=MA.get(this.manager,this.id))?void 0:e.initialIndex)?t:this.index}get initialGroup(){var e,t;return null!=(t=null==(e=MA.get(this.manager,this.id))?void 0:e.initialGroup)?t:this.group}animate(){WS(()=>{const{manager:e,transition:t}=this,{shape:n}=this.droppable;if(!e)return;const{idle:r}=e.dragOperation.status;n&&t&&(!r||t.idle)&&e.renderer.rendering.then(()=>{const{element:r}=this;if(!r)return;for(const e of r.getAnimations())!("transitionProperty"in e)||"transform"!==e.transitionProperty&&"translate"!==e.transitionProperty&&"scale"!==e.transitionProperty||e.cancel();const i=this.refreshShape();if(!i)return;const o=n.boundingRectangle.left-i.boundingRectangle.left,a=n.boundingRectangle.top-i.boundingRectangle.top,{translate:s}=fP(r),l=RP(r,s,!1),u=RP(r,s);if(o||a){const n=ID(dD(r))?VL(HL({},t),{duration:0}):t;MP({element:r,keyframes:{translate:[`${l.x+o}px ${l.y+a}px ${l.z}`,`${u.x}px ${u.y}px ${u.z}`]},options:n}).then(()=>{e.dragOperation.status.dragging||(this.droppable.shape=void 0)})}})})}get manager(){return this.draggable.manager}set manager(e){FS(()=>{this.draggable.manager=e,this.droppable.manager=e})}set element(e){FS(()=>{const t=JL(this,IA),n=this.droppable.element,r=this.draggable.element;n&&n!==t||(this.droppable.element=e),r&&r!==t||(this.draggable.element=e),QL(this,IA,e)})}get element(){var e,t;const n=JL(this,IA);if(n)return null!=(t=null!=(e=RD.get(n))?e:n)?t:this.droppable.element}set target(e){this.droppable.element=e}get target(){return this.droppable.element}set source(e){this.draggable.element=e}get source(){return this.draggable.element}get disabled(){return this.draggable.disabled&&this.droppable.disabled}set plugins(e){this.draggable.plugins=ZI(e,DA)}set disabled(e){FS(()=>{this.droppable.disabled=e,this.draggable.disabled=e})}set data(e){FS(()=>{this.droppable.data=e,this.draggable.data=e})}set handle(e){this.draggable.handle=e}set id(e){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:WP}set alignment(e){this.draggable.alignment=e}get alignment(){return this.draggable.alignment}set type(e){FS(()=>{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)}};xA=[,,,OL(null)],SA=new WeakMap,wA=new WeakMap,CA=new WeakMap,EA=new WeakMap,IA=new WeakMap,KL(xA,4,"index",bA,RA,SA),KL(xA,4,"group",yA,RA,EA),((e,t)=>{return $L(t,(n="metadata",(r=Symbol[n])?r:Symbol.for("Symbol."+n)),e[3]);var n,r})(xA,RA);var kA=class extends bk{constructor(e,t,n){super(e,t),this.sortable=n}get index(){return this.sortable.index}get initialIndex(){return this.sortable.initialIndex}get group(){return this.sortable.group}get initialGroup(){return this.sortable.initialGroup}},LA=class extends xk{constructor(e,t,n){super(e,t),this.sortable=n}get index(){return this.sortable.index}get group(){return this.sortable.group}},AA=Object.defineProperty,OA=Object.defineProperties,TA=Object.getOwnPropertyDescriptors,qA=Object.getOwnPropertySymbols,_A=Object.prototype.hasOwnProperty,NA=Object.prototype.propertyIsEnumerable,jA=(e,t,n)=>t in e?AA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,FA=(e,t)=>{for(var n in t||(t={}))_A.call(t,n)&&jA(e,n,t[n]);if(qA)for(var n of qA(t))NA.call(t,n)&&jA(e,n,t[n]);return e};function zA(e){const{accept:t,collisionDetector:n,collisionPriority:r,id:i,data:o,element:a,handle:s,index:l,group:u,disabled:c,modifiers:d,sensors:p,target:f,type:h,plugins:g}=e,v=FA(FA({},PA),e.transition),y=Hk(t=>new RA(((e,t)=>OA(e,TA(t)))(FA({},e),{transition:v,register:!1,handle:Sk(s),element:Sk(a),target:Sk(f)}),t)),b=Ik(y,WA);return Mk(i,()=>y.id=i),wk(()=>{FS(()=>{y.group=u,y.index=l})},[y,u,l]),Mk(h,()=>y.type=h),Mk(t,()=>y.accept=t,void 0,Zw),Mk(o,()=>o&&(y.data=o)),Mk(l,()=>{var e;(null==(e=y.manager)?void 0:e.dragOperation.status.idle)&&(null==v?void 0:v.idle)&&y.refreshShape()},Dk),Rk(s,e=>y.handle=e),Rk(a,e=>y.element=e),Rk(f,e=>y.target=e),Mk(c,()=>y.disabled=!0===c),Mk(p,()=>y.sensors=p),Mk(n,()=>y.collisionDetector=n),Mk(r,()=>y.collisionPriority=r),Mk(g,()=>y.plugins=g,void 0,Zw),Mk(v,()=>y.transition=v,void 0,Zw),Mk(d,()=>y.modifiers=d,void 0,Zw),Mk(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:m(e=>{y.handle=null!=e?e:void 0},[y]),ref:m(e=>{var t,n;(e||!(null==(t=y.element)?void 0:t.isConnected)||(null==(n=y.manager)?void 0:n.dragOperation.status.idle))&&(y.element=null!=e?e:void 0)},[y]),sourceRef:m(e=>{var t,n;(e||!(null==(t=y.source)?void 0:t.isConnected)||(null==(n=y.manager)?void 0:n.dragOperation.status.idle))&&(y.source=null!=e?e:void 0)},[y]),targetRef:m(e=>{var t,n;(e||!(null==(t=y.target)?void 0:t.isConnected)||(null==(n=y.manager)?void 0:n.dragOperation.status.idle))&&(y.target=null!=e?e:void 0)},[y])}}function WA(e,t,n){return!("isDragSource"!==e||n||!t)}const $A=({id:e,itemIndex:t,sectionIndex:n})=>Yn.jsx("div",{children:`${n}:${t} - ${e}`}),HA=({id:e,itemIndex:t,sectionIndex:n})=>{const r=tx(RS),i=tx(DS),o=tx(SS).at(n)??0,a=tx(wS)({sectionIndex:n}),{ref:s,isDragging:l,handleRef:u}=zA({id:e,index:t,type:"item",accept:"item",group:a,modifiers:[LL],plugins:[tA],data:{id:e,sectionIndex:n,sectionKey:a,itemIndex:t}}),c=void 0!==r?()=>{r({id:e,itemIndex:t,sectionIndex:n})}:void 0,d=i??$A;return Yn.jsx(rc,{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:Yn.jsxs("div",{style:{width:"100%",opacity:l?.4:1},children:[Yn.jsx(gL,{isDragging:l,itemIndex:t,sectionIndex:n}),Yn.jsx(d,{id:e,itemIndex:t,sectionIndex:n,dragHandleRef:u}),t===o-1&&Yn.jsx(gL,{isDragging:!1,itemIndex:t+1,sectionIndex:n})]})})},VA=o.memo(HA),BA=o.memo(({sectionIndex:e})=>{const t=tx(wS),n=tx(SS).at(e)??0,r=t({sectionIndex:e});return Yn.jsxs(xl,{className:"exploration-list",style:{overflow:"auto"},children:[Yn.jsx(hu,{}),Yn.jsx(bL,{id:r,sectionIndex:e}),Yn.jsx(hu,{}),Yn.jsx(yL,{sectionIndex:e}),Yn.jsx(Bu,{sx:{padding:"2px 8px"},children:fL(n).map(n=>{const r=t({sectionIndex:e,itemIndex:n});return Yn.jsx(VA,{id:r,itemIndex:n,sectionIndex:e},r)})})]},r)}),GA=[XR.configure({activationConstraints:[new GR.Distance({value:5})]}),$R],UA=o.memo(()=>{const e=tx(xS),t=tx(wS),n=nx(OS("start")),r=nx(OS("over")),i=nx(OS("end"));return Yn.jsxs(Wk,{sensors:GA,onDragEnd:e=>{i(e)},onDragOver:e=>{r(e)},onDragStart:e=>{n(e)},children:[Yn.jsx(xl,{style:{display:"flex",flexDirection:"column"},children:fL(e).map(e=>Yn.jsx(BA,{sectionIndex:e},t({sectionIndex:e})))}),Yn.jsx(mL,{})]})}),YA=o.memo(e=>Yn.jsx(iS,{atoms:TS,atomFamilies:qS,children:Yn.jsx(_S,{props:e,children:Yn.jsx(UA,{})})})),KA="12px",XA="nebula-table-utils-head-menu-button",JA="sn-copy-cell";let ZA=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 QA="nebula-table-utils-column-adjuster";let eO=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}({}),tO=function(e){return e.Auto="auto",e.FitToContent="fitToContent",e.Pixels="pixels",e.Percentage="percentage",e}({});const nO={darker:.15,brighter:.3,opacity:.03},rO={darker:.3,brighter:.5,opacity:.05};let iO=function(e){return e.Cyclic="C",e}({});const oO=(e,t)=>{const n=new Map;for(const t of e)n.set(t.id,t);return t.reduce((e,t)=>{const r=n.get(t);return r&&e.push(r),e},[])},aO=vS(e=>Hb(t=>{const n=t(Ax),r=t(Px)?.[e];return r||n?.qHyperCubeDef.rankedList?.[e]})),sO=vS(e=>Hb(t=>{const n=t(wx),r=t(vx),i=t(kx),o=t(Px)?.[e],a=n("SUPPORT-9810-MISSING-MEASURES",!1)?r?.properties.qHyperCubeDef.rankedList?.[e]:i?.qHyperCube.rankedList?.[e];return o||(r?.isRankedListCorrupt(e)||void 0===a?r?.createRankedList(e):a)})),lO=(e,t=new Set)=>Hb(n=>{const r=n(e),i=n(Vx);if(!r||0===r.length)return"disabled";const o=r.filter(e=>!t.has(e.id));if(0===o.length)return"disabled";const a=o.filter(e=>i.has(e.id)).length;return 0===a?"none":a===o.length?"all":"some"}),uO=(e,t=new Set)=>Hb(null,(n,r,i)=>{const o=n(e);o&&0!==o.length&&(e=>{const{items:t,shouldCheckAll:n,get:r,set:i,excludedIds:o}=e,a=t.filter(e=>!o?.has(e.id));if(0===a.length)return;const s=r(Vx),l=new Set,u=new Set;if(a.forEach(e=>{const t=s.has(e.id);t&&!n&&u.add(e.id),!t&&n&&l.add(e.id)}),0===l.size&&0===u.size)return;const c=new Set(r(zx)),d=new Set(r(Wx));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(zx,c),i(Wx,d),mx({type:"apply",localChecked:l,localUnchecked:u,handler:r(vx),model:r(gx),fieldInfo:r(qx),handlerQueue:r(Nx)})})({items:o,shouldCheckAll:i,get:n,set:r,excludedIds:t})}),cO=Hb(e=>{const t=e(Lx);return t?.qHyperCube.qDimensionInfo.filter(Cx).map(({cId:e,qFallbackTitle:t})=>({id:e,title:t??"",alternative:!0}))}),dO=Hb(e=>{const t=e(kx),n=e(bx),r=t?.qHyperCube.qEffectiveInterColumnSortOrder.map(e=>{if(-1===e)return{id:-1,title:n("Common.Values")};const{cId:r,qFallbackTitle:i}=t.qHyperCube.qDimensionInfo[e];return{id:r,title:i??""}});return r}),pO=Hb(e=>{const t=e(bx),n=e(cO),r=e(Sx),i=e(wx)("SUPPORT-9810-MIGRATE-RANKED-LISTS",!1),o=e(i?aO("columns"):sO("columns")),a=e(i?aO("rows"):sO("rows")),s=e(dO);if(void 0===n||void 0===o||void 0===a||void 0===s)return[];const l=[...s,...n].filter(r);return[{id:"rows",title:t("Common.Rows"),items:oO(l,a)},{id:"columns",title:t("Common.Columns"),items:oO(l,o)}]}),fO=vS(e=>Hb(t=>t(pO).at(e))),hO=vS(({sectionIndex:e,itemIndex:t})=>Hb(n=>n(fO(e))?.items.at(t)?.title),(e,t)=>e.sectionIndex===t.sectionIndex&&e.itemIndex===t.itemIndex),mO=vS(e=>Hb(t=>t(fO(e))?.title)),gO=Hb(e=>({sectionIndex:t,itemIndex:n})=>{const r=e(fO(t));return void 0===r?0===t?"rows":"columns":void 0===n?r.id:r.items.at(n)?.id??`missing-item-${t}-${n}`}),vO=Hb(e=>e(pO).map(e=>e.items.length)),yO=vS(e=>lO(Hb(t=>t(fO(e))?.items),new Set([-1]))),bO=vS(e=>uO(Hb(t=>t(fO(e))?.items),new Set([-1]))),xO=Hb(null,(e,t,{event:n,id:r,toIndex:i,toSection:o,startSection:a})=>{const s=e(vx),l=e(gx),u=e(Nx),c=e(aO("rows")),d=e(aO("columns")),p=o;if(void 0===s||void 0===l||void 0===c||void 0===d||null===u)return;if(n.operation.canceled)return void t(Px,null);if("section"===n.operation.target?.type&&a===o)return void t(Px,null);const f=gS({rows:c,columns:d},n);t(Px,f),u.add(async()=>{"number"==typeof r?await s.movePseudoDimension({toIndex:i,toSection:p}):await s.moveDimension({cId:r,toIndex:i,toSection:p})})}),SO={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"}},wO="ChartExploration.PivotTable.DimensionSectionEmpty.Message",CO="ChartExploration.PivotTable.MeasureSectionEmpty.Message",EO="#177fe6",IO=(e,t,n,r)=>{if("measure"===t)return e(r?SO.noSearchFound.measure:SO.noItems.measure);const i=r?SO.noSearchFound:SO.noItems;return e(n?i.row:i.column)},DO=(e,t,n)=>n?"":e("measure"===t?CO:wO),PO=vS(e=>Hb(t=>{const n=t(bx),r=t(xx).length>0;return t=>({title:IO(n,e,0===t,r),message:DO(n,e,r)})})),MO=PO("measure"),RO=PO("dimensions"),kO=({children:e})=>Yn.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e}),LO=e=>{const t=tx(hO(e));return Yn.jsx(kO,{children:t})},AO=Hb(e=>{const t=e(Lx);return t?.qHyperCube.qMeasureInfo.filter(Cx).map(({cId:e,qFallbackTitle:t})=>({id:e,title:t??""}))}),OO=Hb(e=>{const t=e(wx)("SUPPORT-9810-MIGRATE-RANKED-LISTS",!1),n=e(kx),r=e(AO),i=e(Sx),o=e(t?aO("measures"):sO("measures"));if(void 0===n||void 0===r||void 0===o)return[];const a=n.qHyperCube.qMeasureInfo.filter(Cx).map(({cId:e,qFallbackTitle:t})=>({id:e,title:t??""}));a.push(...r);const s=a.filter(i);return oO(s,o)}),TO=vS(e=>Hb(t=>t(OO).at(e)?.title??"")),qO=Hb(e=>({itemIndex:t})=>{const n=e(OO);return void 0===t?"measures":n.at(t)?.id??`missing-item-${t}`}),_O=Hb(e=>[e(OO).length]),NO=lO(OO),jO=uO(OO),FO=Hb(null,(e,t,{id:n,toIndex:r,event:i})=>{const o=e(vx),a=e(gx),s=e(Nx),l=e(aO("measures"));if(void 0===o||void 0===a||void 0===l||"string"!=typeof n||null===s)return;const u=gS({measures:l},i);t(Px,u),s.add(async()=>{await o.moveMeasure({cId:n,toIndex:r})})}),zO=lb().palette,WO={TEXT:zO.text.primary,DISABLED:zO.text.disabled,HOVER:zO.action.hover,WHITE:Bd.GREYSCALE_100,BORDER_MEDIUM:Bd.GREYSCALE_85,DARK_MODE_TEXT:Bd.GREYSCALE_95,DARK_MODE_BORDER:Bd.GREYSCALE_95,DARK_MODE_DISABLED:Bd.GREYSCALE_70,TRANSPARENT:"transparent",SELECTED:zO.primary.main,LINK:zO.info.main,ERROR:zO.error.main};function $O(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 HO(e){if("object"==typeof e&&$O(e))return(e.r<<16)+(e.g<<8)+e.b;let t=0,n=0,r=0;if("string"==typeof e){let i;(i=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e))?(t=parseInt(i[1],10),n=parseInt(i[2],10),r=parseInt(i[3],10)):(i=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(e))?(t=parseInt(i[1],16),n=parseInt(i[2],16),r=parseInt(i[3],16)):(i=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(e))&&(t=parseInt(i[1]+i[1],16),n=parseInt(i[2]+i[2],16),r=parseInt(i[3]+i[3],16))}return(t<<16)+(n<<8)+r}const VO={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}},BO="qcm-color";function GO(...e){const t={type:BO,r:0,g:0,b:0,a:1,invalid:!1,spaces:{}};let n=0,r=0,i=0,o=1;if(null!==(a=e[0])&&"object"==typeof a&&"type"in a&&a.type===BO)({r:n,g:r,b:i,a:o}=e[0]),t.invalid=e[0].invalid,t.spaces={...e[0].spaces};else if($O(e[0]))({r:n,g:r,b:i}=e[0]),"a"in e[0]&&({a:o}=e[0]);else if(e.length<3)if("string"==typeof e[0]){const a=e[0];let s;if(s=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(a))n=parseInt(s[1],10),r=parseInt(s[2],10),i=parseInt(s[3],10);else if(s=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(a))n=parseInt(s[1],10),r=parseInt(s[2],10),i=parseInt(s[3],10),o=parseFloat(s[4]);else if(s=/^ARGB\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(a))o=parseInt(s[1],10)/255,n=parseInt(s[2],10),r=parseInt(s[3],10),i=parseInt(s[4],10);else if(s=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(a))n=parseInt(s[1],16),r=parseInt(s[2],16),i=parseInt(s[3],16),o=1;else if(s=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(a))n=parseInt(s[1]+s[1],16),r=parseInt(s[2]+s[2],16),i=parseInt(s[3]+s[3],16),o=1;else if(s=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a<=.5?2*a*t:(2-2*a)*t;let u=e/60;const c=l*(1-Math.abs(u%2-1));let d=[];switch(u=Math.floor(u),u){case 0:d=[l,c,0];break;case 1:d=[c,l,0];break;case 2:d=[0,l,c];break;case 3:d=[0,c,l];break;case 4:d=[c,0,l];break;case 5:d=[l,0,c];break;default:d=[0,0,0]}const p=a-.5*l;n=d[0]+p,r=d[1]+p,i=d[2]+p,n=Math.round(255*n),r=Math.round(255*r),i=Math.round(255*i),o=1}else if(s=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);o=parseFloat(s[7]),e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a<=.5?2*a*t:(2-2*a)*t;let u=e/60;const c=l*(1-Math.abs(u%2-1));let d=[];switch(u=Math.floor(u),u){case 0:d=[l,c,0];break;case 1:d=[c,l,0];break;case 2:d=[0,l,c];break;case 3:d=[0,c,l];break;case 4:d=[c,0,l];break;case 5:d=[l,0,c];break;default:d=[0,0,0]}const p=a-.5*l;n=d[0]+p,r=d[1]+p,i=d[2]+p,n=Math.round(255*n),r=Math.round(255*r),i=Math.round(255*i)}else if(s=/^hsv\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a*t;let u=e/60;const c=l*(1-Math.abs(u%2-1));let d=[];switch(u=Math.floor(u),u){case 0:d=[l,c,0];break;case 1:d=[c,l,0];break;case 2:d=[0,l,c];break;case 3:d=[0,c,l];break;case 4:d=[c,0,l];break;case 5:d=[l,0,c];break;default:d=[0,0,0]}const p=a-l;n=d[0]+p,r=d[1]+p,i=d[2]+p,n=Math.round(255*n),r=Math.round(255*r),i=Math.round(255*i),o=1}else{const e=a.toLowerCase();if(function(e){return e in VO}(e)){const t=VO[e];({r:n,g:r,b:i}=t),o="a"in t?t.a:1}else t.invalid=!0}}else"number"==typeof e[0]&&e[0]>=0&&"argb"===e[1]?(o=(4278190080&e[0])>>>24,o/=255,n=(16711680&e[0])>>16,r=(65280&e[0])>>8,i=255&e[0]):"number"==typeof e[0]&&e[0]>=0?(n=(16711680&e[0])>>16,r=(65280&e[0])>>8,i=255&e[0]):t.invalid=!0;else 3===e.length||4===e.length?(n=e[0],r=e[1],i=e[2],o=4===e.length?e[3]:1):t.invalid=!0;var a;return Number.isNaN(+n+r+i+o)&&(t.invalid=!0),t.r=Math.floor(n),t.g=Math.floor(r),t.b=Math.floor(i),t.a=o,t}function UO(e){let t,n,r;if($O(e))return t=e.r.toString(16),n=e.g.toString(16),r=e.b.toString(16),1===t.length&&(t=`0${t}`),1===n.length&&(n=`0${n}`),1===r.length&&(r=`0${r}`),`#${[t,n,r].join("")}`;const i="string"==typeof e?HO(e):e;return t=((16711680&i)>>16).toString(16),n=((65280&i)>>8).toString(16),r=(255&i).toString(16),1===t.length&&(t=`0${t}`),1===n.length&&(n=`0${n}`),1===r.length&&(r=`0${r}`),`#${t}${n}${r}`}function YO(e){let t,n,r=0;const i="string"==typeof e?GO(e):e,o=i.r/255,a=i.g/255,s=i.b/255,{a:l}=i,u=Math.max(o,a,s),c=Math.min(o,a,s),d=(u+c)/2;if(u===c)t=0,r=0;else{switch(n=u-c,t=d>.5?n/(2-u-c):n/(u+c),u){case o:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-o)/n+2;break;case s:r=(o-a)/n+4}r/=6}return{h:360*r,s:100*t,l:100*d,a:l}}function KO(e){let t,n,r=0;const i="string"==typeof e?GO(e):e,o=i.r/255,a=i.g/255,s=i.b/255,l=Math.max(o,a,s),u=Math.min(o,a,s),c=l;if(l===u)t=0,r=0;else{switch(n=l-u,t=0===n?0:n/c,l){case o:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-o)/n+2;break;case s:r=(o-a)/n+4}r/=6}return{h:360*r%360,s:100*t,v:100*c}}function XO(e){if($O(e))return`rgb(${e.r}, ${e.g}, ${e.b})`;const t="string"==typeof e?HO(e):e;return`rgb(${(16711680&t)>>16}, ${(65280&t)>>8}, ${255&t})`}function JO(e,t){return $O(e)?`rgba(${e.r}, ${e.g}, ${e.b}, ${e.a})`:JO(GO(e))}function ZO(e){return $O(e)?1===e.a?XO(e):JO(e):ZO(GO(e))}const QO=e=>{const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};function eT(e){return.2126*QO(e.r)+.7152*QO(e.g)+.0722*QO(e.b)}function tT(...e){const t=GO(...e),n={type:t.type,r:t.r,g:t.g,b:t.b,a:t.a,invalid:t.invalid,spaces:t.spaces},r=()=>(n.spaces.hslaObject||(n.spaces.hslaObject=YO(n)),n.spaces.hslaObject),i=e=>{const t=r(),{h:n,s:i,l:o,a:a}=t;return`hsla(${n}, ${i}, ${Math.max(0,Math.min(o+e,100))}, ${a})`};return{get type(){return n.type},isInvalid:()=>n.invalid,get r(){return n.r},get g(){return n.g},get b(){return n.b},get a(){return n.a},getR:()=>n.r,getG:()=>n.g,getB:()=>n.b,getAlpha:()=>n.a,setAlpha:e=>{n.a=e,n.spaces={}},isEqualTo:e=>{let t;if("string"==typeof e)t=GO(e);else{if(e.type!==n.type)return!1;t=e}return t.r===n.r&&t.g===n.g&&t.b===n.b&&t.a===n.a},isDark:()=>function(...e){const t=GO(...e);return t.invalid||eT(t)<.4}(n),getRGB:()=>(n.spaces.rgb||(n.spaces.rgb=XO(n)),n.spaces.rgb),getRGBA:()=>(n.spaces.rgba||(n.spaces.rgba=JO(n)),n.spaces.rgba),getString:()=>(n.spaces.string||(n.spaces.string=ZO(n)),n.spaces.string),getHex:()=>(n.spaces.hex||(n.spaces.hex=UO(n)),n.spaces.hex),getHSL:()=>(n.spaces.hsl||(n.spaces.hsl=function(e){let t,n,r=0;const i="string"==typeof e?GO(e):e,o=i.r/255,a=i.g/255,s=i.b/255,l=Math.max(o,a,s),u=Math.min(o,a,s),c=(l+u)/2;if(l===u)t=0,r=0;else{switch(n=l-u,t=c>.5?n/(2-l-u):n/(l+u),l){case o:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-o)/n+2;break;case s:r=(o-a)/n+4}r/=6}return`hsl(${360*r}, ${100*t}, ${100*c})`}(n)),n.spaces.hsl),getHSLA:()=>(n.spaces.hsla||(n.spaces.hsla=function(e){const{h:t,s:n,l:r,a:i}=YO(e);return`hsla(${t}, ${n}, ${r}, ${i})`}(n)),n.spaces.hsla),getHSLAObject:r,getShiftedHSLA:i,getHSV:()=>(n.spaces.hsv||(n.spaces.hsv=function(e){const{h:t,s:n,v:r}=KO(e);return`hsv(${t}, ${n}, ${r})`}(n)),n.spaces.hsv),getHSVObject:()=>(n.spaces.hsvObject||(n.spaces.hsvObject=KO(n)),n.spaces.hsvObject),blend:(e,t)=>`rgba(${Math.floor(n.r+(e.r-n.r)*t)}, ${Math.floor(n.g+(e.g-n.g)*t)}, ${Math.floor(n.b+(e.b-n.b)*t)}, ${Math.floor(n.a+(e.getAlpha()-n.a)*t)})`,getBrightenedColor:(e=1)=>tT(i(18*e)),getDarkenedColor:(e=1)=>tT(i(18*-e))}}function nT(e,t){if(!e||!t)return;const n=eT(e),r=eT(t);return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)}const rT="#FFFFFF";function iT(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var oT,aT="top",sT="top-right",lT="right",uT="bottom-right",cT="bottom",dT="bottom-left",pT="left",fT="top-left";iT(iT(iT(iT(iT(iT(iT(iT(iT(iT(oT={},"equal-equal",[aT,cT]),"equal-higher",[cT,uT]),"equal-lower",[aT,sT]),"equal-void",[aT,cT]),"higher-equal",[pT,dT,aT,sT]),"higher-higher-acute",[cT,dT,pT,sT]),"higher-higher-obtuse",[cT,aT]),"higher-lower-negative",[aT,sT,lT]),"higher-lower-positive",[cT,dT,pT]),"higher-void",[aT]),iT(iT(iT(iT(iT(iT(iT(iT(iT(iT(oT,"lower-equal",[aT]),"lower-higher-negative",[aT,fT]),"lower-higher-positive",[uT]),"lower-lower-acute",[aT,fT,pT,sT,lT]),"lower-lower-obtuse",[aT,cT]),"lower-void",[aT]),"void-equal",[aT]),"void-higher",[aT,cT]),"void-lower",[aT,cT,pT]),"void-void",[aT]),iT(oT,"unclassified",[aT,cT,lT,pT,sT,uT,dT,fT]);var hT,mT,gT=["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"],vT=["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 yT(e){return null!=e&&e.isEnabled("PS_20852_WYSIWYG_FONT_SUPPORT")?vT:gT}var bT=function(){if(mT)return hT;mT=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},o=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,i=e.call(n,"constructor"),o=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!i&&!o)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return hT=function e(){var t,n,r,l,u,c,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=s(d,n),d!==(l=s(t,n))&&(h&&l&&(o(l)||(u=i(l)))?(u?(u=!1,c=r&&i(r)?r:[]):c=r&&o(r)?r:{},a(d,{name:n,newValue:e(h,c,l)})):void 0!==l&&a(d,{name:n,newValue:l}));return d},hT}();function xT(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function ST(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function wT(){}!function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")&&e.default}(bT);var CT=.7,ET=1/CT,IT="\\s*([+-]?\\d+)\\s*",DT="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",PT="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",MT=/^#([0-9a-f]{3,8})$/,RT=new RegExp(`^rgb\\(${IT},${IT},${IT}\\)$`),kT=new RegExp(`^rgb\\(${PT},${PT},${PT}\\)$`),LT=new RegExp(`^rgba\\(${IT},${IT},${IT},${DT}\\)$`),AT=new RegExp(`^rgba\\(${PT},${PT},${PT},${DT}\\)$`),OT=new RegExp(`^hsl\\(${DT},${PT},${PT}\\)$`),TT=new RegExp(`^hsla\\(${DT},${PT},${PT},${DT}\\)$`),qT={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 NT(){return this.rgb().formatRgb()}function jT(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=MT.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?FT(t):3===n?new HT(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?zT(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?zT(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=RT.exec(e))?new HT(t[1],t[2],t[3],1):(t=kT.exec(e))?new HT(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=LT.exec(e))?zT(t[1],t[2],t[3],t[4]):(t=AT.exec(e))?zT(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=OT.exec(e))?KT(t[1],t[2]/100,t[3]/100,1):(t=TT.exec(e))?KT(t[1],t[2]/100,t[3]/100,t[4]):qT.hasOwnProperty(e)?FT(qT[e]):"transparent"===e?new HT(NaN,NaN,NaN,0):null}function FT(e){return new HT(e>>16&255,e>>8&255,255&e,1)}function zT(e,t,n,r){return r<=0&&(e=t=n=NaN),new HT(e,t,n,r)}function WT(e){return e instanceof wT||(e=jT(e)),e?new HT((e=e.rgb()).r,e.g,e.b,e.opacity):new HT}function $T(e,t,n,r){return 1===arguments.length?WT(e):new HT(e,t,n,null==r?1:r)}function HT(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function VT(){return`#${YT(this.r)}${YT(this.g)}${YT(this.b)}`}function BT(){const e=GT(this.opacity);return`${1===e?"rgb(":"rgba("}${UT(this.r)}, ${UT(this.g)}, ${UT(this.b)}${1===e?")":`, ${e})`}`}function GT(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function UT(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function YT(e){return((e=UT(e))<16?"0":"")+e.toString(16)}function KT(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new JT(e,t,n,r)}function XT(e){if(e instanceof JT)return new JT(e.h,e.s,e.l,e.opacity);if(e instanceof wT||(e=jT(e)),!e)return new JT;if(e instanceof JT)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new JT(a,s,l,e.opacity)}function JT(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function ZT(e){return(e=(e||0)%360)<0?e+360:e}function QT(e){return Math.max(0,Math.min(1,e||0))}function eq(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}xT(wT,jT,{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 XT(this).formatHsl()},formatRgb:NT,toString:NT}),xT(HT,$T,ST(wT,{brighter(e){return e=null==e?ET:Math.pow(ET,e),new HT(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?CT:Math.pow(CT,e),new HT(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new HT(UT(this.r),UT(this.g),UT(this.b),GT(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:VT,formatHex:VT,formatHex8:function(){return`#${YT(this.r)}${YT(this.g)}${YT(this.b)}${YT(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:BT,toString:BT})),xT(JT,function(e,t,n,r){return 1===arguments.length?XT(e):new JT(e,t,n,null==r?1:r)},ST(wT,{brighter(e){return e=null==e?ET:Math.pow(ET,e),new JT(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?CT:Math.pow(CT,e),new JT(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new HT(eq(e>=240?e-240:e+120,i,r),eq(e,i,r),eq(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new JT(ZT(this.h),QT(this.s),QT(this.l),GT(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=GT(this.opacity);return`${1===e?"hsl(":"hsla("}${ZT(this.h)}, ${100*QT(this.s)}%, ${100*QT(this.l)}%${1===e?")":`, ${e})`}`}}));const tq=Math.PI/180,nq=180/Math.PI,rq=.96422,iq=.82521,oq=4/29,aq=6/29,sq=3*aq*aq,lq=aq*aq*aq;function uq(e){if(e instanceof cq)return new cq(e.l,e.a,e.b,e.opacity);if(e instanceof mq)return gq(e);e instanceof HT||(e=WT(e));var t,n,r=hq(e.r),i=hq(e.g),o=hq(e.b),a=dq((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?t=n=a:(t=dq((.4360747*r+.3850649*i+.1430804*o)/rq),n=dq((.0139322*r+.0971045*i+.7141733*o)/iq)),new cq(116*a-16,500*(t-a),200*(a-n),e.opacity)}function cq(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function dq(e){return e>lq?Math.pow(e,1/3):e/sq+oq}function pq(e){return e>aq?e*e*e:sq*(e-oq)}function fq(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function hq(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function mq(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function gq(e){if(isNaN(e.h))return new cq(e.l,0,0,e.opacity);var t=e.h*tq;return new cq(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}xT(cq,function(e,t,n,r){return 1===arguments.length?uq(e):new cq(e,t,n,null==r?1:r)},ST(wT,{brighter(e){return new cq(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new cq(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new HT(fq(3.1338561*(t=rq*pq(t))-1.6168667*(e=1*pq(e))-.4906146*(n=iq*pq(n))),fq(-.9787684*t+1.9161415*e+.033454*n),fq(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),xT(mq,function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof mq)return new mq(e.h,e.c,e.l,e.opacity);if(e instanceof cq||(e=uq(e)),0===e.a&&0===e.b)return new mq(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*nq;return new mq(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new mq(e,t,n,null==r?1:r)},ST(wT,{brighter(e){return new mq(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new mq(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return gq(this).rgb()}}));var vq=e=>()=>e;function yq(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):vq(isNaN(e)?t:e)}!function e(t){var n=function(e){return 1===(e=+e)?yq:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):vq(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=$T(e)).r,(t=$T(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=yq(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);var bq="center",xq="bottom";[{key:"NoDataExist",alignment:bq,condition:function(e){var t=e.layoutService;if(!t)return!1;var n=t.meta.size;return n.x*n.y===0}},{key:"OnlyNanDataMeasure",translationKey:"OnlyNanData",alignment:bq,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:bq,condition:function(e){var t=e.layoutService;if(!t)return!1;if(!t.meta.isContinuous)return!1;var n=t.getHyperCubeValue("qDimensionInfo.0");return n&&(n.qMax<n.qMin||"NaN"===n.qMax)}},{key:"OnlyNegativeOrZeroValues",alignment:bq},{key:"DataRangeIncludingZero",alignment:xq},{key:"LimitedData",alignment:xq},{key:"NegativeOrZeroValues",alignment:xq}].reduce(function(e,t){return e[t.key]=t,e},{});var Sq,wq=["__proto__","constructor"];function Cq(e,t,n){if(void 0!==e&&void 0!==t){var r=t.split("."),i=r[r.length-1];if(!wq.some(function(e){return r.includes(e)})){for(var o=e,a=0;a<r.length-1;++a){var s=r[a];void 0===o[s]&&(o[s]=Number.isNaN(+r[a+1])?{}:[]),o=o[s]}void 0!==n?o[i]=n:delete o[i]}}}function Eq(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return e},n=function(){var e={};return{get:function(t){return e[t]},set:function(t,n){return e[t]=n,n},has:function(t){return t in e},remove:function(t){delete e[t]},empty:function(){e={}}}}();return function(r){var i=t(r);return n.has(i)?n.get(i):n.set(i,e(r))}}function Iq(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return function(){for(var r=this,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];clearTimeout(t),t=setTimeout(function(){return e.apply(r,o)},n)}}function Dq(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function Pq(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=Rq)):void 0===t&&(t=Mq);for(var n,r,i,o,a,s=new Aq(e),l=[s];n=l.pop();)if((i=t(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)l.push(r=i[o]=new Aq(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Lq)}function Mq(e){return e.children}function Rq(e){return Array.isArray(e)?e[1]:null}function kq(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function Lq(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function Aq(e){this.data=e,this.depth=this.height=0,this.parent=null}Aq.prototype=Pq.prototype={constructor:Aq,count:function(){return this.eachAfter(Dq)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,i,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=s.pop();)e.call(t,o,++l,this);return this},eachBefore:function(e,t){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t},copy:function(){return Pq(this).eachBefore(kq)},[Symbol.iterator]:function*(){var e,t,n,r,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n])}while(o.length)}},Sq=function(e){
|
|
100
100
|
/*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
|
|
101
|
-
e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,s,l,u,c,d,p=e.length,f=e.search(/[0-9\-\+#]/),h=f>0?e.substring(0,f):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),v=p-g,y=e.substring(v,v+1),b=v+("."===y||","===y?1:0),x=g>0?e.substring(b,p):"";if(n=(t="-"===(e=e.substring(f,b)).charAt(0)?-t:+t)<0?t=-t:0,i=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",o=r&&r[1]&&r[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(u=t.split("."))[1]||u[1]&&u[1].length<=s)&&(t=(+t).toFixed(s+1)),c=e[0].split(o),e[0]=c.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;u[0].length<e[0].length-a;)u[0]="0"+u[0];else 0===+u[0]&&(u[0]="");if((t=t.split("."))[0]=u[0],l=c[1]&&c[c.length-1].length){for(m="",v=(d=t[0]).length%l,p=d.length,b=0;b<p;b++)m+=d.charAt(b),!((b-v+1)%l)&&b<p-l&&(m+=o);t[0]=m}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),h+(n?"-":"")+r+x}},yq({exports:{}});const kq=(e,t=jO.TEXT,n=jO.WHITE)=>{const r=ZO(e??""),i=ZO(t),o=ZO(n);return r.isInvalid()?t:function(e,t,n){const r=QO(e,t),i=QO(e,n);if(void 0!==r&&void 0!==i)return r>i?t:n}(r,o,i).getRGB()},Lq=e=>{const t=e.getStyle("","","dataColors.selected")||jO.SELECTED,n=function(e,t){const n=ZO(eT),r=ZO(e),i=ZO(t);if(r.isInvalid()||i.isInvalid()||r.getAlpha()<1||i.getAlpha()<1)return t;const o=QO(n,r),a=QO(i,r),s=o>a||o>4.5;return!s&&a>3?i.getHex():s?eT:"#000000"}(t,jO.TEXT);return{background:t,color:n}},Aq=(e,t)=>{const n=ZO(e);return 0===n.a?(n.setAlpha(t.opacity),n.getString()):n.isDark()?n.getBrightenedColor(t.brighter).getString():n.getDarkenedColor(t.darker).getString()},Oq=e=>{const t=ZO(e);return t.isInvalid()?null:1===t.a?t.getRGB():t.getRGBA()},Tq=e=>{e.stopPropagation(),e.preventDefault()},qq=e=>{(e instanceof HTMLElement||e instanceof SVGElement)&&e.focus()},_q=e=>{const{currentTarget:t}=e;if("true"===t.getAttribute("data-dragging"))return!0;const n=t.closest(".exploration-panel");if(!n)return!1;const r=n.getElementsByClassName("section-item-container");return Array.from(r).some(e=>"true"===e.getAttribute("data-dragging"))},Nq=(e,t)=>{const{key:n,currentTarget:r}=e;if(r===t.current&&n===KA.Tab)if(e.preventDefault(),e.shiftKey)((e,t)=>{const{currentTarget:n}=e;if(n!==t.current)return;const r=n.closest('[role="region"]')?.getElementsByTagName("button")[0];r&&qq(r)})(e,t);else{const e=r.parentElement?.getElementsByClassName("exploration-section-header")[0];e&&qq(e)}},jq=(e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=t.sectionIndex??2;if(0===r)return void((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=n.closest(".exploration-panel")?.getElementsByTagName("input")[0];r&&qq(r)})(e,t);const i=n.closest(".exploration-panel")?.getElementsByClassName("exploration-list")[r-1],o=i?.getElementsByClassName("exploration-item-focus").length??0;if(o>0){const e=i?.getElementsByClassName("exploration-draggable-icon")[o-1];e&&qq(e)}},Fq=(e,t)=>{const{key:n}=e;switch(n){case KA.Tab:Tq(e),e.shiftKey?jq(e,t):((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=n.closest(".exploration-list"),i=r?.getElementsByClassName("exploration-item-focus")[0];if(!i){const e=n.closest(".exploration-panel")?.getElementsByClassName("exploration-list")[2].getElementsByClassName("exploration-section-header")[0];return void(e&&qq(e))}qq(i)})(e,t);break;case KA.Down:if(_q(e))break;e.preventDefault(),((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=n.closest(".exploration-panel"),i=r?.getElementsByClassName("exploration-section-header").length??0;let o;if(0===i)return;const a=t.sectionIndex??2;o=a+1<i?r?.getElementsByClassName("exploration-section-header")[a+1]:r?.getElementsByClassName("exploration-section-header")[0],o&&qq(o)})(e,t);break;case KA.Up:if(_q(e))break;e.preventDefault(),((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=n.closest(".exploration-panel"),i=r?.getElementsByClassName("exploration-section-header").length??0;let o;if(0===i)return;const a=t.sectionIndex??2;o=a-1>=0?r?.getElementsByClassName("exploration-section-header")[a-1]:r?.getElementsByClassName("exploration-section-header")[i-1],o&&qq(o)})(e,t);break;case KA.Enter:case KA.Space:e.preventDefault(),((e,t)=>{const{currentTarget:n}=e;if(e.preventDefault(),n!==t.ref.current)return;const r="all"!==t.checkState;t.toggleAllCheckboxes(r)})(e,t)}},zq=({children:e})=>Yn.jsx("span",{style:{width:"fit-content",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",fontWeight:"bold"},children:e}),Wq=({children:e,sectionIndex:t})=>{const n=nx(void 0!==t?mO(t):TO),r=rx(void 0!==t?gO(t):qO),i=o.useRef(null),a={ref:i,toggleAllCheckboxes:r,checkState:n,sectionIndex:t};return Yn.jsxs(xl,{ref:i,className:"exploration-section-header",tabIndex:0,onKeyDown:e=>{Fq(e,a)},sx:{display:"flex",alignItems:"center",width:"100%",padding:"2px 8px 2px 8px",boxSizing:"border-box",fontSize:"14px","&:focus-visible":{boxShadow:`0 0 0 2px ${SO} inset`}},children:[Yn.jsx(Gl,{disabled:"disabled"===n,checked:"all"===n,indeterminate:"some"===n,onChange:e=>{r(e.target.checked)},size:"small",style:{flexShrink:0,padding:9}}),Yn.jsx(zq,{children:e})]})},$q=({sectionIndex:e})=>{const t=nx(pO(e));return Yn.jsx(Wq,{sectionIndex:e,children:t})},Hq=r((e,t)=>Yn.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:Yn.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"})})),Vq=Ta("div")({position:"absolute",width:"1px",height:"1px",padding:0,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0}),Bq=Ta(Hq)(()=>({padding:"6px 6px",flexShrink:0,cursor:"grab","&:focus-visible":{boxShadow:`0 0 0 2px ${SO} inset`}})),Gq=e=>"svg"===e.tagName?"exploration-draggable-icon":e.className,Uq=(e,t)=>{const n=e.closest(".exploration-list"),r=n?.nextElementSibling||n?.parentElement?.nextElementSibling;if(null===r||!r){if(t===KA.Tab)return;return n?.closest(".exploration-panel")?.getElementsByClassName("exploration-section-header")[0]}return r.getElementsByClassName("exploration-section-header")[0]},Yq=e=>{const{currentTarget:t}=e,n=Gq(t);let r=t.closest("li")?.previousElementSibling?.getElementsByClassName(n)[0];if(!r){const e=t.closest(".exploration-list"),i=e?.querySelector(".exploration-section-header");if(i)return i;if(r=((e,t)=>{const n=e.closest(".exploration-list"),r=n?.previousElementSibling;if(null===r||!r)return e.closest(".exploration-panel")?.getElementsByClassName(t)[1];const i=r.getElementsByClassName(t);return i.length>0?i[i.length-1]:void 0})(t,n),!r){const e=t.closest(".exploration-panel")?.getElementsByClassName(n)[1];return e??null}}return r},Kq=(e,t)=>{const{currentTarget:n}=e;if(n===t.items.draggableIconRef.current){const e=n.closest("li")?.getElementsByClassName("exploration-item")[0];return void(e&&qq(e))}if(n===t.items.explorationItemRef.current){const e=n.getElementsByClassName("exploration-draggable-icon")[0];return void qq(e)}n===t.items.explorationItemFocusRef.current&&t.toggleCheckedById(t.id)},Xq=e=>{const t=e.key===KA.Down?(e=>{const{currentTarget:t,key:n}=e,r=Gq(t),i=t.closest("li");let o=i?.nextElementSibling?.getElementsByClassName(r)[0];return o||(o=Uq(t,n),o)?o:t.closest(".exploration-panel")?.getElementsByClassName(r)[0]})(e):Yq(e);t&&qq(t)},Jq=(e,t)=>{const{key:n}=e;switch(n){case KA.Tab:if(e.shiftKey)e.preventDefault(),((e,t)=>{const{currentTarget:n}=e,r=n.closest("ul")?.getElementsByClassName("exploration-item-focus");if(n===t.items.draggableIconRef.current){if(t.itemIndex>=0){const e=r&&r[t.itemIndex];return void(e&&qq(e))}const n=Yq(e);n&&qq(n)}if(n===t.items.explorationItemFocusRef.current){const t=n.closest("li")?.previousElementSibling?.getElementsByClassName("exploration-draggable-icon")[0];if(t)return void qq(t);const r=Yq(e);r&&qq(r)}})(e,t);else{const n=((e,t)=>{const{currentTarget:n,key:r}=e;if(e.shiftKey)return!0;if(n===t.items.explorationItemRef.current){const e=n.getElementsByClassName("exploration-draggable-icon")[0];return qq(e),!0}if(n===t.items.explorationItemFocusRef.current){const e=n.closest("li")?.getElementsByClassName("exploration-draggable-icon")[0];return e&&qq(e),!0}if(n===t.items.draggableIconRef.current){const e=n.closest("ul")?.getElementsByClassName("exploration-item-focus");if((e?.length||0)-1>t.itemIndex){const n=e&&e[t.itemIndex+1];return n&&qq(n),!0}const i=Uq(n,r);if(!i)return!1;qq(i)}return!0})(e,t);n?Tq(e):e.stopPropagation()}break;case KA.Down:case KA.Up:if(_q(e))break;Tq(e),Xq(e);break;case KA.Enter:if(e.currentTarget===t.items.explorationItemRef.current&&t.dragHandleRef){t.dragHandleRef(e.currentTarget);break}Tq(e),Kq(e,t);break;case KA.Space:Tq(e),Kq(e,t)}},Zq=({children:e})=>Yn.jsx("span",{style:{width:"fit-content",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flexGrow:1},children:e}),Qq=({title:e,dragHandleRef:t,...n})=>{const[r,i]=ix(Bx),a=nx(xx),s=o.useRef(null),l=o.useRef(null),u=o.useRef(null),c={id:n.id,itemIndex:n.itemIndex,toggleCheckedById:i,items:{explorationItemRef:s,explorationItemFocusRef:l,draggableIconRef:u},dragHandleRef:t};return o.useEffect(()=>{t&&s.current&&t(s.current)},[t]),Yn.jsxs(xl,{ref:s,className:"exploration-item",onClick:e=>{e.stopPropagation(),i(n.id)},onKeyDown:e=>{Jq(e,c)},tabIndex:0,style:{display:"flex",alignItems:"center",width:"100%",cursor:"pointer",padding:0,boxSizing:"border-box",fontSize:"14px"},title:e,sx:{"&:hover":{backgroundColor:"action.hover"},"&:focus-visible":{boxShadow:`0 0 0 2px ${SO} inset`}},children:[Yn.jsxs(xl,{ref:l,className:"exploration-item-focus",component:"div",tabIndex:0,onKeyDownCapture:e=>{Jq(e,c)},sx:{display:"flex",minWidth:0,alignItems:"center",justifyContent:"space-between",flexGrow:1,marginRight:"4px","&:focus-visible":{boxShadow:`0 0 0 2px ${SO} inset`}},children:[Yn.jsx(Gl,{checked:r.has(n.id),"aria-label":a("ChartExploration.ListItem.Label",e),size:"small",tabIndex:-1,style:{padding:9,flexShrink:0,visibility:-1===n.id?"hidden":"visible"}}),Yn.jsx(Zq,{children:e})]}),Yn.jsx(Bq,{ref:u,className:"exploration-draggable-icon",tabIndex:0,height:"16px",onClick:e=>{e.stopPropagation()},onKeyDownCapture:e=>{Jq(e,c)}})]})},e_=e=>{const t=nx(dO(e))??"";return Yn.jsx(Qq,{title:t,...e})},t_=()=>{const e=nx(fO),t=nx(hO),n=nx(DO),r=rx(vO);return Yn.jsx(BA,{numberOfSections:2,numberOfItemsInSection:t,keyExtractor:e,emptyTexts:n,onDragEnd:r,dragOverlayRenderer:MO,headerRenderer:$q,itemRenderer:e_})},n_=({itemIndex:e})=>{const t=nx(LO(e));return Yn.jsx(PO,{children:t})},r_=()=>{const e=nx(xx);return Yn.jsx(Wq,{children:e("Common.Values")})},i_=e=>{const{itemIndex:t}=e,n=nx(LO(t));return Yn.jsx(Qq,{title:n,...e})},o_=()=>{const e=nx(AO),t=nx(OO),n=nx(IO),r=rx(_O);return Yn.jsx(xl,{className:"exploration-header-section",style:{height:"100%",display:"flex",flexDirection:"column-reverse"},children:Yn.jsx(BA,{numberOfSections:1,numberOfItemsInSection:t,keyExtractor:e,emptyTexts:n,onDragEnd:r,dragOverlayRenderer:n_,headerRenderer:r_,itemRenderer:i_})})},a_=r((e,t)=>Yn.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:Yn.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"})})),s_=()=>{const[e,t]=ix(Sx),n=nx(xx),r=o.useRef(null),[i]=nx(OO),[a=0,s=0]=nx(hO),l=m(e=>{t(e.target.value)},[t]),u=0===e.length||0===a&&0===s&&0===i?n("Common.Search.NoResultsAvailable"):n("ChartExploration.Pivot.Search.ResultsFound",a.toString(),s.toString(),i.toString());return Yn.jsxs(xl,{ref:r,onKeyDown:e=>{Nq(e,r)},style:{position:"sticky",top:0,zIndex:10,width:"calc(100% - 24px)",backgroundColor:"var(--sprout-common-background-color-weak)",paddingTop:0,paddingRight:12,paddingLeft:12,paddingBottom:12},children:[Yn.jsx(Vq,{"data-testid":"screenOnly-search-results","aria-live":"polite","aria-atomic":"true",children:u}),Yn.jsx(rd,{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:Yn.jsx(Ou,{position:"start",children:Yn.jsx(a_,{})}),inputProps:{style:{fontSize:"14px",paddingTop:6,paddingBottom:6}}})]})},l_=e=>{const t=ha(Vd());return Yn.jsx(_a,{theme:t,children:Yn.jsx(Xb,{children:Yn.jsx(Gx,{props:e,children:Yn.jsxs(xl,{className:"exploration-panel",style:{display:"flex",flexDirection:"column"},children:[Yn.jsx(s_,{}),Yn.jsx(t_,{}),Yn.jsx(o_,{})]})})})})},u_=e=>{if(e.flags.isEnabled("CLIENT_IM_5973_PIVOT_TABLE_EXPLORATION"))return{component:l_,classification:{tags:["exploration"],exclusive:!0}}};var c_=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}(c_||{}),d_=function(e){return e.COMPARE="compare",e.GENERAL="general",e}(d_||{}),p_=function(e){return e.VALUES="values",e.CONDITION="condition",e.SEARCH="search",e.CLEAR_SELECTION="clear_selection",e.TOP_BOTTOM="top_bottom",e}(p_||{}),f_=function(e){return e.FIXED_VALUE="fixed_value",e.CALCULATED_VALUE="calculated_value",e}(f_||{});const h_=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,m_=e=>{if(!Array.isArray(e))return"";let t="{<";const n=[];if(e.forEach(e=>{let t,r=`[${e.field}]${e.exclude?"-":""}={`,i="}";switch(e.type){case p_.SEARCH:t=(e=>{let t="",n="";const r=e.options?.mode;if(!r)return"";switch(r){case c_.BEGINNING_OF_WORD:t="*^",n="*";break;case c_.ENDS_WITH:t="*";break;case c_.STARTS_WITH:n="*";break;case c_.MATCHES_EXACTLY:break;case c_.CONTAINS:default:t="*",n="*"}const i=e.options.values?.[0]??"";return""!==i?`"${t}${i}${n}"`:""})(e);break;case p_.CONDITION:t=(e=>{const{options:t}=e,n=t?.mode===d_.GENERAL,r=t?.modifier?.type===f_.FIXED_VALUE,i=t?.modifier?.operator?t.modifier.operator.split(" "):[];if(0===i.length||!r&&(!t.firstValue?.aggregator||!t.firstValue?.field)||r&&!t.firstValue?.fixedValue||n&&(!t.conditionField?.aggregator||!t.conditionField?.field))return"";let o,a,s="=";n&&r?(o=`${t.conditionField?.aggregator}(${h_(t.conditionField?.field)})`,a=`${t.firstValue?.fixedValue}`):!n&&r?(o="",a=`${t.firstValue?.fixedValue}`,s=""):n||r?(o=`${t.conditionField?.aggregator}(${h_(t.conditionField?.field)})`,a=`${t.firstValue?.aggregator}(${h_(t.firstValue?.field)})`):(o=`${h_(e.field)}`,a=`${t.firstValue?.aggregator}(total ${h_(t.firstValue?.field)})`);const l=`${s}${o}${i[0]}${a}`;let u="";if(i.length>1){if(!r&&(!t.secondValue?.aggregator||!t.secondValue?.field)||r&&!t.secondValue?.fixedValue)return"";let e,a;n&&r?(e=`${t.secondValue?.fixedValue}`,a=` and ${o}`):!n&&r?(e=`${t.secondValue?.fixedValue}`,a=""):n||r?(e=`${t.secondValue?.aggregator}(${h_(t.secondValue?.field)})`,a=` and ${o}`):(e=`${t.secondValue?.aggregator}(total ${h_(t.secondValue?.field)})`,a=` and ${o}`),u=`${a}${i[1]}${e}`}return`"${l}${u}"`})(e);break;case p_.CLEAR_SELECTION:t=`[${e.field}]=`,r="",i="";break;case p_.VALUES:default:t=e.options?.values?e.options.values.map(e=>`'${e.replace(/'/g,"''")}'`).join(","):""}""!==t&&n.push(`${r}${t}${i}`)}),0===n.length)return;return t+=`${n.join(",")}>}`,t},g_=[];for(let e=0;e<256;++e)g_.push((e+256).toString(16).slice(1));const v_=new Uint8Array(16);function y_(e,t,n){return crypto.randomUUID?crypto.randomUUID():function(e){e=e||{};const t=e.random??e.rng?.()??crypto.getRandomValues(v_);if(t.length<16)throw new Error("Random bytes length must be >= 16");return t[6]=15&t[6]|64,t[8]=63&t[8]|128,function(e,t=0){return(g_[e[t+0]]+g_[e[t+1]]+g_[e[t+2]]+g_[e[t+3]]+"-"+g_[e[t+4]]+g_[e[t+5]]+"-"+g_[e[t+6]]+g_[e[t+7]]+"-"+g_[e[t+8]]+g_[e[t+9]]+"-"+g_[e[t+10]]+g_[e[t+11]]+g_[e[t+12]]+g_[e[t+13]]+g_[e[t+14]]+g_[e[t+15]]).toLowerCase()}(t)}(e)}const b_=()=>crypto?.randomUUID?.()??y_(),x_=1e3,S_=1e3,w_=e=>{if(0===e.qInterColumnSortOrder.length)return;const t=e.qDimensions,n=((e,t)=>{const n=new Set;for(const t of e){if(n.has(t))return!0;n.add(t)}const r=e.includes(-1),i=e.filter(e=>-1!==e);if(t){const n=r?t.length+1:t.length;if(e.length!==n)return!0}const o=[...i].sort((e,t)=>e-t);for(let e=0;e<o.length;e++)if(o[e]!==e)return!0;return!1})(e.qInterColumnSortOrder,t);n&&(e.qInterColumnSortOrder=((e,t)=>{const n=[];if(t)for(let e=0;e<t.length;e++)n.push(e);return e.qMeasures.length>=2&&n.push(-1),n})(e,t))},C_=(e,t,n)=>{[e[t],e[n]]=[e[n],e[t]]},E_=e=>{if(!e)return;w_(e);const t=e.qDimensions,{qInterColumnSortOrder:n}=e;((e,t=[])=>{const n=t.filter(e=>-1!==e);for(let r=0;r<n.length;r++)if(-1!==n[r]&&n[r]!==r){const i=n[r],o=n.indexOf(r),a=n[o];C_(n,r,o),C_(e,r,o),C_(t,t.indexOf(i),t.indexOf(a))}})(t,n)},I_=P;class D_ extends I_{#u;#c;constructor(e,t){super(e),this.path=e.path,this.#u=t.translator,this.#c=t.flags.isEnabled}async addDimension(e,t,n,r){if(!e||this.#d(e))return;const i=t??!1;if(e.qDef.cId||(e.qDef.cId=b_()),r)return this.addAlternativeDimension(e,i,n);if(this.getDimensions().length<this.maxDimensions()){const t=await(async(e,t,n,r)=>{const i=e.getDimensions(),o=e.hcProperties.qNoOfLeftDims;return await e.autoSortDimension(t),E_(e.hcProperties),(-1===o||Number.isNaN(+o))&&(e.hcProperties.qNoOfLeftDims=i.length),n?((e,t,n,r)=>{if(!e)return;const{qInterColumnSortOrder:i,qNoOfLeftDims:o}=e,a=t.length,s=i.indexOf(-1),l=-1!==s,u=void 0!==r?r+(o||0):void 0;if(l&&void 0!==u&&s>=u?((e,t,n)=>{t.splice(n,1),t.push(e),t.splice(n+1,0,-1)})(a,i,s):i.push(a),void 0===r)t.push(n);else if(void 0!==u){const e=l&&u>s?u-1:u;t.splice(e,0,n)}})(e.hcProperties,i,t,r):((e,t,n,r)=>{if(!e||"number"!=typeof e.qNoOfLeftDims)return;const i=e.qNoOfLeftDims,{qInterColumnSortOrder:o}=e,a=t.length,s=o.indexOf(-1),l=-1!==s&&i>0&&s<i;if(o.push(a),l)void 0===r?t.splice(i-1,0,n):s<r?t.splice(r-1,0,n):(t.splice(r,0,n),o.splice(s,1),o.splice(s+1,0,-1));else{const e=r??i;t.splice(e,0,n),-1!==s&&(o.splice(s,1),o.splice(s+1,0,-1))}e.qNoOfLeftDims++})(e.hcProperties,i,t,r),t})(this,e,i,n);return this.#p({section:i?"columns":"rows",cId:e.qDef.cId,addLast:void 0===n}),t}}async addDimensions(e,t,n){const r=[];for await(const i of e){const e=await this.addDimension(i,n,void 0,t);e&&r.push(e)}return r}addAlternativeDimension(e,t,n){if(!e||this.#d(e))return;const r=this.getAlternativeDimensions();void 0===this.hcProperties.excludedNoOfLeftDims&&(this.hcProperties.excludedNoOfLeftDims=r.length);let i=n;return i=void 0===i?t?r.length:this.hcProperties.excludedNoOfLeftDims:t?this.hcProperties.excludedNoOfLeftDims+i:Math.min(i,this.hcProperties.excludedNoOfLeftDims),r.splice(i,0,e),t||this.hcProperties.excludedNoOfLeftDims++,this.#p({section:t?"columns":"rows",cId:e.qDef.cId,alternative:!0,addLast:void 0===n}),e}async addFieldDimension(e,t,n,r={}){const i=this.createFieldDimension(e,t,n);return this.addDimension(i,r.asColumn,void 0,!1)}async addFieldDimensions(e,t={}){const n=e.map(e=>this.createFieldDimension(e.field,e.label,e.defaults));return this.addDimensions(n,void 0,t.asColumn)}async addLibraryDimensions(e,t={}){const n=e.map(e=>this.createLibraryDimension(e.id,e.defaults));return this.addDimensions(n,void 0,t.asColumn)}reinsertDimension(e,t,n){e.qDef.cId||(e.qDef.cId=b_());if(this.getDimensions().length<this.maxDimensions())return this.addDimension(e,t,n);return this.reinsertAlternativeDimension(e,n,t)}reinsertAlternativeDimension(e,t,n){const r=this.getDimensions(),i=this.getAlternativeDimensions();if(r.length>=x_)return Promise.resolve();const o="number"==typeof t?t:i.length;return i.splice(o,0,e),this.#p({section:n?"columns":"rows",cId:e.qDef.cId,alternative:!0}),Promise.resolve(e)}async removeDimensions(e,t,n){return Promise.all([...e].reverse().map(e=>this.removeDimension(e,t,n)))}async removeDimension(e,t,n){if(t){const t=this.getAlternativeDimensions().splice(e,1)[0];return!n&&this.hcProperties.excludedNoOfLeftDims&&this.hcProperties.excludedNoOfLeftDims--,this.#f({cId:t.qDef.cId,section:n?"columns":"rows"}),t}const r=this.getDimensions(),i=this.properties.qHyperCubeDef.qNoOfLeftDims,o=this.hcProperties.qInterColumnSortOrder.indexOf(e);"number"==typeof this.properties.qHyperCubeDef.qNoOfLeftDims&&"number"==typeof o&&"number"==typeof i&&o+1<=i&&this.properties.qHyperCubeDef.qNoOfLeftDims--;const a=this.properties.qHyperCubeDef.columnWidths?this.properties.qHyperCubeDef.columnWidths[1]:void 0;Array.isArray(a)&&a.length>e&&a.splice(e,1);const s=r.splice(e,1).at(0);if(s)return((e,t)=>{if(!e)return-1;const n=e.indexOf(t);if(-1===n)return-1;for(let n=0;n<e.length;++n)e[n]>t&&e[n]--;e.splice(n,1)})(this.hcProperties.qInterColumnSortOrder,e),E_(this.hcProperties),this.#f({cId:s.qDef.cId,section:n?"columns":"rows"}),s}#d(e){return!(!e||void 0===e.qDef.cId)&&[...this.getDimensions(),...this.getAlternativeDimensions()].some(t=>t.qDef.cId===e.qDef.cId)}async addMeasures(e,t=!1){const n=[];for await(const r of e){const e=await this.addMeasure(r,t,void 0,!0);e&&n.push(e)}return n}addAlternativeMeasures(e,t){if(this.#h(e))return;const n=this.getAlternativeMeasures(),r=void 0===t?n.length:t,i=n.splice(r,0,e);return this.#m({cId:e.qDef.cId,alternative:!0,addLast:void 0===t}),i}async addMeasure(e,t,n,r){if(this.#h(e))return;if(e.qDef.cId||(e.qDef.cId=b_()),t)return this.addAlternativeMeasures(e,n);r||delete e.qDef.qNumFormat;const i=this.getMeasures();if(i.length<this.maxMeasures()){const t=1===i.length;return void 0!==n&&n>=0?i.splice(n,0,e):i.push(e),this.autoSortMeasure(e).then(()=>(t&&(this.hcProperties.qInterColumnSortOrder.push(-1),0===this.getDimensions().length&&(this.hcProperties.qNoOfLeftDims=0)),this.#m({cId:e.qDef.cId,addLast:void 0===n}),e))}return i.length<S_?(this.getAlternativeMeasures().push(e),this.#m({cId:e.qDef.cId,alternative:!0,addLast:void 0===n}),Promise.resolve(e)):Promise.resolve()}reinsertMeasure(e,t){const n=this.getMeasures(),r=this.getAlternativeMeasures(),i=this.hcProperties.qInterColumnSortOrder;if(e.qDef.cId||(e.qDef.cId=b_()),t=void 0!==t?t:n.length,n.length<this.maxMeasures()){if(n.splice(t,0,e),2===n.length){-1===i.indexOf(-1)&&i.push(-1)}this.#m({cId:e.qDef.cId})}else n.length<S_&&(t=r.length,r.splice(t,0,e),this.#m({cId:e.qDef.cId}));return Promise.resolve(e)}async removeMeasure(e,t){if(t&&"number"==typeof e){const t=this.getAlternativeMeasures().splice(e,1)[0];return this.#f({cId:t.qDef.cId,section:"measures"}),t}const n=this.getMeasures();let r,i,o;if("number"==typeof e&&e<n.length){r=2===n.length,i=this.getMeasures().splice(e,1)[0];const t=this.hcProperties.qInterColumnSortOrder;r&&(o=t.indexOf(-1),t.splice(o,1),this.hcProperties.qNoOfLeftDims&&o+1<=this.hcProperties.qNoOfLeftDims&&this.hcProperties.qNoOfLeftDims--)}else"number"==typeof e&&(i=this.getAlternativeMeasures().splice(e-n.length,1)[0]);if(i)return this.#f({cId:i.qDef.cId,section:"measures"}),i}async removeMeasures(e,t){return await Promise.all([...e].reverse().map(e=>this.removeMeasure(e,t))),e}#h(e){return!(!e||void 0===e.qDef.cId)&&[...this.getMeasures(),...this.getAlternativeMeasures()].some(t=>t.qDef.cId===e.qDef.cId)}getSorting(){throw new Error("don't call this")}changeSorting(){throw new Error("don't call this")}setSorting(){throw new Error("don't call this")}getRowDimensions(){const e=this.#g("rows"),t=this.getDimensions();return e.filter(e=>e>=0).map(e=>t[e])}getColumnDimensions(){const e=this.#g("columns"),t=this.getDimensions();return e.filter(e=>e>=0).map(e=>t[e])}getAlternativeRowDimensions(){const e=this.getAlternativeDimensions(),{excludedNoOfLeftDims:t}=this.hcProperties;return-1===t?e:e.slice(0,t)}getAlternativeColumnDimensions(){const e=this.getAlternativeDimensions(),{excludedNoOfLeftDims:t}=this.hcProperties;return-1===t?[]:e.slice(t)}#v(e){const t=this.hcProperties.rankedList?.[e];return t||this.createRankedList(e)}#y(e){return[...this.#v(e)]}#b(e,t){return void 0===this.hcProperties.rankedList&&(this.hcProperties.rankedList={}),this.hcProperties.rankedList[e]=t,t}#x(e){const t=({qDef:t})=>t.cId===e;if(-1===e){return this.hcProperties.qInterColumnSortOrder.indexOf(-1)+1<=this.hcProperties.qNoOfLeftDims?"rows":"columns"}return this.getRowDimensions().some(t)||this.getAlternativeRowDimensions().some(t)?"rows":this.getColumnDimensions().some(t)||this.getAlternativeColumnDimensions().some(t)?"columns":null}#S(e){const t=({qDef:t})=>t.cId===e;return!(!this.getAlternativeDimensions().some(t)&&!this.getAlternativeMeasures().some(t))}#g(e){const{qInterColumnSortOrder:t,qNoOfLeftDims:n}=this.hcProperties;if(this.#w())return"columns"===e?t:[];switch(e){case"rows":return-1===n?t:t.slice(0,n);case"columns":return-1===n?[]:t.slice(n);default:throw new Error(`Unknown section in #getInterColumnSortOrderBySection: ${e}`)}}#w(){const{qNoOfLeftDims:e}=this.hcProperties,t=-1===e||Number.isNaN(+e);return 0===this.getDimensions().length&&this.getMeasures().length>0&&t}#C(e){const t=this.hcProperties.qInterColumnSortOrder.indexOf(-1);if(-1===t)return!1;if(this.#w())return"columns"===e;if(void 0===this.hcProperties.qNoOfLeftDims)return"rows"===e;switch(e){case"rows":return t+1<=this.hcProperties.qNoOfLeftDims;case"columns":return t+1>this.hcProperties.qNoOfLeftDims;default:return!1}}#E(e,t=!0){const n=e=>-1===e?-1:e.qDef.cId;if("measures"===e)return this.getMeasures().concat(t?this.getAlternativeMeasures():[]).map(n);const r=this.#g(e),i=this.getDimensions(),o=r.map(e=>-1===e?-1:i[e]);switch(e){case"rows":return o.concat(t?this.getAlternativeRowDimensions():[]).map(n);case"columns":return o.concat(t?this.getAlternativeColumnDimensions():[]).map(n);default:throw new Error(`Unknown section in #isCorruptRankedList: ${e}`)}}isRankedListCorrupt(e){const t=this.hcProperties.rankedList?.[e],n=this.properties.qInfo?.qId;if(!t)return!0;if(new Set(t).size!==t.length){const r=t.filter((e,n)=>t.indexOf(e)!==n);return console.warn("Corrupt ranked list detected: duplicate ids",{duplicates:r,section:e,chartId:n}),!0}const r=this.#E(e);if(t.length!==r.length)return console.warn("Corrupt ranked list detected: length mismatch",{section:e,chartId:n,fieldIds:r,rankedList:t,diff:new Set(r).symmetricDifference(new Set(t))}),!0;const i=r.filter(e=>!t.includes(e));if(i.length>0)return console.warn("Corrupt ranked list detected: missing ids",{missingIds:i,section:e,chartId:n}),!0;const o=this.#E(e,!1),a=t.filter(e=>o.includes(e)),s=o.filter((e,t)=>e!==a[t]);return s.length>0&&(console.warn("Corrupt ranked list detected: main field order mismatch",{section:e,chartId:n,orderMismatchIds:s}),!0)}createRankedList(e){switch(e){case"rows":case"columns":return this.#I({section:e});case"measures":return this.#D();default:throw new Error(`Unknown section in getRankedList: ${e}`)}}#I({section:e}){const t=this.getDimensions(),n=this.#g(e),r="columns"===e?this.getAlternativeColumnDimensions():this.getAlternativeRowDimensions(),i=n.map(e=>-1===e?-1:t[e].qDef.cId);return i.push(...r.map(e=>e.qDef.cId)),this.#b(e,i)}#D(){if(void 0!==this.hcProperties.rankedList?.measures&&!this.#c("SUPPORT-9810-MISSING-MEASURES")&&!this.#c("SUPPORT-9810-MIGRATE-RANKED-LISTS"))return this.hcProperties.rankedList.measures;const e=[...this.getMeasures(),...this.getAlternativeMeasures()].map(e=>e.qDef.cId);return this.#b("measures",e)}#P({section:e,cId:t,fields:n,addLast:r}){const i=this.#v(e),o=n.findIndex(e=>e.qDef.cId===t),a=n[o+1]?.qDef.cId,s=n[o-1]?.qDef.cId;if(r)i.push(t);else if(o>=0)if(a){const e=i.indexOf(a);i.splice(e,0,t)}else if(s){const e=i.indexOf(s);i.splice(e+1,0,t)}else i.push(t);return void 0===this.hcProperties.rankedList&&(this.hcProperties.rankedList={}),this.hcProperties.rankedList[e]}#p({section:e,cId:t,alternative:n=!1,addLast:r=!1}){if(void 0===this.hcProperties.rankedList?.[e])return this.#I({section:e});let i;return i="columns"===e?n?this.getAlternativeColumnDimensions():this.getColumnDimensions():n?this.getAlternativeRowDimensions():this.getRowDimensions(),this.#P({section:e,cId:t,fields:i,addLast:r})}#m({cId:e,alternative:t=!1,addLast:n=!1}){if(void 0===this.hcProperties.rankedList?.measures)return this.#D();const r=t?this.getAlternativeMeasures():this.getMeasures();return this.#M(),this.#P({section:"measures",cId:e,fields:r,addLast:n})}#M(){const e=this.#v("rows"),t=this.#v("columns");this.#C("rows")&&!e.includes(-1)?e.push(-1):this.#C("columns")&&!t.includes(-1)&&t.push(-1)}#R(){if(this.hcProperties.qInterColumnSortOrder.includes(-1))return;const e=this.#v("rows"),t=this.#v("columns"),n=e.indexOf(-1),r=t.indexOf(-1);-1!==n&&e.splice(n,1),-1!==r&&t.splice(r,1)}#f({cId:e,section:t}){const n=this.#v(t),r=n.indexOf(e);-1!==r&&(n.splice(r,1),this.#R())}async moveMeasureToAlternative(e){const t=this.getMeasures().findIndex(t=>t.qDef.cId===e),n=this.#y("measures"),r=n.indexOf(e);if(-1===t)return;const i=await this.removeMeasure(t);if(void 0===i)return;const o=n.slice(r+1).find(e=>this.getAlternativeMeasures().some(t=>t.qDef.cId===e)),a=this.getAlternativeMeasures().findIndex(e=>e.qDef.cId===o);await this.addAlternativeMeasures(i,-1===a?void 0:a),this.#b("measures",n)}async moveMeasureFromAlternative(e){const t=this.getAlternativeMeasures().findIndex(t=>t.qDef.cId===e),n=this.#y("measures"),r=n.indexOf(e);if(-1===t)return;const i=await this.removeMeasure(t,!0);if(void 0===i)return;const o=this.getMeasures().map(e=>e.qDef.cId),a=n.slice(r+1).find(e=>o.includes(e)),s=o.findIndex(e=>e===a);await this.addMeasure(i,!1,-1===s?void 0:s),this.#b("measures",n)}async moveDimensionToAlternative(e){const t=this.#x(e),n=this.getDimensions().findIndex(t=>t.qDef.cId===e);if(-1===n||null===t)return;const r=this.#y(t),i=r.indexOf(e),o="columns"===t,a=await this.removeDimension(n,!1,o);if(void 0===a)return;const s=r.slice(i+1).find(e=>this.getAlternativeDimensions().some(({qDef:t})=>t.cId===e));let l=this.getAlternativeDimensions().findIndex(({qDef:e})=>e.cId===s);l=-1===l?void 0:l;void 0!==this.addAlternativeDimension(a,o,l)&&this.#b(t,r)}async moveDimensionFromAlternative(e){const t=this.#x(e),n=this.getAlternativeDimensions().findIndex(t=>t.qDef.cId===e);if(-1===n||null===t)return;const r=this.#y(t),i=r.indexOf(e),o="columns"===t,a=await this.removeDimension(n,!0,o);if(void 0===a)return;const s=this.#E(t,!1),l=r.slice(i+1).find(e=>s.includes(e));let u=s.findIndex(e=>e===l);u=-1===u?void 0:u;void 0!==await this.addDimension(a,o,u)&&this.#b(t,r)}movePseudoDimension({toIndex:e,toSection:t}){const n=this.#x(-1);if(null===n)return void console.error("Cannot move pseudo dimension, unable to find it in any section",{toIndex:e,toSection:t});const r="columns"===t,i=n===t,o=this.#y(t);if(i){const e=o.indexOf(-1);o.splice(e,1)}else{const i=this.#v(n),o=i.indexOf(-1);if(-1===o)return void console.error("Couldn't delete pseudo dimension from current section",{toIndex:e,toSection:t,fromSection:n});i.splice(o,1),this.hcProperties.qNoOfLeftDims=r?Math.max(0,this.hcProperties.qNoOfLeftDims-1):this.hcProperties.qNoOfLeftDims+1}const a=e-o.slice(0,e).filter(e=>this.#S(e)).length,s=r?this.hcProperties.qNoOfLeftDims+a:a,l=this.hcProperties.qInterColumnSortOrder.indexOf(-1);this.hcProperties.qInterColumnSortOrder.splice(l,1),this.hcProperties.qInterColumnSortOrder.splice(s,0,-1),o.splice(e,0,-1),this.#b(t,o)}async moveDimension({cId:e,toIndex:t,toSection:n}){const r=this.#x(e),i=this.#S(e);if(null===r)return void console.error("Cannot move dimension, unable to find it in any section",{cId:e});const o=(i?this.getAlternativeDimensions():this.getDimensions()).findIndex(({qDef:t})=>t.cId===e);if(-1===o)return void console.error("Couldn't find dimension to move",{cId:e,toIndex:t,toSection:n});const a=this.#y(n),s=a.indexOf(e);-1!==s&&a.splice(s,1);const l=Math.max(0,Math.min(t,a.length));l!==t&&console.warn("[moveDimension] toIndex is out of bounds, clamping it",{toIndex:t,clampedToIndex:l});const u=l-a.slice(0,l).filter(e=>this.#S(e)!==i).length,c="columns"===n,d="columns"===r,p=await this.removeDimension(o,i,d);if(void 0===p)return;void 0!==await this.addDimension(p,c,u,i)&&(a.splice(l,0,e),this.#b(n,a))}async moveMeasure({cId:e,toIndex:t}){const n=this.#S(e),r=(n?this.getAlternativeMeasures():this.getMeasures()).findIndex(t=>t.qDef.cId===e);if(-1===r)return void console.error("Cannot move measure, unable to find it in any section",{cId:e});const i=this.#y("measures"),o=i.indexOf(e);-1!==o&&i.splice(o,1);const a=Math.max(0,Math.min(t,i.length));a!==t&&console.warn("[moveMeasure] toIndex is out of bounds, clamping it",{toIndex:t,clampedToIndex:a});const s=await this.removeMeasure(r,n);if(void 0===s)return;const l=a-i.slice(0,a).filter(e=>this.#S(e)!==n).length;void 0!==await this.addMeasure(s,n,l)&&(i.splice(a,0,e),this.#b("measures",i))}getLabels(){return this.getMeasures().filter(e=>!e.qLibraryId&&!!e.qDef.qLabel).map(e=>e.qDef.qLabel)}IsHCInStraightMode(){return"S"===this.hcProperties.qMode}getFilters(){return this.properties.filters??[]}getFilter(e){return this.getFilters().find(t=>t.id===e)}addFilterField(e){const t=e.qTags??e.tags,n=Array.isArray(t)&&t.includes("$numeric"),r=e.isDerived,i=Array.isArray(this.properties.filters)?this.properties.filters:[],o={type:"values",field:r?e.value??e.fullname:e.name??e.label??e.field,options:{values:[]},exclude:!1,id:b_(),qTags:Array.isArray(t)?t:[],isNumeric:n};return i.push(o),this.properties.filters=i,this.properties.qHyperCubeDef.qContextSetExpression=m_(i),o}addFilters(e){const t=[];for(const n of e)t.push(this.addFilterField(n));return t}#k(e){const t=this.getFilters();return t.splice(e,1),this.properties.qHyperCubeDef.qContextSetExpression=m_(t),t}removeFilters(e){if(0===e.length)return[];const t=[...e].sort((e,t)=>t-e),n=this.getFilters().filter((t,n)=>e.includes(n));for(const e of t)this.#k(e);return n}getAddDimensionLabel(){return this.#u.get("Visualization.Requirements.AddDimension")}canColorBy(){return!1}}var P_,M_={exports:{}};var R_=(P_||(P_=1,function(e){self,e.exports=(()=>{var e={909:e=>{var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},a=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,i=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(r in e);return void 0===r||t.call(e,r)},s=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(i)return i(e,n).value}return e[n]};e.exports=function e(){var t,n,r,i,u,c,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=l(d,n),d!==(i=l(t,n))&&(h&&i&&(a(i)||(u=o(i)))?(u?(u=!1,c=r&&o(r)?r:[]):c=r&&a(r)?r:{},s(d,{name:n,newValue:e(h,c,i)})):void 0!==i&&s(d,{name:n,newValue:i}));return d}},8:(e,t)=>{(()=>{var e={229:e=>{var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},a=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,i=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(r in e);return void 0===r||t.call(e,r)},s=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(i)return i(e,n).value}return e[n]};e.exports=function e(){var t,n,r,i,u,c,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=l(d,n),d!==(i=l(t,n))&&(h&&i&&(a(i)||(u=o(i)))?(u?(u=!1,c=r&&o(r)?r:[]):c=r&&a(r)?r:{},s(d,{name:n,newValue:e(h,c,i)})):void 0!==i&&s(d,{name:n,newValue:i}));return d}}},n={};function r(t){var i=n[t];if(void 0!==i)return i.exports;var o=n[t]={exports:{}};return e[t](o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};(()=>{r.r(i),r.d(i,{default:()=>Le});var e=r(229),t=r.n(e);const n=function(e,t,n){if(!t)return!1;var r,i=t.split("."),o=i[i.length-1],a=e;for(r=0;r<i.length-1;++r)void 0===a[i[r]]&&(a[i[r]]=Number.isNaN(+i[r+1])?{}:[]),a=a[i[r]];if(void 0!==n){var s=a[o];return a[o]=n,{updated:n,previous:s}}return delete a[o],!1},o=function(e,t,n){var r,i=t.split("."),o=e;if(void 0===o)return n;for(r=0;r<i.length;++r){if(void 0===o[i[r]])return n;o=o[i[r]]}return o},a={EXPRESSIONS:{observed:"",trend:"STL_Trend",seasonal:"STL_Seasonal",residual:"STL_Residual"},OPTIONS:[{value:"observed",translation:"cao.trendDecomposition.parameters.decomposition.observed"},{value:"trend",translation:"cao.trendDecomposition.parameters.decomposition.trend"},{value:"seasonal",translation:"cao.trendDecomposition.parameters.decomposition.seasonal"},{value:"residual",translation:"cao.trendDecomposition.parameters.decomposition.residual"}]};var s="".concat(" ","(").concat(" "),l="".concat(" ",")").concat(" ");function u(e){return s+e+l}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var n=function(e,t){if(!t)return null;var n,r;for(n=0;n<t.length;n++)if((r=t[n]).qInfo.qId===e)return r;return null}(e.qLibraryId,t.dimensionList);return n&&n.qData.info[0].qTags.indexOf("$numeric")>-1}var r=function(e,t){if(!t)return null;var n,r,i=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var n=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(n)&&(t=(t=t.substring(1,n)).trim()),t}(e);for(n=0;n<t.length;n++){if((r=t[n]).qName===i)return r;if(r.qDerivedFieldData)for(var o=0;o<r.qDerivedFieldData.qDerivedFieldLists.length;++o)for(var a=r.qDerivedFieldData.qDerivedFieldLists[o],s=0;s<a.qFieldDefs.length;++s){var l=a.qFieldDefs[s];if(l.qName===i)return l}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return r&&r.qTags.indexOf("$numeric")>-1}function d(e){return!(!e.fullAccumulation&&!e.fullRange)}function p(e,t){var n=e.crossAllDimensions;return 2===t&&n?"RowNo(Total)":"RowNo()"}function f(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e),n=t.trim();return"="===n.substring(0,1)?n.substring(1).trim():n}function h(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function m(e,t){var n=e.crossAllDimensions;return 2===t&&n?"Above(Total ":"Above("}function g(e){return void 0===e?")":", 0, ".concat(e,")")}function v(e){return"Replace(Replace(".concat(e,",'''',''''''),'$','$''&''')")}function y(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=").concat(v("MinString(".concat(t,")")),")' and Only({1}").concat(t,")<='$(=").concat(v("MaxString(".concat(t,")")),")'\"}")}function b(e){var t=e.modifier,n=void 0===t?{}:t,r=e.dimensions,i=e.dimensionAndFieldList,o=e.funcComp,a=void 0===o?"Sum":o,s=e.valueComp,l=void 0===s?"0":s;if(!n.showExcludedValues)return"";if(r&&1===r.length){var u=y(c(r[0],i),h(0));return"".concat(a,"({1<").concat(u,">}").concat(l,")")}if(r&&2===r.length){var d=c(r[0],i),p=c(r[1],i),f=h(0),m=h(1),g=y(d,f),v=y(p,m);return"".concat(a,"({1<").concat(g,",").concat(v,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function x(e){return"".concat(e,"(")}function S(e){var t=e.properties,n=e.layout;return o(t,"qHyperCubeDef.qDimensions",o(n,"qHyperCube.qDimensionInfo",[])).length}const w={isFullRange:d,getNumDimensions:S,getExpressionWithExcludedComp:function(e){var t=e.expression,n=e.modifier,r=e.dimensions,i=e.dimensionAndFieldList,o=e.treatMissingAsNull,a=u(f(t));if(!n.showExcludedValues)return a;var s=b({modifier:n,dimensions:r,dimensionAndFieldList:i}),l=o?"":", 0";if(r&&1===r.length){var c=h(0);return"If(Count(".concat(c,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(r&&2===r.length){var d=h(0),p=h(1);return"If(Count(".concat(d,") * Count(").concat(p,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:p,getNumStepComp:function(e,t){if(!d(e)){var n=e.steps;return"number"!=typeof n||Number.isNaN(n)?6:n}return p(e,t)},getAboveCompPrefix:m,getAboveCompSuffix:g,getAboveComp:function(e,t,n,r){return m(e,t)+n+g(r)},getFunctionPrefix:x,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return x(e)+t+")"},getAggrComp:function(e,t,n){return"Aggr(".concat(e,", ").concat(t,", ").concat(n,")")},getExcludedComp:b,needDimension:function(e){var t=e.modifier,n=e.properties,r=e.layout,i=function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t);return 0===i&&2===S({properties:n,layout:r})},getDimComp:function(e,t){var n=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),r=h(t);if(!n.qSortByExpression&&!n.qSortByNumeric&&!n.qSortByAscii)return r;var i=["Descending","Ascending"],o=n.qSortByNumeric?"(Numeric, ".concat(i[(n.qSortByNumeric+1)/2],")"):"",a=n.qSortByAscii?"(Text, ".concat(i[(n.qSortByAscii+1)/2],")"):"";return n.qSortByNumeric&&n.qSortByAscii?"(".concat(r,", ").concat(o,", ").concat(a,")"):n.qSortByNumeric?"(".concat(r,", ").concat(o,")"):n.qSortByAscii?"(".concat(r,", ").concat(a,")"):r},simplifyExpression:f,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var n=t.indexOf(s);if(-1!==n){var r=t.indexOf(l);if(-1!==r)return t.substring(n+s.length,r)}}},initModifier:function(e,t){Object.keys(t).forEach(function(n){void 0===e[n]&&(e[n]=t[n])})},isNumeric:c,isApplicable:function(e){var t=e.properties,n=e.layout,r=e.minDimensions,i=void 0===r?1:r,o=e.maxDimensions,a=void 0===o?2:o;if(!t&&!n)return!0;var s=S({properties:t,layout:n});return s>=i&&s<=a},getExpressionWithMarkers:u,canExtract:function(e){var t=e.indexOf(s),n=e.indexOf(l);return t>-1&&n>-1&&t<n},getDimDefWithWrapper:h,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")},generateTSDExpression:function(e,t,n){var r=t||e.outputExpression;if(e.base&&e.base.qDef&&(r=t!==e.base.qDef?t:e.base.qDef),"observed"!==e.decomposition){var i=n.qHyperCubeDef.qMeasures.find(function(t){return t.qDef.base&&t.qDef.base.qLibraryId&&e.base&&e.base.qLibraryId?t.qDef.base.qLibraryId===e.base.qLibraryId:null});i&&t!==i.qDef.qLabel&&(r=i.qLibraryId||i.qDef.base.qLibraryId?"[".concat(i.qDef.qLabel,"]"):i.qDef.base.qDef);var o=function(e){var t=a.OPTIONS.find(function(t){return t.value===e.decomposition});return t?a.EXPRESSIONS[t.value]:""}(e);r=r.startsWith("=")?r.substr(1):r,r="".concat(o,"(").concat(r,", ").concat(e.steps,")")}return r},getDecomposition:function(e){var t="observed";return Object.values(a.EXPRESSIONS).find(function(n){var r=e.qDef.base.qDef.toLowerCase()||e.qDef.qDef.toLowerCase();return a.EXPRESSIONS[n]&&r.includes(a.EXPRESSIONS[n].toLowerCase())&&(t=n),n}),t}};function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}var I=t().bind(null,!0),D={},P=Array.isArray;function M(e){return null!=e&&!Array.isArray(e)&&"object"===E(e)}function R(e){return void 0===e}function k(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function L(e,t){var n,r=t.substring(1).split("/").slice(0,-1);return r.forEach(function(t,i){if(i!==r.length){n=+t;var o=Number.isNaN(n)?{}:[];e[n||t]=R(e[n||t])?o:e[t],e=e[n||t]}}),e}function A(e,t){var n=!0;if(M(e)&&M(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach(function(r){A(e[r],t[r])||(n=!1)}),n);if(P(e)&&P(t)){if(e.length!==t.length)return!1;for(var r=0,i=e.length;r<i;r+=1)if(!A(e[r],t[r]))return!1;return!0}return e===t}D.generate=function(e,t,n){n=n||"";var r=[];return Object.keys(t).forEach(function(i){var o=function(e){return e?I({},{val:e}).val:e}(t[i]),a=e[i],s="".concat(n,"/").concat(i);A(o,a)||k(t,i)||(R(a)?r.push({op:"add",path:s,value:o}):M(o)&&M(a)?r=r.concat(D.generate(a,o,s)):P(o)&&P(a)?r=r.concat(function(e,t,n){var r=[],i=e.slice(),o=-1;function a(e,t,n){if(e[n]&&R(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(var r=0,i=e.length;r<i;r+=1)if(e[r]&&e[r].qInfo.qId===t)return r;return-1}if(A(t,i))return r;if(!R(t[0])&&R(t[0].qInfo))return r.push({op:"replace",path:n,value:t}),r;for(var s=i.length-1;s>=0;s-=1)-1===(o=a(t,i[s].qInfo&&i[s].qInfo.qId,s))?(r.push({op:"remove",path:"".concat(n,"/").concat(s)}),i.splice(s,1)):r=r.concat(D.generate(i[s],t[o],"".concat(n,"/").concat(s)));for(var l=0,u=t.length;l<u;l+=1)-1===(o=a(i,t[l].qInfo&&t[l].qInfo.qId))?(r.push({op:"add",path:"".concat(n,"/").concat(l),value:t[l]}),i.splice(l,0,t[l])):o!==l&&(r.push({op:"move",path:"".concat(n,"/").concat(l),from:"".concat(n,"/").concat(o)}),i.splice(l,0,i.splice(o,1)[0]));return r}(a,o,s)):r.push({op:"replace",path:"".concat(n,"/").concat(i),value:o}))}),Object.keys(e).forEach(function(i){R(t[i])&&!k(e,i)&&r.push({op:"remove",path:"".concat(n,"/").concat(i)})}),r},D.apply=function(e,t){t.forEach(function(t){var n,r,i=L(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)}(r=u)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(e,t):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}else if(M(a)&&M(t.value))n=a,Object.keys(n).forEach(function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!k(n,e)&&delete n[e]}),I(a,t.value);else{if(!i)throw new Error("Patchee is not an object we can patch");i[o]=t.value}else if("move"===t.op){var c=L(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,n){var r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},D.updateObject=function(e,t){Object.keys(e).length?D.apply(e,D.generate(e,t)):I(e,t)};const O=D,T=function(e,n,r){if(!e)return Promise.resolve();var i=O.generate(n,r);return t()(!0,n,r),i&&i.length?(i=i.map(function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}}),e.applyPatches(i,!0)):Promise.resolve()};var q="accumulation";function _(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===q)return n[r]}function N(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===q)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):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,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=w.getNumDimensions({properties:r,layout:i}));var u=o(r,"qHyperCubeDef.qDimensions",[]),c=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:u,dimensionAndFieldList:s}),d=w.getNumStepComp(n,l),p=w.getAboveComp(n,l,c,d),f=w.getRangeComp("RangeSum",p);if(w.needDimension({modifier:n,properties:r,layout:i})){var h=w.getDimComp(u,1),m=w.getDimComp(u,0),g=w.getAggrComp(f,h,m);f=n.showExcludedValues?w.getExcludedComp({modifier:n,dimensions:u,dimensionAndFieldList:s,valueComp:g}):g}return f},extractInputExpression:w.extractInputExpression,initModifier:function(e){w.initModifier(e,j)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(N(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(N(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(N(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(N(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=_(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=_(t,e);return n&&!n.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(N(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(q))return!1;var o=_(t,e);return o&&!o.disabled}};return n}};var z="movingAverage";function W(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===z)return n[r]}function $(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===z)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var H={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1};const V={translationKey:"properties.modifier.movingAverage",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,n=e.expression,r=e.modifier,i=e.properties,a=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!r)return n;var u=s;void 0===u&&(u=w.getNumDimensions({properties:i,layout:a}));var c=o(i,"qHyperCubeDef.qDimensions",[]),d=r.showExcludedValues&&r.nullSuppression,p=w.getExpressionWithExcludedComp({expression:n,modifier:r,dimensions:c,dimensionAndFieldList:l,treatMissingAsNull:d}),f=w.getNumStepComp(r,u),h=w.getAboveComp(r,u,p,f);if(r.nullSuppression)t=w.getRangeComp("RangeAvg",h);else{var m=w.getRangeComp("RangeSum",h),g=function(e,t){var n=w.getRowNoComp(e,t);if(!w.isFullRange(e)){var r=e.steps,i="number"!=typeof r||Number.isNaN(r)?6:r;return"RangeMin(".concat(i,", ").concat(n,")")}return n}(r,u);t="".concat(m," / ").concat(g)}var v=t;if(w.needDimension({modifier:r,properties:i,layout:a})){var y=w.getDimComp(c,1),b=w.getDimComp(c,0),x=w.getAggrComp(v,y,b);v=r.showExcludedValues?w.getExcludedComp({modifier:r,dimensions:c,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return v},extractInputExpression:w.extractInputExpression,initModifier:function(e){w.initModifier(e,H)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat($(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.movingAverage.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat($(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.movingAverage.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat($(t,e),".fullRange")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat($(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=W(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=W(t,e);return n&&!n.fullRange}},showExcludedValues:{refFn:function(t){return"".concat($(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat($(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(z))return!1;var o=W(t,e);return o&&!o.disabled}};return n}};var B="timeSeriesDecomposition";function G(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===B)return n[r]}function U(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===B)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var Y={type:"timeSeriesDecomposition",disabled:!1,decomposition:"",steps:2,outputExpression:""};const K={translationKey:"properties.modifier.timeSeriesDecomposition",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties;return n?w.generateTSDExpression(n,t,r):t},extractInputExpression:w.extractInputExpression,initModifier:function(e,t){w.initModifier(e,Y),""===e.decomposition&&t&&(e.decomposition=w.getDecomposition(t))},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.timeSeriesDecomposition||"properties.modifier.timeSeriesDecomposition",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{decomposition:{refFn:function(t){return"".concat(U(t,e),".decomposition")},type:"string",translation:t.modifierTrendDecompositionDecomposition||"properties.modifier.trendDecomposition.decomposition",component:"dropdown",schemaIgnore:!0,defaultValue:t.trendDecompositionParametersDecompositionObserved||"cao.trendDecomposition.parameters.decomposition.observed",options:a.OPTIONS},steps:{refFn:function(t){return"".concat(U(t,e),".steps")},type:"integer",translation:t.modifierTimeSeriesDecompositionPeriods||"properties.modifier.timeSeriesDecomposition.periods",schemaIgnore:!0,defaultValue:2,change:function(t,n){var r=G(t,e);if(r){var i=r.steps;r.steps="number"!=typeof i||Number.isNaN(i)?2:Math.abs(i),n.properties.qHyperCubeDef.qMeasures=n.properties.qHyperCubeDef.qMeasures.map(function(e){return e.qDef.modifiers.map(function(e){return"timeSeriesDecomposition"===e.type?e.steps=i:e.steps=e.steps,e}),e})}},show:function(t){var n=G(t,e);return n&&!n.fullRange}}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(B))return!1;var o=G(t,e);return o&&!o.disabled}};return n}};var X="difference";function J(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===X)return n[r]}function Z(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===X)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var Q={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""};const ee={translationKey:"properties.modifier.difference",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:w.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=w.getNumDimensions({properties:r,layout:i}));var u=o(r,"qHyperCubeDef.qDimensions",[]),c=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:u,dimensionAndFieldList:s}),d=w.getAboveComp(n,l,c),p="".concat(c," - ").concat(d);if(w.needDimension({modifier:n,properties:r,layout:i})){var f=w.getDimComp(u,1),h=w.getDimComp(u,0),m=w.getAggrComp(p,f,h);p=n.showExcludedValues?w.getExcludedComp({modifier:n,dimensions:u,dimensionAndFieldList:s,funcComp:"Only",valueComp:m}):m}return p},initModifier:function(e){Object.keys(Q).forEach(function(t){void 0===e[t]&&(e[t]=Q[t])})},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(Z(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.difference.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(Z(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.difference.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},showExcludedValues:{refFn:function(t){return"".concat(Z(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(X))return!1;var o=J(t,e);return o&&!o.disabled}};return n}};var te="normalization";function ne(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===te)return n[r]}function re(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===te)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}function ie(e,t){for(var n=0;n<e.length;n++)if(e[n].value===t)return n;return-1}var oe={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:2,selectionScope:2};function ae(e){return 2===e?"{1}":""}function se(e,t,n){return 1===e?"{$<".concat(w.getFieldWithWrapper(t),"={'").concat(n,"'}>}"):""}function le(e,t){return 0===e&&t>1||2===e?"Total":""}function ue(e,t,n){return 0===e&&t>1?"<".concat(w.getDimDefWithWrapper(n),">"):""}const ce={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:w.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=w.getNumDimensions({properties:r,layout:i}));var u=o(r,"qHyperCubeDef.qDimensions",[]),c=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:u,dimensionAndFieldList:s}),d=n.selectionScope,p=n.dimensionalScope;return function(e,t,n,r,i,o,a){var s=ae(t),l=se(t,n,r),u=""===s&&""===l?"":s||l,c=le(i,o),d=ue(i,o,a),p=function(e){for(var t=[],n=0;n<e;n++)t[n]=w.getDimDefWithWrapper(n);return t.join(", ")}(o);return"".concat(e,"/ Sum(").concat(u," ").concat(c).concat(d," Aggr(").concat(u," ").concat(e,", ").concat(p,"))")}(c,d,n.field,n.value,p,l,n.primaryDimension)},initModifier:function(e){Object.keys(oe).forEach(function(t){void 0===e[t]&&(e[t]=oe[t])})},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(re(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,options:function(n){return function(e,t,n){var r=[{value:0,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:1,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:2,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return r=function(e,t){if(1===e){var n=ie(t,0);t.splice(n,1)}return t}(ne(e,n).dimensionalScope,r),r}(n,t,e)}},field:{refFn:function(t){return"".concat(re(t,e),".field")},type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:function(e,t,n){return n.app.getFieldList().then(function(e){return e.map(function(e){return{label:e.qName,value:e.qName}})})},show:function(t){return 1===ne(t,e).selectionScope}},value:{refFn:function(t){return"".concat(re(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return 1===ne(t,e).selectionScope}},dimensionalScope:{refFn:function(t){return"".concat(re(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,supportTooltip:!0,options:function(n,r){return function(e,t,n,r){var i=t.layout.qHyperCube.qDimensionInfo.length,o=[{value:0,translation:n.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:n.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:1,translation:n.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension"),tooltipTranslation:n.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension",".tooltip")},{value:2,translation:n.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:n.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension",".tooltip")}];return o=function(e,t){if(e<2){var n=ie(t,0);t.splice(n,1)}return t}(i,o),o=function(e,t){if(0===e){var n=ie(t,1);t.splice(n,1)}return t}(ne(e,r).selectionScope,o),o}(n,r,t,e)}},primaryDimension:{refFn:function(t){return"".concat(re(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.normalization.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(t,n){return 0===(ne(t,e).dimensionalScope||0)&&n.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(te))return!1;var o=ne(t,e);return o&&!o.disabled}};return n},getDisregardSelectionComp:ae,getFieldSelectionComp:se,getTotalComp:le,getSelectedDimComp:ue};var de="qDef.base",pe="qDef.qDef",fe="qDef.base.qDef",he="qLibraryId",me="qDef.base.qLibraryId";const ge={getExpression:function(e){var t=o(e,fe);return void 0!==t?t:o(e,pe)},getExpressionRef:function(e){return void 0!==o(e,fe)?fe:pe},getLibraryIdRef:function(e){return o(e,me)?me:he},getLibraryId:function(e){return o(e,me)||o(e,he)},getLabelRef:function(e){return o(e,de)?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return o(e,de)?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}};var ve="qDef.qDef",ye="qDef.base.qDef",be="qLibraryId",xe="qDef.base.qLibraryId",Se="qDef.qLabel",we="qDef.qLabelExpression",Ce="qDef.base.qLabel",Ee="qDef.base.qLabelExpression",Ie="qDef.qAggrFunc",De="qDef.base.qAggrFunc",Pe={initBase:function(e,t){(t||Pe.isValid(e))&&(n(e,ye,o(e,ve)),n(e,xe,o(e,be)),n(e,Ce,o(e,Se)),n(e,Ee,o(e,we)))},restoreBase:function(e){Pe.isValid(e)&&(n(e,ve,o(e,ye)),n(e,be,o(e,xe)),n(e,Se,o(e,Ce)),n(e,we,o(e,Ee)),o(e,Ie)&&o(e,De)&&n(e,Ie,o(e,De)),delete e.qDef.base)},isValid:function(e){var t=o(e,ye),n=o(e,xe);return void 0!==t||void 0!==n}};const Me=Pe;function Re(e){return Re="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},Re(e)}var ke={accumulation:F,movingAverage:V,difference:ee,normalization:ce,timeSeriesDecomposition:K};const Le={modifiers:ke,apply:Oe,applyModifiers:Te,cleanUpMeasure:qe,destroy:function(e){e&&Ae[e.id]&&Ae[e.id].masterItemSubscriber&&(Ae[e.id].masterItemSubscriber&&Ae[e.id].masterItemSubscriber.unsubscribe(),delete Ae[e.id])},hasActiveModifiers:_e,getActiveModifier:Ne,initBase:Me.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some(function(e){return ke[e]})},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some(function(e){return ke[e]&&ke[e].isApplicable({properties:n,layout:r})})},measureBase:ge,limitedSorting:function(e){var t=e.measures,n=e.properties,r=e.layout,i=!1,o=!1;return t.forEach(function(e){var t=ze(e);Ue({modifiers:t,properties:n,layout:r})&&(i=!0,o=o||Ze({modifiers:t,properties:n,layout:r}))}),i&&!o},ifEnableTotalsFunction:je};var Ae={};function Oe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.model,r=e.properties,i=e.isSnapshot,a=void 0!==i&&i,s=e.masterItem,l=!1;Ae[n.id]=Ae[n.id]||{isFirstTime:!0};var u=Ae[n.id].isFirstTime;if(Ae[n.id].isFirstTime=!1,r&&"object"===Re(r))return Te({model:n,properties:r});var c=n?n.layout:void 0,d=o(c,"qSelectionInfo.qInSelections");if(a||d)return Promise.resolve(l);var p=o(c,"qHyperCube.qMeasureInfo"),f=Ae[n.id].lastReloadTime;if(Ae[n.id].lastReloadTime=o(n,"app.layout.qLastReloadTime"),_e({measures:p,layout:c})){var h=function(e){var t=e.measures,n=e.layout,r=e.lastReloadTime;return o(e.model,"app.layout.qLastReloadTime")!==r&&function(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some(function(e){return Ge({measure:e,properties:n,layout:r})})}({measures:t,layout:n})}({measures:p,layout:c,model:n,lastReloadTime:f});return h||function(e){var t=e.measures,n=e.layout,r=e.masterItem,i=e.isFirstTime;return!!Array.isArray(t)&&(i||r||t.some(function(e){return function(e){var t=e.measure,n=e.layout;return Ue({modifiers:ze(t),layout:n})?!t.base:!!t.base}({measure:e,layout:n})}))}({measures:p,layout:c,masterItem:s,isFirstTime:u})?n.getEffectiveProperties().then(function(e){var r=t()(!0,{},e);$e(r);var i=Qe(r);return Ye({model:n}).then(function(t){return Ke({libraryIds:i,model:n}).then(function(i){return h&&function(e){var t=e.properties;Fe(t).forEach(function(e){return function(e){var t=e.measure;if(Ge({measure:t,properties:e.properties})){var n=0,r=t.qDef.modifiers;Array.isArray(r)&&r.forEach(function(e){if("object"===Re(e)&&!e.disabled){if(n++,"object"!==Re(ke[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(n>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var r=ke[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==r&&Ve(t)&&w.simplifyExpression(t.qDef.base.qDef)!==w.simplifyExpression(r)&&(t.qDef.base.qDef=r)}})}}({measure:e,properties:t})})}({properties:r}),Te({model:n,oldProperties:e,properties:r,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:i,dimensionAndFieldList:t})})})}):Promise.resolve(l)}return function(e){return!!Array.isArray(e)&&e.some(function(e){return"object"===Re(e.base)})}(p)?n.getEffectiveProperties().then(function(e){return function(e){var n=e.model,r=e.properties,i=Qe(r);return et({model:n,libraryIds:i}).then(function(){var e=t()(!0,{},r);return Fe(r).forEach(function(e){return qe(e)}),Je({oldProperties:e,newProperties:r,model:n})})}({model:n,properties:e})}):Promise.resolve(l)}function Te(e){var n=e.model,r=e.oldProperties,i=e.properties,a=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,u=e.masterItem,c=e.libraryItemsProps,d=e.dimensionAndFieldList;void 0===r&&(r=l?t()(!0,{},i):i),$e(i);var p=Qe(i);return et({model:n,libraryIds:p,masterItem:u}).then(function(){return function(e){var n=e.measures,r=e.properties,i=e.model,a=e.libraryItemsProps,s=e.dimensionAndFieldList;if(n||(n=Fe(r)),!n.length)return Promise.resolve();if(!_e({measures:n,properties:r}))return n.forEach(function(e){return qe(e)}),Promise.resolve();var l=a?void 0:Qe(r);return Ye({model:i,dimensionAndFieldList:s}).then(function(e){return Ke({libraryIds:l,model:i,libraryItemsProps:a}).then(function(i){n.forEach(function(n){Ue({modifiers:n.qDef.modifiers,properties:r})?(function(e){var n=e.measure,r=e.properties,i=e.libraryItemsProps,a=e.dimensionAndFieldList,s=0;Me.isValid(n)||Me.initBase(n,!0);var l=n.qDef,u=l.modifiers,c=l.base;Array.isArray(u)&&u.forEach(function(e){if("object"===Re(e)&&!e.disabled){if(s++,"object"!==Re(ke[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)");ke[e.type].initModifier(e,n);var l=n.qLibraryId||c&&c.qLibraryId;l?function(e){var n=e.measure,r=e.modifier,i=e.properties,o=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=""===s?s:ke[r.type].generateExpression({expression:s,modifier:r,properties:i,dimensionAndFieldList:o});r.outputExpression=l,n.qDef.qDef=r.outputExpression,(n.qDef.qLabel||a.qMeasure.qLabel)&&(n.qDef.qLabel=a.qMeasure.qLabel),(n.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(n.qDef.qLabelExpression=a.qMeasure.qLabelExpression),n.qDef.quarantine&&n.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(n.qDef.qNumFormat=a.qMeasure.qNumFormat,n.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete n.qLibraryId,n.qDef.coloring=a.qMeasure.coloring,r.base=t()(!0,{},n.qDef.base)}({measure:n,modifier:e,libraryId:l,properties:r,libraryItemsProps:i,dimensionAndFieldList:a}):function(e){var n=e.measure,r=e.modifier,i=e.properties,o=e.dimensionAndFieldList;"function"==typeof ke[r.type].updateModifier&&ke[r.type].updateModifier(r,i.qHyperCubeDef);var a=ge.getExpression(n),s=""===a?a:ke[r.type].generateExpression({expression:a,modifier:r,properties:i,dimensionAndFieldList:o});r.outputExpression=s,n.qDef.qDef=r.outputExpression,n.qDef.base.qLabelExpression?n.qDef.qLabelExpression=n.qDef.base.qLabelExpression:n.qDef.qLabel=n.qDef.base.qLabel||a,r.base=t()(!0,{},n.qDef.base)}({measure:n,modifier:e,properties:r,dimensionAndFieldList:a}),function(e){var t=o(e,"qDef.qAggrFunc");"Expr"!==t||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")}(n)}})}({measure:n,properties:r,libraryItemsProps:i,dimensionAndFieldList:e}),He(n)):qe(n)})})})}({measures:a,properties:i,model:n,libraryItemsProps:c,dimensionAndFieldList:d}).then(function(){return l?Je({oldProperties:r,newProperties:i,model:n}):Promise.resolve(!1)})})}function qe(e){!function(e){var t=ze(e);return Array.isArray(t)&&t.some(function(e){return"object"===Re(e)&&!e.disabled&&!ke[e.type]})}(e)?Me.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,He(e)}function _e(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some(function(e){return Ue({modifiers:ze(e),properties:n,layout:r})})}function Ne(e){var t=ze(e);if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];if(ke[r.type]&&!r.disabled)return r}}function je(e){var t=Ne(e);return!t||ke[t.type].enableTotalsFunction(e)}function Fe(e){return o(e,"qHyperCubeDef.qMeasures",[]).concat(o(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function ze(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function We(e){return o(e,"outputExpression.qValueExpression.qExpr")||o(e,"outputExpression")}function $e(e){Fe(e).forEach(function(e){return function(e){var n=Ne(e);n&&(void 0!==n.outputExpression&&We(n)!==e.qDef.qDef?delete e.qDef.base:!Me.isValid(e)&&n.base&&(e.qDef.base=t()(!0,{},n.base)))}(e)})}function He(e){var t=ze(e);Array.isArray(t)&&t.forEach(function(t){"object"===Re(t)&&(t.disabled||!ke[t.type]&&We(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)})}function Ve(e){return e.base||e.qDef&&e.qDef.base}function Be(e){var t=Ve(e);return e.qLibraryId||t&&t.qLibraryId}function Ge(e){var t=e.measure,n=e.properties,r=e.layout;return!Be(t)&&Ue({modifiers:ze(t),properties:n,layout:r})}function Ue(e){var t=e.modifiers,n=e.properties,r=e.layout,i={};return Array.isArray(t)&&t.some(function(e){return!("object"!==Re(e)||e.disabled||!ke[e.type])&&(void 0===i[e.type]&&(i[e.type]=ke[e.type].isApplicable({properties:n,layout:r})),i[e.type])})}function Ye(e){var t=e.model,n=e.dimensionAndFieldList;if(n)return Promise.resolve(n);var r=[],i={},o=t.app.getDimensionList().then(function(e){i.dimensionList=e});r.push(o);var a=t.app.getFieldList().then(function(e){i.fieldList=e});return r.push(a),Promise.all(r).then(function(){return i})}function Ke(e){var t=e.libraryIds,n=e.model,r=e.libraryItemsProps;if(r)return Promise.resolve(r);var i=t.measureLibraryIds,o=t.dimensionLibraryIds,a={},s=[];return i.forEach(function(e){var t=n.app.getMeasure(e).then(function(t){return t.getProperties().then(function(t){a[e]=t})});s.push(t)}),o.forEach(function(e){var t=n.app.getDimension(e).then(function(t){return t.getProperties().then(function(t){a[e]=t})});s.push(t)}),Promise.all(s).then(function(){return a})}function Xe(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Je(e){var t=e.oldProperties,n=e.newProperties,r=e.model,i=JSON.stringify(o(t,"qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(o(n,"qHyperCubeDef.qMeasures"),Xe)||JSON.stringify(o(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(o(n,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe);return i?function(e){var t=e.model,n=e.oldProperties,r=e.newProperties,i=t.layout;return i&&!i.qHasSoftPatches&&!i.qExtendsId&&o(i,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(r):T(t,n,r)}({model:r,oldProperties:t,newProperties:n}).then(function(){return i}):Promise.resolve(i)}function Ze(e){var t=e.modifiers,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some(function(e){return"object"===Re(e)&&!e.disabled&&ke[e.type]&&ke[e.type].needDimension({modifier:e,properties:n,layout:r})})}function Qe(e){var t=Fe(e),n=[],r=[],i=!1;return t.forEach(function(t){var r=ze(t);if(Ue({modifiers:r,properties:e})){var o=Be(t);o&&n.push(o),i=i||Ze({modifiers:r,properties:e})}}),o(e,"qHyperCubeDef.qDimensions",[]).forEach(function(e){var t=e.qLibraryId;t&&r.push(t)}),{measureLibraryIds:n,dimensionLibraryIds:r}}function et(e){var t=e.model,n=e.libraryIds;return!e.masterItem&&n&&(n.measureLibraryIds.length||n.dimensionLibraryIds.length)?(Ae[t.id].masterItemSubscriber=Ae[t.id].masterItemSubscriber||function(e){var t=e.model,n=e.callback,r={},i={},a={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},n=o(e,"qInfo.qType");return n&&s[n]&&s[n].forEach(function(n){t[n]=o(e,n)}),JSON.stringify(t)}function u(e){var t=e.qInfo.qId;if(r[t]){var i=l(e);r[t].properties!==i&&(r[t].properties=i,"function"==typeof n&&r[t].enabled&&n(e)),r[t].enabled=!0}}function c(e,n){return t.app[n](e).then(function(t){r[e]={listener:t.layoutSubscribe(u),enabled:!1,properties:l(t.layout)}})}return{subscribe:function(e){var n=e.measureLibraryIds,o=e.dimensionLibraryIds,s=[];return function(e){var t=e.dimensionLibraryIds;i={},e.measureLibraryIds.forEach(function(e){i[e]=!0}),a={},t.forEach(function(e){a[e]=!0})}({measureLibraryIds:n,dimensionLibraryIds:o}),Object.keys(r).forEach(function(e){i[e]||a[e]||(r[e].listener.dispose(),delete r[e])}),t.app&&(Object.keys(i).forEach(function(e){i[e]&&!r[e]&&s.push(c(e,"getMeasure"))}),Object.keys(a).forEach(function(e){a[e]&&!r[e]&&s.push(c(e,"getDimension"))})),Promise.all(s)},unsubscribe:function(){Object.keys(r).forEach(function(e){r[e].listener.dispose()}),r={}}}}({model:t,callback:function(e){return Oe({model:t,masterItem:e}).then(function(){return t.app.clearUndoBuffer()})}}),Ae[t.id].masterItemSubscriber.subscribe(n)):Promise.resolve()}})(),t.default=i.default,Object.defineProperty(t,"__esModule",{value:!0})})()}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var r={};return(()=>{function e(t){var n,r=t;return r>9?(n=65+r-10)>90&&(n+=6):r="".concat(r).charCodeAt(0),[48,111,79,105,73,108].indexOf(n)>-1?e(r+1):String.fromCharCode(n)}function t(n){var r=e(n%62),i=Math.floor(n/62);return i>0?t(i)+r:r}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}n.d(r,{default:()=>$e});const o={getValue:function(e,t,n){if(null==e||null==t)return n;for(var r=t.split("."),i=e,o=0;o<r.length;++o){var a=r[o];if(""!==a){if(void 0===i[a]||null===i[a])return n;i=i[a]}}return i},setValue:function(e,t,n){if(null!=e&&null!=t){for(var r=t.split("."),i=r[r.length-1],o=e,a=0;a<r.length-1;++a){var s=r[a];void 0!==o[s]&&null!==o[s]||(o[s]=Number.isNaN(+r[a+1])?{}:[]),o=o[s]}void 0!==n?o[i]=n:delete o[i]}},isEmpty:function(e){return 0===Object.keys(e).length&&e.constructor===Object},isAtomicValue:function(e){return/boolean|number|string/.test(i(e))},generateId:function(){return t(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function a(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return r;return-1}return-1}const d={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;var n=e.indexOf(t[0]);if(-1!==n){for(var r=0;r<t.length;r++){var i=e.indexOf(t[r]);if(n>i)return!1;n=i}return!0}return!1},indexAdded:function(e,t){var n;for(n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)},indexRemoved:function(e,t){var n,r=0;for(n=0;n<e.length;++n)e[n]>t?--e[n]:e[n]===t&&(r=n);return e.splice(r,1),r},findItemByPropertyValue:function(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return e[r];return null}return null},findIndexByPropertyValue:c};var p=n(8),f=n.n(p);const h=function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,i=n.data[0];(t=i.dimensions).push.apply(t,a(r.qDimensions));var s,l=o.getValue(r,"qLayoutExclude.qHyperCubeDef.qDimensions");l&&(s=i.excludedDimensions).push.apply(s,a(l))},m=function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,i=n.data[0];(t=i.measures).push.apply(t,l(r.qMeasures));var a,s=o.getValue(r,"qLayoutExclude.qHyperCubeDef.qMeasures");s&&(a=i.excludedMeasures).push.apply(a,l(s))},g=function(e){var t=e.exportFormat,n=e.qHyperCubeDef,r=t.data[0];n.qInterColumnSortOrder||(n.qInterColumnSortOrder=[]),r.interColumnSortOrder=n.qInterColumnSortOrder.concat();var i=o.getValue(n,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");i&&d.isOrderedSubset(i,r.interColumnSortOrder)&&(r.interColumnSortOrder=i.concat())},v=function(e){var t=e.exportFormat,n=e.properties;Object.keys(n).forEach(function(e){t.properties[e]=n[e]})},y=function(e){var t=e.exportFormat,n=e.properties;n.qLayoutExclude||(n.qLayoutExclude={}),n.qLayoutExclude.disabled&&(Object.keys(n.qLayoutExclude.disabled).forEach(function(e){t.properties.hasOwnProperty(e)||(t.properties[e]=n.qLayoutExclude.disabled[e])}),delete n.qLayoutExclude.disabled),n.qLayoutExclude.changed&&(function(e){Object.keys(e.qLayoutExclude.changed).forEach(function(t){e.qLayoutExclude.changed[t].to===o.getValue(e,t)&&o.setValue(e,t,e.qLayoutExclude.changed[t].from)})}(n),delete n.qLayoutExclude.changed),n.qLayoutExclude.quarantine&&!o.isEmpty(n.qLayoutExclude.quarantine)||delete n.qLayoutExclude},b=function(e){e.forEach(function(e){f().cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)})};function x(e,t,n){var r,i,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=o.getValue(e,t);if(!o.isAtomicValue(s))try{if((i=(i=(r=JSON.stringify(s)).match(/:\{/g))?i.length:0)>2&&!a)return;s=JSON.parse(r)}catch(e){return}o.getValue(e,"qLayoutExclude.quarantine")||o.setValue(e,"qLayoutExclude.quarantine",{});var l=o.getValue(e,"qLayoutExclude.quarantine");l[n]||(l[n]={}),l[n][t]=s}var S=n(909),w=n.n(S);function C(e,t){var n=w()(!0,{},t,e);return o.getValue(n,"qOtherTotalSpec.qOtherCounted")||o.setValue(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),o.getValue(n,"qOtherTotalSpec.qOtherLimit")||o.setValue(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel="Others"),n}function E(e,t){return w()(!0,{},t,e)}function I(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}var D=Math.pow(2,53)-1;function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const R=function(e,t,n){var r="masterobject"===o.getValue(t,"properties.qInfo.qType")?"masterobject":o.getValue(n,"qInfo.qType");o.setValue(e,"qInfo.qType",r),e.visualization=n.visualization},k=function(e,t,n){t.hasOwnProperty(e)&&(n[e]=t[e])},L=function(e,t,n,r){t.hasOwnProperty(e)?n[e]=t[e]:n[e]=r},A=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:[]}},T=function(e){var t,n=e.exportFormat,r=e.maxDimensions,i=e.minDimensions,o=e.newHyperCubeDef,a=e.defaultDimension,s=n.data[0];for(t=0;t<s.dimensions.length;++t){var l=C(s.dimensions[t],a);o.qDimensions.length<r?o.qDimensions.push(l):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(l)}for(t=0;t<s.excludedDimensions.length;++t){var u=C(s.excludedDimensions[t],a);o.qDimensions.length<i?o.qDimensions.push(u):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(u)}},q=function(e){var t,n=e.exportFormat,r=e.maxMeasures,i=e.minMeasures,o=e.newHyperCubeDef,a=e.defaultMeasure,s=n.data[0];for(t=0;t<s.measures.length;++t){var l=E(s.measures[t],a);o.qMeasures.length<r?o.qMeasures.push(l):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(l)}for(t=0;t<s.excludedMeasures.length;++t){var u=E(s.excludedMeasures[t],a);o.qMeasures.length<i?o.qMeasures.push(u):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(u)}},_=function(e){var t=e.exportFormat,n=e.dataDefinition,r=void 0===n?{}:n,i=t.data[0],o=r.dimensions||{max:0},a=r.measures||{max:0},s=I(a.max,i.dimensions.length,D),l=I(a.min,i.dimensions.length,0);return{maxDimensions:I(o.max,s,D),minDimensions:I(o.min,l,0),maxMeasures:s,minMeasures:l}},N=function(e){var t=e.exportFormat,n=e.newHyperCubeDef,r=t.data[0],i=n.qDimensions.length+n.qMeasures.length;n.qInterColumnSortOrder=r.interColumnSortOrder.concat();var o=n.qInterColumnSortOrder.length;if(o!==i)for(n.qLayoutExclude&&(n.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=r.interColumnSortOrder.concat());o!==i;)o<i?(d.indexAdded(n.qInterColumnSortOrder,o),++o):(--o,d.indexRemoved(n.qInterColumnSortOrder,o))},j=function(e){var t=e.exportFormat,n=e.initialProperties,r=e.hypercubePath,i={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach(function(e){"qLayoutExclude"===e?t.properties[e].quarantine&&(i.qLayoutExclude.quarantine=w()(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&r?o.setValue(i,"".concat(r,".qHyperCubeDef"),t.properties.qHyperCubeDef):n.hasOwnProperty(e)||-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)||function(e,t){return"components"===t&&Array.isArray(e[t])&&e[t].some(function(e){return"general"===e.key})}(t.properties,e)?i[e]=t.properties[e]:i.qLayoutExclude.disabled[e]=t.properties[e]}),null===(i=w()(!0,{},n,i)).components&&(i.components=[]),i},F=function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=t.data[0];return a.dimensions.length>n&&n>0||a.measures.length>i&&i>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>r||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>o||!i&&a.measures.length>0||!n&&a.dimensions.length>0},z=function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=e.newHyperCubeDef,s=t.data[0];a.qLayoutExclude||(a.qLayoutExclude={}),a.qLayoutExclude.qHyperCubeDef||(a.qLayoutExclude.qHyperCubeDef={}),(s.dimensions.length>n&&n>0||s.excludedDimensions&&s.excludedDimensions.length&&s.dimensions.length+s.excludedDimensions.length>r)&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(s.measures.length>i&&i>0||s.excludedMeasures&&s.excludedMeasures.length&&s.measures.length+s.excludedMeasures.length>o)&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!i&&s.measures.length&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!n&&s.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))},W=function(e){var t,n=e.newProperties,r=e.dataDefinition,i=e.hypercubePath;if(r.dimensions&&"function"==typeof r.dimensions.added){var a=o.getValue(n,i||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return 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 n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?P(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();a.qDimensions=[],s.forEach(function(e){a.qDimensions.push(e),r.dimensions.added(e,n)})}},$=function(e){var t,n=e.newProperties,r=e.dataDefinition,i=e.hypercubePath;if(r.measures&&"function"==typeof r.measures.added){var a=o.getValue(n,i||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return M(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 M(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?M(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();a.qMeasures=[],s.forEach(function(e){a.qMeasures.push(e),r.measures.added(e,n)})}},H=function(e){var t=e.measures,n=e.modifierTypes;t&&n&&f().isSupportedModifiers(n)&&t.forEach(function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store})};function V(e,t){var n=o.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!n&&(Object.keys(n).forEach(function(t){o.setValue(e,t,n[t])}),delete e.qLayoutExclude.quarantine[t],!0)}const B={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t={data:[],properties:{}},n=0;n<e;++n)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}(),a=t.qProperty,s=o.getValue(a,n||""),l=s.qHyperCubeDef;return l.qInterColumnSortOrder||(l.qInterColumnSortOrder=[]),h({exportFormat:i,qHyperCubeDef:l}),m({exportFormat:i,qHyperCubeDef:l}),g({exportFormat:i,qHyperCubeDef:l}),delete l.qLayoutExclude,v({exportFormat:i,properties:a}),n&&(i.properties.qHyperCubeDef=l,delete s.qHyperCubeDef),y({exportFormat:i,properties:a}),r||b(i.properties.qHyperCubeDef.qMeasures),Array.isArray(i.properties.filters)&&(x(i.properties,"filters","storedFilters",!0),delete i.properties.filters),i.properties.qHyperCubeDef.qContextSetExpression&&(x(i.properties,"qHyperCubeDef.qContextSetExpression","storedFilters"),i.properties.qHyperCubeDef.qContextSetExpression=""),i.properties.qHyperCubeDef.qDynamicScript&&i.properties.qHyperCubeDef.qDynamicScript.length&&(x(i.properties,"qHyperCubeDef.qDynamicScript","dynamicScript"),i.properties.qHyperCubeDef.qDynamicScript=[]),i},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=void 0===n?{}:n,i=e.dataDefinition,a=void 0===i?{}:i,s=e.defaultPropertyValues,l=void 0===s?{}:s,u=e.hypercubePath,c=e.extension,d=e.supportedFilters,p=void 0===d||d,f=e.isHCModifierSupported,h=void 0===f||f,m={qChildren:[]},g=j({exportFormat:t,initialProperties:r,hypercubePath:u}),v=o.getValue(r,u||"").qHyperCubeDef,y=o.getValue(g,u||"").qHyperCubeDef,b=_({exportFormat:t,dataDefinition:a}),x=b.maxDimensions,S=b.minDimensions,w=b.maxMeasures,C=b.minMeasures,E=l.defaultDimension,I=void 0===E?A():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}),T({exportFormat:t,maxDimensions:x,minDimensions:S,newHyperCubeDef:y,defaultDimension:I}),q({exportFormat:t,maxMeasures:w,minMeasures:C,newHyperCubeDef:y,defaultMeasure:P}),W({newProperties:g,dataDefinition:a,hypercubePath:u}),$({newProperties:g,dataDefinition:a,hypercubePath:u}),N({exportFormat:t,newHyperCubeDef:y}),k("qMaxStackedCells",v,y),k("qNoOfLeftDims",v,y),L("qInitialDataFetch",v,y,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),L("qMode",v,y,"S"),L("qReductionMode",v,y,"N"),L("qSortbyYValue",v,y),L("qIndentMode",v,y),L("qShowTotalsAbove",v,y),R(g,t,r),m.qProperty=g;var M=o.getValue(c||{},"support.modifiers");return H({measures:y.qMeasures,modifierTypes:M}),p&&V(m.qProperty,"storedFilters"),"S"===y.qMode&&h&&V(m.qProperty,"dynamicScript"),m}};var G={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function U(e,t,n,r){t=t||[];var i=c(e,r,n),o=c(t,r,n);if(-1!==i&&-1===o){var a=e.splice(i,1);t.push(a[0])}return t}function Y(e,t){return e.length!==t}const K={create:function(e,t){if(!e||!G[e])throw new Error("Attribute Expressions Util: ID required");var n={};return t&&Object.keys(t).forEach(function(e){n[e]=t[e]}),n.id=e,n.qAttribute=!0,n},moveByIdFromGroup:function(e,t,n,r,i){n=n||"qAttributeExpressions",i=i||"id";for(var o=0;o<e.length;o++){var a=e[o][n],s=t.length;if(U(a,t,r,i),Y(t,s))return t}return t},IDMAP:{CELL_BACKGROUND_COLOR:"cellBackgroundColor",CELL_FOREGROUND_COLOR:"cellForegroundColor",COLOR_BY_ALTERNATIVE:"colorByAlternative",COLOR_BY_EXPRESSION:"colorByExpression",TOOLTIP:"tooltip",CELL_LINK_LABEL:"urlLabel",CELL_LINK_URL:"url"}},X={getNumDimensions:function(e){return o.getValue(e,"qHyperCubeDef.qDimensions.length",0)},getNumMeasures:function(e){return o.getValue(e,"qHyperCubeDef.qMeasures.length",0)},wrapFieldName:function(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e},getItemLabel:function(e){return e.label||e.name}},J={colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>0&&X.getNumMeasures(e)<=1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)>0},expression:function(e){return X.getNumMeasures(e)>=1}}},Z={colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumMeasures(e)>=1}}};var Q={scatterplot:Z,"sn-scatter-plot":Z,piechart:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumMeasures(e)>=1}}},linechart:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)<=1},expression:function(e){return X.getNumMeasures(e)>=1}}},map:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>=1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)>=1},expression:function(e){return X.getNumDimensions(e)>=1}}},distributionplot:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumDimensions(e)>=1}}}};function ee(e,t,n){if(Array.isArray(e[t])){var r=d.findIndexByPropertyValue(e[t],"id",n);r>=0&&e[t].splice(r,1)}else e[t]=[]}function te(e,t){var n=K.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach(function(e){ee(e,"qAttributeDimensions",n),ee(e,"qAttributeExpressions",n)}),t.forEach(function(e){ee(e,"qAttributeDimensions",n),ee(e,"qAttributeExpressions",n)})}function ne(e,t){if(t){var n="="===t.charAt(0);e.color.altLabel=n?{qStringExpression:{qExpr:t.substr(1)}}:t}}function re(e){var t=e.properties,n=e.isDimension,r=e.dimensions,i=e.excludedDimensions,a=e.measures,s=e.label;te(r,i);var l=r[r.length-1];if(l){var u=n?o.getValue(t,"color.byDimDef"):o.getValue(t,"color.byMeasureDef"),c=o.getValue(t,"color.formatting.qNumFormat"),p=o.getValue(t,"color.formatting.isCustomFormatted");if(u){var f=K.create(K.IDMAP.COLOR_BY_ALTERNATIVE);switch(u.type){case"expression":!function(e){var t=e.attributeExpression,n=e.label,r=e.item,i=e.isDimension,o=e.qNumFormat,a=e.isCustomFormatted;t.label=n||r.label,i?t.qDef=r.key:(t.qExpression=r.key,o&&(t.qNumFormat=o,t.isCustomFormatted=a)),t.matchMeasure=r.activeMeasureIndex,t.label&&"="===t.label.charAt(0)&&(t.labelExpRef="color.altLabel")}({attributeExpression:f,label:s,item:u,isDimension:n,qNumFormat:c,isCustomFormatted:p});break;case"libraryItem":!function(e){var t=e.attributeExpression,n=e.measures,r=e.item,i=e.qNumFormat,o=e.isCustomFormatted;e.isDimension||(t.matchMeasure=d.findIndexByPropertyValue(n,"qLibraryId",r.key),i&&(t.qNumFormat=i,t.isCustomFormatted=o)),void 0!==r.expression?t.qExpression=r.expression:t.qLibraryId=r.key,t.colorMapRef=r.key}({attributeExpression:f,measures:a,item:u,isDimension:n,qNumFormat:c,isCustomFormatted:p})}n?(f.qSortBy={qSortByAscii:1},l.qAttributeDimensions.push(f)):l.qAttributeExpressions.push(f)}}}function ie(e,t,n,r){var i,o,a,s={};switch(e){case"dimension":n.qLibraryId?(s.type="dimension",s.name=n.qLibraryId,s.id=n.qLibraryId):(s.type="field",t?(s.name=n.label||n.qDef,s.id=n.qDef):(s.name=n.qDef.qFieldDefs[0],s.label=(a=n.qDef).qLabelExpression?a.qLabelExpression:a.qFieldLabels&&a.qFieldLabels[0]?a.qFieldLabels[0]:a.qFieldDefs[0]));break;case"measure":i=function(e,t){return t?e.qLibraryId:f().measureBase.getLibraryId(e)}(n,t),i?(s.type="measure",s.name=i,s.id=i,o=function(e,t){return f().hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}(n,r),o&&(s.expression=o)):(s.type="expression",t?(s.name=n.label||n.qExpression,s.id=n.qExpression):(s.name=n.qDef.qDef,s.label=function(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qLabel?t.qLabel:t.qDef}(n)));break;default:throw new Error('columnType should be "dimension" or "measure"')}return s}const oe={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}};function ae(e,t,n,r){var i=t.type,o=e.color,a=o.mode,s=X.getItemLabel(t);switch(ne(e,s||""),i){case"field":a="byDimension",o.byDimDef={label:t.label||X.wrapFieldName(t.name),key:X.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":a="byMeasure",o.byMeasureDef={label:s,key:t.name,type:"expression",activeMeasureIndex:t.activeMeasureIndex};break;case"dimension":a="byDimension",o.byDimDef={label:t.name,key:t.id,type:"libraryItem",activeDimensionIndex:t.activeDimensionIndex};break;case"measure":a="byMeasure",o.byMeasureDef={label:t.name,key:t.id,expression:t.expression,type:"libraryItem",activeMeasureIndex:t.activeMeasureIndex},o.formatting&&oe.useMasterNumberFormat(o.formatting)}o.auto=!1,o.mode=a}function se(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byDimDef");if(a&&ne(e,a.label),function(e){return!!(e&&e.activeDimensionIndex>-1)}(a))!function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"color.byDimDef");r.activeDimensionIndex=Math.min(r.activeDimensionIndex,n.length-1);var i=ie("dimension",!1,n[r.activeDimensionIndex]);i.activeDimensionIndex=r.activeDimensionIndex,ae(e,i)}(e,t);else if(function(e){return!e||!e.key}(a)&&function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=n[function(e,t,n){var r=o.getValue(t,"visualization"),i=n.split("."),a=Number(i[1]),s=o.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===r&&"point"===s}(n,e,t)?0:n.length-1],i=K.IDMAP.COLOR_BY_ALTERNATIVE,a=d.findItemByPropertyValue(r.qAttributeDimensions,"id",i);return ae(e,ie("dimension",!!a,a||r)),!!a}(e,t))return;re({properties:e,isDimension:!0,dimensions:n,excludedDimensions:i,measures:r,label:o.getValue(e,"color.byDimDef.label")})}const le=function(e,t,n){o.setValue(e,t,n),o.isAtomicValue(n)&&function(e,t,n){var r=e.qLayoutExclude;r&&(r.changed||(r.changed={}),r.changed[t]={from:o.getValue(e,t),to:n})}(e,t,n)},ue=function(e,t){var n={primary:!0};if(e){var r=(Q[t]||J).colorModeOptions||J.colorModeOptions;n.byDimension=r.dimension(e),n.byMeasure=r.measure(e),n.byMultiple=r.multiColor(e),n.byExpression=r.expression(e)}return n},ce=function(e){var t=e.canColorBy,n=e.autoColor,r=e.colorMode,i=e.dimensions;return!(t[r]&&!n&&("byDimension"!==r&&"byMeasure"!==r||!i.length))},de=function(e,t){var n,r=o.getValue(e,"color.mode"),i=o.getValue(e,"color.auto"),a=o.getValue(e,"".concat(t,"qDimensions"),[]),s=o.getValue(e,"".concat(t,"qMeasures"),[]),l=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);i?te(a,l):!(n={auto:i,colorMode:r,dimensions:a}).auto&&"byDimension"===n.colorMode&&n.dimensions.length>0?se(e,t):function(e){var t=e.auto,n=e.colorMode,r=e.dimensions,i=e.measures,a=e.properties,s=o.getValue(a,"visualization");return!(t||"byMeasure"!==n||!r.length||"map"!==s&&!i.length)}({auto:i,colorMode:r,dimensions:a,measures:s,properties:e})?function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byMeasureDef");if(a&&ne(e,a.label),function(e){return!!(e&&e.activeMeasureIndex>-1)}(a))!function(e,t){var n=o.getValue(e,"".concat(t,"qMeasures"),[]),r=o.getValue(e,"color.byMeasureDef");if(r.activeMeasureIndex=Math.min(r.activeMeasureIndex,n.length-1),r.activeMeasureIndex>-1){var i=ie("measure",!1,n[r.activeMeasureIndex],!0);i.activeMeasureIndex=r.activeMeasureIndex,ae(e,i)}}(e,t);else if(function(e,t){return(!e||!e.key)&&t.length>0}(a,r)&&function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=n[n.length-1],a=K.IDMAP.COLOR_BY_ALTERNATIVE,s=d.findItemByPropertyValue(i.qAttributeExpressions,"id",a);return ae(e,ie("measure",!!s,s||r[0])),!!s}(e,t))return;re({properties:e,isDimension:!1,dimensions:n,excludedDimensions:i,measures:r,label:o.getValue(e,"color.byMeasureDef.label")})}(e,t):function(e,t){var n=o.getValue(e,"color.mode"),r=o.getValue(e,"".concat(t,"qDimensions"),[]),i=o.getValue(e,"".concat(t,"qMeasures"),[]),a=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===n&&i.length<2&&o.setValue(e,"color.mode","primary"),te(r,a)}(e,t)},pe=function(e){e.forEach(function(e){e.qOtherTotalSpec&&"qTotalMode"in e.qOtherTotalSpec&&delete e.qOtherTotalSpec.qTotalMode})},fe=function(e){var t=e.shouldUpdateColorBy,n=e.properties,r=o.getValue(n,"qHyperCubeDef.qMeasures",[]),i=o.getValue(n,"color.mode","");return!t&&"byExpression"===i&&r.length>0},he=function(e){var t=o.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),n=o.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:n,id:"colorByExpression"}),o.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)},me=function(e){o.setValue(e,"color.mode","primary"),o.setValue(e,"color.auto",!0)},ge=function(e){var t=o.getValue(e,"qHyperCubeDef.qDimensions",[]),n=o.getValue(e,"color.persistent",!1);return t.length>1&&!n},ve={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=B.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),o=i.data[0],a=o.dimensions.concat(o.excludedDimensions),s=o.measures.concat(o.excludedMeasures),l=K.IDMAP,u=l.COLOR_BY_ALTERNATIVE,c=l.COLOR_BY_EXPRESSION;return K.moveByIdFromGroup(a,[],"qAttributeDimensions",u),K.moveByIdFromGroup(a,[],"qAttributeExpressions",u),K.moveByIdFromGroup(s,[],"qAttributeExpressions",c),i},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,i=e.defaultPropertyValues,a=e.hypercubePath,s=e.extension,l=e.supportedFilters,u=e.isHCModifierSupported,c=B.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:i,hypercubePath:a,extension:s,supportedFilters:l,isHCModifierSupported:u}),d=c.qProperty,p=o.getValue(d,"visualization"),f=o.getValue(d,"qHyperCubeDef.qDimensions",[]),h=o.getValue(d,"color.mode",""),m=o.getValue(d,"color.auto",""),g=ue(d,p),v=ce({canColorBy:g,autoColor:m,colorMode:h,dimensions:f});return g[h]?fe({shouldUpdateColorBy:v,properties:d})&&he(d):me(d),v&&de(d,"qHyperCubeDef."),ge(d)&&le(d,"color.persistent",!0),pe(f),c}};var ye=["bar","marker","line"];const be=function(e){var t=e.initialProperties,n=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?V(n,"unsupportedAutoMinMax")||w()(n.measureAxis,t.measureAxis):V(n,"supportedAutoMinMax")||w()(n.measureAxis,t.measureAxis)},xe=function(e){var t,n=e.exportFormat,r=e.initialProperties,i=e.properties,o=e.measureType,a=i.qHyperCubeDef,s=i.measureAxis;if(function(e){var t=e.initialProperties;return!(!e.exportFormat.properties.measureAxes||t.measureAxes||!t.measureAxis||void 0===t.measureAxis.autoMinMax)}({exportFormat:n,initialProperties:r})){var l=function(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach(function(e){if(e.qDef.series){var n=e.qDef.series,r=n.type,i=n.axis;t[i]||(t[i]={axis:i,type:{line:0,marker:0,bar:0,total:0}}),ye.includes(r)&&t[i].type[r]++,t[i].type.total++}}),t}(a);l.length?(o&&(t=l.filter(function(e){return e.type[o]>0}).sort(function(e,t){return t.type[o]-e.type[o]})),t&&t.length||(t=l.sort(function(e,t){return t.type.total-e.type.total})),t&&t[0]&&w()(s,n.properties.measureAxes[t[0].axis])):w()(s,n.properties.measureAxes[0])}},Se=function(e){if(e.qDimensions.length>1){var t=e.qInterColumnSortOrder.indexOf(0);if(0!==t){var n=e.qInterColumnSortOrder[0];e.qInterColumnSortOrder[0]=0,e.qInterColumnSortOrder[t]=n}}},we={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=e.supportedAutoMinMax,o=void 0===i||i,a=ve.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),s=a.properties;return o?(x(s,"measureAxis.min","supportedAutoMinMax"),x(s,"measureAxis.max","supportedAutoMinMax")):(x(s,"measureAxis.min","unsupportedAutoMinMax"),x(s,"measureAxis.max","unsupportedAutoMinMax")),a},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,i=e.defaultPropertyValues,o=e.hypercubePath,a=e.measureType,s=e.extension,l=e.supportedFilters,u=e.isHCModifierSupported,c=ve.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:i,hypercubePath:o,extension:s,supportedFilters:l,isHCModifierSupported:u}),d=c.qProperty;return be({initialProperties:n,properties:d}),xe({exportFormat:t,initialProperties:n,properties:d,measureType:a}),Se(d.qHyperCubeDef),d.qHyperCubeDef.qColumnOrder=[],d.qHyperCubeDef.columnOrder=[],c}};function Ce(e,t,n){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(n)}function Ee(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,n,[]).forEach(function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,a);if(void 0!==s){var l=o.getValue(i,"qDef.cId");l||(l=o.generateId(),o.setValue(i,"qDef.cId",l));var u=Ce(n,r,l);o.setValue(t,u,s),o.setValue(i,a,void 0)}}({properties:t,quarantineName:r,arrayName:i,item:e,itemPath:a})})}function Ie(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,n,[]).forEach(function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,"qDef.cId");if(s){var l=Ce(n,r,s),u=o.getValue(t,l);void 0!==u&&(o.setValue(i,a,u),o.setValue(t,l,void 0))}}({properties:t,quarantineName:r,arrayName:i,item:e,itemPath:a})})}var De="qHyperCubeDef.qMeasures",Pe="conditionalColoring",Me="measures",Re="qDef.conditionalColoring";const ke={quarantine:function(e){Ee({properties:e,arrayPath:De,quarantineName:Pe,arrayName:Me,itemPath:Re})},unquarantine:function(e){Ie({properties:e,arrayPath:De,itemPath:Re,arrayName:Me,quarantineName:Pe})}};var Le="qHyperCubeDef.qMeasures",Ae="measures",Oe="qHyperCubeDef.qDimensions",Te="dimensions",qe="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",_e="alternativeMeasures",Ne="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",je="alternativeDimensions",Fe="qCalcCondition",ze="conditionalShowHide";const We={quarantine:function(e){Ee({properties:e,arrayPath:Le,quarantineName:ze,arrayName:Ae,itemPath:Fe}),Ee({properties:e,arrayPath:Oe,quarantineName:ze,arrayName:Te,itemPath:Fe})},unquarantine:function(e){Ie({properties:e,arrayPath:Le,quarantineName:ze,arrayName:Ae,itemPath:Fe}),Ie({properties:e,arrayPath:Oe,quarantineName:ze,arrayName:Te,itemPath:Fe})},quarantineAlternative:function(e){Ee({properties:e,arrayPath:qe,quarantineName:ze,arrayName:_e,itemPath:Fe}),Ee({properties:e,arrayPath:Ne,quarantineName:ze,arrayName:je,itemPath:Fe})},unquarantineAlternative:function(e){Ie({properties:e,arrayPath:qe,quarantineName:ze,arrayName:_e,itemPath:Fe}),Ie({properties:e,arrayPath:Ne,quarantineName:ze,arrayName:je,itemPath:Fe})}},$e={hypercube:B,colorChart:ve,axisChart:we,quarantineProperty:x,unquarantineProperty:V,quarantineArrayProp:Ee,unquarantineArrayProp:Ie,conditionalColoring:ke,conditionalShow:We}})(),r.default})()}(M_)),M_.exports),k_=Nt(R_);const L_="qHyperCubeDef.qMeasures",A_="measures",O_="qHyperCubeDef.qDimensions",T_="dimensions",q_="qDef.representation",__="tableRepresentation",N_="qDef.conditionalColoring",j_="conditionalColoring",F_="qMiniChartDef",z_="miniChartDef",W_=e=>{k_.unquarantineArrayProp({properties:e,arrayPath:O_,itemPath:q_,arrayName:T_,quarantineName:__}),k_.unquarantineArrayProp({properties:e,arrayPath:L_,itemPath:q_,arrayName:A_,quarantineName:__}),k_.unquarantineArrayProp({properties:e,arrayPath:L_,itemPath:N_,arrayName:A_,quarantineName:j_}),k_.unquarantineArrayProp({properties:e,arrayPath:L_,itemPath:F_,arrayName:A_,quarantineName:z_})},$_=e=>{k_.quarantineArrayProp({properties:e,arrayPath:O_,itemPath:q_,arrayName:T_,quarantineName:__}),k_.quarantineArrayProp({properties:e,arrayPath:L_,itemPath:q_,arrayName:A_,quarantineName:__}),k_.quarantineArrayProp({properties:e,arrayPath:L_,itemPath:N_,arrayName:A_,quarantineName:j_}),k_.quarantineArrayProp({properties:e,arrayPath:L_,itemPath:F_,arrayName:A_,quarantineName:z_})};function H_(e){const{translator:t}=e;return{targets:[{path:"/qHyperCubeDef",dimensions:{min:1,max:1e3,description(e,n,r){const i="rows"===r?.type?"Visualizations.Descriptions.Row":"Visualizations.Descriptions.Column";return t.get(i)}},measures:{min:1,max:1e3,description:()=>t.get("Visualizations.Descriptions.Values")},filters:{description:()=>t.get("SimpleProperties.Filters.Filter")}}]}}const V_="qHyperCubeDef.qDimensions",B_="dimensions",G_="qOtherTotalSpec.qTotalMode",U_="totalMode",Y_={quarantine(e){k_.quarantineArrayProp({properties:e,arrayPath:V_,quarantineName:U_,arrayName:B_,itemPath:G_})},unquarantine(e){k_.unquarantineArrayProp({properties:e,arrayPath:V_,quarantineName:U_,arrayName:B_,itemPath:G_})}};function K_(e){const t=H_(e);return(e,n,r,i)=>{const o=k_.hypercube.importProperties({exportFormat:e,initialProperties:n,dataDefinition:t.targets[0],hypercubePath:i}),a=o.qProperty.qHyperCubeDef.qDimensions.length,s=o.qProperty.qHyperCubeDef.qMeasures.length;let l,u=o.qProperty.qHyperCubeDef.qInterColumnSortOrder,c=!0;a+s===u.length&&xq(o,"qProperty.qLayoutExclude.quarantine.interColSortOrder",u.concat());const d=o.qProperty.qLayoutExclude.quarantine?.pivotInterColSortOrder;d?(u=d,l=[...d],xq(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&&xq(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&&(k_.unquarantineProperty(o.qProperty,"noOfLeftDims"),k_.unquarantineProperty(o.qProperty,"excludedNoOfLeftDims "))}return k_.unquarantineProperty(o.qProperty,"rankedList"),k_.conditionalShow.unquarantine(o.qProperty),Y_.unquarantine(o.qProperty),W_(o.qProperty),k_.unquarantineProperty(o.qProperty,"pivotTableIndentMode"),o}}function X_(e,t){const n=e.qProperty.qHyperCubeDef.qInterColumnSortOrder,r=n.slice(),i=n.indexOf(-1);i>-1&&n.splice(i,1);const o=k_.hypercube.exportProperties({propertyTree:e,hyperCubePath:t}),a=o.properties.qHyperCubeDef,s=a.qDimensions.length,l=a.qMeasures.length;let u=a.qInterColumnSortOrder;xq(o,"properties.qLayoutExclude.quarantine.pivotInterColSortOrder",r),k_.quarantineProperty(o.properties,"qHyperCubeDef.qNoOfLeftDims","noOfLeftDims"),delete o.properties.qHyperCubeDef.qNoOfLeftDims,k_.quarantineProperty(o.properties,"qHyperCubeDef.rankedList","rankedList"),delete o.properties.qHyperCubeDef.rankedList;const c=o.properties.qLayoutExclude.quarantine?.interColSortOrder;c&&(u=c,xq(o,"properties.qHyperCubeDef.qInterColumnSortOrder",u),xq(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 k_.quarantineProperty(o.properties,"qHyperCubeDef.qIndentMode","pivotTableIndentMode"),k_.quarantineProperty(o.properties,"qHyperCubeDef.excludedNoOfLeftDims ","excludedNoOfLeftDims "),k_.conditionalShow.quarantine(o.properties),Y_.quarantine(o.properties),$_(o.properties),o}const J_=e=>({dimensions:{min:1,max:1e3,description(t,n,r){const i="rows"===r?.type?"Visualizations.Descriptions.Row":"Visualizations.Descriptions.Column";return e.translator.get(i)}},measures:{min:1,max:1e3,description:()=>e.translator.get("Visualizations.Descriptions.Values")}}),Z_=["rows","columns","measures"],Q_=e=>{if(!e.flags.isEnabled("SUPPORT-9810-MIGRATE-RANKED-LISTS"))return;const t=new D_({},e);return{properties:e=>(t.setProperties(e),Z_.forEach(e=>{t.isRankedListCorrupt(e)&&t.createRankedList(e)}),e)}},eN={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}}}};let tN=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}({}),nN=function(e){return e.Attribute="attribute",e.Dimension="dimension",e}({});const rN=e=>{switch(e?.type){case"url":return tN.Link;case"image":return tN.Image;case"indicator":return tN.Indicator;case"miniChart":return tN.MiniChart;default:return tN.Text}},iN=({isImagesEnabled:e})=>({uses:"dimensionRepresentationItems.representationType",options(t,n,r){const{qIndentMode:i}=r.properties.qHyperCubeDef,o=[{value:"text",translation:"Object.Table.Representation.Text"},{value:"url",translation:"Object.Table.Representation.Link"}];return(!i&&e||i)&&o.push({value:"image",translation:"Object.Table.Representation.Image"}),o}}),oN=e=>{if(e)return{representationImage:{uses:"dimensionRepresentationItems.representationImage",show:e=>rN(e.qDef.representation)===tN.Image,items:{imageSize:{options:[{value:"alwaysFit",translation:"properties.backgroundImage.sizeAlwaysFit"},{value:"fitWidth",translation:"properties.backgroundImage.sizeFitWidth"},{value:"fitHeight",translation:"properties.backgroundImage.sizeFitHeight"},{value:"fill",translation:"properties.backgroundImage.sizeStretch"},{value:"originalSize",translation:"properties.backgroundImage.originalSize"}]},imageBoxWidth:{ref:"qDef.representation.imageBox.width",translation:"properties.pivot.representation.image.imageBox.width",type:"number",expression:"optional",defaultValue:24,show:(e,t,n)=>{if(!n.properties.qHyperCubeDef)return!1;const{qInterColumnSortOrder:r,qNoOfLeftDims:i,qDimensions:o,qIndentMode:a}=n.properties.qHyperCubeDef;let s=!1;const l=o?.indexOf(e)??1/0;return(r?.slice(0,i)??[]).indexOf(l)>-1&&(s=!0),s&&a}}}}}},aN=e=>{const{anything:t}=e,n=!t.sense?.isUnsupportedFeature?.("tableImages");return{representationType:iN({isImagesEnabled:n}),representationUrlPosition:{uses:"dimensionRepresentationItems.representationUrlPosition",show:e=>rN(e.qDef.representation)===tN.Link},representationUrlLabel:{uses:"dimensionRepresentationItems.representationUrlLabel",show:e=>rN(e.qDef.representation)===tN.Link&&e.qDef.representation?.urlPosition===nN.Dimension},representationLinkUrl:{uses:"dimensionRepresentationItems.representationLinkUrl",show:e=>rN(e.qDef.representation)===tN.Link&&e.qDef.representation?.urlPosition===nN.Attribute},...oN(n)}},sN=(e,t)=>{const{anything:n}=e,r=n.sense?.isUnsupportedFeature,i=!r?.("tableImages")&&t[tN.Image],o=!r?.("qMiniChartDef")&&t[tN.MiniChart],a=!r?.("tableIndicators")&&t[tN.Indicator],s=i&&t[tN.ImagesInIndentMode];return{representationType:{uses:"measureRepresentationItems.representationType",options:(e,t,n)=>(e=>{const{qIndentMode:t}=e.properties.qHyperCubeDef??{},n=[{value:"text",translation:"Object.Table.Representation.Text"}];return(!t&&i||t&&s)&&n.push({value:"image",translation:"Object.Table.Representation.Image"}),a&&n.push({value:"indicator",translation:"Object.Table.Representation.Indicator"}),o&&n.push({value:"miniChart",translation:"Common.MiniChart"}),n})(n)},representationImage:i?{uses:"measureRepresentationItems.representationImage",show:e=>rN(e.qDef.representation)===tN.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 lN=function(e){return e.Dimension="dimensions",e.Measures="measures",e.Pivot="pivot",e}({}),uN=function(e){return e.CellForegroundColor="cellForegroundColor",e.CellBackgroundColor="cellBackgroundColor",e.ImageUrl="imageUrl",e.ImageLabel="imageLabel",e.Link="url",e.LinkLabel="urlLabel",e}({}),cN=function(e){return e.TopGrid="topGrid",e.LeftGrid="leftGrid",e.DataGrid="dataGrid",e}({}),dN=function(e){return e.Forward="forward",e.Backward="backward",e.None="none",e}({});const pN="image",fN=(e,t,n)=>{if(!n.properties.qHyperCubeDef.qIndentMode)return!0;const r=n.properties.qHyperCubeDef.qInterColumnSortOrder?.indexOf(-1)??-1;let i=n.properties.qHyperCubeDef.qNoOfLeftDims??-1;r>-1&&r<i&&(i-=1);const o=n.properties.qHyperCubeDef.qDimensions.indexOf(e);return 0===o||o>=i},hN=()=>({type:{type:"string",component:"dropdown",ref:"qDef.columnWidth.type",translation:"Object.Table.Column.Width",options:[{value:ZA.Auto,translation:"Common.Auto"},{value:ZA.FitToContent,translation:"Object.Table.Column.FitToContent"},{value:ZA.Pixels,translation:"Object.Table.Column.Pixels"},{value:ZA.Percentage,translation:"Object.Table.Column.Percentage"}],defaultValue:ZA.Auto},sizePixels:{ref:"qDef.columnWidth.pixels",translation:"Object.Table.Column.Pixels",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:JA.PixelsDefault,show:e=>e.qDef.columnWidth?.type===ZA.Pixels},sizePercentage:{ref:"qDef.columnWidth.percentage",translation:"Object.Table.Column.Percentage",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:JA.PercentageDefault,show:e=>e.qDef.columnWidth?.type===ZA.Percentage}}),mN=({key:e,translation:t,env:n})=>{const r=!n.anything.sense?.isUnsupportedFeature?.("tableImages");return{[`${e}Auto`]:{ref:`qDef.${e}.auto`,type:"boolean",component:"switch",translation:t,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}],defaultValue:!0,show:t=>!r||"labelTextAlign"===e||t.qDef.representation?.type!==pN},[e]:{ref:`qDef.${e}.align`,type:"string",component:"item-selection-list",horizontal:!0,items:[{component:"icon-item",icon:"align_left",labelPlacement:"bottom",value:"left",translation:"properties.dock.left"},{component:"icon-item",icon:"align_center",labelPlacement:"bottom",value:"center",translation:"Common.Center"},{component:"icon-item",icon:"align_right",labelPlacement:"bottom",value:"right",translation:"properties.dock.right"}],defaultValue:"left",show:t=>void 0!==t.qDef[e]&&!t.qDef[e].auto&&(!r||"labelTextAlign"===e||t.qDef.representation?.type!==pN)}}},gN="TOTAL_OFF",vN={component:"attribute-expression-reference",defaultValue:[],ref:"qAttributeExpressions",items:[{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.BackgroundExpression",defaultValue:"",id:uN.CellBackgroundColor},{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.ForegroundExpression",defaultValue:"",id:uN.CellForegroundColor},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:uN.LinkLabel,tid:"URLLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:uN.Link,tid:"URLByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:uN.ImageLabel,tid:"ImageLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:uN.ImageUrl,tid:"ImageUrlByExpression",show:!1}]},yN="TOTAL_OFF",bN={component:"attribute-expression-reference",defaultValue:[],ref:"qAttributeExpressions",items:[{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.BackgroundExpression",defaultValue:"",id:uN.CellBackgroundColor},{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.ForegroundExpression",defaultValue:"",id:uN.CellForegroundColor},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:uN.LinkLabel,tid:"URLLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:uN.Link,tid:"URLByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:uN.ImageLabel,tid:"ImageLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:uN.ImageUrl,tid:"ImageUrlByExpression",show:!1}]},xN=e=>{const{translator:t,anything:n,flags:r}=e,i=(e=>{const{translator:t,anything:n}=e;return{type:"items",component:"data-assets-panel-pivot",translation:"Common.Data",items:{dimensions:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qDimensions",items:{field:{type:"items",translation:"Common.Field",items:{libraryId:{type:"string",component:"library-item",libraryItemType:"dimension",ref:"qLibraryId",translation:"Common.Dimension",show:e=>!!e.qLibraryId},inlineDimension:{component:"inline-dimension",show:e=>!e.qLibraryId},autoSort:{ref:"qDef.autoSort",type:"boolean",defaultValue:!0,show:!1},cId:{ref:"qDef.cId",type:"string",show:!1},nullSuppression:{type:"boolean",ref:"qNullSuppression",defaultValue:!1,translation:"properties.dimensions.showNull",inverted:!0},totalMode:{type:"string",component:"switch",translation:"properties.showTotals",ref:"qOtherTotalSpec.qTotalMode",defaultValue:gN,trueOption:{value:"TOTAL_EXPR",translation:"properties.on"},falseOption:{value:gN,translation:"properties.off"},show:!n.sense?.isUnsupportedFeature?.("totals")&&fN},totalsLabel:{type:"string",component:"expression",expressionType:"StringExpr",ref:"qTotalLabel",translation:"properties.totals.label",defaultValue:()=>t.get("Object.Table.Totals"),show:(e,t,r)=>!n.sense?.isUnsupportedFeature?.("totals")&&e.qOtherTotalSpec?.qTotalMode!==gN&&fN(e,0,r)},dimensionLimits:{uses:"dimensions.items.dimensionLimits"},showOthers:{uses:"dimensions.items.others"},globalGrouping:{type:"boolean",translation:"properties.dimensionLimits.globalGrouping",ref:"qOtherTotalSpec.qGlobalOtherGrouping",defaultValue:!1,show:e=>"OTHER_OFF"!==e.qOtherTotalSpec?.qOtherMode}}},presentation:{type:"items",translation:"properties.presentation",items:{visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Table.Columns.VisibilityCondition",defaultValue:{qv:""},isExpression:e=>"string"==typeof e&&e.trim().length>0},cellColoring:vN,...mN({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...mN({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...aN(e),...hN()}}}},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:vN,...mN({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...mN({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...sN(e,{[tN.Image]:!0,[tN.Indicator]:!0}),...hN()}}}},filter:{type:"object",component:"filter-item-react",ref:"filter",tabName:"SimpleProperties.Filters.Filters"}}}})(e);return r.isEnabled("CLIENT_IM5974_PIVOT_DATA_PROPERTIES")?i:{type:"items",component:"pivot-data",translation:"properties.data",addTranslation:"Property.AddData",items:{dimensions:{type:"array",component:"dimensions",translation:"Common.Dimensions",alternativeTranslation:"properties.alternative.dimensions",ref:"qHyperCubeDef.qDimensions",disabledRef:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",min:1,allowAdd:!0,allowRemove:!0,allowMove:!0,addTranslation:"properties.dimensions.add",grouped:!0,items:{libraryId:{type:"string",component:"library-item",libraryItemType:"dimension",ref:"qLibraryId",translation:"Common.Dimension",show:e=>!!e.qLibraryId},inlineDimension:{component:"inline-dimension",show:e=>!e.qLibraryId},autoSort:{ref:"qDef.autoSort",type:"boolean",defaultValue:!0,show:!1},cId:{ref:"qDef.cId",type:"string",show:!1},nullSuppression:{type:"boolean",ref:"qNullSuppression",defaultValue:!1,translation:"properties.dimensions.showNull",inverted:!0},totalMode:{type:"string",component:"switch",translation:"properties.showTotals",ref:"qOtherTotalSpec.qTotalMode",defaultValue:yN,trueOption:{value:"TOTAL_EXPR",translation:"properties.on"},falseOption:{value:yN,translation:"properties.off"},show:!n.sense?.isUnsupportedFeature?.("totals")&&fN},totalsLabel:{type:"string",component:"expression",expressionType:"StringExpr",ref:"qTotalLabel",translation:"properties.totals.label",defaultValue:()=>t.get("Object.Table.Totals"),show:(e,t,r)=>!n.sense?.isUnsupportedFeature?.("totals")&&e.qOtherTotalSpec?.qTotalMode!==yN&&fN(e,0,r)},dimensionLimits:{uses:"dimensions.items.dimensionLimits"},showOthers:{uses:"dimensions.items.others"},globalGrouping:{type:"boolean",translation:"properties.dimensionLimits.globalGrouping",ref:"qOtherTotalSpec.qGlobalOtherGrouping",defaultValue:!1,show:e=>"OTHER_OFF"!==e.qOtherTotalSpec?.qOtherMode},visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Table.Columns.VisibilityCondition",defaultValue:{qv:""},isExpression:e=>"string"==typeof e&&e.trim().length>0},cellColoring:bN,...mN({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...mN({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...aN(e),...hN()}},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:bN,...mN({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...mN({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...sN(e,{[tN.Image]:!0,[tN.ImagesInIndentMode]:!0,[tN.Indicator]:!0}),...hN()}},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"}}}}}},SN=(e,t,n,r)=>({ref:e,translation:t,dualOutput:!0,type:"object",component:"color-picker",width:"auto",disableNone:r??!1,defaultValue(e,t,i){const o=r?.(e,t,i)??!1,a=i.theme.current(),s=n(a,o);return{color:"transparent"===s?"none":s}}}),wN=(e,t=!1)=>{return{value:e,label:t?(n=e,n.charAt(0).toUpperCase()+n.slice(1)):e,groupHeader:!1,disabled:!1,styles:t?{fontFamily:e}:void 0};var n},CN=({ref:e,themeAccessor:t,translator:n,flags:r})=>({component:"dropdown",ref:e,options:(e,i,o)=>{const a=o.theme.current();return((e,t,n,r)=>{const i=t.fontFamily??"Source Sans Pro, sans-serif",o=t.fontFamilies??[],a=Array.from(new Set([e,i,...o])),s=[{value:"ThemeHeader",label:n.get("properties.themeFonts"),metaText:n.get("properties.theme"),groupHeader:!0},...a.sort().map(e=>wN(e,!0))],l=[{value:"DefaultHeader",label:n.get("properties.allFonts"),metaText:n.get("properties.default"),groupHeader:!0},...mT(r).filter(e=>!a.includes(e)).map(e=>wN(e,!0))];return[...s,...l.length>1?l:[]]})(t(a),a,n,r)},defaultValue:(e,n,r)=>t(r.theme.current())}),EN=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],IN=({ref:e,themeAccessor:t,translator:n})=>({component:"dropdown",ref:e,options:(e,r,i)=>{const o=i.theme.current();return((e,t,n)=>{const r=t.fontSize,i=t.fontSizes??[],o=Array.from(new Set([e,r,...i])),a=[{value:"ThemeHeader",label:n.get("properties.themeFontSizes"),metaText:n.get("properties.theme"),groupHeader:!0},...o.sort((e,t)=>parseInt(e,10)-parseInt(t,10)).map(e=>wN(e,!1))],s=[{value:"DefaultHeader",label:n.get("properties.allFontSizes"),metaText:n.get("properties.default"),groupHeader:!0},...EN.filter(e=>!o.includes(e)).map(e=>wN(e,!1))];return[...a,...s.length>1?s:[]]})(t(o),o,n)},defaultValue:(e,n,r)=>t(r.theme.current())}),DN=({section:e,defaultFontStyle:t,translator:n,flags:r,getThemeValue:i,translation:o,disableNoneCallback:a})=>({component:"panel-section",translation:o??`properties.pivot.${e}`,items:{content:{component:"items",ref:"components",key:"theme",items:{fontFamily:CN({ref:`${e}.fontFamily`,themeAccessor:t=>i(t,e,"fontFamily")??t.fontFamily,translator:n,flags:r}),fontWrapperItem:{component:"inline-wrapper",items:{fontStyle:{component:"font-style-buttons",width:!1,ref:`${e}.fontStyle`,defaultValue:t??[]},fontSize:IN({ref:`${e}.fontSize`,themeAccessor:t=>i(t,e,"fontSize")??t.fontSize,translator:n}),fontColor:SN(`${e}.fontColor`,void 0,t=>i(t,e,"color")??t.color)}},background:SN(`${e}.background`,"properties.background",(t,n)=>{const r=n?jO.WHITE:jO.TRANSPARENT;return i(t,e,"backgroundColor")??r},a)}}}}),PN=({section:e,defaultFontStyle:t,fallbackBackground:n,getThemeValue:r})=>({component:"panel-section",translation:`properties.pivot.${e}`,items:{content:{component:"items",ref:"components",key:"theme",items:{fontWrapperItem:{component:"inline-wrapper",items:{fontStyle:{component:"font-style-buttons",fullWidth:!0,ref:`${e}.fontStyle`,defaultValue:t??[]},fontColor:SN(`${e}.fontColor`,void 0,t=>r(t,e,"color")??t.color)}},background:SN(`${e}.background`,"properties.background",t=>r(t,e,"backgroundColor")??n??"transparent")}}}}),MN=(e,t)=>({component:"dropdown",ref:e,translation:t,options:[...Array(10).keys()].map(e=>({value:e+1,translation:e+1})),defaultValue:1}),RN="12px",kN="Source Sans Pro, sans-serif",LN="600",AN=15e3,ON=4/3;let TN=function(e){return e.Transparent="transparent",e.FontSecondary="#737373",e.DividerDark="#595959",e.DividerLight="#D9D9D9",e.NullValueBackground="#F2F2F2",e}({}),qN=function(e){return e.Solid="solid",e.None="none",e}({});const _N={display:"flex",justifyContent:"center",alignItems:"center"},NN={borderStyle:"solid"},jN={boxSizing:"border-box",padding:"4px 8px",userSelect:"none",WebkitUserSelect:"none"},FN={lineHeight:ON,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},zN=e=>({whiteSpace:"unset",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",wordBreak:e>1?"break-word":"break-all"}),WN=(e,t)=>e>0?`${e}px ${qN.Solid} ${t}`:qN.None,$N=(e,t,n,r,i)=>{const o=Number(!t||i?.right),a=Number(!e||i?.bottom);return{borderRight:"rtl"!==r?WN(o,n):qN.None,borderBottom:WN(a,n),borderLeft:"rtl"===r?WN(o,n):qN.None,borderTop:qN.None}},HN=(e,t,n,r,i,o,a)=>{const s=$N(t,r,i,o,a);return e.isLeftDimension||(e.isLastDimension&&!t&&(s.borderBottom=WN(2,i)),n||(s.borderLeft="rtl"!==o?WN(1,i):"none",s.borderRight="rtl"===o?WN(1,i):"none")),s},VN=({bottomDivider:e,rightDivider:t,borderColor:n})=>{const r={};return e&&(r.borderBottom=WN(1,n)),t&&(r.borderRight=WN(1,n)),r},BN=(e,t,n)=>{switch(t){case"header":return e.object?.pivotTableV2?.dimension?.label?.name?.[n];case"dimensionValues":return e.object?.pivotTableV2?.dimension?.label?.value?.[n];case"measureLabels":return e.object?.pivotTableV2?.measure?.label?.name?.[n];case"measureValues":return e.object?.pivotTableV2?.measure?.label?.value?.[n];case"totalValues":return e.object?.pivotTableV2?.total?.label?.value?.[n];case"nullValues":return e.object?.pivotTableV2?.null?.label?.value?.[n];default:return}},GN=(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:DN({section:"header",defaultFontStyle:["bold"],translator:e,flags:t,getThemeValue:BN}),dimensionValueSection:DN({section:"dimensionValues",translator:e,flags:t,getThemeValue:BN}),measureValueSection:DN({section:"measureValues",translator:e,flags:t,getThemeValue:BN}),measureLabelSection:PN({section:"measureLabels",getThemeValue:BN}),totalValuesSection:PN({section:"totalValues",defaultFontStyle:["bold"],getThemeValue:BN}),nullValuesSection:PN({section:"nullValues",fallbackBackground:TN.NullValueBackground,getThemeValue:BN}),gridSection:{translation:"properties.pivot.grid",component:"panel-section",items:{gridItems:{component:"items",ref:"components",key:"theme",items:{lineClamp:MN("grid.lineClamp","ThemeStyleEditor.style.rowHeight"),columnLineClamp:MN("grid.columnLineClamp","ThemeStyleEditor.style.columnHeight"),border:SN("grid.border","properties.border",e=>e.object?.pivotTableV2?.grid?.borderColor??TN.DividerLight),divider:SN("grid.divider","properties.pivot.divider",e=>e.object?.pivotTableV2?.grid?.divider?.borderColor??TN.DividerDark),background:SN("grid.background","properties.background",e=>e.object?.pivotTableV2?.grid?.backgroundColor??TN.Transparent)}}}}}}]}),UN=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}}},YN=(e,t)=>({uses:"settings",items:{presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:[GN(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:ZA.Auto,translation:"Common.Auto"},{value:ZA.Pixels,translation:"Object.Table.Column.Pixels"},{value:ZA.Percentage,translation:"Object.Table.Column.Percentage"}],defaultValue:ZA.Auto,show:e=>!!e.qHyperCubeDef.qIndentMode},sizePixels:{ref:"qHyperCubeDef.indentModeColumnWidth.pixels",translation:"Object.Table.Column.Pixels",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:JA.PixelsDefault,show:e=>{const t=e.qHyperCubeDef;return t.qIndentMode&&t.indentModeColumnWidth?.type===ZA.Pixels}},sizePercentage:{ref:"qHyperCubeDef.indentModeColumnWidth.percentage",translation:"Object.Table.Column.Percentage",component:"expression",expressionType:"ValueExpression",expression:"optional",defaultValue:JA.PercentageDefault,show:e=>{const t=e.qHyperCubeDef;return t.qIndentMode&&t.indentModeColumnWidth?.type===ZA.Percentage}},showTotalsAbove:{ref:"qHyperCubeDef.qShowTotalsAbove",type:"boolean",translation:"properties.pivot.showTotalsAbove",defaultValue:!0,show(e){const{qIndentMode:t}=e.qHyperCubeDef;return!t&&!!e.qHyperCubeDef.qDimensions.some(e=>"TOTAL_EXPR"===e.qOtherTotalSpec?.qTotalMode)}},resetProperties:{type:"object",component:"button",translation:"properties.pivot.resetExpansionButton",disabled:e=>!!e.qHyperCubeDef.qAlwaysFullyExpanded,action(e,t,n,r){e.qHyperCubeDef.qExpansionState=[],r.$emit("saveProperties",e)}}}}]},...UN(t)}}),KN="auto",XN={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:KN,translation:"Object.Table.SortingInSearch",options:[{value:KN,translation:"Common.Auto"},{value:"inherit",translation:"Object.Table.SortingInSearch.InheritFromDimension"}]}}};function JN(e){const{translator:t,flags:n}=e;return{type:"items",component:"accordion",items:{data:xN(e),sorting:XN,addons:eN,settings:YN(t,n)}}}function ZN(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:JN(e),importProperties:K_(e),exportProperties:X_,exploration:u_(e),data:J_(e),migrate:Q_(e),propertyHandler:e.flags.isEnabled("VNA-147_NEBULA_PIVOT_DATA_HANDLERS")?t=>new D_(t,e):void 0}}const QN=()=>{let e;return{promise:new Promise(t=>{e=t}),resolve:e}};function ej(e,t){return M(()=>e,t)}const tj={},nj=e=>{const t=M(()=>({current:tj}),[]);return t.current=t.current===tj?e:t.current,t},rj=e=>!!e&&0===ZO(e).a,ij="#grid",oj=(e,t)=>{const n=t?.closest(e);return n&&window.getComputedStyle(n).backgroundColor},aj=(e,t,n,r,i)=>{const o=oj(".qv-object .qv-inner-object",n),a=oj(".qv-panel-sheet",n),s=oj(ij,n)??a,l=(e=>{const t=e.components?.find(e=>"general"===e.key),n=t?.bgColor?.colorExpression,r=t?.bgColor?.color?.color,i=t?.bgColor?.useColorExpression;if(i&&n)return Oq(n);if("none"===r)return"transparent";if(void 0===r)return;const o=ZO(r);return o.setAlpha(t?.bgColor?.color?.alpha??o.a),o.getRGBA()})(e),u=r?.(t),c=i?.(t),d=l||u||o||c,p=rj(d),f=!rj(h=p?s:d)&&kq(h,jO.TEXT,jO.DARK_MODE_TEXT)===UO(jO.DARK_MODE_TEXT);var h;const m=((e,t,n,r=jO.WHITE)=>e&&!rj(e)?e:rj(t)?n&&!rj(n)?n:r:t)(l,d,s);return{color:d,headerColor:m,isDark:f}},sj=(e,t,n,r)=>{const i=O(),o=((e,t={attributeFilter:["style"],childList:!1,subtree:!1})=>{const[n,r]=L([]);return A(()=>{let n;return e&&(n=new MutationObserver(e=>{r(e)}),n.observe(e,t)),()=>{n?.disconnect()}},[e,t]),n})(t.closest(ij),{attributeFilter:["style"],childList:!1,subtree:!1,attributeOldValue:!0}).filter(({oldValue:e})=>e?.includes("background")).map(({oldValue:e})=>e).join(",");return M(()=>({...i,background:aj(e,i,t,n,r)}),[i.name(),t,n,r,e,o])};function lj(e,t){const n=M(()=>({isLoading:!0}),t),[r,i]=k(async()=>{try{return await e()}finally{n.isLoading=!1}},t);return[r,n.isLoading,i]}const uj=3,cj=/\n/g;function dj(e,t,n){let r=0,i=e.length;if(Number.isNaN(t))return null;if(e.length<=1)return null;if(n(e)<=t)return null;for(;r<=i;){const o=Math.floor((r+i)/2),a=e.slice(0,o),s=e.slice(0,o-1),l=n(a),u=n(s);if(l>t&&u<=t)return e.slice(o-1)||null;if(l===t)return e.slice(o)||null;l<t?r=o+1:i=o}return null}function pj({fontSize:e="12px",fontFamily:t="Source Sans Pro, Arial, sans-serif",fontStyle:n="normal",fontWeight:r="normal"},i){const{maxNbrLinesOfText:o=uj,allowLineBreaks:a=!0}=i??{},{estimateWidth:s,measureText:l,estimateLineCount:u}=y(()=>(({fontSize:e="12px",fontFamily:t="Source Sans Pro, Arial, sans-serif",fontStyle:n="normal",fontWeight:r="normal"},i)=>{const{maxNbrLinesOfText:o=uj,allowLineBreaks:a=!0}=i??{};return()=>{const i=document.createElement("canvas").getContext("2d");i.font=`${n} ${r} ${e} ${t}`;const s=i.measureText.bind(i),l=Sq(e=>{if(void 0===e)return 0;if(a){const t=e.split(cj).map(e=>s(e).width);return t.reduce((e,t)=>t>e?t:e,0)}const t=e.replace(cj," ");return s(t).width}),u=e=>+l(e).toFixed(2),c=Sq(({text:e,maxWidth:t,isNumeric:n=!1})=>{if(n)return 1;const r=a?e.split(cj):[e];let i=0;for(const e of r){let n=e;do{i+=1,n=dj(n,t,u)}while(null!==n&&i<o);if(i>=o)break}return i},({text:e,maxWidth:t,isNumeric:n})=>`${e}-${t}-${n?"true":"false"}`);return{measureText:e=>l(e),estimateWidth:e=>l("N")*e,estimateLineCount:c}}})({fontStyle:n,fontWeight:r,fontSize:e,fontFamily:t},{maxNbrLinesOfText:o,allowLineBreaks:a})(),[n,r,e,t,o,a]);return{estimateWidth:s,measureText:l,estimateLineCount:u}}var fj,hj={};var mj=function(){if(fj)return hj;fj=1;var e=E;return hj.createRoot=e.createRoot,hj.hydrateRoot=e.hydrateRoot,hj}();const gj="Source Sans Pro, sans-serif";function vj(e,t){const[n,r]=g(t);n.some((e,n)=>e!==t[n])&&(r(t),e())}var yj={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 bj=({translator:e})=>(y(()=>{!function(e){if(e&&e.get&&e.add){const t="NebulaTableUtils.MenuGroupLabel.Sorting";if(e.get(t)!==t)return;Object.keys(yj).forEach(t=>{e.add(yj[t])})}}(e)},[e]),e),xj={width:"100%",height:"100%",color:"transparent",background:"transparent",borderColor:"transparent"},Sj={border:0,boxShadow:"none",borderRadius:0,outline:0,width:0,height:0,background:"transparent",cursor:"pointer",visibility:"hidden"},wj=Ta("input",{shouldForwardProp:e=>"isLastColumn"!==e&&"hoverColor"!==e})(({isLastColumn:e,hoverColor:t,dir:n})=>({position:"absolute",display:"flex",height:"100%",top:0,marginLeft:"-4px",marginRight:"rtl"===n?"-4px":void 0,touchAction:"none",cursor:"col-resize",pointerEvents:"auto",width:(e?4:9)+"px",justifyContent:e?"flex-end":"center",outline:"none",appearance:"none",WebkitAppearance:"none",backgroundColor:"transparent","&::-webkit-slider-runnable-track":{...xj},"&::-moz-range-track":{...xj},"&::-ms-track":{...xj},"&::-webkit-slider-thumb":{appearance:"none",WebkitAppearance:"none",...Sj},"&::-moz-range-thumb":{...Sj},"&::-ms-thumb":{...Sj},"&: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"}})),Cj=({columnWidth:e,keyValue:t,isLastColumn:n,isPivot:r,hoverColor:i,updateWidthCallback:o,confirmWidthCallback:a,handleBlur:s,setIsAdjustingWidth:l,isLeftColumn:c,accessibilityRelatedArgs:d,direction:p="ltr"})=>{const f=bj({translator:d.translator}),h=u({initWidth:e,columnWidth:e,initX:0}),m=n?0:1,g=r&&!c,v=()=>g?h.current.columnWidth-m:"100%",y={left:"rtl"!==p?v():void 0,right:"rtl"===p?v():void 0},b=t=>{h.current={initWidth:e,columnWidth:e,initX:t??h.current.initX}};vj(()=>{g&&b()},[e]);const x=e=>{const t=Math.max(e,JA.PixelsMin);h.current.columnWidth=t,o(t)},S=()=>{if(h.current.columnWidth!==h.current.initWidth){const e={type:ZA.Pixels,pixels:h.current.columnWidth};a(e)}l?.(!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=>{Tq(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=>{Tq(e),document.removeEventListener("touchmove",E),document.removeEventListener("touchend",I),S()},D=!r&&s?e=>{if(e.key===KA.Left||e.key===KA.Right){Tq(e);const t=5,n=e.key===KA.Left?t:-t,r="rtl"===p?n:-n;l?.(!0),x(h.current.columnWidth+r)}else e.key===KA.Space||e.key===KA.Enter?(Tq(e),s(e),l?.(!1),S()):e.key===KA.Esc&&(Tq(e),s(e),l?.(!1),x(h.current.initWidth))}:void 0,P=f.get("NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",[String(d.columnLabel)]);return Yn.jsx(wj,{style:y,hoverColor:i,isLastColumn:n,className:XA,"data-testid":XA,onMouseDown:e=>{Tq(e),document.addEventListener("mousemove",w),document.addEventListener("mouseup",C),l?.(!0),b(e.clientX)},onDoubleClick:()=>{a({type:ZA.FitToContent})},onTouchStart:e=>{1===e.touches.length&&(Tq(e),document.addEventListener("touchmove",E),document.addEventListener("touchend",I),l?.(!0),b(e.touches[0].clientX))},onKeyDown:D,onBlur:s,onFocus:()=>{b()},type:"range",tabIndex:-1,"aria-label":P,"aria-valuemin":JA.PixelsMin,"aria-valuemax":JA.PixelsMax,"aria-valuenow":Number(e.toFixed(1)),dir:p},t)},Ej=r((e,t)=>Yn.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:Yn.jsx("path",{d:"M15 4H1V2h14zm0 10H1v-2h14zm0-5H1V7h14z"})})),Ij=Ta(xl,{shouldForwardProp:e=>"rightAligned"!==e&&"shouldShowMenuIcon"!==e&&"isAccessibleHeader"!==e})(({rightAligned:e,shouldShowMenuIcon:t,isAccessibleHeader:n})=>({...e?{marginRight:"auto"}:{marginLeft:"auto"},height:n?24:void 0,display:t?"flex":"none",fontWeight:"bold",width:n?"100%":void 0,alignItems:"center",justifyContent:"center"})),Dj=Ta(Ej,{shouldForwardProp:e=>"isInteractionsActive"!==e})(({isInteractionsActive:e})=>({minWidth:"unset",position:"relative",cursor:e?"pointer":"default"})),Pj=Ta(qc)(({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}})),Mj=Ta(hu)(({theme:e})=>({"&.MuiDivider-root":{margin:e.spacing(.5)}})),Rj=Ta(zc)(({theme:e})=>({fontSize:"12px",height:24,fontWeight:"bold",padding:`${e.spacing(.25,2)} !important`,marginBottom:e.spacing(.5)})),kj=Ta(zc,{shouldForwardProp:e=>"isSubMenu"!==e&&"isActive"!==e})(({theme:e,isSubMenu:t,isActive:n})=>({width:`calc(220px - ${e.spacing(1)} - ${t?10:0}px)`,maxHeight:32,borderRadius:`${e.spacing(.5)} !important`,margin:`${e.spacing(.25,.5)} !important`,padding:`${e.spacing(1,1.5)} !important`,display:"flex !important",justifyContent:"space-between !important","&&:focus":{boxShadow:"rgb(23, 127, 230) 0px 0px 0px 2px"},position:"relative !important",overflow:"hidden",boxSizing:"border-box !important",background:n?"rgba(0, 0, 0, 0.05)":"transparent"})),Lj=Ta("div",{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})(({theme:e,direction:t,isPagination:n})=>({position:"absolute",width:e.spacing(.5),height:16,left:0,right:n||"rtl"!==t?void 0:0,top:"50%",transform:"TranslateY(-50%)",borderRadius:"0 2px 2px 0",background:"#01873d"})),Aj=Ta("div")(()=>({display:"flex",justifyContent:"space-between",alignItems:"center",maxWidth:"100%"})),Oj=Ta(_s)(()=>({fontFamily:'"Source Sans Pro", HelveticaNeue, "Helvetica Neue", Helvetica, Arial, sans-serif',fontSize:"14px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"})),Tj=Ta(lc,{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})(({theme:e,direction:t,isPagination:n})=>({width:16,minWidth:"unset !important",marginRight:n||"rtl"!==t?e.spacing(1.5):0,marginLeft:n||"rtl"!==t?void 0:e.spacing(1.5),lineHeight:0})),qj=r((e,t)=>Yn.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:Yn.jsx("path",{d:"M8.5 8 4 3.5 5.5 2l6 6-6 6L4 12.5z"})})),_j=e=>{const t=e.nextElementSibling;return t?"HR"===t.tagName?_j(t):t:e.parentElement?.children?.[0]},Nj=e=>{const t=e.previousElementSibling;if(!t){const t=e.parentElement?.children?.length;return e.parentElement?.children?.[t-1]}return"HR"===t.tagName?Nj(t):t},jj=e=>{const{key:t,currentTarget:n}=e,r=document.activeElement??n;if(t===KA.Down||t===KA.Up){const n=e=>t===KA.Down?_j(e):Nj(e);e.preventDefault(),e.stopPropagation();let i=n(r);for(;i;){if("true"!==i.ariaDisabled){i.focus();break}i=n(i)}}},Fj=(e,t)=>e.map(e=>e.map(e=>({...e.groupHeading?{groupHeading:e.groupHeading}:{},items:e.items.map(({onClick:e,...n})=>({...n,...e?{onClick:async n=>{Object.entries(t).forEach(([,e])=>{e(!1)}),await e(n)}}:{}}))})));let zj={};const Wj=({autoFocus:e,id:t,onClick:n,itemTitle:r,icon:i,enabled:a,subMenus:s,isSubMenu:l,isActive:u,direction:c,isPagination:d})=>{const[p,f]=g(!1),h=o.useRef(null),v=m(e=>{e.stopPropagation(),f(!1)},[f]);return Yn.jsxs(Yn.Fragment,{children:[Yn.jsxs(kj,{ref:s?h:null,"data-testid":`menu-item-${t}`,className:"nebula-table-utils-head-menu-item",onClick:async e=>{"keyup"!==e.type&&(n&&(await n(e),zj={}),s?.length&&(f(!0),zj[r]=f,e.stopPropagation()))},disabled:!a,autoFocus:e,isSubMenu:!!l,isActive:!!u,onKeyDown:jj,children:[u?Yn.jsx(Lj,{direction:c,isPagination:d}):null,Yn.jsxs(Aj,{children:[Yn.jsx(Tj,{direction:c,isPagination:d,children:Yn.jsx(i,{})}),Yn.jsx(Oj,{variant:"body2",children:r})]}),s?.length?Yn.jsx(qj,{}):null]},t),s?.length?Yn.jsx(Bj,{isSubMenu:!0,open:p,anchorEl:h.current,onClose:v,menuGroups:Fj(s,zj),transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},direction:c,isPagination:d}):null]})},$j=({menuGroup:e,isSubMenu:t,direction:n,isPagination:r})=>e.map(e=>[[e.groupHeading&&Yn.jsx(Rj,{disabled:!0,style:{opacity:1},children:e.groupHeading},e.groupHeading),e.items.map(e=>Yn.jsx(Wj,{...e,isSubMenu:t,direction:n,isPagination:r},e.id))].filter(Boolean)]),Hj=({itemGroups:e,isSubMenu:t,direction:n,isPagination:r})=>e.map((i,o)=>[$j({menuGroup:i,isSubMenu:t,direction:n,isPagination:r}),o<e.length-1?Yn.jsx(Mj,{"data-testid":"group-divider",variant:"middle"}):void 0]),Vj={appear:0,enter:0,exit:0},Bj=({anchorEl:e,open:t,onClose:n,menuGroups:r,transformOrigin:i,anchorOrigin:o,isSubMenu:a,direction:s,isPagination:l})=>r.length?Yn.jsx(Pj,{className:"nebula-table-utils-head-menu",open:t,anchorEl:e,onClose:n,transitionDuration:Vj,MenuListProps:{id:"nebula-table-utils-head-menu-list-id"},...o?{anchorOrigin:o}:{},...i?{transformOrigin:i}:{},dir:s,children:Hj({itemGroups:r,isSubMenu:a,direction:s,isPagination:l})}):null,Gj=(e,t)=>e.some(e=>t[e]>0),Uj={canSelectAll:!1,canClearSelections:!1,canSelectPossible:!1,canSelectAlternative:!1,canSelectExcluded:!1},Yj=({open:e,qStateName:t="$",headerData:n,app:r})=>{const[i,o]=g(null),[a,s]=g(Uj);return vj(()=>{e||(s(Uj),o(null))},[e]),f(()=>{if(!r?.createSessionObject||!n.isDim||!e)return()=>{};let i,a=!1;const l=()=>{i&&r.destroySessionObject(i)};return(async()=>{try{const e=((e,t)=>({qInfo:{qType:"tableListbox"},qListObjectDef:Boolean(t.qLibraryId)?{qLibraryId:t.qLibraryId,qStateName:e}:{qDef:{qFieldDefs:[t.fieldId]},qStateName:e}}))(t,n),u=await r.createSessionObject(e),c=await u.getLayout(),{qStateCounts:d}=c.qListObject?.qDimensionInfo??{};i=c.qInfo?.qId,a?l():(o(u),d&&s((e=>({canSelectAll:Gj(["qOption","qAlternative","qExcluded","qDeselected"],e),canClearSelections:Gj(["qSelected"],e),canSelectPossible:Gj(["qOption"],e),canSelectAlternative:Gj(["qAlternative"],e),canSelectExcluded:Gj(["qAlternative","qExcluded"],e)}))(d)))}catch(e){console.error(e)}})(),()=>{a=!0,l()}},[e,r,n,t]),{fieldInstance:i,selectionActionsEnabledStatus:a}},Kj=r((e,t)=>Yn.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:Yn.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"})})),Xj=r((e,t)=>Yn.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:Yn.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"})})),Jj=r((e,t)=>Yn.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:Yn.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"})})),Zj=r((e,t)=>Yn.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:Yn.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"})})),Qj=r((e,t)=>Yn.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:Yn.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"})})),eF=r((e,t)=>Yn.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:Yn.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"})})),tF=r((e,t)=>Yn.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:Yn.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"})})),nF=r((e,t)=>Yn.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:Yn.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"})})),rF=r((e,t)=>Yn.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:Yn.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"})})),iF=r((e,t)=>Yn.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:Yn.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"})})),oF=r((e,t)=>Yn.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:Yn.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"})})),aF=r((e,t)=>Yn.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:Yn.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"})})),sF=r((e,t)=>Yn.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:Yn.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"})})),lF=r((e,t)=>Yn.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:Yn.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 uF=function(e){return e.Sorting="sorting",e.Searching="searching",e.Selections="selections",e.AdjusterHeaderSize="adjustHeaderSize",e}({});const cF="/qListObjectDef",dF=({headerData:e,translator:t,menuAvailabilityFlags:n,setOpen:r,sortFromMenu:i,interactions:o,embedListbox:a,fieldInstance:s,selectionActionsEnabledStatus:l,anchorRef:u,focusColumnAdjuster:c,setActiveFieldCallback:d,expandOrCollapseArgs:p})=>{const f=[];if(n[uF.Sorting]){const{isActivelySorted:n,sortDirection:o}=e,{ascendingEnabled:a,descendingEnabled:s}=(({isActivelySorted:e,sortDirection:t,isPivot:n,isSortedByFirstMeasure:r})=>{let i=!n&&!e||"D"===t,o=!n&&!e||"A"===t;return r&&(i=!1,o=!1),{ascendingEnabled:i,descendingEnabled:o}})(e);f.push([{groupHeading:t.get("NebulaTableUtils.MenuGroupLabel.Sorting"),items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortAscending"),onClick:async e=>{e.stopPropagation(),await(i?.(e,"A")),r(!1)},icon:Kj,enabled:a,isActive:!!n&&"A"===o,autoFocus:a},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortDescending"),onClick:async e=>{e.stopPropagation(),await(i?.(e,"D")),r(!1)},icon:Zj,enabled:s,isActive:!!n&&"D"===o,autoFocus:!a&&s}]}])}if(e.isCyclic&&d){const t=[];t.push([{items:[{id:1,itemTitle:e.groupDimensionLabels[e.groupDimensionPos],enabled:!0,icon:nF,subMenus:[[{items:e.groupDimensionLabels.map((t,n)=>({id:n+1,itemTitle:t,onClick:e=>{e.stopPropagation(),r(!1),d(n)},enabled:!0,icon:Qj,isActive:e.groupDimensionPos===n}))}]]}]}]),t.length>0&&f.push(...t)}if(e.isDim&&o?.select){const i=[];n[uF.Searching]&&i.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Search"),onClick:e=>{e.stopPropagation(),r(!1),a()},icon:rF,enabled:!0}]}]),!e.isLocked&&n[uF.Selections]&&i.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Selections"),icon:lF,enabled:!!s,subMenus:[[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAll"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectAll(cF))},icon:iF,enabled:l.canSelectAll},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectPossible"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectPossible(cF))},icon:sF,enabled:l.canSelectPossible},{id:3,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAlternative"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectAlternative(cF))},icon:oF,enabled:l.canSelectAlternative},{id:4,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectExcluded"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectExcluded(cF))},icon:aF,enabled:l.canSelectExcluded}]}],[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.ClearSelections"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.clearSelections(cF))},icon:Xj,enabled:l.canClearSelections}]}]]}]}]),p&&!p.alwaysFullyExpanded&&f.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Expand"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await p.expandCallback()},icon:tF,enabled:!0},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Collapse"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await p.collapseCallback()},icon:eF,enabled:!0}]}]),i.length>0&&f.push(...i)}return n[uF.AdjusterHeaderSize]&&f.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.AdjustColumnSize"),onClick:e=>{e.stopPropagation(),e.preventDefault(),r(!1),c?.(u)},icon:Jj,enabled:!0}]}]),f},pF=({open:e,setOpen:t,anchorRef:n,headerData:r,translator:i,interactions:o,menuAvailabilityFlags:a,shouldShowMenuIcon:s=!0,sortRelatedArgs:l,searchRelatedArgs:c,selectionRelatedArgs:d,adjustHeaderSizeRelatedArgs:p,expandOrCollapseArgs:f,model:h,direction:g="ltr",isPagination:v,isAccessibleHeader:y,iconSize:b=GA})=>{const x=u(null),S=bj({translator:i}),{qLibraryId:w,fieldId:C,headTextAlign:E}=r,I=d?.app,{fieldInstance:D,selectionActionsEnabledStatus:P}=Yj({open:e,headerData:r,app:I,qStateName:d?.qStateName}),M=(({model:e,headerData:t})=>{if(e&&"setActiveField"in e&&void 0!==t.dimensionInfoIndex){const n=t.dimensionInfoIndex;return async t=>{try{await e.setActiveField("/qHyperCubeDef",n,t)}catch(e){console.error(e)}}}return null})({model:h,headerData:r}),R=(({qLibraryId:e,fieldId:t,searchRelatedArgs:n,selectionRelatedArgs:r,direction:i,onPopoverClose:o})=>m(()=>{const a=e?{qLibraryId:e,type:"dimension"}:t;if(n?.embed){const{embed:e,listboxRef:t}=n;e.__DO_NOT_USE__.popover(t.current,a,{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"rtl"===i?"right":"left"},sortCriteria:n.sortCriteria,stateName:r?.qStateName,direction:i,onPopoverClose:o})}},[e,t,n,r?.qStateName,i,o]))({qLibraryId:w,fieldId:C,searchRelatedArgs:c,selectionRelatedArgs:d,direction:g}),k=m(e=>{e.stopPropagation(),t(!1)},[t]),L=m(e=>{e.stopPropagation(),t(e=>!e)},[t]);return o.active?Yn.jsxs(Ij,{rightAligned:"right"===E,shouldShowMenuIcon:s,className:"nebula-table-utils-head-menu-wrapper",onClick:!1===y?L:void 0,ref:x,isAccessibleHeader:y,children:[s?Yn.jsx(Dj,{height:b,className:UA,"data-testid":UA,isInteractionsActive:o.active??!1,children:Yn.jsx(Ej,{})}):null,Yn.jsx(Bj,{open:e,anchorEl:!1===y?x.current:n.current,onClose:k,menuGroups:dF({headerData:r,translator:S,menuAvailabilityFlags:a,setOpen:t,...l,embedListbox:R,interactions:o,fieldInstance:D,selectionActionsEnabledStatus:P,anchorRef:n,focusColumnAdjuster:p?.focusColumnAdjuster,setActiveFieldCallback:M,expandOrCollapseArgs:f}),direction:g,isPagination:v})]}):null},fF=e=>e.isDark?{background:e.color,borderColor:jO.DARK_MODE_BORDER,color:jO.DARK_MODE_TEXT,disabledColor:jO.DARK_MODE_DISABLED,iconColor:jO.DARK_MODE_TEXT}:{background:e.color,borderColor:jO.BORDER_MEDIUM,color:jO.TEXT,disabledColor:jO.DISABLED},hF=Ta(xl,{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}`})),mF=Ta(xd,{shouldForwardProp:e=>"footerStyle"!==e})(({footerStyle:e,theme:t})=>({background:"inherit",marginRight:t.spacing(1),color:e.color,"& .MuiNativeSelect-icon, .MuiNativeSelect-select":{color:e.iconColor}})),gF=Ta(kl,{shouldForwardProp:e=>"disabledCondition"!==e&&"footerStyle"!==e})(({disabledCondition:e,footerStyle:t,theme:n})=>({color:e?t.disabledColor:t.color,cursor:e?"default":"pointer",marginLeft:n.spacing(1)})),vF=Ta(_s)(({theme:e})=>({color:"inherit",margin:e.spacing(0,1,0,1)})),yF=({children:e,footerContainer:t,interactions:n,theme:r,paginationNeeded:i=!0})=>{const o=y(()=>fF(r.background),[r]);if(!n.active)return null;const a=i?Yn.jsx(hF,{footerStyle:o,children:e}):null;return t?E.createPortal(e,t):a},bF=d({}),xF=()=>i(bF),SF=({children:e,direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:i,isSelectionMode:o,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:u,keyboard:c,translator:d,theme:p,interactions:f,rect:h,layout:m,visibilityThreshold:g})=>{const v=(e=>!e.enabled||e.active)(c)?0:-1,b=y(()=>fF(p.background),[p]),x=i?i.getBoundingClientRect().width:h.width,S=bj({translator:d}),w=y(()=>({direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:i,isSelectionMode:o,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:u,keyboard:c,translator:S,theme:p,interactions:f,rect:h,layout:m,footerStyle:b,tabIndex:v,width:x,visibilityThreshold:g}),[t,n,r,i,o,a,s,l,u,c,S,p,f,h,m,b,v,x,g]);return Yn.jsx(bF.Provider,{value:w,children:e})};let wF=function(e){return e.FirstPage="FirstPage",e.LastPage="LastPage",e.NextPage="NextPage",e.PreviousPage="PreviousPage",e}({}),CF=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 EF=r((e,t)=>Yn.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:Yn.jsx("path",{d:"m7 8 4.5 4.5L10 14 4 8l6-6 1.5 1.5z"})})),IF=r((e,t)=>Yn.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:Yn.jsx("path",{d:"m12 2 1.5 1.5L9 8l4.5 4.5L12 14 6 8zM4 2v12H2V2z"})})),DF=r((e,t)=>Yn.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:Yn.jsx("path",{d:"m3.5 2 6 6-6 6L2 12.5 6.5 8 2 3.5zM14 2v12h-2V2z"})})),PF={FirstPage:IF,PreviousPage:EF,NextPage:qj,LastPage:DF,FirstPageRTL:DF,PreviousPageRTL:qj,NextPageRTL:EF,LastPageRTL:IF},MF=({disabledCondition:e,pageNumber:t,type:n})=>{const{direction:r,footerStyle:i,handleChangePage:o,translator:a,interactions:s,tabIndex:l}=xF(),u=n.concat("rtl"===r?"RTL":""),c=PF[u];return{styledProps:{footerStyle:i,disabledCondition:e,size:"small","data-testid":"pagination-action-icon-button","aria-disabled":e,"aria-label":a.get(`NebulaTableUtils.Pagination.${n}`),title:s.passive?a.get(`NebulaTableUtils.Pagination.${n}`):void 0,tabIndex:l,onClick:e?void 0:()=>{o(t)}},IconComponent:c}},RF=()=>{const{pageInfo:e,width:t,interactions:n,visibilityThreshold:r}=xF(),i=0===e.page,{IconComponent:o,styledProps:a}=MF({type:wF.FirstPage,disabledCondition:i,pageNumber:0});return t<=(r?.firstPage||CF.FirstPage)?null:Yn.jsx(gF,{...a,disabled:!n.active,children:Yn.jsx(o,{height:GA})})},kF=(e,t,n=!1)=>{n&&e.key===KA.Tab&&!e.shiftKey&&(Tq(e),((e,t,n)=>{const r=e.closest(".qv-object-wrapper")?.querySelector(".sel-toolbar-confirm")?.parentElement??document.querySelector("#qv-selection-toolbar-popover .sel-toolbar-confirm")?.parentElement;r?r.focus():t.focusSelection?.(n)})(e.target,t,!1))},LF=()=>{const{pageInfo:e,keyboard:t,totalPages:n,isSelectionMode:r,width:i,interactions:o,visibilityThreshold:a}=xF(),s=e.page>=n-1,{IconComponent:l,styledProps:u}=MF({type:wF.LastPage,disabledCondition:s,pageNumber:n-1}),c=t.enabled?e=>{kF(e,t,r)}:void 0;return i<=(a?.lastPage||CF.LastPage)?null:Yn.jsx(gF,{...u,onKeyDown:c,disabled:!o.active,children:Yn.jsx(l,{height:GA})})},AF=()=>{const{pageInfo:e,keyboard:t,totalPages:n,isSelectionMode:r,width:i,interactions:o}=xF(),a=e.page>=n-1,{IconComponent:s,styledProps:l}=MF({type:wF.NextPage,disabledCondition:a,pageNumber:e.page+1}),u=!(i>CF.FirstPage&&i>CF.LastPage)&&t.enabled?e=>{kF(e,t,r)}:void 0;return Yn.jsx(gF,{...l,onKeyDown:u,disabled:!o.active,children:Yn.jsx(s,{height:GA})})},OF=()=>{const{pageInfo:e,interactions:t}=xF(),n=0===e.page,{IconComponent:r,styledProps:i}=MF({type:wF.PreviousPage,disabledCondition:n,pageNumber:e.page-1});return Yn.jsx(gF,{...i,disabled:!t.active,children:Yn.jsx(r,{height:GA})})},TF=()=>{const{translator:e,width:t,pageInfo:n,totalRowCount:r,visibilityThreshold:i}=xF(),{page:o,rowsPerPage:a}=n;if(t<=(i?.displayedRowsLabel||CF.DisplayedRowsLabel))return null;const s=e.get("NebulaTableUtils.Pagination.DisplayedRowsLabel",[`${o*a+1} - ${Math.min((o+1)*a,r)}`,r.toString()]);return Yn.jsx(vF,{variant:"caption",dir:"ltr",children:s})},qF=({name:e,value:t,options:n,handleChange:r})=>{const{layout:i,footerStyle:o,translator:a,tabIndex:s,interactions:l}=xF(),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 Yn.jsxs(Yn.Fragment,{children:[Yn.jsxs(vF,{variant:"caption",id:p,children:[c,":"]}),Yn.jsx(mF,{footerStyle:o,size:"small",native:!0,value:t,onChange:r,inputProps:f,disabled:!l.active,children:n})]})},_F=()=>{const{pageInfo:e,isSelectionMode:t,totalColumnCount:n,width:r,handleChangeRowsPerPage:i,visibilityThreshold:o}=xF();if(!(!!e.rowsPerPageOptions?.length&&!t&&r>(o?.rowsPerPage||CF.RowsPerPage)&&n<=100)||void 0===e.rowsPerPageOptions)return null;const a=Yn.jsx(Yn.Fragment,{children:e.rowsPerPageOptions.map(e=>Yn.jsx("option",{value:e,children:e},e))});return Yn.jsx(qF,{name:"RowsPerPage",value:e.rowsPerPage,options:a,handleChange:e=>{i?.(+e.target.value)}})},NF=1e3,jF="…",FF=({totalPages:e,page:t})=>{const n=Math.min(e,NF),r=n<e&&t>500,i=r?Math.min(500+t,e):n,o=r?Math.max(0,i-NF):0,a=Array.from(Array(n).keys()).map(e=>{const t=e+o;return Yn.jsx("option",{value:t,children:t+1},t)});return o>0&&a.unshift(Yn.jsx("option",{value:jF,disabled:!0,children:jF},"startMoreOptions")),i<e-1&&a.push(Yn.jsx("option",{value:jF,disabled:!0,children:jF},"endMoreOptions")),Yn.jsx(Yn.Fragment,{children:a})},zF=()=>{const{pageInfo:e,width:t,totalPages:n,handleChangePage:r,visibilityThreshold:i}=xF(),{page:o}=e;if(t<=(i?.selectPage||CF.SelectPage))return null;const a=Yn.jsx(FF,{totalPages:n,page:o});return Yn.jsx(qF,{name:"SelectPage",value:o,options:a,handleChange:e=>{r(+e.target.value)}})};var WF=x(e=>Yn.jsxs(SF,{...e,children:[Yn.jsx(_F,{}),Yn.jsx(zF,{}),Yn.jsx(TF,{}),Yn.jsx(RF,{}),Yn.jsx(OF,{}),Yn.jsx(AF,{}),Yn.jsx(LF,{})]}));const $F=e=>Yn.jsx(yF,{...e,children:Yn.jsx(WF,{...e})}),HF=d({}),VF=()=>i(HF),BF=({rect:e,pageInfo:t,qPivotDataPages:n,updatePageInfo:r,direction:i,children:o})=>{const a=y(()=>({rect:e,pageInfo:t,qPivotDataPages:n,updatePageInfo:r,direction:i}),[e,t,n,r,i]);return Yn.jsx(HF.Provider,{value:a,children:o})},GF=d({}),UF=()=>i(GF),YF=({app:e,model:t,theme:n,embed:r,keyboard:i,translator:o,interactions:a,env:s,children:l})=>{const u=y(()=>({model:t,app:e,interactions:a,embed:r,theme:n,keyboard:i,env:s,translator:o}),[e,a,t,r,n,i,s,o]);return Yn.jsx(GF.Provider,{value:u,children:l})},KF=d({}),XF=()=>i(KF),JF=({children:e,...t})=>Yn.jsx(KF.Provider,{value:t,children:e}),ZF=()=>{const{text:e,fontFamily:t,fontSize:n,justifyContent:r,alignItems:i,height:o}=(()=>{const{theme:e,translator:t}=UF(),{layoutService:n}=XF(),r=e.getStyle("","","fontFamily")??kN;return n.hasData?n.hasLimitedData?{text:t.get("SNPivotTable.LimitedData"),fontSize:"13px",fontFamily:r,alignItems:"center",height:"22px"}:{}:{text:t.get("SNPivotTable.NoData"),fontSize:"16px",fontFamily:r,justifyContent:"center",alignItems:"center",height:"100%"}})();return void 0===e?null:Yn.jsx("div",{style:{display:"flex",justifyContent:r,alignItems:i,width:"100%",height:o},children:Yn.jsx("span",{style:{...FN,fontFamily:t,fontSize:n,fontStyle:"italic",color:"#7b7a78"},children:e})})},QF="/qHyperCubeDef",ez=-1,tz="PSEUDO-DIM",nz=e=>e===ez?tz:(({cId:e})=>e??b_())(e),rz=({layoutService:e,visibleLeftDimensionInfos:t,cell:n,colIdx:r})=>{n&&(n.canBeResized=!0,n.colIdx=n.colIdx||r,n.dimensionInfoIndex===ez?n.columnWidthLocation=lN.Measures:n.isLeftDimension?n.columnWidthLocation=lN.Dimension:t.at(-1)===ez?n.columnWidthLocation=lN.Measures:e.hasPseudoDimOnLeft&&(n.columnWidthLocation=lN.Pivot))},iz=(e,t,n,r)=>{const i=nz(n),o=e.getDimensionInfoIndex(n),a=e.isLeftDimension(o);return n===ez?{id:i,colIdx:-1,label:"",sortDirection:"A",fieldId:"",isLocked:!1,isDim:!1,isCyclic:!1,groupDimensionPos:0,groupDimensionLabels:[],headTextAlign:"left",dimensionInfoIndex:o,canBeResized:!1,isLeftDimension:a,isLastDimension:r,columnWidthLocation:lN.Measures,isPivot:!0,qEffectiveDimensionName:void 0}:{id:i,colIdx:0,label:n.qFallbackTitle??"",qReverseSort:n.qReverseSort,sortDirection:n.qSortIndicator&&"N"!==n.qSortIndicator?n.qSortIndicator:"A",qLibraryId:n.qLibraryId,fieldId:n.qGroupFieldDefs[n.qGroupPos],isLocked:n.qLocked??!1,columnWidth:n.columnWidth,qApprMaxGlyphCount:n.qApprMaxGlyphCount,isDim:!0,isCyclic:n.qGrouping===tO.Cyclic,groupDimensionPos:n.qGroupPos,groupDimensionLabels:n.qGroupFallbackTitles,headTextAlign:"left",dimensionInfoIndex:o,canBeResized:!1,isLeftDimension:a,isLastDimension:r,columnWidthLocation:lN.Dimension,isPivot:!0,isSortedByFirstMeasure:t.isSortedByFirstMeasure,qEffectiveDimensionName:n.qEffectiveDimensionName}},oz=({layoutService:e,effectivePropertiesService:t,lastRow:n,lastCol:r})=>{let i=r;var o;n.length>0&&(i=(o=r).at(-1)===ez?o.slice(0,-1):o);const a=i.length+(n.length?1:0),s=Math.max(1,n.length),l=((e,t)=>Array(e).fill(null).map(()=>Array.from({length:t},()=>null)))(a,s);return n.forEach((n,r,i)=>{const o=r===i.length-1;l[a-1][r]=iz(e,t,n,o)}),i.forEach((n,r,i)=>{const o=r===i.length-1;l[r][s-1]=iz(e,t,n,o)}),l},az=(e,t,n,r)=>{const i=((e,t,n,r)=>{let i;return i=0===n.length||n.includes(ez)?oz({layoutService:e,effectivePropertiesService:t,lastRow:r,lastCol:n}):(e=>e[0].map((t,n)=>e.map(e=>e[n])))(oz({layoutService:e,effectivePropertiesService:t,lastRow:n,lastCol:r})),e.isIndentModeEnabled&&i[i.length-1].length>1&&(i[i.length-1]=[i.at(-1),...new Array(i[0]?i[0].length-1:0).fill(null)]),i.length&&i.at(-1)?.forEach((t,n)=>{Array.isArray(t)?t.forEach((t,n)=>{rz({layoutService:e,visibleLeftDimensionInfos:r,cell:t,colIdx:n})}):rz({layoutService:e,visibleLeftDimensionInfos:r,cell:t,colIdx:n})}),i})(e,t,n,r);return{data:i,size:{x:i[0]?.length??0,y:i.length}}};var sz={fromSearchString:function(e){if(!e)return[];"?"===e[0]&&(e=e.substr(1));const t=[];return e.split("&").forEach(e=>{if(!e)return;const n=e.indexOf("=");let r,i="",o=!1;-1===n?r=e:(r=e.slice(0,n),i=e.slice(n+1),o=!0),t.push(function(e,t,n){return{key:uz(e),value:uz(t.replace(/%2B/g,"shouldNotDecodePlus")),useEqualSign:n}}(r,i,o))}),t}},lz=sz;function uz(e){try{return decodeURIComponent(e)}catch{return e}}function cz(e){if(!(this instanceof cz))throw new Error("Url needs to be called with the new keyword");if(!e)throw new Error("Url needs a string to operate on");const t=function(e){const t={authorityAndPath:"",search:"",hash:""};let n=e.indexOf("#");-1!==n&&(t.hash=e.substr(n),e=e.substr(0,n));n=e.indexOf("?"),-1!==n&&(t.search=e.substr(n),e=e.substr(0,n));return t.authorityAndPath=e,t}(e);Object.defineProperties(this,{authorityAndPath:{value:t.authorityAndPath},search:{value:t.search},hash:{value:t.hash},searchParams:{get:()=>lz.fromSearchString(t.search)}})}function dz(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")}cz.encodeAuthorityAndPath=function(e){return encodeURI(e).replace(/%5B/gi,"[").replace(/%5D/gi,"]").replace(/%25/gi,"%")},cz.encodeSearchParams=function(e){let t,n="";for(let r=0;r<e.length;r++)t=e[r],n+=0===r?"?":"&",n+=dz(t.key),t.value?n+=`=${dz(t.value)}`:n+=t.useEqualSign?"=":"";return n};var pz=cz;var fz,hz=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}},mz=class{decode(e){let t="";const n=new hz(e);let r;for(;n.hasNext();)r=this.decodeCharacter(n),t+=null!=r?r:n.next();return t}decodeCharacter(e){return e.next()}},gz=e=>e>=0&&e<=1114111,vz=e=>e.match(/[\s]/),yz=class extends mz{decodeCharacter(e){e.mark();const t=e.next();let n,r,i;if(null==t||"\\"!==t)return e.reset(),null;const o=e.next();if(null==o)return e.reset(),null;switch(o){case"\r":e.peek("\n")&&e.next();case"\n":case"\f":case"\0":return this.decodeCharacter(e)}if("NaN"===parseInt(o,16))return o;for(n=o,r=0;r<5&&(i=e.next(),null!=i&&!vz(i));r++){if("NaN"===parseInt(i,16)){e.pushback(i);break}n+=i}const a=parseInt(n,16);return gz(a)?String.fromCharCode(a):"�"}},bz=class e{constructor(e,t){this._key=e,this._value=t}getKey(){return this._key}getValue(){return this._value}equals(t){return t instanceof e&&(this._key===t._key&&this._value===t._value)}static newInstanceIfNeeded(){let t,n,r=arguments[0];return"string"==typeof arguments[1]?(t=arguments[1],n=r.length):(n=arguments[1],t=arguments[2]),t&&r?(r.length>n&&(r=r.substr(0,n)),new e(r,t)):null}},xz=class e{setValue(e){this._nextMap=null,this._value=e}getNextNode(e){return this._nextMap?this._nextMap[e]:null}put(t,n,r){let i,o;if(t.length===n)return o=this._value,this.setValue(r),o;const a=t.charAt(n);return this._nextMap?(i=this._nextMap[a],i||(i=new e,this._nextMap[a]=i)):(this._nextMap={},i=new e,this._nextMap[a]=i),i.put(t,n+1,r)}get(e,t){if(e.length<=t)return this._value;const n=this.getNextNode(e.charAt(t));return n?n.get(e,t+1):null}getLongestMatch(e,t){if(e.length<=t)return bz.newInstanceIfNeeded(e,this._value);const n=this.getNextNode(e.charAt(t));if(!n)return bz.newInstanceIfNeeded(e,t,this._value);const r=n.getLongestMatch(e,t+1);return r||bz.newInstanceIfNeeded(e,t,this._value)}},Sz=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 xz);const n=this.root.put(e,0,t);return n||(e.length>this.maxKeyLen&&(this.maxKeyLen=e.length),this.size++,null)}},wz=(()=>{const e=[],t=[],n=new Sz;let r,i,o;for(r in e["""]="34",e["&"]="38",e["<"]="60",e[">"]="62",e[" "]="160",e["¡"]="161",e["¢"]="162",e["£"]="163",e["¤"]="164",e["¥"]="165",e["¦"]="166",e["§"]="167",e["¨"]="168",e["©"]="169",e["ª"]="170",e["«"]="171",e["¬"]="172",e["­"]="173",e["®"]="174",e["¯"]="175",e["°"]="176",e["±"]="177",e["²"]="178",e["³"]="179",e["´"]="180",e["µ"]="181",e["¶"]="182",e["·"]="183",e["¸"]="184",e["¹"]="185",e["º"]="186",e["»"]="187",e["¼"]="188",e["½"]="189",e["¾"]="190",e["¿"]="191",e["À"]="192",e["Á"]="193",e["Â"]="194",e["Ã"]="195",e["Ä"]="196",e["Å"]="197",e["Æ"]="198",e["Ç"]="199",e["È"]="200",e["É"]="201",e["Ê"]="202",e["Ë"]="203",e["Ì"]="204",e["Í"]="205",e["Î"]="206",e["Ï"]="207",e["Ð"]="208",e["Ñ"]="209",e["Ò"]="210",e["Ó"]="211",e["Ô"]="212",e["Õ"]="213",e["Ö"]="214",e["×"]="215",e["Ø"]="216",e["Ù"]="217",e["Ú"]="218",e["Û"]="219",e["Ü"]="220",e["Ý"]="221",e["Þ"]="222",e["ß"]="223",e["à"]="224",e["á"]="225",e["â"]="226",e["ã"]="227",e["ä"]="228",e["å"]="229",e["æ"]="230",e["ç"]="231",e["è"]="232",e["é"]="233",e["ê"]="234",e["ë"]="235",e["ì"]="236",e["í"]="237",e["î"]="238",e["ï"]="239",e["ð"]="240",e["ñ"]="241",e["ò"]="242",e["ó"]="243",e["ô"]="244",e["õ"]="245",e["ö"]="246",e["÷"]="247",e["ø"]="248",e["ù"]="249",e["ú"]="250",e["û"]="251",e["ü"]="252",e["ý"]="253",e["þ"]="254",e["ÿ"]="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["¬in"]="8713",e["&ni"]="8715",e["&prod"]="8719",e["&sum"]="8721",e["&minus"]="8722",e["&lowast"]="8727",e["&radic"]="8730",e["&prop"]="8733",e["&infin"]="8734",e["&ang"]="8736",e["&and"]="8743",e["&or"]="8744",e["&cap"]="8745",e["&cup"]="8746",e["&int"]="8747",e["&there4"]="8756",e["&sim"]="8764",e["&cong"]="8773",e["&asymp"]="8776",e["&ne"]="8800",e["&equiv"]="8801",e["&le"]="8804",e["&ge"]="8805",e["&sub"]="8834",e["&sup"]="8835",e["&nsub"]="8836",e["&sube"]="8838",e["&supe"]="8839",e["&oplus"]="8853",e["&otimes"]="8855",e["&perp"]="8869",e["&sdot"]="8901",e["&lceil"]="8968",e["&rceil"]="8969",e["&lfloor"]="8970",e["&rfloor"]="8971",e["&lang"]="9001",e["&rang"]="9002",e["&loz"]="9674",e["&spades"]="9824",e["&clubs"]="9827",e["&hearts"]="9829",e["&diams"]="9830",e)"function"!=typeof e[r]&&e.hasOwnProperty(r)&&(t[e[r]]=r);for(i in t)"function"!=typeof t[i]&&t.hasOwnProperty(i)&&(o=t[i].toLowerCase().substr(1),n.put(o,String.fromCharCode(i)));return n})(),Cz=class extends mz{decodeCharacter(e){let t;e.mark();const n=e.next();if(null==n||"&"!==n)return e.reset(),null;const r=e.next();if(null==r)return e.reset(),null;if("#"===r){if(t=this._getNumericEntity(e),null!=t)return t}else if(r.match(/[A-Za-z]/)&&(e.pushback(r),t=this._getNamedEntity(e),null!=t))return t;return e.reset(),null}_getNamedEntity(e){let t,n,r,i="";for(t=Math.min(e.remainder().length,wz.getMaxKeyLength()),r=0;r<t;r++)i+=e.next().toLowerCase();const o=wz.getLongestMatch(i);if(null==o)return null;for(e.reset(),e.next(),t=o.getKey().length,n=0;n<t;n++)e.next();return e.peek(";")&&e.next(),o.getValue()}_getNumericEntity(e){const t=e.peek();return null==t?null:"x"===t||"X"===t?(e.next(),this._parseHex(e)):this._parseNumber(e)}_parseHex(e){let t,n="";for(;e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,16))){if(";"===t){e.next();break}break}n+=t,e.next()}const r=parseInt(n,16);return!Number.isNaN(+r)&&gz(r)?String.fromCharCode(r):null}_parseNumber(e){let t,n="";for(;e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,10))){if(";"===t){e.next();break}break}n+=t,e.next()}const r=parseInt(n,10);return!Number.isNaN(+r)&&gz(r)?String.fromCharCode(r):null}},Ez=class extends mz{decodeCharacter(e){e.mark();const t=e.next();let n,r,i,o;if(null==t)return e.reset(),null;if("%"!==t)return e.reset(),null;for(n="",r=0;r<2;r++)i=e.nextHex(),null!=i&&(n+=i);return 2===n.length&&(o=parseInt(n,16),gz(o))?String.fromCharCode(o):(e.reset(),null)}},Iz=/^data:(?<!\s)\s*(image\/[\w+-.]+)(?<!\s)\s*(;.*?){0,1}(?<!\s)\s*,(.*)/i,Dz=5e6,Pz=5e5,Mz=(e,t)=>{const{maxByteSizeSvg:n=Pz,maxByteSizeImage:r=Dz}=t??{},{mimeType:i,encoding:o,data:a}=(e=>{const[,t,n,r]=Iz.exec(e.trim())??[];return{encoding:n,data:r,mimeType:t?.toLocaleLowerCase()}})(e);if(!a)return!0;const s=((e,t,n)=>{const r={type:e};if(t?.includes(";base64"))try{return new Blob([atob(n)],r).size}catch{return new Blob([n],r).size}return"image/svg+xml"===e?new Blob([n],r).size:0})(i,o,a);return"image/svg+xml"===i?s<=n:s<=r};"undefined"!=typeof document&&(fz=document.createElement("div"));var Rz=Array.prototype.indexOf,kz=[",",".","_"," "],Lz=[",",".","-","_"," "],Az={width:["%"],height:["%"]},Oz={default:["-"," ","%"],color:["#"," ","(",")"],image:["(",")",":","/","?","&","-",".",'"',"="," "]},Tz={background:["(",")",":","%","/","?","&","-"," ",".",'"',"=","#"],"background-image":Oz.image,"background-color":Oz.color,"border-color":Oz.color,"border-image":Oz.image,color:Oz.color,icon:Oz.image,"list-style-image":Oz.image,"outline-color":Oz.color},qz={attr_name:["^on[a-z]{1,}","style","href","src"],attr_val:["javascript:","data:"],css_key:["behavior","-moz-behavior","-ms-behavior"],css_val:["expression"]};function _z(e,t,n){let r;if(t){if(Rz)return Rz.call(t,e,n);for(r=t.length,n=n?n<0?Math.max(0,r+n):n:0;n<r;n++)if(n in t&&t[n]===e)return n}return-1}function Nz(e){if(null==e)return"";let t="";const n=document.createTextNode(e);return fz.appendChild(n),t=fz.innerHTML,fz.removeChild(n),t}function jz(e,t,n){let r,i,o,a,s,l,u,c,d;for(e=zz(e).toLowerCase(),t=zz(t),o=0;o<qz.attr_name.length;o++)if(e.match(qz.attr_name[o]))throw new Error(`Unsafe attribute name used: ${e}`);for(o=0;o<qz.attr_val.length;o++)if(t.toLowerCase().match(qz.attr_val[o]))throw new Error(`Unsafe attribute value used: ${t}`);if(r=Az[e],r||(r=Lz),i="",!n){for(a=0;a<e.length;a++){if(s=e.charAt(a),!s.match(/[a-zA-Z\-0-9]/))throw new Error("Invalid attribute name specified");i+=s}i+='="'}for(l=0;l<t.length;l++)u=t.charAt(l),c=t.charCodeAt(l),!u.match(/[a-zA-Z0-9]/)&&_z(u,r)<0?(d=c.toString(16),i+=`&#x${d};`):i+=u;return n||(i+='"'),i}function Fz(e,t,n){let r,i,o,a,s,l,u,c,d,p;if(e=zz(e).toLowerCase(),t=zz(t),_z(e,qz.css_key)>=0)throw new Error(`Unsafe property name used: ${e}`);for(r=0;r<qz.css_val.length;r++)if(t.toLowerCase().indexOf(qz.css_val[r])>=0)throw new Error(`Unsafe property value used: ${t}`);if(i=Tz[e],i||(i=Oz.default),o="",!n){for(a=0;a<e.length;a++){if(s=e.charAt(a),!s.match(/[a-zA-Z-]/))throw new Error("Invalid Property Name specified");o+=s}o+=": "}for(l=0;l<t.length;l++)u=t.charAt(l),c=t.charCodeAt(l),!u.match(/[a-zA-Z0-9]/)&&_z(u,i)<0?(d=c.toString(16),p="000000".substr(d.length),o+=`\\${p}${d}`):o+=u;return o}function zz(e,t){let n,r,i,o,a=!1;if(null===e)return null;n=e,r=e,i=0;const s=[new Cz,new Ez,new yz];for(;!a;){r=n;for(let e=0;e<s.length;e++)o=s[e].decode(n),o!==n&&(i++,n=o);r!==n||(a=!0)}if(t&&i>1)throw new Error("Attack Detected - Multiple/Double Encodings used in input");return n}var Wz=[];for(let e=0;e<255;e++)Wz[e]=e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122?null:e.toString(16);var $z={html:e=>Nz(e.unsafe),css(e){let t,n=[];const r=[],i={};let o="";for(t in e.map?n=e.map:n[e.name]=e.unsafe,n)"function"!=typeof n[t]&&n.hasOwnProperty(t)&&(r[t]=Fz(t,n[t],!0),o+=Fz(t,n[t],!0),i[t]=r[t]);return e.map?i:o},attr(e){let t=[];const n=[],r={};let i="";e.map?t=e.map:t[e.name]=e.unsafe;for(const e in t)"function"!=typeof t[e]&&t.hasOwnProperty(e)&&(n[e]=jz(e,t[e],!0),i+=jz(e,t[e],!0),r[e]=n[e]);return e.map?r:i}};function Hz(e,t){throw new Error(t)}var Vz={canonicalize:zz,encode:function(){const e={context:"html",unsafe:null,name:null,map:null,setter:null,strict:!0};return 1===arguments.length&&"object"==typeof arguments[0]?function(){let e,t,n;const r=arguments[0]||{};let i=1;const o=arguments.length;for(;i<o;i++)if(null!=(e=arguments[i]))for(t in e)if(e.hasOwnProperty(t)){if(n=e[t],r===n)continue;void 0!==n&&(r[t]=n)}}(e,arguments[0]):(e.context=arguments[0],2===arguments.length?"html"===e.context?e.unsafe=arguments[1]:"attr"!==e.context&&"css"!==e.context||(e.map=arguments[1]):(e.name=arguments[2],e.unsafe=arguments[1])),"html"===e.context?$z.html(e):"css"===e.context?(null!=e.map&&"object"!=typeof e.map&&Hz(this,"Invalid parameter type"),$z.css(e)):"attr"===e.context?(null!=e.map&&"object"!=typeof e.map&&Hz(this,"Invalid parameter type"),$z.attr(e)):void Hz(this,"Invalid parameter type")},encodeForAttr:jz,encodeForAttr2:function(e){return jz("nonsens",e,!0)},encodeForCSS:Fz,encodeForHref:function(e){zz(e),0!==e.search("[a-zA-Z0-9]+:")&&(e=`http://${e}`);const t=new pz(e),n=pz.encodeAuthorityAndPath(t.authorityAndPath),r=t.searchParams;e=n+pz.encodeSearchParams(r)+t.hash;const i=decodeURI(e).toLowerCase();if(-1!==i.indexOf("javascript:"))throw new Error("Attack Detected - Javascript in input");if(-1!==i.indexOf("data:"))throw new Error("Attack Detected - data in input");return e},encodeForJS:function(e,t){let n,r,i,o,a,s;for(t||(t=kz),s="",n=0;n<e.length;n++)i=e.charAt(n),o=e.charCodeAt(n),_z(i,t)>=0||null==Wz[o]?s+=i:(r=o.toString(16),o<256?(a="00".substr(r.length),s+=`\\x${a}${r.toUpperCase()}`):(a="0000".substr(r.length),s+=`\\u${a}${r.toUpperCase()}`));return s},encodeForHTML:Nz,encodeForURL:function(e,t){let n="";return t&&(t.match(/^[A-Za-z\-0-9]{1,}$/)?n+=zz(t).toLowerCase():Hz(this,"Illegal Attribute Name Specified"),n+='="'),n+=encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A"),n+=t?'"':"",n},isSafeDataURL:Mz,validateURI:function(e){if(""===e||function(e){if("canParse"in URL)return URL.canParse(e);try{return new URL(e),!0}catch{return!1}}(e))return!1;const t=e.replace(/%2E/gi,".");if(t.match(/[#&=: ]/))return!1;const n=function(e){let t=e,n="";for(;t.length>0;)if(t.startsWith("../")||t.startsWith("./"))t=t.replace(/^\.\.?\//,"");else if(t.startsWith("/./"))t=t.replace(/^\/\.\//,"/");else if("/."===t)t="/";else if(t.startsWith("/../")){t=t.replace(/^\/\.\.\//,"/");const e=n.lastIndexOf("/");-1!==e&&(n=n.slice(0,e))}else if("/.."===t){t="/";const e=n.lastIndexOf("/");-1!==e&&(n=n.slice(0,e))}else if("."===t||".."===t)t="";else{const e=t.match(/^\/?[^/]*/),r=e?e[0]:"";t=t.slice(r.length),n+=r}return n}(t);return""!==n&&"/"!==n&&n}};const Bz=(e,t)=>t.qAttrExps?.qValues?.[e],Gz=(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"}}},Uz=({text:e,url:t,imageSize:n,imagePosition:r,labelStructure:i,imageBox:o,direction:a})=>!r||t&&(t.toLowerCase().includes("javascript:")||!Vz.isSafeDataURL(t))?{type:tN.Text,url:void 0,text:e,labelStructure:i}:{type:tN.Image,url:t||"",text:e,imageSize:n,resolvedImagePosition:Gz(r,a),labelStructure:i,imageBox:o},Yz=(e,t,n,r)=>{if(!e.qMiniChart||!t?.miniChart||!n)return{type:tN.Text,text:r};const{minY:i,maxY:o}=((e,t,n)=>{const r="global"===t.yAxis?.scale,i="zeroCenter"===t.yAxis?.position,o=r?n.qYMin:e.qMiniChart.qMin,a=r?n.qYMax:e.qMiniChart.qMax;if(i){const e=Math.max(Math.abs(o),Math.abs(a));return{minY:-e,maxY:e}}return(e=>"zeroBaseline"===e.yAxis?.position||"bars"===e.type&&"auto"===e.yAxis?.position)(t)?{minY:Math.min(0,o),maxY:Math.max(0,a)}:{minY:o,maxY:a}})(e,t.miniChart,n),a={type:t.miniChart.type,qMatrix:e.qMiniChart.qMatrix,minY:i,maxY:o,showDots:!!t.miniChart.showDots,colors:t.miniChart.colors,colorMin:e.qMiniChart.qMin,colorMax:e.qMiniChart.qMax};return{type:tN.MiniChart,text:r,miniChart:a}},Kz=(e,t,n)=>{const r=Array.isArray(t.qAttrExps)?t.qAttrExps[0]:t.qAttrExps,i=r?.qValues?.[e];if(i){const e=Number.isNaN(+i.qNum)?void 0:`${i.qNum}`;return i.qText||e}return n?.urlPosition===nN.Attribute?void 0:n?.urlLabel},Xz=({labelStructure:e,text:t,url:n})=>{try{if(!n)throw Error("Invalid url");return{type:tN.Link,url:Vz.encodeForHref(n),text:t,labelStructure:e}}catch{return{type:tN.Text,url:void 0,text:t,labelStructure:e}}},Jz=({cell:e,representationProperties:t,attrExprInfoIndex:n,env:r,conditionalColoring:i,miniChartOnMeasure:o,labelStructure:a,getText:s=e=>e.qText,direction:l,enabledFeatures:u})=>{const c=rN(t),d=s(e);return c===tN.Image&&u[tN.Image]&&!r.anything.sense?.isUnsupportedFeature?.("tableImages")?((e,t,n,r,i,o)=>{const{imageSize:a,imagePosition:s,imageSetting:l,imageLabel:u,imageBox:c}=t??{};if("url"===l){const t=Bz(n.imageUrl??-1,e)?.qText;return o&&(o.maskedValue=t??""),Uz({text:r,url:t,imageSize:a,imagePosition:s,labelStructure:o,imageBox:c,direction:i})}if("label"===l){const t=o?o.originalValue:r;if(-1===n.imageLabel)return Uz({text:u||t||"",url:t,imageSize:a,imagePosition:s,labelStructure:o,imageBox:c,direction:i});const l=Bz(n.imageLabel??-1,e)?.qText??r;return Uz({text:l,url:t,imageSize:a,imagePosition:s,labelStructure:o,imageBox:c,direction:i})}return{type:tN.Text,url:void 0,labelStructure:o,text:r}})(e,t,n,d,l,a):c===tN.Link?((e,t,n,r,i)=>{const{urlPosition:o}=t??{};if(o===nN.Attribute){const o=Kz(n.url??-1,e,t);return Xz({labelStructure:r,text:i||o||"",url:o})}if(o===nN.Dimension){const o=Kz(n.urlLabel??-1,e,t)||i;return r&&(r.maskedValue=o),Xz({text:o,labelStructure:r,url:r?.originalValue??i})}return{type:tN.Text,url:void 0,text:i,labelStructure:r}})(e,t,n,a,d):c===tN.Indicator&&u[tN.Indicator]&&!r.anything.sense?.isUnsupportedFeature?.("tableIndicators")?((e,t,n)=>{const{indicator:r}=e??{};return{type:tN.Indicator,url:void 0,text:n,indicator:{applySegmentColors:r?.applySegmentColors,position:r?.position,showTextValues:r?.showTextValues},indicatorConditionalColoring:t}})(t,i,d):c===tN.MiniChart&&u[tN.MiniChart]&&!r.anything.sense?.isUnsupportedFeature?.("qMiniChartDef")?Yz(e,t,o,d):{type:tN.Text,url:void 0,text:d,labelStructure:a}},Zz=(e,t)=>{const n=t.qAttrExps,r=n?.qValues?.[e?.cellForegroundColor??-1]?.qText,i=n?.qValues?.[e?.cellBackgroundColor??-1]?.qText,o=i?Oq(i):null,a=r?Oq(r):null,s=((e,t)=>e||!t?null:kq(t))(a,o);return{color:s??a,background:o}},Qz=(e,t)=>t.qSubNodes.reduce((e,t)=>0===t.qSubNodes.length?e+1:Qz(e,t),e),eW=(e,t,n,r,i,o)=>{const a=i?o.rowsPerPage-n:AN-r;let s=e.qUp+e.qDown;if(i&&0===n){const n=(t+e.qUp)%o.rowsPerPage;s=e.qDown+n}return Math.min(a,Qz(s,e))},tW=({node:e,parent:t,root:n,x:r,y:i,pageY:o,layoutService:a,dimensionInfo:s,attrExprInfoIndex:l,isLeftColumn:u=!0,isIndentModeEnabled:c=!1,indentLevel:d,labelStructure:p,env:f,pageInfo:h,direction:m="ltr"})=>{const g=(!c||!u)&&"P"===e.qType,v=((e,t)=>{if(e!==ez){if(t){const t=rN(e.representation);return t===tN.Link||t===tN.Image?e.representation:{type:tN.Text}}return e.representation}})(s,c),y=(({node:e,isLeftColumn:t,isIndentModeEnabled:n,labelStructure:r,representationType:i,parentOrRootOriginalValue:o})=>{let a=e.qText;if(t&&n&&r){const{originalValue:t,delimeter:n,suffix:s}=r;a=i===tN.Link?"P"===e.qType?o:t:`${t} ${!s||!t&&s?"":n} ${s}`.trim()}return a})({node:e,isLeftColumn:u,isIndentModeEnabled:c,labelStructure:p,representationType:rN(v),parentOrRootOriginalValue:(t||n)?.representation?.labelStructure?.originalValue??""}),b=Jz({cell:{...e,qText:y},representationProperties:v,attrExprInfoIndex:l,env:f,labelStructure:p,direction:m,enabledFeatures:{[tN.Image]:!0,[tN.Indicator]:!0}}),x={id:b_(),ref:e,x:r,y:i,pageX:r,pageY:o,mainAxisPageCoord:u?o:r,isLeftColumn:u,parent:t,root:n,children:[],isLeafNode:0===e.qSubNodes.length,leafCount:eW(e,i,o,r,u,h),distanceToNextCell:0,isLockedByDimension:!("object"!=typeof s||!s.qLocked),isTotal:"T"===e.qType||!!t?.isTotal,isEmpty:"E"===e.qType||-4===e.qElemNo,isNull:"U"===e.qType,isPseudoDimension:g,expressionColor:Zz(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},nW=(e,t,n,r,i,o,a,s,l)=>{const{isIndentModeEnabled:u}=i;if(!t.length)return e;let c=0;return function t(d,p,f,h=0,m=-1){e[h]||(e[h]={}),u&&m++;const g=i.leftDimensionInfoIndexes.indexOf(ez);f.forEach((f,v)=>{const y={originalValue:f.qText??"",maskedValue:"",delimeter:"-",suffix:""};c+=0===v?0:1;const b=n.qTop-r.page*r.rowsPerPage,x=Math.max(0,b+c-f.qUp),S=n.qTop+c-f.qUp;if(u){if(i.hasPseudoDimOnLeft&&m<=g)if(y.originalValue=f.qText??"",y.maskedValue=f.qText??"","N"===f.qType||"U"===f.qType||"T"===f.qType)"U"===f.qType&&(y.originalValue=i.getNullValueText()),m<g&&(y.suffix=i.visibleMeasureInfo[0].qFallbackTitle??"");else if("P"===f.qType){y.originalValue=(p||d)?.representation.labelStructure?.originalValue??"",y.maskedValue=(p||d)?.representation.labelStructure?.originalValue??"",y.suffix=f.qText??"";const e=f.qSubNodes;f={...(p||d)?.ref,...f.qText?{qText:f.qText}:{},qSubNodes:e},m=(p||d)?.indentLevel??0}"U"===f.qType&&(y.originalValue=i.getNullValueText())}let w=h;u&&(w=g>=1&&m>=g?m+1:m,0===m&&0===g&&0===f.qSubNodes.length&&(w=0));const C=e.at(h)?.[x],E=u&&void 0===C?.ref.qText||!C?tW({node:f,parent:p,root:d,x:w,y:S,pageY:x,layoutService:i,dimensionInfo:o[w],attrExprInfoIndex:a[w],isLeftColumn:!0,...u&&{isIndentModeEnabled:u,indentLevel:m},env:s,pageInfo:r,labelStructure:y,direction:l}):e[h][x];if(e[h][x]=E,f.qSubNodes.length){const e=u?0:h+1;t(d||E,E,f.qSubNodes,e,m)}})}(null,null,t,0,-1),e},rW=(e,t)=>{e.slice(0,-1).forEach(e=>{Object.values(e).forEach((e,n,r)=>{const i=r.at(n+1);e.distanceToNextCell=i?i.mainAxisPageCoord-(e.mainAxisPageCoord+e.leafCount):t-(e.mainAxisPageCoord+e.leafCount)})})},iW=(e,t)=>{const n=e[0],r=n?Object.values(n):[],i=t?.isIndentModeEnabled&&t.hasPseudoDimOnLeft?t.visibleMeasureInfo.length-1:0,o=n?.[i],a=r.at(-1);return o?.isTotal?o.isLeafNode?o.mainAxisPageCoord:o.mainAxisPageCoord+o.leafCount-1:a?.isTotal?a.mainAxisPageCoord-1:-1},oW=({prevData:e,nextDataPage:t,pageInfo:n,layoutService:r,visibleLeftDimensionInfo:i,attrExprInfoIndexes:o,env:a,direction:s})=>{const{qLeft:l,qArea:u}=t;if(!l.length)return e;const c=nW(e.grid,l,u,n,r,i,o,a,s);rW(c,n.rowsOnCurrentPage);const d=iW(c,r);return{...e,grid:c,columnCount:c.length,totalDividerIndex:d}},aW=({qArea:e,prevData:t,pivotValuePoints:n,pageInfo:r})=>{const i=[...t];return n.forEach((t,n)=>{t.forEach((t,o)=>{const a=e.qTop-r.page*r.rowsPerPage+n,s=e.qLeft+o;Array.isArray(i[a])||(i[a]=[]);const l="U"===t.qType;i[a][s]=i[a][s]??{id:b_(),ref:t,isNull:l}})}),i},sW=({prevData:e,dataPage:t,pageInfo:n})=>{const{qData:r,qArea:i}=t;return r?.length?aW({qArea:i,prevData:e,pivotValuePoints:r,pageInfo:n}):e},lW=(e,t,n,r,i,o,a,s,l,u)=>{const{isIndentModeEnabled:c}=r;if(!t.length)return e;let d=0;!function t(a,p,f,h=0){e[h]||(e[h]={}),f.forEach((f,m)=>{d+=0===m?0:1;const g=n.qLeft+d-f.qUp,v=e[h][g]??tW({node:f,parent:p,root:a,x:g,y:h,pageY:h,layoutService:r,dimensionInfo:i[h],attrExprInfoIndex:o[h],isLeftColumn:!1,...c&&{isIndentModeEnabled:c},env:s,pageInfo:l,direction:u});e[h][g]=v,f.qSubNodes.length&&t(a||v,v,f.qSubNodes,h+1)})}(null,null,t);for(let t=0;t<a-e.length;t++)e.push({});return e},uW=({prevData:e,nextDataPage:t,layoutService:n,visibleTopDimensionInfo:r,attrExprInfoIndexes:i,headerRows:o,env:a,pageInfo:s,direction:l})=>{const{qTop:u,qArea:c}=t;if(!u.length)return e;const d=lW(e.grid,u,c,n,r,i,o,a,s,l);rW(d,n.size.x);const p=iW(d);return{...e,grid:d,rowCount:d.length,totalDividerIndex:p}},cW=e=>-1===e?{}:e.qAttrExprInfo.reduce((e,{id:t},n)=>(e[t]=n,e),{}),dW=(e,t)=>{const{env:n}=UF(),{direction:r}=VF(),{layoutService:i,effectivePropertiesService:o}=XF(),{qPivotDataPages:a,pageInfo:s}=VF(),[l,u]=g(null),c=((e,t,n)=>y(()=>({left:e.map(cW),top:t.map(cW),measures:n.map(cW)}),[n,e,t]))(e,t,i.visibleMeasureInfo),d=y(()=>az(i,o,t,e),[i,o,t,e]),p=m(()=>a.slice(1).reduce((e,t)=>sW({prevData:e,dataPage:t,pageInfo:s}),((e,t)=>{const{qData:n,qArea:r}=e;return aW({qArea:r,prevData:[],pivotValuePoints:n,pageInfo:t})})(a[0],s)),[a,s]),f=m(()=>a.slice(1).reduce((e,o)=>uW({prevData:e,nextDataPage:o,layoutService:i,visibleTopDimensionInfo:t,attrExprInfoIndexes:c.top,headerRows:d.size.y,env:n,pageInfo:s,direction:r}),((e,t,n,r,i,o,a,s)=>{const{qArea:l,qTop:u}=e,c=lW([],u,l,t,n,r,i,o,a,s);rW(c,t.size.x);const d=iW(c);return{grid:c,rowCount:c.length,layoutSize:t.size,totalDividerIndex:d}})(a[0],i,t,c.top,d.size.y,n,s,r)),[a,i,t,c.top,d.size.y,n,s,r]),h=m(()=>a.slice(1).reduce((t,o)=>oW({prevData:t,nextDataPage:o,pageInfo:s,layoutService:i,visibleLeftDimensionInfo:e,attrExprInfoIndexes:c.left,env:n,direction:r}),((e,t,n,r,i,o,a)=>{const{qArea:s,qLeft:l}=e,u=nW([],l,s,n,t,r,i,o,a);rW(u,n.rowsOnCurrentPage);const c=iW(u,t);return{grid:u,columnCount:u.length,layoutSize:t.size,totalDividerIndex:c}})(a[0],i,s,e,c.left,n,r)),[a,i,s,e,c,n,r]),[v,b]=g(()=>p()),[x,S]=g(()=>f()),[w,C]=g(()=>h());vj(()=>{b(p())},[p]),vj(()=>{S(f())},[f]),vj(()=>{C(h())},[h]),vj(()=>{l&&l.forEach(o=>{b(e=>sW({prevData:e,dataPage:o,pageInfo:s})),S(e=>uW({prevData:e,nextDataPage:o,layoutService:i,visibleTopDimensionInfo:t,attrExprInfoIndexes:c.top,headerRows:d.size.y,env:n,pageInfo:s,direction:r})),C(t=>oW({prevData:t,nextDataPage:o,pageInfo:s,layoutService:i,visibleLeftDimensionInfo:e,attrExprInfoIndexes:c.left,env:n,direction:r}))})},[l]);const E=m(e=>{u(e)},[]);return{headersData:d,measureData:v,topDimensionData:x,leftDimensionData:w,attrExprInfoIndexes:c,nextPageHandler:E}},pW=Math.sqrt(1e4),fW=e=>({maxNumberOfVisibleRows:Math.ceil(e.height/24),maxNumberOfVisibleColumns:Math.ceil(e.width/JA.PixelsMin)}),hW=e=>{if(null===e)return[];if(e.qWidth*e.qHeight<1e4)return[e];const t=[],n=Math.ceil(e.qWidth/pW),r=Math.ceil(e.qHeight/pW);for(let i=0;i<n;i++)for(let n=0;n<r;n++)t.push({qLeft:e.qLeft+i*pW,qTop:e.qTop+n*pW,qWidth:Math.min(pW,e.qWidth-i*pW),qHeight:Math.min(pW,e.qHeight-n*pW)});return t};function mW({nextPageHandler:e}){const{model:t}=UF(),{pageInfo:n}=VF(),{layoutService:r}=XF(),i=(e=>{const t=u(e);return t.current=e,t})(n.page),o=t,a=m(async(e,t)=>{await(o?.collapseLeft(QF,e,t,!1))},[o]),s=m(async(e,t)=>{await(o?.collapseTop(QF,e,t,!1))},[o]),l=m(async(e,t)=>{await(o?.expandLeft(QF,e,t,!1))},[o]),c=m(async(e,t)=>{await(o?.expandTop(QF,e,t,!1))},[o]),d=m(async t=>{if(o?.getHyperCubePivotData&&0!==t.length)try{const r=await o.getHyperCubePivotData(QF,t.reduce((e,t)=>[...e,...hW(t)],[]));i.current===n.page&&e(r)}catch(e){console.error(e)}},[o,e,n,i]),p=m((e,{dimensionInfoIndex:n,isLeftColumn:i,x:o=0,columnWidthLocation:a})=>{const{qMeasureInfo:s,qDimensionInfo:l,topHeadersColumnWidth:u}=r.layout.qHyperCube;let c=[];switch(a){case lN.Dimension:c=[{qPath:`${QF}/qDimensions/${n}/qDef/columnWidth`,oldValue:l[n].columnWidth}];break;case lN.Measures:if(i)c=s.map((e,t)=>({qPath:`${QF}/qMeasures/${t}/qDef/columnWidth`,oldValue:e.columnWidth}));else{const e=r.getMeasureInfoIndexFromCellIndex(o);c=[{qPath:`${QF}/qMeasures/${e}/qDef/columnWidth`,oldValue:s[e].columnWidth}]}break;case lN.Pivot:c=[{qPath:`${QF}/topHeadersColumnWidth`,oldValue:u}]}const d=c.map(t=>{const{qPath:n,oldValue:r}=t;return{qPath:n,qOp:r?"Replace":"Add",qValue:JSON.stringify({...r,...e})}});t?.applyPatches(d,!0)},[t,r]),f=m(async e=>{await(o?.applyPatches([{qPath:`${QF}/indentModeColumnWidth`,qOp:r.layout.qHyperCube.indentModeColumnWidth?"Replace":"Add",qValue:JSON.stringify({...r.indentModeColumnWidth,...e})}],!0))},[o,r]);return y(()=>({collapseLeft:a,collapseTop:s,expandLeft:l,expandTop:c,applyColumnWidth:p,applyIndentModeColumnWidth:f,fetchPages:d}),[a,s,l,c,p,f,d])}const gW=(e,t,n)=>(r,i)=>{if("P"===r)return ez;const o=t[n+i];return e[o]},vW=e=>{const t=[],n=(e,r=0)=>{e.slice(0,1).forEach(e=>{t[r]=e.qType,e.qSubNodes.length&&n(e.qSubNodes,r+1)})};return n(e),t},yW=d({}),bW=()=>i(yW),xW=({children:e})=>{const{visibleLeftDimensionInfo:t,visibleTopDimensionInfo:n}=(()=>{const{layoutService:{layout:{qHyperCube:{qNoOfLeftDims:e,qEffectiveInterColumnSortOrder:t,qDimensionInfo:n}}}}=XF(),{qPivotDataPages:r}=VF();return y(()=>{const i=vW(r[0]?.qLeft??[]),o=vW(r[0]?.qTop??[]);return{visibleLeftDimensionInfo:i.map(gW(n,t,0)),visibleTopDimensionInfo:o.map(gW(n,t,e))}},[n,t,e,r])})(),{headersData:r,measureData:i,topDimensionData:o,leftDimensionData:a,attrExprInfoIndexes:s,nextPageHandler:l}=dW(t,n),u=mW({nextPageHandler:l}),c=y(()=>({gridSectionsData:{headersData:r,topDimensionData:o,leftDimensionData:a,measureData:i},visibleDimensionsInfo:{visibleLeftDimensionInfo:t,visibleTopDimensionInfo:n},attrExprInfoIndexes:s,dataModel:u}),[t,n,r,i,o,a,s,u]);return Yn.jsx(yW.Provider,{value:c,children:e})},SW=20,wW=18,CW=.75,EW=e=>-1!==e&&e?.representation?.type===tN.Image,IW=({isLeftColumn:e,layoutService:t,representation:n})=>Boolean(e)&&t.isIndentModeEnabled&&n.type===tN.Image,DW=e=>void 0===e?LN:e,PW=(e,t)=>{if(void 0!==e&&!Number.isNaN(+e)){const n=+e;return n>=0?n:t}return t},MW=e=>PW(e,JA.PixelsDefault),RW=(e,t)=>PW(e,JA.PercentageDefault)*t/100,kW=(e,t,n)=>{switch(t?.type){case ZA.Pixels:return MW(t.pixels);case ZA.Percentage:return RW(t.percentage,e);case ZA.FitToContent:case ZA.Auto:default:return n}},LW=({headers:e,layoutService:t,effectivePropertiesService:n,estimateWidthForDimensionValue:r,shouldConsiderCombinatedLength:i,measureTextForHeader:o,longestMeasureValuePossible:a})=>e.reduce((e,s,l)=>{const{layout:{qHyperCube:{qNoOfLeftDims:u,qDimensionInfo:c}}}=t,{id:d,colIdx:p,qApprMaxGlyphCount:f,isLeftDimension:h}=s,m=c.find(e=>e.cId===d),g={width:24,...m?.representation?.imageBox};if(!h)return e+0;if(d===tz)return e+0;const v=IW({isLeftColumn:h,layoutService:t,representation:m?.representation||{type:tN.Text}})?g.width+8+4:r(f),y=!n.qAlwaysFullyExpanded&&p<u-1?21:0;let b=0;if(i&&o&&a){b=o("- ")+a}return Math.max(e,24*l+wW+y+v+b)},0),AW=(e,t,n)=>e.reduce((e,r)=>{const i=(n?0:1)*wW;return Math.max(e,i+t(r.qFallbackTitle??""))},0),OW=(e,t,n,r)=>{const i=100*e/t,o=r*CW*(i/100),a=i/100*+n;return Math.min(a,o)},TW=(e,t,n,r)=>r*(+n/100)*(100*e/t/100),qW=(e,t)=>e.some(e=>e>=t*CW),_W=({layoutService:e,effectivePropertiesService:t,headersData:n,columnWidths:r,tableWidth:i,widthOverride:o,measureTextForHeader:a,estimateWidthForDimensionValue:s,measureTextWidthForMeasuresCombinedWithDimensions:l,translator:u})=>{let c;const d=i*CW,p=n.data[n.data.length-1][0];if(!Array.isArray(p))return{leftGridWidth:0,leftGridColumnWidths:[],leftGridFullWidth:0};const f=Math.min(d,r.at(-1)),h=Math.min(d,LW({headers:p,layoutService:e,effectivePropertiesService:t,estimateWidthForDimensionValue:s})),m=Math.min(d,AW(e.visibleMeasureInfo,a));let g;const v=p.findIndex(e=>e.id===tz),y=(({layoutService:e,measureTextForHeader:t,translator:n,headersData:r})=>{const{type:i}=e.indentModeColumnWidth;return i===ZA.Auto&&r.size.y<=1?t(n.get("SNPivotTable.IndentMode.Rows"))+8+wW+16:24})({layoutService:e,measureTextForHeader:a,translator:u,headersData:n});if(e.hasPseudoDimOnLeft)if(0===v){const e=Math.max(f,h,m);c=[Math.max(y,e-f),f]}else{const n=Math.min(d,AW(e.visibleMeasureInfo,l,!0));g=Math.min(d,LW({headers:p.slice(0,v),layoutService:e,effectivePropertiesService:t,estimateWidthForDimensionValue:s,shouldConsiderCombinatedLength:!0,measureTextForHeader:a,longestMeasureValuePossible:n}));const r=Math.max(f,h,g);c=[Math.max(y,r-f),f]}else c=[Math.max(y,h-f),f];const b=Math.min(d,c.reduce((e,t)=>e+t,0)),{indentModeColumnWidth:x}=e;o&&o<=d&&(x.type=ZA.Pixels,x.pixels=o);return[ZA.Pixels,ZA.Percentage].includes(x.type)||qW(c,i)?((e,t,n,r)=>{let i=e[0],o=e[1];const a=e.reduce((e,t)=>e+t,0),{type:s,pixels:l,percentage:u}=t,c=PW(l,JA.PixelsDefault),d=PW(u,JA.PercentageDefault),p=qW(e,n);let f;s===ZA.Auto&&p&&(i>o?i-=o:o-=i),s===ZA.Pixels&&c&&(i=OW(e[0],a,c,n),o=OW(e[1],a,c,n)),s===ZA.Percentage&&d&&(i=TW(e[0],a,d,n),o=TW(e[1],a,d,n)),o<=r&&(f=i-5,f>0&&(i-=f,o+=f)),f=o-r,f>0&&(i+=f,o-=f);const h=[i,o],m=h.reduce((e,t)=>e+t,0);return{leftGridColumnWidths:h,leftGridWidth:m,leftGridFullWidth:m}})(c,x,i,f):{leftGridWidth:b,leftGridColumnWidths:c,leftGridFullWidth:b}};function NW({tableWidth:e}){const t=e*CW,{styleService:n,layoutService:r,effectivePropertiesService:i}=XF(),{translator:o}=UF(),{gridSectionsData:{headersData:a}}=bW(),{measureText:s}=pj(n.header,{allowLineBreaks:!1}),{estimateWidth:l,measureText:u}=pj({...n.dimensionValues,fontWeight:DW(n.dimensionValues.fontWeight)}),{measureText:c}=pj({...n.dimensionValues,...n.measureLabels}),d=m((n,d)=>{const{layout:{qHyperCube:{qNoOfLeftDims:p,topHeadersColumnWidth:f}},visibleMeasureInfo:h,isIndentModeEnabled:m,hasPseudoDimOnLeft:g}=r,v=(t=0)=>h.reduce((n,{qFallbackTitle:r,columnWidth:i})=>{const o=c(r)+wW,a=Math.max(o,t);return Math.max(n,m?a:kW(e,i,a))},0),y=e=>a.data.reduce((t,n)=>{const r=n.at(e);if(!r||Array.isArray(r))return t;if(r.id===tz)return t;const i=(e=>{const{label:t,isLocked:n}=e,r=n?SW:0;return wW+s(t)+SW+r})(r);return Math.max(i,t)},0);let b=0,x=a.data.at(-1);m&&a.size.x>1&&x&&x[0]&&(x=x[0]);const S=x.map((o,s)=>{let u;if(m&&1!==a.size.x||!n||void 0===d||d!==o.colIdx){let t,n;if(o.columnWidthLocation===lN.Pivot?t=m?void 0:f:o.columnWidthLocation===lN.Dimension&&({columnWidth:t}=o),o.isLeftDimension)if(o.id===tz)n=v();else{const e=y(s),t=((e,t)=>{const{qApprMaxGlyphCount:n,isLeftDimension:o,dimensionInfoIndex:a}=e,s=r.getDimensionInfo(a);if(EW(s))return JA.PixelsDefault;const u=!i.qAlwaysFullyExpanded&&o&&t<p-1?21:0;return wW+l(n)+u})(o,s);n=Math.max(e,t),m&&!g&&s+1===p&&o.columnWidthLocation===lN.Dimension&&a.size.x>1&&(n=e)}else n=y(s),o.columnWidthLocation===lN.Measures&&(n=v(n));m&&1===a.size.x&&(t=r.indentModeColumnWidth),u=m&&!g&&a.size.x>1?n:kW(e,t,n)}else u=m?Math.min(t,n):n;return b+=u,u});return m&&a.size.x>1?_W({layoutService:r,effectivePropertiesService:i,headersData:a,columnWidths:S,tableWidth:e,widthOverride:n,measureTextForHeader:s,estimateWidthForDimensionValue:l,measureTextWidthForMeasuresCombinedWithDimensions:u,translator:o}):{leftGridWidth:Math.min(t,b),leftGridColumnWidths:S,leftGridFullWidth:b}},[e,a,r,t,s,c,l,u,o,i]),[p,f]=g(d);vj(()=>{f(d())},[d]);const h=m((e,t)=>{f(d(e,t))},[d]);return{...p,overrideLeftGridWidth:h}}function jW({tableWidth:e,verticalScrollbarWidth:t,leftGridWidth:n}){const{styleService:r,layoutService:i}=XF(),{visibleDimensionsInfo:{visibleTopDimensionInfo:o}}=bW(),{layout:{qHyperCube:{qNoOfLeftDims:a,qEffectiveInterColumnSortOrder:s}},size:l,visibleMeasureInfo:u}=i,{estimateWidth:c,measureText:d}=pj(r.measureValues,{allowLineBreaks:!1}),{estimateWidth:p}=pj({...r.dimensionValues,fontWeight:DW(r.dimensionValues.fontWeight)},{allowLineBreaks:!1}),f=e-n-1,h=o.at(-1),g=h===ez,v=s.length-a>o.length?21:0,b=y(()=>{const e=g?u:[h],t=l.x/e.length,n=[],r=[];let i=f;const o=(e,r)=>{n[e]=Math.min(JA.PixelsMax,Math.max(JA.PixelsMin,r)),i-=n[e]*t};if(e.forEach((e,t)=>{if(e?.columnWidth){const{columnWidth:{type:n,pixels:i,percentage:a},qApprMaxGlyphCount:s,qFallbackTitle:l}=e;switch(n){case ZA.Pixels:o(t,MW(i));break;case ZA.Percentage:o(t,RW(a,f));break;case ZA.FitToContent:o(t,((e,t,n)=>n?JA.PixelsDefault:wW+(g?Math.max(c(e),d(t)):Math.max(Math.max(...u.map(e=>c(e.qApprMaxGlyphCount))),p(e)+v)))(s,l??"",EW(e)));break;case ZA.Auto:default:r.push(t)}}else r.push(t)}),r.length){const e=r.length*t,o=i/e;r.forEach(e=>{n[e]=Math.max(JA.AutoMinPivot,o)})}return n},[g,u,h,l.x,f,c,d,p,v]),x=y(()=>{if(g){return u.reduce((e,t,n)=>e+b[n],0)/u.length}return b[0]},[g,b,u]),S=parseFloat((t/i.size.x).toFixed(12)),w=m(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,f),getRightGridColumnWidth:w}}const FW=`scrollable-container--${cN.TopGrid}`,zW=`scrollable-container--${cN.LeftGrid}`,WW=`scrollable-container--${cN.DataGrid}`,$W=e=>{if(!(e&&e instanceof HTMLDivElement))return{width:0,height:0};const t=e.offsetWidth-e.clientWidth,n=e.offsetHeight-e.clientHeight;return{width:t>=2?t:0,height:n>=2?n:0}},HW=(e,t)=>e>t?dN.Forward:e<t?dN.Backward:dN.None,VW=({gridRefs:{topGridRef:e,leftGridRef:t,dataGridRef:n},getWrapperElements:r,updateViewService:i,trackScrollDirection:o,interactions:a})=>{const{direction:s}=VF();f(()=>{const{headerGridWrapperElement:l,topGridWrapperElement:u,leftGridWrapperElement:c,dataGridWrapperElement:d}=r(),p=e=>{const t=e.target;l.scrollLeft=t.scrollLeft,o(e),i?.(e)},f=e=>{const t=e.target;l.scrollTop=t.scrollTop,o(e),i?.(e)},h=r=>{const a=r.target,l=((e,t)=>{const{scrollWidth:n,clientWidth:r,scrollLeft:i}=e,o=n-r;if("rtl"===t){if(i>o)return o;if(i<0)return Math.abs(i)}return i})(a,s);n.current?.scrollTo({scrollLeft:l,scrollTop:a.scrollTop}),u.scrollLeft=l,e.current?.forEach(e=>{e?.scrollTo(l)}),c.scrollTop=d.scrollTop,t.current?.forEach(e=>{e?.scrollTo(a.scrollTop)}),o(r),i?.(r)};return c.addEventListener("scroll",p),u.addEventListener("scroll",f),d.addEventListener("scroll",h),a.scroll||setTimeout(()=>{c.removeEventListener("scroll",p),u.removeEventListener("scroll",f),d.removeEventListener("scroll",h)},0),()=>{c.removeEventListener("scroll",p),u.removeEventListener("scroll",f),d.removeEventListener("scroll",h)}},[o,i,a,e,t,n,r,s])},BW=Vb(!1),GW=(e,t)=>Math.abs(e.width-t.width)>2||Math.abs(e.height-t.height)>2,UW=({topGridWrapperRef:e,leftGridWrapperRef:t,dataGridWrapperRef:n})=>{const{top:r,left:i,data:o,resetHorizontalScrollbarHeight:a}=((e,t,n)=>{const[r,i]=g({width:0,height:0}),[o,a]=g({width:0,height:0}),[s,l]=g({width:0,height:0}),[c,d]=g(!1),p=nx(BW),h=u(p),v=u(p);h.current=p;const y=m(()=>{d(e=>!e&&e);const r=$W(e.current),o=$W(t.current),s=$W(n.current);i(e=>GW(e,r)?r:e),a(e=>GW(e,o)?o:e),l(e=>GW(e,s)?s:e)},[e,t,n]);f(()=>{const r=new ResizeObserver(()=>{h.current||y()}),i=[e.current,t.current,n.current].filter(e=>Boolean(e));return i.forEach(e=>{r.observe(e)}),()=>{r.disconnect()}},[y,e,t,n]),f(()=>{const e=v.current;if(v.current=p,e&&!p){const e=setTimeout(y,0);return()=>{clearTimeout(e)}}},[p,y]);const b=m(()=>{d(!0)},[]);return{top:r,left:c?{...o,height:0}:o,data:c?{...s,height:0}:s,resetHorizontalScrollbarHeight:b}})(e,t,n);return{scrollbarsDimensions:{verticalScrollbarWidth:Math.max(r.width,o.width),horizontalScrollbarHeight:Math.max(i.height,o.height)},resetHorizontalScrollbarHeight:a}},YW=()=>{const{interactions:e}=UF(),t=u(null),n=u(null),r=u(null),i=u(null),o=u([]),a=u([]),s=u(null),{scrollbarsDimensions:{verticalScrollbarWidth:l,horizontalScrollbarHeight:c},resetHorizontalScrollbarHeight:d}=UW({topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:i});(({gridSectionsWrapperRefs:{headerGridWrapperRef:e,topGridWrapperRef:t,leftGridWrapperRef:n,dataGridWrapperRef:r},gridRefs:{topGridRef:i,leftGridRef:o,dataGridRef:a}})=>{const{pageInfo:s}=VF(),{downloadService:l,viewService:u,layoutService:c}=XF(),d=m(()=>{const i={left:0,top:0};e.current?.scrollTo(i),t.current?.scrollTo(i),n.current?.scrollTo(i),r.current?.scrollTo(i)},[e,t,n,r]);v(()=>{d()},[s.page,d]),v(()=>{c.triggerdByExpandOrCollapse||d()},[c,d]),v(()=>{if(c.triggerdByExpandOrCollapse){const e=r.current?.scrollLeft??0,t=r.current?.scrollTop??0;o.current?.forEach(e=>{e?.scrollTo(t)}),i.current?.forEach(t=>{t?.scrollTo(e)}),a.current?.scrollTo({scrollTop:t,scrollLeft:e})}},[c,r,a,o,i]),v(()=>{(l.isDownloadedAsPDForImage||c.isSnapshot)&&r.current&&n.current&&t.current&&(r.current.scrollTop=u.scrollTop,r.current.scrollLeft=u.scrollLeft,n.current.scrollLeft=u.leftGridScrollLeft,t.current.scrollTop=u.topGridScrollTop)},[u,l,c,r,n,t])})({gridSectionsWrapperRefs:{headerGridWrapperRef:t,topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:i},gridRefs:{topGridRef:o,leftGridRef:a,dataGridRef:s}});const{trackScrollDirection:p,scrollDirectionRefs:{verticalScrollDirection:h,horizontalScrollDirection:g}}=(()=>{const e=u(dN.None),t=u(dN.None),n=u({prevScrollTop:0,prevScrollLeft:0}),r=m(r=>{if(r instanceof WheelEvent&&(e.current=HW(r.deltaY,0),t.current=HW(r.deltaX,0)),r instanceof Event&&!(r instanceof WheelEvent)){const i=r.target;e.current=HW(i.scrollTop,n.current.prevScrollTop),n.current.prevScrollTop=i.scrollTop,t.current=HW(i.scrollLeft,n.current.prevScrollLeft),n.current.prevScrollLeft=i.scrollLeft}},[e,t,n]);return{trackScrollDirection:r,scrollDirectionRefs:{verticalScrollDirection:e,horizontalScrollDirection:t}}})(),y=(()=>{const{viewService:e}=XF();return m(t=>{const n=t.target,r=t.currentTarget,i=n.dataset.key;i===zW&&(e.leftGridScrollLeft=r.scrollLeft),i===WW&&(e.scrollLeft=r.scrollLeft),i===FW&&(e.topGridScrollTop=r.scrollTop),i!==zW&&i!==WW||(e.scrollTop=r.scrollTop)},[e])})(),b={gridRefs:{topGridRef:o,leftGridRef:a,dataGridRef:s},getWrapperElements:m(()=>({headerGridWrapperElement:t.current,topGridWrapperElement:n.current,leftGridWrapperElement:r.current,dataGridWrapperElement:i.current}),[t,n,r,i]),updateViewService:y,trackScrollDirection:p,interactions:e};return(({gridRefs:{topGridRef:e,leftGridRef:t,dataGridRef:n},getWrapperElements:r,updateViewService:i,trackScrollDirection:o,interactions:a})=>{f(()=>{const{headerGridWrapperElement:i,topGridWrapperElement:s,leftGridWrapperElement:l,dataGridWrapperElement:u}=r(),c=e=>{e.ctrlKey||(e.preventDefault(),i.scrollLeft+=e.deltaX,i.scrollTop+=e.deltaY,l.scrollLeft=i.scrollLeft,s.scrollTop=i.scrollTop,o(e))},d=e=>{e.ctrlKey||(e.preventDefault(),l.scrollTop+=e.deltaY,t.current?.forEach(e=>{e?.scrollTo(l.scrollTop)}),i.scrollLeft+=e.deltaX,l.scrollLeft=i.scrollLeft,u.scrollTop=l.scrollTop,n.current?.scrollTo({scrollTop:l.scrollTop}),o(e))},p=t=>{t.ctrlKey||(t.preventDefault(),s.scrollLeft+=t.deltaX,e.current?.forEach(e=>{e?.scrollTo(s.scrollLeft)}),i.scrollTop+=t.deltaY,s.scrollTop=i.scrollTop,u.scrollLeft=s.scrollLeft,n.current?.scrollTo({scrollLeft:s.scrollLeft}),o(t))},f=r=>{r.ctrlKey||(r.preventDefault(),u.scrollLeft+=r.deltaX,u.scrollTop+=r.deltaY,n.current?.scrollTo({scrollLeft:u.scrollLeft,scrollTop:u.scrollTop}),s.scrollLeft=u.scrollLeft,e.current?.forEach(e=>{e?.scrollTo(u.scrollLeft)}),l.scrollTop=u.scrollTop,t.current?.forEach(e=>{e?.scrollTo(u.scrollTop)}),o(r))};return i.addEventListener("wheel",c),l.addEventListener("wheel",d),s.addEventListener("wheel",p),u.addEventListener("wheel",f),a.scroll||setTimeout(()=>{i.removeEventListener("wheel",c),l.removeEventListener("wheel",d),s.removeEventListener("wheel",p),u.removeEventListener("wheel",f)},0),()=>{i.removeEventListener("wheel",c),l.removeEventListener("wheel",d),s.removeEventListener("wheel",p),u.removeEventListener("wheel",f)}},[o,i,a,e,t,n,r])})(b),VW(b),{gridSectionsWrapperRefs:{headerGridWrapperRef:t,topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:i},gridRefs:{topGridRef:o,leftGridRef:a,dataGridRef:s},scrollDirectionRefs:{verticalScrollDirection:h,horizontalScrollDirection:g},scrollbarsDimensions:{verticalScrollbarWidth:l,horizontalScrollbarHeight:c,resetHorizontalScrollbarHeight:d}}},KW=()=>{const{layoutService:e}=XF(),{rect:t,pageInfo:n}=VF();return y(()=>{let{height:r}=t;return e.hasLimitedData&&(r-=22),n.shouldShowPagination&&(r-=41),{...t,height:r}},[t,e,n.shouldShowPagination])},XW=({children:e,style:t})=>Yn.jsx("div",{"data-testid":"fullSize",style:t,children:e}),JW=({children:e,style:t})=>{const{direction:n}=VF();return Yn.jsx("div",{"data-section-id":"GRID",style:{direction:n,display:"grid",...t},children:e})},ZW=e=>e&&`scrollable-container--${e}`,QW=({children:e,style:t,origin:n},r)=>{const{interactions:i}=UF(),o=i.scroll?t:{overflow:"hidden"};return Yn.jsx("div",{"data-testid":"scrollable","data-key":ZW(n),style:o,ref:r,children:e})};var e$=o.forwardRef(QW);const t$=({children:e,style:t})=>{const{direction:n}=VF();return Yn.jsx("div",{"data-testid":"sticky",style:{position:"sticky",top:0,["rtl"===n?"right":"left"]:0,...t},children:e})};var n$=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function r$(e,t){return e===t||!(!n$(e)||!n$(t))}function i$(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!r$(e[n],t[n]))return!1;return!0}function o$(e,t){var n;void 0===t&&(t=i$);var r,i=[],o=!1;return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return o&&n===this&&t(a,i)||(r=e.apply(this,a),o=!0,n=this,i=a),r}}var a$="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function s$(e){cancelAnimationFrame(e.id)}function l$(e,t){var n=a$();var r={id:requestAnimationFrame(function i(){a$()-n>=t?e.call(null):r.id=requestAnimationFrame(i)})};return r}var u$=-1;function c$(e){if(void 0===e&&(e=!1),-1===u$||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),u$=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return u$}var d$=null;function p$(e){if(void 0===e&&(e=!1),null===d$||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),i=r.style;return i.width="100px",i.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?d$="positive-descending":(t.scrollLeft=1,d$=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),d$}return d$}var f$=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function h$(e){var t,n=e.getColumnOffset,r=e.getColumnStartIndexForOffset,i=e.getColumnStopIndexForStartIndex,o=e.getColumnWidth,a=e.getEstimatedTotalHeight,s=e.getEstimatedTotalWidth,l=e.getOffsetForColumnAndAlignment,u=e.getOffsetForRowAndAlignment,d=e.getRowHeight,p=e.getRowOffset,f=e.getRowStartIndexForOffset,h=e.getRowStopIndexForStartIndex,m=e.initInstanceProps,g=e.shouldResetStyleCacheOnItemSizeChange,v=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=m(r.props,ts(r)),r._resetIsScrollingTimeoutId=null,r._outerRef=void 0,r.state={instance:ts(r),isScrolling:!1,horizontalScrollDirection:"forward",scrollLeft:"number"==typeof r.props.initialScrollLeft?r.props.initialScrollLeft:0,scrollTop:"number"==typeof r.props.initialScrollTop?r.props.initialScrollTop:0,scrollUpdateWasRequested:!1,verticalScrollDirection:"forward"},r._callOnItemsRendered=void 0,r._callOnItemsRendered=o$(function(e,t,n,i,o,a,s,l){return r.props.onItemsRendered({overscanColumnStartIndex:e,overscanColumnStopIndex:t,overscanRowStartIndex:n,overscanRowStopIndex:i,visibleColumnStartIndex:o,visibleColumnStopIndex:a,visibleRowStartIndex:s,visibleRowStopIndex:l})}),r._callOnScroll=void 0,r._callOnScroll=o$(function(e,t,n,i,o){return r.props.onScroll({horizontalScrollDirection:n,scrollLeft:e,scrollTop:t,verticalScrollDirection:i,scrollUpdateWasRequested:o})}),r._getItemStyle=void 0,r._getItemStyle=function(e,t){var i,a=r.props,s=a.columnWidth,l=a.direction,u=a.rowHeight,c=r._getItemStyleCache(g&&s,g&&l,g&&u),f=e+":"+t;if(c.hasOwnProperty(f))i=c[f];else{var h=n(r.props,t,r._instanceProps),m="rtl"===l;c[f]=i={position:"absolute",left:m?void 0:h,right:m?h:void 0,top:p(r.props,e,r._instanceProps),height:d(r.props,e,r._instanceProps),width:o(r.props,t,r._instanceProps)}}return i},r._getItemStyleCache=void 0,r._getItemStyleCache=o$(function(e,t,n){return{}}),r._onScroll=function(e){var t=e.currentTarget,n=t.clientHeight,i=t.clientWidth,o=t.scrollLeft,a=t.scrollTop,s=t.scrollHeight,l=t.scrollWidth;r.setState(function(e){if(e.scrollLeft===o&&e.scrollTop===a)return null;var t=r.props.direction,u=o;if("rtl"===t)switch(p$()){case"negative":u=-o;break;case"positive-descending":u=l-i-o}u=Math.max(0,Math.min(u,l-i));var c=Math.max(0,Math.min(a,s-n));return{isScrolling:!0,horizontalScrollDirection:e.scrollLeft<o?"forward":"backward",scrollLeft:u,scrollTop:c,verticalScrollDirection:e.scrollTop<a?"forward":"backward",scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&s$(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=l$(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1)})},r}Ba(t,e),t.getDerivedStateFromProps=function(e,t){return m$(e,t),v(e),null};var y=t.prototype;return y.scrollTo=function(e){var t=e.scrollLeft,n=e.scrollTop;void 0!==t&&(t=Math.max(0,t)),void 0!==n&&(n=Math.max(0,n)),this.setState(function(e){return void 0===t&&(t=e.scrollLeft),void 0===n&&(n=e.scrollTop),e.scrollLeft===t&&e.scrollTop===n?null:{horizontalScrollDirection:e.scrollLeft<t?"forward":"backward",scrollLeft:t,scrollTop:n,scrollUpdateWasRequested:!0,verticalScrollDirection:e.scrollTop<n?"forward":"backward"}},this._resetIsScrollingDebounced)},y.scrollToItem=function(e){var t=e.align,n=void 0===t?"auto":t,r=e.columnIndex,i=e.rowIndex,o=this.props,c=o.columnCount,d=o.height,p=o.rowCount,f=o.width,h=this.state,m=h.scrollLeft,g=h.scrollTop,v=c$();void 0!==r&&(r=Math.max(0,Math.min(r,c-1))),void 0!==i&&(i=Math.max(0,Math.min(i,p-1)));var y=a(this.props,this._instanceProps),b=s(this.props,this._instanceProps)>f?v:0,x=y>d?v:0;this.scrollTo({scrollLeft:void 0!==r?l(this.props,r,n,m,this._instanceProps,x):m,scrollTop:void 0!==i?u(this.props,i,n,g,this._instanceProps,b):g})},y.componentDidMount=function(){var e=this.props,t=e.initialScrollLeft,n=e.initialScrollTop;if(null!=this._outerRef){var r=this._outerRef;"number"==typeof t&&(r.scrollLeft=t),"number"==typeof n&&(r.scrollTop=n)}this._callPropsCallbacks()},y.componentDidUpdate=function(){var e=this.props.direction,t=this.state,n=t.scrollLeft,r=t.scrollTop;if(t.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("rtl"===e)switch(p$()){case"negative":i.scrollLeft=-n;break;case"positive-ascending":i.scrollLeft=n;break;default:var o=i.clientWidth,a=i.scrollWidth;i.scrollLeft=a-o-n}else i.scrollLeft=Math.max(0,n);i.scrollTop=Math.max(0,r)}this._callPropsCallbacks()},y.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&s$(this._resetIsScrollingTimeoutId)},y.render=function(){var e=this.props,t=e.children,n=e.className,r=e.columnCount,i=e.direction,o=e.height,l=e.innerRef,u=e.innerElementType,d=e.innerTagName,p=e.itemData,f=e.itemKey,h=void 0===f?f$: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],M=[];if(r>0&&v)for(var R=D;R<=P;R++)for(var k=C;k<=E;k++)M.push(c(t,{columnIndex:k,data:p,isScrolling:b?S:void 0,key:h({columnIndex:k,data:p,rowIndex:R}),rowIndex:R,style:this._getItemStyle(R,k)}));var L=a(this.props,this._instanceProps),A=s(this.props,this._instanceProps);return c(m||g||"div",{className:n,onScroll:this._onScroll,ref:this._outerRefSetter,style:Ae({position:"relative",height:o,width:x,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:i},y)},c(u||d||"div",{children:M,ref:l,style:{height:L,pointerEvents:S?"none":void 0,width:A}}))},y._callPropsCallbacks=function(){var e=this.props,t=e.columnCount,n=e.onItemsRendered,r=e.onScroll,i=e.rowCount;if("function"==typeof n&&t>0&&i>0){var o=this._getHorizontalRangeToRender(),a=o[0],s=o[1],l=o[2],u=o[3],c=this._getVerticalRangeToRender(),d=c[0],p=c[1],f=c[2],h=c[3];this._callOnItemsRendered(a,s,d,p,l,u,f,h)}if("function"==typeof r){var m=this.state,g=m.horizontalScrollDirection,v=m.scrollLeft,y=m.scrollTop,b=m.scrollUpdateWasRequested,x=m.verticalScrollDirection;this._callOnScroll(v,y,g,x,b)}},y._getHorizontalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanColumnCount,o=e.overscanColumnsCount,a=e.overscanCount,s=e.rowCount,l=this.state,u=l.horizontalScrollDirection,c=l.isScrolling,d=l.scrollLeft,p=n||o||a||1;if(0===t||0===s)return[0,0,0,0];var f=r(this.props,d,this._instanceProps),h=i(this.props,f,d,this._instanceProps),m=c&&"backward"!==u?1:Math.max(1,p),g=c&&"forward"!==u?1:Math.max(1,p);return[Math.max(0,f-m),Math.max(0,Math.min(t-1,h+g)),f,h]},y._getVerticalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanCount,r=e.overscanRowCount,i=e.overscanRowsCount,o=e.rowCount,a=this.state,s=a.isScrolling,l=a.verticalScrollDirection,u=a.scrollTop,c=r||i||n||1;if(0===t||0===o)return[0,0,0,0];var d=f(this.props,u,this._instanceProps),p=h(this.props,d,u,this._instanceProps),m=s&&"backward"!==l?1:Math.max(1,c),g=s&&"forward"!==l?1:Math.max(1,c);return[Math.max(0,d-m),Math.max(0,Math.min(o-1,p+g)),d,p]},t}(C),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var m$=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},g$=function(e,t){var n=e.rowCount,r=t.rowMetadataMap,i=t.estimatedRowHeight,o=t.lastMeasuredRowIndex,a=0;if(o>=n&&(o=n-1),o>=0){var s=r[o];a=s.offset+s.size}return a+(n-o-1)*i},v$=function(e,t){var n=e.columnCount,r=t.columnMetadataMap,i=t.estimatedColumnWidth,o=t.lastMeasuredColumnIndex,a=0;if(o>=n&&(o=n-1),o>=0){var s=r[o];a=s.offset+s.size}return a+(n-o-1)*i},y$=function(e,t,n,r){var i,o,a;if("column"===e?(i=r.columnMetadataMap,o=t.columnWidth,a=r.lastMeasuredColumnIndex):(i=r.rowMetadataMap,o=t.rowHeight,a=r.lastMeasuredRowIndex),n>a){var s=0;if(a>=0){var l=i[a];s=l.offset+l.size}for(var u=a+1;u<=n;u++){var c=o(u);i[u]={offset:s,size:c},s+=c}"column"===e?r.lastMeasuredColumnIndex=n:r.lastMeasuredRowIndex=n}return i[n]},b$=function(e,t,n,r){var i,o;return"column"===e?(i=n.columnMetadataMap,o=n.lastMeasuredColumnIndex):(i=n.rowMetadataMap,o=n.lastMeasuredRowIndex),(o>0?i[o].offset:0)>=r?x$(e,t,n,o,0,r):S$(e,t,n,Math.max(0,o),r)},x$=function(e,t,n,r,i,o){for(;i<=r;){var a=i+Math.floor((r-i)/2),s=y$(e,t,a,n).offset;if(s===o)return a;s<o?i=a+1:s>o&&(r=a-1)}return i>0?i-1:0},S$=function(e,t,n,r,i){for(var o="column"===e?t.columnCount:t.rowCount,a=1;r<o&&y$(e,t,r,n).offset<i;)r+=a,a*=2;return x$(e,t,n,Math.min(r,o-1),Math.floor(r/2),i)},w$=function(e,t,n,r,i,o,a){var s="column"===e?t.width:t.height,l=y$(e,t,n,o),u="column"===e?v$(t,o):g$(t,o),c=Math.max(0,Math.min(u-s,l.offset)),d=Math.max(0,l.offset-s+a+l.size);switch("smart"===r&&(r=i>=d-s&&i<=c+s?"auto":"center"),r){case"start":return c;case"end":return d;case"center":return Math.round(d+(c-d)/2);default:return i>=d&&i<=c?i:d>c||i<d?d:c}},C$=h$({getColumnOffset:function(e,t,n){return y$("column",e,t,n).offset},getColumnStartIndexForOffset:function(e,t,n){return b$("column",e,n,t)},getColumnStopIndexForStartIndex:function(e,t,n,r){for(var i=e.columnCount,o=e.width,a=y$("column",e,t,r),s=n+o,l=a.offset+a.size,u=t;u<i-1&&l<s;)u++,l+=y$("column",e,u,r).size;return u},getColumnWidth:function(e,t,n){return n.columnMetadataMap[t].size},getEstimatedTotalHeight:g$,getEstimatedTotalWidth:v$,getOffsetForColumnAndAlignment:function(e,t,n,r,i,o){return w$("column",e,t,n,r,i,o)},getOffsetForRowAndAlignment:function(e,t,n,r,i,o){return w$("row",e,t,n,r,i,o)},getRowOffset:function(e,t,n){return y$("row",e,t,n).offset},getRowHeight:function(e,t,n){return n.rowMetadataMap[t].size},getRowStartIndexForOffset:function(e,t,n){return b$("row",e,n,t)},getRowStopIndexForStartIndex:function(e,t,n,r){for(var i=e.rowCount,o=e.height,a=y$("row",e,t,r),s=n+o,l=a.offset+a.size,u=t;u<i-1&&l<s;)u++,l+=y$("row",e,u,r).size;return u},initInstanceProps:function(e,t){var n=e,r={columnMetadataMap:{},estimatedColumnWidth:n.estimatedColumnWidth||50,estimatedRowHeight:n.estimatedRowHeight||50,lastMeasuredColumnIndex:-1,lastMeasuredRowIndex:-1,rowMetadataMap:{}};return t.resetAfterColumnIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({columnIndex:e,shouldForceUpdate:n})},t.resetAfterRowIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({rowIndex:e,shouldForceUpdate:n})},t.resetAfterIndices=function(e){var n=e.columnIndex,i=e.rowIndex,o=e.shouldForceUpdate,a=void 0===o||o;"number"==typeof n&&(r.lastMeasuredColumnIndex=Math.min(r.lastMeasuredColumnIndex,n-1)),"number"==typeof i&&(r.lastMeasuredRowIndex=Math.min(r.lastMeasuredRowIndex,i-1)),t._getItemStyleCache(-1),a&&t.forceUpdate()},r},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.columnWidth,e.rowHeight}}),E$=function(e,t){return e};function I$(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,i=e.getItemSize,o=e.getOffsetForIndexAndAlignment,a=e.getStartIndexForOffset,s=e.getStopIndexForStartIndex,l=e.initInstanceProps,u=e.shouldResetStyleCacheOnItemSizeChange,d=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=l(r.props,ts(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:ts(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=o$(function(e,t,n,i){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:i})}),r._callOnScroll=void 0,r._callOnScroll=o$(function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})}),r._getItemStyle=void 0,r._getItemStyle=function(e){var t,o=r.props,a=o.direction,s=o.itemSize,l=o.layout,c=r._getItemStyleCache(u&&s,u&&l,u&&a);if(c.hasOwnProperty(e))t=c[e];else{var d=n(r.props,e,r._instanceProps),p=i(r.props,e,r._instanceProps),f="horizontal"===a||"horizontal"===l,h="rtl"===a,m=f?d:0;c[e]=t={position:"absolute",left:h?void 0:m,right:h?m:void 0,top:f?0:d,height:f?"100%":p,width:f?p:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=o$(function(e,t,n){return{}}),r._onScrollHorizontal=function(e){var t=e.currentTarget,n=t.clientWidth,i=t.scrollLeft,o=t.scrollWidth;r.setState(function(e){if(e.scrollOffset===i)return null;var t=r.props.direction,a=i;if("rtl"===t)switch(p$()){case"negative":a=-i;break;case"positive-descending":a=o-n-i}return a=Math.max(0,Math.min(a,o-n)),{isScrolling:!0,scrollDirection:e.scrollOffset<a?"forward":"backward",scrollOffset:a,scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._onScrollVertical=function(e){var t=e.currentTarget,n=t.clientHeight,i=t.scrollHeight,o=t.scrollTop;r.setState(function(e){if(e.scrollOffset===o)return null;var t=Math.max(0,Math.min(o,i-n));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&s$(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=l$(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1,null)})},r}Ba(t,e),t.getDerivedStateFromProps=function(e,t){return D$(e,t),d(e),null};var p=t.prototype;return p.scrollTo=function(e){e=Math.max(0,e),this.setState(function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffset<e?"forward":"backward",scrollOffset:e,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},p.scrollToItem=function(e,t){void 0===t&&(t="auto");var n=this.props,r=n.itemCount,i=n.layout,a=this.state.scrollOffset;e=Math.max(0,Math.min(e,r-1));var s=0;if(this._outerRef){var l=this._outerRef;s="vertical"===i?l.scrollWidth>l.clientWidth?c$():0:l.scrollHeight>l.clientHeight?c$():0}this.scrollTo(o(this.props,e,t,a,this._instanceProps,s))},p.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,r=e.layout;if("number"==typeof n&&null!=this._outerRef){var i=this._outerRef;"horizontal"===t||"horizontal"===r?i.scrollLeft=n:i.scrollTop=n}this._callPropsCallbacks()},p.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,i=r.scrollOffset;if(r.scrollUpdateWasRequested&&null!=this._outerRef){var o=this._outerRef;if("horizontal"===t||"horizontal"===n)if("rtl"===t)switch(p$()){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&&s$(this._resetIsScrollingTimeoutId)},p.render=function(){var e=this.props,t=e.children,n=e.className,i=e.direction,o=e.height,a=e.innerRef,s=e.innerElementType,l=e.innerTagName,u=e.itemCount,d=e.itemData,p=e.itemKey,f=void 0===p?E$: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"===i||"horizontal"===h,w=S?this._onScrollHorizontal:this._onScrollVertical,C=this._getRangeToRender(),E=C[0],I=C[1],D=[];if(u>0)for(var P=E;P<=I;P++)D.push(c(t,{data:d,key:f(P,d),index:P,isScrolling:y?x:void 0,style:this._getItemStyle(P)}));var M=r(this.props,this._instanceProps);return c(m||g||"div",{className:n,onScroll:w,ref:this._outerRefSetter,style:Ae({position:"relative",height:o,width:b,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:i},v)},c(s||l||"div",{children:D,ref:a,style:{height:S?"100%":M,pointerEvents:x?"none":void 0,width:S?M:"100%"}}))},p._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],i=e[3];this._callOnItemsRendered(t,n,r,i)}if("function"==typeof this.props.onScroll){var o=this.state,a=o.scrollDirection,s=o.scrollOffset,l=o.scrollUpdateWasRequested;this._callOnScroll(a,s,l)}},p._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,i=r.isScrolling,o=r.scrollDirection,l=r.scrollOffset;if(0===t)return[0,0,0,0];var u=a(this.props,l,this._instanceProps),c=s(this.props,u,l,this._instanceProps),d=i&&"backward"!==o?1:Math.max(1,n),p=i&&"forward"!==o?1:Math.max(1,n);return[Math.max(0,u-d),Math.max(0,Math.min(t-1,c+p)),u,c]},t}(C),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var D$=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},P$=function(e,t,n){var r=e.itemSize,i=n.itemMetadataMap,o=n.lastMeasuredIndex;if(t>o){var a=0;if(o>=0){var s=i[o];a=s.offset+s.size}for(var l=o+1;l<=t;l++){var u=r(l);i[l]={offset:a,size:u},a+=u}n.lastMeasuredIndex=t}return i[t]},M$=function(e,t,n,r,i){for(;r<=n;){var o=r+Math.floor((n-r)/2),a=P$(e,o,t).offset;if(a===i)return o;a<i?r=o+1:a>i&&(n=o-1)}return r>0?r-1:0},R$=function(e,t,n,r){for(var i=e.itemCount,o=1;n<i&&P$(e,n,t).offset<r;)n+=o,o*=2;return M$(e,t,Math.min(n,i-1),Math.floor(n/2),r)},k$=function(e,t){var n=e.itemCount,r=t.itemMetadataMap,i=t.estimatedItemSize,o=t.lastMeasuredIndex,a=0;if(o>=n&&(o=n-1),o>=0){var s=r[o];a=s.offset+s.size}return a+(n-o-1)*i},L$=I$({getItemOffset:function(e,t,n){return P$(e,t,n).offset},getItemSize:function(e,t,n){return n.itemMetadataMap[t].size},getEstimatedTotalSize:k$,getOffsetForIndexAndAlignment:function(e,t,n,r,i,o){var a=e.direction,s=e.height,l=e.layout,u=e.width,c="horizontal"===a||"horizontal"===l?u:s,d=P$(e,t,i),p=k$(e,i),f=Math.max(0,Math.min(p-c,d.offset)),h=Math.max(0,d.offset-c+d.size+o);switch("smart"===n&&(n=r>=h-c&&r<=f+c?"auto":"center"),n){case"start":return f;case"end":return h;case"center":return Math.round(h+(f-h)/2);default:return r>=h&&r<=f?r:r<h?h:f}},getStartIndexForOffset:function(e,t,n){return function(e,t,n){var r=t.itemMetadataMap,i=t.lastMeasuredIndex;return(i>0?r[i].offset:0)>=n?M$(e,t,i,0,n):R$(e,t,Math.max(0,i),n)}(e,n,t)},getStopIndexForStartIndex:function(e,t,n,r){for(var i=e.direction,o=e.height,a=e.itemCount,s=e.layout,l=e.width,u="horizontal"===i||"horizontal"===s?l:o,c=P$(e,t,r),d=n+u,p=c.offset+c.size,f=t;f<a-1&&p<d;)f++,p+=P$(e,f,r).size;return f},initInstanceProps:function(e,t){var n={itemMetadataMap:{},estimatedItemSize:e.estimatedItemSize||50,lastMeasuredIndex:-1};return t.resetAfterIndex=function(e,r){void 0===r&&(r=!0),n.lastMeasuredIndex=Math.min(n.lastMeasuredIndex,e-1),t._getItemStyleCache(-1),r&&t.forceUpdate()},n},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.itemSize}});function A$(e,t){for(var n in e)if(!(n in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1}var O$=["style"],T$=["style"];function q$(e,t){var n=e.style,r=Oe(e,O$),i=t.style,o=Oe(t,T$);return!A$(n,i)&&!A$(r,o)}const _$=10,N$=(e,t)=>e.current===dN.Backward?t:0,j$=(e,t,n,r)=>{for(let i=n;i<n+r;i++){const n=e.at(i);if(void 0===n||void 0===n.at(t))return!0}return!1},F$=(e,t)=>e.qLeft+e.qWidth===t.qLeft&&e.qTop===t.qTop&&e.qHeight===t.qHeight,z$=({pageInfo:e,measureData:t,pageTop:n,qHeight:r,startLeft:i,endLeft:o})=>{const a=[],s=e.page*e.rowsPerPage;for(let e=i;e<o;e++)if(j$(t,e,n,r)){const t=a[a.length-1],i={qLeft:e,qTop:n+s,qWidth:1,qHeight:r};void 0!==t&&F$(t,i)?t.qWidth+=i.qWidth:a.push(i)}return a},W$=({pageInfo:e,measureData:t,scrollDirection:n,viewService:r,minBufferStartLeft:i,minBufferEndLeft:o,columnEndIndex:a})=>{const{gridRowStartIndex:s,gridHeight:l}=r,u=n.current===dN.Backward?Math.max(0,i-25):o,c=Math.min(u+25,a);return z$({pageInfo:e,measureData:t,startLeft:u,endLeft:c,pageTop:s,qHeight:l})},$$=({pageInfo:e,measureData:t,scrollDirection:n,layoutService:r,viewService:i})=>{const{startLeft:o,endLeft:a,pageTop:s,qHeight:l}=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:i,gridWidth:o,gridHeight:a}=t,s=e.size.x,l=N$(n,_$),u=Math.max(r-l,0);return{startLeft:u,endLeft:u+Math.min(o+_$,s-u),pageTop:i,qHeight:a}})(r,i,n),u=z$({pageInfo:e,measureData:t,startLeft:o,endLeft:a,pageTop:s,qHeight:l});return u.length>0?[...u,...W$({pageInfo:e,measureData:t,scrollDirection:n,viewService:i,minBufferStartLeft:o,minBufferEndLeft:a,columnEndIndex:r.size.x})]:u},H$=(e,t,n,r)=>{const i=e[n];if(void 0===i)return!0;for(let e=t;e<t+r;e++){if(void 0===i[e])return!0}return!1},V$=(e,t)=>e.qTop+e.qHeight===t.qTop&&e.qLeft===t.qLeft&&e.qWidth===t.qWidth,B$=({startTop:e,endTop:t,qLeft:n,qWidth:r,measureData:i,pageInfo:o})=>{const a=[],s=o.page*o.rowsPerPage;for(let o=e;o<t;o++)if(H$(i,n,o,r)){const e=a.at(-1),t={qLeft:n,qTop:o+s,qWidth:r,qHeight:1};void 0!==e&&V$(e,t)?e.qHeight+=t.qHeight:a.push(t)}return a},G$=({pageInfo:e,measureData:t,scrollDirection:n,viewService:r})=>{const{startTop:i,endTop:o,qLeft:a,qWidth:s}=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:i,gridWidth:o,gridHeight:a}=t,s=N$(n,_$),l=Math.max(i-s,0);return{startTop:l,endTop:l+Math.min(a+_$,e.rowsOnCurrentPage-l),qLeft:r,qWidth:o}})(e,r,n),l=B$({startTop:i,endTop:o,qLeft:a,qWidth:s,measureData:t,pageInfo:e});if(l.length>0){const r=n.current===dN.Backward?Math.max(0,i-25):o,u=Math.min(r+25,e.rowsOnCurrentPage),c=B$({startTop:r,endTop:u,qLeft:a,qWidth:s,measureData:t,pageInfo:e});return[...l,...c]}return l},U$=(e,t,n,r,i,o,a,s)=>{const{gridColumnStartIndex:l,gridRowStartIndex:u,gridWidth:c,gridHeight:d}=i;let p=[],f=[];o.current!==dN.None&&(p=G$({pageInfo:r,measureData:n,scrollDirection:o,viewService:i})),a.current!==dN.None&&(f=$$({pageInfo:r,measureData:n,scrollDirection:a,layoutService:t,viewService:i})),o.current===dN.None&&a.current===dN.None&&(p=B$({measureData:n,pageInfo:r,qLeft:l,qWidth:c,startTop:u,endTop:u+d}));const h=e.fetchPages([...p,...f]);s.isDownloadedAsPDForImage&&s.waitForPromise(h)},Y$=function(e){var t,n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,o=0;return function(){t=this;for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];n=s;var u=Date.now()-o,c=function(){o=Date.now(),r=0,e.apply(t,n)};r||(u>=i?c():r=setTimeout(c,i-u))}}(U$,100),K$=wq(U$,75),X$=(e,t,n=!1)=>void 0!==e&&(e.isLeafNode||n&&e.isLeftColumn?e.mainAxisPageCoord===t:e.mainAxisPageCoord+e.leafCount-1===t),J$=({style:e,index:t,isLastRow:n,isLastColumn:r,showLastBorder:i,isLeftColumn:o,showTotalCellDivider:a})=>{const{direction:s}=VF(),{styleService:{grid:{border:l,divider:u}}}=XF();return Yn.jsx("div",{style:{...e,...jN,...$N(n,r,l,s,i),...VN({bottomDivider:a&&o,rightDivider:a&&!o,borderColor:u})},"data-testid":"empty-cell","data-index":t})},Z$=({children:e,verticalAlign:t,width:n,right:r,isLeftColumn:i})=>{const{layoutService:{isIndentModeEnabled:o}}=XF(),a=i&&o;return Yn.jsx("div",{"data-key":"sticky-cell-container",style:{display:"flex",flexDirection:"row",width:n,maxWidth:"100%",maxHeight:"100%",position:"sticky",left:4,top:0,bottom:0,right:r,...!a&&{alignItems:t,alignSelf:t,overflow:"hidden"}},children:e})},Q$=e=>{const{type:t,imageSize:n}=e;return t!==tN.Image||"fill"!==n&&"fitWidth"!==n?"fit-content":"100%"},eH=e=>"number"==typeof e&&!Number.isNaN(+e),tH=e=>"string"==typeof e&&e.length>0||"number"==typeof e?+e:NaN,nH=r((e,t)=>Yn.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:Yn.jsx("path",{d:"M7.5 8.5H2v-1h5.5V2h1v5.5H14v1H8.5V14h-1z"})})),rH=r((e,t)=>Yn.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:Yn.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"})})),iH=r((e,t)=>Yn.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:[Yn.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"}),Yn.jsx("use",{fillRule:"evenodd"})]})),oH=r((e,t)=>Yn.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:Yn.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"})})),aH=r((e,t)=>Yn.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:Yn.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"})})),sH=r((e,t)=>Yn.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:Yn.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"})})),lH=r((e,t)=>Yn.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:Yn.jsx("path",{d:"M2 7.5h12v1H2z"})})),uH=r((e,t)=>Yn.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:Yn.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"})})),cH=r((e,t)=>Yn.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:Yn.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"})})),dH=r((e,t)=>Yn.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:Yn.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"})})),pH=r((e,t)=>Yn.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:Yn.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"})})),fH=r((e,t)=>Yn.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:Yn.jsx("path",{d:"m6 10 7-7 2 2-7 7-2 2-5-5 2-2z"})})),hH=r((e,t)=>Yn.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:Yn.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"})})),mH=r((e,t)=>Yn.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:Yn.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"})})),gH=r((e,t)=>Yn.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:Yn.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"})})),vH={m:fH,"ï":dH,R:r((e,t)=>Yn.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:Yn.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:hH,T:mH,U:gH,P:cH,Q:sH,"è":r((e,t)=>Yn.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:Yn.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"})})),"¢":oH,"©":iH,"23F4":aH,2013:pH,"&":uH,add:nH,"minus-2":lH,dot:rH},yH=({size:e,iconKey:t,color:n,pvStyle:r})=>{const i=t&&vH[t];return i&&Yn.jsx("div",{"data-testid":"representation-indicator-icon",style:{color:n,height:e,...r},children:Yn.jsx(i,{style:{height:e}})})},bH=(e,t)=>e.max===e.min?.5:(t-e.min)/(e.max-e.min),xH=(e,t,n)=>{const r=e.paletteColors?e.paletteColors[t]:e.localPaletteColors[t];return n.getColorPickerColor(r)},SH=(e,t,n)=>{const r={previousColor:(i=e.localPaletteColors)[(o=t)-(o>0?1:0)],nextColor:i[o+(o<i.length-1?1:0)]};var i,o;const a=((e,t)=>{const n=e.limits&&e.limits.concat().sort((e,t)=>e.value-t.value);return{lowerLimit:n&&t>0?n[t-1]:{value:0,gradient:!1},upperLimit:n&&n[t]?n[t]:{value:1,gradient:!1}}})(e,t),s=((e,t,n,r,i)=>{const{upperLimit:o,lowerLimit:a}=e,{previousColor:s,nextColor:l}=t,u=r===o.value?1:(r-a.value)/(o.value-a.value);return a.gradient&&o.gradient?r-a.value<o.value-r?{color:s.color,t:.5-u}:{color:l.color,t:u-.5}:a.gradient?{color:s.color,t:1-(.5+u/2)}:o.gradient?{color:l.color,t:u/2}:{color:i.localPaletteColors[n].color,t:r}})(a,r,t,n,e);return ZO(e.localPaletteColors[t].color??"").blend(ZO(s.color??""),s.t)},wH=(e,t,n)=>{const r=((e,t)=>{const{limits:n}=e;return n&&(e.limits=n.sort((e,t)=>e.value-t.value),e.limits=n.map(e=>({...e,value:bH(t,e.value)}))),e})({...e},t),i=r.paletteColors||r.localPaletteColors;return i&&(r.localPaletteColors=i.concat().map((e,t)=>({color:xH(r,t,n)}))),r},CH=(e,t,n,r)=>{const i=wH(e,n,r),{localPaletteColors:o}=i;if(t<=0)return o[0].color;if(t>=1)return o[o.length-1].color;const a=((e,t)=>{let n="",r=0;const{limits:i,localPaletteColors:o}=e;for(let a=0;a<o.length;a++){const o=i&&i[a]?i[a].value:1;if(t>=r&&t<o){n=SH(e,a,t);break}r=o}return n})(i,t);return a},EH=(e,t)=>{const n=(e=>e.map(e=>e.value??e).sort((e,t)=>e-t))(e),r=n.some(e=>!eH(e));return 0===n.length||r?(e=>{const t=0===e?0:.5*e;return{min:e-t,max:e+t}})(t):1===n.length?((e,t)=>{const n=e[0]-t;if(0===n||!eH(n)){const e=0===t?.5:Math.abs(.5*t);return{min:t-e,max:t+e}}return n>0?{min:t-.5*Math.abs(t),max:e[0]+2*n}:{min:e[0]+2*n,max:t+.5*Math.abs(t)}})(n,t):((e,t)=>{let n=e[e.length-1]-e[0];return n=n>0?n:1,{min:Math.min(t,e[0])-n/2,max:Math.max(t,e[e.length-1])+n/2}})(n,t)},IH=(e,t)=>{const{limits:n}=e.segments;if(!n)return;const r=((e,t)=>{const{min:n,max:r}=EH(e,t),i=Math.abs(t);return{min:n??t-i,max:r??t+i}})(n,t),i=((e,t,n)=>{const{limits:r,paletteColors:i,localPaletteColors:o}=e.segments;if(!r||!eH(t))return 0;let a=n&&eH(n)?Math.min(n,t):0;const s=r.sort((e,t)=>e.value-t.value),l=i||o;for(let e=0;e<l.length;e++){if(e===l.length-1||t<s[e].value&&t>=a)return e;a=s[e].value}return 0})(e,t,r.min);return{limitRange:r,limitPaletteColorIndex:i}},DH=e=>"flex-start"===e?"flex-end":"flex-start",PH=(e,t,n,r)=>{const i=e.indicatorConditionalColoring;if(!i)return;const o=IH(i,t),a=((e,t,n,r)=>{const{segments:i}=e;if(!i||!n)return;const{limits:o}=i;if(!o?.length||!((e,t)=>!(!e||0===e.length||!(e[t]?.gradient??e[t-1]?.gradient)))(o,n.limitPaletteColorIndex))return xH(i,n.limitPaletteColorIndex,r);const a=bH(n.limitRange,t);return CH(i,a,n.limitRange,r)})(i,t,o,r),s=i.segments.paletteColors[o?.limitPaletteColorIndex||0].icon,{indicator:l}=e;let u=l?.position||"right";return"rtl"===n&&(u="right"===u?"left":"right"),{color:a,iconKey:s,position:u}},MH=({representation:e,cellValue:t,textStyle:n})=>{const{styleService:r}=XF(),{theme:i}=UF(),{direction:o}=VF(),{text:a,indicator:s}=e,{showTextValues:l,applySegmentColors:u}=s??{},c=PH(e,t,o,i),{fontSize:d,fontFamily:p,fontStyle:f,fontWeight:h,textDecoration:m}=r.measureValues,g={fontSize:d,fontFamily:p,fontStyle:f,fontWeight:h,textDecoration:m},v=parseInt(d||RN,10),{iconKey:y,color:b,position:x}=c||{},S={display:"flex",paddingTop:2};return l?Yn.jsxs("div",{"data-key":"representation-indicator",style:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"4px",overflow:n?.overflow,color:u?b:n?.color},children:["left"===x&&yH({size:v,iconKey:y,color:b,pvStyle:S}),Yn.jsx("span",{style:{paddingTop:4,overflow:n?.overflow,textOverflow:n?.textOverflow,whiteSpace:"nowrap",direction:t<0?"ltr":void 0,...g},children:a}),"right"===x&&yH({size:v,iconKey:y,color:b,pvStyle:S})]}):(S.paddingTop=5,yH({size:v,iconKey:y,color:b,pvStyle:S}))},RH=e=>!!e.target?.getAttribute("class")?.includes(XA),kH=(e,t)=>{switch(t.type){case"clearSelections":return{engineSelectedCells:null,activeSelection:null,selectedField:null};case"mouseup":return{...e,activeSelection:null,engineSelectedCells:t.payload.engineSelectedCells};case"mousedown":return{...e,activeSelection:t.payload.activeSelection,selectedField:t.payload.selectedField};case"mouseover":{if(!e.activeSelection)return e;const{index:n}=t.payload,r=Math.min(n,e.activeSelection.startIndex),i=Math.max(n,e.activeSelection.endIndex);if(r===e.activeSelection.startIndex&&i===e.activeSelection.endIndex)return e;const o={...e.activeSelection,startIndex:r,endIndex:i};return o.clientSelectedCells=(e=>{const{getCellFromIndex:t,startIndex:n,endIndex:r,clientSelectedCells:i}=e,o=new Map(i);for(let e=n;e<=r;e++){const n=t(e);"N"===n?.ref.qType&&o.set(n.ref.qElemNo,n)}return o})(o),{...e,activeSelection:o}}default:return e}},LH=e=>null!==e.target?.closest("[data-prevent-selection]"),AH=e=>"A"===e.target?.tagName,OH=({startIndex:e,getCellFromIndex:t,cell:n})=>({type:"mousedown",payload:{activeSelection:{startIndex:e,endIndex:e,getCellFromIndex:t,clientSelectedCells:(new Map).set(n.ref.qElemNo,n)},selectedField:{selectionCellType:n.selectionCellType,index:"L"===n.selectionCellType?n.x:n.y}}});const TH=d({createMouseDownHandler:()=>()=>{},createMouseOverHandler:()=>()=>{},createPointerUpHandler:()=>()=>{},isSelected:()=>!1,isActive:!1,isLocked:()=>!1}),qH=()=>i(TH),_H=({children:e,selections:t})=>{const n=function(e){const{updatePageInfo:t}=VF(),n=e.isActive(),[r,i]=p(kH,{engineSelectedCells:null,selectedField:null,activeSelection:null});f(()=>{const n=()=>{i({type:"clearSelections"})},r=()=>{n(),t({page:0})};return e.on("deactivated",n),e.on("canceled",n),e.on("confirmed",r),e.on("cleared",n),()=>{e.removeListener("deactivated",n),e.removeListener("canceled",n),e.removeListener("confirmed",r),e.removeListener("cleared",n)}},[e,t]);const o=m(async()=>{if(!r.activeSelection)return;var t,n;1===r.activeSelection.clientSelectedCells.size&&(t=r.engineSelectedCells,(n=r.activeSelection).clientSelectedCells.forEach((e,r)=>{t?.has(r)&&(n.clientSelectedCells.delete(r),t.delete(r))}));const o=new Map([...r.engineSelectedCells??new Map,...r.activeSelection.clientSelectedCells]);try{i({type:"mouseup",payload:{engineSelectedCells:o}}),await e.select({method:"selectPivotCells",params:[QF,Array.from(o,([,e])=>({qType:e.selectionCellType,qRow:e.y,qCol:e.x}))]})}catch(e){console.error(e),i({type:"mouseup",payload:{engineSelectedCells:r.engineSelectedCells}})}},[r,e]);f(()=>{if(r.activeSelection)return document.addEventListener("mouseup",o),()=>{document.removeEventListener("mouseup",o)}},[o,r.activeSelection]);const a=m((e,t)=>n=>{const r=t(e);RH(n)||LH(n)||AH(n)||!(e=>1===e.buttons)(n)||!r||i(OH({startIndex:e,getCellFromIndex:t,cell:r}))},[]),s=m(t=>async()=>{r.activeSelection&&(e.isActive()||await e.begin([QF]),i({type:"mouseover",payload:{index:t}}))},[r.activeSelection,e]),l=m((e,t)=>n=>{if("touch"!==n.pointerType)return;const r=t(e);RH(n)||LH(n)||AH(n)||!r||(i(OH({startIndex:e,getCellFromIndex:t,cell:r})),o())},[o]),u=m(e=>!(!r.engineSelectedCells?.size&&!r.activeSelection?.clientSelectedCells.size||!r.selectedField||e.selectionCellType===r.selectedField.selectionCellType&&("L"===e.selectionCellType?r.selectedField.index===e.x:r.selectedField.index===e.y)),[r.activeSelection?.clientSelectedCells.size,r.engineSelectedCells?.size,r.selectedField]),c=m(e=>!u(e)&&(r.engineSelectedCells?.has(e.ref.qElemNo)||!!r.activeSelection?.clientSelectedCells.has(e.ref.qElemNo)),[u,r.activeSelection?.clientSelectedCells,r.engineSelectedCells]);return y(()=>({isSelected:c,isActive:n,isLocked:u,createMouseDownHandler:a,createMouseOverHandler:s,createPointerUpHandler:l}),[c,n,u,a,s,l])}(t);return Yn.jsx(TH.Provider,{value:n,children:e})},NH=e=>"fill"===e.representation.imageSize,jH=(e,t)=>{let n=e.isLeftColumn?"flex-start":"center";return e.isLeftColumn&&NH(e)&&t&&(n="center"),e.representation.type!==tN.Image||NH(e)?n:e.representation.resolvedImagePosition?.vertical};var FH=function(e){return e.Background="background",e.Color="color",e.FontWeight="fontWeight",e.FontStyle="fontStyle",e.TextDecoration="textDecoration",e}(FH||{});const zH={brighter:.5,darker:.3,opacity:.03},WH=(e,{cell:t,styleService:n})=>{if(e===FH.Background||e===FH.Color){const n=t.expressionColor[e];if(n)return n}return t.isNull?n.nullValues[e]:t.isPseudoDimension?n.measureLabels[e]:t.isTotal?n.totalValues[e]:n.dimensionValues[e]},$H=({styleService:e,isCellSelected:t,cell:n,isCellLocked:r})=>{if(t)return e.selectedColors.background;const i=WH(FH.Background,{cell:n,styleService:e});return!r||!i||n.isPseudoDimension||n.isEmpty||n.isNull||n.isTotal?WH(FH.Background,{cell:n,styleService:e}):`repeating-linear-gradient(\n -45deg,\n ${Aq(o=i,zH)} 0px 2px,\n ${o} 0px 4px\n ) border-box`;var o},HH=({cell:e,styleService:t,isCellSelected:n})=>n?t.selectedColors.color:WH(FH.Color,{cell:e,styleService:t}),VH=({cell:e,styleService:t})=>{const{qCanCollapse:n,qCanExpand:r}=e.ref,i=WH(FH.FontWeight,{cell:e,styleService:t});return void 0===i&&(r||n)?LN:i},BH=({cell:e,styleService:t})=>WH(FH.FontStyle,{cell:e,styleService:t}),GH=({cell:e,styleService:t})=>WH(FH.TextDecoration,{cell:e,styleService:t}),UH=e=>e?"pointer":"default",YH=({expandOrCollapse:e,cell:t})=>n=>{e?.(t.y,t.x),n.stopPropagation()},KH=(e,t)=>{if(!e.isLeftColumn||e.representation.type===tN.Image)return{padding:4};return{padding:4,marginTop:t.dimensionValueTextHeight/2-6.5-4}},XH=({cell:e,isLeftColumn:t,isCellSelected:n})=>{const{styleService:r,layoutService:i}=XF(),{interactions:o}=UF(),{isActive:a}=qH(),{dataModel:s}=bW();if(!e.ref.qCanExpand&&!e.ref.qCanCollapse)return null;const l=!o.active||a||!s,u=HH({cell:e,styleService:r,isCellSelected:n}),c=a?.4:1,d=e.ref.qCanExpand?tF:eF;let p;p=e.ref.qCanExpand?t?s.expandLeft:s.expandTop:t?s.collapseLeft:s.collapseTop;const f=IW({isLeftColumn:t,layoutService:i,representation:e.representation});return Yn.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,...KH(e,r),...f&&{alignSelf:jH(e)}},onClick:l?void 0:YH({cell:e,expandOrCollapse:p})})},JH=e=>{switch(e){case"fitHeight":case"fill":case"alwaysFit":return"100%";case"originalSize":return"fit-content";default:return"auto"}},ZH=(e,t,n)=>{if("alwaysFit"===e&&t&&!n)return"fit-content";switch(e){case"fitHeight":return"auto";case"originalSize":return"fit-content";case"alwaysFit":return n?"unset":"100%";default:return"100%"}},QH=(e,t)=>{if("alwaysFit"===e)switch(t?.vertical){case"flex-start":return"center top";case"flex-end":return"center bottom";default:return"center center"}},eV=({representation:e,canExpandOrCollapse:t,leafCount:n,isLeftColumn:r,styleService:i,layoutService:o,isMeasureCell:a})=>{const{isIndentModeEnabled:s}=o,l=IW({isLeftColumn:r,layoutService:o,representation:e}),u=t?21:0,c=e.imageBox?.width??24;let d=`calc(100% - ${u}px)`,p=i.headerCellHeight;r&&l&&(d=c),(a||r)&&(p=i.contentCellHeight);let f=p;switch(r&&void 0!==n&&!s&&(f=p*Math.max(n,1)),e.imageSize){case"originalSize":return{maxWidth:d,maxHeight:f,...l?{width:d}:{}};case"fitWidth":return{width:d,maxHeight:f};case"fitHeight":return{height:f,maxWidth:d,...l?{width:d}:{}};case"fill":return{height:f,width:d};default:return{width:d,height:p}}},tV=e=>{if("alwaysFit"===e)return"contain"},nV=({suffix:e,delimeter:t})=>` ${e?t:""} ${e}`.trim(),rV=({imageSize:e,resolvedImagePosition:t,isImagesInIndentModeEnabled:n,isMeasureCell:r})=>({width:ZH(e,n,r),height:JH(e),objectFit:tV(e),objectPosition:QH(e,t),...n&&"alwaysFit"===e?{"max-width":"100%"}:{}}),iV=({representation:e,textStyle:t,isMeasureCell:n})=>{const{imageRef:r,onLoad:i}=(()=>{const{downloadService:e}=XF(),t=u(null),{promise:n,resolve:r}=y(()=>QN(),[]);return f(()=>(e.isDownloadedAsPDForImage&&(e.waitForPromise(n),t.current?.complete&&r()),()=>{r()}),[t,e,n,r]),{onLoad:m(()=>{r()},[r]),imageRef:t}})(),{layoutService:{isIndentModeEnabled:o}}=XF(),{url:a,text:s,imageSize:l,resolvedImagePosition:c}=e,{overflow:d,...p}=t;return Yn.jsx("img",{src:a,alt:s,style:{...rV({imageSize:l,resolvedImagePosition:c,isImagesInIndentModeEnabled:o,isMeasureCell:n}),...p},onLoad:i,ref:r})},oV=({representation:e,textStyle:t,canExpandOrCollapse:n,leafCount:r,isLeftColumn:i=!1,imageContainerHorizontalAlignment:o,isMeasureCell:a})=>{const{styleService:s,layoutService:l}=XF(),{resolvedImagePosition:u}=e;return Yn.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",...eV({representation:e,canExpandOrCollapse:n,leafCount:r,styleService:s,layoutService:l,isLeftColumn:i,isMeasureCell:a})},children:Yn.jsx(iV,{representation:e,textStyle:t,isMeasureCell:!0})})},aV=(e,t,n)=>{if(e?.auto)return t;switch(e?.align){case"center":return"center";case"left":return"rtl"===n?"flex-end":"flex-start";case"right":return"rtl"===n?"flex-start":"flex-end";default:return t}},sV=(e,t)=>{let{textAlign:n}=t.getDimensionInfo(e.dimensionInfoIndex)??{};return e.isPseudoDimension&&void 0!==e.visibleMeasureInfoIndex&&({labelTextAlign:n}=t.visibleMeasureInfo.at(e.visibleMeasureInfoIndex)??{}),n?.auto||void 0===n?"left":n.align},lV={display:"flex",flexDirection:"row",alignItems:"center"},uV={alignItems:"center",display:"flex",flexDirection:"row",backgroundClip:"padding-box"},cV=(e,t,n,r)=>t?{...uV,...e.nullValues}:n?{...lV,color:e.totalValues.color,background:r??e.totalValues.background}:{...lV,color:e.measureValues.color,background:r??e.measureValues.background},dV=(e,t,n,r,i)=>{const{fontFamily:o,fontSize:a}=e.measureValues,s={...FN,...!n&&zN(e.grid.lineClamp),...t&&{color:t},fontFamily:o,fontSize:a};if(i){const{fontWeight:t,fontStyle:n,textDecoration:r}=e.nullValues;return{...s,fontWeight:t,fontStyle:n,textDecoration:r}}if(r){const{fontWeight:t,fontStyle:n,textDecoration:r}=e.totalValues;return{...s,fontWeight:t,fontStyle:n,textDecoration:r}}const{fontWeight:l,fontStyle:u,textDecoration:c}=e.measureValues;return{...s,fontWeight:void 0===l?LN:l,fontStyle:u,textDecoration:c}},pV=({cell:e,representation:t,color:n,isTotalValueCell:r,cellHorizontalAlignment:i})=>{const{layoutService:o,styleService:a}=XF(),{isIndentModeEnabled:s}=o,l=e.isNull?o.getNullValueText():t.text,u=t.type===tN.Image,c=t.type===tN.Indicator,d=eH(tH(l)),p=dV(a,n,d,r,e.isNull);if(!s&&u&&!e.isNull||s&&u&&!e.isNull)return Yn.jsx(oV,{isMeasureCell:!0,textStyle:p,representation:t,imageContainerHorizontalAlignment:i});const f=tH(e.isNull?t.text:e.ref.qNum);return c&&eH(f)?Yn.jsx(MH,{representation:t,cellValue:f,textStyle:p}):Yn.jsx("span",{style:{padding:4,direction:d?"ltr":void 0,...p},children:l})},fV=(e,t)=>e?.[t]?.visibleMeasureInfoIndex??0,hV="flex-start",mV=(e,t)=>e.isNull?hV:t.type===tN.Image&&"fill"!==t.imageSize?t.resolvedImagePosition?.vertical:hV,gV=({columnIndex:e,rowIndex:t,style:n,data:r})=>{const{env:i}=UF(),{pageInfo:o,direction:a}=VF(),{styleService:s,layoutService:l}=XF(),{attrExprInfoIndexes:u,gridSectionsData:{measureData:c,leftDimensionData:d,topDimensionData:p},visibleDimensionsInfo:{visibleLeftDimensionInfo:f,visibleTopDimensionInfo:h}}=bW(),g=(()=>{const{layoutService:{isIndentModeEnabled:e}}=XF(),{gridSectionsData:{leftDimensionData:t,topDimensionData:n},visibleDimensionsInfo:{visibleLeftDimensionInfo:r,visibleTopDimensionInfo:i}}=bW(),o=r.length,a=i.length;return m((r,i)=>!(!n.grid.at(a-1)?.[r]?.isTotal&&!t.grid.at(e?0:o-1)?.[i]?.isTotal),[n,t,o,a,e])})(),v=(()=>{const{gridSectionsData:{topDimensionData:e},visibleDimensionsInfo:{visibleTopDimensionInfo:t}}=bW(),n=t.length;return m(t=>{const r=e.grid.at(n-1)?.[t];return X$(r,e.totalDividerIndex)},[e,n])})(),y=(()=>{const{layoutService:{isIndentModeEnabled:e}}=XF(),{gridSectionsData:{leftDimensionData:t},visibleDimensionsInfo:{visibleLeftDimensionInfo:n}}=bW(),r=n.length;return m(n=>{const i=e?0:r-1,o=t.grid.at(i)?.[n];return X$(o,t.totalDividerIndex,e)},[t,e,r])})(),{showLastBorder:b}=r,x=p.grid.at(h.length-1),S=d.grid.at(f.length-1),{background:w}=s.measureValues,C=c[t]?.[e],E=t===o.rowsOnCurrentPage-1,I=e===l.size.x-1;if(!C)return Yn.jsx(J$,{style:{...n,background:w},isLastRow:E,isLastColumn:I,showLastBorder:b,index:t,isLeftColumn:!1,showTotalCellDivider:!1});const D=l.hasPseudoDimOnLeft?fV(S,t):fV(x,e),P=l.visibleMeasureInfo[D],M=Jz({cell:C.ref,representationProperties:P.representation,attrExprInfoIndex:u.measures[D],env:i,direction:a,conditionalColoring:P.conditionalColoring,enabledFeatures:{[tN.Image]:!0,[tN.Indicator]:!0}}),R=!C.isNull&&g(e,t),k=C.isNull?l.getNullValueText():M.text,L=!C.isNull||!Number.isNaN(+k),A=Zz(u.measures[D],C.ref),O=((e,t,n,r,i)=>{const{textAlign:o}=t,a=r?"flex-end":"center";return e.isNull||n.type!==tN.Image?aV(o,a,i):n.resolvedImagePosition?.horizontal??"center"})(C,P,M,L,a),T={...cV(s,C.isNull,R,A.background),...$N(E,I,s.grid.border,a,b),...VN({bottomDivider:y(t),rightDivider:v(e),borderColor:s.grid.divider}),...jN,padding:"0px 4px",display:"flex",justifyContent:O};return Yn.jsx("div",{className:YA,title:k,style:{...T,...n},"data-testid":"measure-value","data-row-index":t,"data-col-index":e,children:Yn.jsx(Z$,{width:Q$(M),verticalAlign:mV(C,M),children:Yn.jsx(pV,{cell:C,representation:M,isTotalValueCell:R,color:A.color,cellHorizontalAlignment:O})})})};var vV=o.memo(gV,q$);const yV=(e,t)=>t.list[e]?.id??e.toString(),bV=({columnIndex:e,rowIndex:t,data:n})=>n.grid[t]?.[e]?.id??`${t}-${e}`,xV=e=>({...NN,overflow:"hidden",boxSizing:"content-box",borderWidth:"rtl"===e?"1px 1px 0px 0px":"1px 0px 0px 1px"}),SV=({dataGridRef:e,height:t,rowHightCallback:n,width:r,showLastBorder:i,getRightGridColumnWidth:o,verticalScrollDirection:a,horizontalScrollDirection:s})=>{const{pageInfo:l,direction:u}=VF(),{layoutService:c,styleService:{grid:{divider:d},contentCellHeight:p}}=XF(),{dataModel:f,gridSectionsData:{measureData:h}}=bW(),g={...xV(u),borderColor:d,willChange:"auto",userSelect:"none",WebkitUserSelect:"none"},y=(({verticalScrollDirection:e,horizontalScrollDirection:t})=>{const{pageInfo:n}=VF(),{downloadService:r,viewService:i,layoutService:o}=XF(),{dataModel:a,gridSectionsData:{leftDimensionData:s,topDimensionData:l,measureData:u}}=bW(),c=s.columnCount,d=l.rowCount;return m(({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===dN.None?0:_$),m=i.gridHeight+d+(e.current===dN.None?0:_$);let g=Y$;m*h>1500&&(g=K$),g(a,o,u,n,i,e,t,r)},[i,o,a,u,e,t,n,c,d,r])})({verticalScrollDirection:a,horizontalScrollDirection:s});return vj(()=>{e.current&&e.current.resetAfterColumnIndex(0,!1)},[e,f,h]),v(()=>{e.current&&e.current.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!0})},[r,t,e,p,u]),0===c.size.x?null:Yn.jsx(C$,{"data-section-id":"DATA_GRID",ref:e,style:g,columnCount:c.size.x,columnWidth:o,height:t,rowCount:l.rowsOnCurrentPage,rowHeight:n,width:r,itemData:{showLastBorder:i,grid:h},onItemsRendered:y,estimatedRowHeight:n(),estimatedColumnWidth:o(),itemKey:bV,direction:u,children:vV})};var wV=x(SV);const CV=r((e,t)=>Yn.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:[Yn.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"}),Yn.jsx("use",{fillRule:"evenodd"})]})),EV=e=>{const[t,n]=ix(BW);return vj(()=>{n(!1)},e),{isAdjustingWidth:t,setIsAdjustingWidth:n}},IV=()=>{const[e,t]=g(!1),{dataModel:n}=bW(),{interactions:r}=UF(),{isAdjustingWidth:i,setIsAdjustingWidth:o}=EV([n]);return{open:e,setOpen:t,handleOpenMenu:e=>{!r.active||RH(e)||i||t(!0)},isAdjustingWidth:i,setIsAdjustingWidth:o}};function DV(e,t){const n=t.expressionColor?.background??e.dimensionValues.background,r=t.isLeftColumn?e.header.background:n,i=r===TN.Transparent?jO.WHITE:r,o=ZO(e.grid.border),a=ZO(i);return a.isInvalid()||o.isInvalid()||1===o.a?e.grid.border:function(e,t,n){return ZO(e.r+(t.r-e.r)*n,e.g+(t.g-e.g)*n,e.b+(t.b-e.b)*n,e.a+(t.a-e.a)*n)}(a,o,o.a).getRGB()}const PV=({cellInfo:e,columnWidth:t,isLastColumn:n,overrideLeftGridWidth:r,setIsAdjustingWidth:i,shouldApplyIndentModeColumnWidth:o,tableWidth:a})=>{const{direction:s}=VF(),{interactions:l,translator:u}=UF(),{isActive:c}=qH(),{dataModel:d}=bW(),{styleService:p}=XF(),[,f]=g({});if(!(e.canBeResized&&!!l.active&&!c))return null;const h=DV(p,e);return Yn.jsx(Cj,{isPivot:!0,columnWidth:t,isLastColumn:n,keyValue:`adjuster-${e.dimensionInfoIndex}`,hoverColor:h,updateWidthCallback:t=>{f({}),r&&void 0!==e.colIdx&&r(t,e.colIdx)},confirmWidthCallback:t=>{o?d.applyIndentModeColumnWidth({...t,pixels:Math.min((a??0)*CW,t.pixels??0)}):d.applyColumnWidth(t,e)},setIsAdjustingWidth:i,isLeftColumn:e.isLeftColumn,accessibilityRelatedArgs:{translator:u,columnLabel:e.label??""},direction:s})},MV=Ta(xl,{shouldForwardProp:e=>!["interactions","hoverBackground","background","shouldShowMenuIcon","isDimension"].includes(e)})(({interactions:e,background:t,hoverBackground:n,shouldShowMenuIcon:r,isDimension:i})=>({pointerEvents:i?"all":"none",position:"relative",display:"grid",gridTemplateColumns:r?"1fr 12px":"1fr",gap:8,alignItems:"center",cursor:e.active?"pointer":"default",background:t,"&&:hover":{background:e.active&&i?n:t}})),RV=Ta("div",{shouldForwardProp:e=>!["direction"].includes(e)})(({direction:e})=>({position:"absolute",left:"rtl"!==e?0:void 0,bottom:0})),kV=Ta("div",{shouldForwardProp:e=>"justifyContent"!==e})(({justifyContent:e})=>({..._N,justifyContent:e??_N.justifyContent,flexDirection:"row",overflow:"hidden",position:"relative",gap:8})),LV=Ta("div")(()=>({..._N})),AV=Ta("div",{shouldForwardProp:e=>!["fontSize","fontFamily","fontWeight","fontStyle","textDecoration","justifyContent"].includes(e)})(({fontSize:e,fontFamily:t,fontWeight:n,fontStyle:r,textDecoration:i,justifyContent:o})=>({display:"flex",justifyContent:o,alignSelf:"center",flexGrow:1,maxWidth:"100%",fontWeight:n,fontSize:e,fontFamily:t,fontStyle:r,textDecoration:i})),OV=Ta(qc)(({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}})),TV=Ta(zc,{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}}})),qV=Ta("span")({textOverflow:"ellipsis",overflow:"hidden"}),_V=Ta("div",{shouldForwardProp:e=>"visible"!==e})(({visible:e})=>({opacity:e?1:0,width:SW,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"})),NV=Ta("span",{shouldForwardProp:e=>!["padding","alignSelf"].includes(e)})(({padding:e,alignSelf:t})=>({padding:e,alignSelf:t,position:"sticky",top:0}));let jV=function(e){return e.Expand="Expand",e.Collapse="Collapse",e}({});const FV=(e,t)=>({qExcludeList:t===jV.Expand,qPos:{qDimName:e,qElemNo:[]}}),zV=`${QF}/qExpansionState`,WV=({model:e,qExpansionState:t,qEffectiveDimensionName:n,action:r})=>async()=>{const i=(({qEffectiveDimensionName:e,oldExpansionState:t,action:n})=>{const r=t?.findIndex(t=>t.qPos?.qDimName===e);return{expansionData:FV(e,n),index:r}})({qEffectiveDimensionName:n,oldExpansionState:t,action:r});await(async({model:e,newExpansionState:t,errorMsg:n})=>{const{index:r,expansionData:i}=t;try{let t,n=zV,o="Add";void 0===r?t=JSON.stringify([i]):-1===r?(n=`${zV}/-`,t=JSON.stringify(i)):(n=`${zV}/${r}`,o="Replace",t=JSON.stringify(i)),await e.applyPatches([{qPath:n,qOp:o,qValue:t}],!0)}catch(e){console.error(n,e)}})({model:e,newExpansionState:i,errorMsg:`Failed to ${r} dimension`})},$V=({model:e,effectivePropertiesService:t,cell:n})=>{if(void 0===n.qEffectiveDimensionName)return;const r={model:e,qExpansionState:t.qExpansionState,qEffectiveDimensionName:n.qEffectiveDimensionName};return{expandCallback:WV({...r,action:jV.Expand}),collapseCallback:WV({...r,action:jV.Collapse}),alwaysFullyExpanded:t.qAlwaysFullyExpanded}},HV={[uF.Sorting]:!0,[uF.Selections]:!0,[uF.Searching]:!0},VV=({cell:e,style:t,isFirstColumn:n,isLastColumn:r,isLastRow:i,changeSortOrder:o,iconsVisibilityStatus:a,columnWidth:s,overrideLeftGridWidth:l,shouldApplyIndentModeColumnWidth:c,tableWidth:d})=>{const p=u(null),{styleService:f,layoutService:h,effectivePropertiesService:m}=XF(),{app:g,interactions:v,embed:y,translator:b,model:x,env:S}=UF(),{fontSize:w,fontFamily:C,fontStyle:E,fontWeight:I,textDecoration:D,color:P,background:M,hoverBackground:R,activeBackground:k}=f.header,L=u(null),{shouldShowLockIcon:A,shouldShowMenuIcon:O}=a,{open:T,setOpen:q,handleOpenMenu:_,setIsAdjustingWidth:N}=IV(),{direction:j}=VF(),F={sortFromMenu:async(t,n)=>{t.stopPropagation(),await o(e,n)}},z={embed:y,listboxRef:p,sortCriteria:h.searchSortFromDimension&&e.isDim?m.getSortCriteriaForDimension(e.dimensionInfoIndex):void 0},W={app:g,qStateName:h.layout.qStateName},{labelTextAlign:$}=h.getDimensionInfo(e.dimensionInfoIndex)??{},H=aV($,"flex-start",j);return Yn.jsxs(MV,{className:YA,title:e.label,interactions:v,background:T?k:M,hoverBackground:R,shouldShowMenuIcon:O,isDimension:e.isDim,style:{...t,...jN,...HN(e,i,n,r,f.grid.border,j),color:P},"data-testid":"title-cell",onClick:_,children:[Yn.jsxs(kV,{children:[A?Yn.jsx(LV,{children:Yn.jsx(CV,{height:12})}):null,Yn.jsx(AV,{fontFamily:C,fontSize:w,fontStyle:E,fontWeight:I,textDecoration:D,justifyContent:H,children:Yn.jsx("span",{style:S.flags.isEnabled("VNA-135-WRAP_HEADER_TEXT")?{...FN,...zN(f.grid.columnLineClamp)}:FN,children:e.label})})]}),e.isDim?Yn.jsxs(Yn.Fragment,{children:[Yn.jsx(pF,{headerData:e,translator:b,anchorRef:L,open:T,setOpen:q,interactions:v,menuAvailabilityFlags:HV,sortRelatedArgs:F,searchRelatedArgs:z,selectionRelatedArgs:W,expandOrCollapseArgs:$V({model:x,effectivePropertiesService:m,cell:e}),shouldShowMenuIcon:O,model:x&&"setActiveField"in x?x:void 0,direction:j,isAccessibleHeader:!0}),Yn.jsx(RV,{ref:p,direction:j}),Yn.jsx(RV,{ref:L,direction:j})]}):null,Yn.jsx(PV,{cellInfo:{...e,isLeftColumn:!0},columnWidth:s,isLastColumn:r,overrideLeftGridWidth:l,setIsAdjustingWidth:N,shouldApplyIndentModeColumnWidth:c,tableWidth:d})]})},BV=({rowSpan:e,columnSpan:t})=>{const{styleService:n}=XF(),{direction:r}=VF();return e>0&&t>0?Yn.jsx("div",{style:{...NN,gridRowStart:1,gridRowEnd:`span ${e}`,gridColumnStart:1,gridColumnEnd:`span ${t}`,borderWidth:"rtl"===r?"0px 0px 0px 1px":"0px 1px 0px 0px",borderColor:n.grid.border,background:n.grid.background},"data-testid":"empty-header-cell"}):null},GV=r((e,t)=>Yn.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:Yn.jsx("path",{d:"m8 9 4.5-4.5L14 6l-4.5 4.5L8 12 2 6l1.5-1.5z"})})),UV=r((e,t)=>Yn.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:[Yn.jsx("path",{d:"m8 7-4.5 4.5L2 10l6-6 6 6-1.5 1.5z"}),Yn.jsx("use",{fillRule:"evenodd"})]})),YV=({tableWidth:e,leftGridWidth:t,overrideLeftGridWidth:n})=>{const{direction:r}=VF(),{styleService:i}=XF(),{interactions:o,translator:a}=UF(),{isActive:s}=qH(),{dataModel:l}=bW(),{setIsAdjustingWidth:u}=EV([l]);if(!(!!o.active&&!s))return null;const c=DV(i,{isLeftColumn:!0});return Yn.jsx(Cj,{isPivot:!0,isLastColumn:!0,isLeftColumn:!0,keyValue:"adjuster-indent-row",hoverColor:c,columnWidth:t,updateWidthCallback:t=>{n(Math.min(t,e*CW))},confirmWidthCallback:r=>{if(r.type===ZA.FitToContent)return void l.applyIndentModeColumnWidth({type:ZA.Auto});const i=Math.min(r.pixels??t,e*CW);n(i),l.applyIndentModeColumnWidth({type:ZA.Pixels,pixels:i})},setIsAdjustingWidth:u,accessibilityRelatedArgs:{translator:a,columnLabel:a.get("SNPivotTable.IndentMode.Rows")},direction:r})},KV=r((e,t)=>Yn.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:Yn.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"})})),XV=({cell:e,changeSortOrder:t})=>{const n=u(null),r=u(null),{app:i,interactions:o,embed:a,translator:s,model:l}=UF(),{layoutService:c,effectivePropertiesService:d}=XF(),{open:p,setOpen:f,handleOpenMenu:h}=IV();return Yn.jsxs(TV,{onClick:h,isActive:p,children:[Yn.jsx(qV,{children:e.label}),Yn.jsxs(_V,{className:"indent-mode-dropdown-more",visible:p,children:[Yn.jsx(KV,{}),e.isDim?Yn.jsxs(Yn.Fragment,{children:[Yn.jsx(pF,{headerData:e,translator:s,anchorRef:n,open:p,setOpen:f,interactions:o,menuAvailabilityFlags:HV,sortRelatedArgs:{sortFromMenu:async(n,r)=>{n.stopPropagation(),await t(e,r)}},searchRelatedArgs:{embed:a,listboxRef:r},selectionRelatedArgs:{app:i,qStateName:c.layout.qStateName},expandOrCollapseArgs:$V({model:l,effectivePropertiesService:d,cell:e}),shouldShowMenuIcon:!1,model:l&&"setActiveField"in l?l:void 0}),Yn.jsx(RV,{ref:r}),Yn.jsx(RV,{ref:n})]}):null]})]})},JV=({idx:e,menu:t,menuItems:n,isOnlyOneRow:r})=>{const i=n.at(-1)?.id===tz,o=e+1<n.length&&n[e+1]?.id===tz;return!(r&&i&&o)&&(t?.id!==tz&&e<n.length-1)},ZV=({menuItems:e,changeSortOrder:t,overrideLeftGridWidth:n,leftGridWidth:r,tableWidth:i})=>{const{styleService:o}=XF(),{interactions:a,translator:s}=UF(),{dataModel:l,gridSectionsData:{headersData:c}}=bW(),[d,p]=g(!1),f=u(null),{headerCellHeight:h}=o,{color:m,background:v,hoverBackground:y,activeBackground:b,fontFamily:x,fontSize:S,fontStyle:w,fontWeight:C,textDecoration:E}=o.header,{isAdjustingWidth:I}=EV([l]),D=e=>{e.stopPropagation()},P={height:h,gridColumn:`1 / span ${c.size.x}`,gridRow:c.size.y,zIndex:c.size.x-0};return Yn.jsxs(MV,{isDimension:!0,background:d?b:v,interactions:a,hoverBackground:y,style:{...P,...jN,color:m},onClick:e=>{!a.active||RH(e)||I||p(!d)},"data-testid":"indentModeHeaderCellWrapper",children:[Yn.jsxs(kV,{justifyContent:"flex-start",children:[Yn.jsx(AV,{fontFamily:x,fontSize:S,fontStyle:w,fontWeight:C,textDecoration:E,justifyContent:"flex-start",children:Yn.jsx("span",{style:FN,children:s.get("SNPivotTable.IndentMode.Rows")})}),d?Yn.jsx(UV,{}):Yn.jsx(GV,{}),Yn.jsx(RV,{ref:f})]}),Yn.jsx(OV,{open:d,anchorEl:f.current,disableEnforceFocus:!0,children:e.map((n,r)=>[n&&n.id!==tz&&Yn.jsx("li",{role:"presentation",onClick:D,onKeyDown:D,children:Yn.jsx(XV,{cell:n,changeSortOrder:t})}),JV({idx:r,menu:n,menuItems:e,isOnlyOneRow:1===c.size.y})&&Yn.jsx(Mj,{"data-testid":"group-divider",variant:"middle"})])}),Yn.jsx(YV,{tableWidth:i,leftGridWidth:r,overrideLeftGridWidth:n})]})},QV=({layoutService:e,headersData:t,topRowIndex:n})=>e.isIndentModeEnabled&&t.size.x>1&&n+1===t.size.y,eB={display:"grid",width:"fit-content"},tB=({tableWidth:e,leftGridWidth:t,columnWidths:n,rowHight:r,changeSortOrder:i,getHeaderCellsIconsVisibilityStatus:o,height:a,overrideLeftGridWidth:s})=>{const{layoutService:l}=XF(),{gridSectionsData:{headersData:u}}=bW();return Yn.jsxs("div",{"data-testid":"HEADER_GRID",style:{...eB,gridTemplateColumns:n.map(e=>`${e}px`).join(" "),gridTemplateRows:u.data.map(()=>`${r}px`).join(" "),height:a},children:[u.size.y>1&&Yn.jsx(BV,{columnSpan:u.size.x-1,rowSpan:u.size.y-1}),u.data.map((a,c)=>{let d=[];if(QV({layoutService:l,headersData:u,topRowIndex:c})){const n=a.at(0);return Array.isArray(n)&&d.push(Yn.jsx(ZV,{menuItems:n,changeSortOrder:i,overrideLeftGridWidth:s,leftGridWidth:t,tableWidth:e},n.at(0)?.id)),d}return d=a.reduce((t,a,d)=>{if(a&&!Array.isArray(a)){const p=o(d,a.isLocked,a.label),f=l.isIndentModeEnabled&&1===u.size.x;t.push(Yn.jsx(VV,{style:{width:n[d],height:r,gridColumn:l.isIndentModeEnabled&&u.size.x>1?2:d+1,gridRow:c+1,zIndex:u.size.x-d},isLastRow:c===u.size.y-1,isFirstColumn:0===d,isLastColumn:d===u.size.x-1,changeSortOrder:i,cell:a,iconsVisibilityStatus:p,columnWidth:n[d],overrideLeftGridWidth:s,shouldApplyIndentModeColumnWidth:f,tableWidth:e},a.id))}return t},[]),d})]})};var nB=x(tB);const rB=(e,t,n,r)=>{const{layoutService:i}=XF();v(()=>{e.current?.forEach(e=>e?.resetAfterIndex(0,!0))},[e,t,n,r,i])},iB=(e,t)=>{vj(()=>{e.current?.forEach(e=>e?.resetAfterIndex(0,!1))},[e,t])},oB=(e,t)=>{const{isLast:n,list:r,listValues:i}=t;return n?r[e]:i[e]},aB=(e,t,n,r,i)=>{if(i)return;const o=e.representation,a=IW({isLeftColumn:n,layoutService:t,representation:o}),s=n?"flex-start":"center",l=e.representation.resolvedImagePosition?.horizontal;if(e.representation.type===tN.Image)return a&&l&&"center"!==l&&"rtl"===r?DH(l):l??s;if(e.isPseudoDimension&&void 0!==e.visibleMeasureInfoIndex){const{labelTextAlign:n}=t.visibleMeasureInfo[e.visibleMeasureInfoIndex]??{};return aV(n,s,r)}const{textAlign:u}=t.getDimensionInfo(e.dimensionInfoIndex)??{};return aV(u,s,r)},sB=()=>{},lB=({children:e,reactWindowStyle:t,cell:n,data:r,showTotalCellDivider:i,isLastRow:o,isLastColumn:a,isLeftColumn:s,isCellSelected:l,isAdjustingWidth:u,index:c})=>{const{styleService:d,layoutService:p}=XF(),{interactions:f}=UF(),{direction:h}=VF(),{isLocked:m,createMouseDownHandler:g,createMouseOverHandler:v,createPointerUpHandler:y}=qH(),{showLastBorder:b}=r,x=m(n)||n.isLockedByDimension,S=!(x||!f.active||!f.select||n.isEmpty||n.isNull||n.isPseudoDimension||n.isTotal||u),w=S?g(c,e=>oB(e,r)):void 0,C=S?v(c):void 0,E=S?y(c,e=>oB(e,r)):void 0,I=IW({isLeftColumn:s,layoutService:p,representation:n.representation});return Yn.jsx("div",{className:YA,title:f.passive?n.representation.text:void 0,style:{...t,...$N(o,a,d.grid.border,h,b),...VN({bottomDivider:i&&s,rightDivider:i&&!s,borderColor:d.grid.divider}),...jN,padding:"rtl"===h?"0px 0px 0px 4px":"0px 4px",cursor:UH(S),background:$H({styleService:d,isCellSelected:l,cell:n,isCellLocked:x}),zIndex:s?void 0:p.size.x-n.x,justifyContent:aB(n,p,s,h,I),display:"flex",...p.isIndentModeEnabled&&s&&{["rtl"===h?"paddingRight":"paddingLeft"]:Math.max(4,24*(n.indentLevel??0))},textAlign:sV(n,p)},"aria-hidden":"true",onMouseDown:w,onMouseOver:C,onPointerUp:E,onKeyUp:sB,role:"button",tabIndex:-1,"data-testid":"dimension-cell","data-x":n.x,"data-page-x":n.pageX,"data-y":n.y,"data-page-y":n.pageY,"data-cell-type":n.ref.qType,"data-dimension-info-index":n.dimensionInfoIndex,children:e})},uB=e=>{e.stopPropagation()},cB=({href:e,text:t,interactions:n,color:r})=>({href:e,title:t,rel:"noreferrer",target:"_blank",underline:"hover",onClick:uB,color:jO.LINK,style:{pointerEvents:n.active?"auto":"none",color:r??void 0,opacity:n.active&&n.passive||r?void 0:.4}}),dB=({href:e,text:t,interactions:n,color:r})=>Yn.jsx(zu,{...cB({href:e,text:t,interactions:n,color:r}),children:t}),pB=Y();pB.use(U),pB.renderer.prio(["canvas"]);const fB=(e,t)=>e&&"center"!==e&&"rtl"===t?DH(e):e,hB=({cell:e,representation:t,textStyle:n,imageContainerHorizontalAlignment:r})=>{const{imageBox:i}=t,{styleService:{grid:{lineClamp:o}}}=XF(),{direction:a}=VF();return Yn.jsxs("div",{style:{display:"grid",gridTemplateColumns:`${i?.width??24}px 1fr`,maxHeight:"fit-content",alignItems:"center",justifyContent:"flex-start",boxSizing:"border-box"},children:[Yn.jsx("div",{"data-key":"image-container--partial-image",style:{display:"flex",flexDirection:"column",justifyContent:jH(e),alignItems:fB(r,a),overflow:"hidden",boxSizing:"border-box",border:"4px solid transparent",width:i?.width??24,height:"100%"},children:Yn.jsx(iV,{representation:t,textStyle:n})}),Yn.jsx(NV,{padding:4/(o<=2?2:1),alignSelf:jH(e,!0),children:!!t.labelStructure&&nV(t.labelStructure)})]})},mB=({suffix:e,delimeter:t})=>` ${e?t:""} ${e}`,gB=({href:e,text:t,labelStructure:n,interactions:r,color:i})=>Yn.jsxs("span",{children:[Yn.jsx(zu,{...cB({href:e,text:t,interactions:r,color:i}),children:n?.maskedValue?n.maskedValue:n?.originalValue}),!!n&&mB(n)]}),vB=({children:e,textStyle:t,shouldEnableStickyText:n})=>Yn.jsx("span",{style:{...t,border:"4px solid transparent",boxSizing:"border-box",...n&&{alignSelf:"flex-start",position:"sticky",top:0}},children:e}),yB=({isLeftColumn:e,styleService:t,cell:n,isIndentModeEnabled:r})=>e?r?t.grid.lineClamp:Math.max(t.grid.lineClamp,n.leafCount*t.grid.lineClamp):t.grid.columnLineClamp,bB=({cell:e,isCellSelected:t,isLeftColumn:n})=>{const{direction:r}=VF(),{isActive:i}=qH(),{layoutService:o,styleService:a}=XF(),{interactions:s}=UF(),l=n&&o.isIndentModeEnabled;let u=n&&!e.isNull?(e=>{const{representation:{text:t,labelStructure:n}}=e;if(!n||!n.originalValue)return t;const{originalValue:r,maskedValue:i,suffix:o,delimeter:a}=n;return`${0!==i.length?i:r} ${o?a:""} ${o}`.trim()})(e):e.representation.text;if(e.isEmpty)return null;const c=(({cell:e,styleService:t,isCellSelected:n,isLeftColumn:r,isIndentModeEnabled:i})=>({...FN,...zN(yB({cell:e,isLeftColumn:r,styleService:t,isIndentModeEnabled:i})),color:HH({cell:e,styleService:t,isCellSelected:n}),fontWeight:VH({cell:e,styleService:t}),fontStyle:BH({cell:e,styleService:t}),textDecoration:GH({cell:e,styleService:t}),fontFamily:t.dimensionValues.fontFamily,fontSize:t.dimensionValues.fontSize}))({cell:e,styleService:a,isCellSelected:t,isLeftColumn:n,isIndentModeEnabled:o.isIndentModeEnabled});if(e.representation.type===tN.Image&&!e.isTotal&&!e.isNull){const{labelStructure:t}=e.representation,i=n&&t&&t.suffix?hB:oV;return Yn.jsx(i,{cell:e,representation:e.representation,leafCount:e.leafCount,textStyle:c,isLeftColumn:n,canExpandOrCollapse:e.ref.qCanCollapse||e.ref.qCanExpand,imageContainerHorizontalAlignment:aB(e,o,n,r)})}if(e.representation.type===tN.Link&&!i&&!e.isTotal){const t=n&&e.representation.labelStructure?gB:dB;u=Yn.jsx(t,{text:e.representation.text,labelStructure:e.representation.labelStructure,href:e.representation.url,interactions:s,color:e.expressionColor.color})}return Yn.jsx(vB,{shouldEnableStickyText:l,textStyle:{...c,...e.representation.type===tN.Image&&e.isNull?{alignSelf:jH(e)}:{}},children:u})},xB=({index:e,style:t,data:n})=>{const{styleService:r,layoutService:i}=XF(),{isSelected:o}=qH(),{isLeftColumn:a=!1,showLastBorder:s,itemCount:l,isLast:u,totalDividerIndex:c}=n,{isAdjustingWidth:d,setIsAdjustingWidth:p}=EV([n]),f=oB(e,n),h=a?e===l-1:u,m=a?u:e===l-1,g=X$(f,c,i.isIndentModeEnabled);if(void 0===f){const{background:n}=r.dimensionValues;return Yn.jsx(J$,{style:{...t,background:n},index:e,isLastRow:h,isLastColumn:m,showLastBorder:s,isLeftColumn:a,showTotalCellDivider:g})}const v=o(f);return Yn.jsxs(lB,{reactWindowStyle:t,isLeftColumn:a,isLastRow:h,isLastColumn:m,isCellSelected:v,showTotalCellDivider:g,cell:f,data:n,isAdjustingWidth:d,index:e,children:[Yn.jsxs(Z$,{verticalAlign:jH(f),width:Q$(f.representation),right:f.isLeftColumn?void 0:4,isLeftColumn:a,children:[Yn.jsx(XH,{isLeftColumn:a,isCellSelected:v,cell:f}),Yn.jsx(bB,{isLeftColumn:a,isCellSelected:v,cell:f})]}),Yn.jsx(PV,{cellInfo:{...f,columnWidthLocation:f.isPseudoDimension?lN.Measures:lN.Dimension},columnWidth:t.width,isLastColumn:m,setIsAdjustingWidth:p})]})};var SB=o.memo(xB,q$);const wB=({list:e,listValues:t,isLastRow:n,getRightGridColumnWidth:r})=>i=>{const o=n?e[i]:t.at(i);return o&&0===i&&o.x>0?(o.leafCount+o.x+o.distanceToNextCell)*r():!n&&o?(o.leafCount+o.distanceToNextCell)*r():r(o?.x??i)},CB=(e,t,n,r)=>{const i=Object.values(e);let o,a=i.length;return r&&(a=n,o=t/a),{itemCount:a,estimatedItemSize:o,listValues:i}},EB=(e,t)=>n=>{e.current&&(e.current[t]=n)},IB={display:"flex",height:"fit-content",borderWidth:"1px 0px 0px 0px",...NN},DB={overflow:"hidden",willChange:"auto",flexShrink:0},PB=({leftGridRef:e,width:t,height:n,columnWidths:r,showLastBorder:i})=>{const{pageInfo:o,direction:a}=VF(),{layoutService:s,styleService:{contentCellHeight:l,grid:{divider:u}}}=XF(),{qSize:c}=s.layout.qHyperCube,{gridSectionsData:{leftDimensionData:d},visibleDimensionsInfo:{visibleLeftDimensionInfo:p}}=bW();iB(e,d),rB(e,t,n,l);const f=o.rowsOnCurrentPage*l,h={...IB,borderColor:u,width:r.reduce((e,t)=>e+t,0)};return Yn.jsx("div",{style:h,"data-section-id":"LEFT_GRID",children:d.grid.map((t,u)=>{const h=u===d.columnCount-1,m=nz(p[u]),{itemCount:g,estimatedItemSize:v,listValues:y}=CB(t,f,o.rowsOnCurrentPage,h),b=s.isIndentModeEnabled?()=>l:((e,t,n,r,i)=>o=>{const a=r?e[o]:t.at(o);if(a&&0===o&&a.pageY>0)return(a.leafCount+a.pageY+a.distanceToNextCell)*n;if(a&&a.leafCount>0){const e=a.y===i-a.leafCount;return(a.leafCount-(e?a.ref.qUp:0)+a.distanceToNextCell)*n}return n})(t,y,l,h,c.qcy);return Yn.jsx(L$,{ref:EB(e,u),style:{...DB,flexGrow:h?1:0,direction:a},height:n,width:r[u],itemCount:g,itemSize:b,layout:"vertical",itemData:{list:t,isLeftColumn:!0,isLast:h,itemCount:g,showLastBorder:i,listValues:y,totalDividerIndex:d.totalDividerIndex},itemKey:yV,estimatedItemSize:v,children:SB},m)})})};var MB=x(PB);const RB={overflow:"hidden",willChange:"auto"},kB=e=>({...NN,borderWidth:"rtl"===e?"0px 1px 0px 0px":"0px 0px 0px 1px"}),LB=({topGridRef:e,rowHightCallback:t,width:n,height:r,showLastBorder:i,getRightGridColumnWidth:o})=>{const{direction:a}=VF(),{layoutService:s,styleService:{grid:{divider:l},headerCellHeight:u}}=XF(),{gridSectionsData:{headersData:c,topDimensionData:d}}=bW(),p={...kB(a),borderColor:l,height:r};iB(e,d),rB(e,n,r,u);const f=s.size.x*o();return 0===d.rowCount?Yn.jsx("div",{style:{width:n,height:r,...kB(a)}}):Yn.jsx("div",{style:p,"data-section-id":"TOP_GRID",children:d.grid.map((r,l)=>{const u=l===d.rowCount-1,{itemCount:p,estimatedItemSize:h,listValues:m}=CB(r,f,s.size.x,u),g=(({layoutService:e,headersData:t,topRowIndex:n})=>{const r=t.data.at(n);if(void 0===r)return;const i=t.size.x-1,o=QV({layoutService:e,headersData:t,topRowIndex:n})?0:i,a=r.at(o),s=Array.isArray(a)?a.at(i):a;return s?e.getDimensionInfo(s.dimensionInfoIndex):void 0})({layoutService:s,headersData:c,topRowIndex:l}),v=g?nz(g):`empty ${l}`;return Yn.jsx(L$,{ref:EB(e,l),style:RB,height:t(),width:n,itemCount:p,itemSize:wB({list:r,listValues:m,isLastRow:u,getRightGridColumnWidth:o}),layout:"horizontal",itemData:{list:r,isLast:u,itemCount:p,showLastBorder:i,listValues:m,totalDividerIndex:d.totalDividerIndex},itemKey:yV,estimatedItemSize:h,direction:a,children:SB},v)})})};var AB=x(LB);const OB=()=>Yn.jsx(TB,{}),TB=()=>{const{styleService:{headerCellHeight:e,contentCellHeight:t}}=XF(),n=KW(),r=(()=>{const{model:e}=UF(),t=m(async(t,n)=>{if(!e)throw new Error("No Model provided!");const{qReverseSort:r,dimensionInfoIndex:i,sortDirection:o}=t,a=[];if(n===o)return!1;a.push({qPath:`/qHyperCubeDef/qDimensions/${i}/qDef/qReverseSort`,qOp:"Replace",qValue:(!r).toString()});try{return await e.applyPatches(a,!0),!0}catch(e){return console.error("Error while applying patch: ",e),!1}},[e]);return t})(),{gridSectionsWrapperRefs:{headerGridWrapperRef:i,topGridWrapperRef:o,leftGridWrapperRef:a,dataGridWrapperRef:s},gridRefs:{topGridRef:l,leftGridRef:u,dataGridRef:c},scrollDirectionRefs:{verticalScrollDirection:d,horizontalScrollDirection:p},scrollbarsDimensions:{verticalScrollbarWidth:h,horizontalScrollbarHeight:g,resetHorizontalScrollbarHeight:v}}=YW(),{leftGridWidth:y,leftGridFullWidth:b,leftGridColumnWidths:x,rightGridFullWidth:S,showLastRightBorder:w,getRightGridColumnWidth:C,getHeaderCellsIconsVisibilityStatus:E,overrideLeftGridWidth:I}=function({tableWidth:e,verticalScrollbarWidth:t,resetHorizontalScrollbarHeight:n}){const{layoutService:r,styleService:i}=XF(),{gridSectionsData:{headersData:o}}=bW(),{measureText:a}=pj(i.header,{allowLineBreaks:!1}),s=NW({tableWidth:e}),l=jW({tableWidth:e,verticalScrollbarWidth:t,leftGridWidth:s.leftGridWidth}),u=s.leftGridWidth+l.rightGridFullWidth+1<e,c=m((e,t,n="")=>{let i=e;r.isIndentModeEnabled&&(i=1,1===o.size.x&&(i=0));const l=s.leftGridColumnWidths[i];let u=!1,c=!1,d=a(n)+wW;return t&&d+SW<=l&&(c=!0,d+=SW),d+SW<=l&&(u=!0),{shouldShowMenuIcon:u,shouldShowLockIcon:c}},[s.leftGridColumnWidths,a,r.isIndentModeEnabled,o.size.x]);return f(()=>{const e=s.leftGridWidth===s.leftGridFullWidth,t=l.rightGridWidth===l.rightGridFullWidth;e&&t&&n()},[n,s.leftGridWidth,s.leftGridFullWidth,l.rightGridWidth,l.rightGridFullWidth]),{...s,...l,showLastRightBorder:u,getHeaderCellsIconsVisibilityStatus:c}}({tableWidth:n.width,verticalScrollbarWidth:h,resetHorizontalScrollbarHeight:v}),{gridScaffoldDimensions:D,headerGridDims:P,topGridDims:M,leftGridDims:R,dataGridDims:k,metadata:{everyThingFitsInTableRectHeight:L,scrollbarsVisibilityStatus:A}}=(({cellHeights:{headerCellHeight:e,contentCellHeight:t},horizontalWidths:{leftGridWidth:n,leftGridOriginalWidth:r,rightGridOriginalWidth:i},scrollBarsDimensions:{verticalScrollbarWidth:o,horizontalScrollbarHeight:a}})=>{const s=KW(),{pageInfo:l}=VF(),{gridSectionsData:{headersData:u,topDimensionData:c}}=bW(),d=Math.min(s.height*CW,Math.max(s.height*CW-25,s.height-t-a)),p=s.width*CW,f=l.rowsOnCurrentPage*t,h=Math.max(u.size.y,c.rowCount,1),m=e*h,g=e*h,v=Math.min(p,n),y=s.width-p,b=Math.max(y,s.width-v),x=Math.min(d,m,g),{availableHeight:S,everyThingFitsInTableRectHeight:w,everyThingFitsInTableRectWidth:C}=((e,t,n)=>{const r=t+1+n+o<=s.width,i=e+1+f+a,l=i-s.height<a||i<=s.height;return{availableHeight:l?i:s.height,everyThingFitsInTableRectHeight:l,everyThingFitsInTableRectWidth:r}})(x,v,b),E=S-d,I=Math.max(E,S-x),D=Math.min(I,f),P=Math.min(I,f),M=m+1+f,{visibilityStatus:R,metadata:{hasLeftGridOverflowX:k,hasDataGridOverflowX:L}}=(e=>{const{gridScaffold:{X_AXIS:{leftSectionWidth:t,rightSectionWidth:n},Y_AXIS:{topSectionHeight:r,bottomSectionHeight:i}},gridOriginalWidth:{X_AXIS:{leftSectionFullWidth:o,rightSectionFullWidth:a},Y_AXIS:{topSectionFullHeight:s,bottomSectionFullHeight:l}}}=e,u=s>r,c=o>t,d=a>n,p=l>i;return{visibilityStatus:{topGrid:{overflowX:"hidden",overflowY:u?"scroll":"hidden"},leftGrid:{overflowX:c?"scroll":"hidden",overflowY:"hidden"},dataGrid:{overflowX:d?"scroll":"hidden",overflowY:p?"scroll":"hidden"}},metadata:{hasTopGridOverflowY:u,hasLeftGridOverflowX:c,hasDataGridOverflowX:d,hasDataGridOverflowY:p}}})({gridScaffold:{X_AXIS:{leftSectionWidth:v,rightSectionWidth:b},Y_AXIS:{topSectionHeight:x,bottomSectionHeight:I}},gridOriginalWidth:{X_AXIS:{leftSectionFullWidth:r,rightSectionFullWidth:i},Y_AXIS:{topSectionFullHeight:g,bottomSectionFullHeight:M-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+(L?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:M-g+(!k&&L?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+(L?o:0),height:M-g+(!L&&k?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:R}}})({cellHeights:{headerCellHeight:e,contentCellHeight:t},horizontalWidths:{leftGridWidth:y,leftGridOriginalWidth:b,rightGridOriginalWidth:S},scrollBarsDimensions:{verticalScrollbarWidth:h,horizontalScrollbarHeight:g}}),O=m(()=>e,[e]),T=m(()=>t,[t]);return(()=>{const{downloadService:e}=XF();f(()=>{e.notifyIsDoneRendering()})})(),Yn.jsxs(JW,{style:D,children:[Yn.jsx("div",{style:{overflow:"hidden"},ref:i,children:Yn.jsx(nB,{tableWidth:n.width,leftGridWidth:y,columnWidths:x,getHeaderCellsIconsVisibilityStatus:E,rowHight:e,height:P.height,changeSortOrder:r,overrideLeftGridWidth:I})}),Yn.jsx(e$,{style:A.topGrid,origin:cN.TopGrid,ref:o,children:Yn.jsx(XW,{style:M.fullSizeWrapper,children:Yn.jsx(t$,{style:M.stickyWrapper,children:Yn.jsx(AB,{topGridRef:l,rowHightCallback:O,...M.self,showLastBorder:{right:w,bottom:!1},getRightGridColumnWidth:C})})})}),Yn.jsx(e$,{style:A.leftGrid,origin:cN.LeftGrid,ref:a,children:Yn.jsx(XW,{style:R.fullSizeWrapper,children:Yn.jsx(t$,{style:R.stickyWrapper,children:Yn.jsx(MB,{leftGridRef:u,...R.self,columnWidths:x,showLastBorder:{right:!1,bottom:L}})})})}),Yn.jsx(e$,{style:A.dataGrid,origin:cN.DataGrid,ref:s,children:Yn.jsx(XW,{style:k.fullSizeWrapper,children:Yn.jsx(t$,{style:k.stickyWrapper,children:Yn.jsx(wV,{dataGridRef:c,rowHightCallback:T,...k.self,showLastBorder:{right:w,bottom:L},getRightGridColumnWidth:C,verticalScrollDirection:d,horizontalScrollDirection:p})})})})]})},qB=()=>{const{keyboard:e,theme:t,interactions:n,translator:r}=UF(),{pageInfo:i,updatePageInfo:o,rect:a}=VF(),{layoutService:s}=XF(),{layout:l,hasData:u}=s;return Yn.jsxs(Yn.Fragment,{children:[u?Yn.jsx(OB,{}):null,Yn.jsx(ZF,{}),Yn.jsx($F,{paginationNeeded:i.shouldShowPagination,handleChangePage:e=>{o({page:e})},pageInfo:i,totalRowCount:i.totalRowCount,totalColumnCount:0,totalPages:i.totalPages,keyboard:e,translator:r,theme:t,interactions:n,rect:a,layout:l})]})};const _B=(e,{selections:t,baseObjects:n,coreServices:r,nebulaObjects:i},a)=>{const s=function(e){const t=lb();return t?.components?.MuiTable?.styleOverrides&&(t.components.MuiTable.styleOverrides.root={}),ha({...t,direction:e})}(n.direction);e.render(Yn.jsx(o.StrictMode,{children:Yn.jsx(Xb,{store:a,children:Yn.jsx(_a,{theme:s,children:Yn.jsx(YF,{...i,children:Yn.jsx(BF,{...n,children:Yn.jsx(_H,{selections:t,children:Yn.jsx(JF,{...r,children:Yn.jsx(xW,{children:Yn.jsx(qB,{})})})})})})})})}))};var NB=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}(NB||{}),jB=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}(jB||{}),FB=function(e){return e.Grid="grid",e.Divider="grid.divider",e.LabelName="label.name",e.LabelValue="label.value",e}(FB||{}),zB=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}(zB||{});const WB=e=>e?`${parseInt(e,10)}px`:void 0,$B=(e,t)=>{if(t){const n=e.getColorPickerColor(t);return"none"===n?TN.Transparent:n}},HB=(e,t)=>+(parseInt(e,10)*ON*t+8).toFixed(2),VB=(e,t)=>void 0===e?t:e.some(e=>"bold"===e)?LN:"normal",BB=e=>e?.some(e=>"italic"===e)?"italic":"normal",GB=e=>e?.some(e=>"underline"===e)?"underline":"none",UB=document.createElement("textarea");function YB(e){UB.value=e,document.body.appendChild(UB),UB.select(),UB.setSelectionRange(0,UB.value.length),document.execCommand("copy"),document.body.removeChild(UB)}UB.style.position="absolute",UB.style.left="-9999px",UB.setAttribute("readonly","");function KB(e){q?.((t,n)=>{const r=n.target,i=r?.closest(`.${YA}`);i?.title&&t.addItem({translation:"contextMenu.copyCellValue",icon:"lui-icon lui-icon--copy",tid:"copy-cell-context-item",id:"copy-cell-context-item",select:()=>{(e=>{const t=e.title;t&&(navigator.clipboard?.writeText?navigator.clipboard.writeText(t).catch(()=>{YB(t)}):YB(t))})(i)}}),e?.forEach(e=>{e(t,n,i)})})}const XB=({model:e,layoutService:t,effectivePropertiesService:n,translator:r})=>ej((i,o,a)=>{if(!e||n.qAlwaysFullyExpanded)return;const s=e,l=i.addItem({translation:"Object.PivotTable.ContextMenu.ExpandCollapse",tid:"expand-collapse-group",id:"expand-collapse-group"}),{qEffectiveDimensionName:u,label:c}=((e,t)=>{const n=((e,t)=>{const n=e?.getAttribute("data-dimension-info-index");if("string"==typeof n)return t.getDimensionInfo(+n)})(e,t);return"object"==typeof n?{qEffectiveDimensionName:n.qEffectiveDimensionName,label:n.qFallbackTitle}:{qEffectiveDimensionName:void 0,label:void 0}})(a,t);l.addItem((e=>({icon:"lui-icon lui-icon--plus",translation:"Object.PivotTable.ContextMenu.ExpandAll",tid:"expand-all",select:async()=>{try{await e.expandTop(QF,0,0,!0),await e.expandLeft(QF,0,0,!0)}catch(e){console.error("Failed to expand all",e)}}}))(s)),"string"==typeof u&&l.addItem((({model:e,effectivePropertiesService:t,qEffectiveDimensionName:n,label:r,translator:i})=>({icon:"lui-icon lui-icon--plus",translation:i.get("SNPivotTable.ContextMenu.ExpandDimension",[r??""]),tid:"expand-dimension",id:"expand-dimension",select:WV({model:e,qExpansionState:t.qExpansionState,qEffectiveDimensionName:n,action:jV.Expand})}))({model:s,effectivePropertiesService:n,qEffectiveDimensionName:u,label:c,translator:r})),l.addItem((e=>({icon:"lui-icon lui-icon--minus",translation:"Object.PivotTable.ContextMenu.CollapseAll",tid:"collapse-all",select:async()=>{try{await e.collapseTop(QF,0,0,!0),await e.collapseLeft(QF,0,0,!0)}catch(e){console.error("Failed to collapse all",e)}}}))(s)),"string"==typeof u&&l.addItem((({model:e,effectivePropertiesService:t,qEffectiveDimensionName:n,label:r,translator:i})=>({icon:"lui-icon lui-icon--minus",translation:i.get("SNPivotTable.ContextMenu.CollapseDimension",[r??""]),tid:"collapse-dimension",id:"collapse-dimension",select:WV({model:e,qExpansionState:t.qExpansionState,qEffectiveDimensionName:n,action:jV.Collapse})}))({model:s,effectivePropertiesService:n,qEffectiveDimensionName:u,label:c,translator:r}))},[e,t,n]),JB=(e,t)=>M(()=>(({layout:e})=>{const{qHyperCube:t,nullValueRepresentation:n,snapshotData:r}=e,{qNoOfLeftDims:i,qEffectiveInterColumnSortOrder:o,qMeasureInfo:a,qDimensionInfo:s}=t,l=!!r,u=r?.content?.rowsPerPage??15e3,c={x:Math.min(e.qHyperCube.qSize.qcx,AN),y:Math.min(e.qHyperCube.qSize.qcy,u)},d=o.slice(0,i),p=e=>d.some(t=>t===e),f=p(ez),h=new Map(o.map(e=>[s[e]??ez,e])),m=a.filter(e=>7005!==e.qError?.qErrorCode);return{layout:e,getNullValueText:()=>n?.text??"-",getMeasureInfoIndexFromCellIndex:(e,t=!1)=>{if(f)return 0;const n=e%m.length;return t?n:a.findIndex(e=>e===m[n])},getDimensionInfo:e=>e===ez?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:ZA.Auto,pixels:JA.PixelsDefault,percentage:JA.PercentageDefault},searchSortFromDimension:"inherit"===e.search?.sorting}})({layout:e}),[e,t]),ZB=({model:e,layoutService:t,viewService:n,pageInfo:r,rect:i})=>{const{layout:o,isSnapshot:a,triggerdByExpandOrCollapse:s}=t,l=(e=>{const t=nj(e);return t.current=e,t})(fW(i));return lj(async()=>{const{qHyperCube:t}=o,{maxNumberOfVisibleRows:i,maxNumberOfVisibleColumns:u}=l.current;if(a)return o.snapshotData?.content?.qPivotDataPages??[];if(void 0!==e&&"getHyperCubePivotData"in e&&(((e,t,n,r)=>!!e&&(t.gridColumnStartIndex+t.gridWidth>=r||t.gridRowStartIndex+t.gridHeight>=n))(s,n,i,u)||((e,t,n,r)=>{const{qHyperCube:{qPivotDataPages:i,qSize:o}}=e,{qTop:a,qWidth:s,qHeight:l}=i[0]?.qArea??{qTop:0,qWidth:0,qHeight:0};return a<t.page*t.rowsPerPage||s<Math.min(r,o.qcx)||l<Math.min(n,o.qcy)})(o,r,i,u))){const t=((e,t,n,r,i,o)=>{const a=r.page*r.rowsPerPage,s=Math.min(a+r.rowsPerPage,n.qcy),l=Math.min(AN,n.qcx);if(n.qcy<a)return null;let u=0,c=a;if(e){u=t.gridColumnStartIndex,c=a+t.gridRowStartIndex;const e=c+t.gridHeight,n=t.gridColumnStartIndex+t.gridWidth;e>s&&(c=Math.max(0,s-i)),n>l&&(u=Math.max(0,l-o))}return{qLeft:u,qTop:c,qWidth:Math.min(l-u,o),qHeight:Math.min(s-c,i)}})(s,n,o.qHyperCube.qSize,r,i,u);return t?e.getHyperCubePivotData(QF,hW(t)):[]}return t.qPivotDataPages},[o,a,e,n,r.page,r.rowsPerPage,l,s])},QB=({rowsPerPage:e,totalRowCount:t,page:n})=>Math.min(e,t-n*e),eG=(e,t,n=15e3)=>({rowsPerPage:n,totalPages:Math.max(1,Math.ceil(e/n)),totalRowCount:e,rowsOnCurrentPage:QB({rowsPerPage:n,totalRowCount:e,page:t})}),tG=15,nG=({layoutService:e,viewService:t,rect:n,model:r,pageInfo:i})=>{const{freeResize:o}=R();return _(async e=>{const o=e;if(!o.snapshotData||!r||o.snapshotData.content)return o;if("getHyperCubePivotData"in r){const{scrollTop:e,scrollLeft:a,leftGridScrollLeft:s,topGridScrollTop:l}=t,u=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:i,gridWidth:o,gridHeight:a}=e,s=t.page*t.rowsPerPage,l=Math.max(r-tG,0),u=Math.max(s+i-tG,s,0),c=AN-l,d=s+t.rowsOnCurrentPage-u;if((e=>0===e.gridWidth&&0===e.gridHeight)(e)){const{maxNumberOfVisibleColumns:e,maxNumberOfVisibleRows:t}=fW(n);return{qLeft:l,qTop:u,qWidth:Math.min(c,e+30),qHeight:Math.min(d,t+30)}}return{qLeft:l,qTop:u,qWidth:Math.min(c,o+30),qHeight:Math.min(d,a+30)}})(t,i,n),c=hW(u),d={qLeft:0,qTop:i.page*i.rowsPerPage,qWidth:1,qHeight:1};o.snapshotData.content={qPivotDataPages:await r.getHyperCubePivotData(QF,[d,...c]),scrollTop:e,scrollLeft:a,leftGridScrollLeft:s,topGridScrollTop:l,page:i.page,rowsPerPage:i.rowsPerPage},o.snapshotData.object.size.w=n.width,o.snapshotData.object.size.h=n.height}return o}),N(()=>({getViewState:()=>((e,t)=>({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,leftGridScrollLeft:e.leftGridScrollLeft,topGridScrollTop:e.topGridScrollTop,renderPage:t.page}))(t,i)}),[t]),e.layout.snapshotData?.content&&!o?{left:n.left,top:n.top,width:e.layout.snapshotData.object.size.w,height:e.layout.snapshotData.object.size.h}:n};var rG={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 iG=()=>{const e=j(),t=e.language();return M(()=>{!function(e){const t="SNPivotTable_LimitedData";e.get(t)===t&&Object.keys(rG).forEach(t=>{e.add(rG[t])})}(e)},[e]),{translator:e,language:t}},oG=e=>{const t=M(()=>Ub(),[]),{flags:n}=e,r=F(),i=(e=>{const t=M(()=>mj.createRoot(e),[e]);return A(()=>()=>{t.unmount()},[t]),t})(r),o=z(),a=W(),s=$(),l=H(),u=V(),c=(()=>{const{viewState:e}=R(),t=nj(new Set),n=void 0!==window.qlikprinting,{promise:r,resolve:i}=M(()=>QN(),[]),o=ej(e=>{t.current.add(e)},[t]),a=ej(wq(async()=>{await Promise.all(t.current),t.current.clear(),i()},1e3),[i,t]);return k(async()=>{await r},[r]),M(()=>({viewState:e,isDownloadedAsPDForImage:n,notifyIsDoneRendering:a,waitForPromise:o}),[a,n,e,o])})(),d=((e,t)=>{const[n]=lj(async()=>{if(void 0!==e&&!t.snapshotData&&"getEffectiveProperties"in e)return{...await e.getEffectiveProperties()}},[e,t]);return M(()=>{const e=void 0!==n?.qHyperCubeDef.qSortbyYValue&&1===Math.abs(n.qHyperCubeDef.qSortbyYValue),t=n?.qHyperCubeDef.qDimensions.map(e=>e.qDef?.qSortCriterias)??[];return{qAlwaysFullyExpanded:n?.qHyperCubeDef.qAlwaysFullyExpanded??!1,qExpansionState:n?.qHyperCubeDef.qExpansionState,isSortedByFirstMeasure:e,getSortCriteriaForDimension:e=>t[e]}},[n])})(a,o),p=JB(o,n),f=(e=>{const t=T();return{...t,select:!!t.active&&!!t.select&&!e,active:!!t.active&&!e,scroll:!!t.active}})(p.isSnapshot),h=B(),m=sj(o,r),{translator:g,language:v}=iG(),{pageInfo:y,updatePageInfo:b}=((e,t)=>{const{size:n,layout:{qHyperCube:{qSize:r}}}=e,i=t.isDownloadedAsPDForImage||e.isSnapshot,o=(e=>e.layout.snapshotData?.content?.rowsPerPage)(e),[a,s]=L(()=>{const a=((e,t)=>t.isDownloadedAsPDForImage?t.viewState?.renderPage??0:e.isSnapshot?e.layout.snapshotData?.content?.page??0:0)(e,t);return{page:a,shouldShowPagination:r.qcy>n.y&&!i,...eG(r.qcy,a,o)}}),l=e.layout.qHyperCube.qSize.qcy;return A(()=>{s(t=>({...t,...eG(l,t.page,o),shouldShowPagination:l>e.size.y&&!i}))},[l,e.size.y,s,i,o]),A(()=>{const{page:e,totalPages:t}=a;if(e+1>t){const e=t-1,n=QB({...a,page:e});s({...a,page:e,rowsOnCurrentPage:n})}},[a]),{pageInfo:a,updatePageInfo:e=>{s({...a,...e,rowsOnCurrentPage:QB({...a,...e})})}}})(p,c),x=((e,t,n)=>M(()=>((e,t)=>{if(e.isDownloadedAsPDForImage){const{viewState:t}=e;return{gridColumnStartIndex:0,gridRowStartIndex:0,gridWidth:0,gridHeight:0,scrollTop:t?.scrollTop??0,scrollLeft:t?.scrollLeft??0,leftGridScrollLeft:t?.leftGridScrollLeft??0,topGridScrollTop:t?.topGridScrollTop??0}}return{gridColumnStartIndex:0,gridRowStartIndex:0,gridWidth:0,gridHeight:0,scrollTop:t?.content?.scrollTop??0,scrollLeft:t?.content?.scrollLeft??0,leftGridScrollLeft:t?.content?.leftGridScrollLeft??0,topGridScrollTop:t?.content?.topGridScrollTop??0}})(n,t.snapshotData),[n,e.page,t.snapshotData]))(y,o,c),S=nG({rect:G(),layoutService:p,viewService:x,model:a,pageInfo:y}),[w,C]=ZB({model:a,layoutService:p,viewService:x,pageInfo:y,rect:S}),E=M(()=>((e,t)=>{const n=t.layout.components?.find(e=>"theme"===e.key),r=n?.header,i=n?.dimensionValues,o=n?.measureValues,a=n?.measureLabels,s=n?.totalValues,l=n?.nullValues,u=n?.grid,c=(t,n,r)=>e.getStyle(t,n,r),d=+(u?.[NB.LineClamp]??c(jB.Grid,FB.Grid,zB.LineClamp)??1),p=+(u?.[NB.ColumnLineClamp]??c(jB.Grid,FB.Grid,zB.ColumnLineClamp)??1),f=$B(e,r?.[NB.Background])??c(jB.Dimension,FB.LabelName,zB.BackgroundColor)??TN.Transparent,h={header:{fontSize:WB(r?.[NB.FontSize])??c(jB.Dimension,FB.LabelName,zB.FontSize)??RN,fontFamily:r?.[NB.FontFamily]??c(jB.Dimension,FB.LabelName,zB.FontFamily)??kN,fontWeight:VB(r?.[NB.FontStyle],LN),fontStyle:BB(r?.[NB.FontStyle]),textDecoration:GB(r?.[NB.FontStyle]),color:$B(e,r?.[NB.FontColor])??c(jB.Dimension,FB.LabelName,zB.FontColor)??jO.TEXT,background:f,hoverBackground:Aq(f,QA),activeBackground:Aq(f,eO)},dimensionValues:{fontSize:WB(i?.[NB.FontSize])??c(jB.Dimension,FB.LabelValue,zB.FontSize)??RN,fontFamily:i?.[NB.FontFamily]??c(jB.Dimension,FB.LabelValue,zB.FontFamily)??kN,fontWeight:VB(i?.[NB.FontStyle],void 0),fontStyle:BB(i?.[NB.FontStyle]),textDecoration:GB(i?.[NB.FontStyle]),color:$B(e,i?.[NB.FontColor])??c(jB.Dimension,FB.LabelValue,zB.FontColor)??jO.TEXT,background:$B(e,i?.[NB.Background])??c(jB.Dimension,FB.LabelValue,zB.BackgroundColor)??TN.Transparent},measureValues:{fontSize:WB(o?.[NB.FontSize])??c(jB.Measure,FB.LabelValue,zB.FontSize)??RN,fontFamily:o?.[NB.FontFamily]??c(jB.Measure,FB.LabelValue,zB.FontFamily)??kN,fontWeight:VB(o?.[NB.FontStyle],"normal"),fontStyle:BB(o?.[NB.FontStyle]),textDecoration:GB(o?.[NB.FontStyle]),color:$B(e,o?.[NB.FontColor])??c(jB.Measure,FB.LabelValue,zB.FontColor)??TN.FontSecondary,background:$B(e,o?.[NB.Background])??c(jB.Measure,FB.LabelValue,zB.BackgroundColor)??TN.Transparent},measureLabels:{fontWeight:VB(a?.[NB.FontStyle],"normal"),fontStyle:BB(a?.[NB.FontStyle]),textDecoration:GB(a?.[NB.FontStyle]),color:$B(e,a?.[NB.FontColor])??c(jB.Measure,FB.LabelName,zB.FontColor)??TN.FontSecondary,background:$B(e,a?.[NB.Background])??c(jB.Measure,FB.LabelName,zB.BackgroundColor)??TN.Transparent},totalValues:{fontWeight:VB(s?.[NB.FontStyle],LN),fontStyle:BB(s?.[NB.FontStyle]),textDecoration:GB(s?.[NB.FontStyle]),color:$B(e,s?.[NB.FontColor])??c(jB.Total,FB.LabelValue,zB.FontColor)??jO.TEXT,background:$B(e,s?.[NB.Background])??c(jB.Total,FB.LabelValue,zB.BackgroundColor)??TN.Transparent},nullValues:{fontWeight:VB(l?.[NB.FontStyle],"normal"),fontStyle:BB(l?.[NB.FontStyle]),textDecoration:GB(l?.[NB.FontStyle]),color:$B(e,l?.[NB.FontColor])??c(jB.Null,FB.LabelValue,zB.FontColor)??jO.TEXT,background:$B(e,l?.[NB.Background])??c(jB.Null,FB.LabelValue,zB.BackgroundColor)??TN.NullValueBackground},grid:{columnLineClamp:p,lineClamp:d,border:$B(e,u?.[NB.Border])??c(jB.Grid,FB.Grid,zB.BorderColor)??TN.DividerLight,divider:$B(e,u?.[NB.Divider])??c(jB.Grid,FB.Divider,zB.BorderColor)??TN.DividerDark,background:$B(e,u?.[NB.Background])??c(jB.Grid,FB.Grid,zB.BackgroundColor)??TN.Transparent},selectedColors:Lq(e)};return h.headerCellHeight=Math.max(HB(h.header.fontSize,p),HB(h.dimensionValues.fontSize,p),32),h.contentCellHeight=Math.max(HB(h.measureValues.fontSize,d),HB(h.dimensionValues.fontSize,d),24),h.dimensionValueTextHeight=HB(h.dimensionValues.fontSize,1),h})(m,p),[m,p]),I=((e,t,n)=>{const[,r,i]=lj(async()=>{const t=mT(n.flags),r=e.getStyle("","","fontFamily"),i=e.getStyle("object","label.name","fontFamily"),o=e.getStyle("object","label.value","fontFamily"),a=e.getStyle("","","fontFamilies")??[];return Promise.all([...t,...a,r,i,o,gj].filter(e=>void 0!==e).map(async e=>{await document.fonts.load(`600 12px ${e}`),await document.fonts.load(`12px ${e}`)}))},[t,e,n]);return i?(console.warn("Failed to load fonts:",i),!0):!r})(m,o,e),{direction:D}=R();KB([XB({model:a,layoutService:p,effectivePropertiesService:d,translator:g})]),A(()=>{!C&&a&&!!w&&I&&_B(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])},aG={version:"7.26.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:[]},sG=()=>({...aG,qHyperCubeDef:{...aG.qHyperCubeDef,qIndentMode:!1}})}}});
|
|
101
|
+
e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,s,l,u,c,d,p=e.length,f=e.search(/[0-9\-\+#]/),h=f>0?e.substring(0,f):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),v=p-g,y=e.substring(v,v+1),b=v+("."===y||","===y?1:0),x=g>0?e.substring(b,p):"";if(n=(t="-"===(e=e.substring(f,b)).charAt(0)?-t:+t)<0?t=-t:0,i=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",o=r&&r[1]&&r[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(u=t.split("."))[1]||u[1]&&u[1].length<=s)&&(t=(+t).toFixed(s+1)),c=e[0].split(o),e[0]=c.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;u[0].length<e[0].length-a;)u[0]="0"+u[0];else 0===+u[0]&&(u[0]="");if((t=t.split("."))[0]=u[0],l=c[1]&&c[c.length-1].length){for(m="",v=(d=t[0]).length%l,p=d.length,b=0;b<p;b++)m+=d.charAt(b),!((b-v+1)%l)&&b<p-l&&(m+=o);t[0]=m}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),h+(n?"-":"")+r+x}},Sq({exports:{}});const Oq=(e,t=WO.TEXT,n=WO.WHITE)=>{const r=tT(e??""),i=tT(t),o=tT(n);return r.isInvalid()?t:function(e,t,n){const r=nT(e,t),i=nT(e,n);if(void 0!==r&&void 0!==i)return r>i?t:n}(r,o,i).getRGB()},Tq=e=>{const t=e.getStyle("","","dataColors.selected")||WO.SELECTED,n=function(e,t){const n=tT(rT),r=tT(e),i=tT(t);if(r.isInvalid()||i.isInvalid()||r.getAlpha()<1||i.getAlpha()<1)return t;const o=nT(n,r),a=nT(i,r),s=o>a||o>4.5;return!s&&a>3?i.getHex():s?rT:"#000000"}(t,WO.TEXT);return{background:t,color:n}},qq=(e,t)=>{const n=tT(e);return 0===n.a?(n.setAlpha(t.opacity),n.getString()):n.isDark()?n.getBrightenedColor(t.brighter).getString():n.getDarkenedColor(t.darker).getString()},_q=e=>{const t=tT(e);return t.isInvalid()?null:1===t.a?t.getRGB():t.getRGBA()},Nq=e=>{e.stopPropagation(),e.preventDefault()},jq=e=>{(e instanceof HTMLElement||e instanceof SVGElement)&&e.focus()},Fq=e=>{const{currentTarget:t}=e;if("true"===t.getAttribute("data-dragging"))return!0;const n=t.closest(".exploration-panel");if(!n)return!1;const r=n.getElementsByClassName("section-item-container");return Array.from(r).some(e=>"true"===e.getAttribute("data-dragging"))},zq=(e,t)=>{const{key:n,currentTarget:r}=e;if(r===t.current&&n===ZA.Tab)if(e.preventDefault(),e.shiftKey)((e,t)=>{const{currentTarget:n}=e;if(n!==t.current)return;const r=n.closest('[role="region"]')?.getElementsByTagName("button")[0];r&&jq(r)})(e,t);else{const e=r.parentElement?.getElementsByClassName("exploration-section-header")[0];e&&jq(e)}},Wq=(e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=t.sectionIndex??2;if(0===r)return void((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=n.closest(".exploration-panel")?.getElementsByTagName("input")[0];r&&jq(r)})(e,t);const i=n.closest(".exploration-panel")?.getElementsByClassName("exploration-list")[r-1],o=i?.getElementsByClassName("exploration-item-focus").length??0;if(o>0){const e=i?.getElementsByClassName("exploration-draggable-icon")[o-1];e&&jq(e)}},$q=(e,t)=>{const{key:n}=e;switch(n){case ZA.Tab:Nq(e),e.shiftKey?Wq(e,t):((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=n.closest(".exploration-list"),i=r?.getElementsByClassName("exploration-item-focus")[0];if(!i){const e=n.closest(".exploration-panel")?.getElementsByClassName("exploration-list")[2].getElementsByClassName("exploration-section-header")[0];return void(e&&jq(e))}jq(i)})(e,t);break;case ZA.Down:if(Fq(e))break;e.preventDefault(),((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=n.closest(".exploration-panel"),i=r?.getElementsByClassName("exploration-section-header").length??0;let o;if(0===i)return;const a=t.sectionIndex??2;o=a+1<i?r?.getElementsByClassName("exploration-section-header")[a+1]:r?.getElementsByClassName("exploration-section-header")[0],o&&jq(o)})(e,t);break;case ZA.Up:if(Fq(e))break;e.preventDefault(),((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=n.closest(".exploration-panel"),i=r?.getElementsByClassName("exploration-section-header").length??0;let o;if(0===i)return;const a=t.sectionIndex??2;o=a-1>=0?r?.getElementsByClassName("exploration-section-header")[a-1]:r?.getElementsByClassName("exploration-section-header")[i-1],o&&jq(o)})(e,t);break;case ZA.Enter:case ZA.Space:e.preventDefault(),((e,t)=>{const{currentTarget:n}=e;if(e.preventDefault(),n!==t.ref.current)return;const r="all"!==t.checkState;t.toggleAllCheckboxes(r)})(e,t)}},Hq=({children:e})=>Yn.jsx("span",{style:{width:"fit-content",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",fontWeight:"bold"},children:e}),Vq=({children:e,sectionIndex:t})=>{const n=tx(void 0!==t?yO(t):NO),r=nx(void 0!==t?bO(t):jO),i=o.useRef(null),a={ref:i,toggleAllCheckboxes:r,checkState:n,sectionIndex:t};return Yn.jsxs(xl,{ref:i,className:"exploration-section-header",tabIndex:0,onKeyDown:e=>{$q(e,a)},sx:{display:"flex",alignItems:"center",width:"100%",padding:"2px 8px 2px 8px",boxSizing:"border-box",fontSize:"14px","&:focus-visible":{boxShadow:`0 0 0 2px ${EO} inset`}},children:[Yn.jsx(Gl,{disabled:"disabled"===n,checked:"all"===n,indeterminate:"some"===n,onChange:e=>{r(e.target.checked)},size:"small",style:{flexShrink:0,padding:9}}),Yn.jsx(Hq,{children:e})]})},Bq=({sectionIndex:e})=>{const t=tx(mO(e));return Yn.jsx(Vq,{sectionIndex:e,children:t})},Gq=r((e,t)=>Yn.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:Yn.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"})})),Uq=Ta("div")({position:"absolute",width:"1px",height:"1px",padding:0,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0}),Yq=Ta(Gq)(()=>({padding:"6px 6px",flexShrink:0,cursor:"grab","&:focus-visible":{boxShadow:`0 0 0 2px ${EO} inset`}})),Kq=e=>"svg"===e.tagName?"exploration-draggable-icon":e.className,Xq=(e,t)=>{const n=e.closest(".exploration-list"),r=n?.nextElementSibling||n?.parentElement?.nextElementSibling;if(null===r||!r){if(t===ZA.Tab)return;return n?.closest(".exploration-panel")?.getElementsByClassName("exploration-section-header")[0]}return r.getElementsByClassName("exploration-section-header")[0]},Jq=e=>{const{currentTarget:t}=e,n=Kq(t);let r=t.closest("li")?.previousElementSibling?.getElementsByClassName(n)[0];if(!r){const e=t.closest(".exploration-list"),i=e?.querySelector(".exploration-section-header");if(i)return i;if(r=((e,t)=>{const n=e.closest(".exploration-list"),r=n?.previousElementSibling;if(null===r||!r)return e.closest(".exploration-panel")?.getElementsByClassName(t)[1];const i=r.getElementsByClassName(t);return i.length>0?i[i.length-1]:void 0})(t,n),!r){const e=t.closest(".exploration-panel")?.getElementsByClassName(n)[1];return e??null}}return r},Zq=(e,t)=>{const{currentTarget:n}=e;if(n===t.items.draggableIconRef.current){const e=n.closest("li")?.getElementsByClassName("exploration-item")[0];return void(e&&jq(e))}if(n===t.items.explorationItemRef.current){const e=n.getElementsByClassName("exploration-draggable-icon")[0];return void jq(e)}n===t.items.explorationItemFocusRef.current&&t.toggleCheckedById(t.id)},Qq=e=>{const t=e.key===ZA.Down?(e=>{const{currentTarget:t,key:n}=e,r=Kq(t),i=t.closest("li");let o=i?.nextElementSibling?.getElementsByClassName(r)[0];return o||(o=Xq(t,n),o)?o:t.closest(".exploration-panel")?.getElementsByClassName(r)[0]})(e):Jq(e);t&&jq(t)},e_=(e,t)=>{const{key:n}=e;switch(n){case ZA.Tab:if(e.shiftKey)e.preventDefault(),((e,t)=>{const{currentTarget:n}=e,r=n.closest("ul")?.getElementsByClassName("exploration-item-focus");if(n===t.items.draggableIconRef.current){if(t.itemIndex>=0){const e=r&&r[t.itemIndex];return void(e&&jq(e))}const n=Jq(e);n&&jq(n)}if(n===t.items.explorationItemFocusRef.current){const t=n.closest("li")?.previousElementSibling?.getElementsByClassName("exploration-draggable-icon")[0];if(t)return void jq(t);const r=Jq(e);r&&jq(r)}})(e,t);else{const n=((e,t)=>{const{currentTarget:n,key:r}=e;if(e.shiftKey)return!0;if(n===t.items.explorationItemRef.current){const e=n.getElementsByClassName("exploration-draggable-icon")[0];return jq(e),!0}if(n===t.items.explorationItemFocusRef.current){const e=n.closest("li")?.getElementsByClassName("exploration-draggable-icon")[0];return e&&jq(e),!0}if(n===t.items.draggableIconRef.current){const e=n.closest("ul")?.getElementsByClassName("exploration-item-focus");if((e?.length||0)-1>t.itemIndex){const n=e&&e[t.itemIndex+1];return n&&jq(n),!0}const i=Xq(n,r);if(!i)return!1;jq(i)}return!0})(e,t);n?Nq(e):e.stopPropagation()}break;case ZA.Down:case ZA.Up:if(Fq(e))break;Nq(e),Qq(e);break;case ZA.Enter:if(e.currentTarget===t.items.explorationItemRef.current&&t.dragHandleRef){t.dragHandleRef(e.currentTarget);break}Nq(e),Zq(e,t);break;case ZA.Space:Nq(e),Zq(e,t)}},t_=({children:e})=>Yn.jsx("span",{style:{width:"fit-content",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flexGrow:1},children:e}),n_=({title:e,dragHandleRef:t,...n})=>{const[r,i]=rx(Vx),a=tx(bx),s=o.useRef(null),l=o.useRef(null),u=o.useRef(null),c={id:n.id,itemIndex:n.itemIndex,toggleCheckedById:i,items:{explorationItemRef:s,explorationItemFocusRef:l,draggableIconRef:u},dragHandleRef:t};return o.useEffect(()=>{t&&s.current&&t(s.current)},[t]),Yn.jsxs(xl,{ref:s,className:"exploration-item",onClick:e=>{e.stopPropagation(),i(n.id)},onKeyDown:e=>{e_(e,c)},tabIndex:0,style:{display:"flex",alignItems:"center",width:"100%",cursor:"pointer",padding:0,boxSizing:"border-box",fontSize:"14px"},title:e,sx:{"&:hover":{backgroundColor:"action.hover"},"&:focus-visible":{boxShadow:`0 0 0 2px ${EO} inset`}},children:[Yn.jsxs(xl,{ref:l,className:"exploration-item-focus",component:"div",tabIndex:0,onKeyDownCapture:e=>{e_(e,c)},sx:{display:"flex",minWidth:0,alignItems:"center",justifyContent:"space-between",flexGrow:1,marginRight:"4px","&:focus-visible":{boxShadow:`0 0 0 2px ${EO} inset`}},children:[Yn.jsx(Gl,{checked:r.has(n.id),"aria-label":a("ChartExploration.ListItem.Label",e),size:"small",tabIndex:-1,style:{padding:9,flexShrink:0,visibility:-1===n.id?"hidden":"visible"}}),Yn.jsx(t_,{children:e})]}),Yn.jsx(Yq,{ref:u,className:"exploration-draggable-icon",tabIndex:0,height:"16px",onClick:e=>{e.stopPropagation()},onKeyDownCapture:e=>{e_(e,c)}})]})},r_=e=>{const t=tx(hO(e))??"";return Yn.jsx(n_,{title:t,...e})},i_=()=>{const e=tx(gO),t=tx(vO),n=tx(RO),r=nx(xO);return Yn.jsx(YA,{numberOfSections:2,numberOfItemsInSection:t,keyExtractor:e,emptyTexts:n,onDragEnd:r,dragOverlayRenderer:LO,headerRenderer:Bq,itemRenderer:r_})},o_=({itemIndex:e})=>{const t=tx(TO(e));return Yn.jsx(kO,{children:t})},a_=()=>{const e=tx(bx);return Yn.jsx(Vq,{children:e("Common.Values")})},s_=e=>{const{itemIndex:t}=e,n=tx(TO(t));return Yn.jsx(n_,{title:n,...e})},l_=()=>{const e=tx(qO),t=tx(_O),n=tx(MO),r=nx(FO);return Yn.jsx(xl,{className:"exploration-header-section",style:{height:"100%",display:"flex",flexDirection:"column-reverse"},children:Yn.jsx(YA,{numberOfSections:1,numberOfItemsInSection:t,keyExtractor:e,emptyTexts:n,onDragEnd:r,dragOverlayRenderer:o_,headerRenderer:a_,itemRenderer:s_})})},u_=r((e,t)=>Yn.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:Yn.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"})})),c_=()=>{const[e,t]=rx(xx),n=tx(bx),r=o.useRef(null),[i]=tx(_O),[a=0,s=0]=tx(vO),l=m(e=>{t(e.target.value)},[t]),u=0===e.length||0===a&&0===s&&0===i?n("Common.Search.NoResultsAvailable"):n("ChartExploration.Pivot.Search.ResultsFound",a.toString(),s.toString(),i.toString());return Yn.jsxs(xl,{ref:r,onKeyDown:e=>{zq(e,r)},style:{position:"sticky",top:0,zIndex:10,width:"calc(100% - 24px)",backgroundColor:"var(--sprout-common-background-color-weak)",paddingTop:0,paddingRight:12,paddingLeft:12,paddingBottom:12},children:[Yn.jsx(Uq,{"data-testid":"screenOnly-search-results","aria-live":"polite","aria-atomic":"true",children:u}),Yn.jsx(rd,{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:Yn.jsx(Ou,{position:"start",children:Yn.jsx(u_,{})}),inputProps:{style:{fontSize:"14px",paddingTop:6,paddingBottom:6}}})]})},d_=e=>{const t=ha(Vd());return Yn.jsx(_a,{theme:t,children:Yn.jsx(Kb,{children:Yn.jsx(Bx,{props:e,children:Yn.jsxs(xl,{className:"exploration-panel",style:{display:"flex",flexDirection:"column"},children:[Yn.jsx(c_,{}),Yn.jsx(i_,{}),Yn.jsx(l_,{})]})})})})},p_=e=>{if(e.flags.isEnabled("CLIENT_IM_5973_PIVOT_TABLE_EXPLORATION"))return{component:d_,classification:{tags:["exploration"],exclusive:!0}}};var f_=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}(f_||{}),h_=function(e){return e.COMPARE="compare",e.GENERAL="general",e}(h_||{}),m_=function(e){return e.VALUES="values",e.CONDITION="condition",e.SEARCH="search",e.CLEAR_SELECTION="clear_selection",e.TOP_BOTTOM="top_bottom",e}(m_||{}),g_=function(e){return e.FIXED_VALUE="fixed_value",e.CALCULATED_VALUE="calculated_value",e}(g_||{});const v_=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,y_=e=>{if(!Array.isArray(e))return"";let t="{<";const n=[];if(e.forEach(e=>{let t,r=`[${e.field}]${e.exclude?"-":""}={`,i="}";switch(e.type){case m_.SEARCH:t=(e=>{let t="",n="";const r=e.options?.mode;if(!r)return"";switch(r){case f_.BEGINNING_OF_WORD:t="*^",n="*";break;case f_.ENDS_WITH:t="*";break;case f_.STARTS_WITH:n="*";break;case f_.MATCHES_EXACTLY:break;case f_.CONTAINS:default:t="*",n="*"}const i=e.options.values?.[0]??"";return""!==i?`"${t}${i}${n}"`:""})(e);break;case m_.CONDITION:t=(e=>{const{options:t}=e,n=t?.mode===h_.GENERAL,r=t?.modifier?.type===g_.FIXED_VALUE,i=t?.modifier?.operator?t.modifier.operator.split(" "):[];if(0===i.length||!r&&(!t.firstValue?.aggregator||!t.firstValue?.field)||r&&!t.firstValue?.fixedValue||n&&(!t.conditionField?.aggregator||!t.conditionField?.field))return"";let o,a,s="=";n&&r?(o=`${t.conditionField?.aggregator}(${v_(t.conditionField?.field)})`,a=`${t.firstValue?.fixedValue}`):!n&&r?(o="",a=`${t.firstValue?.fixedValue}`,s=""):n||r?(o=`${t.conditionField?.aggregator}(${v_(t.conditionField?.field)})`,a=`${t.firstValue?.aggregator}(${v_(t.firstValue?.field)})`):(o=`${v_(e.field)}`,a=`${t.firstValue?.aggregator}(total ${v_(t.firstValue?.field)})`);const l=`${s}${o}${i[0]}${a}`;let u="";if(i.length>1){if(!r&&(!t.secondValue?.aggregator||!t.secondValue?.field)||r&&!t.secondValue?.fixedValue)return"";let e,a;n&&r?(e=`${t.secondValue?.fixedValue}`,a=` and ${o}`):!n&&r?(e=`${t.secondValue?.fixedValue}`,a=""):n||r?(e=`${t.secondValue?.aggregator}(${v_(t.secondValue?.field)})`,a=` and ${o}`):(e=`${t.secondValue?.aggregator}(total ${v_(t.secondValue?.field)})`,a=` and ${o}`),u=`${a}${i[1]}${e}`}return`"${l}${u}"`})(e);break;case m_.CLEAR_SELECTION:t=`[${e.field}]=`,r="",i="";break;case m_.VALUES:default:t=e.options?.values?e.options.values.map(e=>`'${e.replace(/'/g,"''")}'`).join(","):""}""!==t&&n.push(`${r}${t}${i}`)}),0===n.length)return;return t+=`${n.join(",")}>}`,t},b_=[];for(let e=0;e<256;++e)b_.push((e+256).toString(16).slice(1));const x_=new Uint8Array(16);function S_(e,t,n){return crypto.randomUUID?crypto.randomUUID():function(e){e=e||{};const t=e.random??e.rng?.()??crypto.getRandomValues(x_);if(t.length<16)throw new Error("Random bytes length must be >= 16");return t[6]=15&t[6]|64,t[8]=63&t[8]|128,function(e,t=0){return(b_[e[t+0]]+b_[e[t+1]]+b_[e[t+2]]+b_[e[t+3]]+"-"+b_[e[t+4]]+b_[e[t+5]]+"-"+b_[e[t+6]]+b_[e[t+7]]+"-"+b_[e[t+8]]+b_[e[t+9]]+"-"+b_[e[t+10]]+b_[e[t+11]]+b_[e[t+12]]+b_[e[t+13]]+b_[e[t+14]]+b_[e[t+15]]).toLowerCase()}(t)}(e)}const w_=()=>crypto?.randomUUID?.()??S_(),C_=1e3,E_=1e3,I_=e=>{if(0===e.qInterColumnSortOrder.length)return;const t=e.qDimensions,n=((e,t)=>{const n=new Set;for(const t of e){if(n.has(t))return!0;n.add(t)}const r=e.includes(-1),i=e.filter(e=>-1!==e);if(t){const n=r?t.length+1:t.length;if(e.length!==n)return!0}const o=[...i].sort((e,t)=>e-t);for(let e=0;e<o.length;e++)if(o[e]!==e)return!0;return!1})(e.qInterColumnSortOrder,t);n&&(e.qInterColumnSortOrder=((e,t)=>{const n=[];if(t)for(let e=0;e<t.length;e++)n.push(e);return e.qMeasures.length>=2&&n.push(-1),n})(e,t))},D_=(e,t,n)=>{[e[t],e[n]]=[e[n],e[t]]},P_=e=>{if(!e)return;I_(e);const t=e.qDimensions,{qInterColumnSortOrder:n}=e;((e,t=[])=>{const n=t.filter(e=>-1!==e);for(let r=0;r<n.length;r++)if(-1!==n[r]&&n[r]!==r){const i=n[r],o=n.indexOf(r),a=n[o];D_(n,r,o),D_(e,r,o),D_(t,t.indexOf(i),t.indexOf(a))}})(t,n)},M_=P;class R_ extends M_{#u;#c;constructor(e,t){super(e),this.path=e.path,this.#u=t.translator,this.#c=t.flags.isEnabled}async#d(e,t,n,r,i=!1){if(!e||this.#p(e))return;const o=t??!1;if(e.qDef.cId||(e.qDef.cId=w_()),r)return this.addAlternativeDimension(e,o,n);if(this.getDimensions().length<this.maxDimensions()){const t=await(async(e,t,n,r,i=!1)=>{const o=e.getDimensions(),a=e.hcProperties.qNoOfLeftDims;return i||await e.autoSortDimension(t),P_(e.hcProperties),(-1===a||Number.isNaN(+a))&&(e.hcProperties.qNoOfLeftDims=o.length),n?((e,t,n,r)=>{if(!e)return;const{qInterColumnSortOrder:i,qNoOfLeftDims:o}=e,a=t.length,s=i.indexOf(-1),l=-1!==s,u=void 0!==r?r+(o||0):void 0;if(l&&void 0!==u&&s>=u?((e,t,n)=>{t.splice(n,1),t.push(e),t.splice(n+1,0,-1)})(a,i,s):i.push(a),void 0===r)t.push(n);else if(void 0!==u){const e=l&&u>s?u-1:u;t.splice(e,0,n)}})(e.hcProperties,o,t,r):((e,t,n,r)=>{if(!e||"number"!=typeof e.qNoOfLeftDims)return;const i=e.qNoOfLeftDims,{qInterColumnSortOrder:o}=e,a=t.length,s=o.indexOf(-1),l=-1!==s&&i>0&&s<i;if(o.push(a),l)void 0===r?t.splice(i-1,0,n):s<r?t.splice(r-1,0,n):(t.splice(r,0,n),o.splice(s,1),o.splice(s+1,0,-1));else{const e=r??i;t.splice(e,0,n),-1!==s&&(o.splice(s,1),o.splice(s+1,0,-1))}e.qNoOfLeftDims++})(e.hcProperties,o,t,r),t})(this,e,o,n,i);return this.#f({section:o?"columns":"rows",cId:e.qDef.cId,addLast:void 0===n}),t}}async addDimension(e,t,n,r){return this.#d(e,t,n,r)}async addDimensions(e,t,n){const r=[];for await(const i of e){const e=await this.addDimension(i,n,void 0,t);e&&r.push(e)}return r}addAlternativeDimension(e,t,n){if(!e||this.#p(e))return;const r=this.getAlternativeDimensions();void 0===this.hcProperties.excludedNoOfLeftDims&&(this.hcProperties.excludedNoOfLeftDims=r.length);let i=n;return i=void 0===i?t?r.length:this.hcProperties.excludedNoOfLeftDims:t?this.hcProperties.excludedNoOfLeftDims+i:Math.min(i,this.hcProperties.excludedNoOfLeftDims),r.splice(i,0,e),t||this.hcProperties.excludedNoOfLeftDims++,this.#f({section:t?"columns":"rows",cId:e.qDef.cId,alternative:!0,addLast:void 0===n}),e}async addFieldDimension(e,t,n,r={}){const i=this.createFieldDimension(e,t,n);return this.addDimension(i,r.asColumn,void 0,!1)}async addFieldDimensions(e,t={}){const n=e.map(e=>this.createFieldDimension(e.field,e.label,e.defaults));return this.addDimensions(n,void 0,t.asColumn)}async addLibraryDimensions(e,t={}){const n=e.map(e=>this.createLibraryDimension(e.id,e.defaults));return this.addDimensions(n,void 0,t.asColumn)}reinsertDimension(e,t,n){e.qDef.cId||(e.qDef.cId=w_());if(this.getDimensions().length<this.maxDimensions())return this.addDimension(e,t,n);return this.reinsertAlternativeDimension(e,n,t)}reinsertAlternativeDimension(e,t,n){const r=this.getDimensions(),i=this.getAlternativeDimensions();if(r.length>=C_)return Promise.resolve();const o="number"==typeof t?t:i.length;return i.splice(o,0,e),this.#f({section:n?"columns":"rows",cId:e.qDef.cId,alternative:!0}),Promise.resolve(e)}async removeDimensions(e,t,n){return Promise.all([...e].reverse().map(e=>this.removeDimension(e,t,n)))}async removeDimension(e,t,n){if(t){const t=this.getAlternativeDimensions().splice(e,1)[0];return!n&&this.hcProperties.excludedNoOfLeftDims&&this.hcProperties.excludedNoOfLeftDims--,this.#h({cId:t.qDef.cId,section:n?"columns":"rows"}),t}const r=this.getDimensions(),i=this.properties.qHyperCubeDef.qNoOfLeftDims,o=this.hcProperties.qInterColumnSortOrder.indexOf(e);"number"==typeof this.properties.qHyperCubeDef.qNoOfLeftDims&&"number"==typeof o&&"number"==typeof i&&o+1<=i&&this.properties.qHyperCubeDef.qNoOfLeftDims--;const a=this.properties.qHyperCubeDef.columnWidths?this.properties.qHyperCubeDef.columnWidths[1]:void 0;Array.isArray(a)&&a.length>e&&a.splice(e,1);const s=r.splice(e,1).at(0);if(s)return((e,t)=>{if(!e)return-1;const n=e.indexOf(t);if(-1===n)return-1;for(let n=0;n<e.length;++n)e[n]>t&&e[n]--;e.splice(n,1)})(this.hcProperties.qInterColumnSortOrder,e),P_(this.hcProperties),this.#h({cId:s.qDef.cId,section:n?"columns":"rows"}),s}#p(e){return!(!e||void 0===e.qDef.cId)&&[...this.getDimensions(),...this.getAlternativeDimensions()].some(t=>t.qDef.cId===e.qDef.cId)}async addMeasures(e,t=!1){const n=[];for await(const r of e){const e=await this.addMeasure(r,t,void 0,!0);e&&n.push(e)}return n}addAlternativeMeasures(e,t){if(this.#m(e))return;const n=this.getAlternativeMeasures(),r=void 0===t?n.length:t,i=n.splice(r,0,e);return this.#g({cId:e.qDef.cId,alternative:!0,addLast:void 0===t}),i}async addMeasure(e,t,n,r){if(this.#m(e))return;if(e.qDef.cId||(e.qDef.cId=w_()),t)return this.addAlternativeMeasures(e,n);r||delete e.qDef.qNumFormat;const i=this.getMeasures();if(i.length<this.maxMeasures()){const t=1===i.length;return void 0!==n&&n>=0?i.splice(n,0,e):i.push(e),this.autoSortMeasure(e).then(()=>(t&&(this.hcProperties.qInterColumnSortOrder.push(-1),0===this.getDimensions().length&&(this.hcProperties.qNoOfLeftDims=0)),this.#g({cId:e.qDef.cId,addLast:void 0===n}),e))}return i.length<E_?(this.getAlternativeMeasures().push(e),this.#g({cId:e.qDef.cId,alternative:!0,addLast:void 0===n}),Promise.resolve(e)):Promise.resolve()}reinsertMeasure(e,t){const n=this.getMeasures(),r=this.getAlternativeMeasures(),i=this.hcProperties.qInterColumnSortOrder;if(e.qDef.cId||(e.qDef.cId=w_()),t=void 0!==t?t:n.length,n.length<this.maxMeasures()){if(n.splice(t,0,e),2===n.length){-1===i.indexOf(-1)&&i.push(-1)}this.#g({cId:e.qDef.cId})}else n.length<E_&&(t=r.length,r.splice(t,0,e),this.#g({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.#h({cId:t.qDef.cId,section:"measures"}),t}const n=this.getMeasures();let r,i,o;if("number"==typeof e&&e<n.length){r=2===n.length,i=this.getMeasures().splice(e,1)[0];const t=this.hcProperties.qInterColumnSortOrder;r&&(o=t.indexOf(-1),t.splice(o,1),this.hcProperties.qNoOfLeftDims&&o+1<=this.hcProperties.qNoOfLeftDims&&this.hcProperties.qNoOfLeftDims--)}else"number"==typeof e&&(i=this.getAlternativeMeasures().splice(e-n.length,1)[0]);if(i)return this.#h({cId:i.qDef.cId,section:"measures"}),i}async removeMeasures(e,t){return await Promise.all([...e].reverse().map(e=>this.removeMeasure(e,t))),e}#m(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.#v("rows"),t=this.getDimensions();return e.filter(e=>e>=0).map(e=>t[e])}getColumnDimensions(){const e=this.#v("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)}#y(e){const t=this.hcProperties.rankedList?.[e];return t||this.createRankedList(e)}#b(e){return[...this.#y(e)]}#x(e,t){return void 0===this.hcProperties.rankedList&&(this.hcProperties.rankedList={}),this.hcProperties.rankedList[e]=t,t}#S(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}#w(e){const t=({qDef:t})=>t.cId===e;return!(!this.getAlternativeDimensions().some(t)&&!this.getAlternativeMeasures().some(t))}#v(e){const{qInterColumnSortOrder:t,qNoOfLeftDims:n}=this.hcProperties;if(this.#C())return"columns"===e?t:[];switch(e){case"rows":return-1===n?t:t.slice(0,n);case"columns":return-1===n?[]:t.slice(n);default:throw new Error(`Unknown section in #getInterColumnSortOrderBySection: ${e}`)}}#C(){const{qNoOfLeftDims:e}=this.hcProperties,t=-1===e||Number.isNaN(+e);return 0===this.getDimensions().length&&this.getMeasures().length>0&&t}#E(e){const t=this.hcProperties.qInterColumnSortOrder.indexOf(-1);if(-1===t)return!1;if(this.#C())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}}#I(e,t=!0){const n=e=>-1===e?-1:e.qDef.cId;if("measures"===e)return this.getMeasures().concat(t?this.getAlternativeMeasures():[]).map(n);const r=this.#v(e),i=this.getDimensions(),o=r.map(e=>-1===e?-1:i[e]);switch(e){case"rows":return o.concat(t?this.getAlternativeRowDimensions():[]).map(n);case"columns":return o.concat(t?this.getAlternativeColumnDimensions():[]).map(n);default:throw new Error(`Unknown section in #isCorruptRankedList: ${e}`)}}isRankedListCorrupt(e){const t=this.hcProperties.rankedList?.[e],n=this.properties.qInfo?.qId;if(!t)return!0;if(new Set(t).size!==t.length){const r=t.filter((e,n)=>t.indexOf(e)!==n);return console.warn("Corrupt ranked list detected: duplicate ids",{duplicates:r,section:e,chartId:n}),!0}const r=this.#I(e);if(t.length!==r.length)return console.warn("Corrupt ranked list detected: length mismatch",{section:e,chartId:n,fieldIds:r,rankedList:t,diff:new Set(r).symmetricDifference(new Set(t))}),!0;const i=r.filter(e=>!t.includes(e));if(i.length>0)return console.warn("Corrupt ranked list detected: missing ids",{missingIds:i,section:e,chartId:n}),!0;const o=this.#I(e,!1),a=t.filter(e=>o.includes(e)),s=o.filter((e,t)=>e!==a[t]);return s.length>0&&(console.warn("Corrupt ranked list detected: main field order mismatch",{section:e,chartId:n,orderMismatchIds:s}),!0)}createRankedList(e){switch(e){case"rows":case"columns":return this.#D({section:e});case"measures":return this.#P();default:throw new Error(`Unknown section in getRankedList: ${e}`)}}#D({section:e}){const t=this.getDimensions(),n=this.#v(e),r="columns"===e?this.getAlternativeColumnDimensions():this.getAlternativeRowDimensions(),i=n.map(e=>-1===e?-1:t[e].qDef.cId);return i.push(...r.map(e=>e.qDef.cId)),this.#x(e,i)}#P(){if(void 0!==this.hcProperties.rankedList?.measures&&!this.#c("SUPPORT-9810-MISSING-MEASURES")&&!this.#c("SUPPORT-9810-MIGRATE-RANKED-LISTS"))return this.hcProperties.rankedList.measures;const e=[...this.getMeasures(),...this.getAlternativeMeasures()].map(e=>e.qDef.cId);return this.#x("measures",e)}#M({section:e,cId:t,fields:n,addLast:r}){const i=this.#y(e),o=n.findIndex(e=>e.qDef.cId===t),a=n[o+1]?.qDef.cId,s=n[o-1]?.qDef.cId;if(r)i.push(t);else if(o>=0)if(a){const e=i.indexOf(a);i.splice(e,0,t)}else if(s){const e=i.indexOf(s);i.splice(e+1,0,t)}else i.push(t);return void 0===this.hcProperties.rankedList&&(this.hcProperties.rankedList={}),this.hcProperties.rankedList[e]}#f({section:e,cId:t,alternative:n=!1,addLast:r=!1}){if(void 0===this.hcProperties.rankedList?.[e])return this.#D({section:e});let i;return i="columns"===e?n?this.getAlternativeColumnDimensions():this.getColumnDimensions():n?this.getAlternativeRowDimensions():this.getRowDimensions(),this.#M({section:e,cId:t,fields:i,addLast:r})}#g({cId:e,alternative:t=!1,addLast:n=!1}){if(void 0===this.hcProperties.rankedList?.measures)return this.#P();const r=t?this.getAlternativeMeasures():this.getMeasures();return this.#R(),this.#M({section:"measures",cId:e,fields:r,addLast:n})}#R(){const e=this.#y("rows"),t=this.#y("columns");this.#E("rows")&&!e.includes(-1)?e.push(-1):this.#E("columns")&&!t.includes(-1)&&t.push(-1)}#k(){if(this.hcProperties.qInterColumnSortOrder.includes(-1))return;const e=this.#y("rows"),t=this.#y("columns"),n=e.indexOf(-1),r=t.indexOf(-1);-1!==n&&e.splice(n,1),-1!==r&&t.splice(r,1)}#h({cId:e,section:t}){const n=this.#y(t),r=n.indexOf(e);-1!==r&&(n.splice(r,1),this.#k())}async moveMeasureToAlternative(e){const t=this.getMeasures().findIndex(t=>t.qDef.cId===e),n=this.#b("measures"),r=n.indexOf(e);if(-1===t)return;const i=await this.removeMeasure(t);if(void 0===i)return;const o=n.slice(r+1).find(e=>this.getAlternativeMeasures().some(t=>t.qDef.cId===e)),a=this.getAlternativeMeasures().findIndex(e=>e.qDef.cId===o);await this.addAlternativeMeasures(i,-1===a?void 0:a),this.#x("measures",n)}async moveMeasureFromAlternative(e){const t=this.getAlternativeMeasures().findIndex(t=>t.qDef.cId===e),n=this.#b("measures"),r=n.indexOf(e);if(-1===t)return;const i=await this.removeMeasure(t,!0);if(void 0===i)return;const o=this.getMeasures().map(e=>e.qDef.cId),a=n.slice(r+1).find(e=>o.includes(e)),s=o.findIndex(e=>e===a);await this.addMeasure(i,!1,-1===s?void 0:s),this.#x("measures",n)}async moveDimensionToAlternative(e){const t=this.#S(e),n=this.getDimensions().findIndex(t=>t.qDef.cId===e);if(-1===n||null===t)return;const r=this.#b(t),i=r.indexOf(e),o="columns"===t,a=await this.removeDimension(n,!1,o);if(void 0===a)return;const s=r.slice(i+1).find(e=>this.getAlternativeDimensions().some(({qDef:t})=>t.cId===e));let l=this.getAlternativeDimensions().findIndex(({qDef:e})=>e.cId===s);l=-1===l?void 0:l;void 0!==this.addAlternativeDimension(a,o,l)&&this.#x(t,r)}async moveDimensionFromAlternative(e){const t=this.#S(e),n=this.getAlternativeDimensions().findIndex(t=>t.qDef.cId===e);if(-1===n||null===t)return;const r=this.#b(t),i=r.indexOf(e),o="columns"===t,a=await this.removeDimension(n,!0,o);if(void 0===a)return;const s=this.#I(t,!1),l=r.slice(i+1).find(e=>s.includes(e));let u=s.findIndex(e=>e===l);u=-1===u?void 0:u;void 0!==await this.#d(a,o,u,!1,!0)&&this.#x(t,r)}movePseudoDimension({toIndex:e,toSection:t}){const n=this.#S(-1);if(null===n)return void console.error("Cannot move pseudo dimension, unable to find it in any section",{toIndex:e,toSection:t});const r="columns"===t,i=n===t,o=this.#b(t);if(i){const e=o.indexOf(-1);o.splice(e,1)}else{const i=this.#y(n),o=i.indexOf(-1);if(-1===o)return void console.error("Couldn't delete pseudo dimension from current section",{toIndex:e,toSection:t,fromSection:n});i.splice(o,1),this.hcProperties.qNoOfLeftDims=r?Math.max(0,this.hcProperties.qNoOfLeftDims-1):this.hcProperties.qNoOfLeftDims+1}const a=e-o.slice(0,e).filter(e=>this.#w(e)).length,s=r?this.hcProperties.qNoOfLeftDims+a:a,l=this.hcProperties.qInterColumnSortOrder.indexOf(-1);this.hcProperties.qInterColumnSortOrder.splice(l,1),this.hcProperties.qInterColumnSortOrder.splice(s,0,-1),o.splice(e,0,-1),this.#x(t,o)}async moveDimension({cId:e,toIndex:t,toSection:n}){const r=this.#S(e),i=this.#w(e);if(null===r)return void console.error("Cannot move dimension, unable to find it in any section",{cId:e});const o=(i?this.getAlternativeDimensions():this.getDimensions()).findIndex(({qDef:t})=>t.cId===e);if(-1===o)return void console.error("Couldn't find dimension to move",{cId:e,toIndex:t,toSection:n});const a=this.#b(n),s=a.indexOf(e);-1!==s&&a.splice(s,1);const l=Math.max(0,Math.min(t,a.length));l!==t&&console.warn("[moveDimension] toIndex is out of bounds, clamping it",{toIndex:t,clampedToIndex:l});const u=l-a.slice(0,l).filter(e=>this.#w(e)!==i).length,c="columns"===n,d="columns"===r,p=await this.removeDimension(o,i,d);if(void 0===p)return;void 0!==await this.addDimension(p,c,u,i)&&(a.splice(l,0,e),this.#x(n,a))}async moveMeasure({cId:e,toIndex:t}){const n=this.#w(e),r=(n?this.getAlternativeMeasures():this.getMeasures()).findIndex(t=>t.qDef.cId===e);if(-1===r)return void console.error("Cannot move measure, unable to find it in any section",{cId:e});const i=this.#b("measures"),o=i.indexOf(e);-1!==o&&i.splice(o,1);const a=Math.max(0,Math.min(t,i.length));a!==t&&console.warn("[moveMeasure] toIndex is out of bounds, clamping it",{toIndex:t,clampedToIndex:a});const s=await this.removeMeasure(r,n);if(void 0===s)return;const l=a-i.slice(0,a).filter(e=>this.#w(e)!==n).length;void 0!==await this.addMeasure(s,n,l)&&(i.splice(a,0,e),this.#x("measures",i))}getLabels(){return this.getMeasures().filter(e=>!e.qLibraryId&&!!e.qDef.qLabel).map(e=>e.qDef.qLabel)}IsHCInStraightMode(){return"S"===this.hcProperties.qMode}getFilters(){return this.properties.filters??[]}getFilter(e){return this.getFilters().find(t=>t.id===e)}addFilterField(e){const t=e.qTags??e.tags,n=Array.isArray(t)&&t.includes("$numeric"),r=e.isDerived,i=Array.isArray(this.properties.filters)?this.properties.filters:[],o={type:"values",field:r?e.value??e.fullname:e.name??e.label??e.field,options:{values:[]},exclude:!1,id:w_(),qTags:Array.isArray(t)?t:[],isNumeric:n};return i.push(o),this.properties.filters=i,this.properties.qHyperCubeDef.qContextSetExpression=y_(i),o}addFilters(e){const t=[];for(const n of e)t.push(this.addFilterField(n));return t}#L(e){const t=this.getFilters();return t.splice(e,1),this.properties.qHyperCubeDef.qContextSetExpression=y_(t),t}removeFilters(e){if(0===e.length)return[];const t=[...e].sort((e,t)=>t-e),n=this.getFilters().filter((t,n)=>e.includes(n));for(const e of t)this.#L(e);return n}getAddDimensionLabel(){return this.#u.get("Visualization.Requirements.AddDimension")}canColorBy(){return!1}}var k_,L_={exports:{}};var A_=(k_||(k_=1,function(e){self,e.exports=(()=>{var e={909:e=>{var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},a=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,i=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(r in e);return void 0===r||t.call(e,r)},s=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(i)return i(e,n).value}return e[n]};e.exports=function e(){var t,n,r,i,u,c,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=l(d,n),d!==(i=l(t,n))&&(h&&i&&(a(i)||(u=o(i)))?(u?(u=!1,c=r&&o(r)?r:[]):c=r&&a(r)?r:{},s(d,{name:n,newValue:e(h,c,i)})):void 0!==i&&s(d,{name:n,newValue:i}));return d}},8:(e,t)=>{(()=>{var e={229:e=>{var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},a=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,i=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(r in e);return void 0===r||t.call(e,r)},s=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(i)return i(e,n).value}return e[n]};e.exports=function e(){var t,n,r,i,u,c,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=l(d,n),d!==(i=l(t,n))&&(h&&i&&(a(i)||(u=o(i)))?(u?(u=!1,c=r&&o(r)?r:[]):c=r&&a(r)?r:{},s(d,{name:n,newValue:e(h,c,i)})):void 0!==i&&s(d,{name:n,newValue:i}));return d}}},n={};function r(t){var i=n[t];if(void 0!==i)return i.exports;var o=n[t]={exports:{}};return e[t](o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};(()=>{r.r(i),r.d(i,{default:()=>Le});var e=r(229),t=r.n(e);const n=function(e,t,n){if(!t)return!1;var r,i=t.split("."),o=i[i.length-1],a=e;for(r=0;r<i.length-1;++r)void 0===a[i[r]]&&(a[i[r]]=Number.isNaN(+i[r+1])?{}:[]),a=a[i[r]];if(void 0!==n){var s=a[o];return a[o]=n,{updated:n,previous:s}}return delete a[o],!1},o=function(e,t,n){var r,i=t.split("."),o=e;if(void 0===o)return n;for(r=0;r<i.length;++r){if(void 0===o[i[r]])return n;o=o[i[r]]}return o},a={EXPRESSIONS:{observed:"",trend:"STL_Trend",seasonal:"STL_Seasonal",residual:"STL_Residual"},OPTIONS:[{value:"observed",translation:"cao.trendDecomposition.parameters.decomposition.observed"},{value:"trend",translation:"cao.trendDecomposition.parameters.decomposition.trend"},{value:"seasonal",translation:"cao.trendDecomposition.parameters.decomposition.seasonal"},{value:"residual",translation:"cao.trendDecomposition.parameters.decomposition.residual"}]};var s="".concat(" ","(").concat(" "),l="".concat(" ",")").concat(" ");function u(e){return s+e+l}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var n=function(e,t){if(!t)return null;var n,r;for(n=0;n<t.length;n++)if((r=t[n]).qInfo.qId===e)return r;return null}(e.qLibraryId,t.dimensionList);return n&&n.qData.info[0].qTags.indexOf("$numeric")>-1}var r=function(e,t){if(!t)return null;var n,r,i=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var n=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(n)&&(t=(t=t.substring(1,n)).trim()),t}(e);for(n=0;n<t.length;n++){if((r=t[n]).qName===i)return r;if(r.qDerivedFieldData)for(var o=0;o<r.qDerivedFieldData.qDerivedFieldLists.length;++o)for(var a=r.qDerivedFieldData.qDerivedFieldLists[o],s=0;s<a.qFieldDefs.length;++s){var l=a.qFieldDefs[s];if(l.qName===i)return l}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return r&&r.qTags.indexOf("$numeric")>-1}function d(e){return!(!e.fullAccumulation&&!e.fullRange)}function p(e,t){var n=e.crossAllDimensions;return 2===t&&n?"RowNo(Total)":"RowNo()"}function f(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e),n=t.trim();return"="===n.substring(0,1)?n.substring(1).trim():n}function h(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function m(e,t){var n=e.crossAllDimensions;return 2===t&&n?"Above(Total ":"Above("}function g(e){return void 0===e?")":", 0, ".concat(e,")")}function v(e){return"Replace(Replace(".concat(e,",'''',''''''),'$','$''&''')")}function y(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=").concat(v("MinString(".concat(t,")")),")' and Only({1}").concat(t,")<='$(=").concat(v("MaxString(".concat(t,")")),")'\"}")}function b(e){var t=e.modifier,n=void 0===t?{}:t,r=e.dimensions,i=e.dimensionAndFieldList,o=e.funcComp,a=void 0===o?"Sum":o,s=e.valueComp,l=void 0===s?"0":s;if(!n.showExcludedValues)return"";if(r&&1===r.length){var u=y(c(r[0],i),h(0));return"".concat(a,"({1<").concat(u,">}").concat(l,")")}if(r&&2===r.length){var d=c(r[0],i),p=c(r[1],i),f=h(0),m=h(1),g=y(d,f),v=y(p,m);return"".concat(a,"({1<").concat(g,",").concat(v,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function x(e){return"".concat(e,"(")}function S(e){var t=e.properties,n=e.layout;return o(t,"qHyperCubeDef.qDimensions",o(n,"qHyperCube.qDimensionInfo",[])).length}const w={isFullRange:d,getNumDimensions:S,getExpressionWithExcludedComp:function(e){var t=e.expression,n=e.modifier,r=e.dimensions,i=e.dimensionAndFieldList,o=e.treatMissingAsNull,a=u(f(t));if(!n.showExcludedValues)return a;var s=b({modifier:n,dimensions:r,dimensionAndFieldList:i}),l=o?"":", 0";if(r&&1===r.length){var c=h(0);return"If(Count(".concat(c,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(r&&2===r.length){var d=h(0),p=h(1);return"If(Count(".concat(d,") * Count(").concat(p,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:p,getNumStepComp:function(e,t){if(!d(e)){var n=e.steps;return"number"!=typeof n||Number.isNaN(n)?6:n}return p(e,t)},getAboveCompPrefix:m,getAboveCompSuffix:g,getAboveComp:function(e,t,n,r){return m(e,t)+n+g(r)},getFunctionPrefix:x,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return x(e)+t+")"},getAggrComp:function(e,t,n){return"Aggr(".concat(e,", ").concat(t,", ").concat(n,")")},getExcludedComp:b,needDimension:function(e){var t=e.modifier,n=e.properties,r=e.layout,i=function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t);return 0===i&&2===S({properties:n,layout:r})},getDimComp:function(e,t){var n=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),r=h(t);if(!n.qSortByExpression&&!n.qSortByNumeric&&!n.qSortByAscii)return r;var i=["Descending","Ascending"],o=n.qSortByNumeric?"(Numeric, ".concat(i[(n.qSortByNumeric+1)/2],")"):"",a=n.qSortByAscii?"(Text, ".concat(i[(n.qSortByAscii+1)/2],")"):"";return n.qSortByNumeric&&n.qSortByAscii?"(".concat(r,", ").concat(o,", ").concat(a,")"):n.qSortByNumeric?"(".concat(r,", ").concat(o,")"):n.qSortByAscii?"(".concat(r,", ").concat(a,")"):r},simplifyExpression:f,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var n=t.indexOf(s);if(-1!==n){var r=t.indexOf(l);if(-1!==r)return t.substring(n+s.length,r)}}},initModifier:function(e,t){Object.keys(t).forEach(function(n){void 0===e[n]&&(e[n]=t[n])})},isNumeric:c,isApplicable:function(e){var t=e.properties,n=e.layout,r=e.minDimensions,i=void 0===r?1:r,o=e.maxDimensions,a=void 0===o?2:o;if(!t&&!n)return!0;var s=S({properties:t,layout:n});return s>=i&&s<=a},getExpressionWithMarkers:u,canExtract:function(e){var t=e.indexOf(s),n=e.indexOf(l);return t>-1&&n>-1&&t<n},getDimDefWithWrapper:h,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")},generateTSDExpression:function(e,t,n){var r=t||e.outputExpression;if(e.base&&e.base.qDef&&(r=t!==e.base.qDef?t:e.base.qDef),"observed"!==e.decomposition){var i=n.qHyperCubeDef.qMeasures.find(function(t){return t.qDef.base&&t.qDef.base.qLibraryId&&e.base&&e.base.qLibraryId?t.qDef.base.qLibraryId===e.base.qLibraryId:null});i&&t!==i.qDef.qLabel&&(r=i.qLibraryId||i.qDef.base.qLibraryId?"[".concat(i.qDef.qLabel,"]"):i.qDef.base.qDef);var o=function(e){var t=a.OPTIONS.find(function(t){return t.value===e.decomposition});return t?a.EXPRESSIONS[t.value]:""}(e);r=r.startsWith("=")?r.substr(1):r,r="".concat(o,"(").concat(r,", ").concat(e.steps,")")}return r},getDecomposition:function(e){var t="observed";return Object.values(a.EXPRESSIONS).find(function(n){var r=e.qDef.base.qDef.toLowerCase()||e.qDef.qDef.toLowerCase();return a.EXPRESSIONS[n]&&r.includes(a.EXPRESSIONS[n].toLowerCase())&&(t=n),n}),t}};function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}var I=t().bind(null,!0),D={},P=Array.isArray;function M(e){return null!=e&&!Array.isArray(e)&&"object"===E(e)}function R(e){return void 0===e}function k(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function L(e,t){var n,r=t.substring(1).split("/").slice(0,-1);return r.forEach(function(t,i){if(i!==r.length){n=+t;var o=Number.isNaN(n)?{}:[];e[n||t]=R(e[n||t])?o:e[t],e=e[n||t]}}),e}function A(e,t){var n=!0;if(M(e)&&M(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach(function(r){A(e[r],t[r])||(n=!1)}),n);if(P(e)&&P(t)){if(e.length!==t.length)return!1;for(var r=0,i=e.length;r<i;r+=1)if(!A(e[r],t[r]))return!1;return!0}return e===t}D.generate=function(e,t,n){n=n||"";var r=[];return Object.keys(t).forEach(function(i){var o=function(e){return e?I({},{val:e}).val:e}(t[i]),a=e[i],s="".concat(n,"/").concat(i);A(o,a)||k(t,i)||(R(a)?r.push({op:"add",path:s,value:o}):M(o)&&M(a)?r=r.concat(D.generate(a,o,s)):P(o)&&P(a)?r=r.concat(function(e,t,n){var r=[],i=e.slice(),o=-1;function a(e,t,n){if(e[n]&&R(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(var r=0,i=e.length;r<i;r+=1)if(e[r]&&e[r].qInfo.qId===t)return r;return-1}if(A(t,i))return r;if(!R(t[0])&&R(t[0].qInfo))return r.push({op:"replace",path:n,value:t}),r;for(var s=i.length-1;s>=0;s-=1)-1===(o=a(t,i[s].qInfo&&i[s].qInfo.qId,s))?(r.push({op:"remove",path:"".concat(n,"/").concat(s)}),i.splice(s,1)):r=r.concat(D.generate(i[s],t[o],"".concat(n,"/").concat(s)));for(var l=0,u=t.length;l<u;l+=1)-1===(o=a(i,t[l].qInfo&&t[l].qInfo.qId))?(r.push({op:"add",path:"".concat(n,"/").concat(l),value:t[l]}),i.splice(l,0,t[l])):o!==l&&(r.push({op:"move",path:"".concat(n,"/").concat(l),from:"".concat(n,"/").concat(o)}),i.splice(l,0,i.splice(o,1)[0]));return r}(a,o,s)):r.push({op:"replace",path:"".concat(n,"/").concat(i),value:o}))}),Object.keys(e).forEach(function(i){R(t[i])&&!k(e,i)&&r.push({op:"remove",path:"".concat(n,"/").concat(i)})}),r},D.apply=function(e,t){t.forEach(function(t){var n,r,i=L(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)}(r=u)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(e,t):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}else if(M(a)&&M(t.value))n=a,Object.keys(n).forEach(function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!k(n,e)&&delete n[e]}),I(a,t.value);else{if(!i)throw new Error("Patchee is not an object we can patch");i[o]=t.value}else if("move"===t.op){var c=L(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,n){var r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},D.updateObject=function(e,t){Object.keys(e).length?D.apply(e,D.generate(e,t)):I(e,t)};const O=D,T=function(e,n,r){if(!e)return Promise.resolve();var i=O.generate(n,r);return t()(!0,n,r),i&&i.length?(i=i.map(function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}}),e.applyPatches(i,!0)):Promise.resolve()};var q="accumulation";function _(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===q)return n[r]}function N(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===q)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):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,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=w.getNumDimensions({properties:r,layout:i}));var u=o(r,"qHyperCubeDef.qDimensions",[]),c=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:u,dimensionAndFieldList:s}),d=w.getNumStepComp(n,l),p=w.getAboveComp(n,l,c,d),f=w.getRangeComp("RangeSum",p);if(w.needDimension({modifier:n,properties:r,layout:i})){var h=w.getDimComp(u,1),m=w.getDimComp(u,0),g=w.getAggrComp(f,h,m);f=n.showExcludedValues?w.getExcludedComp({modifier:n,dimensions:u,dimensionAndFieldList:s,valueComp:g}):g}return f},extractInputExpression:w.extractInputExpression,initModifier:function(e){w.initModifier(e,j)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(N(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(N(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(N(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(N(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=_(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=_(t,e);return n&&!n.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(N(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(q))return!1;var o=_(t,e);return o&&!o.disabled}};return n}};var z="movingAverage";function W(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===z)return n[r]}function $(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===z)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var H={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1};const V={translationKey:"properties.modifier.movingAverage",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,n=e.expression,r=e.modifier,i=e.properties,a=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!r)return n;var u=s;void 0===u&&(u=w.getNumDimensions({properties:i,layout:a}));var c=o(i,"qHyperCubeDef.qDimensions",[]),d=r.showExcludedValues&&r.nullSuppression,p=w.getExpressionWithExcludedComp({expression:n,modifier:r,dimensions:c,dimensionAndFieldList:l,treatMissingAsNull:d}),f=w.getNumStepComp(r,u),h=w.getAboveComp(r,u,p,f);if(r.nullSuppression)t=w.getRangeComp("RangeAvg",h);else{var m=w.getRangeComp("RangeSum",h),g=function(e,t){var n=w.getRowNoComp(e,t);if(!w.isFullRange(e)){var r=e.steps,i="number"!=typeof r||Number.isNaN(r)?6:r;return"RangeMin(".concat(i,", ").concat(n,")")}return n}(r,u);t="".concat(m," / ").concat(g)}var v=t;if(w.needDimension({modifier:r,properties:i,layout:a})){var y=w.getDimComp(c,1),b=w.getDimComp(c,0),x=w.getAggrComp(v,y,b);v=r.showExcludedValues?w.getExcludedComp({modifier:r,dimensions:c,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return v},extractInputExpression:w.extractInputExpression,initModifier:function(e){w.initModifier(e,H)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat($(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.movingAverage.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat($(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.movingAverage.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat($(t,e),".fullRange")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat($(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=W(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=W(t,e);return n&&!n.fullRange}},showExcludedValues:{refFn:function(t){return"".concat($(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat($(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(z))return!1;var o=W(t,e);return o&&!o.disabled}};return n}};var B="timeSeriesDecomposition";function G(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===B)return n[r]}function U(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===B)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var Y={type:"timeSeriesDecomposition",disabled:!1,decomposition:"",steps:2,outputExpression:""};const K={translationKey:"properties.modifier.timeSeriesDecomposition",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties;return n?w.generateTSDExpression(n,t,r):t},extractInputExpression:w.extractInputExpression,initModifier:function(e,t){w.initModifier(e,Y),""===e.decomposition&&t&&(e.decomposition=w.getDecomposition(t))},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.timeSeriesDecomposition||"properties.modifier.timeSeriesDecomposition",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{decomposition:{refFn:function(t){return"".concat(U(t,e),".decomposition")},type:"string",translation:t.modifierTrendDecompositionDecomposition||"properties.modifier.trendDecomposition.decomposition",component:"dropdown",schemaIgnore:!0,defaultValue:t.trendDecompositionParametersDecompositionObserved||"cao.trendDecomposition.parameters.decomposition.observed",options:a.OPTIONS},steps:{refFn:function(t){return"".concat(U(t,e),".steps")},type:"integer",translation:t.modifierTimeSeriesDecompositionPeriods||"properties.modifier.timeSeriesDecomposition.periods",schemaIgnore:!0,defaultValue:2,change:function(t,n){var r=G(t,e);if(r){var i=r.steps;r.steps="number"!=typeof i||Number.isNaN(i)?2:Math.abs(i),n.properties.qHyperCubeDef.qMeasures=n.properties.qHyperCubeDef.qMeasures.map(function(e){return e.qDef.modifiers.map(function(e){return"timeSeriesDecomposition"===e.type?e.steps=i:e.steps=e.steps,e}),e})}},show:function(t){var n=G(t,e);return n&&!n.fullRange}}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(B))return!1;var o=G(t,e);return o&&!o.disabled}};return n}};var X="difference";function J(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===X)return n[r]}function Z(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===X)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var Q={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""};const ee={translationKey:"properties.modifier.difference",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:w.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=w.getNumDimensions({properties:r,layout:i}));var u=o(r,"qHyperCubeDef.qDimensions",[]),c=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:u,dimensionAndFieldList:s}),d=w.getAboveComp(n,l,c),p="".concat(c," - ").concat(d);if(w.needDimension({modifier:n,properties:r,layout:i})){var f=w.getDimComp(u,1),h=w.getDimComp(u,0),m=w.getAggrComp(p,f,h);p=n.showExcludedValues?w.getExcludedComp({modifier:n,dimensions:u,dimensionAndFieldList:s,funcComp:"Only",valueComp:m}):m}return p},initModifier:function(e){Object.keys(Q).forEach(function(t){void 0===e[t]&&(e[t]=Q[t])})},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(Z(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.difference.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(Z(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.difference.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},showExcludedValues:{refFn:function(t){return"".concat(Z(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(X))return!1;var o=J(t,e);return o&&!o.disabled}};return n}};var te="normalization";function ne(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===te)return n[r]}function re(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===te)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}function ie(e,t){for(var n=0;n<e.length;n++)if(e[n].value===t)return n;return-1}var oe={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:2,selectionScope:2};function ae(e){return 2===e?"{1}":""}function se(e,t,n){return 1===e?"{$<".concat(w.getFieldWithWrapper(t),"={'").concat(n,"'}>}"):""}function le(e,t){return 0===e&&t>1||2===e?"Total":""}function ue(e,t,n){return 0===e&&t>1?"<".concat(w.getDimDefWithWrapper(n),">"):""}const ce={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:w.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=w.getNumDimensions({properties:r,layout:i}));var u=o(r,"qHyperCubeDef.qDimensions",[]),c=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:u,dimensionAndFieldList:s}),d=n.selectionScope,p=n.dimensionalScope;return function(e,t,n,r,i,o,a){var s=ae(t),l=se(t,n,r),u=""===s&&""===l?"":s||l,c=le(i,o),d=ue(i,o,a),p=function(e){for(var t=[],n=0;n<e;n++)t[n]=w.getDimDefWithWrapper(n);return t.join(", ")}(o);return"".concat(e,"/ Sum(").concat(u," ").concat(c).concat(d," Aggr(").concat(u," ").concat(e,", ").concat(p,"))")}(c,d,n.field,n.value,p,l,n.primaryDimension)},initModifier:function(e){Object.keys(oe).forEach(function(t){void 0===e[t]&&(e[t]=oe[t])})},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(re(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,options:function(n){return function(e,t,n){var r=[{value:0,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:1,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:2,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return r=function(e,t){if(1===e){var n=ie(t,0);t.splice(n,1)}return t}(ne(e,n).dimensionalScope,r),r}(n,t,e)}},field:{refFn:function(t){return"".concat(re(t,e),".field")},type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:function(e,t,n){return n.app.getFieldList().then(function(e){return e.map(function(e){return{label:e.qName,value:e.qName}})})},show:function(t){return 1===ne(t,e).selectionScope}},value:{refFn:function(t){return"".concat(re(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return 1===ne(t,e).selectionScope}},dimensionalScope:{refFn:function(t){return"".concat(re(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,supportTooltip:!0,options:function(n,r){return function(e,t,n,r){var i=t.layout.qHyperCube.qDimensionInfo.length,o=[{value:0,translation:n.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:n.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:1,translation:n.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension"),tooltipTranslation:n.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension",".tooltip")},{value:2,translation:n.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:n.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension",".tooltip")}];return o=function(e,t){if(e<2){var n=ie(t,0);t.splice(n,1)}return t}(i,o),o=function(e,t){if(0===e){var n=ie(t,1);t.splice(n,1)}return t}(ne(e,r).selectionScope,o),o}(n,r,t,e)}},primaryDimension:{refFn:function(t){return"".concat(re(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.normalization.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(t,n){return 0===(ne(t,e).dimensionalScope||0)&&n.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(te))return!1;var o=ne(t,e);return o&&!o.disabled}};return n},getDisregardSelectionComp:ae,getFieldSelectionComp:se,getTotalComp:le,getSelectedDimComp:ue};var de="qDef.base",pe="qDef.qDef",fe="qDef.base.qDef",he="qLibraryId",me="qDef.base.qLibraryId";const ge={getExpression:function(e){var t=o(e,fe);return void 0!==t?t:o(e,pe)},getExpressionRef:function(e){return void 0!==o(e,fe)?fe:pe},getLibraryIdRef:function(e){return o(e,me)?me:he},getLibraryId:function(e){return o(e,me)||o(e,he)},getLabelRef:function(e){return o(e,de)?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return o(e,de)?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}};var ve="qDef.qDef",ye="qDef.base.qDef",be="qLibraryId",xe="qDef.base.qLibraryId",Se="qDef.qLabel",we="qDef.qLabelExpression",Ce="qDef.base.qLabel",Ee="qDef.base.qLabelExpression",Ie="qDef.qAggrFunc",De="qDef.base.qAggrFunc",Pe={initBase:function(e,t){(t||Pe.isValid(e))&&(n(e,ye,o(e,ve)),n(e,xe,o(e,be)),n(e,Ce,o(e,Se)),n(e,Ee,o(e,we)))},restoreBase:function(e){Pe.isValid(e)&&(n(e,ve,o(e,ye)),n(e,be,o(e,xe)),n(e,Se,o(e,Ce)),n(e,we,o(e,Ee)),o(e,Ie)&&o(e,De)&&n(e,Ie,o(e,De)),delete e.qDef.base)},isValid:function(e){var t=o(e,ye),n=o(e,xe);return void 0!==t||void 0!==n}};const Me=Pe;function Re(e){return Re="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},Re(e)}var ke={accumulation:F,movingAverage:V,difference:ee,normalization:ce,timeSeriesDecomposition:K};const Le={modifiers:ke,apply:Oe,applyModifiers:Te,cleanUpMeasure:qe,destroy:function(e){e&&Ae[e.id]&&Ae[e.id].masterItemSubscriber&&(Ae[e.id].masterItemSubscriber&&Ae[e.id].masterItemSubscriber.unsubscribe(),delete Ae[e.id])},hasActiveModifiers:_e,getActiveModifier:Ne,initBase:Me.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some(function(e){return ke[e]})},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some(function(e){return ke[e]&&ke[e].isApplicable({properties:n,layout:r})})},measureBase:ge,limitedSorting:function(e){var t=e.measures,n=e.properties,r=e.layout,i=!1,o=!1;return t.forEach(function(e){var t=ze(e);Ue({modifiers:t,properties:n,layout:r})&&(i=!0,o=o||Ze({modifiers:t,properties:n,layout:r}))}),i&&!o},ifEnableTotalsFunction:je};var Ae={};function Oe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.model,r=e.properties,i=e.isSnapshot,a=void 0!==i&&i,s=e.masterItem,l=!1;Ae[n.id]=Ae[n.id]||{isFirstTime:!0};var u=Ae[n.id].isFirstTime;if(Ae[n.id].isFirstTime=!1,r&&"object"===Re(r))return Te({model:n,properties:r});var c=n?n.layout:void 0,d=o(c,"qSelectionInfo.qInSelections");if(a||d)return Promise.resolve(l);var p=o(c,"qHyperCube.qMeasureInfo"),f=Ae[n.id].lastReloadTime;if(Ae[n.id].lastReloadTime=o(n,"app.layout.qLastReloadTime"),_e({measures:p,layout:c})){var h=function(e){var t=e.measures,n=e.layout,r=e.lastReloadTime;return o(e.model,"app.layout.qLastReloadTime")!==r&&function(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some(function(e){return Ge({measure:e,properties:n,layout:r})})}({measures:t,layout:n})}({measures:p,layout:c,model:n,lastReloadTime:f});return h||function(e){var t=e.measures,n=e.layout,r=e.masterItem,i=e.isFirstTime;return!!Array.isArray(t)&&(i||r||t.some(function(e){return function(e){var t=e.measure,n=e.layout;return Ue({modifiers:ze(t),layout:n})?!t.base:!!t.base}({measure:e,layout:n})}))}({measures:p,layout:c,masterItem:s,isFirstTime:u})?n.getEffectiveProperties().then(function(e){var r=t()(!0,{},e);$e(r);var i=Qe(r);return Ye({model:n}).then(function(t){return Ke({libraryIds:i,model:n}).then(function(i){return h&&function(e){var t=e.properties;Fe(t).forEach(function(e){return function(e){var t=e.measure;if(Ge({measure:t,properties:e.properties})){var n=0,r=t.qDef.modifiers;Array.isArray(r)&&r.forEach(function(e){if("object"===Re(e)&&!e.disabled){if(n++,"object"!==Re(ke[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(n>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var r=ke[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==r&&Ve(t)&&w.simplifyExpression(t.qDef.base.qDef)!==w.simplifyExpression(r)&&(t.qDef.base.qDef=r)}})}}({measure:e,properties:t})})}({properties:r}),Te({model:n,oldProperties:e,properties:r,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:i,dimensionAndFieldList:t})})})}):Promise.resolve(l)}return function(e){return!!Array.isArray(e)&&e.some(function(e){return"object"===Re(e.base)})}(p)?n.getEffectiveProperties().then(function(e){return function(e){var n=e.model,r=e.properties,i=Qe(r);return et({model:n,libraryIds:i}).then(function(){var e=t()(!0,{},r);return Fe(r).forEach(function(e){return qe(e)}),Je({oldProperties:e,newProperties:r,model:n})})}({model:n,properties:e})}):Promise.resolve(l)}function Te(e){var n=e.model,r=e.oldProperties,i=e.properties,a=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,u=e.masterItem,c=e.libraryItemsProps,d=e.dimensionAndFieldList;void 0===r&&(r=l?t()(!0,{},i):i),$e(i);var p=Qe(i);return et({model:n,libraryIds:p,masterItem:u}).then(function(){return function(e){var n=e.measures,r=e.properties,i=e.model,a=e.libraryItemsProps,s=e.dimensionAndFieldList;if(n||(n=Fe(r)),!n.length)return Promise.resolve();if(!_e({measures:n,properties:r}))return n.forEach(function(e){return qe(e)}),Promise.resolve();var l=a?void 0:Qe(r);return Ye({model:i,dimensionAndFieldList:s}).then(function(e){return Ke({libraryIds:l,model:i,libraryItemsProps:a}).then(function(i){n.forEach(function(n){Ue({modifiers:n.qDef.modifiers,properties:r})?(function(e){var n=e.measure,r=e.properties,i=e.libraryItemsProps,a=e.dimensionAndFieldList,s=0;Me.isValid(n)||Me.initBase(n,!0);var l=n.qDef,u=l.modifiers,c=l.base;Array.isArray(u)&&u.forEach(function(e){if("object"===Re(e)&&!e.disabled){if(s++,"object"!==Re(ke[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)");ke[e.type].initModifier(e,n);var l=n.qLibraryId||c&&c.qLibraryId;l?function(e){var n=e.measure,r=e.modifier,i=e.properties,o=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=""===s?s:ke[r.type].generateExpression({expression:s,modifier:r,properties:i,dimensionAndFieldList:o});r.outputExpression=l,n.qDef.qDef=r.outputExpression,(n.qDef.qLabel||a.qMeasure.qLabel)&&(n.qDef.qLabel=a.qMeasure.qLabel),(n.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(n.qDef.qLabelExpression=a.qMeasure.qLabelExpression),n.qDef.quarantine&&n.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(n.qDef.qNumFormat=a.qMeasure.qNumFormat,n.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete n.qLibraryId,n.qDef.coloring=a.qMeasure.coloring,r.base=t()(!0,{},n.qDef.base)}({measure:n,modifier:e,libraryId:l,properties:r,libraryItemsProps:i,dimensionAndFieldList:a}):function(e){var n=e.measure,r=e.modifier,i=e.properties,o=e.dimensionAndFieldList;"function"==typeof ke[r.type].updateModifier&&ke[r.type].updateModifier(r,i.qHyperCubeDef);var a=ge.getExpression(n),s=""===a?a:ke[r.type].generateExpression({expression:a,modifier:r,properties:i,dimensionAndFieldList:o});r.outputExpression=s,n.qDef.qDef=r.outputExpression,n.qDef.base.qLabelExpression?n.qDef.qLabelExpression=n.qDef.base.qLabelExpression:n.qDef.qLabel=n.qDef.base.qLabel||a,r.base=t()(!0,{},n.qDef.base)}({measure:n,modifier:e,properties:r,dimensionAndFieldList:a}),function(e){var t=o(e,"qDef.qAggrFunc");"Expr"!==t||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")}(n)}})}({measure:n,properties:r,libraryItemsProps:i,dimensionAndFieldList:e}),He(n)):qe(n)})})})}({measures:a,properties:i,model:n,libraryItemsProps:c,dimensionAndFieldList:d}).then(function(){return l?Je({oldProperties:r,newProperties:i,model:n}):Promise.resolve(!1)})})}function qe(e){!function(e){var t=ze(e);return Array.isArray(t)&&t.some(function(e){return"object"===Re(e)&&!e.disabled&&!ke[e.type]})}(e)?Me.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,He(e)}function _e(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some(function(e){return Ue({modifiers:ze(e),properties:n,layout:r})})}function Ne(e){var t=ze(e);if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];if(ke[r.type]&&!r.disabled)return r}}function je(e){var t=Ne(e);return!t||ke[t.type].enableTotalsFunction(e)}function Fe(e){return o(e,"qHyperCubeDef.qMeasures",[]).concat(o(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function ze(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function We(e){return o(e,"outputExpression.qValueExpression.qExpr")||o(e,"outputExpression")}function $e(e){Fe(e).forEach(function(e){return function(e){var n=Ne(e);n&&(void 0!==n.outputExpression&&We(n)!==e.qDef.qDef?delete e.qDef.base:!Me.isValid(e)&&n.base&&(e.qDef.base=t()(!0,{},n.base)))}(e)})}function He(e){var t=ze(e);Array.isArray(t)&&t.forEach(function(t){"object"===Re(t)&&(t.disabled||!ke[t.type]&&We(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)})}function Ve(e){return e.base||e.qDef&&e.qDef.base}function Be(e){var t=Ve(e);return e.qLibraryId||t&&t.qLibraryId}function Ge(e){var t=e.measure,n=e.properties,r=e.layout;return!Be(t)&&Ue({modifiers:ze(t),properties:n,layout:r})}function Ue(e){var t=e.modifiers,n=e.properties,r=e.layout,i={};return Array.isArray(t)&&t.some(function(e){return!("object"!==Re(e)||e.disabled||!ke[e.type])&&(void 0===i[e.type]&&(i[e.type]=ke[e.type].isApplicable({properties:n,layout:r})),i[e.type])})}function Ye(e){var t=e.model,n=e.dimensionAndFieldList;if(n)return Promise.resolve(n);var r=[],i={},o=t.app.getDimensionList().then(function(e){i.dimensionList=e});r.push(o);var a=t.app.getFieldList().then(function(e){i.fieldList=e});return r.push(a),Promise.all(r).then(function(){return i})}function Ke(e){var t=e.libraryIds,n=e.model,r=e.libraryItemsProps;if(r)return Promise.resolve(r);var i=t.measureLibraryIds,o=t.dimensionLibraryIds,a={},s=[];return i.forEach(function(e){var t=n.app.getMeasure(e).then(function(t){return t.getProperties().then(function(t){a[e]=t})});s.push(t)}),o.forEach(function(e){var t=n.app.getDimension(e).then(function(t){return t.getProperties().then(function(t){a[e]=t})});s.push(t)}),Promise.all(s).then(function(){return a})}function Xe(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Je(e){var t=e.oldProperties,n=e.newProperties,r=e.model,i=JSON.stringify(o(t,"qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(o(n,"qHyperCubeDef.qMeasures"),Xe)||JSON.stringify(o(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(o(n,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe);return i?function(e){var t=e.model,n=e.oldProperties,r=e.newProperties,i=t.layout;return i&&!i.qHasSoftPatches&&!i.qExtendsId&&o(i,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(r):T(t,n,r)}({model:r,oldProperties:t,newProperties:n}).then(function(){return i}):Promise.resolve(i)}function Ze(e){var t=e.modifiers,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some(function(e){return"object"===Re(e)&&!e.disabled&&ke[e.type]&&ke[e.type].needDimension({modifier:e,properties:n,layout:r})})}function Qe(e){var t=Fe(e),n=[],r=[],i=!1;return t.forEach(function(t){var r=ze(t);if(Ue({modifiers:r,properties:e})){var o=Be(t);o&&n.push(o),i=i||Ze({modifiers:r,properties:e})}}),o(e,"qHyperCubeDef.qDimensions",[]).forEach(function(e){var t=e.qLibraryId;t&&r.push(t)}),{measureLibraryIds:n,dimensionLibraryIds:r}}function et(e){var t=e.model,n=e.libraryIds;return!e.masterItem&&n&&(n.measureLibraryIds.length||n.dimensionLibraryIds.length)?(Ae[t.id].masterItemSubscriber=Ae[t.id].masterItemSubscriber||function(e){var t=e.model,n=e.callback,r={},i={},a={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},n=o(e,"qInfo.qType");return n&&s[n]&&s[n].forEach(function(n){t[n]=o(e,n)}),JSON.stringify(t)}function u(e){var t=e.qInfo.qId;if(r[t]){var i=l(e);r[t].properties!==i&&(r[t].properties=i,"function"==typeof n&&r[t].enabled&&n(e)),r[t].enabled=!0}}function c(e,n){return t.app[n](e).then(function(t){r[e]={listener:t.layoutSubscribe(u),enabled:!1,properties:l(t.layout)}})}return{subscribe:function(e){var n=e.measureLibraryIds,o=e.dimensionLibraryIds,s=[];return function(e){var t=e.dimensionLibraryIds;i={},e.measureLibraryIds.forEach(function(e){i[e]=!0}),a={},t.forEach(function(e){a[e]=!0})}({measureLibraryIds:n,dimensionLibraryIds:o}),Object.keys(r).forEach(function(e){i[e]||a[e]||(r[e].listener.dispose(),delete r[e])}),t.app&&(Object.keys(i).forEach(function(e){i[e]&&!r[e]&&s.push(c(e,"getMeasure"))}),Object.keys(a).forEach(function(e){a[e]&&!r[e]&&s.push(c(e,"getDimension"))})),Promise.all(s)},unsubscribe:function(){Object.keys(r).forEach(function(e){r[e].listener.dispose()}),r={}}}}({model:t,callback:function(e){return Oe({model:t,masterItem:e}).then(function(){return t.app.clearUndoBuffer()})}}),Ae[t.id].masterItemSubscriber.subscribe(n)):Promise.resolve()}})(),t.default=i.default,Object.defineProperty(t,"__esModule",{value:!0})})()}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var r={};return(()=>{function e(t){var n,r=t;return r>9?(n=65+r-10)>90&&(n+=6):r="".concat(r).charCodeAt(0),[48,111,79,105,73,108].indexOf(n)>-1?e(r+1):String.fromCharCode(n)}function t(n){var r=e(n%62),i=Math.floor(n/62);return i>0?t(i)+r:r}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}n.d(r,{default:()=>$e});const o={getValue:function(e,t,n){if(null==e||null==t)return n;for(var r=t.split("."),i=e,o=0;o<r.length;++o){var a=r[o];if(""!==a){if(void 0===i[a]||null===i[a])return n;i=i[a]}}return i},setValue:function(e,t,n){if(null!=e&&null!=t){for(var r=t.split("."),i=r[r.length-1],o=e,a=0;a<r.length-1;++a){var s=r[a];void 0!==o[s]&&null!==o[s]||(o[s]=Number.isNaN(+r[a+1])?{}:[]),o=o[s]}void 0!==n?o[i]=n:delete o[i]}},isEmpty:function(e){return 0===Object.keys(e).length&&e.constructor===Object},isAtomicValue:function(e){return/boolean|number|string/.test(i(e))},generateId:function(){return t(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function a(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return r;return-1}return-1}const d={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;var n=e.indexOf(t[0]);if(-1!==n){for(var r=0;r<t.length;r++){var i=e.indexOf(t[r]);if(n>i)return!1;n=i}return!0}return!1},indexAdded:function(e,t){var n;for(n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)},indexRemoved:function(e,t){var n,r=0;for(n=0;n<e.length;++n)e[n]>t?--e[n]:e[n]===t&&(r=n);return e.splice(r,1),r},findItemByPropertyValue:function(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return e[r];return null}return null},findIndexByPropertyValue:c};var p=n(8),f=n.n(p);const h=function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,i=n.data[0];(t=i.dimensions).push.apply(t,a(r.qDimensions));var s,l=o.getValue(r,"qLayoutExclude.qHyperCubeDef.qDimensions");l&&(s=i.excludedDimensions).push.apply(s,a(l))},m=function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,i=n.data[0];(t=i.measures).push.apply(t,l(r.qMeasures));var a,s=o.getValue(r,"qLayoutExclude.qHyperCubeDef.qMeasures");s&&(a=i.excludedMeasures).push.apply(a,l(s))},g=function(e){var t=e.exportFormat,n=e.qHyperCubeDef,r=t.data[0];n.qInterColumnSortOrder||(n.qInterColumnSortOrder=[]),r.interColumnSortOrder=n.qInterColumnSortOrder.concat();var i=o.getValue(n,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");i&&d.isOrderedSubset(i,r.interColumnSortOrder)&&(r.interColumnSortOrder=i.concat())},v=function(e){var t=e.exportFormat,n=e.properties;Object.keys(n).forEach(function(e){t.properties[e]=n[e]})},y=function(e){var t=e.exportFormat,n=e.properties;n.qLayoutExclude||(n.qLayoutExclude={}),n.qLayoutExclude.disabled&&(Object.keys(n.qLayoutExclude.disabled).forEach(function(e){t.properties.hasOwnProperty(e)||(t.properties[e]=n.qLayoutExclude.disabled[e])}),delete n.qLayoutExclude.disabled),n.qLayoutExclude.changed&&(function(e){Object.keys(e.qLayoutExclude.changed).forEach(function(t){e.qLayoutExclude.changed[t].to===o.getValue(e,t)&&o.setValue(e,t,e.qLayoutExclude.changed[t].from)})}(n),delete n.qLayoutExclude.changed),n.qLayoutExclude.quarantine&&!o.isEmpty(n.qLayoutExclude.quarantine)||delete n.qLayoutExclude},b=function(e){e.forEach(function(e){f().cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)})};function x(e,t,n){var r,i,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=o.getValue(e,t);if(!o.isAtomicValue(s))try{if((i=(i=(r=JSON.stringify(s)).match(/:\{/g))?i.length:0)>2&&!a)return;s=JSON.parse(r)}catch(e){return}o.getValue(e,"qLayoutExclude.quarantine")||o.setValue(e,"qLayoutExclude.quarantine",{});var l=o.getValue(e,"qLayoutExclude.quarantine");l[n]||(l[n]={}),l[n][t]=s}var S=n(909),w=n.n(S);function C(e,t){var n=w()(!0,{},t,e);return o.getValue(n,"qOtherTotalSpec.qOtherCounted")||o.setValue(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),o.getValue(n,"qOtherTotalSpec.qOtherLimit")||o.setValue(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel="Others"),n}function E(e,t){return w()(!0,{},t,e)}function I(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}var D=Math.pow(2,53)-1;function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const R=function(e,t,n){var r="masterobject"===o.getValue(t,"properties.qInfo.qType")?"masterobject":o.getValue(n,"qInfo.qType");o.setValue(e,"qInfo.qType",r),e.visualization=n.visualization},k=function(e,t,n){t.hasOwnProperty(e)&&(n[e]=t[e])},L=function(e,t,n,r){t.hasOwnProperty(e)?n[e]=t[e]:n[e]=r},A=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:[]}},T=function(e){var t,n=e.exportFormat,r=e.maxDimensions,i=e.minDimensions,o=e.newHyperCubeDef,a=e.defaultDimension,s=n.data[0];for(t=0;t<s.dimensions.length;++t){var l=C(s.dimensions[t],a);o.qDimensions.length<r?o.qDimensions.push(l):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(l)}for(t=0;t<s.excludedDimensions.length;++t){var u=C(s.excludedDimensions[t],a);o.qDimensions.length<i?o.qDimensions.push(u):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(u)}},q=function(e){var t,n=e.exportFormat,r=e.maxMeasures,i=e.minMeasures,o=e.newHyperCubeDef,a=e.defaultMeasure,s=n.data[0];for(t=0;t<s.measures.length;++t){var l=E(s.measures[t],a);o.qMeasures.length<r?o.qMeasures.push(l):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(l)}for(t=0;t<s.excludedMeasures.length;++t){var u=E(s.excludedMeasures[t],a);o.qMeasures.length<i?o.qMeasures.push(u):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(u)}},_=function(e){var t=e.exportFormat,n=e.dataDefinition,r=void 0===n?{}:n,i=t.data[0],o=r.dimensions||{max:0},a=r.measures||{max:0},s=I(a.max,i.dimensions.length,D),l=I(a.min,i.dimensions.length,0);return{maxDimensions:I(o.max,s,D),minDimensions:I(o.min,l,0),maxMeasures:s,minMeasures:l}},N=function(e){var t=e.exportFormat,n=e.newHyperCubeDef,r=t.data[0],i=n.qDimensions.length+n.qMeasures.length;n.qInterColumnSortOrder=r.interColumnSortOrder.concat();var o=n.qInterColumnSortOrder.length;if(o!==i)for(n.qLayoutExclude&&(n.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=r.interColumnSortOrder.concat());o!==i;)o<i?(d.indexAdded(n.qInterColumnSortOrder,o),++o):(--o,d.indexRemoved(n.qInterColumnSortOrder,o))},j=function(e){var t=e.exportFormat,n=e.initialProperties,r=e.hypercubePath,i={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach(function(e){"qLayoutExclude"===e?t.properties[e].quarantine&&(i.qLayoutExclude.quarantine=w()(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&r?o.setValue(i,"".concat(r,".qHyperCubeDef"),t.properties.qHyperCubeDef):n.hasOwnProperty(e)||-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)||function(e,t){return"components"===t&&Array.isArray(e[t])&&e[t].some(function(e){return"general"===e.key})}(t.properties,e)?i[e]=t.properties[e]:i.qLayoutExclude.disabled[e]=t.properties[e]}),null===(i=w()(!0,{},n,i)).components&&(i.components=[]),i},F=function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=t.data[0];return a.dimensions.length>n&&n>0||a.measures.length>i&&i>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>r||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>o||!i&&a.measures.length>0||!n&&a.dimensions.length>0},z=function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=e.newHyperCubeDef,s=t.data[0];a.qLayoutExclude||(a.qLayoutExclude={}),a.qLayoutExclude.qHyperCubeDef||(a.qLayoutExclude.qHyperCubeDef={}),(s.dimensions.length>n&&n>0||s.excludedDimensions&&s.excludedDimensions.length&&s.dimensions.length+s.excludedDimensions.length>r)&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(s.measures.length>i&&i>0||s.excludedMeasures&&s.excludedMeasures.length&&s.measures.length+s.excludedMeasures.length>o)&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!i&&s.measures.length&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!n&&s.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))},W=function(e){var t,n=e.newProperties,r=e.dataDefinition,i=e.hypercubePath;if(r.dimensions&&"function"==typeof r.dimensions.added){var a=o.getValue(n,i||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return 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 n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?P(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();a.qDimensions=[],s.forEach(function(e){a.qDimensions.push(e),r.dimensions.added(e,n)})}},$=function(e){var t,n=e.newProperties,r=e.dataDefinition,i=e.hypercubePath;if(r.measures&&"function"==typeof r.measures.added){var a=o.getValue(n,i||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return M(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 M(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?M(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();a.qMeasures=[],s.forEach(function(e){a.qMeasures.push(e),r.measures.added(e,n)})}},H=function(e){var t=e.measures,n=e.modifierTypes;t&&n&&f().isSupportedModifiers(n)&&t.forEach(function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store})};function V(e,t){var n=o.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!n&&(Object.keys(n).forEach(function(t){o.setValue(e,t,n[t])}),delete e.qLayoutExclude.quarantine[t],!0)}const B={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t={data:[],properties:{}},n=0;n<e;++n)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}(),a=t.qProperty,s=o.getValue(a,n||""),l=s.qHyperCubeDef;return l.qInterColumnSortOrder||(l.qInterColumnSortOrder=[]),h({exportFormat:i,qHyperCubeDef:l}),m({exportFormat:i,qHyperCubeDef:l}),g({exportFormat:i,qHyperCubeDef:l}),delete l.qLayoutExclude,v({exportFormat:i,properties:a}),n&&(i.properties.qHyperCubeDef=l,delete s.qHyperCubeDef),y({exportFormat:i,properties:a}),r||b(i.properties.qHyperCubeDef.qMeasures),Array.isArray(i.properties.filters)&&(x(i.properties,"filters","storedFilters",!0),delete i.properties.filters),i.properties.qHyperCubeDef.qContextSetExpression&&(x(i.properties,"qHyperCubeDef.qContextSetExpression","storedFilters"),i.properties.qHyperCubeDef.qContextSetExpression=""),i.properties.qHyperCubeDef.qDynamicScript&&i.properties.qHyperCubeDef.qDynamicScript.length&&(x(i.properties,"qHyperCubeDef.qDynamicScript","dynamicScript"),i.properties.qHyperCubeDef.qDynamicScript=[]),i},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=void 0===n?{}:n,i=e.dataDefinition,a=void 0===i?{}:i,s=e.defaultPropertyValues,l=void 0===s?{}:s,u=e.hypercubePath,c=e.extension,d=e.supportedFilters,p=void 0===d||d,f=e.isHCModifierSupported,h=void 0===f||f,m={qChildren:[]},g=j({exportFormat:t,initialProperties:r,hypercubePath:u}),v=o.getValue(r,u||"").qHyperCubeDef,y=o.getValue(g,u||"").qHyperCubeDef,b=_({exportFormat:t,dataDefinition:a}),x=b.maxDimensions,S=b.minDimensions,w=b.maxMeasures,C=b.minMeasures,E=l.defaultDimension,I=void 0===E?A():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}),T({exportFormat:t,maxDimensions:x,minDimensions:S,newHyperCubeDef:y,defaultDimension:I}),q({exportFormat:t,maxMeasures:w,minMeasures:C,newHyperCubeDef:y,defaultMeasure:P}),W({newProperties:g,dataDefinition:a,hypercubePath:u}),$({newProperties:g,dataDefinition:a,hypercubePath:u}),N({exportFormat:t,newHyperCubeDef:y}),k("qMaxStackedCells",v,y),k("qNoOfLeftDims",v,y),L("qInitialDataFetch",v,y,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),L("qMode",v,y,"S"),L("qReductionMode",v,y,"N"),L("qSortbyYValue",v,y),L("qIndentMode",v,y),L("qShowTotalsAbove",v,y),R(g,t,r),m.qProperty=g;var M=o.getValue(c||{},"support.modifiers");return H({measures:y.qMeasures,modifierTypes:M}),p&&V(m.qProperty,"storedFilters"),"S"===y.qMode&&h&&V(m.qProperty,"dynamicScript"),m}};var G={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function U(e,t,n,r){t=t||[];var i=c(e,r,n),o=c(t,r,n);if(-1!==i&&-1===o){var a=e.splice(i,1);t.push(a[0])}return t}function Y(e,t){return e.length!==t}const K={create:function(e,t){if(!e||!G[e])throw new Error("Attribute Expressions Util: ID required");var n={};return t&&Object.keys(t).forEach(function(e){n[e]=t[e]}),n.id=e,n.qAttribute=!0,n},moveByIdFromGroup:function(e,t,n,r,i){n=n||"qAttributeExpressions",i=i||"id";for(var o=0;o<e.length;o++){var a=e[o][n],s=t.length;if(U(a,t,r,i),Y(t,s))return t}return t},IDMAP:{CELL_BACKGROUND_COLOR:"cellBackgroundColor",CELL_FOREGROUND_COLOR:"cellForegroundColor",COLOR_BY_ALTERNATIVE:"colorByAlternative",COLOR_BY_EXPRESSION:"colorByExpression",TOOLTIP:"tooltip",CELL_LINK_LABEL:"urlLabel",CELL_LINK_URL:"url"}},X={getNumDimensions:function(e){return o.getValue(e,"qHyperCubeDef.qDimensions.length",0)},getNumMeasures:function(e){return o.getValue(e,"qHyperCubeDef.qMeasures.length",0)},wrapFieldName:function(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e},getItemLabel:function(e){return e.label||e.name}},J={colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>0&&X.getNumMeasures(e)<=1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)>0},expression:function(e){return X.getNumMeasures(e)>=1}}},Z={colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumMeasures(e)>=1}}};var Q={scatterplot:Z,"sn-scatter-plot":Z,piechart:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumMeasures(e)>=1}}},linechart:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)<=1},expression:function(e){return X.getNumMeasures(e)>=1}}},map:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>=1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)>=1},expression:function(e){return X.getNumDimensions(e)>=1}}},distributionplot:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumDimensions(e)>=1}}}};function ee(e,t,n){if(Array.isArray(e[t])){var r=d.findIndexByPropertyValue(e[t],"id",n);r>=0&&e[t].splice(r,1)}else e[t]=[]}function te(e,t){var n=K.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach(function(e){ee(e,"qAttributeDimensions",n),ee(e,"qAttributeExpressions",n)}),t.forEach(function(e){ee(e,"qAttributeDimensions",n),ee(e,"qAttributeExpressions",n)})}function ne(e,t){if(t){var n="="===t.charAt(0);e.color.altLabel=n?{qStringExpression:{qExpr:t.substr(1)}}:t}}function re(e){var t=e.properties,n=e.isDimension,r=e.dimensions,i=e.excludedDimensions,a=e.measures,s=e.label;te(r,i);var l=r[r.length-1];if(l){var u=n?o.getValue(t,"color.byDimDef"):o.getValue(t,"color.byMeasureDef"),c=o.getValue(t,"color.formatting.qNumFormat"),p=o.getValue(t,"color.formatting.isCustomFormatted");if(u){var f=K.create(K.IDMAP.COLOR_BY_ALTERNATIVE);switch(u.type){case"expression":!function(e){var t=e.attributeExpression,n=e.label,r=e.item,i=e.isDimension,o=e.qNumFormat,a=e.isCustomFormatted;t.label=n||r.label,i?t.qDef=r.key:(t.qExpression=r.key,o&&(t.qNumFormat=o,t.isCustomFormatted=a)),t.matchMeasure=r.activeMeasureIndex,t.label&&"="===t.label.charAt(0)&&(t.labelExpRef="color.altLabel")}({attributeExpression:f,label:s,item:u,isDimension:n,qNumFormat:c,isCustomFormatted:p});break;case"libraryItem":!function(e){var t=e.attributeExpression,n=e.measures,r=e.item,i=e.qNumFormat,o=e.isCustomFormatted;e.isDimension||(t.matchMeasure=d.findIndexByPropertyValue(n,"qLibraryId",r.key),i&&(t.qNumFormat=i,t.isCustomFormatted=o)),void 0!==r.expression?t.qExpression=r.expression:t.qLibraryId=r.key,t.colorMapRef=r.key}({attributeExpression:f,measures:a,item:u,isDimension:n,qNumFormat:c,isCustomFormatted:p})}n?(f.qSortBy={qSortByAscii:1},l.qAttributeDimensions.push(f)):l.qAttributeExpressions.push(f)}}}function ie(e,t,n,r){var i,o,a,s={};switch(e){case"dimension":n.qLibraryId?(s.type="dimension",s.name=n.qLibraryId,s.id=n.qLibraryId):(s.type="field",t?(s.name=n.label||n.qDef,s.id=n.qDef):(s.name=n.qDef.qFieldDefs[0],s.label=(a=n.qDef).qLabelExpression?a.qLabelExpression:a.qFieldLabels&&a.qFieldLabels[0]?a.qFieldLabels[0]:a.qFieldDefs[0]));break;case"measure":i=function(e,t){return t?e.qLibraryId:f().measureBase.getLibraryId(e)}(n,t),i?(s.type="measure",s.name=i,s.id=i,o=function(e,t){return f().hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}(n,r),o&&(s.expression=o)):(s.type="expression",t?(s.name=n.label||n.qExpression,s.id=n.qExpression):(s.name=n.qDef.qDef,s.label=function(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qLabel?t.qLabel:t.qDef}(n)));break;default:throw new Error('columnType should be "dimension" or "measure"')}return s}const oe={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}};function ae(e,t,n,r){var i=t.type,o=e.color,a=o.mode,s=X.getItemLabel(t);switch(ne(e,s||""),i){case"field":a="byDimension",o.byDimDef={label:t.label||X.wrapFieldName(t.name),key:X.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":a="byMeasure",o.byMeasureDef={label:s,key:t.name,type:"expression",activeMeasureIndex:t.activeMeasureIndex};break;case"dimension":a="byDimension",o.byDimDef={label:t.name,key:t.id,type:"libraryItem",activeDimensionIndex:t.activeDimensionIndex};break;case"measure":a="byMeasure",o.byMeasureDef={label:t.name,key:t.id,expression:t.expression,type:"libraryItem",activeMeasureIndex:t.activeMeasureIndex},o.formatting&&oe.useMasterNumberFormat(o.formatting)}o.auto=!1,o.mode=a}function se(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byDimDef");if(a&&ne(e,a.label),function(e){return!!(e&&e.activeDimensionIndex>-1)}(a))!function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"color.byDimDef");r.activeDimensionIndex=Math.min(r.activeDimensionIndex,n.length-1);var i=ie("dimension",!1,n[r.activeDimensionIndex]);i.activeDimensionIndex=r.activeDimensionIndex,ae(e,i)}(e,t);else if(function(e){return!e||!e.key}(a)&&function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=n[function(e,t,n){var r=o.getValue(t,"visualization"),i=n.split("."),a=Number(i[1]),s=o.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===r&&"point"===s}(n,e,t)?0:n.length-1],i=K.IDMAP.COLOR_BY_ALTERNATIVE,a=d.findItemByPropertyValue(r.qAttributeDimensions,"id",i);return ae(e,ie("dimension",!!a,a||r)),!!a}(e,t))return;re({properties:e,isDimension:!0,dimensions:n,excludedDimensions:i,measures:r,label:o.getValue(e,"color.byDimDef.label")})}const le=function(e,t,n){o.setValue(e,t,n),o.isAtomicValue(n)&&function(e,t,n){var r=e.qLayoutExclude;r&&(r.changed||(r.changed={}),r.changed[t]={from:o.getValue(e,t),to:n})}(e,t,n)},ue=function(e,t){var n={primary:!0};if(e){var r=(Q[t]||J).colorModeOptions||J.colorModeOptions;n.byDimension=r.dimension(e),n.byMeasure=r.measure(e),n.byMultiple=r.multiColor(e),n.byExpression=r.expression(e)}return n},ce=function(e){var t=e.canColorBy,n=e.autoColor,r=e.colorMode,i=e.dimensions;return!(t[r]&&!n&&("byDimension"!==r&&"byMeasure"!==r||!i.length))},de=function(e,t){var n,r=o.getValue(e,"color.mode"),i=o.getValue(e,"color.auto"),a=o.getValue(e,"".concat(t,"qDimensions"),[]),s=o.getValue(e,"".concat(t,"qMeasures"),[]),l=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);i?te(a,l):!(n={auto:i,colorMode:r,dimensions:a}).auto&&"byDimension"===n.colorMode&&n.dimensions.length>0?se(e,t):function(e){var t=e.auto,n=e.colorMode,r=e.dimensions,i=e.measures,a=e.properties,s=o.getValue(a,"visualization");return!(t||"byMeasure"!==n||!r.length||"map"!==s&&!i.length)}({auto:i,colorMode:r,dimensions:a,measures:s,properties:e})?function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byMeasureDef");if(a&&ne(e,a.label),function(e){return!!(e&&e.activeMeasureIndex>-1)}(a))!function(e,t){var n=o.getValue(e,"".concat(t,"qMeasures"),[]),r=o.getValue(e,"color.byMeasureDef");if(r.activeMeasureIndex=Math.min(r.activeMeasureIndex,n.length-1),r.activeMeasureIndex>-1){var i=ie("measure",!1,n[r.activeMeasureIndex],!0);i.activeMeasureIndex=r.activeMeasureIndex,ae(e,i)}}(e,t);else if(function(e,t){return(!e||!e.key)&&t.length>0}(a,r)&&function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=n[n.length-1],a=K.IDMAP.COLOR_BY_ALTERNATIVE,s=d.findItemByPropertyValue(i.qAttributeExpressions,"id",a);return ae(e,ie("measure",!!s,s||r[0])),!!s}(e,t))return;re({properties:e,isDimension:!1,dimensions:n,excludedDimensions:i,measures:r,label:o.getValue(e,"color.byMeasureDef.label")})}(e,t):function(e,t){var n=o.getValue(e,"color.mode"),r=o.getValue(e,"".concat(t,"qDimensions"),[]),i=o.getValue(e,"".concat(t,"qMeasures"),[]),a=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===n&&i.length<2&&o.setValue(e,"color.mode","primary"),te(r,a)}(e,t)},pe=function(e){e.forEach(function(e){e.qOtherTotalSpec&&"qTotalMode"in e.qOtherTotalSpec&&delete e.qOtherTotalSpec.qTotalMode})},fe=function(e){var t=e.shouldUpdateColorBy,n=e.properties,r=o.getValue(n,"qHyperCubeDef.qMeasures",[]),i=o.getValue(n,"color.mode","");return!t&&"byExpression"===i&&r.length>0},he=function(e){var t=o.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),n=o.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:n,id:"colorByExpression"}),o.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)},me=function(e){o.setValue(e,"color.mode","primary"),o.setValue(e,"color.auto",!0)},ge=function(e){var t=o.getValue(e,"qHyperCubeDef.qDimensions",[]),n=o.getValue(e,"color.persistent",!1);return t.length>1&&!n},ve={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=B.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),o=i.data[0],a=o.dimensions.concat(o.excludedDimensions),s=o.measures.concat(o.excludedMeasures),l=K.IDMAP,u=l.COLOR_BY_ALTERNATIVE,c=l.COLOR_BY_EXPRESSION;return K.moveByIdFromGroup(a,[],"qAttributeDimensions",u),K.moveByIdFromGroup(a,[],"qAttributeExpressions",u),K.moveByIdFromGroup(s,[],"qAttributeExpressions",c),i},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,i=e.defaultPropertyValues,a=e.hypercubePath,s=e.extension,l=e.supportedFilters,u=e.isHCModifierSupported,c=B.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:i,hypercubePath:a,extension:s,supportedFilters:l,isHCModifierSupported:u}),d=c.qProperty,p=o.getValue(d,"visualization"),f=o.getValue(d,"qHyperCubeDef.qDimensions",[]),h=o.getValue(d,"color.mode",""),m=o.getValue(d,"color.auto",""),g=ue(d,p),v=ce({canColorBy:g,autoColor:m,colorMode:h,dimensions:f});return g[h]?fe({shouldUpdateColorBy:v,properties:d})&&he(d):me(d),v&&de(d,"qHyperCubeDef."),ge(d)&&le(d,"color.persistent",!0),pe(f),c}};var ye=["bar","marker","line"];const be=function(e){var t=e.initialProperties,n=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?V(n,"unsupportedAutoMinMax")||w()(n.measureAxis,t.measureAxis):V(n,"supportedAutoMinMax")||w()(n.measureAxis,t.measureAxis)},xe=function(e){var t,n=e.exportFormat,r=e.initialProperties,i=e.properties,o=e.measureType,a=i.qHyperCubeDef,s=i.measureAxis;if(function(e){var t=e.initialProperties;return!(!e.exportFormat.properties.measureAxes||t.measureAxes||!t.measureAxis||void 0===t.measureAxis.autoMinMax)}({exportFormat:n,initialProperties:r})){var l=function(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach(function(e){if(e.qDef.series){var n=e.qDef.series,r=n.type,i=n.axis;t[i]||(t[i]={axis:i,type:{line:0,marker:0,bar:0,total:0}}),ye.includes(r)&&t[i].type[r]++,t[i].type.total++}}),t}(a);l.length?(o&&(t=l.filter(function(e){return e.type[o]>0}).sort(function(e,t){return t.type[o]-e.type[o]})),t&&t.length||(t=l.sort(function(e,t){return t.type.total-e.type.total})),t&&t[0]&&w()(s,n.properties.measureAxes[t[0].axis])):w()(s,n.properties.measureAxes[0])}},Se=function(e){if(e.qDimensions.length>1){var t=e.qInterColumnSortOrder.indexOf(0);if(0!==t){var n=e.qInterColumnSortOrder[0];e.qInterColumnSortOrder[0]=0,e.qInterColumnSortOrder[t]=n}}},we={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=e.supportedAutoMinMax,o=void 0===i||i,a=ve.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),s=a.properties;return o?(x(s,"measureAxis.min","supportedAutoMinMax"),x(s,"measureAxis.max","supportedAutoMinMax")):(x(s,"measureAxis.min","unsupportedAutoMinMax"),x(s,"measureAxis.max","unsupportedAutoMinMax")),a},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,i=e.defaultPropertyValues,o=e.hypercubePath,a=e.measureType,s=e.extension,l=e.supportedFilters,u=e.isHCModifierSupported,c=ve.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:i,hypercubePath:o,extension:s,supportedFilters:l,isHCModifierSupported:u}),d=c.qProperty;return be({initialProperties:n,properties:d}),xe({exportFormat:t,initialProperties:n,properties:d,measureType:a}),Se(d.qHyperCubeDef),d.qHyperCubeDef.qColumnOrder=[],d.qHyperCubeDef.columnOrder=[],c}};function Ce(e,t,n){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(n)}function Ee(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,n,[]).forEach(function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,a);if(void 0!==s){var l=o.getValue(i,"qDef.cId");l||(l=o.generateId(),o.setValue(i,"qDef.cId",l));var u=Ce(n,r,l);o.setValue(t,u,s),o.setValue(i,a,void 0)}}({properties:t,quarantineName:r,arrayName:i,item:e,itemPath:a})})}function Ie(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,n,[]).forEach(function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,"qDef.cId");if(s){var l=Ce(n,r,s),u=o.getValue(t,l);void 0!==u&&(o.setValue(i,a,u),o.setValue(t,l,void 0))}}({properties:t,quarantineName:r,arrayName:i,item:e,itemPath:a})})}var De="qHyperCubeDef.qMeasures",Pe="conditionalColoring",Me="measures",Re="qDef.conditionalColoring";const ke={quarantine:function(e){Ee({properties:e,arrayPath:De,quarantineName:Pe,arrayName:Me,itemPath:Re})},unquarantine:function(e){Ie({properties:e,arrayPath:De,itemPath:Re,arrayName:Me,quarantineName:Pe})}};var Le="qHyperCubeDef.qMeasures",Ae="measures",Oe="qHyperCubeDef.qDimensions",Te="dimensions",qe="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",_e="alternativeMeasures",Ne="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",je="alternativeDimensions",Fe="qCalcCondition",ze="conditionalShowHide";const We={quarantine:function(e){Ee({properties:e,arrayPath:Le,quarantineName:ze,arrayName:Ae,itemPath:Fe}),Ee({properties:e,arrayPath:Oe,quarantineName:ze,arrayName:Te,itemPath:Fe})},unquarantine:function(e){Ie({properties:e,arrayPath:Le,quarantineName:ze,arrayName:Ae,itemPath:Fe}),Ie({properties:e,arrayPath:Oe,quarantineName:ze,arrayName:Te,itemPath:Fe})},quarantineAlternative:function(e){Ee({properties:e,arrayPath:qe,quarantineName:ze,arrayName:_e,itemPath:Fe}),Ee({properties:e,arrayPath:Ne,quarantineName:ze,arrayName:je,itemPath:Fe})},unquarantineAlternative:function(e){Ie({properties:e,arrayPath:qe,quarantineName:ze,arrayName:_e,itemPath:Fe}),Ie({properties:e,arrayPath:Ne,quarantineName:ze,arrayName:je,itemPath:Fe})}},$e={hypercube:B,colorChart:ve,axisChart:we,quarantineProperty:x,unquarantineProperty:V,quarantineArrayProp:Ee,unquarantineArrayProp:Ie,conditionalColoring:ke,conditionalShow:We}})(),r.default})()}(L_)),L_.exports),O_=Nt(A_);const T_="qHyperCubeDef.qMeasures",q_="measures",__="qHyperCubeDef.qDimensions",N_="dimensions",j_="qDef.representation",F_="tableRepresentation",z_="qDef.conditionalColoring",W_="conditionalColoring",$_="qMiniChartDef",H_="miniChartDef",V_=e=>{O_.unquarantineArrayProp({properties:e,arrayPath:__,itemPath:j_,arrayName:N_,quarantineName:F_}),O_.unquarantineArrayProp({properties:e,arrayPath:T_,itemPath:j_,arrayName:q_,quarantineName:F_}),O_.unquarantineArrayProp({properties:e,arrayPath:T_,itemPath:z_,arrayName:q_,quarantineName:W_}),O_.unquarantineArrayProp({properties:e,arrayPath:T_,itemPath:$_,arrayName:q_,quarantineName:H_})},B_=e=>{O_.quarantineArrayProp({properties:e,arrayPath:__,itemPath:j_,arrayName:N_,quarantineName:F_}),O_.quarantineArrayProp({properties:e,arrayPath:T_,itemPath:j_,arrayName:q_,quarantineName:F_}),O_.quarantineArrayProp({properties:e,arrayPath:T_,itemPath:z_,arrayName:q_,quarantineName:W_}),O_.quarantineArrayProp({properties:e,arrayPath:T_,itemPath:$_,arrayName:q_,quarantineName:H_})};function G_(e){const{translator:t}=e;return{targets:[{path:"/qHyperCubeDef",dimensions:{min:1,max:1e3,description(e,n,r){const i="rows"===r?.type?"Visualizations.Descriptions.Row":"Visualizations.Descriptions.Column";return t.get(i)}},measures:{min:1,max:1e3,description:()=>t.get("Visualizations.Descriptions.Values")},filters:{description:()=>t.get("SimpleProperties.Filters.Filter")}}]}}const U_="qHyperCubeDef.qDimensions",Y_="dimensions",K_="qOtherTotalSpec.qTotalMode",X_="totalMode",J_={quarantine(e){O_.quarantineArrayProp({properties:e,arrayPath:U_,quarantineName:X_,arrayName:Y_,itemPath:K_})},unquarantine(e){O_.unquarantineArrayProp({properties:e,arrayPath:U_,quarantineName:X_,arrayName:Y_,itemPath:K_})}};function Z_(e){const t=G_(e);return(e,n,r,i)=>{const o=O_.hypercube.importProperties({exportFormat:e,initialProperties:n,dataDefinition:t.targets[0],hypercubePath:i}),a=o.qProperty.qHyperCubeDef.qDimensions.length,s=o.qProperty.qHyperCubeDef.qMeasures.length;let l,u=o.qProperty.qHyperCubeDef.qInterColumnSortOrder,c=!0;a+s===u.length&&Cq(o,"qProperty.qLayoutExclude.quarantine.interColSortOrder",u.concat());const d=o.qProperty.qLayoutExclude.quarantine?.pivotInterColSortOrder;d?(u=d,l=[...d],Cq(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&&Cq(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&&(O_.unquarantineProperty(o.qProperty,"noOfLeftDims"),O_.unquarantineProperty(o.qProperty,"excludedNoOfLeftDims "))}return O_.unquarantineProperty(o.qProperty,"rankedList"),O_.conditionalShow.unquarantine(o.qProperty),J_.unquarantine(o.qProperty),V_(o.qProperty),O_.unquarantineProperty(o.qProperty,"pivotTableIndentMode"),o}}function Q_(e,t){const n=e.qProperty.qHyperCubeDef.qInterColumnSortOrder,r=n.slice(),i=n.indexOf(-1);i>-1&&n.splice(i,1);const o=O_.hypercube.exportProperties({propertyTree:e,hyperCubePath:t}),a=o.properties.qHyperCubeDef,s=a.qDimensions.length,l=a.qMeasures.length;let u=a.qInterColumnSortOrder;Cq(o,"properties.qLayoutExclude.quarantine.pivotInterColSortOrder",r),O_.quarantineProperty(o.properties,"qHyperCubeDef.qNoOfLeftDims","noOfLeftDims"),delete o.properties.qHyperCubeDef.qNoOfLeftDims,O_.quarantineProperty(o.properties,"qHyperCubeDef.rankedList","rankedList"),delete o.properties.qHyperCubeDef.rankedList;const c=o.properties.qLayoutExclude.quarantine?.interColSortOrder;c&&(u=c,Cq(o,"properties.qHyperCubeDef.qInterColumnSortOrder",u),Cq(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 O_.quarantineProperty(o.properties,"qHyperCubeDef.qIndentMode","pivotTableIndentMode"),O_.quarantineProperty(o.properties,"qHyperCubeDef.excludedNoOfLeftDims ","excludedNoOfLeftDims "),O_.conditionalShow.quarantine(o.properties),J_.quarantine(o.properties),B_(o.properties),o}const eN=e=>({dimensions:{min:1,max:1e3,description(t,n,r){const i="rows"===r?.type?"Visualizations.Descriptions.Row":"Visualizations.Descriptions.Column";return e.translator.get(i)}},measures:{min:1,max:1e3,description:()=>e.translator.get("Visualizations.Descriptions.Values")}}),tN=["rows","columns","measures"],nN=e=>{if(!e.flags.isEnabled("SUPPORT-9810-MIGRATE-RANKED-LISTS"))return;const t=new R_({},e);return{properties:e=>(t.setProperties(e),tN.forEach(e=>{t.isRankedListCorrupt(e)&&t.createRankedList(e)}),e)}},rN={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}}}};let iN=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}({}),oN=function(e){return e.Attribute="attribute",e.Dimension="dimension",e}({});const aN=e=>{switch(e?.type){case"url":return iN.Link;case"image":return iN.Image;case"indicator":return iN.Indicator;case"miniChart":return iN.MiniChart;default:return iN.Text}},sN=({isImagesEnabled:e})=>({uses:"dimensionRepresentationItems.representationType",options(t,n,r){const{qIndentMode:i}=r.properties.qHyperCubeDef,o=[{value:"text",translation:"Object.Table.Representation.Text"},{value:"url",translation:"Object.Table.Representation.Link"}];return(!i&&e||i)&&o.push({value:"image",translation:"Object.Table.Representation.Image"}),o}}),lN=e=>{if(e)return{representationImage:{uses:"dimensionRepresentationItems.representationImage",show:e=>aN(e.qDef.representation)===iN.Image,items:{imageSize:{options:[{value:"alwaysFit",translation:"properties.backgroundImage.sizeAlwaysFit"},{value:"fitWidth",translation:"properties.backgroundImage.sizeFitWidth"},{value:"fitHeight",translation:"properties.backgroundImage.sizeFitHeight"},{value:"fill",translation:"properties.backgroundImage.sizeStretch"},{value:"originalSize",translation:"properties.backgroundImage.originalSize"}]},imageBoxWidth:{ref:"qDef.representation.imageBox.width",translation:"properties.pivot.representation.image.imageBox.width",type:"number",expression:"optional",defaultValue:24,show:(e,t,n)=>{if(!n.properties.qHyperCubeDef)return!1;const{qInterColumnSortOrder:r,qNoOfLeftDims:i,qDimensions:o,qIndentMode:a}=n.properties.qHyperCubeDef;let s=!1;const l=o?.indexOf(e)??1/0;return(r?.slice(0,i)??[]).indexOf(l)>-1&&(s=!0),s&&a}}}}}},uN=e=>{const{anything:t}=e,n=!t.sense?.isUnsupportedFeature?.("tableImages");return{representationType:sN({isImagesEnabled:n}),representationUrlPosition:{uses:"dimensionRepresentationItems.representationUrlPosition",show:e=>aN(e.qDef.representation)===iN.Link},representationUrlLabel:{uses:"dimensionRepresentationItems.representationUrlLabel",show:e=>aN(e.qDef.representation)===iN.Link&&e.qDef.representation?.urlPosition===oN.Dimension},representationLinkUrl:{uses:"dimensionRepresentationItems.representationLinkUrl",show:e=>aN(e.qDef.representation)===iN.Link&&e.qDef.representation?.urlPosition===oN.Attribute},...lN(n)}},cN=(e,t)=>{const{anything:n}=e,r=n.sense?.isUnsupportedFeature,i=!r?.("tableImages")&&t[iN.Image],o=!r?.("qMiniChartDef")&&t[iN.MiniChart],a=!r?.("tableIndicators")&&t[iN.Indicator],s=i&&t[iN.ImagesInIndentMode];return{representationType:{uses:"measureRepresentationItems.representationType",options:(e,t,n)=>(e=>{const{qIndentMode:t}=e.properties.qHyperCubeDef??{},n=[{value:"text",translation:"Object.Table.Representation.Text"}];return(!t&&i||t&&s)&&n.push({value:"image",translation:"Object.Table.Representation.Image"}),a&&n.push({value:"indicator",translation:"Object.Table.Representation.Indicator"}),o&&n.push({value:"miniChart",translation:"Common.MiniChart"}),n})(n)},representationImage:i?{uses:"measureRepresentationItems.representationImage",show:e=>aN(e.qDef.representation)===iN.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 dN=function(e){return e.Dimension="dimensions",e.Measures="measures",e.Pivot="pivot",e}({}),pN=function(e){return e.CellForegroundColor="cellForegroundColor",e.CellBackgroundColor="cellBackgroundColor",e.ImageUrl="imageUrl",e.ImageLabel="imageLabel",e.Link="url",e.LinkLabel="urlLabel",e}({}),fN=function(e){return e.TopGrid="topGrid",e.LeftGrid="leftGrid",e.DataGrid="dataGrid",e}({}),hN=function(e){return e.Forward="forward",e.Backward="backward",e.None="none",e}({});const mN="image",gN=(e,t,n)=>{if(!n.properties.qHyperCubeDef.qIndentMode)return!0;const r=n.properties.qHyperCubeDef.qInterColumnSortOrder?.indexOf(-1)??-1;let i=n.properties.qHyperCubeDef.qNoOfLeftDims??-1;r>-1&&r<i&&(i-=1);const o=n.properties.qHyperCubeDef.qDimensions.indexOf(e);return 0===o||o>=i},vN=()=>({type:{type:"string",component:"dropdown",ref:"qDef.columnWidth.type",translation:"Object.Table.Column.Width",options:[{value:tO.Auto,translation:"Common.Auto"},{value:tO.FitToContent,translation:"Object.Table.Column.FitToContent"},{value:tO.Pixels,translation:"Object.Table.Column.Pixels"},{value:tO.Percentage,translation:"Object.Table.Column.Percentage"}],defaultValue:tO.Auto},sizePixels:{ref:"qDef.columnWidth.pixels",translation:"Object.Table.Column.Pixels",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:eO.PixelsDefault,show:e=>e.qDef.columnWidth?.type===tO.Pixels},sizePercentage:{ref:"qDef.columnWidth.percentage",translation:"Object.Table.Column.Percentage",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:eO.PercentageDefault,show:e=>e.qDef.columnWidth?.type===tO.Percentage}}),yN=({key:e,translation:t,env:n})=>{const r=!n.anything.sense?.isUnsupportedFeature?.("tableImages");return{[`${e}Auto`]:{ref:`qDef.${e}.auto`,type:"boolean",component:"switch",translation:t,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}],defaultValue:!0,show:t=>!r||"labelTextAlign"===e||t.qDef.representation?.type!==mN},[e]:{ref:`qDef.${e}.align`,type:"string",component:"item-selection-list",horizontal:!0,items:[{component:"icon-item",icon:"align_left",labelPlacement:"bottom",value:"left",translation:"properties.dock.left"},{component:"icon-item",icon:"align_center",labelPlacement:"bottom",value:"center",translation:"Common.Center"},{component:"icon-item",icon:"align_right",labelPlacement:"bottom",value:"right",translation:"properties.dock.right"}],defaultValue:"left",show:t=>void 0!==t.qDef[e]&&!t.qDef[e].auto&&(!r||"labelTextAlign"===e||t.qDef.representation?.type!==mN)}}},bN="TOTAL_OFF",xN={component:"attribute-expression-reference",defaultValue:[],ref:"qAttributeExpressions",items:[{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.BackgroundExpression",defaultValue:"",id:pN.CellBackgroundColor},{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.ForegroundExpression",defaultValue:"",id:pN.CellForegroundColor},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:pN.LinkLabel,tid:"URLLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:pN.Link,tid:"URLByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:pN.ImageLabel,tid:"ImageLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:pN.ImageUrl,tid:"ImageUrlByExpression",show:!1}]},SN="TOTAL_OFF",wN={component:"attribute-expression-reference",defaultValue:[],ref:"qAttributeExpressions",items:[{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.BackgroundExpression",defaultValue:"",id:pN.CellBackgroundColor},{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.ForegroundExpression",defaultValue:"",id:pN.CellForegroundColor},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:pN.LinkLabel,tid:"URLLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:pN.Link,tid:"URLByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:pN.ImageLabel,tid:"ImageLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:pN.ImageUrl,tid:"ImageUrlByExpression",show:!1}]},CN=e=>{const{translator:t,anything:n,flags:r}=e,i=(e=>{const{translator:t,anything:n}=e;return{type:"items",component:"data-assets-panel-pivot",translation:"Common.Data",items:{dimensions:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qDimensions",items:{field:{type:"items",translation:"Common.Field",items:{libraryId:{type:"string",component:"library-item",libraryItemType:"dimension",ref:"qLibraryId",translation:"Common.Dimension",show:e=>!!e.qLibraryId},inlineDimension:{component:"inline-dimension",show:e=>!e.qLibraryId},autoSort:{ref:"qDef.autoSort",type:"boolean",defaultValue:!0,show:!1},cId:{ref:"qDef.cId",type:"string",show:!1},nullSuppression:{type:"boolean",ref:"qNullSuppression",defaultValue:!1,translation:"properties.dimensions.showNull",inverted:!0},totalMode:{type:"string",component:"switch",translation:"properties.showTotals",ref:"qOtherTotalSpec.qTotalMode",defaultValue:bN,trueOption:{value:"TOTAL_EXPR",translation:"properties.on"},falseOption:{value:bN,translation:"properties.off"},show:!n.sense?.isUnsupportedFeature?.("totals")&&gN},totalsLabel:{type:"string",component:"expression",expressionType:"StringExpr",ref:"qTotalLabel",translation:"properties.totals.label",defaultValue:()=>t.get("Object.Table.Totals"),show:(e,t,r)=>!n.sense?.isUnsupportedFeature?.("totals")&&e.qOtherTotalSpec?.qTotalMode!==bN&&gN(e,0,r)},dimensionLimits:{uses:"dimensions.items.dimensionLimits"},showOthers:{uses:"dimensions.items.others"},globalGrouping:{type:"boolean",translation:"properties.dimensionLimits.globalGrouping",ref:"qOtherTotalSpec.qGlobalOtherGrouping",defaultValue:!1,show:e=>"OTHER_OFF"!==e.qOtherTotalSpec?.qOtherMode}}},presentation:{type:"items",translation:"properties.presentation",items:{visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Table.Columns.VisibilityCondition",defaultValue:{qv:""},isExpression:e=>"string"==typeof e&&e.trim().length>0},cellColoring:xN,...yN({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...yN({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...uN(e),...vN()}}}},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:xN,...yN({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...yN({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...cN(e,{[iN.Image]:!0,[iN.Indicator]:!0}),...vN()}}}},filter:{type:"object",component:"filter-item-react",ref:"filter",tabName:"SimpleProperties.Filters.Filters"}}}})(e);return r.isEnabled("CLIENT_IM5974_PIVOT_DATA_PROPERTIES")?i:{type:"items",component:"pivot-data",translation:"properties.data",addTranslation:"Property.AddData",items:{dimensions:{type:"array",component:"dimensions",translation:"Common.Dimensions",alternativeTranslation:"properties.alternative.dimensions",ref:"qHyperCubeDef.qDimensions",disabledRef:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",min:1,allowAdd:!0,allowRemove:!0,allowMove:!0,addTranslation:"properties.dimensions.add",grouped:!0,items:{libraryId:{type:"string",component:"library-item",libraryItemType:"dimension",ref:"qLibraryId",translation:"Common.Dimension",show:e=>!!e.qLibraryId},inlineDimension:{component:"inline-dimension",show:e=>!e.qLibraryId},autoSort:{ref:"qDef.autoSort",type:"boolean",defaultValue:!0,show:!1},cId:{ref:"qDef.cId",type:"string",show:!1},nullSuppression:{type:"boolean",ref:"qNullSuppression",defaultValue:!1,translation:"properties.dimensions.showNull",inverted:!0},totalMode:{type:"string",component:"switch",translation:"properties.showTotals",ref:"qOtherTotalSpec.qTotalMode",defaultValue:SN,trueOption:{value:"TOTAL_EXPR",translation:"properties.on"},falseOption:{value:SN,translation:"properties.off"},show:!n.sense?.isUnsupportedFeature?.("totals")&&gN},totalsLabel:{type:"string",component:"expression",expressionType:"StringExpr",ref:"qTotalLabel",translation:"properties.totals.label",defaultValue:()=>t.get("Object.Table.Totals"),show:(e,t,r)=>!n.sense?.isUnsupportedFeature?.("totals")&&e.qOtherTotalSpec?.qTotalMode!==SN&&gN(e,0,r)},dimensionLimits:{uses:"dimensions.items.dimensionLimits"},showOthers:{uses:"dimensions.items.others"},globalGrouping:{type:"boolean",translation:"properties.dimensionLimits.globalGrouping",ref:"qOtherTotalSpec.qGlobalOtherGrouping",defaultValue:!1,show:e=>"OTHER_OFF"!==e.qOtherTotalSpec?.qOtherMode},visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Table.Columns.VisibilityCondition",defaultValue:{qv:""},isExpression:e=>"string"==typeof e&&e.trim().length>0},cellColoring:wN,...yN({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...yN({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...uN(e),...vN()}},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:wN,...yN({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...yN({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...cN(e,{[iN.Image]:!0,[iN.ImagesInIndentMode]:!0,[iN.Indicator]:!0}),...vN()}},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"}}}}}},EN=(e,t,n,r)=>({ref:e,translation:t,dualOutput:!0,type:"object",component:"color-picker",width:"auto",disableNone:r??!1,defaultValue(e,t,i){const o=r?.(e,t,i)??!1,a=i.theme.current(),s=n(a,o);return{color:"transparent"===s?"none":s}}}),IN=(e,t=!1)=>{return{value:e,label:t?(n=e,n.charAt(0).toUpperCase()+n.slice(1)):e,groupHeader:!1,disabled:!1,styles:t?{fontFamily:e}:void 0};var n},DN=({ref:e,themeAccessor:t,translator:n,flags:r})=>({component:"dropdown",ref:e,options:(e,i,o)=>{const a=o.theme.current();return((e,t,n,r)=>{const i=t.fontFamily??"Source Sans Pro, sans-serif",o=t.fontFamilies??[],a=Array.from(new Set([e,i,...o])),s=[{value:"ThemeHeader",label:n.get("properties.themeFonts"),metaText:n.get("properties.theme"),groupHeader:!0},...a.sort().map(e=>IN(e,!0))],l=[{value:"DefaultHeader",label:n.get("properties.allFonts"),metaText:n.get("properties.default"),groupHeader:!0},...yT(r).filter(e=>!a.includes(e)).map(e=>IN(e,!0))];return[...s,...l.length>1?l:[]]})(t(a),a,n,r)},defaultValue:(e,n,r)=>t(r.theme.current())}),PN=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],MN=({ref:e,themeAccessor:t,translator:n})=>({component:"dropdown",ref:e,options:(e,r,i)=>{const o=i.theme.current();return((e,t,n)=>{const r=t.fontSize,i=t.fontSizes??[],o=Array.from(new Set([e,r,...i])),a=[{value:"ThemeHeader",label:n.get("properties.themeFontSizes"),metaText:n.get("properties.theme"),groupHeader:!0},...o.sort((e,t)=>parseInt(e,10)-parseInt(t,10)).map(e=>IN(e,!1))],s=[{value:"DefaultHeader",label:n.get("properties.allFontSizes"),metaText:n.get("properties.default"),groupHeader:!0},...PN.filter(e=>!o.includes(e)).map(e=>IN(e,!1))];return[...a,...s.length>1?s:[]]})(t(o),o,n)},defaultValue:(e,n,r)=>t(r.theme.current())}),RN=({section:e,defaultFontStyle:t,translator:n,flags:r,getThemeValue:i,translation:o,disableNoneCallback:a})=>({component:"panel-section",translation:o??`properties.pivot.${e}`,items:{content:{component:"items",ref:"components",key:"theme",items:{fontFamily:DN({ref:`${e}.fontFamily`,themeAccessor:t=>i(t,e,"fontFamily")??t.fontFamily,translator:n,flags:r}),fontWrapperItem:{component:"inline-wrapper",items:{fontStyle:{component:"font-style-buttons",width:!1,ref:`${e}.fontStyle`,defaultValue:t??[]},fontSize:MN({ref:`${e}.fontSize`,themeAccessor:t=>i(t,e,"fontSize")??t.fontSize,translator:n}),fontColor:EN(`${e}.fontColor`,void 0,t=>i(t,e,"color")??t.color)}},background:EN(`${e}.background`,"properties.background",(t,n)=>{const r=n?WO.WHITE:WO.TRANSPARENT;return i(t,e,"backgroundColor")??r},a)}}}}),kN=({section:e,defaultFontStyle:t,fallbackBackground:n,getThemeValue:r})=>({component:"panel-section",translation:`properties.pivot.${e}`,items:{content:{component:"items",ref:"components",key:"theme",items:{fontWrapperItem:{component:"inline-wrapper",items:{fontStyle:{component:"font-style-buttons",fullWidth:!0,ref:`${e}.fontStyle`,defaultValue:t??[]},fontColor:EN(`${e}.fontColor`,void 0,t=>r(t,e,"color")??t.color)}},background:EN(`${e}.background`,"properties.background",t=>r(t,e,"backgroundColor")??n??"transparent")}}}}),LN=(e,t)=>({component:"dropdown",ref:e,translation:t,options:[...Array(10).keys()].map(e=>({value:e+1,translation:e+1})),defaultValue:1}),AN="12px",ON="Source Sans Pro, sans-serif",TN="600",qN=15e3,_N=4/3;let NN=function(e){return e.Transparent="transparent",e.FontSecondary="#737373",e.DividerDark="#595959",e.DividerLight="#D9D9D9",e.NullValueBackground="#F2F2F2",e}({}),jN=function(e){return e.Solid="solid",e.None="none",e}({});const FN={display:"flex",justifyContent:"center",alignItems:"center"},zN={borderStyle:"solid"},WN={boxSizing:"border-box",padding:"4px 8px",userSelect:"none",WebkitUserSelect:"none"},$N={lineHeight:_N,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},HN=e=>({whiteSpace:"unset",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",wordBreak:e>1?"break-word":"break-all"}),VN=(e,t)=>e>0?`${e}px ${jN.Solid} ${t}`:jN.None,BN=(e,t,n,r,i)=>{const o=Number(!t||i?.right),a=Number(!e||i?.bottom);return{borderRight:"rtl"!==r?VN(o,n):jN.None,borderBottom:VN(a,n),borderLeft:"rtl"===r?VN(o,n):jN.None,borderTop:jN.None}},GN=(e,t,n,r,i,o,a)=>{const s=BN(t,r,i,o,a);return e.isLeftDimension||(e.isLastDimension&&!t&&(s.borderBottom=VN(2,i)),n||(s.borderLeft="rtl"!==o?VN(1,i):"none",s.borderRight="rtl"===o?VN(1,i):"none")),s},UN=({bottomDivider:e,rightDivider:t,borderColor:n})=>{const r={};return e&&(r.borderBottom=VN(1,n)),t&&(r.borderRight=VN(1,n)),r},YN=(e,t,n)=>{switch(t){case"header":return e.object?.pivotTableV2?.dimension?.label?.name?.[n];case"dimensionValues":return e.object?.pivotTableV2?.dimension?.label?.value?.[n];case"measureLabels":return e.object?.pivotTableV2?.measure?.label?.name?.[n];case"measureValues":return e.object?.pivotTableV2?.measure?.label?.value?.[n];case"totalValues":return e.object?.pivotTableV2?.total?.label?.value?.[n];case"nullValues":return e.object?.pivotTableV2?.null?.label?.value?.[n];default:return}},KN=(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:RN({section:"header",defaultFontStyle:["bold"],translator:e,flags:t,getThemeValue:YN}),dimensionValueSection:RN({section:"dimensionValues",translator:e,flags:t,getThemeValue:YN}),measureValueSection:RN({section:"measureValues",translator:e,flags:t,getThemeValue:YN}),measureLabelSection:kN({section:"measureLabels",getThemeValue:YN}),totalValuesSection:kN({section:"totalValues",defaultFontStyle:["bold"],getThemeValue:YN}),nullValuesSection:kN({section:"nullValues",fallbackBackground:NN.NullValueBackground,getThemeValue:YN}),gridSection:{translation:"properties.pivot.grid",component:"panel-section",items:{gridItems:{component:"items",ref:"components",key:"theme",items:{lineClamp:LN("grid.lineClamp","ThemeStyleEditor.style.rowHeight"),columnLineClamp:LN("grid.columnLineClamp","ThemeStyleEditor.style.columnHeight"),border:EN("grid.border","properties.border",e=>e.object?.pivotTableV2?.grid?.borderColor??NN.DividerLight),divider:EN("grid.divider","properties.pivot.divider",e=>e.object?.pivotTableV2?.grid?.divider?.borderColor??NN.DividerDark),background:EN("grid.background","properties.background",e=>e.object?.pivotTableV2?.grid?.backgroundColor??NN.Transparent)}}}}}}]}),XN=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}}},JN=(e,t)=>({uses:"settings",items:{presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:[KN(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:tO.Auto,translation:"Common.Auto"},{value:tO.Pixels,translation:"Object.Table.Column.Pixels"},{value:tO.Percentage,translation:"Object.Table.Column.Percentage"}],defaultValue:tO.Auto,show:e=>!!e.qHyperCubeDef.qIndentMode},sizePixels:{ref:"qHyperCubeDef.indentModeColumnWidth.pixels",translation:"Object.Table.Column.Pixels",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:eO.PixelsDefault,show:e=>{const t=e.qHyperCubeDef;return t.qIndentMode&&t.indentModeColumnWidth?.type===tO.Pixels}},sizePercentage:{ref:"qHyperCubeDef.indentModeColumnWidth.percentage",translation:"Object.Table.Column.Percentage",component:"expression",expressionType:"ValueExpression",expression:"optional",defaultValue:eO.PercentageDefault,show:e=>{const t=e.qHyperCubeDef;return t.qIndentMode&&t.indentModeColumnWidth?.type===tO.Percentage}},showTotalsAbove:{ref:"qHyperCubeDef.qShowTotalsAbove",type:"boolean",translation:"properties.pivot.showTotalsAbove",defaultValue:!0,show(e){const{qIndentMode:t}=e.qHyperCubeDef;return!t&&!!e.qHyperCubeDef.qDimensions.some(e=>"TOTAL_EXPR"===e.qOtherTotalSpec?.qTotalMode)}},resetProperties:{type:"object",component:"button",translation:"properties.pivot.resetExpansionButton",disabled:e=>!!e.qHyperCubeDef.qAlwaysFullyExpanded,action(e,t,n,r){e.qHyperCubeDef.qExpansionState=[],r.$emit("saveProperties",e)}}}}]},...XN(t)}}),ZN="auto",QN={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:ZN,translation:"Object.Table.SortingInSearch",options:[{value:ZN,translation:"Common.Auto"},{value:"inherit",translation:"Object.Table.SortingInSearch.InheritFromDimension"}]}}};function ej(e){const{translator:t,flags:n}=e;return{type:"items",component:"accordion",items:{data:CN(e),sorting:QN,addons:rN,settings:JN(t,n)}}}function tj(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:ej(e),importProperties:Z_(e),exportProperties:Q_,exploration:p_(e),data:eN(e),migrate:nN(e),propertyHandler:e.flags.isEnabled("VNA-147_NEBULA_PIVOT_DATA_HANDLERS")?t=>new R_(t,e):void 0}}const nj=()=>{let e;return{promise:new Promise(t=>{e=t}),resolve:e}};function rj(e,t){return M(()=>e,t)}const ij={},oj=e=>{const t=M(()=>({current:ij}),[]);return t.current=t.current===ij?e:t.current,t},aj=e=>!!e&&0===tT(e).a,sj="#grid",lj=(e,t)=>{const n=t?.closest(e);return n&&window.getComputedStyle(n).backgroundColor},uj=(e,t,n,r,i)=>{const o=lj(".qv-object .qv-inner-object",n),a=lj(".qv-panel-sheet",n),s=lj(sj,n)??a,l=(e=>{const t=e.components?.find(e=>"general"===e.key),n=t?.bgColor?.colorExpression,r=t?.bgColor?.color?.color,i=t?.bgColor?.useColorExpression;if(i&&n)return _q(n);if("none"===r)return"transparent";if(void 0===r)return;const o=tT(r);return o.setAlpha(t?.bgColor?.color?.alpha??o.a),o.getRGBA()})(e),u=r?.(t),c=i?.(t),d=l||u||o||c,p=aj(d),f=!aj(h=p?s:d)&&Oq(h,WO.TEXT,WO.DARK_MODE_TEXT)===XO(WO.DARK_MODE_TEXT);var h;const m=((e,t,n,r=WO.WHITE)=>e&&!aj(e)?e:aj(t)?n&&!aj(n)?n:r:t)(l,d,s);return{color:d,headerColor:m,isDark:f}},cj=(e,t,n,r)=>{const i=O(),o=((e,t={attributeFilter:["style"],childList:!1,subtree:!1})=>{const[n,r]=L([]);return A(()=>{let n;return e&&(n=new MutationObserver(e=>{r(e)}),n.observe(e,t)),()=>{n?.disconnect()}},[e,t]),n})(t.closest(sj),{attributeFilter:["style"],childList:!1,subtree:!1,attributeOldValue:!0}).filter(({oldValue:e})=>e?.includes("background")).map(({oldValue:e})=>e).join(",");return M(()=>({...i,background:uj(e,i,t,n,r)}),[i.name(),t,n,r,e,o])};function dj(e,t){const n=M(()=>({isLoading:!0}),t),[r,i]=k(async()=>{try{return await e()}finally{n.isLoading=!1}},t);return[r,n.isLoading,i]}const pj=3,fj=/\n/g;function hj(e,t,n){let r=0,i=e.length;if(Number.isNaN(t))return null;if(e.length<=1)return null;if(n(e)<=t)return null;for(;r<=i;){const o=Math.floor((r+i)/2),a=e.slice(0,o),s=e.slice(0,o-1),l=n(a),u=n(s);if(l>t&&u<=t)return e.slice(o-1)||null;if(l===t)return e.slice(o)||null;l<t?r=o+1:i=o}return null}function mj({fontSize:e="12px",fontFamily:t="Source Sans Pro, Arial, sans-serif",fontStyle:n="normal",fontWeight:r="normal"},i){const{maxNbrLinesOfText:o=pj,allowLineBreaks:a=!0}=i??{},{estimateWidth:s,measureText:l,estimateLineCount:u}=y(()=>(({fontSize:e="12px",fontFamily:t="Source Sans Pro, Arial, sans-serif",fontStyle:n="normal",fontWeight:r="normal"},i)=>{const{maxNbrLinesOfText:o=pj,allowLineBreaks:a=!0}=i??{};return()=>{const i=document.createElement("canvas").getContext("2d");i.font=`${n} ${r} ${e} ${t}`;const s=i.measureText.bind(i),l=Eq(e=>{if(void 0===e)return 0;if(a){const t=e.split(fj).map(e=>s(e).width);return t.reduce((e,t)=>t>e?t:e,0)}const t=e.replace(fj," ");return s(t).width}),u=e=>+l(e).toFixed(2),c=Eq(({text:e,maxWidth:t,isNumeric:n=!1})=>{if(n)return 1;const r=a?e.split(fj):[e];let i=0;for(const e of r){let n=e;do{i+=1,n=hj(n,t,u)}while(null!==n&&i<o);if(i>=o)break}return i},({text:e,maxWidth:t,isNumeric:n})=>`${e}-${t}-${n?"true":"false"}`);return{measureText:e=>l(e),estimateWidth:e=>l("N")*e,estimateLineCount:c}}})({fontStyle:n,fontWeight:r,fontSize:e,fontFamily:t},{maxNbrLinesOfText:o,allowLineBreaks:a})(),[n,r,e,t,o,a]);return{estimateWidth:s,measureText:l,estimateLineCount:u}}var gj,vj={};var yj=function(){if(gj)return vj;gj=1;var e=E;return vj.createRoot=e.createRoot,vj.hydrateRoot=e.hydrateRoot,vj}();const bj="Source Sans Pro, sans-serif";function xj(e,t){const[n,r]=g(t);n.some((e,n)=>e!==t[n])&&(r(t),e())}var Sj={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 wj=({translator:e})=>(y(()=>{!function(e){if(e&&e.get&&e.add){const t="NebulaTableUtils.MenuGroupLabel.Sorting";if(e.get(t)!==t)return;Object.keys(Sj).forEach(t=>{e.add(Sj[t])})}}(e)},[e]),e),Cj={width:"100%",height:"100%",color:"transparent",background:"transparent",borderColor:"transparent"},Ej={border:0,boxShadow:"none",borderRadius:0,outline:0,width:0,height:0,background:"transparent",cursor:"pointer",visibility:"hidden"},Ij=Ta("input",{shouldForwardProp:e=>"isLastColumn"!==e&&"hoverColor"!==e})(({isLastColumn:e,hoverColor:t,dir:n})=>({position:"absolute",display:"flex",height:"100%",top:0,marginLeft:"-4px",marginRight:"rtl"===n?"-4px":void 0,touchAction:"none",cursor:"col-resize",pointerEvents:"auto",width:(e?4:9)+"px",justifyContent:e?"flex-end":"center",outline:"none",appearance:"none",WebkitAppearance:"none",backgroundColor:"transparent","&::-webkit-slider-runnable-track":{...Cj},"&::-moz-range-track":{...Cj},"&::-ms-track":{...Cj},"&::-webkit-slider-thumb":{appearance:"none",WebkitAppearance:"none",...Ej},"&::-moz-range-thumb":{...Ej},"&::-ms-thumb":{...Ej},"&: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"}})),Dj=({columnWidth:e,keyValue:t,isLastColumn:n,isPivot:r,hoverColor:i,updateWidthCallback:o,confirmWidthCallback:a,handleBlur:s,setIsAdjustingWidth:l,isLeftColumn:c,accessibilityRelatedArgs:d,direction:p="ltr"})=>{const f=wj({translator:d.translator}),h=u({initWidth:e,columnWidth:e,initX:0}),m=n?0:1,g=r&&!c,v=()=>g?h.current.columnWidth-m:"100%",y={left:"rtl"!==p?v():void 0,right:"rtl"===p?v():void 0},b=t=>{h.current={initWidth:e,columnWidth:e,initX:t??h.current.initX}};xj(()=>{g&&b()},[e]);const x=e=>{const t=Math.max(e,eO.PixelsMin);h.current.columnWidth=t,o(t)},S=()=>{if(h.current.columnWidth!==h.current.initWidth){const e={type:tO.Pixels,pixels:h.current.columnWidth};a(e)}l?.(!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=>{Nq(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=>{Nq(e),document.removeEventListener("touchmove",E),document.removeEventListener("touchend",I),S()},D=!r&&s?e=>{if(e.key===ZA.Left||e.key===ZA.Right){Nq(e);const t=5,n=e.key===ZA.Left?t:-t,r="rtl"===p?n:-n;l?.(!0),x(h.current.columnWidth+r)}else e.key===ZA.Space||e.key===ZA.Enter?(Nq(e),s(e),l?.(!1),S()):e.key===ZA.Esc&&(Nq(e),s(e),l?.(!1),x(h.current.initWidth))}:void 0,P=f.get("NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",[String(d.columnLabel)]);return Yn.jsx(Ij,{style:y,hoverColor:i,isLastColumn:n,className:QA,"data-testid":QA,onMouseDown:e=>{Nq(e),document.addEventListener("mousemove",w),document.addEventListener("mouseup",C),l?.(!0),b(e.clientX)},onDoubleClick:()=>{a({type:tO.FitToContent})},onTouchStart:e=>{1===e.touches.length&&(Nq(e),document.addEventListener("touchmove",E),document.addEventListener("touchend",I),l?.(!0),b(e.touches[0].clientX))},onKeyDown:D,onBlur:s,onFocus:()=>{b()},type:"range",tabIndex:-1,"aria-label":P,"aria-valuemin":eO.PixelsMin,"aria-valuemax":eO.PixelsMax,"aria-valuenow":Number(e.toFixed(1)),dir:p},t)},Pj=r((e,t)=>Yn.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:Yn.jsx("path",{d:"M15 4H1V2h14zm0 10H1v-2h14zm0-5H1V7h14z"})})),Mj=Ta(xl,{shouldForwardProp:e=>"rightAligned"!==e&&"shouldShowMenuIcon"!==e&&"isAccessibleHeader"!==e})(({rightAligned:e,shouldShowMenuIcon:t,isAccessibleHeader:n})=>({...e?{marginRight:"auto"}:{marginLeft:"auto"},height:n?24:void 0,display:t?"flex":"none",fontWeight:"bold",width:n?"100%":void 0,alignItems:"center",justifyContent:"center"})),Rj=Ta(Pj,{shouldForwardProp:e=>"isInteractionsActive"!==e})(({isInteractionsActive:e})=>({minWidth:"unset",position:"relative",cursor:e?"pointer":"default"})),kj=Ta(qc)(({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}})),Lj=Ta(hu)(({theme:e})=>({"&.MuiDivider-root":{margin:e.spacing(.5)}})),Aj=Ta(zc)(({theme:e})=>({fontSize:"12px",height:24,fontWeight:"bold",padding:`${e.spacing(.25,2)} !important`,marginBottom:e.spacing(.5)})),Oj=Ta(zc,{shouldForwardProp:e=>"isSubMenu"!==e&&"isActive"!==e})(({theme:e,isSubMenu:t,isActive:n})=>({width:`calc(220px - ${e.spacing(1)} - ${t?10:0}px)`,maxHeight:32,borderRadius:`${e.spacing(.5)} !important`,margin:`${e.spacing(.25,.5)} !important`,padding:`${e.spacing(1,1.5)} !important`,display:"flex !important",justifyContent:"space-between !important","&&:focus":{boxShadow:"rgb(23, 127, 230) 0px 0px 0px 2px"},position:"relative !important",overflow:"hidden",boxSizing:"border-box !important",background:n?"rgba(0, 0, 0, 0.05)":"transparent"})),Tj=Ta("div",{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})(({theme:e,direction:t,isPagination:n})=>({position:"absolute",width:e.spacing(.5),height:16,left:0,right:n||"rtl"!==t?void 0:0,top:"50%",transform:"TranslateY(-50%)",borderRadius:"0 2px 2px 0",background:"#01873d"})),qj=Ta("div")(()=>({display:"flex",justifyContent:"space-between",alignItems:"center",maxWidth:"100%"})),_j=Ta(_s)(()=>({fontFamily:'"Source Sans Pro", HelveticaNeue, "Helvetica Neue", Helvetica, Arial, sans-serif',fontSize:"14px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"})),Nj=Ta(lc,{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})(({theme:e,direction:t,isPagination:n})=>({width:16,minWidth:"unset !important",marginRight:n||"rtl"!==t?e.spacing(1.5):0,marginLeft:n||"rtl"!==t?void 0:e.spacing(1.5),lineHeight:0})),jj=r((e,t)=>Yn.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:Yn.jsx("path",{d:"M8.5 8 4 3.5 5.5 2l6 6-6 6L4 12.5z"})})),Fj=e=>{const t=e.nextElementSibling;return t?"HR"===t.tagName?Fj(t):t:e.parentElement?.children?.[0]},zj=e=>{const t=e.previousElementSibling;if(!t){const t=e.parentElement?.children?.length;return e.parentElement?.children?.[t-1]}return"HR"===t.tagName?zj(t):t},Wj=e=>{const{key:t,currentTarget:n}=e,r=document.activeElement??n;if(t===ZA.Down||t===ZA.Up){const n=e=>t===ZA.Down?Fj(e):zj(e);e.preventDefault(),e.stopPropagation();let i=n(r);for(;i;){if("true"!==i.ariaDisabled){i.focus();break}i=n(i)}}},$j=(e,t)=>e.map(e=>e.map(e=>({...e.groupHeading?{groupHeading:e.groupHeading}:{},items:e.items.map(({onClick:e,...n})=>({...n,...e?{onClick:async n=>{Object.entries(t).forEach(([,e])=>{e(!1)}),await e(n)}}:{}}))})));let Hj={};const Vj=({autoFocus:e,id:t,onClick:n,itemTitle:r,icon:i,enabled:a,subMenus:s,isSubMenu:l,isActive:u,direction:c,isPagination:d})=>{const[p,f]=g(!1),h=o.useRef(null),v=m(e=>{e.stopPropagation(),f(!1)},[f]);return Yn.jsxs(Yn.Fragment,{children:[Yn.jsxs(Oj,{ref:s?h:null,"data-testid":`menu-item-${t}`,className:"nebula-table-utils-head-menu-item",onClick:async e=>{"keyup"!==e.type&&(n&&(await n(e),Hj={}),s?.length&&(f(!0),Hj[r]=f,e.stopPropagation()))},disabled:!a,autoFocus:e,isSubMenu:!!l,isActive:!!u,onKeyDown:Wj,children:[u?Yn.jsx(Tj,{direction:c,isPagination:d}):null,Yn.jsxs(qj,{children:[Yn.jsx(Nj,{direction:c,isPagination:d,children:Yn.jsx(i,{})}),Yn.jsx(_j,{variant:"body2",children:r})]}),s?.length?Yn.jsx(jj,{}):null]},t),s?.length?Yn.jsx(Yj,{isSubMenu:!0,open:p,anchorEl:h.current,onClose:v,menuGroups:$j(s,Hj),transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},direction:c,isPagination:d}):null]})},Bj=({menuGroup:e,isSubMenu:t,direction:n,isPagination:r})=>e.map(e=>[[e.groupHeading&&Yn.jsx(Aj,{disabled:!0,style:{opacity:1},children:e.groupHeading},e.groupHeading),e.items.map(e=>Yn.jsx(Vj,{...e,isSubMenu:t,direction:n,isPagination:r},e.id))].filter(Boolean)]),Gj=({itemGroups:e,isSubMenu:t,direction:n,isPagination:r})=>e.map((i,o)=>[Bj({menuGroup:i,isSubMenu:t,direction:n,isPagination:r}),o<e.length-1?Yn.jsx(Lj,{"data-testid":"group-divider",variant:"middle"}):void 0]),Uj={appear:0,enter:0,exit:0},Yj=({anchorEl:e,open:t,onClose:n,menuGroups:r,transformOrigin:i,anchorOrigin:o,isSubMenu:a,direction:s,isPagination:l})=>r.length?Yn.jsx(kj,{className:"nebula-table-utils-head-menu",open:t,anchorEl:e,onClose:n,transitionDuration:Uj,MenuListProps:{id:"nebula-table-utils-head-menu-list-id"},...o?{anchorOrigin:o}:{},...i?{transformOrigin:i}:{},dir:s,children:Gj({itemGroups:r,isSubMenu:a,direction:s,isPagination:l})}):null,Kj=(e,t)=>e.some(e=>t[e]>0),Xj={canSelectAll:!1,canClearSelections:!1,canSelectPossible:!1,canSelectAlternative:!1,canSelectExcluded:!1},Jj=({open:e,qStateName:t="$",headerData:n,app:r})=>{const[i,o]=g(null),[a,s]=g(Xj);return xj(()=>{e||(s(Xj),o(null))},[e]),f(()=>{if(!r?.createSessionObject||!n.isDim||!e)return()=>{};let i,a=!1;const l=()=>{i&&r.destroySessionObject(i)};return(async()=>{try{const e=((e,t)=>({qInfo:{qType:"tableListbox"},qListObjectDef:Boolean(t.qLibraryId)?{qLibraryId:t.qLibraryId,qStateName:e}:{qDef:{qFieldDefs:[t.fieldId]},qStateName:e}}))(t,n),u=await r.createSessionObject(e),c=await u.getLayout(),{qStateCounts:d}=c.qListObject?.qDimensionInfo??{};i=c.qInfo?.qId,a?l():(o(u),d&&s((e=>({canSelectAll:Kj(["qOption","qAlternative","qExcluded","qDeselected"],e),canClearSelections:Kj(["qSelected"],e),canSelectPossible:Kj(["qOption"],e),canSelectAlternative:Kj(["qAlternative"],e),canSelectExcluded:Kj(["qAlternative","qExcluded"],e)}))(d)))}catch(e){console.error(e)}})(),()=>{a=!0,l()}},[e,r,n,t]),{fieldInstance:i,selectionActionsEnabledStatus:a}},Zj=r((e,t)=>Yn.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:Yn.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"})})),Qj=r((e,t)=>Yn.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:Yn.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"})})),eF=r((e,t)=>Yn.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:Yn.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"})})),tF=r((e,t)=>Yn.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:Yn.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"})})),nF=r((e,t)=>Yn.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:Yn.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"})})),rF=r((e,t)=>Yn.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:Yn.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"})})),iF=r((e,t)=>Yn.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:Yn.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"})})),oF=r((e,t)=>Yn.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:Yn.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"})})),aF=r((e,t)=>Yn.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:Yn.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"})})),sF=r((e,t)=>Yn.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:Yn.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"})})),lF=r((e,t)=>Yn.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:Yn.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"})})),uF=r((e,t)=>Yn.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:Yn.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"})})),cF=r((e,t)=>Yn.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:Yn.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"})})),dF=r((e,t)=>Yn.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:Yn.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 pF=function(e){return e.Sorting="sorting",e.Searching="searching",e.Selections="selections",e.AdjusterHeaderSize="adjustHeaderSize",e}({});const fF="/qListObjectDef",hF=({headerData:e,translator:t,menuAvailabilityFlags:n,setOpen:r,sortFromMenu:i,interactions:o,embedListbox:a,fieldInstance:s,selectionActionsEnabledStatus:l,anchorRef:u,focusColumnAdjuster:c,setActiveFieldCallback:d,expandOrCollapseArgs:p})=>{const f=[];if(n[pF.Sorting]){const{isActivelySorted:n,sortDirection:o}=e,{ascendingEnabled:a,descendingEnabled:s}=(({isActivelySorted:e,sortDirection:t,isPivot:n,isSortedByFirstMeasure:r})=>{let i=!n&&!e||"D"===t,o=!n&&!e||"A"===t;return r&&(i=!1,o=!1),{ascendingEnabled:i,descendingEnabled:o}})(e);f.push([{groupHeading:t.get("NebulaTableUtils.MenuGroupLabel.Sorting"),items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortAscending"),onClick:async e=>{e.stopPropagation(),await(i?.(e,"A")),r(!1)},icon:Zj,enabled:a,isActive:!!n&&"A"===o,autoFocus:a},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortDescending"),onClick:async e=>{e.stopPropagation(),await(i?.(e,"D")),r(!1)},icon:tF,enabled:s,isActive:!!n&&"D"===o,autoFocus:!a&&s}]}])}if(e.isCyclic&&d){const t=[];t.push([{items:[{id:1,itemTitle:e.groupDimensionLabels[e.groupDimensionPos],enabled:!0,icon:oF,subMenus:[[{items:e.groupDimensionLabels.map((t,n)=>({id:n+1,itemTitle:t,onClick:e=>{e.stopPropagation(),r(!1),d(n)},enabled:!0,icon:nF,isActive:e.groupDimensionPos===n}))}]]}]}]),t.length>0&&f.push(...t)}if(e.isDim&&o?.select){const i=[];n[pF.Searching]&&i.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Search"),onClick:e=>{e.stopPropagation(),r(!1),a()},icon:aF,enabled:!0}]}]),!e.isLocked&&n[pF.Selections]&&i.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Selections"),icon:dF,enabled:!!s,subMenus:[[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAll"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectAll(fF))},icon:sF,enabled:l.canSelectAll},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectPossible"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectPossible(fF))},icon:cF,enabled:l.canSelectPossible},{id:3,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAlternative"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectAlternative(fF))},icon:lF,enabled:l.canSelectAlternative},{id:4,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectExcluded"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectExcluded(fF))},icon:uF,enabled:l.canSelectExcluded}]}],[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.ClearSelections"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.clearSelections(fF))},icon:Qj,enabled:l.canClearSelections}]}]]}]}]),p&&!p.alwaysFullyExpanded&&f.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Expand"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await p.expandCallback()},icon:iF,enabled:!0},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Collapse"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await p.collapseCallback()},icon:rF,enabled:!0}]}]),i.length>0&&f.push(...i)}return n[pF.AdjusterHeaderSize]&&f.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.AdjustColumnSize"),onClick:e=>{e.stopPropagation(),e.preventDefault(),r(!1),c?.(u)},icon:eF,enabled:!0}]}]),f},mF=({open:e,setOpen:t,anchorRef:n,headerData:r,translator:i,interactions:o,menuAvailabilityFlags:a,shouldShowMenuIcon:s=!0,sortRelatedArgs:l,searchRelatedArgs:c,selectionRelatedArgs:d,adjustHeaderSizeRelatedArgs:p,expandOrCollapseArgs:f,model:h,direction:g="ltr",isPagination:v,isAccessibleHeader:y,iconSize:b=KA})=>{const x=u(null),S=wj({translator:i}),{qLibraryId:w,fieldId:C,headTextAlign:E}=r,I=d?.app,{fieldInstance:D,selectionActionsEnabledStatus:P}=Jj({open:e,headerData:r,app:I,qStateName:d?.qStateName}),M=(({model:e,headerData:t})=>{if(e&&"setActiveField"in e&&void 0!==t.dimensionInfoIndex){const n=t.dimensionInfoIndex;return async t=>{try{await e.setActiveField("/qHyperCubeDef",n,t)}catch(e){console.error(e)}}}return null})({model:h,headerData:r}),R=(({qLibraryId:e,fieldId:t,searchRelatedArgs:n,selectionRelatedArgs:r,direction:i,onPopoverClose:o})=>m(()=>{const a=e?{qLibraryId:e,type:"dimension"}:t;if(n?.embed){const{embed:e,listboxRef:t}=n;e.__DO_NOT_USE__.popover(t.current,a,{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"rtl"===i?"right":"left"},sortCriteria:n.sortCriteria,stateName:r?.qStateName,direction:i,onPopoverClose:o})}},[e,t,n,r?.qStateName,i,o]))({qLibraryId:w,fieldId:C,searchRelatedArgs:c,selectionRelatedArgs:d,direction:g}),k=m(e=>{e.stopPropagation(),t(!1)},[t]),L=m(e=>{e.stopPropagation(),t(e=>!e)},[t]);return o.active?Yn.jsxs(Mj,{rightAligned:"right"===E,shouldShowMenuIcon:s,className:"nebula-table-utils-head-menu-wrapper",onClick:!1===y?L:void 0,ref:x,isAccessibleHeader:y,children:[s?Yn.jsx(Rj,{height:b,className:XA,"data-testid":XA,isInteractionsActive:o.active??!1,children:Yn.jsx(Pj,{})}):null,Yn.jsx(Yj,{open:e,anchorEl:!1===y?x.current:n.current,onClose:k,menuGroups:hF({headerData:r,translator:S,menuAvailabilityFlags:a,setOpen:t,...l,embedListbox:R,interactions:o,fieldInstance:D,selectionActionsEnabledStatus:P,anchorRef:n,focusColumnAdjuster:p?.focusColumnAdjuster,setActiveFieldCallback:M,expandOrCollapseArgs:f}),direction:g,isPagination:v})]}):null},gF=e=>e.isDark?{background:e.color,borderColor:WO.DARK_MODE_BORDER,color:WO.DARK_MODE_TEXT,disabledColor:WO.DARK_MODE_DISABLED,iconColor:WO.DARK_MODE_TEXT}:{background:e.color,borderColor:WO.BORDER_MEDIUM,color:WO.TEXT,disabledColor:WO.DISABLED},vF=Ta(xl,{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}`})),yF=Ta(xd,{shouldForwardProp:e=>"footerStyle"!==e})(({footerStyle:e,theme:t})=>({background:"inherit",marginRight:t.spacing(1),color:e.color,"& .MuiNativeSelect-icon, .MuiNativeSelect-select":{color:e.iconColor}})),bF=Ta(kl,{shouldForwardProp:e=>"disabledCondition"!==e&&"footerStyle"!==e})(({disabledCondition:e,footerStyle:t,theme:n})=>({color:e?t.disabledColor:t.color,cursor:e?"default":"pointer",marginLeft:n.spacing(1)})),xF=Ta(_s)(({theme:e})=>({color:"inherit",margin:e.spacing(0,1,0,1)})),SF=({children:e,footerContainer:t,interactions:n,theme:r,paginationNeeded:i=!0})=>{const o=y(()=>gF(r.background),[r]);if(!n.active)return null;const a=i?Yn.jsx(vF,{footerStyle:o,children:e}):null;return t?E.createPortal(e,t):a},wF=d({}),CF=()=>i(wF),EF=({children:e,direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:i,isSelectionMode:o,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:u,keyboard:c,translator:d,theme:p,interactions:f,rect:h,layout:m,visibilityThreshold:g})=>{const v=(e=>!e.enabled||e.active)(c)?0:-1,b=y(()=>gF(p.background),[p]),x=i?i.getBoundingClientRect().width:h.width,S=wj({translator:d}),w=y(()=>({direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:i,isSelectionMode:o,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:u,keyboard:c,translator:S,theme:p,interactions:f,rect:h,layout:m,footerStyle:b,tabIndex:v,width:x,visibilityThreshold:g}),[t,n,r,i,o,a,s,l,u,c,S,p,f,h,m,b,v,x,g]);return Yn.jsx(wF.Provider,{value:w,children:e})};let IF=function(e){return e.FirstPage="FirstPage",e.LastPage="LastPage",e.NextPage="NextPage",e.PreviousPage="PreviousPage",e}({}),DF=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 PF=r((e,t)=>Yn.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:Yn.jsx("path",{d:"m7 8 4.5 4.5L10 14 4 8l6-6 1.5 1.5z"})})),MF=r((e,t)=>Yn.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:Yn.jsx("path",{d:"m12 2 1.5 1.5L9 8l4.5 4.5L12 14 6 8zM4 2v12H2V2z"})})),RF=r((e,t)=>Yn.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:Yn.jsx("path",{d:"m3.5 2 6 6-6 6L2 12.5 6.5 8 2 3.5zM14 2v12h-2V2z"})})),kF={FirstPage:MF,PreviousPage:PF,NextPage:jj,LastPage:RF,FirstPageRTL:RF,PreviousPageRTL:jj,NextPageRTL:PF,LastPageRTL:MF},LF=({disabledCondition:e,pageNumber:t,type:n})=>{const{direction:r,footerStyle:i,handleChangePage:o,translator:a,interactions:s,tabIndex:l}=CF(),u=n.concat("rtl"===r?"RTL":""),c=kF[u];return{styledProps:{footerStyle:i,disabledCondition:e,size:"small","data-testid":"pagination-action-icon-button","aria-disabled":e,"aria-label":a.get(`NebulaTableUtils.Pagination.${n}`),title:s.passive?a.get(`NebulaTableUtils.Pagination.${n}`):void 0,tabIndex:l,onClick:e?void 0:()=>{o(t)}},IconComponent:c}},AF=()=>{const{pageInfo:e,width:t,interactions:n,visibilityThreshold:r}=CF(),i=0===e.page,{IconComponent:o,styledProps:a}=LF({type:IF.FirstPage,disabledCondition:i,pageNumber:0});return t<=(r?.firstPage||DF.FirstPage)?null:Yn.jsx(bF,{...a,disabled:!n.active,children:Yn.jsx(o,{height:KA})})},OF=(e,t,n=!1)=>{n&&e.key===ZA.Tab&&!e.shiftKey&&(Nq(e),((e,t,n)=>{const r=e.closest(".qv-object-wrapper")?.querySelector(".sel-toolbar-confirm")?.parentElement??document.querySelector("#qv-selection-toolbar-popover .sel-toolbar-confirm")?.parentElement;r?r.focus():t.focusSelection?.(n)})(e.target,t,!1))},TF=()=>{const{pageInfo:e,keyboard:t,totalPages:n,isSelectionMode:r,width:i,interactions:o,visibilityThreshold:a}=CF(),s=e.page>=n-1,{IconComponent:l,styledProps:u}=LF({type:IF.LastPage,disabledCondition:s,pageNumber:n-1}),c=t.enabled?e=>{OF(e,t,r)}:void 0;return i<=(a?.lastPage||DF.LastPage)?null:Yn.jsx(bF,{...u,onKeyDown:c,disabled:!o.active,children:Yn.jsx(l,{height:KA})})},qF=()=>{const{pageInfo:e,keyboard:t,totalPages:n,isSelectionMode:r,width:i,interactions:o}=CF(),a=e.page>=n-1,{IconComponent:s,styledProps:l}=LF({type:IF.NextPage,disabledCondition:a,pageNumber:e.page+1}),u=!(i>DF.FirstPage&&i>DF.LastPage)&&t.enabled?e=>{OF(e,t,r)}:void 0;return Yn.jsx(bF,{...l,onKeyDown:u,disabled:!o.active,children:Yn.jsx(s,{height:KA})})},_F=()=>{const{pageInfo:e,interactions:t}=CF(),n=0===e.page,{IconComponent:r,styledProps:i}=LF({type:IF.PreviousPage,disabledCondition:n,pageNumber:e.page-1});return Yn.jsx(bF,{...i,disabled:!t.active,children:Yn.jsx(r,{height:KA})})},NF=()=>{const{translator:e,width:t,pageInfo:n,totalRowCount:r,visibilityThreshold:i}=CF(),{page:o,rowsPerPage:a}=n;if(t<=(i?.displayedRowsLabel||DF.DisplayedRowsLabel))return null;const s=e.get("NebulaTableUtils.Pagination.DisplayedRowsLabel",[`${o*a+1} - ${Math.min((o+1)*a,r)}`,r.toString()]);return Yn.jsx(xF,{variant:"caption",dir:"ltr",children:s})},jF=({name:e,value:t,options:n,handleChange:r})=>{const{layout:i,footerStyle:o,translator:a,tabIndex:s,interactions:l}=CF(),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 Yn.jsxs(Yn.Fragment,{children:[Yn.jsxs(xF,{variant:"caption",id:p,children:[c,":"]}),Yn.jsx(yF,{footerStyle:o,size:"small",native:!0,value:t,onChange:r,inputProps:f,disabled:!l.active,children:n})]})},FF=()=>{const{pageInfo:e,isSelectionMode:t,totalColumnCount:n,width:r,handleChangeRowsPerPage:i,visibilityThreshold:o}=CF();if(!(!!e.rowsPerPageOptions?.length&&!t&&r>(o?.rowsPerPage||DF.RowsPerPage)&&n<=100)||void 0===e.rowsPerPageOptions)return null;const a=Yn.jsx(Yn.Fragment,{children:e.rowsPerPageOptions.map(e=>Yn.jsx("option",{value:e,children:e},e))});return Yn.jsx(jF,{name:"RowsPerPage",value:e.rowsPerPage,options:a,handleChange:e=>{i?.(+e.target.value)}})},zF=1e3,WF="…",$F=({totalPages:e,page:t})=>{const n=Math.min(e,zF),r=n<e&&t>500,i=r?Math.min(500+t,e):n,o=r?Math.max(0,i-zF):0,a=Array.from(Array(n).keys()).map(e=>{const t=e+o;return Yn.jsx("option",{value:t,children:t+1},t)});return o>0&&a.unshift(Yn.jsx("option",{value:WF,disabled:!0,children:WF},"startMoreOptions")),i<e-1&&a.push(Yn.jsx("option",{value:WF,disabled:!0,children:WF},"endMoreOptions")),Yn.jsx(Yn.Fragment,{children:a})},HF=()=>{const{pageInfo:e,width:t,totalPages:n,handleChangePage:r,visibilityThreshold:i}=CF(),{page:o}=e;if(t<=(i?.selectPage||DF.SelectPage))return null;const a=Yn.jsx($F,{totalPages:n,page:o});return Yn.jsx(jF,{name:"SelectPage",value:o,options:a,handleChange:e=>{r(+e.target.value)}})};var VF=x(e=>Yn.jsxs(EF,{...e,children:[Yn.jsx(FF,{}),Yn.jsx(HF,{}),Yn.jsx(NF,{}),Yn.jsx(AF,{}),Yn.jsx(_F,{}),Yn.jsx(qF,{}),Yn.jsx(TF,{})]}));const BF=e=>Yn.jsx(SF,{...e,children:Yn.jsx(VF,{...e})}),GF=d({}),UF=()=>i(GF),YF=({rect:e,pageInfo:t,qPivotDataPages:n,updatePageInfo:r,direction:i,children:o})=>{const a=y(()=>({rect:e,pageInfo:t,qPivotDataPages:n,updatePageInfo:r,direction:i}),[e,t,n,r,i]);return Yn.jsx(GF.Provider,{value:a,children:o})},KF=d({}),XF=()=>i(KF),JF=({app:e,model:t,theme:n,embed:r,keyboard:i,translator:o,interactions:a,env:s,children:l})=>{const u=y(()=>({model:t,app:e,interactions:a,embed:r,theme:n,keyboard:i,env:s,translator:o}),[e,a,t,r,n,i,s,o]);return Yn.jsx(KF.Provider,{value:u,children:l})},ZF=d({}),QF=()=>i(ZF),ez=({children:e,...t})=>Yn.jsx(ZF.Provider,{value:t,children:e}),tz=()=>{const{text:e,fontFamily:t,fontSize:n,justifyContent:r,alignItems:i,height:o}=(()=>{const{theme:e,translator:t}=XF(),{layoutService:n}=QF(),r=e.getStyle("","","fontFamily")??ON;return n.hasData?n.hasLimitedData?{text:t.get("SNPivotTable.LimitedData"),fontSize:"13px",fontFamily:r,alignItems:"center",height:"22px"}:{}:{text:t.get("SNPivotTable.NoData"),fontSize:"16px",fontFamily:r,justifyContent:"center",alignItems:"center",height:"100%"}})();return void 0===e?null:Yn.jsx("div",{style:{display:"flex",justifyContent:r,alignItems:i,width:"100%",height:o},children:Yn.jsx("span",{style:{...$N,fontFamily:t,fontSize:n,fontStyle:"italic",color:"#7b7a78"},children:e})})},nz="/qHyperCubeDef",rz=-1,iz="PSEUDO-DIM",oz=e=>e===rz?iz:(({cId:e})=>e??w_())(e),az=({layoutService:e,visibleLeftDimensionInfos:t,cell:n,colIdx:r})=>{n&&(n.canBeResized=!0,n.colIdx=n.colIdx||r,n.dimensionInfoIndex===rz?n.columnWidthLocation=dN.Measures:n.isLeftDimension?n.columnWidthLocation=dN.Dimension:t.at(-1)===rz?n.columnWidthLocation=dN.Measures:e.hasPseudoDimOnLeft&&(n.columnWidthLocation=dN.Pivot))},sz=(e,t,n,r)=>{const i=oz(n),o=e.getDimensionInfoIndex(n),a=e.isLeftDimension(o);return n===rz?{id:i,colIdx:-1,label:"",sortDirection:"A",fieldId:"",isLocked:!1,isDim:!1,isCyclic:!1,groupDimensionPos:0,groupDimensionLabels:[],headTextAlign:"left",dimensionInfoIndex:o,canBeResized:!1,isLeftDimension:a,isLastDimension:r,columnWidthLocation:dN.Measures,isPivot:!0,qEffectiveDimensionName:void 0}:{id:i,colIdx:0,label:n.qFallbackTitle??"",qReverseSort:n.qReverseSort,sortDirection:n.qSortIndicator&&"N"!==n.qSortIndicator?n.qSortIndicator:"A",qLibraryId:n.qLibraryId,fieldId:n.qGroupFieldDefs[n.qGroupPos],isLocked:n.qLocked??!1,columnWidth:n.columnWidth,qApprMaxGlyphCount:n.qApprMaxGlyphCount,isDim:!0,isCyclic:n.qGrouping===iO.Cyclic,groupDimensionPos:n.qGroupPos,groupDimensionLabels:n.qGroupFallbackTitles,headTextAlign:"left",dimensionInfoIndex:o,canBeResized:!1,isLeftDimension:a,isLastDimension:r,columnWidthLocation:dN.Dimension,isPivot:!0,isSortedByFirstMeasure:t.isSortedByFirstMeasure,qEffectiveDimensionName:n.qEffectiveDimensionName}},lz=({layoutService:e,effectivePropertiesService:t,lastRow:n,lastCol:r})=>{let i=r;var o;n.length>0&&(i=(o=r).at(-1)===rz?o.slice(0,-1):o);const a=i.length+(n.length?1:0),s=Math.max(1,n.length),l=((e,t)=>Array(e).fill(null).map(()=>Array.from({length:t},()=>null)))(a,s);return n.forEach((n,r,i)=>{const o=r===i.length-1;l[a-1][r]=sz(e,t,n,o)}),i.forEach((n,r,i)=>{const o=r===i.length-1;l[r][s-1]=sz(e,t,n,o)}),l},uz=(e,t,n,r)=>{const i=((e,t,n,r)=>{let i;return i=0===n.length||n.includes(rz)?lz({layoutService:e,effectivePropertiesService:t,lastRow:r,lastCol:n}):(e=>e[0].map((t,n)=>e.map(e=>e[n])))(lz({layoutService:e,effectivePropertiesService:t,lastRow:n,lastCol:r})),e.isIndentModeEnabled&&i[i.length-1].length>1&&(i[i.length-1]=[i.at(-1),...new Array(i[0]?i[0].length-1:0).fill(null)]),i.length&&i.at(-1)?.forEach((t,n)=>{Array.isArray(t)?t.forEach((t,n)=>{az({layoutService:e,visibleLeftDimensionInfos:r,cell:t,colIdx:n})}):az({layoutService:e,visibleLeftDimensionInfos:r,cell:t,colIdx:n})}),i})(e,t,n,r);return{data:i,size:{x:i[0]?.length??0,y:i.length}}};var cz={fromSearchString:function(e){if(!e)return[];"?"===e[0]&&(e=e.substr(1));const t=[];return e.split("&").forEach(e=>{if(!e)return;const n=e.indexOf("=");let r,i="",o=!1;-1===n?r=e:(r=e.slice(0,n),i=e.slice(n+1),o=!0),t.push(function(e,t,n){return{key:pz(e),value:pz(t.replace(/%2B/g,"shouldNotDecodePlus")),useEqualSign:n}}(r,i,o))}),t}},dz=cz;function pz(e){try{return decodeURIComponent(e)}catch{return e}}function fz(e){if(!(this instanceof fz))throw new Error("Url needs to be called with the new keyword");if(!e)throw new Error("Url needs a string to operate on");const t=function(e){const t={authorityAndPath:"",search:"",hash:""};let n=e.indexOf("#");-1!==n&&(t.hash=e.substr(n),e=e.substr(0,n));n=e.indexOf("?"),-1!==n&&(t.search=e.substr(n),e=e.substr(0,n));return t.authorityAndPath=e,t}(e);Object.defineProperties(this,{authorityAndPath:{value:t.authorityAndPath},search:{value:t.search},hash:{value:t.hash},searchParams:{get:()=>dz.fromSearchString(t.search)}})}function hz(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")}fz.encodeAuthorityAndPath=function(e){return encodeURI(e).replace(/%5B/gi,"[").replace(/%5D/gi,"]").replace(/%25/gi,"%")},fz.encodeSearchParams=function(e){let t,n="";for(let r=0;r<e.length;r++)t=e[r],n+=0===r?"?":"&",n+=hz(t.key),t.value?n+=`=${hz(t.value)}`:n+=t.useEqualSign?"=":"";return n};var mz=fz;var gz,vz=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}},yz=class{decode(e){let t="";const n=new vz(e);let r;for(;n.hasNext();)r=this.decodeCharacter(n),t+=null!=r?r:n.next();return t}decodeCharacter(e){return e.next()}},bz=e=>e>=0&&e<=1114111,xz=e=>e.match(/[\s]/),Sz=class extends yz{decodeCharacter(e){e.mark();const t=e.next();let n,r,i;if(null==t||"\\"!==t)return e.reset(),null;const o=e.next();if(null==o)return e.reset(),null;switch(o){case"\r":e.peek("\n")&&e.next();case"\n":case"\f":case"\0":return this.decodeCharacter(e)}if("NaN"===parseInt(o,16))return o;for(n=o,r=0;r<5&&(i=e.next(),null!=i&&!xz(i));r++){if("NaN"===parseInt(i,16)){e.pushback(i);break}n+=i}const a=parseInt(n,16);return bz(a)?String.fromCharCode(a):"�"}},wz=class e{constructor(e,t){this._key=e,this._value=t}getKey(){return this._key}getValue(){return this._value}equals(t){return t instanceof e&&(this._key===t._key&&this._value===t._value)}static newInstanceIfNeeded(){let t,n,r=arguments[0];return"string"==typeof arguments[1]?(t=arguments[1],n=r.length):(n=arguments[1],t=arguments[2]),t&&r?(r.length>n&&(r=r.substr(0,n)),new e(r,t)):null}},Cz=class e{setValue(e){this._nextMap=null,this._value=e}getNextNode(e){return this._nextMap?this._nextMap[e]:null}put(t,n,r){let i,o;if(t.length===n)return o=this._value,this.setValue(r),o;const a=t.charAt(n);return this._nextMap?(i=this._nextMap[a],i||(i=new e,this._nextMap[a]=i)):(this._nextMap={},i=new e,this._nextMap[a]=i),i.put(t,n+1,r)}get(e,t){if(e.length<=t)return this._value;const n=this.getNextNode(e.charAt(t));return n?n.get(e,t+1):null}getLongestMatch(e,t){if(e.length<=t)return wz.newInstanceIfNeeded(e,this._value);const n=this.getNextNode(e.charAt(t));if(!n)return wz.newInstanceIfNeeded(e,t,this._value);const r=n.getLongestMatch(e,t+1);return r||wz.newInstanceIfNeeded(e,t,this._value)}},Ez=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 Cz);const n=this.root.put(e,0,t);return n||(e.length>this.maxKeyLen&&(this.maxKeyLen=e.length),this.size++,null)}},Iz=(()=>{const e=[],t=[],n=new Ez;let r,i,o;for(r in e["""]="34",e["&"]="38",e["<"]="60",e[">"]="62",e[" "]="160",e["¡"]="161",e["¢"]="162",e["£"]="163",e["¤"]="164",e["¥"]="165",e["¦"]="166",e["§"]="167",e["¨"]="168",e["©"]="169",e["ª"]="170",e["«"]="171",e["¬"]="172",e["­"]="173",e["®"]="174",e["¯"]="175",e["°"]="176",e["±"]="177",e["²"]="178",e["³"]="179",e["´"]="180",e["µ"]="181",e["¶"]="182",e["·"]="183",e["¸"]="184",e["¹"]="185",e["º"]="186",e["»"]="187",e["¼"]="188",e["½"]="189",e["¾"]="190",e["¿"]="191",e["À"]="192",e["Á"]="193",e["Â"]="194",e["Ã"]="195",e["Ä"]="196",e["Å"]="197",e["Æ"]="198",e["Ç"]="199",e["È"]="200",e["É"]="201",e["Ê"]="202",e["Ë"]="203",e["Ì"]="204",e["Í"]="205",e["Î"]="206",e["Ï"]="207",e["Ð"]="208",e["Ñ"]="209",e["Ò"]="210",e["Ó"]="211",e["Ô"]="212",e["Õ"]="213",e["Ö"]="214",e["×"]="215",e["Ø"]="216",e["Ù"]="217",e["Ú"]="218",e["Û"]="219",e["Ü"]="220",e["Ý"]="221",e["Þ"]="222",e["ß"]="223",e["à"]="224",e["á"]="225",e["â"]="226",e["ã"]="227",e["ä"]="228",e["å"]="229",e["æ"]="230",e["ç"]="231",e["è"]="232",e["é"]="233",e["ê"]="234",e["ë"]="235",e["ì"]="236",e["í"]="237",e["î"]="238",e["ï"]="239",e["ð"]="240",e["ñ"]="241",e["ò"]="242",e["ó"]="243",e["ô"]="244",e["õ"]="245",e["ö"]="246",e["÷"]="247",e["ø"]="248",e["ù"]="249",e["ú"]="250",e["û"]="251",e["ü"]="252",e["ý"]="253",e["þ"]="254",e["ÿ"]="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["¬in"]="8713",e["&ni"]="8715",e["&prod"]="8719",e["&sum"]="8721",e["&minus"]="8722",e["&lowast"]="8727",e["&radic"]="8730",e["&prop"]="8733",e["&infin"]="8734",e["&ang"]="8736",e["&and"]="8743",e["&or"]="8744",e["&cap"]="8745",e["&cup"]="8746",e["&int"]="8747",e["&there4"]="8756",e["&sim"]="8764",e["&cong"]="8773",e["&asymp"]="8776",e["&ne"]="8800",e["&equiv"]="8801",e["&le"]="8804",e["&ge"]="8805",e["&sub"]="8834",e["&sup"]="8835",e["&nsub"]="8836",e["&sube"]="8838",e["&supe"]="8839",e["&oplus"]="8853",e["&otimes"]="8855",e["&perp"]="8869",e["&sdot"]="8901",e["&lceil"]="8968",e["&rceil"]="8969",e["&lfloor"]="8970",e["&rfloor"]="8971",e["&lang"]="9001",e["&rang"]="9002",e["&loz"]="9674",e["&spades"]="9824",e["&clubs"]="9827",e["&hearts"]="9829",e["&diams"]="9830",e)"function"!=typeof e[r]&&e.hasOwnProperty(r)&&(t[e[r]]=r);for(i in t)"function"!=typeof t[i]&&t.hasOwnProperty(i)&&(o=t[i].toLowerCase().substr(1),n.put(o,String.fromCharCode(i)));return n})(),Dz=class extends yz{decodeCharacter(e){let t;e.mark();const n=e.next();if(null==n||"&"!==n)return e.reset(),null;const r=e.next();if(null==r)return e.reset(),null;if("#"===r){if(t=this._getNumericEntity(e),null!=t)return t}else if(r.match(/[A-Za-z]/)&&(e.pushback(r),t=this._getNamedEntity(e),null!=t))return t;return e.reset(),null}_getNamedEntity(e){let t,n,r,i="";for(t=Math.min(e.remainder().length,Iz.getMaxKeyLength()),r=0;r<t;r++)i+=e.next().toLowerCase();const o=Iz.getLongestMatch(i);if(null==o)return null;for(e.reset(),e.next(),t=o.getKey().length,n=0;n<t;n++)e.next();return e.peek(";")&&e.next(),o.getValue()}_getNumericEntity(e){const t=e.peek();return null==t?null:"x"===t||"X"===t?(e.next(),this._parseHex(e)):this._parseNumber(e)}_parseHex(e){let t,n="";for(;e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,16))){if(";"===t){e.next();break}break}n+=t,e.next()}const r=parseInt(n,16);return!Number.isNaN(+r)&&bz(r)?String.fromCharCode(r):null}_parseNumber(e){let t,n="";for(;e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,10))){if(";"===t){e.next();break}break}n+=t,e.next()}const r=parseInt(n,10);return!Number.isNaN(+r)&&bz(r)?String.fromCharCode(r):null}},Pz=class extends yz{decodeCharacter(e){e.mark();const t=e.next();let n,r,i,o;if(null==t)return e.reset(),null;if("%"!==t)return e.reset(),null;for(n="",r=0;r<2;r++)i=e.nextHex(),null!=i&&(n+=i);return 2===n.length&&(o=parseInt(n,16),bz(o))?String.fromCharCode(o):(e.reset(),null)}},Mz=/^data:(?<!\s)\s*(image\/[\w+-.]+)(?<!\s)\s*(;.*?){0,1}(?<!\s)\s*,(.*)/i,Rz=5e6,kz=5e5,Lz=(e,t)=>{const{maxByteSizeSvg:n=kz,maxByteSizeImage:r=Rz}=t??{},{mimeType:i,encoding:o,data:a}=(e=>{const[,t,n,r]=Mz.exec(e.trim())??[];return{encoding:n,data:r,mimeType:t?.toLocaleLowerCase()}})(e);if(!a)return!0;const s=((e,t,n)=>{const r={type:e};if(t?.includes(";base64"))try{return new Blob([atob(n)],r).size}catch{return new Blob([n],r).size}return"image/svg+xml"===e?new Blob([n],r).size:0})(i,o,a);return"image/svg+xml"===i?s<=n:s<=r};"undefined"!=typeof document&&(gz=document.createElement("div"));var Az=Array.prototype.indexOf,Oz=[",",".","_"," "],Tz=[",",".","-","_"," "],qz={width:["%"],height:["%"]},_z={default:["-"," ","%"],color:["#"," ","(",")"],image:["(",")",":","/","?","&","-",".",'"',"="," "]},Nz={background:["(",")",":","%","/","?","&","-"," ",".",'"',"=","#"],"background-image":_z.image,"background-color":_z.color,"border-color":_z.color,"border-image":_z.image,color:_z.color,icon:_z.image,"list-style-image":_z.image,"outline-color":_z.color},jz={attr_name:["^on[a-z]{1,}","style","href","src"],attr_val:["javascript:","data:"],css_key:["behavior","-moz-behavior","-ms-behavior"],css_val:["expression"]};function Fz(e,t,n){let r;if(t){if(Az)return Az.call(t,e,n);for(r=t.length,n=n?n<0?Math.max(0,r+n):n:0;n<r;n++)if(n in t&&t[n]===e)return n}return-1}function zz(e){if(null==e)return"";let t="";const n=document.createTextNode(e);return gz.appendChild(n),t=gz.innerHTML,gz.removeChild(n),t}function Wz(e,t,n){let r,i,o,a,s,l,u,c,d;for(e=Hz(e).toLowerCase(),t=Hz(t),o=0;o<jz.attr_name.length;o++)if(e.match(jz.attr_name[o]))throw new Error(`Unsafe attribute name used: ${e}`);for(o=0;o<jz.attr_val.length;o++)if(t.toLowerCase().match(jz.attr_val[o]))throw new Error(`Unsafe attribute value used: ${t}`);if(r=qz[e],r||(r=Tz),i="",!n){for(a=0;a<e.length;a++){if(s=e.charAt(a),!s.match(/[a-zA-Z\-0-9]/))throw new Error("Invalid attribute name specified");i+=s}i+='="'}for(l=0;l<t.length;l++)u=t.charAt(l),c=t.charCodeAt(l),!u.match(/[a-zA-Z0-9]/)&&Fz(u,r)<0?(d=c.toString(16),i+=`&#x${d};`):i+=u;return n||(i+='"'),i}function $z(e,t,n){let r,i,o,a,s,l,u,c,d,p;if(e=Hz(e).toLowerCase(),t=Hz(t),Fz(e,jz.css_key)>=0)throw new Error(`Unsafe property name used: ${e}`);for(r=0;r<jz.css_val.length;r++)if(t.toLowerCase().indexOf(jz.css_val[r])>=0)throw new Error(`Unsafe property value used: ${t}`);if(i=Nz[e],i||(i=_z.default),o="",!n){for(a=0;a<e.length;a++){if(s=e.charAt(a),!s.match(/[a-zA-Z-]/))throw new Error("Invalid Property Name specified");o+=s}o+=": "}for(l=0;l<t.length;l++)u=t.charAt(l),c=t.charCodeAt(l),!u.match(/[a-zA-Z0-9]/)&&Fz(u,i)<0?(d=c.toString(16),p="000000".substr(d.length),o+=`\\${p}${d}`):o+=u;return o}function Hz(e,t){let n,r,i,o,a=!1;if(null===e)return null;n=e,r=e,i=0;const s=[new Dz,new Pz,new Sz];for(;!a;){r=n;for(let e=0;e<s.length;e++)o=s[e].decode(n),o!==n&&(i++,n=o);r!==n||(a=!0)}if(t&&i>1)throw new Error("Attack Detected - Multiple/Double Encodings used in input");return n}var Vz=[];for(let e=0;e<255;e++)Vz[e]=e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122?null:e.toString(16);var Bz={html:e=>zz(e.unsafe),css(e){let t,n=[];const r=[],i={};let o="";for(t in e.map?n=e.map:n[e.name]=e.unsafe,n)"function"!=typeof n[t]&&n.hasOwnProperty(t)&&(r[t]=$z(t,n[t],!0),o+=$z(t,n[t],!0),i[t]=r[t]);return e.map?i:o},attr(e){let t=[];const n=[],r={};let i="";e.map?t=e.map:t[e.name]=e.unsafe;for(const e in t)"function"!=typeof t[e]&&t.hasOwnProperty(e)&&(n[e]=Wz(e,t[e],!0),i+=Wz(e,t[e],!0),r[e]=n[e]);return e.map?r:i}};function Gz(e,t){throw new Error(t)}var Uz={canonicalize:Hz,encode:function(){const e={context:"html",unsafe:null,name:null,map:null,setter:null,strict:!0};return 1===arguments.length&&"object"==typeof arguments[0]?function(){let e,t,n;const r=arguments[0]||{};let i=1;const o=arguments.length;for(;i<o;i++)if(null!=(e=arguments[i]))for(t in e)if(e.hasOwnProperty(t)){if(n=e[t],r===n)continue;void 0!==n&&(r[t]=n)}}(e,arguments[0]):(e.context=arguments[0],2===arguments.length?"html"===e.context?e.unsafe=arguments[1]:"attr"!==e.context&&"css"!==e.context||(e.map=arguments[1]):(e.name=arguments[2],e.unsafe=arguments[1])),"html"===e.context?Bz.html(e):"css"===e.context?(null!=e.map&&"object"!=typeof e.map&&Gz(this,"Invalid parameter type"),Bz.css(e)):"attr"===e.context?(null!=e.map&&"object"!=typeof e.map&&Gz(this,"Invalid parameter type"),Bz.attr(e)):void Gz(this,"Invalid parameter type")},encodeForAttr:Wz,encodeForAttr2:function(e){return Wz("nonsens",e,!0)},encodeForCSS:$z,encodeForHref:function(e){Hz(e),0!==e.search("[a-zA-Z0-9]+:")&&(e=`http://${e}`);const t=new mz(e),n=mz.encodeAuthorityAndPath(t.authorityAndPath),r=t.searchParams;e=n+mz.encodeSearchParams(r)+t.hash;const i=decodeURI(e).toLowerCase();if(-1!==i.indexOf("javascript:"))throw new Error("Attack Detected - Javascript in input");if(-1!==i.indexOf("data:"))throw new Error("Attack Detected - data in input");return e},encodeForJS:function(e,t){let n,r,i,o,a,s;for(t||(t=Oz),s="",n=0;n<e.length;n++)i=e.charAt(n),o=e.charCodeAt(n),Fz(i,t)>=0||null==Vz[o]?s+=i:(r=o.toString(16),o<256?(a="00".substr(r.length),s+=`\\x${a}${r.toUpperCase()}`):(a="0000".substr(r.length),s+=`\\u${a}${r.toUpperCase()}`));return s},encodeForHTML:zz,encodeForURL:function(e,t){let n="";return t&&(t.match(/^[A-Za-z\-0-9]{1,}$/)?n+=Hz(t).toLowerCase():Gz(this,"Illegal Attribute Name Specified"),n+='="'),n+=encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A"),n+=t?'"':"",n},isSafeDataURL:Lz,validateURI:function(e){if(""===e||function(e){if("canParse"in URL)return URL.canParse(e);try{return new URL(e),!0}catch{return!1}}(e))return!1;const t=e.replace(/%2E/gi,".");if(t.match(/[#&=: ]/))return!1;const n=function(e){let t=e,n="";for(;t.length>0;)if(t.startsWith("../")||t.startsWith("./"))t=t.replace(/^\.\.?\//,"");else if(t.startsWith("/./"))t=t.replace(/^\/\.\//,"/");else if("/."===t)t="/";else if(t.startsWith("/../")){t=t.replace(/^\/\.\.\//,"/");const e=n.lastIndexOf("/");-1!==e&&(n=n.slice(0,e))}else if("/.."===t){t="/";const e=n.lastIndexOf("/");-1!==e&&(n=n.slice(0,e))}else if("."===t||".."===t)t="";else{const e=t.match(/^\/?[^/]*/),r=e?e[0]:"";t=t.slice(r.length),n+=r}return n}(t);return""!==n&&"/"!==n&&n}};const Yz=(e,t)=>t.qAttrExps?.qValues?.[e],Kz=(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"}}},Xz=({text:e,url:t,imageSize:n,imagePosition:r,labelStructure:i,imageBox:o,direction:a})=>!r||t&&(t.toLowerCase().includes("javascript:")||!Uz.isSafeDataURL(t))?{type:iN.Text,url:void 0,text:e,labelStructure:i}:{type:iN.Image,url:t||"",text:e,imageSize:n,resolvedImagePosition:Kz(r,a),labelStructure:i,imageBox:o},Jz=(e,t,n,r)=>{if(!e.qMiniChart||!t?.miniChart||!n)return{type:iN.Text,text:r};const{minY:i,maxY:o}=((e,t,n)=>{const r="global"===t.yAxis?.scale,i="zeroCenter"===t.yAxis?.position,o=r?n.qYMin:e.qMiniChart.qMin,a=r?n.qYMax:e.qMiniChart.qMax;if(i){const e=Math.max(Math.abs(o),Math.abs(a));return{minY:-e,maxY:e}}return(e=>"zeroBaseline"===e.yAxis?.position||"bars"===e.type&&"auto"===e.yAxis?.position)(t)?{minY:Math.min(0,o),maxY:Math.max(0,a)}:{minY:o,maxY:a}})(e,t.miniChart,n),a={type:t.miniChart.type,qMatrix:e.qMiniChart.qMatrix,minY:i,maxY:o,showDots:!!t.miniChart.showDots,colors:t.miniChart.colors,colorMin:e.qMiniChart.qMin,colorMax:e.qMiniChart.qMax};return{type:iN.MiniChart,text:r,miniChart:a}},Zz=(e,t,n)=>{const r=Array.isArray(t.qAttrExps)?t.qAttrExps[0]:t.qAttrExps,i=r?.qValues?.[e];if(i){const e=Number.isNaN(+i.qNum)?void 0:`${i.qNum}`;return i.qText||e}return n?.urlPosition===oN.Attribute?void 0:n?.urlLabel},Qz=({labelStructure:e,text:t,url:n})=>{try{if(!n)throw Error("Invalid url");return{type:iN.Link,url:Uz.encodeForHref(n),text:t,labelStructure:e}}catch{return{type:iN.Text,url:void 0,text:t,labelStructure:e}}},eW=({cell:e,representationProperties:t,attrExprInfoIndex:n,env:r,conditionalColoring:i,miniChartOnMeasure:o,labelStructure:a,getText:s=e=>e.qText,direction:l,enabledFeatures:u})=>{const c=aN(t),d=s(e);return c===iN.Image&&u[iN.Image]&&!r.anything.sense?.isUnsupportedFeature?.("tableImages")?((e,t,n,r,i,o)=>{const{imageSize:a,imagePosition:s,imageSetting:l,imageLabel:u,imageBox:c}=t??{};if("url"===l){const t=Yz(n.imageUrl??-1,e)?.qText;return o&&(o.maskedValue=t??""),Xz({text:r,url:t,imageSize:a,imagePosition:s,labelStructure:o,imageBox:c,direction:i})}if("label"===l){const t=o?o.originalValue:r;if(-1===n.imageLabel)return Xz({text:u||t||"",url:t,imageSize:a,imagePosition:s,labelStructure:o,imageBox:c,direction:i});const l=Yz(n.imageLabel??-1,e)?.qText??r;return Xz({text:l,url:t,imageSize:a,imagePosition:s,labelStructure:o,imageBox:c,direction:i})}return{type:iN.Text,url:void 0,labelStructure:o,text:r}})(e,t,n,d,l,a):c===iN.Link?((e,t,n,r,i)=>{const{urlPosition:o}=t??{};if(o===oN.Attribute){const o=Zz(n.url??-1,e,t);return Qz({labelStructure:r,text:i||o||"",url:o})}if(o===oN.Dimension){const o=Zz(n.urlLabel??-1,e,t)||i;return r&&(r.maskedValue=o),Qz({text:o,labelStructure:r,url:r?.originalValue??i})}return{type:iN.Text,url:void 0,text:i,labelStructure:r}})(e,t,n,a,d):c===iN.Indicator&&u[iN.Indicator]&&!r.anything.sense?.isUnsupportedFeature?.("tableIndicators")?((e,t,n)=>{const{indicator:r}=e??{};return{type:iN.Indicator,url:void 0,text:n,indicator:{applySegmentColors:r?.applySegmentColors,position:r?.position,showTextValues:r?.showTextValues},indicatorConditionalColoring:t}})(t,i,d):c===iN.MiniChart&&u[iN.MiniChart]&&!r.anything.sense?.isUnsupportedFeature?.("qMiniChartDef")?Jz(e,t,o,d):{type:iN.Text,url:void 0,text:d,labelStructure:a}},tW=(e,t)=>{const n=t.qAttrExps,r=n?.qValues?.[e?.cellForegroundColor??-1]?.qText,i=n?.qValues?.[e?.cellBackgroundColor??-1]?.qText,o=i?_q(i):null,a=r?_q(r):null,s=((e,t)=>e||!t?null:Oq(t))(a,o);return{color:s??a,background:o}},nW=(e,t)=>t.qSubNodes.reduce((e,t)=>0===t.qSubNodes.length?e+1:nW(e,t),e),rW=(e,t,n,r,i,o)=>{const a=i?o.rowsPerPage-n:qN-r;let s=e.qUp+e.qDown;if(i&&0===n){const n=(t+e.qUp)%o.rowsPerPage;s=e.qDown+n}return Math.min(a,nW(s,e))},iW=({node:e,parent:t,root:n,x:r,y:i,pageY:o,layoutService:a,dimensionInfo:s,attrExprInfoIndex:l,isLeftColumn:u=!0,isIndentModeEnabled:c=!1,indentLevel:d,labelStructure:p,env:f,pageInfo:h,direction:m="ltr"})=>{const g=(!c||!u)&&"P"===e.qType,v=((e,t)=>{if(e!==rz){if(t){const t=aN(e.representation);return t===iN.Link||t===iN.Image?e.representation:{type:iN.Text}}return e.representation}})(s,c),y=(({node:e,isLeftColumn:t,isIndentModeEnabled:n,labelStructure:r,representationType:i,parentOrRootOriginalValue:o})=>{let a=e.qText;if(t&&n&&r){const{originalValue:t,delimeter:n,suffix:s}=r;a=i===iN.Link?"P"===e.qType?o:t:`${t} ${!s||!t&&s?"":n} ${s}`.trim()}return a})({node:e,isLeftColumn:u,isIndentModeEnabled:c,labelStructure:p,representationType:aN(v),parentOrRootOriginalValue:(t||n)?.representation?.labelStructure?.originalValue??""}),b=eW({cell:{...e,qText:y},representationProperties:v,attrExprInfoIndex:l,env:f,labelStructure:p,direction:m,enabledFeatures:{[iN.Image]:!0,[iN.Indicator]:!0}}),x={id:w_(),ref:e,x:r,y:i,pageX:r,pageY:o,mainAxisPageCoord:u?o:r,isLeftColumn:u,parent:t,root:n,children:[],isLeafNode:0===e.qSubNodes.length,leafCount:rW(e,i,o,r,u,h),distanceToNextCell:0,isLockedByDimension:!("object"!=typeof s||!s.qLocked),isTotal:"T"===e.qType||!!t?.isTotal,isEmpty:"E"===e.qType||-4===e.qElemNo,isNull:"U"===e.qType,isPseudoDimension:g,expressionColor:tW(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},oW=(e,t,n,r,i,o,a,s,l)=>{const{isIndentModeEnabled:u}=i;if(!t.length)return e;let c=0;return function t(d,p,f,h=0,m=-1){e[h]||(e[h]={}),u&&m++;const g=i.leftDimensionInfoIndexes.indexOf(rz);f.forEach((f,v)=>{const y={originalValue:f.qText??"",maskedValue:"",delimeter:"-",suffix:""};c+=0===v?0:1;const b=n.qTop-r.page*r.rowsPerPage,x=Math.max(0,b+c-f.qUp),S=n.qTop+c-f.qUp;if(u){if(i.hasPseudoDimOnLeft&&m<=g)if(y.originalValue=f.qText??"",y.maskedValue=f.qText??"","N"===f.qType||"U"===f.qType||"T"===f.qType)"U"===f.qType&&(y.originalValue=i.getNullValueText()),m<g&&(y.suffix=i.visibleMeasureInfo[0].qFallbackTitle??"");else if("P"===f.qType){y.originalValue=(p||d)?.representation.labelStructure?.originalValue??"",y.maskedValue=(p||d)?.representation.labelStructure?.originalValue??"",y.suffix=f.qText??"";const e=f.qSubNodes;f={...(p||d)?.ref,...f.qText?{qText:f.qText}:{},qSubNodes:e},m=(p||d)?.indentLevel??0}"U"===f.qType&&(y.originalValue=i.getNullValueText())}let w=h;u&&(w=g>=1&&m>=g?m+1:m,0===m&&0===g&&0===f.qSubNodes.length&&(w=0));const C=e.at(h)?.[x],E=u&&void 0===C?.ref.qText||!C?iW({node:f,parent:p,root:d,x:w,y:S,pageY:x,layoutService:i,dimensionInfo:o[w],attrExprInfoIndex:a[w],isLeftColumn:!0,...u&&{isIndentModeEnabled:u,indentLevel:m},env:s,pageInfo:r,labelStructure:y,direction:l}):e[h][x];if(e[h][x]=E,f.qSubNodes.length){const e=u?0:h+1;t(d||E,E,f.qSubNodes,e,m)}})}(null,null,t,0,-1),e},aW=(e,t)=>{e.slice(0,-1).forEach(e=>{Object.values(e).forEach((e,n,r)=>{const i=r.at(n+1);e.distanceToNextCell=i?i.mainAxisPageCoord-(e.mainAxisPageCoord+e.leafCount):t-(e.mainAxisPageCoord+e.leafCount)})})},sW=(e,t)=>{const n=e[0],r=n?Object.values(n):[],i=t?.isIndentModeEnabled&&t.hasPseudoDimOnLeft?t.visibleMeasureInfo.length-1:0,o=n?.[i],a=r.at(-1);return o?.isTotal?o.isLeafNode?o.mainAxisPageCoord:o.mainAxisPageCoord+o.leafCount-1:a?.isTotal?a.mainAxisPageCoord-1:-1},lW=({prevData:e,nextDataPage:t,pageInfo:n,layoutService:r,visibleLeftDimensionInfo:i,attrExprInfoIndexes:o,env:a,direction:s})=>{const{qLeft:l,qArea:u}=t;if(!l.length)return e;const c=oW(e.grid,l,u,n,r,i,o,a,s);aW(c,n.rowsOnCurrentPage);const d=sW(c,r);return{...e,grid:c,columnCount:c.length,totalDividerIndex:d}},uW=({qArea:e,prevData:t,pivotValuePoints:n,pageInfo:r})=>{const i=[...t];return n.forEach((t,n)=>{t.forEach((t,o)=>{const a=e.qTop-r.page*r.rowsPerPage+n,s=e.qLeft+o;Array.isArray(i[a])||(i[a]=[]);const l="U"===t.qType;i[a][s]=i[a][s]??{id:w_(),ref:t,isNull:l}})}),i},cW=({prevData:e,dataPage:t,pageInfo:n})=>{const{qData:r,qArea:i}=t;return r?.length?uW({qArea:i,prevData:e,pivotValuePoints:r,pageInfo:n}):e},dW=(e,t,n,r,i,o,a,s,l,u)=>{const{isIndentModeEnabled:c}=r;if(!t.length)return e;let d=0;!function t(a,p,f,h=0){e[h]||(e[h]={}),f.forEach((f,m)=>{d+=0===m?0:1;const g=n.qLeft+d-f.qUp,v=e[h][g]??iW({node:f,parent:p,root:a,x:g,y:h,pageY:h,layoutService:r,dimensionInfo:i[h],attrExprInfoIndex:o[h],isLeftColumn:!1,...c&&{isIndentModeEnabled:c},env:s,pageInfo:l,direction:u});e[h][g]=v,f.qSubNodes.length&&t(a||v,v,f.qSubNodes,h+1)})}(null,null,t);for(let t=0;t<a-e.length;t++)e.push({});return e},pW=({prevData:e,nextDataPage:t,layoutService:n,visibleTopDimensionInfo:r,attrExprInfoIndexes:i,headerRows:o,env:a,pageInfo:s,direction:l})=>{const{qTop:u,qArea:c}=t;if(!u.length)return e;const d=dW(e.grid,u,c,n,r,i,o,a,s,l);aW(d,n.size.x);const p=sW(d);return{...e,grid:d,rowCount:d.length,totalDividerIndex:p}},fW=e=>-1===e?{}:e.qAttrExprInfo.reduce((e,{id:t},n)=>(e[t]=n,e),{}),hW=(e,t)=>{const{env:n}=XF(),{direction:r}=UF(),{layoutService:i,effectivePropertiesService:o}=QF(),{qPivotDataPages:a,pageInfo:s}=UF(),[l,u]=g(null),c=((e,t,n)=>y(()=>({left:e.map(fW),top:t.map(fW),measures:n.map(fW)}),[n,e,t]))(e,t,i.visibleMeasureInfo),d=y(()=>uz(i,o,t,e),[i,o,t,e]),p=m(()=>a.slice(1).reduce((e,t)=>cW({prevData:e,dataPage:t,pageInfo:s}),((e,t)=>{const{qData:n,qArea:r}=e;return uW({qArea:r,prevData:[],pivotValuePoints:n,pageInfo:t})})(a[0],s)),[a,s]),f=m(()=>a.slice(1).reduce((e,o)=>pW({prevData:e,nextDataPage:o,layoutService:i,visibleTopDimensionInfo:t,attrExprInfoIndexes:c.top,headerRows:d.size.y,env:n,pageInfo:s,direction:r}),((e,t,n,r,i,o,a,s)=>{const{qArea:l,qTop:u}=e,c=dW([],u,l,t,n,r,i,o,a,s);aW(c,t.size.x);const d=sW(c);return{grid:c,rowCount:c.length,layoutSize:t.size,totalDividerIndex:d}})(a[0],i,t,c.top,d.size.y,n,s,r)),[a,i,t,c.top,d.size.y,n,s,r]),h=m(()=>a.slice(1).reduce((t,o)=>lW({prevData:t,nextDataPage:o,pageInfo:s,layoutService:i,visibleLeftDimensionInfo:e,attrExprInfoIndexes:c.left,env:n,direction:r}),((e,t,n,r,i,o,a)=>{const{qArea:s,qLeft:l}=e,u=oW([],l,s,n,t,r,i,o,a);aW(u,n.rowsOnCurrentPage);const c=sW(u,t);return{grid:u,columnCount:u.length,layoutSize:t.size,totalDividerIndex:c}})(a[0],i,s,e,c.left,n,r)),[a,i,s,e,c,n,r]),[v,b]=g(()=>p()),[x,S]=g(()=>f()),[w,C]=g(()=>h());xj(()=>{b(p())},[p]),xj(()=>{S(f())},[f]),xj(()=>{C(h())},[h]),xj(()=>{l&&l.forEach(o=>{b(e=>cW({prevData:e,dataPage:o,pageInfo:s})),S(e=>pW({prevData:e,nextDataPage:o,layoutService:i,visibleTopDimensionInfo:t,attrExprInfoIndexes:c.top,headerRows:d.size.y,env:n,pageInfo:s,direction:r})),C(t=>lW({prevData:t,nextDataPage:o,pageInfo:s,layoutService:i,visibleLeftDimensionInfo:e,attrExprInfoIndexes:c.left,env:n,direction:r}))})},[l]);const E=m(e=>{u(e)},[]);return{headersData:d,measureData:v,topDimensionData:x,leftDimensionData:w,attrExprInfoIndexes:c,nextPageHandler:E}},mW=Math.sqrt(1e4),gW=e=>({maxNumberOfVisibleRows:Math.ceil(e.height/24),maxNumberOfVisibleColumns:Math.ceil(e.width/eO.PixelsMin)}),vW=e=>{if(null===e)return[];if(e.qWidth*e.qHeight<1e4)return[e];const t=[],n=Math.ceil(e.qWidth/mW),r=Math.ceil(e.qHeight/mW);for(let i=0;i<n;i++)for(let n=0;n<r;n++)t.push({qLeft:e.qLeft+i*mW,qTop:e.qTop+n*mW,qWidth:Math.min(mW,e.qWidth-i*mW),qHeight:Math.min(mW,e.qHeight-n*mW)});return t};function yW({nextPageHandler:e}){const{model:t}=XF(),{pageInfo:n}=UF(),{layoutService:r}=QF(),i=(e=>{const t=u(e);return t.current=e,t})(n.page),o=t,a=m(async(e,t)=>{await(o?.collapseLeft(nz,e,t,!1))},[o]),s=m(async(e,t)=>{await(o?.collapseTop(nz,e,t,!1))},[o]),l=m(async(e,t)=>{await(o?.expandLeft(nz,e,t,!1))},[o]),c=m(async(e,t)=>{await(o?.expandTop(nz,e,t,!1))},[o]),d=m(async t=>{if(o?.getHyperCubePivotData&&0!==t.length)try{const r=await o.getHyperCubePivotData(nz,t.reduce((e,t)=>[...e,...vW(t)],[]));i.current===n.page&&e(r)}catch(e){console.error(e)}},[o,e,n,i]),p=m((e,{dimensionInfoIndex:n,isLeftColumn:i,x:o=0,columnWidthLocation:a})=>{const{qMeasureInfo:s,qDimensionInfo:l,topHeadersColumnWidth:u}=r.layout.qHyperCube;let c=[];switch(a){case dN.Dimension:c=[{qPath:`${nz}/qDimensions/${n}/qDef/columnWidth`,oldValue:l[n].columnWidth}];break;case dN.Measures:if(i)c=s.map((e,t)=>({qPath:`${nz}/qMeasures/${t}/qDef/columnWidth`,oldValue:e.columnWidth}));else{const e=r.getMeasureInfoIndexFromCellIndex(o);c=[{qPath:`${nz}/qMeasures/${e}/qDef/columnWidth`,oldValue:s[e].columnWidth}]}break;case dN.Pivot:c=[{qPath:`${nz}/topHeadersColumnWidth`,oldValue:u}]}const d=c.map(t=>{const{qPath:n,oldValue:r}=t;return{qPath:n,qOp:r?"Replace":"Add",qValue:JSON.stringify({...r,...e})}});t?.applyPatches(d,!0)},[t,r]),f=m(async e=>{await(o?.applyPatches([{qPath:`${nz}/indentModeColumnWidth`,qOp:r.layout.qHyperCube.indentModeColumnWidth?"Replace":"Add",qValue:JSON.stringify({...r.indentModeColumnWidth,...e})}],!0))},[o,r]);return y(()=>({collapseLeft:a,collapseTop:s,expandLeft:l,expandTop:c,applyColumnWidth:p,applyIndentModeColumnWidth:f,fetchPages:d}),[a,s,l,c,p,f,d])}const bW=(e,t,n)=>(r,i)=>{if("P"===r)return rz;const o=t[n+i];return e[o]},xW=e=>{const t=[],n=(e,r=0)=>{e.slice(0,1).forEach(e=>{t[r]=e.qType,e.qSubNodes.length&&n(e.qSubNodes,r+1)})};return n(e),t},SW=d({}),wW=()=>i(SW),CW=({children:e})=>{const{visibleLeftDimensionInfo:t,visibleTopDimensionInfo:n}=(()=>{const{layoutService:{layout:{qHyperCube:{qNoOfLeftDims:e,qEffectiveInterColumnSortOrder:t,qDimensionInfo:n}}}}=QF(),{qPivotDataPages:r}=UF();return y(()=>{const i=xW(r[0]?.qLeft??[]),o=xW(r[0]?.qTop??[]);return{visibleLeftDimensionInfo:i.map(bW(n,t,0)),visibleTopDimensionInfo:o.map(bW(n,t,e))}},[n,t,e,r])})(),{headersData:r,measureData:i,topDimensionData:o,leftDimensionData:a,attrExprInfoIndexes:s,nextPageHandler:l}=hW(t,n),u=yW({nextPageHandler:l}),c=y(()=>({gridSectionsData:{headersData:r,topDimensionData:o,leftDimensionData:a,measureData:i},visibleDimensionsInfo:{visibleLeftDimensionInfo:t,visibleTopDimensionInfo:n},attrExprInfoIndexes:s,dataModel:u}),[t,n,r,i,o,a,s,u]);return Yn.jsx(SW.Provider,{value:c,children:e})},EW=20,IW=18,DW=.75,PW=e=>-1!==e&&e?.representation?.type===iN.Image,MW=({isLeftColumn:e,layoutService:t,representation:n})=>Boolean(e)&&t.isIndentModeEnabled&&n.type===iN.Image,RW=e=>void 0===e?TN:e,kW=(e,t)=>{if(void 0!==e&&!Number.isNaN(+e)){const n=+e;return n>=0?n:t}return t},LW=e=>kW(e,eO.PixelsDefault),AW=(e,t)=>kW(e,eO.PercentageDefault)*t/100,OW=(e,t,n)=>{switch(t?.type){case tO.Pixels:return LW(t.pixels);case tO.Percentage:return AW(t.percentage,e);case tO.FitToContent:case tO.Auto:default:return n}},TW=({headers:e,layoutService:t,effectivePropertiesService:n,estimateWidthForDimensionValue:r,shouldConsiderCombinatedLength:i,measureTextForHeader:o,longestMeasureValuePossible:a})=>e.reduce((e,s,l)=>{const{layout:{qHyperCube:{qNoOfLeftDims:u,qDimensionInfo:c}}}=t,{id:d,colIdx:p,qApprMaxGlyphCount:f,isLeftDimension:h}=s,m=c.find(e=>e.cId===d),g={width:24,...m?.representation?.imageBox};if(!h)return e+0;if(d===iz)return e+0;const v=MW({isLeftColumn:h,layoutService:t,representation:m?.representation||{type:iN.Text}})?g.width+8+4:r(f),y=!n.qAlwaysFullyExpanded&&p<u-1?21:0;let b=0;if(i&&o&&a){b=o("- ")+a}return Math.max(e,24*l+IW+y+v+b)},0),qW=(e,t,n)=>e.reduce((e,r)=>{const i=(n?0:1)*IW;return Math.max(e,i+t(r.qFallbackTitle??""))},0),_W=(e,t,n,r)=>{const i=100*e/t,o=r*DW*(i/100),a=i/100*+n;return Math.min(a,o)},NW=(e,t,n,r)=>r*(+n/100)*(100*e/t/100),jW=(e,t)=>e.some(e=>e>=t*DW),FW=({layoutService:e,effectivePropertiesService:t,headersData:n,columnWidths:r,tableWidth:i,widthOverride:o,measureTextForHeader:a,estimateWidthForDimensionValue:s,measureTextWidthForMeasuresCombinedWithDimensions:l,translator:u})=>{let c;const d=i*DW,p=n.data[n.data.length-1][0];if(!Array.isArray(p))return{leftGridWidth:0,leftGridColumnWidths:[],leftGridFullWidth:0};const f=Math.min(d,r.at(-1)),h=Math.min(d,TW({headers:p,layoutService:e,effectivePropertiesService:t,estimateWidthForDimensionValue:s})),m=Math.min(d,qW(e.visibleMeasureInfo,a));let g;const v=p.findIndex(e=>e.id===iz),y=(({layoutService:e,measureTextForHeader:t,translator:n,headersData:r})=>{const{type:i}=e.indentModeColumnWidth;return i===tO.Auto&&r.size.y<=1?t(n.get("SNPivotTable.IndentMode.Rows"))+8+IW+16:24})({layoutService:e,measureTextForHeader:a,translator:u,headersData:n});if(e.hasPseudoDimOnLeft)if(0===v){const e=Math.max(f,h,m);c=[Math.max(y,e-f),f]}else{const n=Math.min(d,qW(e.visibleMeasureInfo,l,!0));g=Math.min(d,TW({headers:p.slice(0,v),layoutService:e,effectivePropertiesService:t,estimateWidthForDimensionValue:s,shouldConsiderCombinatedLength:!0,measureTextForHeader:a,longestMeasureValuePossible:n}));const r=Math.max(f,h,g);c=[Math.max(y,r-f),f]}else c=[Math.max(y,h-f),f];const b=Math.min(d,c.reduce((e,t)=>e+t,0)),{indentModeColumnWidth:x}=e;o&&o<=d&&(x.type=tO.Pixels,x.pixels=o);return[tO.Pixels,tO.Percentage].includes(x.type)||jW(c,i)?((e,t,n,r)=>{let i=e[0],o=e[1];const a=e.reduce((e,t)=>e+t,0),{type:s,pixels:l,percentage:u}=t,c=kW(l,eO.PixelsDefault),d=kW(u,eO.PercentageDefault),p=jW(e,n);let f;s===tO.Auto&&p&&(i>o?i-=o:o-=i),s===tO.Pixels&&c&&(i=_W(e[0],a,c,n),o=_W(e[1],a,c,n)),s===tO.Percentage&&d&&(i=NW(e[0],a,d,n),o=NW(e[1],a,d,n)),o<=r&&(f=i-5,f>0&&(i-=f,o+=f)),f=o-r,f>0&&(i+=f,o-=f);const h=[i,o],m=h.reduce((e,t)=>e+t,0);return{leftGridColumnWidths:h,leftGridWidth:m,leftGridFullWidth:m}})(c,x,i,f):{leftGridWidth:b,leftGridColumnWidths:c,leftGridFullWidth:b}};function zW({tableWidth:e}){const t=e*DW,{styleService:n,layoutService:r,effectivePropertiesService:i}=QF(),{translator:o}=XF(),{gridSectionsData:{headersData:a}}=wW(),{measureText:s}=mj(n.header,{allowLineBreaks:!1}),{estimateWidth:l,measureText:u}=mj({...n.dimensionValues,fontWeight:RW(n.dimensionValues.fontWeight)}),{measureText:c}=mj({...n.dimensionValues,...n.measureLabels}),d=m((n,d)=>{const{layout:{qHyperCube:{qNoOfLeftDims:p,topHeadersColumnWidth:f}},visibleMeasureInfo:h,isIndentModeEnabled:m,hasPseudoDimOnLeft:g}=r,v=(t=0)=>h.reduce((n,{qFallbackTitle:r,columnWidth:i})=>{const o=c(r)+IW,a=Math.max(o,t);return Math.max(n,m?a:OW(e,i,a))},0),y=e=>a.data.reduce((t,n)=>{const r=n.at(e);if(!r||Array.isArray(r))return t;if(r.id===iz)return t;const i=(e=>{const{label:t,isLocked:n}=e,r=n?EW:0;return IW+s(t)+EW+r})(r);return Math.max(i,t)},0);let b=0,x=a.data.at(-1);m&&a.size.x>1&&x&&x[0]&&(x=x[0]);const S=x.map((o,s)=>{let u;if(m&&1!==a.size.x||!n||void 0===d||d!==o.colIdx){let t,n;if(o.columnWidthLocation===dN.Pivot?t=m?void 0:f:o.columnWidthLocation===dN.Dimension&&({columnWidth:t}=o),o.isLeftDimension)if(o.id===iz)n=v();else{const e=y(s),t=((e,t)=>{const{qApprMaxGlyphCount:n,isLeftDimension:o,dimensionInfoIndex:a}=e,s=r.getDimensionInfo(a);if(PW(s))return eO.PixelsDefault;const u=!i.qAlwaysFullyExpanded&&o&&t<p-1?21:0;return IW+l(n)+u})(o,s);n=Math.max(e,t),m&&!g&&s+1===p&&o.columnWidthLocation===dN.Dimension&&a.size.x>1&&(n=e)}else n=y(s),o.columnWidthLocation===dN.Measures&&(n=v(n));m&&1===a.size.x&&(t=r.indentModeColumnWidth),u=m&&!g&&a.size.x>1?n:OW(e,t,n)}else u=m?Math.min(t,n):n;return b+=u,u});return m&&a.size.x>1?FW({layoutService:r,effectivePropertiesService:i,headersData:a,columnWidths:S,tableWidth:e,widthOverride:n,measureTextForHeader:s,estimateWidthForDimensionValue:l,measureTextWidthForMeasuresCombinedWithDimensions:u,translator:o}):{leftGridWidth:Math.min(t,b),leftGridColumnWidths:S,leftGridFullWidth:b}},[e,a,r,t,s,c,l,u,o,i]),[p,f]=g(d);xj(()=>{f(d())},[d]);const h=m((e,t)=>{f(d(e,t))},[d]);return{...p,overrideLeftGridWidth:h}}function WW({tableWidth:e,verticalScrollbarWidth:t,leftGridWidth:n}){const{styleService:r,layoutService:i}=QF(),{visibleDimensionsInfo:{visibleTopDimensionInfo:o}}=wW(),{layout:{qHyperCube:{qNoOfLeftDims:a,qEffectiveInterColumnSortOrder:s}},size:l,visibleMeasureInfo:u}=i,{estimateWidth:c,measureText:d}=mj(r.measureValues,{allowLineBreaks:!1}),{estimateWidth:p}=mj({...r.dimensionValues,fontWeight:RW(r.dimensionValues.fontWeight)},{allowLineBreaks:!1}),f=e-n-1,h=o.at(-1),g=h===rz,v=s.length-a>o.length?21:0,b=y(()=>{const e=g?u:[h],t=l.x/e.length,n=[],r=[];let i=f;const o=(e,r)=>{n[e]=Math.min(eO.PixelsMax,Math.max(eO.PixelsMin,r)),i-=n[e]*t};if(e.forEach((e,t)=>{if(e?.columnWidth){const{columnWidth:{type:n,pixels:i,percentage:a},qApprMaxGlyphCount:s,qFallbackTitle:l}=e;switch(n){case tO.Pixels:o(t,LW(i));break;case tO.Percentage:o(t,AW(a,f));break;case tO.FitToContent:o(t,((e,t,n)=>n?eO.PixelsDefault:IW+(g?Math.max(c(e),d(t)):Math.max(Math.max(...u.map(e=>c(e.qApprMaxGlyphCount))),p(e)+v)))(s,l??"",PW(e)));break;case tO.Auto:default:r.push(t)}}else r.push(t)}),r.length){const e=r.length*t,o=i/e;r.forEach(e=>{n[e]=Math.max(eO.AutoMinPivot,o)})}return n},[g,u,h,l.x,f,c,d,p,v]),x=y(()=>{if(g){return u.reduce((e,t,n)=>e+b[n],0)/u.length}return b[0]},[g,b,u]),S=parseFloat((t/i.size.x).toFixed(12)),w=m(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,f),getRightGridColumnWidth:w}}const $W=`scrollable-container--${fN.TopGrid}`,HW=`scrollable-container--${fN.LeftGrid}`,VW=`scrollable-container--${fN.DataGrid}`,BW=e=>{if(!(e&&e instanceof HTMLDivElement))return{width:0,height:0};const t=e.offsetWidth-e.clientWidth,n=e.offsetHeight-e.clientHeight;return{width:t>=2?t:0,height:n>=2?n:0}},GW=(e,t)=>e>t?hN.Forward:e<t?hN.Backward:hN.None,UW=({gridRefs:{topGridRef:e,leftGridRef:t,dataGridRef:n},getWrapperElements:r,updateViewService:i,trackScrollDirection:o,interactions:a})=>{const{direction:s}=UF();f(()=>{const{headerGridWrapperElement:l,topGridWrapperElement:u,leftGridWrapperElement:c,dataGridWrapperElement:d}=r(),p=e=>{const t=e.target;l.scrollLeft=t.scrollLeft,o(e),i?.(e)},f=e=>{const t=e.target;l.scrollTop=t.scrollTop,o(e),i?.(e)},h=r=>{const a=r.target,l=((e,t)=>{const{scrollWidth:n,clientWidth:r,scrollLeft:i}=e,o=n-r;if("rtl"===t){if(i>o)return o;if(i<0)return Math.abs(i)}return i})(a,s);n.current?.scrollTo({scrollLeft:l,scrollTop:a.scrollTop}),u.scrollLeft=l,e.current?.forEach(e=>{e?.scrollTo(l)}),c.scrollTop=d.scrollTop,t.current?.forEach(e=>{e?.scrollTo(a.scrollTop)}),o(r),i?.(r)};return c.addEventListener("scroll",p),u.addEventListener("scroll",f),d.addEventListener("scroll",h),a.scroll||setTimeout(()=>{c.removeEventListener("scroll",p),u.removeEventListener("scroll",f),d.removeEventListener("scroll",h)},0),()=>{c.removeEventListener("scroll",p),u.removeEventListener("scroll",f),d.removeEventListener("scroll",h)}},[o,i,a,e,t,n,r,s])},YW=Hb(!1),KW=(e,t)=>Math.abs(e.width-t.width)>2||Math.abs(e.height-t.height)>2,XW=({topGridWrapperRef:e,leftGridWrapperRef:t,dataGridWrapperRef:n})=>{const{top:r,left:i,data:o,resetHorizontalScrollbarHeight:a}=((e,t,n)=>{const[r,i]=g({width:0,height:0}),[o,a]=g({width:0,height:0}),[s,l]=g({width:0,height:0}),[c,d]=g(!1),p=tx(YW),h=u(p),v=u(p);h.current=p;const y=m(()=>{d(e=>!e&&e);const r=BW(e.current),o=BW(t.current),s=BW(n.current);i(e=>KW(e,r)?r:e),a(e=>KW(e,o)?o:e),l(e=>KW(e,s)?s:e)},[e,t,n]);f(()=>{const r=new ResizeObserver(()=>{h.current||y()}),i=[e.current,t.current,n.current].filter(e=>Boolean(e));return i.forEach(e=>{r.observe(e)}),()=>{r.disconnect()}},[y,e,t,n]),f(()=>{const e=v.current;if(v.current=p,e&&!p){const e=setTimeout(y,0);return()=>{clearTimeout(e)}}},[p,y]);const b=m(()=>{d(!0)},[]);return{top:r,left:c?{...o,height:0}:o,data:c?{...s,height:0}:s,resetHorizontalScrollbarHeight:b}})(e,t,n);return{scrollbarsDimensions:{verticalScrollbarWidth:Math.max(r.width,o.width),horizontalScrollbarHeight:Math.max(i.height,o.height)},resetHorizontalScrollbarHeight:a}},JW=()=>{const{interactions:e}=XF(),t=u(null),n=u(null),r=u(null),i=u(null),o=u([]),a=u([]),s=u(null),{scrollbarsDimensions:{verticalScrollbarWidth:l,horizontalScrollbarHeight:c},resetHorizontalScrollbarHeight:d}=XW({topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:i});(({gridSectionsWrapperRefs:{headerGridWrapperRef:e,topGridWrapperRef:t,leftGridWrapperRef:n,dataGridWrapperRef:r},gridRefs:{topGridRef:i,leftGridRef:o,dataGridRef:a}})=>{const{pageInfo:s}=UF(),{downloadService:l,viewService:u,layoutService:c}=QF(),d=m(()=>{const i={left:0,top:0};e.current?.scrollTo(i),t.current?.scrollTo(i),n.current?.scrollTo(i),r.current?.scrollTo(i)},[e,t,n,r]);v(()=>{d()},[s.page,d]),v(()=>{c.triggerdByExpandOrCollapse||d()},[c,d]),v(()=>{if(c.triggerdByExpandOrCollapse){const e=r.current?.scrollLeft??0,t=r.current?.scrollTop??0;o.current?.forEach(e=>{e?.scrollTo(t)}),i.current?.forEach(t=>{t?.scrollTo(e)}),a.current?.scrollTo({scrollTop:t,scrollLeft:e})}},[c,r,a,o,i]),v(()=>{(l.isDownloadedAsPDForImage||c.isSnapshot)&&r.current&&n.current&&t.current&&(r.current.scrollTop=u.scrollTop,r.current.scrollLeft=u.scrollLeft,n.current.scrollLeft=u.leftGridScrollLeft,t.current.scrollTop=u.topGridScrollTop)},[u,l,c,r,n,t])})({gridSectionsWrapperRefs:{headerGridWrapperRef:t,topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:i},gridRefs:{topGridRef:o,leftGridRef:a,dataGridRef:s}});const{trackScrollDirection:p,scrollDirectionRefs:{verticalScrollDirection:h,horizontalScrollDirection:g}}=(()=>{const e=u(hN.None),t=u(hN.None),n=u({prevScrollTop:0,prevScrollLeft:0}),r=m(r=>{if(r instanceof WheelEvent&&(e.current=GW(r.deltaY,0),t.current=GW(r.deltaX,0)),r instanceof Event&&!(r instanceof WheelEvent)){const i=r.target;e.current=GW(i.scrollTop,n.current.prevScrollTop),n.current.prevScrollTop=i.scrollTop,t.current=GW(i.scrollLeft,n.current.prevScrollLeft),n.current.prevScrollLeft=i.scrollLeft}},[e,t,n]);return{trackScrollDirection:r,scrollDirectionRefs:{verticalScrollDirection:e,horizontalScrollDirection:t}}})(),y=(()=>{const{viewService:e}=QF();return m(t=>{const n=t.target,r=t.currentTarget,i=n.dataset.key;i===HW&&(e.leftGridScrollLeft=r.scrollLeft),i===VW&&(e.scrollLeft=r.scrollLeft),i===$W&&(e.topGridScrollTop=r.scrollTop),i!==HW&&i!==VW||(e.scrollTop=r.scrollTop)},[e])})(),b={gridRefs:{topGridRef:o,leftGridRef:a,dataGridRef:s},getWrapperElements:m(()=>({headerGridWrapperElement:t.current,topGridWrapperElement:n.current,leftGridWrapperElement:r.current,dataGridWrapperElement:i.current}),[t,n,r,i]),updateViewService:y,trackScrollDirection:p,interactions:e};return(({gridRefs:{topGridRef:e,leftGridRef:t,dataGridRef:n},getWrapperElements:r,updateViewService:i,trackScrollDirection:o,interactions:a})=>{f(()=>{const{headerGridWrapperElement:i,topGridWrapperElement:s,leftGridWrapperElement:l,dataGridWrapperElement:u}=r(),c=e=>{e.ctrlKey||(e.preventDefault(),i.scrollLeft+=e.deltaX,i.scrollTop+=e.deltaY,l.scrollLeft=i.scrollLeft,s.scrollTop=i.scrollTop,o(e))},d=e=>{e.ctrlKey||(e.preventDefault(),l.scrollTop+=e.deltaY,t.current?.forEach(e=>{e?.scrollTo(l.scrollTop)}),i.scrollLeft+=e.deltaX,l.scrollLeft=i.scrollLeft,u.scrollTop=l.scrollTop,n.current?.scrollTo({scrollTop:l.scrollTop}),o(e))},p=t=>{t.ctrlKey||(t.preventDefault(),s.scrollLeft+=t.deltaX,e.current?.forEach(e=>{e?.scrollTo(s.scrollLeft)}),i.scrollTop+=t.deltaY,s.scrollTop=i.scrollTop,u.scrollLeft=s.scrollLeft,n.current?.scrollTo({scrollLeft:s.scrollLeft}),o(t))},f=r=>{r.ctrlKey||(r.preventDefault(),u.scrollLeft+=r.deltaX,u.scrollTop+=r.deltaY,n.current?.scrollTo({scrollLeft:u.scrollLeft,scrollTop:u.scrollTop}),s.scrollLeft=u.scrollLeft,e.current?.forEach(e=>{e?.scrollTo(u.scrollLeft)}),l.scrollTop=u.scrollTop,t.current?.forEach(e=>{e?.scrollTo(u.scrollTop)}),o(r))};return i.addEventListener("wheel",c),l.addEventListener("wheel",d),s.addEventListener("wheel",p),u.addEventListener("wheel",f),a.scroll||setTimeout(()=>{i.removeEventListener("wheel",c),l.removeEventListener("wheel",d),s.removeEventListener("wheel",p),u.removeEventListener("wheel",f)},0),()=>{i.removeEventListener("wheel",c),l.removeEventListener("wheel",d),s.removeEventListener("wheel",p),u.removeEventListener("wheel",f)}},[o,i,a,e,t,n,r])})(b),UW(b),{gridSectionsWrapperRefs:{headerGridWrapperRef:t,topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:i},gridRefs:{topGridRef:o,leftGridRef:a,dataGridRef:s},scrollDirectionRefs:{verticalScrollDirection:h,horizontalScrollDirection:g},scrollbarsDimensions:{verticalScrollbarWidth:l,horizontalScrollbarHeight:c,resetHorizontalScrollbarHeight:d}}},ZW=()=>{const{layoutService:e}=QF(),{rect:t,pageInfo:n}=UF();return y(()=>{let{height:r}=t;return e.hasLimitedData&&(r-=22),n.shouldShowPagination&&(r-=41),{...t,height:r}},[t,e,n.shouldShowPagination])},QW=({children:e,style:t})=>Yn.jsx("div",{"data-testid":"fullSize",style:t,children:e}),e$=({children:e,style:t})=>{const{direction:n}=UF();return Yn.jsx("div",{"data-section-id":"GRID",style:{direction:n,display:"grid",...t},children:e})},t$=e=>e&&`scrollable-container--${e}`,n$=({children:e,style:t,origin:n},r)=>{const{interactions:i}=XF(),o=i.scroll?t:{overflow:"hidden"};return Yn.jsx("div",{"data-testid":"scrollable","data-key":t$(n),style:o,ref:r,children:e})};var r$=o.forwardRef(n$);const i$=({children:e,style:t})=>{const{direction:n}=UF();return Yn.jsx("div",{"data-testid":"sticky",style:{position:"sticky",top:0,["rtl"===n?"right":"left"]:0,...t},children:e})};var o$=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function a$(e,t){return e===t||!(!o$(e)||!o$(t))}function s$(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!a$(e[n],t[n]))return!1;return!0}function l$(e,t){var n;void 0===t&&(t=s$);var r,i=[],o=!1;return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return o&&n===this&&t(a,i)||(r=e.apply(this,a),o=!0,n=this,i=a),r}}var u$="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function c$(e){cancelAnimationFrame(e.id)}function d$(e,t){var n=u$();var r={id:requestAnimationFrame(function i(){u$()-n>=t?e.call(null):r.id=requestAnimationFrame(i)})};return r}var p$=-1;function f$(e){if(void 0===e&&(e=!1),-1===p$||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),p$=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return p$}var h$=null;function m$(e){if(void 0===e&&(e=!1),null===h$||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),i=r.style;return i.width="100px",i.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?h$="positive-descending":(t.scrollLeft=1,h$=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),h$}return h$}var g$=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function v$(e){var t,n=e.getColumnOffset,r=e.getColumnStartIndexForOffset,i=e.getColumnStopIndexForStartIndex,o=e.getColumnWidth,a=e.getEstimatedTotalHeight,s=e.getEstimatedTotalWidth,l=e.getOffsetForColumnAndAlignment,u=e.getOffsetForRowAndAlignment,d=e.getRowHeight,p=e.getRowOffset,f=e.getRowStartIndexForOffset,h=e.getRowStopIndexForStartIndex,m=e.initInstanceProps,g=e.shouldResetStyleCacheOnItemSizeChange,v=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=m(r.props,ts(r)),r._resetIsScrollingTimeoutId=null,r._outerRef=void 0,r.state={instance:ts(r),isScrolling:!1,horizontalScrollDirection:"forward",scrollLeft:"number"==typeof r.props.initialScrollLeft?r.props.initialScrollLeft:0,scrollTop:"number"==typeof r.props.initialScrollTop?r.props.initialScrollTop:0,scrollUpdateWasRequested:!1,verticalScrollDirection:"forward"},r._callOnItemsRendered=void 0,r._callOnItemsRendered=l$(function(e,t,n,i,o,a,s,l){return r.props.onItemsRendered({overscanColumnStartIndex:e,overscanColumnStopIndex:t,overscanRowStartIndex:n,overscanRowStopIndex:i,visibleColumnStartIndex:o,visibleColumnStopIndex:a,visibleRowStartIndex:s,visibleRowStopIndex:l})}),r._callOnScroll=void 0,r._callOnScroll=l$(function(e,t,n,i,o){return r.props.onScroll({horizontalScrollDirection:n,scrollLeft:e,scrollTop:t,verticalScrollDirection:i,scrollUpdateWasRequested:o})}),r._getItemStyle=void 0,r._getItemStyle=function(e,t){var i,a=r.props,s=a.columnWidth,l=a.direction,u=a.rowHeight,c=r._getItemStyleCache(g&&s,g&&l,g&&u),f=e+":"+t;if(c.hasOwnProperty(f))i=c[f];else{var h=n(r.props,t,r._instanceProps),m="rtl"===l;c[f]=i={position:"absolute",left:m?void 0:h,right:m?h:void 0,top:p(r.props,e,r._instanceProps),height:d(r.props,e,r._instanceProps),width:o(r.props,t,r._instanceProps)}}return i},r._getItemStyleCache=void 0,r._getItemStyleCache=l$(function(e,t,n){return{}}),r._onScroll=function(e){var t=e.currentTarget,n=t.clientHeight,i=t.clientWidth,o=t.scrollLeft,a=t.scrollTop,s=t.scrollHeight,l=t.scrollWidth;r.setState(function(e){if(e.scrollLeft===o&&e.scrollTop===a)return null;var t=r.props.direction,u=o;if("rtl"===t)switch(m$()){case"negative":u=-o;break;case"positive-descending":u=l-i-o}u=Math.max(0,Math.min(u,l-i));var c=Math.max(0,Math.min(a,s-n));return{isScrolling:!0,horizontalScrollDirection:e.scrollLeft<o?"forward":"backward",scrollLeft:u,scrollTop:c,verticalScrollDirection:e.scrollTop<a?"forward":"backward",scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&c$(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=d$(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1)})},r}Ba(t,e),t.getDerivedStateFromProps=function(e,t){return y$(e,t),v(e),null};var y=t.prototype;return y.scrollTo=function(e){var t=e.scrollLeft,n=e.scrollTop;void 0!==t&&(t=Math.max(0,t)),void 0!==n&&(n=Math.max(0,n)),this.setState(function(e){return void 0===t&&(t=e.scrollLeft),void 0===n&&(n=e.scrollTop),e.scrollLeft===t&&e.scrollTop===n?null:{horizontalScrollDirection:e.scrollLeft<t?"forward":"backward",scrollLeft:t,scrollTop:n,scrollUpdateWasRequested:!0,verticalScrollDirection:e.scrollTop<n?"forward":"backward"}},this._resetIsScrollingDebounced)},y.scrollToItem=function(e){var t=e.align,n=void 0===t?"auto":t,r=e.columnIndex,i=e.rowIndex,o=this.props,c=o.columnCount,d=o.height,p=o.rowCount,f=o.width,h=this.state,m=h.scrollLeft,g=h.scrollTop,v=f$();void 0!==r&&(r=Math.max(0,Math.min(r,c-1))),void 0!==i&&(i=Math.max(0,Math.min(i,p-1)));var y=a(this.props,this._instanceProps),b=s(this.props,this._instanceProps)>f?v:0,x=y>d?v:0;this.scrollTo({scrollLeft:void 0!==r?l(this.props,r,n,m,this._instanceProps,x):m,scrollTop:void 0!==i?u(this.props,i,n,g,this._instanceProps,b):g})},y.componentDidMount=function(){var e=this.props,t=e.initialScrollLeft,n=e.initialScrollTop;if(null!=this._outerRef){var r=this._outerRef;"number"==typeof t&&(r.scrollLeft=t),"number"==typeof n&&(r.scrollTop=n)}this._callPropsCallbacks()},y.componentDidUpdate=function(){var e=this.props.direction,t=this.state,n=t.scrollLeft,r=t.scrollTop;if(t.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("rtl"===e)switch(m$()){case"negative":i.scrollLeft=-n;break;case"positive-ascending":i.scrollLeft=n;break;default:var o=i.clientWidth,a=i.scrollWidth;i.scrollLeft=a-o-n}else i.scrollLeft=Math.max(0,n);i.scrollTop=Math.max(0,r)}this._callPropsCallbacks()},y.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&c$(this._resetIsScrollingTimeoutId)},y.render=function(){var e=this.props,t=e.children,n=e.className,r=e.columnCount,i=e.direction,o=e.height,l=e.innerRef,u=e.innerElementType,d=e.innerTagName,p=e.itemData,f=e.itemKey,h=void 0===f?g$: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],M=[];if(r>0&&v)for(var R=D;R<=P;R++)for(var k=C;k<=E;k++)M.push(c(t,{columnIndex:k,data:p,isScrolling:b?S:void 0,key:h({columnIndex:k,data:p,rowIndex:R}),rowIndex:R,style:this._getItemStyle(R,k)}));var L=a(this.props,this._instanceProps),A=s(this.props,this._instanceProps);return c(m||g||"div",{className:n,onScroll:this._onScroll,ref:this._outerRefSetter,style:Ae({position:"relative",height:o,width:x,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:i},y)},c(u||d||"div",{children:M,ref:l,style:{height:L,pointerEvents:S?"none":void 0,width:A}}))},y._callPropsCallbacks=function(){var e=this.props,t=e.columnCount,n=e.onItemsRendered,r=e.onScroll,i=e.rowCount;if("function"==typeof n&&t>0&&i>0){var o=this._getHorizontalRangeToRender(),a=o[0],s=o[1],l=o[2],u=o[3],c=this._getVerticalRangeToRender(),d=c[0],p=c[1],f=c[2],h=c[3];this._callOnItemsRendered(a,s,d,p,l,u,f,h)}if("function"==typeof r){var m=this.state,g=m.horizontalScrollDirection,v=m.scrollLeft,y=m.scrollTop,b=m.scrollUpdateWasRequested,x=m.verticalScrollDirection;this._callOnScroll(v,y,g,x,b)}},y._getHorizontalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanColumnCount,o=e.overscanColumnsCount,a=e.overscanCount,s=e.rowCount,l=this.state,u=l.horizontalScrollDirection,c=l.isScrolling,d=l.scrollLeft,p=n||o||a||1;if(0===t||0===s)return[0,0,0,0];var f=r(this.props,d,this._instanceProps),h=i(this.props,f,d,this._instanceProps),m=c&&"backward"!==u?1:Math.max(1,p),g=c&&"forward"!==u?1:Math.max(1,p);return[Math.max(0,f-m),Math.max(0,Math.min(t-1,h+g)),f,h]},y._getVerticalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanCount,r=e.overscanRowCount,i=e.overscanRowsCount,o=e.rowCount,a=this.state,s=a.isScrolling,l=a.verticalScrollDirection,u=a.scrollTop,c=r||i||n||1;if(0===t||0===o)return[0,0,0,0];var d=f(this.props,u,this._instanceProps),p=h(this.props,d,u,this._instanceProps),m=s&&"backward"!==l?1:Math.max(1,c),g=s&&"forward"!==l?1:Math.max(1,c);return[Math.max(0,d-m),Math.max(0,Math.min(o-1,p+g)),d,p]},t}(C),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var y$=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},b$=function(e,t){var n=e.rowCount,r=t.rowMetadataMap,i=t.estimatedRowHeight,o=t.lastMeasuredRowIndex,a=0;if(o>=n&&(o=n-1),o>=0){var s=r[o];a=s.offset+s.size}return a+(n-o-1)*i},x$=function(e,t){var n=e.columnCount,r=t.columnMetadataMap,i=t.estimatedColumnWidth,o=t.lastMeasuredColumnIndex,a=0;if(o>=n&&(o=n-1),o>=0){var s=r[o];a=s.offset+s.size}return a+(n-o-1)*i},S$=function(e,t,n,r){var i,o,a;if("column"===e?(i=r.columnMetadataMap,o=t.columnWidth,a=r.lastMeasuredColumnIndex):(i=r.rowMetadataMap,o=t.rowHeight,a=r.lastMeasuredRowIndex),n>a){var s=0;if(a>=0){var l=i[a];s=l.offset+l.size}for(var u=a+1;u<=n;u++){var c=o(u);i[u]={offset:s,size:c},s+=c}"column"===e?r.lastMeasuredColumnIndex=n:r.lastMeasuredRowIndex=n}return i[n]},w$=function(e,t,n,r){var i,o;return"column"===e?(i=n.columnMetadataMap,o=n.lastMeasuredColumnIndex):(i=n.rowMetadataMap,o=n.lastMeasuredRowIndex),(o>0?i[o].offset:0)>=r?C$(e,t,n,o,0,r):E$(e,t,n,Math.max(0,o),r)},C$=function(e,t,n,r,i,o){for(;i<=r;){var a=i+Math.floor((r-i)/2),s=S$(e,t,a,n).offset;if(s===o)return a;s<o?i=a+1:s>o&&(r=a-1)}return i>0?i-1:0},E$=function(e,t,n,r,i){for(var o="column"===e?t.columnCount:t.rowCount,a=1;r<o&&S$(e,t,r,n).offset<i;)r+=a,a*=2;return C$(e,t,n,Math.min(r,o-1),Math.floor(r/2),i)},I$=function(e,t,n,r,i,o,a){var s="column"===e?t.width:t.height,l=S$(e,t,n,o),u="column"===e?x$(t,o):b$(t,o),c=Math.max(0,Math.min(u-s,l.offset)),d=Math.max(0,l.offset-s+a+l.size);switch("smart"===r&&(r=i>=d-s&&i<=c+s?"auto":"center"),r){case"start":return c;case"end":return d;case"center":return Math.round(d+(c-d)/2);default:return i>=d&&i<=c?i:d>c||i<d?d:c}},D$=v$({getColumnOffset:function(e,t,n){return S$("column",e,t,n).offset},getColumnStartIndexForOffset:function(e,t,n){return w$("column",e,n,t)},getColumnStopIndexForStartIndex:function(e,t,n,r){for(var i=e.columnCount,o=e.width,a=S$("column",e,t,r),s=n+o,l=a.offset+a.size,u=t;u<i-1&&l<s;)u++,l+=S$("column",e,u,r).size;return u},getColumnWidth:function(e,t,n){return n.columnMetadataMap[t].size},getEstimatedTotalHeight:b$,getEstimatedTotalWidth:x$,getOffsetForColumnAndAlignment:function(e,t,n,r,i,o){return I$("column",e,t,n,r,i,o)},getOffsetForRowAndAlignment:function(e,t,n,r,i,o){return I$("row",e,t,n,r,i,o)},getRowOffset:function(e,t,n){return S$("row",e,t,n).offset},getRowHeight:function(e,t,n){return n.rowMetadataMap[t].size},getRowStartIndexForOffset:function(e,t,n){return w$("row",e,n,t)},getRowStopIndexForStartIndex:function(e,t,n,r){for(var i=e.rowCount,o=e.height,a=S$("row",e,t,r),s=n+o,l=a.offset+a.size,u=t;u<i-1&&l<s;)u++,l+=S$("row",e,u,r).size;return u},initInstanceProps:function(e,t){var n=e,r={columnMetadataMap:{},estimatedColumnWidth:n.estimatedColumnWidth||50,estimatedRowHeight:n.estimatedRowHeight||50,lastMeasuredColumnIndex:-1,lastMeasuredRowIndex:-1,rowMetadataMap:{}};return t.resetAfterColumnIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({columnIndex:e,shouldForceUpdate:n})},t.resetAfterRowIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({rowIndex:e,shouldForceUpdate:n})},t.resetAfterIndices=function(e){var n=e.columnIndex,i=e.rowIndex,o=e.shouldForceUpdate,a=void 0===o||o;"number"==typeof n&&(r.lastMeasuredColumnIndex=Math.min(r.lastMeasuredColumnIndex,n-1)),"number"==typeof i&&(r.lastMeasuredRowIndex=Math.min(r.lastMeasuredRowIndex,i-1)),t._getItemStyleCache(-1),a&&t.forceUpdate()},r},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.columnWidth,e.rowHeight}}),P$=function(e,t){return e};function M$(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,i=e.getItemSize,o=e.getOffsetForIndexAndAlignment,a=e.getStartIndexForOffset,s=e.getStopIndexForStartIndex,l=e.initInstanceProps,u=e.shouldResetStyleCacheOnItemSizeChange,d=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=l(r.props,ts(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:ts(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=l$(function(e,t,n,i){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:i})}),r._callOnScroll=void 0,r._callOnScroll=l$(function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})}),r._getItemStyle=void 0,r._getItemStyle=function(e){var t,o=r.props,a=o.direction,s=o.itemSize,l=o.layout,c=r._getItemStyleCache(u&&s,u&&l,u&&a);if(c.hasOwnProperty(e))t=c[e];else{var d=n(r.props,e,r._instanceProps),p=i(r.props,e,r._instanceProps),f="horizontal"===a||"horizontal"===l,h="rtl"===a,m=f?d:0;c[e]=t={position:"absolute",left:h?void 0:m,right:h?m:void 0,top:f?0:d,height:f?"100%":p,width:f?p:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=l$(function(e,t,n){return{}}),r._onScrollHorizontal=function(e){var t=e.currentTarget,n=t.clientWidth,i=t.scrollLeft,o=t.scrollWidth;r.setState(function(e){if(e.scrollOffset===i)return null;var t=r.props.direction,a=i;if("rtl"===t)switch(m$()){case"negative":a=-i;break;case"positive-descending":a=o-n-i}return a=Math.max(0,Math.min(a,o-n)),{isScrolling:!0,scrollDirection:e.scrollOffset<a?"forward":"backward",scrollOffset:a,scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._onScrollVertical=function(e){var t=e.currentTarget,n=t.clientHeight,i=t.scrollHeight,o=t.scrollTop;r.setState(function(e){if(e.scrollOffset===o)return null;var t=Math.max(0,Math.min(o,i-n));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&c$(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=d$(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1,null)})},r}Ba(t,e),t.getDerivedStateFromProps=function(e,t){return R$(e,t),d(e),null};var p=t.prototype;return p.scrollTo=function(e){e=Math.max(0,e),this.setState(function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffset<e?"forward":"backward",scrollOffset:e,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},p.scrollToItem=function(e,t){void 0===t&&(t="auto");var n=this.props,r=n.itemCount,i=n.layout,a=this.state.scrollOffset;e=Math.max(0,Math.min(e,r-1));var s=0;if(this._outerRef){var l=this._outerRef;s="vertical"===i?l.scrollWidth>l.clientWidth?f$():0:l.scrollHeight>l.clientHeight?f$():0}this.scrollTo(o(this.props,e,t,a,this._instanceProps,s))},p.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,r=e.layout;if("number"==typeof n&&null!=this._outerRef){var i=this._outerRef;"horizontal"===t||"horizontal"===r?i.scrollLeft=n:i.scrollTop=n}this._callPropsCallbacks()},p.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,i=r.scrollOffset;if(r.scrollUpdateWasRequested&&null!=this._outerRef){var o=this._outerRef;if("horizontal"===t||"horizontal"===n)if("rtl"===t)switch(m$()){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&&c$(this._resetIsScrollingTimeoutId)},p.render=function(){var e=this.props,t=e.children,n=e.className,i=e.direction,o=e.height,a=e.innerRef,s=e.innerElementType,l=e.innerTagName,u=e.itemCount,d=e.itemData,p=e.itemKey,f=void 0===p?P$: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"===i||"horizontal"===h,w=S?this._onScrollHorizontal:this._onScrollVertical,C=this._getRangeToRender(),E=C[0],I=C[1],D=[];if(u>0)for(var P=E;P<=I;P++)D.push(c(t,{data:d,key:f(P,d),index:P,isScrolling:y?x:void 0,style:this._getItemStyle(P)}));var M=r(this.props,this._instanceProps);return c(m||g||"div",{className:n,onScroll:w,ref:this._outerRefSetter,style:Ae({position:"relative",height:o,width:b,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:i},v)},c(s||l||"div",{children:D,ref:a,style:{height:S?"100%":M,pointerEvents:x?"none":void 0,width:S?M:"100%"}}))},p._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],i=e[3];this._callOnItemsRendered(t,n,r,i)}if("function"==typeof this.props.onScroll){var o=this.state,a=o.scrollDirection,s=o.scrollOffset,l=o.scrollUpdateWasRequested;this._callOnScroll(a,s,l)}},p._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,i=r.isScrolling,o=r.scrollDirection,l=r.scrollOffset;if(0===t)return[0,0,0,0];var u=a(this.props,l,this._instanceProps),c=s(this.props,u,l,this._instanceProps),d=i&&"backward"!==o?1:Math.max(1,n),p=i&&"forward"!==o?1:Math.max(1,n);return[Math.max(0,u-d),Math.max(0,Math.min(t-1,c+p)),u,c]},t}(C),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var R$=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},k$=function(e,t,n){var r=e.itemSize,i=n.itemMetadataMap,o=n.lastMeasuredIndex;if(t>o){var a=0;if(o>=0){var s=i[o];a=s.offset+s.size}for(var l=o+1;l<=t;l++){var u=r(l);i[l]={offset:a,size:u},a+=u}n.lastMeasuredIndex=t}return i[t]},L$=function(e,t,n,r,i){for(;r<=n;){var o=r+Math.floor((n-r)/2),a=k$(e,o,t).offset;if(a===i)return o;a<i?r=o+1:a>i&&(n=o-1)}return r>0?r-1:0},A$=function(e,t,n,r){for(var i=e.itemCount,o=1;n<i&&k$(e,n,t).offset<r;)n+=o,o*=2;return L$(e,t,Math.min(n,i-1),Math.floor(n/2),r)},O$=function(e,t){var n=e.itemCount,r=t.itemMetadataMap,i=t.estimatedItemSize,o=t.lastMeasuredIndex,a=0;if(o>=n&&(o=n-1),o>=0){var s=r[o];a=s.offset+s.size}return a+(n-o-1)*i},T$=M$({getItemOffset:function(e,t,n){return k$(e,t,n).offset},getItemSize:function(e,t,n){return n.itemMetadataMap[t].size},getEstimatedTotalSize:O$,getOffsetForIndexAndAlignment:function(e,t,n,r,i,o){var a=e.direction,s=e.height,l=e.layout,u=e.width,c="horizontal"===a||"horizontal"===l?u:s,d=k$(e,t,i),p=O$(e,i),f=Math.max(0,Math.min(p-c,d.offset)),h=Math.max(0,d.offset-c+d.size+o);switch("smart"===n&&(n=r>=h-c&&r<=f+c?"auto":"center"),n){case"start":return f;case"end":return h;case"center":return Math.round(h+(f-h)/2);default:return r>=h&&r<=f?r:r<h?h:f}},getStartIndexForOffset:function(e,t,n){return function(e,t,n){var r=t.itemMetadataMap,i=t.lastMeasuredIndex;return(i>0?r[i].offset:0)>=n?L$(e,t,i,0,n):A$(e,t,Math.max(0,i),n)}(e,n,t)},getStopIndexForStartIndex:function(e,t,n,r){for(var i=e.direction,o=e.height,a=e.itemCount,s=e.layout,l=e.width,u="horizontal"===i||"horizontal"===s?l:o,c=k$(e,t,r),d=n+u,p=c.offset+c.size,f=t;f<a-1&&p<d;)f++,p+=k$(e,f,r).size;return f},initInstanceProps:function(e,t){var n={itemMetadataMap:{},estimatedItemSize:e.estimatedItemSize||50,lastMeasuredIndex:-1};return t.resetAfterIndex=function(e,r){void 0===r&&(r=!0),n.lastMeasuredIndex=Math.min(n.lastMeasuredIndex,e-1),t._getItemStyleCache(-1),r&&t.forceUpdate()},n},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.itemSize}});function q$(e,t){for(var n in e)if(!(n in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1}var _$=["style"],N$=["style"];function j$(e,t){var n=e.style,r=Oe(e,_$),i=t.style,o=Oe(t,N$);return!q$(n,i)&&!q$(r,o)}const F$=10,z$=(e,t)=>e.current===hN.Backward?t:0,W$=(e,t,n,r)=>{for(let i=n;i<n+r;i++){const n=e.at(i);if(void 0===n||void 0===n.at(t))return!0}return!1},$$=(e,t)=>e.qLeft+e.qWidth===t.qLeft&&e.qTop===t.qTop&&e.qHeight===t.qHeight,H$=({pageInfo:e,measureData:t,pageTop:n,qHeight:r,startLeft:i,endLeft:o})=>{const a=[],s=e.page*e.rowsPerPage;for(let e=i;e<o;e++)if(W$(t,e,n,r)){const t=a[a.length-1],i={qLeft:e,qTop:n+s,qWidth:1,qHeight:r};void 0!==t&&$$(t,i)?t.qWidth+=i.qWidth:a.push(i)}return a},V$=({pageInfo:e,measureData:t,scrollDirection:n,viewService:r,minBufferStartLeft:i,minBufferEndLeft:o,columnEndIndex:a})=>{const{gridRowStartIndex:s,gridHeight:l}=r,u=n.current===hN.Backward?Math.max(0,i-25):o,c=Math.min(u+25,a);return H$({pageInfo:e,measureData:t,startLeft:u,endLeft:c,pageTop:s,qHeight:l})},B$=({pageInfo:e,measureData:t,scrollDirection:n,layoutService:r,viewService:i})=>{const{startLeft:o,endLeft:a,pageTop:s,qHeight:l}=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:i,gridWidth:o,gridHeight:a}=t,s=e.size.x,l=z$(n,F$),u=Math.max(r-l,0);return{startLeft:u,endLeft:u+Math.min(o+F$,s-u),pageTop:i,qHeight:a}})(r,i,n),u=H$({pageInfo:e,measureData:t,startLeft:o,endLeft:a,pageTop:s,qHeight:l});return u.length>0?[...u,...V$({pageInfo:e,measureData:t,scrollDirection:n,viewService:i,minBufferStartLeft:o,minBufferEndLeft:a,columnEndIndex:r.size.x})]:u},G$=(e,t,n,r)=>{const i=e[n];if(void 0===i)return!0;for(let e=t;e<t+r;e++){if(void 0===i[e])return!0}return!1},U$=(e,t)=>e.qTop+e.qHeight===t.qTop&&e.qLeft===t.qLeft&&e.qWidth===t.qWidth,Y$=({startTop:e,endTop:t,qLeft:n,qWidth:r,measureData:i,pageInfo:o})=>{const a=[],s=o.page*o.rowsPerPage;for(let o=e;o<t;o++)if(G$(i,n,o,r)){const e=a.at(-1),t={qLeft:n,qTop:o+s,qWidth:r,qHeight:1};void 0!==e&&U$(e,t)?e.qHeight+=t.qHeight:a.push(t)}return a},K$=({pageInfo:e,measureData:t,scrollDirection:n,viewService:r})=>{const{startTop:i,endTop:o,qLeft:a,qWidth:s}=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:i,gridWidth:o,gridHeight:a}=t,s=z$(n,F$),l=Math.max(i-s,0);return{startTop:l,endTop:l+Math.min(a+F$,e.rowsOnCurrentPage-l),qLeft:r,qWidth:o}})(e,r,n),l=Y$({startTop:i,endTop:o,qLeft:a,qWidth:s,measureData:t,pageInfo:e});if(l.length>0){const r=n.current===hN.Backward?Math.max(0,i-25):o,u=Math.min(r+25,e.rowsOnCurrentPage),c=Y$({startTop:r,endTop:u,qLeft:a,qWidth:s,measureData:t,pageInfo:e});return[...l,...c]}return l},X$=(e,t,n,r,i,o,a,s)=>{const{gridColumnStartIndex:l,gridRowStartIndex:u,gridWidth:c,gridHeight:d}=i;let p=[],f=[];o.current!==hN.None&&(p=K$({pageInfo:r,measureData:n,scrollDirection:o,viewService:i})),a.current!==hN.None&&(f=B$({pageInfo:r,measureData:n,scrollDirection:a,layoutService:t,viewService:i})),o.current===hN.None&&a.current===hN.None&&(p=Y$({measureData:n,pageInfo:r,qLeft:l,qWidth:c,startTop:u,endTop:u+d}));const h=e.fetchPages([...p,...f]);s.isDownloadedAsPDForImage&&s.waitForPromise(h)},J$=function(e){var t,n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,o=0;return function(){t=this;for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];n=s;var u=Date.now()-o,c=function(){o=Date.now(),r=0,e.apply(t,n)};r||(u>=i?c():r=setTimeout(c,i-u))}}(X$,100),Z$=Iq(X$,75),Q$=(e,t,n=!1)=>void 0!==e&&(e.isLeafNode||n&&e.isLeftColumn?e.mainAxisPageCoord===t:e.mainAxisPageCoord+e.leafCount-1===t),eH=({style:e,index:t,isLastRow:n,isLastColumn:r,showLastBorder:i,isLeftColumn:o,showTotalCellDivider:a})=>{const{direction:s}=UF(),{styleService:{grid:{border:l,divider:u}}}=QF();return Yn.jsx("div",{style:{...e,...WN,...BN(n,r,l,s,i),...UN({bottomDivider:a&&o,rightDivider:a&&!o,borderColor:u})},"data-testid":"empty-cell","data-index":t})},tH=({children:e,verticalAlign:t,width:n,right:r,isLeftColumn:i})=>{const{layoutService:{isIndentModeEnabled:o}}=QF(),a=i&&o;return Yn.jsx("div",{"data-key":"sticky-cell-container",style:{display:"flex",flexDirection:"row",width:n,maxWidth:"100%",maxHeight:"100%",position:"sticky",left:4,top:0,bottom:0,right:r,...!a&&{alignItems:t,alignSelf:t,overflow:"hidden"}},children:e})},nH=e=>{const{type:t,imageSize:n}=e;return t!==iN.Image||"fill"!==n&&"fitWidth"!==n?"fit-content":"100%"},rH=e=>"number"==typeof e&&!Number.isNaN(+e),iH=e=>"string"==typeof e&&e.length>0||"number"==typeof e?+e:NaN,oH=r((e,t)=>Yn.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:Yn.jsx("path",{d:"M7.5 8.5H2v-1h5.5V2h1v5.5H14v1H8.5V14h-1z"})})),aH=r((e,t)=>Yn.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:Yn.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"})})),sH=r((e,t)=>Yn.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:[Yn.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"}),Yn.jsx("use",{fillRule:"evenodd"})]})),lH=r((e,t)=>Yn.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:Yn.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"})})),uH=r((e,t)=>Yn.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:Yn.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"})})),cH=r((e,t)=>Yn.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:Yn.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"})})),dH=r((e,t)=>Yn.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:Yn.jsx("path",{d:"M2 7.5h12v1H2z"})})),pH=r((e,t)=>Yn.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:Yn.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"})})),fH=r((e,t)=>Yn.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:Yn.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"})})),hH=r((e,t)=>Yn.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:Yn.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"})})),mH=r((e,t)=>Yn.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:Yn.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"})})),gH=r((e,t)=>Yn.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:Yn.jsx("path",{d:"m6 10 7-7 2 2-7 7-2 2-5-5 2-2z"})})),vH=r((e,t)=>Yn.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:Yn.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"})})),yH=r((e,t)=>Yn.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:Yn.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"})})),bH=r((e,t)=>Yn.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:Yn.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"})})),xH={m:gH,"ï":hH,R:r((e,t)=>Yn.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:Yn.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:vH,T:yH,U:bH,P:fH,Q:cH,"è":r((e,t)=>Yn.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:Yn.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"})})),"¢":lH,"©":sH,"23F4":uH,2013:mH,"&":pH,add:oH,"minus-2":dH,dot:aH},SH=({size:e,iconKey:t,color:n,pvStyle:r})=>{const i=t&&xH[t];return i&&Yn.jsx("div",{"data-testid":"representation-indicator-icon",style:{color:n,height:e,...r},children:Yn.jsx(i,{style:{height:e}})})},wH=(e,t)=>e.max===e.min?.5:(t-e.min)/(e.max-e.min),CH=(e,t,n)=>{const r=e.paletteColors?e.paletteColors[t]:e.localPaletteColors[t];return n.getColorPickerColor(r)},EH=(e,t,n)=>{const r={previousColor:(i=e.localPaletteColors)[(o=t)-(o>0?1:0)],nextColor:i[o+(o<i.length-1?1:0)]};var i,o;const a=((e,t)=>{const n=e.limits&&e.limits.concat().sort((e,t)=>e.value-t.value);return{lowerLimit:n&&t>0?n[t-1]:{value:0,gradient:!1},upperLimit:n&&n[t]?n[t]:{value:1,gradient:!1}}})(e,t),s=((e,t,n,r,i)=>{const{upperLimit:o,lowerLimit:a}=e,{previousColor:s,nextColor:l}=t,u=r===o.value?1:(r-a.value)/(o.value-a.value);return a.gradient&&o.gradient?r-a.value<o.value-r?{color:s.color,t:.5-u}:{color:l.color,t:u-.5}:a.gradient?{color:s.color,t:1-(.5+u/2)}:o.gradient?{color:l.color,t:u/2}:{color:i.localPaletteColors[n].color,t:r}})(a,r,t,n,e);return tT(e.localPaletteColors[t].color??"").blend(tT(s.color??""),s.t)},IH=(e,t,n)=>{const r=((e,t)=>{const{limits:n}=e;return n&&(e.limits=n.sort((e,t)=>e.value-t.value),e.limits=n.map(e=>({...e,value:wH(t,e.value)}))),e})({...e},t),i=r.paletteColors||r.localPaletteColors;return i&&(r.localPaletteColors=i.concat().map((e,t)=>({color:CH(r,t,n)}))),r},DH=(e,t,n,r)=>{const i=IH(e,n,r),{localPaletteColors:o}=i;if(t<=0)return o[0].color;if(t>=1)return o[o.length-1].color;const a=((e,t)=>{let n="",r=0;const{limits:i,localPaletteColors:o}=e;for(let a=0;a<o.length;a++){const o=i&&i[a]?i[a].value:1;if(t>=r&&t<o){n=EH(e,a,t);break}r=o}return n})(i,t);return a},PH=(e,t)=>{const n=(e=>e.map(e=>e.value??e).sort((e,t)=>e-t))(e),r=n.some(e=>!rH(e));return 0===n.length||r?(e=>{const t=0===e?0:.5*e;return{min:e-t,max:e+t}})(t):1===n.length?((e,t)=>{const n=e[0]-t;if(0===n||!rH(n)){const e=0===t?.5:Math.abs(.5*t);return{min:t-e,max:t+e}}return n>0?{min:t-.5*Math.abs(t),max:e[0]+2*n}:{min:e[0]+2*n,max:t+.5*Math.abs(t)}})(n,t):((e,t)=>{let n=e[e.length-1]-e[0];return n=n>0?n:1,{min:Math.min(t,e[0])-n/2,max:Math.max(t,e[e.length-1])+n/2}})(n,t)},MH=(e,t)=>{const{limits:n}=e.segments;if(!n)return;const r=((e,t)=>{const{min:n,max:r}=PH(e,t),i=Math.abs(t);return{min:n??t-i,max:r??t+i}})(n,t),i=((e,t,n)=>{const{limits:r,paletteColors:i,localPaletteColors:o}=e.segments;if(!r||!rH(t))return 0;let a=n&&rH(n)?Math.min(n,t):0;const s=r.sort((e,t)=>e.value-t.value),l=i||o;for(let e=0;e<l.length;e++){if(e===l.length-1||t<s[e].value&&t>=a)return e;a=s[e].value}return 0})(e,t,r.min);return{limitRange:r,limitPaletteColorIndex:i}},RH=e=>"flex-start"===e?"flex-end":"flex-start",kH=(e,t,n,r)=>{const i=e.indicatorConditionalColoring;if(!i)return;const o=MH(i,t),a=((e,t,n,r)=>{const{segments:i}=e;if(!i||!n)return;const{limits:o}=i;if(!o?.length||!((e,t)=>!(!e||0===e.length||!(e[t]?.gradient??e[t-1]?.gradient)))(o,n.limitPaletteColorIndex))return CH(i,n.limitPaletteColorIndex,r);const a=wH(n.limitRange,t);return DH(i,a,n.limitRange,r)})(i,t,o,r),s=i.segments.paletteColors[o?.limitPaletteColorIndex||0].icon,{indicator:l}=e;let u=l?.position||"right";return"rtl"===n&&(u="right"===u?"left":"right"),{color:a,iconKey:s,position:u}},LH=({representation:e,cellValue:t,textStyle:n})=>{const{styleService:r}=QF(),{theme:i}=XF(),{direction:o}=UF(),{text:a,indicator:s}=e,{showTextValues:l,applySegmentColors:u}=s??{},c=kH(e,t,o,i),{fontSize:d,fontFamily:p,fontStyle:f,fontWeight:h,textDecoration:m}=r.measureValues,g={fontSize:d,fontFamily:p,fontStyle:f,fontWeight:h,textDecoration:m},v=parseInt(d||AN,10),{iconKey:y,color:b,position:x}=c||{},S={display:"flex",paddingTop:2};return l?Yn.jsxs("div",{"data-key":"representation-indicator",style:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"4px",overflow:n?.overflow,color:u?b:n?.color},children:["left"===x&&SH({size:v,iconKey:y,color:b,pvStyle:S}),Yn.jsx("span",{style:{paddingTop:4,overflow:n?.overflow,textOverflow:n?.textOverflow,whiteSpace:"nowrap",direction:t<0?"ltr":void 0,...g},children:a}),"right"===x&&SH({size:v,iconKey:y,color:b,pvStyle:S})]}):(S.paddingTop=5,SH({size:v,iconKey:y,color:b,pvStyle:S}))},AH=e=>!!e.target?.getAttribute("class")?.includes(QA),OH=(e,t)=>{switch(t.type){case"clearSelections":return{engineSelectedCells:null,activeSelection:null,selectedField:null};case"mouseup":return{...e,activeSelection:null,engineSelectedCells:t.payload.engineSelectedCells};case"mousedown":return{...e,activeSelection:t.payload.activeSelection,selectedField:t.payload.selectedField};case"mouseover":{if(!e.activeSelection)return e;const{index:n}=t.payload,r=Math.min(n,e.activeSelection.startIndex),i=Math.max(n,e.activeSelection.endIndex);if(r===e.activeSelection.startIndex&&i===e.activeSelection.endIndex)return e;const o={...e.activeSelection,startIndex:r,endIndex:i};return o.clientSelectedCells=(e=>{const{getCellFromIndex:t,startIndex:n,endIndex:r,clientSelectedCells:i}=e,o=new Map(i);for(let e=n;e<=r;e++){const n=t(e);"N"===n?.ref.qType&&o.set(n.ref.qElemNo,n)}return o})(o),{...e,activeSelection:o}}default:return e}},TH=e=>null!==e.target?.closest("[data-prevent-selection]"),qH=e=>"A"===e.target?.tagName,_H=({startIndex:e,getCellFromIndex:t,cell:n})=>({type:"mousedown",payload:{activeSelection:{startIndex:e,endIndex:e,getCellFromIndex:t,clientSelectedCells:(new Map).set(n.ref.qElemNo,n)},selectedField:{selectionCellType:n.selectionCellType,index:"L"===n.selectionCellType?n.x:n.y}}});const NH=d({createMouseDownHandler:()=>()=>{},createMouseOverHandler:()=>()=>{},createPointerUpHandler:()=>()=>{},isSelected:()=>!1,isActive:!1,isLocked:()=>!1}),jH=()=>i(NH),FH=({children:e,selections:t})=>{const n=function(e){const{updatePageInfo:t}=UF(),n=e.isActive(),[r,i]=p(OH,{engineSelectedCells:null,selectedField:null,activeSelection:null});f(()=>{const n=()=>{i({type:"clearSelections"})},r=()=>{n(),t({page:0})};return e.on("deactivated",n),e.on("canceled",n),e.on("confirmed",r),e.on("cleared",n),()=>{e.removeListener("deactivated",n),e.removeListener("canceled",n),e.removeListener("confirmed",r),e.removeListener("cleared",n)}},[e,t]);const o=m(async()=>{if(!r.activeSelection)return;var t,n;1===r.activeSelection.clientSelectedCells.size&&(t=r.engineSelectedCells,(n=r.activeSelection).clientSelectedCells.forEach((e,r)=>{t?.has(r)&&(n.clientSelectedCells.delete(r),t.delete(r))}));const o=new Map([...r.engineSelectedCells??new Map,...r.activeSelection.clientSelectedCells]);try{i({type:"mouseup",payload:{engineSelectedCells:o}}),await e.select({method:"selectPivotCells",params:[nz,Array.from(o,([,e])=>({qType:e.selectionCellType,qRow:e.y,qCol:e.x}))]})}catch(e){console.error(e),i({type:"mouseup",payload:{engineSelectedCells:r.engineSelectedCells}})}},[r,e]);f(()=>{if(r.activeSelection)return document.addEventListener("mouseup",o),()=>{document.removeEventListener("mouseup",o)}},[o,r.activeSelection]);const a=m((e,t)=>n=>{const r=t(e);AH(n)||TH(n)||qH(n)||!(e=>1===e.buttons)(n)||!r||i(_H({startIndex:e,getCellFromIndex:t,cell:r}))},[]),s=m(t=>async()=>{r.activeSelection&&(e.isActive()||await e.begin([nz]),i({type:"mouseover",payload:{index:t}}))},[r.activeSelection,e]),l=m((e,t)=>n=>{if("touch"!==n.pointerType)return;const r=t(e);AH(n)||TH(n)||qH(n)||!r||(i(_H({startIndex:e,getCellFromIndex:t,cell:r})),o())},[o]),u=m(e=>!(!r.engineSelectedCells?.size&&!r.activeSelection?.clientSelectedCells.size||!r.selectedField||e.selectionCellType===r.selectedField.selectionCellType&&("L"===e.selectionCellType?r.selectedField.index===e.x:r.selectedField.index===e.y)),[r.activeSelection?.clientSelectedCells.size,r.engineSelectedCells?.size,r.selectedField]),c=m(e=>!u(e)&&(r.engineSelectedCells?.has(e.ref.qElemNo)||!!r.activeSelection?.clientSelectedCells.has(e.ref.qElemNo)),[u,r.activeSelection?.clientSelectedCells,r.engineSelectedCells]);return y(()=>({isSelected:c,isActive:n,isLocked:u,createMouseDownHandler:a,createMouseOverHandler:s,createPointerUpHandler:l}),[c,n,u,a,s,l])}(t);return Yn.jsx(NH.Provider,{value:n,children:e})},zH=e=>"fill"===e.representation.imageSize,WH=(e,t)=>{let n=e.isLeftColumn?"flex-start":"center";return e.isLeftColumn&&zH(e)&&t&&(n="center"),e.representation.type!==iN.Image||zH(e)?n:e.representation.resolvedImagePosition?.vertical};var $H=function(e){return e.Background="background",e.Color="color",e.FontWeight="fontWeight",e.FontStyle="fontStyle",e.TextDecoration="textDecoration",e}($H||{});const HH={brighter:.5,darker:.3,opacity:.03},VH=(e,{cell:t,styleService:n})=>{if(e===$H.Background||e===$H.Color){const n=t.expressionColor[e];if(n)return n}return t.isNull?n.nullValues[e]:t.isPseudoDimension?n.measureLabels[e]:t.isTotal?n.totalValues[e]:n.dimensionValues[e]},BH=({styleService:e,isCellSelected:t,cell:n,isCellLocked:r})=>{if(t)return e.selectedColors.background;const i=VH($H.Background,{cell:n,styleService:e});return!r||!i||n.isPseudoDimension||n.isEmpty||n.isNull||n.isTotal?VH($H.Background,{cell:n,styleService:e}):`repeating-linear-gradient(\n -45deg,\n ${qq(o=i,HH)} 0px 2px,\n ${o} 0px 4px\n ) border-box`;var o},GH=({cell:e,styleService:t,isCellSelected:n})=>n?t.selectedColors.color:VH($H.Color,{cell:e,styleService:t}),UH=({cell:e,styleService:t})=>{const{qCanCollapse:n,qCanExpand:r}=e.ref,i=VH($H.FontWeight,{cell:e,styleService:t});return void 0===i&&(r||n)?TN:i},YH=({cell:e,styleService:t})=>VH($H.FontStyle,{cell:e,styleService:t}),KH=({cell:e,styleService:t})=>VH($H.TextDecoration,{cell:e,styleService:t}),XH=e=>e?"pointer":"default",JH=({expandOrCollapse:e,cell:t})=>n=>{e?.(t.y,t.x),n.stopPropagation()},ZH=(e,t)=>{if(!e.isLeftColumn||e.representation.type===iN.Image)return{padding:4};return{padding:4,marginTop:t.dimensionValueTextHeight/2-6.5-4}},QH=({cell:e,isLeftColumn:t,isCellSelected:n})=>{const{styleService:r,layoutService:i}=QF(),{interactions:o}=XF(),{isActive:a}=jH(),{dataModel:s}=wW();if(!e.ref.qCanExpand&&!e.ref.qCanCollapse)return null;const l=!o.active||a||!s,u=GH({cell:e,styleService:r,isCellSelected:n}),c=a?.4:1,d=e.ref.qCanExpand?iF:rF;let p;p=e.ref.qCanExpand?t?s.expandLeft:s.expandTop:t?s.collapseLeft:s.collapseTop;const f=MW({isLeftColumn:t,layoutService:i,representation:e.representation});return Yn.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,...ZH(e,r),...f&&{alignSelf:WH(e)}},onClick:l?void 0:JH({cell:e,expandOrCollapse:p})})},eV=e=>{switch(e){case"fitHeight":case"fill":case"alwaysFit":return"100%";case"originalSize":return"fit-content";default:return"auto"}},tV=(e,t,n)=>{if("alwaysFit"===e&&t&&!n)return"fit-content";switch(e){case"fitHeight":return"auto";case"originalSize":return"fit-content";case"alwaysFit":return n?"unset":"100%";default:return"100%"}},nV=(e,t)=>{if("alwaysFit"===e)switch(t?.vertical){case"flex-start":return"center top";case"flex-end":return"center bottom";default:return"center center"}},rV=({representation:e,canExpandOrCollapse:t,leafCount:n,isLeftColumn:r,styleService:i,layoutService:o,isMeasureCell:a})=>{const{isIndentModeEnabled:s}=o,l=MW({isLeftColumn:r,layoutService:o,representation:e}),u=t?21:0,c=e.imageBox?.width??24;let d=`calc(100% - ${u}px)`,p=i.headerCellHeight;r&&l&&(d=c),(a||r)&&(p=i.contentCellHeight);let f=p;switch(r&&void 0!==n&&!s&&(f=p*Math.max(n,1)),e.imageSize){case"originalSize":return{maxWidth:d,maxHeight:f,...l?{width:d}:{}};case"fitWidth":return{width:d,maxHeight:f};case"fitHeight":return{height:f,maxWidth:d,...l?{width:d}:{}};case"fill":return{height:f,width:d};default:return{width:d,height:p}}},iV=e=>{if("alwaysFit"===e)return"contain"},oV=({suffix:e,delimeter:t})=>` ${e?t:""} ${e}`.trim(),aV=({imageSize:e,resolvedImagePosition:t,isImagesInIndentModeEnabled:n,isMeasureCell:r})=>({width:tV(e,n,r),height:eV(e),objectFit:iV(e),objectPosition:nV(e,t),...n&&"alwaysFit"===e?{"max-width":"100%"}:{}}),sV=({representation:e,textStyle:t,isMeasureCell:n})=>{const{imageRef:r,onLoad:i}=(()=>{const{downloadService:e}=QF(),t=u(null),{promise:n,resolve:r}=y(()=>nj(),[]);return f(()=>(e.isDownloadedAsPDForImage&&(e.waitForPromise(n),t.current?.complete&&r()),()=>{r()}),[t,e,n,r]),{onLoad:m(()=>{r()},[r]),imageRef:t}})(),{layoutService:{isIndentModeEnabled:o}}=QF(),{url:a,text:s,imageSize:l,resolvedImagePosition:c}=e,{overflow:d,...p}=t;return Yn.jsx("img",{src:a,alt:s,style:{...aV({imageSize:l,resolvedImagePosition:c,isImagesInIndentModeEnabled:o,isMeasureCell:n}),...p},onLoad:i,ref:r})},lV=({representation:e,textStyle:t,canExpandOrCollapse:n,leafCount:r,isLeftColumn:i=!1,imageContainerHorizontalAlignment:o,isMeasureCell:a})=>{const{styleService:s,layoutService:l}=QF(),{resolvedImagePosition:u}=e;return Yn.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",...rV({representation:e,canExpandOrCollapse:n,leafCount:r,styleService:s,layoutService:l,isLeftColumn:i,isMeasureCell:a})},children:Yn.jsx(sV,{representation:e,textStyle:t,isMeasureCell:!0})})},uV=(e,t,n)=>{if(e?.auto)return t;switch(e?.align){case"center":return"center";case"left":return"rtl"===n?"flex-end":"flex-start";case"right":return"rtl"===n?"flex-start":"flex-end";default:return t}},cV=(e,t)=>{let{textAlign:n}=t.getDimensionInfo(e.dimensionInfoIndex)??{};return e.isPseudoDimension&&void 0!==e.visibleMeasureInfoIndex&&({labelTextAlign:n}=t.visibleMeasureInfo.at(e.visibleMeasureInfoIndex)??{}),n?.auto||void 0===n?"left":n.align},dV={display:"flex",flexDirection:"row",alignItems:"center"},pV={alignItems:"center",display:"flex",flexDirection:"row",backgroundClip:"padding-box"},fV=(e,t,n,r)=>t?{...pV,...e.nullValues}:n?{...dV,color:e.totalValues.color,background:r??e.totalValues.background}:{...dV,color:e.measureValues.color,background:r??e.measureValues.background},hV=(e,t,n,r,i)=>{const{fontFamily:o,fontSize:a}=e.measureValues,s={...$N,...!n&&HN(e.grid.lineClamp),...t&&{color:t},fontFamily:o,fontSize:a};if(i){const{fontWeight:t,fontStyle:n,textDecoration:r}=e.nullValues;return{...s,fontWeight:t,fontStyle:n,textDecoration:r}}if(r){const{fontWeight:t,fontStyle:n,textDecoration:r}=e.totalValues;return{...s,fontWeight:t,fontStyle:n,textDecoration:r}}const{fontWeight:l,fontStyle:u,textDecoration:c}=e.measureValues;return{...s,fontWeight:void 0===l?TN:l,fontStyle:u,textDecoration:c}},mV=({cell:e,representation:t,color:n,isTotalValueCell:r,cellHorizontalAlignment:i})=>{const{layoutService:o,styleService:a}=QF(),{isIndentModeEnabled:s}=o,l=e.isNull?o.getNullValueText():t.text,u=t.type===iN.Image,c=t.type===iN.Indicator,d=rH(iH(l)),p=hV(a,n,d,r,e.isNull);if(!s&&u&&!e.isNull||s&&u&&!e.isNull)return Yn.jsx(lV,{isMeasureCell:!0,textStyle:p,representation:t,imageContainerHorizontalAlignment:i});const f=iH(e.isNull?t.text:e.ref.qNum);return c&&rH(f)?Yn.jsx(LH,{representation:t,cellValue:f,textStyle:p}):Yn.jsx("span",{style:{padding:4,direction:d?"ltr":void 0,...p},children:l})},gV=(e,t)=>e?.[t]?.visibleMeasureInfoIndex??0,vV="flex-start",yV=(e,t)=>e.isNull?vV:t.type===iN.Image&&"fill"!==t.imageSize?t.resolvedImagePosition?.vertical:vV,bV=({columnIndex:e,rowIndex:t,style:n,data:r})=>{const{env:i}=XF(),{pageInfo:o,direction:a}=UF(),{styleService:s,layoutService:l}=QF(),{attrExprInfoIndexes:u,gridSectionsData:{measureData:c,leftDimensionData:d,topDimensionData:p},visibleDimensionsInfo:{visibleLeftDimensionInfo:f,visibleTopDimensionInfo:h}}=wW(),g=(()=>{const{layoutService:{isIndentModeEnabled:e}}=QF(),{gridSectionsData:{leftDimensionData:t,topDimensionData:n},visibleDimensionsInfo:{visibleLeftDimensionInfo:r,visibleTopDimensionInfo:i}}=wW(),o=r.length,a=i.length;return m((r,i)=>!(!n.grid.at(a-1)?.[r]?.isTotal&&!t.grid.at(e?0:o-1)?.[i]?.isTotal),[n,t,o,a,e])})(),v=(()=>{const{gridSectionsData:{topDimensionData:e},visibleDimensionsInfo:{visibleTopDimensionInfo:t}}=wW(),n=t.length;return m(t=>{const r=e.grid.at(n-1)?.[t];return Q$(r,e.totalDividerIndex)},[e,n])})(),y=(()=>{const{layoutService:{isIndentModeEnabled:e}}=QF(),{gridSectionsData:{leftDimensionData:t},visibleDimensionsInfo:{visibleLeftDimensionInfo:n}}=wW(),r=n.length;return m(n=>{const i=e?0:r-1,o=t.grid.at(i)?.[n];return Q$(o,t.totalDividerIndex,e)},[t,e,r])})(),{showLastBorder:b}=r,x=p.grid.at(h.length-1),S=d.grid.at(f.length-1),{background:w}=s.measureValues,C=c[t]?.[e],E=t===o.rowsOnCurrentPage-1,I=e===l.size.x-1;if(!C)return Yn.jsx(eH,{style:{...n,background:w},isLastRow:E,isLastColumn:I,showLastBorder:b,index:t,isLeftColumn:!1,showTotalCellDivider:!1});const D=l.hasPseudoDimOnLeft?gV(S,t):gV(x,e),P=l.visibleMeasureInfo[D],M=eW({cell:C.ref,representationProperties:P.representation,attrExprInfoIndex:u.measures[D],env:i,direction:a,conditionalColoring:P.conditionalColoring,enabledFeatures:{[iN.Image]:!0,[iN.Indicator]:!0}}),R=!C.isNull&&g(e,t),k=C.isNull?l.getNullValueText():M.text,L=!C.isNull||!Number.isNaN(+k),A=tW(u.measures[D],C.ref),O=((e,t,n,r,i)=>{const{textAlign:o}=t,a=r?"flex-end":"center";return e.isNull||n.type!==iN.Image?uV(o,a,i):n.resolvedImagePosition?.horizontal??"center"})(C,P,M,L,a),T={...fV(s,C.isNull,R,A.background),...BN(E,I,s.grid.border,a,b),...UN({bottomDivider:y(t),rightDivider:v(e),borderColor:s.grid.divider}),...WN,padding:"0px 4px",display:"flex",justifyContent:O};return Yn.jsx("div",{className:JA,title:k,style:{...T,...n},"data-testid":"measure-value","data-row-index":t,"data-col-index":e,children:Yn.jsx(tH,{width:nH(M),verticalAlign:yV(C,M),children:Yn.jsx(mV,{cell:C,representation:M,isTotalValueCell:R,color:A.color,cellHorizontalAlignment:O})})})};var xV=o.memo(bV,j$);const SV=(e,t)=>t.list[e]?.id??e.toString(),wV=({columnIndex:e,rowIndex:t,data:n})=>n.grid[t]?.[e]?.id??`${t}-${e}`,CV=e=>({...zN,overflow:"hidden",boxSizing:"content-box",borderWidth:"rtl"===e?"1px 1px 0px 0px":"1px 0px 0px 1px"}),EV=({dataGridRef:e,height:t,rowHightCallback:n,width:r,showLastBorder:i,getRightGridColumnWidth:o,verticalScrollDirection:a,horizontalScrollDirection:s})=>{const{pageInfo:l,direction:u}=UF(),{layoutService:c,styleService:{grid:{divider:d},contentCellHeight:p}}=QF(),{dataModel:f,gridSectionsData:{measureData:h}}=wW(),g={...CV(u),borderColor:d,willChange:"auto",userSelect:"none",WebkitUserSelect:"none"},y=(({verticalScrollDirection:e,horizontalScrollDirection:t})=>{const{pageInfo:n}=UF(),{downloadService:r,viewService:i,layoutService:o}=QF(),{dataModel:a,gridSectionsData:{leftDimensionData:s,topDimensionData:l,measureData:u}}=wW(),c=s.columnCount,d=l.rowCount;return m(({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===hN.None?0:F$),m=i.gridHeight+d+(e.current===hN.None?0:F$);let g=J$;m*h>1500&&(g=Z$),g(a,o,u,n,i,e,t,r)},[i,o,a,u,e,t,n,c,d,r])})({verticalScrollDirection:a,horizontalScrollDirection:s});return xj(()=>{e.current&&e.current.resetAfterColumnIndex(0,!1)},[e,f,h]),v(()=>{e.current&&e.current.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!0})},[r,t,e,p,u]),0===c.size.x?null:Yn.jsx(D$,{"data-section-id":"DATA_GRID",ref:e,style:g,columnCount:c.size.x,columnWidth:o,height:t,rowCount:l.rowsOnCurrentPage,rowHeight:n,width:r,itemData:{showLastBorder:i,grid:h},onItemsRendered:y,estimatedRowHeight:n(),estimatedColumnWidth:o(),itemKey:wV,direction:u,children:xV})};var IV=x(EV);const DV=r((e,t)=>Yn.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:[Yn.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"}),Yn.jsx("use",{fillRule:"evenodd"})]})),PV=e=>{const[t,n]=rx(YW);return xj(()=>{n(!1)},e),{isAdjustingWidth:t,setIsAdjustingWidth:n}},MV=()=>{const[e,t]=g(!1),{dataModel:n}=wW(),{interactions:r}=XF(),{isAdjustingWidth:i,setIsAdjustingWidth:o}=PV([n]);return{open:e,setOpen:t,handleOpenMenu:e=>{!r.active||AH(e)||i||t(!0)},isAdjustingWidth:i,setIsAdjustingWidth:o}};function RV(e,t){const n=t.expressionColor?.background??e.dimensionValues.background,r=t.isLeftColumn?e.header.background:n,i=r===NN.Transparent?WO.WHITE:r,o=tT(e.grid.border),a=tT(i);return a.isInvalid()||o.isInvalid()||1===o.a?e.grid.border:function(e,t,n){return tT(e.r+(t.r-e.r)*n,e.g+(t.g-e.g)*n,e.b+(t.b-e.b)*n,e.a+(t.a-e.a)*n)}(a,o,o.a).getRGB()}const kV=({cellInfo:e,columnWidth:t,isLastColumn:n,overrideLeftGridWidth:r,setIsAdjustingWidth:i,shouldApplyIndentModeColumnWidth:o,tableWidth:a})=>{const{direction:s}=UF(),{interactions:l,translator:u}=XF(),{isActive:c}=jH(),{dataModel:d}=wW(),{styleService:p}=QF(),[,f]=g({});if(!(e.canBeResized&&!!l.active&&!c))return null;const h=RV(p,e);return Yn.jsx(Dj,{isPivot:!0,columnWidth:t,isLastColumn:n,keyValue:`adjuster-${e.dimensionInfoIndex}`,hoverColor:h,updateWidthCallback:t=>{f({}),r&&void 0!==e.colIdx&&r(t,e.colIdx)},confirmWidthCallback:t=>{o?d.applyIndentModeColumnWidth({...t,pixels:Math.min((a??0)*DW,t.pixels??0)}):d.applyColumnWidth(t,e)},setIsAdjustingWidth:i,isLeftColumn:e.isLeftColumn,accessibilityRelatedArgs:{translator:u,columnLabel:e.label??""},direction:s})},LV=Ta(xl,{shouldForwardProp:e=>!["interactions","hoverBackground","background","shouldShowMenuIcon","isDimension"].includes(e)})(({interactions:e,background:t,hoverBackground:n,shouldShowMenuIcon:r,isDimension:i})=>({pointerEvents:i?"all":"none",position:"relative",display:"grid",gridTemplateColumns:r?"1fr 12px":"1fr",gap:8,alignItems:"center",cursor:e.active?"pointer":"default",background:t,"&&:hover":{background:e.active&&i?n:t}})),AV=Ta("div",{shouldForwardProp:e=>!["direction"].includes(e)})(({direction:e})=>({position:"absolute",left:"rtl"!==e?0:void 0,bottom:0})),OV=Ta("div",{shouldForwardProp:e=>"justifyContent"!==e})(({justifyContent:e})=>({...FN,justifyContent:e??FN.justifyContent,flexDirection:"row",overflow:"hidden",position:"relative",gap:8})),TV=Ta("div")(()=>({...FN})),qV=Ta("div",{shouldForwardProp:e=>!["fontSize","fontFamily","fontWeight","fontStyle","textDecoration","justifyContent"].includes(e)})(({fontSize:e,fontFamily:t,fontWeight:n,fontStyle:r,textDecoration:i,justifyContent:o})=>({display:"flex",justifyContent:o,alignSelf:"center",flexGrow:1,maxWidth:"100%",fontWeight:n,fontSize:e,fontFamily:t,fontStyle:r,textDecoration:i})),_V=Ta(qc)(({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}})),NV=Ta(zc,{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}}})),jV=Ta("span")({textOverflow:"ellipsis",overflow:"hidden"}),FV=Ta("div",{shouldForwardProp:e=>"visible"!==e})(({visible:e})=>({opacity:e?1:0,width:EW,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"})),zV=Ta("span",{shouldForwardProp:e=>!["padding","alignSelf"].includes(e)})(({padding:e,alignSelf:t})=>({padding:e,alignSelf:t,position:"sticky",top:0}));let WV=function(e){return e.Expand="Expand",e.Collapse="Collapse",e}({});const $V=(e,t)=>({qExcludeList:t===WV.Expand,qPos:{qDimName:e,qElemNo:[]}}),HV=`${nz}/qExpansionState`,VV=({model:e,qExpansionState:t,qEffectiveDimensionName:n,action:r})=>async()=>{const i=(({qEffectiveDimensionName:e,oldExpansionState:t,action:n})=>{const r=t?.findIndex(t=>t.qPos?.qDimName===e);return{expansionData:$V(e,n),index:r}})({qEffectiveDimensionName:n,oldExpansionState:t,action:r});await(async({model:e,newExpansionState:t,errorMsg:n})=>{const{index:r,expansionData:i}=t;try{let t,n=HV,o="Add";void 0===r?t=JSON.stringify([i]):-1===r?(n=`${HV}/-`,t=JSON.stringify(i)):(n=`${HV}/${r}`,o="Replace",t=JSON.stringify(i)),await e.applyPatches([{qPath:n,qOp:o,qValue:t}],!0)}catch(e){console.error(n,e)}})({model:e,newExpansionState:i,errorMsg:`Failed to ${r} dimension`})},BV=({model:e,effectivePropertiesService:t,cell:n})=>{if(void 0===n.qEffectiveDimensionName)return;const r={model:e,qExpansionState:t.qExpansionState,qEffectiveDimensionName:n.qEffectiveDimensionName};return{expandCallback:VV({...r,action:WV.Expand}),collapseCallback:VV({...r,action:WV.Collapse}),alwaysFullyExpanded:t.qAlwaysFullyExpanded}},GV={[pF.Sorting]:!0,[pF.Selections]:!0,[pF.Searching]:!0},UV=({cell:e,style:t,isFirstColumn:n,isLastColumn:r,isLastRow:i,changeSortOrder:o,iconsVisibilityStatus:a,columnWidth:s,overrideLeftGridWidth:l,shouldApplyIndentModeColumnWidth:c,tableWidth:d})=>{const p=u(null),{styleService:f,layoutService:h,effectivePropertiesService:m}=QF(),{app:g,interactions:v,embed:y,translator:b,model:x,env:S}=XF(),{fontSize:w,fontFamily:C,fontStyle:E,fontWeight:I,textDecoration:D,color:P,background:M,hoverBackground:R,activeBackground:k}=f.header,L=u(null),{shouldShowLockIcon:A,shouldShowMenuIcon:O}=a,{open:T,setOpen:q,handleOpenMenu:_,setIsAdjustingWidth:N}=MV(),{direction:j}=UF(),F={sortFromMenu:async(t,n)=>{t.stopPropagation(),await o(e,n)}},z={embed:y,listboxRef:p,sortCriteria:h.searchSortFromDimension&&e.isDim?m.getSortCriteriaForDimension(e.dimensionInfoIndex):void 0},W={app:g,qStateName:h.layout.qStateName},{labelTextAlign:$}=h.getDimensionInfo(e.dimensionInfoIndex)??{},H=uV($,"flex-start",j);return Yn.jsxs(LV,{className:JA,title:e.label,interactions:v,background:T?k:M,hoverBackground:R,shouldShowMenuIcon:O,isDimension:e.isDim,style:{...t,...WN,...GN(e,i,n,r,f.grid.border,j),color:P},"data-testid":"title-cell",onClick:_,children:[Yn.jsxs(OV,{children:[A?Yn.jsx(TV,{children:Yn.jsx(DV,{height:12})}):null,Yn.jsx(qV,{fontFamily:C,fontSize:w,fontStyle:E,fontWeight:I,textDecoration:D,justifyContent:H,children:Yn.jsx("span",{style:S.flags.isEnabled("VNA-135-WRAP_HEADER_TEXT")?{...$N,...HN(f.grid.columnLineClamp)}:$N,children:e.label})})]}),e.isDim?Yn.jsxs(Yn.Fragment,{children:[Yn.jsx(mF,{headerData:e,translator:b,anchorRef:L,open:T,setOpen:q,interactions:v,menuAvailabilityFlags:GV,sortRelatedArgs:F,searchRelatedArgs:z,selectionRelatedArgs:W,expandOrCollapseArgs:BV({model:x,effectivePropertiesService:m,cell:e}),shouldShowMenuIcon:O,model:x&&"setActiveField"in x?x:void 0,direction:j,isAccessibleHeader:!0}),Yn.jsx(AV,{ref:p,direction:j}),Yn.jsx(AV,{ref:L,direction:j})]}):null,Yn.jsx(kV,{cellInfo:{...e,isLeftColumn:!0},columnWidth:s,isLastColumn:r,overrideLeftGridWidth:l,setIsAdjustingWidth:N,shouldApplyIndentModeColumnWidth:c,tableWidth:d})]})},YV=({rowSpan:e,columnSpan:t})=>{const{styleService:n}=QF(),{direction:r}=UF();return e>0&&t>0?Yn.jsx("div",{style:{...zN,gridRowStart:1,gridRowEnd:`span ${e}`,gridColumnStart:1,gridColumnEnd:`span ${t}`,borderWidth:"rtl"===r?"0px 0px 0px 1px":"0px 1px 0px 0px",borderColor:n.grid.border,background:n.grid.background},"data-testid":"empty-header-cell"}):null},KV=r((e,t)=>Yn.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:Yn.jsx("path",{d:"m8 9 4.5-4.5L14 6l-4.5 4.5L8 12 2 6l1.5-1.5z"})})),XV=r((e,t)=>Yn.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:[Yn.jsx("path",{d:"m8 7-4.5 4.5L2 10l6-6 6 6-1.5 1.5z"}),Yn.jsx("use",{fillRule:"evenodd"})]})),JV=({tableWidth:e,leftGridWidth:t,overrideLeftGridWidth:n})=>{const{direction:r}=UF(),{styleService:i}=QF(),{interactions:o,translator:a}=XF(),{isActive:s}=jH(),{dataModel:l}=wW(),{setIsAdjustingWidth:u}=PV([l]);if(!(!!o.active&&!s))return null;const c=RV(i,{isLeftColumn:!0});return Yn.jsx(Dj,{isPivot:!0,isLastColumn:!0,isLeftColumn:!0,keyValue:"adjuster-indent-row",hoverColor:c,columnWidth:t,updateWidthCallback:t=>{n(Math.min(t,e*DW))},confirmWidthCallback:r=>{if(r.type===tO.FitToContent)return void l.applyIndentModeColumnWidth({type:tO.Auto});const i=Math.min(r.pixels??t,e*DW);n(i),l.applyIndentModeColumnWidth({type:tO.Pixels,pixels:i})},setIsAdjustingWidth:u,accessibilityRelatedArgs:{translator:a,columnLabel:a.get("SNPivotTable.IndentMode.Rows")},direction:r})},ZV=r((e,t)=>Yn.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:Yn.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"})})),QV=({cell:e,changeSortOrder:t})=>{const n=u(null),r=u(null),{app:i,interactions:o,embed:a,translator:s,model:l}=XF(),{layoutService:c,effectivePropertiesService:d}=QF(),{open:p,setOpen:f,handleOpenMenu:h}=MV();return Yn.jsxs(NV,{onClick:h,isActive:p,children:[Yn.jsx(jV,{children:e.label}),Yn.jsxs(FV,{className:"indent-mode-dropdown-more",visible:p,children:[Yn.jsx(ZV,{}),e.isDim?Yn.jsxs(Yn.Fragment,{children:[Yn.jsx(mF,{headerData:e,translator:s,anchorRef:n,open:p,setOpen:f,interactions:o,menuAvailabilityFlags:GV,sortRelatedArgs:{sortFromMenu:async(n,r)=>{n.stopPropagation(),await t(e,r)}},searchRelatedArgs:{embed:a,listboxRef:r},selectionRelatedArgs:{app:i,qStateName:c.layout.qStateName},expandOrCollapseArgs:BV({model:l,effectivePropertiesService:d,cell:e}),shouldShowMenuIcon:!1,model:l&&"setActiveField"in l?l:void 0}),Yn.jsx(AV,{ref:r}),Yn.jsx(AV,{ref:n})]}):null]})]})},eB=({idx:e,menu:t,menuItems:n,isOnlyOneRow:r})=>{const i=n.at(-1)?.id===iz,o=e+1<n.length&&n[e+1]?.id===iz;return!(r&&i&&o)&&(t?.id!==iz&&e<n.length-1)},tB=({menuItems:e,changeSortOrder:t,overrideLeftGridWidth:n,leftGridWidth:r,tableWidth:i})=>{const{styleService:o}=QF(),{interactions:a,translator:s}=XF(),{dataModel:l,gridSectionsData:{headersData:c}}=wW(),[d,p]=g(!1),f=u(null),{headerCellHeight:h}=o,{color:m,background:v,hoverBackground:y,activeBackground:b,fontFamily:x,fontSize:S,fontStyle:w,fontWeight:C,textDecoration:E}=o.header,{isAdjustingWidth:I}=PV([l]),D=e=>{e.stopPropagation()},P={height:h,gridColumn:`1 / span ${c.size.x}`,gridRow:c.size.y,zIndex:c.size.x-0};return Yn.jsxs(LV,{isDimension:!0,background:d?b:v,interactions:a,hoverBackground:y,style:{...P,...WN,color:m},onClick:e=>{!a.active||AH(e)||I||p(!d)},"data-testid":"indentModeHeaderCellWrapper",children:[Yn.jsxs(OV,{justifyContent:"flex-start",children:[Yn.jsx(qV,{fontFamily:x,fontSize:S,fontStyle:w,fontWeight:C,textDecoration:E,justifyContent:"flex-start",children:Yn.jsx("span",{style:$N,children:s.get("SNPivotTable.IndentMode.Rows")})}),d?Yn.jsx(XV,{}):Yn.jsx(KV,{}),Yn.jsx(AV,{ref:f})]}),Yn.jsx(_V,{open:d,anchorEl:f.current,disableEnforceFocus:!0,children:e.map((n,r)=>[n&&n.id!==iz&&Yn.jsx("li",{role:"presentation",onClick:D,onKeyDown:D,children:Yn.jsx(QV,{cell:n,changeSortOrder:t})}),eB({idx:r,menu:n,menuItems:e,isOnlyOneRow:1===c.size.y})&&Yn.jsx(Lj,{"data-testid":"group-divider",variant:"middle"})])}),Yn.jsx(JV,{tableWidth:i,leftGridWidth:r,overrideLeftGridWidth:n})]})},nB=({layoutService:e,headersData:t,topRowIndex:n})=>e.isIndentModeEnabled&&t.size.x>1&&n+1===t.size.y,rB={display:"grid",width:"fit-content"},iB=({tableWidth:e,leftGridWidth:t,columnWidths:n,rowHight:r,changeSortOrder:i,getHeaderCellsIconsVisibilityStatus:o,height:a,overrideLeftGridWidth:s})=>{const{layoutService:l}=QF(),{gridSectionsData:{headersData:u}}=wW();return Yn.jsxs("div",{"data-testid":"HEADER_GRID",style:{...rB,gridTemplateColumns:n.map(e=>`${e}px`).join(" "),gridTemplateRows:u.data.map(()=>`${r}px`).join(" "),height:a},children:[u.size.y>1&&Yn.jsx(YV,{columnSpan:u.size.x-1,rowSpan:u.size.y-1}),u.data.map((a,c)=>{let d=[];if(nB({layoutService:l,headersData:u,topRowIndex:c})){const n=a.at(0);return Array.isArray(n)&&d.push(Yn.jsx(tB,{menuItems:n,changeSortOrder:i,overrideLeftGridWidth:s,leftGridWidth:t,tableWidth:e},n.at(0)?.id)),d}return d=a.reduce((t,a,d)=>{if(a&&!Array.isArray(a)){const p=o(d,a.isLocked,a.label),f=l.isIndentModeEnabled&&1===u.size.x;t.push(Yn.jsx(UV,{style:{width:n[d],height:r,gridColumn:l.isIndentModeEnabled&&u.size.x>1?2:d+1,gridRow:c+1,zIndex:u.size.x-d},isLastRow:c===u.size.y-1,isFirstColumn:0===d,isLastColumn:d===u.size.x-1,changeSortOrder:i,cell:a,iconsVisibilityStatus:p,columnWidth:n[d],overrideLeftGridWidth:s,shouldApplyIndentModeColumnWidth:f,tableWidth:e},a.id))}return t},[]),d})]})};var oB=x(iB);const aB=(e,t,n,r)=>{const{layoutService:i}=QF();v(()=>{e.current?.forEach(e=>e?.resetAfterIndex(0,!0))},[e,t,n,r,i])},sB=(e,t)=>{xj(()=>{e.current?.forEach(e=>e?.resetAfterIndex(0,!1))},[e,t])},lB=(e,t)=>{const{isLast:n,list:r,listValues:i}=t;return n?r[e]:i[e]},uB=(e,t,n,r,i)=>{if(i)return;const o=e.representation,a=MW({isLeftColumn:n,layoutService:t,representation:o}),s=n?"flex-start":"center",l=e.representation.resolvedImagePosition?.horizontal;if(e.representation.type===iN.Image)return a&&l&&"center"!==l&&"rtl"===r?RH(l):l??s;if(e.isPseudoDimension&&void 0!==e.visibleMeasureInfoIndex){const{labelTextAlign:n}=t.visibleMeasureInfo[e.visibleMeasureInfoIndex]??{};return uV(n,s,r)}const{textAlign:u}=t.getDimensionInfo(e.dimensionInfoIndex)??{};return uV(u,s,r)},cB=()=>{},dB=({children:e,reactWindowStyle:t,cell:n,data:r,showTotalCellDivider:i,isLastRow:o,isLastColumn:a,isLeftColumn:s,isCellSelected:l,isAdjustingWidth:u,index:c})=>{const{styleService:d,layoutService:p}=QF(),{interactions:f}=XF(),{direction:h}=UF(),{isLocked:m,createMouseDownHandler:g,createMouseOverHandler:v,createPointerUpHandler:y}=jH(),{showLastBorder:b}=r,x=m(n)||n.isLockedByDimension,S=!(x||!f.active||!f.select||n.isEmpty||n.isNull||n.isPseudoDimension||n.isTotal||u),w=S?g(c,e=>lB(e,r)):void 0,C=S?v(c):void 0,E=S?y(c,e=>lB(e,r)):void 0,I=MW({isLeftColumn:s,layoutService:p,representation:n.representation});return Yn.jsx("div",{className:JA,title:f.passive?n.representation.text:void 0,style:{...t,...BN(o,a,d.grid.border,h,b),...UN({bottomDivider:i&&s,rightDivider:i&&!s,borderColor:d.grid.divider}),...WN,padding:"rtl"===h?"0px 0px 0px 4px":"0px 4px",cursor:XH(S),background:BH({styleService:d,isCellSelected:l,cell:n,isCellLocked:x}),zIndex:s?void 0:p.size.x-n.x,justifyContent:uB(n,p,s,h,I),display:"flex",...p.isIndentModeEnabled&&s&&{["rtl"===h?"paddingRight":"paddingLeft"]:Math.max(4,24*(n.indentLevel??0))},textAlign:cV(n,p)},"aria-hidden":"true",onMouseDown:w,onMouseOver:C,onPointerUp:E,onKeyUp:cB,role:"button",tabIndex:-1,"data-testid":"dimension-cell","data-x":n.x,"data-page-x":n.pageX,"data-y":n.y,"data-page-y":n.pageY,"data-cell-type":n.ref.qType,"data-dimension-info-index":n.dimensionInfoIndex,children:e})},pB=e=>{e.stopPropagation()},fB=({href:e,text:t,interactions:n,color:r})=>({href:e,title:t,rel:"noreferrer",target:"_blank",underline:"hover",onClick:pB,color:WO.LINK,style:{pointerEvents:n.active?"auto":"none",color:r??void 0,opacity:n.active&&n.passive||r?void 0:.4}}),hB=({href:e,text:t,interactions:n,color:r})=>Yn.jsx(zu,{...fB({href:e,text:t,interactions:n,color:r}),children:t}),mB=Y();mB.use(U),mB.renderer.prio(["canvas"]);const gB=(e,t)=>e&&"center"!==e&&"rtl"===t?RH(e):e,vB=({cell:e,representation:t,textStyle:n,imageContainerHorizontalAlignment:r})=>{const{imageBox:i}=t,{styleService:{grid:{lineClamp:o}}}=QF(),{direction:a}=UF();return Yn.jsxs("div",{style:{display:"grid",gridTemplateColumns:`${i?.width??24}px 1fr`,maxHeight:"fit-content",alignItems:"center",justifyContent:"flex-start",boxSizing:"border-box"},children:[Yn.jsx("div",{"data-key":"image-container--partial-image",style:{display:"flex",flexDirection:"column",justifyContent:WH(e),alignItems:gB(r,a),overflow:"hidden",boxSizing:"border-box",border:"4px solid transparent",width:i?.width??24,height:"100%"},children:Yn.jsx(sV,{representation:t,textStyle:n})}),Yn.jsx(zV,{padding:4/(o<=2?2:1),alignSelf:WH(e,!0),children:!!t.labelStructure&&oV(t.labelStructure)})]})},yB=({suffix:e,delimeter:t})=>` ${e?t:""} ${e}`,bB=({href:e,text:t,labelStructure:n,interactions:r,color:i})=>Yn.jsxs("span",{children:[Yn.jsx(zu,{...fB({href:e,text:t,interactions:r,color:i}),children:n?.maskedValue?n.maskedValue:n?.originalValue}),!!n&&yB(n)]}),xB=({children:e,textStyle:t,shouldEnableStickyText:n})=>Yn.jsx("span",{style:{...t,border:"4px solid transparent",boxSizing:"border-box",...n&&{alignSelf:"flex-start",position:"sticky",top:0}},children:e}),SB=({isLeftColumn:e,styleService:t,cell:n,isIndentModeEnabled:r})=>e?r?t.grid.lineClamp:Math.max(t.grid.lineClamp,n.leafCount*t.grid.lineClamp):t.grid.columnLineClamp,wB=({cell:e,isCellSelected:t,isLeftColumn:n})=>{const{direction:r}=UF(),{isActive:i}=jH(),{layoutService:o,styleService:a}=QF(),{interactions:s}=XF(),l=n&&o.isIndentModeEnabled;let u=n&&!e.isNull?(e=>{const{representation:{text:t,labelStructure:n}}=e;if(!n||!n.originalValue)return t;const{originalValue:r,maskedValue:i,suffix:o,delimeter:a}=n;return`${0!==i.length?i:r} ${o?a:""} ${o}`.trim()})(e):e.representation.text;if(e.isEmpty)return null;const c=(({cell:e,styleService:t,isCellSelected:n,isLeftColumn:r,isIndentModeEnabled:i})=>({...$N,...HN(SB({cell:e,isLeftColumn:r,styleService:t,isIndentModeEnabled:i})),color:GH({cell:e,styleService:t,isCellSelected:n}),fontWeight:UH({cell:e,styleService:t}),fontStyle:YH({cell:e,styleService:t}),textDecoration:KH({cell:e,styleService:t}),fontFamily:t.dimensionValues.fontFamily,fontSize:t.dimensionValues.fontSize}))({cell:e,styleService:a,isCellSelected:t,isLeftColumn:n,isIndentModeEnabled:o.isIndentModeEnabled});if(e.representation.type===iN.Image&&!e.isTotal&&!e.isNull){const{labelStructure:t}=e.representation,i=n&&t&&t.suffix?vB:lV;return Yn.jsx(i,{cell:e,representation:e.representation,leafCount:e.leafCount,textStyle:c,isLeftColumn:n,canExpandOrCollapse:e.ref.qCanCollapse||e.ref.qCanExpand,imageContainerHorizontalAlignment:uB(e,o,n,r)})}if(e.representation.type===iN.Link&&!i&&!e.isTotal){const t=n&&e.representation.labelStructure?bB:hB;u=Yn.jsx(t,{text:e.representation.text,labelStructure:e.representation.labelStructure,href:e.representation.url,interactions:s,color:e.expressionColor.color})}return Yn.jsx(xB,{shouldEnableStickyText:l,textStyle:{...c,...e.representation.type===iN.Image&&e.isNull?{alignSelf:WH(e)}:{}},children:u})},CB=({index:e,style:t,data:n})=>{const{styleService:r,layoutService:i}=QF(),{isSelected:o}=jH(),{isLeftColumn:a=!1,showLastBorder:s,itemCount:l,isLast:u,totalDividerIndex:c}=n,{isAdjustingWidth:d,setIsAdjustingWidth:p}=PV([n]),f=lB(e,n),h=a?e===l-1:u,m=a?u:e===l-1,g=Q$(f,c,i.isIndentModeEnabled);if(void 0===f){const{background:n}=r.dimensionValues;return Yn.jsx(eH,{style:{...t,background:n},index:e,isLastRow:h,isLastColumn:m,showLastBorder:s,isLeftColumn:a,showTotalCellDivider:g})}const v=o(f);return Yn.jsxs(dB,{reactWindowStyle:t,isLeftColumn:a,isLastRow:h,isLastColumn:m,isCellSelected:v,showTotalCellDivider:g,cell:f,data:n,isAdjustingWidth:d,index:e,children:[Yn.jsxs(tH,{verticalAlign:WH(f),width:nH(f.representation),right:f.isLeftColumn?void 0:4,isLeftColumn:a,children:[Yn.jsx(QH,{isLeftColumn:a,isCellSelected:v,cell:f}),Yn.jsx(wB,{isLeftColumn:a,isCellSelected:v,cell:f})]}),Yn.jsx(kV,{cellInfo:{...f,columnWidthLocation:f.isPseudoDimension?dN.Measures:dN.Dimension},columnWidth:t.width,isLastColumn:m,setIsAdjustingWidth:p})]})};var EB=o.memo(CB,j$);const IB=({list:e,listValues:t,isLastRow:n,getRightGridColumnWidth:r})=>i=>{const o=n?e[i]:t.at(i);return o&&0===i&&o.x>0?(o.leafCount+o.x+o.distanceToNextCell)*r():!n&&o?(o.leafCount+o.distanceToNextCell)*r():r(o?.x??i)},DB=(e,t,n,r)=>{const i=Object.values(e);let o,a=i.length;return r&&(a=n,o=t/a),{itemCount:a,estimatedItemSize:o,listValues:i}},PB=(e,t)=>n=>{e.current&&(e.current[t]=n)},MB={display:"flex",height:"fit-content",borderWidth:"1px 0px 0px 0px",...zN},RB={overflow:"hidden",willChange:"auto",flexShrink:0},kB=({leftGridRef:e,width:t,height:n,columnWidths:r,showLastBorder:i})=>{const{pageInfo:o,direction:a}=UF(),{layoutService:s,styleService:{contentCellHeight:l,grid:{divider:u}}}=QF(),{qSize:c}=s.layout.qHyperCube,{gridSectionsData:{leftDimensionData:d},visibleDimensionsInfo:{visibleLeftDimensionInfo:p}}=wW();sB(e,d),aB(e,t,n,l);const f=o.rowsOnCurrentPage*l,h={...MB,borderColor:u,width:r.reduce((e,t)=>e+t,0)};return Yn.jsx("div",{style:h,"data-section-id":"LEFT_GRID",children:d.grid.map((t,u)=>{const h=u===d.columnCount-1,m=oz(p[u]),{itemCount:g,estimatedItemSize:v,listValues:y}=DB(t,f,o.rowsOnCurrentPage,h),b=s.isIndentModeEnabled?()=>l:((e,t,n,r,i)=>o=>{const a=r?e[o]:t.at(o);if(a&&0===o&&a.pageY>0)return(a.leafCount+a.pageY+a.distanceToNextCell)*n;if(a&&a.leafCount>0){const e=a.y===i-a.leafCount;return(a.leafCount-(e?a.ref.qUp:0)+a.distanceToNextCell)*n}return n})(t,y,l,h,c.qcy);return Yn.jsx(T$,{ref:PB(e,u),style:{...RB,flexGrow:h?1:0,direction:a},height:n,width:r[u],itemCount:g,itemSize:b,layout:"vertical",itemData:{list:t,isLeftColumn:!0,isLast:h,itemCount:g,showLastBorder:i,listValues:y,totalDividerIndex:d.totalDividerIndex},itemKey:SV,estimatedItemSize:v,children:EB},m)})})};var LB=x(kB);const AB={overflow:"hidden",willChange:"auto"},OB=e=>({...zN,borderWidth:"rtl"===e?"0px 1px 0px 0px":"0px 0px 0px 1px"}),TB=({topGridRef:e,rowHightCallback:t,width:n,height:r,showLastBorder:i,getRightGridColumnWidth:o})=>{const{direction:a}=UF(),{layoutService:s,styleService:{grid:{divider:l},headerCellHeight:u}}=QF(),{gridSectionsData:{headersData:c,topDimensionData:d}}=wW(),p={...OB(a),borderColor:l,height:r};sB(e,d),aB(e,n,r,u);const f=s.size.x*o();return 0===d.rowCount?Yn.jsx("div",{style:{width:n,height:r,...OB(a)}}):Yn.jsx("div",{style:p,"data-section-id":"TOP_GRID",children:d.grid.map((r,l)=>{const u=l===d.rowCount-1,{itemCount:p,estimatedItemSize:h,listValues:m}=DB(r,f,s.size.x,u),g=(({layoutService:e,headersData:t,topRowIndex:n})=>{const r=t.data.at(n);if(void 0===r)return;const i=t.size.x-1,o=nB({layoutService:e,headersData:t,topRowIndex:n})?0:i,a=r.at(o),s=Array.isArray(a)?a.at(i):a;return s?e.getDimensionInfo(s.dimensionInfoIndex):void 0})({layoutService:s,headersData:c,topRowIndex:l}),v=g?oz(g):`empty ${l}`;return Yn.jsx(T$,{ref:PB(e,l),style:AB,height:t(),width:n,itemCount:p,itemSize:IB({list:r,listValues:m,isLastRow:u,getRightGridColumnWidth:o}),layout:"horizontal",itemData:{list:r,isLast:u,itemCount:p,showLastBorder:i,listValues:m,totalDividerIndex:d.totalDividerIndex},itemKey:SV,estimatedItemSize:h,direction:a,children:EB},v)})})};var qB=x(TB);const _B=()=>Yn.jsx(NB,{}),NB=()=>{const{styleService:{headerCellHeight:e,contentCellHeight:t}}=QF(),n=ZW(),r=(()=>{const{model:e}=XF(),t=m(async(t,n)=>{if(!e)throw new Error("No Model provided!");const{qReverseSort:r,dimensionInfoIndex:i,sortDirection:o}=t,a=[];if(n===o)return!1;a.push({qPath:`/qHyperCubeDef/qDimensions/${i}/qDef/qReverseSort`,qOp:"Replace",qValue:(!r).toString()});try{return await e.applyPatches(a,!0),!0}catch(e){return console.error("Error while applying patch: ",e),!1}},[e]);return t})(),{gridSectionsWrapperRefs:{headerGridWrapperRef:i,topGridWrapperRef:o,leftGridWrapperRef:a,dataGridWrapperRef:s},gridRefs:{topGridRef:l,leftGridRef:u,dataGridRef:c},scrollDirectionRefs:{verticalScrollDirection:d,horizontalScrollDirection:p},scrollbarsDimensions:{verticalScrollbarWidth:h,horizontalScrollbarHeight:g,resetHorizontalScrollbarHeight:v}}=JW(),{leftGridWidth:y,leftGridFullWidth:b,leftGridColumnWidths:x,rightGridFullWidth:S,showLastRightBorder:w,getRightGridColumnWidth:C,getHeaderCellsIconsVisibilityStatus:E,overrideLeftGridWidth:I}=function({tableWidth:e,verticalScrollbarWidth:t,resetHorizontalScrollbarHeight:n}){const{layoutService:r,styleService:i}=QF(),{gridSectionsData:{headersData:o}}=wW(),{measureText:a}=mj(i.header,{allowLineBreaks:!1}),s=zW({tableWidth:e}),l=WW({tableWidth:e,verticalScrollbarWidth:t,leftGridWidth:s.leftGridWidth}),u=s.leftGridWidth+l.rightGridFullWidth+1<e,c=m((e,t,n="")=>{let i=e;r.isIndentModeEnabled&&(i=1,1===o.size.x&&(i=0));const l=s.leftGridColumnWidths[i];let u=!1,c=!1,d=a(n)+IW;return t&&d+EW<=l&&(c=!0,d+=EW),d+EW<=l&&(u=!0),{shouldShowMenuIcon:u,shouldShowLockIcon:c}},[s.leftGridColumnWidths,a,r.isIndentModeEnabled,o.size.x]);return f(()=>{const e=s.leftGridWidth===s.leftGridFullWidth,t=l.rightGridWidth===l.rightGridFullWidth;e&&t&&n()},[n,s.leftGridWidth,s.leftGridFullWidth,l.rightGridWidth,l.rightGridFullWidth]),{...s,...l,showLastRightBorder:u,getHeaderCellsIconsVisibilityStatus:c}}({tableWidth:n.width,verticalScrollbarWidth:h,resetHorizontalScrollbarHeight:v}),{gridScaffoldDimensions:D,headerGridDims:P,topGridDims:M,leftGridDims:R,dataGridDims:k,metadata:{everyThingFitsInTableRectHeight:L,scrollbarsVisibilityStatus:A}}=(({cellHeights:{headerCellHeight:e,contentCellHeight:t},horizontalWidths:{leftGridWidth:n,leftGridOriginalWidth:r,rightGridOriginalWidth:i},scrollBarsDimensions:{verticalScrollbarWidth:o,horizontalScrollbarHeight:a}})=>{const s=ZW(),{pageInfo:l}=UF(),{gridSectionsData:{headersData:u,topDimensionData:c}}=wW(),d=Math.min(s.height*DW,Math.max(s.height*DW-25,s.height-t-a)),p=s.width*DW,f=l.rowsOnCurrentPage*t,h=Math.max(u.size.y,c.rowCount,1),m=e*h,g=e*h,v=Math.min(p,n),y=s.width-p,b=Math.max(y,s.width-v),x=Math.min(d,m,g),{availableHeight:S,everyThingFitsInTableRectHeight:w,everyThingFitsInTableRectWidth:C}=((e,t,n)=>{const r=t+1+n+o<=s.width,i=e+1+f+a,l=i-s.height<a||i<=s.height;return{availableHeight:l?i:s.height,everyThingFitsInTableRectHeight:l,everyThingFitsInTableRectWidth:r}})(x,v,b),E=S-d,I=Math.max(E,S-x),D=Math.min(I,f),P=Math.min(I,f),M=m+1+f,{visibilityStatus:R,metadata:{hasLeftGridOverflowX:k,hasDataGridOverflowX:L}}=(e=>{const{gridScaffold:{X_AXIS:{leftSectionWidth:t,rightSectionWidth:n},Y_AXIS:{topSectionHeight:r,bottomSectionHeight:i}},gridOriginalWidth:{X_AXIS:{leftSectionFullWidth:o,rightSectionFullWidth:a},Y_AXIS:{topSectionFullHeight:s,bottomSectionFullHeight:l}}}=e,u=s>r,c=o>t,d=a>n,p=l>i;return{visibilityStatus:{topGrid:{overflowX:"hidden",overflowY:u?"scroll":"hidden"},leftGrid:{overflowX:c?"scroll":"hidden",overflowY:"hidden"},dataGrid:{overflowX:d?"scroll":"hidden",overflowY:p?"scroll":"hidden"}},metadata:{hasTopGridOverflowY:u,hasLeftGridOverflowX:c,hasDataGridOverflowX:d,hasDataGridOverflowY:p}}})({gridScaffold:{X_AXIS:{leftSectionWidth:v,rightSectionWidth:b},Y_AXIS:{topSectionHeight:x,bottomSectionHeight:I}},gridOriginalWidth:{X_AXIS:{leftSectionFullWidth:r,rightSectionFullWidth:i},Y_AXIS:{topSectionFullHeight:g,bottomSectionFullHeight:M-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+(L?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:M-g+(!k&&L?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+(L?o:0),height:M-g+(!L&&k?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:R}}})({cellHeights:{headerCellHeight:e,contentCellHeight:t},horizontalWidths:{leftGridWidth:y,leftGridOriginalWidth:b,rightGridOriginalWidth:S},scrollBarsDimensions:{verticalScrollbarWidth:h,horizontalScrollbarHeight:g}}),O=m(()=>e,[e]),T=m(()=>t,[t]);return(()=>{const{downloadService:e}=QF();f(()=>{e.notifyIsDoneRendering()})})(),Yn.jsxs(e$,{style:D,children:[Yn.jsx("div",{style:{overflow:"hidden"},ref:i,children:Yn.jsx(oB,{tableWidth:n.width,leftGridWidth:y,columnWidths:x,getHeaderCellsIconsVisibilityStatus:E,rowHight:e,height:P.height,changeSortOrder:r,overrideLeftGridWidth:I})}),Yn.jsx(r$,{style:A.topGrid,origin:fN.TopGrid,ref:o,children:Yn.jsx(QW,{style:M.fullSizeWrapper,children:Yn.jsx(i$,{style:M.stickyWrapper,children:Yn.jsx(qB,{topGridRef:l,rowHightCallback:O,...M.self,showLastBorder:{right:w,bottom:!1},getRightGridColumnWidth:C})})})}),Yn.jsx(r$,{style:A.leftGrid,origin:fN.LeftGrid,ref:a,children:Yn.jsx(QW,{style:R.fullSizeWrapper,children:Yn.jsx(i$,{style:R.stickyWrapper,children:Yn.jsx(LB,{leftGridRef:u,...R.self,columnWidths:x,showLastBorder:{right:!1,bottom:L}})})})}),Yn.jsx(r$,{style:A.dataGrid,origin:fN.DataGrid,ref:s,children:Yn.jsx(QW,{style:k.fullSizeWrapper,children:Yn.jsx(i$,{style:k.stickyWrapper,children:Yn.jsx(IV,{dataGridRef:c,rowHightCallback:T,...k.self,showLastBorder:{right:w,bottom:L},getRightGridColumnWidth:C,verticalScrollDirection:d,horizontalScrollDirection:p})})})})]})},jB=()=>{const{keyboard:e,theme:t,interactions:n,translator:r}=XF(),{pageInfo:i,updatePageInfo:o,rect:a}=UF(),{layoutService:s}=QF(),{layout:l,hasData:u}=s;return Yn.jsxs(Yn.Fragment,{children:[u?Yn.jsx(_B,{}):null,Yn.jsx(tz,{}),Yn.jsx(BF,{paginationNeeded:i.shouldShowPagination,handleChangePage:e=>{o({page:e})},pageInfo:i,totalRowCount:i.totalRowCount,totalColumnCount:0,totalPages:i.totalPages,keyboard:e,translator:r,theme:t,interactions:n,rect:a,layout:l})]})};const FB=(e,{selections:t,baseObjects:n,coreServices:r,nebulaObjects:i},a)=>{const s=function(e){const t=lb();return t?.components?.MuiTable?.styleOverrides&&(t.components.MuiTable.styleOverrides.root={}),ha({...t,direction:e})}(n.direction);e.render(Yn.jsx(o.StrictMode,{children:Yn.jsx(Kb,{store:a,children:Yn.jsx(_a,{theme:s,children:Yn.jsx(JF,{...i,children:Yn.jsx(YF,{...n,children:Yn.jsx(FH,{selections:t,children:Yn.jsx(ez,{...r,children:Yn.jsx(CW,{children:Yn.jsx(jB,{})})})})})})})})}))};var zB=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}(zB||{}),WB=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}(WB||{}),$B=function(e){return e.Grid="grid",e.Divider="grid.divider",e.LabelName="label.name",e.LabelValue="label.value",e}($B||{}),HB=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}(HB||{});const VB=e=>e?`${parseInt(e,10)}px`:void 0,BB=(e,t)=>{if(t){const n=e.getColorPickerColor(t);return"none"===n?NN.Transparent:n}},GB=(e,t)=>+(parseInt(e,10)*_N*t+8).toFixed(2),UB=(e,t)=>void 0===e?t:e.some(e=>"bold"===e)?TN:"normal",YB=e=>e?.some(e=>"italic"===e)?"italic":"normal",KB=e=>e?.some(e=>"underline"===e)?"underline":"none",XB=document.createElement("textarea");function JB(e){XB.value=e,document.body.appendChild(XB),XB.select(),XB.setSelectionRange(0,XB.value.length),document.execCommand("copy"),document.body.removeChild(XB)}XB.style.position="absolute",XB.style.left="-9999px",XB.setAttribute("readonly","");function ZB(e){q?.((t,n)=>{const r=n.target,i=r?.closest(`.${JA}`);i?.title&&t.addItem({translation:"contextMenu.copyCellValue",icon:"lui-icon lui-icon--copy",tid:"copy-cell-context-item",id:"copy-cell-context-item",select:()=>{(e=>{const t=e.title;t&&(navigator.clipboard?.writeText?navigator.clipboard.writeText(t).catch(()=>{JB(t)}):JB(t))})(i)}}),e?.forEach(e=>{e(t,n,i)})})}const QB=({model:e,layoutService:t,effectivePropertiesService:n,translator:r})=>rj((i,o,a)=>{if(!e||n.qAlwaysFullyExpanded)return;const s=e,l=i.addItem({translation:"Object.PivotTable.ContextMenu.ExpandCollapse",tid:"expand-collapse-group",id:"expand-collapse-group"}),{qEffectiveDimensionName:u,label:c}=((e,t)=>{const n=((e,t)=>{const n=e?.getAttribute("data-dimension-info-index");if("string"==typeof n)return t.getDimensionInfo(+n)})(e,t);return"object"==typeof n?{qEffectiveDimensionName:n.qEffectiveDimensionName,label:n.qFallbackTitle}:{qEffectiveDimensionName:void 0,label:void 0}})(a,t);l.addItem((e=>({icon:"lui-icon lui-icon--plus",translation:"Object.PivotTable.ContextMenu.ExpandAll",tid:"expand-all",select:async()=>{try{await e.expandTop(nz,0,0,!0),await e.expandLeft(nz,0,0,!0)}catch(e){console.error("Failed to expand all",e)}}}))(s)),"string"==typeof u&&l.addItem((({model:e,effectivePropertiesService:t,qEffectiveDimensionName:n,label:r,translator:i})=>({icon:"lui-icon lui-icon--plus",translation:i.get("SNPivotTable.ContextMenu.ExpandDimension",[r??""]),tid:"expand-dimension",id:"expand-dimension",select:VV({model:e,qExpansionState:t.qExpansionState,qEffectiveDimensionName:n,action:WV.Expand})}))({model:s,effectivePropertiesService:n,qEffectiveDimensionName:u,label:c,translator:r})),l.addItem((e=>({icon:"lui-icon lui-icon--minus",translation:"Object.PivotTable.ContextMenu.CollapseAll",tid:"collapse-all",select:async()=>{try{await e.collapseTop(nz,0,0,!0),await e.collapseLeft(nz,0,0,!0)}catch(e){console.error("Failed to collapse all",e)}}}))(s)),"string"==typeof u&&l.addItem((({model:e,effectivePropertiesService:t,qEffectiveDimensionName:n,label:r,translator:i})=>({icon:"lui-icon lui-icon--minus",translation:i.get("SNPivotTable.ContextMenu.CollapseDimension",[r??""]),tid:"collapse-dimension",id:"collapse-dimension",select:VV({model:e,qExpansionState:t.qExpansionState,qEffectiveDimensionName:n,action:WV.Collapse})}))({model:s,effectivePropertiesService:n,qEffectiveDimensionName:u,label:c,translator:r}))},[e,t,n]),eG=(e,t)=>M(()=>(({layout:e})=>{const{qHyperCube:t,nullValueRepresentation:n,snapshotData:r}=e,{qNoOfLeftDims:i,qEffectiveInterColumnSortOrder:o,qMeasureInfo:a,qDimensionInfo:s}=t,l=!!r,u=r?.content?.rowsPerPage??15e3,c={x:Math.min(e.qHyperCube.qSize.qcx,qN),y:Math.min(e.qHyperCube.qSize.qcy,u)},d=o.slice(0,i),p=e=>d.some(t=>t===e),f=p(rz),h=new Map(o.map(e=>[s[e]??rz,e])),m=a.filter(e=>7005!==e.qError?.qErrorCode);return{layout:e,getNullValueText:()=>n?.text??"-",getMeasureInfoIndexFromCellIndex:(e,t=!1)=>{if(f)return 0;const n=e%m.length;return t?n:a.findIndex(e=>e===m[n])},getDimensionInfo:e=>e===rz?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:tO.Auto,pixels:eO.PixelsDefault,percentage:eO.PercentageDefault},searchSortFromDimension:"inherit"===e.search?.sorting}})({layout:e}),[e,t]),tG=({model:e,layoutService:t,viewService:n,pageInfo:r,rect:i})=>{const{layout:o,isSnapshot:a,triggerdByExpandOrCollapse:s}=t,l=(e=>{const t=oj(e);return t.current=e,t})(gW(i));return dj(async()=>{const{qHyperCube:t}=o,{maxNumberOfVisibleRows:i,maxNumberOfVisibleColumns:u}=l.current;if(a)return o.snapshotData?.content?.qPivotDataPages??[];if(void 0!==e&&"getHyperCubePivotData"in e&&(((e,t,n,r)=>!!e&&(t.gridColumnStartIndex+t.gridWidth>=r||t.gridRowStartIndex+t.gridHeight>=n))(s,n,i,u)||((e,t,n,r)=>{const{qHyperCube:{qPivotDataPages:i,qSize:o}}=e,{qTop:a,qWidth:s,qHeight:l}=i[0]?.qArea??{qTop:0,qWidth:0,qHeight:0};return a<t.page*t.rowsPerPage||s<Math.min(r,o.qcx)||l<Math.min(n,o.qcy)})(o,r,i,u))){const t=((e,t,n,r,i,o)=>{const a=r.page*r.rowsPerPage,s=Math.min(a+r.rowsPerPage,n.qcy),l=Math.min(qN,n.qcx);if(n.qcy<a)return null;let u=0,c=a;if(e){u=t.gridColumnStartIndex,c=a+t.gridRowStartIndex;const e=c+t.gridHeight,n=t.gridColumnStartIndex+t.gridWidth;e>s&&(c=Math.max(0,s-i)),n>l&&(u=Math.max(0,l-o))}return{qLeft:u,qTop:c,qWidth:Math.min(l-u,o),qHeight:Math.min(s-c,i)}})(s,n,o.qHyperCube.qSize,r,i,u);return t?e.getHyperCubePivotData(nz,vW(t)):[]}return t.qPivotDataPages},[o,a,e,n,r.page,r.rowsPerPage,l,s])},nG=({rowsPerPage:e,totalRowCount:t,page:n})=>Math.min(e,t-n*e),rG=(e,t,n=15e3)=>({rowsPerPage:n,totalPages:Math.max(1,Math.ceil(e/n)),totalRowCount:e,rowsOnCurrentPage:nG({rowsPerPage:n,totalRowCount:e,page:t})}),iG=15,oG=({layoutService:e,viewService:t,rect:n,model:r,pageInfo:i})=>{const{freeResize:o}=R();return _(async e=>{const o=e;if(!o.snapshotData||!r||o.snapshotData.content)return o;if("getHyperCubePivotData"in r){const{scrollTop:e,scrollLeft:a,leftGridScrollLeft:s,topGridScrollTop:l}=t,u=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:i,gridWidth:o,gridHeight:a}=e,s=t.page*t.rowsPerPage,l=Math.max(r-iG,0),u=Math.max(s+i-iG,s,0),c=qN-l,d=s+t.rowsOnCurrentPage-u;if((e=>0===e.gridWidth&&0===e.gridHeight)(e)){const{maxNumberOfVisibleColumns:e,maxNumberOfVisibleRows:t}=gW(n);return{qLeft:l,qTop:u,qWidth:Math.min(c,e+30),qHeight:Math.min(d,t+30)}}return{qLeft:l,qTop:u,qWidth:Math.min(c,o+30),qHeight:Math.min(d,a+30)}})(t,i,n),c=vW(u),d={qLeft:0,qTop:i.page*i.rowsPerPage,qWidth:1,qHeight:1};o.snapshotData.content={qPivotDataPages:await r.getHyperCubePivotData(nz,[d,...c]),scrollTop:e,scrollLeft:a,leftGridScrollLeft:s,topGridScrollTop:l,page:i.page,rowsPerPage:i.rowsPerPage},o.snapshotData.object.size.w=n.width,o.snapshotData.object.size.h=n.height}return o}),N(()=>({getViewState:()=>((e,t)=>({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,leftGridScrollLeft:e.leftGridScrollLeft,topGridScrollTop:e.topGridScrollTop,renderPage:t.page}))(t,i)}),[t]),e.layout.snapshotData?.content&&!o?{left:n.left,top:n.top,width:e.layout.snapshotData.object.size.w,height:e.layout.snapshotData.object.size.h}:n};var aG={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 sG=()=>{const e=j(),t=e.language();return M(()=>{!function(e){const t="SNPivotTable_LimitedData";e.get(t)===t&&Object.keys(aG).forEach(t=>{e.add(aG[t])})}(e)},[e]),{translator:e,language:t}},lG=e=>{const t=M(()=>Gb(),[]),{flags:n}=e,r=F(),i=(e=>{const t=M(()=>yj.createRoot(e),[e]);return A(()=>()=>{t.unmount()},[t]),t})(r),o=z(),a=W(),s=$(),l=H(),u=V(),c=(()=>{const{viewState:e}=R(),t=oj(new Set),n=void 0!==window.qlikprinting,{promise:r,resolve:i}=M(()=>nj(),[]),o=rj(e=>{t.current.add(e)},[t]),a=rj(Iq(async()=>{await Promise.all(t.current),t.current.clear(),i()},1e3),[i,t]);return k(async()=>{await r},[r]),M(()=>({viewState:e,isDownloadedAsPDForImage:n,notifyIsDoneRendering:a,waitForPromise:o}),[a,n,e,o])})(),d=((e,t)=>{const[n]=dj(async()=>{if(void 0!==e&&!t.snapshotData&&"getEffectiveProperties"in e)return{...await e.getEffectiveProperties()}},[e,t]);return M(()=>{const e=void 0!==n?.qHyperCubeDef.qSortbyYValue&&1===Math.abs(n.qHyperCubeDef.qSortbyYValue),t=n?.qHyperCubeDef.qDimensions.map(e=>e.qDef?.qSortCriterias)??[];return{qAlwaysFullyExpanded:n?.qHyperCubeDef.qAlwaysFullyExpanded??!1,qExpansionState:n?.qHyperCubeDef.qExpansionState,isSortedByFirstMeasure:e,getSortCriteriaForDimension:e=>t[e]}},[n])})(a,o),p=eG(o,n),f=(e=>{const t=T();return{...t,select:!!t.active&&!!t.select&&!e,active:!!t.active&&!e,scroll:!!t.active}})(p.isSnapshot),h=B(),m=cj(o,r),{translator:g,language:v}=sG(),{pageInfo:y,updatePageInfo:b}=((e,t)=>{const{size:n,layout:{qHyperCube:{qSize:r}}}=e,i=t.isDownloadedAsPDForImage||e.isSnapshot,o=(e=>e.layout.snapshotData?.content?.rowsPerPage)(e),[a,s]=L(()=>{const a=((e,t)=>t.isDownloadedAsPDForImage?t.viewState?.renderPage??0:e.isSnapshot?e.layout.snapshotData?.content?.page??0:0)(e,t);return{page:a,shouldShowPagination:r.qcy>n.y&&!i,...rG(r.qcy,a,o)}}),l=e.layout.qHyperCube.qSize.qcy;return A(()=>{s(t=>({...t,...rG(l,t.page,o),shouldShowPagination:l>e.size.y&&!i}))},[l,e.size.y,s,i,o]),A(()=>{const{page:e,totalPages:t}=a;if(e+1>t){const e=t-1,n=nG({...a,page:e});s({...a,page:e,rowsOnCurrentPage:n})}},[a]),{pageInfo:a,updatePageInfo:e=>{s({...a,...e,rowsOnCurrentPage:nG({...a,...e})})}}})(p,c),x=((e,t,n)=>M(()=>((e,t)=>{if(e.isDownloadedAsPDForImage){const{viewState:t}=e;return{gridColumnStartIndex:0,gridRowStartIndex:0,gridWidth:0,gridHeight:0,scrollTop:t?.scrollTop??0,scrollLeft:t?.scrollLeft??0,leftGridScrollLeft:t?.leftGridScrollLeft??0,topGridScrollTop:t?.topGridScrollTop??0}}return{gridColumnStartIndex:0,gridRowStartIndex:0,gridWidth:0,gridHeight:0,scrollTop:t?.content?.scrollTop??0,scrollLeft:t?.content?.scrollLeft??0,leftGridScrollLeft:t?.content?.leftGridScrollLeft??0,topGridScrollTop:t?.content?.topGridScrollTop??0}})(n,t.snapshotData),[n,e.page,t.snapshotData]))(y,o,c),S=oG({rect:G(),layoutService:p,viewService:x,model:a,pageInfo:y}),[w,C]=tG({model:a,layoutService:p,viewService:x,pageInfo:y,rect:S}),E=M(()=>((e,t)=>{const n=t.layout.components?.find(e=>"theme"===e.key),r=n?.header,i=n?.dimensionValues,o=n?.measureValues,a=n?.measureLabels,s=n?.totalValues,l=n?.nullValues,u=n?.grid,c=(t,n,r)=>e.getStyle(t,n,r),d=+(u?.[zB.LineClamp]??c(WB.Grid,$B.Grid,HB.LineClamp)??1),p=+(u?.[zB.ColumnLineClamp]??c(WB.Grid,$B.Grid,HB.ColumnLineClamp)??1),f=BB(e,r?.[zB.Background])??c(WB.Dimension,$B.LabelName,HB.BackgroundColor)??NN.Transparent,h={header:{fontSize:VB(r?.[zB.FontSize])??c(WB.Dimension,$B.LabelName,HB.FontSize)??AN,fontFamily:r?.[zB.FontFamily]??c(WB.Dimension,$B.LabelName,HB.FontFamily)??ON,fontWeight:UB(r?.[zB.FontStyle],TN),fontStyle:YB(r?.[zB.FontStyle]),textDecoration:KB(r?.[zB.FontStyle]),color:BB(e,r?.[zB.FontColor])??c(WB.Dimension,$B.LabelName,HB.FontColor)??WO.TEXT,background:f,hoverBackground:qq(f,nO),activeBackground:qq(f,rO)},dimensionValues:{fontSize:VB(i?.[zB.FontSize])??c(WB.Dimension,$B.LabelValue,HB.FontSize)??AN,fontFamily:i?.[zB.FontFamily]??c(WB.Dimension,$B.LabelValue,HB.FontFamily)??ON,fontWeight:UB(i?.[zB.FontStyle],void 0),fontStyle:YB(i?.[zB.FontStyle]),textDecoration:KB(i?.[zB.FontStyle]),color:BB(e,i?.[zB.FontColor])??c(WB.Dimension,$B.LabelValue,HB.FontColor)??WO.TEXT,background:BB(e,i?.[zB.Background])??c(WB.Dimension,$B.LabelValue,HB.BackgroundColor)??NN.Transparent},measureValues:{fontSize:VB(o?.[zB.FontSize])??c(WB.Measure,$B.LabelValue,HB.FontSize)??AN,fontFamily:o?.[zB.FontFamily]??c(WB.Measure,$B.LabelValue,HB.FontFamily)??ON,fontWeight:UB(o?.[zB.FontStyle],"normal"),fontStyle:YB(o?.[zB.FontStyle]),textDecoration:KB(o?.[zB.FontStyle]),color:BB(e,o?.[zB.FontColor])??c(WB.Measure,$B.LabelValue,HB.FontColor)??NN.FontSecondary,background:BB(e,o?.[zB.Background])??c(WB.Measure,$B.LabelValue,HB.BackgroundColor)??NN.Transparent},measureLabels:{fontWeight:UB(a?.[zB.FontStyle],"normal"),fontStyle:YB(a?.[zB.FontStyle]),textDecoration:KB(a?.[zB.FontStyle]),color:BB(e,a?.[zB.FontColor])??c(WB.Measure,$B.LabelName,HB.FontColor)??NN.FontSecondary,background:BB(e,a?.[zB.Background])??c(WB.Measure,$B.LabelName,HB.BackgroundColor)??NN.Transparent},totalValues:{fontWeight:UB(s?.[zB.FontStyle],TN),fontStyle:YB(s?.[zB.FontStyle]),textDecoration:KB(s?.[zB.FontStyle]),color:BB(e,s?.[zB.FontColor])??c(WB.Total,$B.LabelValue,HB.FontColor)??WO.TEXT,background:BB(e,s?.[zB.Background])??c(WB.Total,$B.LabelValue,HB.BackgroundColor)??NN.Transparent},nullValues:{fontWeight:UB(l?.[zB.FontStyle],"normal"),fontStyle:YB(l?.[zB.FontStyle]),textDecoration:KB(l?.[zB.FontStyle]),color:BB(e,l?.[zB.FontColor])??c(WB.Null,$B.LabelValue,HB.FontColor)??WO.TEXT,background:BB(e,l?.[zB.Background])??c(WB.Null,$B.LabelValue,HB.BackgroundColor)??NN.NullValueBackground},grid:{columnLineClamp:p,lineClamp:d,border:BB(e,u?.[zB.Border])??c(WB.Grid,$B.Grid,HB.BorderColor)??NN.DividerLight,divider:BB(e,u?.[zB.Divider])??c(WB.Grid,$B.Divider,HB.BorderColor)??NN.DividerDark,background:BB(e,u?.[zB.Background])??c(WB.Grid,$B.Grid,HB.BackgroundColor)??NN.Transparent},selectedColors:Tq(e)};return h.headerCellHeight=Math.max(GB(h.header.fontSize,p),GB(h.dimensionValues.fontSize,p),32),h.contentCellHeight=Math.max(GB(h.measureValues.fontSize,d),GB(h.dimensionValues.fontSize,d),24),h.dimensionValueTextHeight=GB(h.dimensionValues.fontSize,1),h})(m,p),[m,p]),I=((e,t,n)=>{const[,r,i]=dj(async()=>{const t=yT(n.flags),r=e.getStyle("","","fontFamily"),i=e.getStyle("object","label.name","fontFamily"),o=e.getStyle("object","label.value","fontFamily"),a=e.getStyle("","","fontFamilies")??[];return Promise.all([...t,...a,r,i,o,bj].filter(e=>void 0!==e).map(async e=>{await document.fonts.load(`600 12px ${e}`),await document.fonts.load(`12px ${e}`)}))},[t,e,n]);return i?(console.warn("Failed to load fonts:",i),!0):!r})(m,o,e),{direction:D}=R();ZB([QB({model:a,layoutService:p,effectivePropertiesService:d,translator:g})]),A(()=>{!C&&a&&!!w&&I&&FB(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])},uG={version:"7.27.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:[]},cG=()=>({...uG,qHyperCubeDef:{...uG.qHyperCubeDef,qIndentMode:!1}})}}});
|