@nebula.js/sn-table 6.63.0 → 6.64.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/core/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @nebula.js/sn-table v6.
|
|
2
|
+
* @nebula.js/sn-table v6.64.0
|
|
3
3
|
* Copyright (c) 2026 QlikTech International AB
|
|
4
4
|
* Released under the MIT license.
|
|
5
5
|
*/
|
|
@@ -99,7 +99,7 @@ function Ui(e,t){let r;return r=t?ki(e).withConfig({displayName:t.label,shouldFo
|
|
|
99
99
|
*
|
|
100
100
|
* This source code is licensed under the MIT license found in the
|
|
101
101
|
* LICENSE file in the root directory of this source tree.
|
|
102
|
-
*/function yR(){if(mR)return US;mR=1,Object.defineProperty(US,"__esModule",{value:!0}),US.default=function(t){return(0,e.createStyles)(t)};var e=vR;return US}var xR,SR,wR={},CR={};function ER(){if(xR)return CR;xR=1;var e=jl();Object.defineProperty(CR,"__esModule",{value:!0}),CR.default=void 0;var t=(0,e(BS()).default)();return CR.default=t,CR}function RR(){if(SR)return wR;SR=1;var e=jl();Object.defineProperty(wR,"__esModule",{value:!0}),wR.default=void 0;var t=e(hu()),r=vR,n=e(ER());var o=function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,r.makeStyles)(e,(0,t.default)({defaultTheme:n.default},o))};return wR.default=o,wR}var AR,IR,MR={},kR={};function DR(){if(AR)return kR;AR=1;var e=jl();Object.defineProperty(kR,"__esModule",{value:!0}),kR.isUnitless=function(e){return String(parseFloat(e)).length===String(e).length},kR.getUnit=r,kR.toUnitless=n,kR.convertLength=function(e){return function(t,o){var i=r(t);if(i===o)return t;var a=n(t);if("px"!==i)if("em"===i)a=n(t)*n(e);else if("rem"===i)return a=n(t)*n(e),t;var s=a;if("px"!==o)if("em"===o)s=a/n(e);else{if("rem"!==o)return t;s=a/n(e)}return parseFloat(s.toFixed(5))+o}},kR.alignProperty=function(e){var t=e.size,r=e.grid,n=t-t%r,o=n+r;return t-n<o-t?n:o},kR.fontGrid=function(e){var t=e.lineHeight,r=e.pixels,n=e.htmlFontSize;return r/(t*n)},kR.responsiveProperty=function(e){var r=e.cssProperty,n=e.min,o=e.max,i=e.unit,a=void 0===i?"rem":i,s=e.breakpoints,l=void 0===s?[600,960,1280]:s,u=e.transform,c=void 0===u?null:u,d=(0,t.default)({},r,"".concat(n).concat(a)),p=(o-n)/l[l.length-1];return l.forEach(function(e){var o=n+p*e;null!==c&&(o=c(o)),d["@media (min-width:".concat(e,"px)")]=(0,t.default)({},r,"".concat(Math.round(1e4*o)/1e4).concat(a))}),d};var t=e(oy());function r(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function n(e){return parseFloat(e)}return kR}function PR(){if(IR)return MR;IR=1;var e=jl();Object.defineProperty(MR,"__esModule",{value:!0}),MR.default=function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=o.breakpoints,a=void 0===i?["sm","md","lg"]:i,s=o.disableAlign,l=void 0!==s&&s,u=o.factor,c=void 0===u?2:u,d=o.variants,p=void 0===d?["h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","caption","button","overline"]:d,f=(0,t.default)({},e);f.typography=(0,t.default)({},f.typography);var h=f.typography,m=(0,n.convertLength)(h.htmlFontSize),g=a.map(function(e){return f.breakpoints.values[e]});return p.forEach(function(e){var o=h[e],i=parseFloat(m(o.fontSize,"rem"));if(!(i<=1)){var a=i,s=1+(a-1)/c,u=o.lineHeight;if(!(0,n.isUnitless)(u)&&!l)throw new Error((0,r.formatMuiErrorMessage)(6));(0,n.isUnitless)(u)||(u=parseFloat(m(u,"rem"))/parseFloat(i));var d=null;l||(d=function(e){return(0,n.alignProperty)({size:e,grid:(0,n.fontGrid)({pixels:4,lineHeight:u,htmlFontSize:h.htmlFontSize})})}),h[e]=(0,t.default)({},o,(0,n.responsiveProperty)({cssProperty:"fontSize",min:s,max:a,unit:"rem",breakpoints:g,transform:d}))}}),f};var t=e(hu()),r=Vv,n=DR();return MR}var TR,qR={};function OR(){if(TR)return qR;TR=1;var e=jl();Object.defineProperty(qR,"__esModule",{value:!0}),qR.default=void 0;var t=e(hu()),r=vR,n=e(ER()),o=function(e){var o=(0,r.styled)(e);return function(e,r){return o(e,(0,t.default)({defaultTheme:n.default},r))}};return qR.default=o,qR}var LR,NR={};function jR(){if(LR)return NR;LR=1;var e=jl();Object.defineProperty(NR,"__esModule",{value:!0}),NR.default=function(){return(0,t.useTheme)()||r.default};var t=vR;e(S);var r=e(ER());return NR}var _R,zR={};function FR(){if(_R)return zR;_R=1;var e=jl();Object.defineProperty(zR,"__esModule",{value:!0}),zR.default=void 0;var t=e(hu()),r=vR,n=e(ER());var o=function(e,o){return(0,r.withStyles)(e,(0,t.default)({defaultTheme:n.default},o))};return zR.default=o,zR}var $R,BR,HR={};function VR(){if($R)return HR;$R=1;var e=jl();Object.defineProperty(HR,"__esModule",{value:!0}),HR.default=void 0;var t=vR,r=e(ER()),n=(0,t.withThemeCreator)({defaultTheme:r.default});return HR.default=n,HR}function WR(){return BR||(BR=1,function(e){var t=jl(),r=(Cv||(Cv=1,function(e){var t;e.exports=function(e,r){if(!r&&e&&e.__esModule)return e;var n,o,i=Object.defineProperty,a={__proto__:null,default:e};if(Object(e)!==e)return a;if(t||"function"!=typeof WeakMap||(t=new WeakMap),t){if(t.has(e))return t.get(e);t.set(e,a)}for(o in e)"default"!==o&&{}.hasOwnProperty.call(e,o)&&((n=i&&Object.getOwnPropertyDescriptor(e,o))&&(n.get||n.set)?i(a,o,n):a[o]=e[o]);return a},e.exports.__esModule=!0,e.exports.default=e.exports}(Rv)),Rv.exports);Object.defineProperty(e,"__esModule",{value:!0});var n={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 i.default}}),Object.defineProperty(e,"createMuiTheme",{enumerable:!0,get:function(){return i.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 o=Wv();Object.keys(o).forEach(function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(n,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))});var i=r(BS()),a=t(WS()),s=t(yR()),l=t(RR()),u=t(PR()),c=t(OR()),d=jS();Object.keys(d).forEach(function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(n,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return d[t]}}))});var p=t(jR()),f=t(FR()),h=t(VR()),m=vR}(Ev)),Ev}var UR=WR();UR.alpha(Dt.GREYSCALE_0,.05),UR.alpha(Dt.GREEN_PALE,.5),UR.alpha(Dt.BLUE_PALE,.5),UR.alpha(Dt.GREEN_PALE,.5),UR.alpha(Dt.BLUE_PALE,.5),UR.alpha(Dt.GREEN_PALE,.5),UR.alpha(Dt.BLUE_PALE,.5),UR.alpha(Dt.GREEN_PALE,.5),UR.alpha(Dt.BLUE_PALE,.5),UR.alpha(Dt.GREEN_PALE,.5),UR.alpha(Dt.BLUE_PALE,.5),import.meta.env&&import.meta.env.MODE;!function(e=()=>{try{return window.localStorage}catch(e){return void("production"!==(import.meta.env?import.meta.env.MODE:void 0)&&"undefined"!=typeof window&&console.warn(e))}},t){var r;let n,o;const i={getItem:(r,i)=>{var a,s;const l=e=>{if(n!==(e=e||"")){try{o=JSON.parse(e,null==t?void 0:t.reviver)}catch(e){return i}n=e}return o},u=null!=(s=null==(a=e())?void 0:a.getItem(r))?s:null;return(e=>"function"==typeof(null==e?void 0:e.then))(u)?u.then(l):l(u)},setItem:(t,r)=>{var n;return null==(n=e())?void 0:n.setItem(t,JSON.stringify(r,void 0))},removeItem:t=>{var r;return null==(r=e())?void 0:r.removeItem(t)}};let a;try{a=null==(r=e())?void 0:r.subscribe}catch(e){}var s;!a&&"undefined"!=typeof window&&"function"==typeof window.addEventListener&&window.Storage&&(a=(t,r)=>{if(!(e()instanceof window.Storage))return()=>{};const n=n=>{n.storageArea===e()&&n.key===t&&r(n.newValue)};return window.addEventListener("storage",n),()=>{window.removeEventListener("storage",n)}}),a&&(i.subscribe=(s=a,(e,r,n)=>s(e,e=>{let o;try{o=JSON.parse(e||"",null==t?void 0:t.reviver)}catch(e){o=n}r(o)})))}();const GR=(e,t,r)=>(t.has(r)?t:t.set(r,e())).get(r),KR=new WeakMap,YR=()=>{};function XR(e,t=YR){return((e,t,r)=>{const n=GR(()=>new WeakMap,KR,t);return GR(e,n,r)})(()=>{const r=new WeakMap,n=new WeakMap,o=zg(0),i=zg([]);i.INTERNAL_onInit=e=>{e.set(i,[()=>e.set(o,e=>e+1)])},"production"!==(import.meta.env?import.meta.env.MODE:void 0)&&(o.debugPrivate=!0,i.debugPrivate=!0);const a=zg(s=>{let l;s(o);try{l=s(a)}catch(e){}const u=s(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=>{n.set(u,e);const[t]=s(i);t()},e=>{r.set(u,e);const[t]=s(i);t()}),r.has(u)){if(l&&"e"in l&&l.p===u)return l;const e=r.get(u);return l&&"v"in l?{p:u,e:e,v:l.v}:{p:u,e:e}}return n.has(u)?{p:u,v:n.get(u)}:l&&"v"in l?{p:u,f:t(l.v),v:l.v}:{p:u,f:t()}});return a.init=void 0,"production"!==(import.meta.env?import.meta.env.MODE:void 0)&&(a.debugPrivate=!0),zg(e=>{const t=e(a);if("e"in t)throw t.e;return"f"in t?t.f:t.v},(t,r,...n)=>r(e,...n))},e,t)}const JR=new WeakMap;function ZR(e,t){const r=Vg(t),n=QR(r);for(const[o,...i]of e)n.has(o)&&!(null==t?void 0:t.dangerouslyForceHydrate)||(n.add(o),r.set(o,...i))}const QR=e=>{let t=JR.get(e);return t||(t=new WeakSet,JR.set(e,t)),t};function eA(){return Boolean("undefined"!=typeof process&&process.env?.NODE_ENV&&!1)}const tA="INTERNAL_getBuildingBlocksRev",rA=Number(Object.keys(Ng).find(e=>e.startsWith(tA))?.slice(29));if(Number.isNaN(rA))throw new Error("jotai-compat: unsupported jotai internals revision");const nA=Ng,oA=`INTERNAL_getBuildingBlocksRev${rA}`,iA=nA[`INTERNAL_initializeStoreHooksRev${rA}`],aA=[["atomStateMap","a"],["mountedMap","m"],["invalidatedAtoms","i"],["changedAtoms","c"],["mountCallbacks","q"],["unmountCallbacks","Q"],["storeHooks","h"],["atomRead","R"],["atomWrite","W"],["atomOnInit","I"],["atomOnMount","M"],["ensureAtomState","e"],["flushCallbacks","f"],["recomputeInvalidatedAtoms","C"],["readAtomState","r"],["invalidateDependents","d"],["writeAtomState","w"],["mountDependencies","D"],["mountAtom","t"],["unmountAtom","T"],["setAtomStateValueOrPromise","v"],["storeGet","g"],["storeSet","s"],["storeSub","b"],["enhanceBuildingBlocks","B"],["abortHandlersMap","p"],["registerAbortHandler","H"],["abortPromise","A"],["storeEpochHolder","E"]];if(rA>=4)for(const[e,t]of aA)if(nA[`INTERNAL_KEY_${e}`]!==t)throw new Error(`jotai-compat: KEY drift for ${e}`);const sA={};aA.forEach(([e,t],r)=>{sA[`INTERNAL_KEY_${e}`]=rA>=4?t:r});const{INTERNAL_KEY_mountedMap:lA,INTERNAL_KEY_changedAtoms:uA,INTERNAL_KEY_storeHooks:cA,INTERNAL_KEY_ensureAtomState:dA,INTERNAL_KEY_flushCallbacks:pA,INTERNAL_KEY_recomputeInvalidatedAtoms:fA,INTERNAL_KEY_readAtomState:hA,INTERNAL_KEY_invalidateDependents:mA,INTERNAL_KEY_writeAtomState:gA,INTERNAL_KEY_mountDependencies:bA,INTERNAL_KEY_setAtomStateValueOrPromise:vA}=sA,yA=nA[oA],xA=new WeakMap;function SA(e){const t=zg(()=>[]),r=zg(function(e){const[n,o,i]=e(t);i.has(r)&&(n.forEach(e),++o.n)});return r.effect=e,r.INTERNAL_onInit=e=>{const n=(e=>{const t=yA(e);let r=xA.get(t);return r||(r=Array.isArray(t)?[]:{},aA.forEach(([e,n],o)=>{const i={value:Object.prototype.hasOwnProperty.call(t,n)?t[n]:t[o],enumerable:!0};Object.defineProperty(r,o,i),Object.defineProperty(r,n,i)}),xA.set(t,r)),r})(e),o=n[lA],i=n[uA],a=iA(n[cA]),s=n[dA],l=n[pA],u=n[fA],c=n[hA],d=n[mA],p=n[gA],f=n[bA],h=n[vA],m=new Set;let g,b=0,v=!1,y=!1,x=!1;function S(){if(b)return;m.clear();let t=!0;const w=i=>{if(x)return e.get(i);if(i===r){const t=s(n,e,i);if(!ag(t)){if(!og(i))throw new Error("no atom init");h(n,e,i,i.init)}return sg(t)}const a=c(n,e,i);try{return sg(a)}finally{C.d.set(i,a.n),o.get(i)?.t.add(r),t?m.add(i):o.has(i)&&(f(n,e,r),u(n,e),l(n,e))}};w.peek=e.get;const E=(o,...c)=>{const m=s(n,e,o);try{if(++b,o===r){if(!og(o))throw new Error("atom not writable");const t=m.n,r=c[0];return h(n,e,o,r),f(n,e,o),void(t!==m.n&&(i.add(o),a.c?.(o),d(n,e,o)))}return p(n,e,o,c)}finally{t||(u(n,e),l(n,e)),--b}};E.recurse=(t,...o)=>{if(x){if(eA())throw new Error("set.recurse is not allowed in cleanup")}else try{return v=!0,f(n,e,r),E(t,...o)}finally{u(n,e),v=!1,y&&(y=!1,S())}};try{g?.();const e=r.effect(w,E);if("function"!=typeof e)return;g=()=>{if(!b)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(n,e,t).n)}),f(n,e,r),u(n,e)}}const w=function(e,t){let r=wA.get(e);r||(r=new Set,wA.set(e,r),t.f.add(function(){for(const e of r)r.delete(e),e()}));return r}(e,a),C=s(n,e,r);C.v=void 0,Object.assign(e.get(t),[m,C,o]),a.c.add(r,function(){i.delete(r)}),a.m.add(r,function(){w.add(S),g&&w.delete(g)}),a.u.add(r,function(){w.delete(S),g&&w.add(g)}),a.c.add(r,function(){v?y=!0:w.add(S)})},eA()&&(Object.defineProperty(t,"debugLabel",{get:()=>r.debugLabel?`${r.debugLabel}:ref`:void 0,configurable:!0,enumerable:!0}),t.debugPrivate=!0),r}const wA=new WeakMap;const CA=async(e,t,r)=>{if("dimension"===e.type)if(e.isAlternative)try{await t.moveDimensionFromAlternative(e.id)}catch(t){r.error({msg:`Failed to move dimension ${e.id} from alternative`,payload:t})}else try{await t.moveDimensionToAlternative(e.id)}catch(t){r.error({msg:`Failed to move dimension ${e.id} to alternative`,payload:t})}if("measure"===e.type)if(e.isAlternative)try{await t.moveMeasureFromAlternative(e.id)}catch(t){r.error({msg:`Failed to move measure ${e.id} from alternative`,payload:t})}else try{await t.moveMeasureToAlternative(e.id)}catch(t){r.error({msg:`Failed to move measure ${e.id} to alternative`,payload:t})}},EA=e=>{const{items:t,handler:r,model:n,handlerQueue:o,logToSentry:i}=e;void 0!==r&&void 0!==n&&o&&o.add(async()=>{for(const e of t)await CA(e,r,i)})},RA=zg(),AA=zg(),IA=zg(),MA=zg(e=>e(IA)?.translate??(e=>e)),kA=zg(e=>t=>e(IA)?.getBooleanFlag(t,!1)??!1),DA=zg(""),PA=zg(e=>{const t=e(DA).toLowerCase().trim();return({title:e})=>e.toLowerCase().trim().includes(t)});class TA{#e=[];#t=!1;#r=!1;#n;#o;#i;#a;constructor({onQueueCompleted:e}){this.#n=e}#s(){this.#o=void 0,this.#i=void 0,this.#a=void 0}pause(){this.#o&&(clearTimeout(this.#a),this.#i?.(),this.#s());const{promise:e,resolve:t}=Promise.withResolvers();this.#o=e,this.#i=t,this.#a=setTimeout(()=>{this.abort("Aborting queue after being paused for too long")},6e4)}async continue(e=0){const t=this.#i;await(e=>new Promise(t=>{setTimeout(t,e)}))(e),t===this.#i&&(t?.(),clearTimeout(this.#a),this.#s())}abort(e="Queue aborted"){clearTimeout(this.#a),(this.#e.length>0||this.#t)&&console.warn(`[SequentialPromiseQueue] ${e}`),this.#r=!0,this.#e=[],this.#i?.(),this.#s()}add(e){this.#e.push(e),this.#t||this.#l()}async#l(){if(!this.#t){for(this.#t=!0,this.#r=!1;this.#e.length>0;)if(this.#o)await this.#o;else try{const e=this.#e.shift();await(e?.())}catch(e){return console.error("[SequentialPromiseQueue] Error executing action:",e),this.#e=[],void(this.#t=!1)}try{this.#r||await(this.#n?.())}catch(e){console.error("[SequentialPromiseQueue] Error executing onQueueCompleted:",e)}finally{this.#t=!1,this.#e.length>0&&this.#l()}}}}const qA=zg(null),OA=SA((e,t)=>{const r=e(RA),n=e(AA),o=new TA({onQueueCompleted:async()=>{if(!r||!n)return;const e=n.properties.qHyperCubeDef,t=Date.now();e.qDimensions.length&&Object.assign(e.qDimensions[0],{patchTimeStamp:t}),e.qMeasures.length&&Object.assign(e.qMeasures[0],{patchTimeStamp:t}),await r.applyPatches([{qPath:"/qHyperCubeDef",qOp:"replace",qValue:JSON.stringify(n.properties.qHyperCubeDef)}],!0)}});t(qA,o);const i=()=>{o.pause()},a=()=>{o.continue(500)},s=()=>{o.abort()};return r?.Invalidated?.bind(i),r?.Validated?.bind(a),r?.Cancelled?.bind(s),r?.Closing?.bind(s),()=>{o.abort(),r?.Invalidated?.unbind(i),r?.Validated?.unbind(a),r?.Cancelled?.unbind(s),r?.Closing?.unbind(s)}}),LA=e=>e.qDef?.cId,NA=(e=[])=>new Set(e.map(LA).filter(e=>void 0!==e)),jA=({effectiveActive:e,effectiveExcluded:t,currentKnown:r})=>{const n=NA(r),o=NA([...e,...t]),i=new Set,a=r.filter(e=>{const t=LA(e);return!(!t||o.has(t)||i.has(t))&&(i.add(t),!0)}),s=t.flatMap((e,t)=>{const r=LA(e);return void 0===r||n.has(r)?[]:[t]});return{kept:t.filter((e,t)=>!s.includes(t)),missing:a,removedIndexes:s}},_A=(e,t)=>{if(!("qHyperCubeDef"in t))return e;const r=e.qHyperCubeDef,n=t.qHyperCubeDef,o=r.qLayoutExclude?.qHyperCubeDef,i=n.qLayoutExclude?.qHyperCubeDef,a=jA({effectiveActive:r.qDimensions??[],effectiveExcluded:o?.qDimensions??[],currentKnown:[...n.qDimensions??[],...i?.qDimensions??[]]}),s=jA({effectiveActive:r.qMeasures??[],effectiveExcluded:o?.qMeasures??[],currentKnown:[...n.qMeasures??[],...i?.qMeasures??[]]});if(![a,s].some(({missing:e,removedIndexes:t})=>e.length>0||t.length>0))return e;const l=[...a.kept,...a.missing],u=[...s.kept,...s.missing],c=((e,t)=>{if(!e)return;const r=new Set(t),n=Object.entries(e).filter(([e])=>r.has(e)).sort((e,t)=>e[1]-t[1]).map(([e])=>e),o=new Set(n),i=[...r].filter(e=>!o.has(e));return Object.fromEntries([...n,...i].map((e,t)=>[e,t]))})(r.qLayoutExclude?.allColumnOrder,[...NA(r.qDimensions??[]),...NA(r.qMeasures??[]),...NA(l),...NA(u)]);return{...e,qHyperCubeDef:{...r,qLayoutExclude:{...r.qLayoutExclude,...c&&{allColumnOrder:c},qHyperCubeDef:{...r.qLayoutExclude?.qHyperCubeDef,qDimensions:l,qMeasures:u}}}}},zA=e=>7005!==e.qError?.qErrorCode,FA=new WeakMap,$A={qInfo:{qType:"AlternativeLayout"},qHyperCubeDef:{qMode:"S",qDimensions:[],qMeasures:[],qInitialDataFetch:[{qTop:0,qLeft:0,qHeight:0,qWidth:0}],excludedNoOfLeftDims:-1,qCalcCond:{qv:"0"}}},BA=XR(zg(async e=>{const t=e(RA),r=e(mb);if(t){if(FA.has(t))return FA.get(t);try{const e=await t.app.createSessionObject($A);return FA.set(t,e),e}catch(e){return void r.error({msg:"Error creating alternative layout model",payload:e})}}})),HA=zg(null),VA=zg(),WA=SA((e,t)=>{const r=e(RA),n=e(BA),o=e(mb),i=e(kA),a=e(AA);let s=0,l=!1;if(!r||!n)return;const u=async()=>{s++;try{const e=await r.getLayout();if(e.qSelectionInfo?.qInSelections)return;const o=structuredClone(await r.getEffectiveProperties()),s=i("VNA-760-show-added-columns-exploration")?_A(o,await r.getProperties()):o;await n.applyPatches([{qOp:"replace",qPath:"/qHyperCubeDef/qDimensions",qValue:JSON.stringify(s.qHyperCubeDef.qLayoutExclude?.qHyperCubeDef?.qDimensions??[])},{qOp:"replace",qPath:"/qHyperCubeDef/qMeasures",qValue:JSON.stringify(s.qHyperCubeDef.qLayoutExclude?.qHyperCubeDef?.qMeasures??[])}]);const l=await n.getLayout();s!==o&&a?.setProperties(structuredClone(s)),t(VA,{layout:structuredClone(e),properties:s,altLayout:structuredClone(l)}),t(HA,null)}catch(e){o.error({msg:"Failed to synchronize table layout",payload:e})}finally{s--,0===s&&l&&(l=!1,c())}},c=async()=>{if(s>0)return void(l=!0);const e=await n.getLayout();t(VA,t=>({...t,altLayout:structuredClone(e)}))};return u(),r.Invalidated.bind(u),n.Invalidated.bind(c),()=>{r.Invalidated.unbind(u),n.Invalidated.unbind(c)}}),UA=zg(e=>e(VA)?.layout),GA=zg(e=>e(VA)?.altLayout),KA=zg(e=>e(VA)?.properties),YA=zg(e=>void 0===e(UA)||void 0===e(KA)),XA=zg(e=>{const t=e(VA)?.layout;return t?.qHyperCube.qDimensionInfo.filter(zA)??[]}),JA=zg(e=>{const t=e(VA)?.layout;return t?.qHyperCube.qMeasureInfo.filter(zA)??[]}),ZA=zg(e=>{const t=[...e(XA),...e(JA)].map(e=>e.cId);return new Set(t)}),QA=zg(new Set),eI=zg(new Set),tI=zg(e=>{const t=e(QA),r=e(eI);return e(ZA).difference(r).union(t)}),rI=SA((e,t)=>{e(ZA),t(QA,new Set),t(eI,new Set)}),nI=zg(e=>e(tI),(e,t,r)=>{if("string"!=typeof r.id)return;const n=e(tI).has(r.id),o=new Set(e(eI)),i=new Set(e(QA));n?(o.add(r.id),i.delete(r.id)):(i.add(r.id),o.delete(r.id)),t(eI,o),t(QA,i),EA({items:[r],handler:e(AA),model:e(RA),handlerQueue:e(qA),logToSentry:e(mb)})}),oI=({props:e,children:t})=>(ZR([[RA,e.args.model],[IA,e.args.apis],[AA,e.args.handler]]),Jg(WA),Jg(OA),Jg(rI),t);function iI(e,t){const r=new Set(e),n=new Set(t);return e===t||r.size===n.size&&Array.from(r).every(n.has.bind(n))}function aI(e){return"write"in e}const sI="INTERNAL_getBuildingBlocksRev";var lI;const uI=Number(null==(lI=Object.keys(Ng).find(e=>e.startsWith(sI)))?void 0:lI.slice(29));if(Number.isNaN(uI))throw new Error("jotai-compat: unsupported jotai internals revision");const cI=Ng,dI=`INTERNAL_getBuildingBlocksRev${uI}`,pI=cI[`INTERNAL_buildStoreRev${uI}`];const fI=[["atomStateMap","a"],["mountedMap","m"],["invalidatedAtoms","i"],["changedAtoms","c"],["mountCallbacks","q"],["unmountCallbacks","Q"],["storeHooks","h"],["atomRead","R"],["atomWrite","W"],["atomOnInit","I"],["atomOnMount","M"],["ensureAtomState","e"],["flushCallbacks","f"],["recomputeInvalidatedAtoms","C"],["readAtomState","r"],["invalidateDependents","d"],["writeAtomState","w"],["mountDependencies","D"],["mountAtom","t"],["unmountAtom","T"],["setAtomStateValueOrPromise","v"],["storeGet","g"],["storeSet","s"],["storeSub","b"],["enhanceBuildingBlocks","B"],["abortHandlersMap","p"],["registerAbortHandler","H"],["abortPromise","A"],["storeEpochHolder","E"]];if(uI>=4)for(const[e,t]of fI)if(cI[`INTERNAL_KEY_${e}`]!==t)throw new Error(`jotai-compat: KEY drift for ${e}`);const hI={};fI.forEach(([e,t],r)=>{hI[e]=uI>=4?t:r});const{atomStateMap:mI,mountedMap:gI,invalidatedAtoms:bI,changedAtoms:vI,mountCallbacks:yI,unmountCallbacks:xI,storeHooks:SI,atomRead:wI,atomWrite:CI,atomOnInit:EI,atomOnMount:RI,ensureAtomState:AI,flushCallbacks:II,recomputeInvalidatedAtoms:MI,readAtomState:kI,invalidateDependents:DI,writeAtomState:PI,mountDependencies:TI,mountAtom:qI,unmountAtom:OI,setAtomStateValueOrPromise:LI,storeGet:NI,storeSet:jI,storeSub:_I,enhanceBuildingBlocks:zI,abortHandlersMap:FI,registerAbortHandler:$I,abortPromise:BI,storeEpochHolder:HI}=hI,VI=cI[dI],WI=new WeakMap,UI=new WeakMap,GI={},{read:KI,write:YI}=zg(null);function XI(e,t,r){const[n,o,i,,a]=e,s=n.get(t);if(s)return s;if(r===e){let n=o.get(t);return n||(n=[eM(e,t,r),r],o.set(t,n)),n}const l=r??GI;let u=i.get(l);u||(u=new WeakMap,i.set(l,u));let c=u.get(t);if(!c){const[n,o]=a?XI(a,t,r):[t];c=[t.read===KI?n:eM(e,t,o),o],u.set(t,c)}return c}function JI(e){for(const t of e[5])t()}function ZI(e,t,r,n,o){if(r.read===KI&&aI(r)&&aI(t)&&r.write!==YI&&e!==n){const{write:i}=r;return t.write=QI(e,r.write.bind(r),n,o),()=>{t.write=i}}}function QI(e,t,r,n=r){return function(o,i,...a){return t(function(t){const[n]=XI(e,t,r);return o(n)},function(t,...o){const[a]=XI(e,t,r),s=ZI(e,a,t,r,n);try{return i(a,...o)}finally{null==s||s()}},...a)}}function eM(e,t,r){const n=Object.getOwnPropertyDescriptors(t);Object.keys(n).filter(e=>["read","write","debugLabel"].includes(e)).forEach(e=>n[e].configurable=!0);const o=Object.getPrototypeOf(t),i=Object.create(o,n);return i.read!==KI&&(i.read=function(e,t,r){return function(n,o){return t(function(t){const[o]=XI(e,t,r);return n(o)},o)}}(e,t.read.bind(t),r)),aI(i)&&aI(t)&&i.write!==YI&&(i.write=QI(e,t.write.bind(t),r)),i}function tM({atoms:e=[],atomFamilies:t=[],parentStore:r,name:n}){const o=new WeakSet(e),i=UI.get(r),a=(null==i?void 0:i[3])??r,s=[new WeakMap,new WeakMap,new WeakMap,a,i,new Set,void 0],l=s[0],u=s[5],c=function(e){const t=e[3],r=rM((e=>{const t=VI(e);let r=WI.get(t);return r||(r=Array.isArray(t)?[]:{},fI.forEach(([e,n],o)=>{const i={value:Object.prototype.hasOwnProperty.call(t,n)?t[n]:t[o],enumerable:!0};Object.defineProperty(r,o,i),Object.defineProperty(r,n,i)}),WI.set(t,r)),r})(t)),n=r,o=n[hI.storeGet],i=n[hI.storeSet],a=n[hI.storeSub],s={};let l,u;return n[hI.storeGet]=m(o),n[hI.storeSet]=f,n[hI.storeSub]=m(a),r[hI.enhanceBuildingBlocks]=function(e){return l??(l=g(e[hI.atomStateMap],c)),u??(u=Object.assign(rM(e),{...e,[hI.atomStateMap]:l,[hI.mountedMap]:g(e[hI.mountedMap],d),[hI.invalidatedAtoms]:g(e[hI.invalidatedAtoms]),[hI.changedAtoms]:b(e[hI.changedAtoms]),[hI.mountCallbacks]:e[hI.mountCallbacks],[hI.unmountCallbacks]:e[hI.unmountCallbacks],[hI.storeHooks]:y(e[hI.storeHooks]),[hI.atomRead]:m(e[hI.atomRead]),[hI.atomWrite]:m(e[hI.atomWrite]),[hI.atomOnInit]:m(e[hI.atomOnInit]),[hI.atomOnMount]:m(e[hI.atomOnMount]),[hI.ensureAtomState]:p(l,e[hI.ensureAtomState]),[hI.flushCallbacks]:(t,...n)=>e[hI.flushCallbacks](r,...n),[hI.recomputeInvalidatedAtoms]:(t,...n)=>e[hI.recomputeInvalidatedAtoms](r,...n),[hI.readAtomState]:m(e[hI.readAtomState]),[hI.invalidateDependents]:m(e[hI.invalidateDependents]),[hI.writeAtomState]:m(e[hI.writeAtomState]),[hI.mountDependencies]:m(e[hI.mountDependencies]),[hI.mountAtom]:m(e[hI.mountAtom]),[hI.unmountAtom]:m(e[hI.unmountAtom]),[LI]:m(e[LI]),[hI.storeGet]:m(e[hI.storeGet]),[hI.storeSet]:m(e[hI.storeSet]),[hI.storeSub]:m(e[hI.storeSub]),[hI.enhanceBuildingBlocks]:()=>e})),u},function(e){if(uI<4){const t=e?Object.values(e):[];return pI(...t)}const t=Array.isArray(e)?Object.fromEntries(fI.map(([t,r],n)=>[r,e[n]])):e;return pI(t)}(r);function c(t){const r=new WeakMap;return function(n){let o=r.get(n);if(o)return o;const i=t(n);if(!i)return;let a,s;return o=new Proxy(i,{get:(t,r)=>"d"===r?a??(a=g(i.d,function(t){return r=>t(XI(e,r)[0])})):"p"===r?s??(s=b(i.p)):Reflect.get(i,r)}),r.set(n,o),o}}function d(e){const t=new WeakMap;return function(r){let n=t.get(r);if(n)return n;const o=e(r);return o?(n={...o,d:b(o.d),t:b(o.t),get u(){return o.u},set u(e){o.u=e}},t.set(r,n),n):void 0}}function p(e,t){const r=m(t);return function(t,n,o){const i=e.get(o);if(i)return i;const a=r(t,n,o);return e.set(o,a),e.get(o)}}function f(t,r,n,...o){const[a,s]=XI(e,n),l=ZI(e,a,n,s,e);try{return i(t,r,a,...o)}finally{null==l||l()}}function h(t,r){return function(n,...o){const[i]=XI(e,n);return(r?r(t):t)(i,...o)}}function m(t){return function(n,o,i,...a){const[s]=XI(e,i);return t(r,o,s,...a)}}function g(e,t){const r={get:h(e.get.bind(e),t),set:h(e.set.bind(e)),has:h(e.has.bind(e)),delete:h(e.delete.bind(e))};if("function"==typeof e.keys){const t=e,n=r;n.keys=t.keys.bind(t),n[Symbol.iterator]=t[Symbol.iterator].bind(t),Object.defineProperty(r,"size",{enumerable:!1,configurable:!0,get:()=>t.size})}return r}function b(t){return{get size(){return t.size},add:h(t.add.bind(t)),has:h(t.has.bind(t)),delete:h(t.delete.bind(t)),clear:t.clear.bind(t),forEach:e=>t.forEach(h(e)),*[Symbol.iterator](){for(const r of t)yield XI(e,r)[0]}}}function v(t){if(!t)return;const r=h(t);return r.add=function(r,n){if(void 0===r)return t.add(void 0,n);const[o]=XI(e,r);return t.add(o,n)},r}function y(e){const t={get f(){return e.f},set f(t){e.f=t}};return Object.defineProperties(t,Object.fromEntries(["r","c","m","u"].map(t=>[t,{get:()=>s[t]??(s[t]=v(e[t])),set(r){delete s[t],e[t]=r},configurable:!0,enumerable:!0}]))),Object.assign(t,e)}}(s);s[6]=c,Object.assign(c,{name:n}),UI.set(c,s);for(const t of new Set(e))l.set(t,[eM(s,t,s),s]);for(const e of new Set(t)){for(const t of e.getParams()){const r=e(t);l.has(r)||l.set(r,[eM(s,r,s),s])}const t=e.unstable_listen(({type:e,atom:t})=>{"CREATE"!==e||l.has(t)?"REMOVE"===e&&!o.has(t)&&l.delete(t):l.set(t,[eM(s,t,s),s])});u.add(t)}return c}function rM(e){return Array.isArray(e)?[...e]:{...e}}const nM=function(e,t){return function(r){const{atoms:n=[],atomFamilies:o=[],children:i,scope:a,name:s}=r,l=t(),u=Array.from(n,e=>Array.isArray(e)?e[0]:e);function c(){return[a??tM({atoms:u,atomFamilies:o,parentStore:l,name:s}),function(e){return l!==e.parentStore||!iI(u,e.atoms)||!iI(o,e.atomFamilies)||a!==e.providedScope}]}const[[d,p],f]=I(c);if(p({atoms:u,atomFamilies:o,parentStore:l,providedScope:a})){const e=UI.get(d);e&&JI(e),f(c)}return ZR(Array.from(n).filter(Array.isArray),{store:d}),P(()=>{const e=UI.get(d);return()=>{e&&JI(e)}},[d]),w(e,{store:d,children:i})}}(Wg,Vg);var oM=Object.defineProperty,iM=Object.defineProperties,aM=Object.getOwnPropertyDescriptors,sM=Object.getOwnPropertySymbols,lM=Object.prototype.hasOwnProperty,uM=Object.prototype.propertyIsEnumerable,cM=(e,t,r)=>t in e?oM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,dM=(e,t)=>{for(var r in t||(t={}))lM.call(t,r)&&cM(e,r,t[r]);if(sM)for(var r of sM(t))uM.call(t,r)&&cM(e,r,t[r]);return e},pM=(e,t)=>iM(e,aM(t));function fM(e,t,r){if(t===r)return e;const n=e.slice();return n.splice(r,0,n.splice(t,1)[0]),n}function hM(e,t){const r=String(t);return Object.prototype.hasOwnProperty.call(e,r)?r:void 0}function mM(e){return"initialIndex"in e&&"number"==typeof e.initialIndex&&"index"in e&&"number"==typeof e.index}function gM(e,t){return function(e,t,r){var n,o;const{source:i,target:a,canceled:s}=t.operation;if(!i||!a||s)return"preventDefault"in t&&t.preventDefault(),e;const l=(e,t)=>e===t||null!==e&&"object"==typeof e&&"id"in e&&e.id===t;if(Array.isArray(e)){const n=e.findIndex(e=>l(e,i.id)),o=e.findIndex(e=>l(e,a.id));if(-1===n||-1===o){if(mM(i)){const n=i.initialIndex,o=i.index;return n===o||n<0||n>=e.length?("preventDefault"in t&&t.preventDefault(),e):r(e,n,o)}return e}if(!s&&"index"in i&&"number"==typeof i.index){const t=i.index;if(t!==n)return r(e,n,t)}return r(e,n,o)}const u=Object.entries(e);let c,d,p=-1,f=-1;for(const[e,t]of u)if(-1===p&&(p=t.findIndex(e=>l(e,i.id)),-1!==p&&(c=e)),-1===f&&(f=t.findIndex(e=>l(e,a.id)),-1!==f&&(d=e)),-1!==p&&-1!==f)break;if(-1===p&&mM(i)){const n=null==i.initialGroup?void 0:hM(e,i.initialGroup),o=i.initialIndex,a=null==i.group?void 0:hM(e,i.group),s=i.index;if(null==n||null==a)return"preventDefault"in t&&t.preventDefault(),e;if(n===a&&o===s)return"preventDefault"in t&&t.preventDefault(),e;if(n===a)return pM(dM({},e),{[n]:r(e[n],o,s)});const l=e[n][o];return pM(dM({},e),{[n]:[...e[n].slice(0,o),...e[n].slice(o+1)],[a]:[...e[a].slice(0,s),l,...e[a].slice(s)]})}if(!i.manager)return e;const{dragOperation:h}=i.manager,m=null!=(o=null==(n=h.shape)?void 0:n.current.center)?o:h.position.current;if(null==d){const t=hM(e,a.id);null!=t&&(d=t,f=a.shape&&m.y>a.shape.center.y?e[t].length:0)}if(null==c||null==d||c===d&&p===f){if(null!=c&&c===d&&p===f&&mM(i)){const t=null==i.group?void 0:hM(e,i.group),n=null!=i.group&&t!==c,o=i.index!==p;if(n||o){const n=null==i.group?c:t;if(null!=n){if(c===n)return pM(dM({},e),{[c]:r(e[c],p,i.index)});const t=e[c][p];return pM(dM({},e),{[c]:[...e[c].slice(0,p),...e[c].slice(p+1)],[n]:[...e[n].slice(0,i.index),t,...e[n].slice(i.index)]})}}}return"preventDefault"in t&&t.preventDefault(),e}if(c===d)return pM(dM({},e),{[c]:r(e[c],p,f)});const g=a.shape&&Math.round(m.y)>Math.round(a.shape.center.y)?1:0,b=e[c][p];return pM(dM({},e),{[c]:[...e[c].slice(0,p),...e[c].slice(p+1)],[d]:[...e[d].slice(0,f+g),b,...e[d].slice(f+g)]})}(e,t,fM)}function bM(e,t){let r=null;const n=new Map,o=new Set;function i(o){let s;if(void 0===t)s=n.get(o);else for(const[e,r]of n)if(t(e,o)){s=r;break}if(void 0!==s){if(!r?.(s[1],o))return s[0];i.remove(o)}const l=e(o);return n.set(o,[l,Date.now()]),a("CREATE",o,l),l}function a(e,t,r){for(const n of o)n({type:e,param:t,atom:r})}return i.unstable_listen=e=>(o.add(e),()=>{o.delete(e)}),i.getParams=()=>n.keys(),i.remove=e=>{if(void 0===t){if(!n.has(e))return;const[t]=n.get(e);n.delete(e),a("REMOVE",e,t)}else for(const[r,[o]]of n)if(t(r,e)){n.delete(r),a("REMOVE",r,o);break}},i.setShouldRemove=e=>{if(r=e,r)for(const[e,[t,o]]of n)r(o,e)&&(n.delete(e),a("REMOVE",e,t))},i}const vM=({itemIndex:e,sectionIndex:t})=>void 0!==e?`${t}-${e}`:`${t}`,yM=zg(),xM=zg(e=>e(yM)?.numberOfSections??0),SM=zg(e=>e(yM)?.numberOfItemsInSection??[]),wM=zg(e=>e(yM)?.keyExtractor??vM),CM=zg(e=>e(yM)?.emptyTexts??(()=>({title:"No items",message:"There are no items to display."}))),EM=zg(e=>e(yM)?.onDragEnd),RM=zg(e=>e(yM)?.onDragOver),AM=zg(e=>e(yM)?.itemRenderer),IM=zg(e=>e(yM)?.headerRenderer),MM=zg(e=>e(yM)?.dragOverlayRenderer),kM=zg(e=>e(yM)?.onClick),DM=zg(e=>{const t=e(xM),r=e(SM),n=e(wM),o={};for(let e=0;e<t;e++)o[e]=Array.from({length:r[e]},(t,r)=>n({sectionIndex:e,itemIndex:r}));return o}),PM=zg(null),TM=zg(e=>e(PM),(e,t,r)=>{if(null===r)return void t(PM,null);const n=e(PM);t(PM,{...n,...r})}),qM=bM(e=>zg(null,(t,r,n)=>{let o;"over"===e?o=t(RM):"end"===e&&(o=t(EM),r(TM,null));const{source:i,target:a}=n.operation;if("start"===e)return void r(TM,{id:i.id,startSection:i.data.sectionKey,startIndex:i.data.itemIndex,startSectionIndex:i.data.sectionIndex});if(null===a)return void r(TM,{toIndex:void 0,toSectionIndex:void 0});const s=i.data.sectionIndex!==a.data.sectionIndex;let l;if(s){const e=gM(t(DM),n)[a.data.sectionIndex].indexOf(i.id);l=-1!==e?e:a.sortable?.index??0}else l=a.sortable?.index??0;if("over"===e){const e=t(TM)?.startIndex;r(TM,{toIndex:!s&&void 0!==e&&l>e?l+1:l,toSectionIndex:a.data.sectionIndex})}o?.({id:i.id,toIndex:l,toSection:a.data.sectionKey,fromSection:i.data.sectionKey,startSection:t(TM)?.startSection??i.data.sectionKey,event:n})})),OM=[yM,xM,SM,wM,CM,EM,AM,IM,kM,TM],LM=[qM],NM=({props:e,children:t})=>{const r=Zg(yM);return L(()=>{r(e)},[e,r]),t};var jM=Symbol.for("preact-signals");function _M(){if(VM>1)VM--;else{var e,t=!1;for(!function(){var e=KM;for(KM=void 0;void 0!==e;){var t=e.S;if(t.v===e.v)for(var r=t.t;void 0!==r;r=r.x)r.i===e.i&&(r.i=t.i);e=e.o}}();void 0!==HM;){var r=HM;for(HM=void 0,WM++;void 0!==r;){var n=r.u;if(r.u=void 0,r.f&=-3,!(8&r.f)&&QM(r))try{r.c()}catch(r){t||(e=r,t=!0)}r=n}}if(WM=0,VM--,t)throw e}}function zM(e){if(VM>0)return e();GM=++UM,VM++;try{return e()}finally{_M()}}var FM,$M=void 0;function BM(e){var t=$M,r=FM;$M=void 0,FM=void 0;try{return e()}finally{$M=t,FM=r}}var HM=void 0,VM=0,WM=0,UM=0,GM=0,KM=void 0,YM=0;function XM(e){if(void 0!==$M){var t=e.n;if(void 0===t||t.t!==$M)return t={i:0,S:e,p:$M.s,n:void 0,t:$M,e:void 0,x:void 0,r:t},void 0!==$M.s&&($M.s.n=t),$M.s=t,e.n=t,32&$M.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=$M.s,t.n=void 0,$M.s.n=t,$M.s=t),t}}function JM(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 ZM(e,t){return new JM(e,t)}function QM(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 ek(e){for(var t=e.s;void 0!==t;t=t.n){var r=t.S.n;if(void 0!==r&&(t.r=r),t.S.n=t,t.i=-1,void 0===t.n){e.s=t;break}}}function tk(e){for(var t=e.s,r=void 0;void 0!==t;){var n=t.p;-1===t.i?(t.S.U(t),void 0!==n&&(n.n=t.n),void 0!==t.n&&(t.n.p=n)):r=t,t.S.n=t.r,void 0!==t.r&&(t.r=void 0),t=n}e.s=r}function rk(e,t){JM.call(this,void 0,t),this.x=e,this.s=void 0,this.g=YM-1,this.f=4}function nk(e,t){return new rk(e,t)}function ok(e){var t=e.m;if(e.m=void 0,"function"==typeof t){VM++;var r=$M;$M=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,ik(e),t}finally{$M=r,_M()}}}function ik(e){for(var t=e.s;void 0!==t;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,ok(e)}function ak(e){if($M!==this)throw new Error("Out-of-order effect");tk(this),$M=e,this.f&=-2,8&this.f&&ik(this),_M()}function sk(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,FM&&FM.push(this)}function lk(e,t){var r=new sk(e,t);try{r.c()}catch(e){throw r.d(),e}var n=r.d.bind(r);return n[Symbol.dispose]=n,n}JM.prototype.brand=jM,JM.prototype.h=function(){return!0},JM.prototype.S=function(e){var t=this,r=this.t;r!==e&&void 0===e.e&&(e.x=r,this.t=e,void 0!==r?r.e=e:BM(function(){var e;null==(e=t.W)||e.call(t)}))},JM.prototype.U=function(e){var t=this;if(void 0!==this.t){var r=e.e,n=e.x;void 0!==r&&(r.x=n,e.e=void 0),void 0!==n&&(n.e=r,e.x=void 0),e===this.t&&(this.t=n,void 0===n&&BM(function(){var e;null==(e=t.Z)||e.call(t)}))}},JM.prototype.subscribe=function(e){var t=this;return lk(function(){var r=t.value;BM(function(){return e(r)})},{name:"sub"})},JM.prototype.valueOf=function(){return this.value},JM.prototype.toString=function(){return this.value+""},JM.prototype.toJSON=function(){return this.value},JM.prototype.peek=function(){var e=this;return BM(function(){return e.value})},Object.defineProperty(JM.prototype,"value",{get:function(){var e=XM(this);return void 0!==e&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(WM>100)throw new Error("Cycle detected");!function(e){0!==VM&&0===WM&&e.l!==GM&&(e.l=GM,KM={S:e,v:e.v,i:e.i,o:KM})}(this),this.v=e,this.i++,YM++,VM++;try{for(var t=this.t;void 0!==t;t=t.x)t.t.N()}finally{_M()}}}}),rk.prototype=new JM,rk.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===YM)return!0;if(this.g=YM,this.f|=1,this.i>0&&!QM(this))return this.f&=-2,!0;var e=$M;try{ek(this),$M=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 $M=e,tk(this),this.f&=-2,!0},rk.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)}JM.prototype.S.call(this,e)},rk.prototype.U=function(e){if(void 0!==this.t&&(JM.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)}},rk.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(rk.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=XM(this);if(this.h(),void 0!==e&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),sk.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()}},sk.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,ok(this),ek(this),VM++;var e=$M;return $M=this,ak.bind(this,e)},sk.prototype.N=function(){2&this.f||(this.f|=2,this.u=HM,HM=this)},sk.prototype.d=function(){this.f|=8,1&this.f||ik(this)},sk.prototype.dispose=function(){this.d()};var uk,ck,dk,pk,fk,hk,mk,gk,bk,vk,yk,xk,Sk,wk,Ck,Ek,Rk,Ak,Ik,Mk,kk=Object.create,Dk=Object.defineProperty,Pk=Object.defineProperties,Tk=Object.getOwnPropertyDescriptor,qk=Object.getOwnPropertyDescriptors,Ok=Object.getOwnPropertySymbols,Lk=Object.prototype.hasOwnProperty,Nk=Object.prototype.propertyIsEnumerable,jk=e=>{throw TypeError(e)},_k=(e,t,r)=>t in e?Dk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,zk=(e,t)=>Dk(e,"name",{value:t,configurable:!0}),Fk=["class","method","getter","setter","accessor","field","value","get","set"],$k=e=>void 0!==e&&"function"!=typeof e?jk("Function expected"):e,Bk=(e,t,r,n,o)=>({kind:Fk[e],name:t,metadata:n,addInitializer:e=>r._?jk("Already initialized"):o.push($k(e||null))}),Hk=(e,t)=>{return _k(t,(r="metadata",(n=Symbol[r])?n:Symbol.for("Symbol."+r)),e[3]);var r,n},Vk=(e,t,r,n)=>{for(var o=0,i=e[t>>1],a=i&&i.length;o<a;o++)1&t?i[o].call(r):n=i[o].call(r,n);return n},Wk=(e,t,r,n,o,i)=>{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=Fk[d+5],g=d>3&&(e[h-1]=[]),b=e[h]||(e[h]=[]),v=d&&(!f&&!p&&(o=o.prototype),d<5&&(d>3||!f)&&Tk(d<4?o:{get[r](){return Kk(this,i)},set[r](e){return Xk(this,i,e)}},r));d?f&&d<4&&zk(i,(d>2?"set ":d>1?"get ":"")+r):zk(o,r);for(var y=n.length-1;y>=0;y--)u=Bk(d,r,l={},e[3],b),d&&(u.static=p,u.private=f,c=u.access={has:f?e=>Gk(o,e):e=>r in e},3^d&&(c.get=f?e=>(1^d?Kk:Jk)(e,o,4^d?i:v.get):e=>e[r]),d>2&&(c.set=f?(e,t)=>Xk(e,o,t,4^d?i:v.set):(e,t)=>e[r]=t)),s=(0,n[y])(d?d<4?f?i:v[m]:d>4?void 0:{get:v.get,set:v.set}:o,u),l._=1,4^d||void 0===s?$k(s)&&(d>4?g.unshift(s):d?f?i=s:v[m]=s:o=s):"object"!=typeof s||null===s?jk("Object expected"):($k(a=s.get)&&(v.get=a),$k(a=s.set)&&(v.set=a),$k(a=s.init)&&g.unshift(a));return d||Hk(e,o),v&&Dk(o,r,v),f?4^d?i:v:o},Uk=(e,t,r)=>t.has(e)||jk("Cannot "+r),Gk=(e,t)=>Object(t)!==t?jk('Cannot use the "in" operator on this value'):e.has(t),Kk=(e,t,r)=>(Uk(e,t,"read from private field"),r?r.call(e):t.get(e)),Yk=(e,t,r)=>t.has(e)?jk("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Xk=(e,t,r,n)=>(Uk(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Jk=(e,t,r)=>(Uk(e,t,"access private method"),r);function Zk(e,t){if(t){let r;return nk(()=>{const n=e();return n&&r&&t(r,n)?r:(r=n,n)})}return nk(e)}function Qk(e,t){if(Object.is(e,t))return!0;if(null===e||null===t)return!1;if("function"==typeof e&&"function"==typeof t)return e===t;if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;return!e.some((e,r)=>!Qk(e,t[r]))}if("object"==typeof e&&"object"==typeof t){const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;const o=r.some(r=>!Qk(e[r],t[r]));return!o}return!1}function eD({get:e},t){return{init:e=>ZM(e),get(){return e.call(this).value},set(t){const r=e.call(this);r.peek()!==t&&(r.value=t)}}}function tD(e,t){const r=new WeakMap;return function(){let t=r.get(this);return t||(t=Zk(e.bind(this)),r.set(this,t)),t.value}}function rD(e=!0){return function(t,r){r.addInitializer(function(){const t="field"===r.kind||r.static?this:Object.getPrototypeOf(this),n=Object.getOwnPropertyDescriptor(t,r.name);n&&Object.defineProperty(t,r.name,((e,t)=>Pk(e,qk(t)))(((e,t)=>{for(var r in t||(t={}))Lk.call(t,r)&&_k(e,r,t[r]);if(Ok)for(var r of Ok(t))Nk.call(t,r)&&_k(e,r,t[r]);return e})({},n),{enumerable:e}))})}}function nD(...e){const t=e.map(e=>lk(e));return()=>t.forEach(e=>e())}hk=[eD],fk=[eD],pk=[eD],dk=[rD()],ck=[rD()],uk=[rD()];var oD,iD=class{constructor(e,t=Object.is){this.defaultValue=e,this.equals=t,Vk(mk,5,this),Yk(this,xk),Yk(this,gk,Vk(mk,8,this)),Vk(mk,11,this),Yk(this,Sk,Vk(mk,12,this)),Vk(mk,15,this),Yk(this,Rk,Vk(mk,16,this)),Vk(mk,19,this),this.reset=this.reset.bind(this),this.reset()}get current(){return Kk(this,xk,Ik)}get initial(){return Kk(this,xk,vk)}get previous(){return Kk(this,xk,Ck)}set current(e){const t=BM(()=>Kk(this,xk,Ik));e&&t&&this.equals(t,e)||zM(()=>{Kk(this,xk,vk)||Xk(this,xk,e,yk),Xk(this,xk,t,Ek),Xk(this,xk,e,Mk)})}reset(e=this.defaultValue){zM(()=>{Xk(this,xk,void 0,Ek),Xk(this,xk,e,yk),Xk(this,xk,e,Mk)})}};function aD(e){return BM(()=>{const t={};for(const r in e)t[r]=e[r];return t})}mk=[,,,kk(null)],gk=new WeakMap,xk=new WeakSet,Sk=new WeakMap,Rk=new WeakMap,bk=Wk(mk,20,"#initial",hk,xk,gk),vk=bk.get,yk=bk.set,wk=Wk(mk,20,"#previous",fk,xk,Sk),Ck=wk.get,Ek=wk.set,Ak=Wk(mk,20,"#current",pk,xk,Rk),Ik=Ak.get,Mk=Ak.set,Wk(mk,2,"current",dk,iD),Wk(mk,2,"initial",ck,iD),Wk(mk,2,"previous",uk,iD),Hk(mk,iD);oD=new WeakMap;var sD,lD,uD,cD,dD,pD=Object.create,fD=Object.defineProperty,hD=Object.getOwnPropertyDescriptor,mD=Object.getOwnPropertySymbols,gD=Object.prototype.hasOwnProperty,bD=Object.prototype.propertyIsEnumerable,vD=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),yD=e=>{throw TypeError(e)},xD=Math.pow,SD=(e,t,r)=>t in e?fD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,wD=["class","method","getter","setter","accessor","field","value","get","set"],CD=e=>void 0!==e&&"function"!=typeof e?yD("Function expected"):e,ED=(e,t,r,n,o)=>({kind:wD[e],name:t,metadata:n,addInitializer:e=>r._?yD("Already initialized"):o.push(CD(e||null))}),RD=(e,t,r,n,o,i)=>{for(var a,s,l,u,c=7&t,d=wD[c+5],p=e[2]||(e[2]=[]),f=(o=o.prototype,hD(o,r)),h=n.length-1;h>=0;h--)(l=ED(c,r,s={},e[3],p)).static=false,l.private=false,u=l.access={has:e=>r in e},u.get=e=>e[r],a=(0,n[h])(f[d],l),s._=1,CD(a)&&(f[d]=a);return f&&fD(o,r,f),o},AD=(e,t,r)=>t.has(e)||yD("Cannot "+r),ID=class e{constructor(e,t){this.x=e,this.y=t}static delta(t,r){return new e(t.x-r.x,t.y-r.y)}static distance(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}static equals(e,t){return e.x===t.x&&e.y===t.y}static from({x:t,y:r}){return new e(t,r)}},MD=class e{constructor(e,t,r,n){this.left=e,this.top=t,this.width=r,this.height=n,this.scale={x:1,y:1}}get inverseScale(){return{x:1/this.scale.x,y:1/this.scale.y}}translate(t,r){const{top:n,left:o,width:i,height:a,scale:s}=this,l=new e(o+t,n+r,i,a);return l.scale=((e,t)=>{for(var r in t||(t={}))gD.call(t,r)&&SD(e,r,t[r]);if(mD)for(var r of mD(t))bD.call(t,r)&&SD(e,r,t[r]);return e})({},s),l}get boundingRectangle(){const{width:e,height:t,left:r,top:n,right:o,bottom:i}=this;return{width:e,height:t,left:r,top:n,right:o,bottom:i}}get center(){const{left:e,top:t,right:r,bottom:n}=this;return new ID((e+r)/2,(t+n)/2)}get area(){const{width:e,height:t}=this;return e*t}equals(t){if(!(t instanceof e))return!1;const{left:r,top:n,width:o,height:i}=this;return r===t.left&&n===t.top&&o===t.width&&i===t.height}containsPoint(e){const{top:t,left:r,bottom:n,right:o}=this;return t<=e.y&&e.y<=n&&r<=e.x&&e.x<=o}intersectionArea(t){return t instanceof e?function(e,t){const r=Math.max(t.top,e.top),n=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),a=o-n,s=i-r;if(n<o&&r<i){return a*s}return 0}(this,t):0}intersectionRatio(e){const{area:t}=this,r=this.intersectionArea(e);return r/(e.area+t-r)}get bottom(){const{top:e,height:t}=this;return e+t}get right(){const{left:e,width:t}=this;return e+t}get aspectRatio(){const{width:e,height:t}=this;return e/t}get corners(){return[{x:this.left,y:this.top},{x:this.right,y:this.top},{x:this.left,y:this.bottom},{x:this.right,y:this.bottom}]}static from({top:t,left:r,width:n,height:o}){return new e(r,t,n,o)}static delta(e,t,r={x:"center",y:"center"}){const n=(e,t)=>{const n=r[t],o="x"===t?e.left:e.top,i="x"===t?e.width:e.height;return"start"==n?o:"end"==n?o+i:o+i/2};return ID.delta({x:n(e,"x"),y:n(e,"y")},{x:n(t,"x"),y:n(t,"y")})}static intersectionRatio(t,r){return e.from(t).intersectionRatio(e.from(r))}};var kD,DD=class extends(uD=iD,lD=[tD],sD=[tD],uD){constructor(e){var t,r,n;super(ID.from(e),(e,t)=>ID.equals(e,t)),((e,t,r)=>{for(var n=0,o=e[t>>1],i=o&&o.length;n<i;n++)o[n].call(r)})(dD,5,this),t=this,n=0,(r=cD).has(t)?yD("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(t):r.set(t,n),this.velocity={x:0,y:0}}get delta(){return ID.delta(this.current,this.initial)}get direction(){const{current:e,previous:t}=this;if(!t)return null;const r={x:e.x-t.x,y:e.y-t.y};return r.x||r.y?Math.abs(r.x)>Math.abs(r.y)?r.x>0?"right":"left":r.y>0?"down":"up":null}get current(){return super.current}set current(e){const{current:t}=this,r=ID.from(e),n={x:r.x-t.x,y:r.y-t.y},o=Date.now(),i=o-(AD(a=this,s=cD,"read from private field"),s.get(a));var a,s;const l=e=>Math.round(e/i*100);zM(()=>{((e,t,r)=>{AD(e,t,"write to private field"),t.set(e,r)})(this,cD,o),this.velocity={x:l(n.x),y:l(n.y)},super.current=r})}reset(e=this.defaultValue){super.reset(ID.from(e)),this.velocity={x:0,y:0}}};function PD({x:e,y:t},r){const n=Math.abs(e),o=Math.abs(t);return"number"==typeof r?Math.sqrt(xD(n,2)+xD(o,2))>r:"x"in r&&"y"in r?n>r.x&&o>r.y:"x"in r?n>r.x:"y"in r&&o>r.y}dD=(e=>{var t;return[,,,pD(null!=(t=null==e?void 0:e[vD("metadata")])?t:null)]})(uD),cD=new WeakMap,RD(dD,2,"delta",lD,DD),RD(dD,2,"direction",sD,DD),kD=dD,SD(DD,vD("metadata"),kD[3]);var TD,qD,OD,LD,ND=(e=>(e.Horizontal="x",e.Vertical="y",e))(ND||{}),jD=Object.values(ND),_D=Object.create,zD=Object.defineProperty,FD=Object.defineProperties,$D=Object.getOwnPropertyDescriptor,BD=Object.getOwnPropertyDescriptors,HD=Object.getOwnPropertySymbols,VD=Object.prototype.hasOwnProperty,WD=Object.prototype.propertyIsEnumerable,UD=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),GD=e=>{throw TypeError(e)},KD=(e,t,r)=>t in e?zD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,YD=(e,t)=>{for(var r in t||(t={}))VD.call(t,r)&&KD(e,r,t[r]);if(HD)for(var r of HD(t))WD.call(t,r)&&KD(e,r,t[r]);return e},XD=(e,t)=>FD(e,BD(t)),JD=(e,t)=>zD(e,"name",{value:t,configurable:!0}),ZD=(e,t)=>{var r={};for(var n in e)VD.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&HD)for(var n of HD(e))t.indexOf(n)<0&&WD.call(e,n)&&(r[n]=e[n]);return r},QD=e=>{var t;return[,,,_D(null!=(t=null==e?void 0:e[UD("metadata")])?t:null)]},eP=["class","method","getter","setter","accessor","field","value","get","set"],tP=e=>void 0!==e&&"function"!=typeof e?GD("Function expected"):e,rP=(e,t,r,n,o)=>({kind:eP[e],name:t,metadata:n,addInitializer:e=>r._?GD("Already initialized"):o.push(tP(e||null))}),nP=(e,t)=>KD(t,UD("metadata"),e[3]),oP=(e,t,r,n)=>{for(var o=0,i=e[t>>1],a=i&&i.length;o<a;o++)1&t?i[o].call(r):n=i[o].call(r,n);return n},iP=(e,t,r,n,o,i)=>{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=eP[d+5],g=d>3&&(e[h-1]=[]),b=e[h]||(e[h]=[]),v=d&&(!f&&!p&&(o=o.prototype),d<5&&(d>3||!f)&&$D(d<4?o:{get[r](){return lP(this,i)},set[r](e){return cP(this,i,e)}},r));d?f&&d<4&&JD(i,(d>2?"set ":d>1?"get ":"")+r):JD(o,r);for(var y=n.length-1;y>=0;y--)u=rP(d,r,l={},e[3],b),d&&(u.static=p,u.private=f,c=u.access={has:f?e=>sP(o,e):e=>r in e},3^d&&(c.get=f?e=>(1^d?lP:dP)(e,o,4^d?i:v.get):e=>e[r]),d>2&&(c.set=f?(e,t)=>cP(e,o,t,4^d?i:v.set):(e,t)=>e[r]=t)),s=(0,n[y])(d?d<4?f?i:v[m]:d>4?void 0:{get:v.get,set:v.set}:o,u),l._=1,4^d||void 0===s?tP(s)&&(d>4?g.unshift(s):d?f?i=s:v[m]=s:o=s):"object"!=typeof s||null===s?GD("Object expected"):(tP(a=s.get)&&(v.get=a),tP(a=s.set)&&(v.set=a),tP(a=s.init)&&g.unshift(a));return d||nP(e,o),v&&zD(o,r,v),f?4^d?i:v:o},aP=(e,t,r)=>t.has(e)||GD("Cannot "+r),sP=(e,t)=>Object(t)!==t?GD('Cannot use the "in" operator on this value'):e.has(t),lP=(e,t,r)=>(aP(e,t,"read from private field"),r?r.call(e):t.get(e)),uP=(e,t,r)=>t.has(e)?GD("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),cP=(e,t,r,n)=>(aP(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),dP=(e,t,r)=>(aP(e,t,"access private method"),r);function pP(e,t){return{plugin:e,options:t}}function fP(e){return t=>pP(e,t)}function hP(e){return"function"==typeof e?{plugin:e,options:void 0}:e}TD=[eD];var mP=class{constructor(e,t){this.manager=e,this.options=t,uP(this,OD,oP(qD,8,this,!1)),oP(qD,11,this),uP(this,LD,new Set)}enable(){this.disabled=!1}disable(){this.disabled=!0}isDisabled(){return BM(()=>this.disabled)}configure(e){this.options=e}registerEffect(e){const t=lk(e.bind(this));return lP(this,LD).add(t),t}destroy(){lP(this,LD).forEach(e=>e())}static configure(e){return pP(this,e)}};qD=QD(null),OD=new WeakMap,LD=new WeakMap,iP(qD,4,"disabled",TD,mP,OD),nP(qD,mP);var gP,bP=class extends mP{},vP=class{constructor(e){this.manager=e,this.instances=new Map,uP(this,gP,[])}get values(){return Array.from(this.instances.values())}set values(e){const t=e.map(hP).reduce((e,t)=>{const r=e.find(({plugin:e})=>e===t.plugin);return r?(r.options=t.options,e):[...e,t]},[]),r=t.map(({plugin:e})=>e);for(const e of lP(this,gP))if(!r.includes(e)){if(e.prototype instanceof bP)continue;this.unregister(e)}for(const{plugin:e,options:r}of t)this.register(e,r);cP(this,gP,r)}get(e){return this.instances.get(e)}register(e,t){const r=this.instances.get(e);if(r)return r.options!==t&&(r.options=t),r;const n=new e(this.manager,t);return this.instances.set(e,n),n}unregister(e){const t=this.instances.get(e);t&&(t.destroy(),this.instances.delete(e))}destroy(){for(const e of this.instances.values())e.destroy();this.instances.clear()}};function yP(e,t){return e.priority===t.priority?e.type===t.type?t.value-e.value:t.type-e.type:t.priority-e.priority}gP=new WeakMap;var xP,SP,wP,CP,EP,RP,AP,IP,MP,kP,DP,PP,TP=[],qP=class extends mP{constructor(e){super(e),uP(this,xP),uP(this,SP),this.computeCollisions=this.computeCollisions.bind(this),cP(this,SP,ZM(TP)),this.destroy=nD(()=>{const e=this.computeCollisions(),t=BM(()=>this.manager.dragOperation.position.current);if(e!==TP){const e=lP(this,xP);if(cP(this,xP,t),e&&t.x==e.x&&t.y==e.y)return}else cP(this,xP,void 0);lP(this,SP).value=e},()=>{const{dragOperation:e}=this.manager;e.status.initialized&&this.forceUpdate()})}forceUpdate(e=!0){BM(()=>{e?lP(this,SP).value=this.computeCollisions():cP(this,xP,void 0)})}computeCollisions(e,t){const{registry:r,dragOperation:n}=this.manager,{source:o,shape:i,status:a}=n;if(!a.initialized||!i)return TP;const s=[],l=[];for(const i of null!=e?e:r.droppables){if(i.disabled)continue;if(o&&!i.accepts(o))continue;const e=null!=t?t:i.collisionDetector;if(!e)continue;l.push(i),i.shape;const r=BM(()=>e({droppable:i,dragOperation:n}));r&&(null!=i.collisionPriority&&(r.priority=i.collisionPriority),s.push(r))}return 0===l.length?TP:(s.sort(yP),s)}get collisions(){return lP(this,SP).value}};xP=new WeakMap,SP=new WeakMap,EP=[eD],CP=[eD],wP=[eD];var OP=class e{constructor(e,t){uP(this,MP,oP(IP,8,this)),oP(IP,11,this),uP(this,kP),uP(this,DP,oP(IP,12,this)),oP(IP,15,this),uP(this,PP,oP(IP,16,this)),oP(IP,19,this);const{effects:r,id:n,data:o={},disabled:i=!1,register:a=!0}=e;let s=n;cP(this,kP,ZM(n)),this.manager=t,this.data=o,this.disabled=i,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==r?void 0:r())?e:[]]},this.register=this.register.bind(this),this.unregister=this.unregister.bind(this),this.destroy=this.destroy.bind(this),t&&a&&queueMicrotask(this.register)}get id(){var t,r;const n=lP(this,kP).value;return null!=(r=null==(t=e.pendingIdChanges)?void 0:t.get(this))?r:n}set id(t){var r,n;t!==(null!=(n=null==(r=e.pendingIdChanges)?void 0:r.get(this))?n:lP(this,kP).peek())&&(e.pendingIdChanges||(e.pendingIdChanges=new Map,queueMicrotask(()=>{var t;return dP(t=e,RP,AP).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)}};IP=QD(null),RP=new WeakSet,AP=function(){const e=OP.pendingIdChanges;OP.pendingIdChanges=null,e&&zM(()=>{for(const[t,r]of e)lP(t,kP).value=r})},MP=new WeakMap,kP=new WeakMap,DP=new WeakMap,PP=new WeakMap,iP(IP,4,"manager",EP,OP,MP),iP(IP,4,"data",CP,OP,DP),iP(IP,4,"disabled",wP,OP,PP),uP(OP,RP),nP(IP,OP),OP.pendingIdChanges=null;var LP,NP,jP,_P,zP,FP,$P,BP,HP,VP,WP,UP,GP,KP,YP,XP,JP,ZP,QP,eT,tT,rT,nT,oT,iT=OP,aT=class{constructor(){this.map=ZM(new Map),this.cleanupFunctions=new WeakMap,this.register=(e,t)=>{const r=this.map.peek(),n=r.get(e),o=()=>this.unregister(e,t);if(n===t)return o;if(n&&n.id===e){const e=this.cleanupFunctions.get(n);null==e||e(),this.cleanupFunctions.delete(n)}const i=new Map(r);for(const[n,o]of r)if(o===t&&n!==e){i.delete(n);break}i.set(e,t),this.map.value=i;const a=nD(...t.effects());return this.cleanupFunctions.set(t,a),o},this.unregister=(e,t)=>{const r=this.map.peek();if(r.get(e)!==t)return;const n=this.cleanupFunctions.get(t);null==n||n(),this.cleanupFunctions.delete(t);const o=new Map(r);o.delete(e),this.map.value=o}}[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}},sT=class extends($P=iT,FP=[eD],zP=[eD],_P=[eD],jP=[tD],NP=[tD],LP=[tD],$P){constructor(e,t){var r=e,{modifiers:n,type:o,sensors:i,plugins:a,effects:s}=r,l=ZD(r,["modifiers","type","sensors","plugins","effects"]);super(XD(YD({},l),{effects:()=>{var e;return[...null!=(e=null==s?void 0:s())?e:[],()=>{const{manager:e,plugins:t}=this;if(e&&t)for(const r of t){const{plugin:t}=hP(r);e.registry.plugins.register(t)}}]}}),t),oP(BP,5,this),uP(this,HP,oP(BP,8,this)),oP(BP,11,this),uP(this,VP,oP(BP,12,this)),oP(BP,15,this),uP(this,WP,oP(BP,16,this,this.isDragSource?"dragging":"idle")),oP(BP,19,this),this.type=o,this.sensors=i,this.modifiers=n,this.alignment=l.alignment,this.plugins=a}pluginConfig(e){if(this.plugins)for(const t of this.plugins){const r=hP(t);if(r.plugin===e)return r.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}};BP=QD($P),HP=new WeakMap,VP=new WeakMap,WP=new WeakMap,iP(BP,4,"type",FP,sT,HP),iP(BP,4,"modifiers",zP,sT,VP),iP(BP,4,"status",_P,sT,WP),iP(BP,2,"isDropping",jP,sT),iP(BP,2,"isDragging",NP,sT),iP(BP,2,"isDragSource",LP,sT),nP(BP,sT);var lT=class extends(ZP=iT,JP=[eD],XP=[eD],YP=[eD],KP=[eD],GP=[eD],UP=[tD],ZP){constructor(e,t){var r=e,{accept:n,collisionDetector:o,collisionPriority:i,type:a}=r;super(ZD(r,["accept","collisionDetector","collisionPriority","type"]),t),oP(QP,5,this),uP(this,eT,oP(QP,8,this)),oP(QP,11,this),uP(this,tT,oP(QP,12,this)),oP(QP,15,this),uP(this,rT,oP(QP,16,this)),oP(QP,19,this),uP(this,nT,oP(QP,20,this)),oP(QP,23,this),uP(this,oT,oP(QP,24,this)),oP(QP,27,this),this.accept=n,this.collisionDetector=o,this.collisionPriority=i,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}};QP=QD(ZP),eT=new WeakMap,tT=new WeakMap,rT=new WeakMap,nT=new WeakMap,oT=new WeakMap,iP(QP,4,"accept",JP,lT,eT),iP(QP,4,"type",XP,lT,tT),iP(QP,4,"collisionDetector",YP,lT,rT),iP(QP,4,"collisionPriority",KP,lT,nT),iP(QP,4,"shape",GP,lT,oT),iP(QP,2,"isDropTarget",UP,lT),nP(QP,lT);var uT=class{constructor(){this.registry=new Map}addEventListener(e,t){const{registry:r}=this,n=new Set(r.get(e));return n.add(t),r.set(e,n),()=>this.removeEventListener(e,t)}removeEventListener(e,t){const{registry:r}=this,n=new Set(r.get(e));n.delete(t),r.set(e,n)}dispatch(e,...t){const{registry:r}=this,n=r.get(e);if(n)for(const e of n)e(...t)}},cT=class extends uT{constructor(e){super(),this.manager=e}dispatch(e,t){const r=[t,this.manager];super.dispatch(e,...r)}};function dT(e,t=!0){let r=!1;return XD(YD({},e),{cancelable:t,get defaultPrevented(){return r},preventDefault(){t&&(r=!0)}})}var pT,fT,hT,mT,gT,bT,vT,yT,xT,ST,wT=class extends bP{constructor(e){super(e);let t=[];this.destroy=nD(()=>{const{dragOperation:r,collisionObserver:n}=e;r.status.initializing&&(t=[],n.enable())},()=>{const{collisionObserver:r,monitor:n}=e,{collisions:o}=r;if(r.isDisabled())return;if(iT.pendingIdChanges)return;const i=dT({collisions:o});if(n.dispatch("collision",i),i.defaultPrevented)return;if(((e,t)=>e.map(({id:e})=>e).join("")===t.map(({id:e})=>e).join(""))(o,t))return;t=o;const[a]=o;BM(()=>{var t;(null==a?void 0:a.id)!==(null==(t=e.dragOperation.target)?void 0:t.id)&&(r.disable(),e.actions.setDropTarget(null==a?void 0:a.id).then(()=>{r.enable()}))})})}},CT=(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))(CT||{}),ET=(e=>(e[e.Collision=0]="Collision",e[e.ShapeIntersection=1]="ShapeIntersection",e[e.PointerIntersection=2]="PointerIntersection",e))(ET||{});yT=[eD],vT=[tD],bT=[tD],gT=[tD],mT=[tD],hT=[tD],fT=[tD],pT=[tD];var RT=class{constructor(){oP(xT,5,this),uP(this,ST,oP(xT,8,this,"idle")),oP(xT,11,this)}get current(){return this.value}get idle(){return"idle"===this.value}get initializationPending(){return"initialization-pending"===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}};xT=QD(null),ST=new WeakMap,iP(xT,4,"value",yT,RT,ST),iP(xT,2,"current",vT,RT),iP(xT,2,"idle",bT,RT),iP(xT,2,"initializationPending",gT,RT),iP(xT,2,"initializing",mT,RT),iP(xT,2,"initialized",hT,RT),iP(xT,2,"dragging",fT,RT),iP(xT,2,"dropped",pT,RT),nP(xT,RT);var AT,IT=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 BM(()=>{const{dragOperation:t}=this.manager,r=null!=e?e:null;if(t.targetIdentifier===r)return Promise.resolve(!1);t.targetIdentifier=r;const n=dT({operation:t.snapshot()});return t.status.dragging&&this.manager.monitor.dispatch("dragover",n),this.manager.renderer.rendering.then(()=>n.defaultPrevented)})}start(e){return BM(()=>{const{dragOperation:t}=this.manager;null!=e.source&&this.setDragSource(e.source);if(!t.source)throw new Error("Cannot start a drag operation without a drag source");if(!t.status.idle)throw new Error("Cannot start a drag operation while another is active");const r=new AbortController,{event:n,coordinates:o}=e;zM(()=>{t.status.set("initialization-pending"),t.shape=null,t.canceled=!1,t.activatorEvent=null!=n?n:null,t.position.reset(o)});const i=dT({operation:t.snapshot()});return this.manager.monitor.dispatch("beforedragstart",i),i.defaultPrevented?(t.reset(),r.abort(),r):(t.status.set("initializing"),t.controller=r,this.manager.renderer.rendering.then(()=>{if(r.signal.aborted)return;const{status:e}=t;"initializing"===e.current&&zM(()=>{t.status.set("dragging"),this.manager.monitor.dispatch("dragstart",{nativeEvent:n,operation:t.snapshot(),cancelable:!1})})}),r)})}move(e){return BM(()=>{var t,r;const{dragOperation:n}=this.manager,{status:o,controller:i}=n;if(!o.dragging||!i||i.signal.aborted)return;const a=dT({nativeEvent:e.event,operation:n.snapshot(),by:e.by,to:e.to},null==(t=e.cancelable)||t);(null==(r=e.propagate)||r)&&this.manager.monitor.dispatch("dragmove",a),queueMicrotask(()=>{var t,r,o,i,s;if(a.defaultPrevented)return;const l=null!=(s=e.to)?s:{x:n.position.current.x+(null!=(r=null==(t=e.by)?void 0:t.x)?r:0),y:n.position.current.y+(null!=(i=null==(o=e.by)?void 0:o.y)?i:0)};n.position.current=l})})}stop(e={}){return BM(()=>{var t,r;const{dragOperation:n}=this.manager,{controller:o}=n;if(!o||o.signal.aborted)return;let i;o.abort();const a=()=>{this.manager.renderer.rendering.then(()=>{n.status.set("dropped");const e=BM(()=>{var e;return"dropping"===(null==(e=n.source)?void 0:e.status)}),t=()=>{n.controller===o&&(n.controller=void 0),n.reset()};if(e){const{source:e}=n,r=lk(()=>{"idle"===(null==e?void 0:e.status)&&(r(),t())})}else this.manager.renderer.rendering.then(t)})};n.canceled=null!=(t=e.canceled)&&t,this.manager.monitor.dispatch("dragend",{nativeEvent:e.event,operation:n.snapshot(),canceled:null!=(r=e.canceled)&&r,suspend:()=>{const e={resume:()=>{},abort:()=>{}};return i=new Promise((t,r)=>{e.resume=t,e.abort=r}),e}}),i?i.then(a).catch(()=>n.reset()):a()})}},MT=class extends mP{constructor(e,t){super(e,t),this.manager=e,this.options=t}},kT=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)}},DT=class{constructor(e){this.options=e,uP(this,AT)}set controller(e){cP(this,AT,e),e.signal.addEventListener("abort",()=>this.abort())}activate(e){var t;null==(t=lP(this,AT))||t.activate(e)}};AT=new WeakMap;var PT,TT,qT,OT,LT,NT,jT,_T,zT,FT,$T,BT,HT,VT,WT,UT,GT,KT,YT,XT=class extends mP{constructor(e,t){super(e,t),this.manager=e,this.options=t}apply(e){return e.transform}},JT=class{constructor(e){this.draggables=new aT,this.droppables=new aT,this.plugins=new vP(e),this.sensors=new vP(e),this.modifiers=new vP(e)}register(e,t){if(e instanceof sT)return this.draggables.register(e.id,e);if(e instanceof lT)return this.droppables.register(e.id,e);if(e.prototype instanceof XT)return this.modifiers.register(e,t);if(e.prototype instanceof MT)return this.sensors.register(e,t);if(e.prototype instanceof mP)return this.plugins.register(e,t);throw new Error("Invalid instance type")}unregister(e){if(e instanceof iT)return e instanceof sT?this.draggables.unregister(e.id,e):e instanceof lT?this.droppables.unregister(e.id,e):()=>{};if(e.prototype instanceof XT)return this.modifiers.unregister(e);if(e.prototype instanceof MT)return this.sensors.unregister(e);if(e.prototype instanceof mP)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()}};zT=[tD],_T=[eD],jT=[eD],NT=[eD],LT=[eD],OT=[eD],qT=[tD],TT=[tD],PT=[tD];var ZT=class{constructor(e){oP(HT,5,this),uP(this,FT),uP(this,$T),uP(this,BT,new iD(void 0,(e,t)=>e&&t?e.equals(t):e===t)),this.status=new RT,uP(this,VT,oP(HT,8,this,!1)),oP(HT,11,this),uP(this,WT,oP(HT,12,this,null)),oP(HT,15,this),uP(this,UT,oP(HT,16,this,null)),oP(HT,19,this),uP(this,GT,oP(HT,20,this,null)),oP(HT,23,this),uP(this,KT,oP(HT,24,this,[])),oP(HT,27,this),this.position=new DD({x:0,y:0}),uP(this,YT,{x:0,y:0}),cP(this,FT,e)}get shape(){const{current:e,initial:t,previous:r}=lP(this,BT);return e&&t?{current:e,initial:t,previous:r}:null}set shape(e){e?lP(this,BT).current=e:lP(this,BT).reset()}get source(){var e;const t=this.sourceIdentifier;if(null==t)return null;const r=lP(this,FT).registry.draggables.get(t);return r&&cP(this,$T,r),null!=(e=null!=r?r:lP(this,$T))?e:null}get target(){var e;const t=this.targetIdentifier;return null!=t&&null!=(e=lP(this,FT).registry.droppables.get(t))?e:null}get transform(){const{x:e,y:t}=this.position.delta;let r={x:e,y:t};for(const e of this.modifiers)r=e.apply(XD(YD({},this.snapshot()),{transform:r}));return cP(this,YT,r),r}snapshot(){return BM(()=>({source:this.source,target:this.target,activatorEvent:this.activatorEvent,transform:lP(this,YT),shape:this.shape?aD(this.shape):null,position:aD(this.position),status:aD(this.status),canceled:this.canceled}))}reset(){zM(()=>{this.status.set("idle"),this.sourceIdentifier=null,this.targetIdentifier=null,lP(this,BT).reset(),this.position.reset({x:0,y:0}),cP(this,YT,{x:0,y:0}),this.modifiers=[]})}};HT=QD(null),FT=new WeakMap,$T=new WeakMap,BT=new WeakMap,VT=new WeakMap,WT=new WeakMap,UT=new WeakMap,GT=new WeakMap,KT=new WeakMap,YT=new WeakMap,iP(HT,2,"shape",zT,ZT),iP(HT,4,"canceled",_T,ZT,VT),iP(HT,4,"activatorEvent",jT,ZT,WT),iP(HT,4,"sourceIdentifier",NT,ZT,UT),iP(HT,4,"targetIdentifier",LT,ZT,GT),iP(HT,4,"modifiers",OT,ZT,KT),iP(HT,2,"source",qT,ZT),iP(HT,2,"target",TT,ZT),iP(HT,2,"transform",PT,ZT),nP(HT,ZT);var QT={get rendering(){return Promise.resolve()}};function eq(e,t){return"function"==typeof e?e(t):null!=e?e:t}var tq=class{constructor(e){var t;this.destroy=()=>{this.dragOperation.status.idle||this.actions.stop({canceled:!0}),this.dragOperation.modifiers.forEach(e=>e.destroy()),this.registry.destroy(),this.collisionObserver.destroy()};const r=null!=e?e:{},n=eq(r.plugins,[]),o=eq(r.sensors,[]),i=eq(r.modifiers,[]),a=null!=(t=r.renderer)?t:QT,s=new cT(this),l=new JT(this);this.registry=l,this.monitor=s,this.renderer=a,this.actions=new IT(this),this.dragOperation=new ZT(this),this.collisionObserver=new qP(this),this.plugins=[wT,...n],this.modifiers=i,this.sensors=o;const{destroy:u}=this,c=nD(()=>{var e,t,r;const n=BM(()=>this.dragOperation.modifiers),o=this.modifiers;for(const e of n)o.includes(e)||e.destroy();this.dragOperation.modifiers=null!=(r=null==(t=null==(e=this.dragOperation.source)?void 0:e.modifiers)?void 0:t.map(e=>{const{plugin:t,options:r}=hP(e);return new t(this,r)}))?r:o});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}},rq=e=>{throw TypeError(e)},nq=(e,t,r)=>t.has(e)||rq("Cannot "+r),oq=(e,t,r)=>(nq(e,t,"read from private field"),t.get(e)),iq=(e,t,r)=>t.has(e)?rq("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),aq=(e,t,r,n)=>(nq(e,t,"write to private field"),t.set(e,r),r),sq=(e,t,r)=>(nq(e,t,"access private method"),r);function lq(e){return!!e&&(e instanceof KeyframeEffect||"getKeyframes"in e&&"function"==typeof e.getKeyframes)}function uq(e,t){const r=e.getAnimations();let n=null;for(const e of r){if("running"!==e.playState)continue;const{effect:r}=e,o=(lq(r)?r.getKeyframes():[]).filter(t);o.length>0&&(n=[o[o.length-1],e])}return n}function cq(e){const{width:t,height:r,top:n,left:o,bottom:i,right:a}=e.getBoundingClientRect();return{width:t,height:r,top:n,left:o,bottom:i,right:a}}function dq(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function pq(e){return"nodeType"in e}function fq(e){var t,r,n;return e?dq(e)?e:pq(e)?"defaultView"in e?null!=(t=e.defaultView)?t:window:null!=(n=null==(r=e.ownerDocument)?void 0:r.defaultView)?n:window:window:window}function hq(e){const{Document:t}=fq(e);return e instanceof t||"nodeType"in e&&e.nodeType===Node.DOCUMENT_NODE}function mq(e){return!(!e||dq(e))&&(e instanceof fq(e).HTMLElement||"namespaceURI"in e&&"string"==typeof e.namespaceURI&&e.namespaceURI.endsWith("html"))}function gq(e){return e instanceof fq(e).SVGElement||"namespaceURI"in e&&"string"==typeof e.namespaceURI&&e.namespaceURI.endsWith("svg")}function bq(e){return e?dq(e)?e.document:pq(e)?hq(e)?e:mq(e)||gq(e)?e.ownerDocument:document:document:document}function vq(e,t){if(function(e){return"DETAILS"===e.tagName}(e)&&!1===e.open)return!1;const{overflow:r,overflowX:n,overflowY:o}=getComputedStyle(e);return"visible"===r&&"visible"===n&&"visible"===o}function yq(e,t=e.getBoundingClientRect(),r=0){var n,o,i,a,s;let l=t;const{ownerDocument:u}=e,c=null!=(n=u.defaultView)?n:window;let d=e.parentElement;for(;d&&d!==u.documentElement;){if(!vq(d)){const e=d.getBoundingClientRect(),t=r*(e.bottom-e.top),n=r*(e.right-e.left),o=r*(e.bottom-e.top),i=r*(e.right-e.left);l={top:Math.max(l.top,e.top-t),right:Math.min(l.right,e.right+n),bottom:Math.min(l.bottom,e.bottom+o),left:Math.max(l.left,e.left-i),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!=(o=null==p?void 0:p.offsetTop)?o:0,h=null!=(i=null==p?void 0:p.offsetLeft)?i: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,b=r*g,v=r*m;return l={top:Math.max(l.top,f-b),right:Math.min(l.right,h+m+v),bottom:Math.min(l.bottom,f+g+b),left:Math.max(l.left,h-v),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 xq(e){return{x:e.clientX,y:e.clientY}}var Sq="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function wq(e=document,t=new Set){if(t.has(e))return[];t.add(e);const r=[e];for(const n of Array.from(e.querySelectorAll("iframe, frame")))try{const e=n.contentDocument;e&&!t.has(e)&&r.push(...wq(e,t))}catch(e){}try{const n=e.defaultView;if(n&&n!==window.top){const o=n.parent;o&&o.document&&o.document!==e&&r.push(...wq(o.document,t))}}catch(e){}return r}function Cq(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function Eq(){var e,t;const r=Cq()?window.visualViewport:null;return{x:null!=(e=null==r?void 0:r.offsetLeft)?e:0,y:null!=(t=null==r?void 0:r.offsetTop)?t:0}}function Rq(e){return!(!e||!pq(e))&&e instanceof fq(e).ShadowRoot}function Aq(e){if(e&&pq(e)){let t=e.getRootNode();if(Rq(t))return t;if(t instanceof Document)return t}return bq(e)}function Iq(e){return e.matchMedia("(prefers-reduced-motion: reduce)").matches}function Mq(e){return"value"in e}function kq(e){return"CANVAS"===e.tagName}function Dq(e,{x:t,y:r}){const n=e.elementFromPoint(t,r);if(function(e){return"IFRAME"===(null==e?void 0:e.tagName)}(n)){const{contentDocument:e}=n;if(e){const{left:o,top:i}=n.getBoundingClientRect();return Dq(e,{x:t-o,y:r-i})}}return n}var Pq=new WeakMap;var Tq=class{constructor(){this.entries=new Set,this.clear=()=>{for(const e of this.entries){const[t,{type:r,listener:n,options:o}]=e;t.removeEventListener(r,n,o)}this.entries.clear()}}bind(e,t){const r=Array.isArray(e)?e:[e],n=Array.isArray(t)?t:[t],o=[];for(const e of r)for(const t of n){const{type:r,listener:n,options:i}=t,a=[e,t];e.addEventListener(r,n,i),this.entries.add(a),o.push(a)}const i=this.entries;return function(){for(const e of o){const[t,{type:r,listener:n,options:o}]=e;t.removeEventListener(r,n,o),i.delete(e)}}}};function qq(e){const t=null==e?void 0:e.ownerDocument.defaultView;if(t&&t.self!==t.parent)return t.frameElement}function Oq(e,t){const r=()=>performance.now();let n,o;return function(...i){const a=this;o?(null==n||n(),n=function(e,t){const r=setTimeout(e,t);return()=>clearTimeout(r)}(()=>{e.apply(a,i),o=r()},t-(r()-o))):(e.apply(a,i),o=r())}}var Lq,Nq="undefined"!=typeof ResizeObserver?ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},jq=class extends Nq{constructor(e){super(t=>{oq(this,Lq)?e(t,this):aq(this,Lq,!0)}),iq(this,Lq,!1)}};Lq=new WeakMap;var _q,zq,Fq,$q,Bq,Hq,Vq,Wq,Uq,Gq,Kq,Yq=Array.from({length:100},(e,t)=>t/100),Xq=class{constructor(e,t,r={debug:!1,skipInitial:!1}){this.element=e,this.callback=t,iq(this,Uq),this.disconnect=()=>{var e,t,r;aq(this,Vq,!0),null==(e=oq(this,Fq))||e.disconnect(),null==(t=oq(this,$q))||t.disconnect(),oq(this,Bq).disconnect(),null==(r=oq(this,Hq))||r.remove()},iq(this,_q,!0),iq(this,zq),iq(this,Fq),iq(this,$q),iq(this,Bq),iq(this,Hq),iq(this,Vq,!1),iq(this,Wq,Oq(()=>{var e,t,r;const{element:n}=this;if(null==(e=oq(this,$q))||e.disconnect(),oq(this,Vq)||!oq(this,_q)||!n.isConnected)return;const o=null!=(t=n.ownerDocument)?t:document,{innerHeight:i,innerWidth:a}=null!=(r=o.defaultView)?r:window,s=n.getBoundingClientRect(),l=yq(n,s),{top:u,left:c,bottom:d,right:p}=l,f=-Math.floor(u),h=-Math.floor(c),m=`${f}px ${-Math.floor(a-p)}px ${-Math.floor(i-d)}px ${h}px`;this.boundingClientRect=s,aq(this,$q,new IntersectionObserver(e=>{const[t]=e,{intersectionRect:r}=t;1!==(1!==t.intersectionRatio?t.intersectionRatio:MD.intersectionRatio(r,yq(n)))&&oq(this,Wq).call(this)},{threshold:Yq,rootMargin:m,root:o})),oq(this,$q).observe(n),sq(this,Uq,Gq).call(this)},75)),this.boundingClientRect=e.getBoundingClientRect(),aq(this,_q,function(e,t=e.getBoundingClientRect()){const{width:r,height:n}=yq(e,t);return r>0&&n>0}(e,this.boundingClientRect));let n=!0;this.callback=e=>{n&&(n=!1,r.skipInitial)||t(e)};const o=e.ownerDocument;(null==r?void 0:r.debug)&&(aq(this,Hq,document.createElement("div")),oq(this,Hq).style.background="rgba(0,0,0,0.15)",oq(this,Hq).style.position="fixed",oq(this,Hq).style.pointerEvents="none",o.body.appendChild(oq(this,Hq))),aq(this,Bq,new IntersectionObserver(t=>{var r,n;const o=t[t.length-1],{boundingClientRect:i,isIntersecting:a}=o,{width:s,height:l}=i,u=oq(this,_q);aq(this,_q,a),(s||l)&&(u&&!a?(null==(r=oq(this,$q))||r.disconnect(),this.callback(null),null==(n=oq(this,Fq))||n.disconnect(),aq(this,Fq,void 0),oq(this,Hq)&&(oq(this,Hq).style.visibility="hidden")):oq(this,Wq).call(this),a&&!oq(this,Fq)&&(aq(this,Fq,new jq(oq(this,Wq))),oq(this,Fq).observe(e)))},{threshold:Yq,root:o})),oq(this,_q)&&!r.skipInitial&&this.callback(this.boundingClientRect),oq(this,Bq).observe(e)}};_q=new WeakMap,zq=new WeakMap,Fq=new WeakMap,$q=new WeakMap,Bq=new WeakMap,Hq=new WeakMap,Vq=new WeakMap,Wq=new WeakMap,Uq=new WeakSet,Gq=function(){oq(this,Vq)||(sq(this,Uq,Kq).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,oq(this,zq))||(this.callback(this.boundingClientRect),aq(this,zq,this.boundingClientRect)))},Kq=function(){if(oq(this,Hq)){const{top:e,left:t,width:r,height:n}=yq(this.element);oq(this,Hq).style.overflow="hidden",oq(this,Hq).style.visibility="visible",oq(this,Hq).style.top=`${Math.floor(e)}px`,oq(this,Hq).style.left=`${Math.floor(t)}px`,oq(this,Hq).style.width=`${Math.floor(r)}px`,oq(this,Hq).style.height=`${Math.floor(n)}px`}};var Jq,Zq,Qq,eO,tO=new WeakMap,rO=new WeakMap;function nO(e,t){let r=tO.get(e);if(!r){const t=new Xq(e,t=>{const r=tO.get(e);r&&r.callbacks.forEach(e=>e(t))},{skipInitial:!0});r={disconnect:t.disconnect,callbacks:new Set}}return r.callbacks.add(t),tO.set(e,r),()=>{r.callbacks.delete(t),0===r.callbacks.size&&(tO.delete(e),r.disconnect())}}var oO=class{constructor(e,t,r){this.callback=t,iq(this,Jq),iq(this,Zq,!1),iq(this,Qq),iq(this,eO,Oq(e=>{if(!oq(this,Zq)&&e.target&&"contains"in e.target&&"function"==typeof e.target.contains)for(const t of oq(this,Qq))if(e.target.contains(t)){this.callback(oq(this,Jq).boundingClientRect);break}},75));const n=function(e){const t=new Set;let r=qq(e);for(;r;)t.add(r),r=qq(r);return t}(e),o=function(e,t){const r=new Set;for(const n of e){const e=nO(n,t);r.add(e)}return()=>r.forEach(e=>e())}(n,t),i=function(e,t){var r;const n=e.ownerDocument;if(!rO.has(n)){const e=new AbortController,t=new Set;document.addEventListener("scroll",e=>t.forEach(t=>t(e)),{capture:!0,passive:!0,signal:e.signal}),rO.set(n,{disconnect:()=>e.abort(),listeners:t})}const{listeners:o,disconnect:i}=null!=(r=rO.get(n))?r:{};return o&&i?(o.add(t),()=>{o.delete(t),0===o.size&&(i(),rO.delete(n))}):()=>{}}(e,oq(this,eO));aq(this,Qq,n),aq(this,Jq,new Xq(e,t,r)),this.disconnect=()=>{oq(this,Zq)||(aq(this,Zq,!0),o(),i(),oq(this,Jq).disconnect())}}};function iO(e){return"showPopover"in e&&"hidePopover"in e&&"function"==typeof e.showPopover&&"function"==typeof e.hidePopover}function aO(e){try{iO(e)&&e.isConnected&&e.hasAttribute("popover")&&!e.matches(":popover-open")&&e.showPopover()}catch(e){}}function sO(e){return!(!Sq||!e)&&e===bq(e).scrollingElement}function lO(e){var t,r;const n=fq(e),o=sO(e)?function(e){var t,r,n,o;const{documentElement:i}=bq(e),a=fq(e).visualViewport,s=null!=(t=null==a?void 0:a.width)?t:i.clientWidth,l=null!=(r=null==a?void 0:a.height)?r:i.clientHeight,u=null!=(n=null==a?void 0:a.offsetTop)?n:0,c=null!=(o=null==a?void 0:a.offsetLeft)?o:0;return{top:u,left:c,right:c+s,bottom:u+l,width:s,height:l}}(e):cq(e),i=n.visualViewport,a=sO(e)?{height:null!=(t=null==i?void 0:i.height)?t:n.innerHeight,width:null!=(r=null==i?void 0:i.width)?r:n.innerWidth}:{height:e.clientHeight,width:e.clientWidth},s={current:{x:e.scrollLeft,y:e.scrollTop},max:{x:e.scrollWidth-a.width,y:e.scrollHeight-a.height}};return{rect:o,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 uO(e,t,r=lO(e)){const{isTop:n,isBottom:o,isLeft:i,isRight:a,position:s}=r,{x:l,y:u}=null!=t?t:{x:0,y:0},c=!n&&s.current.y+u>0,d=!o&&s.current.y+u<s.max.y,p=!i&&s.current.x+l>0,f=!a&&s.current.x+l<s.max.x;return{top:c,bottom:d,left:p,right:f,x:p||f,y:c||d}}Jq=new WeakMap,Zq=new WeakMap,Qq=new WeakMap,eO=new WeakMap;var cO=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))}},dO=new cO(e=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(e):e()}),pO=new cO(e=>setTimeout(e,50)),fO=new Map,hO=fO.clear.bind(fO);function mO(e,t=!1){if(!t)return gO(e);let r=fO.get(e);return r||(r=gO(e),fO.set(e,r),pO.schedule(hO),r)}function gO(e){return fq(e).getComputedStyle(e)}var bO={excludeElement:!0,escapeShadowDOM:!0};function vO(e,t=bO){const{limit:r,excludeElement:n,escapeShadowDOM:o}=t,i=new Set;return e?function t(a){if(null!=r&&i.size>=r)return i;if(!a)return i;if(hq(a)&&null!=a.scrollingElement&&!i.has(a.scrollingElement))return i.add(a.scrollingElement),i;if(o&&Rq(a))return t(a.host);if(!mq(a))return gq(a)?t(a.parentElement):i;if(i.has(a))return i;const s=mO(a,!0);if(n&&a===e||function(e,t=mO(e,!0)){const r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const n=t[e];return"string"==typeof n&&r.test(n)})}(a,s)&&i.add(a),function(e,t=mO(e,!0)){return"fixed"===t.position||"sticky"===t.position}(a,s)){const{scrollingElement:e}=a.ownerDocument;return e&&i.add(e),i}return t(a.parentNode)}(e):i}function yO(e,t=window.frameElement){const r={x:0,y:0,scaleX:1,scaleY:1};if(!e)return r;let n=qq(e);for(;n;){if(n===t)return r;const e=cq(n),{x:o,y:i}=xO(n,e);r.x=r.x+e.left,r.y=r.y+e.top,r.scaleX=r.scaleX*o,r.scaleY=r.scaleY*i,n=qq(n)}return r}function xO(e,t=cq(e)){const r=Math.round(t.width),n=Math.round(t.height);if(mq(e))return{x:r/e.offsetWidth,y:n/e.offsetHeight};const o=mO(e,!0);return{x:(parseFloat(o.width)||r)/r,y:(parseFloat(o.height)||n)/n}}function SO(e){if(!e||"none"===e)return null;const[t,r,n="0"]=e.split(" "),o={x:parseFloat(t),y:parseFloat(r),z:parseInt(n,10)};return isNaN(o.x)&&isNaN(o.y)?null:{x:isNaN(o.x)?0:o.x,y:isNaN(o.y)?0:o.y,z:isNaN(o.z)?0:o.z}}function wO(e){var t,r,n,o,i,a,s,l,u;const{scale:c,transform:d,translate:p}=e,f=function(e){if(!e||"none"===e)return null;const t=e.split(" "),r=parseFloat(t[0]),n=parseFloat(t[1]);return isNaN(r)&&isNaN(n)?null:{x:isNaN(r)?n:r,y:isNaN(n)?r:n}}(c),h=SO(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,b=null!=(r=null==f?void 0:f.y)?r:1,v=null!=(n=null==h?void 0:h.x)?n:0,y=null!=(o=null==h?void 0:h.y)?o:0,x=null!=(i=null==m?void 0:m.x)?i: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:v+x,y:y+S,z:null!=(u=null==h?void 0:h.z)?u:0,scaleX:g*w,scaleY:b*C}}var CO=(e=>(e[e.Idle=0]="Idle",e[e.Forward=1]="Forward",e[e.Reverse=-1]="Reverse",e))(CO||{}),EO={x:.2,y:.2},RO={x:10,y:10};function AO(e,t,r,n=25,o=EO,i=RO,a=lO(e)){const{x:s,y:l}=t,{rect:u,isTop:c,isBottom:d,isLeft:p,isRight:f}=a,h=yO(e),m=wO(mO(e,!0)),g=null!==m&&(null==m?void 0:m.scaleX)<0,b=null!==m&&(null==m?void 0:m.scaleY)<0,v=new MD(u.left*h.scaleX+h.x,u.top*h.scaleY+h.y,u.width*h.scaleX,u.height*h.scaleY),y={x:0,y:0},x={x:0,y:0},S=v.height*o.y,w=v.width*o.x;return S>0&&(!c||b&&!d)&&l<=v.top+S&&1!==(null==r?void 0:r.y)&&s>=v.left-i.x&&s<=v.right+i.x?(y.y=b?1:-1,x.y=n*Math.abs((v.top+S-l)/S)):S>0&&(!d||b&&!c)&&l>=v.bottom-S&&-1!==(null==r?void 0:r.y)&&s>=v.left-i.x&&s<=v.right+i.x&&(y.y=b?-1:1,x.y=n*Math.abs((v.bottom-S-l)/S)),w>0&&(!f||g&&!p)&&s>=v.right-w&&-1!==(null==r?void 0:r.x)&&l>=v.top-i.y&&l<=v.bottom+i.y?(y.x=g?-1:1,x.x=n*Math.abs((v.right-w-s)/w)):w>0&&(!p||g&&!f)&&s<=v.left+w&&1!==(null==r?void 0:r.x)&&l>=v.top-i.y&&l<=v.bottom+i.y&&(y.x=g?1:-1,x.x=n*Math.abs((v.left+w-s)/w)),{direction:y,speed:x}}function IO(e,{block:t="nearest",inline:r="nearest"}={}){if(!mq(e))return;const n=vO(e),o=[];for(const i of n){if(!mq(i))continue;const{top:n,left:a}=kO(e,i);let s=n,l=a;for(const e of o)s-=e.scrollTop,l-=e.scrollLeft;if("none"!==t){const r=s<i.scrollTop;r!==s+e.offsetHeight>i.scrollTop+i.clientHeight&&(i.scrollTop="center"===t?s-i.clientHeight/2+e.offsetHeight/2:r?s:s+e.offsetHeight-i.clientHeight)}if("none"!==r){const t=l<i.scrollLeft;t!==l+e.offsetWidth>i.scrollLeft+i.clientWidth&&(i.scrollLeft="center"===r?l-i.clientWidth/2+e.offsetWidth/2:t?l:l+e.offsetWidth-i.clientWidth)}o.push(i)}}function MO(e){let t=0,r=0,n=e;for(;n;){t+=n.offsetTop,r+=n.offsetLeft;const e=n.offsetParent;if(!mq(e))break;t+=e.clientTop,r+=e.clientLeft,n=e}return{top:t,left:r}}function kO(e,t){const r=MO(e),n=MO(t);return{top:r.top-n.top-t.clientTop,left:r.left-n.left-t.clientLeft}}function DO({element:e,keyframes:t,options:r}){return e.animate(t,r).finished}function PO(e,t=mO(e).translate,r=!0){if(r){const t=uq(e,e=>"translate"in e);if(t){const{translate:e=""}=t[0];if("string"==typeof e){const t=SO(e);if(t)return t}}}if(t){const e=SO(t);if(e)return e}return{x:0,y:0,z:0}}var TO=new cO(e=>setTimeout(e,0)),qO=new Map,OO=qO.clear.bind(qO);function LO(e,t){const r=function(e){const t=e.ownerDocument;let r=qO.get(t);if(r)return r;r=t.getAnimations(),qO.set(t,r),TO.schedule(OO);const n=r.filter(t=>lq(t.effect)&&t.effect.target===e);return qO.set(e,n),r}(e).filter(e=>{var r,n;if(lq(e.effect)){const{target:o}=e.effect;if(null==(n=o&&(null==(r=t.isValidTarget)?void 0:r.call(t,o)))||n)return e.effect.getKeyframes().some(e=>{for(const r of t.properties)if(e[r])return!0})}}).map(e=>{const{effect:t,currentTime:r}=e,n=null==t?void 0:t.getComputedTiming().duration;if(!e.pending&&"finished"!==e.playState)return"number"==typeof n&&"number"==typeof r&&r<n?(e.currentTime=n,()=>{e.currentTime=r}):void 0});if(r.length>0)return()=>r.forEach(e=>null==e?void 0:e())}var NO=class extends MD{constructor(e,t={}){var r,n,o,i;const{frameTransform:a=yO(e),ignoreTransforms:s,getBoundingClientRect:l=cq}=t,u=LO(e,{properties:["transform","translate","scale","width","height"],isValidTarget:t=>(t!==e||Cq())&&t.contains(e)}),c=l(e);let d,{top:p,left:f,width:h,height:m}=c;const g=mO(e),b=wO(g),v={x:null!=(r=null==b?void 0:b.scaleX)?r:1,y:null!=(n=null==b?void 0:b.scaleY)?n:1},y=function(e,t){const r=e.getAnimations();if(!r.length)return null;let n,o,i,a=!1;for(const e of r){if("running"!==e.playState)continue;const t=lq(e.effect)?e.effect.getKeyframes():[],r=t[t.length-1];if(!r)continue;const{transform:s,translate:l,scale:u}=r;"string"==typeof s&&s&&(n=s,a=!0),"string"==typeof l&&l&&(o=l,a=!0),"string"==typeof u&&u&&(i=u,a=!0)}return a?wO({transform:null!=n?n:t.transform,translate:null!=o?o:t.translate,scale:null!=i?i:t.scale}):null}(e,g);null==u||u(),b&&(d=function(e,t,r){const{scaleX:n,scaleY:o,x:i,y:a}=t,s=e.left-i-(1-n)*parseFloat(r),l=e.top-a-(1-o)*parseFloat(r.slice(r.indexOf(" ")+1)),u=n?e.width/n:e.width,c=o?e.height/o:e.height;return{width:u,height:c,top:l,right:s+u,bottom:l+c,left:s}}(c,b,g.transformOrigin),(s||y)&&(p=d.top,f=d.left,h=d.width,m=d.height));const x={width:null!=(o=null==d?void 0:d.width)?o:h,height:null!=(i=null==d?void 0:d.height)?i:m};if(y&&!s&&d){const e=function(e,t,r){const{scaleX:n,scaleY:o,x:i,y:a}=t,s=e.left+i+(1-n)*parseFloat(r),l=e.top+a+(1-o)*parseFloat(r.slice(r.indexOf(" ")+1)),u=n?e.width*n:e.width,c=o?e.height*o:e.height;return{width:u,height:c,top:l,right:s+u,bottom:l+c,left:s}}(d,y,g.transformOrigin);p=e.top,f=e.left,h=e.width,m=e.height,v.x=y.scaleX,v.y=y.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=v,this.intrinsicWidth=x.width,this.intrinsicHeight=x.height}};function jO(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 _O=class{constructor(e){this.element=e,this.initial=new Map}set(e,t=""){const{element:r}=this;if(jO(r))for(const[n,o]of Object.entries(e)){const e=`${t}${n}`;this.initial.has(e)||this.initial.set(e,r.style.getPropertyValue(e)),r.style.setProperty(e,"string"==typeof o?o:`${o}px`)}}remove(e,t=""){const{element:r}=this;if(jO(r))for(const n of e){const e=`${t}${n}`;r.style.removeProperty(e)}}reset(){const{element:e}=this;if(jO(e)){for(const[t,r]of this.initial)e.style.setProperty(t,r);""===e.getAttribute("style")&&e.removeAttribute("style")}}};function zO(e){return!!e&&(e instanceof fq(e).Element||pq(e)&&e.nodeType===Node.ELEMENT_NODE)}function FO(e){if(!e)return!1;const{KeyboardEvent:t}=fq(e.target);return e instanceof t}var $O={};function BO(e){const t=null==$O[e]?0:$O[e]+1;return $O[e]=t,`${e}-${t}`}var HO=e=>{var t;return null!=(t=(({dragOperation:e,droppable:t})=>{const r=e.position.current;if(!r)return null;const{id:n}=t;if(!t.shape)return null;if(t.shape.containsPoint(r))return{id:n,value:1/ID.distance(t.shape.center,r),type:ET.PointerIntersection,priority:CT.High};return null})(e))?t:(({dragOperation:e,droppable:t})=>{const{shape:r}=e;if(!t.shape||!(null==r?void 0:r.current))return null;const n=r.current.intersectionArea(t.shape);if(n){const{position:o}=e,i=ID.distance(t.shape.center,o.current),a=n/(r.current.area+t.shape.area-n)/i;return{id:t.id,value:a,type:ET.ShapeIntersection,priority:CT.Normal}}return null})(e)},VO=e=>{const{dragOperation:t,droppable:r}=e,{shape:n,position:o}=t;if(!r.shape)return null;const i=n?MD.from(n.current.boundingRectangle).corners:void 0,a=MD.from(r.shape.boundingRectangle).corners.reduce((e,t,r)=>{var n;return e+ID.distance(ID.from(t),null!=(n=null==i?void 0:i[r])?n:o.current)},0),s=a/4;return{id:r.id,value:1/s,type:ET.Collision,priority:CT.Normal}},WO=Object.create,UO=Object.defineProperty,GO=Object.defineProperties,KO=Object.getOwnPropertyDescriptor,YO=Object.getOwnPropertyDescriptors,XO=Object.getOwnPropertySymbols,JO=Object.prototype.hasOwnProperty,ZO=Object.prototype.propertyIsEnumerable,QO=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),eL=e=>{throw TypeError(e)},tL=(e,t,r)=>t in e?UO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,rL=(e,t)=>{for(var r in t||(t={}))JO.call(t,r)&&tL(e,r,t[r]);if(XO)for(var r of XO(t))ZO.call(t,r)&&tL(e,r,t[r]);return e},nL=(e,t)=>GO(e,YO(t)),oL=(e,t)=>UO(e,"name",{value:t,configurable:!0}),iL=(e,t)=>{var r={};for(var n in e)JO.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&XO)for(var n of XO(e))t.indexOf(n)<0&&ZO.call(e,n)&&(r[n]=e[n]);return r},aL=e=>{var t;return[,,,WO(null!=(t=null==e?void 0:e[QO("metadata")])?t:null)]},sL=["class","method","getter","setter","accessor","field","value","get","set"],lL=e=>void 0!==e&&"function"!=typeof e?eL("Function expected"):e,uL=(e,t,r,n,o)=>({kind:sL[e],name:t,metadata:n,addInitializer:e=>r._?eL("Already initialized"):o.push(lL(e||null))}),cL=(e,t)=>tL(t,QO("metadata"),e[3]),dL=(e,t,r,n)=>{for(var o=0,i=e[t>>1],a=i&&i.length;o<a;o++)1&t?i[o].call(r):n=i[o].call(r,n);return n},pL=(e,t,r,n,o,i)=>{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=sL[d+5],g=d>3&&(e[h-1]=[]),b=e[h]||(e[h]=[]),v=d&&(!f&&!p&&(o=o.prototype),d<5&&(d>3||!f)&&KO(d<4?o:{get[r](){return mL(this,i)},set[r](e){return bL(this,i,e)}},r));d?f&&d<4&&oL(i,(d>2?"set ":d>1?"get ":"")+r):oL(o,r);for(var y=n.length-1;y>=0;y--)u=uL(d,r,l={},e[3],b),d&&(u.static=p,u.private=f,c=u.access={has:f?e=>hL(o,e):e=>r in e},3^d&&(c.get=f?e=>(1^d?mL:vL)(e,o,4^d?i:v.get):e=>e[r]),d>2&&(c.set=f?(e,t)=>bL(e,o,t,4^d?i:v.set):(e,t)=>e[r]=t)),s=(0,n[y])(d?d<4?f?i:v[m]:d>4?void 0:{get:v.get,set:v.set}:o,u),l._=1,4^d||void 0===s?lL(s)&&(d>4?g.unshift(s):d?f?i=s:v[m]=s:o=s):"object"!=typeof s||null===s?eL("Object expected"):(lL(a=s.get)&&(v.get=a),lL(a=s.set)&&(v.set=a),lL(a=s.init)&&g.unshift(a));return d||cL(e,o),v&&UO(o,r,v),f?4^d?i:v:o},fL=(e,t,r)=>t.has(e)||eL("Cannot "+r),hL=(e,t)=>Object(t)!==t?eL('Cannot use the "in" operator on this value'):e.has(t),mL=(e,t,r)=>(fL(e,t,"read from private field"),r?r.call(e):t.get(e)),gL=(e,t,r)=>t.has(e)?eL("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),bL=(e,t,r,n)=>(fL(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),vL=(e,t,r)=>(fL(e,t,"access private method"),r),yL="button",xL="draggable",SL="dnd-kit-description",wL="dnd-kit-announcement",CL={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."},EL={dragstart({operation:{source:e}}){if(e)return`Picked up draggable item ${e.id}.`},dragover({operation:{source:e,target:t}}){if(e&&e.id!==(null==t?void 0:t.id))return t?`Draggable item ${e.id} was moved over droppable target ${t.id}.`:`Draggable item ${e.id} is no longer over a droppable target.`},dragend({operation:{source:e,target:t},canceled:r}){if(e)return r?`Dragging was cancelled. Draggable item ${e.id} was dropped.`:t?`Draggable item ${e.id} was dropped over droppable target ${t.id}`:`Draggable item ${e.id} was dropped.`}};function RL(e){const t=e.tagName.toLowerCase();return["input","select","textarea","a","button"].includes(t)}function AL(e){var t;return"button"===(null!=(t=e.getAttribute("role"))?t:"button")}var IL=["dragover","dragmove"],ML=class extends mP{constructor(e,t){super(e);const{id:r,idPrefix:{description:n=SL,announcement:o=wL}={},announcements:i=EL,screenReaderInstructions:a=CL,debounce:s=500}=null!=t?t:{},l=r?`${n}-${r}`:BO(n),u=r?`${o}-${r}`:BO(o);let c,d,p,f;const h=(e=f)=>{p&&e&&(null==p?void 0:p.nodeValue)!==e&&(p.nodeValue=e)},m=()=>dO.schedule(h),g=function(e,t){let r;const n=()=>{clearTimeout(r),r=setTimeout(e,t)};return n.cancel=()=>clearTimeout(r),n}(m,s),b=Object.entries(i).map(([e,t])=>this.manager.monitor.addEventListener(e,(r,n)=>{const o=p;if(!o)return;const i=null==t?void 0:t(r,n);i&&o.nodeValue!==i&&(f=i,IL.includes(e)?g():(m(),g.cancel()))})),v=()=>{let e=[];(null==c?void 0:c.isConnected)||(c=function(e,t){const r=document.createElement("div");return r.id=e,r.style.setProperty("display","none"),r.textContent=t,r}(l,a.draggable),e.push(c)),(null==d?void 0:d.isConnected)||(d=function(e){const t=document.createElement("div");return t.id=e,t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true"),t.style.setProperty("position","fixed"),t.style.setProperty("width","1px"),t.style.setProperty("height","1px"),t.style.setProperty("margin","-1px"),t.style.setProperty("border","0"),t.style.setProperty("padding","0"),t.style.setProperty("overflow","hidden"),t.style.setProperty("clip","rect(0 0 0 0)"),t.style.setProperty("clip-path","inset(100%)"),t.style.setProperty("white-space","nowrap"),t}(u),p=document.createTextNode(""),d.appendChild(p),e.push(d)),e.length>0&&document.body.append(...e)},y=new Set;function x(){for(const e of y)e()}this.registerEffect(()=>{var e;y.clear();for(const t of this.manager.registry.draggables.value){const r=null!=(e=t.handle)?e:t.element;if(r){c&&d||y.add(v),RL(r)&&!Cq()||r.hasAttribute("tabindex")||y.add(()=>r.setAttribute("tabindex","0")),r.hasAttribute("role")||"button"===r.tagName.toLowerCase()||y.add(()=>r.setAttribute("role",yL)),r.hasAttribute("aria-roledescription")||y.add(()=>r.setAttribute("aria-roledescription",xL)),r.hasAttribute("aria-describedby")||y.add(()=>r.setAttribute("aria-describedby",l));const e=AL(r)?["aria-pressed","aria-grabbed"]:["aria-grabbed"];for(const n of e){const e=String(t.isDragging);r.getAttribute(n)!==e&&y.add(()=>r.setAttribute(n,e))}const n=String(t.disabled);r.getAttribute("aria-disabled")!==n&&y.add(()=>r.setAttribute("aria-disabled",n))}}y.size>0&&dO.schedule(x)}),this.destroy=()=>{super.destroy(),null==c||c.remove(),null==d||d.remove(),b.forEach(e=>e())}}};var kL,DL,PL,TL,qL,OL,LL,NL,jL,_L,zL,FL,$L,BL,HL,VL,WL=new Map;function UL(e){return Rq(e)?e.host.isConnected:null!=e.defaultView}var GL=class extends(OL=bP,qL=[eD],TL=[eD],PL=[tD],DL=[tD],kL=[tD],OL){constructor(e,t){super(e,t),dL(LL,5,this),gL(this,FL),gL(this,NL,dL(LL,8,this,new Map)),dL(LL,11,this),gL(this,jL,dL(LL,12,this,new Set)),dL(LL,15,this),gL(this,_L,new Set),gL(this,zL,new Map),this.registerEffect(vL(this,FL,$L))}register(e,t){return BM(()=>{var r;const n=new Map(this.registeredRules);n.set(e,null!=(r=null==t?void 0:t.retain)&&r),this.registeredRules=n}),()=>{BM(()=>{const t=new Map(this.registeredRules);t.delete(e),this.registeredRules=t})}}addRoot(e){return BM(()=>{const t=new Set(this.additionalRoots);t.add(e),this.additionalRoots=t}),()=>{BM(()=>{const t=new Set(this.additionalRoots);t.delete(e),this.additionalRoots=t})}}get sourceRoot(){var e;const{source:t}=this.manager.dragOperation;return Aq(null!=(e=null==t?void 0:t.element)?e:null)}get targetRoot(){var e;const{target:t}=this.manager.dragOperation;return Aq(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}destroy(){for(const e of mL(this,zL).values())for(const t of e.values())t();mL(this,zL).clear(),mL(this,_L).clear(),super.destroy()}};LL=aL(OL),NL=new WeakMap,jL=new WeakMap,_L=new WeakMap,zL=new WeakMap,FL=new WeakSet,$L=function(){const{roots:e,registeredRules:t}=this;for(const t of e)mL(this,_L).add(t);const r=new Map;for(const n of mL(this,_L)){const o=e.has(n);if(o||UL(n))for(const[e,i]of t){if(!o&&!i)continue;let t=r.get(n);t||(t=new Set,r.set(n,t)),t.add(e)}else mL(this,_L).delete(n)}for(const[e,t]of mL(this,zL)){const n=r.get(e);for(const[e,r]of t)(null==n?void 0:n.has(e))||(r(),t.delete(e));0===t.size&&mL(this,zL).delete(e)}for(const[e,t]of r){let r=mL(this,zL).get(e);r||(r=new Map,mL(this,zL).set(e,r));for(const n of t)r.has(n)||r.set(n,vL(this,FL,BL).call(this,e,n))}},BL=function(e,t){let r=WL.get(e);r||(r=new Map,WL.set(e,r));let n=r.get(t);if(!n){const o=hq(e)?vL(this,FL,HL).call(this,e,r,t):vL(this,FL,VL).call(this,e,r,t);if(!o)return()=>{};n=o,r.set(t,n)}n.refCount++;let o=!1;return()=>{o||(o=!0,n.refCount--,0===n.refCount&&n.cleanup())}},HL=function(e,t,r){var n;const o=e.createElement("style"),{nonce:i}=null!=(n=this.options)?n:{};i&&o.setAttribute("nonce",i),o.textContent=r,e.head.prepend(o);const a=new MutationObserver(t=>{for(const r of t)for(const t of Array.from(r.removedNodes))if(t===o)return void e.head.prepend(o)});return a.observe(e.head,{childList:!0}),{refCount:0,cleanup:()=>{a.disconnect(),o.remove(),t.delete(r),0===t.size&&WL.delete(e)}}},VL=function(e,t,r){!("adoptedStyleSheets"in e)||Array.isArray(e.adoptedStyleSheets);const n=e.ownerDocument.defaultView,{CSSStyleSheet:o}=null!=n?n:{};if(!o)return null;const i=new o;return i.replaceSync(r),e.adoptedStyleSheets.push(i),{refCount:0,cleanup:()=>{var n;if(Rq(e)&&(null==(n=e.host)?void 0:n.isConnected)){const t=e.adoptedStyleSheets.indexOf(i);-1!==t&&e.adoptedStyleSheets.splice(t,1)}t.delete(r),0===t.size&&WL.delete(e)}}},pL(LL,4,"registeredRules",qL,GL,NL),pL(LL,4,"additionalRoots",TL,GL,jL),pL(LL,2,"sourceRoot",PL,GL),pL(LL,2,"targetRoot",DL,GL),pL(LL,2,"roots",kL,GL),cL(LL,GL),GL.configure=fP(GL);var KL=GL,YL="data-dnd-",XL=`${YL}dropping`,JL="--dnd-",ZL=`${YL}dragging`,QL=`${YL}placeholder`,eN=[ZL,QL,"popover","aria-pressed","aria-grabbing"],tN=["view-transition-name"],rN=`\n :is(:root,:host) [${ZL}] {\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(${JL}top, 0px) !important;\n left: var(${JL}left, 0px) !important;\n right: unset !important;\n bottom: unset !important;\n width: var(${JL}width, auto);\n max-width: var(${JL}width, auto);\n height: var(${JL}height, auto);\n max-height: var(${JL}height, auto);\n transform: var(${JL}transform, none) !important;\n transition: var(${JL}transition) !important;\n }\n\n :is(:root,:host) [${QL}] {\n transition: none;\n }\n\n :is(:root,:host) [${QL}='hidden'] {\n visibility: hidden;\n }\n\n [${ZL}] * {\n pointer-events: none !important;\n }\n\n [${ZL}]:not([${XL}]) {\n translate: var(${JL}translate) !important;\n }\n\n [${ZL}][style*='${JL}scale'] {\n scale: var(${JL}scale) !important;\n transform-origin: var(${JL}transform-origin) !important;\n }\n\n @layer dnd-kit {\n :where([${ZL}][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 [${ZL}]::backdrop, [${YL}overlay]:not([${ZL}]) {\n display: none;\n visibility: hidden;\n }\n`.replace(/\n+/g," ").replace(/\s+/g," ").trim();function nN(e,t="hidden"){return BM(()=>{const{element:r,manager:n}=e;if(!r||!n)return;const o=function(e,t){const r=new Map;for(const n of t)if(n.element&&(e===n.element||e.contains(n.element))){const e=`${YL}${BO("dom-id")}`;n.element.setAttribute(e,""),r.set(n,e)}return r}(r,n.registry.droppables),i=[],a=function(e){const t="input, textarea, select, canvas, [contenteditable]",r=e.cloneNode(!0),n=Array.from(e.querySelectorAll(t));return Array.from(r.querySelectorAll(t)).forEach((e,t)=>{const r=n[t];if(Mq(e)&&Mq(r)&&("file"!==e.type&&(e.value=r.value),"radio"===e.type&&e.name&&(e.name=`Cloned__${e.name}`)),kq(e)&&kq(r)&&r.width>0&&r.height>0){const t=e.getContext("2d");null==t||t.drawImage(r,0,0)}}),r}(r),{remove:s}=a;return function(e,t,r){for(const[n,o]of e){if(!n.element)continue;const e=`[${o}]`,i=t.matches(e)?t:t.querySelector(e);if(n.element.removeAttribute(o),!i)continue;const a=n.element;n.proxy=i,i.removeAttribute(o),Pq.set(a,i),r.push(()=>{Pq.delete(a),n.proxy=void 0})}}(o,a,i),function(e,t="hidden"){e.setAttribute("inert","true"),e.setAttribute("tab-index","-1"),e.setAttribute("aria-hidden","true"),e.setAttribute(QL,t)}(a,t),a.remove=()=>{i.forEach(e=>e()),s.call(a)},a})}function oN(e,t){return e===t||qq(e)===qq(t)}function iN(e){const{target:t}=e;"newState"in e&&"closed"===e.newState&&zO(t)&&t.hasAttribute("popover")&&requestAnimationFrame(()=>aO(t))}function aN(e){return"TR"===e.tagName}var sN,lN,uN,cN,dN,pN,fN,hN=250,mN="ease";var gN=class extends(lN=mP,sN=[eD],lN){constructor(e,t){super(e,t),gL(this,dN),gL(this,cN,dL(uN,8,this)),dL(uN,11,this),this.state={initial:{},current:{}};const r=e.registry.plugins.get(KL),n=null==r?void 0:r.register(rN,{retain:!0});if(n){const e=this.destroy.bind(this);this.destroy=()=>{n(),e()}}this.registerEffect(vL(this,dN,pN).bind(this,r)),this.registerEffect(vL(this,dN,fN))}};uN=aL(lN),cN=new WeakMap,dN=new WeakSet,pN=function(e){const{overlay:t}=this;if(!t||!e)return;const r=Aq(t);return r?e.addRoot(r):void 0},fN=function(){var e,t,r,n,o,i,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(gN),g=null!=(t=null!=(e=null==m?void 0:m.feedback)?e:null==u?void 0:u.feedback)?t:"default",b="function"==typeof g?g(p,l):g;if(!h||"none"===b||!f.initialized||f.initializing)return;const{initial:v}=s,y=null!=(r=this.overlay)?r:h,x=yO(y),S=yO(h),w=!oN(h,y),C=new NO(h,{frameTransform:w?S:null,ignoreTransforms:!w}),E=S.scaleX/x.scaleX,R=S.scaleY/x.scaleY;let{width:A,height:I,top:M,left:k}=C;w&&(A/=E,I/=R);const D=new _O(y),P=mO(h),{transition:T,translate:q,boxSizing:O,paddingBlockStart:L,paddingBlockEnd:N,paddingInlineStart:j,paddingInlineEnd:_,borderInlineStartWidth:z,borderInlineEndWidth:F,borderBlockStartWidth:$,borderBlockEndWidth:B}=P,H=T.split(",").filter(e=>!/^\s*(transform|translate|scale)\b/.test(e)).join(","),V=wO(P),W=P.transform,U="clone"===b,G="content-box"===O,K=G?parseInt(j)+parseInt(_)+parseInt(z)+parseInt(F):0,Y=G?parseInt(L)+parseInt(N)+parseInt($)+parseInt(B):0,X="move"===b||this.overlay?null:nN(p,U?"clone":"hidden"),J=BM(()=>FO(l.dragOperation.activatorEvent));if(!v.translate)if(this.overlay&&V)v.translate={x:V.x,y:V.y};else if("none"!==q){const e=SO(q);e&&(v.translate=e)}if(!v.transformOrigin){const e=BM(()=>d.current),t=k+(null!=(n=null==V?void 0:V.x)?n:0),r=M+(null!=(o=null==V?void 0:V.y)?o:0);v.transformOrigin={x:(e.x-t*x.scaleX-x.x)/(A*x.scaleX),y:(e.y-r*x.scaleY-x.y)/(I*x.scaleY)}}const{transformOrigin:Z}=v,Q=M*x.scaleY+x.y,ee=k*x.scaleX+x.x;if(!v.coordinates&&(v.coordinates={x:ee,y:Q},1!==E||1!==R)){const{scaleX:e,scaleY:t}=S,{x:r,y:n}=Z;v.coordinates.x+=(A*e-A)*r,v.coordinates.y+=(I*t-I)*n}v.dimensions||(v.dimensions={width:A,height:I}),v.frameTransform||(v.frameTransform=x);const te=v.coordinates.x-ee,re=v.coordinates.y-Q,ne=(v.dimensions.width*v.frameTransform.scaleX-A*x.scaleX)*Z.x,oe=(v.dimensions.height*v.frameTransform.scaleY-I*x.scaleY)*Z.y,ie={x:te/x.scaleX+ne,y:re/x.scaleY+oe},ae=k+ie.x,se=M+ie.y;y.setAttribute(ZL,"true");const le=BM(()=>c.transform),ue=null!=(i=v.translate)?i:{x:0,y:0},ce=le.x*x.scaleX+ue.x,de=le.y*x.scaleY+ue.y,pe=Eq();if(D.set({width:A-K,height:I-Y,top:se+pe.y,left:ae+pe.x,translate:`${ce}px ${de}px 0`,transform:this.overlay?"none":W,transition:H?`${H}, translate 0ms linear`:"translate 0ms linear",scale:w?`${E} ${R}`:"","transform-origin":`${100*Z.x}% ${100*Z.y}%`},JL),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;iO(y)&&(y.hasAttribute("popover")||y.setAttribute("popover","manual"),aO(y),y.addEventListener("beforetoggle",iN));const ge=(be={placeholder:X,element:h,feedbackElement:y,frameTransform:x,transformOrigin:Z,width:A,height:I,top:M,left:k,widthOffset:K,heightOffset:Y,delta:ie,styles:D,dragOperation:c,getTranslate:()=>s.current.translate,getElementMutationObserver:()=>fe,getSavedCellWidths:()=>me,setSavedCellWidths:e=>{me=e}},new ResizeObserver(()=>{var e,t,r;const n=new NO(be.placeholder,{frameTransform:be.frameTransform,ignoreTransforms:!0}),o=null!=(e=be.transformOrigin)?e:{x:1,y:1},i=(be.width-n.width)*o.x+be.delta.x,a=(be.height-n.height)*o.y+be.delta.y,s=Eq();if(be.styles.set({width:n.width-be.widthOffset,height:n.height-be.heightOffset,top:be.top+a+s.y,left:be.left+i+s.x},JL),null==(t=be.getElementMutationObserver())||t.takeRecords(),aN(be.element)&&aN(be.placeholder)){const e=Array.from(be.element.cells),t=Array.from(be.placeholder.cells);be.getSavedCellWidths()||be.setSavedCellWidths(e.map(e=>e.style.width));for(const[r,n]of e.entries()){const e=t[r];n.style.width=`${e.getBoundingClientRect().width}px`}}const l=null!=(r=be.getTranslate())?r:{x:0,y:0},u=be.left+i+s.x+l.x,c=be.top+a+s.y+l.y,d=n.width-be.widthOffset,p=n.height-be.heightOffset,f=be.frameTransform;be.dragOperation.shape=new MD(u*f.scaleX+f.x,c*f.scaleY+f.y,d*f.scaleX,p*f.scaleY)}));var be;const ve=new NO(y);BM(()=>c.shape=ve);const ye=fq(y),xe=e=>{this.manager.actions.stop({event:e})},Se=Iq(ye);J&&ye.addEventListener("resize",xe),"idle"===BM(()=>p.status)&&requestAnimationFrame(()=>p.status="dragging"),X&&(ge.observe(X),fe=function(e,t,r){const n=new MutationObserver(n=>{let o=!1;for(const r of n){if(r.target!==e){o=!0;continue}if("attributes"!==r.type)continue;const n=r.attributeName;if(n.startsWith("aria-")||eN.includes(n))continue;const i=e.getAttribute(n);if("style"===n){if(jO(e)&&jO(t)){const r=e.style;for(const e of Array.from(t.style))""===r.getPropertyValue(e)&&t.style.removeProperty(e);for(const e of Array.from(r)){if(tN.includes(e)||e.startsWith(JL))continue;const n=r.getPropertyValue(e);t.style.setProperty(e,n)}}}else null!==i?t.setAttribute(n,i):t.removeAttribute(n)}o&&r&&t.replaceChildren(...e.cloneNode(!0).childNodes)});return n.observe(e,{attributes:!0,subtree:!0,childList:!0}),n}(h,X,U),he=function(e,t,r){const n=new MutationObserver(n=>{for(const o of n)if(0!==o.addedNodes.length)for(const n of Array.from(o.addedNodes)){if(n.contains(e)&&e.nextElementSibling!==t)return e.insertAdjacentElement("afterend",t),void aO(r);if(n.contains(t)&&t.previousElementSibling!==e)return t.insertAdjacentElement("beforebegin",e),void aO(r)}e.isConnected&&t.isConnected&&e.nextElementSibling!==t&&(e.insertAdjacentElement("afterend",t),aO(r))});return n.observe(e.ownerDocument.body,{childList:!0,subtree:!0}),n}(h,X,y));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),r=null!=(e=null==t?void 0:t.handle)?e:null==t?void 0:t.element;mq(r)&&r.focus()},Ee=()=>{null==fe||fe.disconnect(),null==he||he.disconnect(),ge.disconnect(),ye.removeEventListener("resize",xe),iO(y)&&(y.removeEventListener("beforetoggle",iN),y.removeAttribute("popover")),y.removeAttribute(ZL),D.reset();const e=()=>{var e;if(me&&aN(h)){const t=Array.from(h.cells);for(const[r,n]of t.entries())n.style.width=null!=(e=me[r])?e:""}p.status="idle";const t=null!=s.current.translate,r=c.status.dragging;X&&(!r&&t||X.parentElement!==y.parentElement)&&y.isConnected&&X.replaceWith(y),null==X||X.remove()};y===this.overlay?setTimeout(e,0):e()},Re=null==u?void 0:u.dropAnimation,Ae=this,Ie=nD(()=>{var e,t,r;const{transform:n,status:o}=c;if((n.x||n.y||s.current.translate)&&o.dragging){const o=null!=(e=v.translate)?e:{x:0,y:0},i={x:n.x/x.scaleX+o.x,y:n.y/x.scaleY+o.y},a=s.current.translate,l=BM(()=>c.modifiers),d=BM(()=>{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!=(r=null==p?void 0:p.easing)?r:"cubic-bezier(0.25, 1, 0.5, 1)"}`:"0ms linear";if(D.set({transition:H?`${H}, translate ${f}`:`translate ${f}`,translate:`${i.x}px ${i.y}px 0`},JL),null==fe||fe.takeRecords(),d&&d!==ve&&a&&!l.length){const e=ID.delta(i,a);c.shape=MD.from(d.boundingRectangle).translate(e.x*x.scaleX,e.y*x.scaleY)}else c.shape=new NO(y);s.current.translate=i}},function(){if(c.status.dropped){this.dispose(),p.status="dropping";const e=void 0!==(null==m?void 0:m.dropAnimation)?m.dropAnimation:void 0!==Ae.dropAnimation?Ae.dropAnimation:Re;let t=s.current.translate;const r=null!=t;if(t||h===y||(t={x:0,y:0}),!t||null===e)return void Ee();l.renderer.rendering.then(()=>{!function(e){var t,r,n,o;const{animation:i}=e;if("function"==typeof i){const t=i({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=hN,easing:s=mN}=null!=i?i:{};aO(e.feedbackElement);const[,l]=null!=(t=uq(e.feedbackElement,e=>"translate"in e))?t:[];null==l||l.pause();const u=null!=(r=e.placeholder)?r:e.element,c={frameTransform:oN(e.feedbackElement,u)?null:void 0},d=new NO(e.feedbackElement,c),p=null!=(n=SO(mO(e.feedbackElement).translate))?n:e.translate,f=new NO(u,c),h=MD.delta(d,f,e.alignment),m=p.x-h.x,g=p.y-h.y,b=Math.round(d.intrinsicHeight)!==Math.round(f.intrinsicHeight)?{minHeight:[`${d.intrinsicHeight}px`,`${f.intrinsicHeight}px`],maxHeight:[`${d.intrinsicHeight}px`,`${f.intrinsicHeight}px`]}:{},v=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},JL),e.feedbackElement.setAttribute(XL,""),null==(o=e.getElementMutationObserver())||o.takeRecords(),DO({element:e.feedbackElement,keyframes:nL(rL(rL({},b),v),{translate:[`${p.x}px ${p.y}px 0`,`${m}px ${g}px 0`]}),options:{duration:Iq(fq(e.feedbackElement))?0:e.moved||e.feedbackElement!==e.element?a:0,easing:s}}).then(()=>{e.feedbackElement.removeAttribute(XL),null==l||l.finish(),e.cleanup(),requestAnimationFrame(e.restoreFocus)})}({source:p,element:h,feedbackElement:y,placeholder:X,translate:t,moved:r,transition:T,alignment:p.alignment,styles:D,animation:null!=e?e:void 0,getElementMutationObserver:()=>fe,cleanup:Ee,restoreFocus:Ce})})}});return()=>{Ee(),Ie()}},pL(uN,4,"overlay",sN,gN,cN),cL(uN,gN),gN.configure=fP(gN);var bN,vN,yN,xN,SN,wN,CN,EN=gN,RN=!0;yN=[eD],xN=CO.Forward,bN=[eD],vN=CO.Reverse;var AN=class{constructor(){gL(this,wN,dL(SN,8,this,RN)),dL(SN,11,this),gL(this,CN,dL(SN,12,this,RN)),dL(SN,15,this)}isLocked(e){return e!==CO.Idle&&(null==e?this[CO.Forward]===RN&&this[CO.Reverse]===RN:this[e]===RN)}unlock(e){e!==CO.Idle&&(this[e]=false)}};SN=aL(null),wN=new WeakMap,CN=new WeakMap,pL(SN,4,xN,yN,AN,wN),pL(SN,4,vN,bN,AN,CN),cL(SN,AN);var IN,MN,kN,DN,PN,TN,qN=[CO.Forward,CO.Reverse],ON=class{constructor(){this.x=new AN,this.y=new AN}isLocked(){return this.x.isLocked()&&this.y.isLocked()}},LN=class extends mP{constructor(e){super(e);const t=ZM(new ON);let r=null;this.signal=t,lk(()=>{const{status:n}=e.dragOperation;if(!n.initialized)return r=null,void(t.value=new ON);const{delta:o}=e.dragOperation.position;if(r){const e={x:NN(o.x,r.x),y:NN(o.y,r.y)},n=t.peek();zM(()=>{for(const t of jD)for(const r of qN)e[t]===r&&n[t].unlock(r);t.value=n})}r=o})}get current(){return this.signal.peek()}};function NN(e,t){return Math.sign(e-t)}var jN=class extends(MN=bP,IN=[eD],MN){constructor(e){super(e),gL(this,DN,dL(kN,8,this,!1)),dL(kN,11,this),gL(this,PN),gL(this,TN,()=>{if(!mL(this,PN))return;const{element:e,by:t}=mL(this,PN);t.y&&(e.scrollTop+=t.y),t.x&&(e.scrollLeft+=t.x)}),this.scroll=(e,t)=>{var r;if(this.disabled)return!1;const n=this.getScrollableElements();if(!n)return bL(this,PN,void 0),!1;const{position:o}=this.manager.dragOperation,i=null==o?void 0:o.current;if(i){const{by:o}=null!=e?e:{},a=o?{x:_N(o.x),y:_N(o.y)}:void 0,s=a?void 0:this.scrollIntentTracker.current;if(null==s?void 0:s.isLocked())return!1;for(const e of n){const n=lO(e),l=uO(e,o,n);if(l.x||l.y){const{speed:l,direction:u}=AO(e,i,a,null==t?void 0:t.acceleration,null==t?void 0:t.threshold,void 0,n);if(s)for(const e of jD)s[e].isLocked(u[e])&&(l[e]=0,u[e]=0);if(u.x||u.y){const{x:t,y:n}=null!=o?o:u,i=t*l.x,a=n*l.y;if(i||a){const t=null==(r=mL(this,PN))?void 0:r.by;if(this.autoScrolling&&t){if(t.x&&!i||t.y&&!a)continue}return bL(this,PN,{element:e,by:{x:i,y:a}}),dO.schedule(mL(this,TN)),!0}}}}}return bL(this,PN,void 0),!1};let t=null,r=null;const n=Zk(()=>{const{position:r,source:n}=e.dragOperation;if(!r)return null;const o=Dq(Aq(null==n?void 0:n.element),r.current);return o&&(t=o),null!=o?o:t}),o=Zk(()=>{const t=n.value,{documentElement:o}=bq(t);if(!t||t===o){const{target:t}=e.dragOperation,n=null==t?void 0:t.element;if(n){const e=vO(n,{excludeElement:!1});return r=e,e}}if(t){const e=vO(t,{excludeElement:!1});return this.autoScrolling&&r&&e.size<(null==r?void 0:r.size)?r:(r=e,e)}return r=null,null},Qk);this.getScrollableElements=()=>o.value,this.scrollIntentTracker=new LN(e),this.destroy=e.monitor.addEventListener("dragmove",t=>{!this.disabled&&!t.defaultPrevented&&FO(e.dragOperation.activatorEvent)&&t.by&&this.scroll({by:t.by})&&t.preventDefault()})}};function _N(e){return e>0?CO.Forward:e<0?CO.Reverse:CO.Idle}kN=aL(MN),DN=new WeakMap,PN=new WeakMap,TN=new WeakMap,pL(kN,4,"autoScrolling",IN,jN,DN),cL(kN,jN);var zN=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()}),FN=class extends mP{constructor(e,t){super(e,t);const r=e.registry.plugins.get(jN);if(!r)throw new Error("AutoScroller plugin depends on Scroller plugin");this.destroy=lk(()=>{var t,n,o;if(this.disabled)return;const{position:i,status:a}=e.dragOperation;if(a.dragging){const e={acceleration:null==(t=this.options)?void 0:t.acceleration,threshold:"number"==typeof(null==(n=this.options)?void 0:n.threshold)?{x:this.options.threshold,y:this.options.threshold}:null==(o=this.options)?void 0:o.threshold};if(r.scroll(void 0,e)){r.autoScrolling=!0;const t=setInterval(()=>zN.schedule(()=>r.scroll(void 0,e)),10);return()=>{clearInterval(t)}}r.autoScrolling=!1}})}};FN.configure=fP(FN);var $N,BN=FN,HN={capture:!0,passive:!0},VN=class extends bP{constructor(e){super(e),gL(this,$N),this.handleScroll=()=>{null==mL(this,$N)&&bL(this,$N,setTimeout(()=>{this.manager.collisionObserver.forceUpdate(!1),bL(this,$N,void 0)},50))};const{dragOperation:t}=this.manager;this.destroy=lk(()=>{var e,r,n;if(t.status.dragging){const o=null!=(n=null==(r=null==(e=t.source)?void 0:e.element)?void 0:r.ownerDocument)?n:document;return o.addEventListener("scroll",this.handleScroll,HN),()=>{o.removeEventListener("scroll",this.handleScroll,HN)}}})}};$N=new WeakMap;function WN(){var e;null==(e=document.getSelection())||e.removeAllRanges()}function UN(e,t){const r=KN(e.key);return t.some(e=>KN(e)===r)}var GN=new Set(["alt","altgraph","backspace","capslock","control","delete","end","enter","escape","home","insert","meta","pagedown","pageup","pause","printscreen","shift","space","tab","arrowdown","arrowleft","arrowright","arrowup","f1","f2","f3","f4","f5","f6","f7","f8","f9","f10","f11","f12"]);function KN(e){if(" "===e||"Spacebar"===e)return"space";if(/^Key[A-Z]$/.test(e))return e.slice(3).toLowerCase();if(/^Digit[0-9]$/.test(e))return e.slice(5);if(1===e.length)return e.toLowerCase();const t=e.toLowerCase();return GN.has(t)?t:e}var YN,XN=Object.freeze({offset:10,keyboardCodes:{start:["Space","Enter"],cancel:["Escape"],end:["Space","Enter","Tab"],up:["ArrowUp"],down:["ArrowDown"],left:["ArrowLeft"],right:["ArrowRight"]},preventActivation(e,t){var r;const n=null!=(r=t.handle)?r:t.element;return e.target!==n}}),JN=class extends MT{constructor(e,t){super(e),this.manager=e,this.options=t,gL(this,YN,[]),this.listeners=new Tq,this.handleSourceKeyDown=(e,t,r)=>{if(this.disabled||e.defaultPrevented)return;if(!zO(e.target))return;if(t.disabled)return;const{keyboardCodes:n=XN.keyboardCodes,preventActivation:o=XN.preventActivation}=null!=r?r:{};UN(e,n.start)&&this.manager.dragOperation.status.idle&&((null==o?void 0:o(e,t))||this.handleStart(e,t,r))}}bind(e,t=this.options){const r=lk(()=>{var r;const n=null!=(r=e.handle)?r:e.element,o=r=>{FO(r)&&this.handleSourceKeyDown(r,e,t)};if(n)return n.addEventListener("keydown",o),()=>{n.removeEventListener("keydown",o)}});return r}handleStart(e,t,r){const{element:n}=t;if(!n)throw new Error("Source draggable does not have an associated element");e.preventDefault(),e.stopImmediatePropagation(),IO(n);const{center:o}=new NO(n);if(this.manager.actions.start({event:e,coordinates:{x:o.x,y:o.y},source:t}).signal.aborted)return this.cleanup();this.sideEffects();const i=bq(n),a=[this.listeners.bind(i,[{type:"keydown",listener:e=>this.handleKeyDown(e,t,r),options:{capture:!0}}])];mL(this,YN).push(...a)}handleKeyDown(e,t,r){const{keyboardCodes:n=XN.keyboardCodes}=null!=r?r:{};if(UN(e,[...n.end,...n.cancel])){e.preventDefault();const t=UN(e,n.cancel);return void this.handleEnd(e,t)}UN(e,n.up)?this.handleMove("up",e):UN(e,n.down)&&this.handleMove("down",e),UN(e,n.left)?this.handleMove("left",e):UN(e,n.right)&&this.handleMove("right",e)}handleEnd(e,t){this.manager.actions.stop({event:e,canceled:t}),this.cleanup()}handleMove(e,t){var r,n;const{shape:o}=this.manager.dragOperation,i=t.shiftKey?5:1;let a={x:0,y:0},s=null!=(n=null==(r=this.options)?void 0:r.offset)?n:XN.offset;if("number"==typeof s&&(s={x:s,y:s}),o){switch(e){case"up":a={x:0,y:-s.y*i};break;case"down":a={x:0,y:s.y*i};break;case"left":a={x:-s.x*i,y:0};break;case"right":a={x:s.x*i,y:0}}(a.x||a.y)&&(t.preventDefault(),this.manager.actions.move({event:t,by:a}))}}sideEffects(){const e=this.manager.registry.plugins.get(BN);!1===(null==e?void 0:e.disabled)&&(e.disable(),mL(this,YN).push(()=>{e.enable()}))}cleanup(){mL(this,YN).forEach(e=>e()),bL(this,YN,[])}destroy(){this.cleanup(),this.listeners.clear()}};YN=new WeakMap,JN.configure=fP(JN),JN.defaults=XN;var ZN,QN,ej,tj=JN;ZN=new WeakMap;QN=new WeakMap,ej=new WeakMap;var rj=class{};rj.Delay=class extends DT{constructor(){super(...arguments),gL(this,QN),gL(this,ej)}onEvent(e){switch(e.type){case"pointerdown":bL(this,ej,xq(e)),bL(this,QN,setTimeout(()=>this.activate(e),this.options.value));break;case"pointermove":if(!mL(this,ej))return;const{x:t,y:r}=xq(e);PD({x:t-mL(this,ej).x,y:r-mL(this,ej).y},this.options.tolerance)&&this.abort();break;case"pointerup":this.abort()}}abort(){mL(this,QN)&&(clearTimeout(mL(this,QN)),bL(this,ej,void 0),bL(this,QN,void 0))}},rj.Distance=class extends DT{constructor(){super(...arguments),gL(this,ZN)}onEvent(e){switch(e.type){case"pointerdown":bL(this,ZN,xq(e));break;case"pointermove":if(!mL(this,ZN))return;const{x:t,y:r}=xq(e),n={x:t-mL(this,ZN).x,y:r-mL(this,ZN).y},{tolerance:o}=this.options;if(o&&PD(n,o))return void this.abort();PD(n,this.options.value)&&this.activate(e);break;case"pointerup":this.abort()}}abort(){bL(this,ZN,void 0)}};var nj,oj=Object.freeze({activationConstraints(e,t){var r;const{pointerType:n,target:o}=e;if("mouse"!==n||!zO(o)||t.handle!==o&&!(null==(r=t.handle)?void 0:r.contains(o)))return"touch"===n?[new rj.Delay({value:250,tolerance:5})]:function(e){if(!zO(e))return!1;const{tagName:t}=e;return"INPUT"===t||"TEXTAREA"===t||(r=e).hasAttribute("contenteditable")&&"false"!==r.getAttribute("contenteditable");var r}(o)&&!e.defaultPrevented?[new rj.Delay({value:200,tolerance:0})]:[new rj.Delay({value:200,tolerance:10}),new rj.Distance({value:5})]},preventActivation(e,t){var r;const{target:n}=e;if(n===t.element)return!1;if(n===t.handle)return!1;if(!zO(n))return!1;if(null==(r=t.handle)?void 0:r.contains(n))return!1;const o=n.closest('\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n a[href],\n [contenteditable]:not([contenteditable="false"])\n ');return o!==t.element&&Boolean(o)}}),ij=class extends MT{constructor(e,t){super(e),this.manager=e,this.options=t,gL(this,nj,new Set),this.listeners=new Tq,this.latest={event:void 0,coordinates:void 0},this.handleMove=()=>{const{event:e,coordinates:t}=this.latest;e&&t&&this.manager.actions.move({event:e,to:t})},this.handleCancel=this.handleCancel.bind(this),this.handlePointerUp=this.handlePointerUp.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}activationConstraints(e,t,r=this.options){const{activationConstraints:n=oj.activationConstraints}=null!=r?r:{};return"function"==typeof n?n(e,t):n}bind(e,t=this.options){const r=lk(()=>{var r;const n=new AbortController,{signal:o}=n,i=r=>{(function(e){if(!e)return!1;const{PointerEvent:t}=fq(e.target);return e instanceof t})(r)&&this.handlePointerDown(r,e,t)};let a=[null!=(r=e.handle)?r:e.element];(null==t?void 0:t.activatorElements)&&(a=Array.isArray(t.activatorElements)?t.activatorElements:t.activatorElements(e));for(const e of a)e&&(cj(e.ownerDocument.defaultView),e.addEventListener("pointerdown",i,{signal:o}));return()=>n.abort()});return r}handlePointerDown(e,t,r){if(this.disabled||!e.isPrimary||0!==e.button||!zO(e.target)||t.disabled||function(e){return"sensor"in e}(e)||!this.manager.dragOperation.status.idle)return;const{preventActivation:n=oj.preventActivation}=null!=r?r:{};if(null==n?void 0:n(e,t))return;const{target:o}=e,i=mq(o)&&o.draggable&&"true"===o.getAttribute("draggable"),a=yO(t.element),{x:s,y:l}=xq(e);this.initialCoordinates={x:s*a.scaleX+a.x,y:l*a.scaleY+a.y};const u=this.activationConstraints(e,t,r);e.sensor=this;const c=new kT(u,e=>this.handleStart(t,e));c.signal.onabort=()=>this.handleCancel(e),c.onEvent(e),this.controller=c;const d=wq(),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:i?this.handleCancel:sj,options:{capture:!0}}]);mL(this,nj).add(()=>{p(),this.initialCoordinates=void 0})}handlePointerMove(e,t){var r,n;!1===(null==(r=this.controller)?void 0:r.activated)&&(null==(n=this.controller)||n.onEvent(e));const{status:o}=this.manager.dragOperation;if(o.initializing||o.dragging){const r=xq(e),n=yO(t.element);r.x=r.x*n.scaleX+n.x,r.y=r.y*n.scaleY+n.y,e.preventDefault(),e.stopPropagation(),this.latest.event=e,this.latest.coordinates=r,o.dragging&&dO.schedule(this.handleMove)}}handlePointerUp(e){const{status:t}=this.manager.dragOperation;if(!t.idle){e.preventDefault(),e.stopPropagation();const r=!t.initialized,n=bq(e.target),o=n.defaultView;if(!r&&o){const e=e=>{e.target===n.body&&e.detail>0&&(e.preventDefault(),e.stopImmediatePropagation())};o.addEventListener("click",e,!0),o.setTimeout(()=>{o.removeEventListener("click",e,!0)},0)}this.manager.actions.stop({event:e,canceled:r})}this.cleanup()}handleKeyDown(e){"Escape"===e.key&&(e.preventDefault(),this.handleCancel(e))}handleStart(e,t){const{manager:r,initialCoordinates:n}=this;if(!n||!r.dragOperation.status.idle)return;if(t.defaultPrevented)return;const o=r.actions.start({coordinates:n,event:t,source:e});if(o.signal.aborted)return this.cleanup();t.preventDefault();const i=bq(t.target).body;try{i.setPointerCapture(t.pointerId)}catch(e){return void this.handleCancel(t)}const a=zO(t.target)?[t.target,i]:i,s=this.listeners.bind(a,[{type:"touchmove",listener:sj,options:{passive:!1}},{type:"click",listener:sj},{type:"contextmenu",listener:sj},{type:"keydown",listener:this.handleKeyDown}]);mL(this,nj).add(s),r.renderer.rendering.then(()=>{!o.signal.aborted&&r.dragOperation.status.dragging&&dO.schedule(this.handleMove)})}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},mL(this,nj).forEach(e=>e()),mL(this,nj).clear()}destroy(){this.cleanup(),this.listeners.clear()}};nj=new WeakMap,ij.configure=fP(ij),ij.defaults=oj;var aj=ij;function sj(e){e.preventDefault()}function lj(){}var uj=new WeakSet;function cj(e){e&&!uj.has(e)&&(e.addEventListener("touchmove",lj,{capture:!1,passive:!1}),uj.add(e))}var dj,pj,fj,hj,mj,gj,bj,vj,yj,xj,Sj,wj,Cj,Ej,Rj,Aj,Ij={modifiers:[],plugins:[ML,BN,class extends mP{constructor(e,t){super(e,t),this.manager=e;const{cursor:r="grabbing"}=null!=t?t:{},n=e.registry.plugins.get(KL),o=null==n?void 0:n.register(`* { cursor: ${r} !important; }`);if(o){const e=this.destroy.bind(this);this.destroy=()=>{o(),e()}}}},EN,class extends mP{constructor(e){super(e),this.manager=e;const t=e.registry.plugins.get(KL),r=null==t?void 0:t.register("* { user-select: none !important; -webkit-user-select: none !important; }");if(this.destroy=lk(()=>{const{dragOperation:e}=this.manager;if(e.status.initialized)return WN(),document.addEventListener("selectionchange",WN,{capture:!0}),()=>{document.removeEventListener("selectionchange",WN,{capture:!0})}}),r){const e=this.destroy.bind(this);this.destroy=()=>{r(),e()}}}}],sensors:[aj,tj]},Mj=class extends tq{constructor(e={}){const t=eq(e.plugins,Ij.plugins),r=eq(e.sensors,Ij.sensors),n=eq(e.modifiers,Ij.modifiers);super(nL(rL({},e),{plugins:[VN,jN,KL,...t],sensors:r,modifiers:n}))}},kj=class extends(fj=sT,pj=[eD],dj=[eD],fj){constructor(e,t){var r=e,{element:n,effects:o=()=>[],handle:i}=r,a=iL(r,["element","effects","handle"]);super(rL({effects:()=>[...o(),()=>{var e,t;const{manager:r}=this;if(!r)return;const n=(null!=(t=null==(e=this.sensors)?void 0:e.map(hP))?t:[...r.sensors]).map(e=>{const t=e instanceof MT?e:r.registry.register(e.plugin),n=e instanceof MT?void 0:e.options;return t.bind(this,n)});return function(){n.forEach(e=>e())}}]},a),t),gL(this,mj,dL(hj,8,this)),dL(hj,11,this),gL(this,gj,dL(hj,12,this)),dL(hj,15,this),this.element=n,this.handle=i}};hj=aL(fj),mj=new WeakMap,gj=new WeakMap,pL(hj,4,"handle",pj,kj,mj),pL(hj,4,"element",dj,kj,gj),cL(hj,kj);var Dj=class extends(yj=lT,vj=[eD],bj=[eD],yj){constructor(e,t){var r=e,{element:n,effects:o=()=>[]}=r,i=iL(r,["element","effects"]);const{collisionDetector:a=HO}=i,s=e=>{const{manager:t,element:r}=this;if(!r||null===e)return void(this.shape=void 0);if(!t)return;const n=new NO(r),o=BM(()=>this.shape);return n&&(null==o?void 0:o.equals(n))?o:(this.shape=n,n)},l=ZM(!1);super(nL(rL({},i),{collisionDetector:a,effects:()=>[...o(),()=>{const{element:e,manager:t}=this;if(!t)return;const{dragOperation:r}=t,{source:n}=r;l.value=Boolean(n&&r.status.initialized&&e&&!this.disabled&&this.accepts(n))},()=>{const{element:e}=this;if(l.value&&e){const t=new oO(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),gL(this,Rj),gL(this,Sj,dL(xj,8,this)),dL(xj,11,this),gL(this,Aj,dL(xj,12,this)),dL(xj,15,this),this.element=n,this.refreshShape=()=>s()}set element(e){bL(this,Rj,e,Ej)}get element(){var e;return null!=(e=this.proxy)?e:mL(this,Rj,Cj)}};function Pj(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}xj=aL(yj),Sj=new WeakMap,Rj=new WeakSet,Aj=new WeakMap,wj=pL(xj,20,"#element",vj,Rj,Sj),Cj=wj.get,Ej=wj.set,pL(xj,4,"proxy",bj,Dj,Aj),cL(xj,Dj);var Tj="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?L:P;function qj(){const e=I(0)[1];return q(()=>{e(e=>e+1)},[e])}function Oj(e,t=[],r=!1){const n=M(e);return n.current=e,function(e,t=!1){const r=M(e.peek()),n=M(!1),o=qj();return Tj(()=>lk(()=>{const i=r.current,a=e.value;if(i!==a){if(r.current=a,!n.current)return;t?V(o):o()}}),[e,t,o]),{get value(){return n.current=!0,e.peek()}}}(A(()=>Zk(()=>n.current()),t),r)}function Lj(e){const t=M(e);return Tj(()=>{t.current=e},[e]),t}function Nj(e,t){const r=qj(),n=Lj(t),o=A(()=>{const t=new Map;return{tracked:t,propertyCount:ZM(0),active:!1,proxy:e?new Proxy(e,{get(e,r){const n=e[r];return t.has(r)||t.set(r,n),n}}):e}},[e]);return Tj(()=>{o.propertyCount.value=o.tracked.size}),Tj(()=>{if(!e)return;const{tracked:t,propertyCount:i}=o;o.active=!0;const a=lk(()=>{i.value;let a=!1,s=!1;for(const[r,o]of t){const i=e[r];Object.is(o,i)||(a=!0,t.set(r,i),s=!0===BM(()=>{var e;return null==(e=n.current)?void 0:e.call(n,r,o,i)})||s)}a&&(s?queueMicrotask(()=>{o.active&&V(r)}):r())});return()=>{o.active=!1,a()}},[e,o,r,n]),o.proxy}function jj(e,t){e()}function _j(e,t,r=P,n=Object.is){const o=M(e);r(()=>{const r=o.current;n(e,r)||(o.current=e,t(e,r))},[t,e])}function zj(e,t){const r=M(Pj(e));Tj(()=>{const n=Pj(e);n!==r.current&&(r.current=n,t(n))})}var Fj=Object.defineProperty,$j=Object.defineProperties,Bj=Object.getOwnPropertyDescriptors,Hj=Object.getOwnPropertySymbols,Vj=Object.prototype.hasOwnProperty,Wj=Object.prototype.propertyIsEnumerable,Uj=(e,t,r)=>t in e?Fj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Gj=k(new Mj),Kj=j(_(({children:e},t)=>{const[r,n]=I(0),o=M(null),i=M(null),a=A(()=>({renderer:{get rendering(){var e;return null!=(e=o.current)?e:Promise.resolve()}},trackRendering(e){o.current||(o.current=new Promise(e=>{i.current=e})),z(()=>{e(),n(e=>e+1)})}}),[]);return Tj(()=>{var e;null==(e=i.current)||e.call(i),o.current=null},[e,r]),F(t,()=>a),null})),Yj=[void 0,Qk];function Xj(e){var t=e,{children:r,onCollision:n,onBeforeDragStart:o,onDragStart:i,onDragMove:a,onDragOver:s,onDragEnd:l}=t,u=((e,t)=>{var r={};for(var n in e)Vj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&Hj)for(var n of Hj(e))t.indexOf(n)<0&&Wj.call(e,n)&&(r[n]=e[n]);return r})(t,["children","onCollision","onBeforeDragStart","onDragStart","onDragMove","onDragOver","onDragEnd"]);const c=M(null),{plugins:d,modifiers:p,sensors:f}=u,h=eq(d,Ij.plugins),m=eq(f,Ij.sensors),g=eq(p,Ij.modifiers),b=Lj(o),v=Lj(i),y=Lj(s),x=Lj(a),S=Lj(l),w=Lj(n),C=function(e){const t=M(null);t.current||(t.current=e());return N(()=>()=>{var e;return null==(e=t.current)?void 0:e.destroy()},[]),t.current}(()=>{var e;return null!=(e=u.manager)?e:new Mj(u)});return P(()=>{if(!c.current)throw new Error("Renderer not found");const{renderer:e,trackRendering:t}=c.current,{monitor:r}=C;C.renderer=e;const n=[r.addEventListener("beforedragstart",e=>{const r=b.current;r&&t(()=>r(e,C))}),r.addEventListener("dragstart",e=>{var t;return null==(t=v.current)?void 0:t.call(v,e,C)}),r.addEventListener("dragover",e=>{const r=y.current;r&&t(()=>r(e,C))}),r.addEventListener("dragmove",e=>{const r=x.current;r&&t(()=>r(e,C))}),r.addEventListener("dragend",e=>{const r=S.current;r&&t(()=>r(e,C))}),r.addEventListener("collision",e=>{var t;return null==(t=w.current)?void 0:t.call(w,e,C)})];return()=>n.forEach(e=>e())},[C]),_j(h,()=>C&&(C.plugins=h),...Yj),_j(m,()=>C&&(C.sensors=m),...Yj),_j(g,()=>C&&(C.modifiers=g),...Yj),Gt.jsxs(Gj.Provider,{value:C,children:[Gt.jsx(Kj,{ref:c,children:r}),r]})}function Jj(){return O(Gj)}function Zj(e){var t;const r=null!=(t=Jj())?t:void 0,[n]=I(()=>e(r));return n.manager!==r&&(n.manager=r),Tj(n.register,[r,n]),n}function Qj({children:e,className:t,dropAnimation:r,style:n,tag:o,disabled:i}){var a;const s=M(null),l=Jj(),u=null!=(a=Oj(()=>null==l?void 0:l.dragOperation.source,[l]).value)?a:null,c="function"==typeof i?i(u):i;P(()=>{if(!s.current||!l||c)return;const e=l.plugins.find(e=>e instanceof EN);return e?(e.overlay=s.current,()=>{e.overlay=void 0}):void 0},[l,c]),P(()=>{if(!l)return;const e=l.plugins.find(e=>e instanceof EN);return e?(e.dropAnimation=r,()=>{e.dropAnimation=void 0}):void 0},[l,r]);const d=A(()=>{if(!l)return null;const e=new Proxy(l.registry,{get:(e,t)=>"register"===t||"unregister"===t?e_:e[t]});return new Proxy(l,{get:(t,r)=>"registry"===r?e:t[r]})},[l]);return Gt.jsx(Gj.Provider,{value:d,children:w(o||"div",{ref:s,className:t,style:n,"data-dnd-overlay":!0},function(){if(!u||c)return null;if("function"==typeof e)return Gt.jsx(t_,{source:u,children:e});return e}())})}function e_(){return()=>{}}function t_({children:e,source:t}){return e(Nj(t))}var r_,n_,o_,i_,a_,s_=Object.create,l_=Object.defineProperty,u_=Object.getOwnPropertyDescriptor,c_=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),d_=e=>{throw TypeError(e)},p_=["class","method","getter","setter","accessor","field","value","get","set"],f_=e=>void 0!==e&&"function"!=typeof e?d_("Function expected"):e,h_=(e,t,r,n,o)=>({kind:p_[e],name:t,metadata:n,addInitializer:e=>r._?d_("Already initialized"):o.push(f_(e||null))}),m_=(e,t,r,n,o,i)=>{for(var a,s,l,u,c=7&t,d=p_[c+5],p=e[2]||(e[2]=[]),f=(o=o.prototype,u_(o,r)),h=n.length-1;h>=0;h--)(l=h_(c,r,s={},e[3],p)).static=false,l.private=false,u=l.access={has:e=>r in e},u.get=e=>e[r],a=(0,n[h])(f[d],l),s._=1,f_(a)&&(f[d]=a);return f&&l_(o,r,f),o},g_=(e,t,r)=>t.has(e)||d_("Cannot "+r),b_=class e{constructor(e,t){this.x=e,this.y=t}static delta(t,r){return new e(t.x-r.x,t.y-r.y)}static distance(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}static equals(e,t){return e.x===t.x&&e.y===t.y}static from({x:t,y:r}){return new e(t,r)}},v_=class extends(o_=iD,n_=[tD],r_=[tD],o_){constructor(e){var t,r,n;super(b_.from(e),(e,t)=>b_.equals(e,t)),((e,t,r)=>{for(var n=0,o=e[t>>1],i=o&&o.length;n<i;n++)o[n].call(r)})(a_,5,this),t=this,n=0,(r=i_).has(t)?d_("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(t):r.set(t,n),this.velocity={x:0,y:0}}get delta(){return b_.delta(this.current,this.initial)}get direction(){const{current:e,previous:t}=this;if(!t)return null;const r={x:e.x-t.x,y:e.y-t.y};return r.x||r.y?Math.abs(r.x)>Math.abs(r.y)?r.x>0?"right":"left":r.y>0?"down":"up":null}get current(){return super.current}set current(e){const{current:t}=this,r=b_.from(e),n={x:r.x-t.x,y:r.y-t.y},o=Date.now(),i=o-(g_(a=this,s=i_,"read from private field"),s.get(a));var a,s;const l=e=>Math.round(e/i*100);zM(()=>{((e,t,r)=>{g_(e,t,"write to private field"),t.set(e,r)})(this,i_,o),this.velocity={x:l(n.x),y:l(n.y)},super.current=r})}reset(e=this.defaultValue){super.reset(b_.from(e)),this.velocity={x:0,y:0}}};a_=(e=>{var t;return[,,,s_(null!=(t=null==e?void 0:e[c_("metadata")])?t:null)]})(o_),i_=new WeakMap,m_(a_,2,"delta",n_,v_),m_(a_,2,"direction",r_,v_),((e,t)=>{((e,t,r)=>{t in e?l_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(t,c_("metadata"),e[3])})(a_,v_);var y_=(e=>(e.Horizontal="x",e.Vertical="y",e))(y_||{});Object.values(y_);var x_=e=>{var t;return null!=(t=(({dragOperation:e,droppable:t})=>{const r=e.position.current;if(!r)return null;const{id:n}=t;if(!t.shape)return null;if(t.shape.containsPoint(r))return{id:n,value:1/b_.distance(t.shape.center,r),type:ET.PointerIntersection,priority:CT.High};return null})(e))?t:(({dragOperation:e,droppable:t})=>{const{shape:r}=e;if(!t.shape||!(null==r?void 0:r.current))return null;const n=r.current.intersectionArea(t.shape);if(n){const{position:o}=e,i=b_.distance(t.shape.center,o.current),a=n/(r.current.area+t.shape.area-n)/i;return{id:t.id,value:a,type:ET.ShapeIntersection,priority:CT.Normal}}return null})(e)};function S_(e){const{collisionDetector:t,data:r,disabled:n,element:o,id:i,accept:a,type:s}=e,l=Zj(t=>new Dj(((e,t)=>$j(e,Bj(t)))(((e,t)=>{for(var r in t||(t={}))Vj.call(t,r)&&Uj(e,r,t[r]);if(Hj)for(var r of Hj(t))Wj.call(t,r)&&Uj(e,r,t[r]);return e})({},e),{register:!1,element:Pj(o)}),t)),u=Nj(l);return _j(i,()=>l.id=i),zj(o,e=>l.element=e),_j(a,()=>l.accept=a,void 0,Qk),_j(t,()=>l.collisionDetector=null!=t?t:x_),_j(r,()=>r&&(l.data=r)),_j(n,()=>l.disabled=!0===n),_j(s,()=>l.type=s),{droppable:u,get isDropTarget(){return u.isDropTarget},ref:q(e=>{var t,r;(e||!(null==(t=l.element)?void 0:t.isConnected)||(null==(r=l.manager)?void 0:r.dragOperation.status.idle))&&(l.element=null!=e?e:void 0)},[l])}}function w_(e){const t=Jj();P(()=>{if(!t)return;const r=Object.entries(e).reduce((e,[r,n])=>{if(n){const o=r.replace(/^on/,"").toLowerCase(),i=t.monitor.addEventListener(o,n);e.push(i)}return e},[]);return()=>r.forEach(e=>null==e?void 0:e())},[t,e])}const C_=e=>Array.from({length:e},(e,t)=>t),E_=({id:e,sectionIndex:t,itemIndex:r})=>Gt.jsx("span",{children:`${e}-${t}-${r}`}),R_=j(()=>{const e=Jg(MM)??E_,{startSectionIndex:t,startIndex:r,id:n}=Jg(TM)??{};return"number"!=typeof t||"number"!=typeof r||void 0===n?null:Gt.jsx(Qj,{dropAnimation:null,children:Gt.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:Gt.jsx(e,{id:n,sectionIndex:t,itemIndex:r})})})}),A_=({sectionIndex:e,itemIndex:t,isDragging:r})=>{const n=Jg(TM),o=n?.toSectionIndex===e&&n.toIndex===t;return Gt.jsx("div",{"data-key":"drop-target-indicator","data-testid":"drop-target-indicator",style:{visibility:o&&!r?"visible":"hidden",padding:0,background:"rgba(64, 64, 64, 1)",borderRadius:2,marginLeft:"4px",width:"calc(100% - 8px)",height:"2px"}})},I_=(e,t)=>e?"2px solid rgba(0, 135, 61, 1)":t?"1px dashed rgba(0, 0, 0, 0.43)":void 0,M_=j(({sectionIndex:e})=>{const t=Jg(SM)[e],r=Jg(wM),n=Jg(CM),o=null!==Jg(TM),i=n(e),a=r({sectionIndex:e}),{ref:s,isDropTarget:l}=S_({id:a,type:"section",accept:"item",collisionPriority:CT.Low,data:{id:a,sectionIndex:e,sectionKey:a}});return t>0?null:Gt.jsxs(yd,{ref:s,sx:{margin:"4px",outline:I_(l,o),borderRadius:"4px",boxSizing:"border-box"},children:[Gt.jsx(yd,{sx:{position:"relative",top:"4px"},children:Gt.jsx(A_,{sectionIndex:e,itemIndex:0,isDragging:!1})}),Gt.jsxs(yd,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px",padding:"20px 4px"},children:[Gt.jsx(Lc,{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:i.title}),Gt.jsx(Lc,{sx:{textAlign:"center",width:"fit-content",maxWidth:"100%",overflowWrap:"break-word",textOverflow:"ellipsis",fontSize:"12px",lineHeight:"150%",color:"rgba(64, 64, 64, 1)"},children:i.message})]})]})}),k_=j(({id:e,sectionIndex:t})=>{const r=Jg(IM);return void 0===r?null:w(r,{id:e,sectionIndex:t})});var D_=Object.defineProperty,P_=Object.defineProperties,T_=Object.getOwnPropertyDescriptors,q_=Object.getOwnPropertySymbols,O_=Object.prototype.hasOwnProperty,L_=Object.prototype.propertyIsEnumerable,N_=(e,t,r)=>t in e?D_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,j_=(e,t)=>{for(var r in t||(t={}))O_.call(t,r)&&N_(e,r,t[r]);if(q_)for(var r of q_(t))L_.call(t,r)&&N_(e,r,t[r]);return e},__=(e,t)=>P_(e,T_(t)),z_=class extends XT{apply({transform:e}){if(!this.options)return e;const{axis:t,value:r}=this.options;return __(j_({},e),{[t]:r})}};z_.configure=fP(z_);var F_=z_,$_=F_.configure({axis:"x",value:0});F_.configure({axis:"y",value:0});var B_=class extends XT{apply({transform:e}){var t;const{size:r=20}=null!=(t=this.options)?t:{},n="number"==typeof r?r:r.x,o="number"==typeof r?r:r.y;return __(j_({},e),{x:Math.ceil(e.x/n)*n,y:Math.ceil(e.y/o)*o})}};B_.configure=fP(B_);var H_=Object.create,V_=Object.defineProperty,W_=Object.defineProperties,U_=Object.getOwnPropertyDescriptor,G_=Object.getOwnPropertyDescriptors,K_=Object.getOwnPropertySymbols,Y_=Object.prototype.hasOwnProperty,X_=Object.prototype.propertyIsEnumerable,J_=e=>{throw TypeError(e)},Z_=(e,t,r)=>t in e?V_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Q_=(e,t)=>{for(var r in t||(t={}))Y_.call(t,r)&&Z_(e,r,t[r]);if(K_)for(var r of K_(t))X_.call(t,r)&&Z_(e,r,t[r]);return e},ez=(e,t)=>W_(e,G_(t)),tz=["class","method","getter","setter","accessor","field","value","get","set"],rz=e=>void 0!==e&&"function"!=typeof e?J_("Function expected"):e,nz=(e,t,r,n,o)=>({kind:tz[e],name:t,metadata:n,addInitializer:e=>r._?J_("Already initialized"):o.push(rz(e||null))}),oz=(e,t,r,n)=>{for(var o=0,i=e[t>>1],a=i&&i.length;o<a;o++)1&t?i[o].call(r):n=i[o].call(r,n);return n},iz=(e,t,r,n,o,i)=>{for(var a,s,l,u,c,d=7&t,p=e.length+1,f=tz[d+5],h=e[p-1]=[],m=e[p]||(e[p]=[]),g=(o=o.prototype,U_({get[r](){return sz(this,i)},set[r](e){return uz(this,i,e)}},r)),b=n.length-1;b>=0;b--)(u=nz(d,r,l={},e[3],m)).static=false,u.private=false,c=u.access={has:e=>r in e},c.get=e=>e[r],c.set=(e,t)=>e[r]=t,s=(0,n[b])({get:g.get,set:g.set},u),l._=1,void 0===s?rz(s)&&(g[f]=s):"object"!=typeof s||null===s?J_("Object expected"):(rz(a=s.get)&&(g.get=a),rz(a=s.set)&&(g.set=a),rz(a=s.init)&&h.unshift(a));return g&&V_(o,r,g),o},az=(e,t,r)=>t.has(e)||J_("Cannot "+r),sz=(e,t,r)=>(az(e,t,"read from private field"),t.get(e)),lz=(e,t,r)=>t.has(e)?J_("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),uz=(e,t,r,n)=>(az(e,t,"write to private field"),t.set(e,r),r);function cz(e){return e instanceof Uz||e instanceof Wz}var dz=class extends mP{constructor(e){super(e);const t=lk(()=>{const{dragOperation:t}=e;if(FO(t.activatorEvent)&&cz(t.source)&&t.status.initialized){const t=e.registry.plugins.get(jN);if(t)return t.disable(),()=>t.enable()}}),r=e.monitor.addEventListener("dragmove",(e,t)=>{queueMicrotask(()=>{if(this.disabled||e.defaultPrevented||!e.nativeEvent)return;const{dragOperation:r}=t;if(!FO(e.nativeEvent))return;if(!cz(r.source))return;if(!r.shape)return;const{actions:n,collisionObserver:o,registry:i}=t,{by:a}=e;if(!a)return;const s=function(e){const{x:t,y:r}=e;if(t>0)return"right";if(t<0)return"left";if(r>0)return"down";if(r<0)return"up"}(a),{source:l,target:u}=r,{center:c}=r.shape.current,d=[],p=[];zM(()=>{for(const e of i.droppables){const{id:t}=e;if(!e.accepts(l)||t===(null==u?void 0:u.id)&&cz(e)||!e.element)continue;let r=e.shape;const n=new NO(e.element,{getBoundingClientRect:e=>yq(e,void 0,.2)});n.height&&n.width&&(("down"==s&&c.y+10<n.center.y||"up"==s&&c.y-10>n.center.y||"left"==s&&c.x-10>n.center.x||"right"==s&&c.x+10<n.center.x)&&(d.push(e),e.shape=n,p.push(()=>e.shape=r)))}}),e.preventDefault(),o.disable();const f=o.computeCollisions(d,VO);zM(()=>p.forEach(e=>e()));const[h]=f;if(!h)return;const{id:m}=h,{index:g,group:b}=l.sortable;n.setDropTarget(m).then(()=>{const{source:e,target:t,shape:i}=r;if(!e||!cz(e)||!i)return;const{index:a,group:s,target:l}=e.sortable,u=g!==a||b!==s,c=u?l:null==t?void 0:t.element;if(!c)return;IO(c);const d=new NO(c);if(!d)return;const p=MD.delta(d,MD.from(i.current.boundingRectangle),e.alignment);n.move({by:p}),u?n.setDropTarget(e.id).then(()=>o.enable()):o.enable()})})});this.destroy=()=>{r(),t()}}};var pz=Object.defineProperty,fz=Object.defineProperties,hz=Object.getOwnPropertyDescriptors,mz=Object.getOwnPropertySymbols,gz=Object.prototype.hasOwnProperty,bz=Object.prototype.propertyIsEnumerable,vz=(e,t,r)=>t in e?pz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,yz=(e,t)=>{for(var r in t||(t={}))gz.call(t,r)&&vz(e,r,t[r]);if(mz)for(var r of mz(t))bz.call(t,r)&&vz(e,r,t[r]);return e},xz=(e,t)=>fz(e,hz(t));function Sz(e,t,r){if(t===r)return e;const n=e.slice();return n.splice(r,0,n.splice(t,1)[0]),n}function wz(e,t){const r=String(t);return Object.prototype.hasOwnProperty.call(e,r)?r:void 0}function Cz(e){return"initialIndex"in e&&"number"==typeof e.initialIndex&&"index"in e&&"number"==typeof e.index}function Ez(e,t){return function(e,t,r){var n,o;const{source:i,target:a,canceled:s}=t.operation;if(!i||!a||s)return"preventDefault"in t&&t.preventDefault(),e;const l=(e,t)=>e===t||null!==e&&"object"==typeof e&&"id"in e&&e.id===t;if(Array.isArray(e)){const n=e.findIndex(e=>l(e,i.id)),o=e.findIndex(e=>l(e,a.id));if(-1===n||-1===o){if(Cz(i)){const n=i.initialIndex,o=i.index;return n===o||n<0||n>=e.length?("preventDefault"in t&&t.preventDefault(),e):r(e,n,o)}return e}if(!s&&"index"in i&&"number"==typeof i.index){const t=i.index;if(t!==n)return r(e,n,t)}return r(e,n,o)}const u=Object.entries(e);let c,d,p=-1,f=-1;for(const[e,t]of u)if(-1===p&&(p=t.findIndex(e=>l(e,i.id)),-1!==p&&(c=e)),-1===f&&(f=t.findIndex(e=>l(e,a.id)),-1!==f&&(d=e)),-1!==p&&-1!==f)break;if(-1===p&&Cz(i)){const n=null==i.initialGroup?void 0:wz(e,i.initialGroup),o=i.initialIndex,a=null==i.group?void 0:wz(e,i.group),s=i.index;if(null==n||null==a)return"preventDefault"in t&&t.preventDefault(),e;if(n===a&&o===s)return"preventDefault"in t&&t.preventDefault(),e;if(n===a)return xz(yz({},e),{[n]:r(e[n],o,s)});const l=e[n][o];return xz(yz({},e),{[n]:[...e[n].slice(0,o),...e[n].slice(o+1)],[a]:[...e[a].slice(0,s),l,...e[a].slice(s)]})}if(!i.manager)return e;const{dragOperation:h}=i.manager,m=null!=(o=null==(n=h.shape)?void 0:n.current.center)?o:h.position.current;if(null==d){const t=wz(e,a.id);null!=t&&(d=t,f=a.shape&&m.y>a.shape.center.y?e[t].length:0)}if(null==c||null==d||c===d&&p===f){if(null!=c&&c===d&&p===f&&Cz(i)){const t=null==i.group?void 0:wz(e,i.group),n=null!=i.group&&t!==c,o=i.index!==p;if(n||o){const n=null==i.group?c:t;if(null!=n){if(c===n)return xz(yz({},e),{[c]:r(e[c],p,i.index)});const t=e[c][p];return xz(yz({},e),{[c]:[...e[c].slice(0,p),...e[c].slice(p+1)],[n]:[...e[n].slice(0,i.index),t,...e[n].slice(i.index)]})}}}return"preventDefault"in t&&t.preventDefault(),e}if(c===d)return xz(yz({},e),{[c]:r(e[c],p,f)});const g=a.shape&&Math.round(m.y)>Math.round(a.shape.center.y)?1:0,b=e[c][p];return xz(yz({},e),{[c]:[...e[c].slice(0,p),...e[c].slice(p+1)],[d]:[...e[d].slice(0,f+g),b,...e[d].slice(f+g)]})}(e,t,Sz)}function Rz(e){const t=new Map;for(const[,r]of e)for(const e of r)t.set(e.id,e.index);return t}function Az(e,t,r){var n;for(const[o,i]of t)for(const t of i){const i=e.get(t.id);if(t.index!==i||t.group!==o||!(null==(n=r.get(o))?void 0:n.has(t)))return!0}return!1}var Iz="__default__";function Mz(e,t,r,n){const o=n<t?"afterend":"beforebegin";r.insertAdjacentElement(o,e)}function kz(e,t){return e.index-t.index}function Dz(e,t){return e.initialIndex-t.initialIndex}function Pz(e,t=kz){return Array.from(e).sort(t)}var Tz=[dz,class extends mP{constructor(e){super(e);const t=()=>{const t=new Map;for(const r of e.registry.droppables)if(r instanceof Uz){const{sortable:e}=r,{group:n}=e;let o=t.get(n);o||(o=new Set,t.set(n,o)),o.add(e)}return t},r=[e.monitor.addEventListener("dragover",(e,r)=>{if(this.disabled)return;const{dragOperation:n}=r,{source:o,target:i}=n;if(!cz(o)||!cz(i))return;if(o.sortable===i.sortable)return;const a=t(),s=Rz(a),l=o.sortable.group===i.sortable.group,u=a.get(o.sortable.group),c=l?u:a.get(i.sortable.group);u&&c&&queueMicrotask(()=>{e.defaultPrevented||r.renderer.rendering.then(()=>{var n,d;const p=t();if(Az(s,a,p))return;const f=o.sortable.element,h=i.sortable.element;if(!h||!f)return;if(!l&&i.id===o.sortable.group)return;const m=Pz(u),g=l?m:Pz(c),b=null!=(n=o.sortable.group)?n:Iz,v=null!=(d=i.sortable.group)?d:Iz,y={[b]:m,[v]:g},x=Ez(y,e);if(y===x)return;const S=x[v].indexOf(o.sortable),w=x[v].indexOf(i.sortable);r.collisionObserver.disable(),Mz(f,S,h,w),zM(()=>{for(const[e,t]of x[b].entries())t.index=e;if(!l)for(const[e,t]of x[v].entries())t.group=i.sortable.group,t.index=e}),r.actions.setDropTarget(o.id).then(()=>r.collisionObserver.enable())})})}),e.monitor.addEventListener("dragend",(e,r)=>{if(!e.canceled)return;const{dragOperation:n}=r,{source:o}=n;cz(o)&&(o.sortable.initialIndex===o.sortable.index&&o.sortable.initialGroup===o.sortable.group||queueMicrotask(()=>{const e=t(),n=Rz(e),i=e.get(o.sortable.initialGroup);i&&r.renderer.rendering.then(()=>{const r=t();if(Az(n,e,r))return;const a=Pz(i),s=Pz(i,Dz),l=o.sortable.element,u=a[s.indexOf(o.sortable)],c=null==u?void 0:u.element;u&&c&&l&&(Mz(l,u.index,c,o.index),zM(()=>{for(const t of e.values()){const e=Array.from(t).values();for(const t of e)t.index=t.initialIndex,t.group=t.initialGroup}}))})}))})];this.destroy=()=>{for(const e of r)e()}}}],qz={duration:250,easing:"cubic-bezier(0.25, 1, 0.5, 1)",idle:!1};function Oz(e){var t,r;return"boolean"==typeof e?{draggable:e,droppable:e}:{draggable:null!=(t=null==e?void 0:e.draggable)&&t,droppable:null!=(r=null==e?void 0:e.droppable)&&r}}var Lz,Nz,jz,_z,zz,Fz,$z,Bz,Hz=new class{constructor(){Yk(this,oD,new WeakMap)}get(e,t){var r;return e?null==(r=Kk(this,oD).get(e))?void 0:r.get(t):void 0}set(e,t,r){var n;if(e)return Kk(this,oD).has(e)||Kk(this,oD).set(e,new Map),null==(n=Kk(this,oD).get(e))?void 0:n.set(t,r)}clear(e){var t;return e?null==(t=Kk(this,oD).get(e))?void 0:t.clear():void 0}};Nz=[eD],Lz=[eD];var Vz=class{constructor(e,t){lz(this,_z,oz(jz,8,this)),oz(jz,11,this),lz(this,zz),lz(this,Fz),lz(this,$z,oz(jz,12,this)),oz(jz,15,this),lz(this,Bz),this.register=()=>(zM(()=>{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=()=>{zM(()=>{var e,t;null==(e=this.manager)||e.registry.unregister(this.droppable),null==(t=this.manager)||t.registry.unregister(this.draggable)})},this.destroy=()=>{zM(()=>{this.droppable.destroy(),this.draggable.destroy()})};var r=e,{effects:n=()=>[],disabled:o,group:i,index:a,sensors:s,type:l,transition:u=qz,plugins:c}=r,d=((e,t)=>{var r={};for(var n in e)Y_.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&K_)for(var n of K_(e))t.indexOf(n)<0&&X_.call(e,n)&&(r[n]=e[n]);return r})(r,["effects","disabled","group","index","sensors","type","transition","plugins"]);const p=eq(c,Tz),f=Oz(o);this.droppable=new Uz(ez(Q_({},d),{disabled:f.droppable}),t,this),this.draggable=new Wz(ez(Q_({},d),{disabled:f.draggable,plugins:p,effects:()=>[()=>{var e,t,r;const n=null==(e=this.manager)?void 0:e.dragOperation.status;(null==n?void 0:n.initializationPending)&&this.id===(null==(r=null==(t=this.manager)?void 0:t.dragOperation.source)?void 0:r.id)&&Hz.clear(this.manager),(null==n?void 0:n.dragging)&&Hz.set(this.manager,this.id,BM(()=>({initialIndex:this.index,initialGroup:this.group})))},()=>{const{index:e,group:t,manager:r}=this,n=sz(this,Fz),o=sz(this,zz);e===n&&t===o||(uz(this,Fz,e),uz(this,zz,t),this.animate())},()=>{var e,t;const{target:r}=this,{isDragSource:n}=this.draggable;"move"===(null!=(t=null==(e=this.draggable.pluginConfig(EN))?void 0:e.feedback)?t:"default")&&n&&(this.droppable.disabled=!r)},...n()],type:l,sensors:s}),t,this),uz(this,Bz,d.element),this.manager=t,this.index=a,uz(this,Fz,a),this.group=i,uz(this,zz,i),this.type=l,this.transition=u}get initialIndex(){var e,t;return null!=(t=null==(e=Hz.get(this.manager,this.id))?void 0:e.initialIndex)?t:this.index}get initialGroup(){var e,t;return null!=(t=null==(e=Hz.get(this.manager,this.id))?void 0:e.initialGroup)?t:this.group}animate(){BM(()=>{const{manager:e,transition:t}=this,{shape:r}=this.droppable;if(!e)return;const{idle:n}=e.dragOperation.status;r&&t&&(!n||t.idle)&&e.renderer.rendering.then(()=>{const{element:n}=this;if(!n)return;for(const e of n.getAnimations())!("transitionProperty"in e)||"transform"!==e.transitionProperty&&"translate"!==e.transitionProperty&&"scale"!==e.transitionProperty||e.cancel();const o=this.refreshShape();if(!o)return;const i=r.boundingRectangle.left-o.boundingRectangle.left,a=r.boundingRectangle.top-o.boundingRectangle.top,{translate:s}=mO(n),l=PO(n,s,!1),u=PO(n,s);if(i||a){const r=Iq(fq(n))?ez(Q_({},t),{duration:0}):t;DO({element:n,keyframes:{translate:[`${l.x+i}px ${l.y+a}px ${l.z}`,`${u.x}px ${u.y}px ${u.z}`]},options:r}).then(()=>{e.dragOperation.status.dragging||(this.droppable.shape=void 0)})}})})}get manager(){return this.draggable.manager}set manager(e){zM(()=>{this.draggable.manager=e,this.droppable.manager=e})}set element(e){zM(()=>{const t=sz(this,Bz),r=this.droppable.element,n=this.draggable.element;r&&r!==t||(this.droppable.element=e),n&&n!==t||(this.draggable.element=e),uz(this,Bz,e)})}get element(){var e,t;const r=sz(this,Bz);if(r)return null!=(t=null!=(e=Pq.get(r))?e:r)?t:this.droppable.element}set target(e){this.droppable.element=e}get target(){return this.droppable.element}set source(e){this.draggable.element=e}get source(){return this.draggable.element}get disabled(){const{disabled:e}=this.draggable,{disabled:t}=this.droppable;return e===t?e:{draggable:e,droppable:t}}set plugins(e){this.draggable.plugins=eq(e,Tz)}set disabled(e){const t=Oz(e);zM(()=>{this.droppable.disabled=t.droppable,this.draggable.disabled=t.draggable})}set data(e){zM(()=>{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:HO}set alignment(e){this.draggable.alignment=e}get alignment(){return this.draggable.alignment}set type(e){zM(()=>{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)}};jz=[,,,H_(null)],_z=new WeakMap,zz=new WeakMap,Fz=new WeakMap,$z=new WeakMap,Bz=new WeakMap,iz(jz,4,"index",Nz,Vz,_z),iz(jz,4,"group",Lz,Vz,$z),((e,t)=>{return Z_(t,(r="metadata",(n=Symbol[r])?n:Symbol.for("Symbol."+r)),e[3]);var r,n})(jz,Vz);var Wz=class extends kj{constructor(e,t,r){super(e,t),this.sortable=r}get index(){return this.sortable.index}get initialIndex(){return this.sortable.initialIndex}get group(){return this.sortable.group}get initialGroup(){return this.sortable.initialGroup}},Uz=class extends Dj{constructor(e,t,r){super(e,t),this.sortable=r}get index(){return this.sortable.index}get group(){return this.sortable.group}},Gz=Object.defineProperty,Kz=Object.defineProperties,Yz=Object.getOwnPropertyDescriptors,Xz=Object.getOwnPropertySymbols,Jz=Object.prototype.hasOwnProperty,Zz=Object.prototype.propertyIsEnumerable,Qz=(e,t,r)=>t in e?Gz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;function eF(e){const{accept:t,collisionDetector:r,collisionPriority:n,id:o,data:i,element:a,handle:s,index:l,group:u,disabled:c,modifiers:d,sensors:p,target:f,type:h,plugins:m}=e,g=function(e){return null===e?null:Q_(Q_({},qz),e)}(e.transition),b=Zj(t=>new Vz(((e,t)=>Kz(e,Yz(t)))(((e,t)=>{for(var r in t||(t={}))Jz.call(t,r)&&Qz(e,r,t[r]);if(Xz)for(var r of Xz(t))Zz.call(t,r)&&Qz(e,r,t[r]);return e})({},e),{transition:g,register:!1,handle:Pj(s),element:Pj(a),target:Pj(f)}),t)),v=Nj(b,tF);return _j(o,()=>b.id=o),Tj(()=>{zM(()=>{b.group=u,b.index=l})},[b,u,l]),_j(h,()=>b.type=h),_j(t,()=>b.accept=t,void 0,Qk),_j(i,()=>i&&(b.data=i)),_j(l,()=>{var e;(null==(e=b.manager)?void 0:e.dragOperation.status.idle)&&(null==g?void 0:g.idle)&&b.refreshShape()},jj),zj(s,e=>b.handle=e),zj(a,e=>b.element=e),zj(f,e=>b.target=e),_j(c,()=>b.disabled=null!=c&&c,void 0,Qk),_j(p,()=>b.sensors=p,void 0,Qk),_j(r,()=>b.collisionDetector=r),_j(n,()=>b.collisionPriority=n),_j(m,()=>b.plugins=m,void 0,Qk),_j(g,()=>b.transition=g,void 0,Qk),_j(d,()=>b.modifiers=d,void 0,Qk),_j(e.alignment,()=>b.alignment=e.alignment),{sortable:v,get isDragging(){return v.isDragging},get isDropping(){return v.isDropping},get isDragSource(){return v.isDragSource},get isDropTarget(){return v.isDropTarget},handleRef:q(e=>{b.handle=null!=e?e:void 0},[b]),ref:q(e=>{var t,r;(e||!(null==(t=b.element)?void 0:t.isConnected)||(null==(r=b.manager)?void 0:r.dragOperation.status.idle))&&(b.element=null!=e?e:void 0)},[b]),sourceRef:q(e=>{var t,r;(e||!(null==(t=b.source)?void 0:t.isConnected)||(null==(r=b.manager)?void 0:r.dragOperation.status.idle))&&(b.source=null!=e?e:void 0)},[b]),targetRef:q(e=>{var t,r;(e||!(null==(t=b.target)?void 0:t.isConnected)||(null==(r=b.manager)?void 0:r.dragOperation.status.idle))&&(b.target=null!=e?e:void 0)},[b])}}function tF(e,t,r){return!("isDragSource"!==e||r||!t)}const rF=({id:e,itemIndex:t,sectionIndex:r})=>Gt.jsx("div",{children:`${r}:${t} - ${e}`}),nF=j(({id:e,itemIndex:t,sectionIndex:r})=>{const n=Jg(kM),o=Jg(AM),i=Jg(SM).at(r)??0,a=Jg(wM)({sectionIndex:r}),{ref:s,isDragging:l,handleRef:u}=eF({id:e,index:t,type:"item",accept:"item",group:a,modifiers:[$_],plugins:[dz],data:{id:e,sectionIndex:r,sectionKey:a,itemIndex:t}}),c=void 0!==n?()=>{n({id:e,itemIndex:t,sectionIndex:r})}:void 0,d=o??rF;return Gt.jsx(rf,{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:Gt.jsxs("div",{style:{width:"100%",opacity:l?.4:1},children:[Gt.jsx(A_,{isDragging:l,itemIndex:t,sectionIndex:r}),Gt.jsx(d,{id:e,itemIndex:t,sectionIndex:r,dragHandleRef:u}),t===i-1&&Gt.jsx(A_,{isDragging:!1,itemIndex:t+1,sectionIndex:r})]})})}),oF=j(({sectionIndex:e})=>{const t=Jg(wM),r=Jg(SM).at(e)??0,n=t({sectionIndex:e});return Gt.jsxs(yd,{className:"exploration-list",style:{overflow:"auto"},children:[Gt.jsx(fp,{}),Gt.jsx(k_,{id:n,sectionIndex:e}),Gt.jsx(fp,{}),Gt.jsx(M_,{sectionIndex:e}),Gt.jsx(Vp,{sx:{padding:"2px 8px"},children:C_(r).map(r=>{const n=t({sectionIndex:e,itemIndex:r});return Gt.jsx(nF,{id:n,itemIndex:r,sectionIndex:e},n)})})]},n)}),iF=[aj.configure({activationConstraints:[new rj.Distance({value:5})]}),tj],aF=j(()=>{const e=Jg(xM),t=Jg(wM),r=Zg(qM("start")),n=Zg(qM("over")),o=Zg(qM("end"));return Gt.jsxs(Xj,{sensors:iF,onDragEnd:e=>{o(e)},onDragOver:e=>{n(e)},onDragStart:e=>{r(e)},children:[Gt.jsx(yd,{style:{display:"flex",flexDirection:"column"},children:C_(e).map(e=>Gt.jsx(oF,{sectionIndex:e},t({sectionIndex:e})))}),Gt.jsx(R_,{})]})}),sF=j(e=>Gt.jsx(nM,{atoms:OM,atomFamilies:LM,children:Gt.jsx(NM,{props:e,children:Gt.jsx(aF,{})})})),lF=(e,t)=>{if(!e)return;const r=e.qHyperCube.qDimensionInfo.filter(e=>void 0!==e.cId).filter(zA).map(({cId:e,qFallbackTitle:r})=>({id:e,title:r??"",alternative:t,type:"dimension"})),n=e.qHyperCube.qMeasureInfo.filter(e=>void 0!==e.cId).filter(zA).map(({cId:e,qFallbackTitle:r})=>({id:e,title:r??"",alternative:t,type:"measure"}));return[...r,...n]},uF=(e,t)=>{const r=[],n={};return e.forEach(e=>{n[e.id]=e}),Object.keys(t).forEach(e=>{const o=t[e],i=n[e];i&&(r[o]=i)}),r},cF=(e,t,r)=>{if(!r||((e,t)=>{const r=e.map(e=>e.id).sort(),n=Object.keys(t).sort();return r.join(",")!==n.join(",")})(e,r)){const t=(e=>{const t={};return e.forEach((e,r)=>{t[e.id]=r}),t})(e);return uF(e,t)}const n=t.map(e=>e.id),o=Object.keys(r).sort((e,t)=>r[e]-r[t]).filter(e=>n.includes(e)),i={...r};for(let e=0;e<n.length;e++){const t=o[e],a=n[e];t!==a&&(i[a]=r[t])}let a=0;const s=Object.entries(i).sort((e,t)=>e[1]-t[1]).map(([e])=>[e,a++]);return s.forEach(([e,t])=>{i[e]=t}),uF(e,i)},dF=zg(e=>{const t=e(GA);return lF(t,!0)}),pF=zg(e=>{const t=e(UA);return lF(t,!1)}),fF=zg(e=>{const t=e(KA),r=e(UA);if(!t||!r)return[];const n=e(pF),o=e(dF),i=r.qHyperCube.qColumnOrder??[],a=e(HA);if(void 0===o||void 0===n)return[];if(a){return[...[...n,...o]].sort((e,t)=>(a[e.id]??1/0)-(a[t.id]??1/0))}const s=t.qHyperCubeDef.qLayoutExclude?.allColumnOrder??{},l=((e,t)=>e.length===t?e:Array.from(Array(t).keys()))(i,n.length),u=((e,t)=>e.length>0?e.map(e=>t[e]):t)(l,n),c=[...u,...o];return cF(c,u,s)}),hF=zg(e=>{const t=e(fF),r=e(PA);return t.filter(r)}),mF=zg(e=>e(hF).length),gF=zg(e=>({sectionIndex:t,itemIndex:r})=>{const n=e(hF);if(void 0===r)return`columns-section-${t}`;const o=n?.[r];return o?.id??`missing-item-${t}-${r}`}),bF=bM(e=>zg(t=>t(hF)[e]),(e,t)=>e===t),vF=zg(e=>e(fF).map(e=>e.id)),yF=zg(e=>e(hF).map(e=>e.id)),xF=zg(e=>{const t=e(fF),r={};return t.forEach(e=>{r[e.id]=e.type}),r}),SF=zg(null,(e,t,{event:r,id:n,toIndex:o})=>{const i=e(AA),a=e(qA),s=e(vF),l=e(yF);if(void 0===i||null===a||void 0===s||void 0===l)return;if(r.operation.canceled)return;const u=l[o];if(!u)return;const c=((e,t,r)=>{const n=r.findIndex(t=>t===e),o=r.findIndex(e=>e===t);if(-1===n||-1===o||n===o)return r;const i=[...r],[a]=i.splice(n,1);return i.splice(o,0,a),i})(n,u,s);t(HA,Object.fromEntries(c.map((e,t)=>[e,t]))),a.add(async()=>{i.updateColumnOrders(c)})}),wF="ChartExploration.Table.ColumnSectionEmpty.Title",CF="ChartExploration.Table.NoColumnsFound.Title",EF="#177fe6",RF=zg(e=>{const t=e(MA),r=e(DA).length>0,n=(e=>e?CF:wF)(r),o=(e=>e?"":"ChartExploration.Table.ColumnSectionEmpty.Message")(r);return()=>({title:t(n),message:""===o?"":t(o)})}),AF=({itemIndex:e})=>{const t=Jg(bF(e));if(!t)return null;const r=t.title;return Gt.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r})},IF=zg(e=>{const t=e(yF),r=e(nI),n=t.filter(e=>r.has(e)).length;return 0===t.length?"disabled":0===n?"none":n===t.length?"all":"some"}),MF=zg(null,(e,t)=>{const r=e(yF),n=e(nI),o="all"!==e(IF)&&"disabled"!==e(IF),i=[],a=new Set(e(QA)),s=new Set(e(eI));if(o){const t=new Set(r.filter(e=>!n.has(e)));i.push(...Array.from(t).map(t=>({id:t,isAlternative:!0,type:e(xF)[t]}))),i.forEach(e=>a.add(e.id)),i.forEach(e=>s.delete(e.id))}else{const t=new Set(r.filter(e=>n.has(e)));i.push(...Array.from(t).map(t=>({id:t,isAlternative:!1,type:e(xF)[t]}))),i.forEach(e=>a.delete(e.id)),i.forEach(e=>s.add(e.id))}t(QA,a),t(eI,s),EA({items:i,handler:e(AA),model:e(RA),handlerQueue:e(qA),logToSentry:e(mb)})}),kF=e=>{(e instanceof HTMLElement||e instanceof SVGElement)&&e.focus()},DF=e=>"svg"===e.tagName?"exploration-draggable-icon":e.className,PF=e=>{const{currentTarget:t}=e,r=DF(t);let n=t.closest("li")?.previousElementSibling?.getElementsByClassName(r)[0];if(!n){const e=t.closest(".exploration-list"),o=e?.querySelector(".exploration-section-header");if(o)return o;if(n=((e,t)=>{const r=e.closest(".exploration-list"),n=r?.previousElementSibling;if(null===n||!n)return e.closest(".exploration-panel")?.getElementsByClassName(t)[1];const o=n.getElementsByClassName(t);return o.length>0?o[o.length-1]:void 0})(t,r),!n){const e=t.closest(".exploration-panel")?.getElementsByClassName(r)[1];return e??null}}return n},TF=(e,t)=>{const r=e.closest(".exploration-list"),n=r?.nextElementSibling||r?.parentElement?.nextElementSibling;if(null===n||!n){if(t===Km.Tab)return;return r?.closest(".exploration-panel")?.getElementsByClassName("exploration-section-header")[0]}return n.getElementsByClassName("exploration-section-header")[0]},qF=(e,t)=>{const{key:r}=e;switch(r){case Km.Tab:e.shiftKey||(wm(e),((e,t)=>{const{currentTarget:r}=e;if(r!==t.ref.current)return;const n=r.closest(".exploration-list"),o=n?.getElementsByClassName("exploration-item-focus")[0];o&&kF(o)})(e,t));break;case Km.Down:(e=>{e.preventDefault();const t=e.currentTarget.closest(".exploration-list"),r=t?.getElementsByClassName("exploration-item-focus")[0];r&&kF(r)})(e);break;case Km.Enter:case Km.Space:e.preventDefault(),((e,t)=>{const{currentTarget:r}=e;if(e.preventDefault(),r!==t.ref.current)return;const n="all"!==t.checkState;t.toggleAllCheckboxes(n)})(e,t)}},OF=({children:e})=>Gt.jsx("span",{style:{width:"fit-content",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",fontWeight:"bold"},children:e}),LF=({children:e})=>{const t=M(null),r=Jg(IF),[,n]=Qg(MF),o=Jg(MA),i={ref:t,toggleAllCheckboxes:n,checkState:r};return Gt.jsxs(yd,{ref:t,"aria-label":o("Common.Columns"),className:"exploration-section-header",tabIndex:0,onKeyDown:e=>{qF(e,i)},sx:{display:"flex",alignItems:"center",width:"100%",padding:"2px 8px 2px 8px",boxSizing:"border-box",fontSize:"14px","&:focus-visible":{boxShadow:`0 0 0 2px ${EF} inset`}},children:[Gt.jsx(Wd,{inputProps:{"aria-label":o("ChartExploration.Header.ToggleAll"),..."some"===r&&{"aria-checked":"mixed"}},disabled:"disabled"===r,checked:"all"===r,indeterminate:"some"===r,onChange:n,size:"small",style:{flexShrink:0,padding:9}}),Gt.jsx(OF,{children:e})]})},NF=()=>{const e=Jg(MA);return Gt.jsx(LF,{children:e("Common.Columns")})},jF=_((e,t)=>Gt.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:Gt.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"})})),_F=_((e,t)=>Gt.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:[Gt.jsx("path",{d:"M1.5 0a.5.5 0 0 0-.5.5v14a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-6a.5.5 0 0 0-.5-.5H8V.5a.5.5 0 0 0-.5-.5zM2 4V1h5v7.293l-5 5V9h2V8H2V5h2V4zm.707 10 5-5H15v5h-3v-2h-1v2H8v-2H7v2z"}),Gt.jsx("path",{d:"M1.5 0a.5.5 0 0 0-.5.5v14a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-6a.5.5 0 0 0-.5-.5H8V.5a.5.5 0 0 0-.5-.5zM2 4V1h5v7.293l-5 5V9h2V8H2V5h2V4zm.707 10 5-5H15v5h-3v-2h-1v2H8v-2H7v2z"})]})),zF=_((e,t)=>Gt.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:Gt.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"})})),FF=Mu("div")({position:"absolute",width:"1px",height:"1px",padding:0,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0}),$F=Mu(zF)(()=>({padding:"6px 6px",flexShrink:0,cursor:"grab","&:focus-visible":{boxShadow:`0 0 0 2px ${EF} inset`}})),BF=e=>{const t=e.key===Km.Down?(e=>{const{currentTarget:t,key:r}=e,n=DF(t),o=t.closest("li");let i=o?.nextElementSibling?.getElementsByClassName(n)[0];return i||(i=TF(t,r),i)?i:t.closest(".exploration-panel")?.getElementsByClassName(n)[0]})(e):PF(e);t&&kF(t)},HF=(e,t)=>{const{key:r}=e;switch(r){case Km.Tab:if(e.shiftKey)wm(e),((e,t)=>{const{currentTarget:r}=e,n=r.closest("ul")?.getElementsByClassName("exploration-item-focus");if(r===t.items.draggableIconRef.current){if(t.itemIndex>=0){const e=n&&n[t.itemIndex];return void(e&&kF(e))}const r=PF(e);r&&kF(r)}if(r===t.items.explorationItemFocusRef.current){const t=r.closest("li")?.previousElementSibling?.getElementsByClassName("exploration-draggable-icon")[0];if(t)return void kF(t);const n=PF(e);n&&kF(n)}})(e,t);else{const r=((e,t)=>{const{currentTarget:r,key:n}=e;if(e.shiftKey)return!0;if(r===t.items.explorationItemRef.current){const e=r.getElementsByClassName("exploration-draggable-icon")[0];return kF(e),!0}if(r===t.items.explorationItemFocusRef.current){const e=r.closest("li")?.getElementsByClassName("exploration-draggable-icon")[0];return e&&kF(e),!0}if(r===t.items.draggableIconRef.current){const e=r.closest("ul")?.getElementsByClassName("exploration-item-focus");if((e?.length||0)-1>t.itemIndex){const r=e&&e[t.itemIndex+1];return r&&kF(r),!0}const o=TF(r,n);if(!o)return!1;kF(o)}return!0})(e,t);r?wm(e):e.stopPropagation()}break;case Km.Enter:case Km.Space:wm(e),((e,t)=>{const{currentTarget:r}=e;if(r===t.items.draggableIconRef.current){const e=r.closest("li")?.getElementsByClassName("exploration-item")[0];return void(e&&kF(e))}if(r===t.items.explorationItemRef.current){const e=r.getElementsByClassName("exploration-draggable-icon")[0];return void kF(e)}r===t.items.explorationItemFocusRef.current&&t.toggleItem()})(e,t);break;case Km.Down:case Km.Up:wm(e),BF(e)}},VF=({children:e})=>Gt.jsx("span",{style:{width:"fit-content",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flexGrow:1},children:e}),WF={dimension:jF,measure:_F},UF=({id:e,dragHandleRef:t,title:r,type:n,itemIndex:o})=>{const[i,a]=Qg(nI),s=Jg(MA),l=M(null),u=M(null),c=M(null);P(()=>{t&&l.current&&t(l.current)},[t]);const d=WF[n],p=!i.has(e),f={id:e,itemIndex:o,toggleItem:()=>{a({id:e,isAlternative:p,type:n})},items:{explorationItemRef:l,explorationItemFocusRef:u,draggableIconRef:c}};return Gt.jsxs(yd,{ref:l,className:"exploration-item",onClick:t=>{t.stopPropagation(),-1!==e&&a({id:e,isAlternative:p,type:n})},onKeyDown:e=>{HF(e,f)},tabIndex:0,style:{display:"flex",alignItems:"center",width:"100%",cursor:"pointer",padding:0,boxSizing:"border-box",fontSize:"14px"},title:r,sx:{"&:hover":{backgroundColor:"action.hover"},"&:focus-visible":{boxShadow:`0 0 0 2px ${EF} inset`}},children:[Gt.jsxs(yd,{ref:u,className:"exploration-item-focus",component:"div",tabIndex:0,onKeyDownCapture:e=>{HF(e,f)},sx:{display:"flex",minWidth:0,alignItems:"center",justifyContent:"space-between",flexGrow:1,marginRight:"4px","&:focus-visible":{boxShadow:`0 0 0 2px ${EF} inset`}},children:[Gt.jsx(Wd,{checked:i.has(e),"aria-label":s("ChartExploration.ListItem.Label",r),size:"small",tabIndex:-1,style:{padding:9,flexShrink:0}}),Gt.jsx(yd,{children:Gt.jsx(d,{height:12,style:{opacity:1,marginRight:"8px"}})}),Gt.jsx(VF,{children:r})]}),Gt.jsx($F,{ref:c,className:"exploration-draggable-icon",tabIndex:0,height:"16px",onClick:e=>{e.stopPropagation()},onKeyDownCapture:e=>{HF(e,f)}})]})},GF=({id:e,itemIndex:t,dragHandleRef:r})=>{const n=Jg(bF(t));return n?Gt.jsx(UF,{id:e,dragHandleRef:r,title:n.title,type:n.type,itemIndex:t}):null},KF=()=>{const e=Jg(mF),t=Jg(RF),r=Jg(YA),n=Jg(gF),o=Zg(SF);return!r&&Gt.jsx(sF,{numberOfSections:1,numberOfItemsInSection:[e],keyExtractor:n,emptyTexts:t,onDragEnd:o,dragOverlayRenderer:AF,headerRenderer:NF,itemRenderer:GF})},YF=_((e,t)=>Gt.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:Gt.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"})})),XF=()=>{const[e,t]=Qg(DA),r=Jg(MA),n=S.useRef(null),o=Jg(mF),i=q(e=>{t(e.target.value)},[t]),a=0===e.length||0===o?r("Common.Search.NoResultsAvailable"):r("ChartExploration.Table.Search.ResultsFound",o.toString());return Gt.jsxs(yd,{ref:n,style:{position:"sticky",top:0,zIndex:1,width:"calc(100% - 24px)",backgroundColor:"var(--sprout-common-background-color-weak)",paddingTop:2,paddingRight:12,paddingLeft:12,paddingBottom:12},children:[Gt.jsx(FF,{"data-testid":"screenOnly-search-results","aria-live":"polite","aria-atomic":"true",children:a}),Gt.jsx(nh,{size:"small",fullWidth:!0,"data-testid":"chart-exploration-search-input","aria-label":r("Common.Search.AccessibilityLabel"),type:"search",defaultValue:e,placeholder:r("Common.Search"),onChange:i,startAdornment:Gt.jsx(Tp,{position:"start",children:Gt.jsx(YF,{})}),inputProps:{style:{fontSize:"14px",paddingTop:6,paddingBottom:6}}})]})},JF=e=>{const t=pm();return Gt.jsx(Du,{theme:t,children:Gt.jsx(Wg,{children:Gt.jsx(oI,{props:e,children:Gt.jsxs(yd,{className:"exploration-panel",style:{display:"flex",flexDirection:"column"},children:[Gt.jsx(XF,{}),Gt.jsx(KF,{})]})})})})},ZF=e=>e.flags.isEnabled("VNA-655-STRAIGHT_TABLE_NEW_EXPLORATION")?{component:JF,classification:{tags:["exploration"],exclusive:!0}}:{component:"items",items:{columnHandler:{component:"column-handler",search:!0,selectAll:!1}},classification:{tags:["exploration"],exclusive:!0}};var QF=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}(QF||{}),e$=function(e){return e.COMPARE="compare",e.GENERAL="general",e}(e$||{}),t$=function(e){return e.VALUES="values",e.CONDITION="condition",e.SEARCH="search",e.CLEAR_SELECTION="clear_selection",e.TOP_BOTTOM="top_bottom",e}(t$||{}),r$=function(e){return e.FIXED_VALUE="fixed_value",e.CALCULATED_VALUE="calculated_value",e}(r$||{});const n$=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,o$=e=>{if(!Array.isArray(e))return"";let t="{<";const r=[];if(e.forEach(e=>{let t,n=`[${e.field}]${e.exclude?"-":""}={`,o="}";switch(e.type){case t$.SEARCH:t=(e=>{let t="",r="";const n=e.options?.mode;if(!n)return"";switch(n){case QF.BEGINNING_OF_WORD:t="*^",r="*";break;case QF.ENDS_WITH:t="*";break;case QF.STARTS_WITH:r="*";break;case QF.MATCHES_EXACTLY:break;case QF.CONTAINS:default:t="*",r="*"}const o=e.options.values?.[0]??"";return""!==o?`"${t}${o}${r}"`:""})(e);break;case t$.CONDITION:t=(e=>{const{options:t}=e,r=t?.mode===e$.GENERAL,n=t?.modifier?.type===r$.FIXED_VALUE,o=t?.modifier?.operator?t.modifier.operator.split(" "):[];if(0===o.length||!n&&(!t.firstValue?.aggregator||!t.firstValue?.field)||n&&!t.firstValue?.fixedValue||r&&(!t.conditionField?.aggregator||!t.conditionField?.field))return"";let i,a,s="=";r&&n?(i=`${t.conditionField?.aggregator}(${n$(t.conditionField?.field)})`,a=`${t.firstValue?.fixedValue}`):!r&&n?(i="",a=`${t.firstValue?.fixedValue}`,s=""):r||n?(i=`${t.conditionField?.aggregator}(${n$(t.conditionField?.field)})`,a=`${t.firstValue?.aggregator}(${n$(t.firstValue?.field)})`):(i=`${n$(e.field)}`,a=`${t.firstValue?.aggregator}(total ${n$(t.firstValue?.field)})`);const l=`${s}${i}${o[0]}${a}`;let u="";if(o.length>1){if(!n&&(!t.secondValue?.aggregator||!t.secondValue?.field)||n&&!t.secondValue?.fixedValue)return"";let e,a;r&&n?(e=`${t.secondValue?.fixedValue}`,a=` and ${i}`):!r&&n?(e=`${t.secondValue?.fixedValue}`,a=""):r||n?(e=`${t.secondValue?.aggregator}(${n$(t.secondValue?.field)})`,a=` and ${i}`):(e=`${t.secondValue?.aggregator}(total ${n$(t.secondValue?.field)})`,a=` and ${i}`),u=`${a}${o[1]}${e}`}return`"${l}${u}"`})(e);break;case t$.CLEAR_SELECTION:t=`[${e.field}]=`,n="",o="";break;case t$.VALUES:default:t=e.options?.values?e.options.values.map(e=>`'${e.replace(/'/g,"''")}'`).join(","):""}""!==t&&r.push(`${n}${t}${o}`)}),0===r.length)return;return t+=`${r.join(",")}>}`,t},i$=[];for(let e=0;e<256;++e)i$.push((e+256).toString(16).slice(1));const a$=new Uint8Array(16);function s$(e,t,r){return crypto.randomUUID?crypto.randomUUID():function(e){e=e||{};const t=e.random??e.rng?.()??crypto.getRandomValues(a$);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(i$[e[t+0]]+i$[e[t+1]]+i$[e[t+2]]+i$[e[t+3]]+"-"+i$[e[t+4]]+i$[e[t+5]]+"-"+i$[e[t+6]]+i$[e[t+7]]+"-"+i$[e[t+8]]+i$[e[t+9]]+"-"+i$[e[t+10]]+i$[e[t+11]]+i$[e[t+12]]+i$[e[t+13]]+i$[e[t+14]]+i$[e[t+15]]).toLowerCase()}(t)}(e)}const l$=()=>crypto?.randomUUID?.()??s$(),u$=({qDimensions:e,qMeasures:t})=>[...e.map(e=>({id:e.qDef.cId,isDimension:!0,def:e})),...t.map(e=>({id:e.qDef.cId,isDimension:!1,def:e}))],c$=({previousColumns:e,nextColumns:t,qInterColumnSortOrder:r})=>{const n=new Map(e.map((e,t)=>[t,e.qDef.cId])),o=new Map(t.map((e,t)=>[e.qDef.cId,t]));return r.map(e=>{const t=n.get(e);return(void 0===t?void 0:o.get(t))??e})};class d$ extends s{#u;constructor(e,t){super(e),this.#u=t}#c(e){const t=this.hcProperties.qLayoutExclude?.allColumnOrder??{},r=Object.keys(t).length;this.hcProperties.qLayoutExclude={...this.hcProperties.qLayoutExclude,allColumnOrder:{...t,...Object.fromEntries(e.map((e,t)=>[e,r+t]))}}}#d(e){const t=this.hcProperties.qLayoutExclude?.allColumnOrder??{},r=Object.entries(t).filter(([t])=>!e.includes(t));this.hcProperties.qLayoutExclude={...this.hcProperties.qLayoutExclude,allColumnOrder:Object.fromEntries(r.map(([e],t)=>[e,t]))}}#p(e,t){const r=this.hcProperties.qLayoutExclude?.allColumnOrder??{},n={};for(const[o,i]of Object.entries(r))n[o===e?t:o]=i;this.hcProperties.qLayoutExclude={...this.hcProperties.qLayoutExclude,allColumnOrder:n}}async addDimension(e,t=!1){const r=await this.addDimensions([e],t);return 0===r.length?void 0:r[0]}async addDimensions(e,t=!1){const r=await super.addDimensions(e,t);return this.#c(r.map(e=>e.qDef.cId)),r}async removeDimension(e,t=!1){const r=await this.removeDimensions([e],t);return 0===r.length?void 0:r[0]}async removeDimensions(e,t=!1){const r=await super.removeDimensions(e,t);return this.#d(r.map(e=>e.qDef.cId)),r}async replaceDimension(e,t){const r=this.getDimensions()[e].qDef.cId,n=await super.replaceDimension(e,t),o=n.qDef.cId;return this.#p(r,o),n}async addMeasure(e,t=!1){const r=await this.addMeasures([e],t);return 0===r.length?void 0:r[0]}async addMeasures(e,t=!1){const r=await super.addMeasures(e,t);return this.#c(r.map(e=>e.qDef.cId)),r}async removeMeasure(e,t=!1){const r=await this.removeMeasures([e],t);return 0===r.length?void 0:r[0]}async removeMeasures(e,t=!1){const r=await super.removeMeasures(e,t);return this.#d(r.map(e=>e.qDef.cId)),r}async replaceMeasure(e,t){const r=this.getMeasures()[e].qDef.cId,n=await super.replaceMeasure(e,t),o=n.qDef.cId;return this.#p(r,o),n}async#f(e){const t=this.getMeasure(e);if(t){const r=this.getAlternativeMeasures().findIndex(t=>t.qDef.cId===e);if(-1===r)return;await super.removeMeasure(r,!0),await super.addMeasure(t,!1,this.getMeasures().length)}}async#h(e){const t=this.getMeasure(e);if(t){const r=this.getMeasures().findIndex(t=>t.qDef.cId===e);if(-1===r)return;await super.removeMeasure(r,!1),await super.addMeasure(t,!0,this.getAlternativeMeasures().length)}}async#m(e){const t=this.getDimension(e);if(t){const r=this.getAlternativeDimensions().findIndex(t=>t.qDef.cId===e);if(-1===r)return;await super.removeDimension(r,!0),await super.reinsertDimension(t,!1,this.getDimensions().length)}}async#g(e){const t=this.getDimension(e);if(t){const r=this.getDimensions().findIndex(t=>t.qDef.cId===e);if(-1===r)return;await super.removeDimension(r,!1),await super.addDimension(t,!0,this.getAlternativeDimensions().length)}}#b(){const e=this.hcProperties.qLayoutExclude?.allColumnOrder??{};return Object.entries(e).sort((e,t)=>e[1]-t[1]).map(([e])=>e)}async moveDimensionFromAlternative(e){await this.#m(e);const t=this.#b();this.updateColumnOrders(t)}async moveDimensionToAlternative(e){await this.#g(e);const t=this.#b();this.updateColumnOrders(t)}async moveMeasureFromAlternative(e){await this.#f(e);const t=this.#b();this.updateColumnOrders(t)}async moveMeasureToAlternative(e){await this.#h(e);const t=this.#b();this.updateColumnOrders(t)}async toggleAlternatives(e,t){for(const t of e)"dimension"===t.type?await(t.isAlternative?this.#m(t.id):this.#g(t.id)):await(t.isAlternative?this.#f(t.id):this.#h(t.id));this.updateColumnOrders(t)}updateColumnOrders(e){const t=(({qDimensions:e,qMeasures:t,qInterColumnSortOrder:r,nextAllColumnOrderById:n})=>{const o=u$({qDimensions:e,qMeasures:t}),i=[...e,...t],a=new Map(n.map((e,t)=>[e,t])),s=o.toSorted((e,t)=>{const r=a.get(e.id),n=a.get(t.id);return void 0===r||void 0===n?0:r-n}),l=s.filter(e=>e.isDimension).map(e=>e.def),u=s.filter(e=>!e.isDimension).map(e=>e.def),c=[...l,...u],d=new Map(c.map((e,t)=>[e.qDef.cId,t]));return{qDimensions:l,qMeasures:u,qInterColumnSortOrder:c$({previousColumns:i,nextColumns:c,qInterColumnSortOrder:r}),qColumnOrder:s.map(e=>d.get(e.id)).filter(e=>void 0!==e)}})({qDimensions:this.hcProperties.qDimensions,qMeasures:this.hcProperties.qMeasures,qInterColumnSortOrder:this.hcProperties.qInterColumnSortOrder,nextAllColumnOrderById:e});this.hcProperties.qDimensions=t.qDimensions,this.hcProperties.qMeasures=t.qMeasures,this.hcProperties.qColumnOrder=t.qColumnOrder,this.hcProperties.qInterColumnSortOrder=t.qInterColumnSortOrder,this.hcProperties.qLayoutExclude={...this.hcProperties.qLayoutExclude,allColumnOrder:e.reduce((e,t,r)=>(e[t]=r,e),{})}}getFilters(){return this.properties.filters??[]}getFilter(e){return this.getFilters().find(t=>t.id===e)}addFilterField(e){const t=e.qTags??e.tags,r=Array.isArray(t)&&t.includes("$numeric"),n=e.isDerived,o=Array.isArray(this.properties.filters)?this.properties.filters:[],i={type:"values",field:n?e.value??e.fullname:e.name??e.label??e.field,options:{values:[]},exclude:!1,id:l$(),qTags:Array.isArray(t)?t:[],isNumeric:r};return o.push(i),this.properties.filters=o,this.properties.qHyperCubeDef.qContextSetExpression=o$(o),i}addFilters(e){const t=[];for(const r of e)t.push(this.addFilterField(r));return t}#v(e){const t=this.getFilters();return t.splice(e,1),this.properties.qHyperCubeDef.qContextSetExpression=o$(t),t}removeFilters(e){if(0===e.length)return[];const t=[...e].sort((e,t)=>t-e),r=this.getFilters().filter((t,r)=>e.includes(r));for(const e of t)this.#v(e);return r}getLabels(){return this.getMeasures().reduce((e,t)=>(!t.qLibraryId&&t.qDef.qLabel&&e.push(t.qDef.qLabel),e),[])}getAddDimensionLabel(){return this.#u.get("Visualization.Requirements.AddDimension")}canColorBy(){return!1}}const p$=(e,t)=>{if(!e)return-1;const r=e.indexOf(t);if(-1===r)return-1;for(let r=0;r<e.length;++r)e[r]>t&&e[r]--;return e.splice(r,1),r};function f$(e,t){let r;for(r=0;r<e.length;++r)e[r]>=0&&e[r]>=t&&++e[r];e.push(t)}function h$(e){return e>0?0:1}function m$(e){return e.translator.get("Visualizations.Descriptions.Column")}function g$(e){return{measures:{min:h$,max:1e3,description:()=>m$(e),add(e,t,r){const{qColumnOrder:n}=r.hcProperties;f$(n,r.getDimensions().length+r.getMeasures().length-1)},remove(e,t,r,n){const{qColumnOrder:o}=r.hcProperties,i=(r.hcProperties.qDimensions?r.hcProperties.qDimensions.length:0)+n;p$(o,i)}},dimensions:{min:h$,max:1e3,description:()=>m$(e),add(e,t,r){const{qColumnOrder:n}=r.hcProperties;return f$(n,r.getDimensions().length-1),e},remove(e,t,r,n){if(e?.isAlternative)return;const{qColumnOrder:o}=r.hcProperties;p$(o,n)}}}}const b$=e=>{const t=new d$({},e.translator),r=pb(e);return{properties(n){if(!(e=>"qHyperCubeDef"in e&&"sn-table"===(({visualization:e,qInfo:t})=>e??t?.qType)(e))(n))return n;const{qHyperCubeDef:o}=n,i=o.qLayoutExclude?.qHyperCubeDef,a=e.flags.isEnabled("qcb-35151-fix-duplicate-columns"),s=new Set,l=[];let u=0,c=0,d=0;[...o.qDimensions,...o.qMeasures,...i?.qDimensions??[],...i?.qMeasures??[]].forEach(e=>{u++;const t=e.qDef?.cId;if((e=>"string"==typeof e&&e.length>0)(t))if(s.has(t)){if(c++,a){const t=l$();e.qDef={...e.qDef,cId:t},l.push(t)}}else s.add(t),l.push(t);else if(d++,a){const t=l$();e.qDef={...e.qDef,cId:t},l.push(t)}});const p=c+d;if(0===p)return n;r.warn({msg:"migrate: column cId issues detected",payload:{issueCount:p,totalColumnCount:u,duplicateCount:c,missingCount:d}});const f=n.components?.find(e=>"theme"===e.key);return e.flags.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING")&&f?.nullValues&&!f.dimensionNullValues&&(f.dimensionNullValues={...f.nullValues}),a?(t.setProperties(n),t.updateColumnOrders(l),r.warn({msg:"migrate: column cId cleanup completed",payload:{replacementCount:p}}),n):n}}};let v$=function(e){return e.Text="text",e.Link="link",e.Image="image",e.ImagesInIndentMode="imagesInIndentMode",e.Indicator="indicator",e.MiniChart="miniChart",e.Bar="bar",e.EditableText="editableText",e.EditableSelector="editableSelector",e.EditableDate="editableDate",e}({}),y$=function(e){return e.Attribute="attribute",e.Dimension="dimension",e}({});const x$=e=>{switch(e?.type){case"url":return v$.Link;case"image":return v$.Image;case"indicator":return v$.Indicator;case"miniChart":return v$.MiniChart;case"bar":return v$.Bar;default:return v$.Text}},S$=({isImagesEnabled:e})=>({uses:"dimensionRepresentationItems.representationType",options(t,r,n){const{qIndentMode:o}=n.properties.qHyperCubeDef,i=[{value:"text",translation:"Object.Table.Representation.Text"},{value:"url",translation:"Object.Table.Representation.Link"}];return(!o&&e||o)&&i.push({value:"image",translation:"Object.Table.Representation.Image"}),i}}),w$=e=>{if(e)return{representationImage:{uses:"dimensionRepresentationItems.representationImage",show:e=>x$(e.qDef.representation)===v$.Image,items:{imageSize:{options:[{value:"alwaysFit",translation:"properties.backgroundImage.sizeAlwaysFit"},{value:"fitWidth",translation:"properties.backgroundImage.sizeFitWidth"},{value:"fitHeight",translation:"properties.backgroundImage.sizeFitHeight"},{value:"fill",translation:"properties.backgroundImage.sizeStretch"},{value:"originalSize",translation:"properties.backgroundImage.originalSize"}]},imageBoxWidth:{ref:"qDef.representation.imageBox.width",translation:"properties.pivot.representation.image.imageBox.width",type:"number",expression:"optional",defaultValue:24,show:(e,t,r)=>{if(!r.properties.qHyperCubeDef)return!1;const{qInterColumnSortOrder:n,qNoOfLeftDims:o,qDimensions:i,qIndentMode:a}=r.properties.qHyperCubeDef;let s=!1;const l=i?.indexOf(e)??1/0;return(n?.slice(0,o)??[]).indexOf(l)>-1&&(s=!0),s&&a}}}}}},C$=e=>{const{anything:t}=e,r=!t.sense?.isUnsupportedFeature?.("tableImages");return{representationType:S$({isImagesEnabled:r}),representationUrlPosition:{uses:"dimensionRepresentationItems.representationUrlPosition",show:e=>x$(e.qDef.representation)===v$.Link},representationUrlLabel:{uses:"dimensionRepresentationItems.representationUrlLabel",show:e=>x$(e.qDef.representation)===v$.Link&&e.qDef.representation?.urlPosition===y$.Dimension},representationLinkUrl:{uses:"dimensionRepresentationItems.representationLinkUrl",show:e=>x$(e.qDef.representation)===v$.Link&&e.qDef.representation?.urlPosition===y$.Attribute},...w$(r)}},E$=(e,t)=>{const{anything:r}=e,n=r.sense?.isUnsupportedFeature,o=!n?.("tableImages")&&t[v$.Image],i=!n?.("qMiniChartDef")&&t[v$.MiniChart],a=!n?.("tableIndicators")&&t[v$.Indicator],s=!!t[v$.Bar],l=o&&t[v$.ImagesInIndentMode];return{representationType:{uses:"measureRepresentationItems.representationType",options:(e,t,r)=>(e=>{const{qIndentMode:t}=e.properties.qHyperCubeDef??{},r=[{value:"text",translation:"Object.Table.Representation.Text"}];return(!t&&o||t&&l)&&r.push({value:"image",translation:"Object.Table.Representation.Image"}),a&&r.push({value:"indicator",translation:"Object.Table.Representation.Indicator"}),i&&r.push({value:"miniChart",translation:"Common.MiniChart"}),s&&r.push({value:"bar",translation:"SNTable.Bar.Representation"}),r})(r)},representationImage:o?{uses:"measureRepresentationItems.representationImage",show:e=>x$(e.qDef.representation)===v$.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:i?{uses:"measureRepresentationItems.representationMiniChart"}:void 0}},R$=(e,t,r)=>({type:"string",component:"expression",expressionType:"measure",ref:"qAttributeExpressions",schemaIgnore:!0,translation:t,defaultValue:"",tid:`${e}ByExpression`,show:r,convertFunctions:{get:(t,r,n,o)=>o.qAttributeExpressions?.find(t=>t.id===e)?.qExpression??"",set:(t,r,n,o,i)=>{const a=i.qAttributeExpressions??[],s=a.findIndex(t=>t.id===e);s>=0?t?a[s].qExpression=t:a.splice(s,1):t&&a.push({id:e,qExpression:t,qAttribute:!0}),i.qAttributeExpressions=a}}}),A$=(e,t)=>e?.qDef?.representation?.[t],I$=e=>x$(e?.qDef?.representation)===v$.Bar,M$=[{value:"solid",translation:"SNTable.Bar.SingleColor"},{value:"expression",translation:"SNTable.Bar.ByExpression"}],k$=e=>{if(!e[v$.Bar])return{};const t=e=>I$(e)&&"manual"===A$(e,"barRangeMode");return{barColorMode:{type:"string",component:"dropdown",ref:"qDef.representation.barColorMode",translation:"SNTable.Bar.BarColor",defaultValue:"solid",show:I$,tid:"barColorMode",options:M$},barColor:{ref:"qDef.representation.barColor",type:"object",component:"color-picker",translation:"SNTable.Bar.BarColor",defaultValue:{index:6,color:null},show:e=>I$(e)&&"expression"!==A$(e,"barColorMode"),tid:"barColor",dualOutput:!0},barColorExpression:R$("barColor","SNTable.Bar.ColorExpression",e=>I$(e)&&"expression"===A$(e,"barColorMode")),barLabelColorMode:{type:"string",component:"dropdown",ref:"qDef.representation.barLabelColorMode",translation:"SNTable.Bar.LabelColor",defaultValue:"solid",show:I$,tid:"barLabelColorMode",options:M$},barLabelColor:{ref:"qDef.representation.barLabelColor",type:"object",component:"color-picker",translation:"SNTable.Bar.LabelColor",show:e=>I$(e)&&"expression"!==A$(e,"barLabelColorMode"),tid:"barLabelColor",dualOutput:!0},barLabelColorExpression:R$("barLabelColor","SNTable.Bar.LabelColorExpression",e=>I$(e)&&"expression"===A$(e,"barLabelColorMode")),barWidthExpression:R$("barWidth","SNTable.Bar.WidthExpression",I$),barOffsetExpression:R$("barOffset","SNTable.Bar.OffsetExpression",I$),barLabelExpression:R$("barLabel","SNTable.Bar.LabelExpression",I$),barRangeMode:{type:"string",component:"dropdown",ref:"qDef.representation.barRangeMode",translation:"SNTable.Bar.Range",defaultValue:"auto",show:I$,tid:"barRangeMode",options:[{value:"auto",translation:"Common.Auto"},{value:"manual",translation:"Common.Custom"}]},barRangeMin:{type:"number",ref:"qDef.representation.barRangeMin",translation:"SNTable.Bar.RangeMin",expressionType:"ValueExpression",expression:"optional",defaultValue:0,show:t,tid:"barRangeMin"},barRangeMax:{type:"number",ref:"qDef.representation.barRangeMax",translation:"SNTable.Bar.RangeMax",expressionType:"ValueExpression",expression:"optional",defaultValue:100,show:t,tid:"barRangeMax"},barEnd:{type:"string",component:"dropdown",ref:"qDef.representation.barEnd",translation:"SNTable.Bar.End",defaultValue:"none",show:I$,tid:"barEnd",options:[{value:"none",translation:"SNTable.Bar.End.None"},{value:"circle",translation:"SNTable.Bar.End.Circle"},{value:"box",translation:"SNTable.Bar.End.Square"}]}}};var D$,P$={};var T$,q$=(D$||(D$=1,T$=P$,(()=>{var e={828(e,t,r){r.r(t),r.d(t,{default:()=>Re});var n=r.cjs(function(e,t){var r=Object.prototype.hasOwnProperty,n=Object.prototype.toString,o=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},s=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var t,o=r.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&r.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!i)return!1;for(t in e);return void 0===t||r.call(e,t)},l=function(e,t){o&&"__proto__"===t.name?o(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},u=function(e,t){if("__proto__"===t){if(!r.call(e,t))return;if(i)return i(e,t).value}return e[t]};e.exports=function e(){var t,r,n,o,i,c,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(r in t)n=u(d,r),d!==(o=u(t,r))&&(h&&o&&(s(o)||(i=a(o)))?(i?(i=!1,c=n&&a(n)?n:[]):c=n&&s(n)?n:{},l(d,{name:r,newValue:e(h,c,o)})):void 0!==o&&l(d,{name:r,newValue:o}));return d}}),o=r.n(n);const i=(e,t,r)=>{if(!t)return!1;const n=t.split("."),o=n[n.length-1];let i,a=e;for(i=0;i<n.length-1;++i)void 0===a[n[i]]&&(a[n[i]]=Number.isNaN(+n[i+1])?{}:[]),a=a[n[i]];if(void 0!==r){const e=a[o];return a[o]=r,{updated:r,previous:e}}return delete a[o],!1},a=(e,t,r)=>{const n=t.split(".");let o,i=e;if(void 0===i)return r;for(o=0;o<n.length;++o){if(void 0===i[n[o]])return r;i=i[n[o]]}return i},s={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"}]},l=" ( ",u=" ) ";function c(e){return l+e+u}function d(e,t={}){if(e.qLibraryId){const r=function(e,t){if(!t)return null;let r,n;for(r=0;r<t.length;r++)if(n=t[r],n.qInfo.qId===e)return n;return null}(e.qLibraryId,t.dimensionList);return r&&r.qData.info[0].qTags.indexOf("$numeric")>-1}const r=function(e,t){if(!t)return null;let r,n;const o=function(e){let t=e.trim();"="===t.charAt(0)&&(t=t.substring(1),t=t.trim());const r=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(r)&&(t=t.substring(1,r),t=t.trim()),t}(e);for(r=0;r<t.length;r++){if(n=t[r],n.qName===o)return n;if(n.qDerivedFieldData)for(let e=0;e<n.qDerivedFieldData.qDerivedFieldLists.length;++e){const t=n.qDerivedFieldData.qDerivedFieldLists[e];for(let e=0;e<t.qFieldDefs.length;++e){const r=t.qFieldDefs[e];if(r.qName===o)return r}}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return r&&r.qTags.indexOf("$numeric")>-1}function p(e){return!(!e.fullAccumulation&&!e.fullRange)}function f(e,t){const{crossAllDimensions:r}=e;return 2===t&&r?"RowNo(Total)":"RowNo()"}function h(e){const t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e),r=t.trim();return"="===r.substring(0,1)?r.substring(1).trim():r}function m(e=0){return`[$(=Replace(GetObjectField(${e}),']',']]'))]`}function g(e,t){const{crossAllDimensions:r}=e;return 2===t&&r?"Above(Total ":"Above("}function b(e){return void 0===e?")":`, 0, ${e})`}function v(e){return`Replace(Replace(${e},'''',''''''),'$','$''&''')`}function y(e,t){return e?`${t}={">=$(=Min(${t}))<=$(=Max(${t}))"}`:`${t}={"=Only({1}${t})>='$(=${v(`MinString(${t})`)})' and Only({1}${t})<='$(=${v(`MaxString(${t})`)})'"}`}function x({modifier:e={},dimensions:t,dimensionAndFieldList:r,funcComp:n="Sum",valueComp:o="0"}){const{showExcludedValues:i}=e;if(!i)return"";if(t&&1===t.length)return`${n}({1<${y(d(t[0],r),m(0))}>}${o})`;if(t&&2===t.length){const e=d(t[0],r),i=d(t[1],r),a=m(0),s=m(1);return`${n}({1<${y(e,a)},${y(i,s)}>}${o})`}return`${n}({1}${o})`}function S(e){return`${e}(`}function w({properties:e,layout:t}){return a(e,"qHyperCubeDef.qDimensions",a(t,"qHyperCube.qDimensionInfo",[])).length}const C={isFullRange:p,getNumDimensions:w,getExpressionWithExcludedComp:function({expression:e,modifier:t,dimensions:r,dimensionAndFieldList:n,treatMissingAsNull:o}){const i=c(h(e)),{showExcludedValues:a}=t;if(!a)return i;const s=x({modifier:t,dimensions:r,dimensionAndFieldList:n}),l=o?"":", 0";return r&&1===r.length?`If(Count(${m(0)}) > 0, ${i} + ${s}${l})`:r&&2===r.length?`If(Count(${m(0)}) * Count(${m(1)}) > 0, ${i} + ${s}${l})`:i},getRowNoComp:f,getNumStepComp:function(e,t){if(!p(e)){const{steps:t}=e;return"number"!=typeof t||Number.isNaN(t)?6:t}return f(e,t)},getAboveCompPrefix:g,getAboveCompSuffix:b,getAboveComp:function(e,t,r,n){return g(e,t)+r+b(n)},getFunctionPrefix:S,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return S(e)+t+")"},getAggrComp:function(e,t,r){return`Aggr(${e}, ${t}, ${r})`},getExcludedComp:x,needDimension:function({modifier:e,properties:t,layout:r}){return 0===function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(e)&&2===w({properties:t,layout:r})},getDimComp:function(e,t){const r=function(e,t=0){return e[t].qDef.qSortCriterias[0]}(e,t),n=m(t);if(!r.qSortByExpression&&!r.qSortByNumeric&&!r.qSortByAscii)return n;const o=["Descending","Ascending"],i=r.qSortByNumeric?`(Numeric, ${o[(r.qSortByNumeric+1)/2]})`:"",a=r.qSortByAscii?`(Text, ${o[(r.qSortByAscii+1)/2]})`:"";return r.qSortByNumeric&&r.qSortByAscii?`(${n}, ${i}, ${a})`:r.qSortByNumeric?`(${n}, ${i})`:r.qSortByAscii?`(${n}, ${a})`:n},simplifyExpression:h,extractInputExpression:function({outputExpression:e,modifier:t}){if(!t)return;const r=e.indexOf(l);if(-1===r)return;const n=e.indexOf(u);return-1!==n?e.substring(r+3,n):void 0},initModifier:function(e,t){Object.keys(t).forEach(r=>{void 0===e[r]&&(e[r]=t[r])})},isNumeric:d,isApplicable:function({properties:e,layout:t,minDimensions:r=1,maxDimensions:n=2}){if(!e&&!t)return!0;const o=w({properties:e,layout:t});return o>=r&&o<=n},getExpressionWithMarkers:c,canExtract:function(e){const t=e.indexOf(l),r=e.indexOf(u);return t>-1&&r>-1&&t<r},getDimDefWithWrapper:m,getFieldWithWrapper:function(e){return`[${e?e.replace(/]/g,"]]"):e}]`},generateTSDExpression:function(e,t,r){let n=t||e.outputExpression;if(e.base&&e.base.qDef&&(n=t!==e.base.qDef?t:e.base.qDef),"observed"!==e.decomposition){const o=r.qHyperCubeDef.qMeasures.find(t=>t.qDef.base&&t.qDef.base.qLibraryId&&e.base&&e.base.qLibraryId?t.qDef.base.qLibraryId===e.base.qLibraryId:null);o&&t!==o.qDef.qLabel&&(n=o.qLibraryId||o.qDef.base.qLibraryId?`[${o.qDef.qLabel}]`:o.qDef.base.qDef);const i=function(e){const t=s.OPTIONS.find(t=>t.value===e.decomposition);return t?s.EXPRESSIONS[t.value]:""}(e);n=n.startsWith("=")?n.substr(1):n,n=`${i}(${n}, ${e.steps})`}return n},getDecomposition:function(e){let t="observed";return Object.values(s.EXPRESSIONS).find(r=>{const n=e.qDef.base.qDef.toLowerCase()||e.qDef.qDef.toLowerCase();return s.EXPRESSIONS[r]&&n.includes(s.EXPRESSIONS[r].toLowerCase())&&(t=r),r}),t}},E=o().bind(null,!0),R={},{isArray:A}=Array;function I(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function M(e){return void 0===e}function k(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function D(e,t){const r=t.substring(1).split("/").slice(0,-1);let n;return r.forEach((t,o)=>{if(o===r.length)return;n=+t;const i=Number.isNaN(n)?{}:[];e[n||t]=M(e[n||t])?i:e[t],e=e[n||t]}),e}function P(e,t){let r=!0;if(I(e)&&I(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach(n=>{P(e[n],t[n])||(r=!1)}),r);if(A(e)&&A(t)){if(e.length!==t.length)return!1;for(let r=0,n=e.length;r<n;r+=1)if(!P(e[r],t[r]))return!1;return!0}return e===t}R.generate=function(e,t,r){r=r||"";let n=[];return Object.keys(t).forEach(o=>{const i=function(e){return e?E({},{val:e}).val:e}(t[o]),a=e[o],s=`${r}/${o}`;P(i,a)||k(t,o)||(M(a)?n.push({op:"add",path:s,value:i}):I(i)&&I(a)?n=n.concat(R.generate(a,i,s)):A(i)&&A(a)?n=n.concat(function(e,t,r){let n=[];const o=e.slice();let i=-1;function a(e,t,r){if(e[r]&&M(e[r].qInfo))return null;if(e[r]&&e[r].qInfo.qId===t)return r;for(let r=0,n=e.length;r<n;r+=1)if(e[r]&&e[r].qInfo.qId===t)return r;return-1}if(P(t,o))return n;if(!M(t[0])&&M(t[0].qInfo))return n.push({op:"replace",path:r,value:t}),n;for(let e=o.length-1;e>=0;e-=1)i=a(t,o[e].qInfo&&o[e].qInfo.qId,e),-1===i?(n.push({op:"remove",path:`${r}/${e}`}),o.splice(e,1)):n=n.concat(R.generate(o[e],t[i],`${r}/${e}`));for(let e=0,s=t.length;e<s;e+=1)i=a(o,t[e].qInfo&&t[e].qInfo.qId),-1===i?(n.push({op:"add",path:`${r}/${e}`,value:t[e]}),o.splice(e,0,t[e])):i!==e&&(n.push({op:"move",path:`${r}/${e}`,from:`${r}/${i}`}),o.splice(e,0,o.splice(i,1)[0]));return n}(a,i,s)):n.push({op:"replace",path:`${r}/${o}`,value:i}))}),Object.keys(e).forEach(o=>{M(t[o])&&!k(e,o)&&n.push({op:"remove",path:`${r}/${o}`})}),n},R.apply=function(e,t){t.forEach(t=>{let r=D(e,t.path),n=t.path.split("/").splice(-1)[0],o=n&&Number.isNaN(+n)?r[n]:r[+n]||r;const i=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(r=null,o=e),"add"===t.op||"replace"===t.op)if(A(r))"-"===n&&(n=r.length),r.splice(+n,"add"===t.op?0:1,t.value);else if(A(o)&&A(t.value)){const e=t.value.slice();o.length=0,o.push(...e)}else if(I(o)&&I(t.value))a=o,Object.keys(a).forEach(e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!k(a,e)&&delete a[e]}),E(o,t.value);else{if(!r)throw new Error("Patchee is not an object we can patch");r[n]=t.value}else if("move"===t.op){const o=D(e,t.from);A(r)?r.splice(+n,0,o.splice(+i,1)[0]):(r[n]=o[i],delete o[i])}else"remove"===t.op&&(A(r)?r.splice(+n,1):delete r[n]);var a})},R.clone=function(e){return E({},e)},R.createPatch=function(e,t,r){const n={op:e.toLowerCase(),path:r};return"move"===n.op?n.from=t:void 0!==t&&(n.value=t),n},R.updateObject=function(e,t){Object.keys(e).length?R.apply(e,R.generate(e,t)):E(e,t)};const T=R,q={saveSoftProperties(e,t,r){if(!e)return Promise.resolve();let n=T.generate(t,r);return o()(!0,t,r),n&&n.length?(n=n.map(e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path})),e.applyPatches(n,!0)):Promise.resolve()}},O="accumulation";function L(e,t){const r=a(e,t);if(r)for(let e=0;e<r.length;e++)if(r[e].type===O)return r[e]}function N(e,t){const r=function(e,t){const r=a(e,t);if(!r)return-1;for(let e=0;e<r.length;e++)if(r[e].type===O)return e;return-1}(e,t);return r>-1?`${t}.${r}`:t}const j={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""},_={translationKey:"properties.modifier.accumulation",needDimension:C.needDimension,isApplicable:({properties:e,layout:t})=>C.isApplicable({properties:e,layout:t,minDimensions:1,maxDimensions:2}),generateExpression({expression:e,modifier:t,properties:r,layout:n,numDimensions:o,dimensionAndFieldList:i}){if(!t)return e;let s=o;void 0===s&&(s=C.getNumDimensions({properties:r,layout:n}));const l=a(r,"qHyperCubeDef.qDimensions",[]),u=C.getExpressionWithExcludedComp({expression:e,modifier:t,dimensions:l,dimensionAndFieldList:i}),c=C.getNumStepComp(t,s),d=C.getAboveComp(t,s,u,c);let p=C.getRangeComp("RangeSum",d);if(C.needDimension({modifier:t,properties:r,layout:n})){const e=C.getDimComp(l,1),r=C.getDimComp(l,0),n=C.getAggrComp(p,e,r);p=t.showExcludedValues?C.getExcludedComp({modifier:t,dimensions:l,dimensionAndFieldList:i,valueComp:n}):n}return p},extractInputExpression:C.extractInputExpression,initModifier(e){C.initModifier(e,j)},enableTotalsFunction:()=>!1,propertyPanelDef:function(e,t={}){return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:(e,t)=>!C.isApplicable({properties:t.properties})},settings:{type:"items",items:{primaryDimension:{refFn:t=>`${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(e,t){const{qDimensionInfo:r}=t.layout.qHyperCube;return r.map((e,t)=>({value:t,label:e.qGroupFallbackTitles[0]}))},show:(e,t)=>t.layout.qHyperCube.qDimensionInfo.length>1},crossAllDimensions:{refFn:t=>`${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:(e,t)=>t.layout.qHyperCube.qDimensionInfo.length>1},fullRange:{refFn:t=>`${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:t=>`${N(t,e)}.steps`,type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change(t){const r=L(t,e);if(r){const{steps:e}=r;r.steps="number"!=typeof e||Number.isNaN(e)?6:Math.abs(e)}},show(t){const r=L(t,e);return r&&!r.fullAccumulation}},showExcludedValues:{refFn:t=>`${N(t,e)}.showExcludedValues`,type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:(e,t)=>C.isApplicable({properties:t.properties})}},show(t,r,n){const o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(O))return!1;const i=L(t,e);return i&&!i.disabled}}}},z="movingAverage";function F(e,t){const r=a(e,t);if(r)for(let e=0;e<r.length;e++)if(r[e].type===z)return r[e]}function $(e,t){const r=function(e,t){const r=a(e,t);if(!r)return-1;for(let e=0;e<r.length;e++)if(r[e].type===z)return e;return-1}(e,t);return r>-1?`${t}.${r}`:t}const B={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1},H={translationKey:"properties.modifier.movingAverage",needDimension:C.needDimension,isApplicable:({properties:e,layout:t})=>C.isApplicable({properties:e,layout:t,minDimensions:1,maxDimensions:2}),generateExpression({expression:e,modifier:t,properties:r,layout:n,numDimensions:o,dimensionAndFieldList:i}){if(!t)return e;let s,l=o;void 0===l&&(l=C.getNumDimensions({properties:r,layout:n}));const u=a(r,"qHyperCubeDef.qDimensions",[]),c=t.showExcludedValues&&t.nullSuppression,d=C.getExpressionWithExcludedComp({expression:e,modifier:t,dimensions:u,dimensionAndFieldList:i,treatMissingAsNull:c}),p=C.getNumStepComp(t,l),f=C.getAboveComp(t,l,d,p);if(t.nullSuppression)s=C.getRangeComp("RangeAvg",f);else{const e=C.getRangeComp("RangeSum",f),r=function(e,t){const r=C.getRowNoComp(e,t);if(!C.isFullRange(e)){const{steps:t}=e;return`RangeMin(${"number"!=typeof t||Number.isNaN(t)?6:t}, ${r})`}return r}(t,l);s=`${e} / ${r}`}let h=s;if(C.needDimension({modifier:t,properties:r,layout:n})){const e=C.getDimComp(u,1),r=C.getDimComp(u,0),n=C.getAggrComp(h,e,r);h=t.showExcludedValues?C.getExcludedComp({modifier:t,dimensions:u,dimensionAndFieldList:i,funcComp:"Only",valueComp:n}):n}return h},extractInputExpression:C.extractInputExpression,initModifier(e){C.initModifier(e,B)},enableTotalsFunction:()=>!1,propertyPanelDef:function(e,t={}){return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:(e,t)=>!C.isApplicable({properties:t.properties})},settings:{type:"items",items:{primaryDimension:{refFn:t=>`${$(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(e,t){const{qDimensionInfo:r}=t.layout.qHyperCube;return r.map((e,t)=>({value:t,label:e.qGroupFallbackTitles[0]}))},show:(e,t)=>t.layout.qHyperCube.qDimensionInfo.length>1},crossAllDimensions:{refFn:t=>`${$(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:(e,t)=>t.layout.qHyperCube.qDimensionInfo.length>1},fullRange:{refFn:t=>`${$(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:t=>`${$(t,e)}.steps`,type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change(t){const r=F(t,e);if(r){const{steps:e}=r;r.steps="number"!=typeof e||Number.isNaN(e)?6:Math.abs(e)}},show(t){const r=F(t,e);return r&&!r.fullRange}},showExcludedValues:{refFn:t=>`${$(t,e)}.showExcludedValues`,type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:t=>`${$(t,e)}.nullSuppression`,type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:(e,t)=>C.isApplicable({properties:t.properties})}},show(t,r,n){const o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(z))return!1;const i=F(t,e);return i&&!i.disabled}}}},V="timeSeriesDecomposition";function W(e,t){const r=a(e,t);if(r)for(let e=0;e<r.length;e++)if(r[e].type===V)return r[e]}function U(e,t){const r=function(e,t){const r=a(e,t);if(!r)return-1;for(let e=0;e<r.length;e++)if(r[e].type===V)return e;return-1}(e,t);return r>-1?`${t}.${r}`:t}const G={type:"timeSeriesDecomposition",disabled:!1,decomposition:"",steps:2,outputExpression:""},K={translationKey:"properties.modifier.timeSeriesDecomposition",needDimension:C.needDimension,isApplicable:({properties:e,layout:t})=>C.isApplicable({properties:e,layout:t,minDimensions:1,maxDimensions:2}),generateExpression:({expression:e,modifier:t,properties:r})=>t?C.generateTSDExpression(t,e,r):e,extractInputExpression:C.extractInputExpression,initModifier(e,t){C.initModifier(e,G),""===e.decomposition&&t&&(e.decomposition=C.getDecomposition(t))},propertyPanelDef:function(e,t={}){return{type:"items",items:{disclaimer:{component:"text",translation:t.timeSeriesDecomposition||"properties.modifier.timeSeriesDecomposition",show:(e,t)=>!C.isApplicable({properties:t.properties})},settings:{type:"items",items:{decomposition:{refFn:t=>`${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:s.OPTIONS},steps:{refFn:t=>`${U(t,e)}.steps`,type:"integer",translation:t.modifierTimeSeriesDecompositionPeriods||"properties.modifier.timeSeriesDecomposition.periods",schemaIgnore:!0,defaultValue:2,change(t,r){const n=W(t,e);if(n){const{steps:e}=n;n.steps="number"!=typeof e||Number.isNaN(e)?2:Math.abs(e),r.properties.qHyperCubeDef.qMeasures=r.properties.qHyperCubeDef.qMeasures.map(t=>(t.qDef.modifiers.map(t=>("timeSeriesDecomposition"===t.type?t.steps=e:t.steps=t.steps,t)),t))}},show(t){const r=W(t,e);return r&&!r.fullRange}}},show:(e,t)=>C.isApplicable({properties:t.properties})}},show(t,r,n){const o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(V))return!1;const i=W(t,e);return i&&!i.disabled}}}},Y="difference";function X(e,t){const r=function(e,t){const r=a(e,t);if(!r)return-1;for(let e=0;e<r.length;e++)if(r[e].type===Y)return e;return-1}(e,t);return r>-1?`${t}.${r}`:t}const J={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""},Z={translationKey:"properties.modifier.difference",needDimension:C.needDimension,isApplicable:({properties:e,layout:t})=>C.isApplicable({properties:e,layout:t,minDimensions:1,maxDimensions:2}),extractInputExpression:C.extractInputExpression,generateExpression({expression:e,modifier:t,properties:r,layout:n,numDimensions:o,dimensionAndFieldList:i}){if(!t)return e;let s=o;void 0===s&&(s=C.getNumDimensions({properties:r,layout:n}));const l=a(r,"qHyperCubeDef.qDimensions",[]),u=C.getExpressionWithExcludedComp({expression:e,modifier:t,dimensions:l,dimensionAndFieldList:i});let c=`${u} - ${C.getAboveComp(t,s,u)}`;if(C.needDimension({modifier:t,properties:r,layout:n})){const e=C.getDimComp(l,1),r=C.getDimComp(l,0),n=C.getAggrComp(c,e,r);c=t.showExcludedValues?C.getExcludedComp({modifier:t,dimensions:l,dimensionAndFieldList:i,funcComp:"Only",valueComp:n}):n}return c},initModifier(e){Object.keys(J).forEach(t=>{void 0===e[t]&&(e[t]=J[t])})},enableTotalsFunction:()=>!1,propertyPanelDef:function(e,t={}){return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:(e,t)=>!C.isApplicable({properties:t.properties})},settings:{type:"items",items:{primaryDimension:{refFn:t=>`${X(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(e,t){const{qDimensionInfo:r}=t.layout.qHyperCube;return r.map((e,t)=>({value:t,label:e.qGroupFallbackTitles[0]}))},show:(e,t)=>t.layout.qHyperCube.qDimensionInfo.length>1},crossAllDimensions:{refFn:t=>`${X(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:(e,t)=>t.layout.qHyperCube.qDimensionInfo.length>1},showExcludedValues:{refFn:t=>`${X(t,e)}.showExcludedValues`,type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:(e,t)=>C.isApplicable({properties:t.properties})}},show(t,r,n){const o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(Y))return!1;const i=function(e,t){const r=a(e,t);if(r)for(let e=0;e<r.length;e++)if(r[e].type===Y)return r[e]}(t,e);return i&&!i.disabled}}}},Q="normalization";function ee(e,t){const r=a(e,t);if(r)for(let e=0;e<r.length;e++)if(r[e].type===Q)return r[e]}function te(e,t){const r=function(e,t){const r=a(e,t);if(!r)return-1;for(let e=0;e<r.length;e++)if(r[e].type===Q)return e;return-1}(e,t);return r>-1?`${t}.${r}`:t}function re(e,t){for(let r=0;r<e.length;r++)if(e[r].value===t)return r;return-1}const ne={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:2,selectionScope:2};function oe(e){return 2===e?"{1}":""}function ie(e,t,r){return 1===e?`{$<${C.getFieldWithWrapper(t)}={'${r}'}>}`:""}function ae(e,t){return 0===e&&t>1||2===e?"Total":""}function se(e,t,r){return 0===e&&t>1?`<${C.getDimDefWithWrapper(r)}>`:""}const le={translationKey:"properties.modifier.normalization",needDimension:()=>!0,isApplicable:({properties:e,layout:t})=>C.isApplicable({properties:e,layout:t,minDimensions:1,maxDimensions:2}),extractInputExpression:C.extractInputExpression,generateExpression({expression:e,modifier:t,properties:r,layout:n,numDimensions:o,dimensionAndFieldList:i}){if(!t)return e;let s=o;void 0===s&&(s=C.getNumDimensions({properties:r,layout:n}));const l=a(r,"qHyperCubeDef.qDimensions",[]),u=C.getExpressionWithExcludedComp({expression:e,modifier:t,dimensions:l,dimensionAndFieldList:i});let c=u;const{selectionScope:d,dimensionalScope:p,field:f,value:h,primaryDimension:m,ignoreNegative:g}=t;return c=function(e,t,r,n,o,i,a,s){const l=oe(t),u=ie(t,r,n),c=""===l&&""===u?"":l||u,d=ae(o,i),p=se(o,i,a),f=function(e){const t=[];for(let r=0;r<e;r++)t[r]=C.getDimDefWithWrapper(r);return t.join(", ")}(i);return s?`(If(${e} < 0, null(), ${e}))/ Sum(${c} ${d}${p} Aggr(${c} RangeMax( 0, ${e}), ${f}))`:`${e}/ Sum(${c} ${d}${p} Aggr(${c} ${e}, ${f}))`}(u,d,f,h,p,s,m,g),c},initModifier(e){Object.keys(ne).forEach(t=>{void 0===e[t]&&(e[t]=ne[t])})},updateModifier(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:()=>!0,propertyPanelDef:function(e,t={}){return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:(e,t)=>!C.isApplicable({properties:t.properties})},settings:{type:"items",items:{selectionScope:{refFn:t=>`${te(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:r=>function(e,t,r){let n=[{value:0,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:1,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:2,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];const{dimensionalScope:o}=ee(e,r);return n=function(e,t){if(1===e){const e=re(t,0);t.splice(e,1)}return t}(o,n),n}(r,t,e)},field:{refFn:t=>`${te(t,e)}.field`,type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:(e,t,r)=>r.app.getFieldList().then(e=>e.map(e=>({label:e.qName,value:e.qName}))),show:t=>1===ee(t,e).selectionScope},value:{refFn:t=>`${te(t,e)}.value`,type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:t=>1===ee(t,e).selectionScope},dimensionalScope:{refFn:t=>`${te(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:(r,n)=>function(e,t,r,n){const o=t.layout.qHyperCube.qDimensionInfo.length;let i=[{value:0,translation:r.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:r.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:1,translation:r.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope."+(2===o?"respectAllDimensions":"respectDimension"),tooltipTranslation:r.dimensionalScopeAllDimensionsTooltip||`properties.modifier.dimensionalScope.${2===o?"respectAllDimensions":"respectDimension"}.tooltip`},{value:2,translation:r.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope."+(2===o?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:r.dimensionalScopeDisregardAllDimensionsTooltip||`properties.modifier.dimensionalScope.${2===o?"disregardAllDimensions":"disregardDimension"}.tooltip`}];i=function(e,t){if(e<2){const e=re(t,0);t.splice(e,1)}return t}(o,i);const{selectionScope:a}=ee(e,n);return i=function(e,t){if(0===e){const e=re(t,1);t.splice(e,1)}return t}(a,i),i}(r,n,t,e)},primaryDimension:{refFn:t=>`${te(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(e,t){const{qDimensionInfo:r}=t.layout.qHyperCube;return r.map((e,t)=>({value:t,label:e.qGroupFallbackTitles[0]}))},show:(t,r)=>0===(ee(t,e).dimensionalScope||0)&&r.layout.qHyperCube.qDimensionInfo.length>1}},show:(e,t)=>C.isApplicable({properties:t.properties})}},show(t,r,n){const o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(Q))return!1;const i=ee(t,e);return i&&!i.disabled}}},getDisregardSelectionComp:oe,getFieldSelectionComp:ie,getTotalComp:ae,getSelectedDimComp:se},ue="library id deleted",ce="qDef.qDef",de="qDef.base.qDef",pe="qLibraryId",fe="qDef.base.qLibraryId",he="qDef.qLabel",me="qDef.qLabelExpression",ge="qDef.base.qLabel",be="qDef.base.qLabelExpression",ve="qDef.qAggrFunc",ye="qDef.base.qAggrFunc",xe="qDef.base",Se={getExpression(e){const t=a(e,de);return void 0!==t?t:a(e,ce)},getExpressionRef:e=>void 0!==a(e,de)?de:ce,getLibraryIdRef:e=>a(e,fe)?fe:pe,getLibraryId:e=>a(e,fe)||a(e,pe),getLabelRef:e=>a(e,xe)?ge:he,getLabelExpressionRef:e=>a(e,xe)?be:me},we={initBase(e,t){(t||we.isValid(e))&&(i(e,de,a(e,ce)),i(e,fe,a(e,pe)),i(e,ge,a(e,he)),i(e,be,a(e,me)))},restoreBase(e){we.isValid(e)&&(i(e,ce,a(e,de)),i(e,pe,a(e,fe)),i(e,he,a(e,ge)),i(e,me,a(e,be)),a(e,ve)&&a(e,ye)&&i(e,ve,a(e,ye)),delete e.qDef.base)},isValid(e){const t=a(e,de),r=a(e,fe);return void 0!==t||void 0!==r}},Ce=we,Ee={accumulation:_,movingAverage:H,difference:Z,normalization:le,timeSeriesDecomposition:K},Re={modifiers:Ee,apply:Ie,applyModifiers:Me,cleanUpMeasure:ke,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:De,getActiveModifier:Pe,initBase:Ce.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some(e=>Ee[e])},isApplicableSupportedModifiers:function({modifierTypes:e,properties:t,layout:r}){return Array.isArray(e)&&e.some(e=>Ee[e]&&Ee[e].isApplicable({properties:t,layout:r}))},measureBase:Se,limitedSorting:function({measures:e,properties:t,layout:r}){let n=!1,o=!1;return e.forEach(e=>{const i=Oe(e);$e({modifiers:i,properties:t,layout:r})&&(n=!0,o=o||Ue({modifiers:i,properties:t,layout:r}))}),n&&!o},ifEnableTotalsFunction:Te},Ae={};function Ie({model:e,properties:t,isSnapshot:r=!1,masterItem:n}={}){const i=!1;Ae[e.id]=Ae[e.id]||{isFirstTime:!0};const{isFirstTime:s}=Ae[e.id];if(Ae[e.id].isFirstTime=!1,t&&"object"==typeof t)return Me({model:e,properties:t});const l=e?e.layout:void 0,u=a(l,"qSelectionInfo.qInSelections");if(r||u)return Promise.resolve(i);const c=a(l,"qHyperCube.qMeasureInfo"),{lastReloadTime:d}=Ae[e.id];if(Ae[e.id].lastReloadTime=a(e,"app.layout.qLastReloadTime"),De({measures:c,layout:l})){const t=function({measures:e,layout:t,model:r,lastReloadTime:n}){return a(r,"app.layout.qLastReloadTime")!==n&&function({measures:e,properties:t,layout:r}){return!!Array.isArray(e)&&e.some(e=>Fe({measure:e,properties:t,layout:r}))}({measures:e,layout:t})}({measures:c,layout:l,model:e,lastReloadTime:d});return t||function({measures:e,layout:t,masterItem:r,isFirstTime:n}){return!!Array.isArray(e)&&(n||r||e.some(e=>function({measure:e,layout:t}){return $e({modifiers:Oe(e),layout:t})?!e.base:!!e.base}({measure:e,layout:t})))}({measures:c,layout:l,masterItem:n,isFirstTime:s})?e.getEffectiveProperties().then(r=>{const a=o()(!0,{},r);Ne(a);const s=Ge(a);return Be({model:e}).then(o=>He({libraryIds:s,model:e}).then(i=>(t&&function({properties:e}){qe(e).forEach(t=>function({measure:e,properties:t}){if(Fe({measure:e,properties:t})){let t=0;const{modifiers:r}=e.qDef;Array.isArray(r)&&r.forEach(r=>{if("object"==typeof r&&!r.disabled){if(t++,"object"!=typeof Ee[r.type])throw new Error(`Modifier "${r.type}" is not available`);if(t>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");const n=Ee[r.type].extractInputExpression({outputExpression:e.qDef.qDef,modifier:r});void 0!==n&&_e(e)&&C.simplifyExpression(e.qDef.base.qDef)!==C.simplifyExpression(n)&&(e.qDef.base.qDef=n)}})}}({measure:t,properties:e}))}({properties:a}),Me({model:e,oldProperties:r,properties:a,runUpdateIfChange:!0,masterItem:n,libraryItemsProps:i,dimensionAndFieldList:o})))).catch(()=>Promise.resolve(i))}):Promise.resolve(i)}return function(e){return!!Array.isArray(e)&&e.some(e=>"object"==typeof e.base)}(c)?e.getEffectiveProperties().then(t=>function({model:e,properties:t}){const r=Ge(t);return Ke({model:e,libraryIds:r}).then(()=>{const r=o()(!0,{},t);return qe(t).forEach(e=>ke(e)),We({oldProperties:r,newProperties:t,model:e})})}({model:e,properties:t})):Promise.resolve(i)}function Me({model:e,oldProperties:t,properties:r,measures:n,runUpdateIfChange:i=!1,masterItem:s,libraryItemsProps:l,dimensionAndFieldList:u}){void 0===t&&(t=i?o()(!0,{},r):r),Ne(r);const c=Ge(r);return Ke({model:e,libraryIds:c,masterItem:s}).then(()=>function({measures:e,properties:t,model:r,libraryItemsProps:n,dimensionAndFieldList:i}){if(e||(e=qe(t)),!e.length)return Promise.resolve();if(!n&&!De({measures:e,properties:t}))return e.forEach(e=>ke(e)),Promise.resolve();const s=n?void 0:Ge(t);return Be({model:r,dimensionAndFieldList:i}).then(i=>He({libraryIds:s,model:r,libraryItemsProps:n}).then(r=>{e.forEach(e=>{const{modifiers:n}=e.qDef;r&&$e({modifiers:n,properties:t})?(function({measure:e,properties:t,libraryItemsProps:r,dimensionAndFieldList:n}){let i=0;Ce.isValid(e)||Ce.initBase(e,!0);const{modifiers:s,base:l}=e.qDef;Array.isArray(s)&&s.forEach(s=>{if("object"==typeof s&&!s.disabled){if(i++,"object"!=typeof Ee[s.type])throw new Error(`Modifier "${s.type}" is not available`);if(i>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");Ee[s.type].initModifier(s,e);const u=e.qLibraryId||l&&l.qLibraryId;u?function({measure:e,modifier:t,libraryId:r,properties:n,libraryItemsProps:i,dimensionAndFieldList:a}){const s=i[r],l=s.qMeasure.qDef,u=""===l?l:Ee[t.type].generateExpression({expression:l,modifier:t,properties:n,dimensionAndFieldList:a});t.outputExpression=u,e.qDef.qDef=t.outputExpression,(e.qDef.qLabel||s.qMeasure.qLabel)&&(e.qDef.qLabel=e.qDef.base.qLabel||s.qMeasure.qLabel),(e.qDef.qLabelExpression||s.qMeasure.qLabelExpression)&&(e.qDef.qLabelExpression=s.qMeasure.qLabelExpression),e.qDef.quarantine&&e.qDef.quarantine.qNumFormat&&s.qMeasure.qNumFormat&&(e.qDef.qNumFormat=e.qDef.base.qNumFormat||s.qMeasure.qNumFormat,e.qDef.isCustomFormatted=s.qMeasure.isCustomFormatted),delete e.qLibraryId,e.qDef.coloring=s.qMeasure.coloring,t.base=o()(!0,{},e.qDef.base)}({measure:e,modifier:s,libraryId:u,properties:t,libraryItemsProps:r,dimensionAndFieldList:n}):function({measure:e,modifier:t,properties:r,dimensionAndFieldList:n}){"function"==typeof Ee[t.type].updateModifier&&Ee[t.type].updateModifier(t,r.qHyperCubeDef);const i=Se.getExpression(e),a=""===i?i:Ee[t.type].generateExpression({expression:i,modifier:t,properties:r,dimensionAndFieldList:n});t.outputExpression=a,e.qDef.qDef=t.outputExpression,e.qDef.base.qLabelExpression?e.qDef.qLabelExpression=e.qDef.base.qLabelExpression:e.qDef.qLabel=e.qDef.base.qLabel||i,t.base=o()(!0,{},e.qDef.base)}({measure:e,modifier:s,properties:t,dimensionAndFieldList:n}),function(e){const t=a(e,"qDef.qAggrFunc");"Expr"!==t||Te(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&Te(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(e)}})}({measure:e,properties:t,libraryItemsProps:r,dimensionAndFieldList:i}),je(e)):ke(e)})}))}({measures:n,properties:r,model:e,libraryItemsProps:l,dimensionAndFieldList:u}).then(()=>i?We({oldProperties:t,newProperties:r,model:e}):Promise.resolve(!1))).catch(()=>Promise.resolve(!1))}function ke(e){!function(e){const t=Oe(e);return Array.isArray(t)&&t.some(e=>"object"==typeof e&&!e.disabled&&!Ee[e.type])}(e)?Ce.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,je(e)}function De({measures:e,properties:t,layout:r}){return!!Array.isArray(e)&&e.some(e=>$e({modifiers:Oe(e),properties:t,layout:r}))}function Pe(e){const t=Oe(e);if(Array.isArray(t))for(let e=0;e<t.length;e++){const r=t[e];if(Ee[r.type]&&!r.disabled)return r}}function Te(e){const t=Pe(e);return!t||Ee[t.type].enableTotalsFunction(e)}function qe(e){return a(e,"qHyperCubeDef.qMeasures",[]).concat(a(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function Oe(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function Le(e){return a(e,"outputExpression.qValueExpression.qExpr")||a(e,"outputExpression")}function Ne(e){qe(e).forEach(e=>function(e){const t=Pe(e);t&&(void 0!==t.outputExpression&&Le(t)!==e.qDef.qDef?delete e.qDef.base:!Ce.isValid(e)&&t.base&&(e.qDef.base=o()(!0,{},t.base)))}(e))}function je(e){const t=Oe(e);Array.isArray(t)&&t.forEach(t=>{"object"==typeof t&&(t.disabled||!Ee[t.type]&&Le(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)})}function _e(e){return e.base||e.qDef&&e.qDef.base}function ze(e){const t=_e(e);return e.qLibraryId||t&&t.qLibraryId}function Fe({measure:e,properties:t,layout:r}){return!ze(e)&&$e({modifiers:Oe(e),properties:t,layout:r})}function $e({modifiers:e,properties:t,layout:r}){const n={};return Array.isArray(e)&&e.some(e=>!("object"!=typeof e||e.disabled||!Ee[e.type])&&(void 0===n[e.type]&&(n[e.type]=Ee[e.type].isApplicable({properties:t,layout:r})),n[e.type]))}function Be({model:e,dimensionAndFieldList:t}){if(t)return Promise.resolve(t);const r=[],n={},o=e.app.getDimensionList().then(e=>{n.dimensionList=e});r.push(o);const i=e.app.getFieldList().then(e=>{n.fieldList=e});return r.push(i),Promise.all(r).then(()=>n)}function He({libraryIds:e,model:t,libraryItemsProps:r}){if(r)return Promise.resolve(r);const{measureLibraryIds:n,dimensionLibraryIds:o}=e,i={},a=[];return n.forEach(e=>{const r=t.app.getMeasure(e).then(t=>t.getProperties().then(t=>{i[e]=t}));a.push(r)}),o.forEach(e=>{const r=t.app.getDimension(e).then(t=>t.getProperties().then(t=>{i[e]=t}));a.push(r)}),Promise.all(a).then(()=>i).catch(()=>null)}function Ve(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function We({oldProperties:e,newProperties:t,model:r}){const n=JSON.stringify(a(e,"qHyperCubeDef.qMeasures"),Ve)!==JSON.stringify(a(t,"qHyperCubeDef.qMeasures"),Ve)||JSON.stringify(a(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ve)!==JSON.stringify(a(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ve);return n?function({model:e,oldProperties:t,newProperties:r}){const{layout:n}=e;return n&&!n.qHasSoftPatches&&!n.qExtendsId&&a(n,"qMeta.privileges",[]).indexOf("update")>-1?e.setProperties(r):q.saveSoftProperties(e,t,r)}({model:r,oldProperties:e,newProperties:t}).then(()=>n):Promise.resolve(n)}function Ue({modifiers:e,properties:t,layout:r}){return Array.isArray(e)&&e.some(e=>"object"==typeof e&&!e.disabled&&Ee[e.type]&&Ee[e.type].needDimension({modifier:e,properties:t,layout:r}))}function Ge(e){const t=qe(e),r=[],n=[];let o=!1;return t.forEach(t=>{const n=Oe(t);if($e({modifiers:n,properties:e})){const i=ze(t);i&&r.push(i),o=o||Ue({modifiers:n,properties:e})}}),a(e,"qHyperCubeDef.qDimensions",[]).forEach(e=>{const t=e.qLibraryId;t&&n.push(t)}),{measureLibraryIds:r,dimensionLibraryIds:n}}function Ke({model:e,libraryIds:t,masterItem:r}){return!r&&r!==ue&&Ae[e.id]&&t&&(t.measureLibraryIds.length||t.dimensionLibraryIds.length)?(Ae[e.id].masterItemSubscriber=Ae[e.id].masterItemSubscriber||function({model:e,callback:t}){let r={},n={},o={};const i={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function s(e){const t={},r=a(e,"qInfo.qType");return r&&i[r]&&i[r].forEach(r=>{t[r]=a(e,r)}),JSON.stringify(t)}function l(e){const{qId:n}=e.qInfo;if(r[n]){const o=s(e);r[n].properties!==o&&(r[n].properties=o,"function"==typeof t&&r[n].enabled&&t(e)),r[n].enabled=!0}}function u(){Object.keys(r).forEach(e=>{n[e]||o[e]||(r[e].listener.dispose(),r[e].unbindCloseListnener(),delete r[e])})}const c=(e,t)=>(e.once("closed",t),()=>e.removeListener("closed",t));function d(n,o){return e.app[o](n).then(e=>{r[n]={listener:e.layoutSubscribe(l),unbindCloseListnener:c(e,()=>{return n=e.id,t(ue),delete r[n],void u();var n}),enabled:!1,properties:s(e.layout)}}).catch(()=>{})}return{subscribe({measureLibraryIds:t,dimensionLibraryIds:i}){const a=[];return function({measureLibraryIds:e,dimensionLibraryIds:t}){n={},e.forEach(e=>{n[e]=!0}),o={},t.forEach(e=>{o[e]=!0})}({measureLibraryIds:t,dimensionLibraryIds:i}),u(),e.app&&(Object.keys(n).forEach(e=>{n[e]&&!r[e]&&a.push(d(e,"getMeasure"))}),Object.keys(o).forEach(e=>{o[e]&&!r[e]&&a.push(d(e,"getDimension"))})),Promise.all(a)},unsubscribe(){Object.keys(r).forEach(e=>{r[e].listener.dispose(),r[e].unbindCloseListnener()}),r={}}}}({model:e,callback:t=>Ie({model:e,masterItem:t}).then(()=>e.app.clearUndoBuffer())}),Ae[e.id].masterItemSubscriber.subscribe(t)):Promise.resolve()}}};const t={};function r(n){const o=t[n];if(void 0!==o)return o.exports;const i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{if(Array.isArray(t))for(var n=0;n<t.length;){var o=t[n++],i=t[n++];r.o(e,o)?0===i&&n++:0===i?Object.defineProperty(e,o,{enumerable:!0,value:t[n++]}):Object.defineProperty(e,o,{enumerable:!0,get:i})}else for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.cjs=e=>{const t={exports:{}};return e.call(t.exports,t,t.exports),t.exports};let n=r(828);for(var o in T$.default=n.default,n)-1===["default"].indexOf(o)&&(T$[o]=n[o]);Object.defineProperty(T$,"__esModule",{value:!0})})()),P$),O$=$t(q$);const L$="TOTAL_OFF",N$={autoSort:{ref:"qDef.autoSort",type:"boolean",defaultValue:!0,show:!1}},j$=(e,t)=>t&&e.flags.isEnabled("VNA-977-TABLE-BARS"),_$=(e,t,r)=>({component:"expression",ref:"qExpression",expressionType:"measure",translation:t,defaultValue:"",id:e,tid:r,show:!1}),z$=(e,t)=>j$(e,t)?[_$("barColor","SNTable.Bar.ColorExpression","barColorByExpression"),_$("barLabelColor","SNTable.Bar.LabelColorExpression","barLabelColorByExpression"),_$("barWidth","SNTable.Bar.WidthExpression","barWidthByExpression"),_$("barOffset","SNTable.Bar.OffsetExpression","barOffsetByExpression"),_$("barLabel","SNTable.Bar.LabelExpression","barLabelByExpression")]:[],F$=(e,t)=>({visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Table.Columns.VisibilityCondition",defaultValue:{qv:""},tid:"visibilityCondition",isExpression:e=>"string"==typeof e&&e.trim().length>0},tableCellStyling:{component:"attribute-expression-reference",defaultValue:[],ref:"qAttributeExpressions",items:[{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.BackgroundExpression",defaultValue:"",id:"cellBackgroundColor",tid:"tableColorBgByExpression"},{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.ForegroundExpression",defaultValue:"",id:"cellForegroundColor",tid:"tableColorByExpression"},{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.TextStyleExpression",defaultValue:"",id:"textStyleExpression",tid:"tableTextStyleByExpression"},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:"urlLabel",tid:"URLLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:"url",tid:"URLByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:"imageLabel",tid:"ImageLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:"imageUrl",tid:"ImageUrlByExpression",show:!1},...z$(e,t)]}}),$$=(e,t)=>({columnExpression:{type:"items",grouped:!0,items:[{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Table.Columns.VisibilityCondition",defaultValue:{qv:""},tid:"visibilityCondition",isExpression:e=>"string"==typeof e&&e.trim().length>0},{type:"items",items:[{component:"text",translation:"properties.Header",style:"sHeader"},{ref:"qDef.headerColor.background",translation:"Object.Table.Measure.BackgroundExpression",component:"expression",expressionType:"StringExpression",defaultValue:""},{ref:"qDef.headerColor.foreground",translation:"Object.Table.Measure.ForegroundExpression",component:"expression",expressionType:"StringExpression",defaultValue:""}]},{type:"items",items:[{component:"text",translation:"properties.Content",style:"sHeader"},{component:"attribute-expression-reference",defaultValue:[],ref:"qAttributeExpressions",items:[{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.BackgroundExpression",defaultValue:"",id:"cellBackgroundColor",tid:"tableColorBgByExpression"},{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.ForegroundExpression",defaultValue:"",id:"cellForegroundColor",tid:"tableColorByExpression"},{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.TextStyleExpression",defaultValue:"",id:"textStyleExpression",tid:"tableTextStyleByExpression"},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:"urlLabel",tid:"URLLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:"url",tid:"URLByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:"imageLabel",tid:"ImageLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:"imageUrl",tid:"ImageUrlByExpression",show:!1},...z$(e,t)]}]}]}}),B$={textAlignAuto:{ref:"qDef.textAlign.auto",type:"boolean",component:"switch",translation:"Common.Text.TextAlignment",options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}],defaultValue:!0},textAlign:{ref:"qDef.textAlign.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:e=>void 0!==e.qDef.textAlign&&!e.qDef.textAlign.auto}},H$=e=>({type:"items",grouped:!0,items:{totalsAggrGroup:{type:"items",items:{totalsAggrFunc:{type:"string",component:"dropdown",ref:"qDef.qAggrFunc",translation:"Object.Table.AggrFunc",options:(e,t)=>(!O$.hasActiveModifiers({measures:[e],properties:t.properties})||O$.ifEnableTotalsFunction(e)?[{value:""===e.qDef.qAggrFunc?"":"Expr",translation:"Common.Auto"}]:[]).concat([{value:"Avg",translation:"Object.Table.AggrFunc.Avg"},{value:"Count",translation:"Object.Table.AggrFunc.Count"},{value:"Max",translation:"Object.Table.AggrFunc.Max"},{value:"Min",translation:"Object.Table.AggrFunc.Min"},{value:"Sum",translation:"Object.Table.AggrFunc.Sum"},{value:"None",translation:"Object.Table.AggrFunc.None"}]),defaultValue:e.anything.sense?.isUnsupportedFeature?.("totals")?"None":"Expr"}}}},show:!e.anything.sense?.isUnsupportedFeature?.("totals")}),V$={type:{type:"string",component:"dropdown",ref:"qDef.columnWidth.type",translation:"Object.Table.Column.Width",options:[{value:Jm.Auto,translation:"Common.Auto"},{value:Jm.FitToContent,translation:"Object.Table.Column.FitToContent"},{value:Jm.Pixels,translation:"Object.Table.Column.Pixels"},{value:Jm.Percentage,translation:"Object.Table.Column.Percentage"}],defaultValue:Jm.Auto},sizePixels:{ref:"qDef.columnWidth.pixels",translation:"Object.Table.Column.Pixels",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:"200",show:e=>e.qDef.columnWidth?.type===Jm.Pixels},sizePercentage:{ref:"qDef.columnWidth.percentage",translation:"Object.Table.Column.Percentage",type:"number",expression:"optional",defaultValue:"20",show:e=>e.qDef.columnWidth?.type===Jm.Percentage}},W$=(e,t)=>({...N$,...e.flags.isEnabled("VNA-626-TABLE_HEADER_COLOR_BY_EXPRESSION")?$$(e,t):F$(e,t),...B$,...V$}),U$=e=>({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},nullSuppression:{type:"boolean",ref:"qNullSuppression",defaultValue:!1,translation:"properties.dimensions.showNull",inverted:!0},subTotalGroup:{type:"items",show:e.flags.isEnabled("TLV-2303-SUB-TOTALS")&&!e.anything.sense?.isUnsupportedFeature?.("totals"),items:[{uses:"divider"},{type:"string",component:"switch",translation:"properties.showSubTotals",ref:"qOtherTotalSpec.qTotalMode",defaultValue:L$,trueOption:{value:"TOTAL_EXPR",translation:"properties.on"},falseOption:{value:L$,translation:"properties.off"}},{type:"string",component:"expression",expressionType:"StringExpr",ref:"qTotalLabel",translation:"Common.Label",defaultValue:()=>e.translator.get("properties.subTotals"),show:e=>e.qOtherTotalSpec?.qTotalMode!==L$},{uses:"divider"}]},createMasterItemButton:{},divider:{uses:"divider"},dimensionLimits:{uses:"dimensions.items.dimensionLimits"},showOthers:{uses:"dimensions.items.others"}}),G$=e=>{const t=e.anything.sense?.isUnsupportedFeature?.("modifiers");return{libraryId:{type:"string",component:"library-item",libraryItemType:"measure",ref:"qLibraryId",translation:"Common.Measure",show:e=>t?!!e.qLibraryId:!(!e.qLibraryId&&!e.qDef.base?.qLibraryId)},inlineMeasure:{component:"inline-measure",show:e=>t?!e.qLibraryId:!(e.qLibraryId||e.qDef.base?.qLibraryId)},numberFormatting:{uses:"measures.items.numberFormatting"},createMasterItemButton:{},divider:{uses:"divider"},totalsAggr:H$(e)}},K$=e=>({dimensions:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qDimensions",items:{field:{type:"items",translation:"Common.Field",items:U$(e)},presentation:{type:"items",translation:"properties.presentation",items:{...W$(e,!1),...C$(e)}}}}}),Y$=e=>({measures:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qMeasures",items:{field:{type:"items",translation:"Common.Field",items:G$(e)},presentation:{type:"items",translation:"properties.presentation",items:{...W$(e,!0),...E$(e,{[v$.Image]:!0,[v$.Indicator]:!0,[v$.MiniChart]:!0,[v$.Bar]:j$(e,!0)}),...k$({[v$.Bar]:j$(e,!0)})}}}}}),X$=e=>({...K$(e),...Y$(e)}),J$=e=>({type:"items",translation:"Common.Data",component:"tabs-component",items:{columns:{component:"data-assets-panel",ref:"columns",tabName:"properties.DataAssetPanel.Columns",items:{...X$(e)},highlightSelected:!0},filters:{type:"items",component:"filters-assets-panel",ref:"filters",tabName:"SimpleProperties.Filters.Filters",items:{filter:{type:"object",component:"filter-item-react",ref:"filter"}},highlightSelected:!0}}}),Z$=e=>({type:"items",items:[{ref:e,type:"string",translation:"properties.pivot.nullValueText",defaultValue:"-"}]}),Q$=e=>Z$("dimensionNullValues"===e?"nullValueRepresentation.dimensionText":"nullValueRepresentation.text"),eB={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}},tB=e=>({type:"items",items:[{ref:"totals.show",type:"boolean",translation:"properties.totals",component:"switch",options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}],defaultValue:!0},{ref:"totals.position",translation:"Common.Position",type:"string",component:"dropdown",options:[{value:"noTotals",translation:"Common.None"},{value:"top",translation:"Common.Top"},{value:"bottom",translation:"Common.Bottom"}],defaultValue:"noTotals",show:e=>!e.totals?.show},{ref:"totals.label",translation:"properties.totals.label",type:"string",expression:"optional",defaultValue:()=>e.translator.get("Object.Table.Totals")}],show:!e.anything.sense?.isUnsupportedFeature?.("totals")}),rB=(e,t,r,n)=>({ref:e,translation:t,dualOutput:!0,type:"object",component:"color-picker",width:"auto",disableNone:n??!1,defaultValue(e,t,o){const i=n?.(e,t,o)??!1,a=o.theme.current(),s=r(a,i);return{color:"transparent"===s?"none":s}}}),nB=(e,t=!1)=>{return{value:e,label:t?(r=e,r.charAt(0).toUpperCase()+r.slice(1)):e,groupHeader:!1,disabled:!1,styles:t?{fontFamily:e}:void 0};var r},oB=({ref:e,themeAccessor:t,translator:r})=>({component:"dropdown",ref:e,options:(e,n,o)=>{const i=o.theme.current();return((e,t,r)=>{const n=t.fontFamily??"Source Sans Pro, sans-serif",o=t.fontFamilies??[],i=Array.from(new Set([e,n,...o])),a=[{value:"ThemeHeader",label:r.get("properties.themeFonts"),metaText:r.get("properties.theme"),groupHeader:!0},...i.sort().map(e=>nB(e,!0))],s=[{value:"DefaultHeader",label:r.get("properties.allFonts"),metaText:r.get("properties.default"),groupHeader:!0},...ue().filter(e=>!i.includes(e)).map(e=>nB(e,!0))];return[...a,...s.length>1?s:[]]})(t(i),i,r)},defaultValue:(e,r,n)=>t(n.theme.current())}),iB=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],aB=({ref:e,themeAccessor:t,translator:r})=>({component:"dropdown",ref:e,options:(e,n,o)=>{const i=o.theme.current();return((e,t,r)=>{const n=t.fontSize,o=t.fontSizes??[],i=Array.from(new Set([e,n,...o])),a=[{value:"ThemeHeader",label:r.get("properties.themeFontSizes"),metaText:r.get("properties.theme"),groupHeader:!0},...i.sort((e,t)=>parseInt(e,10)-parseInt(t,10)).map(e=>nB(e,!1))],s=[{value:"DefaultHeader",label:r.get("properties.allFontSizes"),metaText:r.get("properties.default"),groupHeader:!0},...iB.filter(e=>!i.includes(e)).map(e=>nB(e,!1))];return[...a,...s.length>1?s:[]]})(t(i),i,r)},defaultValue:(e,r,n)=>t(n.theme.current())}),sB=({section:e,defaultFontStyle:t,translator:r,flags:n,getThemeValue:o,translation:i,disableNoneCallback:a})=>({component:"panel-section",translation:i??`properties.pivot.${e}`,items:{content:{component:"items",ref:"components",key:"theme",items:{fontFamily:oB({ref:`${e}.fontFamily`,themeAccessor:t=>o(t,e,"fontFamily")??t.fontFamily,translator:r}),fontWrapperItem:{component:"inline-wrapper",items:{fontStyle:{component:"font-style-buttons",width:!1,ref:`${e}.fontStyle`,defaultValue:t??[]},fontSize:aB({ref:`${e}.fontSize`,themeAccessor:t=>o(t,e,"fontSize")??t.fontSize,translator:r}),fontColor:rB(`${e}.fontColor`,void 0,t=>o(t,e,"color")??t.color)}},background:rB(`${e}.background`,"properties.background",(t,r)=>{const n=r?mm.WHITE:mm.TRANSPARENT;return o(t,e,"backgroundColor")??n},a)}}}}),lB=({section:e,defaultFontStyle:t,fallbackBackground:r,getThemeValue:n,isNullValueText:o,translation:i})=>({component:"panel-section",translation:i??`properties.pivot.${e}`,items:{nullValueText:o?Q$(e):void 0,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:rB(`${e}.fontColor`,void 0,t=>n(t,e,"color")??t.color)}},background:rB(`${e}.background`,"properties.background",t=>n(t,e,"backgroundColor")??r??"transparent")}}}}),uB=(e,t,r)=>{switch(t){case"header":return e.object?.straightTableV2?.dimension?.label?.name?.[r];case"dimensionValues":return e.object?.straightTableV2?.dimension?.label?.value?.[r];case"measureValues":return e.object?.straightTableV2?.measure?.label?.value?.[r];case"totalValues":return e.object?.straightTableV2?.total?.label?.value?.[r];case"subTotalValues":return e.object?.straightTableV2?.subTotal?.label?.value?.[r];case"nullValues":case"dimensionNullValues":return e.object?.straightTableV2?.null?.label?.value?.[r];default:return}},cB=e=>e.grid?.zebraStripes?.show,dB={ref:"content.rowHeight",component:"integer",placeholder:1,maxlength:4,translation:"ThemeStyleEditor.style.rowHeight",change(e){void 0!==e&&(null!==e.content?.rowHeight&&void 0!==e.content?.rowHeight&&""!==e.content.rowHeight?e.content.rowHeight=Math.max(1,Math.min(50,Math.floor(e.content.rowHeight))):void 0!==e.content&&(e.content.rowHeight=void 0))}},pB=e=>e?.content?.hoverEffect,fB={translation:"properties.RowHover",component:"panel-section",items:{hoverEffectItem:{component:"items",ref:"components",key:"theme",items:{hoverEffectSwitch:{ref:"content.hoverEffect",translation:"ThemeStyleEditor.style.hoverEffect",type:"boolean",component:"switch",options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}],defaultValue:!1},hoverEffectColorItem:{show:pB,ref:"content.hoverColor",translation:"ThemeStyleEditor.style.hoverStyle",type:"object",component:"color-picker",dualOutput:!0},hoverEffectFontColorItem:{show:pB,ref:"content.hoverFontColor",translation:"ThemeStyleEditor.style.hoverFontStyle",type:"object",component:"color-picker",dualOutput:!0}}}}},hB=(e,t,{properties:r})=>"sn-table"===r.visualization&&!0===r.usePagination,mB=e=>e.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING"),gB=({flags:e,translator:t})=>({type:"items",items:[{component:"styling-panel",chartTitle:"Object.StraightTable",subtitle:"LayerStyleEditor.component.styling",translation:"LayerStyleEditor.component.styling",ref:"components",useGeneral:!0,useBackground:!0,items:{headerSection:sB({section:"header",defaultFontStyle:["bold"],translator:t,flags:e,getThemeValue:uB,disableNoneCallback:hB}),dimensionValueSection:sB({section:"dimensionValues",translator:t,flags:e,getThemeValue:uB}),measureValueSection:sB({section:"measureValues",translator:t,flags:e,getThemeValue:uB}),totalRowSection:sB({section:"totalValues",defaultFontStyle:["bold"],translation:"properties.totals",translator:t,flags:e,getThemeValue:uB,disableNoneCallback:hB}),subTotalRowSection:e.isEnabled("TLV-2303-SUB-TOTALS")?sB({section:"subTotalValues",defaultFontStyle:["bold"],translation:"properties.subTotals",translator:t,flags:e,getThemeValue:uB,disableNoneCallback:hB}):void 0,...mB(e)?{dimensionNullSection:lB({section:"dimensionNullValues",translation:"properties.table.dimensionNullValues",fallbackBackground:mm.NULL_VALUE_BACKGROUND,getThemeValue:uB,isNullValueText:!0}),nullValues:lB({section:"nullValues",translation:"properties.table.measureNullValues",fallbackBackground:mm.NULL_VALUE_BACKGROUND,getThemeValue:uB,isNullValueText:!0})}:{nullValues:lB({section:"nullValues",fallbackBackground:mm.NULL_VALUE_BACKGROUND,getThemeValue:uB,isNullValueText:!1})},grid:{translation:"properties.pivot.grid",component:"panel-section",items:{gridItems:{component:"items",ref:"components",key:"theme",items:{rowHeight:{show:()=>!0,...dB},border:rB("grid.border","properties.border",e=>e.object?.straightTableV2?.grid?.borderColor??mm.BORDER_MEDIUM),divider:rB("grid.divider","properties.pivot.divider",e=>e.object?.straightTableV2?.grid?.divider?.borderColor??mm.BORDER_HEAVY)}}}},hoverEffectSection:fB,zebraStripes:{translation:"properties.zebraStripes",component:"panel-section",items:{hoverEffectItem:{component:"items",ref:"components",key:"theme",items:{zebraStripesEnable:{ref:"grid.zebraStripes.show",translation:"properties.zebraStripes.enable",type:"boolean",component:"switch",options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}],defaultValue:!1},zebraStripesColorOdd:{show:cB,ref:"grid.zebraStripes.color.odd",translation:"properties.zebraStripes.color.odd",type:"object",component:"color-picker",dualOutput:!0,disableNone:!0},zebraStripesBackgroundrOdd:{show:cB,ref:"grid.zebraStripes.background.odd",translation:"properties.zebraStripes.background.odd",type:"object",component:"color-picker",dualOutput:!0,disableNone:!1},zebraStripesColorEven:{show:cB,ref:"grid.zebraStripes.color.even",translation:"properties.zebraStripes.color.even",type:"object",component:"color-picker",dualOutput:!0,disableNone:!0},zebraStripesBackgroundEven:{show:cB,ref:"grid.zebraStripes.background.even",translation:"properties.zebraStripes.background.even",type:"object",component:"color-picker",dualOutput:!0,disableNone:!1}}}}}}}]}),bB=e=>({uses:"settings",items:{presentation:{grouped:!0,type:"items",translation:"properties.presentation",items:[gB(e),tB(e),{type:"items",items:[{component:"text",translation:"properties.accessibilityOptions"},{ref:"usePagination",translation:"properties.usePagination",type:"boolean",component:"checkbox",defaultValue:!1},{ref:"accessibleHeader",translation:"properties.increaseAccessibility",type:"boolean",component:"checkbox",undefinedValue:!0,defaultValue:!1}]},{type:"items",translation:"Object.Table.WrapText",items:[{component:"text",translation:"Object.Table.Multiline"},{ref:"multiline.wrapTextInHeaders",type:"boolean",translation:"Object.Table.Multiline.WrapTextInHeaders",component:"checkbox",defaultValue:!0},{ref:"multiline.wrapTextInCells",type:"boolean",translation:"Object.Table.Multiline.WrapTextInCells",component:"checkbox",defaultValue:!0}]},{ref:"hideHeader",translation:"properties.hideHeader",type:"boolean",component:"checkbox",defaultValue:!1},e.flags.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING")?void 0:Q$()]},...eB}}),vB={uses:"sorting"},yB={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}}}},xB=e=>({type:"items",component:"accordion",items:{data:J$(e),sorting:vB,addOns:yB,settings:bB(e)}});function SB(e){return{definition:xB(e),exploration:ZF(e),data:g$(e),support:{export:!0,exportData:!0,snapshot:!0,viewData:!1,exploration:!0,cssScaling:!0,modifiers:e.anything.sense?.isUnsupportedFeature?.("modifiers")?void 0:["accumulation","movingAverage","difference","normalization"]},importProperties(t,r,n,o,i){const a={defaultDimension:n.getDefaultDimensionProperties(),defaultMeasure:n.getDefaultMeasureProperties()};return wv({exportFormat:t,initialProperties:r,extension:n,hypercubePath:o,defaultPropertyValues:a,viewDataMode:i,env:e})},exportProperties:(e,t)=>gv({propertyTree:e,hyperCubePath:t}),propertyHandler:t=>new d$(t,e.translator),usePropertyHandler:"sn-table-data",migrate:b$(e)}}var wB,CB={exports:{}};
|
|
102
|
+
*/function yR(){if(mR)return US;mR=1,Object.defineProperty(US,"__esModule",{value:!0}),US.default=function(t){return(0,e.createStyles)(t)};var e=vR;return US}var xR,SR,wR={},CR={};function ER(){if(xR)return CR;xR=1;var e=jl();Object.defineProperty(CR,"__esModule",{value:!0}),CR.default=void 0;var t=(0,e(BS()).default)();return CR.default=t,CR}function RR(){if(SR)return wR;SR=1;var e=jl();Object.defineProperty(wR,"__esModule",{value:!0}),wR.default=void 0;var t=e(hu()),r=vR,n=e(ER());var o=function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,r.makeStyles)(e,(0,t.default)({defaultTheme:n.default},o))};return wR.default=o,wR}var AR,IR,MR={},kR={};function DR(){if(AR)return kR;AR=1;var e=jl();Object.defineProperty(kR,"__esModule",{value:!0}),kR.isUnitless=function(e){return String(parseFloat(e)).length===String(e).length},kR.getUnit=r,kR.toUnitless=n,kR.convertLength=function(e){return function(t,o){var i=r(t);if(i===o)return t;var a=n(t);if("px"!==i)if("em"===i)a=n(t)*n(e);else if("rem"===i)return a=n(t)*n(e),t;var s=a;if("px"!==o)if("em"===o)s=a/n(e);else{if("rem"!==o)return t;s=a/n(e)}return parseFloat(s.toFixed(5))+o}},kR.alignProperty=function(e){var t=e.size,r=e.grid,n=t-t%r,o=n+r;return t-n<o-t?n:o},kR.fontGrid=function(e){var t=e.lineHeight,r=e.pixels,n=e.htmlFontSize;return r/(t*n)},kR.responsiveProperty=function(e){var r=e.cssProperty,n=e.min,o=e.max,i=e.unit,a=void 0===i?"rem":i,s=e.breakpoints,l=void 0===s?[600,960,1280]:s,u=e.transform,c=void 0===u?null:u,d=(0,t.default)({},r,"".concat(n).concat(a)),p=(o-n)/l[l.length-1];return l.forEach(function(e){var o=n+p*e;null!==c&&(o=c(o)),d["@media (min-width:".concat(e,"px)")]=(0,t.default)({},r,"".concat(Math.round(1e4*o)/1e4).concat(a))}),d};var t=e(oy());function r(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function n(e){return parseFloat(e)}return kR}function PR(){if(IR)return MR;IR=1;var e=jl();Object.defineProperty(MR,"__esModule",{value:!0}),MR.default=function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=o.breakpoints,a=void 0===i?["sm","md","lg"]:i,s=o.disableAlign,l=void 0!==s&&s,u=o.factor,c=void 0===u?2:u,d=o.variants,p=void 0===d?["h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","caption","button","overline"]:d,f=(0,t.default)({},e);f.typography=(0,t.default)({},f.typography);var h=f.typography,m=(0,n.convertLength)(h.htmlFontSize),g=a.map(function(e){return f.breakpoints.values[e]});return p.forEach(function(e){var o=h[e],i=parseFloat(m(o.fontSize,"rem"));if(!(i<=1)){var a=i,s=1+(a-1)/c,u=o.lineHeight;if(!(0,n.isUnitless)(u)&&!l)throw new Error((0,r.formatMuiErrorMessage)(6));(0,n.isUnitless)(u)||(u=parseFloat(m(u,"rem"))/parseFloat(i));var d=null;l||(d=function(e){return(0,n.alignProperty)({size:e,grid:(0,n.fontGrid)({pixels:4,lineHeight:u,htmlFontSize:h.htmlFontSize})})}),h[e]=(0,t.default)({},o,(0,n.responsiveProperty)({cssProperty:"fontSize",min:s,max:a,unit:"rem",breakpoints:g,transform:d}))}}),f};var t=e(hu()),r=Vv,n=DR();return MR}var TR,qR={};function OR(){if(TR)return qR;TR=1;var e=jl();Object.defineProperty(qR,"__esModule",{value:!0}),qR.default=void 0;var t=e(hu()),r=vR,n=e(ER()),o=function(e){var o=(0,r.styled)(e);return function(e,r){return o(e,(0,t.default)({defaultTheme:n.default},r))}};return qR.default=o,qR}var LR,NR={};function jR(){if(LR)return NR;LR=1;var e=jl();Object.defineProperty(NR,"__esModule",{value:!0}),NR.default=function(){return(0,t.useTheme)()||r.default};var t=vR;e(S);var r=e(ER());return NR}var _R,zR={};function FR(){if(_R)return zR;_R=1;var e=jl();Object.defineProperty(zR,"__esModule",{value:!0}),zR.default=void 0;var t=e(hu()),r=vR,n=e(ER());var o=function(e,o){return(0,r.withStyles)(e,(0,t.default)({defaultTheme:n.default},o))};return zR.default=o,zR}var $R,BR,HR={};function VR(){if($R)return HR;$R=1;var e=jl();Object.defineProperty(HR,"__esModule",{value:!0}),HR.default=void 0;var t=vR,r=e(ER()),n=(0,t.withThemeCreator)({defaultTheme:r.default});return HR.default=n,HR}function WR(){return BR||(BR=1,function(e){var t=jl(),r=(Cv||(Cv=1,function(e){var t;e.exports=function(e,r){if(!r&&e&&e.__esModule)return e;var n,o,i=Object.defineProperty,a={__proto__:null,default:e};if(Object(e)!==e)return a;if(t||"function"!=typeof WeakMap||(t=new WeakMap),t){if(t.has(e))return t.get(e);t.set(e,a)}for(o in e)"default"!==o&&{}.hasOwnProperty.call(e,o)&&((n=i&&Object.getOwnPropertyDescriptor(e,o))&&(n.get||n.set)?i(a,o,n):a[o]=e[o]);return a},e.exports.__esModule=!0,e.exports.default=e.exports}(Rv)),Rv.exports);Object.defineProperty(e,"__esModule",{value:!0});var n={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 i.default}}),Object.defineProperty(e,"createMuiTheme",{enumerable:!0,get:function(){return i.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 o=Wv();Object.keys(o).forEach(function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(n,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))});var i=r(BS()),a=t(WS()),s=t(yR()),l=t(RR()),u=t(PR()),c=t(OR()),d=jS();Object.keys(d).forEach(function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(n,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return d[t]}}))});var p=t(jR()),f=t(FR()),h=t(VR()),m=vR}(Ev)),Ev}var UR=WR();UR.alpha(Dt.GREYSCALE_0,.05),UR.alpha(Dt.GREEN_PALE,.5),UR.alpha(Dt.BLUE_PALE,.5),UR.alpha(Dt.GREEN_PALE,.5),UR.alpha(Dt.BLUE_PALE,.5),UR.alpha(Dt.GREEN_PALE,.5),UR.alpha(Dt.BLUE_PALE,.5),UR.alpha(Dt.GREEN_PALE,.5),UR.alpha(Dt.BLUE_PALE,.5),UR.alpha(Dt.GREEN_PALE,.5),UR.alpha(Dt.BLUE_PALE,.5),import.meta.env&&import.meta.env.MODE;!function(e=()=>{try{return window.localStorage}catch(e){return void("production"!==(import.meta.env?import.meta.env.MODE:void 0)&&"undefined"!=typeof window&&console.warn(e))}},t){var r;let n,o;const i={getItem:(r,i)=>{var a,s;const l=e=>{if(n!==(e=e||"")){try{o=JSON.parse(e,null==t?void 0:t.reviver)}catch(e){return i}n=e}return o},u=null!=(s=null==(a=e())?void 0:a.getItem(r))?s:null;return(e=>"function"==typeof(null==e?void 0:e.then))(u)?u.then(l):l(u)},setItem:(t,r)=>{var n;return null==(n=e())?void 0:n.setItem(t,JSON.stringify(r,void 0))},removeItem:t=>{var r;return null==(r=e())?void 0:r.removeItem(t)}};let a;try{a=null==(r=e())?void 0:r.subscribe}catch(e){}var s;!a&&"undefined"!=typeof window&&"function"==typeof window.addEventListener&&window.Storage&&(a=(t,r)=>{if(!(e()instanceof window.Storage))return()=>{};const n=n=>{n.storageArea===e()&&n.key===t&&r(n.newValue)};return window.addEventListener("storage",n),()=>{window.removeEventListener("storage",n)}}),a&&(i.subscribe=(s=a,(e,r,n)=>s(e,e=>{let o;try{o=JSON.parse(e||"",null==t?void 0:t.reviver)}catch(e){o=n}r(o)})))}();const GR=(e,t,r)=>(t.has(r)?t:t.set(r,e())).get(r),KR=new WeakMap,YR=()=>{};function XR(e,t=YR){return((e,t,r)=>{const n=GR(()=>new WeakMap,KR,t);return GR(e,n,r)})(()=>{const r=new WeakMap,n=new WeakMap,o=zg(0),i=zg([]);i.INTERNAL_onInit=e=>{e.set(i,[()=>e.set(o,e=>e+1)])},"production"!==(import.meta.env?import.meta.env.MODE:void 0)&&(o.debugPrivate=!0,i.debugPrivate=!0);const a=zg(s=>{let l;s(o);try{l=s(a)}catch(e){}const u=s(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=>{n.set(u,e);const[t]=s(i);t()},e=>{r.set(u,e);const[t]=s(i);t()}),r.has(u)){if(l&&"e"in l&&l.p===u)return l;const e=r.get(u);return l&&"v"in l?{p:u,e:e,v:l.v}:{p:u,e:e}}return n.has(u)?{p:u,v:n.get(u)}:l&&"v"in l?{p:u,f:t(l.v),v:l.v}:{p:u,f:t()}});return a.init=void 0,"production"!==(import.meta.env?import.meta.env.MODE:void 0)&&(a.debugPrivate=!0),zg(e=>{const t=e(a);if("e"in t)throw t.e;return"f"in t?t.f:t.v},(t,r,...n)=>r(e,...n))},e,t)}const JR=new WeakMap;function ZR(e,t){const r=Vg(t),n=QR(r);for(const[o,...i]of e)n.has(o)&&!(null==t?void 0:t.dangerouslyForceHydrate)||(n.add(o),r.set(o,...i))}const QR=e=>{let t=JR.get(e);return t||(t=new WeakSet,JR.set(e,t)),t};function eA(){return Boolean("undefined"!=typeof process&&process.env?.NODE_ENV&&!1)}const tA="INTERNAL_getBuildingBlocksRev",rA=Number(Object.keys(Ng).find(e=>e.startsWith(tA))?.slice(29));if(Number.isNaN(rA))throw new Error("jotai-compat: unsupported jotai internals revision");const nA=Ng,oA=`INTERNAL_getBuildingBlocksRev${rA}`,iA=nA[`INTERNAL_initializeStoreHooksRev${rA}`],aA=[["atomStateMap","a"],["mountedMap","m"],["invalidatedAtoms","i"],["changedAtoms","c"],["mountCallbacks","q"],["unmountCallbacks","Q"],["storeHooks","h"],["atomRead","R"],["atomWrite","W"],["atomOnInit","I"],["atomOnMount","M"],["ensureAtomState","e"],["flushCallbacks","f"],["recomputeInvalidatedAtoms","C"],["readAtomState","r"],["invalidateDependents","d"],["writeAtomState","w"],["mountDependencies","D"],["mountAtom","t"],["unmountAtom","T"],["setAtomStateValueOrPromise","v"],["storeGet","g"],["storeSet","s"],["storeSub","b"],["enhanceBuildingBlocks","B"],["abortHandlersMap","p"],["registerAbortHandler","H"],["abortPromise","A"],["storeEpochHolder","E"]];if(rA>=4)for(const[e,t]of aA)if(nA[`INTERNAL_KEY_${e}`]!==t)throw new Error(`jotai-compat: KEY drift for ${e}`);const sA={};aA.forEach(([e,t],r)=>{sA[`INTERNAL_KEY_${e}`]=rA>=4?t:r});const{INTERNAL_KEY_mountedMap:lA,INTERNAL_KEY_changedAtoms:uA,INTERNAL_KEY_storeHooks:cA,INTERNAL_KEY_ensureAtomState:dA,INTERNAL_KEY_flushCallbacks:pA,INTERNAL_KEY_recomputeInvalidatedAtoms:fA,INTERNAL_KEY_readAtomState:hA,INTERNAL_KEY_invalidateDependents:mA,INTERNAL_KEY_writeAtomState:gA,INTERNAL_KEY_mountDependencies:bA,INTERNAL_KEY_setAtomStateValueOrPromise:vA}=sA,yA=nA[oA],xA=new WeakMap;function SA(e){const t=zg(()=>[]),r=zg(function(e){const[n,o,i]=e(t);i.has(r)&&(n.forEach(e),++o.n)});return r.effect=e,r.INTERNAL_onInit=e=>{const n=(e=>{const t=yA(e);let r=xA.get(t);return r||(r=Array.isArray(t)?[]:{},aA.forEach(([e,n],o)=>{const i={value:Object.prototype.hasOwnProperty.call(t,n)?t[n]:t[o],enumerable:!0};Object.defineProperty(r,o,i),Object.defineProperty(r,n,i)}),xA.set(t,r)),r})(e),o=n[lA],i=n[uA],a=iA(n[cA]),s=n[dA],l=n[pA],u=n[fA],c=n[hA],d=n[mA],p=n[gA],f=n[bA],h=n[vA],m=new Set;let g,b=0,v=!1,y=!1,x=!1;function S(){if(b)return;m.clear();let t=!0;const w=i=>{if(x)return e.get(i);if(i===r){const t=s(n,e,i);if(!ag(t)){if(!og(i))throw new Error("no atom init");h(n,e,i,i.init)}return sg(t)}const a=c(n,e,i);try{return sg(a)}finally{C.d.set(i,a.n),o.get(i)?.t.add(r),t?m.add(i):o.has(i)&&(f(n,e,r),u(n,e),l(n,e))}};w.peek=e.get;const E=(o,...c)=>{const m=s(n,e,o);try{if(++b,o===r){if(!og(o))throw new Error("atom not writable");const t=m.n,r=c[0];return h(n,e,o,r),f(n,e,o),void(t!==m.n&&(i.add(o),a.c?.(o),d(n,e,o)))}return p(n,e,o,c)}finally{t||(u(n,e),l(n,e)),--b}};E.recurse=(t,...o)=>{if(x){if(eA())throw new Error("set.recurse is not allowed in cleanup")}else try{return v=!0,f(n,e,r),E(t,...o)}finally{u(n,e),v=!1,y&&(y=!1,S())}};try{g?.();const e=r.effect(w,E);if("function"!=typeof e)return;g=()=>{if(!b)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(n,e,t).n)}),f(n,e,r),u(n,e)}}const w=function(e,t){let r=wA.get(e);r||(r=new Set,wA.set(e,r),t.f.add(function(){for(const e of r)r.delete(e),e()}));return r}(e,a),C=s(n,e,r);C.v=void 0,Object.assign(e.get(t),[m,C,o]),a.c.add(r,function(){i.delete(r)}),a.m.add(r,function(){w.add(S),g&&w.delete(g)}),a.u.add(r,function(){w.delete(S),g&&w.add(g)}),a.c.add(r,function(){v?y=!0:w.add(S)})},eA()&&(Object.defineProperty(t,"debugLabel",{get:()=>r.debugLabel?`${r.debugLabel}:ref`:void 0,configurable:!0,enumerable:!0}),t.debugPrivate=!0),r}const wA=new WeakMap;const CA=async(e,t,r)=>{if("dimension"===e.type)if(e.isAlternative)try{await t.moveDimensionFromAlternative(e.id)}catch(t){r.error({msg:`Failed to move dimension ${e.id} from alternative`,payload:t})}else try{await t.moveDimensionToAlternative(e.id)}catch(t){r.error({msg:`Failed to move dimension ${e.id} to alternative`,payload:t})}if("measure"===e.type)if(e.isAlternative)try{await t.moveMeasureFromAlternative(e.id)}catch(t){r.error({msg:`Failed to move measure ${e.id} from alternative`,payload:t})}else try{await t.moveMeasureToAlternative(e.id)}catch(t){r.error({msg:`Failed to move measure ${e.id} to alternative`,payload:t})}},EA=e=>{const{items:t,handler:r,model:n,handlerQueue:o,logToSentry:i}=e;void 0!==r&&void 0!==n&&o&&o.add(async()=>{for(const e of t)await CA(e,r,i)})},RA=zg(),AA=zg(),IA=zg(),MA=zg(e=>e(IA)?.translate??(e=>e)),kA=zg(e=>t=>e(IA)?.getBooleanFlag(t,!1)??!1),DA=zg(""),PA=zg(e=>{const t=e(DA).toLowerCase().trim();return({title:e})=>e.toLowerCase().trim().includes(t)});class TA{#e=[];#t=!1;#r=!1;#n;#o;#i;#a;constructor({onQueueCompleted:e}){this.#n=e}#s(){this.#o=void 0,this.#i=void 0,this.#a=void 0}pause(){this.#o&&(clearTimeout(this.#a),this.#i?.(),this.#s());const{promise:e,resolve:t}=Promise.withResolvers();this.#o=e,this.#i=t,this.#a=setTimeout(()=>{this.abort("Aborting queue after being paused for too long")},6e4)}async continue(e=0){const t=this.#i;await(e=>new Promise(t=>{setTimeout(t,e)}))(e),t===this.#i&&(t?.(),clearTimeout(this.#a),this.#s())}abort(e="Queue aborted"){clearTimeout(this.#a),(this.#e.length>0||this.#t)&&console.warn(`[SequentialPromiseQueue] ${e}`),this.#r=!0,this.#e=[],this.#i?.(),this.#s()}add(e){this.#e.push(e),this.#t||this.#l()}async#l(){if(!this.#t){for(this.#t=!0,this.#r=!1;this.#e.length>0;)if(this.#o)await this.#o;else try{const e=this.#e.shift();await(e?.())}catch(e){return console.error("[SequentialPromiseQueue] Error executing action:",e),this.#e=[],void(this.#t=!1)}try{this.#r||await(this.#n?.())}catch(e){console.error("[SequentialPromiseQueue] Error executing onQueueCompleted:",e)}finally{this.#t=!1,this.#e.length>0&&this.#l()}}}}const qA=zg(null),OA=SA((e,t)=>{const r=e(RA),n=e(AA),o=new TA({onQueueCompleted:async()=>{if(!r||!n)return;const e=n.properties.qHyperCubeDef,t=Date.now();e.qDimensions.length&&Object.assign(e.qDimensions[0],{patchTimeStamp:t}),e.qMeasures.length&&Object.assign(e.qMeasures[0],{patchTimeStamp:t}),await r.applyPatches([{qPath:"/qHyperCubeDef",qOp:"replace",qValue:JSON.stringify(n.properties.qHyperCubeDef)}],!0)}});t(qA,o);const i=()=>{o.pause()},a=()=>{o.continue(500)},s=()=>{o.abort()};return r?.Invalidated?.bind(i),r?.Validated?.bind(a),r?.Cancelled?.bind(s),r?.Closing?.bind(s),()=>{o.abort(),r?.Invalidated?.unbind(i),r?.Validated?.unbind(a),r?.Cancelled?.unbind(s),r?.Closing?.unbind(s)}}),LA=e=>e.qDef?.cId,NA=(e=[])=>new Set(e.map(LA).filter(e=>void 0!==e)),jA=({effectiveActive:e,effectiveExcluded:t,currentKnown:r})=>{const n=NA(r),o=NA([...e,...t]),i=new Set,a=r.filter(e=>{const t=LA(e);return!(!t||o.has(t)||i.has(t))&&(i.add(t),!0)}),s=t.flatMap((e,t)=>{const r=LA(e);return void 0===r||n.has(r)?[]:[t]});return{kept:t.filter((e,t)=>!s.includes(t)),missing:a,removedIndexes:s}},_A=(e,t)=>{if(!("qHyperCubeDef"in t))return e;const r=e.qHyperCubeDef,n=t.qHyperCubeDef,o=r.qLayoutExclude?.qHyperCubeDef,i=n.qLayoutExclude?.qHyperCubeDef,a=jA({effectiveActive:r.qDimensions??[],effectiveExcluded:o?.qDimensions??[],currentKnown:[...n.qDimensions??[],...i?.qDimensions??[]]}),s=jA({effectiveActive:r.qMeasures??[],effectiveExcluded:o?.qMeasures??[],currentKnown:[...n.qMeasures??[],...i?.qMeasures??[]]});if(![a,s].some(({missing:e,removedIndexes:t})=>e.length>0||t.length>0))return e;const l=[...a.kept,...a.missing],u=[...s.kept,...s.missing],c=((e,t)=>{if(!e)return;const r=new Set(t),n=Object.entries(e).filter(([e])=>r.has(e)).sort((e,t)=>e[1]-t[1]).map(([e])=>e),o=new Set(n),i=[...r].filter(e=>!o.has(e));return Object.fromEntries([...n,...i].map((e,t)=>[e,t]))})(r.qLayoutExclude?.allColumnOrder,[...NA(r.qDimensions??[]),...NA(r.qMeasures??[]),...NA(l),...NA(u)]);return{...e,qHyperCubeDef:{...r,qLayoutExclude:{...r.qLayoutExclude,...c&&{allColumnOrder:c},qHyperCubeDef:{...r.qLayoutExclude?.qHyperCubeDef,qDimensions:l,qMeasures:u}}}}},zA=e=>7005!==e.qError?.qErrorCode,FA=new WeakMap,$A={qInfo:{qType:"AlternativeLayout"},qHyperCubeDef:{qMode:"S",qDimensions:[],qMeasures:[],qInitialDataFetch:[{qTop:0,qLeft:0,qHeight:0,qWidth:0}],excludedNoOfLeftDims:-1,qCalcCond:{qv:"0"}}},BA=XR(zg(async e=>{const t=e(RA),r=e(mb);if(t){if(FA.has(t))return FA.get(t);try{const e=await t.app.createSessionObject($A);return FA.set(t,e),e}catch(e){return void r.error({msg:"Error creating alternative layout model",payload:e})}}})),HA=zg(null),VA=zg(),WA=SA((e,t)=>{const r=e(RA),n=e(BA),o=e(mb),i=e(kA),a=e(AA);let s=0,l=!1;if(!r||!n)return;const u=async()=>{s++;try{const e=await r.getLayout();if(e.qSelectionInfo?.qInSelections)return;const o=structuredClone(await r.getEffectiveProperties()),s=i("VNA-760-show-added-columns-exploration")?_A(o,await r.getProperties()):o;await n.applyPatches([{qOp:"replace",qPath:"/qHyperCubeDef/qDimensions",qValue:JSON.stringify(s.qHyperCubeDef.qLayoutExclude?.qHyperCubeDef?.qDimensions??[])},{qOp:"replace",qPath:"/qHyperCubeDef/qMeasures",qValue:JSON.stringify(s.qHyperCubeDef.qLayoutExclude?.qHyperCubeDef?.qMeasures??[])}]);const l=await n.getLayout();s!==o&&a?.setProperties(structuredClone(s)),t(VA,{layout:structuredClone(e),properties:s,altLayout:structuredClone(l)}),t(HA,null)}catch(e){o.error({msg:"Failed to synchronize table layout",payload:e})}finally{s--,0===s&&l&&(l=!1,c())}},c=async()=>{if(s>0)return void(l=!0);const e=await n.getLayout();t(VA,t=>({...t,altLayout:structuredClone(e)}))};return u(),r.Invalidated.bind(u),n.Invalidated.bind(c),()=>{r.Invalidated.unbind(u),n.Invalidated.unbind(c)}}),UA=zg(e=>e(VA)?.layout),GA=zg(e=>e(VA)?.altLayout),KA=zg(e=>e(VA)?.properties),YA=zg(e=>void 0===e(UA)||void 0===e(KA)),XA=zg(e=>{const t=e(VA)?.layout;return t?.qHyperCube.qDimensionInfo.filter(zA)??[]}),JA=zg(e=>{const t=e(VA)?.layout;return t?.qHyperCube.qMeasureInfo.filter(zA)??[]}),ZA=zg(e=>{const t=[...e(XA),...e(JA)].map(e=>e.cId);return new Set(t)}),QA=zg(new Set),eI=zg(new Set),tI=zg(e=>{const t=e(QA),r=e(eI);return e(ZA).difference(r).union(t)}),rI=SA((e,t)=>{e(ZA),t(QA,new Set),t(eI,new Set)}),nI=zg(e=>e(tI),(e,t,r)=>{if("string"!=typeof r.id)return;const n=e(tI).has(r.id),o=new Set(e(eI)),i=new Set(e(QA));n?(o.add(r.id),i.delete(r.id)):(i.add(r.id),o.delete(r.id)),t(eI,o),t(QA,i),EA({items:[r],handler:e(AA),model:e(RA),handlerQueue:e(qA),logToSentry:e(mb)})}),oI=({props:e,children:t})=>(ZR([[RA,e.args.model],[IA,e.args.apis],[AA,e.args.handler]]),Jg(WA),Jg(OA),Jg(rI),t);function iI(e,t){const r=new Set(e),n=new Set(t);return e===t||r.size===n.size&&Array.from(r).every(n.has.bind(n))}function aI(e){return"write"in e}const sI="INTERNAL_getBuildingBlocksRev";var lI;const uI=Number(null==(lI=Object.keys(Ng).find(e=>e.startsWith(sI)))?void 0:lI.slice(29));if(Number.isNaN(uI))throw new Error("jotai-compat: unsupported jotai internals revision");const cI=Ng,dI=`INTERNAL_getBuildingBlocksRev${uI}`,pI=cI[`INTERNAL_buildStoreRev${uI}`];const fI=[["atomStateMap","a"],["mountedMap","m"],["invalidatedAtoms","i"],["changedAtoms","c"],["mountCallbacks","q"],["unmountCallbacks","Q"],["storeHooks","h"],["atomRead","R"],["atomWrite","W"],["atomOnInit","I"],["atomOnMount","M"],["ensureAtomState","e"],["flushCallbacks","f"],["recomputeInvalidatedAtoms","C"],["readAtomState","r"],["invalidateDependents","d"],["writeAtomState","w"],["mountDependencies","D"],["mountAtom","t"],["unmountAtom","T"],["setAtomStateValueOrPromise","v"],["storeGet","g"],["storeSet","s"],["storeSub","b"],["enhanceBuildingBlocks","B"],["abortHandlersMap","p"],["registerAbortHandler","H"],["abortPromise","A"],["storeEpochHolder","E"]];if(uI>=4)for(const[e,t]of fI)if(cI[`INTERNAL_KEY_${e}`]!==t)throw new Error(`jotai-compat: KEY drift for ${e}`);const hI={};fI.forEach(([e,t],r)=>{hI[e]=uI>=4?t:r});const{atomStateMap:mI,mountedMap:gI,invalidatedAtoms:bI,changedAtoms:vI,mountCallbacks:yI,unmountCallbacks:xI,storeHooks:SI,atomRead:wI,atomWrite:CI,atomOnInit:EI,atomOnMount:RI,ensureAtomState:AI,flushCallbacks:II,recomputeInvalidatedAtoms:MI,readAtomState:kI,invalidateDependents:DI,writeAtomState:PI,mountDependencies:TI,mountAtom:qI,unmountAtom:OI,setAtomStateValueOrPromise:LI,storeGet:NI,storeSet:jI,storeSub:_I,enhanceBuildingBlocks:zI,abortHandlersMap:FI,registerAbortHandler:$I,abortPromise:BI,storeEpochHolder:HI}=hI,VI=cI[dI],WI=new WeakMap,UI=new WeakMap,GI={},{read:KI,write:YI}=zg(null);function XI(e,t,r){const[n,o,i,,a]=e,s=n.get(t);if(s)return s;if(r===e){let n=o.get(t);return n||(n=[eM(e,t,r),r],o.set(t,n)),n}const l=r??GI;let u=i.get(l);u||(u=new WeakMap,i.set(l,u));let c=u.get(t);if(!c){const[n,o]=a?XI(a,t,r):[t];c=[t.read===KI?n:eM(e,t,o),o],u.set(t,c)}return c}function JI(e){for(const t of e[5])t()}function ZI(e,t,r,n,o){if(r.read===KI&&aI(r)&&aI(t)&&r.write!==YI&&e!==n){const{write:i}=r;return t.write=QI(e,r.write.bind(r),n,o),()=>{t.write=i}}}function QI(e,t,r,n=r){return function(o,i,...a){return t(function(t){const[n]=XI(e,t,r);return o(n)},function(t,...o){const[a]=XI(e,t,r),s=ZI(e,a,t,r,n);try{return i(a,...o)}finally{null==s||s()}},...a)}}function eM(e,t,r){const n=Object.getOwnPropertyDescriptors(t);Object.keys(n).filter(e=>["read","write","debugLabel"].includes(e)).forEach(e=>n[e].configurable=!0);const o=Object.getPrototypeOf(t),i=Object.create(o,n);return i.read!==KI&&(i.read=function(e,t,r){return function(n,o){return t(function(t){const[o]=XI(e,t,r);return n(o)},o)}}(e,t.read.bind(t),r)),aI(i)&&aI(t)&&i.write!==YI&&(i.write=QI(e,t.write.bind(t),r)),i}function tM({atoms:e=[],atomFamilies:t=[],parentStore:r,name:n}){const o=new WeakSet(e),i=UI.get(r),a=(null==i?void 0:i[3])??r,s=[new WeakMap,new WeakMap,new WeakMap,a,i,new Set,void 0],l=s[0],u=s[5],c=function(e){const t=e[3],r=rM((e=>{const t=VI(e);let r=WI.get(t);return r||(r=Array.isArray(t)?[]:{},fI.forEach(([e,n],o)=>{const i={value:Object.prototype.hasOwnProperty.call(t,n)?t[n]:t[o],enumerable:!0};Object.defineProperty(r,o,i),Object.defineProperty(r,n,i)}),WI.set(t,r)),r})(t)),n=r,o=n[hI.storeGet],i=n[hI.storeSet],a=n[hI.storeSub],s={};let l,u;return n[hI.storeGet]=m(o),n[hI.storeSet]=f,n[hI.storeSub]=m(a),r[hI.enhanceBuildingBlocks]=function(e){return l??(l=g(e[hI.atomStateMap],c)),u??(u=Object.assign(rM(e),{...e,[hI.atomStateMap]:l,[hI.mountedMap]:g(e[hI.mountedMap],d),[hI.invalidatedAtoms]:g(e[hI.invalidatedAtoms]),[hI.changedAtoms]:b(e[hI.changedAtoms]),[hI.mountCallbacks]:e[hI.mountCallbacks],[hI.unmountCallbacks]:e[hI.unmountCallbacks],[hI.storeHooks]:y(e[hI.storeHooks]),[hI.atomRead]:m(e[hI.atomRead]),[hI.atomWrite]:m(e[hI.atomWrite]),[hI.atomOnInit]:m(e[hI.atomOnInit]),[hI.atomOnMount]:m(e[hI.atomOnMount]),[hI.ensureAtomState]:p(l,e[hI.ensureAtomState]),[hI.flushCallbacks]:(t,...n)=>e[hI.flushCallbacks](r,...n),[hI.recomputeInvalidatedAtoms]:(t,...n)=>e[hI.recomputeInvalidatedAtoms](r,...n),[hI.readAtomState]:m(e[hI.readAtomState]),[hI.invalidateDependents]:m(e[hI.invalidateDependents]),[hI.writeAtomState]:m(e[hI.writeAtomState]),[hI.mountDependencies]:m(e[hI.mountDependencies]),[hI.mountAtom]:m(e[hI.mountAtom]),[hI.unmountAtom]:m(e[hI.unmountAtom]),[LI]:m(e[LI]),[hI.storeGet]:m(e[hI.storeGet]),[hI.storeSet]:m(e[hI.storeSet]),[hI.storeSub]:m(e[hI.storeSub]),[hI.enhanceBuildingBlocks]:()=>e})),u},function(e){if(uI<4){const t=e?Object.values(e):[];return pI(...t)}const t=Array.isArray(e)?Object.fromEntries(fI.map(([t,r],n)=>[r,e[n]])):e;return pI(t)}(r);function c(t){const r=new WeakMap;return function(n){let o=r.get(n);if(o)return o;const i=t(n);if(!i)return;let a,s;return o=new Proxy(i,{get:(t,r)=>"d"===r?a??(a=g(i.d,function(t){return r=>t(XI(e,r)[0])})):"p"===r?s??(s=b(i.p)):Reflect.get(i,r)}),r.set(n,o),o}}function d(e){const t=new WeakMap;return function(r){let n=t.get(r);if(n)return n;const o=e(r);return o?(n={...o,d:b(o.d),t:b(o.t),get u(){return o.u},set u(e){o.u=e}},t.set(r,n),n):void 0}}function p(e,t){const r=m(t);return function(t,n,o){const i=e.get(o);if(i)return i;const a=r(t,n,o);return e.set(o,a),e.get(o)}}function f(t,r,n,...o){const[a,s]=XI(e,n),l=ZI(e,a,n,s,e);try{return i(t,r,a,...o)}finally{null==l||l()}}function h(t,r){return function(n,...o){const[i]=XI(e,n);return(r?r(t):t)(i,...o)}}function m(t){return function(n,o,i,...a){const[s]=XI(e,i);return t(r,o,s,...a)}}function g(e,t){const r={get:h(e.get.bind(e),t),set:h(e.set.bind(e)),has:h(e.has.bind(e)),delete:h(e.delete.bind(e))};if("function"==typeof e.keys){const t=e,n=r;n.keys=t.keys.bind(t),n[Symbol.iterator]=t[Symbol.iterator].bind(t),Object.defineProperty(r,"size",{enumerable:!1,configurable:!0,get:()=>t.size})}return r}function b(t){return{get size(){return t.size},add:h(t.add.bind(t)),has:h(t.has.bind(t)),delete:h(t.delete.bind(t)),clear:t.clear.bind(t),forEach:e=>t.forEach(h(e)),*[Symbol.iterator](){for(const r of t)yield XI(e,r)[0]}}}function v(t){if(!t)return;const r=h(t);return r.add=function(r,n){if(void 0===r)return t.add(void 0,n);const[o]=XI(e,r);return t.add(o,n)},r}function y(e){const t={get f(){return e.f},set f(t){e.f=t}};return Object.defineProperties(t,Object.fromEntries(["r","c","m","u"].map(t=>[t,{get:()=>s[t]??(s[t]=v(e[t])),set(r){delete s[t],e[t]=r},configurable:!0,enumerable:!0}]))),Object.assign(t,e)}}(s);s[6]=c,Object.assign(c,{name:n}),UI.set(c,s);for(const t of new Set(e))l.set(t,[eM(s,t,s),s]);for(const e of new Set(t)){for(const t of e.getParams()){const r=e(t);l.has(r)||l.set(r,[eM(s,r,s),s])}const t=e.unstable_listen(({type:e,atom:t})=>{"CREATE"!==e||l.has(t)?"REMOVE"===e&&!o.has(t)&&l.delete(t):l.set(t,[eM(s,t,s),s])});u.add(t)}return c}function rM(e){return Array.isArray(e)?[...e]:{...e}}const nM=function(e,t){return function(r){const{atoms:n=[],atomFamilies:o=[],children:i,scope:a,name:s}=r,l=t(),u=Array.from(n,e=>Array.isArray(e)?e[0]:e);function c(){return[a??tM({atoms:u,atomFamilies:o,parentStore:l,name:s}),function(e){return l!==e.parentStore||!iI(u,e.atoms)||!iI(o,e.atomFamilies)||a!==e.providedScope}]}const[[d,p],f]=I(c);if(p({atoms:u,atomFamilies:o,parentStore:l,providedScope:a})){const e=UI.get(d);e&&JI(e),f(c)}return ZR(Array.from(n).filter(Array.isArray),{store:d}),P(()=>{const e=UI.get(d);return()=>{e&&JI(e)}},[d]),w(e,{store:d,children:i})}}(Wg,Vg);var oM=Object.defineProperty,iM=Object.defineProperties,aM=Object.getOwnPropertyDescriptors,sM=Object.getOwnPropertySymbols,lM=Object.prototype.hasOwnProperty,uM=Object.prototype.propertyIsEnumerable,cM=(e,t,r)=>t in e?oM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,dM=(e,t)=>{for(var r in t||(t={}))lM.call(t,r)&&cM(e,r,t[r]);if(sM)for(var r of sM(t))uM.call(t,r)&&cM(e,r,t[r]);return e},pM=(e,t)=>iM(e,aM(t));function fM(e,t,r){if(t===r)return e;const n=e.slice();return n.splice(r,0,n.splice(t,1)[0]),n}function hM(e,t){const r=String(t);return Object.prototype.hasOwnProperty.call(e,r)?r:void 0}function mM(e){return"initialIndex"in e&&"number"==typeof e.initialIndex&&"index"in e&&"number"==typeof e.index}function gM(e,t){return function(e,t,r){var n,o;const{source:i,target:a,canceled:s}=t.operation;if(!i||!a||s)return"preventDefault"in t&&t.preventDefault(),e;const l=(e,t)=>e===t||null!==e&&"object"==typeof e&&"id"in e&&e.id===t;if(Array.isArray(e)){const n=e.findIndex(e=>l(e,i.id)),o=e.findIndex(e=>l(e,a.id));if(-1===n||-1===o){if(mM(i)){const n=i.initialIndex,o=i.index;return n===o||n<0||n>=e.length?("preventDefault"in t&&t.preventDefault(),e):r(e,n,o)}return e}if(!s&&"index"in i&&"number"==typeof i.index){const t=i.index;if(t!==n)return r(e,n,t)}return r(e,n,o)}const u=Object.entries(e);let c,d,p=-1,f=-1;for(const[e,t]of u)if(-1===p&&(p=t.findIndex(e=>l(e,i.id)),-1!==p&&(c=e)),-1===f&&(f=t.findIndex(e=>l(e,a.id)),-1!==f&&(d=e)),-1!==p&&-1!==f)break;if(-1===p&&mM(i)){const n=null==i.initialGroup?void 0:hM(e,i.initialGroup),o=i.initialIndex,a=null==i.group?void 0:hM(e,i.group),s=i.index;if(null==n||null==a)return"preventDefault"in t&&t.preventDefault(),e;if(n===a&&o===s)return"preventDefault"in t&&t.preventDefault(),e;if(n===a)return pM(dM({},e),{[n]:r(e[n],o,s)});const l=e[n][o];return pM(dM({},e),{[n]:[...e[n].slice(0,o),...e[n].slice(o+1)],[a]:[...e[a].slice(0,s),l,...e[a].slice(s)]})}if(!i.manager)return e;const{dragOperation:h}=i.manager,m=null!=(o=null==(n=h.shape)?void 0:n.current.center)?o:h.position.current;if(null==d){const t=hM(e,a.id);null!=t&&(d=t,f=a.shape&&m.y>a.shape.center.y?e[t].length:0)}if(null==c||null==d||c===d&&p===f){if(null!=c&&c===d&&p===f&&mM(i)){const t=null==i.group?void 0:hM(e,i.group),n=null!=i.group&&t!==c,o=i.index!==p;if(n||o){const n=null==i.group?c:t;if(null!=n){if(c===n)return pM(dM({},e),{[c]:r(e[c],p,i.index)});const t=e[c][p];return pM(dM({},e),{[c]:[...e[c].slice(0,p),...e[c].slice(p+1)],[n]:[...e[n].slice(0,i.index),t,...e[n].slice(i.index)]})}}}return"preventDefault"in t&&t.preventDefault(),e}if(c===d)return pM(dM({},e),{[c]:r(e[c],p,f)});const g=a.shape&&Math.round(m.y)>Math.round(a.shape.center.y)?1:0,b=e[c][p];return pM(dM({},e),{[c]:[...e[c].slice(0,p),...e[c].slice(p+1)],[d]:[...e[d].slice(0,f+g),b,...e[d].slice(f+g)]})}(e,t,fM)}function bM(e,t){let r=null;const n=new Map,o=new Set;function i(o){let s;if(void 0===t)s=n.get(o);else for(const[e,r]of n)if(t(e,o)){s=r;break}if(void 0!==s){if(!r?.(s[1],o))return s[0];i.remove(o)}const l=e(o);return n.set(o,[l,Date.now()]),a("CREATE",o,l),l}function a(e,t,r){for(const n of o)n({type:e,param:t,atom:r})}return i.unstable_listen=e=>(o.add(e),()=>{o.delete(e)}),i.getParams=()=>n.keys(),i.remove=e=>{if(void 0===t){if(!n.has(e))return;const[t]=n.get(e);n.delete(e),a("REMOVE",e,t)}else for(const[r,[o]]of n)if(t(r,e)){n.delete(r),a("REMOVE",r,o);break}},i.setShouldRemove=e=>{if(r=e,r)for(const[e,[t,o]]of n)r(o,e)&&(n.delete(e),a("REMOVE",e,t))},i}const vM=({itemIndex:e,sectionIndex:t})=>void 0!==e?`${t}-${e}`:`${t}`,yM=zg(),xM=zg(e=>e(yM)?.numberOfSections??0),SM=zg(e=>e(yM)?.numberOfItemsInSection??[]),wM=zg(e=>e(yM)?.keyExtractor??vM),CM=zg(e=>e(yM)?.emptyTexts??(()=>({title:"No items",message:"There are no items to display."}))),EM=zg(e=>e(yM)?.onDragEnd),RM=zg(e=>e(yM)?.onDragOver),AM=zg(e=>e(yM)?.itemRenderer),IM=zg(e=>e(yM)?.headerRenderer),MM=zg(e=>e(yM)?.dragOverlayRenderer),kM=zg(e=>e(yM)?.onClick),DM=zg(e=>{const t=e(xM),r=e(SM),n=e(wM),o={};for(let e=0;e<t;e++)o[e]=Array.from({length:r[e]},(t,r)=>n({sectionIndex:e,itemIndex:r}));return o}),PM=zg(null),TM=zg(e=>e(PM),(e,t,r)=>{if(null===r)return void t(PM,null);const n=e(PM);t(PM,{...n,...r})}),qM=bM(e=>zg(null,(t,r,n)=>{let o;"over"===e?o=t(RM):"end"===e&&(o=t(EM),r(TM,null));const{source:i,target:a}=n.operation;if("start"===e)return void r(TM,{id:i.id,startSection:i.data.sectionKey,startIndex:i.data.itemIndex,startSectionIndex:i.data.sectionIndex});if(null===a)return void r(TM,{toIndex:void 0,toSectionIndex:void 0});const s=i.data.sectionIndex!==a.data.sectionIndex;let l;if(s){const e=gM(t(DM),n)[a.data.sectionIndex].indexOf(i.id);l=-1!==e?e:a.sortable?.index??0}else l=a.sortable?.index??0;if("over"===e){const e=t(TM)?.startIndex;r(TM,{toIndex:!s&&void 0!==e&&l>e?l+1:l,toSectionIndex:a.data.sectionIndex})}o?.({id:i.id,toIndex:l,toSection:a.data.sectionKey,fromSection:i.data.sectionKey,startSection:t(TM)?.startSection??i.data.sectionKey,event:n})})),OM=[yM,xM,SM,wM,CM,EM,AM,IM,kM,TM],LM=[qM],NM=({props:e,children:t})=>{const r=Zg(yM);return L(()=>{r(e)},[e,r]),t};var jM=Symbol.for("preact-signals");function _M(){if(VM>1)VM--;else{var e,t=!1;for(!function(){var e=KM;for(KM=void 0;void 0!==e;){var t=e.S;if(t.v===e.v)for(var r=t.t;void 0!==r;r=r.x)r.i===e.i&&(r.i=t.i);e=e.o}}();void 0!==HM;){var r=HM;for(HM=void 0,WM++;void 0!==r;){var n=r.u;if(r.u=void 0,r.f&=-3,!(8&r.f)&&QM(r))try{r.c()}catch(r){t||(e=r,t=!0)}r=n}}if(WM=0,VM--,t)throw e}}function zM(e){if(VM>0)return e();GM=++UM,VM++;try{return e()}finally{_M()}}var FM,$M=void 0;function BM(e){var t=$M,r=FM;$M=void 0,FM=void 0;try{return e()}finally{$M=t,FM=r}}var HM=void 0,VM=0,WM=0,UM=0,GM=0,KM=void 0,YM=0;function XM(e){if(void 0!==$M){var t=e.n;if(void 0===t||t.t!==$M)return t={i:0,S:e,p:$M.s,n:void 0,t:$M,e:void 0,x:void 0,r:t},void 0!==$M.s&&($M.s.n=t),$M.s=t,e.n=t,32&$M.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=$M.s,t.n=void 0,$M.s.n=t,$M.s=t),t}}function JM(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 ZM(e,t){return new JM(e,t)}function QM(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 ek(e){for(var t=e.s;void 0!==t;t=t.n){var r=t.S.n;if(void 0!==r&&(t.r=r),t.S.n=t,t.i=-1,void 0===t.n){e.s=t;break}}}function tk(e){for(var t=e.s,r=void 0;void 0!==t;){var n=t.p;-1===t.i?(t.S.U(t),void 0!==n&&(n.n=t.n),void 0!==t.n&&(t.n.p=n)):r=t,t.S.n=t.r,void 0!==t.r&&(t.r=void 0),t=n}e.s=r}function rk(e,t){JM.call(this,void 0,t),this.x=e,this.s=void 0,this.g=YM-1,this.f=4}function nk(e,t){return new rk(e,t)}function ok(e){var t=e.m;if(e.m=void 0,"function"==typeof t){VM++;var r=$M;$M=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,ik(e),t}finally{$M=r,_M()}}}function ik(e){for(var t=e.s;void 0!==t;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,ok(e)}function ak(e){if($M!==this)throw new Error("Out-of-order effect");tk(this),$M=e,this.f&=-2,8&this.f&&ik(this),_M()}function sk(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,FM&&FM.push(this)}function lk(e,t){var r=new sk(e,t);try{r.c()}catch(e){throw r.d(),e}var n=r.d.bind(r);return n[Symbol.dispose]=n,n}JM.prototype.brand=jM,JM.prototype.h=function(){return!0},JM.prototype.S=function(e){var t=this,r=this.t;r!==e&&void 0===e.e&&(e.x=r,this.t=e,void 0!==r?r.e=e:BM(function(){var e;null==(e=t.W)||e.call(t)}))},JM.prototype.U=function(e){var t=this;if(void 0!==this.t){var r=e.e,n=e.x;void 0!==r&&(r.x=n,e.e=void 0),void 0!==n&&(n.e=r,e.x=void 0),e===this.t&&(this.t=n,void 0===n&&BM(function(){var e;null==(e=t.Z)||e.call(t)}))}},JM.prototype.subscribe=function(e){var t=this;return lk(function(){var r=t.value;BM(function(){return e(r)})},{name:"sub"})},JM.prototype.valueOf=function(){return this.value},JM.prototype.toString=function(){return this.value+""},JM.prototype.toJSON=function(){return this.value},JM.prototype.peek=function(){var e=this;return BM(function(){return e.value})},Object.defineProperty(JM.prototype,"value",{get:function(){var e=XM(this);return void 0!==e&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(WM>100)throw new Error("Cycle detected");!function(e){0!==VM&&0===WM&&e.l!==GM&&(e.l=GM,KM={S:e,v:e.v,i:e.i,o:KM})}(this),this.v=e,this.i++,YM++,VM++;try{for(var t=this.t;void 0!==t;t=t.x)t.t.N()}finally{_M()}}}}),rk.prototype=new JM,rk.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===YM)return!0;if(this.g=YM,this.f|=1,this.i>0&&!QM(this))return this.f&=-2,!0;var e=$M;try{ek(this),$M=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 $M=e,tk(this),this.f&=-2,!0},rk.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)}JM.prototype.S.call(this,e)},rk.prototype.U=function(e){if(void 0!==this.t&&(JM.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)}},rk.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(rk.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=XM(this);if(this.h(),void 0!==e&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),sk.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()}},sk.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,ok(this),ek(this),VM++;var e=$M;return $M=this,ak.bind(this,e)},sk.prototype.N=function(){2&this.f||(this.f|=2,this.u=HM,HM=this)},sk.prototype.d=function(){this.f|=8,1&this.f||ik(this)},sk.prototype.dispose=function(){this.d()};var uk,ck,dk,pk,fk,hk,mk,gk,bk,vk,yk,xk,Sk,wk,Ck,Ek,Rk,Ak,Ik,Mk,kk=Object.create,Dk=Object.defineProperty,Pk=Object.defineProperties,Tk=Object.getOwnPropertyDescriptor,qk=Object.getOwnPropertyDescriptors,Ok=Object.getOwnPropertySymbols,Lk=Object.prototype.hasOwnProperty,Nk=Object.prototype.propertyIsEnumerable,jk=e=>{throw TypeError(e)},_k=(e,t,r)=>t in e?Dk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,zk=(e,t)=>Dk(e,"name",{value:t,configurable:!0}),Fk=["class","method","getter","setter","accessor","field","value","get","set"],$k=e=>void 0!==e&&"function"!=typeof e?jk("Function expected"):e,Bk=(e,t,r,n,o)=>({kind:Fk[e],name:t,metadata:n,addInitializer:e=>r._?jk("Already initialized"):o.push($k(e||null))}),Hk=(e,t)=>{return _k(t,(r="metadata",(n=Symbol[r])?n:Symbol.for("Symbol."+r)),e[3]);var r,n},Vk=(e,t,r,n)=>{for(var o=0,i=e[t>>1],a=i&&i.length;o<a;o++)1&t?i[o].call(r):n=i[o].call(r,n);return n},Wk=(e,t,r,n,o,i)=>{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=Fk[d+5],g=d>3&&(e[h-1]=[]),b=e[h]||(e[h]=[]),v=d&&(!f&&!p&&(o=o.prototype),d<5&&(d>3||!f)&&Tk(d<4?o:{get[r](){return Kk(this,i)},set[r](e){return Xk(this,i,e)}},r));d?f&&d<4&&zk(i,(d>2?"set ":d>1?"get ":"")+r):zk(o,r);for(var y=n.length-1;y>=0;y--)u=Bk(d,r,l={},e[3],b),d&&(u.static=p,u.private=f,c=u.access={has:f?e=>Gk(o,e):e=>r in e},3^d&&(c.get=f?e=>(1^d?Kk:Jk)(e,o,4^d?i:v.get):e=>e[r]),d>2&&(c.set=f?(e,t)=>Xk(e,o,t,4^d?i:v.set):(e,t)=>e[r]=t)),s=(0,n[y])(d?d<4?f?i:v[m]:d>4?void 0:{get:v.get,set:v.set}:o,u),l._=1,4^d||void 0===s?$k(s)&&(d>4?g.unshift(s):d?f?i=s:v[m]=s:o=s):"object"!=typeof s||null===s?jk("Object expected"):($k(a=s.get)&&(v.get=a),$k(a=s.set)&&(v.set=a),$k(a=s.init)&&g.unshift(a));return d||Hk(e,o),v&&Dk(o,r,v),f?4^d?i:v:o},Uk=(e,t,r)=>t.has(e)||jk("Cannot "+r),Gk=(e,t)=>Object(t)!==t?jk('Cannot use the "in" operator on this value'):e.has(t),Kk=(e,t,r)=>(Uk(e,t,"read from private field"),r?r.call(e):t.get(e)),Yk=(e,t,r)=>t.has(e)?jk("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Xk=(e,t,r,n)=>(Uk(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Jk=(e,t,r)=>(Uk(e,t,"access private method"),r);function Zk(e,t){if(t){let r;return nk(()=>{const n=e();return n&&r&&t(r,n)?r:(r=n,n)})}return nk(e)}function Qk(e,t){if(Object.is(e,t))return!0;if(null===e||null===t)return!1;if("function"==typeof e&&"function"==typeof t)return e===t;if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;return!e.some((e,r)=>!Qk(e,t[r]))}if("object"==typeof e&&"object"==typeof t){const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;const o=r.some(r=>!Qk(e[r],t[r]));return!o}return!1}function eD({get:e},t){return{init:e=>ZM(e),get(){return e.call(this).value},set(t){const r=e.call(this);r.peek()!==t&&(r.value=t)}}}function tD(e,t){const r=new WeakMap;return function(){let t=r.get(this);return t||(t=Zk(e.bind(this)),r.set(this,t)),t.value}}function rD(e=!0){return function(t,r){r.addInitializer(function(){const t="field"===r.kind||r.static?this:Object.getPrototypeOf(this),n=Object.getOwnPropertyDescriptor(t,r.name);n&&Object.defineProperty(t,r.name,((e,t)=>Pk(e,qk(t)))(((e,t)=>{for(var r in t||(t={}))Lk.call(t,r)&&_k(e,r,t[r]);if(Ok)for(var r of Ok(t))Nk.call(t,r)&&_k(e,r,t[r]);return e})({},n),{enumerable:e}))})}}function nD(...e){const t=e.map(e=>lk(e));return()=>t.forEach(e=>e())}hk=[eD],fk=[eD],pk=[eD],dk=[rD()],ck=[rD()],uk=[rD()];var oD,iD=class{constructor(e,t=Object.is){this.defaultValue=e,this.equals=t,Vk(mk,5,this),Yk(this,xk),Yk(this,gk,Vk(mk,8,this)),Vk(mk,11,this),Yk(this,Sk,Vk(mk,12,this)),Vk(mk,15,this),Yk(this,Rk,Vk(mk,16,this)),Vk(mk,19,this),this.reset=this.reset.bind(this),this.reset()}get current(){return Kk(this,xk,Ik)}get initial(){return Kk(this,xk,vk)}get previous(){return Kk(this,xk,Ck)}set current(e){const t=BM(()=>Kk(this,xk,Ik));e&&t&&this.equals(t,e)||zM(()=>{Kk(this,xk,vk)||Xk(this,xk,e,yk),Xk(this,xk,t,Ek),Xk(this,xk,e,Mk)})}reset(e=this.defaultValue){zM(()=>{Xk(this,xk,void 0,Ek),Xk(this,xk,e,yk),Xk(this,xk,e,Mk)})}};function aD(e){return BM(()=>{const t={};for(const r in e)t[r]=e[r];return t})}mk=[,,,kk(null)],gk=new WeakMap,xk=new WeakSet,Sk=new WeakMap,Rk=new WeakMap,bk=Wk(mk,20,"#initial",hk,xk,gk),vk=bk.get,yk=bk.set,wk=Wk(mk,20,"#previous",fk,xk,Sk),Ck=wk.get,Ek=wk.set,Ak=Wk(mk,20,"#current",pk,xk,Rk),Ik=Ak.get,Mk=Ak.set,Wk(mk,2,"current",dk,iD),Wk(mk,2,"initial",ck,iD),Wk(mk,2,"previous",uk,iD),Hk(mk,iD);oD=new WeakMap;var sD,lD,uD,cD,dD,pD=Object.create,fD=Object.defineProperty,hD=Object.getOwnPropertyDescriptor,mD=Object.getOwnPropertySymbols,gD=Object.prototype.hasOwnProperty,bD=Object.prototype.propertyIsEnumerable,vD=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),yD=e=>{throw TypeError(e)},xD=Math.pow,SD=(e,t,r)=>t in e?fD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,wD=["class","method","getter","setter","accessor","field","value","get","set"],CD=e=>void 0!==e&&"function"!=typeof e?yD("Function expected"):e,ED=(e,t,r,n,o)=>({kind:wD[e],name:t,metadata:n,addInitializer:e=>r._?yD("Already initialized"):o.push(CD(e||null))}),RD=(e,t,r,n,o,i)=>{for(var a,s,l,u,c=7&t,d=wD[c+5],p=e[2]||(e[2]=[]),f=(o=o.prototype,hD(o,r)),h=n.length-1;h>=0;h--)(l=ED(c,r,s={},e[3],p)).static=false,l.private=false,u=l.access={has:e=>r in e},u.get=e=>e[r],a=(0,n[h])(f[d],l),s._=1,CD(a)&&(f[d]=a);return f&&fD(o,r,f),o},AD=(e,t,r)=>t.has(e)||yD("Cannot "+r),ID=class e{constructor(e,t){this.x=e,this.y=t}static delta(t,r){return new e(t.x-r.x,t.y-r.y)}static distance(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}static equals(e,t){return e.x===t.x&&e.y===t.y}static from({x:t,y:r}){return new e(t,r)}},MD=class e{constructor(e,t,r,n){this.left=e,this.top=t,this.width=r,this.height=n,this.scale={x:1,y:1}}get inverseScale(){return{x:1/this.scale.x,y:1/this.scale.y}}translate(t,r){const{top:n,left:o,width:i,height:a,scale:s}=this,l=new e(o+t,n+r,i,a);return l.scale=((e,t)=>{for(var r in t||(t={}))gD.call(t,r)&&SD(e,r,t[r]);if(mD)for(var r of mD(t))bD.call(t,r)&&SD(e,r,t[r]);return e})({},s),l}get boundingRectangle(){const{width:e,height:t,left:r,top:n,right:o,bottom:i}=this;return{width:e,height:t,left:r,top:n,right:o,bottom:i}}get center(){const{left:e,top:t,right:r,bottom:n}=this;return new ID((e+r)/2,(t+n)/2)}get area(){const{width:e,height:t}=this;return e*t}equals(t){if(!(t instanceof e))return!1;const{left:r,top:n,width:o,height:i}=this;return r===t.left&&n===t.top&&o===t.width&&i===t.height}containsPoint(e){const{top:t,left:r,bottom:n,right:o}=this;return t<=e.y&&e.y<=n&&r<=e.x&&e.x<=o}intersectionArea(t){return t instanceof e?function(e,t){const r=Math.max(t.top,e.top),n=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),a=o-n,s=i-r;if(n<o&&r<i){return a*s}return 0}(this,t):0}intersectionRatio(e){const{area:t}=this,r=this.intersectionArea(e);return r/(e.area+t-r)}get bottom(){const{top:e,height:t}=this;return e+t}get right(){const{left:e,width:t}=this;return e+t}get aspectRatio(){const{width:e,height:t}=this;return e/t}get corners(){return[{x:this.left,y:this.top},{x:this.right,y:this.top},{x:this.left,y:this.bottom},{x:this.right,y:this.bottom}]}static from({top:t,left:r,width:n,height:o}){return new e(r,t,n,o)}static delta(e,t,r={x:"center",y:"center"}){const n=(e,t)=>{const n=r[t],o="x"===t?e.left:e.top,i="x"===t?e.width:e.height;return"start"==n?o:"end"==n?o+i:o+i/2};return ID.delta({x:n(e,"x"),y:n(e,"y")},{x:n(t,"x"),y:n(t,"y")})}static intersectionRatio(t,r){return e.from(t).intersectionRatio(e.from(r))}};var kD,DD=class extends(uD=iD,lD=[tD],sD=[tD],uD){constructor(e){var t,r,n;super(ID.from(e),(e,t)=>ID.equals(e,t)),((e,t,r)=>{for(var n=0,o=e[t>>1],i=o&&o.length;n<i;n++)o[n].call(r)})(dD,5,this),t=this,n=0,(r=cD).has(t)?yD("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(t):r.set(t,n),this.velocity={x:0,y:0}}get delta(){return ID.delta(this.current,this.initial)}get direction(){const{current:e,previous:t}=this;if(!t)return null;const r={x:e.x-t.x,y:e.y-t.y};return r.x||r.y?Math.abs(r.x)>Math.abs(r.y)?r.x>0?"right":"left":r.y>0?"down":"up":null}get current(){return super.current}set current(e){const{current:t}=this,r=ID.from(e),n={x:r.x-t.x,y:r.y-t.y},o=Date.now(),i=o-(AD(a=this,s=cD,"read from private field"),s.get(a));var a,s;const l=e=>Math.round(e/i*100);zM(()=>{((e,t,r)=>{AD(e,t,"write to private field"),t.set(e,r)})(this,cD,o),this.velocity={x:l(n.x),y:l(n.y)},super.current=r})}reset(e=this.defaultValue){super.reset(ID.from(e)),this.velocity={x:0,y:0}}};function PD({x:e,y:t},r){const n=Math.abs(e),o=Math.abs(t);return"number"==typeof r?Math.sqrt(xD(n,2)+xD(o,2))>r:"x"in r&&"y"in r?n>r.x&&o>r.y:"x"in r?n>r.x:"y"in r&&o>r.y}dD=(e=>{var t;return[,,,pD(null!=(t=null==e?void 0:e[vD("metadata")])?t:null)]})(uD),cD=new WeakMap,RD(dD,2,"delta",lD,DD),RD(dD,2,"direction",sD,DD),kD=dD,SD(DD,vD("metadata"),kD[3]);var TD,qD,OD,LD,ND=(e=>(e.Horizontal="x",e.Vertical="y",e))(ND||{}),jD=Object.values(ND),_D=Object.create,zD=Object.defineProperty,FD=Object.defineProperties,$D=Object.getOwnPropertyDescriptor,BD=Object.getOwnPropertyDescriptors,HD=Object.getOwnPropertySymbols,VD=Object.prototype.hasOwnProperty,WD=Object.prototype.propertyIsEnumerable,UD=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),GD=e=>{throw TypeError(e)},KD=(e,t,r)=>t in e?zD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,YD=(e,t)=>{for(var r in t||(t={}))VD.call(t,r)&&KD(e,r,t[r]);if(HD)for(var r of HD(t))WD.call(t,r)&&KD(e,r,t[r]);return e},XD=(e,t)=>FD(e,BD(t)),JD=(e,t)=>zD(e,"name",{value:t,configurable:!0}),ZD=(e,t)=>{var r={};for(var n in e)VD.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&HD)for(var n of HD(e))t.indexOf(n)<0&&WD.call(e,n)&&(r[n]=e[n]);return r},QD=e=>{var t;return[,,,_D(null!=(t=null==e?void 0:e[UD("metadata")])?t:null)]},eP=["class","method","getter","setter","accessor","field","value","get","set"],tP=e=>void 0!==e&&"function"!=typeof e?GD("Function expected"):e,rP=(e,t,r,n,o)=>({kind:eP[e],name:t,metadata:n,addInitializer:e=>r._?GD("Already initialized"):o.push(tP(e||null))}),nP=(e,t)=>KD(t,UD("metadata"),e[3]),oP=(e,t,r,n)=>{for(var o=0,i=e[t>>1],a=i&&i.length;o<a;o++)1&t?i[o].call(r):n=i[o].call(r,n);return n},iP=(e,t,r,n,o,i)=>{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=eP[d+5],g=d>3&&(e[h-1]=[]),b=e[h]||(e[h]=[]),v=d&&(!f&&!p&&(o=o.prototype),d<5&&(d>3||!f)&&$D(d<4?o:{get[r](){return lP(this,i)},set[r](e){return cP(this,i,e)}},r));d?f&&d<4&&JD(i,(d>2?"set ":d>1?"get ":"")+r):JD(o,r);for(var y=n.length-1;y>=0;y--)u=rP(d,r,l={},e[3],b),d&&(u.static=p,u.private=f,c=u.access={has:f?e=>sP(o,e):e=>r in e},3^d&&(c.get=f?e=>(1^d?lP:dP)(e,o,4^d?i:v.get):e=>e[r]),d>2&&(c.set=f?(e,t)=>cP(e,o,t,4^d?i:v.set):(e,t)=>e[r]=t)),s=(0,n[y])(d?d<4?f?i:v[m]:d>4?void 0:{get:v.get,set:v.set}:o,u),l._=1,4^d||void 0===s?tP(s)&&(d>4?g.unshift(s):d?f?i=s:v[m]=s:o=s):"object"!=typeof s||null===s?GD("Object expected"):(tP(a=s.get)&&(v.get=a),tP(a=s.set)&&(v.set=a),tP(a=s.init)&&g.unshift(a));return d||nP(e,o),v&&zD(o,r,v),f?4^d?i:v:o},aP=(e,t,r)=>t.has(e)||GD("Cannot "+r),sP=(e,t)=>Object(t)!==t?GD('Cannot use the "in" operator on this value'):e.has(t),lP=(e,t,r)=>(aP(e,t,"read from private field"),r?r.call(e):t.get(e)),uP=(e,t,r)=>t.has(e)?GD("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),cP=(e,t,r,n)=>(aP(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),dP=(e,t,r)=>(aP(e,t,"access private method"),r);function pP(e,t){return{plugin:e,options:t}}function fP(e){return t=>pP(e,t)}function hP(e){return"function"==typeof e?{plugin:e,options:void 0}:e}TD=[eD];var mP=class{constructor(e,t){this.manager=e,this.options=t,uP(this,OD,oP(qD,8,this,!1)),oP(qD,11,this),uP(this,LD,new Set)}enable(){this.disabled=!1}disable(){this.disabled=!0}isDisabled(){return BM(()=>this.disabled)}configure(e){this.options=e}registerEffect(e){const t=lk(e.bind(this));return lP(this,LD).add(t),t}destroy(){lP(this,LD).forEach(e=>e())}static configure(e){return pP(this,e)}};qD=QD(null),OD=new WeakMap,LD=new WeakMap,iP(qD,4,"disabled",TD,mP,OD),nP(qD,mP);var gP,bP=class extends mP{},vP=class{constructor(e){this.manager=e,this.instances=new Map,uP(this,gP,[])}get values(){return Array.from(this.instances.values())}set values(e){const t=e.map(hP).reduce((e,t)=>{const r=e.find(({plugin:e})=>e===t.plugin);return r?(r.options=t.options,e):[...e,t]},[]),r=t.map(({plugin:e})=>e);for(const e of lP(this,gP))if(!r.includes(e)){if(e.prototype instanceof bP)continue;this.unregister(e)}for(const{plugin:e,options:r}of t)this.register(e,r);cP(this,gP,r)}get(e){return this.instances.get(e)}register(e,t){const r=this.instances.get(e);if(r)return r.options!==t&&(r.options=t),r;const n=new e(this.manager,t);return this.instances.set(e,n),n}unregister(e){const t=this.instances.get(e);t&&(t.destroy(),this.instances.delete(e))}destroy(){for(const e of this.instances.values())e.destroy();this.instances.clear()}};function yP(e,t){return e.priority===t.priority?e.type===t.type?t.value-e.value:t.type-e.type:t.priority-e.priority}gP=new WeakMap;var xP,SP,wP,CP,EP,RP,AP,IP,MP,kP,DP,PP,TP=[],qP=class extends mP{constructor(e){super(e),uP(this,xP),uP(this,SP),this.computeCollisions=this.computeCollisions.bind(this),cP(this,SP,ZM(TP)),this.destroy=nD(()=>{const e=this.computeCollisions(),t=BM(()=>this.manager.dragOperation.position.current);if(e!==TP){const e=lP(this,xP);if(cP(this,xP,t),e&&t.x==e.x&&t.y==e.y)return}else cP(this,xP,void 0);lP(this,SP).value=e},()=>{const{dragOperation:e}=this.manager;e.status.initialized&&this.forceUpdate()})}forceUpdate(e=!0){BM(()=>{e?lP(this,SP).value=this.computeCollisions():cP(this,xP,void 0)})}computeCollisions(e,t){const{registry:r,dragOperation:n}=this.manager,{source:o,shape:i,status:a}=n;if(!a.initialized||!i)return TP;const s=[],l=[];for(const i of null!=e?e:r.droppables){if(i.disabled)continue;if(o&&!i.accepts(o))continue;const e=null!=t?t:i.collisionDetector;if(!e)continue;l.push(i),i.shape;const r=BM(()=>e({droppable:i,dragOperation:n}));r&&(null!=i.collisionPriority&&(r.priority=i.collisionPriority),s.push(r))}return 0===l.length?TP:(s.sort(yP),s)}get collisions(){return lP(this,SP).value}};xP=new WeakMap,SP=new WeakMap,EP=[eD],CP=[eD],wP=[eD];var OP=class e{constructor(e,t){uP(this,MP,oP(IP,8,this)),oP(IP,11,this),uP(this,kP),uP(this,DP,oP(IP,12,this)),oP(IP,15,this),uP(this,PP,oP(IP,16,this)),oP(IP,19,this);const{effects:r,id:n,data:o={},disabled:i=!1,register:a=!0}=e;let s=n;cP(this,kP,ZM(n)),this.manager=t,this.data=o,this.disabled=i,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==r?void 0:r())?e:[]]},this.register=this.register.bind(this),this.unregister=this.unregister.bind(this),this.destroy=this.destroy.bind(this),t&&a&&queueMicrotask(this.register)}get id(){var t,r;const n=lP(this,kP).value;return null!=(r=null==(t=e.pendingIdChanges)?void 0:t.get(this))?r:n}set id(t){var r,n;t!==(null!=(n=null==(r=e.pendingIdChanges)?void 0:r.get(this))?n:lP(this,kP).peek())&&(e.pendingIdChanges||(e.pendingIdChanges=new Map,queueMicrotask(()=>{var t;return dP(t=e,RP,AP).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)}};IP=QD(null),RP=new WeakSet,AP=function(){const e=OP.pendingIdChanges;OP.pendingIdChanges=null,e&&zM(()=>{for(const[t,r]of e)lP(t,kP).value=r})},MP=new WeakMap,kP=new WeakMap,DP=new WeakMap,PP=new WeakMap,iP(IP,4,"manager",EP,OP,MP),iP(IP,4,"data",CP,OP,DP),iP(IP,4,"disabled",wP,OP,PP),uP(OP,RP),nP(IP,OP),OP.pendingIdChanges=null;var LP,NP,jP,_P,zP,FP,$P,BP,HP,VP,WP,UP,GP,KP,YP,XP,JP,ZP,QP,eT,tT,rT,nT,oT,iT=OP,aT=class{constructor(){this.map=ZM(new Map),this.cleanupFunctions=new WeakMap,this.register=(e,t)=>{const r=this.map.peek(),n=r.get(e),o=()=>this.unregister(e,t);if(n===t)return o;if(n&&n.id===e){const e=this.cleanupFunctions.get(n);null==e||e(),this.cleanupFunctions.delete(n)}const i=new Map(r);for(const[n,o]of r)if(o===t&&n!==e){i.delete(n);break}i.set(e,t),this.map.value=i;const a=nD(...t.effects());return this.cleanupFunctions.set(t,a),o},this.unregister=(e,t)=>{const r=this.map.peek();if(r.get(e)!==t)return;const n=this.cleanupFunctions.get(t);null==n||n(),this.cleanupFunctions.delete(t);const o=new Map(r);o.delete(e),this.map.value=o}}[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}},sT=class extends($P=iT,FP=[eD],zP=[eD],_P=[eD],jP=[tD],NP=[tD],LP=[tD],$P){constructor(e,t){var r=e,{modifiers:n,type:o,sensors:i,plugins:a,effects:s}=r,l=ZD(r,["modifiers","type","sensors","plugins","effects"]);super(XD(YD({},l),{effects:()=>{var e;return[...null!=(e=null==s?void 0:s())?e:[],()=>{const{manager:e,plugins:t}=this;if(e&&t)for(const r of t){const{plugin:t}=hP(r);e.registry.plugins.register(t)}}]}}),t),oP(BP,5,this),uP(this,HP,oP(BP,8,this)),oP(BP,11,this),uP(this,VP,oP(BP,12,this)),oP(BP,15,this),uP(this,WP,oP(BP,16,this,this.isDragSource?"dragging":"idle")),oP(BP,19,this),this.type=o,this.sensors=i,this.modifiers=n,this.alignment=l.alignment,this.plugins=a}pluginConfig(e){if(this.plugins)for(const t of this.plugins){const r=hP(t);if(r.plugin===e)return r.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}};BP=QD($P),HP=new WeakMap,VP=new WeakMap,WP=new WeakMap,iP(BP,4,"type",FP,sT,HP),iP(BP,4,"modifiers",zP,sT,VP),iP(BP,4,"status",_P,sT,WP),iP(BP,2,"isDropping",jP,sT),iP(BP,2,"isDragging",NP,sT),iP(BP,2,"isDragSource",LP,sT),nP(BP,sT);var lT=class extends(ZP=iT,JP=[eD],XP=[eD],YP=[eD],KP=[eD],GP=[eD],UP=[tD],ZP){constructor(e,t){var r=e,{accept:n,collisionDetector:o,collisionPriority:i,type:a}=r;super(ZD(r,["accept","collisionDetector","collisionPriority","type"]),t),oP(QP,5,this),uP(this,eT,oP(QP,8,this)),oP(QP,11,this),uP(this,tT,oP(QP,12,this)),oP(QP,15,this),uP(this,rT,oP(QP,16,this)),oP(QP,19,this),uP(this,nT,oP(QP,20,this)),oP(QP,23,this),uP(this,oT,oP(QP,24,this)),oP(QP,27,this),this.accept=n,this.collisionDetector=o,this.collisionPriority=i,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}};QP=QD(ZP),eT=new WeakMap,tT=new WeakMap,rT=new WeakMap,nT=new WeakMap,oT=new WeakMap,iP(QP,4,"accept",JP,lT,eT),iP(QP,4,"type",XP,lT,tT),iP(QP,4,"collisionDetector",YP,lT,rT),iP(QP,4,"collisionPriority",KP,lT,nT),iP(QP,4,"shape",GP,lT,oT),iP(QP,2,"isDropTarget",UP,lT),nP(QP,lT);var uT=class{constructor(){this.registry=new Map}addEventListener(e,t){const{registry:r}=this,n=new Set(r.get(e));return n.add(t),r.set(e,n),()=>this.removeEventListener(e,t)}removeEventListener(e,t){const{registry:r}=this,n=new Set(r.get(e));n.delete(t),r.set(e,n)}dispatch(e,...t){const{registry:r}=this,n=r.get(e);if(n)for(const e of n)e(...t)}},cT=class extends uT{constructor(e){super(),this.manager=e}dispatch(e,t){const r=[t,this.manager];super.dispatch(e,...r)}};function dT(e,t=!0){let r=!1;return XD(YD({},e),{cancelable:t,get defaultPrevented(){return r},preventDefault(){t&&(r=!0)}})}var pT,fT,hT,mT,gT,bT,vT,yT,xT,ST,wT=class extends bP{constructor(e){super(e);let t=[];this.destroy=nD(()=>{const{dragOperation:r,collisionObserver:n}=e;r.status.initializing&&(t=[],n.enable())},()=>{const{collisionObserver:r,monitor:n}=e,{collisions:o}=r;if(r.isDisabled())return;if(iT.pendingIdChanges)return;const i=dT({collisions:o});if(n.dispatch("collision",i),i.defaultPrevented)return;if(((e,t)=>e.map(({id:e})=>e).join("")===t.map(({id:e})=>e).join(""))(o,t))return;t=o;const[a]=o;BM(()=>{var t;(null==a?void 0:a.id)!==(null==(t=e.dragOperation.target)?void 0:t.id)&&(r.disable(),e.actions.setDropTarget(null==a?void 0:a.id).then(()=>{r.enable()}))})})}},CT=(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))(CT||{}),ET=(e=>(e[e.Collision=0]="Collision",e[e.ShapeIntersection=1]="ShapeIntersection",e[e.PointerIntersection=2]="PointerIntersection",e))(ET||{});yT=[eD],vT=[tD],bT=[tD],gT=[tD],mT=[tD],hT=[tD],fT=[tD],pT=[tD];var RT=class{constructor(){oP(xT,5,this),uP(this,ST,oP(xT,8,this,"idle")),oP(xT,11,this)}get current(){return this.value}get idle(){return"idle"===this.value}get initializationPending(){return"initialization-pending"===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}};xT=QD(null),ST=new WeakMap,iP(xT,4,"value",yT,RT,ST),iP(xT,2,"current",vT,RT),iP(xT,2,"idle",bT,RT),iP(xT,2,"initializationPending",gT,RT),iP(xT,2,"initializing",mT,RT),iP(xT,2,"initialized",hT,RT),iP(xT,2,"dragging",fT,RT),iP(xT,2,"dropped",pT,RT),nP(xT,RT);var AT,IT=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 BM(()=>{const{dragOperation:t}=this.manager,r=null!=e?e:null;if(t.targetIdentifier===r)return Promise.resolve(!1);t.targetIdentifier=r;const n=dT({operation:t.snapshot()});return t.status.dragging&&this.manager.monitor.dispatch("dragover",n),this.manager.renderer.rendering.then(()=>n.defaultPrevented)})}start(e){return BM(()=>{const{dragOperation:t}=this.manager;null!=e.source&&this.setDragSource(e.source);if(!t.source)throw new Error("Cannot start a drag operation without a drag source");if(!t.status.idle)throw new Error("Cannot start a drag operation while another is active");const r=new AbortController,{event:n,coordinates:o}=e;zM(()=>{t.status.set("initialization-pending"),t.shape=null,t.canceled=!1,t.activatorEvent=null!=n?n:null,t.position.reset(o)});const i=dT({operation:t.snapshot()});return this.manager.monitor.dispatch("beforedragstart",i),i.defaultPrevented?(t.reset(),r.abort(),r):(t.status.set("initializing"),t.controller=r,this.manager.renderer.rendering.then(()=>{if(r.signal.aborted)return;const{status:e}=t;"initializing"===e.current&&zM(()=>{t.status.set("dragging"),this.manager.monitor.dispatch("dragstart",{nativeEvent:n,operation:t.snapshot(),cancelable:!1})})}),r)})}move(e){return BM(()=>{var t,r;const{dragOperation:n}=this.manager,{status:o,controller:i}=n;if(!o.dragging||!i||i.signal.aborted)return;const a=dT({nativeEvent:e.event,operation:n.snapshot(),by:e.by,to:e.to},null==(t=e.cancelable)||t);(null==(r=e.propagate)||r)&&this.manager.monitor.dispatch("dragmove",a),queueMicrotask(()=>{var t,r,o,i,s;if(a.defaultPrevented)return;const l=null!=(s=e.to)?s:{x:n.position.current.x+(null!=(r=null==(t=e.by)?void 0:t.x)?r:0),y:n.position.current.y+(null!=(i=null==(o=e.by)?void 0:o.y)?i:0)};n.position.current=l})})}stop(e={}){return BM(()=>{var t,r;const{dragOperation:n}=this.manager,{controller:o}=n;if(!o||o.signal.aborted)return;let i;o.abort();const a=()=>{this.manager.renderer.rendering.then(()=>{n.status.set("dropped");const e=BM(()=>{var e;return"dropping"===(null==(e=n.source)?void 0:e.status)}),t=()=>{n.controller===o&&(n.controller=void 0),n.reset()};if(e){const{source:e}=n,r=lk(()=>{"idle"===(null==e?void 0:e.status)&&(r(),t())})}else this.manager.renderer.rendering.then(t)})};n.canceled=null!=(t=e.canceled)&&t,this.manager.monitor.dispatch("dragend",{nativeEvent:e.event,operation:n.snapshot(),canceled:null!=(r=e.canceled)&&r,suspend:()=>{const e={resume:()=>{},abort:()=>{}};return i=new Promise((t,r)=>{e.resume=t,e.abort=r}),e}}),i?i.then(a).catch(()=>n.reset()):a()})}},MT=class extends mP{constructor(e,t){super(e,t),this.manager=e,this.options=t}},kT=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)}},DT=class{constructor(e){this.options=e,uP(this,AT)}set controller(e){cP(this,AT,e),e.signal.addEventListener("abort",()=>this.abort())}activate(e){var t;null==(t=lP(this,AT))||t.activate(e)}};AT=new WeakMap;var PT,TT,qT,OT,LT,NT,jT,_T,zT,FT,$T,BT,HT,VT,WT,UT,GT,KT,YT,XT=class extends mP{constructor(e,t){super(e,t),this.manager=e,this.options=t}apply(e){return e.transform}},JT=class{constructor(e){this.draggables=new aT,this.droppables=new aT,this.plugins=new vP(e),this.sensors=new vP(e),this.modifiers=new vP(e)}register(e,t){if(e instanceof sT)return this.draggables.register(e.id,e);if(e instanceof lT)return this.droppables.register(e.id,e);if(e.prototype instanceof XT)return this.modifiers.register(e,t);if(e.prototype instanceof MT)return this.sensors.register(e,t);if(e.prototype instanceof mP)return this.plugins.register(e,t);throw new Error("Invalid instance type")}unregister(e){if(e instanceof iT)return e instanceof sT?this.draggables.unregister(e.id,e):e instanceof lT?this.droppables.unregister(e.id,e):()=>{};if(e.prototype instanceof XT)return this.modifiers.unregister(e);if(e.prototype instanceof MT)return this.sensors.unregister(e);if(e.prototype instanceof mP)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()}};zT=[tD],_T=[eD],jT=[eD],NT=[eD],LT=[eD],OT=[eD],qT=[tD],TT=[tD],PT=[tD];var ZT=class{constructor(e){oP(HT,5,this),uP(this,FT),uP(this,$T),uP(this,BT,new iD(void 0,(e,t)=>e&&t?e.equals(t):e===t)),this.status=new RT,uP(this,VT,oP(HT,8,this,!1)),oP(HT,11,this),uP(this,WT,oP(HT,12,this,null)),oP(HT,15,this),uP(this,UT,oP(HT,16,this,null)),oP(HT,19,this),uP(this,GT,oP(HT,20,this,null)),oP(HT,23,this),uP(this,KT,oP(HT,24,this,[])),oP(HT,27,this),this.position=new DD({x:0,y:0}),uP(this,YT,{x:0,y:0}),cP(this,FT,e)}get shape(){const{current:e,initial:t,previous:r}=lP(this,BT);return e&&t?{current:e,initial:t,previous:r}:null}set shape(e){e?lP(this,BT).current=e:lP(this,BT).reset()}get source(){var e;const t=this.sourceIdentifier;if(null==t)return null;const r=lP(this,FT).registry.draggables.get(t);return r&&cP(this,$T,r),null!=(e=null!=r?r:lP(this,$T))?e:null}get target(){var e;const t=this.targetIdentifier;return null!=t&&null!=(e=lP(this,FT).registry.droppables.get(t))?e:null}get transform(){const{x:e,y:t}=this.position.delta;let r={x:e,y:t};for(const e of this.modifiers)r=e.apply(XD(YD({},this.snapshot()),{transform:r}));return cP(this,YT,r),r}snapshot(){return BM(()=>({source:this.source,target:this.target,activatorEvent:this.activatorEvent,transform:lP(this,YT),shape:this.shape?aD(this.shape):null,position:aD(this.position),status:aD(this.status),canceled:this.canceled}))}reset(){zM(()=>{this.status.set("idle"),this.sourceIdentifier=null,this.targetIdentifier=null,lP(this,BT).reset(),this.position.reset({x:0,y:0}),cP(this,YT,{x:0,y:0}),this.modifiers=[]})}};HT=QD(null),FT=new WeakMap,$T=new WeakMap,BT=new WeakMap,VT=new WeakMap,WT=new WeakMap,UT=new WeakMap,GT=new WeakMap,KT=new WeakMap,YT=new WeakMap,iP(HT,2,"shape",zT,ZT),iP(HT,4,"canceled",_T,ZT,VT),iP(HT,4,"activatorEvent",jT,ZT,WT),iP(HT,4,"sourceIdentifier",NT,ZT,UT),iP(HT,4,"targetIdentifier",LT,ZT,GT),iP(HT,4,"modifiers",OT,ZT,KT),iP(HT,2,"source",qT,ZT),iP(HT,2,"target",TT,ZT),iP(HT,2,"transform",PT,ZT),nP(HT,ZT);var QT={get rendering(){return Promise.resolve()}};function eq(e,t){return"function"==typeof e?e(t):null!=e?e:t}var tq=class{constructor(e){var t;this.destroy=()=>{this.dragOperation.status.idle||this.actions.stop({canceled:!0}),this.dragOperation.modifiers.forEach(e=>e.destroy()),this.registry.destroy(),this.collisionObserver.destroy()};const r=null!=e?e:{},n=eq(r.plugins,[]),o=eq(r.sensors,[]),i=eq(r.modifiers,[]),a=null!=(t=r.renderer)?t:QT,s=new cT(this),l=new JT(this);this.registry=l,this.monitor=s,this.renderer=a,this.actions=new IT(this),this.dragOperation=new ZT(this),this.collisionObserver=new qP(this),this.plugins=[wT,...n],this.modifiers=i,this.sensors=o;const{destroy:u}=this,c=nD(()=>{var e,t,r;const n=BM(()=>this.dragOperation.modifiers),o=this.modifiers;for(const e of n)o.includes(e)||e.destroy();this.dragOperation.modifiers=null!=(r=null==(t=null==(e=this.dragOperation.source)?void 0:e.modifiers)?void 0:t.map(e=>{const{plugin:t,options:r}=hP(e);return new t(this,r)}))?r:o});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}},rq=e=>{throw TypeError(e)},nq=(e,t,r)=>t.has(e)||rq("Cannot "+r),oq=(e,t,r)=>(nq(e,t,"read from private field"),t.get(e)),iq=(e,t,r)=>t.has(e)?rq("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),aq=(e,t,r,n)=>(nq(e,t,"write to private field"),t.set(e,r),r),sq=(e,t,r)=>(nq(e,t,"access private method"),r);function lq(e){return!!e&&(e instanceof KeyframeEffect||"getKeyframes"in e&&"function"==typeof e.getKeyframes)}function uq(e,t){const r=e.getAnimations();let n=null;for(const e of r){if("running"!==e.playState)continue;const{effect:r}=e,o=(lq(r)?r.getKeyframes():[]).filter(t);o.length>0&&(n=[o[o.length-1],e])}return n}function cq(e){const{width:t,height:r,top:n,left:o,bottom:i,right:a}=e.getBoundingClientRect();return{width:t,height:r,top:n,left:o,bottom:i,right:a}}function dq(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function pq(e){return"nodeType"in e}function fq(e){var t,r,n;return e?dq(e)?e:pq(e)?"defaultView"in e?null!=(t=e.defaultView)?t:window:null!=(n=null==(r=e.ownerDocument)?void 0:r.defaultView)?n:window:window:window}function hq(e){const{Document:t}=fq(e);return e instanceof t||"nodeType"in e&&e.nodeType===Node.DOCUMENT_NODE}function mq(e){return!(!e||dq(e))&&(e instanceof fq(e).HTMLElement||"namespaceURI"in e&&"string"==typeof e.namespaceURI&&e.namespaceURI.endsWith("html"))}function gq(e){return e instanceof fq(e).SVGElement||"namespaceURI"in e&&"string"==typeof e.namespaceURI&&e.namespaceURI.endsWith("svg")}function bq(e){return e?dq(e)?e.document:pq(e)?hq(e)?e:mq(e)||gq(e)?e.ownerDocument:document:document:document}function vq(e,t){if(function(e){return"DETAILS"===e.tagName}(e)&&!1===e.open)return!1;const{overflow:r,overflowX:n,overflowY:o}=getComputedStyle(e);return"visible"===r&&"visible"===n&&"visible"===o}function yq(e,t=e.getBoundingClientRect(),r=0){var n,o,i,a,s;let l=t;const{ownerDocument:u}=e,c=null!=(n=u.defaultView)?n:window;let d=e.parentElement;for(;d&&d!==u.documentElement;){if(!vq(d)){const e=d.getBoundingClientRect(),t=r*(e.bottom-e.top),n=r*(e.right-e.left),o=r*(e.bottom-e.top),i=r*(e.right-e.left);l={top:Math.max(l.top,e.top-t),right:Math.min(l.right,e.right+n),bottom:Math.min(l.bottom,e.bottom+o),left:Math.max(l.left,e.left-i),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!=(o=null==p?void 0:p.offsetTop)?o:0,h=null!=(i=null==p?void 0:p.offsetLeft)?i: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,b=r*g,v=r*m;return l={top:Math.max(l.top,f-b),right:Math.min(l.right,h+m+v),bottom:Math.min(l.bottom,f+g+b),left:Math.max(l.left,h-v),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 xq(e){return{x:e.clientX,y:e.clientY}}var Sq="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function wq(e=document,t=new Set){if(t.has(e))return[];t.add(e);const r=[e];for(const n of Array.from(e.querySelectorAll("iframe, frame")))try{const e=n.contentDocument;e&&!t.has(e)&&r.push(...wq(e,t))}catch(e){}try{const n=e.defaultView;if(n&&n!==window.top){const o=n.parent;o&&o.document&&o.document!==e&&r.push(...wq(o.document,t))}}catch(e){}return r}function Cq(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function Eq(){var e,t;const r=Cq()?window.visualViewport:null;return{x:null!=(e=null==r?void 0:r.offsetLeft)?e:0,y:null!=(t=null==r?void 0:r.offsetTop)?t:0}}function Rq(e){return!(!e||!pq(e))&&e instanceof fq(e).ShadowRoot}function Aq(e){if(e&&pq(e)){let t=e.getRootNode();if(Rq(t))return t;if(t instanceof Document)return t}return bq(e)}function Iq(e){return e.matchMedia("(prefers-reduced-motion: reduce)").matches}function Mq(e){return"value"in e}function kq(e){return"CANVAS"===e.tagName}function Dq(e,{x:t,y:r}){const n=e.elementFromPoint(t,r);if(function(e){return"IFRAME"===(null==e?void 0:e.tagName)}(n)){const{contentDocument:e}=n;if(e){const{left:o,top:i}=n.getBoundingClientRect();return Dq(e,{x:t-o,y:r-i})}}return n}var Pq=new WeakMap;var Tq=class{constructor(){this.entries=new Set,this.clear=()=>{for(const e of this.entries){const[t,{type:r,listener:n,options:o}]=e;t.removeEventListener(r,n,o)}this.entries.clear()}}bind(e,t){const r=Array.isArray(e)?e:[e],n=Array.isArray(t)?t:[t],o=[];for(const e of r)for(const t of n){const{type:r,listener:n,options:i}=t,a=[e,t];e.addEventListener(r,n,i),this.entries.add(a),o.push(a)}const i=this.entries;return function(){for(const e of o){const[t,{type:r,listener:n,options:o}]=e;t.removeEventListener(r,n,o),i.delete(e)}}}};function qq(e){const t=null==e?void 0:e.ownerDocument.defaultView;if(t&&t.self!==t.parent)return t.frameElement}function Oq(e,t){const r=()=>performance.now();let n,o;return function(...i){const a=this;o?(null==n||n(),n=function(e,t){const r=setTimeout(e,t);return()=>clearTimeout(r)}(()=>{e.apply(a,i),o=r()},t-(r()-o))):(e.apply(a,i),o=r())}}var Lq,Nq="undefined"!=typeof ResizeObserver?ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},jq=class extends Nq{constructor(e){super(t=>{oq(this,Lq)?e(t,this):aq(this,Lq,!0)}),iq(this,Lq,!1)}};Lq=new WeakMap;var _q,zq,Fq,$q,Bq,Hq,Vq,Wq,Uq,Gq,Kq,Yq=Array.from({length:100},(e,t)=>t/100),Xq=class{constructor(e,t,r={debug:!1,skipInitial:!1}){this.element=e,this.callback=t,iq(this,Uq),this.disconnect=()=>{var e,t,r;aq(this,Vq,!0),null==(e=oq(this,Fq))||e.disconnect(),null==(t=oq(this,$q))||t.disconnect(),oq(this,Bq).disconnect(),null==(r=oq(this,Hq))||r.remove()},iq(this,_q,!0),iq(this,zq),iq(this,Fq),iq(this,$q),iq(this,Bq),iq(this,Hq),iq(this,Vq,!1),iq(this,Wq,Oq(()=>{var e,t,r;const{element:n}=this;if(null==(e=oq(this,$q))||e.disconnect(),oq(this,Vq)||!oq(this,_q)||!n.isConnected)return;const o=null!=(t=n.ownerDocument)?t:document,{innerHeight:i,innerWidth:a}=null!=(r=o.defaultView)?r:window,s=n.getBoundingClientRect(),l=yq(n,s),{top:u,left:c,bottom:d,right:p}=l,f=-Math.floor(u),h=-Math.floor(c),m=`${f}px ${-Math.floor(a-p)}px ${-Math.floor(i-d)}px ${h}px`;this.boundingClientRect=s,aq(this,$q,new IntersectionObserver(e=>{const[t]=e,{intersectionRect:r}=t;1!==(1!==t.intersectionRatio?t.intersectionRatio:MD.intersectionRatio(r,yq(n)))&&oq(this,Wq).call(this)},{threshold:Yq,rootMargin:m,root:o})),oq(this,$q).observe(n),sq(this,Uq,Gq).call(this)},75)),this.boundingClientRect=e.getBoundingClientRect(),aq(this,_q,function(e,t=e.getBoundingClientRect()){const{width:r,height:n}=yq(e,t);return r>0&&n>0}(e,this.boundingClientRect));let n=!0;this.callback=e=>{n&&(n=!1,r.skipInitial)||t(e)};const o=e.ownerDocument;(null==r?void 0:r.debug)&&(aq(this,Hq,document.createElement("div")),oq(this,Hq).style.background="rgba(0,0,0,0.15)",oq(this,Hq).style.position="fixed",oq(this,Hq).style.pointerEvents="none",o.body.appendChild(oq(this,Hq))),aq(this,Bq,new IntersectionObserver(t=>{var r,n;const o=t[t.length-1],{boundingClientRect:i,isIntersecting:a}=o,{width:s,height:l}=i,u=oq(this,_q);aq(this,_q,a),(s||l)&&(u&&!a?(null==(r=oq(this,$q))||r.disconnect(),this.callback(null),null==(n=oq(this,Fq))||n.disconnect(),aq(this,Fq,void 0),oq(this,Hq)&&(oq(this,Hq).style.visibility="hidden")):oq(this,Wq).call(this),a&&!oq(this,Fq)&&(aq(this,Fq,new jq(oq(this,Wq))),oq(this,Fq).observe(e)))},{threshold:Yq,root:o})),oq(this,_q)&&!r.skipInitial&&this.callback(this.boundingClientRect),oq(this,Bq).observe(e)}};_q=new WeakMap,zq=new WeakMap,Fq=new WeakMap,$q=new WeakMap,Bq=new WeakMap,Hq=new WeakMap,Vq=new WeakMap,Wq=new WeakMap,Uq=new WeakSet,Gq=function(){oq(this,Vq)||(sq(this,Uq,Kq).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,oq(this,zq))||(this.callback(this.boundingClientRect),aq(this,zq,this.boundingClientRect)))},Kq=function(){if(oq(this,Hq)){const{top:e,left:t,width:r,height:n}=yq(this.element);oq(this,Hq).style.overflow="hidden",oq(this,Hq).style.visibility="visible",oq(this,Hq).style.top=`${Math.floor(e)}px`,oq(this,Hq).style.left=`${Math.floor(t)}px`,oq(this,Hq).style.width=`${Math.floor(r)}px`,oq(this,Hq).style.height=`${Math.floor(n)}px`}};var Jq,Zq,Qq,eO,tO=new WeakMap,rO=new WeakMap;function nO(e,t){let r=tO.get(e);if(!r){const t=new Xq(e,t=>{const r=tO.get(e);r&&r.callbacks.forEach(e=>e(t))},{skipInitial:!0});r={disconnect:t.disconnect,callbacks:new Set}}return r.callbacks.add(t),tO.set(e,r),()=>{r.callbacks.delete(t),0===r.callbacks.size&&(tO.delete(e),r.disconnect())}}var oO=class{constructor(e,t,r){this.callback=t,iq(this,Jq),iq(this,Zq,!1),iq(this,Qq),iq(this,eO,Oq(e=>{if(!oq(this,Zq)&&e.target&&"contains"in e.target&&"function"==typeof e.target.contains)for(const t of oq(this,Qq))if(e.target.contains(t)){this.callback(oq(this,Jq).boundingClientRect);break}},75));const n=function(e){const t=new Set;let r=qq(e);for(;r;)t.add(r),r=qq(r);return t}(e),o=function(e,t){const r=new Set;for(const n of e){const e=nO(n,t);r.add(e)}return()=>r.forEach(e=>e())}(n,t),i=function(e,t){var r;const n=e.ownerDocument;if(!rO.has(n)){const e=new AbortController,t=new Set;document.addEventListener("scroll",e=>t.forEach(t=>t(e)),{capture:!0,passive:!0,signal:e.signal}),rO.set(n,{disconnect:()=>e.abort(),listeners:t})}const{listeners:o,disconnect:i}=null!=(r=rO.get(n))?r:{};return o&&i?(o.add(t),()=>{o.delete(t),0===o.size&&(i(),rO.delete(n))}):()=>{}}(e,oq(this,eO));aq(this,Qq,n),aq(this,Jq,new Xq(e,t,r)),this.disconnect=()=>{oq(this,Zq)||(aq(this,Zq,!0),o(),i(),oq(this,Jq).disconnect())}}};function iO(e){return"showPopover"in e&&"hidePopover"in e&&"function"==typeof e.showPopover&&"function"==typeof e.hidePopover}function aO(e){try{iO(e)&&e.isConnected&&e.hasAttribute("popover")&&!e.matches(":popover-open")&&e.showPopover()}catch(e){}}function sO(e){return!(!Sq||!e)&&e===bq(e).scrollingElement}function lO(e){var t,r;const n=fq(e),o=sO(e)?function(e){var t,r,n,o;const{documentElement:i}=bq(e),a=fq(e).visualViewport,s=null!=(t=null==a?void 0:a.width)?t:i.clientWidth,l=null!=(r=null==a?void 0:a.height)?r:i.clientHeight,u=null!=(n=null==a?void 0:a.offsetTop)?n:0,c=null!=(o=null==a?void 0:a.offsetLeft)?o:0;return{top:u,left:c,right:c+s,bottom:u+l,width:s,height:l}}(e):cq(e),i=n.visualViewport,a=sO(e)?{height:null!=(t=null==i?void 0:i.height)?t:n.innerHeight,width:null!=(r=null==i?void 0:i.width)?r:n.innerWidth}:{height:e.clientHeight,width:e.clientWidth},s={current:{x:e.scrollLeft,y:e.scrollTop},max:{x:e.scrollWidth-a.width,y:e.scrollHeight-a.height}};return{rect:o,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 uO(e,t,r=lO(e)){const{isTop:n,isBottom:o,isLeft:i,isRight:a,position:s}=r,{x:l,y:u}=null!=t?t:{x:0,y:0},c=!n&&s.current.y+u>0,d=!o&&s.current.y+u<s.max.y,p=!i&&s.current.x+l>0,f=!a&&s.current.x+l<s.max.x;return{top:c,bottom:d,left:p,right:f,x:p||f,y:c||d}}Jq=new WeakMap,Zq=new WeakMap,Qq=new WeakMap,eO=new WeakMap;var cO=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))}},dO=new cO(e=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(e):e()}),pO=new cO(e=>setTimeout(e,50)),fO=new Map,hO=fO.clear.bind(fO);function mO(e,t=!1){if(!t)return gO(e);let r=fO.get(e);return r||(r=gO(e),fO.set(e,r),pO.schedule(hO),r)}function gO(e){return fq(e).getComputedStyle(e)}var bO={excludeElement:!0,escapeShadowDOM:!0};function vO(e,t=bO){const{limit:r,excludeElement:n,escapeShadowDOM:o}=t,i=new Set;return e?function t(a){if(null!=r&&i.size>=r)return i;if(!a)return i;if(hq(a)&&null!=a.scrollingElement&&!i.has(a.scrollingElement))return i.add(a.scrollingElement),i;if(o&&Rq(a))return t(a.host);if(!mq(a))return gq(a)?t(a.parentElement):i;if(i.has(a))return i;const s=mO(a,!0);if(n&&a===e||function(e,t=mO(e,!0)){const r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const n=t[e];return"string"==typeof n&&r.test(n)})}(a,s)&&i.add(a),function(e,t=mO(e,!0)){return"fixed"===t.position||"sticky"===t.position}(a,s)){const{scrollingElement:e}=a.ownerDocument;return e&&i.add(e),i}return t(a.parentNode)}(e):i}function yO(e,t=window.frameElement){const r={x:0,y:0,scaleX:1,scaleY:1};if(!e)return r;let n=qq(e);for(;n;){if(n===t)return r;const e=cq(n),{x:o,y:i}=xO(n,e);r.x=r.x+e.left,r.y=r.y+e.top,r.scaleX=r.scaleX*o,r.scaleY=r.scaleY*i,n=qq(n)}return r}function xO(e,t=cq(e)){const r=Math.round(t.width),n=Math.round(t.height);if(mq(e))return{x:r/e.offsetWidth,y:n/e.offsetHeight};const o=mO(e,!0);return{x:(parseFloat(o.width)||r)/r,y:(parseFloat(o.height)||n)/n}}function SO(e){if(!e||"none"===e)return null;const[t,r,n="0"]=e.split(" "),o={x:parseFloat(t),y:parseFloat(r),z:parseInt(n,10)};return isNaN(o.x)&&isNaN(o.y)?null:{x:isNaN(o.x)?0:o.x,y:isNaN(o.y)?0:o.y,z:isNaN(o.z)?0:o.z}}function wO(e){var t,r,n,o,i,a,s,l,u;const{scale:c,transform:d,translate:p}=e,f=function(e){if(!e||"none"===e)return null;const t=e.split(" "),r=parseFloat(t[0]),n=parseFloat(t[1]);return isNaN(r)&&isNaN(n)?null:{x:isNaN(r)?n:r,y:isNaN(n)?r:n}}(c),h=SO(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,b=null!=(r=null==f?void 0:f.y)?r:1,v=null!=(n=null==h?void 0:h.x)?n:0,y=null!=(o=null==h?void 0:h.y)?o:0,x=null!=(i=null==m?void 0:m.x)?i: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:v+x,y:y+S,z:null!=(u=null==h?void 0:h.z)?u:0,scaleX:g*w,scaleY:b*C}}var CO=(e=>(e[e.Idle=0]="Idle",e[e.Forward=1]="Forward",e[e.Reverse=-1]="Reverse",e))(CO||{}),EO={x:.2,y:.2},RO={x:10,y:10};function AO(e,t,r,n=25,o=EO,i=RO,a=lO(e)){const{x:s,y:l}=t,{rect:u,isTop:c,isBottom:d,isLeft:p,isRight:f}=a,h=yO(e),m=wO(mO(e,!0)),g=null!==m&&(null==m?void 0:m.scaleX)<0,b=null!==m&&(null==m?void 0:m.scaleY)<0,v=new MD(u.left*h.scaleX+h.x,u.top*h.scaleY+h.y,u.width*h.scaleX,u.height*h.scaleY),y={x:0,y:0},x={x:0,y:0},S=v.height*o.y,w=v.width*o.x;return S>0&&(!c||b&&!d)&&l<=v.top+S&&1!==(null==r?void 0:r.y)&&s>=v.left-i.x&&s<=v.right+i.x?(y.y=b?1:-1,x.y=n*Math.abs((v.top+S-l)/S)):S>0&&(!d||b&&!c)&&l>=v.bottom-S&&-1!==(null==r?void 0:r.y)&&s>=v.left-i.x&&s<=v.right+i.x&&(y.y=b?-1:1,x.y=n*Math.abs((v.bottom-S-l)/S)),w>0&&(!f||g&&!p)&&s>=v.right-w&&-1!==(null==r?void 0:r.x)&&l>=v.top-i.y&&l<=v.bottom+i.y?(y.x=g?-1:1,x.x=n*Math.abs((v.right-w-s)/w)):w>0&&(!p||g&&!f)&&s<=v.left+w&&1!==(null==r?void 0:r.x)&&l>=v.top-i.y&&l<=v.bottom+i.y&&(y.x=g?1:-1,x.x=n*Math.abs((v.left+w-s)/w)),{direction:y,speed:x}}function IO(e,{block:t="nearest",inline:r="nearest"}={}){if(!mq(e))return;const n=vO(e),o=[];for(const i of n){if(!mq(i))continue;const{top:n,left:a}=kO(e,i);let s=n,l=a;for(const e of o)s-=e.scrollTop,l-=e.scrollLeft;if("none"!==t){const r=s<i.scrollTop;r!==s+e.offsetHeight>i.scrollTop+i.clientHeight&&(i.scrollTop="center"===t?s-i.clientHeight/2+e.offsetHeight/2:r?s:s+e.offsetHeight-i.clientHeight)}if("none"!==r){const t=l<i.scrollLeft;t!==l+e.offsetWidth>i.scrollLeft+i.clientWidth&&(i.scrollLeft="center"===r?l-i.clientWidth/2+e.offsetWidth/2:t?l:l+e.offsetWidth-i.clientWidth)}o.push(i)}}function MO(e){let t=0,r=0,n=e;for(;n;){t+=n.offsetTop,r+=n.offsetLeft;const e=n.offsetParent;if(!mq(e))break;t+=e.clientTop,r+=e.clientLeft,n=e}return{top:t,left:r}}function kO(e,t){const r=MO(e),n=MO(t);return{top:r.top-n.top-t.clientTop,left:r.left-n.left-t.clientLeft}}function DO({element:e,keyframes:t,options:r}){return e.animate(t,r).finished}function PO(e,t=mO(e).translate,r=!0){if(r){const t=uq(e,e=>"translate"in e);if(t){const{translate:e=""}=t[0];if("string"==typeof e){const t=SO(e);if(t)return t}}}if(t){const e=SO(t);if(e)return e}return{x:0,y:0,z:0}}var TO=new cO(e=>setTimeout(e,0)),qO=new Map,OO=qO.clear.bind(qO);function LO(e,t){const r=function(e){const t=e.ownerDocument;let r=qO.get(t);if(r)return r;r=t.getAnimations(),qO.set(t,r),TO.schedule(OO);const n=r.filter(t=>lq(t.effect)&&t.effect.target===e);return qO.set(e,n),r}(e).filter(e=>{var r,n;if(lq(e.effect)){const{target:o}=e.effect;if(null==(n=o&&(null==(r=t.isValidTarget)?void 0:r.call(t,o)))||n)return e.effect.getKeyframes().some(e=>{for(const r of t.properties)if(e[r])return!0})}}).map(e=>{const{effect:t,currentTime:r}=e,n=null==t?void 0:t.getComputedTiming().duration;if(!e.pending&&"finished"!==e.playState)return"number"==typeof n&&"number"==typeof r&&r<n?(e.currentTime=n,()=>{e.currentTime=r}):void 0});if(r.length>0)return()=>r.forEach(e=>null==e?void 0:e())}var NO=class extends MD{constructor(e,t={}){var r,n,o,i;const{frameTransform:a=yO(e),ignoreTransforms:s,getBoundingClientRect:l=cq}=t,u=LO(e,{properties:["transform","translate","scale","width","height"],isValidTarget:t=>(t!==e||Cq())&&t.contains(e)}),c=l(e);let d,{top:p,left:f,width:h,height:m}=c;const g=mO(e),b=wO(g),v={x:null!=(r=null==b?void 0:b.scaleX)?r:1,y:null!=(n=null==b?void 0:b.scaleY)?n:1},y=function(e,t){const r=e.getAnimations();if(!r.length)return null;let n,o,i,a=!1;for(const e of r){if("running"!==e.playState)continue;const t=lq(e.effect)?e.effect.getKeyframes():[],r=t[t.length-1];if(!r)continue;const{transform:s,translate:l,scale:u}=r;"string"==typeof s&&s&&(n=s,a=!0),"string"==typeof l&&l&&(o=l,a=!0),"string"==typeof u&&u&&(i=u,a=!0)}return a?wO({transform:null!=n?n:t.transform,translate:null!=o?o:t.translate,scale:null!=i?i:t.scale}):null}(e,g);null==u||u(),b&&(d=function(e,t,r){const{scaleX:n,scaleY:o,x:i,y:a}=t,s=e.left-i-(1-n)*parseFloat(r),l=e.top-a-(1-o)*parseFloat(r.slice(r.indexOf(" ")+1)),u=n?e.width/n:e.width,c=o?e.height/o:e.height;return{width:u,height:c,top:l,right:s+u,bottom:l+c,left:s}}(c,b,g.transformOrigin),(s||y)&&(p=d.top,f=d.left,h=d.width,m=d.height));const x={width:null!=(o=null==d?void 0:d.width)?o:h,height:null!=(i=null==d?void 0:d.height)?i:m};if(y&&!s&&d){const e=function(e,t,r){const{scaleX:n,scaleY:o,x:i,y:a}=t,s=e.left+i+(1-n)*parseFloat(r),l=e.top+a+(1-o)*parseFloat(r.slice(r.indexOf(" ")+1)),u=n?e.width*n:e.width,c=o?e.height*o:e.height;return{width:u,height:c,top:l,right:s+u,bottom:l+c,left:s}}(d,y,g.transformOrigin);p=e.top,f=e.left,h=e.width,m=e.height,v.x=y.scaleX,v.y=y.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=v,this.intrinsicWidth=x.width,this.intrinsicHeight=x.height}};function jO(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 _O=class{constructor(e){this.element=e,this.initial=new Map}set(e,t=""){const{element:r}=this;if(jO(r))for(const[n,o]of Object.entries(e)){const e=`${t}${n}`;this.initial.has(e)||this.initial.set(e,r.style.getPropertyValue(e)),r.style.setProperty(e,"string"==typeof o?o:`${o}px`)}}remove(e,t=""){const{element:r}=this;if(jO(r))for(const n of e){const e=`${t}${n}`;r.style.removeProperty(e)}}reset(){const{element:e}=this;if(jO(e)){for(const[t,r]of this.initial)e.style.setProperty(t,r);""===e.getAttribute("style")&&e.removeAttribute("style")}}};function zO(e){return!!e&&(e instanceof fq(e).Element||pq(e)&&e.nodeType===Node.ELEMENT_NODE)}function FO(e){if(!e)return!1;const{KeyboardEvent:t}=fq(e.target);return e instanceof t}var $O={};function BO(e){const t=null==$O[e]?0:$O[e]+1;return $O[e]=t,`${e}-${t}`}var HO=e=>{var t;return null!=(t=(({dragOperation:e,droppable:t})=>{const r=e.position.current;if(!r)return null;const{id:n}=t;if(!t.shape)return null;if(t.shape.containsPoint(r))return{id:n,value:1/ID.distance(t.shape.center,r),type:ET.PointerIntersection,priority:CT.High};return null})(e))?t:(({dragOperation:e,droppable:t})=>{const{shape:r}=e;if(!t.shape||!(null==r?void 0:r.current))return null;const n=r.current.intersectionArea(t.shape);if(n){const{position:o}=e,i=ID.distance(t.shape.center,o.current),a=n/(r.current.area+t.shape.area-n)/i;return{id:t.id,value:a,type:ET.ShapeIntersection,priority:CT.Normal}}return null})(e)},VO=e=>{const{dragOperation:t,droppable:r}=e,{shape:n,position:o}=t;if(!r.shape)return null;const i=n?MD.from(n.current.boundingRectangle).corners:void 0,a=MD.from(r.shape.boundingRectangle).corners.reduce((e,t,r)=>{var n;return e+ID.distance(ID.from(t),null!=(n=null==i?void 0:i[r])?n:o.current)},0),s=a/4;return{id:r.id,value:1/s,type:ET.Collision,priority:CT.Normal}},WO=Object.create,UO=Object.defineProperty,GO=Object.defineProperties,KO=Object.getOwnPropertyDescriptor,YO=Object.getOwnPropertyDescriptors,XO=Object.getOwnPropertySymbols,JO=Object.prototype.hasOwnProperty,ZO=Object.prototype.propertyIsEnumerable,QO=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),eL=e=>{throw TypeError(e)},tL=(e,t,r)=>t in e?UO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,rL=(e,t)=>{for(var r in t||(t={}))JO.call(t,r)&&tL(e,r,t[r]);if(XO)for(var r of XO(t))ZO.call(t,r)&&tL(e,r,t[r]);return e},nL=(e,t)=>GO(e,YO(t)),oL=(e,t)=>UO(e,"name",{value:t,configurable:!0}),iL=(e,t)=>{var r={};for(var n in e)JO.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&XO)for(var n of XO(e))t.indexOf(n)<0&&ZO.call(e,n)&&(r[n]=e[n]);return r},aL=e=>{var t;return[,,,WO(null!=(t=null==e?void 0:e[QO("metadata")])?t:null)]},sL=["class","method","getter","setter","accessor","field","value","get","set"],lL=e=>void 0!==e&&"function"!=typeof e?eL("Function expected"):e,uL=(e,t,r,n,o)=>({kind:sL[e],name:t,metadata:n,addInitializer:e=>r._?eL("Already initialized"):o.push(lL(e||null))}),cL=(e,t)=>tL(t,QO("metadata"),e[3]),dL=(e,t,r,n)=>{for(var o=0,i=e[t>>1],a=i&&i.length;o<a;o++)1&t?i[o].call(r):n=i[o].call(r,n);return n},pL=(e,t,r,n,o,i)=>{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=sL[d+5],g=d>3&&(e[h-1]=[]),b=e[h]||(e[h]=[]),v=d&&(!f&&!p&&(o=o.prototype),d<5&&(d>3||!f)&&KO(d<4?o:{get[r](){return mL(this,i)},set[r](e){return bL(this,i,e)}},r));d?f&&d<4&&oL(i,(d>2?"set ":d>1?"get ":"")+r):oL(o,r);for(var y=n.length-1;y>=0;y--)u=uL(d,r,l={},e[3],b),d&&(u.static=p,u.private=f,c=u.access={has:f?e=>hL(o,e):e=>r in e},3^d&&(c.get=f?e=>(1^d?mL:vL)(e,o,4^d?i:v.get):e=>e[r]),d>2&&(c.set=f?(e,t)=>bL(e,o,t,4^d?i:v.set):(e,t)=>e[r]=t)),s=(0,n[y])(d?d<4?f?i:v[m]:d>4?void 0:{get:v.get,set:v.set}:o,u),l._=1,4^d||void 0===s?lL(s)&&(d>4?g.unshift(s):d?f?i=s:v[m]=s:o=s):"object"!=typeof s||null===s?eL("Object expected"):(lL(a=s.get)&&(v.get=a),lL(a=s.set)&&(v.set=a),lL(a=s.init)&&g.unshift(a));return d||cL(e,o),v&&UO(o,r,v),f?4^d?i:v:o},fL=(e,t,r)=>t.has(e)||eL("Cannot "+r),hL=(e,t)=>Object(t)!==t?eL('Cannot use the "in" operator on this value'):e.has(t),mL=(e,t,r)=>(fL(e,t,"read from private field"),r?r.call(e):t.get(e)),gL=(e,t,r)=>t.has(e)?eL("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),bL=(e,t,r,n)=>(fL(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),vL=(e,t,r)=>(fL(e,t,"access private method"),r),yL="button",xL="draggable",SL="dnd-kit-description",wL="dnd-kit-announcement",CL={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."},EL={dragstart({operation:{source:e}}){if(e)return`Picked up draggable item ${e.id}.`},dragover({operation:{source:e,target:t}}){if(e&&e.id!==(null==t?void 0:t.id))return t?`Draggable item ${e.id} was moved over droppable target ${t.id}.`:`Draggable item ${e.id} is no longer over a droppable target.`},dragend({operation:{source:e,target:t},canceled:r}){if(e)return r?`Dragging was cancelled. Draggable item ${e.id} was dropped.`:t?`Draggable item ${e.id} was dropped over droppable target ${t.id}`:`Draggable item ${e.id} was dropped.`}};function RL(e){const t=e.tagName.toLowerCase();return["input","select","textarea","a","button"].includes(t)}function AL(e){var t;return"button"===(null!=(t=e.getAttribute("role"))?t:"button")}var IL=["dragover","dragmove"],ML=class extends mP{constructor(e,t){super(e);const{id:r,idPrefix:{description:n=SL,announcement:o=wL}={},announcements:i=EL,screenReaderInstructions:a=CL,debounce:s=500}=null!=t?t:{},l=r?`${n}-${r}`:BO(n),u=r?`${o}-${r}`:BO(o);let c,d,p,f;const h=(e=f)=>{p&&e&&(null==p?void 0:p.nodeValue)!==e&&(p.nodeValue=e)},m=()=>dO.schedule(h),g=function(e,t){let r;const n=()=>{clearTimeout(r),r=setTimeout(e,t)};return n.cancel=()=>clearTimeout(r),n}(m,s),b=Object.entries(i).map(([e,t])=>this.manager.monitor.addEventListener(e,(r,n)=>{const o=p;if(!o)return;const i=null==t?void 0:t(r,n);i&&o.nodeValue!==i&&(f=i,IL.includes(e)?g():(m(),g.cancel()))})),v=()=>{let e=[];(null==c?void 0:c.isConnected)||(c=function(e,t){const r=document.createElement("div");return r.id=e,r.style.setProperty("display","none"),r.textContent=t,r}(l,a.draggable),e.push(c)),(null==d?void 0:d.isConnected)||(d=function(e){const t=document.createElement("div");return t.id=e,t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true"),t.style.setProperty("position","fixed"),t.style.setProperty("width","1px"),t.style.setProperty("height","1px"),t.style.setProperty("margin","-1px"),t.style.setProperty("border","0"),t.style.setProperty("padding","0"),t.style.setProperty("overflow","hidden"),t.style.setProperty("clip","rect(0 0 0 0)"),t.style.setProperty("clip-path","inset(100%)"),t.style.setProperty("white-space","nowrap"),t}(u),p=document.createTextNode(""),d.appendChild(p),e.push(d)),e.length>0&&document.body.append(...e)},y=new Set;function x(){for(const e of y)e()}this.registerEffect(()=>{var e;y.clear();for(const t of this.manager.registry.draggables.value){const r=null!=(e=t.handle)?e:t.element;if(r){c&&d||y.add(v),RL(r)&&!Cq()||r.hasAttribute("tabindex")||y.add(()=>r.setAttribute("tabindex","0")),r.hasAttribute("role")||"button"===r.tagName.toLowerCase()||y.add(()=>r.setAttribute("role",yL)),r.hasAttribute("aria-roledescription")||y.add(()=>r.setAttribute("aria-roledescription",xL)),r.hasAttribute("aria-describedby")||y.add(()=>r.setAttribute("aria-describedby",l));const e=AL(r)?["aria-pressed","aria-grabbed"]:["aria-grabbed"];for(const n of e){const e=String(t.isDragging);r.getAttribute(n)!==e&&y.add(()=>r.setAttribute(n,e))}const n=String(t.disabled);r.getAttribute("aria-disabled")!==n&&y.add(()=>r.setAttribute("aria-disabled",n))}}y.size>0&&dO.schedule(x)}),this.destroy=()=>{super.destroy(),null==c||c.remove(),null==d||d.remove(),b.forEach(e=>e())}}};var kL,DL,PL,TL,qL,OL,LL,NL,jL,_L,zL,FL,$L,BL,HL,VL,WL=new Map;function UL(e){return Rq(e)?e.host.isConnected:null!=e.defaultView}var GL=class extends(OL=bP,qL=[eD],TL=[eD],PL=[tD],DL=[tD],kL=[tD],OL){constructor(e,t){super(e,t),dL(LL,5,this),gL(this,FL),gL(this,NL,dL(LL,8,this,new Map)),dL(LL,11,this),gL(this,jL,dL(LL,12,this,new Set)),dL(LL,15,this),gL(this,_L,new Set),gL(this,zL,new Map),this.registerEffect(vL(this,FL,$L))}register(e,t){return BM(()=>{var r;const n=new Map(this.registeredRules);n.set(e,null!=(r=null==t?void 0:t.retain)&&r),this.registeredRules=n}),()=>{BM(()=>{const t=new Map(this.registeredRules);t.delete(e),this.registeredRules=t})}}addRoot(e){return BM(()=>{const t=new Set(this.additionalRoots);t.add(e),this.additionalRoots=t}),()=>{BM(()=>{const t=new Set(this.additionalRoots);t.delete(e),this.additionalRoots=t})}}get sourceRoot(){var e;const{source:t}=this.manager.dragOperation;return Aq(null!=(e=null==t?void 0:t.element)?e:null)}get targetRoot(){var e;const{target:t}=this.manager.dragOperation;return Aq(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}destroy(){for(const e of mL(this,zL).values())for(const t of e.values())t();mL(this,zL).clear(),mL(this,_L).clear(),super.destroy()}};LL=aL(OL),NL=new WeakMap,jL=new WeakMap,_L=new WeakMap,zL=new WeakMap,FL=new WeakSet,$L=function(){const{roots:e,registeredRules:t}=this;for(const t of e)mL(this,_L).add(t);const r=new Map;for(const n of mL(this,_L)){const o=e.has(n);if(o||UL(n))for(const[e,i]of t){if(!o&&!i)continue;let t=r.get(n);t||(t=new Set,r.set(n,t)),t.add(e)}else mL(this,_L).delete(n)}for(const[e,t]of mL(this,zL)){const n=r.get(e);for(const[e,r]of t)(null==n?void 0:n.has(e))||(r(),t.delete(e));0===t.size&&mL(this,zL).delete(e)}for(const[e,t]of r){let r=mL(this,zL).get(e);r||(r=new Map,mL(this,zL).set(e,r));for(const n of t)r.has(n)||r.set(n,vL(this,FL,BL).call(this,e,n))}},BL=function(e,t){let r=WL.get(e);r||(r=new Map,WL.set(e,r));let n=r.get(t);if(!n){const o=hq(e)?vL(this,FL,HL).call(this,e,r,t):vL(this,FL,VL).call(this,e,r,t);if(!o)return()=>{};n=o,r.set(t,n)}n.refCount++;let o=!1;return()=>{o||(o=!0,n.refCount--,0===n.refCount&&n.cleanup())}},HL=function(e,t,r){var n;const o=e.createElement("style"),{nonce:i}=null!=(n=this.options)?n:{};i&&o.setAttribute("nonce",i),o.textContent=r,e.head.prepend(o);const a=new MutationObserver(t=>{for(const r of t)for(const t of Array.from(r.removedNodes))if(t===o)return void e.head.prepend(o)});return a.observe(e.head,{childList:!0}),{refCount:0,cleanup:()=>{a.disconnect(),o.remove(),t.delete(r),0===t.size&&WL.delete(e)}}},VL=function(e,t,r){!("adoptedStyleSheets"in e)||Array.isArray(e.adoptedStyleSheets);const n=e.ownerDocument.defaultView,{CSSStyleSheet:o}=null!=n?n:{};if(!o)return null;const i=new o;return i.replaceSync(r),e.adoptedStyleSheets.push(i),{refCount:0,cleanup:()=>{var n;if(Rq(e)&&(null==(n=e.host)?void 0:n.isConnected)){const t=e.adoptedStyleSheets.indexOf(i);-1!==t&&e.adoptedStyleSheets.splice(t,1)}t.delete(r),0===t.size&&WL.delete(e)}}},pL(LL,4,"registeredRules",qL,GL,NL),pL(LL,4,"additionalRoots",TL,GL,jL),pL(LL,2,"sourceRoot",PL,GL),pL(LL,2,"targetRoot",DL,GL),pL(LL,2,"roots",kL,GL),cL(LL,GL),GL.configure=fP(GL);var KL=GL,YL="data-dnd-",XL=`${YL}dropping`,JL="--dnd-",ZL=`${YL}dragging`,QL=`${YL}placeholder`,eN=[ZL,QL,"popover","aria-pressed","aria-grabbing"],tN=["view-transition-name"],rN=`\n :is(:root,:host) [${ZL}] {\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(${JL}top, 0px) !important;\n left: var(${JL}left, 0px) !important;\n right: unset !important;\n bottom: unset !important;\n width: var(${JL}width, auto);\n max-width: var(${JL}width, auto);\n height: var(${JL}height, auto);\n max-height: var(${JL}height, auto);\n transform: var(${JL}transform, none) !important;\n transition: var(${JL}transition) !important;\n }\n\n :is(:root,:host) [${QL}] {\n transition: none;\n }\n\n :is(:root,:host) [${QL}='hidden'] {\n visibility: hidden;\n }\n\n [${ZL}] * {\n pointer-events: none !important;\n }\n\n [${ZL}]:not([${XL}]) {\n translate: var(${JL}translate) !important;\n }\n\n [${ZL}][style*='${JL}scale'] {\n scale: var(${JL}scale) !important;\n transform-origin: var(${JL}transform-origin) !important;\n }\n\n @layer dnd-kit {\n :where([${ZL}][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 [${ZL}]::backdrop, [${YL}overlay]:not([${ZL}]) {\n display: none;\n visibility: hidden;\n }\n`.replace(/\n+/g," ").replace(/\s+/g," ").trim();function nN(e,t="hidden"){return BM(()=>{const{element:r,manager:n}=e;if(!r||!n)return;const o=function(e,t){const r=new Map;for(const n of t)if(n.element&&(e===n.element||e.contains(n.element))){const e=`${YL}${BO("dom-id")}`;n.element.setAttribute(e,""),r.set(n,e)}return r}(r,n.registry.droppables),i=[],a=function(e){const t="input, textarea, select, canvas, [contenteditable]",r=e.cloneNode(!0),n=Array.from(e.querySelectorAll(t));return Array.from(r.querySelectorAll(t)).forEach((e,t)=>{const r=n[t];if(Mq(e)&&Mq(r)&&("file"!==e.type&&(e.value=r.value),"radio"===e.type&&e.name&&(e.name=`Cloned__${e.name}`)),kq(e)&&kq(r)&&r.width>0&&r.height>0){const t=e.getContext("2d");null==t||t.drawImage(r,0,0)}}),r}(r),{remove:s}=a;return function(e,t,r){for(const[n,o]of e){if(!n.element)continue;const e=`[${o}]`,i=t.matches(e)?t:t.querySelector(e);if(n.element.removeAttribute(o),!i)continue;const a=n.element;n.proxy=i,i.removeAttribute(o),Pq.set(a,i),r.push(()=>{Pq.delete(a),n.proxy=void 0})}}(o,a,i),function(e,t="hidden"){e.setAttribute("inert","true"),e.setAttribute("tab-index","-1"),e.setAttribute("aria-hidden","true"),e.setAttribute(QL,t)}(a,t),a.remove=()=>{i.forEach(e=>e()),s.call(a)},a})}function oN(e,t){return e===t||qq(e)===qq(t)}function iN(e){const{target:t}=e;"newState"in e&&"closed"===e.newState&&zO(t)&&t.hasAttribute("popover")&&requestAnimationFrame(()=>aO(t))}function aN(e){return"TR"===e.tagName}var sN,lN,uN,cN,dN,pN,fN,hN=250,mN="ease";var gN=class extends(lN=mP,sN=[eD],lN){constructor(e,t){super(e,t),gL(this,dN),gL(this,cN,dL(uN,8,this)),dL(uN,11,this),this.state={initial:{},current:{}};const r=e.registry.plugins.get(KL),n=null==r?void 0:r.register(rN,{retain:!0});if(n){const e=this.destroy.bind(this);this.destroy=()=>{n(),e()}}this.registerEffect(vL(this,dN,pN).bind(this,r)),this.registerEffect(vL(this,dN,fN))}};uN=aL(lN),cN=new WeakMap,dN=new WeakSet,pN=function(e){const{overlay:t}=this;if(!t||!e)return;const r=Aq(t);return r?e.addRoot(r):void 0},fN=function(){var e,t,r,n,o,i,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(gN),g=null!=(t=null!=(e=null==m?void 0:m.feedback)?e:null==u?void 0:u.feedback)?t:"default",b="function"==typeof g?g(p,l):g;if(!h||"none"===b||!f.initialized||f.initializing)return;const{initial:v}=s,y=null!=(r=this.overlay)?r:h,x=yO(y),S=yO(h),w=!oN(h,y),C=new NO(h,{frameTransform:w?S:null,ignoreTransforms:!w}),E=S.scaleX/x.scaleX,R=S.scaleY/x.scaleY;let{width:A,height:I,top:M,left:k}=C;w&&(A/=E,I/=R);const D=new _O(y),P=mO(h),{transition:T,translate:q,boxSizing:O,paddingBlockStart:L,paddingBlockEnd:N,paddingInlineStart:j,paddingInlineEnd:_,borderInlineStartWidth:z,borderInlineEndWidth:F,borderBlockStartWidth:$,borderBlockEndWidth:B}=P,H=T.split(",").filter(e=>!/^\s*(transform|translate|scale)\b/.test(e)).join(","),V=wO(P),W=P.transform,U="clone"===b,G="content-box"===O,K=G?parseInt(j)+parseInt(_)+parseInt(z)+parseInt(F):0,Y=G?parseInt(L)+parseInt(N)+parseInt($)+parseInt(B):0,X="move"===b||this.overlay?null:nN(p,U?"clone":"hidden"),J=BM(()=>FO(l.dragOperation.activatorEvent));if(!v.translate)if(this.overlay&&V)v.translate={x:V.x,y:V.y};else if("none"!==q){const e=SO(q);e&&(v.translate=e)}if(!v.transformOrigin){const e=BM(()=>d.current),t=k+(null!=(n=null==V?void 0:V.x)?n:0),r=M+(null!=(o=null==V?void 0:V.y)?o:0);v.transformOrigin={x:(e.x-t*x.scaleX-x.x)/(A*x.scaleX),y:(e.y-r*x.scaleY-x.y)/(I*x.scaleY)}}const{transformOrigin:Z}=v,Q=M*x.scaleY+x.y,ee=k*x.scaleX+x.x;if(!v.coordinates&&(v.coordinates={x:ee,y:Q},1!==E||1!==R)){const{scaleX:e,scaleY:t}=S,{x:r,y:n}=Z;v.coordinates.x+=(A*e-A)*r,v.coordinates.y+=(I*t-I)*n}v.dimensions||(v.dimensions={width:A,height:I}),v.frameTransform||(v.frameTransform=x);const te=v.coordinates.x-ee,re=v.coordinates.y-Q,ne=(v.dimensions.width*v.frameTransform.scaleX-A*x.scaleX)*Z.x,oe=(v.dimensions.height*v.frameTransform.scaleY-I*x.scaleY)*Z.y,ie={x:te/x.scaleX+ne,y:re/x.scaleY+oe},ae=k+ie.x,se=M+ie.y;y.setAttribute(ZL,"true");const le=BM(()=>c.transform),ue=null!=(i=v.translate)?i:{x:0,y:0},ce=le.x*x.scaleX+ue.x,de=le.y*x.scaleY+ue.y,pe=Eq();if(D.set({width:A-K,height:I-Y,top:se+pe.y,left:ae+pe.x,translate:`${ce}px ${de}px 0`,transform:this.overlay?"none":W,transition:H?`${H}, translate 0ms linear`:"translate 0ms linear",scale:w?`${E} ${R}`:"","transform-origin":`${100*Z.x}% ${100*Z.y}%`},JL),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;iO(y)&&(y.hasAttribute("popover")||y.setAttribute("popover","manual"),aO(y),y.addEventListener("beforetoggle",iN));const ge=(be={placeholder:X,element:h,feedbackElement:y,frameTransform:x,transformOrigin:Z,width:A,height:I,top:M,left:k,widthOffset:K,heightOffset:Y,delta:ie,styles:D,dragOperation:c,getTranslate:()=>s.current.translate,getElementMutationObserver:()=>fe,getSavedCellWidths:()=>me,setSavedCellWidths:e=>{me=e}},new ResizeObserver(()=>{var e,t,r;const n=new NO(be.placeholder,{frameTransform:be.frameTransform,ignoreTransforms:!0}),o=null!=(e=be.transformOrigin)?e:{x:1,y:1},i=(be.width-n.width)*o.x+be.delta.x,a=(be.height-n.height)*o.y+be.delta.y,s=Eq();if(be.styles.set({width:n.width-be.widthOffset,height:n.height-be.heightOffset,top:be.top+a+s.y,left:be.left+i+s.x},JL),null==(t=be.getElementMutationObserver())||t.takeRecords(),aN(be.element)&&aN(be.placeholder)){const e=Array.from(be.element.cells),t=Array.from(be.placeholder.cells);be.getSavedCellWidths()||be.setSavedCellWidths(e.map(e=>e.style.width));for(const[r,n]of e.entries()){const e=t[r];n.style.width=`${e.getBoundingClientRect().width}px`}}const l=null!=(r=be.getTranslate())?r:{x:0,y:0},u=be.left+i+s.x+l.x,c=be.top+a+s.y+l.y,d=n.width-be.widthOffset,p=n.height-be.heightOffset,f=be.frameTransform;be.dragOperation.shape=new MD(u*f.scaleX+f.x,c*f.scaleY+f.y,d*f.scaleX,p*f.scaleY)}));var be;const ve=new NO(y);BM(()=>c.shape=ve);const ye=fq(y),xe=e=>{this.manager.actions.stop({event:e})},Se=Iq(ye);J&&ye.addEventListener("resize",xe),"idle"===BM(()=>p.status)&&requestAnimationFrame(()=>p.status="dragging"),X&&(ge.observe(X),fe=function(e,t,r){const n=new MutationObserver(n=>{let o=!1;for(const r of n){if(r.target!==e){o=!0;continue}if("attributes"!==r.type)continue;const n=r.attributeName;if(n.startsWith("aria-")||eN.includes(n))continue;const i=e.getAttribute(n);if("style"===n){if(jO(e)&&jO(t)){const r=e.style;for(const e of Array.from(t.style))""===r.getPropertyValue(e)&&t.style.removeProperty(e);for(const e of Array.from(r)){if(tN.includes(e)||e.startsWith(JL))continue;const n=r.getPropertyValue(e);t.style.setProperty(e,n)}}}else null!==i?t.setAttribute(n,i):t.removeAttribute(n)}o&&r&&t.replaceChildren(...e.cloneNode(!0).childNodes)});return n.observe(e,{attributes:!0,subtree:!0,childList:!0}),n}(h,X,U),he=function(e,t,r){const n=new MutationObserver(n=>{for(const o of n)if(0!==o.addedNodes.length)for(const n of Array.from(o.addedNodes)){if(n.contains(e)&&e.nextElementSibling!==t)return e.insertAdjacentElement("afterend",t),void aO(r);if(n.contains(t)&&t.previousElementSibling!==e)return t.insertAdjacentElement("beforebegin",e),void aO(r)}e.isConnected&&t.isConnected&&e.nextElementSibling!==t&&(e.insertAdjacentElement("afterend",t),aO(r))});return n.observe(e.ownerDocument.body,{childList:!0,subtree:!0}),n}(h,X,y));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),r=null!=(e=null==t?void 0:t.handle)?e:null==t?void 0:t.element;mq(r)&&r.focus()},Ee=()=>{null==fe||fe.disconnect(),null==he||he.disconnect(),ge.disconnect(),ye.removeEventListener("resize",xe),iO(y)&&(y.removeEventListener("beforetoggle",iN),y.removeAttribute("popover")),y.removeAttribute(ZL),D.reset();const e=()=>{var e;if(me&&aN(h)){const t=Array.from(h.cells);for(const[r,n]of t.entries())n.style.width=null!=(e=me[r])?e:""}p.status="idle";const t=null!=s.current.translate,r=c.status.dragging;X&&(!r&&t||X.parentElement!==y.parentElement)&&y.isConnected&&X.replaceWith(y),null==X||X.remove()};y===this.overlay?setTimeout(e,0):e()},Re=null==u?void 0:u.dropAnimation,Ae=this,Ie=nD(()=>{var e,t,r;const{transform:n,status:o}=c;if((n.x||n.y||s.current.translate)&&o.dragging){const o=null!=(e=v.translate)?e:{x:0,y:0},i={x:n.x/x.scaleX+o.x,y:n.y/x.scaleY+o.y},a=s.current.translate,l=BM(()=>c.modifiers),d=BM(()=>{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!=(r=null==p?void 0:p.easing)?r:"cubic-bezier(0.25, 1, 0.5, 1)"}`:"0ms linear";if(D.set({transition:H?`${H}, translate ${f}`:`translate ${f}`,translate:`${i.x}px ${i.y}px 0`},JL),null==fe||fe.takeRecords(),d&&d!==ve&&a&&!l.length){const e=ID.delta(i,a);c.shape=MD.from(d.boundingRectangle).translate(e.x*x.scaleX,e.y*x.scaleY)}else c.shape=new NO(y);s.current.translate=i}},function(){if(c.status.dropped){this.dispose(),p.status="dropping";const e=void 0!==(null==m?void 0:m.dropAnimation)?m.dropAnimation:void 0!==Ae.dropAnimation?Ae.dropAnimation:Re;let t=s.current.translate;const r=null!=t;if(t||h===y||(t={x:0,y:0}),!t||null===e)return void Ee();l.renderer.rendering.then(()=>{!function(e){var t,r,n,o;const{animation:i}=e;if("function"==typeof i){const t=i({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=hN,easing:s=mN}=null!=i?i:{};aO(e.feedbackElement);const[,l]=null!=(t=uq(e.feedbackElement,e=>"translate"in e))?t:[];null==l||l.pause();const u=null!=(r=e.placeholder)?r:e.element,c={frameTransform:oN(e.feedbackElement,u)?null:void 0},d=new NO(e.feedbackElement,c),p=null!=(n=SO(mO(e.feedbackElement).translate))?n:e.translate,f=new NO(u,c),h=MD.delta(d,f,e.alignment),m=p.x-h.x,g=p.y-h.y,b=Math.round(d.intrinsicHeight)!==Math.round(f.intrinsicHeight)?{minHeight:[`${d.intrinsicHeight}px`,`${f.intrinsicHeight}px`],maxHeight:[`${d.intrinsicHeight}px`,`${f.intrinsicHeight}px`]}:{},v=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},JL),e.feedbackElement.setAttribute(XL,""),null==(o=e.getElementMutationObserver())||o.takeRecords(),DO({element:e.feedbackElement,keyframes:nL(rL(rL({},b),v),{translate:[`${p.x}px ${p.y}px 0`,`${m}px ${g}px 0`]}),options:{duration:Iq(fq(e.feedbackElement))?0:e.moved||e.feedbackElement!==e.element?a:0,easing:s}}).then(()=>{e.feedbackElement.removeAttribute(XL),null==l||l.finish(),e.cleanup(),requestAnimationFrame(e.restoreFocus)})}({source:p,element:h,feedbackElement:y,placeholder:X,translate:t,moved:r,transition:T,alignment:p.alignment,styles:D,animation:null!=e?e:void 0,getElementMutationObserver:()=>fe,cleanup:Ee,restoreFocus:Ce})})}});return()=>{Ee(),Ie()}},pL(uN,4,"overlay",sN,gN,cN),cL(uN,gN),gN.configure=fP(gN);var bN,vN,yN,xN,SN,wN,CN,EN=gN,RN=!0;yN=[eD],xN=CO.Forward,bN=[eD],vN=CO.Reverse;var AN=class{constructor(){gL(this,wN,dL(SN,8,this,RN)),dL(SN,11,this),gL(this,CN,dL(SN,12,this,RN)),dL(SN,15,this)}isLocked(e){return e!==CO.Idle&&(null==e?this[CO.Forward]===RN&&this[CO.Reverse]===RN:this[e]===RN)}unlock(e){e!==CO.Idle&&(this[e]=false)}};SN=aL(null),wN=new WeakMap,CN=new WeakMap,pL(SN,4,xN,yN,AN,wN),pL(SN,4,vN,bN,AN,CN),cL(SN,AN);var IN,MN,kN,DN,PN,TN,qN=[CO.Forward,CO.Reverse],ON=class{constructor(){this.x=new AN,this.y=new AN}isLocked(){return this.x.isLocked()&&this.y.isLocked()}},LN=class extends mP{constructor(e){super(e);const t=ZM(new ON);let r=null;this.signal=t,lk(()=>{const{status:n}=e.dragOperation;if(!n.initialized)return r=null,void(t.value=new ON);const{delta:o}=e.dragOperation.position;if(r){const e={x:NN(o.x,r.x),y:NN(o.y,r.y)},n=t.peek();zM(()=>{for(const t of jD)for(const r of qN)e[t]===r&&n[t].unlock(r);t.value=n})}r=o})}get current(){return this.signal.peek()}};function NN(e,t){return Math.sign(e-t)}var jN=class extends(MN=bP,IN=[eD],MN){constructor(e){super(e),gL(this,DN,dL(kN,8,this,!1)),dL(kN,11,this),gL(this,PN),gL(this,TN,()=>{if(!mL(this,PN))return;const{element:e,by:t}=mL(this,PN);t.y&&(e.scrollTop+=t.y),t.x&&(e.scrollLeft+=t.x)}),this.scroll=(e,t)=>{var r;if(this.disabled)return!1;const n=this.getScrollableElements();if(!n)return bL(this,PN,void 0),!1;const{position:o}=this.manager.dragOperation,i=null==o?void 0:o.current;if(i){const{by:o}=null!=e?e:{},a=o?{x:_N(o.x),y:_N(o.y)}:void 0,s=a?void 0:this.scrollIntentTracker.current;if(null==s?void 0:s.isLocked())return!1;for(const e of n){const n=lO(e),l=uO(e,o,n);if(l.x||l.y){const{speed:l,direction:u}=AO(e,i,a,null==t?void 0:t.acceleration,null==t?void 0:t.threshold,void 0,n);if(s)for(const e of jD)s[e].isLocked(u[e])&&(l[e]=0,u[e]=0);if(u.x||u.y){const{x:t,y:n}=null!=o?o:u,i=t*l.x,a=n*l.y;if(i||a){const t=null==(r=mL(this,PN))?void 0:r.by;if(this.autoScrolling&&t){if(t.x&&!i||t.y&&!a)continue}return bL(this,PN,{element:e,by:{x:i,y:a}}),dO.schedule(mL(this,TN)),!0}}}}}return bL(this,PN,void 0),!1};let t=null,r=null;const n=Zk(()=>{const{position:r,source:n}=e.dragOperation;if(!r)return null;const o=Dq(Aq(null==n?void 0:n.element),r.current);return o&&(t=o),null!=o?o:t}),o=Zk(()=>{const t=n.value,{documentElement:o}=bq(t);if(!t||t===o){const{target:t}=e.dragOperation,n=null==t?void 0:t.element;if(n){const e=vO(n,{excludeElement:!1});return r=e,e}}if(t){const e=vO(t,{excludeElement:!1});return this.autoScrolling&&r&&e.size<(null==r?void 0:r.size)?r:(r=e,e)}return r=null,null},Qk);this.getScrollableElements=()=>o.value,this.scrollIntentTracker=new LN(e),this.destroy=e.monitor.addEventListener("dragmove",t=>{!this.disabled&&!t.defaultPrevented&&FO(e.dragOperation.activatorEvent)&&t.by&&this.scroll({by:t.by})&&t.preventDefault()})}};function _N(e){return e>0?CO.Forward:e<0?CO.Reverse:CO.Idle}kN=aL(MN),DN=new WeakMap,PN=new WeakMap,TN=new WeakMap,pL(kN,4,"autoScrolling",IN,jN,DN),cL(kN,jN);var zN=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()}),FN=class extends mP{constructor(e,t){super(e,t);const r=e.registry.plugins.get(jN);if(!r)throw new Error("AutoScroller plugin depends on Scroller plugin");this.destroy=lk(()=>{var t,n,o;if(this.disabled)return;const{position:i,status:a}=e.dragOperation;if(a.dragging){const e={acceleration:null==(t=this.options)?void 0:t.acceleration,threshold:"number"==typeof(null==(n=this.options)?void 0:n.threshold)?{x:this.options.threshold,y:this.options.threshold}:null==(o=this.options)?void 0:o.threshold};if(r.scroll(void 0,e)){r.autoScrolling=!0;const t=setInterval(()=>zN.schedule(()=>r.scroll(void 0,e)),10);return()=>{clearInterval(t)}}r.autoScrolling=!1}})}};FN.configure=fP(FN);var $N,BN=FN,HN={capture:!0,passive:!0},VN=class extends bP{constructor(e){super(e),gL(this,$N),this.handleScroll=()=>{null==mL(this,$N)&&bL(this,$N,setTimeout(()=>{this.manager.collisionObserver.forceUpdate(!1),bL(this,$N,void 0)},50))};const{dragOperation:t}=this.manager;this.destroy=lk(()=>{var e,r,n;if(t.status.dragging){const o=null!=(n=null==(r=null==(e=t.source)?void 0:e.element)?void 0:r.ownerDocument)?n:document;return o.addEventListener("scroll",this.handleScroll,HN),()=>{o.removeEventListener("scroll",this.handleScroll,HN)}}})}};$N=new WeakMap;function WN(){var e;null==(e=document.getSelection())||e.removeAllRanges()}function UN(e,t){const r=KN(e.key);return t.some(e=>KN(e)===r)}var GN=new Set(["alt","altgraph","backspace","capslock","control","delete","end","enter","escape","home","insert","meta","pagedown","pageup","pause","printscreen","shift","space","tab","arrowdown","arrowleft","arrowright","arrowup","f1","f2","f3","f4","f5","f6","f7","f8","f9","f10","f11","f12"]);function KN(e){if(" "===e||"Spacebar"===e)return"space";if(/^Key[A-Z]$/.test(e))return e.slice(3).toLowerCase();if(/^Digit[0-9]$/.test(e))return e.slice(5);if(1===e.length)return e.toLowerCase();const t=e.toLowerCase();return GN.has(t)?t:e}var YN,XN=Object.freeze({offset:10,keyboardCodes:{start:["Space","Enter"],cancel:["Escape"],end:["Space","Enter","Tab"],up:["ArrowUp"],down:["ArrowDown"],left:["ArrowLeft"],right:["ArrowRight"]},preventActivation(e,t){var r;const n=null!=(r=t.handle)?r:t.element;return e.target!==n}}),JN=class extends MT{constructor(e,t){super(e),this.manager=e,this.options=t,gL(this,YN,[]),this.listeners=new Tq,this.handleSourceKeyDown=(e,t,r)=>{if(this.disabled||e.defaultPrevented)return;if(!zO(e.target))return;if(t.disabled)return;const{keyboardCodes:n=XN.keyboardCodes,preventActivation:o=XN.preventActivation}=null!=r?r:{};UN(e,n.start)&&this.manager.dragOperation.status.idle&&((null==o?void 0:o(e,t))||this.handleStart(e,t,r))}}bind(e,t=this.options){const r=lk(()=>{var r;const n=null!=(r=e.handle)?r:e.element,o=r=>{FO(r)&&this.handleSourceKeyDown(r,e,t)};if(n)return n.addEventListener("keydown",o),()=>{n.removeEventListener("keydown",o)}});return r}handleStart(e,t,r){const{element:n}=t;if(!n)throw new Error("Source draggable does not have an associated element");e.preventDefault(),e.stopImmediatePropagation(),IO(n);const{center:o}=new NO(n);if(this.manager.actions.start({event:e,coordinates:{x:o.x,y:o.y},source:t}).signal.aborted)return this.cleanup();this.sideEffects();const i=bq(n),a=[this.listeners.bind(i,[{type:"keydown",listener:e=>this.handleKeyDown(e,t,r),options:{capture:!0}}])];mL(this,YN).push(...a)}handleKeyDown(e,t,r){const{keyboardCodes:n=XN.keyboardCodes}=null!=r?r:{};if(UN(e,[...n.end,...n.cancel])){e.preventDefault();const t=UN(e,n.cancel);return void this.handleEnd(e,t)}UN(e,n.up)?this.handleMove("up",e):UN(e,n.down)&&this.handleMove("down",e),UN(e,n.left)?this.handleMove("left",e):UN(e,n.right)&&this.handleMove("right",e)}handleEnd(e,t){this.manager.actions.stop({event:e,canceled:t}),this.cleanup()}handleMove(e,t){var r,n;const{shape:o}=this.manager.dragOperation,i=t.shiftKey?5:1;let a={x:0,y:0},s=null!=(n=null==(r=this.options)?void 0:r.offset)?n:XN.offset;if("number"==typeof s&&(s={x:s,y:s}),o){switch(e){case"up":a={x:0,y:-s.y*i};break;case"down":a={x:0,y:s.y*i};break;case"left":a={x:-s.x*i,y:0};break;case"right":a={x:s.x*i,y:0}}(a.x||a.y)&&(t.preventDefault(),this.manager.actions.move({event:t,by:a}))}}sideEffects(){const e=this.manager.registry.plugins.get(BN);!1===(null==e?void 0:e.disabled)&&(e.disable(),mL(this,YN).push(()=>{e.enable()}))}cleanup(){mL(this,YN).forEach(e=>e()),bL(this,YN,[])}destroy(){this.cleanup(),this.listeners.clear()}};YN=new WeakMap,JN.configure=fP(JN),JN.defaults=XN;var ZN,QN,ej,tj=JN;ZN=new WeakMap;QN=new WeakMap,ej=new WeakMap;var rj=class{};rj.Delay=class extends DT{constructor(){super(...arguments),gL(this,QN),gL(this,ej)}onEvent(e){switch(e.type){case"pointerdown":bL(this,ej,xq(e)),bL(this,QN,setTimeout(()=>this.activate(e),this.options.value));break;case"pointermove":if(!mL(this,ej))return;const{x:t,y:r}=xq(e);PD({x:t-mL(this,ej).x,y:r-mL(this,ej).y},this.options.tolerance)&&this.abort();break;case"pointerup":this.abort()}}abort(){mL(this,QN)&&(clearTimeout(mL(this,QN)),bL(this,ej,void 0),bL(this,QN,void 0))}},rj.Distance=class extends DT{constructor(){super(...arguments),gL(this,ZN)}onEvent(e){switch(e.type){case"pointerdown":bL(this,ZN,xq(e));break;case"pointermove":if(!mL(this,ZN))return;const{x:t,y:r}=xq(e),n={x:t-mL(this,ZN).x,y:r-mL(this,ZN).y},{tolerance:o}=this.options;if(o&&PD(n,o))return void this.abort();PD(n,this.options.value)&&this.activate(e);break;case"pointerup":this.abort()}}abort(){bL(this,ZN,void 0)}};var nj,oj=Object.freeze({activationConstraints(e,t){var r;const{pointerType:n,target:o}=e;if("mouse"!==n||!zO(o)||t.handle!==o&&!(null==(r=t.handle)?void 0:r.contains(o)))return"touch"===n?[new rj.Delay({value:250,tolerance:5})]:function(e){if(!zO(e))return!1;const{tagName:t}=e;return"INPUT"===t||"TEXTAREA"===t||(r=e).hasAttribute("contenteditable")&&"false"!==r.getAttribute("contenteditable");var r}(o)&&!e.defaultPrevented?[new rj.Delay({value:200,tolerance:0})]:[new rj.Delay({value:200,tolerance:10}),new rj.Distance({value:5})]},preventActivation(e,t){var r;const{target:n}=e;if(n===t.element)return!1;if(n===t.handle)return!1;if(!zO(n))return!1;if(null==(r=t.handle)?void 0:r.contains(n))return!1;const o=n.closest('\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n a[href],\n [contenteditable]:not([contenteditable="false"])\n ');return o!==t.element&&Boolean(o)}}),ij=class extends MT{constructor(e,t){super(e),this.manager=e,this.options=t,gL(this,nj,new Set),this.listeners=new Tq,this.latest={event:void 0,coordinates:void 0},this.handleMove=()=>{const{event:e,coordinates:t}=this.latest;e&&t&&this.manager.actions.move({event:e,to:t})},this.handleCancel=this.handleCancel.bind(this),this.handlePointerUp=this.handlePointerUp.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}activationConstraints(e,t,r=this.options){const{activationConstraints:n=oj.activationConstraints}=null!=r?r:{};return"function"==typeof n?n(e,t):n}bind(e,t=this.options){const r=lk(()=>{var r;const n=new AbortController,{signal:o}=n,i=r=>{(function(e){if(!e)return!1;const{PointerEvent:t}=fq(e.target);return e instanceof t})(r)&&this.handlePointerDown(r,e,t)};let a=[null!=(r=e.handle)?r:e.element];(null==t?void 0:t.activatorElements)&&(a=Array.isArray(t.activatorElements)?t.activatorElements:t.activatorElements(e));for(const e of a)e&&(cj(e.ownerDocument.defaultView),e.addEventListener("pointerdown",i,{signal:o}));return()=>n.abort()});return r}handlePointerDown(e,t,r){if(this.disabled||!e.isPrimary||0!==e.button||!zO(e.target)||t.disabled||function(e){return"sensor"in e}(e)||!this.manager.dragOperation.status.idle)return;const{preventActivation:n=oj.preventActivation}=null!=r?r:{};if(null==n?void 0:n(e,t))return;const{target:o}=e,i=mq(o)&&o.draggable&&"true"===o.getAttribute("draggable"),a=yO(t.element),{x:s,y:l}=xq(e);this.initialCoordinates={x:s*a.scaleX+a.x,y:l*a.scaleY+a.y};const u=this.activationConstraints(e,t,r);e.sensor=this;const c=new kT(u,e=>this.handleStart(t,e));c.signal.onabort=()=>this.handleCancel(e),c.onEvent(e),this.controller=c;const d=wq(),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:i?this.handleCancel:sj,options:{capture:!0}}]);mL(this,nj).add(()=>{p(),this.initialCoordinates=void 0})}handlePointerMove(e,t){var r,n;!1===(null==(r=this.controller)?void 0:r.activated)&&(null==(n=this.controller)||n.onEvent(e));const{status:o}=this.manager.dragOperation;if(o.initializing||o.dragging){const r=xq(e),n=yO(t.element);r.x=r.x*n.scaleX+n.x,r.y=r.y*n.scaleY+n.y,e.preventDefault(),e.stopPropagation(),this.latest.event=e,this.latest.coordinates=r,o.dragging&&dO.schedule(this.handleMove)}}handlePointerUp(e){const{status:t}=this.manager.dragOperation;if(!t.idle){e.preventDefault(),e.stopPropagation();const r=!t.initialized,n=bq(e.target),o=n.defaultView;if(!r&&o){const e=e=>{e.target===n.body&&e.detail>0&&(e.preventDefault(),e.stopImmediatePropagation())};o.addEventListener("click",e,!0),o.setTimeout(()=>{o.removeEventListener("click",e,!0)},0)}this.manager.actions.stop({event:e,canceled:r})}this.cleanup()}handleKeyDown(e){"Escape"===e.key&&(e.preventDefault(),this.handleCancel(e))}handleStart(e,t){const{manager:r,initialCoordinates:n}=this;if(!n||!r.dragOperation.status.idle)return;if(t.defaultPrevented)return;const o=r.actions.start({coordinates:n,event:t,source:e});if(o.signal.aborted)return this.cleanup();t.preventDefault();const i=bq(t.target).body;try{i.setPointerCapture(t.pointerId)}catch(e){return void this.handleCancel(t)}const a=zO(t.target)?[t.target,i]:i,s=this.listeners.bind(a,[{type:"touchmove",listener:sj,options:{passive:!1}},{type:"click",listener:sj},{type:"contextmenu",listener:sj},{type:"keydown",listener:this.handleKeyDown}]);mL(this,nj).add(s),r.renderer.rendering.then(()=>{!o.signal.aborted&&r.dragOperation.status.dragging&&dO.schedule(this.handleMove)})}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},mL(this,nj).forEach(e=>e()),mL(this,nj).clear()}destroy(){this.cleanup(),this.listeners.clear()}};nj=new WeakMap,ij.configure=fP(ij),ij.defaults=oj;var aj=ij;function sj(e){e.preventDefault()}function lj(){}var uj=new WeakSet;function cj(e){e&&!uj.has(e)&&(e.addEventListener("touchmove",lj,{capture:!1,passive:!1}),uj.add(e))}var dj,pj,fj,hj,mj,gj,bj,vj,yj,xj,Sj,wj,Cj,Ej,Rj,Aj,Ij={modifiers:[],plugins:[ML,BN,class extends mP{constructor(e,t){super(e,t),this.manager=e;const{cursor:r="grabbing"}=null!=t?t:{},n=e.registry.plugins.get(KL),o=null==n?void 0:n.register(`* { cursor: ${r} !important; }`);if(o){const e=this.destroy.bind(this);this.destroy=()=>{o(),e()}}}},EN,class extends mP{constructor(e){super(e),this.manager=e;const t=e.registry.plugins.get(KL),r=null==t?void 0:t.register("* { user-select: none !important; -webkit-user-select: none !important; }");if(this.destroy=lk(()=>{const{dragOperation:e}=this.manager;if(e.status.initialized)return WN(),document.addEventListener("selectionchange",WN,{capture:!0}),()=>{document.removeEventListener("selectionchange",WN,{capture:!0})}}),r){const e=this.destroy.bind(this);this.destroy=()=>{r(),e()}}}}],sensors:[aj,tj]},Mj=class extends tq{constructor(e={}){const t=eq(e.plugins,Ij.plugins),r=eq(e.sensors,Ij.sensors),n=eq(e.modifiers,Ij.modifiers);super(nL(rL({},e),{plugins:[VN,jN,KL,...t],sensors:r,modifiers:n}))}},kj=class extends(fj=sT,pj=[eD],dj=[eD],fj){constructor(e,t){var r=e,{element:n,effects:o=()=>[],handle:i}=r,a=iL(r,["element","effects","handle"]);super(rL({effects:()=>[...o(),()=>{var e,t;const{manager:r}=this;if(!r)return;const n=(null!=(t=null==(e=this.sensors)?void 0:e.map(hP))?t:[...r.sensors]).map(e=>{const t=e instanceof MT?e:r.registry.register(e.plugin),n=e instanceof MT?void 0:e.options;return t.bind(this,n)});return function(){n.forEach(e=>e())}}]},a),t),gL(this,mj,dL(hj,8,this)),dL(hj,11,this),gL(this,gj,dL(hj,12,this)),dL(hj,15,this),this.element=n,this.handle=i}};hj=aL(fj),mj=new WeakMap,gj=new WeakMap,pL(hj,4,"handle",pj,kj,mj),pL(hj,4,"element",dj,kj,gj),cL(hj,kj);var Dj=class extends(yj=lT,vj=[eD],bj=[eD],yj){constructor(e,t){var r=e,{element:n,effects:o=()=>[]}=r,i=iL(r,["element","effects"]);const{collisionDetector:a=HO}=i,s=e=>{const{manager:t,element:r}=this;if(!r||null===e)return void(this.shape=void 0);if(!t)return;const n=new NO(r),o=BM(()=>this.shape);return n&&(null==o?void 0:o.equals(n))?o:(this.shape=n,n)},l=ZM(!1);super(nL(rL({},i),{collisionDetector:a,effects:()=>[...o(),()=>{const{element:e,manager:t}=this;if(!t)return;const{dragOperation:r}=t,{source:n}=r;l.value=Boolean(n&&r.status.initialized&&e&&!this.disabled&&this.accepts(n))},()=>{const{element:e}=this;if(l.value&&e){const t=new oO(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),gL(this,Rj),gL(this,Sj,dL(xj,8,this)),dL(xj,11,this),gL(this,Aj,dL(xj,12,this)),dL(xj,15,this),this.element=n,this.refreshShape=()=>s()}set element(e){bL(this,Rj,e,Ej)}get element(){var e;return null!=(e=this.proxy)?e:mL(this,Rj,Cj)}};function Pj(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}xj=aL(yj),Sj=new WeakMap,Rj=new WeakSet,Aj=new WeakMap,wj=pL(xj,20,"#element",vj,Rj,Sj),Cj=wj.get,Ej=wj.set,pL(xj,4,"proxy",bj,Dj,Aj),cL(xj,Dj);var Tj="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?L:P;function qj(){const e=I(0)[1];return q(()=>{e(e=>e+1)},[e])}function Oj(e,t=[],r=!1){const n=M(e);return n.current=e,function(e,t=!1){const r=M(e.peek()),n=M(!1),o=qj();return Tj(()=>lk(()=>{const i=r.current,a=e.value;if(i!==a){if(r.current=a,!n.current)return;t?V(o):o()}}),[e,t,o]),{get value(){return n.current=!0,e.peek()}}}(A(()=>Zk(()=>n.current()),t),r)}function Lj(e){const t=M(e);return Tj(()=>{t.current=e},[e]),t}function Nj(e,t){const r=qj(),n=Lj(t),o=A(()=>{const t=new Map;return{tracked:t,propertyCount:ZM(0),active:!1,proxy:e?new Proxy(e,{get(e,r){const n=e[r];return t.has(r)||t.set(r,n),n}}):e}},[e]);return Tj(()=>{o.propertyCount.value=o.tracked.size}),Tj(()=>{if(!e)return;const{tracked:t,propertyCount:i}=o;o.active=!0;const a=lk(()=>{i.value;let a=!1,s=!1;for(const[r,o]of t){const i=e[r];Object.is(o,i)||(a=!0,t.set(r,i),s=!0===BM(()=>{var e;return null==(e=n.current)?void 0:e.call(n,r,o,i)})||s)}a&&(s?queueMicrotask(()=>{o.active&&V(r)}):r())});return()=>{o.active=!1,a()}},[e,o,r,n]),o.proxy}function jj(e,t){e()}function _j(e,t,r=P,n=Object.is){const o=M(e);r(()=>{const r=o.current;n(e,r)||(o.current=e,t(e,r))},[t,e])}function zj(e,t){const r=M(Pj(e));Tj(()=>{const n=Pj(e);n!==r.current&&(r.current=n,t(n))})}var Fj=Object.defineProperty,$j=Object.defineProperties,Bj=Object.getOwnPropertyDescriptors,Hj=Object.getOwnPropertySymbols,Vj=Object.prototype.hasOwnProperty,Wj=Object.prototype.propertyIsEnumerable,Uj=(e,t,r)=>t in e?Fj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Gj=k(new Mj),Kj=j(_(({children:e},t)=>{const[r,n]=I(0),o=M(null),i=M(null),a=A(()=>({renderer:{get rendering(){var e;return null!=(e=o.current)?e:Promise.resolve()}},trackRendering(e){o.current||(o.current=new Promise(e=>{i.current=e})),z(()=>{e(),n(e=>e+1)})}}),[]);return Tj(()=>{var e;null==(e=i.current)||e.call(i),o.current=null},[e,r]),F(t,()=>a),null})),Yj=[void 0,Qk];function Xj(e){var t=e,{children:r,onCollision:n,onBeforeDragStart:o,onDragStart:i,onDragMove:a,onDragOver:s,onDragEnd:l}=t,u=((e,t)=>{var r={};for(var n in e)Vj.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&Hj)for(var n of Hj(e))t.indexOf(n)<0&&Wj.call(e,n)&&(r[n]=e[n]);return r})(t,["children","onCollision","onBeforeDragStart","onDragStart","onDragMove","onDragOver","onDragEnd"]);const c=M(null),{plugins:d,modifiers:p,sensors:f}=u,h=eq(d,Ij.plugins),m=eq(f,Ij.sensors),g=eq(p,Ij.modifiers),b=Lj(o),v=Lj(i),y=Lj(s),x=Lj(a),S=Lj(l),w=Lj(n),C=function(e){const t=M(null);t.current||(t.current=e());return N(()=>()=>{var e;return null==(e=t.current)?void 0:e.destroy()},[]),t.current}(()=>{var e;return null!=(e=u.manager)?e:new Mj(u)});return P(()=>{if(!c.current)throw new Error("Renderer not found");const{renderer:e,trackRendering:t}=c.current,{monitor:r}=C;C.renderer=e;const n=[r.addEventListener("beforedragstart",e=>{const r=b.current;r&&t(()=>r(e,C))}),r.addEventListener("dragstart",e=>{var t;return null==(t=v.current)?void 0:t.call(v,e,C)}),r.addEventListener("dragover",e=>{const r=y.current;r&&t(()=>r(e,C))}),r.addEventListener("dragmove",e=>{const r=x.current;r&&t(()=>r(e,C))}),r.addEventListener("dragend",e=>{const r=S.current;r&&t(()=>r(e,C))}),r.addEventListener("collision",e=>{var t;return null==(t=w.current)?void 0:t.call(w,e,C)})];return()=>n.forEach(e=>e())},[C]),_j(h,()=>C&&(C.plugins=h),...Yj),_j(m,()=>C&&(C.sensors=m),...Yj),_j(g,()=>C&&(C.modifiers=g),...Yj),Gt.jsxs(Gj.Provider,{value:C,children:[Gt.jsx(Kj,{ref:c,children:r}),r]})}function Jj(){return O(Gj)}function Zj(e){var t;const r=null!=(t=Jj())?t:void 0,[n]=I(()=>e(r));return n.manager!==r&&(n.manager=r),Tj(n.register,[r,n]),n}function Qj({children:e,className:t,dropAnimation:r,style:n,tag:o,disabled:i}){var a;const s=M(null),l=Jj(),u=null!=(a=Oj(()=>null==l?void 0:l.dragOperation.source,[l]).value)?a:null,c="function"==typeof i?i(u):i;P(()=>{if(!s.current||!l||c)return;const e=l.plugins.find(e=>e instanceof EN);return e?(e.overlay=s.current,()=>{e.overlay=void 0}):void 0},[l,c]),P(()=>{if(!l)return;const e=l.plugins.find(e=>e instanceof EN);return e?(e.dropAnimation=r,()=>{e.dropAnimation=void 0}):void 0},[l,r]);const d=A(()=>{if(!l)return null;const e=new Proxy(l.registry,{get:(e,t)=>"register"===t||"unregister"===t?e_:e[t]});return new Proxy(l,{get:(t,r)=>"registry"===r?e:t[r]})},[l]);return Gt.jsx(Gj.Provider,{value:d,children:w(o||"div",{ref:s,className:t,style:n,"data-dnd-overlay":!0},function(){if(!u||c)return null;if("function"==typeof e)return Gt.jsx(t_,{source:u,children:e});return e}())})}function e_(){return()=>{}}function t_({children:e,source:t}){return e(Nj(t))}var r_,n_,o_,i_,a_,s_=Object.create,l_=Object.defineProperty,u_=Object.getOwnPropertyDescriptor,c_=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),d_=e=>{throw TypeError(e)},p_=["class","method","getter","setter","accessor","field","value","get","set"],f_=e=>void 0!==e&&"function"!=typeof e?d_("Function expected"):e,h_=(e,t,r,n,o)=>({kind:p_[e],name:t,metadata:n,addInitializer:e=>r._?d_("Already initialized"):o.push(f_(e||null))}),m_=(e,t,r,n,o,i)=>{for(var a,s,l,u,c=7&t,d=p_[c+5],p=e[2]||(e[2]=[]),f=(o=o.prototype,u_(o,r)),h=n.length-1;h>=0;h--)(l=h_(c,r,s={},e[3],p)).static=false,l.private=false,u=l.access={has:e=>r in e},u.get=e=>e[r],a=(0,n[h])(f[d],l),s._=1,f_(a)&&(f[d]=a);return f&&l_(o,r,f),o},g_=(e,t,r)=>t.has(e)||d_("Cannot "+r),b_=class e{constructor(e,t){this.x=e,this.y=t}static delta(t,r){return new e(t.x-r.x,t.y-r.y)}static distance(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}static equals(e,t){return e.x===t.x&&e.y===t.y}static from({x:t,y:r}){return new e(t,r)}},v_=class extends(o_=iD,n_=[tD],r_=[tD],o_){constructor(e){var t,r,n;super(b_.from(e),(e,t)=>b_.equals(e,t)),((e,t,r)=>{for(var n=0,o=e[t>>1],i=o&&o.length;n<i;n++)o[n].call(r)})(a_,5,this),t=this,n=0,(r=i_).has(t)?d_("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(t):r.set(t,n),this.velocity={x:0,y:0}}get delta(){return b_.delta(this.current,this.initial)}get direction(){const{current:e,previous:t}=this;if(!t)return null;const r={x:e.x-t.x,y:e.y-t.y};return r.x||r.y?Math.abs(r.x)>Math.abs(r.y)?r.x>0?"right":"left":r.y>0?"down":"up":null}get current(){return super.current}set current(e){const{current:t}=this,r=b_.from(e),n={x:r.x-t.x,y:r.y-t.y},o=Date.now(),i=o-(g_(a=this,s=i_,"read from private field"),s.get(a));var a,s;const l=e=>Math.round(e/i*100);zM(()=>{((e,t,r)=>{g_(e,t,"write to private field"),t.set(e,r)})(this,i_,o),this.velocity={x:l(n.x),y:l(n.y)},super.current=r})}reset(e=this.defaultValue){super.reset(b_.from(e)),this.velocity={x:0,y:0}}};a_=(e=>{var t;return[,,,s_(null!=(t=null==e?void 0:e[c_("metadata")])?t:null)]})(o_),i_=new WeakMap,m_(a_,2,"delta",n_,v_),m_(a_,2,"direction",r_,v_),((e,t)=>{((e,t,r)=>{t in e?l_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(t,c_("metadata"),e[3])})(a_,v_);var y_=(e=>(e.Horizontal="x",e.Vertical="y",e))(y_||{});Object.values(y_);var x_=e=>{var t;return null!=(t=(({dragOperation:e,droppable:t})=>{const r=e.position.current;if(!r)return null;const{id:n}=t;if(!t.shape)return null;if(t.shape.containsPoint(r))return{id:n,value:1/b_.distance(t.shape.center,r),type:ET.PointerIntersection,priority:CT.High};return null})(e))?t:(({dragOperation:e,droppable:t})=>{const{shape:r}=e;if(!t.shape||!(null==r?void 0:r.current))return null;const n=r.current.intersectionArea(t.shape);if(n){const{position:o}=e,i=b_.distance(t.shape.center,o.current),a=n/(r.current.area+t.shape.area-n)/i;return{id:t.id,value:a,type:ET.ShapeIntersection,priority:CT.Normal}}return null})(e)};function S_(e){const{collisionDetector:t,data:r,disabled:n,element:o,id:i,accept:a,type:s}=e,l=Zj(t=>new Dj(((e,t)=>$j(e,Bj(t)))(((e,t)=>{for(var r in t||(t={}))Vj.call(t,r)&&Uj(e,r,t[r]);if(Hj)for(var r of Hj(t))Wj.call(t,r)&&Uj(e,r,t[r]);return e})({},e),{register:!1,element:Pj(o)}),t)),u=Nj(l);return _j(i,()=>l.id=i),zj(o,e=>l.element=e),_j(a,()=>l.accept=a,void 0,Qk),_j(t,()=>l.collisionDetector=null!=t?t:x_),_j(r,()=>r&&(l.data=r)),_j(n,()=>l.disabled=!0===n),_j(s,()=>l.type=s),{droppable:u,get isDropTarget(){return u.isDropTarget},ref:q(e=>{var t,r;(e||!(null==(t=l.element)?void 0:t.isConnected)||(null==(r=l.manager)?void 0:r.dragOperation.status.idle))&&(l.element=null!=e?e:void 0)},[l])}}function w_(e){const t=Jj();P(()=>{if(!t)return;const r=Object.entries(e).reduce((e,[r,n])=>{if(n){const o=r.replace(/^on/,"").toLowerCase(),i=t.monitor.addEventListener(o,n);e.push(i)}return e},[]);return()=>r.forEach(e=>null==e?void 0:e())},[t,e])}const C_=e=>Array.from({length:e},(e,t)=>t),E_=({id:e,sectionIndex:t,itemIndex:r})=>Gt.jsx("span",{children:`${e}-${t}-${r}`}),R_=j(()=>{const e=Jg(MM)??E_,{startSectionIndex:t,startIndex:r,id:n}=Jg(TM)??{};return"number"!=typeof t||"number"!=typeof r||void 0===n?null:Gt.jsx(Qj,{dropAnimation:null,children:Gt.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:Gt.jsx(e,{id:n,sectionIndex:t,itemIndex:r})})})}),A_=({sectionIndex:e,itemIndex:t,isDragging:r})=>{const n=Jg(TM),o=n?.toSectionIndex===e&&n.toIndex===t;return Gt.jsx("div",{"data-key":"drop-target-indicator","data-testid":"drop-target-indicator",style:{visibility:o&&!r?"visible":"hidden",padding:0,background:"rgba(64, 64, 64, 1)",borderRadius:2,marginLeft:"4px",width:"calc(100% - 8px)",height:"2px"}})},I_=(e,t)=>e?"2px solid rgba(0, 135, 61, 1)":t?"1px dashed rgba(0, 0, 0, 0.43)":void 0,M_=j(({sectionIndex:e})=>{const t=Jg(SM)[e],r=Jg(wM),n=Jg(CM),o=null!==Jg(TM),i=n(e),a=r({sectionIndex:e}),{ref:s,isDropTarget:l}=S_({id:a,type:"section",accept:"item",collisionPriority:CT.Low,data:{id:a,sectionIndex:e,sectionKey:a}});return t>0?null:Gt.jsxs(yd,{ref:s,sx:{margin:"4px",outline:I_(l,o),borderRadius:"4px",boxSizing:"border-box"},children:[Gt.jsx(yd,{sx:{position:"relative",top:"4px"},children:Gt.jsx(A_,{sectionIndex:e,itemIndex:0,isDragging:!1})}),Gt.jsxs(yd,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px",padding:"20px 4px"},children:[Gt.jsx(Lc,{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:i.title}),Gt.jsx(Lc,{sx:{textAlign:"center",width:"fit-content",maxWidth:"100%",overflowWrap:"break-word",textOverflow:"ellipsis",fontSize:"12px",lineHeight:"150%",color:"rgba(64, 64, 64, 1)"},children:i.message})]})]})}),k_=j(({id:e,sectionIndex:t})=>{const r=Jg(IM);return void 0===r?null:w(r,{id:e,sectionIndex:t})});var D_=Object.defineProperty,P_=Object.defineProperties,T_=Object.getOwnPropertyDescriptors,q_=Object.getOwnPropertySymbols,O_=Object.prototype.hasOwnProperty,L_=Object.prototype.propertyIsEnumerable,N_=(e,t,r)=>t in e?D_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,j_=(e,t)=>{for(var r in t||(t={}))O_.call(t,r)&&N_(e,r,t[r]);if(q_)for(var r of q_(t))L_.call(t,r)&&N_(e,r,t[r]);return e},__=(e,t)=>P_(e,T_(t)),z_=class extends XT{apply({transform:e}){if(!this.options)return e;const{axis:t,value:r}=this.options;return __(j_({},e),{[t]:r})}};z_.configure=fP(z_);var F_=z_,$_=F_.configure({axis:"x",value:0});F_.configure({axis:"y",value:0});var B_=class extends XT{apply({transform:e}){var t;const{size:r=20}=null!=(t=this.options)?t:{},n="number"==typeof r?r:r.x,o="number"==typeof r?r:r.y;return __(j_({},e),{x:Math.ceil(e.x/n)*n,y:Math.ceil(e.y/o)*o})}};B_.configure=fP(B_);var H_=Object.create,V_=Object.defineProperty,W_=Object.defineProperties,U_=Object.getOwnPropertyDescriptor,G_=Object.getOwnPropertyDescriptors,K_=Object.getOwnPropertySymbols,Y_=Object.prototype.hasOwnProperty,X_=Object.prototype.propertyIsEnumerable,J_=e=>{throw TypeError(e)},Z_=(e,t,r)=>t in e?V_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Q_=(e,t)=>{for(var r in t||(t={}))Y_.call(t,r)&&Z_(e,r,t[r]);if(K_)for(var r of K_(t))X_.call(t,r)&&Z_(e,r,t[r]);return e},ez=(e,t)=>W_(e,G_(t)),tz=["class","method","getter","setter","accessor","field","value","get","set"],rz=e=>void 0!==e&&"function"!=typeof e?J_("Function expected"):e,nz=(e,t,r,n,o)=>({kind:tz[e],name:t,metadata:n,addInitializer:e=>r._?J_("Already initialized"):o.push(rz(e||null))}),oz=(e,t,r,n)=>{for(var o=0,i=e[t>>1],a=i&&i.length;o<a;o++)1&t?i[o].call(r):n=i[o].call(r,n);return n},iz=(e,t,r,n,o,i)=>{for(var a,s,l,u,c,d=7&t,p=e.length+1,f=tz[d+5],h=e[p-1]=[],m=e[p]||(e[p]=[]),g=(o=o.prototype,U_({get[r](){return sz(this,i)},set[r](e){return uz(this,i,e)}},r)),b=n.length-1;b>=0;b--)(u=nz(d,r,l={},e[3],m)).static=false,u.private=false,c=u.access={has:e=>r in e},c.get=e=>e[r],c.set=(e,t)=>e[r]=t,s=(0,n[b])({get:g.get,set:g.set},u),l._=1,void 0===s?rz(s)&&(g[f]=s):"object"!=typeof s||null===s?J_("Object expected"):(rz(a=s.get)&&(g.get=a),rz(a=s.set)&&(g.set=a),rz(a=s.init)&&h.unshift(a));return g&&V_(o,r,g),o},az=(e,t,r)=>t.has(e)||J_("Cannot "+r),sz=(e,t,r)=>(az(e,t,"read from private field"),t.get(e)),lz=(e,t,r)=>t.has(e)?J_("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),uz=(e,t,r,n)=>(az(e,t,"write to private field"),t.set(e,r),r);function cz(e){return e instanceof Uz||e instanceof Wz}var dz=class extends mP{constructor(e){super(e);const t=lk(()=>{const{dragOperation:t}=e;if(FO(t.activatorEvent)&&cz(t.source)&&t.status.initialized){const t=e.registry.plugins.get(jN);if(t)return t.disable(),()=>t.enable()}}),r=e.monitor.addEventListener("dragmove",(e,t)=>{queueMicrotask(()=>{if(this.disabled||e.defaultPrevented||!e.nativeEvent)return;const{dragOperation:r}=t;if(!FO(e.nativeEvent))return;if(!cz(r.source))return;if(!r.shape)return;const{actions:n,collisionObserver:o,registry:i}=t,{by:a}=e;if(!a)return;const s=function(e){const{x:t,y:r}=e;if(t>0)return"right";if(t<0)return"left";if(r>0)return"down";if(r<0)return"up"}(a),{source:l,target:u}=r,{center:c}=r.shape.current,d=[],p=[];zM(()=>{for(const e of i.droppables){const{id:t}=e;if(!e.accepts(l)||t===(null==u?void 0:u.id)&&cz(e)||!e.element)continue;let r=e.shape;const n=new NO(e.element,{getBoundingClientRect:e=>yq(e,void 0,.2)});n.height&&n.width&&(("down"==s&&c.y+10<n.center.y||"up"==s&&c.y-10>n.center.y||"left"==s&&c.x-10>n.center.x||"right"==s&&c.x+10<n.center.x)&&(d.push(e),e.shape=n,p.push(()=>e.shape=r)))}}),e.preventDefault(),o.disable();const f=o.computeCollisions(d,VO);zM(()=>p.forEach(e=>e()));const[h]=f;if(!h)return;const{id:m}=h,{index:g,group:b}=l.sortable;n.setDropTarget(m).then(()=>{const{source:e,target:t,shape:i}=r;if(!e||!cz(e)||!i)return;const{index:a,group:s,target:l}=e.sortable,u=g!==a||b!==s,c=u?l:null==t?void 0:t.element;if(!c)return;IO(c);const d=new NO(c);if(!d)return;const p=MD.delta(d,MD.from(i.current.boundingRectangle),e.alignment);n.move({by:p}),u?n.setDropTarget(e.id).then(()=>o.enable()):o.enable()})})});this.destroy=()=>{r(),t()}}};var pz=Object.defineProperty,fz=Object.defineProperties,hz=Object.getOwnPropertyDescriptors,mz=Object.getOwnPropertySymbols,gz=Object.prototype.hasOwnProperty,bz=Object.prototype.propertyIsEnumerable,vz=(e,t,r)=>t in e?pz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,yz=(e,t)=>{for(var r in t||(t={}))gz.call(t,r)&&vz(e,r,t[r]);if(mz)for(var r of mz(t))bz.call(t,r)&&vz(e,r,t[r]);return e},xz=(e,t)=>fz(e,hz(t));function Sz(e,t,r){if(t===r)return e;const n=e.slice();return n.splice(r,0,n.splice(t,1)[0]),n}function wz(e,t){const r=String(t);return Object.prototype.hasOwnProperty.call(e,r)?r:void 0}function Cz(e){return"initialIndex"in e&&"number"==typeof e.initialIndex&&"index"in e&&"number"==typeof e.index}function Ez(e,t){return function(e,t,r){var n,o;const{source:i,target:a,canceled:s}=t.operation;if(!i||!a||s)return"preventDefault"in t&&t.preventDefault(),e;const l=(e,t)=>e===t||null!==e&&"object"==typeof e&&"id"in e&&e.id===t;if(Array.isArray(e)){const n=e.findIndex(e=>l(e,i.id)),o=e.findIndex(e=>l(e,a.id));if(-1===n||-1===o){if(Cz(i)){const n=i.initialIndex,o=i.index;return n===o||n<0||n>=e.length?("preventDefault"in t&&t.preventDefault(),e):r(e,n,o)}return e}if(!s&&"index"in i&&"number"==typeof i.index){const t=i.index;if(t!==n)return r(e,n,t)}return r(e,n,o)}const u=Object.entries(e);let c,d,p=-1,f=-1;for(const[e,t]of u)if(-1===p&&(p=t.findIndex(e=>l(e,i.id)),-1!==p&&(c=e)),-1===f&&(f=t.findIndex(e=>l(e,a.id)),-1!==f&&(d=e)),-1!==p&&-1!==f)break;if(-1===p&&Cz(i)){const n=null==i.initialGroup?void 0:wz(e,i.initialGroup),o=i.initialIndex,a=null==i.group?void 0:wz(e,i.group),s=i.index;if(null==n||null==a)return"preventDefault"in t&&t.preventDefault(),e;if(n===a&&o===s)return"preventDefault"in t&&t.preventDefault(),e;if(n===a)return xz(yz({},e),{[n]:r(e[n],o,s)});const l=e[n][o];return xz(yz({},e),{[n]:[...e[n].slice(0,o),...e[n].slice(o+1)],[a]:[...e[a].slice(0,s),l,...e[a].slice(s)]})}if(!i.manager)return e;const{dragOperation:h}=i.manager,m=null!=(o=null==(n=h.shape)?void 0:n.current.center)?o:h.position.current;if(null==d){const t=wz(e,a.id);null!=t&&(d=t,f=a.shape&&m.y>a.shape.center.y?e[t].length:0)}if(null==c||null==d||c===d&&p===f){if(null!=c&&c===d&&p===f&&Cz(i)){const t=null==i.group?void 0:wz(e,i.group),n=null!=i.group&&t!==c,o=i.index!==p;if(n||o){const n=null==i.group?c:t;if(null!=n){if(c===n)return xz(yz({},e),{[c]:r(e[c],p,i.index)});const t=e[c][p];return xz(yz({},e),{[c]:[...e[c].slice(0,p),...e[c].slice(p+1)],[n]:[...e[n].slice(0,i.index),t,...e[n].slice(i.index)]})}}}return"preventDefault"in t&&t.preventDefault(),e}if(c===d)return xz(yz({},e),{[c]:r(e[c],p,f)});const g=a.shape&&Math.round(m.y)>Math.round(a.shape.center.y)?1:0,b=e[c][p];return xz(yz({},e),{[c]:[...e[c].slice(0,p),...e[c].slice(p+1)],[d]:[...e[d].slice(0,f+g),b,...e[d].slice(f+g)]})}(e,t,Sz)}function Rz(e){const t=new Map;for(const[,r]of e)for(const e of r)t.set(e.id,e.index);return t}function Az(e,t,r){var n;for(const[o,i]of t)for(const t of i){const i=e.get(t.id);if(t.index!==i||t.group!==o||!(null==(n=r.get(o))?void 0:n.has(t)))return!0}return!1}var Iz="__default__";function Mz(e,t,r,n){const o=n<t?"afterend":"beforebegin";r.insertAdjacentElement(o,e)}function kz(e,t){return e.index-t.index}function Dz(e,t){return e.initialIndex-t.initialIndex}function Pz(e,t=kz){return Array.from(e).sort(t)}var Tz=[dz,class extends mP{constructor(e){super(e);const t=()=>{const t=new Map;for(const r of e.registry.droppables)if(r instanceof Uz){const{sortable:e}=r,{group:n}=e;let o=t.get(n);o||(o=new Set,t.set(n,o)),o.add(e)}return t},r=[e.monitor.addEventListener("dragover",(e,r)=>{if(this.disabled)return;const{dragOperation:n}=r,{source:o,target:i}=n;if(!cz(o)||!cz(i))return;if(o.sortable===i.sortable)return;const a=t(),s=Rz(a),l=o.sortable.group===i.sortable.group,u=a.get(o.sortable.group),c=l?u:a.get(i.sortable.group);u&&c&&queueMicrotask(()=>{e.defaultPrevented||r.renderer.rendering.then(()=>{var n,d;const p=t();if(Az(s,a,p))return;const f=o.sortable.element,h=i.sortable.element;if(!h||!f)return;if(!l&&i.id===o.sortable.group)return;const m=Pz(u),g=l?m:Pz(c),b=null!=(n=o.sortable.group)?n:Iz,v=null!=(d=i.sortable.group)?d:Iz,y={[b]:m,[v]:g},x=Ez(y,e);if(y===x)return;const S=x[v].indexOf(o.sortable),w=x[v].indexOf(i.sortable);r.collisionObserver.disable(),Mz(f,S,h,w),zM(()=>{for(const[e,t]of x[b].entries())t.index=e;if(!l)for(const[e,t]of x[v].entries())t.group=i.sortable.group,t.index=e}),r.actions.setDropTarget(o.id).then(()=>r.collisionObserver.enable())})})}),e.monitor.addEventListener("dragend",(e,r)=>{if(!e.canceled)return;const{dragOperation:n}=r,{source:o}=n;cz(o)&&(o.sortable.initialIndex===o.sortable.index&&o.sortable.initialGroup===o.sortable.group||queueMicrotask(()=>{const e=t(),n=Rz(e),i=e.get(o.sortable.initialGroup);i&&r.renderer.rendering.then(()=>{const r=t();if(Az(n,e,r))return;const a=Pz(i),s=Pz(i,Dz),l=o.sortable.element,u=a[s.indexOf(o.sortable)],c=null==u?void 0:u.element;u&&c&&l&&(Mz(l,u.index,c,o.index),zM(()=>{for(const t of e.values()){const e=Array.from(t).values();for(const t of e)t.index=t.initialIndex,t.group=t.initialGroup}}))})}))})];this.destroy=()=>{for(const e of r)e()}}}],qz={duration:250,easing:"cubic-bezier(0.25, 1, 0.5, 1)",idle:!1};function Oz(e){var t,r;return"boolean"==typeof e?{draggable:e,droppable:e}:{draggable:null!=(t=null==e?void 0:e.draggable)&&t,droppable:null!=(r=null==e?void 0:e.droppable)&&r}}var Lz,Nz,jz,_z,zz,Fz,$z,Bz,Hz=new class{constructor(){Yk(this,oD,new WeakMap)}get(e,t){var r;return e?null==(r=Kk(this,oD).get(e))?void 0:r.get(t):void 0}set(e,t,r){var n;if(e)return Kk(this,oD).has(e)||Kk(this,oD).set(e,new Map),null==(n=Kk(this,oD).get(e))?void 0:n.set(t,r)}clear(e){var t;return e?null==(t=Kk(this,oD).get(e))?void 0:t.clear():void 0}};Nz=[eD],Lz=[eD];var Vz=class{constructor(e,t){lz(this,_z,oz(jz,8,this)),oz(jz,11,this),lz(this,zz),lz(this,Fz),lz(this,$z,oz(jz,12,this)),oz(jz,15,this),lz(this,Bz),this.register=()=>(zM(()=>{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=()=>{zM(()=>{var e,t;null==(e=this.manager)||e.registry.unregister(this.droppable),null==(t=this.manager)||t.registry.unregister(this.draggable)})},this.destroy=()=>{zM(()=>{this.droppable.destroy(),this.draggable.destroy()})};var r=e,{effects:n=()=>[],disabled:o,group:i,index:a,sensors:s,type:l,transition:u=qz,plugins:c}=r,d=((e,t)=>{var r={};for(var n in e)Y_.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&K_)for(var n of K_(e))t.indexOf(n)<0&&X_.call(e,n)&&(r[n]=e[n]);return r})(r,["effects","disabled","group","index","sensors","type","transition","plugins"]);const p=eq(c,Tz),f=Oz(o);this.droppable=new Uz(ez(Q_({},d),{disabled:f.droppable}),t,this),this.draggable=new Wz(ez(Q_({},d),{disabled:f.draggable,plugins:p,effects:()=>[()=>{var e,t,r;const n=null==(e=this.manager)?void 0:e.dragOperation.status;(null==n?void 0:n.initializationPending)&&this.id===(null==(r=null==(t=this.manager)?void 0:t.dragOperation.source)?void 0:r.id)&&Hz.clear(this.manager),(null==n?void 0:n.dragging)&&Hz.set(this.manager,this.id,BM(()=>({initialIndex:this.index,initialGroup:this.group})))},()=>{const{index:e,group:t,manager:r}=this,n=sz(this,Fz),o=sz(this,zz);e===n&&t===o||(uz(this,Fz,e),uz(this,zz,t),this.animate())},()=>{var e,t;const{target:r}=this,{isDragSource:n}=this.draggable;"move"===(null!=(t=null==(e=this.draggable.pluginConfig(EN))?void 0:e.feedback)?t:"default")&&n&&(this.droppable.disabled=!r)},...n()],type:l,sensors:s}),t,this),uz(this,Bz,d.element),this.manager=t,this.index=a,uz(this,Fz,a),this.group=i,uz(this,zz,i),this.type=l,this.transition=u}get initialIndex(){var e,t;return null!=(t=null==(e=Hz.get(this.manager,this.id))?void 0:e.initialIndex)?t:this.index}get initialGroup(){var e,t;return null!=(t=null==(e=Hz.get(this.manager,this.id))?void 0:e.initialGroup)?t:this.group}animate(){BM(()=>{const{manager:e,transition:t}=this,{shape:r}=this.droppable;if(!e)return;const{idle:n}=e.dragOperation.status;r&&t&&(!n||t.idle)&&e.renderer.rendering.then(()=>{const{element:n}=this;if(!n)return;for(const e of n.getAnimations())!("transitionProperty"in e)||"transform"!==e.transitionProperty&&"translate"!==e.transitionProperty&&"scale"!==e.transitionProperty||e.cancel();const o=this.refreshShape();if(!o)return;const i=r.boundingRectangle.left-o.boundingRectangle.left,a=r.boundingRectangle.top-o.boundingRectangle.top,{translate:s}=mO(n),l=PO(n,s,!1),u=PO(n,s);if(i||a){const r=Iq(fq(n))?ez(Q_({},t),{duration:0}):t;DO({element:n,keyframes:{translate:[`${l.x+i}px ${l.y+a}px ${l.z}`,`${u.x}px ${u.y}px ${u.z}`]},options:r}).then(()=>{e.dragOperation.status.dragging||(this.droppable.shape=void 0)})}})})}get manager(){return this.draggable.manager}set manager(e){zM(()=>{this.draggable.manager=e,this.droppable.manager=e})}set element(e){zM(()=>{const t=sz(this,Bz),r=this.droppable.element,n=this.draggable.element;r&&r!==t||(this.droppable.element=e),n&&n!==t||(this.draggable.element=e),uz(this,Bz,e)})}get element(){var e,t;const r=sz(this,Bz);if(r)return null!=(t=null!=(e=Pq.get(r))?e:r)?t:this.droppable.element}set target(e){this.droppable.element=e}get target(){return this.droppable.element}set source(e){this.draggable.element=e}get source(){return this.draggable.element}get disabled(){const{disabled:e}=this.draggable,{disabled:t}=this.droppable;return e===t?e:{draggable:e,droppable:t}}set plugins(e){this.draggable.plugins=eq(e,Tz)}set disabled(e){const t=Oz(e);zM(()=>{this.droppable.disabled=t.droppable,this.draggable.disabled=t.draggable})}set data(e){zM(()=>{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:HO}set alignment(e){this.draggable.alignment=e}get alignment(){return this.draggable.alignment}set type(e){zM(()=>{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)}};jz=[,,,H_(null)],_z=new WeakMap,zz=new WeakMap,Fz=new WeakMap,$z=new WeakMap,Bz=new WeakMap,iz(jz,4,"index",Nz,Vz,_z),iz(jz,4,"group",Lz,Vz,$z),((e,t)=>{return Z_(t,(r="metadata",(n=Symbol[r])?n:Symbol.for("Symbol."+r)),e[3]);var r,n})(jz,Vz);var Wz=class extends kj{constructor(e,t,r){super(e,t),this.sortable=r}get index(){return this.sortable.index}get initialIndex(){return this.sortable.initialIndex}get group(){return this.sortable.group}get initialGroup(){return this.sortable.initialGroup}},Uz=class extends Dj{constructor(e,t,r){super(e,t),this.sortable=r}get index(){return this.sortable.index}get group(){return this.sortable.group}},Gz=Object.defineProperty,Kz=Object.defineProperties,Yz=Object.getOwnPropertyDescriptors,Xz=Object.getOwnPropertySymbols,Jz=Object.prototype.hasOwnProperty,Zz=Object.prototype.propertyIsEnumerable,Qz=(e,t,r)=>t in e?Gz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;function eF(e){const{accept:t,collisionDetector:r,collisionPriority:n,id:o,data:i,element:a,handle:s,index:l,group:u,disabled:c,modifiers:d,sensors:p,target:f,type:h,plugins:m}=e,g=function(e){return null===e?null:Q_(Q_({},qz),e)}(e.transition),b=Zj(t=>new Vz(((e,t)=>Kz(e,Yz(t)))(((e,t)=>{for(var r in t||(t={}))Jz.call(t,r)&&Qz(e,r,t[r]);if(Xz)for(var r of Xz(t))Zz.call(t,r)&&Qz(e,r,t[r]);return e})({},e),{transition:g,register:!1,handle:Pj(s),element:Pj(a),target:Pj(f)}),t)),v=Nj(b,tF);return _j(o,()=>b.id=o),Tj(()=>{zM(()=>{b.group=u,b.index=l})},[b,u,l]),_j(h,()=>b.type=h),_j(t,()=>b.accept=t,void 0,Qk),_j(i,()=>i&&(b.data=i)),_j(l,()=>{var e;(null==(e=b.manager)?void 0:e.dragOperation.status.idle)&&(null==g?void 0:g.idle)&&b.refreshShape()},jj),zj(s,e=>b.handle=e),zj(a,e=>b.element=e),zj(f,e=>b.target=e),_j(c,()=>b.disabled=null!=c&&c,void 0,Qk),_j(p,()=>b.sensors=p,void 0,Qk),_j(r,()=>b.collisionDetector=r),_j(n,()=>b.collisionPriority=n),_j(m,()=>b.plugins=m,void 0,Qk),_j(g,()=>b.transition=g,void 0,Qk),_j(d,()=>b.modifiers=d,void 0,Qk),_j(e.alignment,()=>b.alignment=e.alignment),{sortable:v,get isDragging(){return v.isDragging},get isDropping(){return v.isDropping},get isDragSource(){return v.isDragSource},get isDropTarget(){return v.isDropTarget},handleRef:q(e=>{b.handle=null!=e?e:void 0},[b]),ref:q(e=>{var t,r;(e||!(null==(t=b.element)?void 0:t.isConnected)||(null==(r=b.manager)?void 0:r.dragOperation.status.idle))&&(b.element=null!=e?e:void 0)},[b]),sourceRef:q(e=>{var t,r;(e||!(null==(t=b.source)?void 0:t.isConnected)||(null==(r=b.manager)?void 0:r.dragOperation.status.idle))&&(b.source=null!=e?e:void 0)},[b]),targetRef:q(e=>{var t,r;(e||!(null==(t=b.target)?void 0:t.isConnected)||(null==(r=b.manager)?void 0:r.dragOperation.status.idle))&&(b.target=null!=e?e:void 0)},[b])}}function tF(e,t,r){return!("isDragSource"!==e||r||!t)}const rF=({id:e,itemIndex:t,sectionIndex:r})=>Gt.jsx("div",{children:`${r}:${t} - ${e}`}),nF=j(({id:e,itemIndex:t,sectionIndex:r})=>{const n=Jg(kM),o=Jg(AM),i=Jg(SM).at(r)??0,a=Jg(wM)({sectionIndex:r}),{ref:s,isDragging:l,handleRef:u}=eF({id:e,index:t,type:"item",accept:"item",group:a,modifiers:[$_],plugins:[dz],data:{id:e,sectionIndex:r,sectionKey:a,itemIndex:t}}),c=void 0!==n?()=>{n({id:e,itemIndex:t,sectionIndex:r})}:void 0,d=o??rF;return Gt.jsx(rf,{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:Gt.jsxs("div",{style:{width:"100%",opacity:l?.4:1},children:[Gt.jsx(A_,{isDragging:l,itemIndex:t,sectionIndex:r}),Gt.jsx(d,{id:e,itemIndex:t,sectionIndex:r,dragHandleRef:u}),t===i-1&&Gt.jsx(A_,{isDragging:!1,itemIndex:t+1,sectionIndex:r})]})})}),oF=j(({sectionIndex:e})=>{const t=Jg(wM),r=Jg(SM).at(e)??0,n=t({sectionIndex:e});return Gt.jsxs(yd,{className:"exploration-list",style:{overflow:"auto"},children:[Gt.jsx(fp,{}),Gt.jsx(k_,{id:n,sectionIndex:e}),Gt.jsx(fp,{}),Gt.jsx(M_,{sectionIndex:e}),Gt.jsx(Vp,{sx:{padding:"2px 8px"},children:C_(r).map(r=>{const n=t({sectionIndex:e,itemIndex:r});return Gt.jsx(nF,{id:n,itemIndex:r,sectionIndex:e},n)})})]},n)}),iF=[aj.configure({activationConstraints:[new rj.Distance({value:5})]}),tj],aF=j(()=>{const e=Jg(xM),t=Jg(wM),r=Zg(qM("start")),n=Zg(qM("over")),o=Zg(qM("end"));return Gt.jsxs(Xj,{sensors:iF,onDragEnd:e=>{o(e)},onDragOver:e=>{n(e)},onDragStart:e=>{r(e)},children:[Gt.jsx(yd,{style:{display:"flex",flexDirection:"column"},children:C_(e).map(e=>Gt.jsx(oF,{sectionIndex:e},t({sectionIndex:e})))}),Gt.jsx(R_,{})]})}),sF=j(e=>Gt.jsx(nM,{atoms:OM,atomFamilies:LM,children:Gt.jsx(NM,{props:e,children:Gt.jsx(aF,{})})})),lF=(e,t)=>{if(!e)return;const r=e.qHyperCube.qDimensionInfo.filter(e=>void 0!==e.cId).filter(zA).map(({cId:e,qFallbackTitle:r})=>({id:e,title:r??"",alternative:t,type:"dimension"})),n=e.qHyperCube.qMeasureInfo.filter(e=>void 0!==e.cId).filter(zA).map(({cId:e,qFallbackTitle:r})=>({id:e,title:r??"",alternative:t,type:"measure"}));return[...r,...n]},uF=(e,t)=>{const r=[],n={};return e.forEach(e=>{n[e.id]=e}),Object.keys(t).forEach(e=>{const o=t[e],i=n[e];i&&(r[o]=i)}),r},cF=(e,t,r)=>{if(!r||((e,t)=>{const r=e.map(e=>e.id).sort(),n=Object.keys(t).sort();return r.join(",")!==n.join(",")})(e,r)){const t=(e=>{const t={};return e.forEach((e,r)=>{t[e.id]=r}),t})(e);return uF(e,t)}const n=t.map(e=>e.id),o=Object.keys(r).sort((e,t)=>r[e]-r[t]).filter(e=>n.includes(e)),i={...r};for(let e=0;e<n.length;e++){const t=o[e],a=n[e];t!==a&&(i[a]=r[t])}let a=0;const s=Object.entries(i).sort((e,t)=>e[1]-t[1]).map(([e])=>[e,a++]);return s.forEach(([e,t])=>{i[e]=t}),uF(e,i)},dF=zg(e=>{const t=e(GA);return lF(t,!0)}),pF=zg(e=>{const t=e(UA);return lF(t,!1)}),fF=zg(e=>{const t=e(KA),r=e(UA);if(!t||!r)return[];const n=e(pF),o=e(dF),i=r.qHyperCube.qColumnOrder??[],a=e(HA);if(void 0===o||void 0===n)return[];if(a){return[...[...n,...o]].sort((e,t)=>(a[e.id]??1/0)-(a[t.id]??1/0))}const s=t.qHyperCubeDef.qLayoutExclude?.allColumnOrder??{},l=((e,t)=>e.length===t?e:Array.from(Array(t).keys()))(i,n.length),u=((e,t)=>e.length>0?e.map(e=>t[e]):t)(l,n),c=[...u,...o];return cF(c,u,s)}),hF=zg(e=>{const t=e(fF),r=e(PA);return t.filter(r)}),mF=zg(e=>e(hF).length),gF=zg(e=>({sectionIndex:t,itemIndex:r})=>{const n=e(hF);if(void 0===r)return`columns-section-${t}`;const o=n?.[r];return o?.id??`missing-item-${t}-${r}`}),bF=bM(e=>zg(t=>t(hF)[e]),(e,t)=>e===t),vF=zg(e=>e(fF).map(e=>e.id)),yF=zg(e=>e(hF).map(e=>e.id)),xF=zg(e=>{const t=e(fF),r={};return t.forEach(e=>{r[e.id]=e.type}),r}),SF=zg(null,(e,t,{event:r,id:n,toIndex:o})=>{const i=e(AA),a=e(qA),s=e(vF),l=e(yF);if(void 0===i||null===a||void 0===s||void 0===l)return;if(r.operation.canceled)return;const u=l[o];if(!u)return;const c=((e,t,r)=>{const n=r.findIndex(t=>t===e),o=r.findIndex(e=>e===t);if(-1===n||-1===o||n===o)return r;const i=[...r],[a]=i.splice(n,1);return i.splice(o,0,a),i})(n,u,s);t(HA,Object.fromEntries(c.map((e,t)=>[e,t]))),a.add(async()=>{i.updateColumnOrders(c)})}),wF="ChartExploration.Table.ColumnSectionEmpty.Title",CF="ChartExploration.Table.NoColumnsFound.Title",EF="#177fe6",RF=zg(e=>{const t=e(MA),r=e(DA).length>0,n=(e=>e?CF:wF)(r),o=(e=>e?"":"ChartExploration.Table.ColumnSectionEmpty.Message")(r);return()=>({title:t(n),message:""===o?"":t(o)})}),AF=({itemIndex:e})=>{const t=Jg(bF(e));if(!t)return null;const r=t.title;return Gt.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r})},IF=zg(e=>{const t=e(yF),r=e(nI),n=t.filter(e=>r.has(e)).length;return 0===t.length?"disabled":0===n?"none":n===t.length?"all":"some"}),MF=zg(null,(e,t)=>{const r=e(yF),n=e(nI),o="all"!==e(IF)&&"disabled"!==e(IF),i=[],a=new Set(e(QA)),s=new Set(e(eI));if(o){const t=new Set(r.filter(e=>!n.has(e)));i.push(...Array.from(t).map(t=>({id:t,isAlternative:!0,type:e(xF)[t]}))),i.forEach(e=>a.add(e.id)),i.forEach(e=>s.delete(e.id))}else{const t=new Set(r.filter(e=>n.has(e)));i.push(...Array.from(t).map(t=>({id:t,isAlternative:!1,type:e(xF)[t]}))),i.forEach(e=>a.delete(e.id)),i.forEach(e=>s.add(e.id))}t(QA,a),t(eI,s),EA({items:i,handler:e(AA),model:e(RA),handlerQueue:e(qA),logToSentry:e(mb)})}),kF=e=>{(e instanceof HTMLElement||e instanceof SVGElement)&&e.focus()},DF=e=>"svg"===e.tagName?"exploration-draggable-icon":e.className,PF=e=>{const{currentTarget:t}=e,r=DF(t);let n=t.closest("li")?.previousElementSibling?.getElementsByClassName(r)[0];if(!n){const e=t.closest(".exploration-list"),o=e?.querySelector(".exploration-section-header");if(o)return o;if(n=((e,t)=>{const r=e.closest(".exploration-list"),n=r?.previousElementSibling;if(null===n||!n)return e.closest(".exploration-panel")?.getElementsByClassName(t)[1];const o=n.getElementsByClassName(t);return o.length>0?o[o.length-1]:void 0})(t,r),!n){const e=t.closest(".exploration-panel")?.getElementsByClassName(r)[1];return e??null}}return n},TF=(e,t)=>{const r=e.closest(".exploration-list"),n=r?.nextElementSibling||r?.parentElement?.nextElementSibling;if(null===n||!n){if(t===Km.Tab)return;return r?.closest(".exploration-panel")?.getElementsByClassName("exploration-section-header")[0]}return n.getElementsByClassName("exploration-section-header")[0]},qF=(e,t)=>{const{key:r}=e;switch(r){case Km.Tab:e.shiftKey||(wm(e),((e,t)=>{const{currentTarget:r}=e;if(r!==t.ref.current)return;const n=r.closest(".exploration-list"),o=n?.getElementsByClassName("exploration-item-focus")[0];o&&kF(o)})(e,t));break;case Km.Down:(e=>{e.preventDefault();const t=e.currentTarget.closest(".exploration-list"),r=t?.getElementsByClassName("exploration-item-focus")[0];r&&kF(r)})(e);break;case Km.Enter:case Km.Space:e.preventDefault(),((e,t)=>{const{currentTarget:r}=e;if(e.preventDefault(),r!==t.ref.current)return;const n="all"!==t.checkState;t.toggleAllCheckboxes(n)})(e,t)}},OF=({children:e})=>Gt.jsx("span",{style:{width:"fit-content",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",fontWeight:"bold"},children:e}),LF=({children:e})=>{const t=M(null),r=Jg(IF),[,n]=Qg(MF),o=Jg(MA),i={ref:t,toggleAllCheckboxes:n,checkState:r};return Gt.jsxs(yd,{ref:t,"aria-label":o("Common.Columns"),className:"exploration-section-header",tabIndex:0,onKeyDown:e=>{qF(e,i)},sx:{display:"flex",alignItems:"center",width:"100%",padding:"2px 8px 2px 8px",boxSizing:"border-box",fontSize:"14px","&:focus-visible":{boxShadow:`0 0 0 2px ${EF} inset`}},children:[Gt.jsx(Wd,{inputProps:{"aria-label":o("ChartExploration.Header.ToggleAll"),..."some"===r&&{"aria-checked":"mixed"}},disabled:"disabled"===r,checked:"all"===r,indeterminate:"some"===r,onChange:n,size:"small",style:{flexShrink:0,padding:9}}),Gt.jsx(OF,{children:e})]})},NF=()=>{const e=Jg(MA);return Gt.jsx(LF,{children:e("Common.Columns")})},jF=_((e,t)=>Gt.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:Gt.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"})})),_F=_((e,t)=>Gt.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:[Gt.jsx("path",{d:"M1.5 0a.5.5 0 0 0-.5.5v14a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-6a.5.5 0 0 0-.5-.5H8V.5a.5.5 0 0 0-.5-.5zM2 4V1h5v7.293l-5 5V9h2V8H2V5h2V4zm.707 10 5-5H15v5h-3v-2h-1v2H8v-2H7v2z"}),Gt.jsx("path",{d:"M1.5 0a.5.5 0 0 0-.5.5v14a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-6a.5.5 0 0 0-.5-.5H8V.5a.5.5 0 0 0-.5-.5zM2 4V1h5v7.293l-5 5V9h2V8H2V5h2V4zm.707 10 5-5H15v5h-3v-2h-1v2H8v-2H7v2z"})]})),zF=_((e,t)=>Gt.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:Gt.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"})})),FF=Mu("div")({position:"absolute",width:"1px",height:"1px",padding:0,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0}),$F=Mu(zF)(()=>({padding:"6px 6px",flexShrink:0,cursor:"grab","&:focus-visible":{boxShadow:`0 0 0 2px ${EF} inset`}})),BF=e=>{const t=e.key===Km.Down?(e=>{const{currentTarget:t,key:r}=e,n=DF(t),o=t.closest("li");let i=o?.nextElementSibling?.getElementsByClassName(n)[0];return i||(i=TF(t,r),i)?i:t.closest(".exploration-panel")?.getElementsByClassName(n)[0]})(e):PF(e);t&&kF(t)},HF=(e,t)=>{const{key:r}=e;switch(r){case Km.Tab:if(e.shiftKey)wm(e),((e,t)=>{const{currentTarget:r}=e,n=r.closest("ul")?.getElementsByClassName("exploration-item-focus");if(r===t.items.draggableIconRef.current){if(t.itemIndex>=0){const e=n&&n[t.itemIndex];return void(e&&kF(e))}const r=PF(e);r&&kF(r)}if(r===t.items.explorationItemFocusRef.current){const t=r.closest("li")?.previousElementSibling?.getElementsByClassName("exploration-draggable-icon")[0];if(t)return void kF(t);const n=PF(e);n&&kF(n)}})(e,t);else{const r=((e,t)=>{const{currentTarget:r,key:n}=e;if(e.shiftKey)return!0;if(r===t.items.explorationItemRef.current){const e=r.getElementsByClassName("exploration-draggable-icon")[0];return kF(e),!0}if(r===t.items.explorationItemFocusRef.current){const e=r.closest("li")?.getElementsByClassName("exploration-draggable-icon")[0];return e&&kF(e),!0}if(r===t.items.draggableIconRef.current){const e=r.closest("ul")?.getElementsByClassName("exploration-item-focus");if((e?.length||0)-1>t.itemIndex){const r=e&&e[t.itemIndex+1];return r&&kF(r),!0}const o=TF(r,n);if(!o)return!1;kF(o)}return!0})(e,t);r?wm(e):e.stopPropagation()}break;case Km.Enter:case Km.Space:wm(e),((e,t)=>{const{currentTarget:r}=e;if(r===t.items.draggableIconRef.current){const e=r.closest("li")?.getElementsByClassName("exploration-item")[0];return void(e&&kF(e))}if(r===t.items.explorationItemRef.current){const e=r.getElementsByClassName("exploration-draggable-icon")[0];return void kF(e)}r===t.items.explorationItemFocusRef.current&&t.toggleItem()})(e,t);break;case Km.Down:case Km.Up:wm(e),BF(e)}},VF=({children:e})=>Gt.jsx("span",{style:{width:"fit-content",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flexGrow:1},children:e}),WF={dimension:jF,measure:_F},UF=({id:e,dragHandleRef:t,title:r,type:n,itemIndex:o})=>{const[i,a]=Qg(nI),s=Jg(MA),l=M(null),u=M(null),c=M(null);P(()=>{t&&l.current&&t(l.current)},[t]);const d=WF[n],p=!i.has(e),f={id:e,itemIndex:o,toggleItem:()=>{a({id:e,isAlternative:p,type:n})},items:{explorationItemRef:l,explorationItemFocusRef:u,draggableIconRef:c}};return Gt.jsxs(yd,{ref:l,className:"exploration-item",onClick:t=>{t.stopPropagation(),-1!==e&&a({id:e,isAlternative:p,type:n})},onKeyDown:e=>{HF(e,f)},tabIndex:0,style:{display:"flex",alignItems:"center",width:"100%",cursor:"pointer",padding:0,boxSizing:"border-box",fontSize:"14px"},title:r,sx:{"&:hover":{backgroundColor:"action.hover"},"&:focus-visible":{boxShadow:`0 0 0 2px ${EF} inset`}},children:[Gt.jsxs(yd,{ref:u,className:"exploration-item-focus",component:"div",tabIndex:0,onKeyDownCapture:e=>{HF(e,f)},sx:{display:"flex",minWidth:0,alignItems:"center",justifyContent:"space-between",flexGrow:1,marginRight:"4px","&:focus-visible":{boxShadow:`0 0 0 2px ${EF} inset`}},children:[Gt.jsx(Wd,{checked:i.has(e),"aria-label":s("ChartExploration.ListItem.Label",r),size:"small",tabIndex:-1,style:{padding:9,flexShrink:0}}),Gt.jsx(yd,{children:Gt.jsx(d,{height:12,style:{opacity:1,marginRight:"8px"}})}),Gt.jsx(VF,{children:r})]}),Gt.jsx($F,{ref:c,className:"exploration-draggable-icon",tabIndex:0,height:"16px",onClick:e=>{e.stopPropagation()},onKeyDownCapture:e=>{HF(e,f)}})]})},GF=({id:e,itemIndex:t,dragHandleRef:r})=>{const n=Jg(bF(t));return n?Gt.jsx(UF,{id:e,dragHandleRef:r,title:n.title,type:n.type,itemIndex:t}):null},KF=()=>{const e=Jg(mF),t=Jg(RF),r=Jg(YA),n=Jg(gF),o=Zg(SF);return!r&&Gt.jsx(sF,{numberOfSections:1,numberOfItemsInSection:[e],keyExtractor:n,emptyTexts:t,onDragEnd:o,dragOverlayRenderer:AF,headerRenderer:NF,itemRenderer:GF})},YF=_((e,t)=>Gt.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:Gt.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"})})),XF=()=>{const[e,t]=Qg(DA),r=Jg(MA),n=S.useRef(null),o=Jg(mF),i=q(e=>{t(e.target.value)},[t]),a=0===e.length||0===o?r("Common.Search.NoResultsAvailable"):r("ChartExploration.Table.Search.ResultsFound",o.toString());return Gt.jsxs(yd,{ref:n,style:{position:"sticky",top:0,zIndex:1,width:"calc(100% - 24px)",backgroundColor:"var(--sprout-common-background-color-weak)",paddingTop:2,paddingRight:12,paddingLeft:12,paddingBottom:12},children:[Gt.jsx(FF,{"data-testid":"screenOnly-search-results","aria-live":"polite","aria-atomic":"true",children:a}),Gt.jsx(nh,{size:"small",fullWidth:!0,"data-testid":"chart-exploration-search-input","aria-label":r("Common.Search.AccessibilityLabel"),type:"search",defaultValue:e,placeholder:r("Common.Search"),onChange:i,startAdornment:Gt.jsx(Tp,{position:"start",children:Gt.jsx(YF,{})}),inputProps:{style:{fontSize:"14px",paddingTop:6,paddingBottom:6}}})]})},JF=e=>{const t=pm();return Gt.jsx(Du,{theme:t,children:Gt.jsx(Wg,{children:Gt.jsx(oI,{props:e,children:Gt.jsxs(yd,{className:"exploration-panel",style:{display:"flex",flexDirection:"column"},children:[Gt.jsx(XF,{}),Gt.jsx(KF,{})]})})})})},ZF=e=>e.flags.isEnabled("VNA-655-STRAIGHT_TABLE_NEW_EXPLORATION")?{component:JF,classification:{tags:["exploration"],exclusive:!0}}:{component:"items",items:{columnHandler:{component:"column-handler",search:!0,selectAll:!1}},classification:{tags:["exploration"],exclusive:!0}};var QF=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}(QF||{}),e$=function(e){return e.COMPARE="compare",e.GENERAL="general",e}(e$||{}),t$=function(e){return e.VALUES="values",e.CONDITION="condition",e.SEARCH="search",e.CLEAR_SELECTION="clear_selection",e.TOP_BOTTOM="top_bottom",e}(t$||{}),r$=function(e){return e.FIXED_VALUE="fixed_value",e.CALCULATED_VALUE="calculated_value",e}(r$||{});const n$=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,o$=e=>{if(!Array.isArray(e))return"";let t="{<";const r=[];if(e.forEach(e=>{let t,n=`[${e.field}]${e.exclude?"-":""}={`,o="}";switch(e.type){case t$.SEARCH:t=(e=>{let t="",r="";const n=e.options?.mode;if(!n)return"";switch(n){case QF.BEGINNING_OF_WORD:t="*^",r="*";break;case QF.ENDS_WITH:t="*";break;case QF.STARTS_WITH:r="*";break;case QF.MATCHES_EXACTLY:break;case QF.CONTAINS:default:t="*",r="*"}const o=e.options.values?.[0]??"";return""!==o?`"${t}${o}${r}"`:""})(e);break;case t$.CONDITION:t=(e=>{const{options:t}=e,r=t?.mode===e$.GENERAL,n=t?.modifier?.type===r$.FIXED_VALUE,o=t?.modifier?.operator?t.modifier.operator.split(" "):[];if(0===o.length||!n&&(!t.firstValue?.aggregator||!t.firstValue?.field)||n&&!t.firstValue?.fixedValue||r&&(!t.conditionField?.aggregator||!t.conditionField?.field))return"";let i,a,s="=";r&&n?(i=`${t.conditionField?.aggregator}(${n$(t.conditionField?.field)})`,a=`${t.firstValue?.fixedValue}`):!r&&n?(i="",a=`${t.firstValue?.fixedValue}`,s=""):r||n?(i=`${t.conditionField?.aggregator}(${n$(t.conditionField?.field)})`,a=`${t.firstValue?.aggregator}(${n$(t.firstValue?.field)})`):(i=`${n$(e.field)}`,a=`${t.firstValue?.aggregator}(total ${n$(t.firstValue?.field)})`);const l=`${s}${i}${o[0]}${a}`;let u="";if(o.length>1){if(!n&&(!t.secondValue?.aggregator||!t.secondValue?.field)||n&&!t.secondValue?.fixedValue)return"";let e,a;r&&n?(e=`${t.secondValue?.fixedValue}`,a=` and ${i}`):!r&&n?(e=`${t.secondValue?.fixedValue}`,a=""):r||n?(e=`${t.secondValue?.aggregator}(${n$(t.secondValue?.field)})`,a=` and ${i}`):(e=`${t.secondValue?.aggregator}(total ${n$(t.secondValue?.field)})`,a=` and ${i}`),u=`${a}${o[1]}${e}`}return`"${l}${u}"`})(e);break;case t$.CLEAR_SELECTION:t=`[${e.field}]=`,n="",o="";break;case t$.VALUES:default:t=e.options?.values?e.options.values.map(e=>`'${e.replace(/'/g,"''")}'`).join(","):""}""!==t&&r.push(`${n}${t}${o}`)}),0===r.length)return;return t+=`${r.join(",")}>}`,t},i$=[];for(let e=0;e<256;++e)i$.push((e+256).toString(16).slice(1));const a$=new Uint8Array(16);function s$(e,t,r){return crypto.randomUUID?crypto.randomUUID():function(e){e=e||{};const t=e.random??e.rng?.()??crypto.getRandomValues(a$);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(i$[e[t+0]]+i$[e[t+1]]+i$[e[t+2]]+i$[e[t+3]]+"-"+i$[e[t+4]]+i$[e[t+5]]+"-"+i$[e[t+6]]+i$[e[t+7]]+"-"+i$[e[t+8]]+i$[e[t+9]]+"-"+i$[e[t+10]]+i$[e[t+11]]+i$[e[t+12]]+i$[e[t+13]]+i$[e[t+14]]+i$[e[t+15]]).toLowerCase()}(t)}(e)}const l$=()=>crypto?.randomUUID?.()??s$(),u$=({qDimensions:e,qMeasures:t})=>[...e.map(e=>({id:e.qDef.cId,isDimension:!0,def:e})),...t.map(e=>({id:e.qDef.cId,isDimension:!1,def:e}))],c$=({previousColumns:e,nextColumns:t,qInterColumnSortOrder:r})=>{const n=new Map(e.map((e,t)=>[t,e.qDef.cId])),o=new Map(t.map((e,t)=>[e.qDef.cId,t]));return r.map(e=>{const t=n.get(e);return(void 0===t?void 0:o.get(t))??e})};class d$ extends s{#u;constructor(e,t){super(e),this.#u=t}#c(e){const t=this.hcProperties.qLayoutExclude?.allColumnOrder??{},r=Object.keys(t).length;this.hcProperties.qLayoutExclude={...this.hcProperties.qLayoutExclude,allColumnOrder:{...t,...Object.fromEntries(e.map((e,t)=>[e,r+t]))}}}#d(e){const t=this.hcProperties.qLayoutExclude?.allColumnOrder??{},r=Object.entries(t).filter(([t])=>!e.includes(t));this.hcProperties.qLayoutExclude={...this.hcProperties.qLayoutExclude,allColumnOrder:Object.fromEntries(r.map(([e],t)=>[e,t]))}}#p(e,t){const r=this.hcProperties.qLayoutExclude?.allColumnOrder??{},n={};for(const[o,i]of Object.entries(r))n[o===e?t:o]=i;this.hcProperties.qLayoutExclude={...this.hcProperties.qLayoutExclude,allColumnOrder:n}}async addDimension(e,t=!1){const r=await this.addDimensions([e],t);return 0===r.length?void 0:r[0]}async addDimensions(e,t=!1){const r=await super.addDimensions(e,t);return this.#c(r.map(e=>e.qDef.cId)),r}async removeDimension(e,t=!1){const r=await this.removeDimensions([e],t);return 0===r.length?void 0:r[0]}async removeDimensions(e,t=!1){const r=await super.removeDimensions(e,t);return this.#d(r.map(e=>e.qDef.cId)),r}async replaceDimension(e,t){const r=this.getDimensions()[e].qDef.cId,n=await super.replaceDimension(e,t),o=n.qDef.cId;return this.#p(r,o),n}async addMeasure(e,t=!1){const r=await this.addMeasures([e],t);return 0===r.length?void 0:r[0]}async addMeasures(e,t=!1){const r=await super.addMeasures(e,t);return this.#c(r.map(e=>e.qDef.cId)),r}async removeMeasure(e,t=!1){const r=await this.removeMeasures([e],t);return 0===r.length?void 0:r[0]}async removeMeasures(e,t=!1){const r=await super.removeMeasures(e,t);return this.#d(r.map(e=>e.qDef.cId)),r}async replaceMeasure(e,t){const r=this.getMeasures()[e].qDef.cId,n=await super.replaceMeasure(e,t),o=n.qDef.cId;return this.#p(r,o),n}async#f(e){const t=this.getMeasure(e);if(t){const r=this.getAlternativeMeasures().findIndex(t=>t.qDef.cId===e);if(-1===r)return;await super.removeMeasure(r,!0),await super.addMeasure(t,!1,this.getMeasures().length)}}async#h(e){const t=this.getMeasure(e);if(t){const r=this.getMeasures().findIndex(t=>t.qDef.cId===e);if(-1===r)return;await super.removeMeasure(r,!1),await super.addMeasure(t,!0,this.getAlternativeMeasures().length)}}async#m(e){const t=this.getDimension(e);if(t){const r=this.getAlternativeDimensions().findIndex(t=>t.qDef.cId===e);if(-1===r)return;await super.removeDimension(r,!0),await super.reinsertDimension(t,!1,this.getDimensions().length)}}async#g(e){const t=this.getDimension(e);if(t){const r=this.getDimensions().findIndex(t=>t.qDef.cId===e);if(-1===r)return;await super.removeDimension(r,!1),await super.addDimension(t,!0,this.getAlternativeDimensions().length)}}#b(){const e=this.hcProperties.qLayoutExclude?.allColumnOrder??{};return Object.entries(e).sort((e,t)=>e[1]-t[1]).map(([e])=>e)}async moveDimensionFromAlternative(e){await this.#m(e);const t=this.#b();this.updateColumnOrders(t)}async moveDimensionToAlternative(e){await this.#g(e);const t=this.#b();this.updateColumnOrders(t)}async moveMeasureFromAlternative(e){await this.#f(e);const t=this.#b();this.updateColumnOrders(t)}async moveMeasureToAlternative(e){await this.#h(e);const t=this.#b();this.updateColumnOrders(t)}async toggleAlternatives(e,t){for(const t of e)"dimension"===t.type?await(t.isAlternative?this.#m(t.id):this.#g(t.id)):await(t.isAlternative?this.#f(t.id):this.#h(t.id));this.updateColumnOrders(t)}updateColumnOrders(e){const t=(({qDimensions:e,qMeasures:t,qInterColumnSortOrder:r,nextAllColumnOrderById:n})=>{const o=u$({qDimensions:e,qMeasures:t}),i=[...e,...t],a=new Map(n.map((e,t)=>[e,t])),s=o.toSorted((e,t)=>{const r=a.get(e.id),n=a.get(t.id);return void 0===r||void 0===n?0:r-n}),l=s.filter(e=>e.isDimension).map(e=>e.def),u=s.filter(e=>!e.isDimension).map(e=>e.def),c=[...l,...u],d=new Map(c.map((e,t)=>[e.qDef.cId,t]));return{qDimensions:l,qMeasures:u,qInterColumnSortOrder:c$({previousColumns:i,nextColumns:c,qInterColumnSortOrder:r}),qColumnOrder:s.map(e=>d.get(e.id)).filter(e=>void 0!==e)}})({qDimensions:this.hcProperties.qDimensions,qMeasures:this.hcProperties.qMeasures,qInterColumnSortOrder:this.hcProperties.qInterColumnSortOrder,nextAllColumnOrderById:e});this.hcProperties.qDimensions=t.qDimensions,this.hcProperties.qMeasures=t.qMeasures,this.hcProperties.qColumnOrder=t.qColumnOrder,this.hcProperties.qInterColumnSortOrder=t.qInterColumnSortOrder,this.hcProperties.qLayoutExclude={...this.hcProperties.qLayoutExclude,allColumnOrder:e.reduce((e,t,r)=>(e[t]=r,e),{})}}getFilters(){return this.properties.filters??[]}getFilter(e){return this.getFilters().find(t=>t.id===e)}addFilterField(e){const t=e.qTags??e.tags,r=Array.isArray(t)&&t.includes("$numeric"),n=e.isDerived,o=Array.isArray(this.properties.filters)?this.properties.filters:[],i={type:"values",field:n?e.value??e.fullname:e.name??e.label??e.field,options:{values:[]},exclude:!1,id:l$(),qTags:Array.isArray(t)?t:[],isNumeric:r};return o.push(i),this.properties.filters=o,this.properties.qHyperCubeDef.qContextSetExpression=o$(o),i}addFilters(e){const t=[];for(const r of e)t.push(this.addFilterField(r));return t}#v(e){const t=this.getFilters();return t.splice(e,1),this.properties.qHyperCubeDef.qContextSetExpression=o$(t),t}removeFilters(e){if(0===e.length)return[];const t=[...e].sort((e,t)=>t-e),r=this.getFilters().filter((t,r)=>e.includes(r));for(const e of t)this.#v(e);return r}getLabels(){return this.getMeasures().reduce((e,t)=>(!t.qLibraryId&&t.qDef.qLabel&&e.push(t.qDef.qLabel),e),[])}getAddDimensionLabel(){return this.#u.get("Visualization.Requirements.AddDimension")}canColorBy(){return!1}}const p$=(e,t)=>{if(!e)return-1;const r=e.indexOf(t);if(-1===r)return-1;for(let r=0;r<e.length;++r)e[r]>t&&e[r]--;return e.splice(r,1),r};function f$(e,t){let r;for(r=0;r<e.length;++r)e[r]>=0&&e[r]>=t&&++e[r];e.push(t)}function h$(e){return e>0?0:1}function m$(e){return e.translator.get("Visualizations.Descriptions.Column")}function g$(e){return{measures:{min:h$,max:1e3,description:()=>m$(e),add(e,t,r){const{qColumnOrder:n}=r.hcProperties;f$(n,r.getDimensions().length+r.getMeasures().length-1)},remove(e,t,r,n){const{qColumnOrder:o}=r.hcProperties,i=(r.hcProperties.qDimensions?r.hcProperties.qDimensions.length:0)+n;p$(o,i)}},dimensions:{min:h$,max:1e3,description:()=>m$(e),add(e,t,r){const{qColumnOrder:n}=r.hcProperties;return f$(n,r.getDimensions().length-1),e},remove(e,t,r,n){if(e?.isAlternative)return;const{qColumnOrder:o}=r.hcProperties;p$(o,n)}}}}const b$=e=>{const t=new d$({},e.translator),r=pb(e);return{properties(n){if(!(e=>"qHyperCubeDef"in e&&"sn-table"===(({visualization:e,qInfo:t})=>e??t?.qType)(e))(n))return n;const{qHyperCubeDef:o}=n,i=o.qLayoutExclude?.qHyperCubeDef,a=e.flags.isEnabled("qcb-35151-fix-duplicate-columns"),s=new Set,l=[];let u=0,c=0,d=0;[...o.qDimensions,...o.qMeasures,...i?.qDimensions??[],...i?.qMeasures??[]].forEach(e=>{u++;const t=e.qDef?.cId;if((e=>"string"==typeof e&&e.length>0)(t))if(s.has(t)){if(c++,a){const t=l$();e.qDef={...e.qDef,cId:t},l.push(t)}}else s.add(t),l.push(t);else if(d++,a){const t=l$();e.qDef={...e.qDef,cId:t},l.push(t)}});const p=c+d;if(0===p)return n;r.warn({msg:"migrate: column cId issues detected",payload:{issueCount:p,totalColumnCount:u,duplicateCount:c,missingCount:d}});const f=n.components?.find(e=>"theme"===e.key);return e.flags.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING")&&f?.nullValues&&!f.dimensionNullValues&&(f.dimensionNullValues={...f.nullValues}),a?(t.setProperties(n),t.updateColumnOrders(l),r.warn({msg:"migrate: column cId cleanup completed",payload:{replacementCount:p}}),n):n}}};let v$=function(e){return e.Text="text",e.Link="link",e.Image="image",e.ImagesInIndentMode="imagesInIndentMode",e.Indicator="indicator",e.MiniChart="miniChart",e.Bar="bar",e.EditableText="editableText",e.EditableSelector="editableSelector",e.EditableDate="editableDate",e}({}),y$=function(e){return e.Attribute="attribute",e.Dimension="dimension",e}({});const x$=e=>{switch(e?.type){case"url":return v$.Link;case"image":return v$.Image;case"indicator":return v$.Indicator;case"miniChart":return v$.MiniChart;case"bar":return v$.Bar;default:return v$.Text}},S$=({isImagesEnabled:e})=>({uses:"dimensionRepresentationItems.representationType",options(t,r,n){const{qIndentMode:o}=n.properties.qHyperCubeDef,i=[{value:"text",translation:"Object.Table.Representation.Text"},{value:"url",translation:"Object.Table.Representation.Link"}];return(!o&&e||o)&&i.push({value:"image",translation:"Object.Table.Representation.Image"}),i}}),w$=e=>{if(e)return{representationImage:{uses:"dimensionRepresentationItems.representationImage",show:e=>x$(e.qDef.representation)===v$.Image,items:{imageSize:{options:[{value:"alwaysFit",translation:"properties.backgroundImage.sizeAlwaysFit"},{value:"fitWidth",translation:"properties.backgroundImage.sizeFitWidth"},{value:"fitHeight",translation:"properties.backgroundImage.sizeFitHeight"},{value:"fill",translation:"properties.backgroundImage.sizeStretch"},{value:"originalSize",translation:"properties.backgroundImage.originalSize"}]},imageBoxWidth:{ref:"qDef.representation.imageBox.width",translation:"properties.pivot.representation.image.imageBox.width",type:"number",expression:"optional",defaultValue:24,show:(e,t,r)=>{if(!r.properties.qHyperCubeDef)return!1;const{qInterColumnSortOrder:n,qNoOfLeftDims:o,qDimensions:i,qIndentMode:a}=r.properties.qHyperCubeDef;let s=!1;const l=i?.indexOf(e)??1/0;return(n?.slice(0,o)??[]).indexOf(l)>-1&&(s=!0),s&&a}}}}}},C$=e=>{const{anything:t}=e,r=!t.sense?.isUnsupportedFeature?.("tableImages");return{representationType:S$({isImagesEnabled:r}),representationUrlPosition:{uses:"dimensionRepresentationItems.representationUrlPosition",show:e=>x$(e.qDef.representation)===v$.Link},representationUrlLabel:{uses:"dimensionRepresentationItems.representationUrlLabel",show:e=>x$(e.qDef.representation)===v$.Link&&e.qDef.representation?.urlPosition===y$.Dimension},representationLinkUrl:{uses:"dimensionRepresentationItems.representationLinkUrl",show:e=>x$(e.qDef.representation)===v$.Link&&e.qDef.representation?.urlPosition===y$.Attribute},...w$(r)}},E$=(e,t)=>{const{anything:r}=e,n=r.sense?.isUnsupportedFeature,o=!n?.("tableImages")&&t[v$.Image],i=!n?.("qMiniChartDef")&&t[v$.MiniChart],a=!n?.("tableIndicators")&&t[v$.Indicator],s=!!t[v$.Bar],l=o&&t[v$.ImagesInIndentMode];return{representationType:{uses:"measureRepresentationItems.representationType",options:(e,t,r)=>(e=>{const{qIndentMode:t}=e.properties.qHyperCubeDef??{},r=[{value:"text",translation:"Object.Table.Representation.Text"}];return(!t&&o||t&&l)&&r.push({value:"image",translation:"Object.Table.Representation.Image"}),a&&r.push({value:"indicator",translation:"Object.Table.Representation.Indicator"}),i&&r.push({value:"miniChart",translation:"Common.MiniChart"}),s&&r.push({value:"bar",translation:"SNTable.Bar.Representation"}),r})(r)},representationImage:o?{uses:"measureRepresentationItems.representationImage",show:e=>x$(e.qDef.representation)===v$.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:i?{uses:"measureRepresentationItems.representationMiniChart"}:void 0}},R$=(e,t,r)=>({type:"string",component:"expression",expressionType:"measure",ref:"qAttributeExpressions",schemaIgnore:!0,translation:t,defaultValue:"",tid:`${e}ByExpression`,show:r,convertFunctions:{get:(t,r,n,o)=>o.qAttributeExpressions?.find(t=>t.id===e)?.qExpression??"",set:(t,r,n,o,i)=>{const a=i.qAttributeExpressions??[],s=a.findIndex(t=>t.id===e);s>=0?t?a[s].qExpression=t:a.splice(s,1):t&&a.push({id:e,qExpression:t,qAttribute:!0}),i.qAttributeExpressions=a}}}),A$=(e,t)=>e?.qDef?.representation?.[t],I$=e=>x$(e?.qDef?.representation)===v$.Bar,M$=[{value:"solid",translation:"SNTable.Bar.SingleColor"},{value:"expression",translation:"SNTable.Bar.ByExpression"}],k$=(e,t,r)=>({component:"expression",ref:"qExpression",expressionType:"measure",translation:t,defaultValue:"",id:e,tid:r,show:!1}),D$=e=>{if(!e[v$.Bar])return{};const t=e=>I$(e)&&"manual"===A$(e,"barRangeMode");return{barColorMode:{type:"string",component:"dropdown",ref:"qDef.representation.barColorMode",translation:"SNTable.Bar.BarColor",defaultValue:"solid",show:I$,tid:"barColorMode",options:M$},barColor:{ref:"qDef.representation.barColor",type:"object",component:"color-picker",translation:"SNTable.Bar.BarColor",defaultValue:{index:6,color:null},show:e=>I$(e)&&"expression"!==A$(e,"barColorMode"),tid:"barColor",dualOutput:!0},barColorExpression:R$("barColor","SNTable.Bar.ColorExpression",e=>I$(e)&&"expression"===A$(e,"barColorMode")),barLabelColorMode:{type:"string",component:"dropdown",ref:"qDef.representation.barLabelColorMode",translation:"SNTable.Bar.LabelColor",defaultValue:"solid",show:I$,tid:"barLabelColorMode",options:M$},barLabelColor:{ref:"qDef.representation.barLabelColor",type:"object",component:"color-picker",translation:"SNTable.Bar.LabelColor",show:e=>I$(e)&&"expression"!==A$(e,"barLabelColorMode"),tid:"barLabelColor",dualOutput:!0},barLabelColorExpression:R$("barLabelColor","SNTable.Bar.LabelColorExpression",e=>I$(e)&&"expression"===A$(e,"barLabelColorMode")),barWidthExpression:R$("barWidth","SNTable.Bar.WidthExpression",I$),barOffsetExpression:R$("barOffset","SNTable.Bar.OffsetExpression",I$),barLabelExpression:R$("barLabel","SNTable.Bar.LabelExpression",I$),barRangeMode:{type:"string",component:"dropdown",ref:"qDef.representation.barRangeMode",translation:"SNTable.Bar.Range",defaultValue:"auto",show:I$,tid:"barRangeMode",options:[{value:"auto",translation:"Common.Auto"},{value:"manual",translation:"Common.Custom"}]},barRangeMin:{type:"number",ref:"qDef.representation.barRangeMin",translation:"SNTable.Bar.RangeMin",expressionType:"ValueExpression",expression:"optional",defaultValue:0,show:t,tid:"barRangeMin"},barRangeMax:{type:"number",ref:"qDef.representation.barRangeMax",translation:"SNTable.Bar.RangeMax",expressionType:"ValueExpression",expression:"optional",defaultValue:100,show:t,tid:"barRangeMax"},barEnd:{type:"string",component:"dropdown",ref:"qDef.representation.barEnd",translation:"SNTable.Bar.End",defaultValue:"none",show:I$,tid:"barEnd",options:[{value:"none",translation:"SNTable.Bar.End.None"},{value:"circle",translation:"SNTable.Bar.End.Circle"},{value:"box",translation:"SNTable.Bar.End.Square"}]}}};var P$,T$={};var q$,O$=(P$||(P$=1,q$=T$,(()=>{var e={828(e,t,r){r.r(t),r.d(t,{default:()=>Re});var n=r.cjs(function(e,t){var r=Object.prototype.hasOwnProperty,n=Object.prototype.toString,o=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},s=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var t,o=r.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&r.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!i)return!1;for(t in e);return void 0===t||r.call(e,t)},l=function(e,t){o&&"__proto__"===t.name?o(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},u=function(e,t){if("__proto__"===t){if(!r.call(e,t))return;if(i)return i(e,t).value}return e[t]};e.exports=function e(){var t,r,n,o,i,c,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(r in t)n=u(d,r),d!==(o=u(t,r))&&(h&&o&&(s(o)||(i=a(o)))?(i?(i=!1,c=n&&a(n)?n:[]):c=n&&s(n)?n:{},l(d,{name:r,newValue:e(h,c,o)})):void 0!==o&&l(d,{name:r,newValue:o}));return d}}),o=r.n(n);const i=(e,t,r)=>{if(!t)return!1;const n=t.split("."),o=n[n.length-1];let i,a=e;for(i=0;i<n.length-1;++i)void 0===a[n[i]]&&(a[n[i]]=Number.isNaN(+n[i+1])?{}:[]),a=a[n[i]];if(void 0!==r){const e=a[o];return a[o]=r,{updated:r,previous:e}}return delete a[o],!1},a=(e,t,r)=>{const n=t.split(".");let o,i=e;if(void 0===i)return r;for(o=0;o<n.length;++o){if(void 0===i[n[o]])return r;i=i[n[o]]}return i},s={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"}]},l=" ( ",u=" ) ";function c(e){return l+e+u}function d(e,t={}){if(e.qLibraryId){const r=function(e,t){if(!t)return null;let r,n;for(r=0;r<t.length;r++)if(n=t[r],n.qInfo.qId===e)return n;return null}(e.qLibraryId,t.dimensionList);return r&&r.qData.info[0].qTags.indexOf("$numeric")>-1}const r=function(e,t){if(!t)return null;let r,n;const o=function(e){let t=e.trim();"="===t.charAt(0)&&(t=t.substring(1),t=t.trim());const r=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(r)&&(t=t.substring(1,r),t=t.trim()),t}(e);for(r=0;r<t.length;r++){if(n=t[r],n.qName===o)return n;if(n.qDerivedFieldData)for(let e=0;e<n.qDerivedFieldData.qDerivedFieldLists.length;++e){const t=n.qDerivedFieldData.qDerivedFieldLists[e];for(let e=0;e<t.qFieldDefs.length;++e){const r=t.qFieldDefs[e];if(r.qName===o)return r}}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return r&&r.qTags.indexOf("$numeric")>-1}function p(e){return!(!e.fullAccumulation&&!e.fullRange)}function f(e,t){const{crossAllDimensions:r}=e;return 2===t&&r?"RowNo(Total)":"RowNo()"}function h(e){const t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e),r=t.trim();return"="===r.substring(0,1)?r.substring(1).trim():r}function m(e=0){return`[$(=Replace(GetObjectField(${e}),']',']]'))]`}function g(e,t){const{crossAllDimensions:r}=e;return 2===t&&r?"Above(Total ":"Above("}function b(e){return void 0===e?")":`, 0, ${e})`}function v(e){return`Replace(Replace(${e},'''',''''''),'$','$''&''')`}function y(e,t){return e?`${t}={">=$(=Min(${t}))<=$(=Max(${t}))"}`:`${t}={"=Only({1}${t})>='$(=${v(`MinString(${t})`)})' and Only({1}${t})<='$(=${v(`MaxString(${t})`)})'"}`}function x({modifier:e={},dimensions:t,dimensionAndFieldList:r,funcComp:n="Sum",valueComp:o="0"}){const{showExcludedValues:i}=e;if(!i)return"";if(t&&1===t.length)return`${n}({1<${y(d(t[0],r),m(0))}>}${o})`;if(t&&2===t.length){const e=d(t[0],r),i=d(t[1],r),a=m(0),s=m(1);return`${n}({1<${y(e,a)},${y(i,s)}>}${o})`}return`${n}({1}${o})`}function S(e){return`${e}(`}function w({properties:e,layout:t}){return a(e,"qHyperCubeDef.qDimensions",a(t,"qHyperCube.qDimensionInfo",[])).length}const C={isFullRange:p,getNumDimensions:w,getExpressionWithExcludedComp:function({expression:e,modifier:t,dimensions:r,dimensionAndFieldList:n,treatMissingAsNull:o}){const i=c(h(e)),{showExcludedValues:a}=t;if(!a)return i;const s=x({modifier:t,dimensions:r,dimensionAndFieldList:n}),l=o?"":", 0";return r&&1===r.length?`If(Count(${m(0)}) > 0, ${i} + ${s}${l})`:r&&2===r.length?`If(Count(${m(0)}) * Count(${m(1)}) > 0, ${i} + ${s}${l})`:i},getRowNoComp:f,getNumStepComp:function(e,t){if(!p(e)){const{steps:t}=e;return"number"!=typeof t||Number.isNaN(t)?6:t}return f(e,t)},getAboveCompPrefix:g,getAboveCompSuffix:b,getAboveComp:function(e,t,r,n){return g(e,t)+r+b(n)},getFunctionPrefix:S,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return S(e)+t+")"},getAggrComp:function(e,t,r){return`Aggr(${e}, ${t}, ${r})`},getExcludedComp:x,needDimension:function({modifier:e,properties:t,layout:r}){return 0===function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(e)&&2===w({properties:t,layout:r})},getDimComp:function(e,t){const r=function(e,t=0){return e[t].qDef.qSortCriterias[0]}(e,t),n=m(t);if(!r.qSortByExpression&&!r.qSortByNumeric&&!r.qSortByAscii)return n;const o=["Descending","Ascending"],i=r.qSortByNumeric?`(Numeric, ${o[(r.qSortByNumeric+1)/2]})`:"",a=r.qSortByAscii?`(Text, ${o[(r.qSortByAscii+1)/2]})`:"";return r.qSortByNumeric&&r.qSortByAscii?`(${n}, ${i}, ${a})`:r.qSortByNumeric?`(${n}, ${i})`:r.qSortByAscii?`(${n}, ${a})`:n},simplifyExpression:h,extractInputExpression:function({outputExpression:e,modifier:t}){if(!t)return;const r=e.indexOf(l);if(-1===r)return;const n=e.indexOf(u);return-1!==n?e.substring(r+3,n):void 0},initModifier:function(e,t){Object.keys(t).forEach(r=>{void 0===e[r]&&(e[r]=t[r])})},isNumeric:d,isApplicable:function({properties:e,layout:t,minDimensions:r=1,maxDimensions:n=2}){if(!e&&!t)return!0;const o=w({properties:e,layout:t});return o>=r&&o<=n},getExpressionWithMarkers:c,canExtract:function(e){const t=e.indexOf(l),r=e.indexOf(u);return t>-1&&r>-1&&t<r},getDimDefWithWrapper:m,getFieldWithWrapper:function(e){return`[${e?e.replace(/]/g,"]]"):e}]`},generateTSDExpression:function(e,t,r){let n=t||e.outputExpression;if(e.base&&e.base.qDef&&(n=t!==e.base.qDef?t:e.base.qDef),"observed"!==e.decomposition){const o=r.qHyperCubeDef.qMeasures.find(t=>t.qDef.base&&t.qDef.base.qLibraryId&&e.base&&e.base.qLibraryId?t.qDef.base.qLibraryId===e.base.qLibraryId:null);o&&t!==o.qDef.qLabel&&(n=o.qLibraryId||o.qDef.base.qLibraryId?`[${o.qDef.qLabel}]`:o.qDef.base.qDef);const i=function(e){const t=s.OPTIONS.find(t=>t.value===e.decomposition);return t?s.EXPRESSIONS[t.value]:""}(e);n=n.startsWith("=")?n.substr(1):n,n=`${i}(${n}, ${e.steps})`}return n},getDecomposition:function(e){let t="observed";return Object.values(s.EXPRESSIONS).find(r=>{const n=e.qDef.base.qDef.toLowerCase()||e.qDef.qDef.toLowerCase();return s.EXPRESSIONS[r]&&n.includes(s.EXPRESSIONS[r].toLowerCase())&&(t=r),r}),t}},E=o().bind(null,!0),R={},{isArray:A}=Array;function I(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function M(e){return void 0===e}function k(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function D(e,t){const r=t.substring(1).split("/").slice(0,-1);let n;return r.forEach((t,o)=>{if(o===r.length)return;n=+t;const i=Number.isNaN(n)?{}:[];e[n||t]=M(e[n||t])?i:e[t],e=e[n||t]}),e}function P(e,t){let r=!0;if(I(e)&&I(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach(n=>{P(e[n],t[n])||(r=!1)}),r);if(A(e)&&A(t)){if(e.length!==t.length)return!1;for(let r=0,n=e.length;r<n;r+=1)if(!P(e[r],t[r]))return!1;return!0}return e===t}R.generate=function(e,t,r){r=r||"";let n=[];return Object.keys(t).forEach(o=>{const i=function(e){return e?E({},{val:e}).val:e}(t[o]),a=e[o],s=`${r}/${o}`;P(i,a)||k(t,o)||(M(a)?n.push({op:"add",path:s,value:i}):I(i)&&I(a)?n=n.concat(R.generate(a,i,s)):A(i)&&A(a)?n=n.concat(function(e,t,r){let n=[];const o=e.slice();let i=-1;function a(e,t,r){if(e[r]&&M(e[r].qInfo))return null;if(e[r]&&e[r].qInfo.qId===t)return r;for(let r=0,n=e.length;r<n;r+=1)if(e[r]&&e[r].qInfo.qId===t)return r;return-1}if(P(t,o))return n;if(!M(t[0])&&M(t[0].qInfo))return n.push({op:"replace",path:r,value:t}),n;for(let e=o.length-1;e>=0;e-=1)i=a(t,o[e].qInfo&&o[e].qInfo.qId,e),-1===i?(n.push({op:"remove",path:`${r}/${e}`}),o.splice(e,1)):n=n.concat(R.generate(o[e],t[i],`${r}/${e}`));for(let e=0,s=t.length;e<s;e+=1)i=a(o,t[e].qInfo&&t[e].qInfo.qId),-1===i?(n.push({op:"add",path:`${r}/${e}`,value:t[e]}),o.splice(e,0,t[e])):i!==e&&(n.push({op:"move",path:`${r}/${e}`,from:`${r}/${i}`}),o.splice(e,0,o.splice(i,1)[0]));return n}(a,i,s)):n.push({op:"replace",path:`${r}/${o}`,value:i}))}),Object.keys(e).forEach(o=>{M(t[o])&&!k(e,o)&&n.push({op:"remove",path:`${r}/${o}`})}),n},R.apply=function(e,t){t.forEach(t=>{let r=D(e,t.path),n=t.path.split("/").splice(-1)[0],o=n&&Number.isNaN(+n)?r[n]:r[+n]||r;const i=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(r=null,o=e),"add"===t.op||"replace"===t.op)if(A(r))"-"===n&&(n=r.length),r.splice(+n,"add"===t.op?0:1,t.value);else if(A(o)&&A(t.value)){const e=t.value.slice();o.length=0,o.push(...e)}else if(I(o)&&I(t.value))a=o,Object.keys(a).forEach(e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!k(a,e)&&delete a[e]}),E(o,t.value);else{if(!r)throw new Error("Patchee is not an object we can patch");r[n]=t.value}else if("move"===t.op){const o=D(e,t.from);A(r)?r.splice(+n,0,o.splice(+i,1)[0]):(r[n]=o[i],delete o[i])}else"remove"===t.op&&(A(r)?r.splice(+n,1):delete r[n]);var a})},R.clone=function(e){return E({},e)},R.createPatch=function(e,t,r){const n={op:e.toLowerCase(),path:r};return"move"===n.op?n.from=t:void 0!==t&&(n.value=t),n},R.updateObject=function(e,t){Object.keys(e).length?R.apply(e,R.generate(e,t)):E(e,t)};const T=R,q={saveSoftProperties(e,t,r){if(!e)return Promise.resolve();let n=T.generate(t,r);return o()(!0,t,r),n&&n.length?(n=n.map(e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path})),e.applyPatches(n,!0)):Promise.resolve()}},O="accumulation";function L(e,t){const r=a(e,t);if(r)for(let e=0;e<r.length;e++)if(r[e].type===O)return r[e]}function N(e,t){const r=function(e,t){const r=a(e,t);if(!r)return-1;for(let e=0;e<r.length;e++)if(r[e].type===O)return e;return-1}(e,t);return r>-1?`${t}.${r}`:t}const j={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""},_={translationKey:"properties.modifier.accumulation",needDimension:C.needDimension,isApplicable:({properties:e,layout:t})=>C.isApplicable({properties:e,layout:t,minDimensions:1,maxDimensions:2}),generateExpression({expression:e,modifier:t,properties:r,layout:n,numDimensions:o,dimensionAndFieldList:i}){if(!t)return e;let s=o;void 0===s&&(s=C.getNumDimensions({properties:r,layout:n}));const l=a(r,"qHyperCubeDef.qDimensions",[]),u=C.getExpressionWithExcludedComp({expression:e,modifier:t,dimensions:l,dimensionAndFieldList:i}),c=C.getNumStepComp(t,s),d=C.getAboveComp(t,s,u,c);let p=C.getRangeComp("RangeSum",d);if(C.needDimension({modifier:t,properties:r,layout:n})){const e=C.getDimComp(l,1),r=C.getDimComp(l,0),n=C.getAggrComp(p,e,r);p=t.showExcludedValues?C.getExcludedComp({modifier:t,dimensions:l,dimensionAndFieldList:i,valueComp:n}):n}return p},extractInputExpression:C.extractInputExpression,initModifier(e){C.initModifier(e,j)},enableTotalsFunction:()=>!1,propertyPanelDef:function(e,t={}){return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:(e,t)=>!C.isApplicable({properties:t.properties})},settings:{type:"items",items:{primaryDimension:{refFn:t=>`${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(e,t){const{qDimensionInfo:r}=t.layout.qHyperCube;return r.map((e,t)=>({value:t,label:e.qGroupFallbackTitles[0]}))},show:(e,t)=>t.layout.qHyperCube.qDimensionInfo.length>1},crossAllDimensions:{refFn:t=>`${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:(e,t)=>t.layout.qHyperCube.qDimensionInfo.length>1},fullRange:{refFn:t=>`${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:t=>`${N(t,e)}.steps`,type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change(t){const r=L(t,e);if(r){const{steps:e}=r;r.steps="number"!=typeof e||Number.isNaN(e)?6:Math.abs(e)}},show(t){const r=L(t,e);return r&&!r.fullAccumulation}},showExcludedValues:{refFn:t=>`${N(t,e)}.showExcludedValues`,type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:(e,t)=>C.isApplicable({properties:t.properties})}},show(t,r,n){const o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(O))return!1;const i=L(t,e);return i&&!i.disabled}}}},z="movingAverage";function F(e,t){const r=a(e,t);if(r)for(let e=0;e<r.length;e++)if(r[e].type===z)return r[e]}function $(e,t){const r=function(e,t){const r=a(e,t);if(!r)return-1;for(let e=0;e<r.length;e++)if(r[e].type===z)return e;return-1}(e,t);return r>-1?`${t}.${r}`:t}const B={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1},H={translationKey:"properties.modifier.movingAverage",needDimension:C.needDimension,isApplicable:({properties:e,layout:t})=>C.isApplicable({properties:e,layout:t,minDimensions:1,maxDimensions:2}),generateExpression({expression:e,modifier:t,properties:r,layout:n,numDimensions:o,dimensionAndFieldList:i}){if(!t)return e;let s,l=o;void 0===l&&(l=C.getNumDimensions({properties:r,layout:n}));const u=a(r,"qHyperCubeDef.qDimensions",[]),c=t.showExcludedValues&&t.nullSuppression,d=C.getExpressionWithExcludedComp({expression:e,modifier:t,dimensions:u,dimensionAndFieldList:i,treatMissingAsNull:c}),p=C.getNumStepComp(t,l),f=C.getAboveComp(t,l,d,p);if(t.nullSuppression)s=C.getRangeComp("RangeAvg",f);else{const e=C.getRangeComp("RangeSum",f),r=function(e,t){const r=C.getRowNoComp(e,t);if(!C.isFullRange(e)){const{steps:t}=e;return`RangeMin(${"number"!=typeof t||Number.isNaN(t)?6:t}, ${r})`}return r}(t,l);s=`${e} / ${r}`}let h=s;if(C.needDimension({modifier:t,properties:r,layout:n})){const e=C.getDimComp(u,1),r=C.getDimComp(u,0),n=C.getAggrComp(h,e,r);h=t.showExcludedValues?C.getExcludedComp({modifier:t,dimensions:u,dimensionAndFieldList:i,funcComp:"Only",valueComp:n}):n}return h},extractInputExpression:C.extractInputExpression,initModifier(e){C.initModifier(e,B)},enableTotalsFunction:()=>!1,propertyPanelDef:function(e,t={}){return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:(e,t)=>!C.isApplicable({properties:t.properties})},settings:{type:"items",items:{primaryDimension:{refFn:t=>`${$(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(e,t){const{qDimensionInfo:r}=t.layout.qHyperCube;return r.map((e,t)=>({value:t,label:e.qGroupFallbackTitles[0]}))},show:(e,t)=>t.layout.qHyperCube.qDimensionInfo.length>1},crossAllDimensions:{refFn:t=>`${$(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:(e,t)=>t.layout.qHyperCube.qDimensionInfo.length>1},fullRange:{refFn:t=>`${$(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:t=>`${$(t,e)}.steps`,type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change(t){const r=F(t,e);if(r){const{steps:e}=r;r.steps="number"!=typeof e||Number.isNaN(e)?6:Math.abs(e)}},show(t){const r=F(t,e);return r&&!r.fullRange}},showExcludedValues:{refFn:t=>`${$(t,e)}.showExcludedValues`,type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:t=>`${$(t,e)}.nullSuppression`,type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:(e,t)=>C.isApplicable({properties:t.properties})}},show(t,r,n){const o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(z))return!1;const i=F(t,e);return i&&!i.disabled}}}},V="timeSeriesDecomposition";function W(e,t){const r=a(e,t);if(r)for(let e=0;e<r.length;e++)if(r[e].type===V)return r[e]}function U(e,t){const r=function(e,t){const r=a(e,t);if(!r)return-1;for(let e=0;e<r.length;e++)if(r[e].type===V)return e;return-1}(e,t);return r>-1?`${t}.${r}`:t}const G={type:"timeSeriesDecomposition",disabled:!1,decomposition:"",steps:2,outputExpression:""},K={translationKey:"properties.modifier.timeSeriesDecomposition",needDimension:C.needDimension,isApplicable:({properties:e,layout:t})=>C.isApplicable({properties:e,layout:t,minDimensions:1,maxDimensions:2}),generateExpression:({expression:e,modifier:t,properties:r})=>t?C.generateTSDExpression(t,e,r):e,extractInputExpression:C.extractInputExpression,initModifier(e,t){C.initModifier(e,G),""===e.decomposition&&t&&(e.decomposition=C.getDecomposition(t))},propertyPanelDef:function(e,t={}){return{type:"items",items:{disclaimer:{component:"text",translation:t.timeSeriesDecomposition||"properties.modifier.timeSeriesDecomposition",show:(e,t)=>!C.isApplicable({properties:t.properties})},settings:{type:"items",items:{decomposition:{refFn:t=>`${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:s.OPTIONS},steps:{refFn:t=>`${U(t,e)}.steps`,type:"integer",translation:t.modifierTimeSeriesDecompositionPeriods||"properties.modifier.timeSeriesDecomposition.periods",schemaIgnore:!0,defaultValue:2,change(t,r){const n=W(t,e);if(n){const{steps:e}=n;n.steps="number"!=typeof e||Number.isNaN(e)?2:Math.abs(e),r.properties.qHyperCubeDef.qMeasures=r.properties.qHyperCubeDef.qMeasures.map(t=>(t.qDef.modifiers.map(t=>("timeSeriesDecomposition"===t.type?t.steps=e:t.steps=t.steps,t)),t))}},show(t){const r=W(t,e);return r&&!r.fullRange}}},show:(e,t)=>C.isApplicable({properties:t.properties})}},show(t,r,n){const o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(V))return!1;const i=W(t,e);return i&&!i.disabled}}}},Y="difference";function X(e,t){const r=function(e,t){const r=a(e,t);if(!r)return-1;for(let e=0;e<r.length;e++)if(r[e].type===Y)return e;return-1}(e,t);return r>-1?`${t}.${r}`:t}const J={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""},Z={translationKey:"properties.modifier.difference",needDimension:C.needDimension,isApplicable:({properties:e,layout:t})=>C.isApplicable({properties:e,layout:t,minDimensions:1,maxDimensions:2}),extractInputExpression:C.extractInputExpression,generateExpression({expression:e,modifier:t,properties:r,layout:n,numDimensions:o,dimensionAndFieldList:i}){if(!t)return e;let s=o;void 0===s&&(s=C.getNumDimensions({properties:r,layout:n}));const l=a(r,"qHyperCubeDef.qDimensions",[]),u=C.getExpressionWithExcludedComp({expression:e,modifier:t,dimensions:l,dimensionAndFieldList:i});let c=`${u} - ${C.getAboveComp(t,s,u)}`;if(C.needDimension({modifier:t,properties:r,layout:n})){const e=C.getDimComp(l,1),r=C.getDimComp(l,0),n=C.getAggrComp(c,e,r);c=t.showExcludedValues?C.getExcludedComp({modifier:t,dimensions:l,dimensionAndFieldList:i,funcComp:"Only",valueComp:n}):n}return c},initModifier(e){Object.keys(J).forEach(t=>{void 0===e[t]&&(e[t]=J[t])})},enableTotalsFunction:()=>!1,propertyPanelDef:function(e,t={}){return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:(e,t)=>!C.isApplicable({properties:t.properties})},settings:{type:"items",items:{primaryDimension:{refFn:t=>`${X(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(e,t){const{qDimensionInfo:r}=t.layout.qHyperCube;return r.map((e,t)=>({value:t,label:e.qGroupFallbackTitles[0]}))},show:(e,t)=>t.layout.qHyperCube.qDimensionInfo.length>1},crossAllDimensions:{refFn:t=>`${X(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:(e,t)=>t.layout.qHyperCube.qDimensionInfo.length>1},showExcludedValues:{refFn:t=>`${X(t,e)}.showExcludedValues`,type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:(e,t)=>C.isApplicable({properties:t.properties})}},show(t,r,n){const o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(Y))return!1;const i=function(e,t){const r=a(e,t);if(r)for(let e=0;e<r.length;e++)if(r[e].type===Y)return r[e]}(t,e);return i&&!i.disabled}}}},Q="normalization";function ee(e,t){const r=a(e,t);if(r)for(let e=0;e<r.length;e++)if(r[e].type===Q)return r[e]}function te(e,t){const r=function(e,t){const r=a(e,t);if(!r)return-1;for(let e=0;e<r.length;e++)if(r[e].type===Q)return e;return-1}(e,t);return r>-1?`${t}.${r}`:t}function re(e,t){for(let r=0;r<e.length;r++)if(e[r].value===t)return r;return-1}const ne={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:2,selectionScope:2};function oe(e){return 2===e?"{1}":""}function ie(e,t,r){return 1===e?`{$<${C.getFieldWithWrapper(t)}={'${r}'}>}`:""}function ae(e,t){return 0===e&&t>1||2===e?"Total":""}function se(e,t,r){return 0===e&&t>1?`<${C.getDimDefWithWrapper(r)}>`:""}const le={translationKey:"properties.modifier.normalization",needDimension:()=>!0,isApplicable:({properties:e,layout:t})=>C.isApplicable({properties:e,layout:t,minDimensions:1,maxDimensions:2}),extractInputExpression:C.extractInputExpression,generateExpression({expression:e,modifier:t,properties:r,layout:n,numDimensions:o,dimensionAndFieldList:i}){if(!t)return e;let s=o;void 0===s&&(s=C.getNumDimensions({properties:r,layout:n}));const l=a(r,"qHyperCubeDef.qDimensions",[]),u=C.getExpressionWithExcludedComp({expression:e,modifier:t,dimensions:l,dimensionAndFieldList:i});let c=u;const{selectionScope:d,dimensionalScope:p,field:f,value:h,primaryDimension:m,ignoreNegative:g}=t;return c=function(e,t,r,n,o,i,a,s){const l=oe(t),u=ie(t,r,n),c=""===l&&""===u?"":l||u,d=ae(o,i),p=se(o,i,a),f=function(e){const t=[];for(let r=0;r<e;r++)t[r]=C.getDimDefWithWrapper(r);return t.join(", ")}(i);return s?`(If(${e} < 0, null(), ${e}))/ Sum(${c} ${d}${p} Aggr(${c} RangeMax( 0, ${e}), ${f}))`:`${e}/ Sum(${c} ${d}${p} Aggr(${c} ${e}, ${f}))`}(u,d,f,h,p,s,m,g),c},initModifier(e){Object.keys(ne).forEach(t=>{void 0===e[t]&&(e[t]=ne[t])})},updateModifier(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:()=>!0,propertyPanelDef:function(e,t={}){return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:(e,t)=>!C.isApplicable({properties:t.properties})},settings:{type:"items",items:{selectionScope:{refFn:t=>`${te(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:r=>function(e,t,r){let n=[{value:0,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:1,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:2,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];const{dimensionalScope:o}=ee(e,r);return n=function(e,t){if(1===e){const e=re(t,0);t.splice(e,1)}return t}(o,n),n}(r,t,e)},field:{refFn:t=>`${te(t,e)}.field`,type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:(e,t,r)=>r.app.getFieldList().then(e=>e.map(e=>({label:e.qName,value:e.qName}))),show:t=>1===ee(t,e).selectionScope},value:{refFn:t=>`${te(t,e)}.value`,type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:t=>1===ee(t,e).selectionScope},dimensionalScope:{refFn:t=>`${te(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:(r,n)=>function(e,t,r,n){const o=t.layout.qHyperCube.qDimensionInfo.length;let i=[{value:0,translation:r.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:r.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:1,translation:r.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope."+(2===o?"respectAllDimensions":"respectDimension"),tooltipTranslation:r.dimensionalScopeAllDimensionsTooltip||`properties.modifier.dimensionalScope.${2===o?"respectAllDimensions":"respectDimension"}.tooltip`},{value:2,translation:r.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope."+(2===o?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:r.dimensionalScopeDisregardAllDimensionsTooltip||`properties.modifier.dimensionalScope.${2===o?"disregardAllDimensions":"disregardDimension"}.tooltip`}];i=function(e,t){if(e<2){const e=re(t,0);t.splice(e,1)}return t}(o,i);const{selectionScope:a}=ee(e,n);return i=function(e,t){if(0===e){const e=re(t,1);t.splice(e,1)}return t}(a,i),i}(r,n,t,e)},primaryDimension:{refFn:t=>`${te(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(e,t){const{qDimensionInfo:r}=t.layout.qHyperCube;return r.map((e,t)=>({value:t,label:e.qGroupFallbackTitles[0]}))},show:(t,r)=>0===(ee(t,e).dimensionalScope||0)&&r.layout.qHyperCube.qDimensionInfo.length>1}},show:(e,t)=>C.isApplicable({properties:t.properties})}},show(t,r,n){const o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(Q))return!1;const i=ee(t,e);return i&&!i.disabled}}},getDisregardSelectionComp:oe,getFieldSelectionComp:ie,getTotalComp:ae,getSelectedDimComp:se},ue="library id deleted",ce="qDef.qDef",de="qDef.base.qDef",pe="qLibraryId",fe="qDef.base.qLibraryId",he="qDef.qLabel",me="qDef.qLabelExpression",ge="qDef.base.qLabel",be="qDef.base.qLabelExpression",ve="qDef.qAggrFunc",ye="qDef.base.qAggrFunc",xe="qDef.base",Se={getExpression(e){const t=a(e,de);return void 0!==t?t:a(e,ce)},getExpressionRef:e=>void 0!==a(e,de)?de:ce,getLibraryIdRef:e=>a(e,fe)?fe:pe,getLibraryId:e=>a(e,fe)||a(e,pe),getLabelRef:e=>a(e,xe)?ge:he,getLabelExpressionRef:e=>a(e,xe)?be:me},we={initBase(e,t){(t||we.isValid(e))&&(i(e,de,a(e,ce)),i(e,fe,a(e,pe)),i(e,ge,a(e,he)),i(e,be,a(e,me)))},restoreBase(e){we.isValid(e)&&(i(e,ce,a(e,de)),i(e,pe,a(e,fe)),i(e,he,a(e,ge)),i(e,me,a(e,be)),a(e,ve)&&a(e,ye)&&i(e,ve,a(e,ye)),delete e.qDef.base)},isValid(e){const t=a(e,de),r=a(e,fe);return void 0!==t||void 0!==r}},Ce=we,Ee={accumulation:_,movingAverage:H,difference:Z,normalization:le,timeSeriesDecomposition:K},Re={modifiers:Ee,apply:Ie,applyModifiers:Me,cleanUpMeasure:ke,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:De,getActiveModifier:Pe,initBase:Ce.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some(e=>Ee[e])},isApplicableSupportedModifiers:function({modifierTypes:e,properties:t,layout:r}){return Array.isArray(e)&&e.some(e=>Ee[e]&&Ee[e].isApplicable({properties:t,layout:r}))},measureBase:Se,limitedSorting:function({measures:e,properties:t,layout:r}){let n=!1,o=!1;return e.forEach(e=>{const i=Oe(e);$e({modifiers:i,properties:t,layout:r})&&(n=!0,o=o||Ue({modifiers:i,properties:t,layout:r}))}),n&&!o},ifEnableTotalsFunction:Te},Ae={};function Ie({model:e,properties:t,isSnapshot:r=!1,masterItem:n}={}){const i=!1;Ae[e.id]=Ae[e.id]||{isFirstTime:!0};const{isFirstTime:s}=Ae[e.id];if(Ae[e.id].isFirstTime=!1,t&&"object"==typeof t)return Me({model:e,properties:t});const l=e?e.layout:void 0,u=a(l,"qSelectionInfo.qInSelections");if(r||u)return Promise.resolve(i);const c=a(l,"qHyperCube.qMeasureInfo"),{lastReloadTime:d}=Ae[e.id];if(Ae[e.id].lastReloadTime=a(e,"app.layout.qLastReloadTime"),De({measures:c,layout:l})){const t=function({measures:e,layout:t,model:r,lastReloadTime:n}){return a(r,"app.layout.qLastReloadTime")!==n&&function({measures:e,properties:t,layout:r}){return!!Array.isArray(e)&&e.some(e=>Fe({measure:e,properties:t,layout:r}))}({measures:e,layout:t})}({measures:c,layout:l,model:e,lastReloadTime:d});return t||function({measures:e,layout:t,masterItem:r,isFirstTime:n}){return!!Array.isArray(e)&&(n||r||e.some(e=>function({measure:e,layout:t}){return $e({modifiers:Oe(e),layout:t})?!e.base:!!e.base}({measure:e,layout:t})))}({measures:c,layout:l,masterItem:n,isFirstTime:s})?e.getEffectiveProperties().then(r=>{const a=o()(!0,{},r);Ne(a);const s=Ge(a);return Be({model:e}).then(o=>He({libraryIds:s,model:e}).then(i=>(t&&function({properties:e}){qe(e).forEach(t=>function({measure:e,properties:t}){if(Fe({measure:e,properties:t})){let t=0;const{modifiers:r}=e.qDef;Array.isArray(r)&&r.forEach(r=>{if("object"==typeof r&&!r.disabled){if(t++,"object"!=typeof Ee[r.type])throw new Error(`Modifier "${r.type}" is not available`);if(t>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");const n=Ee[r.type].extractInputExpression({outputExpression:e.qDef.qDef,modifier:r});void 0!==n&&_e(e)&&C.simplifyExpression(e.qDef.base.qDef)!==C.simplifyExpression(n)&&(e.qDef.base.qDef=n)}})}}({measure:t,properties:e}))}({properties:a}),Me({model:e,oldProperties:r,properties:a,runUpdateIfChange:!0,masterItem:n,libraryItemsProps:i,dimensionAndFieldList:o})))).catch(()=>Promise.resolve(i))}):Promise.resolve(i)}return function(e){return!!Array.isArray(e)&&e.some(e=>"object"==typeof e.base)}(c)?e.getEffectiveProperties().then(t=>function({model:e,properties:t}){const r=Ge(t);return Ke({model:e,libraryIds:r}).then(()=>{const r=o()(!0,{},t);return qe(t).forEach(e=>ke(e)),We({oldProperties:r,newProperties:t,model:e})})}({model:e,properties:t})):Promise.resolve(i)}function Me({model:e,oldProperties:t,properties:r,measures:n,runUpdateIfChange:i=!1,masterItem:s,libraryItemsProps:l,dimensionAndFieldList:u}){void 0===t&&(t=i?o()(!0,{},r):r),Ne(r);const c=Ge(r);return Ke({model:e,libraryIds:c,masterItem:s}).then(()=>function({measures:e,properties:t,model:r,libraryItemsProps:n,dimensionAndFieldList:i}){if(e||(e=qe(t)),!e.length)return Promise.resolve();if(!n&&!De({measures:e,properties:t}))return e.forEach(e=>ke(e)),Promise.resolve();const s=n?void 0:Ge(t);return Be({model:r,dimensionAndFieldList:i}).then(i=>He({libraryIds:s,model:r,libraryItemsProps:n}).then(r=>{e.forEach(e=>{const{modifiers:n}=e.qDef;r&&$e({modifiers:n,properties:t})?(function({measure:e,properties:t,libraryItemsProps:r,dimensionAndFieldList:n}){let i=0;Ce.isValid(e)||Ce.initBase(e,!0);const{modifiers:s,base:l}=e.qDef;Array.isArray(s)&&s.forEach(s=>{if("object"==typeof s&&!s.disabled){if(i++,"object"!=typeof Ee[s.type])throw new Error(`Modifier "${s.type}" is not available`);if(i>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");Ee[s.type].initModifier(s,e);const u=e.qLibraryId||l&&l.qLibraryId;u?function({measure:e,modifier:t,libraryId:r,properties:n,libraryItemsProps:i,dimensionAndFieldList:a}){const s=i[r],l=s.qMeasure.qDef,u=""===l?l:Ee[t.type].generateExpression({expression:l,modifier:t,properties:n,dimensionAndFieldList:a});t.outputExpression=u,e.qDef.qDef=t.outputExpression,(e.qDef.qLabel||s.qMeasure.qLabel)&&(e.qDef.qLabel=e.qDef.base.qLabel||s.qMeasure.qLabel),(e.qDef.qLabelExpression||s.qMeasure.qLabelExpression)&&(e.qDef.qLabelExpression=s.qMeasure.qLabelExpression),e.qDef.quarantine&&e.qDef.quarantine.qNumFormat&&s.qMeasure.qNumFormat&&(e.qDef.qNumFormat=e.qDef.base.qNumFormat||s.qMeasure.qNumFormat,e.qDef.isCustomFormatted=s.qMeasure.isCustomFormatted),delete e.qLibraryId,e.qDef.coloring=s.qMeasure.coloring,t.base=o()(!0,{},e.qDef.base)}({measure:e,modifier:s,libraryId:u,properties:t,libraryItemsProps:r,dimensionAndFieldList:n}):function({measure:e,modifier:t,properties:r,dimensionAndFieldList:n}){"function"==typeof Ee[t.type].updateModifier&&Ee[t.type].updateModifier(t,r.qHyperCubeDef);const i=Se.getExpression(e),a=""===i?i:Ee[t.type].generateExpression({expression:i,modifier:t,properties:r,dimensionAndFieldList:n});t.outputExpression=a,e.qDef.qDef=t.outputExpression,e.qDef.base.qLabelExpression?e.qDef.qLabelExpression=e.qDef.base.qLabelExpression:e.qDef.qLabel=e.qDef.base.qLabel||i,t.base=o()(!0,{},e.qDef.base)}({measure:e,modifier:s,properties:t,dimensionAndFieldList:n}),function(e){const t=a(e,"qDef.qAggrFunc");"Expr"!==t||Te(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&Te(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(e)}})}({measure:e,properties:t,libraryItemsProps:r,dimensionAndFieldList:i}),je(e)):ke(e)})}))}({measures:n,properties:r,model:e,libraryItemsProps:l,dimensionAndFieldList:u}).then(()=>i?We({oldProperties:t,newProperties:r,model:e}):Promise.resolve(!1))).catch(()=>Promise.resolve(!1))}function ke(e){!function(e){const t=Oe(e);return Array.isArray(t)&&t.some(e=>"object"==typeof e&&!e.disabled&&!Ee[e.type])}(e)?Ce.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,je(e)}function De({measures:e,properties:t,layout:r}){return!!Array.isArray(e)&&e.some(e=>$e({modifiers:Oe(e),properties:t,layout:r}))}function Pe(e){const t=Oe(e);if(Array.isArray(t))for(let e=0;e<t.length;e++){const r=t[e];if(Ee[r.type]&&!r.disabled)return r}}function Te(e){const t=Pe(e);return!t||Ee[t.type].enableTotalsFunction(e)}function qe(e){return a(e,"qHyperCubeDef.qMeasures",[]).concat(a(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function Oe(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function Le(e){return a(e,"outputExpression.qValueExpression.qExpr")||a(e,"outputExpression")}function Ne(e){qe(e).forEach(e=>function(e){const t=Pe(e);t&&(void 0!==t.outputExpression&&Le(t)!==e.qDef.qDef?delete e.qDef.base:!Ce.isValid(e)&&t.base&&(e.qDef.base=o()(!0,{},t.base)))}(e))}function je(e){const t=Oe(e);Array.isArray(t)&&t.forEach(t=>{"object"==typeof t&&(t.disabled||!Ee[t.type]&&Le(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)})}function _e(e){return e.base||e.qDef&&e.qDef.base}function ze(e){const t=_e(e);return e.qLibraryId||t&&t.qLibraryId}function Fe({measure:e,properties:t,layout:r}){return!ze(e)&&$e({modifiers:Oe(e),properties:t,layout:r})}function $e({modifiers:e,properties:t,layout:r}){const n={};return Array.isArray(e)&&e.some(e=>!("object"!=typeof e||e.disabled||!Ee[e.type])&&(void 0===n[e.type]&&(n[e.type]=Ee[e.type].isApplicable({properties:t,layout:r})),n[e.type]))}function Be({model:e,dimensionAndFieldList:t}){if(t)return Promise.resolve(t);const r=[],n={},o=e.app.getDimensionList().then(e=>{n.dimensionList=e});r.push(o);const i=e.app.getFieldList().then(e=>{n.fieldList=e});return r.push(i),Promise.all(r).then(()=>n)}function He({libraryIds:e,model:t,libraryItemsProps:r}){if(r)return Promise.resolve(r);const{measureLibraryIds:n,dimensionLibraryIds:o}=e,i={},a=[];return n.forEach(e=>{const r=t.app.getMeasure(e).then(t=>t.getProperties().then(t=>{i[e]=t}));a.push(r)}),o.forEach(e=>{const r=t.app.getDimension(e).then(t=>t.getProperties().then(t=>{i[e]=t}));a.push(r)}),Promise.all(a).then(()=>i).catch(()=>null)}function Ve(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function We({oldProperties:e,newProperties:t,model:r}){const n=JSON.stringify(a(e,"qHyperCubeDef.qMeasures"),Ve)!==JSON.stringify(a(t,"qHyperCubeDef.qMeasures"),Ve)||JSON.stringify(a(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ve)!==JSON.stringify(a(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ve);return n?function({model:e,oldProperties:t,newProperties:r}){const{layout:n}=e;return n&&!n.qHasSoftPatches&&!n.qExtendsId&&a(n,"qMeta.privileges",[]).indexOf("update")>-1?e.setProperties(r):q.saveSoftProperties(e,t,r)}({model:r,oldProperties:e,newProperties:t}).then(()=>n):Promise.resolve(n)}function Ue({modifiers:e,properties:t,layout:r}){return Array.isArray(e)&&e.some(e=>"object"==typeof e&&!e.disabled&&Ee[e.type]&&Ee[e.type].needDimension({modifier:e,properties:t,layout:r}))}function Ge(e){const t=qe(e),r=[],n=[];let o=!1;return t.forEach(t=>{const n=Oe(t);if($e({modifiers:n,properties:e})){const i=ze(t);i&&r.push(i),o=o||Ue({modifiers:n,properties:e})}}),a(e,"qHyperCubeDef.qDimensions",[]).forEach(e=>{const t=e.qLibraryId;t&&n.push(t)}),{measureLibraryIds:r,dimensionLibraryIds:n}}function Ke({model:e,libraryIds:t,masterItem:r}){return!r&&r!==ue&&Ae[e.id]&&t&&(t.measureLibraryIds.length||t.dimensionLibraryIds.length)?(Ae[e.id].masterItemSubscriber=Ae[e.id].masterItemSubscriber||function({model:e,callback:t}){let r={},n={},o={};const i={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function s(e){const t={},r=a(e,"qInfo.qType");return r&&i[r]&&i[r].forEach(r=>{t[r]=a(e,r)}),JSON.stringify(t)}function l(e){const{qId:n}=e.qInfo;if(r[n]){const o=s(e);r[n].properties!==o&&(r[n].properties=o,"function"==typeof t&&r[n].enabled&&t(e)),r[n].enabled=!0}}function u(){Object.keys(r).forEach(e=>{n[e]||o[e]||(r[e].listener.dispose(),r[e].unbindCloseListnener(),delete r[e])})}const c=(e,t)=>(e.once("closed",t),()=>e.removeListener("closed",t));function d(n,o){return e.app[o](n).then(e=>{r[n]={listener:e.layoutSubscribe(l),unbindCloseListnener:c(e,()=>{return n=e.id,t(ue),delete r[n],void u();var n}),enabled:!1,properties:s(e.layout)}}).catch(()=>{})}return{subscribe({measureLibraryIds:t,dimensionLibraryIds:i}){const a=[];return function({measureLibraryIds:e,dimensionLibraryIds:t}){n={},e.forEach(e=>{n[e]=!0}),o={},t.forEach(e=>{o[e]=!0})}({measureLibraryIds:t,dimensionLibraryIds:i}),u(),e.app&&(Object.keys(n).forEach(e=>{n[e]&&!r[e]&&a.push(d(e,"getMeasure"))}),Object.keys(o).forEach(e=>{o[e]&&!r[e]&&a.push(d(e,"getDimension"))})),Promise.all(a)},unsubscribe(){Object.keys(r).forEach(e=>{r[e].listener.dispose(),r[e].unbindCloseListnener()}),r={}}}}({model:e,callback:t=>Ie({model:e,masterItem:t}).then(()=>e.app.clearUndoBuffer())}),Ae[e.id].masterItemSubscriber.subscribe(t)):Promise.resolve()}}};const t={};function r(n){const o=t[n];if(void 0!==o)return o.exports;const i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{if(Array.isArray(t))for(var n=0;n<t.length;){var o=t[n++],i=t[n++];r.o(e,o)?0===i&&n++:0===i?Object.defineProperty(e,o,{enumerable:!0,value:t[n++]}):Object.defineProperty(e,o,{enumerable:!0,get:i})}else for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.cjs=e=>{const t={exports:{}};return e.call(t.exports,t,t.exports),t.exports};let n=r(828);for(var o in q$.default=n.default,n)-1===["default"].indexOf(o)&&(q$[o]=n[o]);Object.defineProperty(q$,"__esModule",{value:!0})})()),T$),L$=$t(O$);const N$="TOTAL_OFF",j$={autoSort:{ref:"qDef.autoSort",type:"boolean",defaultValue:!0,show:!1}},_$=(e,t)=>t&&e.flags.isEnabled("VNA-977-TABLE-BARS"),z$=(e,t)=>_$(e,t)?[k$("barColor","SNTable.Bar.ColorExpression","barColorByExpression"),k$("barLabelColor","SNTable.Bar.LabelColorExpression","barLabelColorByExpression"),k$("barWidth","SNTable.Bar.WidthExpression","barWidthByExpression"),k$("barOffset","SNTable.Bar.OffsetExpression","barOffsetByExpression"),k$("barLabel","SNTable.Bar.LabelExpression","barLabelByExpression")]:[],F$=(e,t)=>({visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Table.Columns.VisibilityCondition",defaultValue:{qv:""},tid:"visibilityCondition",isExpression:e=>"string"==typeof e&&e.trim().length>0},tableCellStyling:{component:"attribute-expression-reference",defaultValue:[],ref:"qAttributeExpressions",items:[{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.BackgroundExpression",defaultValue:"",id:"cellBackgroundColor",tid:"tableColorBgByExpression"},{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.ForegroundExpression",defaultValue:"",id:"cellForegroundColor",tid:"tableColorByExpression"},{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.TextStyleExpression",defaultValue:"",id:"textStyleExpression",tid:"tableTextStyleByExpression"},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:"urlLabel",tid:"URLLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:"url",tid:"URLByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:"imageLabel",tid:"ImageLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:"imageUrl",tid:"ImageUrlByExpression",show:!1},...z$(e,t)]}}),$$=(e,t)=>({columnExpression:{type:"items",grouped:!0,items:[{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Table.Columns.VisibilityCondition",defaultValue:{qv:""},tid:"visibilityCondition",isExpression:e=>"string"==typeof e&&e.trim().length>0},{type:"items",items:[{component:"text",translation:"properties.Header",style:"sHeader"},{ref:"qDef.headerColor.background",translation:"Object.Table.Measure.BackgroundExpression",component:"expression",expressionType:"StringExpression",defaultValue:""},{ref:"qDef.headerColor.foreground",translation:"Object.Table.Measure.ForegroundExpression",component:"expression",expressionType:"StringExpression",defaultValue:""}]},{type:"items",items:[{component:"text",translation:"properties.Content",style:"sHeader"},{component:"attribute-expression-reference",defaultValue:[],ref:"qAttributeExpressions",items:[{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.BackgroundExpression",defaultValue:"",id:"cellBackgroundColor",tid:"tableColorBgByExpression"},{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.ForegroundExpression",defaultValue:"",id:"cellForegroundColor",tid:"tableColorByExpression"},{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.TextStyleExpression",defaultValue:"",id:"textStyleExpression",tid:"tableTextStyleByExpression"},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:"urlLabel",tid:"URLLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:"url",tid:"URLByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:"imageLabel",tid:"ImageLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:"imageUrl",tid:"ImageUrlByExpression",show:!1},...z$(e,t)]}]}]}}),B$={textAlignAuto:{ref:"qDef.textAlign.auto",type:"boolean",component:"switch",translation:"Common.Text.TextAlignment",options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}],defaultValue:!0},textAlign:{ref:"qDef.textAlign.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:e=>void 0!==e.qDef.textAlign&&!e.qDef.textAlign.auto}},H$=e=>({type:"items",grouped:!0,items:{totalsAggrGroup:{type:"items",items:{totalsAggrFunc:{type:"string",component:"dropdown",ref:"qDef.qAggrFunc",translation:"Object.Table.AggrFunc",options:(e,t)=>(!L$.hasActiveModifiers({measures:[e],properties:t.properties})||L$.ifEnableTotalsFunction(e)?[{value:""===e.qDef.qAggrFunc?"":"Expr",translation:"Common.Auto"}]:[]).concat([{value:"Avg",translation:"Object.Table.AggrFunc.Avg"},{value:"Count",translation:"Object.Table.AggrFunc.Count"},{value:"Max",translation:"Object.Table.AggrFunc.Max"},{value:"Min",translation:"Object.Table.AggrFunc.Min"},{value:"Sum",translation:"Object.Table.AggrFunc.Sum"},{value:"None",translation:"Object.Table.AggrFunc.None"}]),defaultValue:e.anything.sense?.isUnsupportedFeature?.("totals")?"None":"Expr"}}}},show:!e.anything.sense?.isUnsupportedFeature?.("totals")}),V$={type:{type:"string",component:"dropdown",ref:"qDef.columnWidth.type",translation:"Object.Table.Column.Width",options:[{value:Jm.Auto,translation:"Common.Auto"},{value:Jm.FitToContent,translation:"Object.Table.Column.FitToContent"},{value:Jm.Pixels,translation:"Object.Table.Column.Pixels"},{value:Jm.Percentage,translation:"Object.Table.Column.Percentage"}],defaultValue:Jm.Auto},sizePixels:{ref:"qDef.columnWidth.pixels",translation:"Object.Table.Column.Pixels",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:"200",show:e=>e.qDef.columnWidth?.type===Jm.Pixels},sizePercentage:{ref:"qDef.columnWidth.percentage",translation:"Object.Table.Column.Percentage",type:"number",expression:"optional",defaultValue:"20",show:e=>e.qDef.columnWidth?.type===Jm.Percentage}},W$=(e,t)=>({...j$,...e.flags.isEnabled("VNA-626-TABLE_HEADER_COLOR_BY_EXPRESSION")?$$(e,t):F$(e,t),...B$,...V$}),U$=e=>({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},nullSuppression:{type:"boolean",ref:"qNullSuppression",defaultValue:!1,translation:"properties.dimensions.showNull",inverted:!0},subTotalGroup:{type:"items",show:e.flags.isEnabled("TLV-2303-SUB-TOTALS")&&!e.anything.sense?.isUnsupportedFeature?.("totals"),items:[{uses:"divider"},{type:"string",component:"switch",translation:"properties.showSubTotals",ref:"qOtherTotalSpec.qTotalMode",defaultValue:N$,trueOption:{value:"TOTAL_EXPR",translation:"properties.on"},falseOption:{value:N$,translation:"properties.off"}},{type:"string",component:"expression",expressionType:"StringExpr",ref:"qTotalLabel",translation:"Common.Label",defaultValue:()=>e.translator.get("properties.subTotals"),show:e=>e.qOtherTotalSpec?.qTotalMode!==N$},{uses:"divider"}]},createMasterItemButton:{},divider:{uses:"divider"},dimensionLimits:{uses:"dimensions.items.dimensionLimits"},showOthers:{uses:"dimensions.items.others"}}),G$=e=>{const t=e.anything.sense?.isUnsupportedFeature?.("modifiers");return{libraryId:{type:"string",component:"library-item",libraryItemType:"measure",ref:"qLibraryId",translation:"Common.Measure",show:e=>t?!!e.qLibraryId:!(!e.qLibraryId&&!e.qDef.base?.qLibraryId)},inlineMeasure:{component:"inline-measure",show:e=>t?!e.qLibraryId:!(e.qLibraryId||e.qDef.base?.qLibraryId)},numberFormatting:{uses:"measures.items.numberFormatting"},createMasterItemButton:{},divider:{uses:"divider"},totalsAggr:H$(e)}},K$=e=>({dimensions:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qDimensions",items:{field:{type:"items",translation:"Common.Field",items:U$(e)},presentation:{type:"items",translation:"properties.presentation",items:{...W$(e,!1),...C$(e)}}}}}),Y$=e=>({measures:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qMeasures",items:{field:{type:"items",translation:"Common.Field",items:G$(e)},presentation:{type:"items",translation:"properties.presentation",items:{...W$(e,!0),...E$(e,{[v$.Image]:!0,[v$.Indicator]:!0,[v$.MiniChart]:!0,[v$.Bar]:_$(e,!0)}),...D$({[v$.Bar]:_$(e,!0)})}}}}}),X$=e=>({...K$(e),...Y$(e)}),J$=e=>({type:"items",translation:"Common.Data",component:"tabs-component",items:{columns:{component:"data-assets-panel",ref:"columns",tabName:"properties.DataAssetPanel.Columns",items:{...X$(e)},highlightSelected:!0},filters:{type:"items",component:"filters-assets-panel",ref:"filters",tabName:"SimpleProperties.Filters.Filters",items:{filter:{type:"object",component:"filter-item-react",ref:"filter"}},highlightSelected:!0}}}),Z$=e=>({type:"items",items:[{ref:e,type:"string",translation:"properties.pivot.nullValueText",defaultValue:"-"}]}),Q$=e=>Z$("dimensionNullValues"===e?"nullValueRepresentation.dimensionText":"nullValueRepresentation.text"),eB={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}},tB=e=>({type:"items",items:[{ref:"totals.show",type:"boolean",translation:"properties.totals",component:"switch",options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}],defaultValue:!0},{ref:"totals.position",translation:"Common.Position",type:"string",component:"dropdown",options:[{value:"noTotals",translation:"Common.None"},{value:"top",translation:"Common.Top"},{value:"bottom",translation:"Common.Bottom"}],defaultValue:"noTotals",show:e=>!e.totals?.show},{ref:"totals.label",translation:"properties.totals.label",type:"string",expression:"optional",defaultValue:()=>e.translator.get("Object.Table.Totals")}],show:!e.anything.sense?.isUnsupportedFeature?.("totals")}),rB=(e,t,r,n)=>({ref:e,translation:t,dualOutput:!0,type:"object",component:"color-picker",width:"auto",disableNone:n??!1,defaultValue(e,t,o){const i=n?.(e,t,o)??!1,a=o.theme.current(),s=r(a,i);return{color:"transparent"===s?"none":s}}}),nB=(e,t=!1)=>{return{value:e,label:t?(r=e,r.charAt(0).toUpperCase()+r.slice(1)):e,groupHeader:!1,disabled:!1,styles:t?{fontFamily:e}:void 0};var r},oB=({ref:e,themeAccessor:t,translator:r})=>({component:"dropdown",ref:e,options:(e,n,o)=>{const i=o.theme.current();return((e,t,r)=>{const n=t.fontFamily??"Source Sans Pro, sans-serif",o=t.fontFamilies??[],i=Array.from(new Set([e,n,...o])),a=[{value:"ThemeHeader",label:r.get("properties.themeFonts"),metaText:r.get("properties.theme"),groupHeader:!0},...i.sort().map(e=>nB(e,!0))],s=[{value:"DefaultHeader",label:r.get("properties.allFonts"),metaText:r.get("properties.default"),groupHeader:!0},...ue().filter(e=>!i.includes(e)).map(e=>nB(e,!0))];return[...a,...s.length>1?s:[]]})(t(i),i,r)},defaultValue:(e,r,n)=>t(n.theme.current())}),iB=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],aB=({ref:e,themeAccessor:t,translator:r})=>({component:"dropdown",ref:e,options:(e,n,o)=>{const i=o.theme.current();return((e,t,r)=>{const n=t.fontSize,o=t.fontSizes??[],i=Array.from(new Set([e,n,...o])),a=[{value:"ThemeHeader",label:r.get("properties.themeFontSizes"),metaText:r.get("properties.theme"),groupHeader:!0},...i.sort((e,t)=>parseInt(e,10)-parseInt(t,10)).map(e=>nB(e,!1))],s=[{value:"DefaultHeader",label:r.get("properties.allFontSizes"),metaText:r.get("properties.default"),groupHeader:!0},...iB.filter(e=>!i.includes(e)).map(e=>nB(e,!1))];return[...a,...s.length>1?s:[]]})(t(i),i,r)},defaultValue:(e,r,n)=>t(n.theme.current())}),sB=({section:e,defaultFontStyle:t,translator:r,flags:n,getThemeValue:o,translation:i,disableNoneCallback:a})=>({component:"panel-section",translation:i??`properties.pivot.${e}`,items:{content:{component:"items",ref:"components",key:"theme",items:{fontFamily:oB({ref:`${e}.fontFamily`,themeAccessor:t=>o(t,e,"fontFamily")??t.fontFamily,translator:r}),fontWrapperItem:{component:"inline-wrapper",items:{fontStyle:{component:"font-style-buttons",width:!1,ref:`${e}.fontStyle`,defaultValue:t??[]},fontSize:aB({ref:`${e}.fontSize`,themeAccessor:t=>o(t,e,"fontSize")??t.fontSize,translator:r}),fontColor:rB(`${e}.fontColor`,void 0,t=>o(t,e,"color")??t.color)}},background:rB(`${e}.background`,"properties.background",(t,r)=>{const n=r?mm.WHITE:mm.TRANSPARENT;return o(t,e,"backgroundColor")??n},a)}}}}),lB=({section:e,defaultFontStyle:t,fallbackBackground:r,getThemeValue:n,isNullValueText:o,translation:i})=>({component:"panel-section",translation:i??`properties.pivot.${e}`,items:{nullValueText:o?Q$(e):void 0,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:rB(`${e}.fontColor`,void 0,t=>n(t,e,"color")??t.color)}},background:rB(`${e}.background`,"properties.background",t=>n(t,e,"backgroundColor")??r??"transparent")}}}}),uB=(e,t,r)=>{switch(t){case"header":return e.object?.straightTableV2?.dimension?.label?.name?.[r];case"dimensionValues":return e.object?.straightTableV2?.dimension?.label?.value?.[r];case"measureValues":return e.object?.straightTableV2?.measure?.label?.value?.[r];case"totalValues":return e.object?.straightTableV2?.total?.label?.value?.[r];case"subTotalValues":return e.object?.straightTableV2?.subTotal?.label?.value?.[r];case"nullValues":case"dimensionNullValues":return e.object?.straightTableV2?.null?.label?.value?.[r];default:return}},cB=e=>e.grid?.zebraStripes?.show,dB={ref:"content.rowHeight",component:"integer",placeholder:1,maxlength:4,translation:"ThemeStyleEditor.style.rowHeight",change(e){void 0!==e&&(null!==e.content?.rowHeight&&void 0!==e.content?.rowHeight&&""!==e.content.rowHeight?e.content.rowHeight=Math.max(1,Math.min(50,Math.floor(e.content.rowHeight))):void 0!==e.content&&(e.content.rowHeight=void 0))}},pB=e=>e?.content?.hoverEffect,fB={translation:"properties.RowHover",component:"panel-section",items:{hoverEffectItem:{component:"items",ref:"components",key:"theme",items:{hoverEffectSwitch:{ref:"content.hoverEffect",translation:"ThemeStyleEditor.style.hoverEffect",type:"boolean",component:"switch",options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}],defaultValue:!1},hoverEffectColorItem:{show:pB,ref:"content.hoverColor",translation:"ThemeStyleEditor.style.hoverStyle",type:"object",component:"color-picker",dualOutput:!0},hoverEffectFontColorItem:{show:pB,ref:"content.hoverFontColor",translation:"ThemeStyleEditor.style.hoverFontStyle",type:"object",component:"color-picker",dualOutput:!0}}}}},hB=(e,t,{properties:r})=>"sn-table"===r.visualization&&!0===r.usePagination,mB=e=>e.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING"),gB=({flags:e,translator:t})=>({type:"items",items:[{component:"styling-panel",chartTitle:"Object.StraightTable",subtitle:"LayerStyleEditor.component.styling",translation:"LayerStyleEditor.component.styling",ref:"components",useGeneral:!0,useBackground:!0,items:{headerSection:sB({section:"header",defaultFontStyle:["bold"],translator:t,flags:e,getThemeValue:uB,disableNoneCallback:hB}),dimensionValueSection:sB({section:"dimensionValues",translator:t,flags:e,getThemeValue:uB}),measureValueSection:sB({section:"measureValues",translator:t,flags:e,getThemeValue:uB}),totalRowSection:sB({section:"totalValues",defaultFontStyle:["bold"],translation:"properties.totals",translator:t,flags:e,getThemeValue:uB,disableNoneCallback:hB}),subTotalRowSection:e.isEnabled("TLV-2303-SUB-TOTALS")?sB({section:"subTotalValues",defaultFontStyle:["bold"],translation:"properties.subTotals",translator:t,flags:e,getThemeValue:uB,disableNoneCallback:hB}):void 0,...mB(e)?{dimensionNullSection:lB({section:"dimensionNullValues",translation:"properties.table.dimensionNullValues",fallbackBackground:mm.NULL_VALUE_BACKGROUND,getThemeValue:uB,isNullValueText:!0}),nullValues:lB({section:"nullValues",translation:"properties.table.measureNullValues",fallbackBackground:mm.NULL_VALUE_BACKGROUND,getThemeValue:uB,isNullValueText:!0})}:{nullValues:lB({section:"nullValues",fallbackBackground:mm.NULL_VALUE_BACKGROUND,getThemeValue:uB,isNullValueText:!1})},grid:{translation:"properties.pivot.grid",component:"panel-section",items:{gridItems:{component:"items",ref:"components",key:"theme",items:{rowHeight:{show:()=>!0,...dB},border:rB("grid.border","properties.border",e=>e.object?.straightTableV2?.grid?.borderColor??mm.BORDER_MEDIUM),divider:rB("grid.divider","properties.pivot.divider",e=>e.object?.straightTableV2?.grid?.divider?.borderColor??mm.BORDER_HEAVY)}}}},hoverEffectSection:fB,zebraStripes:{translation:"properties.zebraStripes",component:"panel-section",items:{hoverEffectItem:{component:"items",ref:"components",key:"theme",items:{zebraStripesEnable:{ref:"grid.zebraStripes.show",translation:"properties.zebraStripes.enable",type:"boolean",component:"switch",options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}],defaultValue:!1},zebraStripesColorOdd:{show:cB,ref:"grid.zebraStripes.color.odd",translation:"properties.zebraStripes.color.odd",type:"object",component:"color-picker",dualOutput:!0,disableNone:!0},zebraStripesBackgroundrOdd:{show:cB,ref:"grid.zebraStripes.background.odd",translation:"properties.zebraStripes.background.odd",type:"object",component:"color-picker",dualOutput:!0,disableNone:!1},zebraStripesColorEven:{show:cB,ref:"grid.zebraStripes.color.even",translation:"properties.zebraStripes.color.even",type:"object",component:"color-picker",dualOutput:!0,disableNone:!0},zebraStripesBackgroundEven:{show:cB,ref:"grid.zebraStripes.background.even",translation:"properties.zebraStripes.background.even",type:"object",component:"color-picker",dualOutput:!0,disableNone:!1}}}}}}}]}),bB=e=>({uses:"settings",items:{presentation:{grouped:!0,type:"items",translation:"properties.presentation",items:[gB(e),tB(e),{type:"items",items:[{component:"text",translation:"properties.accessibilityOptions"},{ref:"usePagination",translation:"properties.usePagination",type:"boolean",component:"checkbox",defaultValue:!1},{ref:"accessibleHeader",translation:"properties.increaseAccessibility",type:"boolean",component:"checkbox",undefinedValue:!0,defaultValue:!1}]},{type:"items",translation:"Object.Table.WrapText",items:[{component:"text",translation:"Object.Table.Multiline"},{ref:"multiline.wrapTextInHeaders",type:"boolean",translation:"Object.Table.Multiline.WrapTextInHeaders",component:"checkbox",defaultValue:!0},{ref:"multiline.wrapTextInCells",type:"boolean",translation:"Object.Table.Multiline.WrapTextInCells",component:"checkbox",defaultValue:!0}]},{ref:"hideHeader",translation:"properties.hideHeader",type:"boolean",component:"checkbox",defaultValue:!1},e.flags.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING")?void 0:Q$()]},...eB}}),vB={uses:"sorting"},yB={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}}}},xB=e=>({type:"items",component:"accordion",items:{data:J$(e),sorting:vB,addOns:yB,settings:bB(e)}});function SB(e){return{definition:xB(e),exploration:ZF(e),data:g$(e),support:{export:!0,exportData:!0,snapshot:!0,viewData:!1,exploration:!0,cssScaling:!0,modifiers:e.anything.sense?.isUnsupportedFeature?.("modifiers")?void 0:["accumulation","movingAverage","difference","normalization"]},importProperties(t,r,n,o,i){const a={defaultDimension:n.getDefaultDimensionProperties(),defaultMeasure:n.getDefaultMeasureProperties()};return wv({exportFormat:t,initialProperties:r,extension:n,hypercubePath:o,defaultPropertyValues:a,viewDataMode:i,env:e})},exportProperties:(e,t)=>gv({propertyTree:e,hyperCubePath:t}),propertyHandler:t=>new d$(t,e.translator),usePropertyHandler:"sn-table-data",migrate:b$(e)}}var wB,CB={exports:{}};
|
|
103
103
|
/*!
|
|
104
104
|
* CSSJanus. https://www.mediawiki.org/wiki/CSSJanus
|
|
105
105
|
*
|
|
@@ -118,4 +118,4 @@ function Ui(e,t){let r;return r=t?ki(e).withConfig({displayName:t.label,shouldFo
|
|
|
118
118
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
119
119
|
* See the License for the specific language governing permissions and
|
|
120
120
|
* limitations under the License.
|
|
121
|
-
*/var EB=(wB||(wB=1,function(e,t){var r;function n(e,t){var r=[],n=0;function o(e){return r.push(e),t}function i(){return r[n++]}return{tokenize:function(t){return t.replace(e,o)},detokenize:function(e){return e.replace(new RegExp("("+t+")","g"),i)}}}r=new function(){var e="`TMP`",t="`COMMENT`",r="[^\\u0020-\\u007e]",o="(?:[0-9]*\\.[0-9]+|[0-9]+)",i="(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)",a="direction\\s*:\\s*",s="['\"]?\\s*",l="(^|[^a-zA-Z])",u="\\/\\*\\!?\\s*@noflip\\s*\\*\\/",c="(?:(?:(?:\\\\[0-9a-f]{1,6})(?:\\r\\n|\\s)?)|\\\\[^\\r\\n\\f0-9a-f])",d="(?:[_a-z0-9-]|"+r+"|"+c+")",p=o+"(?:\\s*"+i+"|-?(?:[_a-z]|"+r+"|"+c+")"+d+"*)?",f="((?:-?"+p+")|(?:inherit|auto))",h="((?:-?"+p+")|(?:inherit|auto)|(?:calc\\((?:(?:(?:\\(|\\)|\\t| )|(?:-?"+o+"(?:\\s*"+i+")?)|(?:\\+|\\-|\\*|\\/)){3,})\\)))",m="(#?"+d+"+|(?:rgba?|hsla?)\\([ \\d.,%-]+\\))",g="(?:[!#$%&*-~]|"+r+"|"+c+")*?",b="(?![a-zA-Z])",v="(?!("+d+"|\\r?\\n|\\s|#|\\:|\\.|\\,|\\+|>|~|\\(|\\)|\\[|\\]|=|\\*=|~=|\\^=|'[^']*'|\"[^\"]*\"|"+t+")*?{)",y="(?!"+g+s+"\\))",x="(?="+g+s+"\\))",S="(\\s*(?:!important\\s*)?[;}])",w=/`TMP`/g,C=/`TMPLTR`/g,E=/`TMPRTL`/g,R=new RegExp("\\/\\*[^*]*\\*+([^\\/*][^*]*\\*+)*\\/","gi"),A=new RegExp("("+u+v+"[^;}]+;?)","gi"),I=new RegExp("("+u+"[^\\}]*?})","gi"),M=new RegExp("("+a+")ltr","gi"),k=new RegExp("("+a+")rtl","gi"),D=new RegExp(l+"(left)"+b+y+v,"gi"),P=new RegExp(l+"(right)"+b+y+v,"gi"),T=new RegExp(l+"(left)"+x,"gi"),q=new RegExp(l+"(right)"+x,"gi"),O=/(:dir\( *)ltr( *\))/g,L=/(:dir\( *)rtl( *\))/g,N=new RegExp(l+"(ltr)"+x,"gi"),j=new RegExp(l+"(rtl)"+x,"gi"),_=new RegExp(l+"([ns]?)e-resize","gi"),z=new RegExp(l+"([ns]?)w-resize","gi"),F=new RegExp("((?:margin|padding|border-width)\\s*:\\s*)"+h+"(\\s+)"+h+"(\\s+)"+h+"(\\s+)"+h+S,"gi"),$=new RegExp("((?:-color|border-style)\\s*:\\s*)"+m+"(\\s+)"+m+"(\\s+)"+m+"(\\s+)"+m+S,"gi"),B=new RegExp("(background(?:-position)?\\s*:\\s*(?:[^:;}\\s]+\\s+)*?)("+p+")","gi"),H=new RegExp("(background-position-x\\s*:\\s*)(-?"+o+"%)","gi"),V=new RegExp("(border-radius\\s*:\\s*)"+f+"(?:(?:\\s+"+f+")(?:\\s+"+f+")?(?:\\s+"+f+")?)?(?:(?:(?:\\s*\\/\\s*)"+f+")(?:\\s+"+f+")?(?:\\s+"+f+")?(?:\\s+"+f+")?)?"+S,"gi"),W=new RegExp("(box-shadow\\s*:\\s*(?:inset\\s*)?)"+f,"gi"),U=new RegExp("(text-shadow\\s*:\\s*)"+f+"(\\s*)"+m,"gi"),G=new RegExp("(text-shadow\\s*:\\s*)"+m+"(\\s*)"+f,"gi"),K=new RegExp("(text-shadow\\s*:\\s*)"+f,"gi"),Y=new RegExp("(transform\\s*:[^;}]*)(translateX\\s*\\(\\s*)"+f+"(\\s*\\))","gi"),X=new RegExp("(transform\\s*:[^;}]*)(translate\\s*\\(\\s*)"+f+"((?:\\s*,\\s*"+f+"){0,2}\\s*\\))","gi");function J(e,t,r){var n,o;return t.split("(").length>t.split(")").length?e:("%"===r.slice(-1)&&(-1!==(n=r.indexOf("."))?(o=r.length-n-2,r=(r=100-parseFloat(r)).toFixed(o)+"%"):r=100-parseFloat(r)+"%"),t+r)}function Z(e){switch(e.length){case 4:e=[e[1],e[0],e[3],e[2]];break;case 3:e=[e[1],e[0],e[1],e[2]];break;case 2:e=[e[1],e[0]];break;case 1:e=[e[0]]}return e.join(" ")}function Q(e,t){var r=[].slice.call(arguments),n=r.slice(2,6).filter(function(e){return e}),o=r.slice(6,10).filter(function(e){return e}),i=r[10]||"";return t+(o.length?Z(n)+" / "+Z(o):Z(n))+i}function ee(e){return 0===parseFloat(e)?e:"-"===e[0]?e.slice(1):"-"+e}function te(e,t,r){return t+ee(r)}function re(e,t,r,n,o){return t+r+ee(n)+o}function ne(e,t,r,n,o){return t+r+n+ee(o)}return{transform:function(r,o){var i=new n(A,"`NOFLIP_SINGLE`"),a=new n(I,"`NOFLIP_CLASS`"),s=new n(R,t);return r=s.tokenize(a.tokenize(i.tokenize(r.replace("`","%60")))),o.transformDirInUrl&&(r=r.replace(O,"$1`TMPLTR`$2").replace(L,"$1`TMPRTL`$2").replace(N,"$1"+e).replace(j,"$1ltr").replace(w,"rtl").replace(C,"ltr").replace(E,"rtl")),o.transformEdgeInUrl&&(r=r.replace(T,"$1"+e).replace(q,"$1left").replace(w,"right")),r=r.replace(M,"$1"+e).replace(k,"$1ltr").replace(w,"rtl").replace(D,"$1"+e).replace(P,"$1left").replace(w,"right").replace(_,"$1$2"+e).replace(z,"$1$2e-resize").replace(w,"w-resize").replace(V,Q).replace(W,te).replace(U,ne).replace(G,ne).replace(K,te).replace(Y,re).replace(X,re).replace(F,"$1$2$3$8$5$6$7$4$9").replace($,"$1$2$3$8$5$6$7$4$9").replace(B,J).replace(H,J),r=i.detokenize(a.detokenize(s.detokenize(r)))}}},e.exports?t.transform=function(e,t,n){var o;return"object"==typeof t?o=t:(o={},"boolean"==typeof t&&(o.transformDirInUrl=t),"boolean"==typeof n&&(o.transformEdgeInUrl=n)),r.transform(e,o)}:"undefined"!=typeof window&&(window.cssjanus=r)}(CB,CB.exports)),CB.exports),RB=$t(EB),AB="comm",IB="rule",MB="decl",kB=Math.abs,DB=String.fromCharCode;function PB(e){return e.trim()}function TB(e,t,r){return e.replace(t,r)}function qB(e,t){return 0|e.charCodeAt(t)}function OB(e,t,r){return e.slice(t,r)}function LB(e){return e.length}function NB(e,t){return t.push(e),e}var jB=1,_B=1,zB=0,FB=0,$B=0,BB="";function HB(e,t,r,n,o,i,a,s){return{value:e,root:t,parent:r,type:n,props:o,children:i,line:jB,column:_B,length:a,return:"",siblings:s}}function VB(){return $B=FB>0?qB(BB,--FB):0,_B--,10===$B&&(_B=1,jB--),$B}function WB(){return $B=FB<zB?qB(BB,FB++):0,_B++,10===$B&&(_B=1,jB++),$B}function UB(){return qB(BB,FB)}function GB(){return FB}function KB(e,t){return OB(BB,e,t)}function YB(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 XB(e){return PB(KB(FB-1,QB(91===e?e+2:40===e?e+1:e)))}function JB(e){for(;($B=UB())&&$B<33;)WB();return YB(e)>2||YB($B)>3?"":" "}function ZB(e,t){for(;--t&&WB()&&!($B<48||$B>102||$B>57&&$B<65||$B>70&&$B<97););return KB(e,GB()+(t<6&&32==UB()&&32==WB()))}function QB(e){for(;WB();)switch($B){case e:return FB;case 34:case 39:34!==e&&39!==e&&QB($B);break;case 40:41===e&&QB(e);break;case 92:WB()}return FB}function eH(e,t){for(;WB()&&e+$B!==57&&(e+$B!==84||47!==UB()););return"/*"+KB(t,FB-1)+"*"+DB(47===e?e:WB())}function tH(e){for(;!YB(UB());)WB();return KB(e,FB)}function rH(e){return function(e){return BB="",e}(nH("",null,null,null,[""],e=function(e){return jB=_B=1,zB=LB(BB=e),FB=0,[]}(e),0,[0],e))}function nH(e,t,r,n,o,i,a,s,l){for(var u=0,c=0,d=a,p=0,f=0,h=0,m=1,g=1,b=1,v=0,y=0,x="",S=o,w=i,C=n,E=x;g;)switch(h=y,y=WB()){case 40:108!=h&&58==qB(E,d-1)?(v++,E+="("):E+=XB(y);break;case 41:v--,E+=")";break;case 34:case 39:case 91:E+=XB(y);break;case 9:case 10:case 13:case 32:if(v>0){E+=DB(y);break}E+=JB(h);break;case 92:E+=ZB(GB()-1,7);continue;case 47:switch(UB()){case 42:case 47:NB(iH(eH(WB(),GB()),t,r,l),l),5!=YB(h||1)&&5!=YB(UB()||1)||!LB(E)||" "===OB(E,-1,void 0)||(E+=" ");break;default:E+="/"}break;case 123*m:s[u++]=LB(E)*b;case 125*m:case 59:case 0:if(v>0&&y){E+=DB(y);break}switch(y){case 0:case 125:g=0;case 59+c:-1==b&&(E=TB(E,/\f/g,"")),f>0&&(LB(E)-d||0===m)&&NB(f>32?aH(E+";",n,r,d-1,l):aH(TB(E," ","")+";",n,r,d-2,l),l);break;case 59:E+=";";default:if(NB(C=oH(E,t,r,u,c,o,s,x,S=[],w=[],d,i),i),123===y)if(0===c)nH(E,t,C,C,S,i,d,s,w);else{switch(p){case 99:if(110===qB(E,3))break;case 108:if(97===qB(E,2))break;default:c=0;case 100:case 109:case 115:}c?nH(e,C,C,n&&NB(oH(e,C,C,0,0,o,s,x,o,S=[],d,w),w),o,w,d,s,n?S:w):nH(E,C,C,C,[""],w,0,s,w)}}u=c=f=0,m=b=1,x=E="",d=a;break;case 58:d=1+LB(E),f=h;default:if(m<1)if(123==y)--m;else if(125==y&&0==m++&&125==VB())continue;switch(E+=DB(y),y*m){case 38:b=c>0?1:(E+="\f",-1);break;case 44:if(v>0)break;s[u++]=(LB(E)-1)*b,b=1;break;case 64:45===UB()&&(E+=XB(WB())),p=UB(),c=d=LB(x=E+=tH(GB())),y++;break;case 45:45===h&&2==LB(E)&&(m=0)}}return i}function oH(e,t,r,n,o,i,a,s,l,u,c,d){for(var p=o-1,f=0===o?i:[""],h=function(e){return e.length}(f),m=0,g=0,b=0;m<n;++m)for(var v=0,y=OB(e,p+1,p=kB(g=a[m])),x=e;v<h;++v)(x=PB(g>0?f[v]+" "+y:TB(y,/&\f/g,f[v])))&&(l[b++]=x);return HB(e,t,r,0===o?IB:s,l,u,c,d)}function iH(e,t,r,n){return HB(e,t,r,AB,DB($B),OB(e,2,-2),0,n)}function aH(e,t,r,n,o){return HB(e,t,r,MB,OB(e,0,n),OB(e,n+1,-1),n,o)}function sH(e,t,r){switch(e.type){case"@import":case MB:case AB:return e.return=e.return||e.value;case IB:e.value=Array.isArray(e.props)?e.props.join(","):e.props,Array.isArray(e.children)&&e.children.forEach(function(e){e.type===AB&&(e.children=e.value)})}var n=function(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}(Array.prototype.concat(e.children),sH);return LB(n)?e.return=e.value+"{"+n+"}":""}function lH(e,t,r,n){if("@keyframes"===e.type||"@supports"===e.type||e.type===IB&&(!e.parent||"@media"===e.parent.type||e.parent.type===IB)){var o=RB.transform(sH(e));e.children=o?rH(o)[0].children:[],e.return=""}}Object.defineProperty(lH,"name",{value:"stylisRTLPlugin"});const uH=bM(({options:e,...t})=>zg(Tm(t,e)()),(e,t)=>e.fontSize===t.fontSize&&e.fontFamily===t.fontFamily&&e.fontStyle===t.fontStyle&&e.fontWeight===t.fontWeight&&e.options?.maxNbrLinesOfText===t.options?.maxNbrLinesOfText&&e.options?.allowLineBreaks===t.options?.allowLineBreaks);class cH{#y={on:new Map,once:new Map};#x=10;#S(e){this.listenerCount(e)>this.#x&&console.warn(`Possible EventEmitter memory leak detected. ${this.listenerCount(e)} listeners added to "${String(e)}".`)}#w(e,t,r){const n=this.#y[e].get(t)??new Set;n.add(r),this.#y[e].set(t,n),this.#S(t)}setMaxListeners(e){this.#x=e}on(e,t){this.#w("on",e,t)}once(e,t){this.#w("once",e,t)}off(e,t){this.#y.on.get(e)?.delete(t),this.#y.once.get(e)?.delete(t)}emit(e,...t){this.#y.on.get(e)?.forEach(e=>{e(...t)}),this.#y.once.get(e)?.forEach(e=>{e(...t)}),this.#y.once.delete(e)}listenerCount(e){return(this.#y.on.get(e)?.size??0)+(this.#y.once.get(e)?.size??0)}removeAllListeners(e){void 0===e?(this.#y.on.clear(),this.#y.once.clear()):(this.#y.on.delete(e),this.#y.once.delete(e))}}const dH=zg(()=>new cH);let pH=function(e){return e.Selected="selected",e.Possible="possible",e.Disabled="disabled",e.Inactive="inactive",e}({}),fH=function(e){return e.Select="Select",e.SelectMouseDown="SelectMouseDown",e.SelectMouseUp="SelectMouseUp",e.SelectMultiAdd="SelectMultiAdd",e.SelectMultiEnd="SelectMultiEnd",e.Reset="Reset",e.Clear="Clear",e.UpdatePageRows="UpdatePageRows",e}({}),hH=function(e){return e.A="ascending",e.D="descending",e}({}),mH=function(e){return e.First="sn-table-announcer-1",e.Second="sn-table-announcer-2",e}({});const gH=[0,0],bH=e=>"number"==typeof e&&!Number.isNaN(+e),vH=e=>bH(e.qNum),yH=e=>"string"==typeof e&&e.length>0&&!Number.isNaN(+e),xH=e=>"string"==typeof e&&e.length>0||"number"==typeof e?+e:NaN,SH=(e,t)=>e.max===e.min?.5:(t-e.min)/(e.max-e.min),wH=(e,t,r)=>{const n=e.paletteColors?e.paletteColors[t]:e.localPaletteColors[t];return r.getColorPickerColor(n)},CH=(e,t,r)=>{const n={previousColor:(o=e.localPaletteColors)[(i=t)-(i>0?1:0)],nextColor:o[i+(i<o.length-1?1:0)]};var o,i;const a=((e,t)=>{const r=e.limits&&e.limits.concat().sort((e,t)=>e.value-t.value);return{lowerLimit:r&&t>0?r[t-1]:{value:0,gradient:!1},upperLimit:r&&r[t]?r[t]:{value:1,gradient:!1}}})(e,t),s=((e,t,r,n,o)=>{const{upperLimit:i,lowerLimit:a}=e,{previousColor:s,nextColor:l}=t,u=n===i.value?1:(n-a.value)/(i.value-a.value);return a.gradient&&i.gradient?n-a.value<i.value-n?{color:s.color,t:.5-u}:{color:l.color,t:u-.5}:a.gradient?{color:s.color,t:1-(.5+u/2)}:i.gradient?{color:l.color,t:u/2}:{color:o.localPaletteColors[r].color,t:n}})(a,n,t,r,e);return ie(e.localPaletteColors[t].color??"").blend(ie(s.color??""),s.t)},EH=(e,t,r)=>{const n=((e,t)=>{const{limits:r}=e;return r&&(e.limits=r.sort((e,t)=>e.value-t.value),e.limits=r.map(e=>({...e,value:SH(t,e.value)}))),e})({...e},t),o=n.paletteColors||n.localPaletteColors;return o&&(n.localPaletteColors=o.concat().map((e,t)=>({color:wH(n,t,r)}))),n},RH=(e,t,r,n)=>{const o=EH(e,r,n),{localPaletteColors:i}=o;if(t<=0)return i[0].color;if(t>=1)return i[i.length-1].color;const a=((e,t)=>{let r="",n=0;const{limits:o,localPaletteColors:i}=e;for(let a=0;a<i.length;a++){const i=o&&o[a]?o[a].value:1;if(t>=n&&t<i){r=CH(e,a,t);break}n=i}return r})(o,t);return a},AH=(e,t)=>{const r=(e=>e.map(e=>e.value??e).sort((e,t)=>e-t))(e),n=r.some(e=>!bH(e));return 0===r.length||n?(e=>{const t=0===e?0:.5*e;return{min:e-t,max:e+t}})(t):1===r.length?((e,t)=>{const r=e[0]-t;if(0===r||!bH(r)){const e=0===t?.5:Math.abs(.5*t);return{min:t-e,max:t+e}}return r>0?{min:t-.5*Math.abs(t),max:e[0]+2*r}:{min:e[0]+2*r,max:t+.5*Math.abs(t)}})(r,t):((e,t)=>{let r=e[e.length-1]-e[0];return r=r>0?r:1,{min:Math.min(t,e[0])-r/2,max:Math.max(t,e[e.length-1])+r/2}})(r,t)},IH=(e,t)=>{const{limits:r}=e.segments;if(!r)return;const n=((e,t)=>{const{min:r,max:n}=AH(e,t),o=Math.abs(t);return{min:r??t-o,max:n??t+o}})(r,t),o=((e,t,r)=>{const{limits:n,paletteColors:o,localPaletteColors:i}=e.segments;if(!n||!bH(t))return 0;let a=r&&bH(r)?Math.min(r,t):0;const s=n.sort((e,t)=>e.value-t.value),l=o||i;for(let e=0;e<l.length;e++){if(e===l.length-1||t<s[e].value&&t>=a)return e;a=s[e].value}return 0})(e,t,n.min);return{limitRange:n,limitPaletteColorIndex:o}},MH=_((e,t)=>Gt.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:Gt.jsx("path",{d:"M7.5 8.5H2v-1h5.5V2h1v5.5H14v1H8.5V14h-1z"})})),kH=_((e,t)=>Gt.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:Gt.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"})})),DH=_((e,t)=>Gt.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:[Gt.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"}),Gt.jsx("use",{fillRule:"evenodd"})]})),PH=_((e,t)=>Gt.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:Gt.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"})})),TH=_((e,t)=>Gt.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:Gt.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"})})),qH=_((e,t)=>Gt.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:Gt.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"})})),OH=_((e,t)=>Gt.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:Gt.jsx("path",{d:"M2 7.5h12v1H2z"})})),LH=_((e,t)=>Gt.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:Gt.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"})})),NH=_((e,t)=>Gt.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:Gt.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"})})),jH=_((e,t)=>Gt.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:Gt.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"})})),_H=_((e,t)=>Gt.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:Gt.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"})})),zH=_((e,t)=>Gt.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:Gt.jsx("path",{d:"m6 10 7-7 2 2-7 7-2 2-5-5 2-2z"})})),FH=_((e,t)=>Gt.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:Gt.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"})})),$H=_((e,t)=>Gt.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:Gt.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=_((e,t)=>Gt.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:Gt.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"})})),HH=_((e,t)=>Gt.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:Gt.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"})})),VH={m:zH,"ï":jH,R:HH,S:FH,T:$H,U:BH,P:NH,Q:qH,"è":_((e,t)=>Gt.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:Gt.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"})})),"¢":PH,"©":DH,"23F4":TH,2013:_H,"&":LH,add:MH,"minus-2":OH,dot:kH},WH=(e,t,r,n)=>{const o=e.indicatorConditionalColoring;if(!o)return;const i=IH(o,t),a=((e,t,r,n)=>{const{segments:o}=e;if(!o||!r)return;const{limits:i}=o;if(!i?.length||!((e,t)=>!(!e||0===e.length||!(e[t]?.gradient??e[t-1]?.gradient)))(i,r.limitPaletteColorIndex))return wH(o,r.limitPaletteColorIndex,n);const a=SH(r.limitRange,t);return RH(o,a,r.limitRange,n)})(o,t,i,n),{paletteColors:s}=o.segments,l=i?.limitPaletteColorIndex||0,u=s[l]?.icon??"dot",{indicator:c}=e;let d=c?.position||"right";return"rtl"===r&&(d="right"===d?"left":"right"),{color:a,iconKey:u,position:d}},UH=(pm().palette.primary.light,"repeating-linear-gradient(-45deg, rgba(200,200,200,0.08), rgba(200,200,200,0.08) 2px, rgba(200,200,200,0.3) 2.5px, rgba(200,200,200,0.08) 3px, rgba(200,200,200,0.08) 5px)"),GH=4/3,KH="12px",YH="600",XH="Source Sans Pro, sans-serif",JH={height:"auto",fontSize:KH,lineHeight:"unset",padding:"4px",borderStyle:"solid",borderWidth:"0px 1px 1px 0px",userSelect:"none",outline:"none","&:focus-visible":{boxShadow:"0 0 0 2px #177fe6 inset, 0 0 0 3px #fff inset"},"&:focus:not(:focus-visible)":{boxShadow:"none"},"&:last-child":{borderRightWidth:"0px"}},ZH=(e,t)=>"rtl"===e&&"center"!==t.resolvedImagePosition?.horizontal?t.resolvedImagePosition?.horizontal&&(e=>"flex-start"===e?"flex-end":"flex-start")(t.resolvedImagePosition?.horizontal):t.resolvedImagePosition?.horizontal,QH=(e,t)=>e.representation.type===v$.Image&&"fitHeight"===e.representation.imageSize?ZH(t,e.representation):e.align,eV=(e,t)=>t||"right"!==e&&"left"!==e?t||"center"!==e?void 0:"row":"row-reverse",tV=(e,t,r)=>{if(!t&&"rtl"===r){if("left"===e.headTextAlign)return"right";if("right"===e.headTextAlign)return"left"}return e.headTextAlign},rV=(e,t)=>"rtl"===e&&"center"!==t?"right"===t?"left":"right":t,nV=(e,t,r)=>"rtl"===e||t&&!r?"0px":"1px",oV=(e,t,r)=>"rtl"===e?t&&!r?"0px":"1px":"0px",iV=24,aV=Mu("div",{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})(({direction:e,isPagination:t})=>({position:"absolute",left:t&&"rtl"===e?0:void 0,bottom:0})),sV=Mu(yd,{shouldForwardProp:e=>!["textAlign","direction","isPagination"].includes(e)})(({textAlign:e,theme:t,direction:r,isPagination:n})=>({textAlign:e,height:"auto",padding:t.spacing(.5,1),display:"flex",alignItems:"flex-end",justifySelf:e,alignSelf:"center",flexDirection:"rtl"===r?eV(e,n):void 0})),lV=Mu(yd,{shouldForwardProp:e=>"shouldShowMenuIcon"!==e&&"shouldShowLockIcon"!==e&&"alignment"!==e})(({shouldShowMenuIcon:e,shouldShowLockIcon:t,alignment:r})=>{const n=e?"24px":"";let o;switch(r){case"left":o={gridTemplateColumns:t?`20px 2fr ${n}`:`1fr ${n}`};break;case"center":{const r=e||t;o={gridTemplateColumns:r?"24px 2fr 24px":"1fr","& .sn-table-lock-icon":{gridColumn:1},"& .sn-table-head-label":{gridColumn:r?2:1},[`& .${Vm}`]:{gridColumn:3}};break}case"right":o={gridTemplateColumns:t?`${n} 2fr 20px`:`${n} 1fr`,"& .sn-table-lock-icon":{gridColumn:t?3:"unset"},"& .sn-table-head-label":{gridColumn:e?2:"span 2"},[`& .${Vm}`]:{gridColumn:1}}}return{width:"100%",display:"grid",gridAutoFlow:"dense",fontSize:"inherit",fontFamily:"inherit",alignItems:"end",overflow:"hidden",...o}}),uV=Mu(yd,{shouldForwardProp:e=>"rightAligned"!==e})(({rightAligned:e})=>({display:"flex",alignItems:"center",width:"20px",height:"24px",flexShrink:0,flexDirection:"inherit",justifyContent:e?"flex-start":"flex-end"})),cV=Mu(yd,{shouldForwardProp:e=>"justifyContent"!==e})(({justifyContent:e})=>({display:"flex",flexGrow:1,textAlign:e,justifyContent:e,alignItems:"center",padding:"4px"})),dV=Mu(kc,{shouldForwardProp:e=>"hoverBackground"!==e&&"activeBackground"!==e&&"isActive"!==e&&"order"!==e})(({hoverBackground:e,activeBackground:t,isActive:r,order:n})=>({padding:"4px !important",width:"fit-content",height:"auto",background:r?t:void 0,"&:hover":{background:e},color:"inherit",order:n})),pV=zg(),fV=zg(0),hV=zg(0),mV=e=>parseInt(e??JH.fontSize,10)*GH,gV=/<[bius]>/g;const bV=4/3,vV=e=>!!e?.color||"number"==typeof e?.index&&e.index>-1;function yV(e,t,r={index:-1}){const n=t.getColorPickerColor(r);return n&&"none"!==n?n:e}const xV=(e,t)=>e?{borderBottomColor:mm.DARK_MODE_BORDER,borderRightColor:mm.DARK_MODE_BORDER,borderLeftColor:mm.DARK_MODE_BORDER,borderTopColor:mm.DARK_MODE_BORDER}:{borderLeftColor:mm.BORDER_MEDIUM,borderRightColor:mm.BORDER_MEDIUM,borderTopColor:mm.BORDER_HEAVY,borderBottomColor:t?mm.BORDER_HEAVY:mm.BORDER_LIGHT},SV=(e,t,r)=>{if(e&&t&&r){const n=(e=>parseInt(e,10)*bV+8+1)(e);return n*(t+2)<r.clientHeight-40?"1px":"0px"}return"0px"},wV=e=>e.components?.find(e=>"theme"===e.key),CV=(e,t,r,n=!1)=>{const o=t.getStyle("object",`straightTableV2.${e}`,"fontFamily"),i=t.getStyle("object",`straightTableV2.${e}`,"color"),a=t.getStyle("object",`straightTableV2.${e}`,"fontSize"),s={fontFamily:o,color:vV(r?.fontColor)?yV(mm.TEXT,t,r?.fontColor):i||mm.TEXT,fontSize:r?.fontSize&&`${r.fontSize}px`||a,padding:r&&"padding"in r?r.padding:void 0,...xV(t.background.isDark,n)};return Object.keys(s).forEach(e=>{const t=e;null==s[t]&&delete s[t]}),s};function EV(e,t,r){const n=wV(e)?.header,o=CV("header",t,n,r);return o.background=(e=>{if(void 0===e)return;const t=ie(e);return t.setAlpha(1),t.getRGB()})(t.background.headerColor),o.hoverBackground=vm(o.background??mm.WHITE,Zm),o.activeBackground=vm(o.background??mm.WHITE,Qm),o}function RV(e,t,r){const n={};let o={fontStyle:e.fontStyle,fontWeight:e.fontWeight,textDecoration:e.textDecoration};return t?.qValues?.forEach((e,t)=>{const i=e.qText,a=i&&xm(i);a&&(n[r[t]]=a);const s=((e,{boldFontWeight:t,combineDecorations:r=!1})=>{const n=e?.toLowerCase().match(gV),o={},i=new Set;return n?.forEach(e=>{switch(e){case"<b>":o.fontWeight=t;break;case"<i>":o.fontStyle="italic";break;case"<u>":i.add("underline"),o.textDecoration="underline";break;case"<s>":i.add("line-through"),o.textDecoration="line-through"}}),r&&i.size>0&&(o.textDecoration=["underline","line-through"].filter(e=>i.has(e)).join(" ")),Object.keys(o).length>0?o:void 0})(i,{boldFontWeight:YH,combineDecorations:!0});var l,u;o={...o,...s,textDecoration:(l=o.textDecoration,u=s?.textDecoration,u?l?[...new Set(`${l} ${u}`.split(/\s+/).filter(e=>e&&"none"!==e))].join(" "):u:l)}}),n.cellBackgroundColor&&!n.cellForegroundColor&&(n.cellForegroundColor=gm(n.cellBackgroundColor)),{...e,...n,color:n.cellForegroundColor||e.color,background:n.cellBackgroundColor||e.background,fontStyle:o.fontStyle,fontWeight:o.fontWeight,textDecoration:o.textDecoration}}const AV=25e4,IV=(e,t)=>t.qAttrExps?.qValues?.[e],MV=e=>{const t=Number(e?.qNum);return void 0!==e?.qNum&&Number.isFinite(t)?t:void 0},kV=e=>{const t=e?.qText?.trim();return t&&"ARGB(0,0,0,0)"!==t.toUpperCase()?xm(t)??void 0:void 0},DV=/^data:(?<!\s)\s*(image\/[\w+-.]+)(?<!\s)\s*(;.*?){0,1}(?<!\s)\s*,(.*)/i,PV=5e6,TV=5e5;const qV={fromSearchString:function(e){if(!e)return[];"?"===e[0]&&(e=e.substr(1));const t=[];return e.split("&").forEach(e=>{if(!e)return;const r=e.indexOf("=");let n,o="",i=!1;-1===r?n=e:(n=e.slice(0,r),o=e.slice(r+1),i=!0),t.push(function(e,t,r){return{key:OV(e),value:OV(t.replace(/%2B/g,"shouldNotDecodePlus")),useEqualSign:r}}(n,o,i))}),t}};function OV(e){try{return decodeURIComponent(e)}catch{return e}}function LV(e){if(!(this instanceof LV))throw new Error("Url needs to be called with the new keyword");if(!e)throw new Error("Url needs a string to operate on");const t=function(e){const t={authorityAndPath:"",search:"",hash:""};let r=e.indexOf("#");-1!==r&&(t.hash=e.substr(r),e=e.substr(0,r));r=e.indexOf("?"),-1!==r&&(t.search=e.substr(r),e=e.substr(0,r));return t.authorityAndPath=e,t}(e);Object.defineProperties(this,{authorityAndPath:{value:t.authorityAndPath},search:{value:t.search},hash:{value:t.hash},searchParams:{get:()=>qV.fromSearchString(t.search)}})}function NV(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")}LV.encodeAuthorityAndPath=function(e){return encodeURI(e).replace(/%5B/gi,"[").replace(/%5D/gi,"]").replace(/%25/gi,"%")},LV.encodeSearchParams=function(e){let t,r="";for(let n=0;n<e.length;n++)t=e[n],r+=0===n?"?":"&",r+=NV(t.key),t.value?r+=`=${NV(t.value)}`:r+=t.useEqualSign?"=":"";return r};var jV=class{_hasNext(){return null!=this._input&&(0!==this._input.length&&this._index<this._input.length)}constructor(e){this._input=e,this._pushback=null,this._temp=null,this._index=0,this._mark=0}pushback(e){this._pushback=e}index(){return this._index}hasNext(){return null!=this._pushback||this._hasNext()}next(){if(null!=this._pushback){const e=this._pushback;return this._pushback=null,e}return this._hasNext()?this._input.charAt(this._index++):null}nextHex(){const e=this.next();return null==e?null:e.match(/[0-9A-Fa-f]/)?e:null}peek(e){return e?!(!this._pushback||this._pushback!==e)||!!this._hasNext()&&this._input.charAt(this._index)===e:this._pushback?this._pushback:this._hasNext()?this._input.charAt(this._index):null}mark(){this._temp=this._pushback,this._mark=this._index}reset(){this._pushback=this._temp,this._index=this._mark}remainder(){let e=this._input.substr(this._index);return null!=this._pushback&&(e=this._pushback+e),e}},_V=class{decode(e){let t="";const r=new jV(e);let n;for(;r.hasNext();)n=this.decodeCharacter(r),t+=null!=n?n:r.next();return t}decodeCharacter(e){return e.next()}};const zV=e=>e>=0&&e<=1114111,FV=e=>e.match(/[\s]/);var $V=class extends _V{decodeCharacter(e){e.mark();const t=e.next();let r,n,o;if(null==t||"\\"!==t)return e.reset(),null;const i=e.next();if(null==i)return e.reset(),null;switch(i){case"\r":e.peek("\n")&&e.next();case"\n":case"\f":case"\0":return this.decodeCharacter(e)}if("NaN"===parseInt(i,16))return i;for(r=i,n=0;n<5&&(o=e.next(),null!=o&&!FV(o));n++){if("NaN"===parseInt(o,16)){e.pushback(o);break}r+=o}const a=parseInt(r,16);return zV(a)?String.fromCharCode(a):"�"}},BV=class e{constructor(e,t){this._key=e,this._value=t}getKey(){return this._key}getValue(){return this._value}equals(t){return t instanceof e&&(this._key===t._key&&this._value===t._value)}static newInstanceIfNeeded(){let t,r,n=arguments[0];return"string"==typeof arguments[1]?(t=arguments[1],r=n.length):(r=arguments[1],t=arguments[2]),t&&n?(n.length>r&&(n=n.substr(0,r)),new e(n,t)):null}},HV=class e{setValue(e){this._nextMap=null,this._value=e}getNextNode(e){return this._nextMap?this._nextMap[e]:null}put(t,r,n){let o,i;if(t.length===r)return i=this._value,this.setValue(n),i;const a=t.charAt(r);return this._nextMap?(o=this._nextMap[a],o||(o=new e,this._nextMap[a]=o)):(this._nextMap={},o=new e,this._nextMap[a]=o),o.put(t,r+1,n)}get(e,t){if(e.length<=t)return this._value;const r=this.getNextNode(e.charAt(t));return r?r.get(e,t+1):null}getLongestMatch(e,t){if(e.length<=t)return BV.newInstanceIfNeeded(e,this._value);const r=this.getNextNode(e.charAt(t));if(!r)return BV.newInstanceIfNeeded(e,t,this._value);const n=r.getLongestMatch(e,t+1);return n||BV.newInstanceIfNeeded(e,t,this._value)}},VV=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 HV);const r=this.root.put(e,0,t);return r||(e.length>this.maxKeyLen&&(this.maxKeyLen=e.length),this.size++,null)}};const WV=(()=>{const e=[],t=[],r=new VV;let n,o,i;for(n 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[n]&&e.hasOwnProperty(n)&&(t[e[n]]=n);for(o in t)"function"!=typeof t[o]&&t.hasOwnProperty(o)&&(i=t[o].toLowerCase().substr(1),r.put(i,String.fromCharCode(o)));return r})();var UV=class extends _V{decodeCharacter(e){let t;e.mark();const r=e.next();if(null==r||"&"!==r)return e.reset(),null;const n=e.next();if(null==n)return e.reset(),null;if("#"===n){if(t=this._getNumericEntity(e),null!=t)return t}else if(n.match(/[A-Za-z]/)&&(e.pushback(n),t=this._getNamedEntity(e),null!=t))return t;return e.reset(),null}_getNamedEntity(e){let t,r,n,o="";for(t=Math.min(e.remainder().length,WV.getMaxKeyLength()),n=0;n<t;n++)o+=e.next().toLowerCase();const i=WV.getLongestMatch(o);if(null==i)return null;for(e.reset(),e.next(),t=i.getKey().length,r=0;r<t;r++)e.next();return e.peek(";")&&e.next(),i.getValue()}_getNumericEntity(e){const t=e.peek();return null==t?null:"x"===t||"X"===t?(e.next(),this._parseHex(e)):this._parseNumber(e)}_parseHex(e){let t,r="";for(;e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,16))){if(";"===t){e.next();break}break}r+=t,e.next()}const n=parseInt(r,16);return!Number.isNaN(+n)&&zV(n)?String.fromCharCode(n):null}_parseNumber(e){let t,r="";for(;e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,10))){if(";"===t){e.next();break}break}r+=t,e.next()}const n=parseInt(r,10);return!Number.isNaN(+n)&&zV(n)?String.fromCharCode(n):null}},GV=class extends _V{decodeCharacter(e){e.mark();const t=e.next();let r,n,o,i;if(null==t)return e.reset(),null;if("%"!==t)return e.reset(),null;for(r="",n=0;n<2;n++)o=e.nextHex(),null!=o&&(r+=o);return 2===r.length&&(i=parseInt(r,16),zV(i))?String.fromCharCode(i):(e.reset(),null)}};let KV;"undefined"!=typeof document&&(KV=document.createElement("div"));const YV=Array.prototype.indexOf,XV=[",",".","_"," "],JV=[",",".","-","_"," "],ZV={width:["%"],height:["%"]},QV={default:["-"," ","%"],color:["#"," ","(",")"],image:["(",")",":","/","?","&","-",".",'"',"="," "]},eW={background:["(",")",":","%","/","?","&","-"," ",".",'"',"=","#"],"background-image":QV.image,"background-color":QV.color,"border-color":QV.color,"border-image":QV.image,color:QV.color,icon:QV.image,"list-style-image":QV.image,"outline-color":QV.color},tW={attr_name:["^on[a-z]{1,}","style","href","src"],attr_val:["javascript:","data:"],css_key:["behavior","-moz-behavior","-ms-behavior"],css_val:["expression"]};function rW(e,t,r){let n;if(t){if(YV)return YV.call(t,e,r);for(n=t.length,r=r?r<0?Math.max(0,n+r):r:0;r<n;r++)if(r in t&&t[r]===e)return r}return-1}function nW(e){if(null==e)return"";let t="";const r=document.createTextNode(e);return KV.appendChild(r),t=KV.innerHTML,KV.removeChild(r),t}function oW(e,t,r){let n,o,i,a,s,l,u,c,d;for(e=aW(e).toLowerCase(),t=aW(t),i=0;i<tW.attr_name.length;i++)if(e.match(tW.attr_name[i]))throw new Error(`Unsafe attribute name used: ${e}`);for(i=0;i<tW.attr_val.length;i++)if(t.toLowerCase().match(tW.attr_val[i]))throw new Error(`Unsafe attribute value used: ${t}`);if(n=ZV[e],n||(n=JV),o="",!r){for(a=0;a<e.length;a++){if(s=e.charAt(a),!s.match(/[a-zA-Z\-0-9]/))throw new Error("Invalid attribute name specified");o+=s}o+='="'}for(l=0;l<t.length;l++)u=t.charAt(l),c=t.charCodeAt(l),!u.match(/[a-zA-Z0-9]/)&&rW(u,n)<0?(d=c.toString(16),o+=`&#x${d};`):o+=u;return r||(o+='"'),o}function iW(e,t,r){let n,o,i,a,s,l,u,c,d,p;if(e=aW(e).toLowerCase(),t=aW(t),rW(e,tW.css_key)>=0)throw new Error(`Unsafe property name used: ${e}`);for(n=0;n<tW.css_val.length;n++)if(t.toLowerCase().indexOf(tW.css_val[n])>=0)throw new Error(`Unsafe property value used: ${t}`);if(o=eW[e],o||(o=QV.default),i="",!r){for(a=0;a<e.length;a++){if(s=e.charAt(a),!s.match(/[a-zA-Z-]/))throw new Error("Invalid Property Name specified");i+=s}i+=": "}for(l=0;l<t.length;l++)u=t.charAt(l),c=t.charCodeAt(l),!u.match(/[a-zA-Z0-9]/)&&rW(u,o)<0?(d=c.toString(16),p="000000".substr(d.length),i+=`\\${p}${d}`):i+=u;return i}function aW(e,t){let r,n,o,i,a=!1;if(null===e)return null;r=e,n=e,o=0;const s=[new UV,new GV,new $V];for(;!a;){n=r;for(let e=0;e<s.length;e++)i=s[e].decode(r),i!==r&&(o++,r=i);n!==r||(a=!0)}if(t&&o>1)throw new Error("Attack Detected - Multiple/Double Encodings used in input");return r}const sW=[];for(let e=0;e<255;e++)sW[e]=e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122?null:e.toString(16);const lW={html:e=>nW(e.unsafe),css(e){let t,r=[];const n=[],o={};let i="";for(t in e.map?r=e.map:r[e.name]=e.unsafe,r)"function"!=typeof r[t]&&r.hasOwnProperty(t)&&(n[t]=iW(t,r[t],!0),i+=iW(t,r[t],!0),o[t]=n[t]);return e.map?o:i},attr(e){let t=[];const r=[],n={};let o="";e.map?t=e.map:t[e.name]=e.unsafe;for(const e in t)"function"!=typeof t[e]&&t.hasOwnProperty(e)&&(r[e]=oW(e,t[e],!0),o+=oW(e,t[e],!0),n[e]=r[e]);return e.map?n:o}};function uW(e,t){throw new Error(t)}var cW={canonicalize:aW,encode:function(){const e={context:"html",unsafe:null,name:null,map:null,setter:null,strict:!0};return 1===arguments.length&&"object"==typeof arguments[0]?function(){let e,t,r;const n=arguments[0]||{};let o=1;const i=arguments.length;for(;o<i;o++)if(null!=(e=arguments[o]))for(t in e)if(e.hasOwnProperty(t)){if(r=e[t],n===r)continue;void 0!==r&&(n[t]=r)}}(e,arguments[0]):(e.context=arguments[0],2===arguments.length?"html"===e.context?e.unsafe=arguments[1]:"attr"!==e.context&&"css"!==e.context||(e.map=arguments[1]):(e.name=arguments[2],e.unsafe=arguments[1])),"html"===e.context?lW.html(e):"css"===e.context?(null!=e.map&&"object"!=typeof e.map&&uW(this,"Invalid parameter type"),lW.css(e)):"attr"===e.context?(null!=e.map&&"object"!=typeof e.map&&uW(this,"Invalid parameter type"),lW.attr(e)):void uW(this,"Invalid parameter type")},encodeForAttr:oW,encodeForAttr2:function(e){return oW("nonsens",e,!0)},encodeForCSS:iW,encodeForHref:function(e){aW(e),0!==e.search("[a-zA-Z0-9]+:")&&(e=`http://${e}`);const t=new LV(e),r=LV.encodeAuthorityAndPath(t.authorityAndPath),n=t.searchParams;e=r+LV.encodeSearchParams(n)+t.hash;const o=decodeURI(e).toLowerCase();if(-1!==o.indexOf("javascript:"))throw new Error("Attack Detected - Javascript in input");if(-1!==o.indexOf("data:"))throw new Error("Attack Detected - data in input");return e},encodeForJS:function(e,t){let r,n,o,i,a,s;for(t||(t=XV),s="",r=0;r<e.length;r++)o=e.charAt(r),i=e.charCodeAt(r),rW(o,t)>=0||null==sW[i]?s+=o:(n=i.toString(16),i<256?(a="00".substr(n.length),s+=`\\x${a}${n.toUpperCase()}`):(a="0000".substr(n.length),s+=`\\u${a}${n.toUpperCase()}`));return s},encodeForHTML:nW,encodeForURL:function(e,t){let r="";return t&&(t.match(/^[A-Za-z\-0-9]{1,}$/)?r+=aW(t).toLowerCase():uW(this,"Illegal Attribute Name Specified"),r+='="'),r+=encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A"),r+=t?'"':"",r},isSafeDataURL:(e,t)=>{const{maxByteSizeSvg:r=TV,maxByteSizeImage:n=PV}=t??{},{mimeType:o,encoding:i,data:a}=(e=>{const[,t,r,n]=DV.exec(e.trim())??[];return{encoding:r,data:n,mimeType:t?.toLocaleLowerCase()}})(e);if(!a)return!0;const s=((e,t,r)=>{const n={type:e};if(t?.includes(";base64"))try{return new Blob([atob(r)],n).size}catch{return new Blob([r],n).size}return"image/svg+xml"===e?new Blob([r],n).size:0})(o,i,a);return"image/svg+xml"===o?s<=r:s<=n},validateURI:function(e){if(""===e||function(e){if("canParse"in URL)return URL.canParse(e);try{return new URL(e),!0}catch{return!1}}(e))return!1;const t=e.replace(/%2E/gi,".");if(t.match(/[#&=: ]/))return!1;const r=function(e){let t=e,r="";for(;t.length>0;)if(t.startsWith("../")||t.startsWith("./"))t=t.replace(/^\.\.?\//,"");else if(t.startsWith("/./"))t=t.replace(/^\/\.\//,"/");else if("/."===t)t="/";else if(t.startsWith("/../")){t=t.replace(/^\/\.\.\//,"/");const e=r.lastIndexOf("/");-1!==e&&(r=r.slice(0,e))}else if("/.."===t){t="/";const e=r.lastIndexOf("/");-1!==e&&(r=r.slice(0,e))}else if("."===t||".."===t)t="";else{const e=t.match(/^\/?[^/]*/),n=e?e[0]:"";t=t.slice(n.length),r+=n}return r}(t);return""!==r&&"/"!==r&&r}};const dW=(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"}}},pW=({text:e,url:t,imageSize:r,imagePosition:n,labelStructure:o,imageBox:i,direction:a})=>!n||t&&(t.toLowerCase().includes("javascript:")||!cW.isSafeDataURL(t))?{type:v$.Text,url:void 0,text:e,labelStructure:o}:{type:v$.Image,url:t||"",text:e,imageSize:r,resolvedImagePosition:dW(n,a),labelStructure:o,imageBox:i},fW=(e,t,r,n)=>{if(!e.qMiniChart||!t?.miniChart||!r)return{type:v$.Text,text:n};const{minY:o,maxY:i}=((e,t,r)=>{const n="global"===t.yAxis?.scale,o="zeroCenter"===t.yAxis?.position,i=n?r.qYMin:e.qMiniChart.qMin,a=n?r.qYMax:e.qMiniChart.qMax;if(o){const e=Math.max(Math.abs(i),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,i),maxY:Math.max(0,a)}:{minY:i,maxY:a}})(e,t.miniChart,r),a={type:t.miniChart.type,qMatrix:e.qMiniChart.qMatrix,minY:o,maxY:i,showDots:!!t.miniChart.showDots,colors:t.miniChart.colors,colorMin:e.qMiniChart.qMin,colorMax:e.qMiniChart.qMax};return{type:v$.MiniChart,text:n,miniChart:a}},hW=(e,t,r)=>{const n=Array.isArray(t.qAttrExps)?t.qAttrExps[0]:t.qAttrExps,o=n?.qValues?.[e];if(o){const e=Number.isNaN(+o.qNum)?void 0:`${o.qNum}`;return o.qText||e}return r?.urlPosition===y$.Attribute?void 0:r?.urlLabel},mW=({labelStructure:e,text:t,url:r})=>{try{if(!r)throw Error("Invalid url");return{type:v$.Link,url:cW.encodeForHref(r),text:t,labelStructure:e}}catch{return{type:v$.Text,url:void 0,text:t,labelStructure:e}}},gW=({cell:e,representationProperties:t,attrExprInfoIndex:r,env:n,conditionalColoring:o,miniChartOnMeasure:i,measureMinMax:a,labelStructure:s,getText:l=e=>e.qText,direction:u,enabledFeatures:c})=>{const d=x$(t),p=l(e);return d===v$.Image&&c[v$.Image]&&!n.anything.sense?.isUnsupportedFeature?.("tableImages")?((e,t,r,n,o,i)=>{const{imageSize:a,imagePosition:s,imageSetting:l,imageLabel:u,imageBox:c}=t??{};if("url"===l){const t=IV(r.imageUrl??-1,e)?.qText;return i&&(i.maskedValue=t??""),pW({text:n,url:t,imageSize:a,imagePosition:s,labelStructure:i,imageBox:c,direction:o})}if("label"===l){const t=i?i.originalValue:n;if(-1===r.imageLabel)return pW({text:u||t||"",url:t,imageSize:a,imagePosition:s,labelStructure:i,imageBox:c,direction:o});const l=IV(r.imageLabel??-1,e)?.qText??n;return pW({text:l,url:t,imageSize:a,imagePosition:s,labelStructure:i,imageBox:c,direction:o})}return{type:v$.Text,url:void 0,labelStructure:i,text:n}})(e,t,r,p,u,s):d===v$.Link?((e,t,r,n,o)=>{const{urlPosition:i}=t??{};if(i===y$.Attribute){const i=hW(r.url??-1,e,t);return mW({labelStructure:n,text:o||i||"",url:i})}if(i===y$.Dimension){const i=hW(r.urlLabel??-1,e,t)||o;return n&&(n.maskedValue=i),mW({text:i,labelStructure:n,url:n?.originalValue??o})}return{type:v$.Text,url:void 0,text:o,labelStructure:n}})(e,t,r,s,p):d===v$.Indicator&&c[v$.Indicator]&&!n.anything.sense?.isUnsupportedFeature?.("tableIndicators")?((e,t,r)=>{const{indicator:n}=e??{};return{type:v$.Indicator,url:void 0,text:r,indicator:{applySegmentColors:n?.applySegmentColors,position:n?.position,showTextValues:n?.showTextValues},indicatorConditionalColoring:t}})(t,o,p):d===v$.MiniChart&&c[v$.MiniChart]&&!n.anything.sense?.isUnsupportedFeature?.("qMiniChartDef")?fW(e,t,i,p):d===v$.Bar&&c[v$.Bar]?((e,t,r,n,o)=>{const i={type:v$.Text,text:o},a=MV(e);if(!t||void 0===a)return i;const s=t=>{const n=r[t];return void 0===n||n<0?void 0:IV(n,e)},{barRangeMode:l,barColorMode:u,barLabelColorMode:c}=t,d="manual"===l,p=e=>d&&"number"==typeof e&&Number.isFinite(e)?e:void 0,f={value:a,columnMin:p(t.barRangeMin)??n?.qMin??0,columnMax:p(t.barRangeMax)??n?.qMax??0,isManualRange:d,hasNegativeValues:n?.hasNegativeValues,hasPositiveValues:n?.hasPositiveValues,offsetValue:MV(s("barOffset"))??0,thicknessPx:MV(s("barWidth")),label:s("barLabel")?.qText??o,fallbackLabel:o,color:"expression"===u?kV(s("barColor")):void 0,colorPalette:t.barColor,labelColor:"expression"===c?kV(s("barLabelColor")):void 0,labelColorPalette:t.barLabelColor,barEnd:t.barEnd??"none"};return{type:v$.Bar,text:o,bar:f}})(e,t,r,a,p):{type:v$.Text,url:void 0,text:p,labelStructure:s}},bW=zg(e=>{const t=e(Fb),r=e(Cb);return e(Eb),{qTop:0,qHeight:0,rowPartialHeight:r?.content?.rowPartialHeight??0,visibleTop:r?.content?.visibleTop??t?.visibleTop,visibleHeight:r?.content?.visibleHeight??t?.visibleHeight,scrollLeft:r?.content?.scrollLeft??t?.scrollLeft??0,scrollTopRatio:r?.content?.scrollTopRatio??t?.scrollTopRatio,rowsPerPage:r?.content?.rowsPerPage??t?.rowsPerPage,page:r?.content?.page??t?.page,estimatedRowHeight:r?.content?.estimatedRowHeight??0}}),vW=e=>-1===e?{}:e.qAttrExprInfo.reduce((e,{id:t},r)=>(e[t]=r,e),{}),yW=({cId:e})=>e??l$(),xW=["D","T","TS","IV"],SW=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],wW=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],CW=["January","February","March","April","May","June","July","August","September","October","November","December"],EW=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],RW={D:"YYYY-MM-DD",T:"hh:mm:ss",TS:"YYYY-MM-DD hh:mm:ss"},AW=864e5,IW=2**32,MW=e=>{let t=Math.floor(e),r=Math.round((e-t)*AW);r>=AW&&(t+=1,r=0);const n=t-25569,o=n+719468,i=Math.floor(o/146097),a=o-146097*i,s=Math.floor((a-Math.floor(a/1460)+Math.floor(a/36524)-Math.floor(a/146096))/365),l=a-(365*s+Math.floor(s/4)-Math.floor(s/100)),u=Math.floor((5*l+2)/153),c=u<10?u+2:u-10;return{year:s+400*i+(c<=1?1:0),month:c,date:l-Math.floor((153*u+2)/5)+1,day:(n%7+7+3)%7,h:Math.floor(r/36e5),m:Math.floor(r%36e5/6e4),s:Math.floor(r%6e4/1e3),f:r%1e3}},kW=(e,t)=>String(e).padStart(t,"0"),DW=e=>{const[,t]=e.toString().split(".");return t?Number(`0.${t}`):0},PW=/Y+|y+|M+|W+|w+|D+|d+|h+|H+|m+|s+|S+|f+|F+|t{1,2}|T{1,2}/g,TW=(e,t,r)=>{if(Number.isNaN(e)||!Number.isFinite(e))return String(e);let n,o=(r||("IV"===t?RW.T:RW[t])).replace(/\[.+]|\[|]/g,"");"IV"===t?(e<0&&(e=-e,o=`-${o}`),n=((e,t)=>{const r=Math.floor(e);let n=24*DW(e),o=60*DW(n),i=60*DW(o);const a=Math.round(1e3*DW(i));n=Math.floor(n),o=Math.floor(o),i=Math.floor(i),/D+/i.test(t)||(n+=24*r),/h+/i.test(t)||(o+=60*n),/m+/i.test(t)||(i+=60*o);let s=0,l="";if(/w+|t+/i.test(t)){const t=MW(e);s=t.day,l=t.h>=12?"pm":"am"}return{year:0,month:0,day:s,date:r%IW,h:n%IW,m:o%IW,s:i%IW,f:a,t:l}})(e,o)):n=((e,t)=>{const r=MW(e);let n=r.h;return t&&(n%=12,n=n||12),{year:r.year,month:r.month,day:r.day,date:r.date,h:n,m:r.m,s:r.s,f:r.f,t:r.h>=12?"pm":"am"}})(e,/t+/i.test(o));const i=(e=>[[/^(Y+|y+)$/,{Y:`${Number(`${e.year}`.slice(-2))}`,YY:kW(`${e.year}`.slice(-2),2),YYY:kW(`${e.year}`.slice(-3),3),def:t=>kW(`${e.year}`,t.length)}],[/^M+$/,{M:e.month+1,MM:kW(e.month+1,2),MMM:EW[e.month],def:CW[e.month]}],[/^(W+|w+)$/,{W:e.day,WW:kW(e.day,2),WWW:wW[e.day],def:SW[e.day]}],[/^(D+|d+)$/,{def:t=>kW(e.date,t.length)}],[/^(h+|H+)$/,{h:e.h,def:t=>kW(e.h,t.length)}],[/^m+$/,{m:e.m,def:t=>kW(e.m,t.length)}],[/^(s+|S+)$/,{s:e.s,def:t=>kW(e.s,t.length)}],[/^(f+|F+)$/,{def:t=>{const r=`${e.f}`;return r.length>t.length?r.slice(0,t.length):r.padEnd(t.length,"0")}}],[/^(t{1,2}|T{1,2})$/,{def:t=>(t[0].toUpperCase()===t[0]?e.t.toUpperCase():e.t).slice(0,t.length)}]])(n);return o.replace(PW,e=>((e,t)=>{const r=t.find(([t])=>t.test(e))?.[1];if(!r)return"";const n=Object.keys(r).find(t=>"def"!==t&&(t===e||t.toLowerCase()===e)),o=void 0===n?r.def:r[n];return String("function"==typeof o?o(e):o)})(e,i))},qW=/[#0]/,OW={prefix:"",suffix:""},LW=e=>{const t=e.search(qW);if(-1===t)return OW;let r=t;for(let t=e.length-1;t>r;t--)if(qW.test(e[t])){r=t;break}return{prefix:e.slice(0,t),suffix:e.slice(r+1)}},NW=/\B(?=(\d{3})+(?!\d))/g,jW={3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",24:"Y",[-3]:"m",[-6]:"μ",[-9]:"n",[-12]:"p",[-15]:"f",[-18]:"a",[-21]:"z",[-24]:"y"},_W=e=>Number(e.toPrecision(15)),zW=(e,t,r=!1)=>{if(Number.isNaN(e))return String(e);const{qFmt:n,qType:o,qDec:i=".",qThou:a=","}=t??{};if((e=>xW.includes(e))(o))return TW(e,o,n);if(!n)return String(e);const[s,l]=n.split(";"),{suffix:u}=LW(s),c=u.startsWith("A"),d=(c?u.slice(1):u).endsWith("%"),{value:p,siPrefix:f}=((e,t,r)=>{let n=t?_W(100*e):e,o="";if(r&&0!==n&&Number.isFinite(n)){let e=Number(n.toExponential().split("e")[1]);e-=e%3,e in jW&&(o=jW[e],n=_W(n/10**e))}return{value:n,siPrefix:o}})(e,d,c),h=p<0,m=h&&l?l:s,{prefix:g,suffix:b}=LW(m),v=c&&b.startsWith("A")?b.slice(1):b,{decimals:y,useThousands:x}=((e,t,r)=>{const n=e.indexOf(".");let o=0;return-1!==n?o=(e.slice(n+1).match(/[#0]/g)??[]).length:r&&(o=String(Math.abs(t)).split(".")[1]?.length??0),{decimals:Math.min(o,100),useThousands:e.includes(",")}})(m,p,r||"U"===o),[S,w]=Math.abs(p).toFixed(y).split("."),C=x?S.replace(NW,a):S;return`${h&&!l?"-":""}${g}${w?`${C}${i}${w}`:C}${f}${v}`},FW=1e4;function $W(e,t){return[...t].reverse().find(t=>t*e<=FW)||Math.floor(FW/e)}function BW(e,t){if(t?.skipTotals)return{atTop:!1,atBottom:!1};const r=e.qHyperCube.qDimensionInfo.length>0,n=e.qHyperCube.qMeasureInfo.length>0,o=e.qHyperCube.qGrandTotalRow.length>0,i=e.totals?.show,a=e.totals?.position;if(o&&(r&&n||!i&&!r)){if(i||"top"===a)return{atTop:!0,atBottom:!1};if("bottom"===a)return{atTop:!1,atBottom:!0}}return{atTop:!1,atBottom:!1}}function HW(e,t,r,n){return t?0===r?e.totals?.label??"":"":e.qHyperCube.qGrandTotalRow.at(n)?.qText??""}function VW(e,t){const r=e.qHyperCube.qGrandTotalRow.at(t);return bH(r?.qNum)}function WW(e,t,r,n,o){return e&&!e.auto?n&&"rtl"===o&&"center"!==e.align?{headTextAlign:"right"===e.align?"left":"right",totalsTextAlign:"right"===e.align?"left":"right",bodyTextAlign:"right"===e.align?"left":"right"}:{headTextAlign:e.align,totalsTextAlign:e.align,bodyTextAlign:e.align}:n||"rtl"!==o?{headTextAlign:"N"===t||void 0===t?"right":"left",totalsTextAlign:r?"left":"right",bodyTextAlign:"auto"}:{headTextAlign:"N"===t||void 0===t?"left":"right",totalsTextAlign:r?"right":"left",bodyTextAlign:"auto"}}const UW=(e,t,r,n)=>"auto"!==t?t:n||"rtl"!==r?e?"right":"left":e?"left":"right",GW=(e,t)=>{if(!e)return;const{background:r,foreground:n}=e,o=ie(r??""),i=ie(n??""),a=t?"getRGB":"getRGBA",s=o.isInvalid()?void 0:o[a](),l=s?vm(s,Zm):void 0,u=s?vm(s,Qm):void 0;return i.isInvalid()&&void 0!==s?{background:s,color:gm(s),headerMenuHoverBackground:l,headerMenuActiveBackground:u}:{background:s,color:i.isInvalid()?void 0:i.getRGBA(),headerMenuHoverBackground:l,headerMenuActiveBackground:u}};function KW(e,t,r,n,o=()=>!1){const{qDimensionInfo:i,qMeasureInfo:a,qEffectiveInterColumnSortOrder:s}=e.qHyperCube,{colIdx:l,pageColIdx:u,visibleDimInfoIdx:c,visibleMeasureInfoIdx:d}=t,p=i.length,f=l<p,h=f?i[l]:a[l-p],m=f&&i[l].qGrouping===eg.Cyclic,g=l===s[0];let b,v,y,x="",S=!1,w=-1,C=0,E=[];const{representation:R,conditionalColoring:A}=h;if(f&&void 0!==c){const e=h;x=e.qGroupFieldDefs[e.qGroupPos],C=e.qGroupPos,E=e.qGroupFallbackTitles,S=e.qLocked??!1,w=c,({qDimensionType:b}=e)}else({qMiniChart:v}=h),"bar"===R?.type&&(y=function({qMin:e,qMax:t,qAttrExprInfo:r}){if("number"!=typeof e||"number"!=typeof t||!Number.isFinite(e)||!Number.isFinite(t))return;const n=r.find(({id:e})=>"barOffset"===e),o=Number.isFinite(n?.qMin)?n?.qMin:0,i=Number.isFinite(n?.qMax)?n?.qMax:0;return{qMin:Math.min(o,o+e),qMax:Math.max(i,i+t),hasNegativeValues:e<0,hasPositiveValues:t>=0}}(h));const{qFallbackTitle:I,textAlign:M,qAttrExprInfo:k,qSortIndicator:D,qReverseSort:P,qApprMaxGlyphCount:T,columnWidth:q,qLibraryId:O,headerColor:L}=h,N=e.nullValueRepresentation?.text,j=!f&&void 0!==N&&yH(N)?zW(xH(N),h.qNumFormat,h.qIsAutoFormat):void 0;return{isDim:f,isCyclic:m,isLocked:S,fieldId:x,colIdx:l,qLibraryId:O,pageColIdx:u,qApprMaxGlyphCount:T,qReverseSort:P,columnWidth:q??{type:Jm.Auto},selectionColIdx:w,isActivelySorted:g,id:yW(h),label:I??"",groupDimensionPos:C,groupDimensionLabels:E,qAttrExprInfoIDs:k.map(e=>e.id),qAttrExprInfoIndex:vW(h),sortDirection:D&&"N"!==D?D:"A",totalInfo:HW(e,f,u,d??-1),...!f&&{isTotalNumeric:VW(e,d??-1)},...WW(M,b,f,r,n),representation:R,conditionalColoring:f?void 0:A,qNumFormat:f?void 0:h.qNumFormat,qIsAutoFormat:f?void 0:h.qIsAutoFormat,formattedNullValueText:j,qMiniChart:v,measureMinMax:y,headerColor:o("VNA-626-TABLE_HEADER_COLOR_BY_EXPRESSION")?GW(L,r):void 0}}const YW=(e,t,r,n=()=>!1)=>{const{qHyperCube:{qColumnOrder:o,qDimensionInfo:i,qMeasureInfo:a}}=e,s=i.length+a.length,l=((e,t,r)=>{const n=t.length,{visible:o,hiddenDim:i,hiddenMea:a}=e.reduce((e,o)=>{const i=o<n,{qError:a}=i?t[o]:r[o-n];return 7005===a?.qErrorCode?i?e.hiddenDim.push(o):e.hiddenMea.push(o):e.visible.push(o),e},{visible:[],hiddenDim:[],hiddenMea:[]});return o.map((e,t)=>{const r=e<n,o=(r?i:a).filter(t=>t<e).length,s=e-o;return{colIdx:e,pageColIdx:t,visibleDimInfoIdx:r?s:void 0,visibleMeasureInfoIdx:r?void 0:s-n}})})(o.length===s?o:Array.from(Array(s).keys()),i,a);return l.map(o=>KW(e,o,t,r,n))},XW=(e,t,r,n)=>e?(n?r.nullValueRepresentation?.dimensionText:void 0)??t.qText??"-":r.nullValueRepresentation?.text??t.qText??"-",JW=(e,t)=>t?-2===e.qElemNumber:!!e.qIsNull,ZW={page:0,rowsPerPage:100,rowsPerPageOptions:[10,25,100]},QW=zg(e=>{const t=e(eU),r=e(bb),n=e(bW),o=r.qHyperCube.qSize.qcy,i=n.visibleHeight??t.rowsPerPage,a=n.visibleTop??t.page*i,s=n.visibleHeight??Math.min(i,o-a),l=r.qHyperCube.qSize.qcx;return t.page>0&&a>=o?{...t,page:0}:s*l>FW?{...t,rowsPerPage:$W(l,t.rowsPerPageOptions),page:0}:t}),eU=zg(ZW),tU=zg(e=>{const t=e(bb),r=e(Fb),n=e(bW);return Nb(t,r)?{page:n.page||ZW.page,rowsPerPage:n.rowsPerPage||ZW.rowsPerPage,rowsPerPageOptions:ZW.rowsPerPageOptions}:e(QW)},(e,t,r)=>{t(eU,e=>({...e,...r}))}),rU=!0,nU=e=>-1===e.qElemNumber||!!e.qIsTotalCell,oU=zg(async e=>{const t=e(bb),r=e(Fb),n=e(_b),{page:o,rowsPerPage:i}=e(tU),a=e(bW),s=e(Wb),l=e(fb),u=e(yb),c=e(hb),d=t.qHyperCube.qSize.qcx,p=t.qHyperCube.qSize.qcy,f=Math.ceil(p/i),h=a.visibleTop??o*i,m=a.visibleHeight??Math.min(i,p-h),g=p>10,b=BW(t,r),v=YW(t,rU,n,c),y=l.flags.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING"),x=c("VNA-977-TABLE-BARS"),S=await(async(e,t,r)=>{if(t.snapshotData)return t.qHyperCube.qDataPages;const n=t.qHyperCube.qDataPages.at(0),o=n?.qArea;return n&&o?.qLeft===r.qLeft&&o.qTop===r.qTop&&o.qWidth===r.qWidth&&o.qHeight>=r.qHeight?[{...n,qMatrix:n.qMatrix.slice(0,r.qHeight)}]:e&&"getHyperCubeData"in e?e.getHyperCubeData("/qHyperCubeDef",[r]):[]})(s,t,{qLeft:0,qTop:h,qHeight:m,qWidth:d});u||(a.qTop=h,a.qHeight=m,a.rowsPerPage=i,a.page=o);const w=S.at(0)?.qMatrix.map((e,r)=>{const o=[],i=e.some(nU);return v.forEach((a,s)=>{const u=e[s],c=!a.isDim&&u.qIsNull,d=a.isDim&&JW(u,a.isDim),p=c||d?XW(a.isDim,u,t,y):u.qText,f=c?yH(p):vH(u),g=vH(u)&&!yH(u.qText??"");o[s]={id:l$(),...u,align:UW(f,a.bodyTextAlign,n,rU),rowIdx:r+h,colIdx:a.colIdx,pageRowIdx:r,pageColIdx:s,selectionColIdx:a.selectionColIdx,isSelectable:a.isDim&&!a.isLocked&&!i&&!d,isTotalRow:i,isLastRow:r===m-1,isNumeric:f,isDual:g,isNull:(!c||!f)&&JW(u,a.isDim),qNumFormat:a.qNumFormat,qIsAutoFormat:a.qIsAutoFormat,formattedNullValueText:a.formattedNullValueText,representation:gW({cell:u,representationProperties:a.representation,attrExprInfoIndex:a.qAttrExprInfoIndex,env:l,conditionalColoring:a.conditionalColoring,miniChartOnMeasure:a.qMiniChart,measureMinMax:a.measureMinMax,getText:()=>p,direction:n,enabledFeatures:{[v$.Image]:!0,[v$.Indicator]:!0,[v$.MiniChart]:!0,[v$.Bar]:!a.isDim&&x}})}}),o})??[];return{totalColumnCount:d,totalRowCount:p,totalPages:f,paginationNeeded:g,totalsPosition:b,columns:v,rows:w}}),iU=XR(oU,e=>e),aU=zg(e=>{const t=e(bb),r=e(Fb),n=e(Db),o=e(_b),i=e(hb),a=YW(t,false,o,i),s=BW(t,r),l=t.qHyperCube.qSize.qcy,u=Math.min(AV,l),c=l>AV&&!!n.active;return{totalsPosition:s,columns:a,rows:[],totalRowCount:l,totalColumnCount:t.qHyperCube.qSize.qcx,totalPages:Math.ceil(l/u),paginationNeeded:c}}),sU={totalsPosition:{atTop:!1,atBottom:!1},columns:[],rows:[],totalRowCount:0,totalColumnCount:0,totalPages:0,paginationNeeded:!1},lU=zg(),uU=zg(e=>{const t=e(Bb),r=e(lU);return r||(t?e(iU)??sU:e(aU))}),cU=zg(e=>e(uU).totalsPosition),dU=zg(e=>e(uU).columns),pU=zg(e=>e(dU).length),fU=zg(e=>e(uU).rows),hU=zg(e=>e(uU).totalRowCount),mU=zg(e=>e(uU).totalColumnCount),gU=zg(e=>e(uU).paginationNeeded),bU=zg(e=>{const t=e(Jb),r=e(ev),n=e(bb),o=e(cU),i=e(fU),a=o.atTop,s=function(e,t,r,n){const o=wV(e)?.content,i=CV("content",t,o);i.background=t.background.color;const a=SV(i.fontSize,r,n),s=o?.hoverColor,l=o?.hoverFontColor,u=t.getStyle("object","","straightTableV2.content.hover.backgroundColor"),c=t.getStyle("object","","straightTableV2.content.hover.color"),d=vV(l)||!!c,p=vV(s)||!!u,f=d||p;let h;h=vV(s)?yV(mm.HOVER,t,s):u||(d?"":mm.HOVER);const m=f?yV(gm(h),t,l):"";return{...i,lastRowBottomBorder:a,hoverColors:{background:h,color:m}}}(n,r,i.length,t),l=EV(n,r,!a),u=function(e,t,r){const n=wV(e)?.content,o=CV("content",t,n),{borderBottomColor:i,borderTopColor:a,background:s}=EV(e,t,r);return{...o,borderBottomColor:i,background:s,borderTopColor:a}}(n,r,a);return{body:s,head:l,totals:u}}),vU=(e,t)=>{if(t){const r=e.getColorPickerColor(t);return"none"===r?"transparent":r}},yU=(e,t,r)=>{const{objectColorFromCSS:n,sheetColorFromCSS:o}=e.background,i=vU(e,t?.background),a=e.getStyle("","",r);return{backgroundColor:i||n||a,backgroundFromStyling:i,sheetColorFromCSS:o}},xU=(e,t,r,n=mm.WHITE)=>{const{backgroundColor:o,backgroundFromStyling:i,sheetColorFromCSS:a}=yU(e,t,r);return Rm(i,o,a,n)??n},SU=e=>{switch(typeof e){case"string":return`${parseInt(e,10)}px`;case"number":return`${e}px`;default:return KH}},wU=e=>e?.some(e=>"italic"===e)?"italic":"normal",CU=(e,t)=>void 0===e?t:e.some(e=>"bold"===e)?YH:"normal",EU=e=>!1===e?1:3,RU=e=>e?.some(e=>"underline"===e)?"underline":"none",AU=zg(e=>{const t=e(Fb),r=e(Bb),n=e(ev),o=e(bb),i=e(bU),a=e(hb),{header:s,dimensionValues:l,measureValues:u,totalValues:c,subTotalValues:d,nullValues:p,dimensionNullValues:f,grid:h,content:m}=wV(o)??{},g=a("VNA-670-SEPARATE_NULL_VALUE_STYLING"),b=r?mm.WHITE:mm.TRANSPARENT,v=xU(n,s,"object.straightTableV2.dimension.label.name.backgroundColor",b),y=t?.maxLineCount??m?.rowHeight??n.getStyle("object.straightTableV2","grid","lineClamp"),x=(g?f:void 0)??p;return{header:{fontFamily:s?.fontFamily??n.getStyle("object.straightTableV2.dimension","label.name","fontFamily")??i.head.fontFamily??XH,fontSize:SU(s?.fontSize??n.getStyle("object.straightTableV2.dimension","label.name","fontSize")??i.head.fontSize),fontStyle:wU(s?.fontStyle),fontWeight:CU(s?.fontStyle,YH),textDecoration:RU(s?.fontStyle),color:vU(n,s?.fontColor)??n.getStyle("object.straightTableV2.dimension","label.name","color")??i.head.color??mm.TEXT,background:v},headerMenuHoverBackground:vm(v,Zm),headerMenuActiveBackground:vm(v,Qm),dimension:{values:{fontFamily:l?.fontFamily??n.getStyle("object.straightTableV2.dimension","label.value","fontFamily")??i.body.fontFamily??XH,fontSize:SU(l?.fontSize??m?.fontSize??n.getStyle("object.straightTableV2.dimension","label.value","fontSize")??i.body.fontSize),fontStyle:wU(l?.fontStyle),fontWeight:CU(l?.fontStyle,"normal"),textDecoration:RU(l?.fontStyle),color:vU(n,l?.fontColor)??vU(n,m?.fontColor)??n.getStyle("object.straightTableV2.dimension","label.value","color")??i.body.color??mm.TEXT,background:yU(n,l,"object.straightTableV2.dimension.label.value.backgroundColor").backgroundColor??i.body.background??mm.TRANSPARENT}},measure:{values:{fontFamily:u?.fontFamily??n.getStyle("object.straightTableV2.measure","label.value","fontFamily")??i.body.fontFamily??XH,fontSize:SU(u?.fontSize??m?.fontSize??n.getStyle("object.straightTableV2.measure","label.value","fontSize")??i.body.fontSize),fontStyle:wU(u?.fontStyle),fontWeight:CU(u?.fontStyle,"normal"),textDecoration:RU(u?.fontStyle),color:vU(n,u?.fontColor)??vU(n,m?.fontColor)??n.getStyle("object.straightTableV2.measure","label.value","color")??i.body.color??mm.TEXT,background:yU(n,u,"object.straightTableV2.measure.label.value.backgroundColor").backgroundColor??i.body.background??mm.TRANSPARENT}},totalRow:{fontFamily:c?.fontFamily??n.getStyle("object.straightTableV2.total","label.value","fontFamily")??i.totals.fontFamily??XH,fontSize:SU(c?.fontSize??m?.fontSize??n.getStyle("object.straightTableV2.total","label.value","fontSize")??i.totals.fontSize),fontStyle:wU(c?.fontStyle),fontWeight:CU(c?.fontStyle,YH),textDecoration:RU(c?.fontStyle),color:vU(n,c?.fontColor)??vU(n,m?.fontColor)??n.getStyle("object.straightTableV2.total","label.value","color")??i.totals.color??mm.TEXT,background:xU(n,c,"object.straightTableV2.total.label.value.backgroundColor",b)},subTotalRow:{fontFamily:d?.fontFamily??n.getStyle("object.straightTableV2.subTotal","label.value","fontFamily")??i.totals.fontFamily??XH,fontSize:SU(d?.fontSize??m?.fontSize??n.getStyle("object.straightTableV2.subTotal","label.value","fontSize")??i.totals.fontSize),fontStyle:wU(d?.fontStyle),fontWeight:CU(d?.fontStyle,YH),textDecoration:RU(d?.fontStyle),color:vU(n,d?.fontColor)??vU(n,m?.fontColor)??n.getStyle("object.straightTableV2.subTotal","label.value","color")??i.totals.color??mm.TEXT,background:xU(n,d,"object.straightTableV2.subTotal.label.value.backgroundColor",b)},dimensionNull:{fontStyle:wU(x?.fontStyle),fontWeight:CU(x?.fontStyle,"normal"),textDecoration:RU(x?.fontStyle),color:vU(n,x?.fontColor)??vU(n,m?.fontColor)??n.getStyle("object.straightTableV2.null","label.value","color")??i.body.color??mm.TEXT,background:vU(n,x?.background)??n.getStyle("","","object.straightTableV2.null.label.value.backgroundColor")??mm.NULL_VALUE_BACKGROUND},measureNull:{fontStyle:wU(p?.fontStyle),fontWeight:CU(p?.fontStyle,"normal"),textDecoration:RU(p?.fontStyle),color:vU(n,p?.fontColor)??vU(n,m?.fontColor)??n.getStyle("object.straightTableV2.null","label.value","color")??i.body.color??mm.TEXT,background:vU(n,p?.background)??n.getStyle("","","object.straightTableV2.null.label.value.backgroundColor")??mm.NULL_VALUE_BACKGROUND},grid:{contentLineClamp:y??EU(o.multiline?.wrapTextInCells),headerLineClamp:EU(o.multiline?.wrapTextInHeaders),border:vU(n,h?.border)??n.getStyle("object.straightTableV2","grid","borderColor")??(n.background.isDark?mm.DARK_MODE_BORDER:mm.BORDER_MEDIUM),divider:vU(n,h?.divider)??n.getStyle("object.straightTableV2.grid","","divider.borderColor")??mm.BORDER_HEAVY,hoverColors:{color:vU(n,m?.hoverFontColor)??n.getStyle("object.straightTableV2","","grid.hover.color")??i.body.hoverColors?.color,background:vU(n,m?.hoverColor)??n.getStyle("object.straightTableV2","","grid.hover.backgroundColor")??i.body.hoverColors?.background},zebraStripes:{show:!!h?.zebraStripes?.show,odd:{color:vU(n,h?.zebraStripes?.color?.odd),background:vU(n,h?.zebraStripes?.background?.odd)},even:{color:vU(n,h?.zebraStripes?.color?.even),background:vU(n,h?.zebraStripes?.background?.even)},overrideDimNullValueBackground:void 0===vU(n,x?.background),overrideDimNullValueColor:void 0===vU(n,x?.fontColor),overrideMeasNullValueBackground:void 0===vU(n,p?.background),overrideMeasNullValueColor:void 0===vU(n,p?.fontColor)},lastRowBottomBorder:i.body.lastRowBottomBorder},selectedColors:bm(n),contentStaticLineCount:y}}),IU=zg(e=>{const t=e(AU);return Math.max(mV(t.header.fontSize)+8,32)}),MU=zg(e=>{const t=e(AU),r=mV(t.totalRow.fontSize);return Math.max(r+9,24)}),kU=zg(e=>{const t=e(AU),r=e(xb),n=e(Sb);return Math.max(r>0?mV(t.dimension.values.fontSize):0,n>0?mV(t.measure.values.fontSize):0)}),DU=zg(e=>{const t=e(AU),r=e(kU),n=(t.contentStaticLineCount||1)*r;return Math.max(n+9,24)}),PU=zg(e=>{const t=e(AU),r=mV(t.subTotalRow.fontSize),n=(t.contentStaticLineCount||1)*r;return Math.max(n+9,24)}),TU=(e,t,r)=>{if(!e.length)return[];const n=[],o=[];let i=t;if(e.forEach((e,a)=>{const{columnWidth:{type:s,pixels:l,percentage:u},label:c,qApprMaxGlyphCount:d,totalInfo:p}=e;let f=0;const h=()=>{n[a]=Math.min(Xm.PixelsMax,Math.max(Xm.PixelsMin,f)),i-=n[a]};switch(s){case Jm.Pixels:f=(e=>void 0===e||Number.isNaN(+e)?Xm.PixelsDefault:+e)(l),h();break;case Jm.Percentage:f=(e=>void 0===e||Number.isNaN(+e)?Xm.PercentageDefault:+e)(u)/100*t,h();break;case Jm.FitToContent:e.representation?.type===v$.Image?o.push(a):(f=r(c,p,d,e.isLocked,e.isActivelySorted,e.isDim,e.isCyclic),h());break;case Jm.Auto:o.push(a);break;default:throw new Error(`${s} is not a valid column width type`)}}),o.length){const e=i/o.length;o.forEach(t=>{n[t]=Math.max(Xm.AutoMinTable,e)})}return n},qU=zg(e=>{const t=e(AU),r=e(uU).totalsPosition,n=e(Rb),{measureText:o}=e(uH({...t.header,fontWeight:YH})),{measureText:i}=e(uH({...t.totalRow,fontWeight:YH})),{estimateWidth:a}=e(uH(t.dimension.values)),{estimateWidth:s}=e(uH(t.measure.values)),l=r.atBottom||r.atTop;return(e,t,r,u,c,d,p)=>{let f;if(n){const t=4;let r=25;r+=t+24,u&&(r+=20+t),c&&(r+=20),f=o(e)+r}else{let t=9;t+=16,p&&(t+=iV),t+=iV,t+=iV,f=o(e)+t}const h=d?a:s;return Math.max(f,l?i(t)+24+1:0,h(r))}}),OU=zg(null),LU=zg(e=>{const t=e(uU),r=e(Xb).width,n=e(hV),o=e(qU);return TU(t.columns,r-n,o)}),NU=zg(e=>e(OU)??e(LU),(e,t,r)=>{t(OU,r)}),jU=SA(e=>{const t=e(dH);!1===e(pV)&&t.emit("done-adjusting-column-width")}),_U=SA((e,t)=>{e(bb),t(OU,null)}),zU=zg(e=>e(NU).reduce((e,t)=>e+t,0)),FU=({children:e})=>(Jg(_U),Jg(jU),e);function $U(e){const t=pm();return t.components?.MuiTable?.styleOverrides&&(t.components.MuiTable.styleOverrides.root={}),lu({...t,direction:e})}const BU={width:"100%",height:"100%",color:"transparent",background:"transparent",borderColor:"transparent"},HU={border:0,boxShadow:"none",borderRadius:0,outline:0,width:0,height:0,background:"transparent",cursor:"pointer",visibility:"hidden"},VU=Mu("input",{shouldForwardProp:e=>"isLastColumn"!==e&&"hoverColor"!==e})(({isLastColumn:e,hoverColor:t,dir:r})=>({position:"absolute",display:"flex",height:"100%",top:0,marginLeft:"-4px",marginRight:"rtl"===r?"-4px":void 0,touchAction:"none",cursor:"col-resize",pointerEvents:"auto",width:(e?4:9)+"px",justifyContent:e?"flex-end":"center",outline:"none",appearance:"none",WebkitAppearance:"none",backgroundColor:"transparent","&::-webkit-slider-runnable-track":{...BU},"&::-moz-range-track":{...BU},"&::-ms-track":{...BU},"&::-webkit-slider-thumb":{appearance:"none",WebkitAppearance:"none",...HU},"&::-moz-range-thumb":{...HU},"&::-ms-thumb":{...HU},"&: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"}})),WU=({columnWidth:e,keyValue:t,isLastColumn:r,isPivot:n,hoverColor:o,updateWidthCallback:i,confirmWidthCallback:a,handleBlur:s,setIsAdjustingWidth:l,isLeftColumn:u,accessibilityRelatedArgs:c,direction:d="ltr"})=>{const p=$m({translator:c.translator}),f=M({initWidth:e,columnWidth:e,initX:0}),h=r?0:1,m=n&&!u,g=()=>m?f.current.columnWidth-h:"100%",b={left:"rtl"!==d?g():void 0,right:"rtl"===d?g():void 0},v=t=>{f.current={initWidth:e,columnWidth:e,initX:t??f.current.initX}};zm(()=>{m&&v()},[e]);const y=e=>{const t=Math.max(e,Xm.PixelsMin);f.current.columnWidth=t,i(t)},x=()=>{if(f.current.columnWidth!==f.current.initWidth){const e={type:Jm.Pixels,pixels:f.current.columnWidth};a(e)}l?.(!1)},S=e=>{const t="rtl"===d?f.current.initWidth+f.current.initX-e.clientX:f.current.initWidth+e.clientX-f.current.initX;y(t)},w=e=>{wm(e),document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",w),x()},C=e=>{const t="rtl"===d?f.current.initWidth+-f.current.initX-e.touches[0].clientX:f.current.initWidth+e.touches[0].clientX-f.current.initX;y(t)},E=e=>{wm(e),document.removeEventListener("touchmove",C),document.removeEventListener("touchend",E),x()},R=!n&&s?e=>{if(e.key===Km.Left||e.key===Km.Right){wm(e);const t=5,r=e.key===Km.Left?t:-t,n="rtl"===d?r:-r;l?.(!0),y(f.current.columnWidth+n)}else e.key===Km.Space||e.key===Km.Enter?(wm(e),s(e),l?.(!1),x()):e.key===Km.Esc&&(wm(e),s(e),l?.(!1),y(f.current.initWidth))}:void 0,A=p.get("NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",[String(c.columnLabel)]);return Gt.jsx(VU,{style:b,hoverColor:o,isLastColumn:r,className:Ym,"data-testid":Ym,onMouseDown:e=>{wm(e),document.addEventListener("mousemove",S),document.addEventListener("mouseup",w),l?.(!0),v(e.clientX)},onDoubleClick:()=>{a({type:Jm.FitToContent})},onTouchStart:e=>{1===e.touches.length&&(wm(e),document.addEventListener("touchmove",C),document.addEventListener("touchend",E),l?.(!0),v(e.touches[0].clientX))},onKeyDown:R,onBlur:s,onFocus:()=>{v()},type:"range",tabIndex:-1,"aria-label":A,"aria-valuemin":Xm.PixelsMin,"aria-valuemax":Xm.PixelsMax,"aria-valuenow":Number(e.toFixed(1)),dir:d},t)},UU=_((e,t)=>Gt.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:Gt.jsx("path",{d:"M15 4H1V2h14zm0 10H1v-2h14zm0-5H1V7h14z"})})),GU=({model:e,headerData:t})=>{if(e&&"setActiveField"in e&&void 0!==t.dimensionInfoIndex){const r=t.dimensionInfoIndex;return async t=>{try{await e.setActiveField("/qHyperCubeDef",r,t)}catch(e){console.error(e)}}}return null},KU=Mu(yd,{shouldForwardProp:e=>"rightAligned"!==e&&"shouldShowMenuIcon"!==e&&"isAccessibleHeader"!==e})(({rightAligned:e,shouldShowMenuIcon:t,isAccessibleHeader:r})=>({...e?{marginRight:"auto"}:{marginLeft:"auto"},height:r?24:void 0,display:t?"flex":"none",fontWeight:"bold",width:r?"100%":void 0,alignItems:"center",justifyContent:"center"})),YU=Mu(UU,{shouldForwardProp:e=>"isInteractionsActive"!==e})(({isInteractionsActive:e})=>({minWidth:"unset",position:"relative",cursor:e?"pointer":"default"})),XU=Mu(Lf)(({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}})),JU=Mu(fp)(({theme:e})=>({"&.MuiDivider-root":{margin:e.spacing(.5)}})),ZU=Mu(Ff)(({theme:e})=>({fontSize:"12px",height:24,fontWeight:"bold",padding:`${e.spacing(.25,2)} !important`,marginBottom:e.spacing(.5)})),QU=Mu(Ff,{shouldForwardProp:e=>"isSubMenu"!==e&&"isActive"!==e})(({theme:e,isSubMenu:t,isActive:r})=>({width:`calc(220px - ${e.spacing(1)} - ${t?10:0}px)`,maxHeight:32,borderRadius:`${e.spacing(.5)} !important`,margin:`${e.spacing(.25,.5)} !important`,padding:`${e.spacing(1,1.5)} !important`,display:"flex !important",justifyContent:"space-between !important","&&:focus":{boxShadow:"rgb(23, 127, 230) 0px 0px 0px 2px"},position:"relative !important",overflow:"hidden",boxSizing:"border-box !important",background:r?"rgba(0, 0, 0, 0.05)":"transparent"})),eG=Mu("div",{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})(({theme:e,direction:t,isPagination:r})=>({position:"absolute",width:e.spacing(.5),height:16,left:0,right:r||"rtl"!==t?void 0:0,top:"50%",transform:"TranslateY(-50%)",borderRadius:"0 2px 2px 0",background:"#01873d"})),tG=Mu("div")(()=>({display:"flex",justifyContent:"space-between",alignItems:"center",maxWidth:"100%"})),rG=Mu(Lc)(()=>({fontFamily:'"Source Sans Pro", HelveticaNeue, "Helvetica Neue", Helvetica, Arial, sans-serif',fontSize:"14px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"})),nG=Mu(lf,{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})(({theme:e,direction:t,isPagination:r})=>({width:16,minWidth:"unset !important",marginRight:r||"rtl"!==t?e.spacing(1.5):0,marginLeft:r||"rtl"!==t?void 0:e.spacing(1.5),lineHeight:0})),oG=_((e,t)=>Gt.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:Gt.jsx("path",{d:"M8.5 8 4 3.5 5.5 2l6 6-6 6L4 12.5z"})})),iG=e=>{const t=e.nextElementSibling;return t?"HR"===t.tagName?iG(t):t:e.parentElement?.children?.[0]},aG=e=>{const t=e.previousElementSibling;if(!t){const t=e.parentElement?.children?.length;return e.parentElement?.children?.[t-1]}return"HR"===t.tagName?aG(t):t},sG=e=>{const{key:t,currentTarget:r}=e,n=document.activeElement??r;if(t===Km.Down||t===Km.Up){const r=e=>t===Km.Down?iG(e):aG(e);e.preventDefault(),e.stopPropagation();let o=r(n);for(;o;){if("true"!==o.ariaDisabled){o.focus();break}o=r(o)}}},lG=(e,t)=>e.map(e=>e.map(e=>({...e.groupHeading?{groupHeading:e.groupHeading}:{},items:e.items.map(({onClick:e,...r})=>({...r,...e?{onClick:async r=>{Object.entries(t).forEach(([,e])=>{e(!1)}),await e(r)}}:{}}))})));let uG={};const cG=({autoFocus:e,id:t,onClick:r,itemTitle:n,icon:o,enabled:i,subMenus:a,isSubMenu:s,isActive:l,direction:u,isPagination:c})=>{const[d,p]=I(!1),f=S.useRef(null),h=q(e=>{e.stopPropagation(),p(!1)},[p]);return Gt.jsxs(Gt.Fragment,{children:[Gt.jsxs(QU,{ref:a?f:null,"data-testid":`menu-item-${t}`,className:"nebula-table-utils-head-menu-item",onClick:async e=>{"keyup"!==e.type&&(r&&(await r(e),uG={}),a?.length&&(p(!0),uG[n]=p,e.stopPropagation()))},disabled:!i,autoFocus:e,isSubMenu:!!s,isActive:!!l,onKeyDown:sG,children:[l?Gt.jsx(eG,{direction:u,isPagination:c}):null,Gt.jsxs(tG,{children:[Gt.jsx(nG,{direction:u,isPagination:c,children:Gt.jsx(o,{})}),Gt.jsx(rG,{variant:"body2",children:n})]}),a?.length?Gt.jsx(oG,{}):null]},t),a?.length?Gt.jsx(hG,{isSubMenu:!0,open:d,anchorEl:f.current,onClose:h,menuGroups:lG(a,uG),transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},direction:u,isPagination:c}):null]})},dG=({menuGroup:e,isSubMenu:t,direction:r,isPagination:n})=>e.map(e=>[[e.groupHeading&&Gt.jsx(ZU,{disabled:!0,style:{opacity:1},children:e.groupHeading},e.groupHeading),e.items.map(e=>Gt.jsx(cG,{...e,isSubMenu:t,direction:r,isPagination:n},e.id))].filter(Boolean)]),pG=({itemGroups:e,isSubMenu:t,direction:r,isPagination:n})=>e.map((o,i)=>[dG({menuGroup:o,isSubMenu:t,direction:r,isPagination:n}),i<e.length-1?Gt.jsx(JU,{"data-testid":"group-divider",variant:"middle"}):void 0]),fG={appear:0,enter:0,exit:0},hG=({anchorEl:e,open:t,onClose:r,menuGroups:n,transformOrigin:o,anchorOrigin:i,isSubMenu:a,direction:s,isPagination:l})=>n.length?Gt.jsx(XU,{className:Wm,open:t,anchorEl:e,onClose:r,transitionDuration:fG,MenuListProps:{id:Um},...i?{anchorOrigin:i}:{},...o?{transformOrigin:o}:{},dir:s,children:pG({itemGroups:n,isSubMenu:a,direction:s,isPagination:l})}):null,mG=({qLibraryId:e,fieldId:t,searchRelatedArgs:r,selectionRelatedArgs:n,direction:o,onPopoverClose:i})=>q(()=>{const a=e?{qLibraryId:e,type:"dimension"}:t;if(r?.embed){const{embed:e,listboxRef:t}=r;e.__DO_NOT_USE__.popover(t.current,a,{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"rtl"===o?"right":"left"},sortCriteria:r.sortCriteria,stateName:n?.qStateName,direction:o,onPopoverClose:i})}},[e,t,r,n?.qStateName,o,i]),gG=(e,t)=>({qInfo:{qType:"tableListbox"},qListObjectDef:Boolean(t.qLibraryId)?{qLibraryId:t.qLibraryId,qStateName:e}:{qDef:{qFieldDefs:[t.fieldId]},qStateName:e}}),bG=(e,t)=>e.some(e=>t[e]>0),vG={canSelectAll:!1,canClearSelections:!1,canSelectPossible:!1,canSelectAlternative:!1,canSelectExcluded:!1},yG=({open:e,qStateName:t="$",headerData:r,app:n})=>{const[o,i]=I(null),[a,s]=I(vG);return zm(()=>{e||(s(vG),i(null))},[e]),P(()=>{if(!n?.createSessionObject||!r.isDim||!e)return()=>{};let o,a=!1;const l=()=>{o&&n.destroySessionObject(o)};return(async()=>{try{const e=gG(t,r),u=await n.createSessionObject(e),c=await u.getLayout(),{qStateCounts:d}=c.qListObject?.qDimensionInfo??{};o=c.qInfo?.qId,a?l():(i(u),d&&s((e=>({canSelectAll:bG(["qOption","qAlternative","qExcluded","qDeselected"],e),canClearSelections:bG(["qSelected"],e),canSelectPossible:bG(["qOption"],e),canSelectAlternative:bG(["qAlternative"],e),canSelectExcluded:bG(["qAlternative","qExcluded"],e)}))(d)))}catch(e){console.error(e)}})(),()=>{a=!0,l()}},[e,n,r,t]),{fieldInstance:o,selectionActionsEnabledStatus:a}},xG=_((e,t)=>Gt.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:Gt.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"})})),SG=_((e,t)=>Gt.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:Gt.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"})})),wG=_((e,t)=>Gt.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:Gt.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"})})),CG=_((e,t)=>Gt.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:Gt.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"})})),EG=_((e,t)=>Gt.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:Gt.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"})})),RG=_((e,t)=>Gt.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:Gt.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"})})),AG=_((e,t)=>Gt.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:Gt.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"})})),IG=_((e,t)=>Gt.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:Gt.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"})})),MG=_((e,t)=>Gt.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:Gt.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"})})),kG=_((e,t)=>Gt.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:Gt.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"})})),DG=_((e,t)=>Gt.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:Gt.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"})})),PG=_((e,t)=>Gt.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:Gt.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"})})),TG=_((e,t)=>Gt.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:Gt.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 qG=function(e){return e.Sorting="sorting",e.Searching="searching",e.Selections="selections",e.AdjusterHeaderSize="adjustHeaderSize",e}({});const OG="/qListObjectDef",LG=({headerData:e,translator:t,menuAvailabilityFlags:r,setOpen:n,sortFromMenu:o,interactions:i,embedListbox:a,fieldInstance:s,selectionActionsEnabledStatus:l,anchorRef:u,focusColumnAdjuster:c,setActiveFieldCallback:d,expandOrCollapseArgs:p})=>{const f=[];if(r[qG.Sorting]){const{isActivelySorted:r,sortDirection:i}=e,{ascendingEnabled:a,descendingEnabled:s}=(({isActivelySorted:e,sortDirection:t,isPivot:r,isSortedByFirstMeasure:n})=>{let o=!r&&!e||"D"===t,i=!r&&!e||"A"===t;return n&&(o=!1,i=!1),{ascendingEnabled:o,descendingEnabled:i}})(e);f.push([{groupHeading:t.get("NebulaTableUtils.MenuGroupLabel.Sorting"),items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortAscending"),onClick:async e=>{e.stopPropagation(),await(o?.(e,"A")),n(!1)},icon:xG,enabled:a,isActive:!!r&&"A"===i,autoFocus:a},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortDescending"),onClick:async e=>{e.stopPropagation(),await(o?.(e,"D")),n(!1)},icon:CG,enabled:s,isActive:!!r&&"D"===i,autoFocus:!a&&s}]}])}if(e.isCyclic&&d){const t=[];t.push([{items:[{id:1,itemTitle:e.groupDimensionLabels[e.groupDimensionPos],enabled:!0,icon:AG,subMenus:[[{items:e.groupDimensionLabels.map((t,r)=>({id:r+1,itemTitle:t,onClick:e=>{e.stopPropagation(),n(!1),d(r)},enabled:!0,icon:jF,isActive:e.groupDimensionPos===r}))}]]}]}]),t.length>0&&f.push(...t)}if(e.isDim&&i?.select){const o=[];r[qG.Searching]&&o.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Search"),onClick:e=>{e.stopPropagation(),n(!1),a()},icon:IG,enabled:!0}]}]),!e.isLocked&&r[qG.Selections]&&o.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Selections"),icon:TG,enabled:!!s,subMenus:[[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAll"),onClick:async e=>{e.stopPropagation(),n(!1),await(s?.selectListObjectAll(OG))},icon:MG,enabled:l.canSelectAll},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectPossible"),onClick:async e=>{e.stopPropagation(),n(!1),await(s?.selectListObjectPossible(OG))},icon:PG,enabled:l.canSelectPossible},{id:3,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAlternative"),onClick:async e=>{e.stopPropagation(),n(!1),await(s?.selectListObjectAlternative(OG))},icon:kG,enabled:l.canSelectAlternative},{id:4,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectExcluded"),onClick:async e=>{e.stopPropagation(),n(!1),await(s?.selectListObjectExcluded(OG))},icon:DG,enabled:l.canSelectExcluded}]}],[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.ClearSelections"),onClick:async e=>{e.stopPropagation(),n(!1),await(s?.clearSelections(OG))},icon:SG,enabled:l.canClearSelections}]}]]}]}]),p&&!p.alwaysFullyExpanded&&f.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Expand"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),n(!1),await p.expandCallback()},icon:RG,enabled:!0},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Collapse"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),n(!1),await p.collapseCallback()},icon:EG,enabled:!0}]}]),o.length>0&&f.push(...o)}return r[qG.AdjusterHeaderSize]&&f.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.AdjustColumnSize"),onClick:e=>{e.stopPropagation(),e.preventDefault(),n(!1),c?.(u)},icon:wG,enabled:!0}]}]),f},NG=({open:e,setOpen:t,anchorRef:r,headerData:n,translator:o,interactions:i,menuAvailabilityFlags:a,shouldShowMenuIcon:s=!0,sortRelatedArgs:l,searchRelatedArgs:u,selectionRelatedArgs:c,adjustHeaderSizeRelatedArgs:d,expandOrCollapseArgs:p,model:f,direction:h="ltr",isPagination:m,isAccessibleHeader:g,iconSize:b=Bm})=>{const v=M(null),y=$m({translator:o}),{qLibraryId:x,fieldId:S,headTextAlign:w}=n,C=c?.app,{fieldInstance:E,selectionActionsEnabledStatus:R}=yG({open:e,headerData:n,app:C,qStateName:c?.qStateName}),A=GU({model:f,headerData:n}),I=mG({qLibraryId:x,fieldId:S,searchRelatedArgs:u,selectionRelatedArgs:c,direction:h}),k=q(e=>{e.stopPropagation(),t(!1)},[t]),D=q(e=>{e.stopPropagation(),t(e=>!e)},[t]);return i.active?Gt.jsxs(KU,{rightAligned:"right"===w,shouldShowMenuIcon:s,className:Vm,onClick:!1===g?D:void 0,ref:v,isAccessibleHeader:g,children:[s?Gt.jsx(YU,{height:b,className:Hm,"data-testid":Hm,isInteractionsActive:i.active??!1,children:Gt.jsx(UU,{})}):null,Gt.jsx(hG,{open:e,anchorEl:!1===g?v.current:r.current,onClose:k,menuGroups:LG({headerData:n,translator:y,menuAvailabilityFlags:a,setOpen:t,...l,embedListbox:I,interactions:i,fieldInstance:E,selectionActionsEnabledStatus:R,anchorRef:r,focusColumnAdjuster:d?.focusColumnAdjuster,setActiveFieldCallback:A,expandOrCollapseArgs:p}),direction:h,isPagination:m})]}):null},jG=e=>e.isDark?{background:e.color,borderColor:mm.DARK_MODE_BORDER,color:mm.DARK_MODE_TEXT,disabledColor:mm.DARK_MODE_DISABLED,iconColor:mm.DARK_MODE_TEXT}:{background:e.color,borderColor:mm.BORDER_MEDIUM,color:mm.TEXT,disabledColor:mm.DISABLED},_G=Mu(yd,{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}`})),zG=Mu(xh,{shouldForwardProp:e=>"footerStyle"!==e})(({footerStyle:e,theme:t})=>({background:"inherit",marginRight:t.spacing(1),color:e.color,"& .MuiNativeSelect-icon, .MuiNativeSelect-select":{color:e.iconColor}})),FG=Mu(kd,{shouldForwardProp:e=>"disabledCondition"!==e&&"footerStyle"!==e})(({disabledCondition:e,footerStyle:t,theme:r})=>({color:e?t.disabledColor:t.color,cursor:e?"default":"pointer",marginLeft:r.spacing(1)})),$G=Mu(Lc)(({theme:e})=>({color:"inherit",margin:e.spacing(0,1,0,1)})),BG=({children:e,footerContainer:t,interactions:r,theme:n,paginationNeeded:o=!0})=>{const i=A(()=>jG(n.background),[n]);if(!r.active)return null;const a=o?Gt.jsx(_G,{footerStyle:i,children:e}):null;return t?H.createPortal(e,t):a},HG=_((e,t)=>Gt.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:Gt.jsx("path",{d:"m12 2 1.5 1.5L9 8l4.5 4.5L12 14 6 8zM4 2v12H2V2z"})})),VG=_((e,t)=>Gt.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:Gt.jsx("path",{d:"m3.5 2 6 6-6 6L2 12.5 6.5 8 2 3.5zM14 2v12h-2V2z"})})),WG=k({}),UG=()=>O(WG),GG=({children:e,direction:t,pageInfo:r,handleChangeRowsPerPage:n,footerContainer:o,isSelectionMode:i,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:u,keyboard:c,translator:d,theme:p,interactions:f,rect:h,layout:m,visibilityThreshold:g})=>{const b=(e=>!e.enabled||e.active)(c)?0:-1,v=A(()=>jG(p.background),[p]),y=o?o.getBoundingClientRect().width:h.width,x=$m({translator:d}),S=A(()=>({direction:t,pageInfo:r,handleChangeRowsPerPage:n,footerContainer:o,isSelectionMode:i,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:u,keyboard:c,translator:x,theme:p,interactions:f,rect:h,layout:m,footerStyle:v,tabIndex:b,width:y,visibilityThreshold:g}),[t,r,n,o,i,a,s,l,u,c,x,p,f,h,m,v,b,y,g]);return Gt.jsx(WG.Provider,{value:S,children:e})},KG=({disabledCondition:e,pageNumber:t,type:r,footerStyle:n,handleChangePage:o,translator:i,interactions:a,tabIndex:s})=>({footerStyle:n,disabledCondition:e,size:"small","data-testid":"pagination-action-icon-button","aria-disabled":e,"aria-label":i.get(`NebulaTableUtils.Pagination.${r}`),title:a.passive?i.get(`NebulaTableUtils.Pagination.${r}`):void 0,tabIndex:s,onClick:e?void 0:()=>{o(t)}});let YG=function(e){return e.FirstPage="FirstPage",e.LastPage="LastPage",e.NextPage="NextPage",e.PreviousPage="PreviousPage",e}({}),XG=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 JG=()=>{const{direction:e,pageInfo:t,width:r,interactions:n,visibilityThreshold:o,footerStyle:i,handleChangePage:a,translator:s,tabIndex:l}=UG(),u=0===t.page,c=KG({type:YG.FirstPage,disabledCondition:u,pageNumber:0,footerStyle:i,handleChangePage:a,translator:s,interactions:n,tabIndex:l});return r<=(o?.firstPage||XG.FirstPage)?null:Gt.jsx(FG,{...c,disabled:!n.active,children:"rtl"===e?Gt.jsx(VG,{height:Bm}):Gt.jsx(HG,{height:Bm})})},ZG=(e,t,r=!1)=>{r&&e.key===Km.Tab&&!e.shiftKey&&(wm(e),Sm(e.target,t,!1))},QG=()=>{const{direction:e,pageInfo:t,keyboard:r,totalPages:n,isSelectionMode:o,width:i,interactions:a,visibilityThreshold:s,footerStyle:l,handleChangePage:u,translator:c,tabIndex:d}=UG(),p=t.page>=n-1,f=KG({type:YG.LastPage,disabledCondition:p,pageNumber:n-1,footerStyle:l,handleChangePage:u,translator:c,interactions:a,tabIndex:d}),h=r.enabled?e=>{ZG(e,r,o)}:void 0;return i<=(s?.lastPage||XG.LastPage)?null:Gt.jsx(FG,{...f,onKeyDown:h,disabled:!a.active,children:"rtl"===e?Gt.jsx(HG,{height:Bm}):Gt.jsx(VG,{height:Bm})})},eK=_((e,t)=>Gt.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:Gt.jsx("path",{d:"m7 8 4.5 4.5L10 14 4 8l6-6 1.5 1.5z"})})),tK=()=>{const{direction:e,pageInfo:t,keyboard:r,totalPages:n,isSelectionMode:o,width:i,interactions:a,footerStyle:s,handleChangePage:l,translator:u,tabIndex:c}=UG(),d=t.page>=n-1,p=KG({type:YG.NextPage,disabledCondition:d,pageNumber:t.page+1,footerStyle:s,handleChangePage:l,translator:u,interactions:a,tabIndex:c}),f=!(i>XG.FirstPage&&i>XG.LastPage)&&r.enabled?e=>{ZG(e,r,o)}:void 0;return Gt.jsx(FG,{...p,onKeyDown:f,disabled:!a.active,children:"rtl"===e?Gt.jsx(eK,{height:Bm}):Gt.jsx(oG,{height:Bm})})},rK=()=>{const{direction:e,pageInfo:t,interactions:r,footerStyle:n,handleChangePage:o,translator:i,tabIndex:a}=UG(),s=0===t.page,l=KG({type:YG.PreviousPage,disabledCondition:s,pageNumber:t.page-1,footerStyle:n,handleChangePage:o,translator:i,interactions:r,tabIndex:a});return Gt.jsx(FG,{...l,disabled:!r.active,children:"rtl"===e?Gt.jsx(oG,{height:Bm}):Gt.jsx(eK,{height:Bm})})},nK=()=>{const{translator:e,width:t,pageInfo:r,totalRowCount:n,visibilityThreshold:o}=UG(),{page:i,rowsPerPage:a}=r;if(t<=(o?.displayedRowsLabel||XG.DisplayedRowsLabel))return null;const s=e.get("NebulaTableUtils.Pagination.DisplayedRowsLabel",[`${i*a+1} - ${Math.min((i+1)*a,n)}`,n.toString()]);return Gt.jsx($G,{variant:"caption",dir:"ltr",children:s})},oK=({name:e,value:t,options:r,handleChange:n})=>{const{layout:o,footerStyle:i,translator:a,tabIndex:s,interactions:l}=UG(),u=o.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 Gt.jsxs(Gt.Fragment,{children:[Gt.jsxs($G,{variant:"caption",id:p,children:[c,":"]}),Gt.jsx(zG,{footerStyle:i,size:"small",native:!0,value:t,onChange:n,inputProps:f,disabled:!l.active,children:r})]})},iK=()=>{const{pageInfo:e,isSelectionMode:t,totalColumnCount:r,width:n,handleChangeRowsPerPage:o,visibilityThreshold:i}=UG();if(!(!!e.rowsPerPageOptions?.length&&!t&&n>(i?.rowsPerPage||XG.RowsPerPage)&&r<=100)||void 0===e.rowsPerPageOptions)return null;const a=Gt.jsx(Gt.Fragment,{children:e.rowsPerPageOptions.map(e=>Gt.jsx("option",{value:e,children:e},e))});return Gt.jsx(oK,{name:"RowsPerPage",value:e.rowsPerPage,options:a,handleChange:e=>{o?.(+e.target.value)}})},aK=1e3,sK="…",lK=({totalPages:e,page:t})=>{const r=Math.min(e,aK),n=r<e&&t>500,o=n?Math.min(500+t,e):r,i=n?Math.max(0,o-aK):0,a=Array.from(Array(r).keys()).map(e=>{const t=e+i;return Gt.jsx("option",{value:t,children:t+1},t)});return i>0&&a.unshift(Gt.jsx("option",{value:sK,disabled:!0,children:sK},"startMoreOptions")),o<e-1&&a.push(Gt.jsx("option",{value:sK,disabled:!0,children:sK},"endMoreOptions")),Gt.jsx(Gt.Fragment,{children:a})},uK=()=>{const{pageInfo:e,width:t,totalPages:r,handleChangePage:n,visibilityThreshold:o}=UG(),{page:i}=e;if(t<=(o?.selectPage||XG.SelectPage))return null;const a=Gt.jsx(lK,{totalPages:r,page:i});return Gt.jsx(oK,{name:"SelectPage",value:i,options:a,handleChange:e=>{n(+e.target.value)}})};var cK=j(e=>Gt.jsxs(GG,{...e,children:[Gt.jsx(iK,{}),Gt.jsx(uK,{}),Gt.jsx(nK,{}),Gt.jsx(JG,{}),Gt.jsx(rK,{}),Gt.jsx(tK,{}),Gt.jsx(QG,{})]}));const dK=e=>Gt.jsx(BG,{...e,children:Gt.jsx(cK,{...e})}),pK=(e,t,r)=>{const n=r.size,o=n>=t.size;if(n){e({keys:[o?"SNTable.SelectionLabel.SelectedValue":"SNTable.SelectionLabel.DeselectedValue",1===n?"SNTable.SelectionLabel.OneSelectedValue":["SNTable.SelectionLabel.SelectedValues",n.toString()]]})}else e({keys:["SNTable.SelectionLabel.ExitedSelectionMode"]})},fK=(e,t,r)=>{r&&t&&(t.classList.contains("selected")?e({keys:["SNTable.SelectionLabel.SelectedValue"]}):e({keys:["SNTable.SelectionLabel.NotSelectedValue"]}))},hK=e=>e.ctrlKey||e.metaKey,mK=e=>e.shiftKey&&hK(e),gK=e=>[Km.Left,Km.Right,Km.Up,Km.Down].includes(e),bK=e=>e.shiftKey&&gK(e.key),vK=e=>(e=>gK(e)||[Km.Home,Km.End,Km.PageUp,Km.PageDown].includes(e))(e.key)&&!mK(e),yK=(e,t)=>{const{api:r,rows:n,colIdx:o}=e,{cell:i,announce:a,evt:s}=t;let l=new Map;if(-1===o)r?.begin(["/qHyperCubeDef"]);else{if(o!==i.selectionColIdx)return e;l=new Map(n)}return l=((e,t,r)=>{const{qElemNumber:n,rowIdx:o}=t;return r.ctrlKey||r.metaKey?(new Map).set(n,o):(e.has(n)?e.delete(n):e.set(n,o),new Map(e))})(l,i,s),pK(a,n,l),l.size?(r?.select({method:"selectHyperCubeCells",params:["/qHyperCubeDef",Array.from(l.values()),[i.selectionColIdx]]}),{...e,rows:l,colIdx:i.selectionColIdx}):(r?.cancel(),{...e,rows:l,colIdx:-1})},xK=(e,t)=>{const{api:r,rows:n,colIdx:o,pageRows:i,firstCell:a}=e,{cell:s,announce:l,evt:u}=t;if(!(a||"key"in u&&bK(u)))return e;-1===o&&r?.begin(["/qHyperCubeDef"]);const c=((e,t,r,n,o)=>{if(!r.isSelectable)return t;const i=new Map(t);if("key"in n&&bK(n)){i.set(r.qElemNumber,r.rowIdx);const t=n.key===Km.Down?1:-1,o=e[r.pageRowIdx+t][r.pageColIdx];return o.isSelectable&&i.set(o.qElemNumber,r.rowIdx+t),i}if(!o)return t;const a=Math.min(o.pageRowIdx,r.pageRowIdx),s=Math.max(o.pageRowIdx,r.pageRowIdx);for(let t=a;t<=s;t++){const r=e[t][o.pageColIdx];r.isSelectable&&i.set(r.qElemNumber,r.rowIdx)}return i})(i,n,s,u,a);return pK(l,n,c),{...e,rows:c,colIdx:a?.selectionColIdx??s.selectionColIdx,isSelectMultiValues:!0}},SK=e=>{const{api:t,rows:r,colIdx:n,isSelectMultiValues:o,mouseupOutsideCallback:i}=e;return i&&document.removeEventListener("mouseup",i),o&&t?.select({method:"selectHyperCubeCells",params:["/qHyperCubeDef",Array.from(r.values()),[n]]}),{...e,isSelectMultiValues:!1,firstCell:void 0,mouseupOutsideCallback:void 0}},wK=(e,t)=>{switch(t.type){case fH.Select:return yK(e,t.payload);case fH.SelectMouseDown:return((e,{cell:t,mouseupOutsideCallback:r})=>!r||-1!==e.colIdx&&e.colIdx!==t.selectionColIdx?e:(document.addEventListener("mouseup",r),{...e,firstCell:t,mouseupOutsideCallback:r}))(e,t.payload);case fH.SelectMouseUp:return((e,t)=>SK(e.isSelectMultiValues||e.firstCell!==t.cell?e:yK(e,t)))(e,t.payload);case fH.SelectMultiAdd:return xK(e,t.payload);case fH.SelectMultiEnd:return SK(e);case fH.Reset:return e.api?.isModal()?e:{...e,rows:new Map,colIdx:-1};case fH.Clear:return e.rows.size?{...e,rows:new Map}:e;case fH.UpdatePageRows:return{...e,pageRows:t.payload.pageRows};default:throw new Error("reducer called with invalid action type")}},CK=zg(e=>{const t=e(Mb);return function(e,t){return zg(e,function(e,r,n){r(this,t(e(this),n))})}({pageRows:e(uU).rows,rows:new Map,colIdx:-1,api:t,isSelectMultiValues:!1},wK)}),EK=zg(e=>e(e(CK)),(e,t,r)=>{t(e(CK),r)}),RK=bM(e=>zg(t=>{const{colIdx:r,rows:n,api:o}=t(EK);return"object"==typeof e&&o?.isModal()?r!==e.selectionColIdx?pH.Disabled:n.has(e.qElemNumber)?pH.Selected:pH.Possible:pH.Inactive}),(e,t)=>"object"!=typeof e||"object"!=typeof t?e===t:e.qElemNumber===t.qElemNumber&&e.selectionColIdx===t.selectionColIdx),AK=zg(e=>{const t=e(zU),r=e(Xb).width,n=e(hV);return t>0&&t+n<r}),IK=()=>{const[e,t]=I(!1);return w_({onDragStart:()=>{t(!0)},onDragEnd:()=>{t(!1)}}),e?Gt.jsx("div",{style:{width:"100%",height:"100%",position:"absolute",top:0,left:0,zIndex:100}}):null},MK=(e,{atTop:t,atBottom:r},n)=>({borderLeftColor:e.grid.border,borderRightColor:e.grid.border,borderTopColor:!n&&r?e.grid.divider:e.grid.border,borderBottomColor:n&&!t||!n&&t?e.grid.divider:e.grid.border}),kK=zg(e=>{const t=e(xb),r=e(Ub);if(void 0!==r)return async(e,n)=>{const{isDim:o,colIdx:i,qReverseSort:a,sortDirection:s,isActivelySorted:l}=e,u=o?i:i-t,c=await r.getEffectiveProperties(),{qInterColumnSortOrder:d}=c.qHyperCubeDef,p=[],f=n!==s||l;if(!o){const e=c.qHyperCubeDef.qMeasures.at(u)?.qSortBy;void 0===e?.qSortByNumeric&&p.push({qPath:`/qHyperCubeDef/qMeasures/${u}/qSortBy`,qOp:"Replace",qValue:JSON.stringify({...e,qSortByNumeric:"A"===s?1:-1})})}if(!l){const e=[i,...d.filter(e=>e!==i)];p.push({qPath:"/qHyperCubeDef/qInterColumnSortOrder",qOp:"Replace",qValue:`[${e.join(",")}]`})}f&&p.push({qPath:`/qHyperCubeDef/${o?"qDimensions":"qMeasures"}/${u}/qDef/qReverseSort`,qOp:"Replace",qValue:(!a).toString()}),r.applyPatches(p,!0)}}),DK=e=>{e&&(e.focus(),(e=>{e?.setAttribute("tabIndex","0")})(e))},PK=({colIdx:e,rowIdx:t,firstColIdx:r,lastColIdx:n})=>(e>r?e--:t>r&&(t--,e=n),[t,e]),TK=({colIdx:e,rowIdx:t,firstColIdx:r,lastColIdx:n,lastRowIdx:o})=>(e<n?e++:t<o&&(t++,e=r),[t,e]),qK=e=>e.atTop?2:1,OK=(e,t)=>({top:e?qK(t):0,bottom:e&&t.atBottom?1:0}),LK=(e,t)=>e.getElementsByClassName("sn-table-row")[t[0]]?.getElementsByClassName("sn-table-cell")[t[1]],NK=e=>e?.setAttribute("tabIndex","0"),jK=e=>e?.setAttribute("tabIndex","-1"),_K=e=>{e.querySelectorAll("td[tabindex='0'], th[tabindex='0']").forEach(jK)},zK=e=>{e?.focus(),NK(e)},FK=e=>{setTimeout(()=>{const t=e.current?.closest(".sn-table-cell")?.querySelector(`.${Ym}`);zK(t)},0)},$K=({evt:e,rootElement:t,cellCoord:r,setFocusedCellCoord:n,allowedRows:o,direction:i})=>{_K(t);const a=((e,t,r,n,o={top:0,bottom:0})=>{const i=o.top>0,a=o.top,s=t.getElementsByClassName("sn-table-row").length-1-o.bottom,l=t.getElementsByClassName("sn-table-head-cell").length-1;let[u,c]=r;switch(e.key){case Km.Down:u<s&&u++;break;case Km.Up:u>a&&u--;break;case Km.Right:if(i)break;[u,c]="rtl"===n?PK({colIdx:c,rowIdx:u,lastColIdx:l,firstColIdx:0}):TK({colIdx:c,rowIdx:u,lastColIdx:l,lastRowIdx:s,firstColIdx:0});break;case Km.Left:if(i)break;[u,c]="rtl"===n?TK({colIdx:c,rowIdx:u,lastColIdx:l,lastRowIdx:s,firstColIdx:0}):PK({colIdx:c,rowIdx:u,lastColIdx:l,firstColIdx:0});break;case Km.Home:(hK(e)||i)&&(u=a),i||(c=0);break;case Km.End:(hK(e)||i)&&(u=s),i||(c=l);break;case Km.PageDown:u=Math.min(s,u+10);break;case Km.PageUp:u=Math.max(a,u-10)}return[u,c]})(e,t,r,i,o),s=LK(t,a);return zK(s),((e,t)=>{const r=t.getElementsByClassName("sn-table-container")[0];if(!r?.scrollTo)return;const[n,o]=e;if(n<2)r.scrollTo({top:0,behavior:"auto"});else{const e=t.getElementsByClassName("sn-table-head-cell")[0],i=t.getElementsByClassName("sn-table-row")[n].getElementsByClassName("sn-table-cell")[o];if(!i||!e)return;if(i.offsetTop-e.offsetHeight<r.scrollTop){const t=r.scrollTop-i.offsetHeight-e.offsetHeight;r.scrollTo({top:Math.max(0,t),behavior:"auto"})}}})(a,t),n(a),{nextCell:s,nextCellCoord:a}},BK=(e,t,r,n)=>{_K(t),r(e),n.enabled&&!n.active?n.focus?.():zK(LK(t,e))},HK=(e,t,r)=>{const n=e.currentTarget;if(!n)return;const o=e.relatedTarget??document.activeElement;if(!!o?.closest(`.${Wm}`))return;const i=!!o&&n.contains(o);!r.enabled||t.current||i||(e=>{const t=e.querySelector(`.${mH.First}`),r=e.querySelector(`.${mH.Second}`);t&&r&&(t.innerHTML="",r.innerHTML="")})(n),((e,t,r)=>{const n=e.currentTarget;if(!r.enabled||t.current||!n)return;const o=e.relatedTarget??document.activeElement;o&&n.contains(o)||r.blur?.(!1)})(e,t,r)},VK=_((e,t)=>Gt.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:Gt.jsx("path",{d:"M8 10a1 1 0 0 1 .5 1.866v.634a.5.5 0 0 1-1 0v-.634A1 1 0 0 1 8 10M3.625 7.035A2 2 0 0 0 2 9v5a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V9a2 2 0 0 0-1.625-1.965V5.383a4.375 4.375 0 0 0-8.75 0zM3 9a1 1 0 0 1 .931-.998h8.138A1 1 0 0 1 13 9v5a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1zm8.375-3.617V7h-6.75V5.383a3.375 3.375 0 0 1 6.75 0"})})),WK=Mu(_h,{shouldForwardProp:e=>"headerStyle"!==e&&"interactions"!==e&&"hoverBackground"!==e&&"background"!==e&&"color"!==e})(({headerStyle:e,interactions:t,hoverBackground:r,background:n,color:o})=>({...JH,...e,cursor:t.active?"pointer":"default",background:n,color:o,verticalAlign:"bottom",boxSizing:"border-box","&&:focus-visible, &&:hover:not(:has(button:hover))":{background:t.active?r:n}})),UK=Mu("span",{shouldForwardProp:e=>"align"!==e&&"dir"!==e})(({align:e,dir:t})=>({minWidth:KH,display:"flex",paddingBottom:"2px",alignSelf:"end",..."right"===e||"rtl"===t&&"center"===e?{paddingRight:"8px"}:{paddingLeft:"8px"}})),GK=parseInt(KH,10)/2,KK=Mu("div")({position:"absolute",bottom:-GK,left:`calc(50% - ${GK}px)`}),YK=Mu(em)({position:"sticky",top:0,zIndex:1}),XK={lineHeight:"calc(4/3)",fontSize:"inherit",textOverflow:"ellipsis",overflow:"hidden"},JK=Mu(yd)({height:"100%","& .sn-table-cell:focus-visible":{outline:"none",boxShadow:"0 0 0 2px #177fe6 inset, 0 0 0 3px #fff inset"},"& .sn-table-cell:focus:not(:focus-visible)":{outline:"none"}}),ZK=Mu("span",{shouldForwardProp:e=>"lineClamp"!==e&&"isHeadCell"!==e&&"isPagination"!==e&&"isNumeric"!==e&&"isDual"!==e})(({lineClamp:e,isHeadCell:t=!1,isPagination:r=!1,isNumeric:n=!1,isDual:o=!1})=>n&&!o||1===e&&!t?{...XK,whiteSpace:"nowrap",display:r?"block":void 0}:{...XK,wordBreak:"break-word",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical",whiteSpace:"pre-line"}),QK=Mu("div")({display:"grid",gridAutoFlow:"column",width:"100%",gridAutoColumns:"1fr auto",gap:"4px"}),eY="cell-text",tY=({children:e,forwardRef:t,isNumeric:r=!1,isPagination:n=!1,isHeadCell:o=!1,isDual:i=!1,lineClamp:a})=>{const s=Jg(AU);return o?Gt.jsx(ZK,{"data-testid":eY,ref:t,className:"sn-table-cell-text",lineClamp:s.grid.headerLineClamp,isPagination:n,isHeadCell:!0,style:{direction:r?"ltr":void 0},children:e}):Gt.jsx(ZK,{"data-testid":eY,ref:t,className:"sn-table-cell-text",isDual:i,isNumeric:r,lineClamp:a??s.grid.contentLineClamp,isPagination:n,style:{direction:r?"ltr":void 0},children:e})},rY=e=>{const{column:t,isInteractionEnabled:r,open:n,setOpen:o,isPagination:i,forwardRef:a}=e,s=Jg(wb),l=Jg(kK),u=Jg(_b),c=Jg(Db),d=Jg(rb),p=Jg(tv),f=Jg(eb),h=Jg(NU)[t.pageColIdx],m=Jg(Wb),g=M(null),b=M(null),v=(({column:e,columnWidth:t})=>{const r=Jg(AU),{measureText:n}=qm({fontSize:r.header.fontSize,fontFamily:r.header.fontFamily,fontWeight:YH});let o=!1,i=!1,a=!1;const s=e.isLocked,l=e.isActivelySorted,u=t-25,c=s?20:0,d=l?20:0;let p=n(e.label);return s&&p+c<=u&&(a=!0,p+=c,l&&p+d<=u&&(i=!0,p+=d)),!s&&l&&p+d<=u&&(i=!0,p+=d),p+24<=u&&(o=!0),{shouldShowMenuIcon:o,shouldShowSortIcon:i,shouldShowLockIcon:a}})({column:t,columnWidth:h}),{StartIcon:y,EndIcon:x,LockIcon:S}=(({sortDirection:e,headTextAlign:t},{shouldShowSortIcon:r,shouldShowLockIcon:n},o)=>{const i="A"===e?Gt.jsx(xG,{height:KH,"data-testid":"head-cell-sort-ascending-icon"}):Gt.jsx(CG,{height:KH,"data-testid":"head-cell-sort-descending-icon"}),a=r?Gt.jsx(UK,{align:t,dir:o,children:i}):void 0,s=n?Gt.jsx(uV,{rightAligned:"right"===t,className:"sn-table-lock-icon",children:Gt.jsx(VK,{height:KH,"data-testid":"head-cell-lock-icon"})}):void 0;return"right"===t?{StartIcon:a,LockIcon:s}:{EndIcon:a,LockIcon:s}})(t,v,u);return Gt.jsxs(lV,{shouldShowMenuIcon:v.shouldShowMenuIcon,shouldShowLockIcon:v.shouldShowLockIcon,alignment:tV(t,i,u),children:[S,Gt.jsxs(sV,{className:"sn-table-head-label",textAlign:t.headTextAlign,direction:u,isPagination:i,children:[y,Gt.jsx(tY,{forwardRef:a,isPagination:i,isHeadCell:!0,children:t.label}),x]}),r?Gt.jsxs(Gt.Fragment,{children:[Gt.jsx(NG,{headerData:{...t,dimensionInfoIndex:t.colIdx},translator:p,anchorRef:g,menuAvailabilityFlags:{[qG.Sorting]:!0,[qG.Searching]:!0,[qG.Selections]:!0,[qG.AdjusterHeaderSize]:!0},open:n,setOpen:o,interactions:c,sortRelatedArgs:{sortFromMenu:(e,r)=>(e.stopPropagation(),l?.(t,r)??Promise.resolve())},searchRelatedArgs:{embed:d,listboxRef:b},selectionRelatedArgs:{app:f,qStateName:s},adjustHeaderSizeRelatedArgs:{focusColumnAdjuster:FK},shouldShowMenuIcon:v.shouldShowMenuIcon,model:m,direction:u,isPagination:i,isAccessibleHeader:!0}),Gt.jsx(aV,{ref:b,direction:u,isPagination:i}),Gt.jsx(aV,{ref:g,direction:u})]}):null]})},nY=_((e,t)=>Gt.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:Gt.jsx("path",{d:"M6 2h10V1H6zm5 5h5V6h-5zm5 5h-5v-1h5zM5 10h1v2.663a3.5 3.5 0 1 0-2.922.036l-.406.914A4.501 4.501 0 1 1 7.329 13H9v1H5z"})})),oY=(e,t)=>e.isCyclic&&t,iY=({column:e})=>{const t=Jg(AU),r=Jg(_b),n=Jg(Wb),o=S.useRef(null),[i,a]=S.useState(!1),s=GU({model:n,headerData:{...e,dimensionInfoIndex:e.colIdx}});return Gt.jsxs(Gt.Fragment,{children:[Gt.jsx(dV,{hoverBackground:e.headerColor?.headerMenuHoverBackground??t.headerMenuHoverBackground,activeBackground:e.headerColor?.headerMenuActiveBackground??t.headerMenuActiveBackground,isActive:i,tabIndex:-1,onClick:e=>{e.stopPropagation(),a(!0)},children:Gt.jsx(nY,{ref:o,height:16,"data-testid":"head-cell-cyclic-icon"})}),Gt.jsx(hG,{open:i,onClose:()=>{a(!1)},menuGroups:[[{items:e.groupDimensionLabels.map((t,r)=>({id:r+1,itemTitle:t,onClick:e=>{e.stopPropagation(),a(!1),s?.(r)},enabled:!0,icon:jF,isActive:e.groupDimensionPos===r}))}]],anchorEl:o.current,direction:r,isPagination:!1})]})},aY=e=>e.isLocked,sY=({column:e})=>{const t=Jg(eb),r=Jg(wb),n=Jg(mb),o=Jg(AU);return Gt.jsx(dV,{tabIndex:-1,hoverBackground:e.headerColor?.headerMenuHoverBackground??o.headerMenuHoverBackground,onClick:o=>{o.stopPropagation(),(async(e,t,r,n={warn:()=>{},error:()=>{}})=>{const o=gG(t??"$",r);let i;try{const t=await(e?.createSessionObject(o));i=t?.id,await(t?.unlock("/qListObjectDef"))}catch(e){n.error({msg:"Failed to unlock field from table header",payload:e})}finally{i&&(await(e?.destroySessionObject(i))||n.error({msg:"Failed to destroy session object when unlocking field from table header"}))}})(t,r,e,n)},children:Gt.jsx(VK,{height:16,"data-testid":"head-cell-lock-icon"})})},lY=({column:e,menuIconRef:t,open:r,setOpen:n})=>{const o=Jg(AU);return Gt.jsx(dV,{tabIndex:-1,hoverBackground:e.headerColor?.headerMenuHoverBackground??o.headerMenuHoverBackground,activeBackground:e.headerColor?.headerMenuActiveBackground??o.headerMenuActiveBackground,isActive:r,order:e.isDim?void 0:-1,onClick:e=>{e.stopPropagation(),n(e=>!e)},ref:t,children:Gt.jsx(UU,{height:16})})},uY=({anchorRef:e,column:t,isPagination:r,listboxRef:n,open:o,setOpen:i})=>{const a=Jg(eb),s=Jg(_b),l=Jg(rb),u=Jg(Db),c=Jg(Wb),d=Jg(wb),p=Jg(tv),f=Jg(kK);return Gt.jsx(NG,{headerData:{...t,dimensionInfoIndex:t.colIdx},translator:p,anchorRef:e,menuAvailabilityFlags:{[qG.Sorting]:!0,[qG.Searching]:!0,[qG.Selections]:!0,[qG.AdjusterHeaderSize]:!0},open:o,setOpen:i,interactions:u,sortRelatedArgs:{sortFromMenu:(e,r)=>(e.stopPropagation(),f?.(t,r)??Promise.resolve())},searchRelatedArgs:{embed:l,listboxRef:n},selectionRelatedArgs:{app:a,qStateName:d},adjustHeaderSizeRelatedArgs:{focusColumnAdjuster:FK},shouldShowMenuIcon:!1,model:c,direction:s,isPagination:r})},cY=zg();cY.onMount=e=>{const t=new Map,r=new ResizeObserver(e=>{for(const r of e){const e=t.get(r.target);e&&e.current(r)}});return e({callbacks:t,observer:r}),()=>{t.clear(),r.disconnect()}};const dY=({ref:e,callback:t})=>{const r=Jg(cY),n=M(t);n.current=t,L(()=>{const t=e.current;return void 0===r?()=>{}:(t&&(r.callbacks.set(t,n),r.observer.observe(t)),()=>{t&&(r.callbacks.delete(t),r.observer.unobserve(t))})},[e,n,r])},pY=Mu(yd)({display:"flex",alignItems:"flex-end",justifyContent:"center",width:"100%",boxSizing:"border-box"}),fY=({children:e})=>{const t=S.useRef(null),[r,n]=I(()=>new Set(e.filter(({props:e})=>void 0!==e.prio&&e.children).map(({key:e})=>e))),o=A(()=>Array.from(e).sort((e,t)=>(e.props.prio??-1/0)-(t.props.prio??-1/0)),[e]),i=q(e=>{const t=new Set,r=e.contentBoxSize.at(0)?.inlineSize??0;let i=0;o.forEach(e=>{if(e.props.ignore||!e.props.children)return;const n=e.props.minWidth+1;void 0===e.props.prio||i+n<=r?i+=n:t.add(e.key)}),n(e=>e.size===t.size&&[...e].every(e=>t.has(e))?e:t)},[o]);return dY({ref:t,callback:i}),Gt.jsx(pY,{ref:t,"data-testid":"responsive-container",children:e.filter(e=>!r.has(e.key))})},hY=({children:e})=>e,mY=(e,t)=>!e.isLocked&&e.isDim&&t,gY=({column:e,open:t,setOpen:r})=>{const n=Jg(AU),o=Jg(wb),i=Jg(_b),a=Jg(rb);Jg(eb);const s=S.useRef(null),l=q(()=>{r(!1)},[r]),u=mG({qLibraryId:e.qLibraryId,fieldId:e.fieldId,searchRelatedArgs:{embed:a,listboxRef:s},selectionRelatedArgs:{qStateName:o},direction:i,onPopoverClose:l});return Gt.jsx(dV,{tabIndex:-1,hoverBackground:e.headerColor?.headerMenuHoverBackground??n.headerMenuHoverBackground,activeBackground:e.headerColor?.headerMenuActiveBackground??n.headerMenuActiveBackground,isActive:t,onClick:e=>{e.stopPropagation(),u(),r(!0)},children:Gt.jsx(IG,{ref:s,height:16,"data-testid":"head-cell-search-icon"})})},bY=({column:e})=>{const{sortDirection:t,isActivelySorted:r}=e,n="A"===t?Gt.jsx(HH,{height:KH,"data-testid":"head-cell-sort-ascending-icon"}):Gt.jsx(FH,{height:KH,"data-testid":"head-cell-sort-descending-icon"});return r?Gt.jsx(KK,{children:n}):void 0},vY=0,yY=1,xY=2,SY=3,wY=e=>{const{column:t,open:r,setOpen:n,isPagination:o,forwardRef:i,columnWidth:a,isInteractionEnabled:s}=e,l=Jg(AU),u=Jg(_b),{measureText:c}=qm(l.header),[d,p]=I(!1),f=M(null),h=M(null),m=M(null),g="number"==typeof a&&a>Xm.PixelsMin+18;return Gt.jsxs(Gt.Fragment,{children:[Gt.jsxs(fY,{children:[Gt.jsx(hY,{prio:xY,minWidth:iV,children:aY(t)?Gt.jsx(sY,{column:t}):null},"Lock"),Gt.jsx(hY,{prio:yY,minWidth:iV,children:oY(t,s)?Gt.jsx(iY,{column:t}):null},"Cyclic"),Gt.jsx(hY,{ignore:!0,children:Gt.jsx(bY,{column:t})},"Sort"),Gt.jsx(hY,{minWidth:c(t.label)+8,children:Gt.jsx(cV,{justifyContent:t.headTextAlign,children:Gt.jsx(tY,{forwardRef:i,isPagination:o,isHeadCell:!0,children:t.label})})},"Text"),Gt.jsx(hY,{prio:g?void 0:vY,minWidth:iV,children:d||mY(t,s)?Gt.jsx(gY,{open:d,setOpen:p,column:t}):null},"Search"),Gt.jsx(hY,{prio:SY,minWidth:iV,children:s?Gt.jsx(lY,{menuIconRef:m,column:t,open:r,setOpen:n}):null},"Menu")]}),s?Gt.jsxs(Gt.Fragment,{children:[Gt.jsx(aV,{ref:h,direction:u,isPagination:o}),Gt.jsx(aV,{ref:f,direction:u}),Gt.jsx(uY,{anchorRef:m.current?m:f,column:t,isPagination:o,listboxRef:h,open:r,setOpen:n})]}):null]})},CY=Mu("div",{shouldForwardProp:e=>"background"!==e&&"applicableStyle"!==e&&"color"!==e})(({background:e,applicableStyle:t,color:r})=>({...t,background:e,color:r})),EY=()=>{},RY=({column:e,isPagination:t})=>{const r=Jg(AU),n=Jg(_b),o=Jg(AK),i=Jg(cU),a=!1,s=Jg(Rb)?rY:wY;return Gt.jsx(CY,{className:"sn-table-cell",applicableStyle:{...r.header,...MK(r,i,!0)},style:{cursor:"pointer",display:"flex",alignItems:"flex-end",borderStyle:"solid",borderRightWidth:nV(n,a,o),borderLeftWidth:oV(n,a,o),borderTopWidth:"0px",borderBottomWidth:"1px",padding:"4px",justifyContent:e.headTextAlign,boxSizing:"border-box",flexDirection:"right"===e.headTextAlign?"row-reverse":"row",userSelect:"none",width:"100%"},background:e.headerColor?.background??r.header.background,color:e.headerColor?.color??r.header.color,children:Gt.jsx(s,{column:e,isInteractionEnabled:!1,isPagination:t,open:!1,setOpen:EY})})},AY=({isPagination:e})=>{const t=Jg(dU),[r,n]=I();w_({onDragStart:e=>{const t=e.operation.source?.id;n(t)},onDragEnd:()=>{}});const o=r?t.find(e=>e.id===r):void 0;return o?Gt.jsx(Qj,{children:Gt.jsx("div",{style:{background:"white",height:"100%",display:"flex",position:"relative"},children:Gt.jsx(RY,{column:o,isPagination:e})})}):null},IY=zg(async e=>{e(bb);const t=e(Ub),r=await(t?.getEffectiveProperties());return r&&structuredClone(r)}),MY=XR(IY,e=>e),kY=zg(e=>e(MY)?.qHyperCubeDef),DY=[aj.configure({activationConstraints:[new rj.Distance({value:5})],preventActivation:e=>{const t=e.target;return t instanceof HTMLElement&&t.classList.contains("nebula-table-utils-column-adjuster")}})],PY=Ij.plugins.filter(e=>e!==ML),TY=(e,t,r)=>{const n=JSON.stringify(t),o=JSON.stringify(r);if(n!==o)return{qPath:e,qOp:"Replace",qValue:o}},qY=(e,t,r,n,o)=>{if(!e||!t||n===o)return;const i=(({qDimensions:e,qMeasures:t,qInterColumnSortOrder:r,visibleColumnIds:n,sourceId:o,targetId:i})=>{const a=u$({qDimensions:e,qMeasures:t}),s=[...e,...t],l=n.findIndex(e=>e===o),u=n.findIndex(e=>e===i);if(l<0||u<0||l===u)return;const c=((e,t,r)=>{const n=[...e],[o]=n.splice(t,1);return n.splice(r,0,o),n})(n,l,u),d=new Map(c.map((e,t)=>[e,t])),p=a.toSorted((e,t)=>{const r=d.get(e.id),n=d.get(t.id);return void 0===r||void 0===n?0:r-n}),f=p.filter(e=>e.isDimension).map(e=>e.def),h=p.filter(e=>!e.isDimension).map(e=>e.def),m=[...f,...h],g=new Map(m.map((e,t)=>[e.qDef.cId,t]));return{qDimensions:f,qMeasures:h,qInterColumnSortOrder:c$({previousColumns:s,nextColumns:m,qInterColumnSortOrder:r}),qColumnOrder:c.map(e=>g.get(e)).filter(e=>void 0!==e)}})({qDimensions:t.qDimensions,qMeasures:t.qMeasures,qInterColumnSortOrder:t.qInterColumnSortOrder,visibleColumnIds:r.map(e=>e.id),sourceId:n,targetId:o});if(!i)return;const a=[TY("/qHyperCubeDef/qDimensions",t.qDimensions,i.qDimensions),TY("/qHyperCubeDef/qMeasures",t.qMeasures,i.qMeasures),TY("/qHyperCubeDef/qInterColumnSortOrder",t.qInterColumnSortOrder,i.qInterColumnSortOrder),TY("/qHyperCubeDef/qColumnOrder",t.qColumnOrder,i.qColumnOrder)].filter(e=>void 0!==e);0!==a.length&&e.applyPatches(a,!0)},OY=({children:e})=>{const t=Jg(Ub),r=Jg(kY),n=Jg(dU);return Gt.jsx(Xj,{onDragOver:e=>{const o=e.operation.source?.id,i=e.operation.target?.id;void 0!==i&&o!==i&&qY(t,r,n,o,i)},sensors:DY,plugins:PY,children:e})};function LY(e,t){const r=M(!1);P(()=>{r.current?e():r.current=!0},t)}const NY=(e,t)=>{const r=Jg(Vb);P(()=>{const n=e.current;if(!n)return;const o=e=>{HK(e,t,r)};return n.addEventListener("focusout",o),()=>{n.removeEventListener("focusout",o)}},[e,t,r])},jY=zg(gH),_Y=bM(e=>zg(t=>{const[r,n]=t(jY);return 0===r&&n===e})),zY=()=>{const e=Jg(tb);P(()=>{e.notifyIsDoneRendering()})};var FY={SNTable_Accessibility_Ascending:{id:"SNTable.Accessibility.Ascending",locale:{"de-DE":"Aufsteigend","en-US":"Ascending","es-ES":"Ascendente","fr-FR":"Croissant","it-IT":"Crescente","ja-JP":"昇順","ko-KR":"오름차순","nl-NL":"Oplopend","pl-PL":"Rosnąco","pt-BR":"Crescente","ru-RU":"По возрастанию","sv-SE":"Stigande","tr-TR":"Artan","zh-CN":"升序","zh-TW":"遞增"}},SNTable_Accessibility_ColumnOptions:{id:"SNTable.Accessibility.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":"欄選項"}},SNTable_Accessibility_Descending:{id:"SNTable.Accessibility.Descending",locale:{"de-DE":"Absteigend","en-US":"Descending","es-ES":"Descendente","fr-FR":"Décroissant","it-IT":"Decrescente","ja-JP":"降順","ko-KR":"내림차순","nl-NL":"Aflopend","pl-PL":"Malejąco","pt-BR":"Decrescente","ru-RU":"По убыванию","sv-SE":"Fallande","tr-TR":"Azalan","zh-CN":"降序","zh-TW":"遞減"}},SNTable_Accessibility_NavigationInstructions:{id:"SNTable.Accessibility.NavigationInstructions",locale:{"de-DE":"Verwenden Sie die Pfeiltasten, um zwischen den Tabellenzellen zu navigieren, und die Tabulatortaste, um zu den Paginierungssteuerelementen zu wechseln. Drücken Sie die Leertaste in den Kopfzellen, um das Spaltenmenü zu öffnen, und drücken Sie die Leertaste in den Körperzellen, um eine Auswahl zu treffen. Duch die Auswahl wird der Seiteninhalt aktualisiert. Die vollständige Liste der Navigationssteuerungen finden Sie in der Dokumentation.","en-US":"Use arrow keys to navigate between table cells and tab to move to pagination controls. Press space on header cells to open the column menu, press space on body cells to make selections. Selections will cause content on the page to be updated. The full list of navigation controls can be found in the documentation.","es-ES":"Utilice las teclas de flecha para desplazarse entre las celdas de la tabla y la pestaña a fin de pasar a los controles de paginación. Pulse la barra espaciadora en las celdas del encabezado para abrir el menú de columnas; pulse la barra espaciadora en las celdas del cuerpo para realizar selecciones. Las selecciones harán que se actualice el contenido de la página. Encontrará la lista completa de controles de navegación en la documentación.","fr-FR":"Utilisez les touches fléchées pour naviguer parmi les cellules du tableau et la tabulation pour accéder aux commandes de pagination. Appuyez sur la touche Espace dans les cellules d'en-tête pour ouvrir le menu de la colonne. Appuyez sur Espace dans les cellules de corps pour effectuer une sélection. Les sélections actualiseront le contenu de la page. Vous pouvez consulter la liste complète des commandes de navigation dans la documentation.","it-IT":"Utilizzare i tasti freccia per navigare tra le celle della tabella e il tasto TAB per passare ai controlli di paginazione. Premere lo spazio nelle celle dell'intestazione per aprire il menu della colonna; premere lo spazio nelle celle del corpo per effettuare selezioni. Le selezioni determineranno l'aggiornamento del contenuto della pagina. È possibile trovare l'elenco completo dei controlli di navigazione nella documentazione.","ja-JP":"矢印キーで表のセル間を移動し、タブ キーでページネーション コントロールに移動します。ヘッダー セルでスペースを押すと列メニューが開き、ボディ セルでスペースを押すと選択ができます。選択によって、ページのコンテンツが更新されます。ナビゲーション コントロールの全リストは、ドキュメントをご覧ください。","ko-KR":"화살표 키를 사용하여 표 셀 사이를 탐색하고, 탭을 사용하여 페이지 번호 컨트롤로 이동하십시오. 헤더 셀에서 스페이스바를 눌러 열 메뉴를 열고, 본문 셀에서 스페이스바를 눌러 선택하십시오. 선택하면 페이지의 콘텐츠가 업데이트됩니다. 전체 탐색 컨트롤 목록은 설명서에서 확인할 수 있습니다.","nl-NL":"Gebruik de pijltjestoetsen om te navigeren tussen tabelcellen en de Tab-toets om naar besturingselementen voor paginering te gaan. Druk op de spatietoets in koptekstcellen om het kolommenu te openen, druk op de spatietoets in hoofdtekstcellen om selecties te maken. Door selecties te maken, wordt de inhoud op de pagina bijgewerkt. De volledige lijst met besturingselementen voor navigatie vindt u in de documentatie.","pl-PL":"Użyj klawiszy strzałek do poruszania się między komórkami tabeli oraz tabulatora do poruszania się po elementach sterujących stronami. Naciśnij klawisz spacji na komórkach nagłówka, aby otworzyć menu kolumny i naciśnij go na komórkach treści, aby dokonać wyborów. Wybory będą powodować aktualizację zawartości na stronie. Pełną listę nawigacyjnych elementów sterujących można znaleźć w dokumentacji.","pt-BR":"Use as teclas de seta para navegar entre as células da tabela e a tecla Tab para mover para os controles de paginação. Pressione espaço nas células do cabeçalho para abrir o menu da coluna, pressione espaço nas células do corpo para fazer seleções. As seleções farão com que o conteúdo da página seja atualizado. A lista completa de controles de navegação pode ser encontrada na documentação.","ru-RU":"Используйте клавиши со стрелками для перемещения между ячейками таблицы и клавишу табуляции для перехода к элементам управления разбивки на страницы. Нажмите пробел на ячейках заголовка, чтобы открыть меню столбца; нажмите пробел на ячейках тела, чтобы сделать выборки. Выборки приведут к обновлению содержимого страницы. Полный перечень элементов управления навигацией см. в документации.","sv-SE":"Använd piltangenterna för att navigera mellan tabellcellerna och tabbtangenten för att flytta till pagineringskontrollerna. Tryck på mellanslag på rubrikceller för att öppna kolumnmenyn och tryck på mellanslag på innehållsceller för att göra urval. Med urval kommer innehåll på sidan att uppdateras. Den fullständiga listan med navigeringsreglage.","tr-TR":"Tablo hücreleri arasında gezinmek için ok tuşlarını, sayfalandırma kontrollerine geçmek için sekmeyi kullanın. Sütun menüsünü açmak için başlık hücrelerinde boşluğa basın, seçim yapmak için gövde hücrelerinde boşluğa basın. Seçimler, sayfadaki içeriğin güncellenmesine neden olur. Navigasyon kontrollerinin tam listesi belgede bulunabilir.","zh-CN":"使用箭头键在表格单元格之间导航,使用 tab 键移动到分页控件。按标题单元格上的空间打开列菜单,按正文单元格上的空间进行选择。选择将导致页面上的内容更新。导航控件的完整列表可以在文档中找到。","zh-TW":"使用方向鍵以在表格儲存格之間導覽,並使用 Tab 以前往分頁控制。按下標頭儲存格的空白處可開啟欄功能表,按下正文儲存格的空白處可進行選取。選項將會造成更新頁面上的內容。導覽控制的完整清單可見於文件中。"}},SNTable_Accessibility_RowsAndColumns:{id:"SNTable.Accessibility.RowsAndColumns",locale:{"de-DE":"Es werden {0} Zeilen und {1} Spalten angezeigt.","en-US":"Showing {0} rows and {1} columns.","es-ES":"Mostrando {0} filas y {1} columnas.","fr-FR":"Affichage de {0} lignes et de {1} colonnes.","it-IT":"Visualizzazione di {0} righe e {1} colonne.","ja-JP":"{0} 行 {1} 列を表示しています。","ko-KR":"{0}개의 행과 {1}개의 열을 표시합니다.","nl-NL":"{0} rijen en {1} kolommen worden getoond.","pl-PL":"Wyświetlane wiersze: {0} i kolumny: {1}.","pt-BR":"Mostrando {0} linhas e {1} colunas.","ru-RU":"Показаны строки ({0}) и столбцы ({1}).","sv-SE":"Visar {0} rader och {1} kolumner.","tr-TR":"{0} satır ve {1} sütun gösteriliyor.","zh-CN":"正在显示 {0} 行,{1} 列。","zh-TW":"顯示 {0} 列和 {1} 欄。"}},SNTable_MenuItem_AdjustColumnSize:{id:"SNTable.MenuItem.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":"調整欄大小"}},SNTable_MenuItem_ClearSelections:{id:"SNTable.MenuItem.ClearSelections",locale:{"de-DE":"Auswahl 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":"Selecties 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":"清除選項"}},SNTable_MenuItem_Search:{id:"SNTable.MenuItem.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":"搜尋"}},SNTable_MenuItem_SelectAll:{id:"SNTable.MenuItem.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":"全選"}},SNTable_MenuItem_SelectAlternative:{id:"SNTable.MenuItem.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":"選取替代選項"}},SNTable_MenuItem_SelectExcluded:{id:"SNTable.MenuItem.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":"選取排除值"}},SNTable_MenuItem_SelectPossible:{id:"SNTable.MenuItem.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":"選取可能值"}},SNTable_MenuItem_Selections:{id:"SNTable.MenuItem.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":"選項"}},SNTable_MenuItem_SortAscending:{id:"SNTable.MenuItem.SortAscending",locale:{"de-DE":"Sortierung in aufsteigender Reihenfolge","en-US":"Sort ascending","es-ES":"Orden ascendente","fr-FR":"Tri 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":"以遞增方式排序"}},SNTable_MenuItem_SortDescending:{id:"SNTable.MenuItem.SortDescending",locale:{"de-DE":"Sortierung in absteigender Reihenfolge","en-US":"Sort descending","es-ES":"Orden descendente","fr-FR":"Tri 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":"以遞減方式排序"}},SNTable_Pagination_DisplayedRowsLabel:{id:"SNTable.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":"{1}의 {0}","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}"}},SNTable_Pagination_FirstPage:{id:"SNTable.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":"移至第一頁"}},SNTable_Pagination_LastPage:{id:"SNTable.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":"移至最後一頁"}},SNTable_Pagination_NextPage:{id:"SNTable.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":"移至下一頁"}},SNTable_Pagination_PageStatusReport:{id:"SNTable.Pagination.PageStatusReport",locale:{"de-DE":"Die Seite wurde geändert. Seite {0} von {1} wird angezeigt.","en-US":"Page has changed. Showing page {0} of {1}.","es-ES":"La página ha cambiado. Mostrando página {0} de {1}.","fr-FR":"La page a changé. Affichage de la page {0} sur {1}.","it-IT":"La pagina è cambiata. Visualizzazione pagina {0} di {1}.","ja-JP":"ページが変更されました。{1} ページ中の {0} ページ目を表示しています。","ko-KR":"페이지가 변경되었습니다. {1}의 {0} 페이지를 보여 줍니다.","nl-NL":"Pagina is gewijzigd. Pagina {0} van {1} wordt weergeven.","pl-PL":"Strona się zmieniła Wyświetlanie strony {0} z {1}.","pt-BR":"A página mudou. Mostrando página {0} de {1}.","ru-RU":"Страница изменилась. Показана страница {0} из {1}.","sv-SE":"Sidan har ändrats. Visar sida {0} av {1}.","tr-TR":"Sayfa değişti. Sayfa {0} / {1} gösteriliyor.","zh-CN":"页面已更改。显示页面 {0} / {1}。","zh-TW":"頁面已變更。顯示第 {0} 頁,共 {1} 頁。"}},SNTable_Pagination_PreviousPage:{id:"SNTable.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":"移至上一頁"}},SNTable_Pagination_RowsPerPage:{id:"SNTable.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":"每頁列數"}},SNTable_Pagination_RowsPerPageChange:{id:"SNTable.Pagination.RowsPerPageChange",locale:{"de-DE":"Zeilen pro Seite wurden in {0} geändert. Jetzt wird die erste Seite angezeigt.","en-US":"Rows per page has changed to {0}. Now showing the first page.","es-ES":"El número de filas por página ha cambiado a {0}. Mostrando ahora la primera página.","fr-FR":"Le nombre de lignes par page a été remplacé par {0}. Affichage en cours de la première page.","it-IT":"Le righe per pagina sono cambiate a {0}. Viene ora mostrata la prima pagina.","ja-JP":"ページあたりの行数が {0} に変更されました。現在、最初のページを表示しています。","ko-KR":"페이지당 행 수가 {0}(으)로 변경되었습니다. 이제 첫 페이지를 보여 줍니다.","nl-NL":"Aantal rijen per pagina is gewijzigd naar {0}. De eerste pagina wordt nu weergegeven.","pl-PL":"Liczba wierszy na stronę została zmieniona na {0}. Wyświetlana jest pierwsza strona.","pt-BR":"Linhas por página mudou para {0}. Agora mostrando a primeira página.","ru-RU":"Количество строк на странице изменилось на {0}. Теперь отображается первая страница.","sv-SE":"Rader per sida har ändrats till {0}. Nu visas första sidan.","tr-TR":"Sayfa başına satır sayısı {0} olarak değiştirildi. Şimdi ilk sayfa gösteriliyor.","zh-CN":"每页行数已更改为 {0}。现在显示第一页。","zh-TW":"每頁列數已變更為 {0}。現在顯示第一頁。"}},SNTable_Pagination_SelectPage:{id:"SNTable.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":"選取頁面"}},SNTable_SelectionLabel_DeselectedValue:{id:"SNTable.SelectionLabel.DeselectedValue",locale:{"de-DE":"Die Werteauswahl ist aufgehoben.","en-US":"Value is deselected.","es-ES":"El valor no está seleccionado.","fr-FR":"La valeur est désélectionnée.","it-IT":"Il valore è deselezionato.","ja-JP":"値が選択解除されました。","ko-KR":"값이 선택 취소되었습니다.","nl-NL":"Selectie van waarde opgeheven.","pl-PL":"Wartość nie jest zaznaczona.","pt-BR":"O valor está desmarcado.","ru-RU":"Выбор значения отменен.","sv-SE":"Val av värde har tagits bort.","tr-TR":"Değer seçimi iptal edildi.","zh-CN":"值已取消选择。","zh-TW":"值已取消選取。"}},SNTable_SelectionLabel_ExitedSelectionMode:{id:"SNTable.SelectionLabel.ExitedSelectionMode",locale:{"de-DE":"Die Werteauswahl ist aufgehoben. Auswahlmodus beendet.","en-US":"Value is deselected. Exited selection mode.","es-ES":"El valor no está seleccionado. Salió del modo de selección.","fr-FR":"La valeur est désélectionnée. Mode de sélection désactivé.","it-IT":"Il valore è deselezionato. Uscita dalla modalità selezione.","ja-JP":"値が選択解除されました。選択モードを終了しました。","ko-KR":"값이 선택 취소되었습니다. 선택 모드를 종료했습니다.","nl-NL":"Selectie van waarde opgeheven. Selectiemodus afgesloten.","pl-PL":"Wartość nie jest zaznaczona. Zakończono tryb wyboru.","pt-BR":"O valor está desmarcado. Modo de seleção encerrado.","ru-RU":"Выбор значения отменен. Выполнен выход из режима выборки.","sv-SE":"Val av värde har tagits bort. Lämnade urvalsläge.","tr-TR":"Değer seçimi iptal edildi. Seçim modundan çıkıldı.","zh-CN":"值已取消选择。已退出选择模式。","zh-TW":"值已取消選取。輸入的選取模式。"}},SNTable_SelectionLabel_NotSelectedValue:{id:"SNTable.SelectionLabel.NotSelectedValue",locale:{"de-DE":"Wert ist nicht ausgewählt.","en-US":"Value is not selected.","es-ES":"El valor no está seleccionado.","fr-FR":"La valeur n'est pas sélectionnée.","it-IT":"Il valore non è selezionato.","ja-JP":"値が選択されていません。","ko-KR":"값이 선택되지 않았습니다.","nl-NL":"Waarde is niet geselecteerd.","pl-PL":"Wartość nie jest wybrana.","pt-BR":"O valor não está selecionado.","ru-RU":"Значение не выбрано.","sv-SE":"Värdet är inte valt.","tr-TR":"Değer seçilmedi.","zh-CN":"未选择值。","zh-TW":"未選取值。"}},SNTable_SelectionLabel_OneSelectedValue:{id:"SNTable.SelectionLabel.OneSelectedValue",locale:{"de-DE":"Aktuell ist ein Wert ausgewählt.","en-US":"Currently there is one selected value.","es-ES":"Actualmente hay un valor seleccionado.","fr-FR":"Actuellement, une valeur est sélectionnée.","it-IT":"Attualmente è presente un solo valore selezionato.","ja-JP":"現在、値が 1 つ選択されています。","ko-KR":"현재 하나의 값이 선택되었습니다.","nl-NL":"Er is momenteel één waarde geselecteerd.","pl-PL":"Aktualnie jest jedna wybrana wartość.","pt-BR":"Atualmente, há um valor selecionado.","ru-RU":"В настоящее время выбрано одно значение.","sv-SE":"Just nu är ett värde valt.","tr-TR":"Şu anda seçili bir değer var.","zh-CN":"当前有一个已选择的值。","zh-TW":"目前有一個選取的值。"}},SNTable_SelectionLabel_SelectedValue:{id:"SNTable.SelectionLabel.SelectedValue",locale:{"de-DE":"Wert ist ausgewählt.","en-US":"Value is selected.","es-ES":"El valor está seleccionado.","fr-FR":"La valeur est sélectionnée.","it-IT":"Il valore è selezionato.","ja-JP":"値が選択されました。","ko-KR":"값이 선택되었습니다.","nl-NL":"Waarde is geselecteerd.","pl-PL":"Wartość jest wybrana.","pt-BR":"O valor está selecionado.","ru-RU":"Значение выбрано.","sv-SE":"Värdet är valt.","tr-TR":"Değer seçildi.","zh-CN":"已选择值。","zh-TW":"已選取值。"}},SNTable_SelectionLabel_SelectedValues:{id:"SNTable.SelectionLabel.SelectedValues",locale:{"de-DE":"Aktuell sind {0} Werte ausgewählt.","en-US":"Currently there are {0} selected values.","es-ES":"Actualmente hay {0} valores seleccionados.","fr-FR":"Actuellement, {0} valeurs sont sélectionnées.","it-IT":"Attualmente sono presenti {0} valori selezionati.","ja-JP":"現在、値が {0} つ選択されています。","ko-KR":"현재 {0}개의 값이 선택되었습니다.","nl-NL":"Er zijn momenteel {0} geselecteerde waarden.","pl-PL":"Liczba aktualnie wybranych wartości: {0}.","pt-BR":"Atualmente, há {0} valores selecionados.","ru-RU":"В настоящее время выбраны значения: {0}.","sv-SE":"Just nu är {0} värden valda.","tr-TR":"Şu anda seçili {0} değer var.","zh-CN":"当前有 {0} 个已选择的值。","zh-TW":"目前有 {0} 個選取的值。"}},SNTable_SelectionLabel_SelectionsConfirmed:{id:"SNTable.SelectionLabel.SelectionsConfirmed",locale:{"de-DE":"Auswahl bestätigt.","en-US":"Selections confirmed.","es-ES":"Confirmadas las selecciones.","fr-FR":"Sélections confirmées.","it-IT":"Selezioni confermate.","ja-JP":"選択が確定されました。","ko-KR":"선택 내용이 확인되었습니다.","nl-NL":"Selecties bevestigd.","pl-PL":"Potwierdzono wybory.","pt-BR":"Seleções confirmadas.","ru-RU":"Выборки подтверждены.","sv-SE":"Valen har bekräftats.","tr-TR":"Seçimler onaylandı.","zh-CN":"选择已确认。","zh-TW":"選項已確認。"}},SNTable_SelectionLabel_selected:{id:"SNTable.SelectionLabel.selected",locale:{"de-DE":"Ausgewählt","en-US":"Selected","es-ES":"Seleccionado","fr-FR":"Sélectionné","it-IT":"Selezionato","ja-JP":"選択済み","ko-KR":"선택됨","nl-NL":"Geselecteerd","pl-PL":"Wybrane","pt-BR":"Selecionado","ru-RU":"Выбрано","sv-SE":"Urval","tr-TR":"Seçildi","zh-CN":"已选择","zh-TW":"已選取"}},SNTable_SortLabel_PressSpaceToSort:{id:"SNTable.SortLabel.PressSpaceToSort",locale:{"de-DE":"Drücken Sie die Leertaste, um nach dieser Spalte zu sortieren","en-US":"Press space to sort on this column","es-ES":"Pulse la barra espaciadora para ordenar en esta columna.","fr-FR":"Appuyez sur Espace pour trier en fonction de cette colonne.","it-IT":"Premere la barra spaziatrice per ordinare questa colonna","ja-JP":"スペース キーを押して、この列をソートします","ko-KR":"이 열을 정렬하려면 스페이스바를 누르십시오.","nl-NL":"Druk op de spatiebalk om sorteren in deze kolom in te schakelen","pl-PL":"Naciśnij spację, aby posortować według tej kolumny","pt-BR":"Pressione espaço para classificar por esta coluna","ru-RU":"Нажмите пробел, чтобы отсортировать по этому столбцу","sv-SE":"Tryck på Blanksteg om du vill sortera efter den här kolumnen","tr-TR":"Bu sütunda sıralama yapmak için boşluk tuşuna basın.","zh-CN":"按下空格键以在该列上排序。","zh-TW":"在此欄按下空格鍵以進行排序"}},SNTable_SortLabel_SortedAscending:{id:"SNTable.SortLabel.SortedAscending",locale:{"de-DE":"In aufsteigender Reihenfolge sortiert.","en-US":"Sorted in ascending order.","es-ES":"Ordenado por orden ascendente.","fr-FR":"Tri dans l'ordre croissant.","it-IT":"Ordinato in ordine crescente.","ja-JP":"昇順で並べ替えられます。","ko-KR":"오름차순으로 정렬되었습니다.","nl-NL":"Gesorteerd in oplopende volgorde.","pl-PL":"Posortowane rosnąco.","pt-BR":"Classificado em ordem crescente.","ru-RU":"Сортировка в порядке возрастания.","sv-SE":"Sorterat i stigande ordning.","tr-TR":"Artan düzende sıralanmıştır.","zh-CN":"已按升序排列。","zh-TW":"已依遞增順序排序。"}},SNTable_SortLabel_SortedDescending:{id:"SNTable.SortLabel.SortedDescending",locale:{"de-DE":"In absteigender Reihenfolge sortiert.","en-US":"Sorted in descending order.","es-ES":"Ordenado por orden descendente.","fr-FR":"Tri dans l'ordre décroissant.","it-IT":"Ordinato in ordine decrescente.","ja-JP":"降順で並べ替えられます。","ko-KR":"내림차순으로 정렬되었습니다.","nl-NL":"Gesorteerd in aflopende volgorde.","pl-PL":"Posortowane malejąco.","pt-BR":"Classificado em ordem decrescente.","ru-RU":"Сортировка в порядке убывания.","sv-SE":"Sorterat i fallande ordning.","tr-TR":"Azalan düzende sıralanmıştır.","zh-CN":"已按降序排列。","zh-TW":"已依遞減順序排序。"}}};const $Y=zg(e=>{const t=e(tv),r=e(Jb),n=e(mb);let o;return function(e){const t="SNTable.Accessibility.RowsAndColumns";e.get(t)===t&&Object.keys(FY).forEach(t=>{e.add(FY[t])})}(t),({keys:e,politeness:i="polite"})=>{const a=e.map(e=>{if(Array.isArray(e)){const[r,...n]=e;return t.get(r,n)}return t.get(e)}).join(" "),s=r.querySelector(`.${mH.First}`),l=r.querySelector(`.${mH.Second}`);if(!s||!l)return void n.error({msg:"could not find aria-live elements, which means accessibility is not working properly"});let u;o===mH.First?(u=l,o=mH.Second):(u=s,o=mH.First),u.innerHTML=u.innerHTML.endsWith(" ")?a:`${a} `,u.setAttribute("aria-live",i)}}),BY=(e,t)=>{const r=Jg($Y),n=Jg(Jb),o=Jg(mU),i=Jg(hU),a=Jg(fU),s=Jg(cU),[l,u]=Qg(jY),c=Jg(Ib),d=Jg(Vb);LY(()=>{const t=((e,t,r=!1)=>{const n=[qK(t),e[1]];return r?n:gH})(l,s,c);(({resetCellCoord:e,rootElement:t,shouldRefocus:r,isSelectionMode:n,setFocusedCellCoord:o,keyboard:i,announce:a})=>{if(_K(t),o(e),!(e=>!e.enabled||e.active)(i))return;const s=LK(t,e);r.current?(zK(s),r.current=!1):NK(s),n&&(a({keys:[s?.textContent??""]}),fK(a,s,n))})({resetCellCoord:t,rootElement:n,shouldRefocus:e,setFocusedCellCoord:u,isSelectionMode:c,keyboard:d,announce:r})},[a.length,i,o,t])},HY=e=>{wm(e),hK(e)&&ng(e.currentTarget)},VY=e=>{vK(e.evt)&&(wm(e.evt),$K(e))},WY=e=>{const{evt:t,totalsPosition:r,cell:n,isSelectionMode:o}=e;if(!vK(t))return;wm(t);const i=((e,t)=>[e.pageRowIdx+qK(t),e.pageColIdx])(n,r),a=OK(o,r),{nextCell:s,nextCellCoord:l}=$K({...e,cellCoord:i,allowedRows:a});l[0]!==i[0]&&(({evt:e,isSelectionsEnabled:t,cell:r,selectionDispatch:n,announce:o,isSelectionMode:i,nextCell:a})=>{e.shiftKey&&t&&r.isSelectable?n({type:fH.SelectMultiAdd,payload:{cell:r,evt:e,announce:o}}):fK(o,a,i)})({...e,nextCell:s})},UY=e=>{const{evt:t}=e;mK(t)?(({evt:e,totalRowCount:t,rowsPerPage:r,page:n,updateShouldRefocus:o,handleChangePage:i})=>{wm(e);const a=Math.ceil(t/r)-1;e.key===Km.Right&&n<a?(o(),i(n+1)):e.key===Km.Left&&n>0&&(o(),i(n-1))})(e):t.key===Km.Esc?(({evt:e,keyboard:t,isSelectionMode:r})=>{t.enabled&&!r&&(wm(e),t.blur?.(!0))})(e):gK(t.key)&&wm(t)},GY=e=>{const{evt:t,selectionsAPI:r}=e;if(t.currentTarget.classList.contains(pH.Disabled))return void wm(t);const n={...e,isSelectionMode:!!r?.isModal()};switch(t.key){case Km.Space:(({evt:e,cell:t,isSelectionsEnabled:r,selectionDispatch:n,announce:o})=>{wm(e),t.isSelectable&&r&&n({type:fH.Select,payload:{cell:t,evt:e,announce:o}})})(n);break;case Km.Enter:(({isSelectionMode:e,selectionsAPI:t,evt:r,announce:n})=>{wm(r),e&&(t?.confirm(),n({keys:["SNTable.SelectionLabel.SelectionsConfirmed"]}))})(n);break;case Km.Esc:(({isSelectionMode:e,selectionsAPI:t,evt:r,announce:n})=>{e&&(wm(r),t?.cancel(),n({keys:["SNTable.SelectionLabel.ExitedSelectionMode"]}))})(n);break;case Km.C:HY(t);break;case Km.Tab:(({evt:e,keyboard:t,isSelectionMode:r,paginationNeeded:n})=>{const o=e.shiftKey||!n;t.enabled&&r&&o&&(wm(e),Sm(e.currentTarget,t,e.shiftKey))})(n);break;default:WY(n)}},KY=e=>{const t=Jg(pV),r=Zg(fV),n=Zg(hV),o=Jg(dH),i=M();dY({ref:e,callback:a=>{const s=()=>{if(e.current){const e=a.borderBoxSize.at(0)?.inlineSize??0,t=a.borderBoxSize.at(0)?.blockSize??0,o=a.contentBoxSize.at(0)?.inlineSize??0,i=t-(a.contentBoxSize.at(0)?.blockSize??0);n(e-o),r(i)}};t?(i.current&&o.off("done-adjusting-column-width",i.current),o.once("done-adjusting-column-width",s),i.current=s):s()}}),P(()=>{const e=o;return()=>{i.current&&e.off("done-adjusting-column-width",i.current)}},[o])},YY=Mu("div")({clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",overflow:"hidden",position:"absolute",whiteSpace:"nowrap",width:"1px"}),XY=Mu(Bh,{shouldForwardProp:e=>"fullHeight"!==e&&"interactions"!==e})(({fullHeight:e,interactions:t})=>({height:e?"100%":"calc(100% - 41px)",overflow:t.scroll?"auto":"hidden",border:"none"})),JY=Mu(Ah,{shouldForwardProp:e=>"borderRight"!==e})(({borderRight:e})=>({tableLayout:"fixed",width:"min-content",borderRight:e})),ZY=()=>Gt.jsxs(Gt.Fragment,{children:[Gt.jsx(YY,{className:mH.First,"data-testid":mH.First,"aria-live":"polite","aria-atomic":"true"}),Gt.jsx(YY,{className:mH.Second,"data-testid":mH.Second,"aria-live":"polite","aria-atomic":"true"})]}),QY=e=>{const t=M(new Map),r=M(null);P(()=>{r.current=e(t.current),t.current.forEach((e,t)=>{r.current?.observe(t)});const n=t.current,o=r.current;return()=>{o.disconnect(),n.clear()}},[e,r,t]);const n=q((e,n)=>{t.current.set(e,n),r.current?.observe(e)},[t,r]),o=q(e=>{t.current.delete(e),r.current?.unobserve(e)},[r,t]);return A(()=>({addTask:n,removeTask:o}),[n,o])},eX=e=>new ResizeObserver(t=>{t.forEach(t=>{const r=e.get(t.target);r?.(t)})}),tX=()=>QY(eX),rX=({updateShouldRefocus:e,tableWrapperRef:t})=>{const r=Jg(Mb),n=Jg(Vb),o=Zg(EK);P(()=>{const i=()=>{o({type:fH.Reset})},a=()=>{o({type:fH.Clear})},s=()=>{t.current?.contains(document.activeElement)?e():n.enabled&&n.blur?.(!0),i()};return r?.on("deactivated",i),r?.on("canceled",i),r?.on("confirmed",s),r?.on("cleared",a),()=>{r?.removeListener("deactivated",i),r?.removeListener("canceled",i),r?.removeListener("confirmed",s),r?.removeListener("cleared",a)}},[r,n,o,e,t])},nX="min(50px, 20%)",oX=({bar:e,height:t})=>{const{value:r,offsetValue:n,columnMin:o,columnMax:i,isManualRange:a,thicknessPx:s,barEnd:l}=e,u=a?o:Math.min(o,0);let c=a?i:Math.max(i,0);c>u||(c=u+1);const d=n,p=n+r,f=r>=0,h=Math.min(d,p),m=Math.max(d,p),g=Math.round(((e,t,r)=>Math.max(t,Math.min(r,e)))(s??("none"===l?1*t:4),2,Math.max(2,t-2))),b=Math.min(((e,t)=>"circle"===e?2*t:"box"===e?t+4:0)(l,g),t),v=Math.min(d,p)<u,y=Math.max(d,p)>c,x="none"===l?25:10+("none"===l?0:b/2+2);return{rangeMin:u,rangeMax:c,hasRoomAtMin:e.hasNegativeValues??(a||u<0||!f),hasRoomAtMax:e.hasPositiveValues??(a||i>=0||f),low:h,high:m,valueEnd:f?m:h,growsTowardsHigh:f,overflowMin:v,overflowMax:y,hasBar:m>h&&m>u&&h<c,thicknessPx:g,capSize:b,hasZeroAxis:u<=0&&c>=0,oobSizePx:x}},iX=Mu("div")({position:"relative",width:"100%",overflow:"hidden"}),aX=Mu("div")({position:"absolute"}),sX=Mu("span")({position:"absolute",top:0,height:"100%",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),lX=Mu("svg")({position:"absolute",display:"block"}),uX=({shape:e,pointsRight:t,width:r,height:n})=>{if("slice"===e)return`M0 0L${r-8} ${n}L0 ${n}ZM8 0L${r} ${n}L${r} 0Z`;const o=r/2,i=o*Math.sin(Math.PI/3),a=t?o/2:1.5*o;return`M${a} ${o-i}L${t?r:0} ${o}L${a} ${o+i}Z`},cX=({height:e,theme:t,bar:r,direction:n,fontFamily:o,fontSize:i})=>{const a=(({bar:e,height:t,isRtl:r})=>{const n=oX({bar:e,height:t}),{rangeMin:o,rangeMax:i,low:a,high:s,overflowMin:l,overflowMax:u,thicknessPx:c,capSize:d,oobSizePx:p}=n,f=n.hasRoomAtMin?nX:"0px",h=n.hasRoomAtMax?nX:"0px",m=f,g=`calc(100% - ${h})`,b=e=>{const t=(Math.min(Math.max(e,o),i)-o)/(i-o);return`calc(${f} + ${t} * (100% - ${f} - ${h}))`},v="none"===e.barEnd,y=v?25:10,x=u?`max(${g} - ${p}px, ${l?m:b(a)})`:b(s),S=l?`min(${m} + ${p}px, ${u?g:b(s)})`:b(a),w=n.growsTowardsHigh?x:S,C=e=>Math.floor((t-e)/2),E=C(c),R=d>0?d/2+4:4,A=e=>{const t=v?c:10;return{key:e,shape:v?"slice":"triangle",pointsRight:"max"===e!==r,width:y,height:t,style:{..."min"===e?{insetInlineStart:f}:{insetInlineEnd:h},top:C(t),width:y,height:t}}};return{zeroAxis:n.hasZeroAxis?{insetInlineStart:`calc(${b(0)} - 0.5px)`,top:0,width:1,height:"100%"}:void 0,bar:n.hasBar?{insetInlineStart:S,width:`max(1px, ${x} - ${S})`,top:E,height:c}:void 0,cap:n.hasBar&&d>0?{insetInlineStart:`calc(${w} - ${d/2}px)`,top:C(d),width:d,height:d,borderRadius:"circle"===e.barEnd?"50%":void 0}:void 0,label:e.label?n.growsTowardsHigh?{insetInlineStart:u?`calc(${g} + 4px)`:l?`max(${x} + ${R}px, ${m} + ${y+4}px)`:`calc(${x} + ${R}px)`,insetInlineEnd:"4px",textAlign:"start"}:{insetInlineStart:"4px",insetInlineEnd:`calc(100% - ${l?`calc(${m} - 4px)`:u?`min(${S} - ${R}px, ${g} - ${y+4}px)`:`calc(${S} - ${R}px)`})`,textAlign:"end"}:void 0,markers:[l?A("min"):void 0,u?A("max"):void 0].filter(e=>void 0!==e)}})({bar:r,height:e,isRtl:"rtl"===n}),s=r.color??ym(t,r.colorPalette,t.getDataColorSpecials().primary),l=r.labelColor??ym(t,r.labelColorPalette,"inherit");return Gt.jsxs(iX,{"data-testid":"bar-container",role:"img","aria-label":r.label||r.fallbackLabel,dir:n,style:{height:e},children:[a.zeroAxis?Gt.jsx(aX,{"data-testid":"bar-zero-axis",style:{...a.zeroAxis,backgroundColor:"#d0d0d0"}}):null,a.bar?Gt.jsx(aX,{"data-testid":"bar",style:{...a.bar,backgroundColor:s}}):null,a.cap?Gt.jsx(aX,{"data-testid":"bar-end-cap",style:{...a.cap,backgroundColor:s}}):null,a.label?Gt.jsx(sX,{"data-testid":"bar-label",style:{...a.label,fontFamily:o,fontSize:i??"14px",lineHeight:`${e}px`,color:l},children:r.label}):null,a.markers.map(e=>Gt.jsx(lX,{"data-testid":`bar-oob-${e.key}`,width:e.width,height:e.height,viewBox:`0 0 ${e.width} ${e.height}`,style:e.style,children:Gt.jsx("path",{d:uX(e),fill:s})},e.key))]})},dX=e=>{e.stopPropagation()},pX=({href:e,text:t,interactions:r,color:n})=>({href:e,title:t,rel:"noreferrer",target:"_blank",underline:"hover",onClick:dX,color:mm.LINK,style:{pointerEvents:r.active?"auto":"none",color:n??void 0,opacity:r.active&&r.passive||n?void 0:.4}}),fX=({href:e,text:t,interactions:r,color:n})=>Gt.jsx(zp,{...pX({href:e,text:t,interactions:r,color:n}),children:t}),hX=window.requestIdleCallback??(e=>setTimeout(()=>{e({})},0)),mX=window.cancelIdleCallback??(e=>{clearTimeout(e)});let gX=0,bX=0,vX=0;const yX="qDimensionInfo/0",xX="qMeasureInfo/0",SX="x",wX="y",CX=e=>({key:"bars",type:"box",data:{extract:{field:yX,props:{start:0,end:{field:xX}}}},settings:{major:{scale:SX},minor:{scale:wX},box:{maxWidthPx:8,fill:{fn:e}}}}),EX=e=>({key:"p",type:"point",data:{extract:{field:yX,props:{y:{field:xX}}}},settings:{x:{scale:SX},y:{scale:wX},shape:"circle",size:1,opacity:1,sizeLimits:{minPx:4,maxPx:4},fill:{fn:e}},preferredSize:{edgeBleed:{left:2,right:2,top:2,bottom:2}}}),RX=({qNum:e})=>void 0===e?0:Math.sign(e),AX=(e,t)=>{const{primary:r,nil:n,others:o}=e.getDataColorSpecials(),i=ym(e,t?.negative,r),a=ym(e,t?.positive,r);return{key:"pos-neg",type:"box",data:{extract:{field:yX,props:{start:0,end:{field:xX,value:RX}}}},settings:{major:{scale:SX},minor:{scale:wX},box:{maxWidthPx:8,fill:{fn:e=>-2===e.datum.value?n:-3===e.datum.value?o:0===e.datum.end.value?"#DDDDDD":Math.sign(e.datum.end.value)<0?i:a}}}}},IX=(e,{type:t,showDots:r,colors:n,colorMin:o,colorMax:i})=>{const a=((e,t,r,n)=>{const{primary:o,nil:i,others:a}=e.getDataColorSpecials(),s=ym(e,t?.main,o),l=ym(e,t?.max,s),u=ym(e,t?.min,s),c=ym(e,t?.first,s),d=ym(e,t?.last,s);return e=>{const t=wX in e.datum?wX:"end";return-2===e.datum.value?i:-3===e.datum.value?a:e.datum[t].value>=n?l:e.datum[t].value<=r?u:e.data.items.at(0)===e.datum?c:e.data.items.at(-1)===e.datum?d:s}})(e,n,o,i);switch(t){case"bars":return[CX(a)];case"dots":return[EX(a)];case"sparkline":{const t=(e=>({key:"lines",type:"line",data:{extract:{field:yX,props:{v:{field:xX}}}},settings:{coordinates:{major:{scale:SX},minor:{scale:wX,ref:"v"}},layers:{line:{strokeWidth:1,stroke:e}}}}))(ym(e,n?.main,e.getDataColorSpecials().primary));return r?[t,EX(a)]:[t]}case"posNeg":return[AX(e,n)];default:return[]}},MX=e=>({qDimensionInfo:[{qFallbackTitle:"",qCardinal:1}],qMeasureInfo:[{qFallbackTitle:""}],qDataPages:[{qArea:{qTop:0,qLeft:0,qHeight:e.length,qWidth:2},qMatrix:e}],qEffectiveInterColumnSortOrder:[0,1],qSize:{qcx:2,qcy:e.length},qMode:"S"}),kX=(e,t,r,n)=>({y:{data:{field:xX},invert:!0,min:"posNeg"===e?-1:t,max:"posNeg"===e?1:r},x:{data:{extract:{field:yX}},paddingInner:.3,paddingOuter:0,invert:"rtl"===n,align:"rtl"===n?1:0,maxPxStep:12}}),DX=U();DX.use(W),DX.renderer.prio(["canvas"]);const PX={resolve:()=>{},promise:{}},TX=({chart:e,element:t,theme:r,isSnapshot:n,direction:o,miniChartData:i,downloadService:a})=>{const{resolveChartPromise:s,addChartPromiseToQueue:l}=(e=>{const t=M(e.isDownloadedAsPDForImage?Rt():PX);return{addChartPromiseToQueue:q(()=>{e.waitForPromise(t.current.promise)},[e]),resolveChartPromise:t.current.resolve}})(a),u=M(null),c=q(()=>{null!==t.current&&null===e.current&&(l(),u.current=(e=>{const t=performance.now();if(t-gX>50&&(gX=t,bX=0),bX+=1,0===vX&&bX<=20)return e(),()=>{};vX+=1;let r=!1;const n=()=>{r||(r=!0,vX-=1)},o=hX(()=>{n(),e()},{timeout:2e3});return()=>{mX(o),n()}})(()=>{u.current=null,t.current&&(e.current=(({element:e,theme:t,isSnapshot:r,miniChartData:n,onChartRendered:o,direction:i})=>{const{type:a,qMatrix:s,minY:l,maxY:u}=n;return DX.chart({element:e,data:{type:"q",key:"qHyperCube",data:MX(s)},settings:{scales:kX(a,l,u,i),components:IX(t,n),strategy:r?{size:{width:e.offsetWidth,height:e.offsetHeight}}:void 0},mounted:()=>{o()}})})({element:t.current,theme:r,isSnapshot:n,miniChartData:i,direction:o,onChartRendered:s}))}))},[t,e,l,r,n,i,o,s]);return{renderChartWithRequestIdleCallback:c,safeCancelIdleCallback:q(()=>{u.current?.(),u.current=null,s()},[s])}},qX=e=>{const t=M(null),r=M(!1);return q(n=>{const o=n.contentBoxSize.at(0)?.inlineSize??0;(e=>{e.current&&(mX(e.current),e.current=null)})(t),r.current?0!==o?null!==e.current&&(t.current=hX(()=>{e.current?.update()},{timeout:2e3})):r.current=!1:r.current=!0},[e])},OX=({intersectionObserverTaskScheduler:e,resizeObserverTaskScheduler:t,theme:r,isSnapshot:n,miniChartData:o,downloadService:i,direction:a})=>{const s=M(null),l=M(null),{renderChartWithRequestIdleCallback:u,safeCancelIdleCallback:c}=TX({element:s,chart:l,theme:r,isSnapshot:n,direction:a,miniChartData:o,downloadService:i});return(({element:e,intersectionObserverTaskScheduler:t,safeCancelIdleCallback:r,renderChartWithRequestIdleCallback:n,chart:o})=>{const i=q(e=>{e.isIntersecting?n():r()},[n,r]);P(()=>{if(!e.current||!t)return()=>{};const n=e.current;return t.addTask(n,i),()=>{t.removeTask(n),r(),o.current?.destroy(),o.current=null}},[o,e,t,r,i])})({element:s,intersectionObserverTaskScheduler:e,safeCancelIdleCallback:c,renderChartWithRequestIdleCallback:u,chart:l}),(({renderChartWithRequestIdleCallback:e,safeCancelIdleCallback:t,chart:r,intersectionObserverTaskScheduler:n})=>{P(()=>n?()=>{}:(e(),()=>{t(),r.current?.destroy(),r.current=null}),[n,t,e,r])})({intersectionObserverTaskScheduler:e,safeCancelIdleCallback:c,renderChartWithRequestIdleCallback:u,chart:l}),(({element:e,chart:t,resizeObserverTaskScheduler:r})=>{const n=qX(t);P(()=>{const t=e.current;return t?(r.addTask(t,n),()=>{r.removeTask(t)}):()=>{}},[e,n,r])})({element:s,chart:l,resizeObserverTaskScheduler:t}),s},LX=({height:e,intersectionObserverTaskScheduler:t,resizeObserverTaskScheduler:r,theme:n,isSnapshot:o,miniChartData:i,downloadService:a,direction:s})=>{const l=OX({intersectionObserverTaskScheduler:t,resizeObserverTaskScheduler:r,theme:n,isSnapshot:o,miniChartData:i,downloadService:a,direction:s});return Gt.jsx("div",{"data-testid":"picasso-container",ref:l,style:{position:"relative",width:"100%",height:e,overflow:"hidden"}})},NX=e=>{let t="center",r="center";return"flex-start"===e?.vertical?t="top":"flex-end"===e?.vertical&&(t="bottom"),"flex-start"===e?.horizontal?r="left":"flex-end"===e?.horizontal&&(r="right"),`${r} ${t}`},jX=e=>{switch(e){case"alwaysFit":return"contain";case"fill":return"fill";case"fitHeight":case"fitWidth":return"cover";case"originalSize":return"none";default:return}},_X=({representation:e,textStyle:t,maxImageHeight:r,wrapInContainer:n})=>{const o=Jg(_b),{url:i,text:a,imageSize:s,resolvedImagePosition:l}=e,u="fitHeight"===s,c=Gt.jsx("img",{src:i,alt:a,style:{...t,width:u?"auto":"100%",height:"100%",maxHeight:r,objectFit:jX(s),objectPosition:NX(l),overflow:"hidden"}});return n?Gt.jsx("div",{"data-key":"image-horizontal-container",style:{width:"100%",height:u?r:"100%",overflow:"hidden",display:"flex",justifyContent:u?ZH(o,e):void 0},children:c}):c},zX=({size:e,iconKey:t,color:r,pvStyle:n})=>{const o=t&&VH[t];return o&&Gt.jsx("div",{"data-testid":"representation-indicator-icon",style:{color:r,height:e,...n},children:Gt.jsx(o,{style:{height:e}})})},FX=({representation:e,cellValue:t,paginationCellAlign:r})=>{const n=Jg(AU),o=Jg(_b),i=Jg(ev),{text:a,indicator:s}=e,{showTextValues:l,applySegmentColors:u}=s??{},c=WH(e,t,o,i),d=(e=>parseInt(e||KH,10))(n.measure.values.fontSize),{color:p,iconKey:f,position:h}=c||{};return l?Gt.jsxs("div",{"data-key":"representation-indicator",style:{display:"flex",justifyContent:r??"flex-end",alignItems:"center",gap:"2px",overflow:"hidden",color:u?p:void 0},children:["left"===h&&zX({size:d,iconKey:f,color:p}),Gt.jsx(tY,{isNumeric:!0,children:a}),"right"===h&&zX({size:d,iconKey:f,color:p})]}):zX({size:d,iconKey:f,color:p})},$X=(e,t,r)=>e.contentStaticLineCount?t*(r??e.grid.contentLineClamp):t,BX=({forwardRef:e,cell:t,style:r,virtualizedCell:n,lineClamp:o,intersectionObserverTaskScheduler:i,resizeObserverTaskScheduler:a,paginationCellAlign:s})=>{const l=Jg(AU),u=Jg(kU),c=Jg(tb),d=Jg(bb),p=Jg(ev),f=Jg(_b),h=Jg(Db),m=Jg(Ib);if(t.representation.type===v$.Image&&!t.representation.url?.trim())return null;if(t.representation.type===v$.Image)return Gt.jsx(_X,{representation:t.representation,textStyle:r,maxImageHeight:$X(l,u,o),wrapInContainer:!n});const g=xH(t.qIsNull?t.representation.text:t.qNum);let b=t.representation;if(t.qIsNull&&t.isNumeric&&!Number.isNaN(g)){const e=t.formattedNullValueText??zW(g,t.qNumFormat,t.qIsAutoFormat);b={...t.representation,text:e}}let v=b.text;return t.representation.type!==v$.Link||m||t.isNull||(v=Gt.jsx(fX,{href:t.representation.url,text:t.representation.text,interactions:h,color:r.cellForegroundColor})),t.representation.type!==v$.Indicator||Number.isNaN(g)?t.representation.type===v$.MiniChart&&t.representation.miniChart&&!t.isNull?Gt.jsx(LX,{height:$X(l,u,o),intersectionObserverTaskScheduler:i,resizeObserverTaskScheduler:a,miniChartData:t.representation.miniChart,theme:p,isSnapshot:!!d.snapshotData,direction:f,downloadService:c}):t.representation.type===v$.Bar&&t.representation.bar&&!t.isNull?Gt.jsx(cX,{height:$X(l,u,o),bar:t.representation.bar,theme:p,direction:f,fontFamily:l.measure.values.fontFamily,fontSize:r.fontSize??l.measure.values.fontSize}):Gt.jsx(tY,{forwardRef:e,isDual:t.isDual,isNumeric:t.isNumeric,lineClamp:o,isPagination:!n,children:v}):Gt.jsx(FX,{representation:b,cellValue:g,paginationCellAlign:n?void 0:s})},HX=()=>Gt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:"0.75em",height:"0.75em",children:Gt.jsx("path",{d:"M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z"})}),VX=Mu("div")({"& path":{stroke:"none !important"}}),WX=({children:e,cellSelectionState:t,hideTickIcon:r})=>t!==pH.Selected||r?e:Gt.jsxs(QK,{children:[e,Gt.jsx(VX,{children:Gt.jsx(HX,{})})]}),UX=e=>{const t=function(){const e=Jj(),t=Oj(()=>null==e?void 0:e.dragOperation.source,[e]),r=Oj(()=>null==e?void 0:e.dragOperation.target,[e]);return{get source(){return t.value},get target(){return r.value}}}();return t.source&&t.source.id!==e?.5:1},GX=(e,t,r,n)=>({handleMouseDown:n=>{e?.(n);const o=n.target;if(t.isSelectable&&"A"!==o.tagName){const e=()=>{r({type:fH.SelectMultiEnd})};r({type:fH.SelectMouseDown,payload:{cell:t,mouseupOutsideCallback:e}})}},handleMouseOver:e=>{1===e.buttons&&r({type:fH.SelectMultiAdd,payload:{cell:t,evt:e,announce:n}})},handleMouseUp:e=>{0===e.button&&r({type:fH.SelectMouseUp,payload:{cell:t,evt:e,announce:n}})}}),KX=e=>{const t=Jg(gU),r=Jg(cU),n=Jg($Y),o=Jg(Jb),i=Jg(_b),a=Zg(jY),s=Zg(EK),l=Jg(Vb),u=Jg(qb),c=Jg(Mb),d=d=>{GY({evt:d,rootElement:o,selectionsAPI:c,cell:e,selectionDispatch:s,isSelectionsEnabled:u,setFocusedCellCoord:a,announce:n,keyboard:l,paginationNeeded:t,totalsPosition:r,direction:i})},p=e=>{((e,t)=>{e.key===Km.Shift&&t({type:fH.SelectMultiEnd})})(e,s)},f=()=>{((e,t,r,n,o)=>{const{pageRowIdx:i,pageColIdx:a}=e,s=o.atTop?i+2:i+1;BK([s,a],t,r,n)})(e,o,a,l,r)};if(!u)return{onKeyDown:d,onKeyUp:p,onMouseDown:f};const{handleMouseDown:h,handleMouseOver:m,handleMouseUp:g}=GX(f,e,s,n);return{onKeyDown:d,onKeyUp:p,onMouseDown:h,onMouseUp:g,onMouseOver:m}},YX=e=>{P(()=>()=>{RK.remove(e)},[e])},XX=(e,t,r,n)=>{if(!r.isNull)return e;const o=n?t.dimensionNull:t.measureNull,i={...e,...o};if(!t.grid.zebraStripes.show)return i;const a=n?t.grid.zebraStripes.overrideDimNullValueColor:t.grid.zebraStripes.overrideMeasNullValueColor,s=n?t.grid.zebraStripes.overrideDimNullValueBackground:t.grid.zebraStripes.overrideMeasNullValueBackground;return a&&(i.color=e.color),s&&(i.background=e.background),i},JX=(e,t,r)=>{const{color:n,background:o}=e.grid.zebraStripes[r];return{...t,...n?{color:n}:void 0,...o?{background:o}:void 0}},ZX=(e,t,r)=>{if(t.grid.zebraStripes.show){const n=(r.rowIdx+1)%2==0;return JX(t,e,n?"even":"odd")}return e},QX=(e,t)=>{const r=Jg(AU),n=Jg(RK(e)),o=Jg(hb),i=e.isTotalRow&&o("TLV-2303-SUB-TOTALS");YX(e);let a=t.isDim?r.dimension.values:r.measure.values;a=ZX(a,r,e),a=i?r.subTotalRow:a,a=XX(a,r,e,t.isDim);const s=e.isNull||i&&t.isDim?a:RV(a,e.qAttrExps,t.qAttrExprInfoIDs),l=i?s:function(e,t,r){return t===pH.Selected?{...e,...r}:t===pH.Disabled?{...e,background:`${UH}, ${e.background}`}:e}(s,n,r.selectedColors);return{cellStyle:{...l,borderColor:r.grid.border},representationStyle:s,cellSelectionState:n}},eJ=Mu(qh,{shouldForwardProp:e=>"lastRowBottomBorder"!==e})(({lastRowBottomBorder:e})=>({"& tr:last-child":{"& td, th":{borderBottomWidth:e}}})),tJ=Mu(em,{shouldForwardProp:e=>"hoverColors"!==e&&"hover"!==e&&"height"!==e})(({hover:e,hoverColors:t,height:r})=>({height:r,"&&:hover":{background:"none"},...e&&{"&&:hover":{"& td:not(.selected), th:not(.selected)":t}}})),rJ=Mu(_h,{shouldForwardProp:e=>"cellStyle"!==e})(({cellStyle:e,theme:t})=>({...JH,...e,padding:t.spacing(.5,1.5),verticalAlign:"top",boxSizing:"border-box",width:"100%",height:"100%"})),nJ=Mu(_h,{shouldForwardProp:e=>!["atTop","headRowHeight","totalsStyle","direction"].includes(e)})(({totalsStyle:e,atTop:t,headRowHeight:r,theme:n})=>({...JH,...e,fontWeight:YH,position:"sticky",padding:n.spacing(.5,1.5),borderWidth:t?"0px 1px 1px 0px":"1px 1px 1px 0px",top:t?r:void 0,bottom:t?void 0:0,verticalAlign:t?"bottom":"top",boxSizing:"border-box",zIndex:t?1:void 0})),oJ=({cell:e,column:t,columnIndex:r,intersectionObserverTaskScheduler:n,resizeObserverTaskScheduler:o})=>{const i=Jg(_b),a=Jg(Db),{onKeyDown:s,onKeyUp:l,onMouseDown:u,onMouseUp:c,onMouseOver:d}=KX(e),{cellStyle:p,representationStyle:f,cellSelectionState:h}=QX(e,t),m=UX(t.id);return Gt.jsx(rJ,{cellStyle:{...p,opacity:m},scope:0===r?"row":void 0,component:0===r?"th":void 0,align:e.align,tabIndex:-1,className:`sn-table-cell ${h} ${Gm}`,title:a.passive?e.representation.text:void 0,onKeyDown:s,onKeyUp:l,onMouseDown:u,onMouseUp:c,onMouseOver:d,children:Gt.jsx(WX,{cellSelectionState:h,hideTickIcon:!!e.isTotalRow,children:Gt.jsx(BX,{cell:e,style:f,intersectionObserverTaskScheduler:n,resizeObserverTaskScheduler:o,paginationCellAlign:rV(i,e.align)})})})},iJ=zg(0),aJ=({column:e,totalsPosition:t,onKeyDown:r,onMouseDown:n})=>{const o=Jg(AU),i=Jg(Tb),a=Jg(iJ),s=UX(e.id);return Gt.jsx(nJ,{totalsStyle:{...o.totalRow,...MK(o,t,!1),opacity:s},headRowHeight:a,atTop:t.atTop,align:e.totalsTextAlign,className:`sn-table-cell ${Gm}`,tabIndex:-1,title:i?e.totalInfo:void 0,onKeyDown:r,onMouseDown:n,children:Gt.jsx(tY,{isNumeric:e.isTotalNumeric,isPagination:!0,children:e.totalInfo})},e.id)},sJ=()=>{const e=Jg(cU),t=Jg(dU),r=Jg(fU),n=Jg(Jb),o=Jg(Pb),i=Jg(_b),a=Zg(jY),s=Jg(Ib),l=Jg(Vb);return Gt.jsx(em,{className:"sn-table-row sn-table-totals-row",children:t.map((t,u)=>{const c=[e.atTop?1:r.length+1,u];return Gt.jsx(aJ,{column:t,totalsPosition:e,onKeyDown:e=>{(e=>{const{isSelectionMode:t,evt:r,isInteractionEnabled:n}=e;if(!t&&n)switch(r.key){case Km.C:HY(r);break;case Km.Space:r.preventDefault();break;default:VY(e)}else wm(r)})({evt:e,rootElement:n,cellCoord:c,setFocusedCellCoord:a,isSelectionMode:s,isInteractionEnabled:o,direction:i})},onMouseDown:()=>{BK(c,n,a,l)}},t.id)})})};var lJ=j(sJ);const uJ=({updateShouldRefocus:e,tableWrapperRef:t})=>{const r=Jg(fU),n=Jg(cU),o=Jg(dU),i=Jg(AU),a=Jg(DU),s=Jg(PU),l=Jg(bb),u=!!wV(l)?.content?.hoverEffect;rX({updateShouldRefocus:e,tableWrapperRef:t});const c=(e=>{const t=q(t=>new IntersectionObserver(e=>{e.forEach(e=>{const r=t.get(e.target);r?.(e)})},{root:e.current}),[e]);return QY(t)})(t),d=tX();return Gt.jsxs(eJ,{lastRowBottomBorder:i.grid.lastRowBottomBorder,children:[n.atTop?Gt.jsx(lJ,{}):void 0,r.map((e,t)=>{const r=e.at(0)?.isTotalRow??!1;return Gt.jsx(tJ,{hoverColors:i.grid.hoverColors,hover:u,tabIndex:-1,className:"sn-table-row sn-table-data-row",height:r?s:a,children:o.map((t,r)=>{const{id:n}=t,o=e[r];return Gt.jsx(oJ,{columnIndex:r,cell:o,column:t,intersectionObserverTaskScheduler:c,resizeObserverTaskScheduler:d},n)})},`row-${t}`)}),n.atBottom?Gt.jsx(lJ,{}):void 0]})};var cJ=j(uJ);const dJ=(e,t)=>!!e?.skipHeader||!!t.hideHeader,pJ=zg(e=>{const t=e(bb),r=e(Wb);if(r)return(e,{isDim:n,colIdx:o})=>{const i=n?o:o-t.qHyperCube.qDimensionInfo.length,a=`/qHyperCubeDef/${n?"qDimensions":"qMeasures"}/${i}/qDef/columnWidth`,s=t.qHyperCube[n?"qDimensionInfo":"qMeasureInfo"].at(i)?.columnWidth,l=s?{qPath:a,qOp:"Replace",qValue:JSON.stringify({...s,...e})}:{qPath:a,qOp:"Add",qValue:JSON.stringify(e)};r.applyPatches([l],!0)}}),fJ=({column:e,isLastColumn:t,onColumnResize:r,setIsAdjustingWidth:n})=>{const{pageColIdx:o,label:i}=e,a=Jg(pJ),s=Jg(_b),l=Jg(Pb),u=Jg(tv),[c,d]=Qg(NU);if(!l)return null;return Gt.jsx(WU,{columnWidth:c.at(o)??0,isLastColumn:t,keyValue:`adjuster-${o}`,updateWidthCallback:e=>{r?.();const t=[...c];t[o]=e,d(t)},confirmWidthCallback:t=>{a?.(t,e)},handleBlur:e=>{(e=>{jK(e);const t=e.closest(".sn-table-cell");zK(t)})(e.currentTarget)},setIsAdjustingWidth:n,accessibilityRelatedArgs:{translator:u,columnLabel:i},direction:s})},hJ=e=>e.target?.getAttribute("class")?.includes(Ym),mJ=({isInteractionEnabled:e,column:t})=>{const[r,n]=I(!1),o=Jg(kK),i=Jg(pV);return{open:r,setOpen:n,handleOpenMenu:t=>{!e||hJ(t)||i||n(!0)},toggleSortOrder:r=>{e&&!hJ(r)&&!i&&(e=>null!==e.target.closest(".sn-table-cell"))(r)&&(r.stopPropagation(),o?.(t,"A"===t.sortDirection?"D":"A"))}}};var gJ=class extends XT{constructor(e,t){super(e,t),this.boundingRectangle=ZM(null),this.destroy=lk(()=>{if(!this.options)return;const{dragOperation:t}=e,{status:r}=t;if(r.initialized){const{element:e}=this.options,r="function"==typeof e?e(t):e;if(!r)return;let n;const o=()=>{this.boundingRectangle.value=cq(r)},i=()=>{n||(n=setTimeout(()=>{o(),n=void 0},25))},a=new ResizeObserver(o);return a.observe(r),document.addEventListener("scroll",i,{passive:!0,capture:!0}),()=>{document.removeEventListener("scroll",i,{capture:!0}),a.disconnect(),this.boundingRectangle.value=null}}})}apply(e){const{shape:t,transform:r}=e;if(!t)return r;const n=this.boundingRectangle.value;if(!n)return r;const{initial:o,current:i}=t,{height:a,width:s}=i.boundingRectangle,l=o.center.x-s/2,u=o.center.y-a/2,c=function(e,t,r){const n=j_({},t);return e.boundingRectangle.top+t.y<=r.top?n.y=r.top-e.boundingRectangle.top:e.boundingRectangle.bottom+t.y>=r.top+r.height&&(n.y=r.top+r.height-e.boundingRectangle.bottom),e.boundingRectangle.left+t.x<=r.left?n.x=r.left-e.boundingRectangle.left:e.boundingRectangle.right+t.x>=r.left+r.width&&(n.x=r.left+r.width-e.boundingRectangle.right),n}(new MD(l,u,s,a),r,n);return c}};gJ.configure=fP(gJ);const bJ=({invert:e})=>({dragOperation:t,droppable:r})=>{if(!r.shape)return null;const{shape:n}=t;if(!n)return null;const o=function(e){return e.sortable?.index}(r);if(void 0===o)return null;const i=function(e){return e.source.index}(t);if(void 0===i)return null;if(i===o)return null;const a=i<o!==e?"right":"left",{center:s,boundingRectangle:l}=n.current;return"left"===a&&l.left+.3*l.width<=r.shape.center.x||"right"===a&&l.right-.3*l.width>=r.shape.center.x?{id:r.id,value:1/ID.distance(r.shape.center,s),type:ET.Collision,priority:CT.Normal}:null},vJ=[gJ.configure({element:e=>{const t=e.activatorEvent?.target;return t instanceof HTMLElement?t.closest(".sn-table-head-row"):null}})],yJ=(e,t)=>{const r=Jg(_b),n=!Jg(Lb);return eF({id:e.id,disabled:n,index:t,type:"item",accept:"item",group:"column",modifiers:vJ,data:e,plugins:e=>[...e,EN.configure({feedback:"clone"})],collisionDetector:bJ({invert:"rtl"===r})})},xJ=({column:e,columnIndex:t,columnsLength:r})=>{const n=Jg(AU),o=Jg(Jb),i=Jg(_b),a=Jg(Db),s=Jg(dU),l=Jg(cU),u=Jg(NU)[t],c=Zg(jY),d=Jg(_Y(t)),p=Jg(Lb),f=Jg(Vb),{open:h,setOpen:m,handleOpenMenu:g,toggleSortOrder:b}=mJ({isInteractionEnabled:p,column:e}),v=Zg(pV),{ref:y,isDragging:x}=yJ(e,t),S=UX(e.id),w=Jg(Rb),C=w?rY:wY,E=e.isActivelySorted?hH[e.sortDirection]:void 0,R=h?Um:void 0,A=h?"true":void 0,I=t===r-1,M=[0,e.pageColIdx],k={width:u,zIndex:s.length-t},D=d&&0===t&&!f.enabled&&p?0:-1;return Gt.jsxs(WK,{"data-dragging":x,ref:y,headerStyle:{...n.header,...MK(n,l,!0),opacity:S},background:w&&h?e.headerColor?.headerMenuActiveBackground??n.headerMenuActiveBackground:e.headerColor?.background??n.header.background,hoverBackground:e.headerColor?.headerMenuHoverBackground??n.headerMenuHoverBackground,color:e.headerColor?.color??n.header.color,interactions:a,style:k,align:e.headTextAlign,className:`sn-table-head-cell sn-table-cell ${Gm}`,tabIndex:D,title:a.passive?e.label:void 0,onKeyDown:e=>{(e=>{const{isInteractionEnabled:t,evt:r,handleOpenMenu:n}=e;if(t)switch(r.key){case Km.C:HY(r);break;case Km.Enter:case Km.Space:n?.(r);break;default:VY(e)}else wm(r)})({evt:e,rootElement:o,cellCoord:M,setFocusedCellCoord:c,isInteractionEnabled:p,handleOpenMenu:g,direction:i})},onMouseDown:e=>{(({evt:e,rootElement:t,cellCoord:r,setFocusedCellCoord:n,keyboard:o,isInteractionEnabled:i})=>{e.preventDefault(),i&&BK(r,t,n,o)})({evt:e,rootElement:o,cellCoord:M,setFocusedCellCoord:c,keyboard:f,isInteractionEnabled:p})},onClick:w?g:b,"aria-sort":E,"aria-controls":R,"aria-expanded":A,"aria-haspopup":"true",children:[Gt.jsx(C,{column:e,isInteractionEnabled:p,open:h,setOpen:m,isPagination:!0,columnWidth:u}),Gt.jsx(fJ,{column:e,isLastColumn:I,setIsAdjustingWidth:v})]},e.id)},SJ=()=>{const e=Jg(dU),t=Jg(AU),r=Jg(bb),n=Jg(Fb),o=Zg(iJ),i=Jg(NU),a=M(null),s=dJ(n,r);return P(()=>{a.current&&o(a.current.getBoundingClientRect().height)},[t.header.fontSize,i,o,s]),Gt.jsx(Kh,{style:{visibility:s?"collapse":void 0},children:Gt.jsx(YK,{ref:a,className:"sn-table-row sn-table-head-row",children:e.map((t,r)=>Gt.jsx(xJ,{column:t,columnIndex:r,columnsLength:e.length},t.id))})})};var wJ=j(SJ);var CJ=j(()=>{const e=Jg($Y),[t,r]=Qg(tU),{page:n,rowsPerPage:o}=t,i=Jg(zb),{totalColumnCount:a,totalRowCount:s,totalPages:l,paginationNeeded:u,rows:c,columns:d}=Jg(uU),p=Jg(AU),f=Jg(bW),h=Jg(bb),m=Jg(ev),g=Jg(Xb),b=Jg(Jb),v=Jg(Fb),y=Jg(_b),x=Jg(Db),S=Jg(tv),w=Jg(AK),C=Zg(EK),E=Jg(Ib),R=Jg(Vb),A=M(!1),I=M(null),k=M(null),D=`${S.get("SNTable.Accessibility.RowsAndColumns",[String(c.length),String(d.length)])} ${S.get("SNTable.Accessibility.NavigationInstructions")}`,T=Nb(h,v),O=T?f.scrollLeft??0:0,L=T?f.rowPartialHeight??0:0,N=q(()=>{A.current=b.getElementsByTagName("table")[0].contains(document.activeElement)},[b]),j=q(n=>{r({...t,page:n}),e({keys:[["SNTable.Pagination.PageStatusReport",(n+1).toString(),l.toString()]],politeness:"assertive"})},[t,r,l,e]),_=q(n=>{r({...t,page:0,rowsPerPage:n}),e({keys:[["SNTable.Pagination.RowsPerPageChange",n.toString()]],politeness:"assertive"})},[e,t,r]);return(e=>{const t=Jg(_b),r=Jg(bW);P(()=>{const n=e.current;if(!n)return;const o=e=>{((e,t,r)=>{if(0===e.deltaX)return;e.stopPropagation();const n=r.scrollWidth-r.offsetWidth,{scrollLeft:o}=r;let i=o+e.deltaX;t&&(i=n+i),n>0&&(i<0||i>n+1)&&e.preventDefault()})(e,"rtl"===t,n)},i=e=>{r.scrollLeft=e.currentTarget?.scrollLeft||0};return n.addEventListener("wheel",o),n.addEventListener("scroll",i),()=>{n.removeEventListener("wheel",o),n.removeEventListener("scroll",i)}},[e,t,r])})(I),NY(k,A),(()=>{const e=Jg(Jb),t=Jg(Vb),r=Jg(jY);zm(()=>{const n=LK(e,r);t.active?zK(n):(n?.blur(),_K(e))},[t.active,e])})(),BY(A,n),P(()=>{const e=I.current;e&&(e.scrollLeft=O,e.scrollTop=L)},[t,s,O,L]),LY(()=>{C({type:fH.UpdatePageRows,payload:{pageRows:c}})},[c]),zY(),KY(I),Gt.jsxs(OY,{children:[Gt.jsxs(JK,{ref:k,dir:y,onKeyDown:e=>{UY({evt:e,totalRowCount:s,page:n,rowsPerPage:o,handleChangePage:j,updateShouldRefocus:N,keyboard:R,isSelectionMode:E})},"data-testid":"sn-table",children:[Gt.jsx(ZY,{}),Gt.jsxs(XY,{ref:I,className:"sn-table-container",fullHeight:!!i||!x.active||!u,interactions:x,tabIndex:-1,role:"application","data-testid":"table-container",children:[Gt.jsxs(JY,{stickyHeader:!0,"aria-label":D,borderRight:w?`1px solid ${p.grid.border}`:void 0,children:[Gt.jsx(wJ,{}),Gt.jsx(cJ,{updateShouldRefocus:N,tableWrapperRef:k})]}),Gt.jsx(IK,{})]}),Gt.jsx(dK,{footerContainer:i,pageInfo:t,paginationNeeded:u,theme:m,totalRowCount:s,totalColumnCount:a,totalPages:l,keyboard:R,translator:S,interactions:x,rect:g,layout:h,handleChangePage:j,handleChangeRowsPerPage:_,isSelectionMode:E,direction:y})]}),Gt.jsx(AY,{isPagination:!0})]})});const EJ=zg(0),RJ=zg(e=>{const t=e(vb);return Math.min(AV,t)}),AJ=zg(e=>{const t=e(vb);return t===AV?0:Math.floor(t/AV)}),IJ=zg(e=>{const t=e(EJ),r=e(AJ);return Math.min(t,r)}),MJ=zg(e=>({page:e(IJ),rowsPerPage:e(RJ),rowsPerPageOptions:[]}),(e,t,r)=>{const n=e(AJ);t(EJ,Math.max(0,Math.min(r,n)))}),kJ=zg(null),DJ=zg(null),PJ=zg(e=>{const t=e(MJ),r=e(vb);return Math.min(t.rowsPerPage,r-t.page*t.rowsPerPage)}),TJ=zg(null),qJ=zg(null),OJ=zg(e=>e(cU).atTop?2:1),LJ=zg(e=>e(cU).atTop?1:e(OJ)+e(PJ)),NJ=zg(e=>OK(Boolean(e(Ib)),e(cU))),jJ=zg(e=>({firstBodyRowIdx:e(OJ),totalsRowIdx:e(LJ),allowedRows:e(NJ)})),_J=zg(e=>({rootElement:e(Jb),totalsPosition:e(cU),rowCount:e(PJ),colCount:e(pU),columnWidths:e(NU)})),zJ=zg(e=>({scrollToCell:e(TJ),scrollableContainerElement:e(qJ)})),FJ=zg(e=>({keyboard:e(Vb),isInSelectionMode:e(Ib),selectionsAPI:e(Mb),isSelectionsEnabled:e(qb)})),$J=zg(e=>({direction:e(_b),isInteractionEnabled:e(Lb),paginationNeeded:e(gU),announce:e($Y),shouldRefocusRef:e(kJ)})),BJ=10,HJ=e=>e.atTop?2:1,VJ=(e,[t,r],n,o)=>{const i=HJ(n);if(0===t)return e.querySelector(`.sn-table-head-row [data-col="${r}"]`);if(n.atTop&&1===t)return e.querySelector(`.sn-table-totals-row [data-col="${r}"]`);const a=t-i;return a>=0&&a<o?e.querySelector(`.sn-table-body .sn-table-cell[rowindex="${a}"][columnindex="${r}"]`):e.querySelector(`.sn-table-totals-row [data-col="${r}"]`)},WJ=(e,t,r,n,o,i,a,s,l)=>{if(!e)return l(!1),()=>{};const[u,c]=r,d=u-HJ(n),p=d>=0&&d<o;let f=a,h=!1,m=null;const g=()=>h||s&&!s(),b=()=>{g()||(p&&e(d,c),m=requestAnimationFrame(()=>{if(g())return;const e=((e,t)=>{if(!e||!t)return!1;const r=e.getBoundingClientRect(),n=t.getBoundingClientRect();return r.top>=n.top&&r.bottom<=n.bottom&&r.left>=n.left&&r.right<=n.right})(VJ(t,r,n,o),i);if(!e)return f>0?(f-=1,void b()):void l(!1);l(!0)}))};return b(),()=>{h=!0,null!==m&&cancelAnimationFrame(m)}},UJ=(e,t,r,n,o,i)=>e<i?[t,e+1]:t<n?[t+1,o]:[t,e],GJ=(e,t,r,n,o,i)=>e>o?[t,e-1]:t>r?[t-1,i]:[t,e],KJ=(e,[t,r],n,o,i,a={top:0,bottom:0},s)=>{const l=a.top>0,u=a.top,c=n-1-a.bottom,d=o-1;switch(e.key){case Km.Down:case Km.Up:t=((e,t,r,n)=>e===Km.Down&&t<n?t+1:e===Km.Up&&t>r?t-1:t)(e.key,t,u,c);break;case Km.Right:l||([t,r]=((e,t,r,n,o,i,a)=>"rtl"===a?GJ(e,t,r,0,o,i):UJ(e,t,0,n,o,i))(r,t,u,c,0,d,i));break;case Km.Left:l||([t,r]=((e,t,r,n,o,i,a)=>"rtl"===a?UJ(e,t,0,n,o,i):GJ(e,t,r,0,o,i))(r,t,u,c,0,d,i));break;case Km.Home:l?t=Math.max(u,t-BJ):(hK(e)&&(t=u),r=0);break;case Km.End:l?t=Math.min(c,t+BJ):(hK(e)&&(t=c),r=d);break;case Km.PageDown:t=Math.min(c,t+BJ);break;case Km.PageUp:if(l)t=Math.max(u,t-BJ);else{const e=s?HJ(s):1,r=t-e;t=r>0&&r<=BJ?e:Math.max(u,t-BJ)}}return[t,r]},YJ=e=>{((e,t)=>{e.querySelectorAll(t).forEach(e=>{e.setAttribute("tabIndex","-1")})})(e,".sn-table-cell[tabindex='0']")},XJ=[Km.Home,Km.End,Km.PageUp,Km.PageDown],JJ=()=>{const e=M(!1),t=M(0),r=M(0),n=M(null),o=M(null),i=M(null),a=M(0),s=Zg(jY),l=Zg(EK),u=Jg(hb)("VNA-700-KEYBOARD_NAV_VIRTUALIZED_STRAIGHT_TABLE"),{rootElement:c,totalsPosition:d,rowCount:p,colCount:f,columnWidths:h}=Jg(_J),{firstBodyRowIdx:m,allowedRows:g,totalsRowIdx:b}=Jg(jJ),{scrollToCell:v,scrollableContainerElement:y}=Jg(zJ),{keyboard:x,isInSelectionMode:S,selectionsAPI:w,isSelectionsEnabled:C}=Jg(FJ),{direction:E,announce:R,isInteractionEnabled:I,paginationNeeded:k,shouldRefocusRef:D}=Jg($J),T=A(()=>(e=>{const t=new Array(e.length+1);t[0]=0;for(let r=0;r<e.length;r++)t[r+1]=t[r]+(e[r]??0);return t})(h),[h]);P(()=>()=>{t.current+=1,r.current+=1,a.current+=1,n.current?.(),n.current=null,o.current?.(),o.current=null,i.current?.(),i.current=null},[]);const O=q((e,t,r,n)=>{const o=t=>{if(n&&!n())return void r?.(!1);const i=VJ(c,e,d,p);if(i)return document.activeElement!==i&&DK(i),document.activeElement===i?void r?.(!0):t>0?void requestAnimationFrame(()=>{o(t-1)}):void r?.(!1);t>0?requestAnimationFrame(()=>{o(t-1)}):r?.(!1)};requestAnimationFrame(()=>{o(t)})},[c,d,p]),L=q((e,t)=>{const n=a.current+1;a.current=n;let i=0;const s=Date.now()+5e3,l=()=>{if(a.current!==n)return;if(r.current!==t)return;if(c instanceof HTMLElement&&!c.isConnected)return;if(Date.now()>s||i>=5)return;const u=document.activeElement;u&&u!==document.body&&u!==document.documentElement||(i+=1,D&&(D.current=!0),o.current?.(),o.current=WJ(v,c,e,d,p,y,10,()=>a.current===n&&r.current===t,()=>{O(e,300,()=>{D&&(D.current=!1)},()=>a.current===n&&r.current===t)})),requestAnimationFrame(()=>{requestAnimationFrame(l)})};requestAnimationFrame(()=>{requestAnimationFrame(l)})},[O,c,p,v,y,D,d]),N=q(()=>(D&&(D.current=!0),t.current+=1,t.current),[D]),j=q(()=>{t.current+=1,i.current?.(),i.current=null},[]),_=q((e,r)=>{const n=o=>{t.current===e&&(i.current?.(),i.current=WJ(v,c,r,d,p,y,10,()=>t.current===e,()=>{if(t.current!==e)return;const i=VJ(c,r,d,p);i&&document.activeElement!==i&&DK(i),o>0?requestAnimationFrame(()=>{n(o-1)}):t.current===e&&D&&(D.current=!1)}))};requestAnimationFrame(()=>{requestAnimationFrame(()=>{n(300)})})},[c,d,p,v,D,y]),z=q((e,t)=>{if(!vK(e))return;wm(e),j(),r.current+=1;const o=r.current;a.current+=1,n.current?.(),n.current=null;const i=((e,t)=>HJ(t)+e+(t.atBottom?1:0))(p,d),l=KJ(e,t,i,f,E,g,d);YJ(c),s(l);const[,u]=l,[,h]=t;return u!==h&&((e,t,r)=>{if(!e)return;const n=t[r]??0,o=t[r+1]??n,{scrollLeft:i,clientWidth:a}=e;n<i?e.scrollLeft=n:o>i+a&&(e.scrollLeft=o-a)})(y,T,u),D&&(D.current=!0),n.current=WJ(v,c,l,d,p,y,10,()=>r.current===o,()=>{O(l,300,t=>{D&&(D.current=!1),t&&(e=>XJ.includes(e))(e.key)&&L(l,o)},()=>r.current===o)}),l},[c,d,p,f,E,v,s,g,y,D,O,j,T,L]),F=q(e=>{e.key===Km.Esc?x.enabled&&!S&&(wm(e),x.blur?.(!0)):gK(e.key)&&wm(e)},[x,S]),$=q((e,t,r)=>{switch(e.key){case Km.C:wm(e),I&&(e.ctrlKey||e.metaKey)&&ng(e.currentTarget);break;case Km.Enter:case Km.Space:if(!I){wm(e);break}r?.(e);break;default:z(e,[0,t])}},[z,I]),B=q((t,n,o,i)=>{const a=[n+m,o];switch(t.key){case Km.Space:if(wm(t),i.isSelectable&&C){e.current=!0;const r=N();l({type:fH.Select,payload:{cell:i,evt:t,announce:R}}),_(r,a)}break;case Km.Enter:if(wm(t),e.current=!1,S){N(),s(gH),w?.confirm(),y&&(y.scrollTop=0,y.scrollLeft=0);const e=t=>{v?.(0,0),t>0&&requestAnimationFrame(()=>{e(t-1)})};e(10),r.current+=1;const t=r.current;O(gH,300,()=>{D&&(D.current=!1)},()=>r.current===t)}break;case Km.Esc:if(e.current=!1,S){wm(t);const e=N();w?.cancel(),_(e,a)}break;case Km.C:wm(t),I&&(t.ctrlKey||t.metaKey)&&ng(t.currentTarget);break;case Km.Tab:{const e=t.shiftKey||!k;x.enabled&&S&&e&&(wm(t),Sm(t.currentTarget,x,t.shiftKey));break}default:{const r=t.key===Km.Left||t.key===Km.Right,n=S||Boolean(w?.isModal())||e.current;if(r&&n){wm(t);break}const o=z(t,a);!!o&&o[0]!==a[0]&&t.shiftKey&&C&&i.isSelectable&&l({type:fH.SelectMultiAdd,payload:{cell:i,evt:t,announce:R}});break}}},[m,z,C,l,R,S,w,x,k,I,N,_,s,v,y,O,D]),H=q(t=>{t.key===Km.Space&&(e.current=!1),t.key===Km.Shift&&l({type:fH.SelectMultiEnd})},[l]),V=q((e,t)=>{if(S)wm(e);else{if(e.key!==Km.Space)return e.key===Km.C?(wm(e),void(I&&(e.ctrlKey||e.metaKey)&&ng(e.currentTarget))):void z(e,[b,t]);e.preventDefault()}},[S,z,b,I]),W=q(e=>{j(),r.current+=1;const t=r.current;YJ(c),s(e),x.enabled&&x.focus?.(),O(e,2,r=>{r&&L(e,t)},()=>r.current===t)},[c,s,x,O,j,L]);return{handleWrapperKeyDown:F,handleHeadKeyDown:$,handleBodyKeyDown:B,handleBodyKeyUp:H,handleTotalsKeyDown:V,focusHeadCellOnClick:q(e=>{u&&W([0,e])},[W,u]),focusBodyCellOnClick:q((e,t)=>{u&&W([e+m,t])},[W,m,u]),focusTotalsCellOnClick:q(e=>{u&&W([b,e])},[W,b,u])}};var ZJ=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function QJ(e,t){return e===t||!(!ZJ(e)||!ZJ(t))}function eZ(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(!QJ(e[r],t[r]))return!1;return!0}function tZ(e,t){var r;void 0===t&&(t=eZ);var n,o=[],i=!1;return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return i&&r===this&&t(a,o)||(n=e.apply(this,a),i=!0,r=this,o=a),n}}var rZ="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function nZ(e){cancelAnimationFrame(e.id)}function oZ(e,t){var r=rZ();var n={id:requestAnimationFrame(function o(){rZ()-r>=t?e.call(null):n.id=requestAnimationFrame(o)})};return n}var iZ=-1;function aZ(e){if(void 0===e&&(e=!1),-1===iZ||e){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",document.body.appendChild(t),iZ=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return iZ}var sZ=null;function lZ(e){if(void 0===e&&(e=!1),null===sZ||e){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",r.direction="rtl";var n=document.createElement("div"),o=n.style;return o.width="100px",o.height="100px",t.appendChild(n),document.body.appendChild(t),t.scrollLeft>0?sZ="positive-descending":(t.scrollLeft=1,sZ=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),sZ}return sZ}var uZ=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function cZ(e){var t,r=e.getColumnOffset,n=e.getColumnStartIndexForOffset,o=e.getColumnStopIndexForStartIndex,i=e.getColumnWidth,a=e.getEstimatedTotalHeight,s=e.getEstimatedTotalWidth,l=e.getOffsetForColumnAndAlignment,u=e.getOffsetForRowAndAlignment,c=e.getRowHeight,d=e.getRowOffset,p=e.getRowStartIndexForOffset,f=e.getRowStopIndexForStartIndex,h=e.initInstanceProps,m=e.shouldResetStyleCacheOnItemSizeChange,g=e.validateProps;return t=function(e){function t(t){var n;return(n=e.call(this,t)||this)._instanceProps=h(n.props,Yu(n)),n._resetIsScrollingTimeoutId=null,n._outerRef=void 0,n.state={instance:Yu(n),isScrolling:!1,horizontalScrollDirection:"forward",scrollLeft:"number"==typeof n.props.initialScrollLeft?n.props.initialScrollLeft:0,scrollTop:"number"==typeof n.props.initialScrollTop?n.props.initialScrollTop:0,scrollUpdateWasRequested:!1,verticalScrollDirection:"forward"},n._callOnItemsRendered=void 0,n._callOnItemsRendered=tZ(function(e,t,r,o,i,a,s,l){return n.props.onItemsRendered({overscanColumnStartIndex:e,overscanColumnStopIndex:t,overscanRowStartIndex:r,overscanRowStopIndex:o,visibleColumnStartIndex:i,visibleColumnStopIndex:a,visibleRowStartIndex:s,visibleRowStopIndex:l})}),n._callOnScroll=void 0,n._callOnScroll=tZ(function(e,t,r,o,i){return n.props.onScroll({horizontalScrollDirection:r,scrollLeft:e,scrollTop:t,verticalScrollDirection:o,scrollUpdateWasRequested:i})}),n._getItemStyle=void 0,n._getItemStyle=function(e,t){var o,a=n.props,s=a.columnWidth,l=a.direction,u=a.rowHeight,p=n._getItemStyleCache(m&&s,m&&l,m&&u),f=e+":"+t;if(p.hasOwnProperty(f))o=p[f];else{var h=r(n.props,t,n._instanceProps),g="rtl"===l;p[f]=o={position:"absolute",left:g?void 0:h,right:g?h:void 0,top:d(n.props,e,n._instanceProps),height:c(n.props,e,n._instanceProps),width:i(n.props,t,n._instanceProps)}}return o},n._getItemStyleCache=void 0,n._getItemStyleCache=tZ(function(e,t,r){return{}}),n._onScroll=function(e){var t=e.currentTarget,r=t.clientHeight,o=t.clientWidth,i=t.scrollLeft,a=t.scrollTop,s=t.scrollHeight,l=t.scrollWidth;n.setState(function(e){if(e.scrollLeft===i&&e.scrollTop===a)return null;var t=n.props.direction,u=i;if("rtl"===t)switch(lZ()){case"negative":u=-i;break;case"positive-descending":u=l-o-i}u=Math.max(0,Math.min(u,l-o));var c=Math.max(0,Math.min(a,s-r));return{isScrolling:!0,horizontalScrollDirection:e.scrollLeft<i?"forward":"backward",scrollLeft:u,scrollTop:c,verticalScrollDirection:e.scrollTop<a?"forward":"backward",scrollUpdateWasRequested:!1}},n._resetIsScrollingDebounced)},n._outerRefSetter=function(e){var t=n.props.outerRef;n._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},n._resetIsScrollingDebounced=function(){null!==n._resetIsScrollingTimeoutId&&nZ(n._resetIsScrollingTimeoutId),n._resetIsScrollingTimeoutId=oZ(n._resetIsScrolling,150)},n._resetIsScrolling=function(){n._resetIsScrollingTimeoutId=null,n.setState({isScrolling:!1},function(){n._getItemStyleCache(-1)})},n}zu(t,e),t.getDerivedStateFromProps=function(e,t){return dZ(e,t),g(e),null};var b=t.prototype;return b.scrollTo=function(e){var t=e.scrollLeft,r=e.scrollTop;void 0!==t&&(t=Math.max(0,t)),void 0!==r&&(r=Math.max(0,r)),this.setState(function(e){return void 0===t&&(t=e.scrollLeft),void 0===r&&(r=e.scrollTop),e.scrollLeft===t&&e.scrollTop===r?null:{horizontalScrollDirection:e.scrollLeft<t?"forward":"backward",scrollLeft:t,scrollTop:r,scrollUpdateWasRequested:!0,verticalScrollDirection:e.scrollTop<r?"forward":"backward"}},this._resetIsScrollingDebounced)},b.scrollToItem=function(e){var t=e.align,r=void 0===t?"auto":t,n=e.columnIndex,o=e.rowIndex,i=this.props,c=i.columnCount,d=i.height,p=i.rowCount,f=i.width,h=this.state,m=h.scrollLeft,g=h.scrollTop,b=aZ();void 0!==n&&(n=Math.max(0,Math.min(n,c-1))),void 0!==o&&(o=Math.max(0,Math.min(o,p-1)));var v=a(this.props,this._instanceProps),y=s(this.props,this._instanceProps)>f?b:0,x=v>d?b:0;this.scrollTo({scrollLeft:void 0!==n?l(this.props,n,r,m,this._instanceProps,x):m,scrollTop:void 0!==o?u(this.props,o,r,g,this._instanceProps,y):g})},b.componentDidMount=function(){var e=this.props,t=e.initialScrollLeft,r=e.initialScrollTop;if(null!=this._outerRef){var n=this._outerRef;"number"==typeof t&&(n.scrollLeft=t),"number"==typeof r&&(n.scrollTop=r)}this._callPropsCallbacks()},b.componentDidUpdate=function(){var e=this.props.direction,t=this.state,r=t.scrollLeft,n=t.scrollTop;if(t.scrollUpdateWasRequested&&null!=this._outerRef){var o=this._outerRef;if("rtl"===e)switch(lZ()){case"negative":o.scrollLeft=-r;break;case"positive-ascending":o.scrollLeft=r;break;default:var i=o.clientWidth,a=o.scrollWidth;o.scrollLeft=a-i-r}else o.scrollLeft=Math.max(0,r);o.scrollTop=Math.max(0,n)}this._callPropsCallbacks()},b.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&nZ(this._resetIsScrollingTimeoutId)},b.render=function(){var e=this.props,t=e.children,r=e.className,n=e.columnCount,o=e.direction,i=e.height,l=e.innerRef,u=e.innerElementType,c=e.innerTagName,d=e.itemData,p=e.itemKey,f=void 0===p?uZ:p,h=e.outerElementType,m=e.outerTagName,g=e.rowCount,b=e.style,v=e.useIsScrolling,y=e.width,x=this.state.isScrolling,S=this._getHorizontalRangeToRender(),C=S[0],E=S[1],R=this._getVerticalRangeToRender(),A=R[0],I=R[1],M=[];if(n>0&&g)for(var k=A;k<=I;k++)for(var D=C;D<=E;D++)M.push(w(t,{columnIndex:D,data:d,isScrolling:v?x:void 0,key:f({columnIndex:D,data:d,rowIndex:k}),rowIndex:k,style:this._getItemStyle(k,D)}));var P=a(this.props,this._instanceProps),T=s(this.props,this._instanceProps);return w(h||m||"div",{className:r,onScroll:this._onScroll,ref:this._outerRefSetter,style:Pr({position:"relative",height:i,width:y,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},b)},w(u||c||"div",{children:M,ref:l,style:{height:P,pointerEvents:x?"none":void 0,width:T}}))},b._callPropsCallbacks=function(){var e=this.props,t=e.columnCount,r=e.onItemsRendered,n=e.onScroll,o=e.rowCount;if("function"==typeof r&&t>0&&o>0){var i=this._getHorizontalRangeToRender(),a=i[0],s=i[1],l=i[2],u=i[3],c=this._getVerticalRangeToRender(),d=c[0],p=c[1],f=c[2],h=c[3];this._callOnItemsRendered(a,s,d,p,l,u,f,h)}if("function"==typeof n){var m=this.state,g=m.horizontalScrollDirection,b=m.scrollLeft,v=m.scrollTop,y=m.scrollUpdateWasRequested,x=m.verticalScrollDirection;this._callOnScroll(b,v,g,x,y)}},b._getHorizontalRangeToRender=function(){var e=this.props,t=e.columnCount,r=e.overscanColumnCount,i=e.overscanColumnsCount,a=e.overscanCount,s=e.rowCount,l=this.state,u=l.horizontalScrollDirection,c=l.isScrolling,d=l.scrollLeft,p=r||i||a||1;if(0===t||0===s)return[0,0,0,0];var f=n(this.props,d,this._instanceProps),h=o(this.props,f,d,this._instanceProps),m=c&&"backward"!==u?1:Math.max(1,p),g=c&&"forward"!==u?1:Math.max(1,p);return[Math.max(0,f-m),Math.max(0,Math.min(t-1,h+g)),f,h]},b._getVerticalRangeToRender=function(){var e=this.props,t=e.columnCount,r=e.overscanCount,n=e.overscanRowCount,o=e.overscanRowsCount,i=e.rowCount,a=this.state,s=a.isScrolling,l=a.verticalScrollDirection,u=a.scrollTop,c=n||o||r||1;if(0===t||0===i)return[0,0,0,0];var d=p(this.props,u,this._instanceProps),h=f(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(i-1,h+g)),d,h]},t}($),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var dZ=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},pZ=function(e,t){var r=e.rowCount,n=t.rowMetadataMap,o=t.estimatedRowHeight,i=t.lastMeasuredRowIndex,a=0;if(i>=r&&(i=r-1),i>=0){var s=n[i];a=s.offset+s.size}return a+(r-i-1)*o},fZ=function(e,t){var r=e.columnCount,n=t.columnMetadataMap,o=t.estimatedColumnWidth,i=t.lastMeasuredColumnIndex,a=0;if(i>=r&&(i=r-1),i>=0){var s=n[i];a=s.offset+s.size}return a+(r-i-1)*o},hZ=function(e,t,r,n){var o,i,a;if("column"===e?(o=n.columnMetadataMap,i=t.columnWidth,a=n.lastMeasuredColumnIndex):(o=n.rowMetadataMap,i=t.rowHeight,a=n.lastMeasuredRowIndex),r>a){var s=0;if(a>=0){var l=o[a];s=l.offset+l.size}for(var u=a+1;u<=r;u++){var c=i(u);o[u]={offset:s,size:c},s+=c}"column"===e?n.lastMeasuredColumnIndex=r:n.lastMeasuredRowIndex=r}return o[r]},mZ=function(e,t,r,n){var o,i;return"column"===e?(o=r.columnMetadataMap,i=r.lastMeasuredColumnIndex):(o=r.rowMetadataMap,i=r.lastMeasuredRowIndex),(i>0?o[i].offset:0)>=n?gZ(e,t,r,i,0,n):bZ(e,t,r,Math.max(0,i),n)},gZ=function(e,t,r,n,o,i){for(;o<=n;){var a=o+Math.floor((n-o)/2),s=hZ(e,t,a,r).offset;if(s===i)return a;s<i?o=a+1:s>i&&(n=a-1)}return o>0?o-1:0},bZ=function(e,t,r,n,o){for(var i="column"===e?t.columnCount:t.rowCount,a=1;n<i&&hZ(e,t,n,r).offset<o;)n+=a,a*=2;return gZ(e,t,r,Math.min(n,i-1),Math.floor(n/2),o)},vZ=function(e,t,r,n,o,i,a){var s="column"===e?t.width:t.height,l=hZ(e,t,r,i),u="column"===e?fZ(t,i):pZ(t,i),c=Math.max(0,Math.min(u-s,l.offset)),d=Math.max(0,l.offset-s+a+l.size);switch("smart"===n&&(n=o>=d-s&&o<=c+s?"auto":"center"),n){case"start":return c;case"end":return d;case"center":return Math.round(d+(c-d)/2);default:return o>=d&&o<=c?o:d>c||o<d?d:c}},yZ=cZ({getColumnOffset:function(e,t,r){return hZ("column",e,t,r).offset},getColumnStartIndexForOffset:function(e,t,r){return mZ("column",e,r,t)},getColumnStopIndexForStartIndex:function(e,t,r,n){for(var o=e.columnCount,i=e.width,a=hZ("column",e,t,n),s=r+i,l=a.offset+a.size,u=t;u<o-1&&l<s;)u++,l+=hZ("column",e,u,n).size;return u},getColumnWidth:function(e,t,r){return r.columnMetadataMap[t].size},getEstimatedTotalHeight:pZ,getEstimatedTotalWidth:fZ,getOffsetForColumnAndAlignment:function(e,t,r,n,o,i){return vZ("column",e,t,r,n,o,i)},getOffsetForRowAndAlignment:function(e,t,r,n,o,i){return vZ("row",e,t,r,n,o,i)},getRowOffset:function(e,t,r){return hZ("row",e,t,r).offset},getRowHeight:function(e,t,r){return r.rowMetadataMap[t].size},getRowStartIndexForOffset:function(e,t,r){return mZ("row",e,r,t)},getRowStopIndexForStartIndex:function(e,t,r,n){for(var o=e.rowCount,i=e.height,a=hZ("row",e,t,n),s=r+i,l=a.offset+a.size,u=t;u<o-1&&l<s;)u++,l+=hZ("row",e,u,n).size;return u},initInstanceProps:function(e,t){var r=e,n={columnMetadataMap:{},estimatedColumnWidth:r.estimatedColumnWidth||50,estimatedRowHeight:r.estimatedRowHeight||50,lastMeasuredColumnIndex:-1,lastMeasuredRowIndex:-1,rowMetadataMap:{}};return t.resetAfterColumnIndex=function(e,r){void 0===r&&(r=!0),t.resetAfterIndices({columnIndex:e,shouldForceUpdate:r})},t.resetAfterRowIndex=function(e,r){void 0===r&&(r=!0),t.resetAfterIndices({rowIndex:e,shouldForceUpdate:r})},t.resetAfterIndices=function(e){var r=e.columnIndex,o=e.rowIndex,i=e.shouldForceUpdate,a=void 0===i||i;"number"==typeof r&&(n.lastMeasuredColumnIndex=Math.min(n.lastMeasuredColumnIndex,r-1)),"number"==typeof o&&(n.lastMeasuredRowIndex=Math.min(n.lastMeasuredRowIndex,o-1)),t._getItemStyleCache(-1),a&&t.forceUpdate()},n},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.columnWidth,e.rowHeight}}),xZ=function(e,t){return e};function SZ(e){var t,r=e.getItemOffset,n=e.getEstimatedTotalSize,o=e.getItemSize,i=e.getOffsetForIndexAndAlignment,a=e.getStartIndexForOffset,s=e.getStopIndexForStartIndex,l=e.initInstanceProps,u=e.shouldResetStyleCacheOnItemSizeChange,c=e.validateProps;return t=function(e){function t(t){var n;return(n=e.call(this,t)||this)._instanceProps=l(n.props,Yu(n)),n._outerRef=void 0,n._resetIsScrollingTimeoutId=null,n.state={instance:Yu(n),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof n.props.initialScrollOffset?n.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},n._callOnItemsRendered=void 0,n._callOnItemsRendered=tZ(function(e,t,r,o){return n.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:r,visibleStopIndex:o})}),n._callOnScroll=void 0,n._callOnScroll=tZ(function(e,t,r){return n.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:r})}),n._getItemStyle=void 0,n._getItemStyle=function(e){var t,i=n.props,a=i.direction,s=i.itemSize,l=i.layout,c=n._getItemStyleCache(u&&s,u&&l,u&&a);if(c.hasOwnProperty(e))t=c[e];else{var d=r(n.props,e,n._instanceProps),p=o(n.props,e,n._instanceProps),f="horizontal"===a||"horizontal"===l,h="rtl"===a,m=f?d:0;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},n._getItemStyleCache=void 0,n._getItemStyleCache=tZ(function(e,t,r){return{}}),n._onScrollHorizontal=function(e){var t=e.currentTarget,r=t.clientWidth,o=t.scrollLeft,i=t.scrollWidth;n.setState(function(e){if(e.scrollOffset===o)return null;var t=n.props.direction,a=o;if("rtl"===t)switch(lZ()){case"negative":a=-o;break;case"positive-descending":a=i-r-o}return a=Math.max(0,Math.min(a,i-r)),{isScrolling:!0,scrollDirection:e.scrollOffset<a?"forward":"backward",scrollOffset:a,scrollUpdateWasRequested:!1}},n._resetIsScrollingDebounced)},n._onScrollVertical=function(e){var t=e.currentTarget,r=t.clientHeight,o=t.scrollHeight,i=t.scrollTop;n.setState(function(e){if(e.scrollOffset===i)return null;var t=Math.max(0,Math.min(i,o-r));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!1}},n._resetIsScrollingDebounced)},n._outerRefSetter=function(e){var t=n.props.outerRef;n._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},n._resetIsScrollingDebounced=function(){null!==n._resetIsScrollingTimeoutId&&nZ(n._resetIsScrollingTimeoutId),n._resetIsScrollingTimeoutId=oZ(n._resetIsScrolling,150)},n._resetIsScrolling=function(){n._resetIsScrollingTimeoutId=null,n.setState({isScrolling:!1},function(){n._getItemStyleCache(-1,null)})},n}zu(t,e),t.getDerivedStateFromProps=function(e,t){return wZ(e,t),c(e),null};var d=t.prototype;return d.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)},d.scrollToItem=function(e,t){void 0===t&&(t="auto");var r=this.props,n=r.itemCount,o=r.layout,a=this.state.scrollOffset;e=Math.max(0,Math.min(e,n-1));var s=0;if(this._outerRef){var l=this._outerRef;s="vertical"===o?l.scrollWidth>l.clientWidth?aZ():0:l.scrollHeight>l.clientHeight?aZ():0}this.scrollTo(i(this.props,e,t,a,this._instanceProps,s))},d.componentDidMount=function(){var e=this.props,t=e.direction,r=e.initialScrollOffset,n=e.layout;if("number"==typeof r&&null!=this._outerRef){var o=this._outerRef;"horizontal"===t||"horizontal"===n?o.scrollLeft=r:o.scrollTop=r}this._callPropsCallbacks()},d.componentDidUpdate=function(){var e=this.props,t=e.direction,r=e.layout,n=this.state,o=n.scrollOffset;if(n.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("horizontal"===t||"horizontal"===r)if("rtl"===t)switch(lZ()){case"negative":i.scrollLeft=-o;break;case"positive-ascending":i.scrollLeft=o;break;default:var a=i.clientWidth,s=i.scrollWidth;i.scrollLeft=s-a-o}else i.scrollLeft=o;else i.scrollTop=o}this._callPropsCallbacks()},d.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&nZ(this._resetIsScrollingTimeoutId)},d.render=function(){var e=this.props,t=e.children,r=e.className,o=e.direction,i=e.height,a=e.innerRef,s=e.innerElementType,l=e.innerTagName,u=e.itemCount,c=e.itemData,d=e.itemKey,p=void 0===d?xZ:d,f=e.layout,h=e.outerElementType,m=e.outerTagName,g=e.style,b=e.useIsScrolling,v=e.width,y=this.state.isScrolling,x="horizontal"===o||"horizontal"===f,S=x?this._onScrollHorizontal:this._onScrollVertical,C=this._getRangeToRender(),E=C[0],R=C[1],A=[];if(u>0)for(var I=E;I<=R;I++)A.push(w(t,{data:c,key:p(I,c),index:I,isScrolling:b?y:void 0,style:this._getItemStyle(I)}));var M=n(this.props,this._instanceProps);return w(h||m||"div",{className:r,onScroll:S,ref:this._outerRefSetter,style:Pr({position:"relative",height:i,width:v,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},g)},w(s||l||"div",{children:A,ref:a,style:{height:x?"100%":M,pointerEvents:y?"none":void 0,width:x?M:"100%"}}))},d._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],r=e[1],n=e[2],o=e[3];this._callOnItemsRendered(t,r,n,o)}if("function"==typeof this.props.onScroll){var i=this.state,a=i.scrollDirection,s=i.scrollOffset,l=i.scrollUpdateWasRequested;this._callOnScroll(a,s,l)}},d._getRangeToRender=function(){var e=this.props,t=e.itemCount,r=e.overscanCount,n=this.state,o=n.isScrolling,i=n.scrollDirection,l=n.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=o&&"backward"!==i?1:Math.max(1,r),p=o&&"forward"!==i?1:Math.max(1,r);return[Math.max(0,u-d),Math.max(0,Math.min(t-1,c+p)),u,c]},t}($),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var wZ=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},CZ=function(e,t,r){var n=e.itemSize,o=r.itemMetadataMap,i=r.lastMeasuredIndex;if(t>i){var a=0;if(i>=0){var s=o[i];a=s.offset+s.size}for(var l=i+1;l<=t;l++){var u=n(l);o[l]={offset:a,size:u},a+=u}r.lastMeasuredIndex=t}return o[t]},EZ=function(e,t,r,n,o){for(;n<=r;){var i=n+Math.floor((r-n)/2),a=CZ(e,i,t).offset;if(a===o)return i;a<o?n=i+1:a>o&&(r=i-1)}return n>0?n-1:0},RZ=function(e,t,r,n){for(var o=e.itemCount,i=1;r<o&&CZ(e,r,t).offset<n;)r+=i,i*=2;return EZ(e,t,Math.min(r,o-1),Math.floor(r/2),n)},AZ=function(e,t){var r=e.itemCount,n=t.itemMetadataMap,o=t.estimatedItemSize,i=t.lastMeasuredIndex,a=0;if(i>=r&&(i=r-1),i>=0){var s=n[i];a=s.offset+s.size}return a+(r-i-1)*o},IZ=SZ({getItemOffset:function(e,t,r){return CZ(e,t,r).offset},getItemSize:function(e,t,r){return r.itemMetadataMap[t].size},getEstimatedTotalSize:AZ,getOffsetForIndexAndAlignment:function(e,t,r,n,o,i){var a=e.direction,s=e.height,l=e.layout,u=e.width,c="horizontal"===a||"horizontal"===l?u:s,d=CZ(e,t,o),p=AZ(e,o),f=Math.max(0,Math.min(p-c,d.offset)),h=Math.max(0,d.offset-c+d.size+i);switch("smart"===r&&(r=n>=h-c&&n<=f+c?"auto":"center"),r){case"start":return f;case"end":return h;case"center":return Math.round(h+(f-h)/2);default:return n>=h&&n<=f?n:n<h?h:f}},getStartIndexForOffset:function(e,t,r){return function(e,t,r){var n=t.itemMetadataMap,o=t.lastMeasuredIndex;return(o>0?n[o].offset:0)>=r?EZ(e,t,o,0,r):RZ(e,t,Math.max(0,o),r)}(e,r,t)},getStopIndexForStartIndex:function(e,t,r,n){for(var o=e.direction,i=e.height,a=e.itemCount,s=e.layout,l=e.width,u="horizontal"===o||"horizontal"===s?l:i,c=CZ(e,t,n),d=r+u,p=c.offset+c.size,f=t;f<a-1&&p<d;)f++,p+=CZ(e,f,n).size;return f},initInstanceProps:function(e,t){var r={itemMetadataMap:{},estimatedItemSize:e.estimatedItemSize||50,lastMeasuredIndex:-1};return t.resetAfterIndex=function(e,n){void 0===n&&(n=!0),r.lastMeasuredIndex=Math.min(r.lastMeasuredIndex,e-1),t._getItemStyleCache(-1),n&&t.forceUpdate()},r},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.itemSize}});function MZ(e,t){for(var r in e)if(!(r in t))return!0;for(var n in t)if(e[n]!==t[n])return!0;return!1}var kZ=["style"],DZ=["style"];function PZ(e,t){var r=e.style,n=Tr(e,kZ),o=t.style,i=Tr(t,DZ);return!MZ(r,o)&&!MZ(n,i)}const TZ=zg(0),qZ=zg(0),OZ=zg(0),LZ=zg(e=>e(TZ)+e(qZ)),NZ=zg(e=>{const t=e(Xb),r=e(gU),n=t.height-(r?41:0);return{width:t.width,height:n}}),jZ=zg(e=>{const t=e(NZ),r=e(fV),n=e(hV);return{width:t.width-n,height:t.height-r}}),_Z=zg(e=>{const t=e(jZ),r=e(LZ),n=e(OZ);return Math.min(t.height-r,n)}),zZ=zg(-1),FZ=bM(e=>zg(t=>t(zZ)===e)),$Z=({style:e})=>Gt.jsx("div",{className:"sn-table-cell",style:{...e,borderWidth:"0px 1px 1px 0px",boxSizing:"border-box"}});var BZ=S.memo($Z,PZ);const HZ=zg(e=>{const t=e(jZ),r=e(DU),n=e(LZ),o=e(OZ)+n,i=e(PJ)*r+n;return o<2*t.height?o:i}),VZ=zg(e=>e(HZ)<=e(NZ).height),WZ=()=>{},UZ=e=>{e.preventDefault()};const GZ=({columnIndex:e,rowIndex:t,style:r,data:n})=>{const{rowsInPage:o,columns:i,isHoverEnabled:a,setMeasuredCellHeight:s,lineClamp:l,resizeObserverTaskScheduler:u,onKeyDown:c,onKeyUp:d,onCellClick:p}=n,f=Jg(FZ(t)),h=Zg(zZ),m=Jg(AU),g=Jg(_b),b=Jg(Tb),v=Jg(Lb),y=Jg(AK),x=Jg(hb),S=Jg(VZ),w=o[t]?.[e],{handleMouseDown:C,handleMouseOver:E,handleMouseUp:R,cellSelectionState:A}=function(e){const t="object"==typeof e,r=Jg(qb),n=Zg(EK),o=Jg(RK(e));if(YX(e),t&&r){const{handleMouseDown:t,handleMouseOver:r,handleMouseUp:i}=GX(UZ,e,n,WZ);return{handleMouseDown:t,handleMouseOver:r,handleMouseUp:i,cellSelectionState:o}}return{cellSelectionState:o}}(w),I=((e,t,r,n)=>{const o=M(null),i=r&&(!r.isNumeric||r.isDual),a=r?.isTotalRow??!1,s=q(r=>{const o=r.contentBoxSize.at(0)?.blockSize;o&&i&&n(o,e,t,a)},[a,t,n,e,i]);return dY({ref:o,callback:s}),o})(t,e,w,s),k=i[e]?.isDim?m.dimension.values:m.measure.values,D=UX(i[e].id);if("object"==typeof w){const n=((e,t,r,n,o,i,a)=>{const s=e.isTotalRow&&a("TLV-2303-SUB-TOTALS");let l=ZX(o,i,e);l=s?i.subTotalRow:l,l=XX(l,i,e,t.isDim);const u=e.isNull||s&&t.isDim?l:RV(l,e.qAttrExps,t.qAttrExprInfoIDs);return n!==pH.Selected||s?n!==pH.Disabled||s?r?{...u,...i.grid.hoverColors}:u:{...u,color:r?i.grid.hoverColors?.color:u.color,background:`${UH}, ${r?i.grid.hoverColors?.background:u.background}`}:{...u,...i.selectedColors}})(w,i[e],a&&f,A,k,m,x),o={rowindex:t,columnindex:e},s=r=>{v&&p?.(t,e),C?.(r)},M=c?r=>{c(r,t,e,w)}:void 0;return Gt.jsx("div",{className:`sn-table-cell ${A} ${Gm}`,tabIndex:-1,style:{...r,...n,display:"flex",alignItems:"start",borderColor:m.grid.border,borderTop:"0px",borderBottomWidth:!S&&w.isLastRow?"0px":"1px",borderRightWidth:nV(g,w.isLastColumn,y),borderLeftWidth:oV(g,w.isLastColumn,y),justifyContent:QH(w,g),borderStyle:"solid",padding:"4px 12px",boxSizing:"border-box",cursor:"default",overflow:"hidden",textAlign:w.align,opacity:D},onMouseDown:s,onMouseUp:R,onMouseOver:E,onMouseEnter:a?()=>{h(t)}:void 0,onMouseLeave:a?()=>{h(-1)}:void 0,onKeyDown:M,onKeyUp:d,title:b?w.representation.text:void 0,...o,children:Gt.jsx(WX,{cellSelectionState:A,hideTickIcon:!!w.isTotalRow,children:Gt.jsx(BX,{forwardRef:m.contentStaticLineCount||1===l?void 0:I,cell:w,style:n,lineClamp:l,virtualizedCell:!0,resizeObserverTaskScheduler:u})})})}return Gt.jsx(BZ,{style:{...r,...k,borderColor:m.grid.border,borderWidth:"0px 1px 1px 0px",borderStyle:"solid",boxSizing:"border-box",opacity:D}})};var KZ=j(GZ,PZ);const YZ=XR(zg(async e=>{const t=e(bb),r=e(Wb),n=e(MJ).page,{qDataPages:o}=t.qHyperCube;if(0!==n||0===o.length){const e=n*Math.min(AV,t.qHyperCube.qSize.qcy);if(r&&"getHyperCubeData"in r)return r.getHyperCubeData("/qHyperCubeDef",[{qLeft:0,qTop:e,qWidth:50,qHeight:100}])}return[...o]})),XZ=zg(e=>{const t=e(PJ),r=e(jZ),n=e(DU);return Math.min(t,Math.ceil(r.height/n))}),JZ=zg(e=>{const t=e(NU),r=e(jZ);return t.reduce((e,t)=>e.width<r.width?{width:e.width+t,count:e.count+1}:e,{count:0,width:0}).count}),ZZ=e=>{const t=M(e);return t.current=e,t},QZ=({qLeft:e,qTop:t,qWidth:r,qHeight:n})=>`${e}-${t}-${r}-${n}`,eQ=e=>-1===e.qElemNumber||!!e.qIsTotalCell,tQ=(e,t,r,n,o)=>{const i=e[r];if(!i)return!0;for(let e=t;e<t+n;e++){const t=i[e];if(t?.rowIdx!==o)return!0}return!1},rQ=(e,t,r,n)=>{const o=e.slice(r,n);return 0===o.length||o.some(e=>!e[t])},nQ=(e,t,r,n,o,i,a,s)=>{e.forEach(e=>{e.qMatrix.forEach((l,u)=>{const c=e.qArea.qTop-t.page*t.rowsPerPage,{row:d,pageRowIdx:p}=((e,t,r,n,o,i,a,s,l,u)=>{const{qSize:c}=a.qHyperCube,d=n.qTop+r,p=o+r,f=e[p]??[],h=t.some(eQ);return t.forEach((e,t)=>{const r=t+n.qLeft;if(f.at(r))return;const{colIdx:o,isDim:m,isLocked:g,bodyTextAlign:b,selectionColIdx:v,qAttrExprInfoIndex:y,representation:x,conditionalColoring:S,qMiniChart:w,measureMinMax:C,qNumFormat:E,qIsAutoFormat:R,formattedNullValueText:A}=i[r],I=s.flags.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING"),M=!m&&e.qIsNull,k=m&&JW(e,m),D=M||k?XW(m,e,a,I):e.qText,P=M?yH(D):vH(e),T=vH(e)&&!yH(e.qText??"");f[r]={id:l$(),...e,align:UW(P,b,u),rowIdx:d,colIdx:o,isSelectable:m&&!g&&!h&&!k,isTotalRow:h,pageRowIdx:p,pageColIdx:r,selectionColIdx:v,isLastRow:d===c.qcy-1,isLastColumn:r===c.qcx-1,isNumeric:P,isDual:T,isNull:(!M||!P)&&JW(e,m),qNumFormat:E,qIsAutoFormat:R,formattedNullValueText:A,representation:gW({cell:e,representationProperties:x,attrExprInfoIndex:y,env:s,conditionalColoring:S,miniChartOnMeasure:w,measureMinMax:C,getText:()=>D,direction:u,enabledFeatures:{[v$.Image]:!0,[v$.Indicator]:!0,[v$.MiniChart]:!0,[v$.Bar]:!m&&s.flags.isEnabled("VNA-977-TABLE-BARS")}})},l(f[r],d,r)}),{row:f,pageRowIdx:p}})(r,l,u,e.qArea,c,n,o,i,a,s);r[p]=d})})},oQ=({gridState:e,setEstimatedCellHeight:t})=>{const r=Jg(bb),n=Jg(ev),o=Jg(Wb),i=Jg(fb),a=Jg(_b),s=Jg(MJ),l=Jg(YZ),u=Jg(dU),c=Jg(PJ),d=Jg(XZ),p=Jg(JZ),f=M([]),h=q((e,n)=>{const o=Array.isArray(n)?n.slice(0,c):(e=>Array(e).fill(void 0))(c);return nQ(e,s,o,u,r,i,t,a),f.current=o,o},[c,s,u,r,i,t,a]),[m,g]=I(()=>h(l??[]));zm(()=>{g(h(l??[]))},[l,a,c]);const b=((e,t)=>{const r=Jg(mb),n=M(new Set),o=M(new Set),i=M(new Set),a=ZZ(e),s=ZZ(t),l=A(()=>({enqueue:e=>{const t=QZ(e);i.current.has(t)||(n.current.add(e),i.current.add(t),1===n.current.size&&setTimeout(async()=>{const e=Array.from(n.current.values());if(0!==e.length){n.current.clear(),o.current.add(e);try{const t=(e=>{const t=[];return e.forEach(e=>{if(t.length>0){const r=t[t.length-1];((e,t)=>e.qTop+e.qHeight===t.qTop&&e.qLeft===t.qLeft&&e.qWidth===t.qWidth)(r,e)?r.qHeight+=e.qHeight:((e,t)=>e.qLeft+e.qWidth===t.qLeft&&e.qTop===t.qTop&&e.qHeight===t.qHeight)(r,e)?r.qWidth+=e.qWidth:t.push({...e})}else t.push({...e})}),t})(e),r=await a.current(t);o.current.has(e)&&s.current(r)}catch(t){e.forEach(e=>{i.current.delete(QZ(e))}),r.error({msg:"Failed to fetch pages",payload:t})}finally{o.current.delete(e)}}},75))},clear:()=>{n.current.clear(),o.current.clear(),i.current.clear()}}),[r,a,s]);return l})(e=>o&&"getHyperCubeData"in o?o.getHyperCubeData("/qHyperCubeDef",e):Promise.resolve([]),e=>{g(t=>h(e,t))}),v=q((e,t,r,n)=>{for(let o=e;o<e+r;o++)if(rQ(f.current,o,t,n)){const e={qLeft:o,qTop:t,qHeight:n,qWidth:1};b.enqueue(e)}},[b]),y=q((e,t,r,n)=>{for(let o=t;o<t+n;o++){const t=Math.max(0,o-s.page*s.rowsPerPage);if(tQ(f.current,e,t,r,o)){const t={qLeft:e,qTop:o,qHeight:1,qWidth:r};b.enqueue(t)}}},[b,s]);return P(()=>{if(void 0===l)return;const{qcx:t,qcy:n}=r.qHyperCube.qSize,o=e.current.overscanRowStartIndex,i=e.current.overscanColumnStartIndex,a=o+s.page*s.rowsPerPage,u=t-i,c=s.rowsPerPage-o,f=Math.min(100,u,t,p+5),h=Math.min(100,c,n,d+25);return y(i,a,f,h),()=>{b.clear()}},[l,r,d,p,s,b,y,e,n]),{rowsInPage:m,loadRows:y,loadColumns:v}},iQ=e=>{let t=0;return e.forEach(e=>{e>t&&(t=e)}),t},aQ=(e,t)=>void 0===e||Math.abs(e-t)>1e-4,sQ=({isSnapshot:e,isStaticNbrOfLines:t,lineClamp:r,setCellHeight:n})=>{const o=Jg(AU),i=Jg(NU),{estimateLineCount:a}=qm(o.dimension.values),s=mV(o.dimension.values.fontSize),l=e||t||1===r;return q((e,t,o)=>{if(l||e.representation.type===v$.Image||e.isNumeric&&!e.isDual)return;const u=(e=>Math.max(0,e-24-1))(i[o]),c=e.representation.text?a({text:e.representation.text,maxWidth:u,isNumeric:!1}):1,d=Math.min(r,Math.max(1,c));n(d*s,t,o,e.isTotalRow??!1)},[l,i,a,r,s,n])},lQ=({isStaticNbrOfLines:e,minRowHeight:t,state:r,staticRowHeight:n=0})=>{const o=Jg(bW);L(()=>{const i=e?n:((e,t)=>{const r=0===t?0:e/t;return Math.ceil(r)})(r.sumHeight,r.rowHeights.size);o.estimatedRowHeight=Math.max(i,t)},[e,t,r,n,o])},uQ=({isSnapshot:e,gridRef:t})=>{const r=Jg(AU),n=Jg(PJ),[o,i]=I(()=>({rowHeights:new Map,cellHeightsInGrid:new Map,sumHeight:0})),a=Jg(kU),s=Jg(DU),l=Jg(PU),u=!!r.contentStaticLineCount,c=Math.max(8e6/n,s,l)-9,d=c+9,p=Math.max(1,Math.min(r.grid.contentLineClamp,Math.round(c/a))),f=(({lineClamp:e,lineHeight:t,isStaticNbrOfLines:r})=>r?t*e+8+1:void 0)({lineClamp:p,lineHeight:a,isStaticNbrOfLines:u});(({gridRef:e,setState:t})=>{const r=Jg(bb),n=Jg(MJ),o=Jg(NU),i=r.multiline?.wrapTextInCells,a=r.nullValueRepresentation?.text;zm(()=>{e.current?.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!1}),t({rowHeights:new Map,cellHeightsInGrid:new Map,sumHeight:0})},[r.qHyperCube.qSize.qcx,r.qHyperCube.qSize.qcy,n.page,i,a]),zm(()=>{e.current?.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!1})},[o])})({gridRef:t,setState:i});const h=(({setState:e,maxCellHeight:t,gridRef:r})=>{const n=Jg(DU),o=Jg(PU);return q((i,a,s,l=!1)=>{z(()=>{e(e=>{const u=l?o:n,c=Math.max(u,i+9),d=Math.min(t,c),p=e.cellHeightsInGrid.get(a)??e.cellHeightsInGrid.set(a,new Map).get(a);if(!aQ(p.get(s),d))return e;const f={...e},h=e.rowHeights.get(a);p.set(s,d);const m=void 0===h||d>=h?d:iQ(p);return f.rowHeights.set(a,m),f.sumHeight=e.sumHeight-(h??0)+m,r.current?.resetAfterIndices({columnIndex:s,rowIndex:a,shouldForceUpdate:!1}),f})})},[e,t,n,o,r])})({maxCellHeight:d,setState:i,gridRef:t}),m=(({isSnapshot:e,isStaticNbrOfLines:t,lineClamp:r,setCellHeight:n})=>q((o,i,a,s)=>{e||t||1===r||n(o,i,a,s)},[e,t,r,n]))({isSnapshot:e,isStaticNbrOfLines:u,lineClamp:p,setCellHeight:h}),g=sQ({isSnapshot:e,isStaticNbrOfLines:u,lineClamp:p,setCellHeight:h}),b=q(e=>u?f??s:o.rowHeights.get(e)??s,[u,s,o.rowHeights,f]);return lQ({isStaticNbrOfLines:u,minRowHeight:s,state:o,staticRowHeight:f}),{setMeasuredCellHeight:m,setEstimatedCellHeight:g,getRowHeight:b,lineClamp:p}},cQ=(e,t)=>{L(()=>()=>{t(0)},[e,t]);const r=q(e=>{const r=e.contentBoxSize.at(0)?.blockSize;void 0!==r&&t(r)},[t]);dY({ref:e,callback:r})};let dQ=function(e){return e.Left="Left",e.Right="Right",e.Up="Up",e.Down="Down",e.None="None",e}({});const pQ=({loadRows:e,loadColumns:t,gridState:r})=>{const n=Jg(bW),o=Jg(bb),i=Jg(MJ),a=Jg(PJ);return q(({overscanColumnStartIndex:s,overscanColumnStopIndex:l,overscanRowStartIndex:u,overscanRowStopIndex:c,visibleColumnStartIndex:d,visibleColumnStopIndex:p,visibleRowStartIndex:f,visibleRowStopIndex:h})=>{const{verticalScrollDirection:m,horizontalScrollDirection:g}=(({overscanColumnStartIndex:e,overscanRowStartIndex:t},r,n)=>{let o,i;return o=n>t?dQ.Down:n<t?dQ.Up:dQ.None,i=r>e?dQ.Right:r<e?dQ.Left:dQ.None,{verticalScrollDirection:o,horizontalScrollDirection:i}})(r.current,s,u);if(r.current.overscanColumnStartIndex=s,r.current.overscanColumnStopIndex=l,r.current.overscanRowStartIndex=u,r.current.overscanRowStopIndex=c,u>a)return;const b=s,v=u+i.page*i.rowsPerPage,y=l-s+1,x=c-u+1;if(n.visibleLeft=d,n.visibleWidth=p-d+1,n.visibleTop=f+i.page*i.rowsPerPage,n.visibleHeight=h-f+1,n.page=i.page,n.rowsPerPage=i.rowsPerPage,m===dQ.Down){const t=x+25;e(b,v,y,u+t>a?a-u:t)}else if(m===dQ.Up){const t=x+25,r=i.page*i.rowsPerPage,n=Math.max(r,v-25);e(b,n,y,t)}if(g===dQ.Right){const e=o.qHyperCube.qSize.qcx-b,r=y+5,n=Math.min(e,r);t(b,v,n,x)}else if(g===dQ.Left){const e=Math.max(0,b-5),r=Math.min(o.qHyperCube.qSize.qcx,y+5);t(e,v,r,x)}},[r,a,i.page,i.rowsPerPage,n,e,o.qHyperCube.qSize.qcx,t])};const fQ=({columnIndex:e,data:t,rowIndex:r})=>{const n=t.rowsInPage[r]?.[e];return n?.id??`${r}-${e}`},hQ=(e,t)=>{if(!e||!t)return;const r=e.scrollHeight-e.clientHeight,n=Math.round(r*(e=>{const t=e.scrollHeight-e.clientHeight;return t<=0?0:Math.max(0,Math.min(1,e.scrollTop/t))})(t));e.scrollTop!==n&&(e.scrollTop=n)},mQ={overflow:"hidden",willChange:"auto"},gQ=_((e,t)=>{const{handleBodyKeyDown:r,handleBodyKeyUp:n,focusBodyCellOnClick:o}=JJ(),i=Jg(dU),a=Jg(jZ),s=Zg(OZ),l=Jg(_Z),u=Jg(bW),c=Jg(bb),d=Jg(_b),p=Jg(NU),f=Jg(PJ),h=Jg(qJ),m=Zg(TJ),g=M(null),b=M(null),v=M(null),y=M({overscanColumnStartIndex:0,overscanRowStartIndex:0,overscanColumnStopIndex:0,overscanRowStopIndex:0}),x=M(0),S=!!wV(c)?.content?.hoverEffect,{setMeasuredCellHeight:w,setEstimatedCellHeight:C,getRowHeight:E,lineClamp:R}=uQ({isSnapshot:!!c.snapshotData,gridRef:g}),{rowsInPage:I,loadRows:k,loadColumns:D}=oQ({gridState:y,setEstimatedCellHeight:C}),T=pQ({loadRows:k,loadColumns:D,gridState:y}),O=tX(),N=A(()=>({rowsInPage:I,columns:i,isHoverEnabled:S,lineClamp:R,setMeasuredCellHeight:w,resizeObserverTaskScheduler:O,onKeyDown:r,onKeyUp:n,onCellClick:o}),[I,i,S,R,w,O,r,n,o]);return L(()=>{1===x.current&&g.current?.scrollToItem({rowIndex:f-1,align:"start"})}),function(e){const t=Zg(EK),{shouldRefocusRef:r}=Jg($J),n=Jg(Jb),o=Jg(DJ);P(()=>{t({type:fH.UpdatePageRows,payload:{pageRows:e}})},[t,e]);const i=q(()=>{r&&(r.current=n.contains(document.activeElement))},[r,n]);rX({updateShouldRefocus:i,tableWrapperRef:{current:o}})}(I),F(t,()=>({interpolatedScrollTo:(e,t)=>{const r=(v.current?.clientHeight??l)-l,n=Math.round(r*e);x.current=e,1===x.current?(g.current?.scrollToItem({rowIndex:f-1,align:"start"}),g.current?.scrollTo({scrollLeft:t})):g.current?.scrollTo({scrollTop:n,scrollLeft:t})}}),[v,l,f]),P(()=>(m(()=>(e,t)=>{g.current?.scrollToItem({rowIndex:e,columnIndex:t,align:"auto"}),hQ(h,b.current)}),()=>{m(null)}),[h,m]),cQ(v,s),Gt.jsx(yZ,{"data-key":"body",ref:g,outerRef:b,innerRef:v,style:mQ,columnCount:i.length,columnWidth:e=>p[e],height:l,rowCount:f,rowHeight:E,estimatedRowHeight:u.estimatedRowHeight,width:a.width,itemData:N,onItemsRendered:T,itemKey:fQ,className:"sn-table-body",direction:d,children:KZ})});var bQ=j(gQ);const vQ=({children:e})=>{const t=Jg(zU),r=Jg(HZ);return Gt.jsx("div",{"data-key":"full-size-container",style:{display:"block",width:t,height:r},children:e})},yQ=(e,t)=>{const r=M(null),n=Jg(NU);L(()=>{r.current&&t(r.current.getBoundingClientRect().height+9,e)},[t,r,e,n.length]);const o=q(r=>{const n=r.contentBoxSize.at(0)?.blockSize;n&&t(n+9,e)},[e,t]);return dY({ref:r,callback:o}),r},xQ=Mu("div",{shouldForwardProp:e=>"interactions"!==e&&"hoverBackground"!==e&&"background"!==e&&"applicableStyle"!==e&&"color"!==e})(({interactions:e,hoverBackground:t,background:r,applicableStyle:n,color:o})=>({...n,background:r,color:o,"&&:hover:not(:has(button:hover))":{background:e.active?t:void 0}})),SQ=({index:e,style:t,data:r})=>{const{columns:n,columResizeHandler:o,setMeasuredCellHeight:i,onKeyDown:a,onCellClick:s}=r,l=Jg(AU),u=Jg(_b),c=Jg(Db),d=Jg(AK),p=Zg(pV),f=Jg(cU),h=Jg(Lb),m=Jg(NU)[e],g=Jg(Vb),b=Jg(_Y(e)),v=n[e],{open:y,setOpen:x,handleOpenMenu:S,toggleSortOrder:w}=mJ({isInteractionEnabled:h,column:v}),C=Jg(Rb),E=yQ(e,i),R=n.length-1===e,A=C?rY:wY,{ref:I,isDragging:M}=yJ(v,e),k=UX(v.id),D=b&&!g.enabled&&h?0:-1,P=a?t=>{a(t,e,S)}:void 0;return Gt.jsxs(xQ,{"data-dragging":M,ref:I,className:`sn-table-cell ${Gm}`,title:c.passive?v.label:void 0,onClick:C?S:w,applicableStyle:{...l.header,...MK(l,f,!0)},style:{...t,cursor:"pointer",display:"flex",alignItems:"flex-end",borderStyle:"solid",borderRightWidth:nV(u,R,d),borderLeftWidth:oV(u,R,d),borderTopWidth:"0px",borderBottomWidth:"1px",padding:"4px",justifyContent:v.headTextAlign,boxSizing:"border-box",zIndex:n.length-e,flexDirection:"right"===v.headTextAlign?"row-reverse":"row",userSelect:"none",opacity:k},interactions:c,hoverBackground:v.headerColor?.headerMenuHoverBackground??l.headerMenuHoverBackground,background:C&&y?v.headerColor?.headerMenuActiveBackground??l.headerMenuActiveBackground:v.headerColor?.background??l.header.background,color:v.headerColor?.color??l.header.color,tabIndex:D,onKeyDown:P,onMouseDown:t=>{t.preventDefault(),h&&s?.(e)},"data-col":e,children:[Gt.jsx(A,{forwardRef:E,column:v,isInteractionEnabled:h,open:y,setOpen:x,columnWidth:m}),Gt.jsx(fJ,{column:v,isLastColumn:R,onColumnResize:o,setIsAdjustingWidth:p})]})},wQ=e=>{const[t,r]=I(new Map);zm(()=>{r(new Map)},[e.length]);const n=q((e,t)=>{r(r=>aQ(r.get(t),e)?new Map(r).set(t,e):r)},[]);return{rowHeight:A(()=>iQ(t),[t]),setMeasuredCellHeight:n}},CQ=(e,t)=>{F(e,()=>({scrollTo:e=>t.current?.scrollTo(e)}),[t])},EQ=e=>{const t=Jg(ev),r=Jg(bb),n=Jg(MJ),o=Jg(NU);zm(()=>{e.current?.resetAfterIndex(0,!1)},[r,n,e,o,t])},RQ={overflow:"hidden",boxSizing:"border-box",willChange:"auto"},AQ=_((e,t)=>{const{columResizeHandler:r}=e,n=Jg(dU),o=Jg(jZ),i=Zg(TZ),a=S.useRef(null),s=M(null),l=Jg(IU),u=Jg(bb),c=Jg(Fb),d=Jg(_b),p=Jg(NU),{rowHeight:f,setMeasuredCellHeight:h}=wQ(n),m=dJ(c,u),{handleHeadKeyDown:g,focusHeadCellOnClick:b}=JJ();return CQ(t,a),EQ(a),cQ(s,i),Gt.jsx(IZ,{className:"sn-table-head-row",ref:a,outerRef:s,layout:"horizontal",style:{...RQ,...m?{display:"none"}:void 0},itemCount:n.length,itemSize:e=>p[e],height:Math.max(f+8,l),width:o.width,itemKey:e=>n[e].id,itemData:{columns:n,columResizeHandler:r,setMeasuredCellHeight:h,onKeyDown:g,onCellClick:b},direction:d,children:SQ})});var IQ=j(AQ);const MQ=_((e,t)=>{const{children:r,onScroll:n}=e,o=Jg(_b),i=Jg(Ob),{width:a,height:s}=Jg(NZ),l=Zg(qJ),u=q(e=>{l(e),"function"==typeof t?t(e):t&&(t.current=e)},[t,l]);return Gt.jsx("div",{"data-testid":"scrollable-container",ref:u,style:{overflow:i?"auto":"hidden",width:a,height:s},onScroll:n,dir:o,tabIndex:-1,children:r})}),kQ=({children:e})=>{const t=Jg(_b),r=Jg(jZ);return Gt.jsx("div",{"data-testid":"sticky-container",style:{position:"sticky",top:"0px",left:"rtl"!==t?"0px":void 0,right:"rtl"===t?"0px":void 0,width:r.width,height:r.height},children:e})},DQ=({index:e,style:t,data:r})=>{const{columns:n,totals:o,setMeasuredCellHeight:i,onKeyDown:a,onCellClick:s}=r,l=Jg(AU),u=Jg(bb),c=Jg(_b),d=Jg(Tb),p=Jg(Lb),f=Jg(AK),h=Jg(VZ),m=yQ(e,i),g=n[e].totalInfo,{totalsTextAlign:b,isTotalNumeric:v}=n[e],y=u.qHyperCube.qSize.qcx-1===e,x=UX(n[e].id),S=a?t=>{a(t,e)}:void 0;return Gt.jsx("div",{className:`sn-table-cell ${Gm}`,tabIndex:-1,title:d?g:void 0,"data-col":e,onKeyDown:S,onMouseDown:t=>{t.preventDefault(),p&&s?.(e)},style:{...t,...l.totalRow,...MK(l,o,!1),background:l.totalRow.background,display:"flex",alignItems:o.atTop?"end":"start",borderStyle:"solid",borderRightWidth:nV(c,y,f),borderLeftWidth:oV(c,y,f),borderTopWidth:o.atBottom?"1px":"0px",borderBottomWidth:h&&o.atBottom||o.atTop?"1px":"0px",padding:"4px 12px",justifyContent:b,textAlign:b,boxSizing:"border-box",cursor:"default",opacity:x},children:Gt.jsx(tY,{forwardRef:v?void 0:m,isNumeric:v,children:g})})},PQ=_((e,t)=>{const{totals:r}=e,n=Jg(dU),o=Jg(jZ),i=Zg(qZ),a=M(null),s=M(null),l=Jg(MU),u=Jg(_b),c=Jg(bb),d=Jg(NU),{rowHeight:p,setMeasuredCellHeight:f}=wQ(n),{handleTotalsKeyDown:h,focusTotalsCellOnClick:m}=JJ();return CQ(t,a),EQ(a),cQ(s,i),Gt.jsx(IZ,{className:"sn-table-totals-row",ref:a,outerRef:s,layout:"horizontal",style:RQ,itemCount:c.qHyperCube.qSize.qcx,itemSize:e=>d[e],height:Math.max(p,l),width:o.width,itemData:{columns:n,totals:r,setMeasuredCellHeight:f,onKeyDown:h,onCellClick:m},direction:u,children:DQ})});var TQ=j(PQ);const qQ=(e,t,r)=>{const n=Jg(_b),o=Jg(bW);return q(i=>{const{scrollHeight:a,clientHeight:s,scrollTop:l}=i.currentTarget,u=((e,t)=>{const{scrollWidth:r,clientWidth:n,scrollLeft:o}=e,i=r-n;if("rtl"===t){if(o>i)return i;if(o<0)return Math.abs(o)}return o})(i.currentTarget,n),c=Math.max(0,Math.min(1,l/(a-s)));o.scrollTopRatio=c,o.scrollLeft=u,r.current?.interpolatedScrollTo(Number.isNaN(c)?0:c,u),e.current?.scrollTo(u),t.current?.scrollTo(u)},[o,r,e,t,n])};var OQ=j(()=>{const e=Jg(cU),t=M(null),r=M(null),n=M(null),o=M(null),i=qQ(r,n,o),a=q(()=>{t.current&&(t.current.scrollTop=0)},[t]);zY(),(e=>{const t=Jg(pU),r=Jg(MJ),n=Jg(ev),o=Jg(PJ);P(()=>{const t=requestAnimationFrame(()=>{e.current&&(e.current.scrollLeft=0,e.current.scrollTop=0)});return()=>{cancelAnimationFrame(t)}},[t,e]),P(()=>{const t=requestAnimationFrame(()=>{e.current&&(e.current.scrollTop=0)});return()=>{cancelAnimationFrame(t)}},[r,o,n,e])})(t),KY(t);const s=Gt.jsx(TQ,{ref:n,totals:e},"totals");return Gt.jsxs(OY,{children:[Gt.jsx(MQ,{ref:t,onScroll:i,children:Gt.jsxs(vQ,{children:[Gt.jsxs(kQ,{children:[Gt.jsx(IQ,{ref:r,columResizeHandler:a}),e.atTop?s:null,Gt.jsx(bQ,{ref:o}),e.atBottom?s:null]}),Gt.jsx(IK,{})]})}),Gt.jsx(AY,{isPagination:!1})]})});const LQ=()=>{const e=Jg(bb),t=Jg(Xb),r=Jg(Db),{paginationNeeded:n,totalRowCount:o,totalColumnCount:i,totalPages:a}=Jg(uU),s=Jg(ev),l=Jg(tv),u=Jg(Vb),[c,d]=Qg(MJ),p=M(null),f=M(!1),h=Zg(kJ),m=Zg(DJ);P(()=>{h(f)},[h]);const g=S.useCallback(e=>{p.current=e,m(e)},[m]),{handleWrapperKeyDown:b}=JJ();return(()=>{const e=Jg(Jb),{keyboard:t}=Jg(FJ),r=Jg(jY),n=Jg(cU),o=Jg(PJ),{scrollToCell:i}=Jg(zJ),{shouldRefocusRef:a}=Jg($J),s=M({focusedCellCoord:r,totalsPosition:n,rowCount:o,scrollToCell:i,rootElement:e}),l=M(null),u=M(null);L(()=>{s.current={focusedCellCoord:r,totalsPosition:n,rowCount:o,scrollToCell:i,rootElement:e}},[r,n,o,i,e]),P(()=>{let e=!1;const{focusedCellCoord:r,totalsPosition:n,rowCount:o,scrollToCell:i,rootElement:c}=s.current;if("function"==typeof c.querySelector){if(t.active){const[t,a]=r,d=n.atTop?2:1;if(t>=d&&t<d+o){null!==u.current&&(cancelAnimationFrame(u.current),u.current=null),i?.(t-d,a);const r=t=>{if(e)return;const n=VJ(s.current.rootElement,s.current.focusedCellCoord,s.current.totalsPosition,s.current.rowCount);n&&document.activeElement!==n&&DK(n),n&&document.activeElement===n||t>0&&(l.current=requestAnimationFrame(()=>{r(t-1)}))};l.current=requestAnimationFrame(()=>{e||r(5)})}else{const e=VJ(c,r,n,o);e&&DK(e)}}else null!==l.current&&(cancelAnimationFrame(l.current),l.current=null),u.current=requestAnimationFrame(()=>{if(e)return;const t=s.current;if(a?.current)return;if(t.rootElement.contains(document.activeElement))return;const r=VJ(t.rootElement,t.focusedCellCoord,t.totalsPosition,t.rowCount);r?.blur(),YJ(t.rootElement)});return()=>{e=!0,null!==l.current&&(cancelAnimationFrame(l.current),l.current=null),null!==u.current&&(cancelAnimationFrame(u.current),u.current=null)}}},[t.active,e,a])})(),NY(p,f),Gt.jsxs(JK,{ref:g,"data-testid":"sn-table",onKeyDown:b,children:[Gt.jsx(ZY,{}),Gt.jsx(OQ,{}),Gt.jsx(dK,{paginationNeeded:n,handleChangePage:e=>{d(e)},pageInfo:c,totalRowCount:o,totalColumnCount:i,totalPages:a,keyboard:u,translator:l,theme:s,interactions:r,rect:t,layout:e})]})};var NQ=j(LQ);const jQ=e=>{const t=e.get(Wb),r=e.get(Bb),n=e.get(gb),i=e.get(_b);o(()=>{n&&t&&(r?function(e){const t=e.get(_b),r=e.get(Qb),n=$U(t);r.render(Gt.jsx(bi,{stylisPlugins:"rtl"===t?[lH]:void 0,children:Gt.jsx(Du,{theme:n,children:Gt.jsx(Wg,{store:e,children:Gt.jsx(FU,{children:Gt.jsx(CJ,{})})})})}))}(e):function(e){const t=e.get(_b),r=e.get(Qb),n=$U(t);r.render(Gt.jsx(S.StrictMode,{children:Gt.jsx(Du,{theme:n,children:Gt.jsx(Wg,{store:e,children:Gt.jsx(FU,{children:Gt.jsx(NQ,{})})})})}))}(e))},[n,r,e,t,i])};function _Q(e,t){const r=e.getElementsByClassName("sn-table-container")[0];if(!r)return{};const n=r.getBoundingClientRect(),o=e.getElementsByClassName("sn-table-head-row")[0],i=o?.getBoundingClientRect()??{height:0},a=e.getElementsByClassName("sn-table-totals-row")[0],s=a?.getBoundingClientRect()??{height:0},l=e.getElementsByClassName("sn-table-data-row"),u={top:n.y+i.height+(t.atTop?s.height:0),bottom:n.y+n.height-(t.atBottom?s.height:0)},c=((e,t)=>{if(!e)return-1;for(let r=0;r<e.length;r++)if(e[r].getBoundingClientRect().bottom>t.top)return r;return-1})(l,u),d=((e,t)=>{if(!e)return-1;for(let r=e.length-1;r>-1;r--){const n=e[r].getBoundingClientRect();if(t.bottom>n.top)return r}return-1})(l,u),p=((e,t,r)=>{if(!e||0===e.length||r<0)return 0;const n=e[r].getBoundingClientRect();return Math.max(t.top-n.top,0)})(l,u,c);return{visibleRowStartIndex:c,visibleRowEndIndex:d,rowPartialHeight:p}}const zQ=(e,t)=>{if(t)for(let r=0;r<t.length;r++){const n=t[r].getAttribute("rowindex");if(n&&parseInt(n,10)===e)return t[r]}},FQ=(e,t,r)=>{if(!e)return!1;const n=e.y+e.height/2;return n>=t&&n<=r};const $Q=(e,t,r,n,o)=>{if(e<0)return 0;const i=r.qHyperCube.qSize.qcy,a=n.rowsPerPage||ZW.rowsPerPage,s=o?.isMultiPage?0:3;return Math.min(i,a,e-t+1+s)},BQ=(e,t,r,n,o)=>{if(n&&!n.isMultiPage)return n;const i=BW(e,n);if(o){const{visibleRowStartIndex:o=-1,visibleRowEndIndex:a=-1,rowPartialHeight:s}=_Q(r,i);return{rowPartialHeight:s,scrollLeft:t.scrollLeft,visibleTop:t.qTop+o,visibleHeight:$Q(a,o,e,t,n),rowsPerPage:t.rowsPerPage,page:t.page,totalsPosition:i}}const{visibleRowStartIndex:a=-1,visibleRowEndIndex:s=-1}=function(e,t){const r=e.querySelector(".sn-table-body"),n=r?.getBoundingClientRect(),o=r?.querySelectorAll(".sn-table-body .sn-table-cell");if(!o||!n)return{};const{scrollTopRatio:i=0,visibleTop:a=0,visibleHeight:s=0,page:l=0,rowsPerPage:u=0}=t,c=l*u,d=a-c,p=d+s-1,f=zQ(d,o),h=f?.getBoundingClientRect();if(!f||!h)return{};const m=n.y;if(1-i<.001)return{visibleRowStartIndex:d+(h.y>=m-4?0:1)+c,visibleRowEndIndex:p+c};const g=n.y+n.height,b=(FQ(h,m,g)?d:d+1)+c;let v=p+c;const y=zQ(p,o),x=y?.getBoundingClientRect();return y&&x&&(FQ(x,m,g)||(v=p-1+c)),{visibleRowStartIndex:b,visibleRowEndIndex:v}}(r,t);return{scrollLeft:t.scrollLeft,visibleLeft:t.visibleLeft,visibleWidth:t.visibleWidth,visibleTop:a,visibleHeight:$Q(s,a,e,t,n),scrollTopRatio:t.scrollTopRatio,rowsPerPage:t.rowsPerPage,page:t.page,totalsPosition:i}},HQ={version:JSON.stringify("6.63.0"),qHyperCubeDef:{qDimensions:[],qMeasures:[],qColumnOrder:[],qInitialDataFetch:[{qWidth:50,qHeight:100}]},showTitles:!0,enableChartExploration:!1,title:"",subtitle:"",footnote:"",totals:{show:!0,position:"noTotals"},usePagination:!1,components:[],accessibleHeader:!1};var VQ=e=>({properties:{initial:HQ},data:{targets:[{path:"/qHyperCubeDef",dimensions:{min:0,max:1e3},measures:{min:0,max:1e3}}]},importProperties:t=>wv({...t,env:e}),exportProperties:gv,exploration:ZF(e)});const WQ=e=>e.getStyle("","","object.straightTableV2.backgroundColor"),UQ=e=>e.getStyle("object","straightTableV2","backgroundColor");function GQ(r){return{qae:VQ(r),ext:SB(r),component(){const n=c(),i=e(()=>Bg(),[!1!==n.usePagination]);i.set(fb,r);const s=d();i.set(Jb,s),i.set(bb,n),i.set(eb,p()),i.set(Wb,f()),i.set(Db,h()),i.set(tv,m()),i.set(Mb,g()),i.set(jb,t()),i.set(Vb,b()),i.set(Xb,v()),i.set(rb,y());const x=Mm(n,s,WQ,UQ);i.set(ev,x),i.set(gb,_m(x,n,r)),i.set(tb,Mt()),(e=>{const t=e.get(Qb);o(()=>()=>{t.unmount()},[t])})(i),a?.((e,t)=>{const r=t.target,n=r?.closest(`.${Gm}`);n?.title&&e.addItem({translation:"contextMenu.copyCellValue",icon:"lui-icon lui-icon--copy",tid:"copy-cell-context-item",id:"copy-cell-context-item",select:()=>{ng(n)}})}),(({store:e})=>{const t=e.get(bb),r=e.get(Wb),n=e.get(Jb),o=e.get(Yb),i=e.get(Fb),a=e.get(Bb);l(async s=>{const l=s;if(!l.snapshotData||!r||l.snapshotData.content)return l;if("getHyperCubeData"in r){const s=e.get(bW),{rowPartialHeight:u,scrollLeft:c,scrollTopRatio:d,visibleLeft:p,visibleWidth:f,visibleTop:h,visibleHeight:m,rowsPerPage:g,page:b}=BQ(t,s,n,i,a);l.qHyperCube.qDataPages=await r.getHyperCubeData("/qHyperCubeDef",[{qLeft:0,qTop:h,qWidth:t.qHyperCube.qSize.qcx,qHeight:m}]),l.snapshotData.content={rowPartialHeight:u,scrollLeft:c,scrollTopRatio:d,visibleLeft:p,visibleWidth:f,visibleTop:h,visibleHeight:m,rowsPerPage:g,page:b,size:{width:o.width,height:o.height},estimatedRowHeight:s.estimatedRowHeight}}return l}),u(()=>({getViewState:()=>BQ(t,e.get(bW),n,i,a)}),[t,e,n,a])})({store:i}),jQ(i)}}}export{GQ as default};
|
|
121
|
+
*/var EB=(wB||(wB=1,function(e,t){var r;function n(e,t){var r=[],n=0;function o(e){return r.push(e),t}function i(){return r[n++]}return{tokenize:function(t){return t.replace(e,o)},detokenize:function(e){return e.replace(new RegExp("("+t+")","g"),i)}}}r=new function(){var e="`TMP`",t="`COMMENT`",r="[^\\u0020-\\u007e]",o="(?:[0-9]*\\.[0-9]+|[0-9]+)",i="(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)",a="direction\\s*:\\s*",s="['\"]?\\s*",l="(^|[^a-zA-Z])",u="\\/\\*\\!?\\s*@noflip\\s*\\*\\/",c="(?:(?:(?:\\\\[0-9a-f]{1,6})(?:\\r\\n|\\s)?)|\\\\[^\\r\\n\\f0-9a-f])",d="(?:[_a-z0-9-]|"+r+"|"+c+")",p=o+"(?:\\s*"+i+"|-?(?:[_a-z]|"+r+"|"+c+")"+d+"*)?",f="((?:-?"+p+")|(?:inherit|auto))",h="((?:-?"+p+")|(?:inherit|auto)|(?:calc\\((?:(?:(?:\\(|\\)|\\t| )|(?:-?"+o+"(?:\\s*"+i+")?)|(?:\\+|\\-|\\*|\\/)){3,})\\)))",m="(#?"+d+"+|(?:rgba?|hsla?)\\([ \\d.,%-]+\\))",g="(?:[!#$%&*-~]|"+r+"|"+c+")*?",b="(?![a-zA-Z])",v="(?!("+d+"|\\r?\\n|\\s|#|\\:|\\.|\\,|\\+|>|~|\\(|\\)|\\[|\\]|=|\\*=|~=|\\^=|'[^']*'|\"[^\"]*\"|"+t+")*?{)",y="(?!"+g+s+"\\))",x="(?="+g+s+"\\))",S="(\\s*(?:!important\\s*)?[;}])",w=/`TMP`/g,C=/`TMPLTR`/g,E=/`TMPRTL`/g,R=new RegExp("\\/\\*[^*]*\\*+([^\\/*][^*]*\\*+)*\\/","gi"),A=new RegExp("("+u+v+"[^;}]+;?)","gi"),I=new RegExp("("+u+"[^\\}]*?})","gi"),M=new RegExp("("+a+")ltr","gi"),k=new RegExp("("+a+")rtl","gi"),D=new RegExp(l+"(left)"+b+y+v,"gi"),P=new RegExp(l+"(right)"+b+y+v,"gi"),T=new RegExp(l+"(left)"+x,"gi"),q=new RegExp(l+"(right)"+x,"gi"),O=/(:dir\( *)ltr( *\))/g,L=/(:dir\( *)rtl( *\))/g,N=new RegExp(l+"(ltr)"+x,"gi"),j=new RegExp(l+"(rtl)"+x,"gi"),_=new RegExp(l+"([ns]?)e-resize","gi"),z=new RegExp(l+"([ns]?)w-resize","gi"),F=new RegExp("((?:margin|padding|border-width)\\s*:\\s*)"+h+"(\\s+)"+h+"(\\s+)"+h+"(\\s+)"+h+S,"gi"),$=new RegExp("((?:-color|border-style)\\s*:\\s*)"+m+"(\\s+)"+m+"(\\s+)"+m+"(\\s+)"+m+S,"gi"),B=new RegExp("(background(?:-position)?\\s*:\\s*(?:[^:;}\\s]+\\s+)*?)("+p+")","gi"),H=new RegExp("(background-position-x\\s*:\\s*)(-?"+o+"%)","gi"),V=new RegExp("(border-radius\\s*:\\s*)"+f+"(?:(?:\\s+"+f+")(?:\\s+"+f+")?(?:\\s+"+f+")?)?(?:(?:(?:\\s*\\/\\s*)"+f+")(?:\\s+"+f+")?(?:\\s+"+f+")?(?:\\s+"+f+")?)?"+S,"gi"),W=new RegExp("(box-shadow\\s*:\\s*(?:inset\\s*)?)"+f,"gi"),U=new RegExp("(text-shadow\\s*:\\s*)"+f+"(\\s*)"+m,"gi"),G=new RegExp("(text-shadow\\s*:\\s*)"+m+"(\\s*)"+f,"gi"),K=new RegExp("(text-shadow\\s*:\\s*)"+f,"gi"),Y=new RegExp("(transform\\s*:[^;}]*)(translateX\\s*\\(\\s*)"+f+"(\\s*\\))","gi"),X=new RegExp("(transform\\s*:[^;}]*)(translate\\s*\\(\\s*)"+f+"((?:\\s*,\\s*"+f+"){0,2}\\s*\\))","gi");function J(e,t,r){var n,o;return t.split("(").length>t.split(")").length?e:("%"===r.slice(-1)&&(-1!==(n=r.indexOf("."))?(o=r.length-n-2,r=(r=100-parseFloat(r)).toFixed(o)+"%"):r=100-parseFloat(r)+"%"),t+r)}function Z(e){switch(e.length){case 4:e=[e[1],e[0],e[3],e[2]];break;case 3:e=[e[1],e[0],e[1],e[2]];break;case 2:e=[e[1],e[0]];break;case 1:e=[e[0]]}return e.join(" ")}function Q(e,t){var r=[].slice.call(arguments),n=r.slice(2,6).filter(function(e){return e}),o=r.slice(6,10).filter(function(e){return e}),i=r[10]||"";return t+(o.length?Z(n)+" / "+Z(o):Z(n))+i}function ee(e){return 0===parseFloat(e)?e:"-"===e[0]?e.slice(1):"-"+e}function te(e,t,r){return t+ee(r)}function re(e,t,r,n,o){return t+r+ee(n)+o}function ne(e,t,r,n,o){return t+r+n+ee(o)}return{transform:function(r,o){var i=new n(A,"`NOFLIP_SINGLE`"),a=new n(I,"`NOFLIP_CLASS`"),s=new n(R,t);return r=s.tokenize(a.tokenize(i.tokenize(r.replace("`","%60")))),o.transformDirInUrl&&(r=r.replace(O,"$1`TMPLTR`$2").replace(L,"$1`TMPRTL`$2").replace(N,"$1"+e).replace(j,"$1ltr").replace(w,"rtl").replace(C,"ltr").replace(E,"rtl")),o.transformEdgeInUrl&&(r=r.replace(T,"$1"+e).replace(q,"$1left").replace(w,"right")),r=r.replace(M,"$1"+e).replace(k,"$1ltr").replace(w,"rtl").replace(D,"$1"+e).replace(P,"$1left").replace(w,"right").replace(_,"$1$2"+e).replace(z,"$1$2e-resize").replace(w,"w-resize").replace(V,Q).replace(W,te).replace(U,ne).replace(G,ne).replace(K,te).replace(Y,re).replace(X,re).replace(F,"$1$2$3$8$5$6$7$4$9").replace($,"$1$2$3$8$5$6$7$4$9").replace(B,J).replace(H,J),r=i.detokenize(a.detokenize(s.detokenize(r)))}}},e.exports?t.transform=function(e,t,n){var o;return"object"==typeof t?o=t:(o={},"boolean"==typeof t&&(o.transformDirInUrl=t),"boolean"==typeof n&&(o.transformEdgeInUrl=n)),r.transform(e,o)}:"undefined"!=typeof window&&(window.cssjanus=r)}(CB,CB.exports)),CB.exports),RB=$t(EB),AB="comm",IB="rule",MB="decl",kB=Math.abs,DB=String.fromCharCode;function PB(e){return e.trim()}function TB(e,t,r){return e.replace(t,r)}function qB(e,t){return 0|e.charCodeAt(t)}function OB(e,t,r){return e.slice(t,r)}function LB(e){return e.length}function NB(e,t){return t.push(e),e}var jB=1,_B=1,zB=0,FB=0,$B=0,BB="";function HB(e,t,r,n,o,i,a,s){return{value:e,root:t,parent:r,type:n,props:o,children:i,line:jB,column:_B,length:a,return:"",siblings:s}}function VB(){return $B=FB>0?qB(BB,--FB):0,_B--,10===$B&&(_B=1,jB--),$B}function WB(){return $B=FB<zB?qB(BB,FB++):0,_B++,10===$B&&(_B=1,jB++),$B}function UB(){return qB(BB,FB)}function GB(){return FB}function KB(e,t){return OB(BB,e,t)}function YB(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 XB(e){return PB(KB(FB-1,QB(91===e?e+2:40===e?e+1:e)))}function JB(e){for(;($B=UB())&&$B<33;)WB();return YB(e)>2||YB($B)>3?"":" "}function ZB(e,t){for(;--t&&WB()&&!($B<48||$B>102||$B>57&&$B<65||$B>70&&$B<97););return KB(e,GB()+(t<6&&32==UB()&&32==WB()))}function QB(e){for(;WB();)switch($B){case e:return FB;case 34:case 39:34!==e&&39!==e&&QB($B);break;case 40:41===e&&QB(e);break;case 92:WB()}return FB}function eH(e,t){for(;WB()&&e+$B!==57&&(e+$B!==84||47!==UB()););return"/*"+KB(t,FB-1)+"*"+DB(47===e?e:WB())}function tH(e){for(;!YB(UB());)WB();return KB(e,FB)}function rH(e){return function(e){return BB="",e}(nH("",null,null,null,[""],e=function(e){return jB=_B=1,zB=LB(BB=e),FB=0,[]}(e),0,[0],e))}function nH(e,t,r,n,o,i,a,s,l){for(var u=0,c=0,d=a,p=0,f=0,h=0,m=1,g=1,b=1,v=0,y=0,x="",S=o,w=i,C=n,E=x;g;)switch(h=y,y=WB()){case 40:108!=h&&58==qB(E,d-1)?(v++,E+="("):E+=XB(y);break;case 41:v--,E+=")";break;case 34:case 39:case 91:E+=XB(y);break;case 9:case 10:case 13:case 32:if(v>0){E+=DB(y);break}E+=JB(h);break;case 92:E+=ZB(GB()-1,7);continue;case 47:switch(UB()){case 42:case 47:NB(iH(eH(WB(),GB()),t,r,l),l),5!=YB(h||1)&&5!=YB(UB()||1)||!LB(E)||" "===OB(E,-1,void 0)||(E+=" ");break;default:E+="/"}break;case 123*m:s[u++]=LB(E)*b;case 125*m:case 59:case 0:if(v>0&&y){E+=DB(y);break}switch(y){case 0:case 125:g=0;case 59+c:-1==b&&(E=TB(E,/\f/g,"")),f>0&&(LB(E)-d||0===m)&&NB(f>32?aH(E+";",n,r,d-1,l):aH(TB(E," ","")+";",n,r,d-2,l),l);break;case 59:E+=";";default:if(NB(C=oH(E,t,r,u,c,o,s,x,S=[],w=[],d,i),i),123===y)if(0===c)nH(E,t,C,C,S,i,d,s,w);else{switch(p){case 99:if(110===qB(E,3))break;case 108:if(97===qB(E,2))break;default:c=0;case 100:case 109:case 115:}c?nH(e,C,C,n&&NB(oH(e,C,C,0,0,o,s,x,o,S=[],d,w),w),o,w,d,s,n?S:w):nH(E,C,C,C,[""],w,0,s,w)}}u=c=f=0,m=b=1,x=E="",d=a;break;case 58:d=1+LB(E),f=h;default:if(m<1)if(123==y)--m;else if(125==y&&0==m++&&125==VB())continue;switch(E+=DB(y),y*m){case 38:b=c>0?1:(E+="\f",-1);break;case 44:if(v>0)break;s[u++]=(LB(E)-1)*b,b=1;break;case 64:45===UB()&&(E+=XB(WB())),p=UB(),c=d=LB(x=E+=tH(GB())),y++;break;case 45:45===h&&2==LB(E)&&(m=0)}}return i}function oH(e,t,r,n,o,i,a,s,l,u,c,d){for(var p=o-1,f=0===o?i:[""],h=function(e){return e.length}(f),m=0,g=0,b=0;m<n;++m)for(var v=0,y=OB(e,p+1,p=kB(g=a[m])),x=e;v<h;++v)(x=PB(g>0?f[v]+" "+y:TB(y,/&\f/g,f[v])))&&(l[b++]=x);return HB(e,t,r,0===o?IB:s,l,u,c,d)}function iH(e,t,r,n){return HB(e,t,r,AB,DB($B),OB(e,2,-2),0,n)}function aH(e,t,r,n,o){return HB(e,t,r,MB,OB(e,0,n),OB(e,n+1,-1),n,o)}function sH(e,t,r){switch(e.type){case"@import":case MB:case AB:return e.return=e.return||e.value;case IB:e.value=Array.isArray(e.props)?e.props.join(","):e.props,Array.isArray(e.children)&&e.children.forEach(function(e){e.type===AB&&(e.children=e.value)})}var n=function(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}(Array.prototype.concat(e.children),sH);return LB(n)?e.return=e.value+"{"+n+"}":""}function lH(e,t,r,n){if("@keyframes"===e.type||"@supports"===e.type||e.type===IB&&(!e.parent||"@media"===e.parent.type||e.parent.type===IB)){var o=RB.transform(sH(e));e.children=o?rH(o)[0].children:[],e.return=""}}Object.defineProperty(lH,"name",{value:"stylisRTLPlugin"});const uH=bM(({options:e,...t})=>zg(Tm(t,e)()),(e,t)=>e.fontSize===t.fontSize&&e.fontFamily===t.fontFamily&&e.fontStyle===t.fontStyle&&e.fontWeight===t.fontWeight&&e.options?.maxNbrLinesOfText===t.options?.maxNbrLinesOfText&&e.options?.allowLineBreaks===t.options?.allowLineBreaks);class cH{#y={on:new Map,once:new Map};#x=10;#S(e){this.listenerCount(e)>this.#x&&console.warn(`Possible EventEmitter memory leak detected. ${this.listenerCount(e)} listeners added to "${String(e)}".`)}#w(e,t,r){const n=this.#y[e].get(t)??new Set;n.add(r),this.#y[e].set(t,n),this.#S(t)}setMaxListeners(e){this.#x=e}on(e,t){this.#w("on",e,t)}once(e,t){this.#w("once",e,t)}off(e,t){this.#y.on.get(e)?.delete(t),this.#y.once.get(e)?.delete(t)}emit(e,...t){this.#y.on.get(e)?.forEach(e=>{e(...t)}),this.#y.once.get(e)?.forEach(e=>{e(...t)}),this.#y.once.delete(e)}listenerCount(e){return(this.#y.on.get(e)?.size??0)+(this.#y.once.get(e)?.size??0)}removeAllListeners(e){void 0===e?(this.#y.on.clear(),this.#y.once.clear()):(this.#y.on.delete(e),this.#y.once.delete(e))}}const dH=zg(()=>new cH);let pH=function(e){return e.Selected="selected",e.Possible="possible",e.Disabled="disabled",e.Inactive="inactive",e}({}),fH=function(e){return e.Select="Select",e.SelectMouseDown="SelectMouseDown",e.SelectMouseUp="SelectMouseUp",e.SelectMultiAdd="SelectMultiAdd",e.SelectMultiEnd="SelectMultiEnd",e.Reset="Reset",e.Clear="Clear",e.UpdatePageRows="UpdatePageRows",e}({}),hH=function(e){return e.A="ascending",e.D="descending",e}({}),mH=function(e){return e.First="sn-table-announcer-1",e.Second="sn-table-announcer-2",e}({});const gH=[0,0],bH=e=>"number"==typeof e&&!Number.isNaN(+e),vH=e=>bH(e.qNum),yH=e=>"string"==typeof e&&e.length>0&&!Number.isNaN(+e),xH=e=>"string"==typeof e&&e.length>0||"number"==typeof e?+e:NaN,SH=(e,t)=>e.max===e.min?.5:(t-e.min)/(e.max-e.min),wH=(e,t,r)=>{const n=e.paletteColors?e.paletteColors[t]:e.localPaletteColors[t];return r.getColorPickerColor(n)},CH=(e,t,r)=>{const n={previousColor:(o=e.localPaletteColors)[(i=t)-(i>0?1:0)],nextColor:o[i+(i<o.length-1?1:0)]};var o,i;const a=((e,t)=>{const r=e.limits&&e.limits.concat().sort((e,t)=>e.value-t.value);return{lowerLimit:r&&t>0?r[t-1]:{value:0,gradient:!1},upperLimit:r&&r[t]?r[t]:{value:1,gradient:!1}}})(e,t),s=((e,t,r,n,o)=>{const{upperLimit:i,lowerLimit:a}=e,{previousColor:s,nextColor:l}=t,u=n===i.value?1:(n-a.value)/(i.value-a.value);return a.gradient&&i.gradient?n-a.value<i.value-n?{color:s.color,t:.5-u}:{color:l.color,t:u-.5}:a.gradient?{color:s.color,t:1-(.5+u/2)}:i.gradient?{color:l.color,t:u/2}:{color:o.localPaletteColors[r].color,t:n}})(a,n,t,r,e);return ie(e.localPaletteColors[t].color??"").blend(ie(s.color??""),s.t)},EH=(e,t,r)=>{const n=((e,t)=>{const{limits:r}=e;return r&&(e.limits=r.sort((e,t)=>e.value-t.value),e.limits=r.map(e=>({...e,value:SH(t,e.value)}))),e})({...e},t),o=n.paletteColors||n.localPaletteColors;return o&&(n.localPaletteColors=o.concat().map((e,t)=>({color:wH(n,t,r)}))),n},RH=(e,t,r,n)=>{const o=EH(e,r,n),{localPaletteColors:i}=o;if(t<=0)return i[0].color;if(t>=1)return i[i.length-1].color;const a=((e,t)=>{let r="",n=0;const{limits:o,localPaletteColors:i}=e;for(let a=0;a<i.length;a++){const i=o&&o[a]?o[a].value:1;if(t>=n&&t<i){r=CH(e,a,t);break}n=i}return r})(o,t);return a},AH=(e,t)=>{const r=(e=>e.map(e=>e.value??e).sort((e,t)=>e-t))(e),n=r.some(e=>!bH(e));return 0===r.length||n?(e=>{const t=0===e?0:.5*e;return{min:e-t,max:e+t}})(t):1===r.length?((e,t)=>{const r=e[0]-t;if(0===r||!bH(r)){const e=0===t?.5:Math.abs(.5*t);return{min:t-e,max:t+e}}return r>0?{min:t-.5*Math.abs(t),max:e[0]+2*r}:{min:e[0]+2*r,max:t+.5*Math.abs(t)}})(r,t):((e,t)=>{let r=e[e.length-1]-e[0];return r=r>0?r:1,{min:Math.min(t,e[0])-r/2,max:Math.max(t,e[e.length-1])+r/2}})(r,t)},IH=(e,t)=>{const{limits:r}=e.segments;if(!r)return;const n=((e,t)=>{const{min:r,max:n}=AH(e,t),o=Math.abs(t);return{min:r??t-o,max:n??t+o}})(r,t),o=((e,t,r)=>{const{limits:n,paletteColors:o,localPaletteColors:i}=e.segments;if(!n||!bH(t))return 0;let a=r&&bH(r)?Math.min(r,t):0;const s=n.sort((e,t)=>e.value-t.value),l=o||i;for(let e=0;e<l.length;e++){if(e===l.length-1||t<s[e].value&&t>=a)return e;a=s[e].value}return 0})(e,t,n.min);return{limitRange:n,limitPaletteColorIndex:o}},MH=_((e,t)=>Gt.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:Gt.jsx("path",{d:"M7.5 8.5H2v-1h5.5V2h1v5.5H14v1H8.5V14h-1z"})})),kH=_((e,t)=>Gt.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:Gt.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"})})),DH=_((e,t)=>Gt.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:[Gt.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"}),Gt.jsx("use",{fillRule:"evenodd"})]})),PH=_((e,t)=>Gt.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:Gt.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"})})),TH=_((e,t)=>Gt.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:Gt.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"})})),qH=_((e,t)=>Gt.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:Gt.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"})})),OH=_((e,t)=>Gt.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:Gt.jsx("path",{d:"M2 7.5h12v1H2z"})})),LH=_((e,t)=>Gt.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:Gt.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"})})),NH=_((e,t)=>Gt.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:Gt.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"})})),jH=_((e,t)=>Gt.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:Gt.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"})})),_H=_((e,t)=>Gt.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:Gt.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"})})),zH=_((e,t)=>Gt.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:Gt.jsx("path",{d:"m6 10 7-7 2 2-7 7-2 2-5-5 2-2z"})})),FH=_((e,t)=>Gt.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:Gt.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"})})),$H=_((e,t)=>Gt.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:Gt.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=_((e,t)=>Gt.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:Gt.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"})})),HH=_((e,t)=>Gt.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:Gt.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"})})),VH={m:zH,"ï":jH,R:HH,S:FH,T:$H,U:BH,P:NH,Q:qH,"è":_((e,t)=>Gt.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:Gt.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"})})),"¢":PH,"©":DH,"23F4":TH,2013:_H,"&":LH,add:MH,"minus-2":OH,dot:kH},WH=(e,t,r,n)=>{const o=e.indicatorConditionalColoring;if(!o)return;const i=IH(o,t),a=((e,t,r,n)=>{const{segments:o}=e;if(!o||!r)return;const{limits:i}=o;if(!i?.length||!((e,t)=>!(!e||0===e.length||!(e[t]?.gradient??e[t-1]?.gradient)))(i,r.limitPaletteColorIndex))return wH(o,r.limitPaletteColorIndex,n);const a=SH(r.limitRange,t);return RH(o,a,r.limitRange,n)})(o,t,i,n),{paletteColors:s}=o.segments,l=i?.limitPaletteColorIndex||0,u=s[l]?.icon??"dot",{indicator:c}=e;let d=c?.position||"right";return"rtl"===r&&(d="right"===d?"left":"right"),{color:a,iconKey:u,position:d}},UH=(pm().palette.primary.light,"repeating-linear-gradient(-45deg, rgba(200,200,200,0.08), rgba(200,200,200,0.08) 2px, rgba(200,200,200,0.3) 2.5px, rgba(200,200,200,0.08) 3px, rgba(200,200,200,0.08) 5px)"),GH=4/3,KH="12px",YH="600",XH="Source Sans Pro, sans-serif",JH={height:"auto",fontSize:KH,lineHeight:"unset",padding:"4px",borderStyle:"solid",borderWidth:"0px 1px 1px 0px",userSelect:"none",outline:"none","&:focus-visible":{boxShadow:"0 0 0 2px #177fe6 inset, 0 0 0 3px #fff inset"},"&:focus:not(:focus-visible)":{boxShadow:"none"},"&:last-child":{borderRightWidth:"0px"}},ZH=(e,t)=>"rtl"===e&&"center"!==t.resolvedImagePosition?.horizontal?t.resolvedImagePosition?.horizontal&&(e=>"flex-start"===e?"flex-end":"flex-start")(t.resolvedImagePosition?.horizontal):t.resolvedImagePosition?.horizontal,QH=(e,t)=>e.representation.type===v$.Image&&"fitHeight"===e.representation.imageSize?ZH(t,e.representation):e.align,eV=(e,t)=>t||"right"!==e&&"left"!==e?t||"center"!==e?void 0:"row":"row-reverse",tV=(e,t,r)=>{if(!t&&"rtl"===r){if("left"===e.headTextAlign)return"right";if("right"===e.headTextAlign)return"left"}return e.headTextAlign},rV=(e,t)=>"rtl"===e&&"center"!==t?"right"===t?"left":"right":t,nV=(e,t,r)=>"rtl"===e||t&&!r?"0px":"1px",oV=(e,t,r)=>"rtl"===e?t&&!r?"0px":"1px":"0px",iV=24,aV=Mu("div",{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})(({direction:e,isPagination:t})=>({position:"absolute",left:t&&"rtl"===e?0:void 0,bottom:0})),sV=Mu(yd,{shouldForwardProp:e=>!["textAlign","direction","isPagination"].includes(e)})(({textAlign:e,theme:t,direction:r,isPagination:n})=>({textAlign:e,height:"auto",padding:t.spacing(.5,1),display:"flex",alignItems:"flex-end",justifySelf:e,alignSelf:"center",flexDirection:"rtl"===r?eV(e,n):void 0})),lV=Mu(yd,{shouldForwardProp:e=>"shouldShowMenuIcon"!==e&&"shouldShowLockIcon"!==e&&"alignment"!==e})(({shouldShowMenuIcon:e,shouldShowLockIcon:t,alignment:r})=>{const n=e?"24px":"";let o;switch(r){case"left":o={gridTemplateColumns:t?`20px 2fr ${n}`:`1fr ${n}`};break;case"center":{const r=e||t;o={gridTemplateColumns:r?"24px 2fr 24px":"1fr","& .sn-table-lock-icon":{gridColumn:1},"& .sn-table-head-label":{gridColumn:r?2:1},[`& .${Vm}`]:{gridColumn:3}};break}case"right":o={gridTemplateColumns:t?`${n} 2fr 20px`:`${n} 1fr`,"& .sn-table-lock-icon":{gridColumn:t?3:"unset"},"& .sn-table-head-label":{gridColumn:e?2:"span 2"},[`& .${Vm}`]:{gridColumn:1}}}return{width:"100%",display:"grid",gridAutoFlow:"dense",fontSize:"inherit",fontFamily:"inherit",alignItems:"end",overflow:"hidden",...o}}),uV=Mu(yd,{shouldForwardProp:e=>"rightAligned"!==e})(({rightAligned:e})=>({display:"flex",alignItems:"center",width:"20px",height:"24px",flexShrink:0,flexDirection:"inherit",justifyContent:e?"flex-start":"flex-end"})),cV=Mu(yd,{shouldForwardProp:e=>"justifyContent"!==e})(({justifyContent:e})=>({display:"flex",flexGrow:1,textAlign:e,justifyContent:e,alignItems:"center",padding:"4px"})),dV=Mu(kc,{shouldForwardProp:e=>"hoverBackground"!==e&&"activeBackground"!==e&&"isActive"!==e&&"order"!==e})(({hoverBackground:e,activeBackground:t,isActive:r,order:n})=>({padding:"4px !important",width:"fit-content",height:"auto",background:r?t:void 0,"&:hover":{background:e},color:"inherit",order:n})),pV=zg(),fV=zg(0),hV=zg(0),mV=e=>parseInt(e??JH.fontSize,10)*GH,gV=/<[bius]>/g;const bV=4/3,vV=e=>!!e?.color||"number"==typeof e?.index&&e.index>-1;function yV(e,t,r={index:-1}){const n=t.getColorPickerColor(r);return n&&"none"!==n?n:e}const xV=(e,t)=>e?{borderBottomColor:mm.DARK_MODE_BORDER,borderRightColor:mm.DARK_MODE_BORDER,borderLeftColor:mm.DARK_MODE_BORDER,borderTopColor:mm.DARK_MODE_BORDER}:{borderLeftColor:mm.BORDER_MEDIUM,borderRightColor:mm.BORDER_MEDIUM,borderTopColor:mm.BORDER_HEAVY,borderBottomColor:t?mm.BORDER_HEAVY:mm.BORDER_LIGHT},SV=(e,t,r)=>{if(e&&t&&r){const n=(e=>parseInt(e,10)*bV+8+1)(e);return n*(t+2)<r.clientHeight-40?"1px":"0px"}return"0px"},wV=e=>e.components?.find(e=>"theme"===e.key),CV=(e,t,r,n=!1)=>{const o=t.getStyle("object",`straightTableV2.${e}`,"fontFamily"),i=t.getStyle("object",`straightTableV2.${e}`,"color"),a=t.getStyle("object",`straightTableV2.${e}`,"fontSize"),s={fontFamily:o,color:vV(r?.fontColor)?yV(mm.TEXT,t,r?.fontColor):i||mm.TEXT,fontSize:r?.fontSize&&`${r.fontSize}px`||a,padding:r&&"padding"in r?r.padding:void 0,...xV(t.background.isDark,n)};return Object.keys(s).forEach(e=>{const t=e;null==s[t]&&delete s[t]}),s};function EV(e,t,r){const n=wV(e)?.header,o=CV("header",t,n,r);return o.background=(e=>{if(void 0===e)return;const t=ie(e);return t.setAlpha(1),t.getRGB()})(t.background.headerColor),o.hoverBackground=vm(o.background??mm.WHITE,Zm),o.activeBackground=vm(o.background??mm.WHITE,Qm),o}function RV(e,t,r){const n={};let o={fontStyle:e.fontStyle,fontWeight:e.fontWeight,textDecoration:e.textDecoration};return t?.qValues?.forEach((e,t)=>{const i=e.qText,a=i&&xm(i);a&&(n[r[t]]=a);const s=((e,{boldFontWeight:t,combineDecorations:r=!1})=>{const n=e?.toLowerCase().match(gV),o={},i=new Set;return n?.forEach(e=>{switch(e){case"<b>":o.fontWeight=t;break;case"<i>":o.fontStyle="italic";break;case"<u>":i.add("underline"),o.textDecoration="underline";break;case"<s>":i.add("line-through"),o.textDecoration="line-through"}}),r&&i.size>0&&(o.textDecoration=["underline","line-through"].filter(e=>i.has(e)).join(" ")),Object.keys(o).length>0?o:void 0})(i,{boldFontWeight:YH,combineDecorations:!0});var l,u;o={...o,...s,textDecoration:(l=o.textDecoration,u=s?.textDecoration,u?l?[...new Set(`${l} ${u}`.split(/\s+/).filter(e=>e&&"none"!==e))].join(" "):u:l)}}),n.cellBackgroundColor&&!n.cellForegroundColor&&(n.cellForegroundColor=gm(n.cellBackgroundColor)),{...e,...n,color:n.cellForegroundColor||e.color,background:n.cellBackgroundColor||e.background,fontStyle:o.fontStyle,fontWeight:o.fontWeight,textDecoration:o.textDecoration}}const AV=25e4,IV=(e,t)=>t.qAttrExps?.qValues?.[e],MV=e=>{const t=Number(e?.qNum);return void 0!==e?.qNum&&Number.isFinite(t)?t:void 0},kV=e=>{const t=e?.qText?.trim();return t&&"ARGB(0,0,0,0)"!==t.toUpperCase()?xm(t)??void 0:void 0},DV=/^data:(?<!\s)\s*(image\/[\w+-.]+)(?<!\s)\s*(;.*?){0,1}(?<!\s)\s*,(.*)/i,PV=5e6,TV=5e5;const qV={fromSearchString:function(e){if(!e)return[];"?"===e[0]&&(e=e.substr(1));const t=[];return e.split("&").forEach(e=>{if(!e)return;const r=e.indexOf("=");let n,o="",i=!1;-1===r?n=e:(n=e.slice(0,r),o=e.slice(r+1),i=!0),t.push(function(e,t,r){return{key:OV(e),value:OV(t.replace(/%2B/g,"shouldNotDecodePlus")),useEqualSign:r}}(n,o,i))}),t}};function OV(e){try{return decodeURIComponent(e)}catch{return e}}function LV(e){if(!(this instanceof LV))throw new Error("Url needs to be called with the new keyword");if(!e)throw new Error("Url needs a string to operate on");const t=function(e){const t={authorityAndPath:"",search:"",hash:""};let r=e.indexOf("#");-1!==r&&(t.hash=e.substr(r),e=e.substr(0,r));r=e.indexOf("?"),-1!==r&&(t.search=e.substr(r),e=e.substr(0,r));return t.authorityAndPath=e,t}(e);Object.defineProperties(this,{authorityAndPath:{value:t.authorityAndPath},search:{value:t.search},hash:{value:t.hash},searchParams:{get:()=>qV.fromSearchString(t.search)}})}function NV(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")}LV.encodeAuthorityAndPath=function(e){return encodeURI(e).replace(/%5B/gi,"[").replace(/%5D/gi,"]").replace(/%25/gi,"%")},LV.encodeSearchParams=function(e){let t,r="";for(let n=0;n<e.length;n++)t=e[n],r+=0===n?"?":"&",r+=NV(t.key),t.value?r+=`=${NV(t.value)}`:r+=t.useEqualSign?"=":"";return r};var jV=class{_hasNext(){return null!=this._input&&(0!==this._input.length&&this._index<this._input.length)}constructor(e){this._input=e,this._pushback=null,this._temp=null,this._index=0,this._mark=0}pushback(e){this._pushback=e}index(){return this._index}hasNext(){return null!=this._pushback||this._hasNext()}next(){if(null!=this._pushback){const e=this._pushback;return this._pushback=null,e}return this._hasNext()?this._input.charAt(this._index++):null}nextHex(){const e=this.next();return null==e?null:e.match(/[0-9A-Fa-f]/)?e:null}peek(e){return e?!(!this._pushback||this._pushback!==e)||!!this._hasNext()&&this._input.charAt(this._index)===e:this._pushback?this._pushback:this._hasNext()?this._input.charAt(this._index):null}mark(){this._temp=this._pushback,this._mark=this._index}reset(){this._pushback=this._temp,this._index=this._mark}remainder(){let e=this._input.substr(this._index);return null!=this._pushback&&(e=this._pushback+e),e}},_V=class{decode(e){let t="";const r=new jV(e);let n;for(;r.hasNext();)n=this.decodeCharacter(r),t+=null!=n?n:r.next();return t}decodeCharacter(e){return e.next()}};const zV=e=>e>=0&&e<=1114111,FV=e=>e.match(/[\s]/);var $V=class extends _V{decodeCharacter(e){e.mark();const t=e.next();let r,n,o;if(null==t||"\\"!==t)return e.reset(),null;const i=e.next();if(null==i)return e.reset(),null;switch(i){case"\r":e.peek("\n")&&e.next();case"\n":case"\f":case"\0":return this.decodeCharacter(e)}if("NaN"===parseInt(i,16))return i;for(r=i,n=0;n<5&&(o=e.next(),null!=o&&!FV(o));n++){if("NaN"===parseInt(o,16)){e.pushback(o);break}r+=o}const a=parseInt(r,16);return zV(a)?String.fromCharCode(a):"�"}},BV=class e{constructor(e,t){this._key=e,this._value=t}getKey(){return this._key}getValue(){return this._value}equals(t){return t instanceof e&&(this._key===t._key&&this._value===t._value)}static newInstanceIfNeeded(){let t,r,n=arguments[0];return"string"==typeof arguments[1]?(t=arguments[1],r=n.length):(r=arguments[1],t=arguments[2]),t&&n?(n.length>r&&(n=n.substr(0,r)),new e(n,t)):null}},HV=class e{setValue(e){this._nextMap=null,this._value=e}getNextNode(e){return this._nextMap?this._nextMap[e]:null}put(t,r,n){let o,i;if(t.length===r)return i=this._value,this.setValue(n),i;const a=t.charAt(r);return this._nextMap?(o=this._nextMap[a],o||(o=new e,this._nextMap[a]=o)):(this._nextMap={},o=new e,this._nextMap[a]=o),o.put(t,r+1,n)}get(e,t){if(e.length<=t)return this._value;const r=this.getNextNode(e.charAt(t));return r?r.get(e,t+1):null}getLongestMatch(e,t){if(e.length<=t)return BV.newInstanceIfNeeded(e,this._value);const r=this.getNextNode(e.charAt(t));if(!r)return BV.newInstanceIfNeeded(e,t,this._value);const n=r.getLongestMatch(e,t+1);return n||BV.newInstanceIfNeeded(e,t,this._value)}},VV=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 HV);const r=this.root.put(e,0,t);return r||(e.length>this.maxKeyLen&&(this.maxKeyLen=e.length),this.size++,null)}};const WV=(()=>{const e=[],t=[],r=new VV;let n,o,i;for(n 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[n]&&e.hasOwnProperty(n)&&(t[e[n]]=n);for(o in t)"function"!=typeof t[o]&&t.hasOwnProperty(o)&&(i=t[o].toLowerCase().substr(1),r.put(i,String.fromCharCode(o)));return r})();var UV=class extends _V{decodeCharacter(e){let t;e.mark();const r=e.next();if(null==r||"&"!==r)return e.reset(),null;const n=e.next();if(null==n)return e.reset(),null;if("#"===n){if(t=this._getNumericEntity(e),null!=t)return t}else if(n.match(/[A-Za-z]/)&&(e.pushback(n),t=this._getNamedEntity(e),null!=t))return t;return e.reset(),null}_getNamedEntity(e){let t,r,n,o="";for(t=Math.min(e.remainder().length,WV.getMaxKeyLength()),n=0;n<t;n++)o+=e.next().toLowerCase();const i=WV.getLongestMatch(o);if(null==i)return null;for(e.reset(),e.next(),t=i.getKey().length,r=0;r<t;r++)e.next();return e.peek(";")&&e.next(),i.getValue()}_getNumericEntity(e){const t=e.peek();return null==t?null:"x"===t||"X"===t?(e.next(),this._parseHex(e)):this._parseNumber(e)}_parseHex(e){let t,r="";for(;e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,16))){if(";"===t){e.next();break}break}r+=t,e.next()}const n=parseInt(r,16);return!Number.isNaN(+n)&&zV(n)?String.fromCharCode(n):null}_parseNumber(e){let t,r="";for(;e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,10))){if(";"===t){e.next();break}break}r+=t,e.next()}const n=parseInt(r,10);return!Number.isNaN(+n)&&zV(n)?String.fromCharCode(n):null}},GV=class extends _V{decodeCharacter(e){e.mark();const t=e.next();let r,n,o,i;if(null==t)return e.reset(),null;if("%"!==t)return e.reset(),null;for(r="",n=0;n<2;n++)o=e.nextHex(),null!=o&&(r+=o);return 2===r.length&&(i=parseInt(r,16),zV(i))?String.fromCharCode(i):(e.reset(),null)}};let KV;"undefined"!=typeof document&&(KV=document.createElement("div"));const YV=Array.prototype.indexOf,XV=[",",".","_"," "],JV=[",",".","-","_"," "],ZV={width:["%"],height:["%"]},QV={default:["-"," ","%"],color:["#"," ","(",")"],image:["(",")",":","/","?","&","-",".",'"',"="," "]},eW={background:["(",")",":","%","/","?","&","-"," ",".",'"',"=","#"],"background-image":QV.image,"background-color":QV.color,"border-color":QV.color,"border-image":QV.image,color:QV.color,icon:QV.image,"list-style-image":QV.image,"outline-color":QV.color},tW={attr_name:["^on[a-z]{1,}","style","href","src"],attr_val:["javascript:","data:"],css_key:["behavior","-moz-behavior","-ms-behavior"],css_val:["expression"]};function rW(e,t,r){let n;if(t){if(YV)return YV.call(t,e,r);for(n=t.length,r=r?r<0?Math.max(0,n+r):r:0;r<n;r++)if(r in t&&t[r]===e)return r}return-1}function nW(e){if(null==e)return"";let t="";const r=document.createTextNode(e);return KV.appendChild(r),t=KV.innerHTML,KV.removeChild(r),t}function oW(e,t,r){let n,o,i,a,s,l,u,c,d;for(e=aW(e).toLowerCase(),t=aW(t),i=0;i<tW.attr_name.length;i++)if(e.match(tW.attr_name[i]))throw new Error(`Unsafe attribute name used: ${e}`);for(i=0;i<tW.attr_val.length;i++)if(t.toLowerCase().match(tW.attr_val[i]))throw new Error(`Unsafe attribute value used: ${t}`);if(n=ZV[e],n||(n=JV),o="",!r){for(a=0;a<e.length;a++){if(s=e.charAt(a),!s.match(/[a-zA-Z\-0-9]/))throw new Error("Invalid attribute name specified");o+=s}o+='="'}for(l=0;l<t.length;l++)u=t.charAt(l),c=t.charCodeAt(l),!u.match(/[a-zA-Z0-9]/)&&rW(u,n)<0?(d=c.toString(16),o+=`&#x${d};`):o+=u;return r||(o+='"'),o}function iW(e,t,r){let n,o,i,a,s,l,u,c,d,p;if(e=aW(e).toLowerCase(),t=aW(t),rW(e,tW.css_key)>=0)throw new Error(`Unsafe property name used: ${e}`);for(n=0;n<tW.css_val.length;n++)if(t.toLowerCase().indexOf(tW.css_val[n])>=0)throw new Error(`Unsafe property value used: ${t}`);if(o=eW[e],o||(o=QV.default),i="",!r){for(a=0;a<e.length;a++){if(s=e.charAt(a),!s.match(/[a-zA-Z-]/))throw new Error("Invalid Property Name specified");i+=s}i+=": "}for(l=0;l<t.length;l++)u=t.charAt(l),c=t.charCodeAt(l),!u.match(/[a-zA-Z0-9]/)&&rW(u,o)<0?(d=c.toString(16),p="000000".substr(d.length),i+=`\\${p}${d}`):i+=u;return i}function aW(e,t){let r,n,o,i,a=!1;if(null===e)return null;r=e,n=e,o=0;const s=[new UV,new GV,new $V];for(;!a;){n=r;for(let e=0;e<s.length;e++)i=s[e].decode(r),i!==r&&(o++,r=i);n!==r||(a=!0)}if(t&&o>1)throw new Error("Attack Detected - Multiple/Double Encodings used in input");return r}const sW=[];for(let e=0;e<255;e++)sW[e]=e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122?null:e.toString(16);const lW={html:e=>nW(e.unsafe),css(e){let t,r=[];const n=[],o={};let i="";for(t in e.map?r=e.map:r[e.name]=e.unsafe,r)"function"!=typeof r[t]&&r.hasOwnProperty(t)&&(n[t]=iW(t,r[t],!0),i+=iW(t,r[t],!0),o[t]=n[t]);return e.map?o:i},attr(e){let t=[];const r=[],n={};let o="";e.map?t=e.map:t[e.name]=e.unsafe;for(const e in t)"function"!=typeof t[e]&&t.hasOwnProperty(e)&&(r[e]=oW(e,t[e],!0),o+=oW(e,t[e],!0),n[e]=r[e]);return e.map?n:o}};function uW(e,t){throw new Error(t)}var cW={canonicalize:aW,encode:function(){const e={context:"html",unsafe:null,name:null,map:null,setter:null,strict:!0};return 1===arguments.length&&"object"==typeof arguments[0]?function(){let e,t,r;const n=arguments[0]||{};let o=1;const i=arguments.length;for(;o<i;o++)if(null!=(e=arguments[o]))for(t in e)if(e.hasOwnProperty(t)){if(r=e[t],n===r)continue;void 0!==r&&(n[t]=r)}}(e,arguments[0]):(e.context=arguments[0],2===arguments.length?"html"===e.context?e.unsafe=arguments[1]:"attr"!==e.context&&"css"!==e.context||(e.map=arguments[1]):(e.name=arguments[2],e.unsafe=arguments[1])),"html"===e.context?lW.html(e):"css"===e.context?(null!=e.map&&"object"!=typeof e.map&&uW(this,"Invalid parameter type"),lW.css(e)):"attr"===e.context?(null!=e.map&&"object"!=typeof e.map&&uW(this,"Invalid parameter type"),lW.attr(e)):void uW(this,"Invalid parameter type")},encodeForAttr:oW,encodeForAttr2:function(e){return oW("nonsens",e,!0)},encodeForCSS:iW,encodeForHref:function(e){aW(e),0!==e.search("[a-zA-Z0-9]+:")&&(e=`http://${e}`);const t=new LV(e),r=LV.encodeAuthorityAndPath(t.authorityAndPath),n=t.searchParams;e=r+LV.encodeSearchParams(n)+t.hash;const o=decodeURI(e).toLowerCase();if(-1!==o.indexOf("javascript:"))throw new Error("Attack Detected - Javascript in input");if(-1!==o.indexOf("data:"))throw new Error("Attack Detected - data in input");return e},encodeForJS:function(e,t){let r,n,o,i,a,s;for(t||(t=XV),s="",r=0;r<e.length;r++)o=e.charAt(r),i=e.charCodeAt(r),rW(o,t)>=0||null==sW[i]?s+=o:(n=i.toString(16),i<256?(a="00".substr(n.length),s+=`\\x${a}${n.toUpperCase()}`):(a="0000".substr(n.length),s+=`\\u${a}${n.toUpperCase()}`));return s},encodeForHTML:nW,encodeForURL:function(e,t){let r="";return t&&(t.match(/^[A-Za-z\-0-9]{1,}$/)?r+=aW(t).toLowerCase():uW(this,"Illegal Attribute Name Specified"),r+='="'),r+=encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A"),r+=t?'"':"",r},isSafeDataURL:(e,t)=>{const{maxByteSizeSvg:r=TV,maxByteSizeImage:n=PV}=t??{},{mimeType:o,encoding:i,data:a}=(e=>{const[,t,r,n]=DV.exec(e.trim())??[];return{encoding:r,data:n,mimeType:t?.toLocaleLowerCase()}})(e);if(!a)return!0;const s=((e,t,r)=>{const n={type:e};if(t?.includes(";base64"))try{return new Blob([atob(r)],n).size}catch{return new Blob([r],n).size}return"image/svg+xml"===e?new Blob([r],n).size:0})(o,i,a);return"image/svg+xml"===o?s<=r:s<=n},validateURI:function(e){if(""===e||function(e){if("canParse"in URL)return URL.canParse(e);try{return new URL(e),!0}catch{return!1}}(e))return!1;const t=e.replace(/%2E/gi,".");if(t.match(/[#&=: ]/))return!1;const r=function(e){let t=e,r="";for(;t.length>0;)if(t.startsWith("../")||t.startsWith("./"))t=t.replace(/^\.\.?\//,"");else if(t.startsWith("/./"))t=t.replace(/^\/\.\//,"/");else if("/."===t)t="/";else if(t.startsWith("/../")){t=t.replace(/^\/\.\.\//,"/");const e=r.lastIndexOf("/");-1!==e&&(r=r.slice(0,e))}else if("/.."===t){t="/";const e=r.lastIndexOf("/");-1!==e&&(r=r.slice(0,e))}else if("."===t||".."===t)t="";else{const e=t.match(/^\/?[^/]*/),n=e?e[0]:"";t=t.slice(n.length),r+=n}return r}(t);return""!==r&&"/"!==r&&r}};const dW=(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"}}},pW=({text:e,url:t,imageSize:r,imagePosition:n,labelStructure:o,imageBox:i,direction:a})=>!n||t&&(t.toLowerCase().includes("javascript:")||!cW.isSafeDataURL(t))?{type:v$.Text,url:void 0,text:e,labelStructure:o}:{type:v$.Image,url:t||"",text:e,imageSize:r,resolvedImagePosition:dW(n,a),labelStructure:o,imageBox:i},fW=(e,t,r,n)=>{if(!e.qMiniChart||!t?.miniChart||!r)return{type:v$.Text,text:n};const{minY:o,maxY:i}=((e,t,r)=>{const n="global"===t.yAxis?.scale,o="zeroCenter"===t.yAxis?.position,i=n?r.qYMin:e.qMiniChart.qMin,a=n?r.qYMax:e.qMiniChart.qMax;if(o){const e=Math.max(Math.abs(i),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,i),maxY:Math.max(0,a)}:{minY:i,maxY:a}})(e,t.miniChart,r),a={type:t.miniChart.type,qMatrix:e.qMiniChart.qMatrix,minY:o,maxY:i,showDots:!!t.miniChart.showDots,colors:t.miniChart.colors,colorMin:e.qMiniChart.qMin,colorMax:e.qMiniChart.qMax};return{type:v$.MiniChart,text:n,miniChart:a}},hW=(e,t,r)=>{const n=Array.isArray(t.qAttrExps)?t.qAttrExps[0]:t.qAttrExps,o=n?.qValues?.[e];if(o){const e=Number.isNaN(+o.qNum)?void 0:`${o.qNum}`;return o.qText||e}return r?.urlPosition===y$.Attribute?void 0:r?.urlLabel},mW=({labelStructure:e,text:t,url:r})=>{try{if(!r)throw Error("Invalid url");return{type:v$.Link,url:cW.encodeForHref(r),text:t,labelStructure:e}}catch{return{type:v$.Text,url:void 0,text:t,labelStructure:e}}},gW=({cell:e,representationProperties:t,attrExprInfoIndex:r,env:n,conditionalColoring:o,miniChartOnMeasure:i,measureMinMax:a,labelStructure:s,getText:l=e=>e.qText,direction:u,enabledFeatures:c})=>{const d=x$(t),p=l(e);return d===v$.Image&&c[v$.Image]&&!n.anything.sense?.isUnsupportedFeature?.("tableImages")?((e,t,r,n,o,i)=>{const{imageSize:a,imagePosition:s,imageSetting:l,imageLabel:u,imageBox:c}=t??{};if("url"===l){const t=IV(r.imageUrl??-1,e)?.qText;return i&&(i.maskedValue=t??""),pW({text:n,url:t,imageSize:a,imagePosition:s,labelStructure:i,imageBox:c,direction:o})}if("label"===l){const t=i?i.originalValue:n;if(-1===r.imageLabel)return pW({text:u||t||"",url:t,imageSize:a,imagePosition:s,labelStructure:i,imageBox:c,direction:o});const l=IV(r.imageLabel??-1,e)?.qText??n;return pW({text:l,url:t,imageSize:a,imagePosition:s,labelStructure:i,imageBox:c,direction:o})}return{type:v$.Text,url:void 0,labelStructure:i,text:n}})(e,t,r,p,u,s):d===v$.Link?((e,t,r,n,o)=>{const{urlPosition:i}=t??{};if(i===y$.Attribute){const i=hW(r.url??-1,e,t);return mW({labelStructure:n,text:o||i||"",url:i})}if(i===y$.Dimension){const i=hW(r.urlLabel??-1,e,t)||o;return n&&(n.maskedValue=i),mW({text:i,labelStructure:n,url:n?.originalValue??o})}return{type:v$.Text,url:void 0,text:o,labelStructure:n}})(e,t,r,s,p):d===v$.Indicator&&c[v$.Indicator]&&!n.anything.sense?.isUnsupportedFeature?.("tableIndicators")?((e,t,r)=>{const{indicator:n}=e??{};return{type:v$.Indicator,url:void 0,text:r,indicator:{applySegmentColors:n?.applySegmentColors,position:n?.position,showTextValues:n?.showTextValues},indicatorConditionalColoring:t}})(t,o,p):d===v$.MiniChart&&c[v$.MiniChart]&&!n.anything.sense?.isUnsupportedFeature?.("qMiniChartDef")?fW(e,t,i,p):d===v$.Bar&&c[v$.Bar]?((e,t,r,n,o)=>{const i={type:v$.Text,text:o},a=MV(e);if(!t||void 0===a)return i;const s=t=>{const n=r[t];return void 0===n||n<0?void 0:IV(n,e)},{barRangeMode:l,barColorMode:u,barLabelColorMode:c}=t,d="manual"===l,p=e=>d&&"number"==typeof e&&Number.isFinite(e)?e:void 0,f={value:a,columnMin:p(t.barRangeMin)??n?.qMin??0,columnMax:p(t.barRangeMax)??n?.qMax??0,isManualRange:d,hasNegativeValues:n?.hasNegativeValues,hasPositiveValues:n?.hasPositiveValues,offsetValue:MV(s("barOffset"))??0,thicknessPx:MV(s("barWidth")),label:s("barLabel")?.qText??o,fallbackLabel:o,color:"expression"===u?kV(s("barColor")):void 0,colorPalette:t.barColor,labelColor:"expression"===c?kV(s("barLabelColor")):void 0,labelColorPalette:t.barLabelColor,barEnd:t.barEnd??"none"};return{type:v$.Bar,text:o,bar:f}})(e,t,r,a,p):{type:v$.Text,url:void 0,text:p,labelStructure:s}},bW=zg(e=>{const t=e(Fb),r=e(Cb);return e(Eb),{qTop:0,qHeight:0,rowPartialHeight:r?.content?.rowPartialHeight??0,visibleTop:r?.content?.visibleTop??t?.visibleTop,visibleHeight:r?.content?.visibleHeight??t?.visibleHeight,scrollLeft:r?.content?.scrollLeft??t?.scrollLeft??0,scrollTopRatio:r?.content?.scrollTopRatio??t?.scrollTopRatio,rowsPerPage:r?.content?.rowsPerPage??t?.rowsPerPage,page:r?.content?.page??t?.page,estimatedRowHeight:r?.content?.estimatedRowHeight??0}}),vW=e=>-1===e?{}:e.qAttrExprInfo.reduce((e,{id:t},r)=>(e[t]=r,e),{}),yW=({cId:e})=>e??l$(),xW=["D","T","TS","IV"],SW=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],wW=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],CW=["January","February","March","April","May","June","July","August","September","October","November","December"],EW=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],RW={D:"YYYY-MM-DD",T:"hh:mm:ss",TS:"YYYY-MM-DD hh:mm:ss"},AW=864e5,IW=2**32,MW=e=>{let t=Math.floor(e),r=Math.round((e-t)*AW);r>=AW&&(t+=1,r=0);const n=t-25569,o=n+719468,i=Math.floor(o/146097),a=o-146097*i,s=Math.floor((a-Math.floor(a/1460)+Math.floor(a/36524)-Math.floor(a/146096))/365),l=a-(365*s+Math.floor(s/4)-Math.floor(s/100)),u=Math.floor((5*l+2)/153),c=u<10?u+2:u-10;return{year:s+400*i+(c<=1?1:0),month:c,date:l-Math.floor((153*u+2)/5)+1,day:(n%7+7+3)%7,h:Math.floor(r/36e5),m:Math.floor(r%36e5/6e4),s:Math.floor(r%6e4/1e3),f:r%1e3}},kW=(e,t)=>String(e).padStart(t,"0"),DW=e=>{const[,t]=e.toString().split(".");return t?Number(`0.${t}`):0},PW=/Y+|y+|M+|W+|w+|D+|d+|h+|H+|m+|s+|S+|f+|F+|t{1,2}|T{1,2}/g,TW=(e,t,r)=>{if(Number.isNaN(e)||!Number.isFinite(e))return String(e);let n,o=(r||("IV"===t?RW.T:RW[t])).replace(/\[.+]|\[|]/g,"");"IV"===t?(e<0&&(e=-e,o=`-${o}`),n=((e,t)=>{const r=Math.floor(e);let n=24*DW(e),o=60*DW(n),i=60*DW(o);const a=Math.round(1e3*DW(i));n=Math.floor(n),o=Math.floor(o),i=Math.floor(i),/D+/i.test(t)||(n+=24*r),/h+/i.test(t)||(o+=60*n),/m+/i.test(t)||(i+=60*o);let s=0,l="";if(/w+|t+/i.test(t)){const t=MW(e);s=t.day,l=t.h>=12?"pm":"am"}return{year:0,month:0,day:s,date:r%IW,h:n%IW,m:o%IW,s:i%IW,f:a,t:l}})(e,o)):n=((e,t)=>{const r=MW(e);let n=r.h;return t&&(n%=12,n=n||12),{year:r.year,month:r.month,day:r.day,date:r.date,h:n,m:r.m,s:r.s,f:r.f,t:r.h>=12?"pm":"am"}})(e,/t+/i.test(o));const i=(e=>[[/^(Y+|y+)$/,{Y:`${Number(`${e.year}`.slice(-2))}`,YY:kW(`${e.year}`.slice(-2),2),YYY:kW(`${e.year}`.slice(-3),3),def:t=>kW(`${e.year}`,t.length)}],[/^M+$/,{M:e.month+1,MM:kW(e.month+1,2),MMM:EW[e.month],def:CW[e.month]}],[/^(W+|w+)$/,{W:e.day,WW:kW(e.day,2),WWW:wW[e.day],def:SW[e.day]}],[/^(D+|d+)$/,{def:t=>kW(e.date,t.length)}],[/^(h+|H+)$/,{h:e.h,def:t=>kW(e.h,t.length)}],[/^m+$/,{m:e.m,def:t=>kW(e.m,t.length)}],[/^(s+|S+)$/,{s:e.s,def:t=>kW(e.s,t.length)}],[/^(f+|F+)$/,{def:t=>{const r=`${e.f}`;return r.length>t.length?r.slice(0,t.length):r.padEnd(t.length,"0")}}],[/^(t{1,2}|T{1,2})$/,{def:t=>(t[0].toUpperCase()===t[0]?e.t.toUpperCase():e.t).slice(0,t.length)}]])(n);return o.replace(PW,e=>((e,t)=>{const r=t.find(([t])=>t.test(e))?.[1];if(!r)return"";const n=Object.keys(r).find(t=>"def"!==t&&(t===e||t.toLowerCase()===e)),o=void 0===n?r.def:r[n];return String("function"==typeof o?o(e):o)})(e,i))},qW=/[#0]/,OW={prefix:"",suffix:""},LW=e=>{const t=e.search(qW);if(-1===t)return OW;let r=t;for(let t=e.length-1;t>r;t--)if(qW.test(e[t])){r=t;break}return{prefix:e.slice(0,t),suffix:e.slice(r+1)}},NW=/\B(?=(\d{3})+(?!\d))/g,jW={3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",24:"Y",[-3]:"m",[-6]:"μ",[-9]:"n",[-12]:"p",[-15]:"f",[-18]:"a",[-21]:"z",[-24]:"y"},_W=e=>Number(e.toPrecision(15)),zW=(e,t,r=!1)=>{if(Number.isNaN(e))return String(e);const{qFmt:n,qType:o,qDec:i=".",qThou:a=","}=t??{};if((e=>xW.includes(e))(o))return TW(e,o,n);if(!n)return String(e);const[s,l]=n.split(";"),{suffix:u}=LW(s),c=u.startsWith("A"),d=(c?u.slice(1):u).endsWith("%"),{value:p,siPrefix:f}=((e,t,r)=>{let n=t?_W(100*e):e,o="";if(r&&0!==n&&Number.isFinite(n)){let e=Number(n.toExponential().split("e")[1]);e-=e%3,e in jW&&(o=jW[e],n=_W(n/10**e))}return{value:n,siPrefix:o}})(e,d,c),h=p<0,m=h&&l?l:s,{prefix:g,suffix:b}=LW(m),v=c&&b.startsWith("A")?b.slice(1):b,{decimals:y,useThousands:x}=((e,t,r)=>{const n=e.indexOf(".");let o=0;return-1!==n?o=(e.slice(n+1).match(/[#0]/g)??[]).length:r&&(o=String(Math.abs(t)).split(".")[1]?.length??0),{decimals:Math.min(o,100),useThousands:e.includes(",")}})(m,p,r||"U"===o),[S,w]=Math.abs(p).toFixed(y).split("."),C=x?S.replace(NW,a):S;return`${h&&!l?"-":""}${g}${w?`${C}${i}${w}`:C}${f}${v}`},FW=1e4;function $W(e,t){return[...t].reverse().find(t=>t*e<=FW)||Math.floor(FW/e)}function BW(e,t){if(t?.skipTotals)return{atTop:!1,atBottom:!1};const r=e.qHyperCube.qDimensionInfo.length>0,n=e.qHyperCube.qMeasureInfo.length>0,o=e.qHyperCube.qGrandTotalRow.length>0,i=e.totals?.show,a=e.totals?.position;if(o&&(r&&n||!i&&!r)){if(i||"top"===a)return{atTop:!0,atBottom:!1};if("bottom"===a)return{atTop:!1,atBottom:!0}}return{atTop:!1,atBottom:!1}}function HW(e,t,r,n){return t?0===r?e.totals?.label??"":"":e.qHyperCube.qGrandTotalRow.at(n)?.qText??""}function VW(e,t){const r=e.qHyperCube.qGrandTotalRow.at(t);return bH(r?.qNum)}function WW(e,t,r,n,o){return e&&!e.auto?n&&"rtl"===o&&"center"!==e.align?{headTextAlign:"right"===e.align?"left":"right",totalsTextAlign:"right"===e.align?"left":"right",bodyTextAlign:"right"===e.align?"left":"right"}:{headTextAlign:e.align,totalsTextAlign:e.align,bodyTextAlign:e.align}:n||"rtl"!==o?{headTextAlign:"N"===t||void 0===t?"right":"left",totalsTextAlign:r?"left":"right",bodyTextAlign:"auto"}:{headTextAlign:"N"===t||void 0===t?"left":"right",totalsTextAlign:r?"right":"left",bodyTextAlign:"auto"}}const UW=(e,t,r,n)=>"auto"!==t?t:n||"rtl"!==r?e?"right":"left":e?"left":"right",GW=(e,t)=>{if(!e)return;const{background:r,foreground:n}=e,o=ie(r??""),i=ie(n??""),a=t?"getRGB":"getRGBA",s=o.isInvalid()?void 0:o[a](),l=s?vm(s,Zm):void 0,u=s?vm(s,Qm):void 0;return i.isInvalid()&&void 0!==s?{background:s,color:gm(s),headerMenuHoverBackground:l,headerMenuActiveBackground:u}:{background:s,color:i.isInvalid()?void 0:i.getRGBA(),headerMenuHoverBackground:l,headerMenuActiveBackground:u}};function KW(e,t,r,n,o=()=>!1){const{qDimensionInfo:i,qMeasureInfo:a,qEffectiveInterColumnSortOrder:s}=e.qHyperCube,{colIdx:l,pageColIdx:u,visibleDimInfoIdx:c,visibleMeasureInfoIdx:d}=t,p=i.length,f=l<p,h=f?i[l]:a[l-p],m=f&&i[l].qGrouping===eg.Cyclic,g=l===s[0];let b,v,y,x="",S=!1,w=-1,C=0,E=[];const{representation:R,conditionalColoring:A}=h;if(f&&void 0!==c){const e=h;x=e.qGroupFieldDefs[e.qGroupPos],C=e.qGroupPos,E=e.qGroupFallbackTitles,S=e.qLocked??!1,w=c,({qDimensionType:b}=e)}else({qMiniChart:v}=h),"bar"===R?.type&&(y=(({qMin:e,qMax:t,qAttrExprInfo:r})=>{if("number"!=typeof e||"number"!=typeof t||!Number.isFinite(e)||!Number.isFinite(t))return;const n=r.find(({id:e})=>"barOffset"===e),o=Number.isFinite(n?.qMin)?n?.qMin:0,i=Number.isFinite(n?.qMax)?n?.qMax:0;return{qMin:Math.min(o,o+e),qMax:Math.max(i,i+t),hasNegativeValues:e<0,hasPositiveValues:t>=0}})(h));const{qFallbackTitle:I,textAlign:M,qAttrExprInfo:k,qSortIndicator:D,qReverseSort:P,qApprMaxGlyphCount:T,columnWidth:q,qLibraryId:O,headerColor:L}=h,N=e.nullValueRepresentation?.text,j=!f&&void 0!==N&&yH(N)?zW(xH(N),h.qNumFormat,h.qIsAutoFormat):void 0;return{isDim:f,isCyclic:m,isLocked:S,fieldId:x,colIdx:l,qLibraryId:O,pageColIdx:u,qApprMaxGlyphCount:T,qReverseSort:P,columnWidth:q??{type:Jm.Auto},selectionColIdx:w,isActivelySorted:g,id:yW(h),label:I??"",groupDimensionPos:C,groupDimensionLabels:E,qAttrExprInfoIDs:k.map(e=>e.id),qAttrExprInfoIndex:vW(h),sortDirection:D&&"N"!==D?D:"A",totalInfo:HW(e,f,u,d??-1),...!f&&{isTotalNumeric:VW(e,d??-1)},...WW(M,b,f,r,n),representation:R,conditionalColoring:f?void 0:A,qNumFormat:f?void 0:h.qNumFormat,qIsAutoFormat:f?void 0:h.qIsAutoFormat,formattedNullValueText:j,qMiniChart:v,measureMinMax:y,headerColor:o("VNA-626-TABLE_HEADER_COLOR_BY_EXPRESSION")?GW(L,r):void 0}}const YW=(e,t,r,n=()=>!1)=>{const{qHyperCube:{qColumnOrder:o,qDimensionInfo:i,qMeasureInfo:a}}=e,s=i.length+a.length,l=((e,t,r)=>{const n=t.length,{visible:o,hiddenDim:i,hiddenMea:a}=e.reduce((e,o)=>{const i=o<n,{qError:a}=i?t[o]:r[o-n];return 7005===a?.qErrorCode?i?e.hiddenDim.push(o):e.hiddenMea.push(o):e.visible.push(o),e},{visible:[],hiddenDim:[],hiddenMea:[]});return o.map((e,t)=>{const r=e<n,o=(r?i:a).filter(t=>t<e).length,s=e-o;return{colIdx:e,pageColIdx:t,visibleDimInfoIdx:r?s:void 0,visibleMeasureInfoIdx:r?void 0:s-n}})})(o.length===s?o:Array.from(Array(s).keys()),i,a);return l.map(o=>KW(e,o,t,r,n))},XW=(e,t,r,n)=>e?(n?r.nullValueRepresentation?.dimensionText:void 0)??t.qText??"-":r.nullValueRepresentation?.text??t.qText??"-",JW=(e,t)=>t?-2===e.qElemNumber:!!e.qIsNull,ZW={page:0,rowsPerPage:100,rowsPerPageOptions:[10,25,100]},QW=zg(e=>{const t=e(eU),r=e(bb),n=e(bW),o=r.qHyperCube.qSize.qcy,i=n.visibleHeight??t.rowsPerPage,a=n.visibleTop??t.page*i,s=n.visibleHeight??Math.min(i,o-a),l=r.qHyperCube.qSize.qcx;return t.page>0&&a>=o?{...t,page:0}:s*l>FW?{...t,rowsPerPage:$W(l,t.rowsPerPageOptions),page:0}:t}),eU=zg(ZW),tU=zg(e=>{const t=e(bb),r=e(Fb),n=e(bW);return Nb(t,r)?{page:n.page||ZW.page,rowsPerPage:n.rowsPerPage||ZW.rowsPerPage,rowsPerPageOptions:ZW.rowsPerPageOptions}:e(QW)},(e,t,r)=>{t(eU,e=>({...e,...r}))}),rU=!0,nU=e=>-1===e.qElemNumber||!!e.qIsTotalCell,oU=zg(async e=>{const t=e(bb),r=e(Fb),n=e(_b),{page:o,rowsPerPage:i}=e(tU),a=e(bW),s=e(Wb),l=e(fb),u=e(yb),c=e(hb),d=t.qHyperCube.qSize.qcx,p=t.qHyperCube.qSize.qcy,f=Math.ceil(p/i),h=a.visibleTop??o*i,m=a.visibleHeight??Math.min(i,p-h),g=p>10,b=BW(t,r),v=YW(t,rU,n,c),y=l.flags.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING"),x=c("VNA-977-TABLE-BARS"),S=await(async(e,t,r)=>{if(t.snapshotData)return t.qHyperCube.qDataPages;const n=t.qHyperCube.qDataPages.at(0),o=n?.qArea;return n&&o?.qLeft===r.qLeft&&o.qTop===r.qTop&&o.qWidth===r.qWidth&&o.qHeight>=r.qHeight?[{...n,qMatrix:n.qMatrix.slice(0,r.qHeight)}]:e&&"getHyperCubeData"in e?e.getHyperCubeData("/qHyperCubeDef",[r]):[]})(s,t,{qLeft:0,qTop:h,qHeight:m,qWidth:d});u||(a.qTop=h,a.qHeight=m,a.rowsPerPage=i,a.page=o);const w=S.at(0)?.qMatrix.map((e,r)=>{const o=[],i=e.some(nU);return v.forEach((a,s)=>{const u=e[s],c=!a.isDim&&u.qIsNull,d=a.isDim&&JW(u,a.isDim),p=c||d?XW(a.isDim,u,t,y):u.qText,f=c?yH(p):vH(u),g=vH(u)&&!yH(u.qText??"");o[s]={id:l$(),...u,align:UW(f,a.bodyTextAlign,n,rU),rowIdx:r+h,colIdx:a.colIdx,pageRowIdx:r,pageColIdx:s,selectionColIdx:a.selectionColIdx,isSelectable:a.isDim&&!a.isLocked&&!i&&!d,isTotalRow:i,isLastRow:r===m-1,isNumeric:f,isDual:g,isNull:(!c||!f)&&JW(u,a.isDim),qNumFormat:a.qNumFormat,qIsAutoFormat:a.qIsAutoFormat,formattedNullValueText:a.formattedNullValueText,representation:gW({cell:u,representationProperties:a.representation,attrExprInfoIndex:a.qAttrExprInfoIndex,env:l,conditionalColoring:a.conditionalColoring,miniChartOnMeasure:a.qMiniChart,measureMinMax:a.measureMinMax,getText:()=>p,direction:n,enabledFeatures:{[v$.Image]:!0,[v$.Indicator]:!0,[v$.MiniChart]:!0,[v$.Bar]:!a.isDim&&x}})}}),o})??[];return{totalColumnCount:d,totalRowCount:p,totalPages:f,paginationNeeded:g,totalsPosition:b,columns:v,rows:w}}),iU=XR(oU,e=>e),aU=zg(e=>{const t=e(bb),r=e(Fb),n=e(Db),o=e(_b),i=e(hb),a=YW(t,false,o,i),s=BW(t,r),l=t.qHyperCube.qSize.qcy,u=Math.min(AV,l),c=l>AV&&!!n.active;return{totalsPosition:s,columns:a,rows:[],totalRowCount:l,totalColumnCount:t.qHyperCube.qSize.qcx,totalPages:Math.ceil(l/u),paginationNeeded:c}}),sU={totalsPosition:{atTop:!1,atBottom:!1},columns:[],rows:[],totalRowCount:0,totalColumnCount:0,totalPages:0,paginationNeeded:!1},lU=zg(),uU=zg(e=>{const t=e(Bb),r=e(lU);return r||(t?e(iU)??sU:e(aU))}),cU=zg(e=>e(uU).totalsPosition),dU=zg(e=>e(uU).columns),pU=zg(e=>e(dU).length),fU=zg(e=>e(uU).rows),hU=zg(e=>e(uU).totalRowCount),mU=zg(e=>e(uU).totalColumnCount),gU=zg(e=>e(uU).paginationNeeded),bU=zg(e=>{const t=e(Jb),r=e(ev),n=e(bb),o=e(cU),i=e(fU),a=o.atTop,s=function(e,t,r,n){const o=wV(e)?.content,i=CV("content",t,o);i.background=t.background.color;const a=SV(i.fontSize,r,n),s=o?.hoverColor,l=o?.hoverFontColor,u=t.getStyle("object","","straightTableV2.content.hover.backgroundColor"),c=t.getStyle("object","","straightTableV2.content.hover.color"),d=vV(l)||!!c,p=vV(s)||!!u,f=d||p;let h;h=vV(s)?yV(mm.HOVER,t,s):u||(d?"":mm.HOVER);const m=f?yV(gm(h),t,l):"";return{...i,lastRowBottomBorder:a,hoverColors:{background:h,color:m}}}(n,r,i.length,t),l=EV(n,r,!a),u=function(e,t,r){const n=wV(e)?.content,o=CV("content",t,n),{borderBottomColor:i,borderTopColor:a,background:s}=EV(e,t,r);return{...o,borderBottomColor:i,background:s,borderTopColor:a}}(n,r,a);return{body:s,head:l,totals:u}}),vU=(e,t)=>{if(t){const r=e.getColorPickerColor(t);return"none"===r?"transparent":r}},yU=(e,t,r)=>{const{objectColorFromCSS:n,sheetColorFromCSS:o}=e.background,i=vU(e,t?.background),a=e.getStyle("","",r);return{backgroundColor:i||n||a,backgroundFromStyling:i,sheetColorFromCSS:o}},xU=(e,t,r,n=mm.WHITE)=>{const{backgroundColor:o,backgroundFromStyling:i,sheetColorFromCSS:a}=yU(e,t,r);return Rm(i,o,a,n)??n},SU=e=>{switch(typeof e){case"string":return`${parseInt(e,10)}px`;case"number":return`${e}px`;default:return KH}},wU=e=>e?.some(e=>"italic"===e)?"italic":"normal",CU=(e,t)=>void 0===e?t:e.some(e=>"bold"===e)?YH:"normal",EU=e=>!1===e?1:3,RU=e=>e?.some(e=>"underline"===e)?"underline":"none",AU=zg(e=>{const t=e(Fb),r=e(Bb),n=e(ev),o=e(bb),i=e(bU),a=e(hb),{header:s,dimensionValues:l,measureValues:u,totalValues:c,subTotalValues:d,nullValues:p,dimensionNullValues:f,grid:h,content:m}=wV(o)??{},g=a("VNA-670-SEPARATE_NULL_VALUE_STYLING"),b=r?mm.WHITE:mm.TRANSPARENT,v=xU(n,s,"object.straightTableV2.dimension.label.name.backgroundColor",b),y=t?.maxLineCount??m?.rowHeight??n.getStyle("object.straightTableV2","grid","lineClamp"),x=(g?f:void 0)??p;return{header:{fontFamily:s?.fontFamily??n.getStyle("object.straightTableV2.dimension","label.name","fontFamily")??i.head.fontFamily??XH,fontSize:SU(s?.fontSize??n.getStyle("object.straightTableV2.dimension","label.name","fontSize")??i.head.fontSize),fontStyle:wU(s?.fontStyle),fontWeight:CU(s?.fontStyle,YH),textDecoration:RU(s?.fontStyle),color:vU(n,s?.fontColor)??n.getStyle("object.straightTableV2.dimension","label.name","color")??i.head.color??mm.TEXT,background:v},headerMenuHoverBackground:vm(v,Zm),headerMenuActiveBackground:vm(v,Qm),dimension:{values:{fontFamily:l?.fontFamily??n.getStyle("object.straightTableV2.dimension","label.value","fontFamily")??i.body.fontFamily??XH,fontSize:SU(l?.fontSize??m?.fontSize??n.getStyle("object.straightTableV2.dimension","label.value","fontSize")??i.body.fontSize),fontStyle:wU(l?.fontStyle),fontWeight:CU(l?.fontStyle,"normal"),textDecoration:RU(l?.fontStyle),color:vU(n,l?.fontColor)??vU(n,m?.fontColor)??n.getStyle("object.straightTableV2.dimension","label.value","color")??i.body.color??mm.TEXT,background:yU(n,l,"object.straightTableV2.dimension.label.value.backgroundColor").backgroundColor??i.body.background??mm.TRANSPARENT}},measure:{values:{fontFamily:u?.fontFamily??n.getStyle("object.straightTableV2.measure","label.value","fontFamily")??i.body.fontFamily??XH,fontSize:SU(u?.fontSize??m?.fontSize??n.getStyle("object.straightTableV2.measure","label.value","fontSize")??i.body.fontSize),fontStyle:wU(u?.fontStyle),fontWeight:CU(u?.fontStyle,"normal"),textDecoration:RU(u?.fontStyle),color:vU(n,u?.fontColor)??vU(n,m?.fontColor)??n.getStyle("object.straightTableV2.measure","label.value","color")??i.body.color??mm.TEXT,background:yU(n,u,"object.straightTableV2.measure.label.value.backgroundColor").backgroundColor??i.body.background??mm.TRANSPARENT}},totalRow:{fontFamily:c?.fontFamily??n.getStyle("object.straightTableV2.total","label.value","fontFamily")??i.totals.fontFamily??XH,fontSize:SU(c?.fontSize??m?.fontSize??n.getStyle("object.straightTableV2.total","label.value","fontSize")??i.totals.fontSize),fontStyle:wU(c?.fontStyle),fontWeight:CU(c?.fontStyle,YH),textDecoration:RU(c?.fontStyle),color:vU(n,c?.fontColor)??vU(n,m?.fontColor)??n.getStyle("object.straightTableV2.total","label.value","color")??i.totals.color??mm.TEXT,background:xU(n,c,"object.straightTableV2.total.label.value.backgroundColor",b)},subTotalRow:{fontFamily:d?.fontFamily??n.getStyle("object.straightTableV2.subTotal","label.value","fontFamily")??i.totals.fontFamily??XH,fontSize:SU(d?.fontSize??m?.fontSize??n.getStyle("object.straightTableV2.subTotal","label.value","fontSize")??i.totals.fontSize),fontStyle:wU(d?.fontStyle),fontWeight:CU(d?.fontStyle,YH),textDecoration:RU(d?.fontStyle),color:vU(n,d?.fontColor)??vU(n,m?.fontColor)??n.getStyle("object.straightTableV2.subTotal","label.value","color")??i.totals.color??mm.TEXT,background:xU(n,d,"object.straightTableV2.subTotal.label.value.backgroundColor",b)},dimensionNull:{fontStyle:wU(x?.fontStyle),fontWeight:CU(x?.fontStyle,"normal"),textDecoration:RU(x?.fontStyle),color:vU(n,x?.fontColor)??vU(n,m?.fontColor)??n.getStyle("object.straightTableV2.null","label.value","color")??i.body.color??mm.TEXT,background:vU(n,x?.background)??n.getStyle("","","object.straightTableV2.null.label.value.backgroundColor")??mm.NULL_VALUE_BACKGROUND},measureNull:{fontStyle:wU(p?.fontStyle),fontWeight:CU(p?.fontStyle,"normal"),textDecoration:RU(p?.fontStyle),color:vU(n,p?.fontColor)??vU(n,m?.fontColor)??n.getStyle("object.straightTableV2.null","label.value","color")??i.body.color??mm.TEXT,background:vU(n,p?.background)??n.getStyle("","","object.straightTableV2.null.label.value.backgroundColor")??mm.NULL_VALUE_BACKGROUND},grid:{contentLineClamp:y??EU(o.multiline?.wrapTextInCells),headerLineClamp:EU(o.multiline?.wrapTextInHeaders),border:vU(n,h?.border)??n.getStyle("object.straightTableV2","grid","borderColor")??(n.background.isDark?mm.DARK_MODE_BORDER:mm.BORDER_MEDIUM),divider:vU(n,h?.divider)??n.getStyle("object.straightTableV2.grid","","divider.borderColor")??mm.BORDER_HEAVY,hoverColors:{color:vU(n,m?.hoverFontColor)??n.getStyle("object.straightTableV2","","grid.hover.color")??i.body.hoverColors?.color,background:vU(n,m?.hoverColor)??n.getStyle("object.straightTableV2","","grid.hover.backgroundColor")??i.body.hoverColors?.background},zebraStripes:{show:!!h?.zebraStripes?.show,odd:{color:vU(n,h?.zebraStripes?.color?.odd),background:vU(n,h?.zebraStripes?.background?.odd)},even:{color:vU(n,h?.zebraStripes?.color?.even),background:vU(n,h?.zebraStripes?.background?.even)},overrideDimNullValueBackground:void 0===vU(n,x?.background),overrideDimNullValueColor:void 0===vU(n,x?.fontColor),overrideMeasNullValueBackground:void 0===vU(n,p?.background),overrideMeasNullValueColor:void 0===vU(n,p?.fontColor)},lastRowBottomBorder:i.body.lastRowBottomBorder},selectedColors:bm(n),contentStaticLineCount:y}}),IU=zg(e=>{const t=e(AU);return Math.max(mV(t.header.fontSize)+8,32)}),MU=zg(e=>{const t=e(AU),r=mV(t.totalRow.fontSize);return Math.max(r+9,24)}),kU=zg(e=>{const t=e(AU),r=e(xb),n=e(Sb);return Math.max(r>0?mV(t.dimension.values.fontSize):0,n>0?mV(t.measure.values.fontSize):0)}),DU=zg(e=>{const t=e(AU),r=e(kU),n=(t.contentStaticLineCount||1)*r;return Math.max(n+9,24)}),PU=zg(e=>{const t=e(AU),r=mV(t.subTotalRow.fontSize),n=(t.contentStaticLineCount||1)*r;return Math.max(n+9,24)}),TU=(e,t,r)=>{if(!e.length)return[];const n=[],o=[];let i=t;if(e.forEach((e,a)=>{const{columnWidth:{type:s,pixels:l,percentage:u},label:c,qApprMaxGlyphCount:d,totalInfo:p}=e;let f=0;const h=()=>{n[a]=Math.min(Xm.PixelsMax,Math.max(Xm.PixelsMin,f)),i-=n[a]};switch(s){case Jm.Pixels:f=(e=>void 0===e||Number.isNaN(+e)?Xm.PixelsDefault:+e)(l),h();break;case Jm.Percentage:f=(e=>void 0===e||Number.isNaN(+e)?Xm.PercentageDefault:+e)(u)/100*t,h();break;case Jm.FitToContent:e.representation?.type===v$.Image?o.push(a):(f=r(c,p,d,e.isLocked,e.isActivelySorted,e.isDim,e.isCyclic),h());break;case Jm.Auto:o.push(a);break;default:throw new Error(`${s} is not a valid column width type`)}}),o.length){const e=i/o.length;o.forEach(t=>{n[t]=Math.max(Xm.AutoMinTable,e)})}return n},qU=zg(e=>{const t=e(AU),r=e(uU).totalsPosition,n=e(Rb),{measureText:o}=e(uH({...t.header,fontWeight:YH})),{measureText:i}=e(uH({...t.totalRow,fontWeight:YH})),{estimateWidth:a}=e(uH(t.dimension.values)),{estimateWidth:s}=e(uH(t.measure.values)),l=r.atBottom||r.atTop;return(e,t,r,u,c,d,p)=>{let f;if(n){const t=4;let r=25;r+=t+24,u&&(r+=20+t),c&&(r+=20),f=o(e)+r}else{let t=9;t+=16,p&&(t+=iV),t+=iV,t+=iV,f=o(e)+t}const h=d?a:s;return Math.max(f,l?i(t)+24+1:0,h(r))}}),OU=zg(null),LU=zg(e=>{const t=e(uU),r=e(Xb).width,n=e(hV),o=e(qU);return TU(t.columns,r-n,o)}),NU=zg(e=>e(OU)??e(LU),(e,t,r)=>{t(OU,r)}),jU=SA(e=>{const t=e(dH);!1===e(pV)&&t.emit("done-adjusting-column-width")}),_U=SA((e,t)=>{e(bb),t(OU,null)}),zU=zg(e=>e(NU).reduce((e,t)=>e+t,0)),FU=({children:e})=>(Jg(_U),Jg(jU),e);function $U(e){const t=pm();return t.components?.MuiTable?.styleOverrides&&(t.components.MuiTable.styleOverrides.root={}),lu({...t,direction:e})}const BU={width:"100%",height:"100%",color:"transparent",background:"transparent",borderColor:"transparent"},HU={border:0,boxShadow:"none",borderRadius:0,outline:0,width:0,height:0,background:"transparent",cursor:"pointer",visibility:"hidden"},VU=Mu("input",{shouldForwardProp:e=>"isLastColumn"!==e&&"hoverColor"!==e})(({isLastColumn:e,hoverColor:t,dir:r})=>({position:"absolute",display:"flex",height:"100%",top:0,marginLeft:"-4px",marginRight:"rtl"===r?"-4px":void 0,touchAction:"none",cursor:"col-resize",pointerEvents:"auto",width:(e?4:9)+"px",justifyContent:e?"flex-end":"center",outline:"none",appearance:"none",WebkitAppearance:"none",backgroundColor:"transparent","&::-webkit-slider-runnable-track":{...BU},"&::-moz-range-track":{...BU},"&::-ms-track":{...BU},"&::-webkit-slider-thumb":{appearance:"none",WebkitAppearance:"none",...HU},"&::-moz-range-thumb":{...HU},"&::-ms-thumb":{...HU},"&: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"}})),WU=({columnWidth:e,keyValue:t,isLastColumn:r,isPivot:n,hoverColor:o,updateWidthCallback:i,confirmWidthCallback:a,handleBlur:s,setIsAdjustingWidth:l,isLeftColumn:u,accessibilityRelatedArgs:c,direction:d="ltr"})=>{const p=$m({translator:c.translator}),f=M({initWidth:e,columnWidth:e,initX:0}),h=r?0:1,m=n&&!u,g=()=>m?f.current.columnWidth-h:"100%",b={left:"rtl"!==d?g():void 0,right:"rtl"===d?g():void 0},v=t=>{f.current={initWidth:e,columnWidth:e,initX:t??f.current.initX}};zm(()=>{m&&v()},[e]);const y=e=>{const t=Math.max(e,Xm.PixelsMin);f.current.columnWidth=t,i(t)},x=()=>{if(f.current.columnWidth!==f.current.initWidth){const e={type:Jm.Pixels,pixels:f.current.columnWidth};a(e)}l?.(!1)},S=e=>{const t="rtl"===d?f.current.initWidth+f.current.initX-e.clientX:f.current.initWidth+e.clientX-f.current.initX;y(t)},w=e=>{wm(e),document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",w),x()},C=e=>{const t="rtl"===d?f.current.initWidth+-f.current.initX-e.touches[0].clientX:f.current.initWidth+e.touches[0].clientX-f.current.initX;y(t)},E=e=>{wm(e),document.removeEventListener("touchmove",C),document.removeEventListener("touchend",E),x()},R=!n&&s?e=>{if(e.key===Km.Left||e.key===Km.Right){wm(e);const t=5,r=e.key===Km.Left?t:-t,n="rtl"===d?r:-r;l?.(!0),y(f.current.columnWidth+n)}else e.key===Km.Space||e.key===Km.Enter?(wm(e),s(e),l?.(!1),x()):e.key===Km.Esc&&(wm(e),s(e),l?.(!1),y(f.current.initWidth))}:void 0,A=p.get("NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",[String(c.columnLabel)]);return Gt.jsx(VU,{style:b,hoverColor:o,isLastColumn:r,className:Ym,"data-testid":Ym,onMouseDown:e=>{wm(e),document.addEventListener("mousemove",S),document.addEventListener("mouseup",w),l?.(!0),v(e.clientX)},onDoubleClick:()=>{a({type:Jm.FitToContent})},onTouchStart:e=>{1===e.touches.length&&(wm(e),document.addEventListener("touchmove",C),document.addEventListener("touchend",E),l?.(!0),v(e.touches[0].clientX))},onKeyDown:R,onBlur:s,onFocus:()=>{v()},type:"range",tabIndex:-1,"aria-label":A,"aria-valuemin":Xm.PixelsMin,"aria-valuemax":Xm.PixelsMax,"aria-valuenow":Number(e.toFixed(1)),dir:d},t)},UU=_((e,t)=>Gt.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:Gt.jsx("path",{d:"M15 4H1V2h14zm0 10H1v-2h14zm0-5H1V7h14z"})})),GU=({model:e,headerData:t})=>{if(e&&"setActiveField"in e&&void 0!==t.dimensionInfoIndex){const r=t.dimensionInfoIndex;return async t=>{try{await e.setActiveField("/qHyperCubeDef",r,t)}catch(e){console.error(e)}}}return null},KU=Mu(yd,{shouldForwardProp:e=>"rightAligned"!==e&&"shouldShowMenuIcon"!==e&&"isAccessibleHeader"!==e})(({rightAligned:e,shouldShowMenuIcon:t,isAccessibleHeader:r})=>({...e?{marginRight:"auto"}:{marginLeft:"auto"},height:r?24:void 0,display:t?"flex":"none",fontWeight:"bold",width:r?"100%":void 0,alignItems:"center",justifyContent:"center"})),YU=Mu(UU,{shouldForwardProp:e=>"isInteractionsActive"!==e})(({isInteractionsActive:e})=>({minWidth:"unset",position:"relative",cursor:e?"pointer":"default"})),XU=Mu(Lf)(({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}})),JU=Mu(fp)(({theme:e})=>({"&.MuiDivider-root":{margin:e.spacing(.5)}})),ZU=Mu(Ff)(({theme:e})=>({fontSize:"12px",height:24,fontWeight:"bold",padding:`${e.spacing(.25,2)} !important`,marginBottom:e.spacing(.5)})),QU=Mu(Ff,{shouldForwardProp:e=>"isSubMenu"!==e&&"isActive"!==e})(({theme:e,isSubMenu:t,isActive:r})=>({width:`calc(220px - ${e.spacing(1)} - ${t?10:0}px)`,maxHeight:32,borderRadius:`${e.spacing(.5)} !important`,margin:`${e.spacing(.25,.5)} !important`,padding:`${e.spacing(1,1.5)} !important`,display:"flex !important",justifyContent:"space-between !important","&&:focus":{boxShadow:"rgb(23, 127, 230) 0px 0px 0px 2px"},position:"relative !important",overflow:"hidden",boxSizing:"border-box !important",background:r?"rgba(0, 0, 0, 0.05)":"transparent"})),eG=Mu("div",{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})(({theme:e,direction:t,isPagination:r})=>({position:"absolute",width:e.spacing(.5),height:16,left:0,right:r||"rtl"!==t?void 0:0,top:"50%",transform:"TranslateY(-50%)",borderRadius:"0 2px 2px 0",background:"#01873d"})),tG=Mu("div")(()=>({display:"flex",justifyContent:"space-between",alignItems:"center",maxWidth:"100%"})),rG=Mu(Lc)(()=>({fontFamily:'"Source Sans Pro", HelveticaNeue, "Helvetica Neue", Helvetica, Arial, sans-serif',fontSize:"14px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"})),nG=Mu(lf,{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})(({theme:e,direction:t,isPagination:r})=>({width:16,minWidth:"unset !important",marginRight:r||"rtl"!==t?e.spacing(1.5):0,marginLeft:r||"rtl"!==t?void 0:e.spacing(1.5),lineHeight:0})),oG=_((e,t)=>Gt.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:Gt.jsx("path",{d:"M8.5 8 4 3.5 5.5 2l6 6-6 6L4 12.5z"})})),iG=e=>{const t=e.nextElementSibling;return t?"HR"===t.tagName?iG(t):t:e.parentElement?.children?.[0]},aG=e=>{const t=e.previousElementSibling;if(!t){const t=e.parentElement?.children?.length;return e.parentElement?.children?.[t-1]}return"HR"===t.tagName?aG(t):t},sG=e=>{const{key:t,currentTarget:r}=e,n=document.activeElement??r;if(t===Km.Down||t===Km.Up){const r=e=>t===Km.Down?iG(e):aG(e);e.preventDefault(),e.stopPropagation();let o=r(n);for(;o;){if("true"!==o.ariaDisabled){o.focus();break}o=r(o)}}},lG=(e,t)=>e.map(e=>e.map(e=>({...e.groupHeading?{groupHeading:e.groupHeading}:{},items:e.items.map(({onClick:e,...r})=>({...r,...e?{onClick:async r=>{Object.entries(t).forEach(([,e])=>{e(!1)}),await e(r)}}:{}}))})));let uG={};const cG=({autoFocus:e,id:t,onClick:r,itemTitle:n,icon:o,enabled:i,subMenus:a,isSubMenu:s,isActive:l,direction:u,isPagination:c})=>{const[d,p]=I(!1),f=S.useRef(null),h=q(e=>{e.stopPropagation(),p(!1)},[p]);return Gt.jsxs(Gt.Fragment,{children:[Gt.jsxs(QU,{ref:a?f:null,"data-testid":`menu-item-${t}`,className:"nebula-table-utils-head-menu-item",onClick:async e=>{"keyup"!==e.type&&(r&&(await r(e),uG={}),a?.length&&(p(!0),uG[n]=p,e.stopPropagation()))},disabled:!i,autoFocus:e,isSubMenu:!!s,isActive:!!l,onKeyDown:sG,children:[l?Gt.jsx(eG,{direction:u,isPagination:c}):null,Gt.jsxs(tG,{children:[Gt.jsx(nG,{direction:u,isPagination:c,children:Gt.jsx(o,{})}),Gt.jsx(rG,{variant:"body2",children:n})]}),a?.length?Gt.jsx(oG,{}):null]},t),a?.length?Gt.jsx(hG,{isSubMenu:!0,open:d,anchorEl:f.current,onClose:h,menuGroups:lG(a,uG),transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},direction:u,isPagination:c}):null]})},dG=({menuGroup:e,isSubMenu:t,direction:r,isPagination:n})=>e.map(e=>[[e.groupHeading&&Gt.jsx(ZU,{disabled:!0,style:{opacity:1},children:e.groupHeading},e.groupHeading),e.items.map(e=>Gt.jsx(cG,{...e,isSubMenu:t,direction:r,isPagination:n},e.id))].filter(Boolean)]),pG=({itemGroups:e,isSubMenu:t,direction:r,isPagination:n})=>e.map((o,i)=>[dG({menuGroup:o,isSubMenu:t,direction:r,isPagination:n}),i<e.length-1?Gt.jsx(JU,{"data-testid":"group-divider",variant:"middle"}):void 0]),fG={appear:0,enter:0,exit:0},hG=({anchorEl:e,open:t,onClose:r,menuGroups:n,transformOrigin:o,anchorOrigin:i,isSubMenu:a,direction:s,isPagination:l})=>n.length?Gt.jsx(XU,{className:Wm,open:t,anchorEl:e,onClose:r,transitionDuration:fG,MenuListProps:{id:Um},...i?{anchorOrigin:i}:{},...o?{transformOrigin:o}:{},dir:s,children:pG({itemGroups:n,isSubMenu:a,direction:s,isPagination:l})}):null,mG=({qLibraryId:e,fieldId:t,searchRelatedArgs:r,selectionRelatedArgs:n,direction:o,onPopoverClose:i})=>q(()=>{const a=e?{qLibraryId:e,type:"dimension"}:t;if(r?.embed){const{embed:e,listboxRef:t}=r;e.__DO_NOT_USE__.popover(t.current,a,{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"rtl"===o?"right":"left"},sortCriteria:r.sortCriteria,stateName:n?.qStateName,direction:o,onPopoverClose:i})}},[e,t,r,n?.qStateName,o,i]),gG=(e,t)=>({qInfo:{qType:"tableListbox"},qListObjectDef:Boolean(t.qLibraryId)?{qLibraryId:t.qLibraryId,qStateName:e}:{qDef:{qFieldDefs:[t.fieldId]},qStateName:e}}),bG=(e,t)=>e.some(e=>t[e]>0),vG={canSelectAll:!1,canClearSelections:!1,canSelectPossible:!1,canSelectAlternative:!1,canSelectExcluded:!1},yG=({open:e,qStateName:t="$",headerData:r,app:n})=>{const[o,i]=I(null),[a,s]=I(vG);return zm(()=>{e||(s(vG),i(null))},[e]),P(()=>{if(!n?.createSessionObject||!r.isDim||!e)return()=>{};let o,a=!1;const l=()=>{o&&n.destroySessionObject(o)};return(async()=>{try{const e=gG(t,r),u=await n.createSessionObject(e),c=await u.getLayout(),{qStateCounts:d}=c.qListObject?.qDimensionInfo??{};o=c.qInfo?.qId,a?l():(i(u),d&&s((e=>({canSelectAll:bG(["qOption","qAlternative","qExcluded","qDeselected"],e),canClearSelections:bG(["qSelected"],e),canSelectPossible:bG(["qOption"],e),canSelectAlternative:bG(["qAlternative"],e),canSelectExcluded:bG(["qAlternative","qExcluded"],e)}))(d)))}catch(e){console.error(e)}})(),()=>{a=!0,l()}},[e,n,r,t]),{fieldInstance:o,selectionActionsEnabledStatus:a}},xG=_((e,t)=>Gt.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:Gt.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"})})),SG=_((e,t)=>Gt.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:Gt.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"})})),wG=_((e,t)=>Gt.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:Gt.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"})})),CG=_((e,t)=>Gt.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:Gt.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"})})),EG=_((e,t)=>Gt.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:Gt.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"})})),RG=_((e,t)=>Gt.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:Gt.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"})})),AG=_((e,t)=>Gt.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:Gt.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"})})),IG=_((e,t)=>Gt.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:Gt.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"})})),MG=_((e,t)=>Gt.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:Gt.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"})})),kG=_((e,t)=>Gt.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:Gt.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"})})),DG=_((e,t)=>Gt.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:Gt.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"})})),PG=_((e,t)=>Gt.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:Gt.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"})})),TG=_((e,t)=>Gt.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:Gt.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 qG=function(e){return e.Sorting="sorting",e.Searching="searching",e.Selections="selections",e.AdjusterHeaderSize="adjustHeaderSize",e}({});const OG="/qListObjectDef",LG=({headerData:e,translator:t,menuAvailabilityFlags:r,setOpen:n,sortFromMenu:o,interactions:i,embedListbox:a,fieldInstance:s,selectionActionsEnabledStatus:l,anchorRef:u,focusColumnAdjuster:c,setActiveFieldCallback:d,expandOrCollapseArgs:p})=>{const f=[];if(r[qG.Sorting]){const{isActivelySorted:r,sortDirection:i}=e,{ascendingEnabled:a,descendingEnabled:s}=(({isActivelySorted:e,sortDirection:t,isPivot:r,isSortedByFirstMeasure:n})=>{let o=!r&&!e||"D"===t,i=!r&&!e||"A"===t;return n&&(o=!1,i=!1),{ascendingEnabled:o,descendingEnabled:i}})(e);f.push([{groupHeading:t.get("NebulaTableUtils.MenuGroupLabel.Sorting"),items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortAscending"),onClick:async e=>{e.stopPropagation(),await(o?.(e,"A")),n(!1)},icon:xG,enabled:a,isActive:!!r&&"A"===i,autoFocus:a},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortDescending"),onClick:async e=>{e.stopPropagation(),await(o?.(e,"D")),n(!1)},icon:CG,enabled:s,isActive:!!r&&"D"===i,autoFocus:!a&&s}]}])}if(e.isCyclic&&d){const t=[];t.push([{items:[{id:1,itemTitle:e.groupDimensionLabels[e.groupDimensionPos],enabled:!0,icon:AG,subMenus:[[{items:e.groupDimensionLabels.map((t,r)=>({id:r+1,itemTitle:t,onClick:e=>{e.stopPropagation(),n(!1),d(r)},enabled:!0,icon:jF,isActive:e.groupDimensionPos===r}))}]]}]}]),t.length>0&&f.push(...t)}if(e.isDim&&i?.select){const o=[];r[qG.Searching]&&o.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Search"),onClick:e=>{e.stopPropagation(),n(!1),a()},icon:IG,enabled:!0}]}]),!e.isLocked&&r[qG.Selections]&&o.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Selections"),icon:TG,enabled:!!s,subMenus:[[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAll"),onClick:async e=>{e.stopPropagation(),n(!1),await(s?.selectListObjectAll(OG))},icon:MG,enabled:l.canSelectAll},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectPossible"),onClick:async e=>{e.stopPropagation(),n(!1),await(s?.selectListObjectPossible(OG))},icon:PG,enabled:l.canSelectPossible},{id:3,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAlternative"),onClick:async e=>{e.stopPropagation(),n(!1),await(s?.selectListObjectAlternative(OG))},icon:kG,enabled:l.canSelectAlternative},{id:4,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectExcluded"),onClick:async e=>{e.stopPropagation(),n(!1),await(s?.selectListObjectExcluded(OG))},icon:DG,enabled:l.canSelectExcluded}]}],[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.ClearSelections"),onClick:async e=>{e.stopPropagation(),n(!1),await(s?.clearSelections(OG))},icon:SG,enabled:l.canClearSelections}]}]]}]}]),p&&!p.alwaysFullyExpanded&&f.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Expand"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),n(!1),await p.expandCallback()},icon:RG,enabled:!0},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Collapse"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),n(!1),await p.collapseCallback()},icon:EG,enabled:!0}]}]),o.length>0&&f.push(...o)}return r[qG.AdjusterHeaderSize]&&f.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.AdjustColumnSize"),onClick:e=>{e.stopPropagation(),e.preventDefault(),n(!1),c?.(u)},icon:wG,enabled:!0}]}]),f},NG=({open:e,setOpen:t,anchorRef:r,headerData:n,translator:o,interactions:i,menuAvailabilityFlags:a,shouldShowMenuIcon:s=!0,sortRelatedArgs:l,searchRelatedArgs:u,selectionRelatedArgs:c,adjustHeaderSizeRelatedArgs:d,expandOrCollapseArgs:p,model:f,direction:h="ltr",isPagination:m,isAccessibleHeader:g,iconSize:b=Bm})=>{const v=M(null),y=$m({translator:o}),{qLibraryId:x,fieldId:S,headTextAlign:w}=n,C=c?.app,{fieldInstance:E,selectionActionsEnabledStatus:R}=yG({open:e,headerData:n,app:C,qStateName:c?.qStateName}),A=GU({model:f,headerData:n}),I=mG({qLibraryId:x,fieldId:S,searchRelatedArgs:u,selectionRelatedArgs:c,direction:h}),k=q(e=>{e.stopPropagation(),t(!1)},[t]),D=q(e=>{e.stopPropagation(),t(e=>!e)},[t]);return i.active?Gt.jsxs(KU,{rightAligned:"right"===w,shouldShowMenuIcon:s,className:Vm,onClick:!1===g?D:void 0,ref:v,isAccessibleHeader:g,children:[s?Gt.jsx(YU,{height:b,className:Hm,"data-testid":Hm,isInteractionsActive:i.active??!1,children:Gt.jsx(UU,{})}):null,Gt.jsx(hG,{open:e,anchorEl:!1===g?v.current:r.current,onClose:k,menuGroups:LG({headerData:n,translator:y,menuAvailabilityFlags:a,setOpen:t,...l,embedListbox:I,interactions:i,fieldInstance:E,selectionActionsEnabledStatus:R,anchorRef:r,focusColumnAdjuster:d?.focusColumnAdjuster,setActiveFieldCallback:A,expandOrCollapseArgs:p}),direction:h,isPagination:m})]}):null},jG=e=>e.isDark?{background:e.color,borderColor:mm.DARK_MODE_BORDER,color:mm.DARK_MODE_TEXT,disabledColor:mm.DARK_MODE_DISABLED,iconColor:mm.DARK_MODE_TEXT}:{background:e.color,borderColor:mm.BORDER_MEDIUM,color:mm.TEXT,disabledColor:mm.DISABLED},_G=Mu(yd,{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}`})),zG=Mu(xh,{shouldForwardProp:e=>"footerStyle"!==e})(({footerStyle:e,theme:t})=>({background:"inherit",marginRight:t.spacing(1),color:e.color,"& .MuiNativeSelect-icon, .MuiNativeSelect-select":{color:e.iconColor}})),FG=Mu(kd,{shouldForwardProp:e=>"disabledCondition"!==e&&"footerStyle"!==e})(({disabledCondition:e,footerStyle:t,theme:r})=>({color:e?t.disabledColor:t.color,cursor:e?"default":"pointer",marginLeft:r.spacing(1)})),$G=Mu(Lc)(({theme:e})=>({color:"inherit",margin:e.spacing(0,1,0,1)})),BG=({children:e,footerContainer:t,interactions:r,theme:n,paginationNeeded:o=!0})=>{const i=A(()=>jG(n.background),[n]);if(!r.active)return null;const a=o?Gt.jsx(_G,{footerStyle:i,children:e}):null;return t?H.createPortal(e,t):a},HG=_((e,t)=>Gt.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:Gt.jsx("path",{d:"m12 2 1.5 1.5L9 8l4.5 4.5L12 14 6 8zM4 2v12H2V2z"})})),VG=_((e,t)=>Gt.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:Gt.jsx("path",{d:"m3.5 2 6 6-6 6L2 12.5 6.5 8 2 3.5zM14 2v12h-2V2z"})})),WG=k({}),UG=()=>O(WG),GG=({children:e,direction:t,pageInfo:r,handleChangeRowsPerPage:n,footerContainer:o,isSelectionMode:i,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:u,keyboard:c,translator:d,theme:p,interactions:f,rect:h,layout:m,visibilityThreshold:g})=>{const b=(e=>!e.enabled||e.active)(c)?0:-1,v=A(()=>jG(p.background),[p]),y=o?o.getBoundingClientRect().width:h.width,x=$m({translator:d}),S=A(()=>({direction:t,pageInfo:r,handleChangeRowsPerPage:n,footerContainer:o,isSelectionMode:i,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:u,keyboard:c,translator:x,theme:p,interactions:f,rect:h,layout:m,footerStyle:v,tabIndex:b,width:y,visibilityThreshold:g}),[t,r,n,o,i,a,s,l,u,c,x,p,f,h,m,v,b,y,g]);return Gt.jsx(WG.Provider,{value:S,children:e})},KG=({disabledCondition:e,pageNumber:t,type:r,footerStyle:n,handleChangePage:o,translator:i,interactions:a,tabIndex:s})=>({footerStyle:n,disabledCondition:e,size:"small","data-testid":"pagination-action-icon-button","aria-disabled":e,"aria-label":i.get(`NebulaTableUtils.Pagination.${r}`),title:a.passive?i.get(`NebulaTableUtils.Pagination.${r}`):void 0,tabIndex:s,onClick:e?void 0:()=>{o(t)}});let YG=function(e){return e.FirstPage="FirstPage",e.LastPage="LastPage",e.NextPage="NextPage",e.PreviousPage="PreviousPage",e}({}),XG=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 JG=()=>{const{direction:e,pageInfo:t,width:r,interactions:n,visibilityThreshold:o,footerStyle:i,handleChangePage:a,translator:s,tabIndex:l}=UG(),u=0===t.page,c=KG({type:YG.FirstPage,disabledCondition:u,pageNumber:0,footerStyle:i,handleChangePage:a,translator:s,interactions:n,tabIndex:l});return r<=(o?.firstPage||XG.FirstPage)?null:Gt.jsx(FG,{...c,disabled:!n.active,children:"rtl"===e?Gt.jsx(VG,{height:Bm}):Gt.jsx(HG,{height:Bm})})},ZG=(e,t,r=!1)=>{r&&e.key===Km.Tab&&!e.shiftKey&&(wm(e),Sm(e.target,t,!1))},QG=()=>{const{direction:e,pageInfo:t,keyboard:r,totalPages:n,isSelectionMode:o,width:i,interactions:a,visibilityThreshold:s,footerStyle:l,handleChangePage:u,translator:c,tabIndex:d}=UG(),p=t.page>=n-1,f=KG({type:YG.LastPage,disabledCondition:p,pageNumber:n-1,footerStyle:l,handleChangePage:u,translator:c,interactions:a,tabIndex:d}),h=r.enabled?e=>{ZG(e,r,o)}:void 0;return i<=(s?.lastPage||XG.LastPage)?null:Gt.jsx(FG,{...f,onKeyDown:h,disabled:!a.active,children:"rtl"===e?Gt.jsx(HG,{height:Bm}):Gt.jsx(VG,{height:Bm})})},eK=_((e,t)=>Gt.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:Gt.jsx("path",{d:"m7 8 4.5 4.5L10 14 4 8l6-6 1.5 1.5z"})})),tK=()=>{const{direction:e,pageInfo:t,keyboard:r,totalPages:n,isSelectionMode:o,width:i,interactions:a,footerStyle:s,handleChangePage:l,translator:u,tabIndex:c}=UG(),d=t.page>=n-1,p=KG({type:YG.NextPage,disabledCondition:d,pageNumber:t.page+1,footerStyle:s,handleChangePage:l,translator:u,interactions:a,tabIndex:c}),f=!(i>XG.FirstPage&&i>XG.LastPage)&&r.enabled?e=>{ZG(e,r,o)}:void 0;return Gt.jsx(FG,{...p,onKeyDown:f,disabled:!a.active,children:"rtl"===e?Gt.jsx(eK,{height:Bm}):Gt.jsx(oG,{height:Bm})})},rK=()=>{const{direction:e,pageInfo:t,interactions:r,footerStyle:n,handleChangePage:o,translator:i,tabIndex:a}=UG(),s=0===t.page,l=KG({type:YG.PreviousPage,disabledCondition:s,pageNumber:t.page-1,footerStyle:n,handleChangePage:o,translator:i,interactions:r,tabIndex:a});return Gt.jsx(FG,{...l,disabled:!r.active,children:"rtl"===e?Gt.jsx(oG,{height:Bm}):Gt.jsx(eK,{height:Bm})})},nK=()=>{const{translator:e,width:t,pageInfo:r,totalRowCount:n,visibilityThreshold:o}=UG(),{page:i,rowsPerPage:a}=r;if(t<=(o?.displayedRowsLabel||XG.DisplayedRowsLabel))return null;const s=e.get("NebulaTableUtils.Pagination.DisplayedRowsLabel",[`${i*a+1} - ${Math.min((i+1)*a,n)}`,n.toString()]);return Gt.jsx($G,{variant:"caption",dir:"ltr",children:s})},oK=({name:e,value:t,options:r,handleChange:n})=>{const{layout:o,footerStyle:i,translator:a,tabIndex:s,interactions:l}=UG(),u=o.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 Gt.jsxs(Gt.Fragment,{children:[Gt.jsxs($G,{variant:"caption",id:p,children:[c,":"]}),Gt.jsx(zG,{footerStyle:i,size:"small",native:!0,value:t,onChange:n,inputProps:f,disabled:!l.active,children:r})]})},iK=()=>{const{pageInfo:e,isSelectionMode:t,totalColumnCount:r,width:n,handleChangeRowsPerPage:o,visibilityThreshold:i}=UG();if(!(!!e.rowsPerPageOptions?.length&&!t&&n>(i?.rowsPerPage||XG.RowsPerPage)&&r<=100)||void 0===e.rowsPerPageOptions)return null;const a=Gt.jsx(Gt.Fragment,{children:e.rowsPerPageOptions.map(e=>Gt.jsx("option",{value:e,children:e},e))});return Gt.jsx(oK,{name:"RowsPerPage",value:e.rowsPerPage,options:a,handleChange:e=>{o?.(+e.target.value)}})},aK=1e3,sK="…",lK=({totalPages:e,page:t})=>{const r=Math.min(e,aK),n=r<e&&t>500,o=n?Math.min(500+t,e):r,i=n?Math.max(0,o-aK):0,a=Array.from(Array(r).keys()).map(e=>{const t=e+i;return Gt.jsx("option",{value:t,children:t+1},t)});return i>0&&a.unshift(Gt.jsx("option",{value:sK,disabled:!0,children:sK},"startMoreOptions")),o<e-1&&a.push(Gt.jsx("option",{value:sK,disabled:!0,children:sK},"endMoreOptions")),Gt.jsx(Gt.Fragment,{children:a})},uK=()=>{const{pageInfo:e,width:t,totalPages:r,handleChangePage:n,visibilityThreshold:o}=UG(),{page:i}=e;if(t<=(o?.selectPage||XG.SelectPage))return null;const a=Gt.jsx(lK,{totalPages:r,page:i});return Gt.jsx(oK,{name:"SelectPage",value:i,options:a,handleChange:e=>{n(+e.target.value)}})};var cK=j(e=>Gt.jsxs(GG,{...e,children:[Gt.jsx(iK,{}),Gt.jsx(uK,{}),Gt.jsx(nK,{}),Gt.jsx(JG,{}),Gt.jsx(rK,{}),Gt.jsx(tK,{}),Gt.jsx(QG,{})]}));const dK=e=>Gt.jsx(BG,{...e,children:Gt.jsx(cK,{...e})}),pK=(e,t,r)=>{const n=r.size,o=n>=t.size;if(n){e({keys:[o?"SNTable.SelectionLabel.SelectedValue":"SNTable.SelectionLabel.DeselectedValue",1===n?"SNTable.SelectionLabel.OneSelectedValue":["SNTable.SelectionLabel.SelectedValues",n.toString()]]})}else e({keys:["SNTable.SelectionLabel.ExitedSelectionMode"]})},fK=(e,t,r)=>{r&&t&&(t.classList.contains("selected")?e({keys:["SNTable.SelectionLabel.SelectedValue"]}):e({keys:["SNTable.SelectionLabel.NotSelectedValue"]}))},hK=e=>e.ctrlKey||e.metaKey,mK=e=>e.shiftKey&&hK(e),gK=e=>[Km.Left,Km.Right,Km.Up,Km.Down].includes(e),bK=e=>e.shiftKey&&gK(e.key),vK=e=>(e=>gK(e)||[Km.Home,Km.End,Km.PageUp,Km.PageDown].includes(e))(e.key)&&!mK(e),yK=(e,t)=>{const{api:r,rows:n,colIdx:o}=e,{cell:i,announce:a,evt:s}=t;let l=new Map;if(-1===o)r?.begin(["/qHyperCubeDef"]);else{if(o!==i.selectionColIdx)return e;l=new Map(n)}return l=((e,t,r)=>{const{qElemNumber:n,rowIdx:o}=t;return r.ctrlKey||r.metaKey?(new Map).set(n,o):(e.has(n)?e.delete(n):e.set(n,o),new Map(e))})(l,i,s),pK(a,n,l),l.size?(r?.select({method:"selectHyperCubeCells",params:["/qHyperCubeDef",Array.from(l.values()),[i.selectionColIdx]]}),{...e,rows:l,colIdx:i.selectionColIdx}):(r?.cancel(),{...e,rows:l,colIdx:-1})},xK=(e,t)=>{const{api:r,rows:n,colIdx:o,pageRows:i,firstCell:a}=e,{cell:s,announce:l,evt:u}=t;if(!(a||"key"in u&&bK(u)))return e;-1===o&&r?.begin(["/qHyperCubeDef"]);const c=((e,t,r,n,o)=>{if(!r.isSelectable)return t;const i=new Map(t);if("key"in n&&bK(n)){i.set(r.qElemNumber,r.rowIdx);const t=n.key===Km.Down?1:-1,o=e[r.pageRowIdx+t][r.pageColIdx];return o.isSelectable&&i.set(o.qElemNumber,r.rowIdx+t),i}if(!o)return t;const a=Math.min(o.pageRowIdx,r.pageRowIdx),s=Math.max(o.pageRowIdx,r.pageRowIdx);for(let t=a;t<=s;t++){const r=e[t][o.pageColIdx];r.isSelectable&&i.set(r.qElemNumber,r.rowIdx)}return i})(i,n,s,u,a);return pK(l,n,c),{...e,rows:c,colIdx:a?.selectionColIdx??s.selectionColIdx,isSelectMultiValues:!0}},SK=e=>{const{api:t,rows:r,colIdx:n,isSelectMultiValues:o,mouseupOutsideCallback:i}=e;return i&&document.removeEventListener("mouseup",i),o&&t?.select({method:"selectHyperCubeCells",params:["/qHyperCubeDef",Array.from(r.values()),[n]]}),{...e,isSelectMultiValues:!1,firstCell:void 0,mouseupOutsideCallback:void 0}},wK=(e,t)=>{switch(t.type){case fH.Select:return yK(e,t.payload);case fH.SelectMouseDown:return((e,{cell:t,mouseupOutsideCallback:r})=>!r||-1!==e.colIdx&&e.colIdx!==t.selectionColIdx?e:(document.addEventListener("mouseup",r),{...e,firstCell:t,mouseupOutsideCallback:r}))(e,t.payload);case fH.SelectMouseUp:return((e,t)=>SK(e.isSelectMultiValues||e.firstCell!==t.cell?e:yK(e,t)))(e,t.payload);case fH.SelectMultiAdd:return xK(e,t.payload);case fH.SelectMultiEnd:return SK(e);case fH.Reset:return e.api?.isModal()?e:{...e,rows:new Map,colIdx:-1};case fH.Clear:return e.rows.size?{...e,rows:new Map}:e;case fH.UpdatePageRows:return{...e,pageRows:t.payload.pageRows};default:throw new Error("reducer called with invalid action type")}},CK=zg(e=>{const t=e(Mb);return function(e,t){return zg(e,function(e,r,n){r(this,t(e(this),n))})}({pageRows:e(uU).rows,rows:new Map,colIdx:-1,api:t,isSelectMultiValues:!1},wK)}),EK=zg(e=>e(e(CK)),(e,t,r)=>{t(e(CK),r)}),RK=bM(e=>zg(t=>{const{colIdx:r,rows:n,api:o}=t(EK);return"object"==typeof e&&o?.isModal()?r!==e.selectionColIdx?pH.Disabled:n.has(e.qElemNumber)?pH.Selected:pH.Possible:pH.Inactive}),(e,t)=>"object"!=typeof e||"object"!=typeof t?e===t:e.qElemNumber===t.qElemNumber&&e.selectionColIdx===t.selectionColIdx),AK=zg(e=>{const t=e(zU),r=e(Xb).width,n=e(hV);return t>0&&t+n<r}),IK=()=>{const[e,t]=I(!1);return w_({onDragStart:()=>{t(!0)},onDragEnd:()=>{t(!1)}}),e?Gt.jsx("div",{style:{width:"100%",height:"100%",position:"absolute",top:0,left:0,zIndex:100}}):null},MK=(e,{atTop:t,atBottom:r},n)=>({borderLeftColor:e.grid.border,borderRightColor:e.grid.border,borderTopColor:!n&&r?e.grid.divider:e.grid.border,borderBottomColor:n&&!t||!n&&t?e.grid.divider:e.grid.border}),kK=zg(e=>{const t=e(xb),r=e(Ub);if(void 0!==r)return async(e,n)=>{const{isDim:o,colIdx:i,qReverseSort:a,sortDirection:s,isActivelySorted:l}=e,u=o?i:i-t,c=await r.getEffectiveProperties(),{qInterColumnSortOrder:d}=c.qHyperCubeDef,p=[],f=n!==s||l;if(!o){const e=c.qHyperCubeDef.qMeasures.at(u)?.qSortBy;void 0===e?.qSortByNumeric&&p.push({qPath:`/qHyperCubeDef/qMeasures/${u}/qSortBy`,qOp:"Replace",qValue:JSON.stringify({...e,qSortByNumeric:"A"===s?1:-1})})}if(!l){const e=[i,...d.filter(e=>e!==i)];p.push({qPath:"/qHyperCubeDef/qInterColumnSortOrder",qOp:"Replace",qValue:`[${e.join(",")}]`})}f&&p.push({qPath:`/qHyperCubeDef/${o?"qDimensions":"qMeasures"}/${u}/qDef/qReverseSort`,qOp:"Replace",qValue:(!a).toString()}),r.applyPatches(p,!0)}}),DK=e=>{e&&(e.focus(),(e=>{e?.setAttribute("tabIndex","0")})(e))},PK=({colIdx:e,rowIdx:t,firstColIdx:r,lastColIdx:n})=>(e>r?e--:t>r&&(t--,e=n),[t,e]),TK=({colIdx:e,rowIdx:t,firstColIdx:r,lastColIdx:n,lastRowIdx:o})=>(e<n?e++:t<o&&(t++,e=r),[t,e]),qK=e=>e.atTop?2:1,OK=(e,t)=>({top:e?qK(t):0,bottom:e&&t.atBottom?1:0}),LK=(e,t)=>e.getElementsByClassName("sn-table-row")[t[0]]?.getElementsByClassName("sn-table-cell")[t[1]],NK=e=>e?.setAttribute("tabIndex","0"),jK=e=>e?.setAttribute("tabIndex","-1"),_K=e=>{e.querySelectorAll("td[tabindex='0'], th[tabindex='0']").forEach(jK)},zK=e=>{e?.focus(),NK(e)},FK=e=>{setTimeout(()=>{const t=e.current?.closest(".sn-table-cell")?.querySelector(`.${Ym}`);zK(t)},0)},$K=({evt:e,rootElement:t,cellCoord:r,setFocusedCellCoord:n,allowedRows:o,direction:i})=>{_K(t);const a=((e,t,r,n,o={top:0,bottom:0})=>{const i=o.top>0,a=o.top,s=t.getElementsByClassName("sn-table-row").length-1-o.bottom,l=t.getElementsByClassName("sn-table-head-cell").length-1;let[u,c]=r;switch(e.key){case Km.Down:u<s&&u++;break;case Km.Up:u>a&&u--;break;case Km.Right:if(i)break;[u,c]="rtl"===n?PK({colIdx:c,rowIdx:u,lastColIdx:l,firstColIdx:0}):TK({colIdx:c,rowIdx:u,lastColIdx:l,lastRowIdx:s,firstColIdx:0});break;case Km.Left:if(i)break;[u,c]="rtl"===n?TK({colIdx:c,rowIdx:u,lastColIdx:l,lastRowIdx:s,firstColIdx:0}):PK({colIdx:c,rowIdx:u,lastColIdx:l,firstColIdx:0});break;case Km.Home:(hK(e)||i)&&(u=a),i||(c=0);break;case Km.End:(hK(e)||i)&&(u=s),i||(c=l);break;case Km.PageDown:u=Math.min(s,u+10);break;case Km.PageUp:u=Math.max(a,u-10)}return[u,c]})(e,t,r,i,o),s=LK(t,a);return zK(s),((e,t)=>{const r=t.getElementsByClassName("sn-table-container")[0];if(!r?.scrollTo)return;const[n,o]=e;if(n<2)r.scrollTo({top:0,behavior:"auto"});else{const e=t.getElementsByClassName("sn-table-head-cell")[0],i=t.getElementsByClassName("sn-table-row")[n].getElementsByClassName("sn-table-cell")[o];if(!i||!e)return;if(i.offsetTop-e.offsetHeight<r.scrollTop){const t=r.scrollTop-i.offsetHeight-e.offsetHeight;r.scrollTo({top:Math.max(0,t),behavior:"auto"})}}})(a,t),n(a),{nextCell:s,nextCellCoord:a}},BK=(e,t,r,n)=>{_K(t),r(e),n.enabled&&!n.active?n.focus?.():zK(LK(t,e))},HK=(e,t,r)=>{const n=e.currentTarget;if(!n)return;const o=e.relatedTarget??document.activeElement;if(!!o?.closest(`.${Wm}`))return;const i=!!o&&n.contains(o);!r.enabled||t.current||i||(e=>{const t=e.querySelector(`.${mH.First}`),r=e.querySelector(`.${mH.Second}`);t&&r&&(t.innerHTML="",r.innerHTML="")})(n),((e,t,r)=>{const n=e.currentTarget;if(!r.enabled||t.current||!n)return;const o=e.relatedTarget??document.activeElement;o&&n.contains(o)||r.blur?.(!1)})(e,t,r)},VK=_((e,t)=>Gt.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:Gt.jsx("path",{d:"M8 10a1 1 0 0 1 .5 1.866v.634a.5.5 0 0 1-1 0v-.634A1 1 0 0 1 8 10M3.625 7.035A2 2 0 0 0 2 9v5a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V9a2 2 0 0 0-1.625-1.965V5.383a4.375 4.375 0 0 0-8.75 0zM3 9a1 1 0 0 1 .931-.998h8.138A1 1 0 0 1 13 9v5a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1zm8.375-3.617V7h-6.75V5.383a3.375 3.375 0 0 1 6.75 0"})})),WK=Mu(_h,{shouldForwardProp:e=>"headerStyle"!==e&&"interactions"!==e&&"hoverBackground"!==e&&"background"!==e&&"color"!==e})(({headerStyle:e,interactions:t,hoverBackground:r,background:n,color:o})=>({...JH,...e,cursor:t.active?"pointer":"default",background:n,color:o,verticalAlign:"bottom",boxSizing:"border-box","&&:focus-visible, &&:hover:not(:has(button:hover))":{background:t.active?r:n}})),UK=Mu("span",{shouldForwardProp:e=>"align"!==e&&"dir"!==e})(({align:e,dir:t})=>({minWidth:KH,display:"flex",paddingBottom:"2px",alignSelf:"end",..."right"===e||"rtl"===t&&"center"===e?{paddingRight:"8px"}:{paddingLeft:"8px"}})),GK=parseInt(KH,10)/2,KK=Mu("div")({position:"absolute",bottom:-GK,left:`calc(50% - ${GK}px)`}),YK=Mu(em)({position:"sticky",top:0,zIndex:1}),XK={lineHeight:"calc(4/3)",fontSize:"inherit",textOverflow:"ellipsis",overflow:"hidden"},JK=Mu(yd)({height:"100%","& .sn-table-cell:focus-visible":{outline:"none",boxShadow:"0 0 0 2px #177fe6 inset, 0 0 0 3px #fff inset"},"& .sn-table-cell:focus:not(:focus-visible)":{outline:"none"}}),ZK=Mu("span",{shouldForwardProp:e=>"lineClamp"!==e&&"isHeadCell"!==e&&"isPagination"!==e&&"isNumeric"!==e&&"isDual"!==e})(({lineClamp:e,isHeadCell:t=!1,isPagination:r=!1,isNumeric:n=!1,isDual:o=!1})=>n&&!o||1===e&&!t?{...XK,whiteSpace:"nowrap",display:r?"block":void 0}:{...XK,wordBreak:"break-word",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical",whiteSpace:"pre-line"}),QK=Mu("div")({display:"grid",gridAutoFlow:"column",width:"100%",gridAutoColumns:"1fr auto",gap:"4px"}),eY="cell-text",tY=({children:e,forwardRef:t,isNumeric:r=!1,isPagination:n=!1,isHeadCell:o=!1,isDual:i=!1,lineClamp:a})=>{const s=Jg(AU);return o?Gt.jsx(ZK,{"data-testid":eY,ref:t,className:"sn-table-cell-text",lineClamp:s.grid.headerLineClamp,isPagination:n,isHeadCell:!0,style:{direction:r?"ltr":void 0},children:e}):Gt.jsx(ZK,{"data-testid":eY,ref:t,className:"sn-table-cell-text",isDual:i,isNumeric:r,lineClamp:a??s.grid.contentLineClamp,isPagination:n,style:{direction:r?"ltr":void 0},children:e})},rY=e=>{const{column:t,isInteractionEnabled:r,open:n,setOpen:o,isPagination:i,forwardRef:a}=e,s=Jg(wb),l=Jg(kK),u=Jg(_b),c=Jg(Db),d=Jg(rb),p=Jg(tv),f=Jg(eb),h=Jg(NU)[t.pageColIdx],m=Jg(Wb),g=M(null),b=M(null),v=(({column:e,columnWidth:t})=>{const r=Jg(AU),{measureText:n}=qm({fontSize:r.header.fontSize,fontFamily:r.header.fontFamily,fontWeight:YH});let o=!1,i=!1,a=!1;const s=e.isLocked,l=e.isActivelySorted,u=t-25,c=s?20:0,d=l?20:0;let p=n(e.label);return s&&p+c<=u&&(a=!0,p+=c,l&&p+d<=u&&(i=!0,p+=d)),!s&&l&&p+d<=u&&(i=!0,p+=d),p+24<=u&&(o=!0),{shouldShowMenuIcon:o,shouldShowSortIcon:i,shouldShowLockIcon:a}})({column:t,columnWidth:h}),{StartIcon:y,EndIcon:x,LockIcon:S}=(({sortDirection:e,headTextAlign:t},{shouldShowSortIcon:r,shouldShowLockIcon:n},o)=>{const i="A"===e?Gt.jsx(xG,{height:KH,"data-testid":"head-cell-sort-ascending-icon"}):Gt.jsx(CG,{height:KH,"data-testid":"head-cell-sort-descending-icon"}),a=r?Gt.jsx(UK,{align:t,dir:o,children:i}):void 0,s=n?Gt.jsx(uV,{rightAligned:"right"===t,className:"sn-table-lock-icon",children:Gt.jsx(VK,{height:KH,"data-testid":"head-cell-lock-icon"})}):void 0;return"right"===t?{StartIcon:a,LockIcon:s}:{EndIcon:a,LockIcon:s}})(t,v,u);return Gt.jsxs(lV,{shouldShowMenuIcon:v.shouldShowMenuIcon,shouldShowLockIcon:v.shouldShowLockIcon,alignment:tV(t,i,u),children:[S,Gt.jsxs(sV,{className:"sn-table-head-label",textAlign:t.headTextAlign,direction:u,isPagination:i,children:[y,Gt.jsx(tY,{forwardRef:a,isPagination:i,isHeadCell:!0,children:t.label}),x]}),r?Gt.jsxs(Gt.Fragment,{children:[Gt.jsx(NG,{headerData:{...t,dimensionInfoIndex:t.colIdx},translator:p,anchorRef:g,menuAvailabilityFlags:{[qG.Sorting]:!0,[qG.Searching]:!0,[qG.Selections]:!0,[qG.AdjusterHeaderSize]:!0},open:n,setOpen:o,interactions:c,sortRelatedArgs:{sortFromMenu:(e,r)=>(e.stopPropagation(),l?.(t,r)??Promise.resolve())},searchRelatedArgs:{embed:d,listboxRef:b},selectionRelatedArgs:{app:f,qStateName:s},adjustHeaderSizeRelatedArgs:{focusColumnAdjuster:FK},shouldShowMenuIcon:v.shouldShowMenuIcon,model:m,direction:u,isPagination:i,isAccessibleHeader:!0}),Gt.jsx(aV,{ref:b,direction:u,isPagination:i}),Gt.jsx(aV,{ref:g,direction:u})]}):null]})},nY=_((e,t)=>Gt.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:Gt.jsx("path",{d:"M6 2h10V1H6zm5 5h5V6h-5zm5 5h-5v-1h5zM5 10h1v2.663a3.5 3.5 0 1 0-2.922.036l-.406.914A4.501 4.501 0 1 1 7.329 13H9v1H5z"})})),oY=(e,t)=>e.isCyclic&&t,iY=({column:e})=>{const t=Jg(AU),r=Jg(_b),n=Jg(Wb),o=S.useRef(null),[i,a]=S.useState(!1),s=GU({model:n,headerData:{...e,dimensionInfoIndex:e.colIdx}});return Gt.jsxs(Gt.Fragment,{children:[Gt.jsx(dV,{hoverBackground:e.headerColor?.headerMenuHoverBackground??t.headerMenuHoverBackground,activeBackground:e.headerColor?.headerMenuActiveBackground??t.headerMenuActiveBackground,isActive:i,tabIndex:-1,onClick:e=>{e.stopPropagation(),a(!0)},children:Gt.jsx(nY,{ref:o,height:16,"data-testid":"head-cell-cyclic-icon"})}),Gt.jsx(hG,{open:i,onClose:()=>{a(!1)},menuGroups:[[{items:e.groupDimensionLabels.map((t,r)=>({id:r+1,itemTitle:t,onClick:e=>{e.stopPropagation(),a(!1),s?.(r)},enabled:!0,icon:jF,isActive:e.groupDimensionPos===r}))}]],anchorEl:o.current,direction:r,isPagination:!1})]})},aY=e=>e.isLocked,sY=({column:e})=>{const t=Jg(eb),r=Jg(wb),n=Jg(mb),o=Jg(AU);return Gt.jsx(dV,{tabIndex:-1,hoverBackground:e.headerColor?.headerMenuHoverBackground??o.headerMenuHoverBackground,onClick:o=>{o.stopPropagation(),(async(e,t,r,n={warn:()=>{},error:()=>{}})=>{const o=gG(t??"$",r);let i;try{const t=await(e?.createSessionObject(o));i=t?.id,await(t?.unlock("/qListObjectDef"))}catch(e){n.error({msg:"Failed to unlock field from table header",payload:e})}finally{i&&(await(e?.destroySessionObject(i))||n.error({msg:"Failed to destroy session object when unlocking field from table header"}))}})(t,r,e,n)},children:Gt.jsx(VK,{height:16,"data-testid":"head-cell-lock-icon"})})},lY=({column:e,menuIconRef:t,open:r,setOpen:n})=>{const o=Jg(AU);return Gt.jsx(dV,{tabIndex:-1,hoverBackground:e.headerColor?.headerMenuHoverBackground??o.headerMenuHoverBackground,activeBackground:e.headerColor?.headerMenuActiveBackground??o.headerMenuActiveBackground,isActive:r,order:e.isDim?void 0:-1,onClick:e=>{e.stopPropagation(),n(e=>!e)},ref:t,children:Gt.jsx(UU,{height:16})})},uY=({anchorRef:e,column:t,isPagination:r,listboxRef:n,open:o,setOpen:i})=>{const a=Jg(eb),s=Jg(_b),l=Jg(rb),u=Jg(Db),c=Jg(Wb),d=Jg(wb),p=Jg(tv),f=Jg(kK);return Gt.jsx(NG,{headerData:{...t,dimensionInfoIndex:t.colIdx},translator:p,anchorRef:e,menuAvailabilityFlags:{[qG.Sorting]:!0,[qG.Searching]:!0,[qG.Selections]:!0,[qG.AdjusterHeaderSize]:!0},open:o,setOpen:i,interactions:u,sortRelatedArgs:{sortFromMenu:(e,r)=>(e.stopPropagation(),f?.(t,r)??Promise.resolve())},searchRelatedArgs:{embed:l,listboxRef:n},selectionRelatedArgs:{app:a,qStateName:d},adjustHeaderSizeRelatedArgs:{focusColumnAdjuster:FK},shouldShowMenuIcon:!1,model:c,direction:s,isPagination:r})},cY=zg();cY.onMount=e=>{const t=new Map,r=new ResizeObserver(e=>{for(const r of e){const e=t.get(r.target);e&&e.current(r)}});return e({callbacks:t,observer:r}),()=>{t.clear(),r.disconnect()}};const dY=({ref:e,callback:t})=>{const r=Jg(cY),n=M(t);n.current=t,L(()=>{const t=e.current;return void 0===r?()=>{}:(t&&(r.callbacks.set(t,n),r.observer.observe(t)),()=>{t&&(r.callbacks.delete(t),r.observer.unobserve(t))})},[e,n,r])},pY=Mu(yd)({display:"flex",alignItems:"flex-end",justifyContent:"center",width:"100%",boxSizing:"border-box"}),fY=({children:e})=>{const t=S.useRef(null),[r,n]=I(()=>new Set(e.filter(({props:e})=>void 0!==e.prio&&e.children).map(({key:e})=>e))),o=A(()=>Array.from(e).sort((e,t)=>(e.props.prio??-1/0)-(t.props.prio??-1/0)),[e]),i=q(e=>{const t=new Set,r=e.contentBoxSize.at(0)?.inlineSize??0;let i=0;o.forEach(e=>{if(e.props.ignore||!e.props.children)return;const n=e.props.minWidth+1;void 0===e.props.prio||i+n<=r?i+=n:t.add(e.key)}),n(e=>e.size===t.size&&[...e].every(e=>t.has(e))?e:t)},[o]);return dY({ref:t,callback:i}),Gt.jsx(pY,{ref:t,"data-testid":"responsive-container",children:e.filter(e=>!r.has(e.key))})},hY=({children:e})=>e,mY=(e,t)=>!e.isLocked&&e.isDim&&t,gY=({column:e,open:t,setOpen:r})=>{const n=Jg(AU),o=Jg(wb),i=Jg(_b),a=Jg(rb);Jg(eb);const s=S.useRef(null),l=q(()=>{r(!1)},[r]),u=mG({qLibraryId:e.qLibraryId,fieldId:e.fieldId,searchRelatedArgs:{embed:a,listboxRef:s},selectionRelatedArgs:{qStateName:o},direction:i,onPopoverClose:l});return Gt.jsx(dV,{tabIndex:-1,hoverBackground:e.headerColor?.headerMenuHoverBackground??n.headerMenuHoverBackground,activeBackground:e.headerColor?.headerMenuActiveBackground??n.headerMenuActiveBackground,isActive:t,onClick:e=>{e.stopPropagation(),u(),r(!0)},children:Gt.jsx(IG,{ref:s,height:16,"data-testid":"head-cell-search-icon"})})},bY=({column:e})=>{const{sortDirection:t,isActivelySorted:r}=e,n="A"===t?Gt.jsx(HH,{height:KH,"data-testid":"head-cell-sort-ascending-icon"}):Gt.jsx(FH,{height:KH,"data-testid":"head-cell-sort-descending-icon"});return r?Gt.jsx(KK,{children:n}):void 0},vY=0,yY=1,xY=2,SY=3,wY=e=>{const{column:t,open:r,setOpen:n,isPagination:o,forwardRef:i,columnWidth:a,isInteractionEnabled:s}=e,l=Jg(AU),u=Jg(_b),{measureText:c}=qm(l.header),[d,p]=I(!1),f=M(null),h=M(null),m=M(null),g="number"==typeof a&&a>Xm.PixelsMin+18;return Gt.jsxs(Gt.Fragment,{children:[Gt.jsxs(fY,{children:[Gt.jsx(hY,{prio:xY,minWidth:iV,children:aY(t)?Gt.jsx(sY,{column:t}):null},"Lock"),Gt.jsx(hY,{prio:yY,minWidth:iV,children:oY(t,s)?Gt.jsx(iY,{column:t}):null},"Cyclic"),Gt.jsx(hY,{ignore:!0,children:Gt.jsx(bY,{column:t})},"Sort"),Gt.jsx(hY,{minWidth:c(t.label)+8,children:Gt.jsx(cV,{justifyContent:t.headTextAlign,children:Gt.jsx(tY,{forwardRef:i,isPagination:o,isHeadCell:!0,children:t.label})})},"Text"),Gt.jsx(hY,{prio:g?void 0:vY,minWidth:iV,children:d||mY(t,s)?Gt.jsx(gY,{open:d,setOpen:p,column:t}):null},"Search"),Gt.jsx(hY,{prio:SY,minWidth:iV,children:s?Gt.jsx(lY,{menuIconRef:m,column:t,open:r,setOpen:n}):null},"Menu")]}),s?Gt.jsxs(Gt.Fragment,{children:[Gt.jsx(aV,{ref:h,direction:u,isPagination:o}),Gt.jsx(aV,{ref:f,direction:u}),Gt.jsx(uY,{anchorRef:m.current?m:f,column:t,isPagination:o,listboxRef:h,open:r,setOpen:n})]}):null]})},CY=Mu("div",{shouldForwardProp:e=>"background"!==e&&"applicableStyle"!==e&&"color"!==e})(({background:e,applicableStyle:t,color:r})=>({...t,background:e,color:r})),EY=()=>{},RY=({column:e,isPagination:t})=>{const r=Jg(AU),n=Jg(_b),o=Jg(AK),i=Jg(cU),a=!1,s=Jg(Rb)?rY:wY;return Gt.jsx(CY,{className:"sn-table-cell",applicableStyle:{...r.header,...MK(r,i,!0)},style:{cursor:"pointer",display:"flex",alignItems:"flex-end",borderStyle:"solid",borderRightWidth:nV(n,a,o),borderLeftWidth:oV(n,a,o),borderTopWidth:"0px",borderBottomWidth:"1px",padding:"4px",justifyContent:e.headTextAlign,boxSizing:"border-box",flexDirection:"right"===e.headTextAlign?"row-reverse":"row",userSelect:"none",width:"100%"},background:e.headerColor?.background??r.header.background,color:e.headerColor?.color??r.header.color,children:Gt.jsx(s,{column:e,isInteractionEnabled:!1,isPagination:t,open:!1,setOpen:EY})})},AY=({isPagination:e})=>{const t=Jg(dU),[r,n]=I();w_({onDragStart:e=>{const t=e.operation.source?.id;n(t)},onDragEnd:()=>{}});const o=r?t.find(e=>e.id===r):void 0;return o?Gt.jsx(Qj,{children:Gt.jsx("div",{style:{background:"white",height:"100%",display:"flex",position:"relative"},children:Gt.jsx(RY,{column:o,isPagination:e})})}):null},IY=zg(async e=>{e(bb);const t=e(Ub),r=await(t?.getEffectiveProperties());return r&&structuredClone(r)}),MY=XR(IY,e=>e),kY=zg(e=>e(MY)?.qHyperCubeDef),DY=[aj.configure({activationConstraints:[new rj.Distance({value:5})],preventActivation:e=>{const t=e.target;return t instanceof HTMLElement&&t.classList.contains("nebula-table-utils-column-adjuster")}})],PY=Ij.plugins.filter(e=>e!==ML),TY=(e,t,r)=>{const n=JSON.stringify(t),o=JSON.stringify(r);if(n!==o)return{qPath:e,qOp:"Replace",qValue:o}},qY=(e,t,r,n,o)=>{if(!e||!t||n===o)return;const i=(({qDimensions:e,qMeasures:t,qInterColumnSortOrder:r,visibleColumnIds:n,sourceId:o,targetId:i})=>{const a=u$({qDimensions:e,qMeasures:t}),s=[...e,...t],l=n.findIndex(e=>e===o),u=n.findIndex(e=>e===i);if(l<0||u<0||l===u)return;const c=((e,t,r)=>{const n=[...e],[o]=n.splice(t,1);return n.splice(r,0,o),n})(n,l,u),d=new Map(c.map((e,t)=>[e,t])),p=a.toSorted((e,t)=>{const r=d.get(e.id),n=d.get(t.id);return void 0===r||void 0===n?0:r-n}),f=p.filter(e=>e.isDimension).map(e=>e.def),h=p.filter(e=>!e.isDimension).map(e=>e.def),m=[...f,...h],g=new Map(m.map((e,t)=>[e.qDef.cId,t]));return{qDimensions:f,qMeasures:h,qInterColumnSortOrder:c$({previousColumns:s,nextColumns:m,qInterColumnSortOrder:r}),qColumnOrder:c.map(e=>g.get(e)).filter(e=>void 0!==e)}})({qDimensions:t.qDimensions,qMeasures:t.qMeasures,qInterColumnSortOrder:t.qInterColumnSortOrder,visibleColumnIds:r.map(e=>e.id),sourceId:n,targetId:o});if(!i)return;const a=[TY("/qHyperCubeDef/qDimensions",t.qDimensions,i.qDimensions),TY("/qHyperCubeDef/qMeasures",t.qMeasures,i.qMeasures),TY("/qHyperCubeDef/qInterColumnSortOrder",t.qInterColumnSortOrder,i.qInterColumnSortOrder),TY("/qHyperCubeDef/qColumnOrder",t.qColumnOrder,i.qColumnOrder)].filter(e=>void 0!==e);0!==a.length&&e.applyPatches(a,!0)},OY=({children:e})=>{const t=Jg(Ub),r=Jg(kY),n=Jg(dU);return Gt.jsx(Xj,{onDragOver:e=>{const o=e.operation.source?.id,i=e.operation.target?.id;void 0!==i&&o!==i&&qY(t,r,n,o,i)},sensors:DY,plugins:PY,children:e})};function LY(e,t){const r=M(!1);P(()=>{r.current?e():r.current=!0},t)}const NY=(e,t)=>{const r=Jg(Vb);P(()=>{const n=e.current;if(!n)return;const o=e=>{HK(e,t,r)};return n.addEventListener("focusout",o),()=>{n.removeEventListener("focusout",o)}},[e,t,r])},jY=zg(gH),_Y=bM(e=>zg(t=>{const[r,n]=t(jY);return 0===r&&n===e})),zY=()=>{const e=Jg(tb);P(()=>{e.notifyIsDoneRendering()})};var FY={SNTable_Accessibility_Ascending:{id:"SNTable.Accessibility.Ascending",locale:{"de-DE":"Aufsteigend","en-US":"Ascending","es-ES":"Ascendente","fr-FR":"Croissant","it-IT":"Crescente","ja-JP":"昇順","ko-KR":"오름차순","nl-NL":"Oplopend","pl-PL":"Rosnąco","pt-BR":"Crescente","ru-RU":"По возрастанию","sv-SE":"Stigande","tr-TR":"Artan","zh-CN":"升序","zh-TW":"遞增"}},SNTable_Accessibility_ColumnOptions:{id:"SNTable.Accessibility.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":"欄選項"}},SNTable_Accessibility_Descending:{id:"SNTable.Accessibility.Descending",locale:{"de-DE":"Absteigend","en-US":"Descending","es-ES":"Descendente","fr-FR":"Décroissant","it-IT":"Decrescente","ja-JP":"降順","ko-KR":"내림차순","nl-NL":"Aflopend","pl-PL":"Malejąco","pt-BR":"Decrescente","ru-RU":"По убыванию","sv-SE":"Fallande","tr-TR":"Azalan","zh-CN":"降序","zh-TW":"遞減"}},SNTable_Accessibility_NavigationInstructions:{id:"SNTable.Accessibility.NavigationInstructions",locale:{"de-DE":"Verwenden Sie die Pfeiltasten, um zwischen den Tabellenzellen zu navigieren, und die Tabulatortaste, um zu den Paginierungssteuerelementen zu wechseln. Drücken Sie die Leertaste in den Kopfzellen, um das Spaltenmenü zu öffnen, und drücken Sie die Leertaste in den Körperzellen, um eine Auswahl zu treffen. Duch die Auswahl wird der Seiteninhalt aktualisiert. Die vollständige Liste der Navigationssteuerungen finden Sie in der Dokumentation.","en-US":"Use arrow keys to navigate between table cells and tab to move to pagination controls. Press space on header cells to open the column menu, press space on body cells to make selections. Selections will cause content on the page to be updated. The full list of navigation controls can be found in the documentation.","es-ES":"Utilice las teclas de flecha para desplazarse entre las celdas de la tabla y la pestaña a fin de pasar a los controles de paginación. Pulse la barra espaciadora en las celdas del encabezado para abrir el menú de columnas; pulse la barra espaciadora en las celdas del cuerpo para realizar selecciones. Las selecciones harán que se actualice el contenido de la página. Encontrará la lista completa de controles de navegación en la documentación.","fr-FR":"Utilisez les touches fléchées pour naviguer parmi les cellules du tableau et la tabulation pour accéder aux commandes de pagination. Appuyez sur la touche Espace dans les cellules d'en-tête pour ouvrir le menu de la colonne. Appuyez sur Espace dans les cellules de corps pour effectuer une sélection. Les sélections actualiseront le contenu de la page. Vous pouvez consulter la liste complète des commandes de navigation dans la documentation.","it-IT":"Utilizzare i tasti freccia per navigare tra le celle della tabella e il tasto TAB per passare ai controlli di paginazione. Premere lo spazio nelle celle dell'intestazione per aprire il menu della colonna; premere lo spazio nelle celle del corpo per effettuare selezioni. Le selezioni determineranno l'aggiornamento del contenuto della pagina. È possibile trovare l'elenco completo dei controlli di navigazione nella documentazione.","ja-JP":"矢印キーで表のセル間を移動し、タブ キーでページネーション コントロールに移動します。ヘッダー セルでスペースを押すと列メニューが開き、ボディ セルでスペースを押すと選択ができます。選択によって、ページのコンテンツが更新されます。ナビゲーション コントロールの全リストは、ドキュメントをご覧ください。","ko-KR":"화살표 키를 사용하여 표 셀 사이를 탐색하고, 탭을 사용하여 페이지 번호 컨트롤로 이동하십시오. 헤더 셀에서 스페이스바를 눌러 열 메뉴를 열고, 본문 셀에서 스페이스바를 눌러 선택하십시오. 선택하면 페이지의 콘텐츠가 업데이트됩니다. 전체 탐색 컨트롤 목록은 설명서에서 확인할 수 있습니다.","nl-NL":"Gebruik de pijltjestoetsen om te navigeren tussen tabelcellen en de Tab-toets om naar besturingselementen voor paginering te gaan. Druk op de spatietoets in koptekstcellen om het kolommenu te openen, druk op de spatietoets in hoofdtekstcellen om selecties te maken. Door selecties te maken, wordt de inhoud op de pagina bijgewerkt. De volledige lijst met besturingselementen voor navigatie vindt u in de documentatie.","pl-PL":"Użyj klawiszy strzałek do poruszania się między komórkami tabeli oraz tabulatora do poruszania się po elementach sterujących stronami. Naciśnij klawisz spacji na komórkach nagłówka, aby otworzyć menu kolumny i naciśnij go na komórkach treści, aby dokonać wyborów. Wybory będą powodować aktualizację zawartości na stronie. Pełną listę nawigacyjnych elementów sterujących można znaleźć w dokumentacji.","pt-BR":"Use as teclas de seta para navegar entre as células da tabela e a tecla Tab para mover para os controles de paginação. Pressione espaço nas células do cabeçalho para abrir o menu da coluna, pressione espaço nas células do corpo para fazer seleções. As seleções farão com que o conteúdo da página seja atualizado. A lista completa de controles de navegação pode ser encontrada na documentação.","ru-RU":"Используйте клавиши со стрелками для перемещения между ячейками таблицы и клавишу табуляции для перехода к элементам управления разбивки на страницы. Нажмите пробел на ячейках заголовка, чтобы открыть меню столбца; нажмите пробел на ячейках тела, чтобы сделать выборки. Выборки приведут к обновлению содержимого страницы. Полный перечень элементов управления навигацией см. в документации.","sv-SE":"Använd piltangenterna för att navigera mellan tabellcellerna och tabbtangenten för att flytta till pagineringskontrollerna. Tryck på mellanslag på rubrikceller för att öppna kolumnmenyn och tryck på mellanslag på innehållsceller för att göra urval. Med urval kommer innehåll på sidan att uppdateras. Den fullständiga listan med navigeringsreglage.","tr-TR":"Tablo hücreleri arasında gezinmek için ok tuşlarını, sayfalandırma kontrollerine geçmek için sekmeyi kullanın. Sütun menüsünü açmak için başlık hücrelerinde boşluğa basın, seçim yapmak için gövde hücrelerinde boşluğa basın. Seçimler, sayfadaki içeriğin güncellenmesine neden olur. Navigasyon kontrollerinin tam listesi belgede bulunabilir.","zh-CN":"使用箭头键在表格单元格之间导航,使用 tab 键移动到分页控件。按标题单元格上的空间打开列菜单,按正文单元格上的空间进行选择。选择将导致页面上的内容更新。导航控件的完整列表可以在文档中找到。","zh-TW":"使用方向鍵以在表格儲存格之間導覽,並使用 Tab 以前往分頁控制。按下標頭儲存格的空白處可開啟欄功能表,按下正文儲存格的空白處可進行選取。選項將會造成更新頁面上的內容。導覽控制的完整清單可見於文件中。"}},SNTable_Accessibility_RowsAndColumns:{id:"SNTable.Accessibility.RowsAndColumns",locale:{"de-DE":"Es werden {0} Zeilen und {1} Spalten angezeigt.","en-US":"Showing {0} rows and {1} columns.","es-ES":"Mostrando {0} filas y {1} columnas.","fr-FR":"Affichage de {0} lignes et de {1} colonnes.","it-IT":"Visualizzazione di {0} righe e {1} colonne.","ja-JP":"{0} 行 {1} 列を表示しています。","ko-KR":"{0}개의 행과 {1}개의 열을 표시합니다.","nl-NL":"{0} rijen en {1} kolommen worden getoond.","pl-PL":"Wyświetlane wiersze: {0} i kolumny: {1}.","pt-BR":"Mostrando {0} linhas e {1} colunas.","ru-RU":"Показаны строки ({0}) и столбцы ({1}).","sv-SE":"Visar {0} rader och {1} kolumner.","tr-TR":"{0} satır ve {1} sütun gösteriliyor.","zh-CN":"正在显示 {0} 行,{1} 列。","zh-TW":"顯示 {0} 列和 {1} 欄。"}},SNTable_MenuItem_AdjustColumnSize:{id:"SNTable.MenuItem.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":"調整欄大小"}},SNTable_MenuItem_ClearSelections:{id:"SNTable.MenuItem.ClearSelections",locale:{"de-DE":"Auswahl 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":"Selecties 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":"清除選項"}},SNTable_MenuItem_Search:{id:"SNTable.MenuItem.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":"搜尋"}},SNTable_MenuItem_SelectAll:{id:"SNTable.MenuItem.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":"全選"}},SNTable_MenuItem_SelectAlternative:{id:"SNTable.MenuItem.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":"選取替代選項"}},SNTable_MenuItem_SelectExcluded:{id:"SNTable.MenuItem.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":"選取排除值"}},SNTable_MenuItem_SelectPossible:{id:"SNTable.MenuItem.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":"選取可能值"}},SNTable_MenuItem_Selections:{id:"SNTable.MenuItem.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":"選項"}},SNTable_MenuItem_SortAscending:{id:"SNTable.MenuItem.SortAscending",locale:{"de-DE":"Sortierung in aufsteigender Reihenfolge","en-US":"Sort ascending","es-ES":"Orden ascendente","fr-FR":"Tri 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":"以遞增方式排序"}},SNTable_MenuItem_SortDescending:{id:"SNTable.MenuItem.SortDescending",locale:{"de-DE":"Sortierung in absteigender Reihenfolge","en-US":"Sort descending","es-ES":"Orden descendente","fr-FR":"Tri 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":"以遞減方式排序"}},SNTable_Pagination_DisplayedRowsLabel:{id:"SNTable.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":"{1}의 {0}","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}"}},SNTable_Pagination_FirstPage:{id:"SNTable.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":"移至第一頁"}},SNTable_Pagination_LastPage:{id:"SNTable.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":"移至最後一頁"}},SNTable_Pagination_NextPage:{id:"SNTable.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":"移至下一頁"}},SNTable_Pagination_PageStatusReport:{id:"SNTable.Pagination.PageStatusReport",locale:{"de-DE":"Die Seite wurde geändert. Seite {0} von {1} wird angezeigt.","en-US":"Page has changed. Showing page {0} of {1}.","es-ES":"La página ha cambiado. Mostrando página {0} de {1}.","fr-FR":"La page a changé. Affichage de la page {0} sur {1}.","it-IT":"La pagina è cambiata. Visualizzazione pagina {0} di {1}.","ja-JP":"ページが変更されました。{1} ページ中の {0} ページ目を表示しています。","ko-KR":"페이지가 변경되었습니다. {1}의 {0} 페이지를 보여 줍니다.","nl-NL":"Pagina is gewijzigd. Pagina {0} van {1} wordt weergeven.","pl-PL":"Strona się zmieniła Wyświetlanie strony {0} z {1}.","pt-BR":"A página mudou. Mostrando página {0} de {1}.","ru-RU":"Страница изменилась. Показана страница {0} из {1}.","sv-SE":"Sidan har ändrats. Visar sida {0} av {1}.","tr-TR":"Sayfa değişti. Sayfa {0} / {1} gösteriliyor.","zh-CN":"页面已更改。显示页面 {0} / {1}。","zh-TW":"頁面已變更。顯示第 {0} 頁,共 {1} 頁。"}},SNTable_Pagination_PreviousPage:{id:"SNTable.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":"移至上一頁"}},SNTable_Pagination_RowsPerPage:{id:"SNTable.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":"每頁列數"}},SNTable_Pagination_RowsPerPageChange:{id:"SNTable.Pagination.RowsPerPageChange",locale:{"de-DE":"Zeilen pro Seite wurden in {0} geändert. Jetzt wird die erste Seite angezeigt.","en-US":"Rows per page has changed to {0}. Now showing the first page.","es-ES":"El número de filas por página ha cambiado a {0}. Mostrando ahora la primera página.","fr-FR":"Le nombre de lignes par page a été remplacé par {0}. Affichage en cours de la première page.","it-IT":"Le righe per pagina sono cambiate a {0}. Viene ora mostrata la prima pagina.","ja-JP":"ページあたりの行数が {0} に変更されました。現在、最初のページを表示しています。","ko-KR":"페이지당 행 수가 {0}(으)로 변경되었습니다. 이제 첫 페이지를 보여 줍니다.","nl-NL":"Aantal rijen per pagina is gewijzigd naar {0}. De eerste pagina wordt nu weergegeven.","pl-PL":"Liczba wierszy na stronę została zmieniona na {0}. Wyświetlana jest pierwsza strona.","pt-BR":"Linhas por página mudou para {0}. Agora mostrando a primeira página.","ru-RU":"Количество строк на странице изменилось на {0}. Теперь отображается первая страница.","sv-SE":"Rader per sida har ändrats till {0}. Nu visas första sidan.","tr-TR":"Sayfa başına satır sayısı {0} olarak değiştirildi. Şimdi ilk sayfa gösteriliyor.","zh-CN":"每页行数已更改为 {0}。现在显示第一页。","zh-TW":"每頁列數已變更為 {0}。現在顯示第一頁。"}},SNTable_Pagination_SelectPage:{id:"SNTable.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":"選取頁面"}},SNTable_SelectionLabel_DeselectedValue:{id:"SNTable.SelectionLabel.DeselectedValue",locale:{"de-DE":"Die Werteauswahl ist aufgehoben.","en-US":"Value is deselected.","es-ES":"El valor no está seleccionado.","fr-FR":"La valeur est désélectionnée.","it-IT":"Il valore è deselezionato.","ja-JP":"値が選択解除されました。","ko-KR":"값이 선택 취소되었습니다.","nl-NL":"Selectie van waarde opgeheven.","pl-PL":"Wartość nie jest zaznaczona.","pt-BR":"O valor está desmarcado.","ru-RU":"Выбор значения отменен.","sv-SE":"Val av värde har tagits bort.","tr-TR":"Değer seçimi iptal edildi.","zh-CN":"值已取消选择。","zh-TW":"值已取消選取。"}},SNTable_SelectionLabel_ExitedSelectionMode:{id:"SNTable.SelectionLabel.ExitedSelectionMode",locale:{"de-DE":"Die Werteauswahl ist aufgehoben. Auswahlmodus beendet.","en-US":"Value is deselected. Exited selection mode.","es-ES":"El valor no está seleccionado. Salió del modo de selección.","fr-FR":"La valeur est désélectionnée. Mode de sélection désactivé.","it-IT":"Il valore è deselezionato. Uscita dalla modalità selezione.","ja-JP":"値が選択解除されました。選択モードを終了しました。","ko-KR":"값이 선택 취소되었습니다. 선택 모드를 종료했습니다.","nl-NL":"Selectie van waarde opgeheven. Selectiemodus afgesloten.","pl-PL":"Wartość nie jest zaznaczona. Zakończono tryb wyboru.","pt-BR":"O valor está desmarcado. Modo de seleção encerrado.","ru-RU":"Выбор значения отменен. Выполнен выход из режима выборки.","sv-SE":"Val av värde har tagits bort. Lämnade urvalsläge.","tr-TR":"Değer seçimi iptal edildi. Seçim modundan çıkıldı.","zh-CN":"值已取消选择。已退出选择模式。","zh-TW":"值已取消選取。輸入的選取模式。"}},SNTable_SelectionLabel_NotSelectedValue:{id:"SNTable.SelectionLabel.NotSelectedValue",locale:{"de-DE":"Wert ist nicht ausgewählt.","en-US":"Value is not selected.","es-ES":"El valor no está seleccionado.","fr-FR":"La valeur n'est pas sélectionnée.","it-IT":"Il valore non è selezionato.","ja-JP":"値が選択されていません。","ko-KR":"값이 선택되지 않았습니다.","nl-NL":"Waarde is niet geselecteerd.","pl-PL":"Wartość nie jest wybrana.","pt-BR":"O valor não está selecionado.","ru-RU":"Значение не выбрано.","sv-SE":"Värdet är inte valt.","tr-TR":"Değer seçilmedi.","zh-CN":"未选择值。","zh-TW":"未選取值。"}},SNTable_SelectionLabel_OneSelectedValue:{id:"SNTable.SelectionLabel.OneSelectedValue",locale:{"de-DE":"Aktuell ist ein Wert ausgewählt.","en-US":"Currently there is one selected value.","es-ES":"Actualmente hay un valor seleccionado.","fr-FR":"Actuellement, une valeur est sélectionnée.","it-IT":"Attualmente è presente un solo valore selezionato.","ja-JP":"現在、値が 1 つ選択されています。","ko-KR":"현재 하나의 값이 선택되었습니다.","nl-NL":"Er is momenteel één waarde geselecteerd.","pl-PL":"Aktualnie jest jedna wybrana wartość.","pt-BR":"Atualmente, há um valor selecionado.","ru-RU":"В настоящее время выбрано одно значение.","sv-SE":"Just nu är ett värde valt.","tr-TR":"Şu anda seçili bir değer var.","zh-CN":"当前有一个已选择的值。","zh-TW":"目前有一個選取的值。"}},SNTable_SelectionLabel_SelectedValue:{id:"SNTable.SelectionLabel.SelectedValue",locale:{"de-DE":"Wert ist ausgewählt.","en-US":"Value is selected.","es-ES":"El valor está seleccionado.","fr-FR":"La valeur est sélectionnée.","it-IT":"Il valore è selezionato.","ja-JP":"値が選択されました。","ko-KR":"값이 선택되었습니다.","nl-NL":"Waarde is geselecteerd.","pl-PL":"Wartość jest wybrana.","pt-BR":"O valor está selecionado.","ru-RU":"Значение выбрано.","sv-SE":"Värdet är valt.","tr-TR":"Değer seçildi.","zh-CN":"已选择值。","zh-TW":"已選取值。"}},SNTable_SelectionLabel_SelectedValues:{id:"SNTable.SelectionLabel.SelectedValues",locale:{"de-DE":"Aktuell sind {0} Werte ausgewählt.","en-US":"Currently there are {0} selected values.","es-ES":"Actualmente hay {0} valores seleccionados.","fr-FR":"Actuellement, {0} valeurs sont sélectionnées.","it-IT":"Attualmente sono presenti {0} valori selezionati.","ja-JP":"現在、値が {0} つ選択されています。","ko-KR":"현재 {0}개의 값이 선택되었습니다.","nl-NL":"Er zijn momenteel {0} geselecteerde waarden.","pl-PL":"Liczba aktualnie wybranych wartości: {0}.","pt-BR":"Atualmente, há {0} valores selecionados.","ru-RU":"В настоящее время выбраны значения: {0}.","sv-SE":"Just nu är {0} värden valda.","tr-TR":"Şu anda seçili {0} değer var.","zh-CN":"当前有 {0} 个已选择的值。","zh-TW":"目前有 {0} 個選取的值。"}},SNTable_SelectionLabel_SelectionsConfirmed:{id:"SNTable.SelectionLabel.SelectionsConfirmed",locale:{"de-DE":"Auswahl bestätigt.","en-US":"Selections confirmed.","es-ES":"Confirmadas las selecciones.","fr-FR":"Sélections confirmées.","it-IT":"Selezioni confermate.","ja-JP":"選択が確定されました。","ko-KR":"선택 내용이 확인되었습니다.","nl-NL":"Selecties bevestigd.","pl-PL":"Potwierdzono wybory.","pt-BR":"Seleções confirmadas.","ru-RU":"Выборки подтверждены.","sv-SE":"Valen har bekräftats.","tr-TR":"Seçimler onaylandı.","zh-CN":"选择已确认。","zh-TW":"選項已確認。"}},SNTable_SelectionLabel_selected:{id:"SNTable.SelectionLabel.selected",locale:{"de-DE":"Ausgewählt","en-US":"Selected","es-ES":"Seleccionado","fr-FR":"Sélectionné","it-IT":"Selezionato","ja-JP":"選択済み","ko-KR":"선택됨","nl-NL":"Geselecteerd","pl-PL":"Wybrane","pt-BR":"Selecionado","ru-RU":"Выбрано","sv-SE":"Urval","tr-TR":"Seçildi","zh-CN":"已选择","zh-TW":"已選取"}},SNTable_SortLabel_PressSpaceToSort:{id:"SNTable.SortLabel.PressSpaceToSort",locale:{"de-DE":"Drücken Sie die Leertaste, um nach dieser Spalte zu sortieren","en-US":"Press space to sort on this column","es-ES":"Pulse la barra espaciadora para ordenar en esta columna.","fr-FR":"Appuyez sur Espace pour trier en fonction de cette colonne.","it-IT":"Premere la barra spaziatrice per ordinare questa colonna","ja-JP":"スペース キーを押して、この列をソートします","ko-KR":"이 열을 정렬하려면 스페이스바를 누르십시오.","nl-NL":"Druk op de spatiebalk om sorteren in deze kolom in te schakelen","pl-PL":"Naciśnij spację, aby posortować według tej kolumny","pt-BR":"Pressione espaço para classificar por esta coluna","ru-RU":"Нажмите пробел, чтобы отсортировать по этому столбцу","sv-SE":"Tryck på Blanksteg om du vill sortera efter den här kolumnen","tr-TR":"Bu sütunda sıralama yapmak için boşluk tuşuna basın.","zh-CN":"按下空格键以在该列上排序。","zh-TW":"在此欄按下空格鍵以進行排序"}},SNTable_SortLabel_SortedAscending:{id:"SNTable.SortLabel.SortedAscending",locale:{"de-DE":"In aufsteigender Reihenfolge sortiert.","en-US":"Sorted in ascending order.","es-ES":"Ordenado por orden ascendente.","fr-FR":"Tri dans l'ordre croissant.","it-IT":"Ordinato in ordine crescente.","ja-JP":"昇順で並べ替えられます。","ko-KR":"오름차순으로 정렬되었습니다.","nl-NL":"Gesorteerd in oplopende volgorde.","pl-PL":"Posortowane rosnąco.","pt-BR":"Classificado em ordem crescente.","ru-RU":"Сортировка в порядке возрастания.","sv-SE":"Sorterat i stigande ordning.","tr-TR":"Artan düzende sıralanmıştır.","zh-CN":"已按升序排列。","zh-TW":"已依遞增順序排序。"}},SNTable_SortLabel_SortedDescending:{id:"SNTable.SortLabel.SortedDescending",locale:{"de-DE":"In absteigender Reihenfolge sortiert.","en-US":"Sorted in descending order.","es-ES":"Ordenado por orden descendente.","fr-FR":"Tri dans l'ordre décroissant.","it-IT":"Ordinato in ordine decrescente.","ja-JP":"降順で並べ替えられます。","ko-KR":"내림차순으로 정렬되었습니다.","nl-NL":"Gesorteerd in aflopende volgorde.","pl-PL":"Posortowane malejąco.","pt-BR":"Classificado em ordem decrescente.","ru-RU":"Сортировка в порядке убывания.","sv-SE":"Sorterat i fallande ordning.","tr-TR":"Azalan düzende sıralanmıştır.","zh-CN":"已按降序排列。","zh-TW":"已依遞減順序排序。"}}};const $Y=zg(e=>{const t=e(tv),r=e(Jb),n=e(mb);let o;return function(e){const t="SNTable.Accessibility.RowsAndColumns";e.get(t)===t&&Object.keys(FY).forEach(t=>{e.add(FY[t])})}(t),({keys:e,politeness:i="polite"})=>{const a=e.map(e=>{if(Array.isArray(e)){const[r,...n]=e;return t.get(r,n)}return t.get(e)}).join(" "),s=r.querySelector(`.${mH.First}`),l=r.querySelector(`.${mH.Second}`);if(!s||!l)return void n.error({msg:"could not find aria-live elements, which means accessibility is not working properly"});let u;o===mH.First?(u=l,o=mH.Second):(u=s,o=mH.First),u.innerHTML=u.innerHTML.endsWith(" ")?a:`${a} `,u.setAttribute("aria-live",i)}}),BY=(e,t)=>{const r=Jg($Y),n=Jg(Jb),o=Jg(mU),i=Jg(hU),a=Jg(fU),s=Jg(cU),[l,u]=Qg(jY),c=Jg(Ib),d=Jg(Vb);LY(()=>{const t=((e,t,r=!1)=>{const n=[qK(t),e[1]];return r?n:gH})(l,s,c);(({resetCellCoord:e,rootElement:t,shouldRefocus:r,isSelectionMode:n,setFocusedCellCoord:o,keyboard:i,announce:a})=>{if(_K(t),o(e),!(e=>!e.enabled||e.active)(i))return;const s=LK(t,e);r.current?(zK(s),r.current=!1):NK(s),n&&(a({keys:[s?.textContent??""]}),fK(a,s,n))})({resetCellCoord:t,rootElement:n,shouldRefocus:e,setFocusedCellCoord:u,isSelectionMode:c,keyboard:d,announce:r})},[a.length,i,o,t])},HY=e=>{wm(e),hK(e)&&ng(e.currentTarget)},VY=e=>{vK(e.evt)&&(wm(e.evt),$K(e))},WY=e=>{const{evt:t,totalsPosition:r,cell:n,isSelectionMode:o}=e;if(!vK(t))return;wm(t);const i=((e,t)=>[e.pageRowIdx+qK(t),e.pageColIdx])(n,r),a=OK(o,r),{nextCell:s,nextCellCoord:l}=$K({...e,cellCoord:i,allowedRows:a});l[0]!==i[0]&&(({evt:e,isSelectionsEnabled:t,cell:r,selectionDispatch:n,announce:o,isSelectionMode:i,nextCell:a})=>{e.shiftKey&&t&&r.isSelectable?n({type:fH.SelectMultiAdd,payload:{cell:r,evt:e,announce:o}}):fK(o,a,i)})({...e,nextCell:s})},UY=e=>{const{evt:t}=e;mK(t)?(({evt:e,totalRowCount:t,rowsPerPage:r,page:n,updateShouldRefocus:o,handleChangePage:i})=>{wm(e);const a=Math.ceil(t/r)-1;e.key===Km.Right&&n<a?(o(),i(n+1)):e.key===Km.Left&&n>0&&(o(),i(n-1))})(e):t.key===Km.Esc?(({evt:e,keyboard:t,isSelectionMode:r})=>{t.enabled&&!r&&(wm(e),t.blur?.(!0))})(e):gK(t.key)&&wm(t)},GY=e=>{const{evt:t,selectionsAPI:r}=e;if(t.currentTarget.classList.contains(pH.Disabled))return void wm(t);const n={...e,isSelectionMode:!!r?.isModal()};switch(t.key){case Km.Space:(({evt:e,cell:t,isSelectionsEnabled:r,selectionDispatch:n,announce:o})=>{wm(e),t.isSelectable&&r&&n({type:fH.Select,payload:{cell:t,evt:e,announce:o}})})(n);break;case Km.Enter:(({isSelectionMode:e,selectionsAPI:t,evt:r,announce:n})=>{wm(r),e&&(t?.confirm(),n({keys:["SNTable.SelectionLabel.SelectionsConfirmed"]}))})(n);break;case Km.Esc:(({isSelectionMode:e,selectionsAPI:t,evt:r,announce:n})=>{e&&(wm(r),t?.cancel(),n({keys:["SNTable.SelectionLabel.ExitedSelectionMode"]}))})(n);break;case Km.C:HY(t);break;case Km.Tab:(({evt:e,keyboard:t,isSelectionMode:r,paginationNeeded:n})=>{const o=e.shiftKey||!n;t.enabled&&r&&o&&(wm(e),Sm(e.currentTarget,t,e.shiftKey))})(n);break;default:WY(n)}},KY=e=>{const t=Jg(pV),r=Zg(fV),n=Zg(hV),o=Jg(dH),i=M();dY({ref:e,callback:a=>{const s=()=>{if(e.current){const e=a.borderBoxSize.at(0)?.inlineSize??0,t=a.borderBoxSize.at(0)?.blockSize??0,o=a.contentBoxSize.at(0)?.inlineSize??0,i=t-(a.contentBoxSize.at(0)?.blockSize??0);n(e-o),r(i)}};t?(i.current&&o.off("done-adjusting-column-width",i.current),o.once("done-adjusting-column-width",s),i.current=s):s()}}),P(()=>{const e=o;return()=>{i.current&&e.off("done-adjusting-column-width",i.current)}},[o])},YY=Mu("div")({clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",overflow:"hidden",position:"absolute",whiteSpace:"nowrap",width:"1px"}),XY=Mu(Bh,{shouldForwardProp:e=>"fullHeight"!==e&&"interactions"!==e})(({fullHeight:e,interactions:t})=>({height:e?"100%":"calc(100% - 41px)",overflow:t.scroll?"auto":"hidden",border:"none"})),JY=Mu(Ah,{shouldForwardProp:e=>"borderRight"!==e})(({borderRight:e})=>({tableLayout:"fixed",width:"min-content",borderRight:e})),ZY=()=>Gt.jsxs(Gt.Fragment,{children:[Gt.jsx(YY,{className:mH.First,"data-testid":mH.First,"aria-live":"polite","aria-atomic":"true"}),Gt.jsx(YY,{className:mH.Second,"data-testid":mH.Second,"aria-live":"polite","aria-atomic":"true"})]}),QY=e=>{const t=M(new Map),r=M(null);P(()=>{r.current=e(t.current),t.current.forEach((e,t)=>{r.current?.observe(t)});const n=t.current,o=r.current;return()=>{o.disconnect(),n.clear()}},[e,r,t]);const n=q((e,n)=>{t.current.set(e,n),r.current?.observe(e)},[t,r]),o=q(e=>{t.current.delete(e),r.current?.unobserve(e)},[r,t]);return A(()=>({addTask:n,removeTask:o}),[n,o])},eX=e=>new ResizeObserver(t=>{t.forEach(t=>{const r=e.get(t.target);r?.(t)})}),tX=()=>QY(eX),rX=({updateShouldRefocus:e,tableWrapperRef:t})=>{const r=Jg(Mb),n=Jg(Vb),o=Zg(EK);P(()=>{const i=()=>{o({type:fH.Reset})},a=()=>{o({type:fH.Clear})},s=()=>{t.current?.contains(document.activeElement)?e():n.enabled&&n.blur?.(!0),i()};return r?.on("deactivated",i),r?.on("canceled",i),r?.on("confirmed",s),r?.on("cleared",a),()=>{r?.removeListener("deactivated",i),r?.removeListener("canceled",i),r?.removeListener("confirmed",s),r?.removeListener("cleared",a)}},[r,n,o,e,t])},nX="min(50px, 20%)",oX=({bar:e,height:t})=>{const{value:r,offsetValue:n,columnMin:o,columnMax:i,isManualRange:a,thicknessPx:s,barEnd:l}=e,u=a?o:Math.min(o,0);let c=a?i:Math.max(i,0);c>u||(c=u+1);const d=n,p=n+r,f=r>=0,h=Math.min(d,p),m=Math.max(d,p),g=Math.round(((e,t,r)=>Math.max(t,Math.min(r,e)))(s??("none"===l?1*t:4),2,Math.max(2,t-2))),b=Math.min(((e,t)=>"circle"===e?2*t:"box"===e?t+4:0)(l,g),t),v=Math.min(d,p)<u,y=Math.max(d,p)>c,x="none"===l?25:10+("none"===l?0:b/2+2);return{rangeMin:u,rangeMax:c,hasRoomAtMin:e.hasNegativeValues??(a||u<0||!f),hasRoomAtMax:e.hasPositiveValues??(a||i>=0||f),low:h,high:m,valueEnd:f?m:h,growsTowardsHigh:f,overflowMin:v,overflowMax:y,hasBar:m>h&&m>u&&h<c,thicknessPx:g,capSize:b,hasZeroAxis:u<=0&&c>=0,oobSizePx:x}},iX=Mu("div")({position:"relative",width:"100%",overflow:"hidden"}),aX=Mu("div")({position:"absolute"}),sX=Mu("span")({position:"absolute",top:0,height:"100%",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),lX=Mu("svg")({position:"absolute",display:"block"}),uX=({shape:e,pointsRight:t,width:r,height:n})=>{if("slice"===e)return`M0 0L${r-8} ${n}L0 ${n}ZM8 0L${r} ${n}L${r} 0Z`;const o=r/2,i=o*Math.sin(Math.PI/3),a=t?o/2:1.5*o;return`M${a} ${o-i}L${t?r:0} ${o}L${a} ${o+i}Z`},cX=({height:e,theme:t,bar:r,direction:n,fontFamily:o,fontSize:i})=>{const a=(({bar:e,height:t,isRtl:r})=>{const n=oX({bar:e,height:t}),{rangeMin:o,rangeMax:i,low:a,high:s,overflowMin:l,overflowMax:u,thicknessPx:c,capSize:d,oobSizePx:p}=n,f=n.hasRoomAtMin?nX:"0px",h=n.hasRoomAtMax?nX:"0px",m=f,g=`calc(100% - ${h})`,b=e=>{const t=(Math.min(Math.max(e,o),i)-o)/(i-o);return`calc(${f} + ${t} * (100% - ${f} - ${h}))`},v="none"===e.barEnd,y=v?25:10,x=u?`max(${g} - ${p}px, ${l?m:b(a)})`:b(s),S=l?`min(${m} + ${p}px, ${u?g:b(s)})`:b(a),w=n.growsTowardsHigh?x:S,C=e=>Math.floor((t-e)/2),E=C(c),R=d>0?d/2+4:4,A=e=>{const t=v?c:10;return{key:e,shape:v?"slice":"triangle",pointsRight:"max"===e!==r,width:y,height:t,style:{..."min"===e?{insetInlineStart:f}:{insetInlineEnd:h},top:C(t),width:y,height:t}}};return{zeroAxis:n.hasZeroAxis?{insetInlineStart:`calc(${b(0)} - 0.5px)`,top:0,width:1,height:"100%"}:void 0,bar:n.hasBar?{insetInlineStart:S,width:`max(1px, ${x} - ${S})`,top:E,height:c}:void 0,cap:n.hasBar&&d>0?{insetInlineStart:`calc(${w} - ${d/2}px)`,top:C(d),width:d,height:d,borderRadius:"circle"===e.barEnd?"50%":void 0}:void 0,label:e.label?n.growsTowardsHigh?{insetInlineStart:u?`calc(${g} + 4px)`:l?`max(${x} + ${R}px, ${m} + ${y+4}px)`:`calc(${x} + ${R}px)`,insetInlineEnd:"4px",textAlign:"start"}:{insetInlineStart:"4px",insetInlineEnd:`calc(100% - ${l?`calc(${m} - 4px)`:u?`min(${S} - ${R}px, ${g} - ${y+4}px)`:`calc(${S} - ${R}px)`})`,textAlign:"end"}:void 0,markers:[l?A("min"):void 0,u?A("max"):void 0].filter(e=>void 0!==e)}})({bar:r,height:e,isRtl:"rtl"===n}),s=r.color??ym(t,r.colorPalette,t.getDataColorSpecials().primary),l=r.labelColor??ym(t,r.labelColorPalette,"inherit");return Gt.jsxs(iX,{"data-testid":"bar-container",role:"img","aria-label":r.label||r.fallbackLabel,dir:n,style:{height:e},children:[a.zeroAxis?Gt.jsx(aX,{"data-testid":"bar-zero-axis",style:{...a.zeroAxis,backgroundColor:"#d0d0d0"}}):null,a.bar?Gt.jsx(aX,{"data-testid":"bar",style:{...a.bar,backgroundColor:s}}):null,a.cap?Gt.jsx(aX,{"data-testid":"bar-end-cap",style:{...a.cap,backgroundColor:s}}):null,a.label?Gt.jsx(sX,{"data-testid":"bar-label",style:{...a.label,fontFamily:o,fontSize:i??"14px",lineHeight:`${e}px`,color:l},children:r.label}):null,a.markers.map(e=>Gt.jsx(lX,{"data-testid":`bar-oob-${e.key}`,width:e.width,height:e.height,viewBox:`0 0 ${e.width} ${e.height}`,style:e.style,children:Gt.jsx("path",{d:uX(e),fill:s})},e.key))]})},dX=e=>{e.stopPropagation()},pX=({href:e,text:t,interactions:r,color:n})=>({href:e,title:t,rel:"noreferrer",target:"_blank",underline:"hover",onClick:dX,color:mm.LINK,style:{pointerEvents:r.active?"auto":"none",color:n??void 0,opacity:r.active&&r.passive||n?void 0:.4}}),fX=({href:e,text:t,interactions:r,color:n})=>Gt.jsx(zp,{...pX({href:e,text:t,interactions:r,color:n}),children:t}),hX=window.requestIdleCallback??(e=>setTimeout(()=>{e({})},0)),mX=window.cancelIdleCallback??(e=>{clearTimeout(e)});let gX=0,bX=0,vX=0;const yX="qDimensionInfo/0",xX="qMeasureInfo/0",SX="x",wX="y",CX=e=>({key:"bars",type:"box",data:{extract:{field:yX,props:{start:0,end:{field:xX}}}},settings:{major:{scale:SX},minor:{scale:wX},box:{maxWidthPx:8,fill:{fn:e}}}}),EX=e=>({key:"p",type:"point",data:{extract:{field:yX,props:{y:{field:xX}}}},settings:{x:{scale:SX},y:{scale:wX},shape:"circle",size:1,opacity:1,sizeLimits:{minPx:4,maxPx:4},fill:{fn:e}},preferredSize:{edgeBleed:{left:2,right:2,top:2,bottom:2}}}),RX=({qNum:e})=>void 0===e?0:Math.sign(e),AX=(e,t)=>{const{primary:r,nil:n,others:o}=e.getDataColorSpecials(),i=ym(e,t?.negative,r),a=ym(e,t?.positive,r);return{key:"pos-neg",type:"box",data:{extract:{field:yX,props:{start:0,end:{field:xX,value:RX}}}},settings:{major:{scale:SX},minor:{scale:wX},box:{maxWidthPx:8,fill:{fn:e=>-2===e.datum.value?n:-3===e.datum.value?o:0===e.datum.end.value?"#DDDDDD":Math.sign(e.datum.end.value)<0?i:a}}}}},IX=(e,{type:t,showDots:r,colors:n,colorMin:o,colorMax:i})=>{const a=((e,t,r,n)=>{const{primary:o,nil:i,others:a}=e.getDataColorSpecials(),s=ym(e,t?.main,o),l=ym(e,t?.max,s),u=ym(e,t?.min,s),c=ym(e,t?.first,s),d=ym(e,t?.last,s);return e=>{const t=wX in e.datum?wX:"end";return-2===e.datum.value?i:-3===e.datum.value?a:e.datum[t].value>=n?l:e.datum[t].value<=r?u:e.data.items.at(0)===e.datum?c:e.data.items.at(-1)===e.datum?d:s}})(e,n,o,i);switch(t){case"bars":return[CX(a)];case"dots":return[EX(a)];case"sparkline":{const t=(e=>({key:"lines",type:"line",data:{extract:{field:yX,props:{v:{field:xX}}}},settings:{coordinates:{major:{scale:SX},minor:{scale:wX,ref:"v"}},layers:{line:{strokeWidth:1,stroke:e}}}}))(ym(e,n?.main,e.getDataColorSpecials().primary));return r?[t,EX(a)]:[t]}case"posNeg":return[AX(e,n)];default:return[]}},MX=e=>({qDimensionInfo:[{qFallbackTitle:"",qCardinal:1}],qMeasureInfo:[{qFallbackTitle:""}],qDataPages:[{qArea:{qTop:0,qLeft:0,qHeight:e.length,qWidth:2},qMatrix:e}],qEffectiveInterColumnSortOrder:[0,1],qSize:{qcx:2,qcy:e.length},qMode:"S"}),kX=(e,t,r,n)=>({y:{data:{field:xX},invert:!0,min:"posNeg"===e?-1:t,max:"posNeg"===e?1:r},x:{data:{extract:{field:yX}},paddingInner:.3,paddingOuter:0,invert:"rtl"===n,align:"rtl"===n?1:0,maxPxStep:12}}),DX=U();DX.use(W),DX.renderer.prio(["canvas"]);const PX={resolve:()=>{},promise:{}},TX=({chart:e,element:t,theme:r,isSnapshot:n,direction:o,miniChartData:i,downloadService:a})=>{const{resolveChartPromise:s,addChartPromiseToQueue:l}=(e=>{const t=M(e.isDownloadedAsPDForImage?Rt():PX);return{addChartPromiseToQueue:q(()=>{e.waitForPromise(t.current.promise)},[e]),resolveChartPromise:t.current.resolve}})(a),u=M(null),c=q(()=>{null!==t.current&&null===e.current&&(l(),u.current=(e=>{const t=performance.now();if(t-gX>50&&(gX=t,bX=0),bX+=1,0===vX&&bX<=20)return e(),()=>{};vX+=1;let r=!1;const n=()=>{r||(r=!0,vX-=1)},o=hX(()=>{n(),e()},{timeout:2e3});return()=>{mX(o),n()}})(()=>{u.current=null,t.current&&(e.current=(({element:e,theme:t,isSnapshot:r,miniChartData:n,onChartRendered:o,direction:i})=>{const{type:a,qMatrix:s,minY:l,maxY:u}=n;return DX.chart({element:e,data:{type:"q",key:"qHyperCube",data:MX(s)},settings:{scales:kX(a,l,u,i),components:IX(t,n),strategy:r?{size:{width:e.offsetWidth,height:e.offsetHeight}}:void 0},mounted:()=>{o()}})})({element:t.current,theme:r,isSnapshot:n,miniChartData:i,direction:o,onChartRendered:s}))}))},[t,e,l,r,n,i,o,s]);return{renderChartWithRequestIdleCallback:c,safeCancelIdleCallback:q(()=>{u.current?.(),u.current=null,s()},[s])}},qX=e=>{const t=M(null),r=M(!1);return q(n=>{const o=n.contentBoxSize.at(0)?.inlineSize??0;(e=>{e.current&&(mX(e.current),e.current=null)})(t),r.current?0!==o?null!==e.current&&(t.current=hX(()=>{e.current?.update()},{timeout:2e3})):r.current=!1:r.current=!0},[e])},OX=({intersectionObserverTaskScheduler:e,resizeObserverTaskScheduler:t,theme:r,isSnapshot:n,miniChartData:o,downloadService:i,direction:a})=>{const s=M(null),l=M(null),{renderChartWithRequestIdleCallback:u,safeCancelIdleCallback:c}=TX({element:s,chart:l,theme:r,isSnapshot:n,direction:a,miniChartData:o,downloadService:i});return(({element:e,intersectionObserverTaskScheduler:t,safeCancelIdleCallback:r,renderChartWithRequestIdleCallback:n,chart:o})=>{const i=q(e=>{e.isIntersecting?n():r()},[n,r]);P(()=>{if(!e.current||!t)return()=>{};const n=e.current;return t.addTask(n,i),()=>{t.removeTask(n),r(),o.current?.destroy(),o.current=null}},[o,e,t,r,i])})({element:s,intersectionObserverTaskScheduler:e,safeCancelIdleCallback:c,renderChartWithRequestIdleCallback:u,chart:l}),(({renderChartWithRequestIdleCallback:e,safeCancelIdleCallback:t,chart:r,intersectionObserverTaskScheduler:n})=>{P(()=>n?()=>{}:(e(),()=>{t(),r.current?.destroy(),r.current=null}),[n,t,e,r])})({intersectionObserverTaskScheduler:e,safeCancelIdleCallback:c,renderChartWithRequestIdleCallback:u,chart:l}),(({element:e,chart:t,resizeObserverTaskScheduler:r})=>{const n=qX(t);P(()=>{const t=e.current;return t?(r.addTask(t,n),()=>{r.removeTask(t)}):()=>{}},[e,n,r])})({element:s,chart:l,resizeObserverTaskScheduler:t}),s},LX=({height:e,intersectionObserverTaskScheduler:t,resizeObserverTaskScheduler:r,theme:n,isSnapshot:o,miniChartData:i,downloadService:a,direction:s})=>{const l=OX({intersectionObserverTaskScheduler:t,resizeObserverTaskScheduler:r,theme:n,isSnapshot:o,miniChartData:i,downloadService:a,direction:s});return Gt.jsx("div",{"data-testid":"picasso-container",ref:l,style:{position:"relative",width:"100%",height:e,overflow:"hidden"}})},NX=e=>{let t="center",r="center";return"flex-start"===e?.vertical?t="top":"flex-end"===e?.vertical&&(t="bottom"),"flex-start"===e?.horizontal?r="left":"flex-end"===e?.horizontal&&(r="right"),`${r} ${t}`},jX=e=>{switch(e){case"alwaysFit":return"contain";case"fill":return"fill";case"fitHeight":case"fitWidth":return"cover";case"originalSize":return"none";default:return}},_X=({representation:e,textStyle:t,maxImageHeight:r,wrapInContainer:n})=>{const o=Jg(_b),{url:i,text:a,imageSize:s,resolvedImagePosition:l}=e,u="fitHeight"===s,c=Gt.jsx("img",{src:i,alt:a,style:{...t,width:u?"auto":"100%",height:"100%",maxHeight:r,objectFit:jX(s),objectPosition:NX(l),overflow:"hidden"}});return n?Gt.jsx("div",{"data-key":"image-horizontal-container",style:{width:"100%",height:u?r:"100%",overflow:"hidden",display:"flex",justifyContent:u?ZH(o,e):void 0},children:c}):c},zX=({size:e,iconKey:t,color:r,pvStyle:n})=>{const o=t&&VH[t];return o&&Gt.jsx("div",{"data-testid":"representation-indicator-icon",style:{color:r,height:e,...n},children:Gt.jsx(o,{style:{height:e}})})},FX=({representation:e,cellValue:t,paginationCellAlign:r})=>{const n=Jg(AU),o=Jg(_b),i=Jg(ev),{text:a,indicator:s}=e,{showTextValues:l,applySegmentColors:u}=s??{},c=WH(e,t,o,i),d=(e=>parseInt(e||KH,10))(n.measure.values.fontSize),{color:p,iconKey:f,position:h}=c||{};return l?Gt.jsxs("div",{"data-key":"representation-indicator",style:{display:"flex",justifyContent:r??"flex-end",alignItems:"center",gap:"2px",overflow:"hidden",color:u?p:void 0},children:["left"===h&&zX({size:d,iconKey:f,color:p}),Gt.jsx(tY,{isNumeric:!0,children:a}),"right"===h&&zX({size:d,iconKey:f,color:p})]}):zX({size:d,iconKey:f,color:p})},$X=(e,t,r)=>e.contentStaticLineCount?t*(r??e.grid.contentLineClamp):t,BX=({forwardRef:e,cell:t,style:r,virtualizedCell:n,lineClamp:o,intersectionObserverTaskScheduler:i,resizeObserverTaskScheduler:a,paginationCellAlign:s})=>{const l=Jg(AU),u=Jg(kU),c=Jg(tb),d=Jg(bb),p=Jg(ev),f=Jg(_b),h=Jg(Db),m=Jg(Ib);if(t.representation.type===v$.Image&&!t.representation.url?.trim())return null;if(t.representation.type===v$.Image)return Gt.jsx(_X,{representation:t.representation,textStyle:r,maxImageHeight:$X(l,u,o),wrapInContainer:!n});const g=xH(t.qIsNull?t.representation.text:t.qNum);let b=t.representation;if(t.qIsNull&&t.isNumeric&&!Number.isNaN(g)){const e=t.formattedNullValueText??zW(g,t.qNumFormat,t.qIsAutoFormat);b={...t.representation,text:e}}let v=b.text;return t.representation.type!==v$.Link||m||t.isNull||(v=Gt.jsx(fX,{href:t.representation.url,text:t.representation.text,interactions:h,color:r.cellForegroundColor})),t.representation.type!==v$.Indicator||Number.isNaN(g)?t.representation.type===v$.MiniChart&&t.representation.miniChart&&!t.isNull?Gt.jsx(LX,{height:$X(l,u,o),intersectionObserverTaskScheduler:i,resizeObserverTaskScheduler:a,miniChartData:t.representation.miniChart,theme:p,isSnapshot:!!d.snapshotData,direction:f,downloadService:c}):t.representation.type===v$.Bar&&t.representation.bar&&!t.isNull?Gt.jsx(cX,{height:$X(l,u,o),bar:t.representation.bar,theme:p,direction:f,fontFamily:l.measure.values.fontFamily,fontSize:r.fontSize??l.measure.values.fontSize}):Gt.jsx(tY,{forwardRef:e,isDual:t.isDual,isNumeric:t.isNumeric,lineClamp:o,isPagination:!n,children:v}):Gt.jsx(FX,{representation:b,cellValue:g,paginationCellAlign:n?void 0:s})},HX=()=>Gt.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",width:"0.75em",height:"0.75em",children:Gt.jsx("path",{d:"M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z"})}),VX=Mu("div")({"& path":{stroke:"none !important"}}),WX=({children:e,cellSelectionState:t,hideTickIcon:r})=>t!==pH.Selected||r?e:Gt.jsxs(QK,{children:[e,Gt.jsx(VX,{children:Gt.jsx(HX,{})})]}),UX=e=>{const t=function(){const e=Jj(),t=Oj(()=>null==e?void 0:e.dragOperation.source,[e]),r=Oj(()=>null==e?void 0:e.dragOperation.target,[e]);return{get source(){return t.value},get target(){return r.value}}}();return t.source&&t.source.id!==e?.5:1},GX=(e,t,r,n)=>({handleMouseDown:n=>{e?.(n);const o=n.target;if(t.isSelectable&&"A"!==o.tagName){const e=()=>{r({type:fH.SelectMultiEnd})};r({type:fH.SelectMouseDown,payload:{cell:t,mouseupOutsideCallback:e}})}},handleMouseOver:e=>{1===e.buttons&&r({type:fH.SelectMultiAdd,payload:{cell:t,evt:e,announce:n}})},handleMouseUp:e=>{0===e.button&&r({type:fH.SelectMouseUp,payload:{cell:t,evt:e,announce:n}})}}),KX=e=>{const t=Jg(gU),r=Jg(cU),n=Jg($Y),o=Jg(Jb),i=Jg(_b),a=Zg(jY),s=Zg(EK),l=Jg(Vb),u=Jg(qb),c=Jg(Mb),d=d=>{GY({evt:d,rootElement:o,selectionsAPI:c,cell:e,selectionDispatch:s,isSelectionsEnabled:u,setFocusedCellCoord:a,announce:n,keyboard:l,paginationNeeded:t,totalsPosition:r,direction:i})},p=e=>{((e,t)=>{e.key===Km.Shift&&t({type:fH.SelectMultiEnd})})(e,s)},f=()=>{((e,t,r,n,o)=>{const{pageRowIdx:i,pageColIdx:a}=e,s=o.atTop?i+2:i+1;BK([s,a],t,r,n)})(e,o,a,l,r)};if(!u)return{onKeyDown:d,onKeyUp:p,onMouseDown:f};const{handleMouseDown:h,handleMouseOver:m,handleMouseUp:g}=GX(f,e,s,n);return{onKeyDown:d,onKeyUp:p,onMouseDown:h,onMouseUp:g,onMouseOver:m}},YX=e=>{P(()=>()=>{RK.remove(e)},[e])},XX=(e,t,r,n)=>{if(!r.isNull)return e;const o=n?t.dimensionNull:t.measureNull,i={...e,...o};if(!t.grid.zebraStripes.show)return i;const a=n?t.grid.zebraStripes.overrideDimNullValueColor:t.grid.zebraStripes.overrideMeasNullValueColor,s=n?t.grid.zebraStripes.overrideDimNullValueBackground:t.grid.zebraStripes.overrideMeasNullValueBackground;return a&&(i.color=e.color),s&&(i.background=e.background),i},JX=(e,t,r)=>{const{color:n,background:o}=e.grid.zebraStripes[r];return{...t,...n?{color:n}:void 0,...o?{background:o}:void 0}},ZX=(e,t,r)=>{if(t.grid.zebraStripes.show){const n=(r.rowIdx+1)%2==0;return JX(t,e,n?"even":"odd")}return e},QX=(e,t)=>{const r=Jg(AU),n=Jg(RK(e)),o=Jg(hb),i=e.isTotalRow&&o("TLV-2303-SUB-TOTALS");YX(e);let a=t.isDim?r.dimension.values:r.measure.values;a=ZX(a,r,e),a=i?r.subTotalRow:a,a=XX(a,r,e,t.isDim);const s=e.isNull||i&&t.isDim?a:RV(a,e.qAttrExps,t.qAttrExprInfoIDs),l=i?s:function(e,t,r){return t===pH.Selected?{...e,...r}:t===pH.Disabled?{...e,background:`${UH}, ${e.background}`}:e}(s,n,r.selectedColors);return{cellStyle:{...l,borderColor:r.grid.border},representationStyle:s,cellSelectionState:n}},eJ=Mu(qh,{shouldForwardProp:e=>"lastRowBottomBorder"!==e})(({lastRowBottomBorder:e})=>({"& tr:last-child":{"& td, th":{borderBottomWidth:e}}})),tJ=Mu(em,{shouldForwardProp:e=>"hoverColors"!==e&&"hover"!==e&&"height"!==e})(({hover:e,hoverColors:t,height:r})=>({height:r,"&&:hover":{background:"none"},...e&&{"&&:hover":{"& td:not(.selected), th:not(.selected)":t}}})),rJ=Mu(_h,{shouldForwardProp:e=>"cellStyle"!==e})(({cellStyle:e,theme:t})=>({...JH,...e,padding:t.spacing(.5,1.5),verticalAlign:"top",boxSizing:"border-box",width:"100%",height:"100%"})),nJ=Mu(_h,{shouldForwardProp:e=>!["atTop","headRowHeight","totalsStyle","direction"].includes(e)})(({totalsStyle:e,atTop:t,headRowHeight:r,theme:n})=>({...JH,...e,fontWeight:YH,position:"sticky",padding:n.spacing(.5,1.5),borderWidth:t?"0px 1px 1px 0px":"1px 1px 1px 0px",top:t?r:void 0,bottom:t?void 0:0,verticalAlign:t?"bottom":"top",boxSizing:"border-box",zIndex:t?1:void 0})),oJ=({cell:e,column:t,columnIndex:r,intersectionObserverTaskScheduler:n,resizeObserverTaskScheduler:o})=>{const i=Jg(_b),a=Jg(Db),{onKeyDown:s,onKeyUp:l,onMouseDown:u,onMouseUp:c,onMouseOver:d}=KX(e),{cellStyle:p,representationStyle:f,cellSelectionState:h}=QX(e,t),m=UX(t.id);return Gt.jsx(rJ,{cellStyle:{...p,opacity:m},scope:0===r?"row":void 0,component:0===r?"th":void 0,align:e.align,tabIndex:-1,className:`sn-table-cell ${h} ${Gm}`,title:a.passive?e.representation.text:void 0,onKeyDown:s,onKeyUp:l,onMouseDown:u,onMouseUp:c,onMouseOver:d,children:Gt.jsx(WX,{cellSelectionState:h,hideTickIcon:!!e.isTotalRow,children:Gt.jsx(BX,{cell:e,style:f,intersectionObserverTaskScheduler:n,resizeObserverTaskScheduler:o,paginationCellAlign:rV(i,e.align)})})})},iJ=zg(0),aJ=({column:e,totalsPosition:t,onKeyDown:r,onMouseDown:n})=>{const o=Jg(AU),i=Jg(Tb),a=Jg(iJ),s=UX(e.id);return Gt.jsx(nJ,{totalsStyle:{...o.totalRow,...MK(o,t,!1),opacity:s},headRowHeight:a,atTop:t.atTop,align:e.totalsTextAlign,className:`sn-table-cell ${Gm}`,tabIndex:-1,title:i?e.totalInfo:void 0,onKeyDown:r,onMouseDown:n,children:Gt.jsx(tY,{isNumeric:e.isTotalNumeric,isPagination:!0,children:e.totalInfo})},e.id)},sJ=()=>{const e=Jg(cU),t=Jg(dU),r=Jg(fU),n=Jg(Jb),o=Jg(Pb),i=Jg(_b),a=Zg(jY),s=Jg(Ib),l=Jg(Vb);return Gt.jsx(em,{className:"sn-table-row sn-table-totals-row",children:t.map((t,u)=>{const c=[e.atTop?1:r.length+1,u];return Gt.jsx(aJ,{column:t,totalsPosition:e,onKeyDown:e=>{(e=>{const{isSelectionMode:t,evt:r,isInteractionEnabled:n}=e;if(!t&&n)switch(r.key){case Km.C:HY(r);break;case Km.Space:r.preventDefault();break;default:VY(e)}else wm(r)})({evt:e,rootElement:n,cellCoord:c,setFocusedCellCoord:a,isSelectionMode:s,isInteractionEnabled:o,direction:i})},onMouseDown:()=>{BK(c,n,a,l)}},t.id)})})};var lJ=j(sJ);const uJ=({updateShouldRefocus:e,tableWrapperRef:t})=>{const r=Jg(fU),n=Jg(cU),o=Jg(dU),i=Jg(AU),a=Jg(DU),s=Jg(PU),l=Jg(bb),u=!!wV(l)?.content?.hoverEffect;rX({updateShouldRefocus:e,tableWrapperRef:t});const c=(e=>{const t=q(t=>new IntersectionObserver(e=>{e.forEach(e=>{const r=t.get(e.target);r?.(e)})},{root:e.current}),[e]);return QY(t)})(t),d=tX();return Gt.jsxs(eJ,{lastRowBottomBorder:i.grid.lastRowBottomBorder,children:[n.atTop?Gt.jsx(lJ,{}):void 0,r.map((e,t)=>{const r=e.at(0)?.isTotalRow??!1;return Gt.jsx(tJ,{hoverColors:i.grid.hoverColors,hover:u,tabIndex:-1,className:"sn-table-row sn-table-data-row",height:r?s:a,children:o.map((t,r)=>{const{id:n}=t,o=e[r];return Gt.jsx(oJ,{columnIndex:r,cell:o,column:t,intersectionObserverTaskScheduler:c,resizeObserverTaskScheduler:d},n)})},`row-${t}`)}),n.atBottom?Gt.jsx(lJ,{}):void 0]})};var cJ=j(uJ);const dJ=(e,t)=>!!e?.skipHeader||!!t.hideHeader,pJ=zg(e=>{const t=e(bb),r=e(Wb);if(r)return(e,{isDim:n,colIdx:o})=>{const i=n?o:o-t.qHyperCube.qDimensionInfo.length,a=`/qHyperCubeDef/${n?"qDimensions":"qMeasures"}/${i}/qDef/columnWidth`,s=t.qHyperCube[n?"qDimensionInfo":"qMeasureInfo"].at(i)?.columnWidth,l=s?{qPath:a,qOp:"Replace",qValue:JSON.stringify({...s,...e})}:{qPath:a,qOp:"Add",qValue:JSON.stringify(e)};r.applyPatches([l],!0)}}),fJ=({column:e,isLastColumn:t,onColumnResize:r,setIsAdjustingWidth:n})=>{const{pageColIdx:o,label:i}=e,a=Jg(pJ),s=Jg(_b),l=Jg(Pb),u=Jg(tv),[c,d]=Qg(NU);if(!l)return null;return Gt.jsx(WU,{columnWidth:c.at(o)??0,isLastColumn:t,keyValue:`adjuster-${o}`,updateWidthCallback:e=>{r?.();const t=[...c];t[o]=e,d(t)},confirmWidthCallback:t=>{a?.(t,e)},handleBlur:e=>{(e=>{jK(e);const t=e.closest(".sn-table-cell");zK(t)})(e.currentTarget)},setIsAdjustingWidth:n,accessibilityRelatedArgs:{translator:u,columnLabel:i},direction:s})},hJ=e=>e.target?.getAttribute("class")?.includes(Ym),mJ=({isInteractionEnabled:e,column:t})=>{const[r,n]=I(!1),o=Jg(kK),i=Jg(pV);return{open:r,setOpen:n,handleOpenMenu:t=>{!e||hJ(t)||i||n(!0)},toggleSortOrder:r=>{e&&!hJ(r)&&!i&&(e=>null!==e.target.closest(".sn-table-cell"))(r)&&(r.stopPropagation(),o?.(t,"A"===t.sortDirection?"D":"A"))}}};var gJ=class extends XT{constructor(e,t){super(e,t),this.boundingRectangle=ZM(null),this.destroy=lk(()=>{if(!this.options)return;const{dragOperation:t}=e,{status:r}=t;if(r.initialized){const{element:e}=this.options,r="function"==typeof e?e(t):e;if(!r)return;let n;const o=()=>{this.boundingRectangle.value=cq(r)},i=()=>{n||(n=setTimeout(()=>{o(),n=void 0},25))},a=new ResizeObserver(o);return a.observe(r),document.addEventListener("scroll",i,{passive:!0,capture:!0}),()=>{document.removeEventListener("scroll",i,{capture:!0}),a.disconnect(),this.boundingRectangle.value=null}}})}apply(e){const{shape:t,transform:r}=e;if(!t)return r;const n=this.boundingRectangle.value;if(!n)return r;const{initial:o,current:i}=t,{height:a,width:s}=i.boundingRectangle,l=o.center.x-s/2,u=o.center.y-a/2,c=function(e,t,r){const n=j_({},t);return e.boundingRectangle.top+t.y<=r.top?n.y=r.top-e.boundingRectangle.top:e.boundingRectangle.bottom+t.y>=r.top+r.height&&(n.y=r.top+r.height-e.boundingRectangle.bottom),e.boundingRectangle.left+t.x<=r.left?n.x=r.left-e.boundingRectangle.left:e.boundingRectangle.right+t.x>=r.left+r.width&&(n.x=r.left+r.width-e.boundingRectangle.right),n}(new MD(l,u,s,a),r,n);return c}};gJ.configure=fP(gJ);const bJ=({invert:e})=>({dragOperation:t,droppable:r})=>{if(!r.shape)return null;const{shape:n}=t;if(!n)return null;const o=function(e){return e.sortable?.index}(r);if(void 0===o)return null;const i=function(e){return e.source.index}(t);if(void 0===i)return null;if(i===o)return null;const a=i<o!==e?"right":"left",{center:s,boundingRectangle:l}=n.current;return"left"===a&&l.left+.3*l.width<=r.shape.center.x||"right"===a&&l.right-.3*l.width>=r.shape.center.x?{id:r.id,value:1/ID.distance(r.shape.center,s),type:ET.Collision,priority:CT.Normal}:null},vJ=[gJ.configure({element:e=>{const t=e.activatorEvent?.target;return t instanceof HTMLElement?t.closest(".sn-table-head-row"):null}})],yJ=(e,t)=>{const r=Jg(_b),n=!Jg(Lb);return eF({id:e.id,disabled:n,index:t,type:"item",accept:"item",group:"column",modifiers:vJ,data:e,plugins:e=>[...e,EN.configure({feedback:"clone"})],collisionDetector:bJ({invert:"rtl"===r})})},xJ=({column:e,columnIndex:t,columnsLength:r})=>{const n=Jg(AU),o=Jg(Jb),i=Jg(_b),a=Jg(Db),s=Jg(dU),l=Jg(cU),u=Jg(NU)[t],c=Zg(jY),d=Jg(_Y(t)),p=Jg(Lb),f=Jg(Vb),{open:h,setOpen:m,handleOpenMenu:g,toggleSortOrder:b}=mJ({isInteractionEnabled:p,column:e}),v=Zg(pV),{ref:y,isDragging:x}=yJ(e,t),S=UX(e.id),w=Jg(Rb),C=w?rY:wY,E=e.isActivelySorted?hH[e.sortDirection]:void 0,R=h?Um:void 0,A=h?"true":void 0,I=t===r-1,M=[0,e.pageColIdx],k={width:u,zIndex:s.length-t},D=d&&0===t&&!f.enabled&&p?0:-1;return Gt.jsxs(WK,{"data-dragging":x,ref:y,headerStyle:{...n.header,...MK(n,l,!0),opacity:S},background:w&&h?e.headerColor?.headerMenuActiveBackground??n.headerMenuActiveBackground:e.headerColor?.background??n.header.background,hoverBackground:e.headerColor?.headerMenuHoverBackground??n.headerMenuHoverBackground,color:e.headerColor?.color??n.header.color,interactions:a,style:k,align:e.headTextAlign,className:`sn-table-head-cell sn-table-cell ${Gm}`,tabIndex:D,title:a.passive?e.label:void 0,onKeyDown:e=>{(e=>{const{isInteractionEnabled:t,evt:r,handleOpenMenu:n}=e;if(t)switch(r.key){case Km.C:HY(r);break;case Km.Enter:case Km.Space:n?.(r);break;default:VY(e)}else wm(r)})({evt:e,rootElement:o,cellCoord:M,setFocusedCellCoord:c,isInteractionEnabled:p,handleOpenMenu:g,direction:i})},onMouseDown:e=>{(({evt:e,rootElement:t,cellCoord:r,setFocusedCellCoord:n,keyboard:o,isInteractionEnabled:i})=>{e.preventDefault(),i&&BK(r,t,n,o)})({evt:e,rootElement:o,cellCoord:M,setFocusedCellCoord:c,keyboard:f,isInteractionEnabled:p})},onClick:w?g:b,"aria-sort":E,"aria-controls":R,"aria-expanded":A,"aria-haspopup":"true",children:[Gt.jsx(C,{column:e,isInteractionEnabled:p,open:h,setOpen:m,isPagination:!0,columnWidth:u}),Gt.jsx(fJ,{column:e,isLastColumn:I,setIsAdjustingWidth:v})]},e.id)},SJ=()=>{const e=Jg(dU),t=Jg(AU),r=Jg(bb),n=Jg(Fb),o=Zg(iJ),i=Jg(NU),a=M(null),s=dJ(n,r);return P(()=>{a.current&&o(a.current.getBoundingClientRect().height)},[t.header.fontSize,i,o,s]),Gt.jsx(Kh,{style:{visibility:s?"collapse":void 0},children:Gt.jsx(YK,{ref:a,className:"sn-table-row sn-table-head-row",children:e.map((t,r)=>Gt.jsx(xJ,{column:t,columnIndex:r,columnsLength:e.length},t.id))})})};var wJ=j(SJ);var CJ=j(()=>{const e=Jg($Y),[t,r]=Qg(tU),{page:n,rowsPerPage:o}=t,i=Jg(zb),{totalColumnCount:a,totalRowCount:s,totalPages:l,paginationNeeded:u,rows:c,columns:d}=Jg(uU),p=Jg(AU),f=Jg(bW),h=Jg(bb),m=Jg(ev),g=Jg(Xb),b=Jg(Jb),v=Jg(Fb),y=Jg(_b),x=Jg(Db),S=Jg(tv),w=Jg(AK),C=Zg(EK),E=Jg(Ib),R=Jg(Vb),A=M(!1),I=M(null),k=M(null),D=`${S.get("SNTable.Accessibility.RowsAndColumns",[String(c.length),String(d.length)])} ${S.get("SNTable.Accessibility.NavigationInstructions")}`,T=Nb(h,v),O=T?f.scrollLeft??0:0,L=T?f.rowPartialHeight??0:0,N=q(()=>{A.current=b.getElementsByTagName("table")[0].contains(document.activeElement)},[b]),j=q(n=>{r({...t,page:n}),e({keys:[["SNTable.Pagination.PageStatusReport",(n+1).toString(),l.toString()]],politeness:"assertive"})},[t,r,l,e]),_=q(n=>{r({...t,page:0,rowsPerPage:n}),e({keys:[["SNTable.Pagination.RowsPerPageChange",n.toString()]],politeness:"assertive"})},[e,t,r]);return(e=>{const t=Jg(_b),r=Jg(bW);P(()=>{const n=e.current;if(!n)return;const o=e=>{((e,t,r)=>{if(0===e.deltaX)return;e.stopPropagation();const n=r.scrollWidth-r.offsetWidth,{scrollLeft:o}=r;let i=o+e.deltaX;t&&(i=n+i),n>0&&(i<0||i>n+1)&&e.preventDefault()})(e,"rtl"===t,n)},i=e=>{r.scrollLeft=e.currentTarget?.scrollLeft||0};return n.addEventListener("wheel",o),n.addEventListener("scroll",i),()=>{n.removeEventListener("wheel",o),n.removeEventListener("scroll",i)}},[e,t,r])})(I),NY(k,A),(()=>{const e=Jg(Jb),t=Jg(Vb),r=Jg(jY);zm(()=>{const n=LK(e,r);t.active?zK(n):(n?.blur(),_K(e))},[t.active,e])})(),BY(A,n),P(()=>{const e=I.current;e&&(e.scrollLeft=O,e.scrollTop=L)},[t,s,O,L]),LY(()=>{C({type:fH.UpdatePageRows,payload:{pageRows:c}})},[c]),zY(),KY(I),Gt.jsxs(OY,{children:[Gt.jsxs(JK,{ref:k,dir:y,onKeyDown:e=>{UY({evt:e,totalRowCount:s,page:n,rowsPerPage:o,handleChangePage:j,updateShouldRefocus:N,keyboard:R,isSelectionMode:E})},"data-testid":"sn-table",children:[Gt.jsx(ZY,{}),Gt.jsxs(XY,{ref:I,className:"sn-table-container",fullHeight:!!i||!x.active||!u,interactions:x,tabIndex:-1,role:"application","data-testid":"table-container",children:[Gt.jsxs(JY,{stickyHeader:!0,"aria-label":D,borderRight:w?`1px solid ${p.grid.border}`:void 0,children:[Gt.jsx(wJ,{}),Gt.jsx(cJ,{updateShouldRefocus:N,tableWrapperRef:k})]}),Gt.jsx(IK,{})]}),Gt.jsx(dK,{footerContainer:i,pageInfo:t,paginationNeeded:u,theme:m,totalRowCount:s,totalColumnCount:a,totalPages:l,keyboard:R,translator:S,interactions:x,rect:g,layout:h,handleChangePage:j,handleChangeRowsPerPage:_,isSelectionMode:E,direction:y})]}),Gt.jsx(AY,{isPagination:!0})]})});const EJ=zg(0),RJ=zg(e=>{const t=e(vb);return Math.min(AV,t)}),AJ=zg(e=>{const t=e(vb);return t===AV?0:Math.floor(t/AV)}),IJ=zg(e=>{const t=e(EJ),r=e(AJ);return Math.min(t,r)}),MJ=zg(e=>({page:e(IJ),rowsPerPage:e(RJ),rowsPerPageOptions:[]}),(e,t,r)=>{const n=e(AJ);t(EJ,Math.max(0,Math.min(r,n)))}),kJ=zg(null),DJ=zg(null),PJ=zg(e=>{const t=e(MJ),r=e(vb);return Math.min(t.rowsPerPage,r-t.page*t.rowsPerPage)}),TJ=zg(null),qJ=zg(null),OJ=zg(e=>e(cU).atTop?2:1),LJ=zg(e=>e(cU).atTop?1:e(OJ)+e(PJ)),NJ=zg(e=>OK(Boolean(e(Ib)),e(cU))),jJ=zg(e=>({firstBodyRowIdx:e(OJ),totalsRowIdx:e(LJ),allowedRows:e(NJ)})),_J=zg(e=>({rootElement:e(Jb),totalsPosition:e(cU),rowCount:e(PJ),colCount:e(pU),columnWidths:e(NU)})),zJ=zg(e=>({scrollToCell:e(TJ),scrollableContainerElement:e(qJ)})),FJ=zg(e=>({keyboard:e(Vb),isInSelectionMode:e(Ib),selectionsAPI:e(Mb),isSelectionsEnabled:e(qb)})),$J=zg(e=>({direction:e(_b),isInteractionEnabled:e(Lb),paginationNeeded:e(gU),announce:e($Y),shouldRefocusRef:e(kJ)})),BJ=10,HJ=e=>e.atTop?2:1,VJ=(e,[t,r],n,o)=>{const i=HJ(n);if(0===t)return e.querySelector(`.sn-table-head-row [data-col="${r}"]`);if(n.atTop&&1===t)return e.querySelector(`.sn-table-totals-row [data-col="${r}"]`);const a=t-i;return a>=0&&a<o?e.querySelector(`.sn-table-body .sn-table-cell[rowindex="${a}"][columnindex="${r}"]`):e.querySelector(`.sn-table-totals-row [data-col="${r}"]`)},WJ=(e,t,r,n,o,i,a,s,l)=>{if(!e)return l(!1),()=>{};const[u,c]=r,d=u-HJ(n),p=d>=0&&d<o;let f=a,h=!1,m=null;const g=()=>h||s&&!s(),b=()=>{g()||(p&&e(d,c),m=requestAnimationFrame(()=>{if(g())return;const e=((e,t)=>{if(!e||!t)return!1;const r=e.getBoundingClientRect(),n=t.getBoundingClientRect();return r.top>=n.top&&r.bottom<=n.bottom&&r.left>=n.left&&r.right<=n.right})(VJ(t,r,n,o),i);if(!e)return f>0?(f-=1,void b()):void l(!1);l(!0)}))};return b(),()=>{h=!0,null!==m&&cancelAnimationFrame(m)}},UJ=(e,t,r,n,o,i)=>e<i?[t,e+1]:t<n?[t+1,o]:[t,e],GJ=(e,t,r,n,o,i)=>e>o?[t,e-1]:t>r?[t-1,i]:[t,e],KJ=(e,[t,r],n,o,i,a={top:0,bottom:0},s)=>{const l=a.top>0,u=a.top,c=n-1-a.bottom,d=o-1;switch(e.key){case Km.Down:case Km.Up:t=((e,t,r,n)=>e===Km.Down&&t<n?t+1:e===Km.Up&&t>r?t-1:t)(e.key,t,u,c);break;case Km.Right:l||([t,r]=((e,t,r,n,o,i,a)=>"rtl"===a?GJ(e,t,r,0,o,i):UJ(e,t,0,n,o,i))(r,t,u,c,0,d,i));break;case Km.Left:l||([t,r]=((e,t,r,n,o,i,a)=>"rtl"===a?UJ(e,t,0,n,o,i):GJ(e,t,r,0,o,i))(r,t,u,c,0,d,i));break;case Km.Home:l?t=Math.max(u,t-BJ):(hK(e)&&(t=u),r=0);break;case Km.End:l?t=Math.min(c,t+BJ):(hK(e)&&(t=c),r=d);break;case Km.PageDown:t=Math.min(c,t+BJ);break;case Km.PageUp:if(l)t=Math.max(u,t-BJ);else{const e=s?HJ(s):1,r=t-e;t=r>0&&r<=BJ?e:Math.max(u,t-BJ)}}return[t,r]},YJ=e=>{((e,t)=>{e.querySelectorAll(t).forEach(e=>{e.setAttribute("tabIndex","-1")})})(e,".sn-table-cell[tabindex='0']")},XJ=[Km.Home,Km.End,Km.PageUp,Km.PageDown],JJ=()=>{const e=M(!1),t=M(0),r=M(0),n=M(null),o=M(null),i=M(null),a=M(0),s=Zg(jY),l=Zg(EK),u=Jg(hb)("VNA-700-KEYBOARD_NAV_VIRTUALIZED_STRAIGHT_TABLE"),{rootElement:c,totalsPosition:d,rowCount:p,colCount:f,columnWidths:h}=Jg(_J),{firstBodyRowIdx:m,allowedRows:g,totalsRowIdx:b}=Jg(jJ),{scrollToCell:v,scrollableContainerElement:y}=Jg(zJ),{keyboard:x,isInSelectionMode:S,selectionsAPI:w,isSelectionsEnabled:C}=Jg(FJ),{direction:E,announce:R,isInteractionEnabled:I,paginationNeeded:k,shouldRefocusRef:D}=Jg($J),T=A(()=>(e=>{const t=new Array(e.length+1);t[0]=0;for(let r=0;r<e.length;r++)t[r+1]=t[r]+(e[r]??0);return t})(h),[h]);P(()=>()=>{t.current+=1,r.current+=1,a.current+=1,n.current?.(),n.current=null,o.current?.(),o.current=null,i.current?.(),i.current=null},[]);const O=q((e,t,r,n)=>{const o=t=>{if(n&&!n())return void r?.(!1);const i=VJ(c,e,d,p);if(i)return document.activeElement!==i&&DK(i),document.activeElement===i?void r?.(!0):t>0?void requestAnimationFrame(()=>{o(t-1)}):void r?.(!1);t>0?requestAnimationFrame(()=>{o(t-1)}):r?.(!1)};requestAnimationFrame(()=>{o(t)})},[c,d,p]),L=q((e,t)=>{const n=a.current+1;a.current=n;let i=0;const s=Date.now()+5e3,l=()=>{if(a.current!==n)return;if(r.current!==t)return;if(c instanceof HTMLElement&&!c.isConnected)return;if(Date.now()>s||i>=5)return;const u=document.activeElement;u&&u!==document.body&&u!==document.documentElement||(i+=1,D&&(D.current=!0),o.current?.(),o.current=WJ(v,c,e,d,p,y,10,()=>a.current===n&&r.current===t,()=>{O(e,300,()=>{D&&(D.current=!1)},()=>a.current===n&&r.current===t)})),requestAnimationFrame(()=>{requestAnimationFrame(l)})};requestAnimationFrame(()=>{requestAnimationFrame(l)})},[O,c,p,v,y,D,d]),N=q(()=>(D&&(D.current=!0),t.current+=1,t.current),[D]),j=q(()=>{t.current+=1,i.current?.(),i.current=null},[]),_=q((e,r)=>{const n=o=>{t.current===e&&(i.current?.(),i.current=WJ(v,c,r,d,p,y,10,()=>t.current===e,()=>{if(t.current!==e)return;const i=VJ(c,r,d,p);i&&document.activeElement!==i&&DK(i),o>0?requestAnimationFrame(()=>{n(o-1)}):t.current===e&&D&&(D.current=!1)}))};requestAnimationFrame(()=>{requestAnimationFrame(()=>{n(300)})})},[c,d,p,v,D,y]),z=q((e,t)=>{if(!vK(e))return;wm(e),j(),r.current+=1;const o=r.current;a.current+=1,n.current?.(),n.current=null;const i=((e,t)=>HJ(t)+e+(t.atBottom?1:0))(p,d),l=KJ(e,t,i,f,E,g,d);YJ(c),s(l);const[,u]=l,[,h]=t;return u!==h&&((e,t,r)=>{if(!e)return;const n=t[r]??0,o=t[r+1]??n,{scrollLeft:i,clientWidth:a}=e;n<i?e.scrollLeft=n:o>i+a&&(e.scrollLeft=o-a)})(y,T,u),D&&(D.current=!0),n.current=WJ(v,c,l,d,p,y,10,()=>r.current===o,()=>{O(l,300,t=>{D&&(D.current=!1),t&&(e=>XJ.includes(e))(e.key)&&L(l,o)},()=>r.current===o)}),l},[c,d,p,f,E,v,s,g,y,D,O,j,T,L]),F=q(e=>{e.key===Km.Esc?x.enabled&&!S&&(wm(e),x.blur?.(!0)):gK(e.key)&&wm(e)},[x,S]),$=q((e,t,r)=>{switch(e.key){case Km.C:wm(e),I&&(e.ctrlKey||e.metaKey)&&ng(e.currentTarget);break;case Km.Enter:case Km.Space:if(!I){wm(e);break}r?.(e);break;default:z(e,[0,t])}},[z,I]),B=q((t,n,o,i)=>{const a=[n+m,o];switch(t.key){case Km.Space:if(wm(t),i.isSelectable&&C){e.current=!0;const r=N();l({type:fH.Select,payload:{cell:i,evt:t,announce:R}}),_(r,a)}break;case Km.Enter:if(wm(t),e.current=!1,S){N(),s(gH),w?.confirm(),y&&(y.scrollTop=0,y.scrollLeft=0);const e=t=>{v?.(0,0),t>0&&requestAnimationFrame(()=>{e(t-1)})};e(10),r.current+=1;const t=r.current;O(gH,300,()=>{D&&(D.current=!1)},()=>r.current===t)}break;case Km.Esc:if(e.current=!1,S){wm(t);const e=N();w?.cancel(),_(e,a)}break;case Km.C:wm(t),I&&(t.ctrlKey||t.metaKey)&&ng(t.currentTarget);break;case Km.Tab:{const e=t.shiftKey||!k;x.enabled&&S&&e&&(wm(t),Sm(t.currentTarget,x,t.shiftKey));break}default:{const r=t.key===Km.Left||t.key===Km.Right,n=S||Boolean(w?.isModal())||e.current;if(r&&n){wm(t);break}const o=z(t,a);!!o&&o[0]!==a[0]&&t.shiftKey&&C&&i.isSelectable&&l({type:fH.SelectMultiAdd,payload:{cell:i,evt:t,announce:R}});break}}},[m,z,C,l,R,S,w,x,k,I,N,_,s,v,y,O,D]),H=q(t=>{t.key===Km.Space&&(e.current=!1),t.key===Km.Shift&&l({type:fH.SelectMultiEnd})},[l]),V=q((e,t)=>{if(S)wm(e);else{if(e.key!==Km.Space)return e.key===Km.C?(wm(e),void(I&&(e.ctrlKey||e.metaKey)&&ng(e.currentTarget))):void z(e,[b,t]);e.preventDefault()}},[S,z,b,I]),W=q(e=>{j(),r.current+=1;const t=r.current;YJ(c),s(e),x.enabled&&x.focus?.(),O(e,2,r=>{r&&L(e,t)},()=>r.current===t)},[c,s,x,O,j,L]);return{handleWrapperKeyDown:F,handleHeadKeyDown:$,handleBodyKeyDown:B,handleBodyKeyUp:H,handleTotalsKeyDown:V,focusHeadCellOnClick:q(e=>{u&&W([0,e])},[W,u]),focusBodyCellOnClick:q((e,t)=>{u&&W([e+m,t])},[W,m,u]),focusTotalsCellOnClick:q(e=>{u&&W([b,e])},[W,b,u])}};var ZJ=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function QJ(e,t){return e===t||!(!ZJ(e)||!ZJ(t))}function eZ(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(!QJ(e[r],t[r]))return!1;return!0}function tZ(e,t){var r;void 0===t&&(t=eZ);var n,o=[],i=!1;return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return i&&r===this&&t(a,o)||(n=e.apply(this,a),i=!0,r=this,o=a),n}}var rZ="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function nZ(e){cancelAnimationFrame(e.id)}function oZ(e,t){var r=rZ();var n={id:requestAnimationFrame(function o(){rZ()-r>=t?e.call(null):n.id=requestAnimationFrame(o)})};return n}var iZ=-1;function aZ(e){if(void 0===e&&(e=!1),-1===iZ||e){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",document.body.appendChild(t),iZ=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return iZ}var sZ=null;function lZ(e){if(void 0===e&&(e=!1),null===sZ||e){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",r.direction="rtl";var n=document.createElement("div"),o=n.style;return o.width="100px",o.height="100px",t.appendChild(n),document.body.appendChild(t),t.scrollLeft>0?sZ="positive-descending":(t.scrollLeft=1,sZ=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),sZ}return sZ}var uZ=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function cZ(e){var t,r=e.getColumnOffset,n=e.getColumnStartIndexForOffset,o=e.getColumnStopIndexForStartIndex,i=e.getColumnWidth,a=e.getEstimatedTotalHeight,s=e.getEstimatedTotalWidth,l=e.getOffsetForColumnAndAlignment,u=e.getOffsetForRowAndAlignment,c=e.getRowHeight,d=e.getRowOffset,p=e.getRowStartIndexForOffset,f=e.getRowStopIndexForStartIndex,h=e.initInstanceProps,m=e.shouldResetStyleCacheOnItemSizeChange,g=e.validateProps;return t=function(e){function t(t){var n;return(n=e.call(this,t)||this)._instanceProps=h(n.props,Yu(n)),n._resetIsScrollingTimeoutId=null,n._outerRef=void 0,n.state={instance:Yu(n),isScrolling:!1,horizontalScrollDirection:"forward",scrollLeft:"number"==typeof n.props.initialScrollLeft?n.props.initialScrollLeft:0,scrollTop:"number"==typeof n.props.initialScrollTop?n.props.initialScrollTop:0,scrollUpdateWasRequested:!1,verticalScrollDirection:"forward"},n._callOnItemsRendered=void 0,n._callOnItemsRendered=tZ(function(e,t,r,o,i,a,s,l){return n.props.onItemsRendered({overscanColumnStartIndex:e,overscanColumnStopIndex:t,overscanRowStartIndex:r,overscanRowStopIndex:o,visibleColumnStartIndex:i,visibleColumnStopIndex:a,visibleRowStartIndex:s,visibleRowStopIndex:l})}),n._callOnScroll=void 0,n._callOnScroll=tZ(function(e,t,r,o,i){return n.props.onScroll({horizontalScrollDirection:r,scrollLeft:e,scrollTop:t,verticalScrollDirection:o,scrollUpdateWasRequested:i})}),n._getItemStyle=void 0,n._getItemStyle=function(e,t){var o,a=n.props,s=a.columnWidth,l=a.direction,u=a.rowHeight,p=n._getItemStyleCache(m&&s,m&&l,m&&u),f=e+":"+t;if(p.hasOwnProperty(f))o=p[f];else{var h=r(n.props,t,n._instanceProps),g="rtl"===l;p[f]=o={position:"absolute",left:g?void 0:h,right:g?h:void 0,top:d(n.props,e,n._instanceProps),height:c(n.props,e,n._instanceProps),width:i(n.props,t,n._instanceProps)}}return o},n._getItemStyleCache=void 0,n._getItemStyleCache=tZ(function(e,t,r){return{}}),n._onScroll=function(e){var t=e.currentTarget,r=t.clientHeight,o=t.clientWidth,i=t.scrollLeft,a=t.scrollTop,s=t.scrollHeight,l=t.scrollWidth;n.setState(function(e){if(e.scrollLeft===i&&e.scrollTop===a)return null;var t=n.props.direction,u=i;if("rtl"===t)switch(lZ()){case"negative":u=-i;break;case"positive-descending":u=l-o-i}u=Math.max(0,Math.min(u,l-o));var c=Math.max(0,Math.min(a,s-r));return{isScrolling:!0,horizontalScrollDirection:e.scrollLeft<i?"forward":"backward",scrollLeft:u,scrollTop:c,verticalScrollDirection:e.scrollTop<a?"forward":"backward",scrollUpdateWasRequested:!1}},n._resetIsScrollingDebounced)},n._outerRefSetter=function(e){var t=n.props.outerRef;n._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},n._resetIsScrollingDebounced=function(){null!==n._resetIsScrollingTimeoutId&&nZ(n._resetIsScrollingTimeoutId),n._resetIsScrollingTimeoutId=oZ(n._resetIsScrolling,150)},n._resetIsScrolling=function(){n._resetIsScrollingTimeoutId=null,n.setState({isScrolling:!1},function(){n._getItemStyleCache(-1)})},n}zu(t,e),t.getDerivedStateFromProps=function(e,t){return dZ(e,t),g(e),null};var b=t.prototype;return b.scrollTo=function(e){var t=e.scrollLeft,r=e.scrollTop;void 0!==t&&(t=Math.max(0,t)),void 0!==r&&(r=Math.max(0,r)),this.setState(function(e){return void 0===t&&(t=e.scrollLeft),void 0===r&&(r=e.scrollTop),e.scrollLeft===t&&e.scrollTop===r?null:{horizontalScrollDirection:e.scrollLeft<t?"forward":"backward",scrollLeft:t,scrollTop:r,scrollUpdateWasRequested:!0,verticalScrollDirection:e.scrollTop<r?"forward":"backward"}},this._resetIsScrollingDebounced)},b.scrollToItem=function(e){var t=e.align,r=void 0===t?"auto":t,n=e.columnIndex,o=e.rowIndex,i=this.props,c=i.columnCount,d=i.height,p=i.rowCount,f=i.width,h=this.state,m=h.scrollLeft,g=h.scrollTop,b=aZ();void 0!==n&&(n=Math.max(0,Math.min(n,c-1))),void 0!==o&&(o=Math.max(0,Math.min(o,p-1)));var v=a(this.props,this._instanceProps),y=s(this.props,this._instanceProps)>f?b:0,x=v>d?b:0;this.scrollTo({scrollLeft:void 0!==n?l(this.props,n,r,m,this._instanceProps,x):m,scrollTop:void 0!==o?u(this.props,o,r,g,this._instanceProps,y):g})},b.componentDidMount=function(){var e=this.props,t=e.initialScrollLeft,r=e.initialScrollTop;if(null!=this._outerRef){var n=this._outerRef;"number"==typeof t&&(n.scrollLeft=t),"number"==typeof r&&(n.scrollTop=r)}this._callPropsCallbacks()},b.componentDidUpdate=function(){var e=this.props.direction,t=this.state,r=t.scrollLeft,n=t.scrollTop;if(t.scrollUpdateWasRequested&&null!=this._outerRef){var o=this._outerRef;if("rtl"===e)switch(lZ()){case"negative":o.scrollLeft=-r;break;case"positive-ascending":o.scrollLeft=r;break;default:var i=o.clientWidth,a=o.scrollWidth;o.scrollLeft=a-i-r}else o.scrollLeft=Math.max(0,r);o.scrollTop=Math.max(0,n)}this._callPropsCallbacks()},b.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&nZ(this._resetIsScrollingTimeoutId)},b.render=function(){var e=this.props,t=e.children,r=e.className,n=e.columnCount,o=e.direction,i=e.height,l=e.innerRef,u=e.innerElementType,c=e.innerTagName,d=e.itemData,p=e.itemKey,f=void 0===p?uZ:p,h=e.outerElementType,m=e.outerTagName,g=e.rowCount,b=e.style,v=e.useIsScrolling,y=e.width,x=this.state.isScrolling,S=this._getHorizontalRangeToRender(),C=S[0],E=S[1],R=this._getVerticalRangeToRender(),A=R[0],I=R[1],M=[];if(n>0&&g)for(var k=A;k<=I;k++)for(var D=C;D<=E;D++)M.push(w(t,{columnIndex:D,data:d,isScrolling:v?x:void 0,key:f({columnIndex:D,data:d,rowIndex:k}),rowIndex:k,style:this._getItemStyle(k,D)}));var P=a(this.props,this._instanceProps),T=s(this.props,this._instanceProps);return w(h||m||"div",{className:r,onScroll:this._onScroll,ref:this._outerRefSetter,style:Pr({position:"relative",height:i,width:y,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},b)},w(u||c||"div",{children:M,ref:l,style:{height:P,pointerEvents:x?"none":void 0,width:T}}))},b._callPropsCallbacks=function(){var e=this.props,t=e.columnCount,r=e.onItemsRendered,n=e.onScroll,o=e.rowCount;if("function"==typeof r&&t>0&&o>0){var i=this._getHorizontalRangeToRender(),a=i[0],s=i[1],l=i[2],u=i[3],c=this._getVerticalRangeToRender(),d=c[0],p=c[1],f=c[2],h=c[3];this._callOnItemsRendered(a,s,d,p,l,u,f,h)}if("function"==typeof n){var m=this.state,g=m.horizontalScrollDirection,b=m.scrollLeft,v=m.scrollTop,y=m.scrollUpdateWasRequested,x=m.verticalScrollDirection;this._callOnScroll(b,v,g,x,y)}},b._getHorizontalRangeToRender=function(){var e=this.props,t=e.columnCount,r=e.overscanColumnCount,i=e.overscanColumnsCount,a=e.overscanCount,s=e.rowCount,l=this.state,u=l.horizontalScrollDirection,c=l.isScrolling,d=l.scrollLeft,p=r||i||a||1;if(0===t||0===s)return[0,0,0,0];var f=n(this.props,d,this._instanceProps),h=o(this.props,f,d,this._instanceProps),m=c&&"backward"!==u?1:Math.max(1,p),g=c&&"forward"!==u?1:Math.max(1,p);return[Math.max(0,f-m),Math.max(0,Math.min(t-1,h+g)),f,h]},b._getVerticalRangeToRender=function(){var e=this.props,t=e.columnCount,r=e.overscanCount,n=e.overscanRowCount,o=e.overscanRowsCount,i=e.rowCount,a=this.state,s=a.isScrolling,l=a.verticalScrollDirection,u=a.scrollTop,c=n||o||r||1;if(0===t||0===i)return[0,0,0,0];var d=p(this.props,u,this._instanceProps),h=f(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(i-1,h+g)),d,h]},t}($),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var dZ=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},pZ=function(e,t){var r=e.rowCount,n=t.rowMetadataMap,o=t.estimatedRowHeight,i=t.lastMeasuredRowIndex,a=0;if(i>=r&&(i=r-1),i>=0){var s=n[i];a=s.offset+s.size}return a+(r-i-1)*o},fZ=function(e,t){var r=e.columnCount,n=t.columnMetadataMap,o=t.estimatedColumnWidth,i=t.lastMeasuredColumnIndex,a=0;if(i>=r&&(i=r-1),i>=0){var s=n[i];a=s.offset+s.size}return a+(r-i-1)*o},hZ=function(e,t,r,n){var o,i,a;if("column"===e?(o=n.columnMetadataMap,i=t.columnWidth,a=n.lastMeasuredColumnIndex):(o=n.rowMetadataMap,i=t.rowHeight,a=n.lastMeasuredRowIndex),r>a){var s=0;if(a>=0){var l=o[a];s=l.offset+l.size}for(var u=a+1;u<=r;u++){var c=i(u);o[u]={offset:s,size:c},s+=c}"column"===e?n.lastMeasuredColumnIndex=r:n.lastMeasuredRowIndex=r}return o[r]},mZ=function(e,t,r,n){var o,i;return"column"===e?(o=r.columnMetadataMap,i=r.lastMeasuredColumnIndex):(o=r.rowMetadataMap,i=r.lastMeasuredRowIndex),(i>0?o[i].offset:0)>=n?gZ(e,t,r,i,0,n):bZ(e,t,r,Math.max(0,i),n)},gZ=function(e,t,r,n,o,i){for(;o<=n;){var a=o+Math.floor((n-o)/2),s=hZ(e,t,a,r).offset;if(s===i)return a;s<i?o=a+1:s>i&&(n=a-1)}return o>0?o-1:0},bZ=function(e,t,r,n,o){for(var i="column"===e?t.columnCount:t.rowCount,a=1;n<i&&hZ(e,t,n,r).offset<o;)n+=a,a*=2;return gZ(e,t,r,Math.min(n,i-1),Math.floor(n/2),o)},vZ=function(e,t,r,n,o,i,a){var s="column"===e?t.width:t.height,l=hZ(e,t,r,i),u="column"===e?fZ(t,i):pZ(t,i),c=Math.max(0,Math.min(u-s,l.offset)),d=Math.max(0,l.offset-s+a+l.size);switch("smart"===n&&(n=o>=d-s&&o<=c+s?"auto":"center"),n){case"start":return c;case"end":return d;case"center":return Math.round(d+(c-d)/2);default:return o>=d&&o<=c?o:d>c||o<d?d:c}},yZ=cZ({getColumnOffset:function(e,t,r){return hZ("column",e,t,r).offset},getColumnStartIndexForOffset:function(e,t,r){return mZ("column",e,r,t)},getColumnStopIndexForStartIndex:function(e,t,r,n){for(var o=e.columnCount,i=e.width,a=hZ("column",e,t,n),s=r+i,l=a.offset+a.size,u=t;u<o-1&&l<s;)u++,l+=hZ("column",e,u,n).size;return u},getColumnWidth:function(e,t,r){return r.columnMetadataMap[t].size},getEstimatedTotalHeight:pZ,getEstimatedTotalWidth:fZ,getOffsetForColumnAndAlignment:function(e,t,r,n,o,i){return vZ("column",e,t,r,n,o,i)},getOffsetForRowAndAlignment:function(e,t,r,n,o,i){return vZ("row",e,t,r,n,o,i)},getRowOffset:function(e,t,r){return hZ("row",e,t,r).offset},getRowHeight:function(e,t,r){return r.rowMetadataMap[t].size},getRowStartIndexForOffset:function(e,t,r){return mZ("row",e,r,t)},getRowStopIndexForStartIndex:function(e,t,r,n){for(var o=e.rowCount,i=e.height,a=hZ("row",e,t,n),s=r+i,l=a.offset+a.size,u=t;u<o-1&&l<s;)u++,l+=hZ("row",e,u,n).size;return u},initInstanceProps:function(e,t){var r=e,n={columnMetadataMap:{},estimatedColumnWidth:r.estimatedColumnWidth||50,estimatedRowHeight:r.estimatedRowHeight||50,lastMeasuredColumnIndex:-1,lastMeasuredRowIndex:-1,rowMetadataMap:{}};return t.resetAfterColumnIndex=function(e,r){void 0===r&&(r=!0),t.resetAfterIndices({columnIndex:e,shouldForceUpdate:r})},t.resetAfterRowIndex=function(e,r){void 0===r&&(r=!0),t.resetAfterIndices({rowIndex:e,shouldForceUpdate:r})},t.resetAfterIndices=function(e){var r=e.columnIndex,o=e.rowIndex,i=e.shouldForceUpdate,a=void 0===i||i;"number"==typeof r&&(n.lastMeasuredColumnIndex=Math.min(n.lastMeasuredColumnIndex,r-1)),"number"==typeof o&&(n.lastMeasuredRowIndex=Math.min(n.lastMeasuredRowIndex,o-1)),t._getItemStyleCache(-1),a&&t.forceUpdate()},n},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.columnWidth,e.rowHeight}}),xZ=function(e,t){return e};function SZ(e){var t,r=e.getItemOffset,n=e.getEstimatedTotalSize,o=e.getItemSize,i=e.getOffsetForIndexAndAlignment,a=e.getStartIndexForOffset,s=e.getStopIndexForStartIndex,l=e.initInstanceProps,u=e.shouldResetStyleCacheOnItemSizeChange,c=e.validateProps;return t=function(e){function t(t){var n;return(n=e.call(this,t)||this)._instanceProps=l(n.props,Yu(n)),n._outerRef=void 0,n._resetIsScrollingTimeoutId=null,n.state={instance:Yu(n),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof n.props.initialScrollOffset?n.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},n._callOnItemsRendered=void 0,n._callOnItemsRendered=tZ(function(e,t,r,o){return n.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:r,visibleStopIndex:o})}),n._callOnScroll=void 0,n._callOnScroll=tZ(function(e,t,r){return n.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:r})}),n._getItemStyle=void 0,n._getItemStyle=function(e){var t,i=n.props,a=i.direction,s=i.itemSize,l=i.layout,c=n._getItemStyleCache(u&&s,u&&l,u&&a);if(c.hasOwnProperty(e))t=c[e];else{var d=r(n.props,e,n._instanceProps),p=o(n.props,e,n._instanceProps),f="horizontal"===a||"horizontal"===l,h="rtl"===a,m=f?d:0;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},n._getItemStyleCache=void 0,n._getItemStyleCache=tZ(function(e,t,r){return{}}),n._onScrollHorizontal=function(e){var t=e.currentTarget,r=t.clientWidth,o=t.scrollLeft,i=t.scrollWidth;n.setState(function(e){if(e.scrollOffset===o)return null;var t=n.props.direction,a=o;if("rtl"===t)switch(lZ()){case"negative":a=-o;break;case"positive-descending":a=i-r-o}return a=Math.max(0,Math.min(a,i-r)),{isScrolling:!0,scrollDirection:e.scrollOffset<a?"forward":"backward",scrollOffset:a,scrollUpdateWasRequested:!1}},n._resetIsScrollingDebounced)},n._onScrollVertical=function(e){var t=e.currentTarget,r=t.clientHeight,o=t.scrollHeight,i=t.scrollTop;n.setState(function(e){if(e.scrollOffset===i)return null;var t=Math.max(0,Math.min(i,o-r));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!1}},n._resetIsScrollingDebounced)},n._outerRefSetter=function(e){var t=n.props.outerRef;n._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},n._resetIsScrollingDebounced=function(){null!==n._resetIsScrollingTimeoutId&&nZ(n._resetIsScrollingTimeoutId),n._resetIsScrollingTimeoutId=oZ(n._resetIsScrolling,150)},n._resetIsScrolling=function(){n._resetIsScrollingTimeoutId=null,n.setState({isScrolling:!1},function(){n._getItemStyleCache(-1,null)})},n}zu(t,e),t.getDerivedStateFromProps=function(e,t){return wZ(e,t),c(e),null};var d=t.prototype;return d.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)},d.scrollToItem=function(e,t){void 0===t&&(t="auto");var r=this.props,n=r.itemCount,o=r.layout,a=this.state.scrollOffset;e=Math.max(0,Math.min(e,n-1));var s=0;if(this._outerRef){var l=this._outerRef;s="vertical"===o?l.scrollWidth>l.clientWidth?aZ():0:l.scrollHeight>l.clientHeight?aZ():0}this.scrollTo(i(this.props,e,t,a,this._instanceProps,s))},d.componentDidMount=function(){var e=this.props,t=e.direction,r=e.initialScrollOffset,n=e.layout;if("number"==typeof r&&null!=this._outerRef){var o=this._outerRef;"horizontal"===t||"horizontal"===n?o.scrollLeft=r:o.scrollTop=r}this._callPropsCallbacks()},d.componentDidUpdate=function(){var e=this.props,t=e.direction,r=e.layout,n=this.state,o=n.scrollOffset;if(n.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("horizontal"===t||"horizontal"===r)if("rtl"===t)switch(lZ()){case"negative":i.scrollLeft=-o;break;case"positive-ascending":i.scrollLeft=o;break;default:var a=i.clientWidth,s=i.scrollWidth;i.scrollLeft=s-a-o}else i.scrollLeft=o;else i.scrollTop=o}this._callPropsCallbacks()},d.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&nZ(this._resetIsScrollingTimeoutId)},d.render=function(){var e=this.props,t=e.children,r=e.className,o=e.direction,i=e.height,a=e.innerRef,s=e.innerElementType,l=e.innerTagName,u=e.itemCount,c=e.itemData,d=e.itemKey,p=void 0===d?xZ:d,f=e.layout,h=e.outerElementType,m=e.outerTagName,g=e.style,b=e.useIsScrolling,v=e.width,y=this.state.isScrolling,x="horizontal"===o||"horizontal"===f,S=x?this._onScrollHorizontal:this._onScrollVertical,C=this._getRangeToRender(),E=C[0],R=C[1],A=[];if(u>0)for(var I=E;I<=R;I++)A.push(w(t,{data:c,key:p(I,c),index:I,isScrolling:b?y:void 0,style:this._getItemStyle(I)}));var M=n(this.props,this._instanceProps);return w(h||m||"div",{className:r,onScroll:S,ref:this._outerRefSetter,style:Pr({position:"relative",height:i,width:v,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},g)},w(s||l||"div",{children:A,ref:a,style:{height:x?"100%":M,pointerEvents:y?"none":void 0,width:x?M:"100%"}}))},d._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],r=e[1],n=e[2],o=e[3];this._callOnItemsRendered(t,r,n,o)}if("function"==typeof this.props.onScroll){var i=this.state,a=i.scrollDirection,s=i.scrollOffset,l=i.scrollUpdateWasRequested;this._callOnScroll(a,s,l)}},d._getRangeToRender=function(){var e=this.props,t=e.itemCount,r=e.overscanCount,n=this.state,o=n.isScrolling,i=n.scrollDirection,l=n.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=o&&"backward"!==i?1:Math.max(1,r),p=o&&"forward"!==i?1:Math.max(1,r);return[Math.max(0,u-d),Math.max(0,Math.min(t-1,c+p)),u,c]},t}($),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var wZ=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},CZ=function(e,t,r){var n=e.itemSize,o=r.itemMetadataMap,i=r.lastMeasuredIndex;if(t>i){var a=0;if(i>=0){var s=o[i];a=s.offset+s.size}for(var l=i+1;l<=t;l++){var u=n(l);o[l]={offset:a,size:u},a+=u}r.lastMeasuredIndex=t}return o[t]},EZ=function(e,t,r,n,o){for(;n<=r;){var i=n+Math.floor((r-n)/2),a=CZ(e,i,t).offset;if(a===o)return i;a<o?n=i+1:a>o&&(r=i-1)}return n>0?n-1:0},RZ=function(e,t,r,n){for(var o=e.itemCount,i=1;r<o&&CZ(e,r,t).offset<n;)r+=i,i*=2;return EZ(e,t,Math.min(r,o-1),Math.floor(r/2),n)},AZ=function(e,t){var r=e.itemCount,n=t.itemMetadataMap,o=t.estimatedItemSize,i=t.lastMeasuredIndex,a=0;if(i>=r&&(i=r-1),i>=0){var s=n[i];a=s.offset+s.size}return a+(r-i-1)*o},IZ=SZ({getItemOffset:function(e,t,r){return CZ(e,t,r).offset},getItemSize:function(e,t,r){return r.itemMetadataMap[t].size},getEstimatedTotalSize:AZ,getOffsetForIndexAndAlignment:function(e,t,r,n,o,i){var a=e.direction,s=e.height,l=e.layout,u=e.width,c="horizontal"===a||"horizontal"===l?u:s,d=CZ(e,t,o),p=AZ(e,o),f=Math.max(0,Math.min(p-c,d.offset)),h=Math.max(0,d.offset-c+d.size+i);switch("smart"===r&&(r=n>=h-c&&n<=f+c?"auto":"center"),r){case"start":return f;case"end":return h;case"center":return Math.round(h+(f-h)/2);default:return n>=h&&n<=f?n:n<h?h:f}},getStartIndexForOffset:function(e,t,r){return function(e,t,r){var n=t.itemMetadataMap,o=t.lastMeasuredIndex;return(o>0?n[o].offset:0)>=r?EZ(e,t,o,0,r):RZ(e,t,Math.max(0,o),r)}(e,r,t)},getStopIndexForStartIndex:function(e,t,r,n){for(var o=e.direction,i=e.height,a=e.itemCount,s=e.layout,l=e.width,u="horizontal"===o||"horizontal"===s?l:i,c=CZ(e,t,n),d=r+u,p=c.offset+c.size,f=t;f<a-1&&p<d;)f++,p+=CZ(e,f,n).size;return f},initInstanceProps:function(e,t){var r={itemMetadataMap:{},estimatedItemSize:e.estimatedItemSize||50,lastMeasuredIndex:-1};return t.resetAfterIndex=function(e,n){void 0===n&&(n=!0),r.lastMeasuredIndex=Math.min(r.lastMeasuredIndex,e-1),t._getItemStyleCache(-1),n&&t.forceUpdate()},r},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.itemSize}});function MZ(e,t){for(var r in e)if(!(r in t))return!0;for(var n in t)if(e[n]!==t[n])return!0;return!1}var kZ=["style"],DZ=["style"];function PZ(e,t){var r=e.style,n=Tr(e,kZ),o=t.style,i=Tr(t,DZ);return!MZ(r,o)&&!MZ(n,i)}const TZ=zg(0),qZ=zg(0),OZ=zg(0),LZ=zg(e=>e(TZ)+e(qZ)),NZ=zg(e=>{const t=e(Xb),r=e(gU),n=t.height-(r?41:0);return{width:t.width,height:n}}),jZ=zg(e=>{const t=e(NZ),r=e(fV),n=e(hV);return{width:t.width-n,height:t.height-r}}),_Z=zg(e=>{const t=e(jZ),r=e(LZ),n=e(OZ);return Math.min(t.height-r,n)}),zZ=zg(-1),FZ=bM(e=>zg(t=>t(zZ)===e)),$Z=({style:e})=>Gt.jsx("div",{className:"sn-table-cell",style:{...e,borderWidth:"0px 1px 1px 0px",boxSizing:"border-box"}});var BZ=S.memo($Z,PZ);const HZ=zg(e=>{const t=e(jZ),r=e(DU),n=e(LZ),o=e(OZ)+n,i=e(PJ)*r+n;return o<2*t.height?o:i}),VZ=zg(e=>e(HZ)<=e(NZ).height),WZ=()=>{},UZ=e=>{e.preventDefault()};const GZ=({columnIndex:e,rowIndex:t,style:r,data:n})=>{const{rowsInPage:o,columns:i,isHoverEnabled:a,setMeasuredCellHeight:s,lineClamp:l,resizeObserverTaskScheduler:u,onKeyDown:c,onKeyUp:d,onCellClick:p}=n,f=Jg(FZ(t)),h=Zg(zZ),m=Jg(AU),g=Jg(_b),b=Jg(Tb),v=Jg(Lb),y=Jg(AK),x=Jg(hb),S=Jg(VZ),w=o[t]?.[e],{handleMouseDown:C,handleMouseOver:E,handleMouseUp:R,cellSelectionState:A}=function(e){const t="object"==typeof e,r=Jg(qb),n=Zg(EK),o=Jg(RK(e));if(YX(e),t&&r){const{handleMouseDown:t,handleMouseOver:r,handleMouseUp:i}=GX(UZ,e,n,WZ);return{handleMouseDown:t,handleMouseOver:r,handleMouseUp:i,cellSelectionState:o}}return{cellSelectionState:o}}(w),I=((e,t,r,n)=>{const o=M(null),i=r&&(!r.isNumeric||r.isDual),a=r?.isTotalRow??!1,s=q(r=>{const o=r.contentBoxSize.at(0)?.blockSize;o&&i&&n(o,e,t,a)},[a,t,n,e,i]);return dY({ref:o,callback:s}),o})(t,e,w,s),k=i[e]?.isDim?m.dimension.values:m.measure.values,D=UX(i[e].id);if("object"==typeof w){const n=((e,t,r,n,o,i,a)=>{const s=e.isTotalRow&&a("TLV-2303-SUB-TOTALS");let l=ZX(o,i,e);l=s?i.subTotalRow:l,l=XX(l,i,e,t.isDim);const u=e.isNull||s&&t.isDim?l:RV(l,e.qAttrExps,t.qAttrExprInfoIDs);return n!==pH.Selected||s?n!==pH.Disabled||s?r?{...u,...i.grid.hoverColors}:u:{...u,color:r?i.grid.hoverColors?.color:u.color,background:`${UH}, ${r?i.grid.hoverColors?.background:u.background}`}:{...u,...i.selectedColors}})(w,i[e],a&&f,A,k,m,x),o={rowindex:t,columnindex:e},s=r=>{v&&p?.(t,e),C?.(r)},M=c?r=>{c(r,t,e,w)}:void 0;return Gt.jsx("div",{className:`sn-table-cell ${A} ${Gm}`,tabIndex:-1,style:{...r,...n,display:"flex",alignItems:"start",borderColor:m.grid.border,borderTop:"0px",borderBottomWidth:!S&&w.isLastRow?"0px":"1px",borderRightWidth:nV(g,w.isLastColumn,y),borderLeftWidth:oV(g,w.isLastColumn,y),justifyContent:QH(w,g),borderStyle:"solid",padding:"4px 12px",boxSizing:"border-box",cursor:"default",overflow:"hidden",textAlign:w.align,opacity:D},onMouseDown:s,onMouseUp:R,onMouseOver:E,onMouseEnter:a?()=>{h(t)}:void 0,onMouseLeave:a?()=>{h(-1)}:void 0,onKeyDown:M,onKeyUp:d,title:b?w.representation.text:void 0,...o,children:Gt.jsx(WX,{cellSelectionState:A,hideTickIcon:!!w.isTotalRow,children:Gt.jsx(BX,{forwardRef:m.contentStaticLineCount||1===l?void 0:I,cell:w,style:n,lineClamp:l,virtualizedCell:!0,resizeObserverTaskScheduler:u})})})}return Gt.jsx(BZ,{style:{...r,...k,borderColor:m.grid.border,borderWidth:"0px 1px 1px 0px",borderStyle:"solid",boxSizing:"border-box",opacity:D}})};var KZ=j(GZ,PZ);const YZ=XR(zg(async e=>{const t=e(bb),r=e(Wb),n=e(MJ).page,{qDataPages:o}=t.qHyperCube;if(0!==n||0===o.length){const e=n*Math.min(AV,t.qHyperCube.qSize.qcy);if(r&&"getHyperCubeData"in r)return r.getHyperCubeData("/qHyperCubeDef",[{qLeft:0,qTop:e,qWidth:50,qHeight:100}])}return[...o]})),XZ=zg(e=>{const t=e(PJ),r=e(jZ),n=e(DU);return Math.min(t,Math.ceil(r.height/n))}),JZ=zg(e=>{const t=e(NU),r=e(jZ);return t.reduce((e,t)=>e.width<r.width?{width:e.width+t,count:e.count+1}:e,{count:0,width:0}).count}),ZZ=e=>{const t=M(e);return t.current=e,t},QZ=({qLeft:e,qTop:t,qWidth:r,qHeight:n})=>`${e}-${t}-${r}-${n}`,eQ=e=>-1===e.qElemNumber||!!e.qIsTotalCell,tQ=(e,t,r,n,o)=>{const i=e[r];if(!i)return!0;for(let e=t;e<t+n;e++){const t=i[e];if(t?.rowIdx!==o)return!0}return!1},rQ=(e,t,r,n)=>{const o=e.slice(r,n);return 0===o.length||o.some(e=>!e[t])},nQ=(e,t,r,n,o,i,a,s)=>{e.forEach(e=>{e.qMatrix.forEach((l,u)=>{const c=e.qArea.qTop-t.page*t.rowsPerPage,{row:d,pageRowIdx:p}=((e,t,r,n,o,i,a,s,l,u)=>{const{qSize:c}=a.qHyperCube,d=n.qTop+r,p=o+r,f=e[p]??[],h=t.some(eQ);return t.forEach((e,t)=>{const r=t+n.qLeft;if(f.at(r))return;const{colIdx:o,isDim:m,isLocked:g,bodyTextAlign:b,selectionColIdx:v,qAttrExprInfoIndex:y,representation:x,conditionalColoring:S,qMiniChart:w,measureMinMax:C,qNumFormat:E,qIsAutoFormat:R,formattedNullValueText:A}=i[r],I=s.flags.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING"),M=!m&&e.qIsNull,k=m&&JW(e,m),D=M||k?XW(m,e,a,I):e.qText,P=M?yH(D):vH(e),T=vH(e)&&!yH(e.qText??"");f[r]={id:l$(),...e,align:UW(P,b,u),rowIdx:d,colIdx:o,isSelectable:m&&!g&&!h&&!k,isTotalRow:h,pageRowIdx:p,pageColIdx:r,selectionColIdx:v,isLastRow:d===c.qcy-1,isLastColumn:r===c.qcx-1,isNumeric:P,isDual:T,isNull:(!M||!P)&&JW(e,m),qNumFormat:E,qIsAutoFormat:R,formattedNullValueText:A,representation:gW({cell:e,representationProperties:x,attrExprInfoIndex:y,env:s,conditionalColoring:S,miniChartOnMeasure:w,measureMinMax:C,getText:()=>D,direction:u,enabledFeatures:{[v$.Image]:!0,[v$.Indicator]:!0,[v$.MiniChart]:!0,[v$.Bar]:!m&&s.flags.isEnabled("VNA-977-TABLE-BARS")}})},l(f[r],d,r)}),{row:f,pageRowIdx:p}})(r,l,u,e.qArea,c,n,o,i,a,s);r[p]=d})})},oQ=({gridState:e,setEstimatedCellHeight:t})=>{const r=Jg(bb),n=Jg(ev),o=Jg(Wb),i=Jg(fb),a=Jg(_b),s=Jg(MJ),l=Jg(YZ),u=Jg(dU),c=Jg(PJ),d=Jg(XZ),p=Jg(JZ),f=M([]),h=q((e,n)=>{const o=Array.isArray(n)?n.slice(0,c):(e=>Array(e).fill(void 0))(c);return nQ(e,s,o,u,r,i,t,a),f.current=o,o},[c,s,u,r,i,t,a]),[m,g]=I(()=>h(l??[]));zm(()=>{g(h(l??[]))},[l,a,c]);const b=((e,t)=>{const r=Jg(mb),n=M(new Set),o=M(new Set),i=M(new Set),a=ZZ(e),s=ZZ(t),l=A(()=>({enqueue:e=>{const t=QZ(e);i.current.has(t)||(n.current.add(e),i.current.add(t),1===n.current.size&&setTimeout(async()=>{const e=Array.from(n.current.values());if(0!==e.length){n.current.clear(),o.current.add(e);try{const t=(e=>{const t=[];return e.forEach(e=>{if(t.length>0){const r=t[t.length-1];((e,t)=>e.qTop+e.qHeight===t.qTop&&e.qLeft===t.qLeft&&e.qWidth===t.qWidth)(r,e)?r.qHeight+=e.qHeight:((e,t)=>e.qLeft+e.qWidth===t.qLeft&&e.qTop===t.qTop&&e.qHeight===t.qHeight)(r,e)?r.qWidth+=e.qWidth:t.push({...e})}else t.push({...e})}),t})(e),r=await a.current(t);o.current.has(e)&&s.current(r)}catch(t){e.forEach(e=>{i.current.delete(QZ(e))}),r.error({msg:"Failed to fetch pages",payload:t})}finally{o.current.delete(e)}}},75))},clear:()=>{n.current.clear(),o.current.clear(),i.current.clear()}}),[r,a,s]);return l})(e=>o&&"getHyperCubeData"in o?o.getHyperCubeData("/qHyperCubeDef",e):Promise.resolve([]),e=>{g(t=>h(e,t))}),v=q((e,t,r,n)=>{for(let o=e;o<e+r;o++)if(rQ(f.current,o,t,n)){const e={qLeft:o,qTop:t,qHeight:n,qWidth:1};b.enqueue(e)}},[b]),y=q((e,t,r,n)=>{for(let o=t;o<t+n;o++){const t=Math.max(0,o-s.page*s.rowsPerPage);if(tQ(f.current,e,t,r,o)){const t={qLeft:e,qTop:o,qHeight:1,qWidth:r};b.enqueue(t)}}},[b,s]);return P(()=>{if(void 0===l)return;const{qcx:t,qcy:n}=r.qHyperCube.qSize,o=e.current.overscanRowStartIndex,i=e.current.overscanColumnStartIndex,a=o+s.page*s.rowsPerPage,u=t-i,c=s.rowsPerPage-o,f=Math.min(100,u,t,p+5),h=Math.min(100,c,n,d+25);return y(i,a,f,h),()=>{b.clear()}},[l,r,d,p,s,b,y,e,n]),{rowsInPage:m,loadRows:y,loadColumns:v}},iQ=e=>{let t=0;return e.forEach(e=>{e>t&&(t=e)}),t},aQ=(e,t)=>void 0===e||Math.abs(e-t)>1e-4,sQ=({isSnapshot:e,isStaticNbrOfLines:t,lineClamp:r,setCellHeight:n})=>{const o=Jg(AU),i=Jg(NU),{estimateLineCount:a}=qm(o.dimension.values),s=mV(o.dimension.values.fontSize),l=e||t||1===r;return q((e,t,o)=>{if(l||e.representation.type===v$.Image||e.isNumeric&&!e.isDual)return;const u=(e=>Math.max(0,e-24-1))(i[o]),c=e.representation.text?a({text:e.representation.text,maxWidth:u,isNumeric:!1}):1,d=Math.min(r,Math.max(1,c));n(d*s,t,o,e.isTotalRow??!1)},[l,i,a,r,s,n])},lQ=({isStaticNbrOfLines:e,minRowHeight:t,state:r,staticRowHeight:n=0})=>{const o=Jg(bW);L(()=>{const i=e?n:((e,t)=>{const r=0===t?0:e/t;return Math.ceil(r)})(r.sumHeight,r.rowHeights.size);o.estimatedRowHeight=Math.max(i,t)},[e,t,r,n,o])},uQ=({isSnapshot:e,gridRef:t})=>{const r=Jg(AU),n=Jg(PJ),[o,i]=I(()=>({rowHeights:new Map,cellHeightsInGrid:new Map,sumHeight:0})),a=Jg(kU),s=Jg(DU),l=Jg(PU),u=!!r.contentStaticLineCount,c=Math.max(8e6/n,s,l)-9,d=c+9,p=Math.max(1,Math.min(r.grid.contentLineClamp,Math.round(c/a))),f=(({lineClamp:e,lineHeight:t,isStaticNbrOfLines:r})=>r?t*e+8+1:void 0)({lineClamp:p,lineHeight:a,isStaticNbrOfLines:u});(({gridRef:e,setState:t})=>{const r=Jg(bb),n=Jg(MJ),o=Jg(NU),i=r.multiline?.wrapTextInCells,a=r.nullValueRepresentation?.text;zm(()=>{e.current?.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!1}),t({rowHeights:new Map,cellHeightsInGrid:new Map,sumHeight:0})},[r.qHyperCube.qSize.qcx,r.qHyperCube.qSize.qcy,n.page,i,a]),zm(()=>{e.current?.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!1})},[o])})({gridRef:t,setState:i});const h=(({setState:e,maxCellHeight:t,gridRef:r})=>{const n=Jg(DU),o=Jg(PU);return q((i,a,s,l=!1)=>{z(()=>{e(e=>{const u=l?o:n,c=Math.max(u,i+9),d=Math.min(t,c),p=e.cellHeightsInGrid.get(a)??e.cellHeightsInGrid.set(a,new Map).get(a);if(!aQ(p.get(s),d))return e;const f={...e},h=e.rowHeights.get(a);p.set(s,d);const m=void 0===h||d>=h?d:iQ(p);return f.rowHeights.set(a,m),f.sumHeight=e.sumHeight-(h??0)+m,r.current?.resetAfterIndices({columnIndex:s,rowIndex:a,shouldForceUpdate:!1}),f})})},[e,t,n,o,r])})({maxCellHeight:d,setState:i,gridRef:t}),m=(({isSnapshot:e,isStaticNbrOfLines:t,lineClamp:r,setCellHeight:n})=>q((o,i,a,s)=>{e||t||1===r||n(o,i,a,s)},[e,t,r,n]))({isSnapshot:e,isStaticNbrOfLines:u,lineClamp:p,setCellHeight:h}),g=sQ({isSnapshot:e,isStaticNbrOfLines:u,lineClamp:p,setCellHeight:h}),b=q(e=>u?f??s:o.rowHeights.get(e)??s,[u,s,o.rowHeights,f]);return lQ({isStaticNbrOfLines:u,minRowHeight:s,state:o,staticRowHeight:f}),{setMeasuredCellHeight:m,setEstimatedCellHeight:g,getRowHeight:b,lineClamp:p}},cQ=(e,t)=>{L(()=>()=>{t(0)},[e,t]);const r=q(e=>{const r=e.contentBoxSize.at(0)?.blockSize;void 0!==r&&t(r)},[t]);dY({ref:e,callback:r})};let dQ=function(e){return e.Left="Left",e.Right="Right",e.Up="Up",e.Down="Down",e.None="None",e}({});const pQ=({loadRows:e,loadColumns:t,gridState:r})=>{const n=Jg(bW),o=Jg(bb),i=Jg(MJ),a=Jg(PJ);return q(({overscanColumnStartIndex:s,overscanColumnStopIndex:l,overscanRowStartIndex:u,overscanRowStopIndex:c,visibleColumnStartIndex:d,visibleColumnStopIndex:p,visibleRowStartIndex:f,visibleRowStopIndex:h})=>{const{verticalScrollDirection:m,horizontalScrollDirection:g}=(({overscanColumnStartIndex:e,overscanRowStartIndex:t},r,n)=>{let o,i;return o=n>t?dQ.Down:n<t?dQ.Up:dQ.None,i=r>e?dQ.Right:r<e?dQ.Left:dQ.None,{verticalScrollDirection:o,horizontalScrollDirection:i}})(r.current,s,u);if(r.current.overscanColumnStartIndex=s,r.current.overscanColumnStopIndex=l,r.current.overscanRowStartIndex=u,r.current.overscanRowStopIndex=c,u>a)return;const b=s,v=u+i.page*i.rowsPerPage,y=l-s+1,x=c-u+1;if(n.visibleLeft=d,n.visibleWidth=p-d+1,n.visibleTop=f+i.page*i.rowsPerPage,n.visibleHeight=h-f+1,n.page=i.page,n.rowsPerPage=i.rowsPerPage,m===dQ.Down){const t=x+25;e(b,v,y,u+t>a?a-u:t)}else if(m===dQ.Up){const t=x+25,r=i.page*i.rowsPerPage,n=Math.max(r,v-25);e(b,n,y,t)}if(g===dQ.Right){const e=o.qHyperCube.qSize.qcx-b,r=y+5,n=Math.min(e,r);t(b,v,n,x)}else if(g===dQ.Left){const e=Math.max(0,b-5),r=Math.min(o.qHyperCube.qSize.qcx,y+5);t(e,v,r,x)}},[r,a,i.page,i.rowsPerPage,n,e,o.qHyperCube.qSize.qcx,t])};const fQ=({columnIndex:e,data:t,rowIndex:r})=>{const n=t.rowsInPage[r]?.[e];return n?.id??`${r}-${e}`},hQ=(e,t)=>{if(!e||!t)return;const r=e.scrollHeight-e.clientHeight,n=Math.round(r*(e=>{const t=e.scrollHeight-e.clientHeight;return t<=0?0:Math.max(0,Math.min(1,e.scrollTop/t))})(t));e.scrollTop!==n&&(e.scrollTop=n)},mQ={overflow:"hidden",willChange:"auto"},gQ=_((e,t)=>{const{handleBodyKeyDown:r,handleBodyKeyUp:n,focusBodyCellOnClick:o}=JJ(),i=Jg(dU),a=Jg(jZ),s=Zg(OZ),l=Jg(_Z),u=Jg(bW),c=Jg(bb),d=Jg(_b),p=Jg(NU),f=Jg(PJ),h=Jg(qJ),m=Zg(TJ),g=M(null),b=M(null),v=M(null),y=M({overscanColumnStartIndex:0,overscanRowStartIndex:0,overscanColumnStopIndex:0,overscanRowStopIndex:0}),x=M(0),S=!!wV(c)?.content?.hoverEffect,{setMeasuredCellHeight:w,setEstimatedCellHeight:C,getRowHeight:E,lineClamp:R}=uQ({isSnapshot:!!c.snapshotData,gridRef:g}),{rowsInPage:I,loadRows:k,loadColumns:D}=oQ({gridState:y,setEstimatedCellHeight:C}),T=pQ({loadRows:k,loadColumns:D,gridState:y}),O=tX(),N=A(()=>({rowsInPage:I,columns:i,isHoverEnabled:S,lineClamp:R,setMeasuredCellHeight:w,resizeObserverTaskScheduler:O,onKeyDown:r,onKeyUp:n,onCellClick:o}),[I,i,S,R,w,O,r,n,o]);return L(()=>{1===x.current&&g.current?.scrollToItem({rowIndex:f-1,align:"start"})}),function(e){const t=Zg(EK),{shouldRefocusRef:r}=Jg($J),n=Jg(Jb),o=Jg(DJ);P(()=>{t({type:fH.UpdatePageRows,payload:{pageRows:e}})},[t,e]);const i=q(()=>{r&&(r.current=n.contains(document.activeElement))},[r,n]);rX({updateShouldRefocus:i,tableWrapperRef:{current:o}})}(I),F(t,()=>({interpolatedScrollTo:(e,t)=>{const r=(v.current?.clientHeight??l)-l,n=Math.round(r*e);x.current=e,1===x.current?(g.current?.scrollToItem({rowIndex:f-1,align:"start"}),g.current?.scrollTo({scrollLeft:t})):g.current?.scrollTo({scrollTop:n,scrollLeft:t})}}),[v,l,f]),P(()=>(m(()=>(e,t)=>{g.current?.scrollToItem({rowIndex:e,columnIndex:t,align:"auto"}),hQ(h,b.current)}),()=>{m(null)}),[h,m]),cQ(v,s),Gt.jsx(yZ,{"data-key":"body",ref:g,outerRef:b,innerRef:v,style:mQ,columnCount:i.length,columnWidth:e=>p[e],height:l,rowCount:f,rowHeight:E,estimatedRowHeight:u.estimatedRowHeight,width:a.width,itemData:N,onItemsRendered:T,itemKey:fQ,className:"sn-table-body",direction:d,children:KZ})});var bQ=j(gQ);const vQ=({children:e})=>{const t=Jg(zU),r=Jg(HZ);return Gt.jsx("div",{"data-key":"full-size-container",style:{display:"block",width:t,height:r},children:e})},yQ=(e,t)=>{const r=M(null),n=Jg(NU);L(()=>{r.current&&t(r.current.getBoundingClientRect().height+9,e)},[t,r,e,n.length]);const o=q(r=>{const n=r.contentBoxSize.at(0)?.blockSize;n&&t(n+9,e)},[e,t]);return dY({ref:r,callback:o}),r},xQ=Mu("div",{shouldForwardProp:e=>"interactions"!==e&&"hoverBackground"!==e&&"background"!==e&&"applicableStyle"!==e&&"color"!==e})(({interactions:e,hoverBackground:t,background:r,applicableStyle:n,color:o})=>({...n,background:r,color:o,"&&:hover:not(:has(button:hover))":{background:e.active?t:void 0}})),SQ=({index:e,style:t,data:r})=>{const{columns:n,columResizeHandler:o,setMeasuredCellHeight:i,onKeyDown:a,onCellClick:s}=r,l=Jg(AU),u=Jg(_b),c=Jg(Db),d=Jg(AK),p=Zg(pV),f=Jg(cU),h=Jg(Lb),m=Jg(NU)[e],g=Jg(Vb),b=Jg(_Y(e)),v=n[e],{open:y,setOpen:x,handleOpenMenu:S,toggleSortOrder:w}=mJ({isInteractionEnabled:h,column:v}),C=Jg(Rb),E=yQ(e,i),R=n.length-1===e,A=C?rY:wY,{ref:I,isDragging:M}=yJ(v,e),k=UX(v.id),D=b&&!g.enabled&&h?0:-1,P=a?t=>{a(t,e,S)}:void 0;return Gt.jsxs(xQ,{"data-dragging":M,ref:I,className:`sn-table-cell ${Gm}`,title:c.passive?v.label:void 0,onClick:C?S:w,applicableStyle:{...l.header,...MK(l,f,!0)},style:{...t,cursor:"pointer",display:"flex",alignItems:"flex-end",borderStyle:"solid",borderRightWidth:nV(u,R,d),borderLeftWidth:oV(u,R,d),borderTopWidth:"0px",borderBottomWidth:"1px",padding:"4px",justifyContent:v.headTextAlign,boxSizing:"border-box",zIndex:n.length-e,flexDirection:"right"===v.headTextAlign?"row-reverse":"row",userSelect:"none",opacity:k},interactions:c,hoverBackground:v.headerColor?.headerMenuHoverBackground??l.headerMenuHoverBackground,background:C&&y?v.headerColor?.headerMenuActiveBackground??l.headerMenuActiveBackground:v.headerColor?.background??l.header.background,color:v.headerColor?.color??l.header.color,tabIndex:D,onKeyDown:P,onMouseDown:t=>{t.preventDefault(),h&&s?.(e)},"data-col":e,children:[Gt.jsx(A,{forwardRef:E,column:v,isInteractionEnabled:h,open:y,setOpen:x,columnWidth:m}),Gt.jsx(fJ,{column:v,isLastColumn:R,onColumnResize:o,setIsAdjustingWidth:p})]})},wQ=e=>{const[t,r]=I(new Map);zm(()=>{r(new Map)},[e.length]);const n=q((e,t)=>{r(r=>aQ(r.get(t),e)?new Map(r).set(t,e):r)},[]);return{rowHeight:A(()=>iQ(t),[t]),setMeasuredCellHeight:n}},CQ=(e,t)=>{F(e,()=>({scrollTo:e=>t.current?.scrollTo(e)}),[t])},EQ=e=>{const t=Jg(ev),r=Jg(bb),n=Jg(MJ),o=Jg(NU);zm(()=>{e.current?.resetAfterIndex(0,!1)},[r,n,e,o,t])},RQ={overflow:"hidden",boxSizing:"border-box",willChange:"auto"},AQ=_((e,t)=>{const{columResizeHandler:r}=e,n=Jg(dU),o=Jg(jZ),i=Zg(TZ),a=S.useRef(null),s=M(null),l=Jg(IU),u=Jg(bb),c=Jg(Fb),d=Jg(_b),p=Jg(NU),{rowHeight:f,setMeasuredCellHeight:h}=wQ(n),m=dJ(c,u),{handleHeadKeyDown:g,focusHeadCellOnClick:b}=JJ();return CQ(t,a),EQ(a),cQ(s,i),Gt.jsx(IZ,{className:"sn-table-head-row",ref:a,outerRef:s,layout:"horizontal",style:{...RQ,...m?{display:"none"}:void 0},itemCount:n.length,itemSize:e=>p[e],height:Math.max(f+8,l),width:o.width,itemKey:e=>n[e].id,itemData:{columns:n,columResizeHandler:r,setMeasuredCellHeight:h,onKeyDown:g,onCellClick:b},direction:d,children:SQ})});var IQ=j(AQ);const MQ=_((e,t)=>{const{children:r,onScroll:n}=e,o=Jg(_b),i=Jg(Ob),{width:a,height:s}=Jg(NZ),l=Zg(qJ),u=q(e=>{l(e),"function"==typeof t?t(e):t&&(t.current=e)},[t,l]);return Gt.jsx("div",{"data-testid":"scrollable-container",ref:u,style:{overflow:i?"auto":"hidden",width:a,height:s},onScroll:n,dir:o,tabIndex:-1,children:r})}),kQ=({children:e})=>{const t=Jg(_b),r=Jg(jZ);return Gt.jsx("div",{"data-testid":"sticky-container",style:{position:"sticky",top:"0px",left:"rtl"!==t?"0px":void 0,right:"rtl"===t?"0px":void 0,width:r.width,height:r.height},children:e})},DQ=({index:e,style:t,data:r})=>{const{columns:n,totals:o,setMeasuredCellHeight:i,onKeyDown:a,onCellClick:s}=r,l=Jg(AU),u=Jg(bb),c=Jg(_b),d=Jg(Tb),p=Jg(Lb),f=Jg(AK),h=Jg(VZ),m=yQ(e,i),g=n[e].totalInfo,{totalsTextAlign:b,isTotalNumeric:v}=n[e],y=u.qHyperCube.qSize.qcx-1===e,x=UX(n[e].id),S=a?t=>{a(t,e)}:void 0;return Gt.jsx("div",{className:`sn-table-cell ${Gm}`,tabIndex:-1,title:d?g:void 0,"data-col":e,onKeyDown:S,onMouseDown:t=>{t.preventDefault(),p&&s?.(e)},style:{...t,...l.totalRow,...MK(l,o,!1),background:l.totalRow.background,display:"flex",alignItems:o.atTop?"end":"start",borderStyle:"solid",borderRightWidth:nV(c,y,f),borderLeftWidth:oV(c,y,f),borderTopWidth:o.atBottom?"1px":"0px",borderBottomWidth:h&&o.atBottom||o.atTop?"1px":"0px",padding:"4px 12px",justifyContent:b,textAlign:b,boxSizing:"border-box",cursor:"default",opacity:x},children:Gt.jsx(tY,{forwardRef:v?void 0:m,isNumeric:v,children:g})})},PQ=_((e,t)=>{const{totals:r}=e,n=Jg(dU),o=Jg(jZ),i=Zg(qZ),a=M(null),s=M(null),l=Jg(MU),u=Jg(_b),c=Jg(bb),d=Jg(NU),{rowHeight:p,setMeasuredCellHeight:f}=wQ(n),{handleTotalsKeyDown:h,focusTotalsCellOnClick:m}=JJ();return CQ(t,a),EQ(a),cQ(s,i),Gt.jsx(IZ,{className:"sn-table-totals-row",ref:a,outerRef:s,layout:"horizontal",style:RQ,itemCount:c.qHyperCube.qSize.qcx,itemSize:e=>d[e],height:Math.max(p,l),width:o.width,itemData:{columns:n,totals:r,setMeasuredCellHeight:f,onKeyDown:h,onCellClick:m},direction:u,children:DQ})});var TQ=j(PQ);const qQ=(e,t,r)=>{const n=Jg(_b),o=Jg(bW);return q(i=>{const{scrollHeight:a,clientHeight:s,scrollTop:l}=i.currentTarget,u=((e,t)=>{const{scrollWidth:r,clientWidth:n,scrollLeft:o}=e,i=r-n;if("rtl"===t){if(o>i)return i;if(o<0)return Math.abs(o)}return o})(i.currentTarget,n),c=Math.max(0,Math.min(1,l/(a-s)));o.scrollTopRatio=c,o.scrollLeft=u,r.current?.interpolatedScrollTo(Number.isNaN(c)?0:c,u),e.current?.scrollTo(u),t.current?.scrollTo(u)},[o,r,e,t,n])};var OQ=j(()=>{const e=Jg(cU),t=M(null),r=M(null),n=M(null),o=M(null),i=qQ(r,n,o),a=q(()=>{t.current&&(t.current.scrollTop=0)},[t]);zY(),(e=>{const t=Jg(pU),r=Jg(MJ),n=Jg(ev),o=Jg(PJ);P(()=>{const t=requestAnimationFrame(()=>{e.current&&(e.current.scrollLeft=0,e.current.scrollTop=0)});return()=>{cancelAnimationFrame(t)}},[t,e]),P(()=>{const t=requestAnimationFrame(()=>{e.current&&(e.current.scrollTop=0)});return()=>{cancelAnimationFrame(t)}},[r,o,n,e])})(t),KY(t);const s=Gt.jsx(TQ,{ref:n,totals:e},"totals");return Gt.jsxs(OY,{children:[Gt.jsx(MQ,{ref:t,onScroll:i,children:Gt.jsxs(vQ,{children:[Gt.jsxs(kQ,{children:[Gt.jsx(IQ,{ref:r,columResizeHandler:a}),e.atTop?s:null,Gt.jsx(bQ,{ref:o}),e.atBottom?s:null]}),Gt.jsx(IK,{})]})}),Gt.jsx(AY,{isPagination:!1})]})});const LQ=()=>{const e=Jg(bb),t=Jg(Xb),r=Jg(Db),{paginationNeeded:n,totalRowCount:o,totalColumnCount:i,totalPages:a}=Jg(uU),s=Jg(ev),l=Jg(tv),u=Jg(Vb),[c,d]=Qg(MJ),p=M(null),f=M(!1),h=Zg(kJ),m=Zg(DJ);P(()=>{h(f)},[h]);const g=S.useCallback(e=>{p.current=e,m(e)},[m]),{handleWrapperKeyDown:b}=JJ();return(()=>{const e=Jg(Jb),{keyboard:t}=Jg(FJ),r=Jg(jY),n=Jg(cU),o=Jg(PJ),{scrollToCell:i}=Jg(zJ),{shouldRefocusRef:a}=Jg($J),s=M({focusedCellCoord:r,totalsPosition:n,rowCount:o,scrollToCell:i,rootElement:e}),l=M(null),u=M(null);L(()=>{s.current={focusedCellCoord:r,totalsPosition:n,rowCount:o,scrollToCell:i,rootElement:e}},[r,n,o,i,e]),P(()=>{let e=!1;const{focusedCellCoord:r,totalsPosition:n,rowCount:o,scrollToCell:i,rootElement:c}=s.current;if("function"==typeof c.querySelector){if(t.active){const[t,a]=r,d=n.atTop?2:1;if(t>=d&&t<d+o){null!==u.current&&(cancelAnimationFrame(u.current),u.current=null),i?.(t-d,a);const r=t=>{if(e)return;const n=VJ(s.current.rootElement,s.current.focusedCellCoord,s.current.totalsPosition,s.current.rowCount);n&&document.activeElement!==n&&DK(n),n&&document.activeElement===n||t>0&&(l.current=requestAnimationFrame(()=>{r(t-1)}))};l.current=requestAnimationFrame(()=>{e||r(5)})}else{const e=VJ(c,r,n,o);e&&DK(e)}}else null!==l.current&&(cancelAnimationFrame(l.current),l.current=null),u.current=requestAnimationFrame(()=>{if(e)return;const t=s.current;if(a?.current)return;if(t.rootElement.contains(document.activeElement))return;const r=VJ(t.rootElement,t.focusedCellCoord,t.totalsPosition,t.rowCount);r?.blur(),YJ(t.rootElement)});return()=>{e=!0,null!==l.current&&(cancelAnimationFrame(l.current),l.current=null),null!==u.current&&(cancelAnimationFrame(u.current),u.current=null)}}},[t.active,e,a])})(),NY(p,f),Gt.jsxs(JK,{ref:g,"data-testid":"sn-table",onKeyDown:b,children:[Gt.jsx(ZY,{}),Gt.jsx(OQ,{}),Gt.jsx(dK,{paginationNeeded:n,handleChangePage:e=>{d(e)},pageInfo:c,totalRowCount:o,totalColumnCount:i,totalPages:a,keyboard:u,translator:l,theme:s,interactions:r,rect:t,layout:e})]})};var NQ=j(LQ);const jQ=e=>{const t=e.get(Wb),r=e.get(Bb),n=e.get(gb),i=e.get(_b);o(()=>{n&&t&&(r?function(e){const t=e.get(_b),r=e.get(Qb),n=$U(t);r.render(Gt.jsx(bi,{stylisPlugins:"rtl"===t?[lH]:void 0,children:Gt.jsx(Du,{theme:n,children:Gt.jsx(Wg,{store:e,children:Gt.jsx(FU,{children:Gt.jsx(CJ,{})})})})}))}(e):function(e){const t=e.get(_b),r=e.get(Qb),n=$U(t);r.render(Gt.jsx(S.StrictMode,{children:Gt.jsx(Du,{theme:n,children:Gt.jsx(Wg,{store:e,children:Gt.jsx(FU,{children:Gt.jsx(NQ,{})})})})}))}(e))},[n,r,e,t,i])};function _Q(e,t){const r=e.getElementsByClassName("sn-table-container")[0];if(!r)return{};const n=r.getBoundingClientRect(),o=e.getElementsByClassName("sn-table-head-row")[0],i=o?.getBoundingClientRect()??{height:0},a=e.getElementsByClassName("sn-table-totals-row")[0],s=a?.getBoundingClientRect()??{height:0},l=e.getElementsByClassName("sn-table-data-row"),u={top:n.y+i.height+(t.atTop?s.height:0),bottom:n.y+n.height-(t.atBottom?s.height:0)},c=((e,t)=>{if(!e)return-1;for(let r=0;r<e.length;r++)if(e[r].getBoundingClientRect().bottom>t.top)return r;return-1})(l,u),d=((e,t)=>{if(!e)return-1;for(let r=e.length-1;r>-1;r--){const n=e[r].getBoundingClientRect();if(t.bottom>n.top)return r}return-1})(l,u),p=((e,t,r)=>{if(!e||0===e.length||r<0)return 0;const n=e[r].getBoundingClientRect();return Math.max(t.top-n.top,0)})(l,u,c);return{visibleRowStartIndex:c,visibleRowEndIndex:d,rowPartialHeight:p}}const zQ=(e,t)=>{if(t)for(let r=0;r<t.length;r++){const n=t[r].getAttribute("rowindex");if(n&&parseInt(n,10)===e)return t[r]}},FQ=(e,t,r)=>{if(!e)return!1;const n=e.y+e.height/2;return n>=t&&n<=r};const $Q=(e,t,r,n,o)=>{if(e<0)return 0;const i=r.qHyperCube.qSize.qcy,a=n.rowsPerPage||ZW.rowsPerPage,s=o?.isMultiPage?0:3;return Math.min(i,a,e-t+1+s)},BQ=(e,t,r,n,o)=>{if(n&&!n.isMultiPage)return n;const i=BW(e,n);if(o){const{visibleRowStartIndex:o=-1,visibleRowEndIndex:a=-1,rowPartialHeight:s}=_Q(r,i);return{rowPartialHeight:s,scrollLeft:t.scrollLeft,visibleTop:t.qTop+o,visibleHeight:$Q(a,o,e,t,n),rowsPerPage:t.rowsPerPage,page:t.page,totalsPosition:i}}const{visibleRowStartIndex:a=-1,visibleRowEndIndex:s=-1}=function(e,t){const r=e.querySelector(".sn-table-body"),n=r?.getBoundingClientRect(),o=r?.querySelectorAll(".sn-table-body .sn-table-cell");if(!o||!n)return{};const{scrollTopRatio:i=0,visibleTop:a=0,visibleHeight:s=0,page:l=0,rowsPerPage:u=0}=t,c=l*u,d=a-c,p=d+s-1,f=zQ(d,o),h=f?.getBoundingClientRect();if(!f||!h)return{};const m=n.y;if(1-i<.001)return{visibleRowStartIndex:d+(h.y>=m-4?0:1)+c,visibleRowEndIndex:p+c};const g=n.y+n.height,b=(FQ(h,m,g)?d:d+1)+c;let v=p+c;const y=zQ(p,o),x=y?.getBoundingClientRect();return y&&x&&(FQ(x,m,g)||(v=p-1+c)),{visibleRowStartIndex:b,visibleRowEndIndex:v}}(r,t);return{scrollLeft:t.scrollLeft,visibleLeft:t.visibleLeft,visibleWidth:t.visibleWidth,visibleTop:a,visibleHeight:$Q(s,a,e,t,n),scrollTopRatio:t.scrollTopRatio,rowsPerPage:t.rowsPerPage,page:t.page,totalsPosition:i}},HQ={version:JSON.stringify("6.64.0"),qHyperCubeDef:{qDimensions:[],qMeasures:[],qColumnOrder:[],qInitialDataFetch:[{qWidth:50,qHeight:100}]},showTitles:!0,enableChartExploration:!1,title:"",subtitle:"",footnote:"",totals:{show:!0,position:"noTotals"},usePagination:!1,components:[],accessibleHeader:!1};var VQ=e=>({properties:{initial:HQ},data:{targets:[{path:"/qHyperCubeDef",dimensions:{min:0,max:1e3},measures:{min:0,max:1e3}}]},importProperties:t=>wv({...t,env:e}),exportProperties:gv,exploration:ZF(e)});const WQ=e=>e.getStyle("","","object.straightTableV2.backgroundColor"),UQ=e=>e.getStyle("object","straightTableV2","backgroundColor");function GQ(r){return{qae:VQ(r),ext:SB(r),component(){const n=c(),i=e(()=>Bg(),[!1!==n.usePagination]);i.set(fb,r);const s=d();i.set(Jb,s),i.set(bb,n),i.set(eb,p()),i.set(Wb,f()),i.set(Db,h()),i.set(tv,m()),i.set(Mb,g()),i.set(jb,t()),i.set(Vb,b()),i.set(Xb,v()),i.set(rb,y());const x=Mm(n,s,WQ,UQ);i.set(ev,x),i.set(gb,_m(x,n,r)),i.set(tb,Mt()),(e=>{const t=e.get(Qb);o(()=>()=>{t.unmount()},[t])})(i),a?.((e,t)=>{const r=t.target,n=r?.closest(`.${Gm}`);n?.title&&e.addItem({translation:"contextMenu.copyCellValue",icon:"lui-icon lui-icon--copy",tid:"copy-cell-context-item",id:"copy-cell-context-item",select:()=>{ng(n)}})}),(({store:e})=>{const t=e.get(bb),r=e.get(Wb),n=e.get(Jb),o=e.get(Yb),i=e.get(Fb),a=e.get(Bb);l(async s=>{const l=s;if(!l.snapshotData||!r||l.snapshotData.content)return l;if("getHyperCubeData"in r){const s=e.get(bW),{rowPartialHeight:u,scrollLeft:c,scrollTopRatio:d,visibleLeft:p,visibleWidth:f,visibleTop:h,visibleHeight:m,rowsPerPage:g,page:b}=BQ(t,s,n,i,a);l.qHyperCube.qDataPages=await r.getHyperCubeData("/qHyperCubeDef",[{qLeft:0,qTop:h,qWidth:t.qHyperCube.qSize.qcx,qHeight:m}]),l.snapshotData.content={rowPartialHeight:u,scrollLeft:c,scrollTopRatio:d,visibleLeft:p,visibleWidth:f,visibleTop:h,visibleHeight:m,rowsPerPage:g,page:b,size:{width:o.width,height:o.height},estimatedRowHeight:s.estimatedRowHeight}}return l}),u(()=>({getViewState:()=>BQ(t,e.get(bW),n,i,a)}),[t,e,n,a])})({store:i}),jQ(i)}}}export{GQ as default};
|