@nebula.js/sn-table 3.6.2 → 3.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * @nebula.js/sn-table v3.6.2
2
+ * @nebula.js/sn-table v3.7.0
3
3
  * Copyright (c) 2024 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
@@ -98,7 +98,7 @@ function _n(e,t){let r;return r=t?An(e).withConfig({displayName:t.label,shouldFo
98
98
  /*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
99
99
  e.exports=function(e,t){if(!e||isNaN(+t))return t;var r,n,o,i,a,s,l,u,c,d,p=e.length,f=e.search(/[0-9\-\+#]/),m=f>0?e.substring(0,f):"",h=e.split("").reverse().join(""),g=h.search(/[0-9\-\+#]/),b=p-g,v=e.substring(b,b+1),y=b+("."===v||","===v?1:0),x=g>0?e.substring(y,p):"";if(r=(t="-"===(e=e.substring(f,y)).charAt(0)?-t:+t)<0?t=-t:0,o=(n=e.match(/[^\d\-\+#]/g))&&n[n.length-1]||".",i=n&&n[1]&&n[0]||",",e=e.split(o),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(u=t.split("."))[1]||u[1]&&u[1].length<=s)&&(t=(+t).toFixed(s+1)),c=e[0].split(i),e[0]=c.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;u[0].length<e[0].length-a;)u[0]="0"+u[0];else 0==+u[0]&&(u[0]="");if((t=t.split("."))[0]=u[0],l=c[1]&&c[c.length-1].length){for(h="",b=(d=t[0]).length%l,p=d.length,y=0;y<p;y++)h+=d.charAt(y),!((y-b+1)%l)&&y<p-l&&(h+=i);t[0]=h}return t[1]=e[1]&&t[1]?o+t[1]:"","0"!==(n=t.join(""))&&""!==n||(r=!1),m+(r?"-":"")+n+x}},Fm({exports:{}});const Km=3;function Xm(e,t,r){let n=0,o=e.length;if(e.length<=1)return null;if(r(e)<=t)return null;for(;n<=o;){const i=Math.floor((n+o)/2),a=e.slice(0,i),s=e.slice(0,i-1),l=r(a),u=r(s);if(l>t&&u<=t)return e.slice(i-1)||null;if(l===t)return e.slice(i)||null;l<t?n=i+1:o=i}return null}function Jm({fontSize:e="12px",fontFamily:t="Source Sans Pro, Arial, sans-serif",fontStyle:r="normal",fontWeight:n="normal"},o){const{maxNbrLinesOfText:i=Km}=null!=o?o:{},{estimateWidth:a,measureText:s,estimateLineCount:l}=C((()=>{const o=document.createElement("canvas").getContext("2d");o.font=`${r} ${n} ${e} ${t}`;const a=$m(o.measureText.bind(o)),s=e=>+a(e).width.toFixed(2),l=$m((({text:e,maxWidth:t,isNumeric:r=!1})=>{if(r)return 1;let n=0,o=e;do{n+=1,o=Xm(o,t,s)}while(null!==o&&n<i);return n}),(({text:e,maxWidth:t,isNumeric:r})=>`${e}-${t}-${r?"true":"false"}`));return{measureText:e=>a(e).width,estimateWidth:e=>a("N").width*e,estimateLineCount:l}}),[r,n,e,t,i]);return{estimateWidth:a,measureText:s,estimateLineCount:l}}var Zm,Qm=z;function eh(e,t){const[r,n]=E(t);r.some(((e,r)=>e!==t[r]))&&(n(t),e())}Zm=Qm.createRoot,Qm.hydrateRoot;var th={NebulaTableUtils_MenuGroupLabel_Sorting:{id:"NebulaTableUtils.MenuGroupLabel.Sorting",locale:{"de-DE":"Sortierung","en-US":"Sorting","es-ES":"Ordenación","fr-FR":"Tri","it-IT":"Ordinamento","ja-JP":"ソート","ko-KR":"정렬","nl-NL":"Sorteren","pl-PL":"Sortowanie","pt-BR":"Classificação","ru-RU":"Сортировка","sv-SE":"Sortering","tr-TR":"Sıralama","zh-CN":"排序","zh-TW":"排序"}},NebulaTableUtils_MenuItemLabel_AdjustColumnSize:{id:"NebulaTableUtils.MenuItemLabel.AdjustColumnSize",locale:{"de-DE":"Spaltengröße anpassen","en-US":"Adjust column size","es-ES":"Ajustar el tamaño de columna","fr-FR":"Ajuster la taille de colonne","it-IT":"Regola dimensioni colonna","ja-JP":"列サイズを調整","ko-KR":"열 크기 조정","nl-NL":"Kolomgrootte aanpassen","pl-PL":"Dostosuj rozmiar kolumny","pt-BR":"Ajustar tamanho da coluna","ru-RU":"Настроить размер столбца","sv-SE":"Justera kolumnens storlek","tr-TR":"Sütun boyutunu ayarla","zh-CN":"调节列大小","zh-TW":"調整欄大小"}},NebulaTableUtils_MenuItemLabel_ClearSelections:{id:"NebulaTableUtils.MenuItemLabel.ClearSelections",locale:{"de-DE":"Auswahlen löschen","en-US":"Clear selections","es-ES":"Borrar selecciones","fr-FR":"Effacer les sélections","it-IT":"Cancella selezioni","ja-JP":"選択をクリア","ko-KR":"선택 지우기","nl-NL":"Geselecteerde waarden wissen","pl-PL":"Wyczyść wybory","pt-BR":"Limpar seleções","ru-RU":"Очистить выбранные","sv-SE":"Radera urval","tr-TR":"Seçimleri temizle","zh-CN":"清除选择项","zh-TW":"清除選項"}},NebulaTableUtils_MenuItemLabel_ColumnOptions:{id:"NebulaTableUtils.MenuItemLabel.ColumnOptions",locale:{"de-DE":"Spaltenoptionen","en-US":"Column options","es-ES":"Opciones de columna","fr-FR":"Options de colonne","it-IT":"Opzioni colonna","ja-JP":"列オプション","ko-KR":"열 옵션","nl-NL":"Kolomopties","pl-PL":"Opcje kolumny","pt-BR":"Opções da coluna","ru-RU":"Параметры столбца","sv-SE":"Alternativ för kolumn","tr-TR":"Sütun seçenekleri","zh-CN":"列选项","zh-TW":"欄選項"}},NebulaTableUtils_MenuItemLabel_Search:{id:"NebulaTableUtils.MenuItemLabel.Search",locale:{"de-DE":"Suchen","en-US":"Search","es-ES":"Buscar","fr-FR":"Rechercher","it-IT":"Cerca","ja-JP":"検索","ko-KR":"검색","nl-NL":"Zoeken","pl-PL":"Wyszukaj","pt-BR":"Pesquisar","ru-RU":"Поиск","sv-SE":"Sök","tr-TR":"Ara","zh-CN":"搜索","zh-TW":"搜尋"}},NebulaTableUtils_MenuItemLabel_SelectAll:{id:"NebulaTableUtils.MenuItemLabel.SelectAll",locale:{"de-DE":"Alle auswählen","en-US":"Select all","es-ES":"Seleccionar todo","fr-FR":"Sélectionner tout","it-IT":"Seleziona tutti","ja-JP":"すべて選択","ko-KR":"모두 선택","nl-NL":"Alles selecteren","pl-PL":"Wybierz wszystko","pt-BR":"Selecionar tudo","ru-RU":"Выбрать все","sv-SE":"Välj alla","tr-TR":"Tümünü seç","zh-CN":"全选","zh-TW":"全選"}},NebulaTableUtils_MenuItemLabel_SelectAlternative:{id:"NebulaTableUtils.MenuItemLabel.SelectAlternative",locale:{"de-DE":"Alternative Werte auswählen","en-US":"Select alternative","es-ES":"Seleccionar alternativos","fr-FR":"Sélectionner des valeurs alternatives","it-IT":"Seleziona alternativi","ja-JP":"代替項目を選択","ko-KR":"대체 가능 값 선택","nl-NL":"Alternatief selecteren","pl-PL":"Wybierz alternatywę","pt-BR":"Selecionar alternativa","ru-RU":"Выбрать альтернативные","sv-SE":"Välj alternativ","tr-TR":"Alternatifi seç","zh-CN":"选择替代项","zh-TW":"選取替代選項"}},NebulaTableUtils_MenuItemLabel_SelectExcluded:{id:"NebulaTableUtils.MenuItemLabel.SelectExcluded",locale:{"de-DE":"Ausgeschlossene Werte auswählen","en-US":"Select excluded","es-ES":"Seleccionar excluidos","fr-FR":"Sélectionner les valeurs exclues","it-IT":"Seleziona esclusi","ja-JP":"除外項目を選択","ko-KR":"제외 항목 선택","nl-NL":"Uitgesloten waarden selecteren","pl-PL":"Wybierz wykluczone","pt-BR":"Selecionar excluídos","ru-RU":"Выбрать исключенные","sv-SE":"Välj uteslutna","tr-TR":"Hariç tutulanı seç","zh-CN":"选择排除项","zh-TW":"選取排除值"}},NebulaTableUtils_MenuItemLabel_SelectPossible:{id:"NebulaTableUtils.MenuItemLabel.SelectPossible",locale:{"de-DE":"Wählbare Werte auswählen","en-US":"Select possible","es-ES":"Seleccionar posibles","fr-FR":"Sélectionner les valeurs possibles","it-IT":"Seleziona possibili","ja-JP":"絞込項目を選択","ko-KR":"사용 가능 항목 선택","nl-NL":"Mogelijke waarden selecteren","pl-PL":"Wybierz możliwe","pt-BR":"Selecionar possíveis","ru-RU":"Выбрать возможные","sv-SE":"Välj möjliga","tr-TR":"Olası olanı seç","zh-CN":"选择可能值","zh-TW":"選取可能值"}},NebulaTableUtils_MenuItemLabel_Selections:{id:"NebulaTableUtils.MenuItemLabel.Selections",locale:{"de-DE":"Auswahlen","en-US":"Selections","es-ES":"Selecciones","fr-FR":"Sélections","it-IT":"Selezioni","ja-JP":"選択","ko-KR":"선택 내용","nl-NL":"Selecties","pl-PL":"Wybory","pt-BR":"Seleções","ru-RU":"Выборки","sv-SE":"Urval","tr-TR":"Seçimler","zh-CN":"选择项","zh-TW":"選項"}},NebulaTableUtils_MenuItemLabel_SortAscending:{id:"NebulaTableUtils.MenuItemLabel.SortAscending",locale:{"de-DE":"In aufsteigender Reihenfolge sortieren","en-US":"Sort ascending","es-ES":"Orden ascendente","fr-FR":"Trier par ordre croissant","it-IT":"Ordinamento crescente","ja-JP":"昇順でソート","ko-KR":"오름차순으로 정렬","nl-NL":"Oplopend sorteren","pl-PL":"Sortuj rosnąco","pt-BR":"Classificar em ordem crescente","ru-RU":"Сортировка по возрастанию","sv-SE":"Sortera stigande","tr-TR":"Artan sıralama","zh-CN":"升序排序","zh-TW":"以遞增方式排序"}},NebulaTableUtils_MenuItemLabel_SortDescending:{id:"NebulaTableUtils.MenuItemLabel.SortDescending",locale:{"de-DE":"In absteigender Reihenfolge sortieren","en-US":"Sort descending","es-ES":"Orden descendente","fr-FR":"Trier par ordre décroissant","it-IT":"Ordinamento decrescente","ja-JP":"降順でソート","ko-KR":"내림차순으로 정렬","nl-NL":"Aflopend sorteren","pl-PL":"Sortuj malejąco","pt-BR":"Classificar em ordem decrescente","ru-RU":"Сортировка по убыванию","sv-SE":"Sortera fallande","tr-TR":"Azalan sıralama","zh-CN":"降序排序","zh-TW":"以遞減方式排序"}},NebulaTableUtils_Pagination_DisplayedRowsLabel:{id:"NebulaTableUtils.Pagination.DisplayedRowsLabel",locale:{"de-DE":"{0} von {1}","en-US":"{0} of {1}","es-ES":"{0} de {1}","fr-FR":"{0} sur {1}","it-IT":"{0} di {1}","ja-JP":"{0} / {1}","ko-KR":"{0}/{1}","nl-NL":"{0} van {1}","pl-PL":"{0} z {1}","pt-BR":"{0} de {1}","ru-RU":"{0} из {1}","sv-SE":"{0} av {1}","tr-TR":"{0} / {1}","zh-CN":"{0} / {1}","zh-TW":"{0} / {1}"}},NebulaTableUtils_Pagination_FirstPage:{id:"NebulaTableUtils.Pagination.FirstPage",locale:{"de-DE":"Zur ersten Seite","en-US":"Go to the first page","es-ES":"Ir a la primera página","fr-FR":"Accéder à la première page","it-IT":"Vai alla prima pagina","ja-JP":"最初のページに移動","ko-KR":"첫 페이지로 이동","nl-NL":"Ga naar de eerste pagina","pl-PL":"Przejdź do pierwszej strony","pt-BR":"Ir para a primeira página","ru-RU":"Перейти к первой странице","sv-SE":"Gå till första sidan","tr-TR":"İlk sayfaya git","zh-CN":"转到第一页","zh-TW":"移至第一頁"}},NebulaTableUtils_Pagination_LastPage:{id:"NebulaTableUtils.Pagination.LastPage",locale:{"de-DE":"Zur letzten Seite","en-US":"Go to the last page","es-ES":"Ir a la última página","fr-FR":"Accéder à la dernière page","it-IT":"Vai all'ultima pagina","ja-JP":"最後のページに移動","ko-KR":"마지막 페이지로 이동","nl-NL":"Ga naar de laatste pagina","pl-PL":"Przejdź do ostatniej strony","pt-BR":"Ir para a última página","ru-RU":"Перейти к последней странице","sv-SE":"Gå till sista sidan","tr-TR":"Son sayfaya git","zh-CN":"转到最后一页","zh-TW":"移至最後一頁"}},NebulaTableUtils_Pagination_NextPage:{id:"NebulaTableUtils.Pagination.NextPage",locale:{"de-DE":"Zur nächsten Seite","en-US":"Go to the next page","es-ES":"Ir a la página siguiente","fr-FR":"Accéder à la page suivante","it-IT":"Vai alla pagina successiva","ja-JP":"次のページに移動","ko-KR":"다음 페이지로 이동","nl-NL":"Ga naar de volgende pagina","pl-PL":"Przejdź do następnej strony","pt-BR":"Ir para a próxima página","ru-RU":"Перейти к следующей странице","sv-SE":"Gå till nästa sida","tr-TR":"Sonraki sayfaya git","zh-CN":"转到下一页","zh-TW":"移至下一頁"}},NebulaTableUtils_Pagination_PreviousPage:{id:"NebulaTableUtils.Pagination.PreviousPage",locale:{"de-DE":"Zur vorherigen Seite","en-US":"Go to the previous page","es-ES":"Ir a la página anterior","fr-FR":"Accéder à la page précédente","it-IT":"Vai alla pagina precedente","ja-JP":"前のページに移動","ko-KR":"이전 페이지로 이동","nl-NL":"Ga naar de vorige pagina","pl-PL":"Przejdź do poprzedniej strony","pt-BR":"Ir para a página anterior","ru-RU":"Перейти к предыдущей странице","sv-SE":"Gå till föregående sida","tr-TR":"Önceki sayfaya git","zh-CN":"转到前一页","zh-TW":"移至上一頁"}},NebulaTableUtils_Pagination_RowsPerPage:{id:"NebulaTableUtils.Pagination.RowsPerPage",locale:{"de-DE":"Zeilen pro Seite","en-US":"Rows per page","es-ES":"Filas por página","fr-FR":"Lignes par page","it-IT":"Righe per pagina","ja-JP":"ページあたりの行数","ko-KR":"페이지별 행 수","nl-NL":"Rijen per pagina","pl-PL":"Wierszy na stronę","pt-BR":"Linhas por página","ru-RU":"Строк на странице","sv-SE":"Rader per sida","tr-TR":"Sayfa başına satır sayısı","zh-CN":"每页行数","zh-TW":"每頁列數"}},NebulaTableUtils_Pagination_SelectPage:{id:"NebulaTableUtils.Pagination.SelectPage",locale:{"de-DE":"Seite auswählen","en-US":"Select page","es-ES":"Seleccionar página","fr-FR":"Sélectionner une page","it-IT":"Seleziona pagina","ja-JP":"ページを選択","ko-KR":"페이지 선택","nl-NL":"Pagina selecteren","pl-PL":"Wybierz stronę","pt-BR":"Selecionar página","ru-RU":"Выберите страницу","sv-SE":"Välj sida","tr-TR":"Sayfa seç","zh-CN":"选择页面","zh-TW":"選取頁面"}}};const rh=({translator:e})=>(C((()=>function(e){if(e&&e.get&&e.add){const t="NebulaTableUtils.MenuGroupLabel.Sorting";if(e.get(t)!==t)return;Object.keys(th).forEach((t=>{e.add(th[t])}))}}(e)),[e]),e),nh="12px",oh="nebula-table-utils-head-menu-button",ih="nebula-table-utils-head-menu-wrapper",ah="nebula-table-utils-head-menu-list-id",sh="sn-copy-cell";let lh=function(e){return e.ENTER="Enter",e.SPACE=" ",e.ESC="Escape",e.TAB="Tab",e.SHIFT="Shift",e.LEFT="ArrowLeft",e.RIGHT="ArrowRight",e.UP="ArrowUp",e.DOWN="ArrowDown",e.C="c",e}({});const uh="nebula-table-utils-column-adjuster",ch=`${uh}-border`;let dh=function(e){return e[e.PixelsMin=30]="PixelsMin",e[e.PixelsMax=7680]="PixelsMax",e[e.PixelsDefault=200]="PixelsDefault",e[e.PercentageMin=1]="PercentageMin",e[e.PercentageMax=100]="PercentageMax",e[e.PercentageDefault=20]="PercentageDefault",e[e.PercentageMaxInIndentMode=75]="PercentageMaxInIndentMode",e[e.AutoMinPivot=80]="AutoMinPivot",e[e.AutoMinTable=120]="AutoMinTable",e}({}),ph=function(e){return e.Auto="auto",e.FitToContent="fitToContent",e.Pixels="pixels",e.Percentage="percentage",e}({});const fh=document.createElement("textarea");function mh(e){fh.value=e,document.body.appendChild(fh),fh.select(),fh.setSelectionRange(0,fh.value.length),document.execCommand("copy"),document.body.removeChild(fh)}fh.style.position="absolute",fh.style.left="-9999px",fh.setAttribute("readonly","");const hh=e=>{var t;const r=e.title;r&&(null!==(t=navigator.clipboard)&&void 0!==t&&t.writeText?navigator.clipboard.writeText(r).catch((()=>mh(r))):mh(r))};var gh=Object.prototype.hasOwnProperty,bh=Object.prototype.toString,vh=Object.defineProperty,yh=Object.getOwnPropertyDescriptor,xh=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===bh.call(e)},Sh=function(e){if(!e||"[object Object]"!==bh.call(e))return!1;var t,r=gh.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&gh.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;for(t in e);return void 0===t||gh.call(e,t)},Eh=function(e,t){vh&&"__proto__"===t.name?vh(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Ch=function(e,t){if("__proto__"===t){if(!gh.call(e,t))return;if(yh)return yh(e,t).value}return e[t]};function wh(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Rh(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Ah(){}!function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")&&e.default}((function e(){var t,r,n,o,i,a,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(r in t)n=Ch(s,r),s!==(o=Ch(t,r))&&(c&&o&&(Sh(o)||(i=xh(o)))?(i?(i=!1,a=n&&xh(n)?n:[]):a=n&&Sh(n)?n:{},Eh(s,{name:r,newValue:e(c,a,o)})):void 0!==o&&Eh(s,{name:r,newValue:o}));return s}));var Ih=1/.7,Lh="\\s*([+-]?\\d+)\\s*",Dh="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ph="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Mh=/^#([0-9a-f]{3,8})$/,_h=new RegExp(`^rgb\\(${Lh},${Lh},${Lh}\\)$`),Th=new RegExp(`^rgb\\(${Ph},${Ph},${Ph}\\)$`),kh=new RegExp(`^rgba\\(${Lh},${Lh},${Lh},${Dh}\\)$`),Oh=new RegExp(`^rgba\\(${Ph},${Ph},${Ph},${Dh}\\)$`),qh=new RegExp(`^hsl\\(${Dh},${Ph},${Ph}\\)$`),Nh=new RegExp(`^hsla\\(${Dh},${Ph},${Ph},${Dh}\\)$`),Fh={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function zh(){return this.rgb().formatHex()}function jh(){return this.rgb().formatRgb()}function $h(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Mh.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?Bh(t):3===r?new Vh(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?Hh(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?Hh(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=_h.exec(e))?new Vh(t[1],t[2],t[3],1):(t=Th.exec(e))?new Vh(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=kh.exec(e))?Hh(t[1],t[2],t[3],t[4]):(t=Oh.exec(e))?Hh(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=qh.exec(e))?Zh(t[1],t[2]/100,t[3]/100,1):(t=Nh.exec(e))?Zh(t[1],t[2]/100,t[3]/100,t[4]):Fh.hasOwnProperty(e)?Bh(Fh[e]):"transparent"===e?new Vh(NaN,NaN,NaN,0):null}function Bh(e){return new Vh(e>>16&255,e>>8&255,255&e,1)}function Hh(e,t,r,n){return n<=0&&(e=t=r=NaN),new Vh(e,t,r,n)}function Wh(e){return e instanceof Ah||(e=$h(e)),e?new Vh((e=e.rgb()).r,e.g,e.b,e.opacity):new Vh}function Gh(e,t,r,n){return 1===arguments.length?Wh(e):new Vh(e,t,r,null==n?1:n)}function Vh(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function Uh(){return`#${Jh(this.r)}${Jh(this.g)}${Jh(this.b)}`}function Yh(){const e=Kh(this.opacity);return`${1===e?"rgb(":"rgba("}${Xh(this.r)}, ${Xh(this.g)}, ${Xh(this.b)}${1===e?")":`, ${e})`}`}function Kh(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Xh(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Jh(e){return((e=Xh(e))<16?"0":"")+e.toString(16)}function Zh(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new eg(e,t,r,n)}function Qh(e){if(e instanceof eg)return new eg(e.h,e.s,e.l,e.opacity);if(e instanceof Ah||(e=$h(e)),!e)return new eg;if(e instanceof eg)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,o=Math.min(t,r,n),i=Math.max(t,r,n),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(r-n)/s+6*(r<n):r===i?(n-t)/s+2:(t-r)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new eg(a,s,l,e.opacity)}function eg(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function tg(e){return(e=(e||0)%360)<0?e+360:e}function rg(e){return Math.max(0,Math.min(1,e||0))}function ng(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}wh(Ah,$h,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:zh,formatHex:zh,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Qh(this).formatHsl()},formatRgb:jh,toString:jh}),wh(Vh,Gh,Rh(Ah,{brighter(e){return e=null==e?Ih:Math.pow(Ih,e),new Vh(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new Vh(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Vh(Xh(this.r),Xh(this.g),Xh(this.b),Kh(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Uh,formatHex:Uh,formatHex8:function(){return`#${Jh(this.r)}${Jh(this.g)}${Jh(this.b)}${Jh(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Yh,toString:Yh})),wh(eg,(function(e,t,r,n){return 1===arguments.length?Qh(e):new eg(e,t,r,null==n?1:n)}),Rh(Ah,{brighter(e){return e=null==e?Ih:Math.pow(Ih,e),new eg(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new eg(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,o=2*r-n;return new Vh(ng(e>=240?e-240:e+120,o,n),ng(e,o,n),ng(e<120?e+240:e-120,o,n),this.opacity)},clamp(){return new eg(tg(this.h),rg(this.s),rg(this.l),Kh(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Kh(this.opacity);return`${1===e?"hsl(":"hsla("}${tg(this.h)}, ${100*rg(this.s)}%, ${100*rg(this.l)}%${1===e?")":`, ${e})`}`}}));const og=Math.PI/180,ig=180/Math.PI,ag=4/29,sg=6/29,lg=3*sg*sg;function ug(e){if(e instanceof cg)return new cg(e.l,e.a,e.b,e.opacity);if(e instanceof hg)return gg(e);e instanceof Vh||(e=Wh(e));var t,r,n=mg(e.r),o=mg(e.g),i=mg(e.b),a=dg((.2225045*n+.7168786*o+.0606169*i)/1);return n===o&&o===i?t=r=a:(t=dg((.4360747*n+.3850649*o+.1430804*i)/.96422),r=dg((.0139322*n+.0971045*o+.7141733*i)/.82521)),new cg(116*a-16,500*(t-a),200*(a-r),e.opacity)}function cg(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function dg(e){return e>.008856451679035631?Math.pow(e,1/3):e/lg+ag}function pg(e){return e>sg?e*e*e:lg*(e-ag)}function fg(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function mg(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function hg(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}function gg(e){if(isNaN(e.h))return new cg(e.l,0,0,e.opacity);var t=e.h*og;return new cg(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}wh(cg,(function(e,t,r,n){return 1===arguments.length?ug(e):new cg(e,t,r,null==n?1:n)}),Rh(Ah,{brighter(e){return new cg(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new cg(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return new Vh(fg(3.1338561*(t=.96422*pg(t))-1.6168667*(e=1*pg(e))-.4906146*(r=.82521*pg(r))),fg(-.9787684*t+1.9161415*e+.033454*r),fg(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}})),wh(hg,(function(e,t,r,n){return 1===arguments.length?function(e){if(e instanceof hg)return new hg(e.h,e.c,e.l,e.opacity);if(e instanceof cg||(e=ug(e)),0===e.a&&0===e.b)return new hg(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*ig;return new hg(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new hg(e,t,r,null==n?1:n)}),Rh(Ah,{brighter(e){return new hg(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new hg(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return gg(this).rgb()}}));var bg=e=>()=>e;function vg(e,t){var r=t-e;return r?function(e,t){return function(r){return e+r*t}}(e,r):bg(isNaN(e)?t:e)}!function e(t){var r=function(e){return 1==(e=+e)?vg:function(t,r){return r-t?function(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}(t,r,e):bg(isNaN(t)?r:t)}}(t);function n(e,t){var n=r((e=Gh(e)).r,(t=Gh(t)).r),o=r(e.g,t.g),i=r(e.b,t.b),a=vg(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return n.gamma=e,n}(1);var yg="center",xg="bottom";[{key:"NoDataExist",alignment:yg,condition:function(e){var t=e.layoutService;if(!t)return!1;var r=t.meta.size;return r.x*r.y==0}},{key:"OnlyNanDataMeasure",translationKey:"OnlyNanData",alignment:yg,condition:function(e){var t=e.layoutService;return!!t&&t.getHyperCubeValue("qMeasureInfo").every((function(e){return"NaN"===e.qMin&&"NaN"===e.qMax}))}},{key:"OnlyNanDataDimensionContinuous",translationKey:"OnlyNanData",alignment:yg,condition:function(e){var t=e.layoutService;if(!t)return!1;if(!t.meta.isContinuous)return!1;var r=t.getHyperCubeValue("qDimensionInfo.0");return r&&(r.qMax<r.qMin||"NaN"===r.qMax)}},{key:"OnlyNegativeOrZeroValues",alignment:yg},{key:"DataRangeIncludingZero",alignment:xg},{key:"LimitedData",alignment:xg},{key:"NegativeOrZeroValues",alignment:xg}].reduce((function(e,t){return e[t.key]=t,e}),{});var Sg,Eg=["__proto__","constructor"];function Cg(e,t,r){if(void 0!==e&&void 0!==t){var n=t.split("."),o=n[n.length-1];if(!Eg.some((function(e){return n.includes(e)}))){for(var i=e,a=0;a<n.length-1;++a){var s=n[a];void 0===i[s]&&(i[s]=Number.isNaN(+n[a+1])?{}:[]),i=i[s]}void 0!==r?i[o]=r:delete i[o]}}}function wg(e){var t=0,r=e.children,n=r&&r.length;if(n)for(;--n>=0;)t+=r[n].value;else t=1;e.value=t}function Rg(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=Ig)):void 0===t&&(t=Ag);for(var r,n,o,i,a,s=new Pg(e),l=[s];r=l.pop();)if((o=t(r.data))&&(a=(o=Array.from(o)).length))for(r.children=o,i=a-1;i>=0;--i)l.push(n=o[i]=new Pg(o[i])),n.parent=r,n.depth=r.depth+1;return s.eachBefore(Dg)}function Ag(e){return e.children}function Ig(e){return Array.isArray(e)?e[1]:null}function Lg(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function Dg(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function Pg(e){this.data=e,this.depth=this.height=0,this.parent=null}Pg.prototype=Rg.prototype={constructor:Pg,count:function(){return this.eachAfter(wg)},each:function(e,t){let r=-1;for(const n of this)e.call(t,n,++r,this);return this},eachAfter:function(e,t){for(var r,n,o,i=this,a=[i],s=[],l=-1;i=a.pop();)if(s.push(i),r=i.children)for(n=0,o=r.length;n<o;++n)a.push(r[n]);for(;i=s.pop();)e.call(t,i,++l,this);return this},eachBefore:function(e,t){for(var r,n,o=this,i=[o],a=-1;o=i.pop();)if(e.call(t,o,++a,this),r=o.children)for(n=r.length-1;n>=0;--n)i.push(r[n]);return this},find:function(e,t){let r=-1;for(const n of this)if(e.call(t,n,++r,this))return n},sum:function(e){return this.eachAfter((function(t){for(var r=+e(t.data)||0,n=t.children,o=n&&n.length;--o>=0;)r+=n[o].value;t.value=r}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,r=function(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),o=null;for(e=r.pop(),t=n.pop();e===t;)o=e,e=r.pop(),t=n.pop();return o}(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var o=n.length;e!==r;)n.splice(o,0,e),e=e.parent;return n},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(r){r!==e&&t.push({source:r.parent,target:r})})),t},copy:function(){return Rg(this).eachBefore(Lg)},[Symbol.iterator]:function*(){var e,t,r,n,o=this,i=[o];do{for(e=i.reverse(),i=[];o=e.pop();)if(yield o,t=o.children)for(r=0,n=t.length;r<n;++r)i.push(t[r])}while(i.length)}},Sg=function(e){
100
100
  /*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
101
- e.exports=function(e,t){if(!e||isNaN(+t))return t;var r,n,o,i,a,s,l,u,c,d,p=e.length,f=e.search(/[0-9\-\+#]/),m=f>0?e.substring(0,f):"",h=e.split("").reverse().join(""),g=h.search(/[0-9\-\+#]/),b=p-g,v=e.substring(b,b+1),y=b+("."===v||","===v?1:0),x=g>0?e.substring(y,p):"";if(r=(t="-"===(e=e.substring(f,y)).charAt(0)?-t:+t)<0?t=-t:0,o=(n=e.match(/[^\d\-\+#]/g))&&n[n.length-1]||".",i=n&&n[1]&&n[0]||",",e=e.split(o),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(u=t.split("."))[1]||u[1]&&u[1].length<=s)&&(t=(+t).toFixed(s+1)),c=e[0].split(i),e[0]=c.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;u[0].length<e[0].length-a;)u[0]="0"+u[0];else 0==+u[0]&&(u[0]="");if((t=t.split("."))[0]=u[0],l=c[1]&&c[c.length-1].length){for(h="",b=(d=t[0]).length%l,p=d.length,y=0;y<p;y++)h+=d.charAt(y),!((y-b+1)%l)&&y<p-l&&(h+=i);t[0]=h}return t[1]=e[1]&&t[1]?o+t[1]:"","0"!==(n=t.join(""))&&""!==n||(r=!1),m+(r?"-":"")+n+x}},Sg({exports:{}});var Mg={exports:{}};self,Mg.exports=(()=>{var e={229:e=>{var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},a=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var n,o=t.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!i)return!1;for(n in e);return void 0===n||t.call(e,n)},s=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,r){if("__proto__"===r){if(!t.call(e,r))return;if(o)return o(e,r).value}return e[r]};e.exports=function e(){var t,r,n,o,u,c,d=arguments[0],p=1,f=arguments.length,m=!1;for("boolean"==typeof d&&(m=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(r in t)n=l(d,r),d!==(o=l(t,r))&&(m&&o&&(a(o)||(u=i(o)))?(u?(u=!1,c=n&&i(n)?n:[]):c=n&&a(n)?n:{},s(d,{name:r,newValue:e(m,c,o)})):void 0!==o&&s(d,{name:r,newValue:o}));return d}},645:(e,t)=>{(()=>{var e={229:e=>{var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},a=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var n,o=t.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!i)return!1;for(n in e);return void 0===n||t.call(e,n)},s=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,r){if("__proto__"===r){if(!t.call(e,r))return;if(o)return o(e,r).value}return e[r]};e.exports=function e(){var t,r,n,o,u,c,d=arguments[0],p=1,f=arguments.length,m=!1;for("boolean"==typeof d&&(m=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(r in t)n=l(d,r),d!==(o=l(t,r))&&(m&&o&&(a(o)||(u=i(o)))?(u?(u=!1,c=n&&i(n)?n:[]):c=n&&a(n)?n:{},s(d,{name:r,newValue:e(m,c,o)})):void 0!==o&&s(d,{name:r,newValue:o}));return d}}},r={};function n(t){var o=r[t];if(void 0!==o)return o.exports;var i=r[t]={exports:{}};return e[t](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{n.r(o),n.d(o,{default:()=>Me});var e=n(229),t=n.n(e);const r=function(e,t,r){if(!t)return!1;var n,o=t.split("."),i=o[o.length-1],a=e;for(n=0;n<o.length-1;++n)void 0===a[o[n]]&&(a[o[n]]=Number.isNaN(+o[n+1])?{}:[]),a=a[o[n]];if(void 0!==r){var s=a[i];return a[i]=r,{updated:r,previous:s}}return delete a[i],!1},i=function(e,t,r){var n,o=t.split("."),i=e;if(void 0===i)return r;for(n=0;n<o.length;++n){if(void 0===i[o[n]])return r;i=i[o[n]]}return i},a={EXPRESSIONS:{observed:"",trend:"STL_Trend",seasonal:"STL_Seasonal",residual:"STL_Residual"},OPTIONS:[{value:"observed",translation:"cao.trendDecomposition.parameters.decomposition.observed"},{value:"trend",translation:"cao.trendDecomposition.parameters.decomposition.trend"},{value:"seasonal",translation:"cao.trendDecomposition.parameters.decomposition.seasonal"},{value:"residual",translation:"cao.trendDecomposition.parameters.decomposition.residual"}]};var s="".concat(" ","(").concat(" "),l="".concat(" ",")").concat(" ");function u(e){return s+e+l}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var r=function(e,t){if(!t)return null;var r,n;for(r=0;r<t.length;r++)if((n=t[r]).qInfo.qId===e)return n;return null}(e.qLibraryId,t.dimensionList);return r&&r.qData.info[0].qTags.indexOf("$numeric")>-1}var n=function(e,t){if(!t)return null;var r,n,o=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var r=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(r)&&(t=(t=t.substring(1,r)).trim()),t}(e);for(r=0;r<t.length;r++){if((n=t[r]).qName===o)return n;if(n.qDerivedFieldData)for(var i=0;i<n.qDerivedFieldData.qDerivedFieldLists.length;++i)for(var a=n.qDerivedFieldData.qDerivedFieldLists[i],s=0;s<a.qFieldDefs.length;++s){var l=a.qFieldDefs[s];if(l.qName===o)return l}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return n&&n.qTags.indexOf("$numeric")>-1}function d(e){return!(!e.fullAccumulation&&!e.fullRange)}function p(e,t){var r=e.crossAllDimensions;return 2===t&&r?"RowNo(Total)":"RowNo()"}function f(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e),r=t.trim();return"="===r.substring(0,1)?r.substring(1).trim():r}function m(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function h(e,t){var r=e.crossAllDimensions;return 2===t&&r?"Above(Total ":"Above("}function g(e){return void 0===e?")":", 0, ".concat(e,")")}function b(e){return"Replace(Replace(".concat(e,",'''',''''''),'$','$''&''')")}function v(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=").concat(b("MinString(".concat(t,")")),")' and Only({1}").concat(t,")<='$(=").concat(b("MaxString(".concat(t,")")),")'\"}")}function y(e){var t=e.modifier,r=void 0===t?{}:t,n=e.dimensions,o=e.dimensionAndFieldList,i=e.funcComp,a=void 0===i?"Sum":i,s=e.valueComp,l=void 0===s?"0":s;if(!r.showExcludedValues)return"";if(n&&1===n.length){var u=v(c(n[0],o),m(0));return"".concat(a,"({1<").concat(u,">}").concat(l,")")}if(n&&2===n.length){var d=c(n[0],o),p=c(n[1],o),f=m(0),h=m(1),g=v(d,f),b=v(p,h);return"".concat(a,"({1<").concat(g,",").concat(b,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function x(e){return"".concat(e,"(")}function S(e){var t=e.properties,r=e.layout;return i(t,"qHyperCubeDef.qDimensions",i(r,"qHyperCube.qDimensionInfo",[])).length}const E={isFullRange:d,getNumDimensions:S,getExpressionWithExcludedComp:function(e){var t=e.expression,r=e.modifier,n=e.dimensions,o=e.dimensionAndFieldList,i=e.treatMissingAsNull,a=u(f(t));if(!r.showExcludedValues)return a;var s=y({modifier:r,dimensions:n,dimensionAndFieldList:o}),l=i?"":", 0";if(n&&1===n.length){var c=m(0);return"If(Count(".concat(c,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(n&&2===n.length){var d=m(0),p=m(1);return"If(Count(".concat(d,") * Count(").concat(p,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:p,getNumStepComp:function(e,t){if(!d(e)){var r=e.steps;return"number"!=typeof r||Number.isNaN(r)?6:r}return p(e,t)},getAboveCompPrefix:h,getAboveCompSuffix:g,getAboveComp:function(e,t,r,n){return h(e,t)+r+g(n)},getFunctionPrefix:x,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return x(e)+t+")"},getAggrComp:function(e,t,r){return"Aggr(".concat(e,", ").concat(t,", ").concat(r,")")},getExcludedComp:y,needDimension:function(e){var t=e.modifier,r=e.properties,n=e.layout,o=function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t);return 0===o&&2===S({properties:r,layout:n})},getDimComp:function(e,t){var r=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),n=m(t);if(!r.qSortByExpression&&!r.qSortByNumeric&&!r.qSortByAscii)return n;var o=["Descending","Ascending"],i=r.qSortByNumeric?"(Numeric, ".concat(o[(r.qSortByNumeric+1)/2],")"):"",a=r.qSortByAscii?"(Text, ".concat(o[(r.qSortByAscii+1)/2],")"):"";return r.qSortByNumeric&&r.qSortByAscii?"(".concat(n,", ").concat(i,", ").concat(a,")"):r.qSortByNumeric?"(".concat(n,", ").concat(i,")"):r.qSortByAscii?"(".concat(n,", ").concat(a,")"):n},simplifyExpression:f,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var r=t.indexOf(s);if(-1!==r){var n=t.indexOf(l);if(-1!==n)return t.substring(r+s.length,n)}}},initModifier:function(e,t){Object.keys(t).forEach((function(r){void 0===e[r]&&(e[r]=t[r])}))},isNumeric:c,isApplicable:function(e){var t=e.properties,r=e.layout,n=e.minDimensions,o=void 0===n?1:n,i=e.maxDimensions,a=void 0===i?2:i;if(!t&&!r)return!0;var s=S({properties:t,layout:r});return s>=o&&s<=a},getExpressionWithMarkers:u,canExtract:function(e){var t=e.indexOf(s),r=e.indexOf(l);return t>-1&&r>-1&&t<r},getDimDefWithWrapper:m,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")},generateTSDExpression:function(e,t,r){var n=t||e.outputExpression;if(e.base&&e.base.qDef&&(n=t!==e.base.qDef?t:e.base.qDef),"observed"!==e.decomposition){var o=r.qHyperCubeDef.qMeasures.find((function(t){return t.qDef.base&&t.qDef.base.qLibraryId&&e.base&&e.base.qLibraryId?t.qDef.base.qLibraryId===e.base.qLibraryId:null}));o&&t!==o.qDef.qLabel&&(n=o.qLibraryId||o.qDef.base.qLibraryId?"[".concat(o.qDef.qLabel,"]"):o.qDef.base.qDef);var i=function(e){var t=a.OPTIONS.find((function(t){return t.value===e.decomposition}));return t?a.EXPRESSIONS[t.value]:""}(e);n=n.startsWith("=")?n.substr(1):n,n="".concat(i,"(").concat(n,", ").concat(e.steps,")")}return n},getDecomposition:function(e){var t="observed";return Object.values(a.EXPRESSIONS).find((function(r){var n=e.qDef.base.qDef.toLowerCase()||e.qDef.qDef.toLowerCase();return a.EXPRESSIONS[r]&&n.includes(a.EXPRESSIONS[r].toLowerCase())&&(t=r),r})),t}};function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}var R=t().bind(null,!0),A={},I=Array.isArray;function L(e){return null!=e&&!Array.isArray(e)&&"object"===w(e)}function D(e){return void 0===e}function P(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function M(e,t){var r,n=t.substring(1).split("/").slice(0,-1);return n.forEach((function(t,o){if(o!==n.length){r=+t;var i=Number.isNaN(r)?{}:[];e[r||t]=D(e[r||t])?i:e[t],e=e[r||t]}})),e}function _(e,t){var r=!0;if(L(e)&&L(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((function(n){_(e[n],t[n])||(r=!1)})),r);if(I(e)&&I(t)){if(e.length!==t.length)return!1;for(var n=0,o=e.length;n<o;n+=1)if(!_(e[n],t[n]))return!1;return!0}return e===t}A.generate=function(e,t,r){r=r||"";var n=[];return Object.keys(t).forEach((function(o){var i=function(e){return e?R({},{val:e}).val:e}(t[o]),a=e[o],s="".concat(r,"/").concat(o);_(i,a)||P(t,o)||(D(a)?n.push({op:"add",path:s,value:i}):L(i)&&L(a)?n=n.concat(A.generate(a,i,s)):I(i)&&I(a)?n=n.concat(function(e,t,r){var n=[],o=e.slice(),i=-1;function a(e,t,r){if(e[r]&&D(e[r].qInfo))return null;if(e[r]&&e[r].qInfo.qId===t)return r;for(var n=0,o=e.length;n<o;n+=1)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(_(t,o))return n;if(!D(t[0])&&D(t[0].qInfo))return n.push({op:"replace",path:r,value:t}),n;for(var s=o.length-1;s>=0;s-=1)-1===(i=a(t,o[s].qInfo&&o[s].qInfo.qId,s))?(n.push({op:"remove",path:"".concat(r,"/").concat(s)}),o.splice(s,1)):n=n.concat(A.generate(o[s],t[i],"".concat(r,"/").concat(s)));for(var l=0,u=t.length;l<u;l+=1)-1===(i=a(o,t[l].qInfo&&t[l].qInfo.qId))?(n.push({op:"add",path:"".concat(r,"/").concat(l),value:t[l]}),o.splice(l,0,t[l])):i!==l&&(n.push({op:"move",path:"".concat(r,"/").concat(l),from:"".concat(r,"/").concat(i)}),o.splice(l,0,o.splice(i,1)[0]));return n}(a,i,s)):n.push({op:"replace",path:"".concat(r,"/").concat(o),value:i}))})),Object.keys(e).forEach((function(o){D(t[o])&&!P(e,o)&&n.push({op:"remove",path:"".concat(r,"/").concat(o)})})),n},A.apply=function(e,t){t.forEach((function(t){var r,n,o=M(e,t.path),i=t.path.split("/").splice(-1)[0],a=i&&Number.isNaN(+i)?o[i]:o[+i]||o,s=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(o=null,a=e),"add"===t.op||"replace"===t.op)if(I(o))"-"===i&&(i=o.length),o.splice(+i,"add"===t.op?0:1,t.value);else if(I(a)&&I(t.value)){var l,u=t.value.slice();a.length=0,(l=a).push.apply(l,function(e){if(Array.isArray(e))return C(e)}(n=u)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?C(e,t):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}else if(L(a)&&L(t.value))r=a,Object.keys(r).forEach((function(e){Object.getOwnPropertyDescriptor(r,e).configurable&&!P(r,e)&&delete r[e]})),R(a,t.value);else{if(!o)throw new Error("Patchee is not an object we can patch");o[i]=t.value}else if("move"===t.op){var c=M(e,t.from);I(o)?o.splice(+i,0,c.splice(+s,1)[0]):(o[i]=c[s],delete c[s])}else"remove"===t.op&&(I(o)?o.splice(+i,1):delete o[i])}))},A.clone=function(e){return R({},e)},A.createPatch=function(e,t,r){var n={op:e.toLowerCase(),path:r};return"move"===n.op?n.from=t:void 0!==t&&(n.value=t),n},A.updateObject=function(e,t){Object.keys(e).length?A.apply(e,A.generate(e,t)):R(e,t)};const T=A,k=function(e,r,n){if(!e)return Promise.resolve();var o=T.generate(r,n);return t()(!0,r,n),o&&o.length?(o=o.map((function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}})),e.applyPatches(o,!0)):Promise.resolve()};var O="accumulation";function q(e,t){var r=i(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===O)return r[n]}function N(e,t){var r=function(e,t){var r=i(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===O)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var F={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""};const z={translationKey:"properties.modifier.accumulation",needDimension:E.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return E.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,o=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=a;void 0===l&&(l=E.getNumDimensions({properties:n,layout:o}));var u=i(n,"qHyperCubeDef.qDimensions",[]),c=E.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),d=E.getNumStepComp(r,l),p=E.getAboveComp(r,l,c,d),f=E.getRangeComp("RangeSum",p);if(E.needDimension({modifier:r,properties:n,layout:o})){var m=E.getDimComp(u,1),h=E.getDimComp(u,0),g=E.getAggrComp(f,m,h);f=r.showExcludedValues?E.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:s,valueComp:g}):g}return f},extractInputExpression:E.extractInputExpression,initModifier:function(e){E.initModifier(e,F)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!E.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(N(t,e),".accumulationDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.accumulation.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(N(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.accumulation.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(N(t,e),".fullAccumulation")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(N(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var r=q(t,e);if(r){var n=r.steps;r.steps="number"!=typeof n||Number.isNaN(n)?6:Math.abs(n)}},show:function(t){var r=q(t,e);return r&&!r.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(N(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return E.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(O))return!1;var i=q(t,e);return i&&!i.disabled}};return r}};var j="movingAverage";function $(e,t){var r=i(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===j)return r[n]}function B(e,t){var r=function(e,t){var r=i(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===j)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var H={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1};const W={translationKey:"properties.modifier.movingAverage",needDimension:E.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return E.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,r=e.expression,n=e.modifier,o=e.properties,a=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!n)return r;var u=s;void 0===u&&(u=E.getNumDimensions({properties:o,layout:a}));var c=i(o,"qHyperCubeDef.qDimensions",[]),d=n.showExcludedValues&&n.nullSuppression,p=E.getExpressionWithExcludedComp({expression:r,modifier:n,dimensions:c,dimensionAndFieldList:l,treatMissingAsNull:d}),f=E.getNumStepComp(n,u),m=E.getAboveComp(n,u,p,f);if(n.nullSuppression)t=E.getRangeComp("RangeAvg",m);else{var h=E.getRangeComp("RangeSum",m),g=function(e,t){var r=E.getRowNoComp(e,t);if(!E.isFullRange(e)){var n=e.steps,o="number"!=typeof n||Number.isNaN(n)?6:n;return"RangeMin(".concat(o,", ").concat(r,")")}return r}(n,u);t="".concat(h," / ").concat(g)}var b=t;if(E.needDimension({modifier:n,properties:o,layout:a})){var v=E.getDimComp(c,1),y=E.getDimComp(c,0),x=E.getAggrComp(b,v,y);b=n.showExcludedValues?E.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return b},extractInputExpression:E.extractInputExpression,initModifier:function(e){E.initModifier(e,H)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:function(e,t){return!E.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(B(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.movingAverage.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(B(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.movingAverage.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(B(t,e),".fullRange")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(B(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var r=$(t,e);if(r){var n=r.steps;r.steps="number"!=typeof n||Number.isNaN(n)?6:Math.abs(n)}},show:function(t){var r=$(t,e);return r&&!r.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(B(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(B(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return E.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(j))return!1;var i=$(t,e);return i&&!i.disabled}};return r}};var G="timeSeriesDecomposition";function V(e,t){var r=i(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===G)return r[n]}function U(e,t){var r=function(e,t){var r=i(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===G)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var Y={type:"timeSeriesDecomposition",disabled:!1,decomposition:"",steps:2,outputExpression:""};const K={translationKey:"properties.modifier.timeSeriesDecomposition",needDimension:E.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return E.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties;return r?E.generateTSDExpression(r,t,n):t},extractInputExpression:E.extractInputExpression,initModifier:function(e,t){E.initModifier(e,Y),""===e.decomposition&&t&&(e.decomposition=E.getDecomposition(t))},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.timeSeriesDecomposition||"properties.modifier.timeSeriesDecomposition",show:function(e,t){return!E.isApplicable({properties:t.properties})}},settings:{type:"items",items:{decomposition:{refFn:function(t){return"".concat(U(t,e),".decomposition")},type:"string",translation:t.modifierTrendDecompositionDecomposition||"properties.modifier.trendDecomposition.decomposition",component:"dropdown",schemaIgnore:!0,defaultValue:t.trendDecompositionParametersDecompositionObserved||"cao.trendDecomposition.parameters.decomposition.observed",options:a.OPTIONS},steps:{refFn:function(t){return"".concat(U(t,e),".steps")},type:"integer",translation:t.modifierTimeSeriesDecompositionPeriods||"properties.modifier.timeSeriesDecomposition.periods",schemaIgnore:!0,defaultValue:2,change:function(t,r){var n=V(t,e);if(n){var o=n.steps;n.steps="number"!=typeof o||Number.isNaN(o)?2:Math.abs(o),r.properties.qHyperCubeDef.qMeasures=r.properties.qHyperCubeDef.qMeasures.map((function(e){return e.qDef.modifiers.map((function(e){return"timeSeriesDecomposition"===e.type?e.steps=o:e.steps=e.steps,e})),e}))}},show:function(t){var r=V(t,e);return r&&!r.fullRange}}},show:function(e,t){return E.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(G))return!1;var i=V(t,e);return i&&!i.disabled}};return r}};var X="difference";function J(e,t){var r=i(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===X)return r[n]}function Z(e,t){var r=function(e,t){var r=i(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===X)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var Q={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""};const ee={translationKey:"properties.modifier.difference",needDimension:E.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return E.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:E.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,o=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=a;void 0===l&&(l=E.getNumDimensions({properties:n,layout:o}));var u=i(n,"qHyperCubeDef.qDimensions",[]),c=E.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),d=E.getAboveComp(r,l,c),p="".concat(c," - ").concat(d);if(E.needDimension({modifier:r,properties:n,layout:o})){var f=E.getDimComp(u,1),m=E.getDimComp(u,0),h=E.getAggrComp(p,f,m);p=r.showExcludedValues?E.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:s,funcComp:"Only",valueComp:h}):h}return p},initModifier:function(e){Object.keys(Q).forEach((function(t){void 0===e[t]&&(e[t]=Q[t])}))},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!E.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(Z(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.difference.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(Z(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.difference.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},showExcludedValues:{refFn:function(t){return"".concat(Z(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return E.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(X))return!1;var i=J(t,e);return i&&!i.disabled}};return r}};var te="normalization";function re(e,t){var r=i(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===te)return r[n]}function ne(e,t){var r=function(e,t){var r=i(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===te)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}function oe(e,t){for(var r=0;r<e.length;r++)if(e[r].value===t)return r;return-1}var ie={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:2,selectionScope:2};function ae(e){return 2===e?"{1}":""}function se(e,t,r){return 1===e?"{$<".concat(E.getFieldWithWrapper(t),"={'").concat(r,"'}>}"):""}function le(e,t){return 0===e&&t>1||2===e?"Total":""}function ue(e,t,r){return 0===e&&t>1?"<".concat(E.getDimDefWithWrapper(r),">"):""}const ce={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,r=e.layout;return E.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:E.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,o=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=a;void 0===l&&(l=E.getNumDimensions({properties:n,layout:o}));var u=i(n,"qHyperCubeDef.qDimensions",[]),c=E.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),d=r.selectionScope,p=r.dimensionalScope;return function(e,t,r,n,o,i,a){var s=ae(t),l=se(t,r,n),u=""===s&&""===l?"":s||l,c=le(o,i),d=ue(o,i,a),p=function(e){for(var t=[],r=0;r<e;r++)t[r]=E.getDimDefWithWrapper(r);return t.join(", ")}(i);return"".concat(e,"/ Sum(").concat(u," ").concat(c).concat(d," Aggr(").concat(u," ").concat(e,", ").concat(p,"))")}(c,d,r.field,r.value,p,l,r.primaryDimension)},initModifier:function(e){Object.keys(ie).forEach((function(t){void 0===e[t]&&(e[t]=ie[t])}))},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!E.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(ne(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,options:function(r){return function(e,t,r){var n=[{value:0,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:1,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:2,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return n=function(e,t,r){if(1===e){var n=oe(t,0);t.splice(n,1)}return t}(re(e,r).dimensionalScope,n),n}(r,t,e)}},field:{refFn:function(t){return"".concat(ne(t,e),".field")},type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:function(e,t,r){return r.app.getFieldList().then((function(e){return e.map((function(e){return{label:e.qName,value:e.qName}}))}))},show:function(t){return 1===re(t,e).selectionScope}},value:{refFn:function(t){return"".concat(ne(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return 1===re(t,e).selectionScope}},dimensionalScope:{refFn:function(t){return"".concat(ne(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,supportTooltip:!0,options:function(r,n){return function(e,t,r,n){var o=t.layout.qHyperCube.qDimensionInfo.length,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.".concat(2===o?"respectAllDimensions":"respectDimension"),tooltipTranslation:r.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===o?"respectAllDimensions":"respectDimension",".tooltip")},{value:2,translation:r.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===o?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:r.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===o?"disregardAllDimensions":"disregardDimension",".tooltip")}];return i=function(e,t,r){if(e<2){var n=oe(t,0);t.splice(n,1)}return t}(o,i),i=function(e,t,r){if(0===e){var n=oe(t,1);t.splice(n,1)}return t}(re(e,n).selectionScope,i),i}(r,n,t,e)}},primaryDimension:{refFn:function(t){return"".concat(ne(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.normalization.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(t,r){return 0===(re(t,e).dimensionalScope||0)&&r.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return E.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(te))return!1;var i=re(t,e);return i&&!i.disabled}};return r},getDisregardSelectionComp:ae,getFieldSelectionComp:se,getTotalComp:le,getSelectedDimComp:ue};var de="qDef.base",pe="qDef.qDef",fe="qDef.base.qDef",me="qLibraryId",he="qDef.base.qLibraryId";const ge={getExpression:function(e){var t=i(e,fe);return void 0!==t?t:i(e,pe)},getExpressionRef:function(e){return void 0!==i(e,fe)?fe:pe},getLibraryIdRef:function(e){return i(e,he)?he:me},getLibraryId:function(e){return i(e,he)||i(e,me)},getLabelRef:function(e){return i(e,de)?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return i(e,de)?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}};var be="qDef.qDef",ve="qDef.base.qDef",ye="qLibraryId",xe="qDef.base.qLibraryId",Se="qDef.qLabel",Ee="qDef.qLabelExpression",Ce="qDef.base.qLabel",we="qDef.base.qLabelExpression",Re="qDef.qAggrFunc",Ae="qDef.base.qAggrFunc",Ie={initBase:function(e,t){(t||Ie.isValid(e))&&(r(e,ve,i(e,be)),r(e,xe,i(e,ye)),r(e,Ce,i(e,Se)),r(e,we,i(e,Ee)))},restoreBase:function(e){Ie.isValid(e)&&(r(e,be,i(e,ve)),r(e,ye,i(e,xe)),r(e,Se,i(e,Ce)),r(e,Ee,i(e,we)),i(e,Re)&&i(e,Ae)&&r(e,Re,i(e,Ae)),delete e.qDef.base)},isValid:function(e){var t=i(e,ve),r=i(e,xe);return void 0!==t||void 0!==r}};const Le=Ie;function De(e){return De="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},De(e)}var Pe={accumulation:z,movingAverage:W,difference:ee,normalization:ce,timeSeriesDecomposition:K};const Me={modifiers:Pe,apply:Te,applyModifiers:ke,cleanUpMeasure:Oe,destroy:function(e){e&&_e[e.id]&&_e[e.id].masterItemSubscriber&&(_e[e.id].masterItemSubscriber&&_e[e.id].masterItemSubscriber.unsubscribe(),delete _e[e.id])},hasActiveModifiers:qe,getActiveModifier:Ne,initBase:Le.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some((function(e){return Pe[e]}))},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some((function(e){return Pe[e]&&Pe[e].isApplicable({properties:r,layout:n})}))},measureBase:ge,limitedSorting:function(e){var t=e.measures,r=e.properties,n=e.layout,o=!1,i=!1;return t.forEach((function(e){var t=je(e);Ue({modifiers:t,properties:r,layout:n})&&(o=!0,i=i||Ze({modifiers:t,properties:r,layout:n}))})),o&&!i},ifEnableTotalsFunction:Fe};var _e={};function Te(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.model,n=e.properties,o=e.isSnapshot,a=void 0!==o&&o,s=e.masterItem,l=!1;_e[r.id]=_e[r.id]||{isFirstTime:!0};var u=_e[r.id].isFirstTime;if(_e[r.id].isFirstTime=!1,n&&"object"===De(n))return ke({model:r,properties:n});var c=r?r.layout:void 0,d=i(c,"qSelectionInfo.qInSelections");if(a||d)return Promise.resolve(l);var p=i(c,"qHyperCube.qMeasureInfo"),f=_e[r.id].lastReloadTime;if(_e[r.id].lastReloadTime=i(r,"app.layout.qLastReloadTime"),qe({measures:p,layout:c})){var m=function(e){var t=e.measures,r=e.layout,n=e.lastReloadTime;return i(e.model,"app.layout.qLastReloadTime")!==n&&function(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ve({measure:e,properties:r,layout:n})}))}({measures:t,layout:r})}({measures:p,layout:c,model:r,lastReloadTime:f});return m||function(e){var t=e.measures,r=e.layout,n=e.masterItem,o=e.isFirstTime;return!!Array.isArray(t)&&(o||n||t.some((function(e){return function(e){var t=e.measure,r=e.layout;return Ue({modifiers:je(t),layout:r})?!t.base:!!t.base}({measure:e,layout:r})})))}({measures:p,layout:c,masterItem:s,isFirstTime:u})?r.getEffectiveProperties().then((function(e){var n=t()(!0,{},e);Be(n);var o=Qe(n);return Ye({model:r}).then((function(t){return Ke({libraryIds:o,model:r}).then((function(o){return m&&function(e){var t=e.properties;ze(t).forEach((function(e){return function(e){var t=e.measure;if(Ve({measure:t,properties:e.properties})){var r=0,n=t.qDef.modifiers;Array.isArray(n)&&n.forEach((function(e){if("object"===De(e)&&!e.disabled){if(r++,"object"!==De(Pe[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(r>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var n=Pe[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==n&&We(t)&&E.simplifyExpression(t.qDef.base.qDef)!==E.simplifyExpression(n)&&(t.qDef.base.qDef=n)}}))}}({measure:e,properties:t})}))}({properties:n}),ke({model:r,oldProperties:e,properties:n,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:o,dimensionAndFieldList:t})}))}))})):Promise.resolve(l)}return function(e){return!!Array.isArray(e)&&e.some((function(e){return"object"===De(e.base)}))}(p)?r.getEffectiveProperties().then((function(e){return function(e){var r=e.model,n=e.properties,o=Qe(n);return et({model:r,libraryIds:o}).then((function(){var e=t()(!0,{},n);return ze(n).forEach((function(e){return Oe(e)})),Je({oldProperties:e,newProperties:n,model:r})}))}({model:r,properties:e})})):Promise.resolve(l)}function ke(e){var r=e.model,n=e.oldProperties,o=e.properties,a=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,u=e.masterItem,c=e.libraryItemsProps,d=e.dimensionAndFieldList;void 0===n&&(n=l?t()(!0,{},o):o),Be(o);var p=Qe(o);return et({model:r,libraryIds:p,masterItem:u}).then((function(){return function(e){var r=e.measures,n=e.properties,o=e.model,a=e.libraryItemsProps,s=e.dimensionAndFieldList;if(r||(r=ze(n)),!r.length)return Promise.resolve();if(!qe({measures:r,properties:n}))return r.forEach((function(e){return Oe(e)})),Promise.resolve();var l=a?void 0:Qe(n);return Ye({model:o,dimensionAndFieldList:s}).then((function(e){return Ke({libraryIds:l,model:o,libraryItemsProps:a}).then((function(o){r.forEach((function(r){Ue({modifiers:r.qDef.modifiers,properties:n})?(function(e){var r=e.measure,n=e.properties,o=e.libraryItemsProps,a=e.dimensionAndFieldList,s=0;Le.isValid(r)||Le.initBase(r,!0);var l=r.qDef,u=l.modifiers,c=l.base;Array.isArray(u)&&u.forEach((function(e){if("object"===De(e)&&!e.disabled){if(s++,"object"!==De(Pe[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(s>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");Pe[e.type].initModifier(e,r);var l=r.qLibraryId||c&&c.qLibraryId;l?function(e){var r=e.measure,n=e.modifier,o=e.properties,i=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=""===s?s:Pe[n.type].generateExpression({expression:s,modifier:n,properties:o,dimensionAndFieldList:i});n.outputExpression=l,r.qDef.qDef=n.outputExpression,(r.qDef.qLabel||a.qMeasure.qLabel)&&(r.qDef.qLabel=a.qMeasure.qLabel),(r.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(r.qDef.qLabelExpression=a.qMeasure.qLabelExpression),r.qDef.quarantine&&r.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(r.qDef.qNumFormat=a.qMeasure.qNumFormat,r.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete r.qLibraryId,r.qDef.coloring=a.qMeasure.coloring,n.base=t()(!0,{},r.qDef.base)}({measure:r,modifier:e,libraryId:l,properties:n,libraryItemsProps:o,dimensionAndFieldList:a}):function(e){var r=e.measure,n=e.modifier,o=e.properties,i=e.dimensionAndFieldList;"function"==typeof Pe[n.type].updateModifier&&Pe[n.type].updateModifier(n,o.qHyperCubeDef);var a=ge.getExpression(r),s=""===a?a:Pe[n.type].generateExpression({expression:a,modifier:n,properties:o,dimensionAndFieldList:i});n.outputExpression=s,r.qDef.qDef=n.outputExpression,r.qDef.base.qLabelExpression?r.qDef.qLabelExpression=r.qDef.base.qLabelExpression:r.qDef.qLabel=r.qDef.base.qLabel||a,n.base=t()(!0,{},r.qDef.base)}({measure:r,modifier:e,properties:n,dimensionAndFieldList:a}),function(e){var t=i(e,"qDef.qAggrFunc");"Expr"!==t||Fe(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&Fe(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(r)}}))}({measure:r,properties:n,libraryItemsProps:o,dimensionAndFieldList:e}),He(r)):Oe(r)}))}))}))}({measures:a,properties:o,model:r,libraryItemsProps:c,dimensionAndFieldList:d}).then((function(){return l?Je({oldProperties:n,newProperties:o,model:r}):Promise.resolve(!1)}))}))}function Oe(e){!function(e){var t=je(e);return Array.isArray(t)&&t.some((function(e){return"object"===De(e)&&!e.disabled&&!Pe[e.type]}))}(e)?Le.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,He(e)}function qe(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ue({modifiers:je(e),properties:r,layout:n})}))}function Ne(e){var t=je(e);if(Array.isArray(t))for(var r=0;r<t.length;r++){var n=t[r];if(Pe[n.type]&&!n.disabled)return n}}function Fe(e){var t=Ne(e);return!t||Pe[t.type].enableTotalsFunction(e)}function ze(e){return i(e,"qHyperCubeDef.qMeasures",[]).concat(i(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function je(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function $e(e){return i(e,"outputExpression.qValueExpression.qExpr")||i(e,"outputExpression")}function Be(e){ze(e).forEach((function(e){return function(e){var r=Ne(e);r&&(void 0!==r.outputExpression&&$e(r)!==e.qDef.qDef?delete e.qDef.base:!Le.isValid(e)&&r.base&&(e.qDef.base=t()(!0,{},r.base)))}(e)}))}function He(e){var t=je(e);Array.isArray(t)&&t.forEach((function(t){"object"===De(t)&&(t.disabled||!Pe[t.type]&&$e(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)}))}function We(e){return e.base||e.qDef&&e.qDef.base}function Ge(e){var t=We(e);return e.qLibraryId||t&&t.qLibraryId}function Ve(e){var t=e.measure,r=e.properties,n=e.layout;return!Ge(t)&&Ue({modifiers:je(t),properties:r,layout:n})}function Ue(e){var t=e.modifiers,r=e.properties,n=e.layout,o={};return Array.isArray(t)&&t.some((function(e){return!("object"!==De(e)||e.disabled||!Pe[e.type])&&(void 0===o[e.type]&&(o[e.type]=Pe[e.type].isApplicable({properties:r,layout:n})),o[e.type])}))}function Ye(e){var t=e.model,r=e.dimensionAndFieldList;if(r)return Promise.resolve(r);var n=[],o={},i=t.app.getDimensionList().then((function(e){o.dimensionList=e}));n.push(i);var a=t.app.getFieldList().then((function(e){o.fieldList=e}));return n.push(a),Promise.all(n).then((function(){return o}))}function Ke(e){var t=e.libraryIds,r=e.model,n=e.libraryItemsProps;if(n)return Promise.resolve(n);var o=t.measureLibraryIds,i=t.dimensionLibraryIds,a={},s=[];return o.forEach((function(e){var t=r.app.getMeasure(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),i.forEach((function(e){var t=r.app.getDimension(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),Promise.all(s).then((function(){return a}))}function Xe(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Je(e){var t=e.oldProperties,r=e.newProperties,n=e.model,o=JSON.stringify(i(t,"qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(i(r,"qHyperCubeDef.qMeasures"),Xe)||JSON.stringify(i(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(i(r,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe);return o?function(e){var t=e.model,r=e.oldProperties,n=e.newProperties,o=t.layout;return o&&!o.qHasSoftPatches&&!o.qExtendsId&&i(o,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(n):k(t,r,n)}({model:n,oldProperties:t,newProperties:r}).then((function(){return o})):Promise.resolve(o)}function Ze(e){var t=e.modifiers,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some((function(e){return"object"===De(e)&&!e.disabled&&Pe[e.type]&&Pe[e.type].needDimension({modifier:e,properties:r,layout:n})}))}function Qe(e){var t=ze(e),r=[],n=[],o=!1;return t.forEach((function(t){var n=je(t);if(Ue({modifiers:n,properties:e})){var i=Ge(t);i&&r.push(i),o=o||Ze({modifiers:n,properties:e})}})),i(e,"qHyperCubeDef.qDimensions",[]).forEach((function(e){var t=e.qLibraryId;t&&n.push(t)})),{measureLibraryIds:r,dimensionLibraryIds:n}}function et(e){var t=e.model,r=e.libraryIds;return!e.masterItem&&r&&(r.measureLibraryIds.length||r.dimensionLibraryIds.length)?(_e[t.id].masterItemSubscriber=_e[t.id].masterItemSubscriber||function(e){var t=e.model,r=e.callback,n={},o={},a={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},r=i(e,"qInfo.qType");return r&&s[r]&&s[r].forEach((function(r){t[r]=i(e,r)})),JSON.stringify(t)}function u(e){var t=e.qInfo.qId;if(n[t]){var o=l(e);n[t].properties!==o&&(n[t].properties=o,"function"==typeof r&&n[t].enabled&&r(e)),n[t].enabled=!0}}function c(e,r){return t.app[r](e).then((function(t){n[e]={listener:t.layoutSubscribe(u),enabled:!1,properties:l(t.layout)}}))}return{subscribe:function(e){var r=e.measureLibraryIds,i=e.dimensionLibraryIds,s=[];return function(e){var t=e.dimensionLibraryIds;o={},e.measureLibraryIds.forEach((function(e){o[e]=!0})),a={},t.forEach((function(e){a[e]=!0}))}({measureLibraryIds:r,dimensionLibraryIds:i}),Object.keys(n).forEach((function(e){o[e]||a[e]||(n[e].listener.dispose(),delete n[e])})),t.app&&(Object.keys(o).forEach((function(e){o[e]&&!n[e]&&s.push(c(e,"getMeasure"))})),Object.keys(a).forEach((function(e){a[e]&&!n[e]&&s.push(c(e,"getDimension"))}))),Promise.all(s)},unsubscribe:function(){Object.keys(n).forEach((function(e){n[e].listener.dispose()})),n={}}}}({model:t,callback:function(e){return Te({model:t,masterItem:e}).then((function(){return t.app.clearUndoBuffer()}))}}),_e[t.id].masterItemSubscriber.subscribe(r)):Promise.resolve()}})(),t.default=o.default,Object.defineProperty(t,"__esModule",{value:!0})})()}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var n={};return(()=>{function e(t){var r,n=t;return n>9?(r=65+n-10)>90&&(r+=6):n="".concat(n).charCodeAt(0),[48,111,79,105,73,108].indexOf(r)>-1?e(n+1):String.fromCharCode(r)}function t(r){var n=e(r%62),o=Math.floor(r/62);return o>0?t(o)+n:n}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}r.d(n,{default:()=>Be});const i={getValue:function(e,t,r){if(null==e||null==t)return r;for(var n=t.split("."),o=e,i=0;i<n.length;++i){var a=n[i];if(""!==a){if(void 0===o[a]||null===o[a])return r;o=o[a]}}return o},setValue:function(e,t,r){if(null!=e&&null!=t){for(var n=t.split("."),o=n[n.length-1],i=e,a=0;a<n.length-1;++a){var s=n[a];void 0!==i[s]&&null!==i[s]||(i[s]=Number.isNaN(+n[a+1])?{}:[]),i=i[s]}void 0!==r?i[o]=r:delete i[o]}},isEmpty:function(e){return 0===Object.keys(e).length&&e.constructor===Object},isAtomicValue:function(e){return/boolean|number|string/.test(o(e))},generateId:function(){return t(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function a(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function l(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t,r){if(e){for(var n=0;n<e.length;n++)if(e[n][t]===r)return n;return-1}return-1}const d={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;var r=e.indexOf(t[0]);if(-1!==r){for(var n=0;n<t.length;n++){var o=e.indexOf(t[n]);if(r>o)return!1;r=o}return!0}return!1},indexAdded:function(e,t){var r;for(r=0;r<e.length;++r)e[r]>=0&&e[r]>=t&&++e[r];e.push(t)},indexRemoved:function(e,t){var r,n=0;for(r=0;r<e.length;++r)e[r]>t?--e[r]:e[r]===t&&(n=r);return e.splice(n,1),n},findItemByPropertyValue:function(e,t,r){if(e){for(var n=0;n<e.length;n++)if(e[n][t]===r)return e[n];return null}return null},findIndexByPropertyValue:c};var p=r(645),f=r.n(p);const m=function(e){var t,r=e.exportFormat,n=e.qHyperCubeDef,o=r.data[0];(t=o.dimensions).push.apply(t,a(n.qDimensions));var s,l=i.getValue(n,"qLayoutExclude.qHyperCubeDef.qDimensions");l&&(s=o.excludedDimensions).push.apply(s,a(l))},h=function(e){var t,r=e.exportFormat,n=e.qHyperCubeDef,o=r.data[0];(t=o.measures).push.apply(t,l(n.qMeasures));var a,s=i.getValue(n,"qLayoutExclude.qHyperCubeDef.qMeasures");s&&(a=o.excludedMeasures).push.apply(a,l(s))},g=function(e){var t=e.exportFormat,r=e.qHyperCubeDef,n=t.data[0];r.qInterColumnSortOrder||(r.qInterColumnSortOrder=[]),n.interColumnSortOrder=r.qInterColumnSortOrder.concat();var o=i.getValue(r,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");o&&d.isOrderedSubset(o,n.interColumnSortOrder)&&(n.interColumnSortOrder=o.concat())},b=function(e){var t=e.exportFormat,r=e.properties;Object.keys(r).forEach((function(e){t.properties[e]=r[e]}))},v=function(e){var t=e.exportFormat,r=e.properties;r.qLayoutExclude||(r.qLayoutExclude={}),r.qLayoutExclude.disabled&&(Object.keys(r.qLayoutExclude.disabled).forEach((function(e){t.properties.hasOwnProperty(e)||(t.properties[e]=r.qLayoutExclude.disabled[e])})),delete r.qLayoutExclude.disabled),r.qLayoutExclude.changed&&(function(e){Object.keys(e.qLayoutExclude.changed).forEach((function(t){e.qLayoutExclude.changed[t].to===i.getValue(e,t)&&i.setValue(e,t,e.qLayoutExclude.changed[t].from)}))}(r),delete r.qLayoutExclude.changed),r.qLayoutExclude.quarantine&&!i.isEmpty(r.qLayoutExclude.quarantine)||delete r.qLayoutExclude},y=function(e){e.forEach((function(e){f().cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)}))};function x(e,t,r){var n,o,a=i.getValue(e,t);if(!i.isAtomicValue(a))try{if((o=(o=(n=JSON.stringify(a)).match(/:\{/g))?o.length:0)>2)return;a=JSON.parse(n)}catch(e){return}i.getValue(e,"qLayoutExclude.quarantine")||i.setValue(e,"qLayoutExclude.quarantine",{});var s=i.getValue(e,"qLayoutExclude.quarantine");s[r]||(s[r]={}),s[r][t]=a}var S=r(229),E=r.n(S);function C(e,t){var r=E()(!0,{},t,e);return i.getValue(r,"qOtherTotalSpec.qOtherCounted")||i.setValue(r,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),i.getValue(r,"qOtherTotalSpec.qOtherLimit")||i.setValue(r,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),r.hasOwnProperty("othersLabel")||(r.othersLabel="Others"),r}function w(e,t){return E()(!0,{},t,e)}function R(e,t,r){return"function"==typeof e?e(t):Number.isNaN(+e)?r:e}var A=Math.pow(2,53)-1;function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function L(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}const D=function(e,t,r){var n="masterobject"===i.getValue(t,"properties.qInfo.qType")?"masterobject":i.getValue(r,"qInfo.qType");i.setValue(e,"qInfo.qType",n),e.visualization=r.visualization},P=function(e,t,r){t.hasOwnProperty(e)&&(r[e]=t[e])},M=function(e,t,r,n){t.hasOwnProperty(e)?r[e]=t[e]:r[e]=n},_=function(){return{qDef:{autoSort:!0,cId:"",othersLabel:"Others"},qLibraryId:"",qNullSuppression:!1,qOtherLabel:"Others",qOtherTotalSpec:{qOtherLimitMode:"OTHER_GE_LIMIT",qOtherMode:"OTHER_OFF",qOtherSortMode:"OTHER_SORT_DESCENDING",qSuppressOther:!1}}},T=function(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}},k=function(e){var t,r=e.exportFormat,n=e.maxDimensions,o=e.minDimensions,i=e.newHyperCubeDef,a=e.defaultDimension,s=r.data[0];for(t=0;t<s.dimensions.length;++t){var l=C(s.dimensions[t],a);i.qDimensions.length<n?i.qDimensions.push(l):i.qLayoutExclude.qHyperCubeDef.qDimensions.push(l)}for(t=0;t<s.excludedDimensions.length;++t){var u=C(s.excludedDimensions[t],a);i.qDimensions.length<o?i.qDimensions.push(u):i.qLayoutExclude.qHyperCubeDef.qDimensions.push(u)}},O=function(e){var t,r=e.exportFormat,n=e.maxMeasures,o=e.minMeasures,i=e.newHyperCubeDef,a=e.defaultMeasure,s=r.data[0];for(t=0;t<s.measures.length;++t){var l=w(s.measures[t],a);i.qMeasures.length<n?i.qMeasures.push(l):i.qLayoutExclude.qHyperCubeDef.qMeasures.push(l)}for(t=0;t<s.excludedMeasures.length;++t){var u=w(s.excludedMeasures[t],a);i.qMeasures.length<o?i.qMeasures.push(u):i.qLayoutExclude.qHyperCubeDef.qMeasures.push(u)}},q=function(e){var t=e.exportFormat,r=e.dataDefinition,n=void 0===r?{}:r,o=t.data[0],i=n.dimensions||{max:0},a=n.measures||{max:0},s=R(a.max,o.dimensions.length,A),l=R(a.min,o.dimensions.length,0);return{maxDimensions:R(i.max,s,A),minDimensions:R(i.min,l,0),maxMeasures:s,minMeasures:l}},N=function(e){var t=e.exportFormat,r=e.newHyperCubeDef,n=t.data[0],o=r.qDimensions.length+r.qMeasures.length;r.qInterColumnSortOrder=n.interColumnSortOrder.concat();var i=r.qInterColumnSortOrder.length;if(i!==o)for(r.qLayoutExclude&&(r.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=n.interColumnSortOrder.concat());i!==o;)i<o?(d.indexAdded(r.qInterColumnSortOrder,i),++i):(--i,d.indexRemoved(r.qInterColumnSortOrder,i))},F=function(e){var t=e.exportFormat,r=e.initialProperties,n=e.hypercubePath,o={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach((function(e){"qLayoutExclude"===e?t.properties[e].quarantine&&(o.qLayoutExclude.quarantine=E()(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&n?i.setValue(o,"".concat(n,".qHyperCubeDef"),t.properties.qHyperCubeDef):r.hasOwnProperty(e)||-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)||function(e,t){return"components"===t&&Array.isArray(e[t])&&e[t].some((function(e){return"general"===e.key}))}(t.properties,e)?o[e]=t.properties[e]:o.qLayoutExclude.disabled[e]=t.properties[e]})),null===(o=E()(!0,{},r,o)).components&&(o.components=[]),o},z=function(e){var t=e.exportFormat,r=e.maxDimensions,n=e.minDimensions,o=e.maxMeasures,i=e.minMeasures,a=t.data[0];return a.dimensions.length>r&&r>0||a.measures.length>o&&o>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>n||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>i||!o&&a.measures.length>0||!r&&a.dimensions.length>0},j=function(e){var t=e.exportFormat,r=e.maxDimensions,n=e.minDimensions,o=e.maxMeasures,i=e.minMeasures,a=e.newHyperCubeDef,s=t.data[0];a.qLayoutExclude||(a.qLayoutExclude={}),a.qLayoutExclude.qHyperCubeDef||(a.qLayoutExclude.qHyperCubeDef={}),(s.dimensions.length>r&&r>0||s.excludedDimensions&&s.excludedDimensions.length&&s.dimensions.length+s.excludedDimensions.length>n)&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(s.measures.length>o&&o>0||s.excludedMeasures&&s.excludedMeasures.length&&s.measures.length+s.excludedMeasures.length>i)&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!o&&s.measures.length&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!r&&s.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))},$=function(e){var t,r=e.newProperties,n=e.dataDefinition,o=e.hypercubePath;if(n.dimensions&&"function"==typeof n.dimensions.added){var a=i.getValue(r,o||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return I(e)}(t=a.qDimensions)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return I(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?I(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();a.qDimensions=[],s.forEach((function(e){a.qDimensions.push(e),n.dimensions.added(e,r)}))}},B=function(e){var t,r=e.newProperties,n=e.dataDefinition,o=e.hypercubePath;if(n.measures&&"function"==typeof n.measures.added){var a=i.getValue(r,o||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return L(e)}(t=a.qMeasures)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return L(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?L(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();a.qMeasures=[],s.forEach((function(e){a.qMeasures.push(e),n.measures.added(e,r)}))}},H=function(e){var t=e.measures,r=e.modifierTypes;t&&r&&f().isSupportedModifiers(r)&&t.forEach((function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store}))};function W(e,t){var r=i.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!r&&(Object.keys(r).forEach((function(t){i.setValue(e,t,r[t])})),delete e.qLayoutExclude.quarantine[t],!0)}const G={exportProperties:function(e){var t=e.propertyTree,r=e.hypercubePath,n=e.viewDataMode,o=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t={data:[],properties:{}},r=0;r<e;++r)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}(),a=t.qProperty,s=i.getValue(a,r||""),l=s.qHyperCubeDef;return l.qInterColumnSortOrder||(l.qInterColumnSortOrder=[]),m({exportFormat:o,qHyperCubeDef:l}),h({exportFormat:o,qHyperCubeDef:l}),g({exportFormat:o,qHyperCubeDef:l}),delete l.qLayoutExclude,b({exportFormat:o,properties:a}),r&&(o.properties.qHyperCubeDef=l,delete s.qHyperCubeDef),v({exportFormat:o,properties:a}),n||y(o.properties.qHyperCubeDef.qMeasures),Array.isArray(o.properties.filters)&&(x(o.properties,"filters","storedFilters"),delete o.properties.filters),o.properties.qHyperCubeDef.qContextSetExpression&&(x(o.properties,"qHyperCubeDef.qContextSetExpression","storedFilters"),o.properties.qHyperCubeDef.qContextSetExpression=""),o.properties.qHyperCubeDef.qDynamicScript&&o.properties.qHyperCubeDef.qDynamicScript.length&&(x(o.properties,"qHyperCubeDef.qDynamicScript","dynamicScript"),o.properties.qHyperCubeDef.qDynamicScript=[]),o},importProperties:function(e){var t=e.exportFormat,r=e.initialProperties,n=void 0===r?{}:r,o=e.dataDefinition,a=void 0===o?{}:o,s=e.defaultPropertyValues,l=void 0===s?{}:s,u=e.hypercubePath,c=e.extension,d=e.supportedFilters,p=void 0===d||d,f=e.isHCModifierSupported,m=void 0===f||f,h={qChildren:[]},g=F({exportFormat:t,initialProperties:n,hypercubePath:u}),b=i.getValue(n,u||"").qHyperCubeDef,v=i.getValue(g,u||"").qHyperCubeDef,y=q({exportFormat:t,dataDefinition:a}),x=y.maxDimensions,S=y.minDimensions,E=y.maxMeasures,C=y.minMeasures,w=l.defaultDimension,R=void 0===w?_():w,A=l.defaultMeasure,I=void 0===A?T():A;v.qDimensions.length=0,v.qMeasures.length=0,z({exportFormat:t,maxDimensions:x,minDimensions:S,maxMeasures:E,minMeasures:C})&&j({exportFormat:t,maxDimensions:x,minDimensions:S,maxMeasures:E,minMeasures:C,newHyperCubeDef:v}),k({exportFormat:t,maxDimensions:x,minDimensions:S,newHyperCubeDef:v,defaultDimension:R}),O({exportFormat:t,maxMeasures:E,minMeasures:C,newHyperCubeDef:v,defaultMeasure:I}),$({newProperties:g,dataDefinition:a,hypercubePath:u}),B({newProperties:g,dataDefinition:a,hypercubePath:u}),N({exportFormat:t,newHyperCubeDef:v}),P("qMaxStackedCells",b,v),P("qNoOfLeftDims",b,v),M("qInitialDataFetch",b,v,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),M("qMode",b,v,"S"),M("qReductionMode",b,v,"N"),M("qSortbyYValue",b,v),M("qIndentMode",b,v),M("qShowTotalsAbove",b,v),D(g,t,n),h.qProperty=g;var L=i.getValue(c||{},"support.modifiers");return H({measures:v.qMeasures,modifierTypes:L}),p&&W(h.qProperty,"storedFilters"),"S"===v.qMode&&m&&W(h.qProperty,"dynamicScript"),h}};var V={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function U(e,t,r,n){t=t||[];var o=c(e,n,r),i=c(t,n,r);if(-1!==o&&-1===i){var a=e.splice(o,1);t.push(a[0])}return t}function Y(e,t){return e.length!==t}const K={create:function(e,t){if(!e||!V[e])throw new Error("Attribute Expressions Util: ID required");var r={};return t&&Object.keys(t).forEach((function(e){r[e]=t[e]})),r.id=e,r.qAttribute=!0,r},moveByIdFromGroup:function(e,t,r,n,o){r=r||"qAttributeExpressions",o=o||"id";for(var i=0;i<e.length;i++){var a=e[i][r],s=t.length;if(U(a,t,n,o),Y(t,s))return t}return t},IDMAP:{CELL_BACKGROUND_COLOR:"cellBackgroundColor",CELL_FOREGROUND_COLOR:"cellForegroundColor",COLOR_BY_ALTERNATIVE:"colorByAlternative",COLOR_BY_EXPRESSION:"colorByExpression",TOOLTIP:"tooltip",CELL_LINK_LABEL:"urlLabel",CELL_LINK_URL:"url"}},X={getNumDimensions:function(e){return i.getValue(e,"qHyperCubeDef.qDimensions.length",0)},getNumMeasures:function(e){return i.getValue(e,"qHyperCubeDef.qMeasures.length",0)},wrapFieldName:function(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e},getItemLabel:function(e){return e.label||e.name}},J={colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>0&&X.getNumMeasures(e)<=1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)>0},expression:function(e){return X.getNumMeasures(e)>=1}}},Z={colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumMeasures(e)>=1}}};var Q={scatterplot:Z,"sn-scatter-plot":Z,piechart:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumMeasures(e)>=1}}},linechart:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)<=1},expression:function(e){return X.getNumMeasures(e)>=1}}},map:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>=1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)>=1},expression:function(e){return X.getNumDimensions(e)>=1}}},distributionplot:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumDimensions(e)>=1}}}};function ee(e,t,r){if(Array.isArray(e[t])){var n=d.findIndexByPropertyValue(e[t],"id",r);n>=0&&e[t].splice(n,1)}else e[t]=[]}function te(e,t){var r=K.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach((function(e){ee(e,"qAttributeDimensions",r),ee(e,"qAttributeExpressions",r)})),t.forEach((function(e){ee(e,"qAttributeDimensions",r),ee(e,"qAttributeExpressions",r)}))}function re(e,t){if(t){var r="="===t.charAt(0);e.color.altLabel=r?{qStringExpression:{qExpr:t.substr(1)}}:t}}function ne(e){var t=e.properties,r=e.isDimension,n=e.dimensions,o=e.excludedDimensions,a=e.measures,s=e.label;te(n,o);var l=n[n.length-1];if(l){var u=r?i.getValue(t,"color.byDimDef"):i.getValue(t,"color.byMeasureDef"),c=i.getValue(t,"color.formatting.qNumFormat"),p=i.getValue(t,"color.formatting.isCustomFormatted");if(u){var f=K.create(K.IDMAP.COLOR_BY_ALTERNATIVE);switch(u.type){case"expression":!function(e){var t=e.attributeExpression,r=e.label,n=e.item,o=e.isDimension,i=e.qNumFormat,a=e.isCustomFormatted;t.label=r||n.label,o?t.qDef=n.key:(t.qExpression=n.key,i&&(t.qNumFormat=i,t.isCustomFormatted=a)),t.matchMeasure=n.activeMeasureIndex,t.label&&"="===t.label.charAt(0)&&(t.labelExpRef="color.altLabel")}({attributeExpression:f,label:s,item:u,isDimension:r,qNumFormat:c,isCustomFormatted:p});break;case"libraryItem":!function(e){var t=e.attributeExpression,r=e.measures,n=e.item,o=e.qNumFormat,i=e.isCustomFormatted;e.isDimension||(t.matchMeasure=d.findIndexByPropertyValue(r,"qLibraryId",n.key),o&&(t.qNumFormat=o,t.isCustomFormatted=i)),void 0!==n.expression?t.qExpression=n.expression:t.qLibraryId=n.key,t.colorMapRef=n.key}({attributeExpression:f,measures:a,item:u,isDimension:r,qNumFormat:c,isCustomFormatted:p})}r?(f.qSortBy={qSortByAscii:1},l.qAttributeDimensions.push(f)):l.qAttributeExpressions.push(f)}}}function oe(e,t,r,n){var o,i,a,s={};switch(e){case"dimension":r.qLibraryId?(s.type="dimension",s.name=r.qLibraryId,s.id=r.qLibraryId):(s.type="field",t?(s.name=r.label||r.qDef,s.id=r.qDef):(s.name=r.qDef.qFieldDefs[0],s.label=(a=r.qDef).qLabelExpression?a.qLabelExpression:a.qFieldLabels&&a.qFieldLabels[0]?a.qFieldLabels[0]:a.qFieldDefs[0]));break;case"measure":o=function(e,t){return t?e.qLibraryId:f().measureBase.getLibraryId(e)}(r,t),o?(s.type="measure",s.name=o,s.id=o,i=function(e,t){return f().hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}(r,n),i&&(s.expression=i)):(s.type="expression",t?(s.name=r.label||r.qExpression,s.id=r.qExpression):(s.name=r.qDef.qDef,s.label=function(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qLabel?t.qLabel:t.qDef}(r)));break;default:throw new Error('columnType should be "dimension" or "measure"')}return s}const ie={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}};function ae(e,t,r,n){var o=r?"expression":t.type,i=e.color,a=i.mode,s=X.getItemLabel(t);switch(re(e,s||""),o){case"field":a="byDimension",i.byDimDef={label:t.label||X.wrapFieldName(t.name),key:X.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":a="byMeasure",i.byMeasureDef={label:r||s,key:r||t.name,type:"expression",activeMeasureIndex:t.activeMeasureIndex};break;case"dimension":a="byDimension",i.byDimDef={label:t.name,key:t.id,type:"libraryItem",activeDimensionIndex:t.activeDimensionIndex};break;case"measure":a="byMeasure",i.byMeasureDef={label:t.name,key:t.id,expression:t.expression,type:"libraryItem",activeMeasureIndex:t.activeMeasureIndex},i.formatting&&ie.useMasterNumberFormat(i.formatting)}n||(i.auto=!1,i.mode=a)}function se(e,t){var r=i.getValue(e,"".concat(t,"qDimensions"),[]),n=i.getValue(e,"".concat(t,"qMeasures"),[]),o=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=i.getValue(e,"color.byDimDef");if(a&&re(e,a.label),function(e){return!!(e&&e.activeDimensionIndex>-1)}(a))!function(e,t){var r=i.getValue(e,"".concat(t,"qDimensions"),[]),n=i.getValue(e,"color.byDimDef");n.activeDimensionIndex=Math.min(n.activeDimensionIndex,r.length-1);var o=oe("dimension",!1,r[n.activeDimensionIndex]);o.activeDimensionIndex=n.activeDimensionIndex,ae(e,o)}(e,t);else if(function(e){return!e||!e.key}(a)&&function(e,t){var r=i.getValue(e,"".concat(t,"qDimensions"),[]),n=r[function(e,t,r){var n=i.getValue(t,"visualization"),o=r.split("."),a=Number(o[1]),s=i.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===n&&"point"===s}(r,e,t)?0:r.length-1],o=K.IDMAP.COLOR_BY_ALTERNATIVE,a=d.findItemByPropertyValue(n.qAttributeDimensions,"id",o);return ae(e,oe("dimension",!!a,a||n)),!!a}(e,t))return;ne({properties:e,isDimension:!0,dimensions:r,excludedDimensions:o,measures:n,label:i.getValue(e,"color.byDimDef.label")})}const le=function(e,t,r){i.setValue(e,t,r),i.isAtomicValue(r)&&function(e,t,r){var n=e.qLayoutExclude;n&&(n.changed||(n.changed={}),n.changed[t]={from:i.getValue(e,t),to:r})}(e,t,r)},ue=function(e,t){var r={primary:!0};if(e){var n=(Q[t]||J).colorModeOptions||J.colorModeOptions;r.byDimension=n.dimension(e),r.byMeasure=n.measure(e),r.byMultiple=n.multiColor(e),r.byExpression=n.expression(e)}return r},ce=function(e){var t=e.canColorBy,r=e.autoColor,n=e.colorMode,o=e.dimensions;return!(t[n]&&!r&&("byDimension"!==n&&"byMeasure"!==n||!o.length))},de=function(e,t){var r,n=i.getValue(e,"color.mode"),o=i.getValue(e,"color.auto"),a=i.getValue(e,"".concat(t,"qDimensions"),[]),s=i.getValue(e,"".concat(t,"qMeasures"),[]),l=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);o?te(a,l):!(r={auto:o,colorMode:n,dimensions:a}).auto&&"byDimension"===r.colorMode&&r.dimensions.length>0?se(e,t):function(e){var t=e.auto,r=e.colorMode,n=e.dimensions,o=e.measures,a=e.properties,s=i.getValue(a,"visualization");return!(t||"byMeasure"!==r||!n.length||"map"!==s&&!o.length)}({auto:o,colorMode:n,dimensions:a,measures:s,properties:e})?function(e,t){var r=i.getValue(e,"".concat(t,"qDimensions"),[]),n=i.getValue(e,"".concat(t,"qMeasures"),[]),o=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=i.getValue(e,"color.byMeasureDef");if(a&&re(e,a.label),function(e){return!!(e&&e.activeMeasureIndex>-1)}(a))!function(e,t){var r=i.getValue(e,"".concat(t,"qMeasures"),[]),n=i.getValue(e,"color.byMeasureDef");if(n.activeMeasureIndex=Math.min(n.activeMeasureIndex,r.length-1),n.activeMeasureIndex>-1){var o=oe("measure",!1,r[n.activeMeasureIndex],!0);o.activeMeasureIndex=n.activeMeasureIndex,ae(e,o)}}(e,t);else if(function(e,t){return(!e||!e.key)&&t.length>0}(a,n)&&function(e,t){var r=i.getValue(e,"".concat(t,"qDimensions"),[]),n=i.getValue(e,"".concat(t,"qMeasures"),[]),o=r[r.length-1],a=K.IDMAP.COLOR_BY_ALTERNATIVE,s=d.findItemByPropertyValue(o.qAttributeExpressions,"id",a);return ae(e,oe("measure",!!s,s||n[0])),!!s}(e,t))return;ne({properties:e,isDimension:!1,dimensions:r,excludedDimensions:o,measures:n,label:i.getValue(e,"color.byMeasureDef.label")})}(e,t):function(e,t){var r=i.getValue(e,"color.mode"),n=i.getValue(e,"".concat(t,"qDimensions"),[]),o=i.getValue(e,"".concat(t,"qMeasures"),[]),a=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===r&&o.length<2&&i.setValue(e,"color.mode","primary"),te(n,a)}(e,t)},pe=function(e){e.forEach((function(e){e.qOtherTotalSpec&&"qTotalMode"in e.qOtherTotalSpec&&delete e.qOtherTotalSpec.qTotalMode}))},fe=function(e){var t=e.shouldUpdateColorBy,r=e.properties,n=i.getValue(r,"qHyperCubeDef.qMeasures",[]),o=i.getValue(r,"color.mode","");return!t&&"byExpression"===o&&n.length>0},me=function(e){var t=i.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),r=i.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:r,id:"colorByExpression"}),i.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)},he=function(e){i.setValue(e,"color.mode","primary"),i.setValue(e,"color.auto",!0)},ge=function(e){var t=i.getValue(e,"qHyperCubeDef.qDimensions",[]),r=i.getValue(e,"color.persistent",!1);return t.length>1&&!r},be={exportProperties:function(e){var t=e.propertyTree,r=e.hypercubePath,n=e.viewDataMode,o=G.exportProperties({propertyTree:t,hypercubePath:r,viewDataMode:n}),i=o.data[0],a=i.dimensions.concat(i.excludedDimensions),s=i.measures.concat(i.excludedMeasures),l=K.IDMAP,u=l.COLOR_BY_ALTERNATIVE,c=l.COLOR_BY_EXPRESSION;return K.moveByIdFromGroup(a,[],"qAttributeDimensions",u),K.moveByIdFromGroup(a,[],"qAttributeExpressions",u),K.moveByIdFromGroup(s,[],"qAttributeExpressions",c),o},importProperties:function(e){var t=e.exportFormat,r=e.initialProperties,n=e.dataDefinition,o=e.defaultPropertyValues,a=e.hypercubePath,s=e.extension,l=e.supportedFilters,u=e.isHCModifierSupported,c=G.importProperties({exportFormat:t,initialProperties:r,dataDefinition:n,defaultPropertyValues:o,hypercubePath:a,extension:s,supportedFilters:l,isHCModifierSupported:u}),d=c.qProperty,p=i.getValue(d,"visualization"),f=i.getValue(d,"qHyperCubeDef.qDimensions",[]),m=i.getValue(d,"color.mode",""),h=i.getValue(d,"color.auto",""),g=ue(d,p),b=ce({canColorBy:g,autoColor:h,colorMode:m,dimensions:f});return g[m]?fe({shouldUpdateColorBy:b,properties:d})&&me(d):he(d),b&&de(d,"qHyperCubeDef."),ge(d)&&le(d,"color.persistent",!0),pe(f),c}};var ve=["bar","marker","line"];const ye=function(e){var t=e.initialProperties,r=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?W(r,"unsupportedAutoMinMax")||E()(r.measureAxis,t.measureAxis):W(r,"supportedAutoMinMax")||E()(r.measureAxis,t.measureAxis)},xe=function(e){var t,r=e.exportFormat,n=e.initialProperties,o=e.properties,i=e.measureType,a=o.qHyperCubeDef,s=o.measureAxis;if(function(e){var t=e.initialProperties;return!(!e.exportFormat.properties.measureAxes||t.measureAxes||!t.measureAxis||void 0===t.measureAxis.autoMinMax)}({exportFormat:r,initialProperties:n})){var l=function(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach((function(e){if(e.qDef.series){var r=e.qDef.series,n=r.type,o=r.axis;t[o]||(t[o]={axis:o,type:{line:0,marker:0,bar:0,total:0}}),ve.includes(n)&&t[o].type[n]++,t[o].type.total++}})),t}(a);l.length?(i&&(t=l.filter((function(e){return e.type[i]>0})).sort((function(e,t){return t.type[i]-e.type[i]}))),t&&t.length||(t=l.sort((function(e,t){return t.type.total-e.type.total}))),t&&t[0]&&E()(s,r.properties.measureAxes[t[0].axis])):E()(s,r.properties.measureAxes[0])}},Se=function(e){if(e.qDimensions.length>1){var t=e.qInterColumnSortOrder.indexOf(0);if(0!==t){var r=e.qInterColumnSortOrder[0];e.qInterColumnSortOrder[0]=0,e.qInterColumnSortOrder[t]=r}}},Ee={exportProperties:function(e){var t=e.propertyTree,r=e.hypercubePath,n=e.viewDataMode,o=e.supportedAutoMinMax,i=void 0===o||o,a=be.exportProperties({propertyTree:t,hypercubePath:r,viewDataMode:n}),s=a.properties;return i?(x(s,"measureAxis.min","supportedAutoMinMax"),x(s,"measureAxis.max","supportedAutoMinMax")):(x(s,"measureAxis.min","unsupportedAutoMinMax"),x(s,"measureAxis.max","unsupportedAutoMinMax")),a},importProperties:function(e){var t=e.exportFormat,r=e.initialProperties,n=e.dataDefinition,o=e.defaultPropertyValues,i=e.hypercubePath,a=e.measureType,s=e.extension,l=e.supportedFilters,u=e.isHCModifierSupported,c=be.importProperties({exportFormat:t,initialProperties:r,dataDefinition:n,defaultPropertyValues:o,hypercubePath:i,extension:s,supportedFilters:l,isHCModifierSupported:u}),d=c.qProperty;return ye({initialProperties:r,properties:d}),xe({exportFormat:t,initialProperties:r,properties:d,measureType:a}),Se(d.qHyperCubeDef),d.qHyperCubeDef.qColumnOrder=[],d.qHyperCubeDef.columnOrder=[],c}};function Ce(e,t,r){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(r)}function we(e){var t=e.properties,r=e.arrayPath,n=e.quarantineName,o=e.arrayName,a=e.itemPath;i.getValue(t,r,[]).forEach((function(e){return function(e){var t=e.properties,r=e.quarantineName,n=e.arrayName,o=e.item,a=e.itemPath,s=i.getValue(o,a);if(void 0!==s){var l=i.getValue(o,"qDef.cId");l||(l=i.generateId(),i.setValue(o,"qDef.cId",l));var u=Ce(r,n,l);i.setValue(t,u,s),i.setValue(o,a,void 0)}}({properties:t,quarantineName:n,arrayName:o,item:e,itemPath:a})}))}function Re(e){var t=e.properties,r=e.arrayPath,n=e.quarantineName,o=e.arrayName,a=e.itemPath;i.getValue(t,r,[]).forEach((function(e){return function(e){var t=e.properties,r=e.quarantineName,n=e.arrayName,o=e.item,a=e.itemPath,s=i.getValue(o,"qDef.cId");if(s){var l=Ce(r,n,s),u=i.getValue(t,l);void 0!==u&&(i.setValue(o,a,u),i.setValue(t,l,void 0))}}({properties:t,quarantineName:n,arrayName:o,item:e,itemPath:a})}))}var Ae="qHyperCubeDef.qMeasures",Ie="conditionalColoring",Le="measures",De="qDef.conditionalColoring";const Pe={quarantine:function(e){we({properties:e,arrayPath:Ae,quarantineName:Ie,arrayName:Le,itemPath:De})},unquarantine:function(e){Re({properties:e,arrayPath:Ae,itemPath:De,arrayName:Le,quarantineName:Ie})}};var Me="qHyperCubeDef.qMeasures",_e="measures",Te="qHyperCubeDef.qDimensions",ke="dimensions",Oe="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",qe="alternativeMeasures",Ne="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",Fe="alternativeDimensions",ze="qCalcCondition",je="conditionalShowHide";const $e={quarantine:function(e){we({properties:e,arrayPath:Me,quarantineName:je,arrayName:_e,itemPath:ze}),we({properties:e,arrayPath:Te,quarantineName:je,arrayName:ke,itemPath:ze})},unquarantine:function(e){Re({properties:e,arrayPath:Me,quarantineName:je,arrayName:_e,itemPath:ze}),Re({properties:e,arrayPath:Te,quarantineName:je,arrayName:ke,itemPath:ze})},quarantineAlternative:function(e){we({properties:e,arrayPath:Oe,quarantineName:je,arrayName:qe,itemPath:ze}),we({properties:e,arrayPath:Ne,quarantineName:je,arrayName:Fe,itemPath:ze})},unquarantineAlternative:function(e){Re({properties:e,arrayPath:Oe,quarantineName:je,arrayName:qe,itemPath:ze}),Re({properties:e,arrayPath:Ne,quarantineName:je,arrayName:Fe,itemPath:ze})}},Be={hypercube:G,colorChart:be,axisChart:Ee,quarantineProperty:x,unquarantineProperty:W,quarantineArrayProp:we,unquarantineArrayProp:Re,conditionalColoring:Pe,conditionalShow:$e}})(),n.default})();var _g=B(Mg.exports);const Tg="qHyperCubeDef.qDimensions",kg="dimensions",Og="qDef.representation",qg="tableRepresentation",Ng=(e,t,r)=>{const n=e.length+t.length,o=((null==r?void 0:r.length)===n?r:Array.from(Array(n).keys())).map((r=>((e,t,r)=>{var n;const o=t.length,i=e<o?t[e]:r[e-o],{columnWidth:a}=i.qDef;return"pixels"===(null==a?void 0:a.type)?null!==(n=a.pixels)&&void 0!==n?n:dh.PixelsDefault:-1})(r,e,t)));return o},Fg=({propertyTree:e,hyperCubePath:t})=>{const r=_g.hypercube.exportProperties({propertyTree:e,hyperCubePath:t}),{qHyperCubeDef:{qColumnOrder:n,qDimensions:o,qMeasures:i}}=r.properties,a=Ng(o,i,n);return Cg(r,"properties.qHyperCubeDef",{...r.properties.qHyperCubeDef,columnWidths:a}),_g.quarantineProperty(r.properties,"qHyperCubeDef.columnWidths","straightTableColumnWidths"),_g.quarantineProperty(r.properties,"qHyperCubeDef.qColumnOrder","straightTableColumnOrder"),_g.quarantineProperty(r.properties,"qHyperCubeDef.columnOrder","straightTableColumnOrder"),(e=>{_g.quarantineArrayProp({properties:e,arrayPath:Tg,itemPath:Og,arrayName:kg,quarantineName:qg})})(r.properties),r};const zg=(e,t,r,n)=>{let o=t;n&&(o=t-n);const i=JSON.parse(JSON.stringify(e[o]));if(Array.isArray(r)&&r.length>0){const e=r[t];i.qDef.columnWidth=-1===e?{type:ph.FitToContent}:{type:ph.Pixels,pixels:e}}return i},jg=({exportFormat:e,initialProperties:t,extension:r,hypercubePath:n,defaultPropertyValues:o,viewDataMode:i})=>{const a=_g.hypercube.importProperties({exportFormat:e,initialProperties:t,dataDefinition:{path:"/qHyperCubeDef",dimensions:{min:0,max:1e3},measures:{min:0,max:1e3}},defaultPropertyValues:o,hypercubePath:n,extension:r});_g.unquarantineProperty(a.qProperty,"straightTableColumnOrder"),(e=>{_g.unquarantineArrayProp({properties:e,arrayPath:Tg,itemPath:Og,arrayName:kg,quarantineName:qg})})(a.qProperty);const{qHyperCubeDef:{qDimensions:s,qMeasures:l,qColumnOrder:u,columnWidths:c}}=a.qProperty,{dimensions:d,measures:p}=((e,t,r,n)=>{const o=e.length,i=o+t.length,a=(null==r?void 0:r.length)===i?r:Array.from(Array(i).keys());return{dimensions:a.filter((e=>e<o)).map((t=>zg(e,t,n))),measures:a.filter((e=>e>=o)).map((e=>zg(t,e,n,o)))}})(s,l,u,c);return Array.isArray(c)&&c.length>0&&(Cg(a,"qProperty.qHyperCubeDef.qDimensions",d),Cg(a,"qProperty.qHyperCubeDef.qMeasures",p)),i&&(Cg(a,"qProperty.totals.show",!1),Cg(a,"qProperty.usePagination",!0)),_g.conditionalShow.unquarantine(a.qProperty),a};var $g={component:"items",items:{columnHandler:{component:"column-handler",search:!0,selectAll:!1}},classification:{tags:["exploration"],exclusive:!0}};function Bg(e,t){let r;for(r=0;r<e.length;++r)e[r]>=0&&e[r]>=t&&++e[r];e.push(t)}function Hg(e,t){let r,n=0;for(r=0;r<e.length;++r)e[r]>t?--e[r]:e[r]===t&&(n=r);return e.splice(n,1),n}function Wg(e){return e>0?0:1}function Gg(e){return e.translator.get("Visualizations.Descriptions.Column")}function Vg(e){return{measures:{min:Wg,max:1e3,description:()=>Gg(e),add(e,t,r){const{qColumnOrder:n}=r.hcProperties;Bg(n,r.getDimensions().length+r.getMeasures().length-1)},remove(e,t,r,n){const{qColumnOrder:o}=r.hcProperties;Hg(o,(r.hcProperties.qDimensions?r.hcProperties.qDimensions.length:0)+n)}},dimensions:{min:Wg,max:1e3,description:()=>Gg(e),add(e,t,r){const{qColumnOrder:n}=r.hcProperties;return Bg(n,r.getDimensions().length-1),e},remove(e,t,r,n){if(null!=e&&e.isAlternative)return;const{qColumnOrder:o}=r.hcProperties;Hg(o,n)}}}}var Ug={};!function(e){(()=>{var t={229:e=>{var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},a=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var n,o=t.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!i)return!1;for(n in e);return void 0===n||t.call(e,n)},s=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,r){if("__proto__"===r){if(!t.call(e,r))return;if(o)return o(e,r).value}return e[r]};e.exports=function e(){var t,r,n,o,u,c,d=arguments[0],p=1,f=arguments.length,m=!1;for("boolean"==typeof d&&(m=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(r in t)n=l(d,r),d!==(o=l(t,r))&&(m&&o&&(a(o)||(u=i(o)))?(u?(u=!1,c=n&&i(n)?n:[]):c=n&&a(n)?n:{},s(d,{name:r,newValue:e(m,c,o)})):void 0!==o&&s(d,{name:r,newValue:o}));return d}}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var i=r[e]={exports:{}};return t[e](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{n.r(o),n.d(o,{default:()=>Me});var e=n(229),t=n.n(e);const r=function(e,t,r){if(!t)return!1;var n,o=t.split("."),i=o[o.length-1],a=e;for(n=0;n<o.length-1;++n)void 0===a[o[n]]&&(a[o[n]]=Number.isNaN(+o[n+1])?{}:[]),a=a[o[n]];if(void 0!==r){var s=a[i];return a[i]=r,{updated:r,previous:s}}return delete a[i],!1},i=function(e,t,r){var n,o=t.split("."),i=e;if(void 0===i)return r;for(n=0;n<o.length;++n){if(void 0===i[o[n]])return r;i=i[o[n]]}return i},a={EXPRESSIONS:{observed:"",trend:"STL_Trend",seasonal:"STL_Seasonal",residual:"STL_Residual"},OPTIONS:[{value:"observed",translation:"cao.trendDecomposition.parameters.decomposition.observed"},{value:"trend",translation:"cao.trendDecomposition.parameters.decomposition.trend"},{value:"seasonal",translation:"cao.trendDecomposition.parameters.decomposition.seasonal"},{value:"residual",translation:"cao.trendDecomposition.parameters.decomposition.residual"}]};var s="".concat(" ","(").concat(" "),l="".concat(" ",")").concat(" ");function u(e){return s+e+l}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var r=function(e,t){if(!t)return null;var r,n;for(r=0;r<t.length;r++)if((n=t[r]).qInfo.qId===e)return n;return null}(e.qLibraryId,t.dimensionList);return r&&r.qData.info[0].qTags.indexOf("$numeric")>-1}var n=function(e,t){if(!t)return null;var r,n,o=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var r=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(r)&&(t=(t=t.substring(1,r)).trim()),t}(e);for(r=0;r<t.length;r++){if((n=t[r]).qName===o)return n;if(n.qDerivedFieldData)for(var i=0;i<n.qDerivedFieldData.qDerivedFieldLists.length;++i)for(var a=n.qDerivedFieldData.qDerivedFieldLists[i],s=0;s<a.qFieldDefs.length;++s){var l=a.qFieldDefs[s];if(l.qName===o)return l}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return n&&n.qTags.indexOf("$numeric")>-1}function d(e){return!(!e.fullAccumulation&&!e.fullRange)}function p(e,t){var r=e.crossAllDimensions;return 2===t&&r?"RowNo(Total)":"RowNo()"}function f(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e),r=t.trim();return"="===r.substring(0,1)?r.substring(1).trim():r}function m(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function h(e,t){var r=e.crossAllDimensions;return 2===t&&r?"Above(Total ":"Above("}function g(e){return void 0===e?")":", 0, ".concat(e,")")}function b(e){return"Replace(Replace(".concat(e,",'''',''''''),'$','$''&''')")}function v(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=").concat(b("MinString(".concat(t,")")),")' and Only({1}").concat(t,")<='$(=").concat(b("MaxString(".concat(t,")")),")'\"}")}function y(e){var t=e.modifier,r=void 0===t?{}:t,n=e.dimensions,o=e.dimensionAndFieldList,i=e.funcComp,a=void 0===i?"Sum":i,s=e.valueComp,l=void 0===s?"0":s;if(!r.showExcludedValues)return"";if(n&&1===n.length){var u=v(c(n[0],o),m(0));return"".concat(a,"({1<").concat(u,">}").concat(l,")")}if(n&&2===n.length){var d=c(n[0],o),p=c(n[1],o),f=m(0),h=m(1),g=v(d,f),b=v(p,h);return"".concat(a,"({1<").concat(g,",").concat(b,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function x(e){return"".concat(e,"(")}function S(e){var t=e.properties,r=e.layout;return i(t,"qHyperCubeDef.qDimensions",i(r,"qHyperCube.qDimensionInfo",[])).length}const E={isFullRange:d,getNumDimensions:S,getExpressionWithExcludedComp:function(e){var t=e.expression,r=e.modifier,n=e.dimensions,o=e.dimensionAndFieldList,i=e.treatMissingAsNull,a=u(f(t));if(!r.showExcludedValues)return a;var s=y({modifier:r,dimensions:n,dimensionAndFieldList:o}),l=i?"":", 0";if(n&&1===n.length){var c=m(0);return"If(Count(".concat(c,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(n&&2===n.length){var d=m(0),p=m(1);return"If(Count(".concat(d,") * Count(").concat(p,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:p,getNumStepComp:function(e,t){if(!d(e)){var r=e.steps;return"number"!=typeof r||Number.isNaN(r)?6:r}return p(e,t)},getAboveCompPrefix:h,getAboveCompSuffix:g,getAboveComp:function(e,t,r,n){return h(e,t)+r+g(n)},getFunctionPrefix:x,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return x(e)+t+")"},getAggrComp:function(e,t,r){return"Aggr(".concat(e,", ").concat(t,", ").concat(r,")")},getExcludedComp:y,needDimension:function(e){var t=e.modifier,r=e.properties,n=e.layout,o=function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t);return 0===o&&2===S({properties:r,layout:n})},getDimComp:function(e,t){var r=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),n=m(t);if(!r.qSortByExpression&&!r.qSortByNumeric&&!r.qSortByAscii)return n;var o=["Descending","Ascending"],i=r.qSortByNumeric?"(Numeric, ".concat(o[(r.qSortByNumeric+1)/2],")"):"",a=r.qSortByAscii?"(Text, ".concat(o[(r.qSortByAscii+1)/2],")"):"";return r.qSortByNumeric&&r.qSortByAscii?"(".concat(n,", ").concat(i,", ").concat(a,")"):r.qSortByNumeric?"(".concat(n,", ").concat(i,")"):r.qSortByAscii?"(".concat(n,", ").concat(a,")"):n},simplifyExpression:f,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var r=t.indexOf(s);if(-1!==r){var n=t.indexOf(l);if(-1!==n)return t.substring(r+s.length,n)}}},initModifier:function(e,t){Object.keys(t).forEach((function(r){void 0===e[r]&&(e[r]=t[r])}))},isNumeric:c,isApplicable:function(e){var t=e.properties,r=e.layout,n=e.minDimensions,o=void 0===n?1:n,i=e.maxDimensions,a=void 0===i?2:i;if(!t&&!r)return!0;var s=S({properties:t,layout:r});return s>=o&&s<=a},getExpressionWithMarkers:u,canExtract:function(e){var t=e.indexOf(s),r=e.indexOf(l);return t>-1&&r>-1&&t<r},getDimDefWithWrapper:m,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")},generateTSDExpression:function(e,t,r){var n=t||e.outputExpression;if(e.base&&e.base.qDef&&(n=t!==e.base.qDef?t:e.base.qDef),"observed"!==e.decomposition){var o=r.qHyperCubeDef.qMeasures.find((function(t){return t.qDef.base&&t.qDef.base.qLibraryId&&e.base&&e.base.qLibraryId?t.qDef.base.qLibraryId===e.base.qLibraryId:null}));o&&t!==o.qDef.qLabel&&(n=o.qLibraryId||o.qDef.base.qLibraryId?"[".concat(o.qDef.qLabel,"]"):o.qDef.base.qDef);var i=function(e){var t=a.OPTIONS.find((function(t){return t.value===e.decomposition}));return t?a.EXPRESSIONS[t.value]:""}(e);n=n.startsWith("=")?n.substr(1):n,n="".concat(i,"(").concat(n,", ").concat(e.steps,")")}return n},getDecomposition:function(e){var t="observed";return Object.values(a.EXPRESSIONS).find((function(r){var n=e.qDef.base.qDef.toLowerCase()||e.qDef.qDef.toLowerCase();return a.EXPRESSIONS[r]&&n.includes(a.EXPRESSIONS[r].toLowerCase())&&(t=r),r})),t}};function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}var R=t().bind(null,!0),A={},I=Array.isArray;function L(e){return null!=e&&!Array.isArray(e)&&"object"===w(e)}function D(e){return void 0===e}function P(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function M(e,t){var r,n=t.substring(1).split("/").slice(0,-1);return n.forEach((function(t,o){if(o!==n.length){r=+t;var i=Number.isNaN(r)?{}:[];e[r||t]=D(e[r||t])?i:e[t],e=e[r||t]}})),e}function _(e,t){var r=!0;if(L(e)&&L(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((function(n){_(e[n],t[n])||(r=!1)})),r);if(I(e)&&I(t)){if(e.length!==t.length)return!1;for(var n=0,o=e.length;n<o;n+=1)if(!_(e[n],t[n]))return!1;return!0}return e===t}A.generate=function(e,t,r){r=r||"";var n=[];return Object.keys(t).forEach((function(o){var i=function(e){return e?R({},{val:e}).val:e}(t[o]),a=e[o],s="".concat(r,"/").concat(o);_(i,a)||P(t,o)||(D(a)?n.push({op:"add",path:s,value:i}):L(i)&&L(a)?n=n.concat(A.generate(a,i,s)):I(i)&&I(a)?n=n.concat(function(e,t,r){var n=[],o=e.slice(),i=-1;function a(e,t,r){if(e[r]&&D(e[r].qInfo))return null;if(e[r]&&e[r].qInfo.qId===t)return r;for(var n=0,o=e.length;n<o;n+=1)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(_(t,o))return n;if(!D(t[0])&&D(t[0].qInfo))return n.push({op:"replace",path:r,value:t}),n;for(var s=o.length-1;s>=0;s-=1)-1===(i=a(t,o[s].qInfo&&o[s].qInfo.qId,s))?(n.push({op:"remove",path:"".concat(r,"/").concat(s)}),o.splice(s,1)):n=n.concat(A.generate(o[s],t[i],"".concat(r,"/").concat(s)));for(var l=0,u=t.length;l<u;l+=1)-1===(i=a(o,t[l].qInfo&&t[l].qInfo.qId))?(n.push({op:"add",path:"".concat(r,"/").concat(l),value:t[l]}),o.splice(l,0,t[l])):i!==l&&(n.push({op:"move",path:"".concat(r,"/").concat(l),from:"".concat(r,"/").concat(i)}),o.splice(l,0,o.splice(i,1)[0]));return n}(a,i,s)):n.push({op:"replace",path:"".concat(r,"/").concat(o),value:i}))})),Object.keys(e).forEach((function(o){D(t[o])&&!P(e,o)&&n.push({op:"remove",path:"".concat(r,"/").concat(o)})})),n},A.apply=function(e,t){t.forEach((function(t){var r,n,o=M(e,t.path),i=t.path.split("/").splice(-1)[0],a=i&&Number.isNaN(+i)?o[i]:o[+i]||o,s=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(o=null,a=e),"add"===t.op||"replace"===t.op)if(I(o))"-"===i&&(i=o.length),o.splice(+i,"add"===t.op?0:1,t.value);else if(I(a)&&I(t.value)){var l,u=t.value.slice();a.length=0,(l=a).push.apply(l,function(e){if(Array.isArray(e))return C(e)}(n=u)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?C(e,t):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}else if(L(a)&&L(t.value))r=a,Object.keys(r).forEach((function(e){Object.getOwnPropertyDescriptor(r,e).configurable&&!P(r,e)&&delete r[e]})),R(a,t.value);else{if(!o)throw new Error("Patchee is not an object we can patch");o[i]=t.value}else if("move"===t.op){var c=M(e,t.from);I(o)?o.splice(+i,0,c.splice(+s,1)[0]):(o[i]=c[s],delete c[s])}else"remove"===t.op&&(I(o)?o.splice(+i,1):delete o[i])}))},A.clone=function(e){return R({},e)},A.createPatch=function(e,t,r){var n={op:e.toLowerCase(),path:r};return"move"===n.op?n.from=t:void 0!==t&&(n.value=t),n},A.updateObject=function(e,t){Object.keys(e).length?A.apply(e,A.generate(e,t)):R(e,t)};const T=A,k=function(e,r,n){if(!e)return Promise.resolve();var o=T.generate(r,n);return t()(!0,r,n),o&&o.length?(o=o.map((function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}})),e.applyPatches(o,!0)):Promise.resolve()};var O="accumulation";function q(e,t){var r=i(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===O)return r[n]}function N(e,t){var r=function(e,t){var r=i(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===O)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var F={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""};const z={translationKey:"properties.modifier.accumulation",needDimension:E.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return E.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,o=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=a;void 0===l&&(l=E.getNumDimensions({properties:n,layout:o}));var u=i(n,"qHyperCubeDef.qDimensions",[]),c=E.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),d=E.getNumStepComp(r,l),p=E.getAboveComp(r,l,c,d),f=E.getRangeComp("RangeSum",p);if(E.needDimension({modifier:r,properties:n,layout:o})){var m=E.getDimComp(u,1),h=E.getDimComp(u,0),g=E.getAggrComp(f,m,h);f=r.showExcludedValues?E.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:s,valueComp:g}):g}return f},extractInputExpression:E.extractInputExpression,initModifier:function(e){E.initModifier(e,F)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!E.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(N(t,e),".accumulationDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.accumulation.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(N(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.accumulation.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(N(t,e),".fullAccumulation")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(N(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var r=q(t,e);if(r){var n=r.steps;r.steps="number"!=typeof n||Number.isNaN(n)?6:Math.abs(n)}},show:function(t){var r=q(t,e);return r&&!r.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(N(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return E.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(O))return!1;var i=q(t,e);return i&&!i.disabled}};return r}};var j="movingAverage";function $(e,t){var r=i(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===j)return r[n]}function B(e,t){var r=function(e,t){var r=i(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===j)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var H={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1};const W={translationKey:"properties.modifier.movingAverage",needDimension:E.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return E.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,r=e.expression,n=e.modifier,o=e.properties,a=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!n)return r;var u=s;void 0===u&&(u=E.getNumDimensions({properties:o,layout:a}));var c=i(o,"qHyperCubeDef.qDimensions",[]),d=n.showExcludedValues&&n.nullSuppression,p=E.getExpressionWithExcludedComp({expression:r,modifier:n,dimensions:c,dimensionAndFieldList:l,treatMissingAsNull:d}),f=E.getNumStepComp(n,u),m=E.getAboveComp(n,u,p,f);if(n.nullSuppression)t=E.getRangeComp("RangeAvg",m);else{var h=E.getRangeComp("RangeSum",m),g=function(e,t){var r=E.getRowNoComp(e,t);if(!E.isFullRange(e)){var n=e.steps,o="number"!=typeof n||Number.isNaN(n)?6:n;return"RangeMin(".concat(o,", ").concat(r,")")}return r}(n,u);t="".concat(h," / ").concat(g)}var b=t;if(E.needDimension({modifier:n,properties:o,layout:a})){var v=E.getDimComp(c,1),y=E.getDimComp(c,0),x=E.getAggrComp(b,v,y);b=n.showExcludedValues?E.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return b},extractInputExpression:E.extractInputExpression,initModifier:function(e){E.initModifier(e,H)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:function(e,t){return!E.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(B(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.movingAverage.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(B(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.movingAverage.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(B(t,e),".fullRange")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(B(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var r=$(t,e);if(r){var n=r.steps;r.steps="number"!=typeof n||Number.isNaN(n)?6:Math.abs(n)}},show:function(t){var r=$(t,e);return r&&!r.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(B(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(B(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return E.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(j))return!1;var i=$(t,e);return i&&!i.disabled}};return r}};var G="timeSeriesDecomposition";function V(e,t){var r=i(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===G)return r[n]}function U(e,t){var r=function(e,t){var r=i(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===G)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var Y={type:"timeSeriesDecomposition",disabled:!1,decomposition:"",steps:2,outputExpression:""};const K={translationKey:"properties.modifier.timeSeriesDecomposition",needDimension:E.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return E.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties;return r?E.generateTSDExpression(r,t,n):t},extractInputExpression:E.extractInputExpression,initModifier:function(e,t){E.initModifier(e,Y),""===e.decomposition&&t&&(e.decomposition=E.getDecomposition(t))},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.timeSeriesDecomposition||"properties.modifier.timeSeriesDecomposition",show:function(e,t){return!E.isApplicable({properties:t.properties})}},settings:{type:"items",items:{decomposition:{refFn:function(t){return"".concat(U(t,e),".decomposition")},type:"string",translation:t.modifierTrendDecompositionDecomposition||"properties.modifier.trendDecomposition.decomposition",component:"dropdown",schemaIgnore:!0,defaultValue:t.trendDecompositionParametersDecompositionObserved||"cao.trendDecomposition.parameters.decomposition.observed",options:a.OPTIONS},steps:{refFn:function(t){return"".concat(U(t,e),".steps")},type:"integer",translation:t.modifierTimeSeriesDecompositionPeriods||"properties.modifier.timeSeriesDecomposition.periods",schemaIgnore:!0,defaultValue:2,change:function(t,r){var n=V(t,e);if(n){var o=n.steps;n.steps="number"!=typeof o||Number.isNaN(o)?2:Math.abs(o),r.properties.qHyperCubeDef.qMeasures=r.properties.qHyperCubeDef.qMeasures.map((function(e){return e.qDef.modifiers.map((function(e){return"timeSeriesDecomposition"===e.type?e.steps=o:e.steps=e.steps,e})),e}))}},show:function(t){var r=V(t,e);return r&&!r.fullRange}}},show:function(e,t){return E.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(G))return!1;var i=V(t,e);return i&&!i.disabled}};return r}};var X="difference";function J(e,t){var r=i(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===X)return r[n]}function Z(e,t){var r=function(e,t){var r=i(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===X)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var Q={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""};const ee={translationKey:"properties.modifier.difference",needDimension:E.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return E.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:E.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,o=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=a;void 0===l&&(l=E.getNumDimensions({properties:n,layout:o}));var u=i(n,"qHyperCubeDef.qDimensions",[]),c=E.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),d=E.getAboveComp(r,l,c),p="".concat(c," - ").concat(d);if(E.needDimension({modifier:r,properties:n,layout:o})){var f=E.getDimComp(u,1),m=E.getDimComp(u,0),h=E.getAggrComp(p,f,m);p=r.showExcludedValues?E.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:s,funcComp:"Only",valueComp:h}):h}return p},initModifier:function(e){Object.keys(Q).forEach((function(t){void 0===e[t]&&(e[t]=Q[t])}))},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!E.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(Z(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.difference.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(Z(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.difference.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},showExcludedValues:{refFn:function(t){return"".concat(Z(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return E.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(X))return!1;var i=J(t,e);return i&&!i.disabled}};return r}};var te="normalization";function re(e,t){var r=i(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===te)return r[n]}function ne(e,t){var r=function(e,t){var r=i(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===te)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}function oe(e,t){for(var r=0;r<e.length;r++)if(e[r].value===t)return r;return-1}var ie={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:2,selectionScope:2};function ae(e){return 2===e?"{1}":""}function se(e,t,r){return 1===e?"{$<".concat(E.getFieldWithWrapper(t),"={'").concat(r,"'}>}"):""}function le(e,t){return 0===e&&t>1||2===e?"Total":""}function ue(e,t,r){return 0===e&&t>1?"<".concat(E.getDimDefWithWrapper(r),">"):""}const ce={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,r=e.layout;return E.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:E.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,o=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=a;void 0===l&&(l=E.getNumDimensions({properties:n,layout:o}));var u=i(n,"qHyperCubeDef.qDimensions",[]),c=E.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),d=r.selectionScope,p=r.dimensionalScope;return function(e,t,r,n,o,i,a){var s=ae(t),l=se(t,r,n),u=""===s&&""===l?"":s||l,c=le(o,i),d=ue(o,i,a),p=function(e){for(var t=[],r=0;r<e;r++)t[r]=E.getDimDefWithWrapper(r);return t.join(", ")}(i);return"".concat(e,"/ Sum(").concat(u," ").concat(c).concat(d," Aggr(").concat(u," ").concat(e,", ").concat(p,"))")}(c,d,r.field,r.value,p,l,r.primaryDimension)},initModifier:function(e){Object.keys(ie).forEach((function(t){void 0===e[t]&&(e[t]=ie[t])}))},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!E.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(ne(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,options:function(r){return function(e,t,r){var n=[{value:0,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:1,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:2,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return n=function(e,t,r){if(1===e){var n=oe(t,0);t.splice(n,1)}return t}(re(e,r).dimensionalScope,n),n}(r,t,e)}},field:{refFn:function(t){return"".concat(ne(t,e),".field")},type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:function(e,t,r){return r.app.getFieldList().then((function(e){return e.map((function(e){return{label:e.qName,value:e.qName}}))}))},show:function(t){return 1===re(t,e).selectionScope}},value:{refFn:function(t){return"".concat(ne(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return 1===re(t,e).selectionScope}},dimensionalScope:{refFn:function(t){return"".concat(ne(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,supportTooltip:!0,options:function(r,n){return function(e,t,r,n){var o=t.layout.qHyperCube.qDimensionInfo.length,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.".concat(2===o?"respectAllDimensions":"respectDimension"),tooltipTranslation:r.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===o?"respectAllDimensions":"respectDimension",".tooltip")},{value:2,translation:r.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===o?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:r.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===o?"disregardAllDimensions":"disregardDimension",".tooltip")}];return i=function(e,t,r){if(e<2){var n=oe(t,0);t.splice(n,1)}return t}(o,i),i=function(e,t,r){if(0===e){var n=oe(t,1);t.splice(n,1)}return t}(re(e,n).selectionScope,i),i}(r,n,t,e)}},primaryDimension:{refFn:function(t){return"".concat(ne(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.normalization.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(t,r){return 0===(re(t,e).dimensionalScope||0)&&r.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return E.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(te))return!1;var i=re(t,e);return i&&!i.disabled}};return r},getDisregardSelectionComp:ae,getFieldSelectionComp:se,getTotalComp:le,getSelectedDimComp:ue};var de="qDef.base",pe="qDef.qDef",fe="qDef.base.qDef",me="qLibraryId",he="qDef.base.qLibraryId";const ge={getExpression:function(e){var t=i(e,fe);return void 0!==t?t:i(e,pe)},getExpressionRef:function(e){return void 0!==i(e,fe)?fe:pe},getLibraryIdRef:function(e){return i(e,he)?he:me},getLibraryId:function(e){return i(e,he)||i(e,me)},getLabelRef:function(e){return i(e,de)?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return i(e,de)?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}};var be="qDef.qDef",ve="qDef.base.qDef",ye="qLibraryId",xe="qDef.base.qLibraryId",Se="qDef.qLabel",Ee="qDef.qLabelExpression",Ce="qDef.base.qLabel",we="qDef.base.qLabelExpression",Re="qDef.qAggrFunc",Ae="qDef.base.qAggrFunc",Ie={initBase:function(e,t){(t||Ie.isValid(e))&&(r(e,ve,i(e,be)),r(e,xe,i(e,ye)),r(e,Ce,i(e,Se)),r(e,we,i(e,Ee)))},restoreBase:function(e){Ie.isValid(e)&&(r(e,be,i(e,ve)),r(e,ye,i(e,xe)),r(e,Se,i(e,Ce)),r(e,Ee,i(e,we)),i(e,Re)&&i(e,Ae)&&r(e,Re,i(e,Ae)),delete e.qDef.base)},isValid:function(e){var t=i(e,ve),r=i(e,xe);return void 0!==t||void 0!==r}};const Le=Ie;function De(e){return De="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},De(e)}var Pe={accumulation:z,movingAverage:W,difference:ee,normalization:ce,timeSeriesDecomposition:K};const Me={modifiers:Pe,apply:Te,applyModifiers:ke,cleanUpMeasure:Oe,destroy:function(e){e&&_e[e.id]&&_e[e.id].masterItemSubscriber&&(_e[e.id].masterItemSubscriber&&_e[e.id].masterItemSubscriber.unsubscribe(),delete _e[e.id])},hasActiveModifiers:qe,getActiveModifier:Ne,initBase:Le.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some((function(e){return Pe[e]}))},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some((function(e){return Pe[e]&&Pe[e].isApplicable({properties:r,layout:n})}))},measureBase:ge,limitedSorting:function(e){var t=e.measures,r=e.properties,n=e.layout,o=!1,i=!1;return t.forEach((function(e){var t=je(e);Ue({modifiers:t,properties:r,layout:n})&&(o=!0,i=i||Ze({modifiers:t,properties:r,layout:n}))})),o&&!i},ifEnableTotalsFunction:Fe};var _e={};function Te(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.model,n=e.properties,o=e.isSnapshot,a=void 0!==o&&o,s=e.masterItem,l=!1;_e[r.id]=_e[r.id]||{isFirstTime:!0};var u=_e[r.id].isFirstTime;if(_e[r.id].isFirstTime=!1,n&&"object"===De(n))return ke({model:r,properties:n});var c=r?r.layout:void 0,d=i(c,"qSelectionInfo.qInSelections");if(a||d)return Promise.resolve(l);var p=i(c,"qHyperCube.qMeasureInfo"),f=_e[r.id].lastReloadTime;if(_e[r.id].lastReloadTime=i(r,"app.layout.qLastReloadTime"),qe({measures:p,layout:c})){var m=function(e){var t=e.measures,r=e.layout,n=e.model,o=e.lastReloadTime;return i(n,"app.layout.qLastReloadTime")!==o&&function(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ve({measure:e,properties:r,layout:n})}))}({measures:t,layout:r})}({measures:p,layout:c,model:r,lastReloadTime:f});return m||function(e){var t=e.measures,r=e.layout,n=e.masterItem,o=e.isFirstTime;return!!Array.isArray(t)&&(o||n||t.some((function(e){return function(e){var t=e.measure,r=e.layout;return Ue({modifiers:je(t),layout:r})?!t.base:!!t.base}({measure:e,layout:r})})))}({measures:p,layout:c,masterItem:s,isFirstTime:u})?r.getEffectiveProperties().then((function(e){var n=t()(!0,{},e);Be(n);var o=Qe(n);return Ye({model:r}).then((function(t){return Ke({libraryIds:o,model:r}).then((function(o){return m&&function(e){var t=e.properties;ze(t).forEach((function(e){return function(e){var t=e.measure;if(Ve({measure:t,properties:e.properties})){var r=0,n=t.qDef.modifiers;Array.isArray(n)&&n.forEach((function(e){if("object"===De(e)&&!e.disabled){if(r++,"object"!==De(Pe[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(r>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var n=Pe[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==n&&We(t)&&E.simplifyExpression(t.qDef.base.qDef)!==E.simplifyExpression(n)&&(t.qDef.base.qDef=n)}}))}}({measure:e,properties:t})}))}({properties:n}),ke({model:r,oldProperties:e,properties:n,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:o,dimensionAndFieldList:t})}))}))})):Promise.resolve(l)}return function(e){return!!Array.isArray(e)&&e.some((function(e){return"object"===De(e.base)}))}(p)?r.getEffectiveProperties().then((function(e){return function(e){var r=e.model,n=e.properties,o=Qe(n);return et({model:r,libraryIds:o}).then((function(){var e=t()(!0,{},n);return ze(n).forEach((function(e){return Oe(e)})),Je({oldProperties:e,newProperties:n,model:r})}))}({model:r,properties:e})})):Promise.resolve(l)}function ke(e){var r=e.model,n=e.oldProperties,o=e.properties,a=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,u=e.masterItem,c=e.libraryItemsProps,d=e.dimensionAndFieldList;void 0===n&&(n=l?t()(!0,{},o):o),Be(o);var p=Qe(o);return et({model:r,libraryIds:p,masterItem:u}).then((function(){return function(e){var r=e.measures,n=e.properties,o=e.model,a=e.libraryItemsProps,s=e.dimensionAndFieldList;if(r||(r=ze(n)),!r.length)return Promise.resolve();if(!qe({measures:r,properties:n}))return r.forEach((function(e){return Oe(e)})),Promise.resolve();var l=a?void 0:Qe(n);return Ye({model:o,dimensionAndFieldList:s}).then((function(e){return Ke({libraryIds:l,model:o,libraryItemsProps:a}).then((function(o){r.forEach((function(r){Ue({modifiers:r.qDef.modifiers,properties:n})?(function(e){var r=e.measure,n=e.properties,o=e.libraryItemsProps,a=e.dimensionAndFieldList,s=0;Le.isValid(r)||Le.initBase(r,!0);var l=r.qDef,u=l.modifiers,c=l.base;Array.isArray(u)&&u.forEach((function(e){if("object"===De(e)&&!e.disabled){if(s++,"object"!==De(Pe[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(s>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");Pe[e.type].initModifier(e,r);var l=r.qLibraryId||c&&c.qLibraryId;l?function(e){var r=e.measure,n=e.modifier,o=e.properties,i=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=""===s?s:Pe[n.type].generateExpression({expression:s,modifier:n,properties:o,dimensionAndFieldList:i});n.outputExpression=l,r.qDef.qDef=n.outputExpression,(r.qDef.qLabel||a.qMeasure.qLabel)&&(r.qDef.qLabel=a.qMeasure.qLabel),(r.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(r.qDef.qLabelExpression=a.qMeasure.qLabelExpression),r.qDef.quarantine&&r.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(r.qDef.qNumFormat=a.qMeasure.qNumFormat,r.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete r.qLibraryId,r.qDef.coloring=a.qMeasure.coloring,n.base=t()(!0,{},r.qDef.base)}({measure:r,modifier:e,libraryId:l,properties:n,libraryItemsProps:o,dimensionAndFieldList:a}):function(e){var r=e.measure,n=e.modifier,o=e.properties,i=e.dimensionAndFieldList;"function"==typeof Pe[n.type].updateModifier&&Pe[n.type].updateModifier(n,o.qHyperCubeDef);var a=ge.getExpression(r),s=""===a?a:Pe[n.type].generateExpression({expression:a,modifier:n,properties:o,dimensionAndFieldList:i});n.outputExpression=s,r.qDef.qDef=n.outputExpression,r.qDef.base.qLabelExpression?r.qDef.qLabelExpression=r.qDef.base.qLabelExpression:r.qDef.qLabel=r.qDef.base.qLabel||a,n.base=t()(!0,{},r.qDef.base)}({measure:r,modifier:e,properties:n,dimensionAndFieldList:a}),function(e){var t=i(e,"qDef.qAggrFunc");"Expr"!==t||Fe(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&Fe(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(r)}}))}({measure:r,properties:n,libraryItemsProps:o,dimensionAndFieldList:e}),He(r)):Oe(r)}))}))}))}({measures:a,properties:o,model:r,libraryItemsProps:c,dimensionAndFieldList:d}).then((function(){return l?Je({oldProperties:n,newProperties:o,model:r}):Promise.resolve(!1)}))}))}function Oe(e){!function(e){var t=je(e);return Array.isArray(t)&&t.some((function(e){return"object"===De(e)&&!e.disabled&&!Pe[e.type]}))}(e)?Le.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,He(e)}function qe(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ue({modifiers:je(e),properties:r,layout:n})}))}function Ne(e){var t=je(e);if(Array.isArray(t))for(var r=0;r<t.length;r++){var n=t[r];if(Pe[n.type]&&!n.disabled)return n}}function Fe(e){var t=Ne(e);return!t||Pe[t.type].enableTotalsFunction(e)}function ze(e){return i(e,"qHyperCubeDef.qMeasures",[]).concat(i(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function je(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function $e(e){return i(e,"outputExpression.qValueExpression.qExpr")||i(e,"outputExpression")}function Be(e){ze(e).forEach((function(e){return function(e){var r=Ne(e);r&&(void 0!==r.outputExpression&&$e(r)!==e.qDef.qDef?delete e.qDef.base:!Le.isValid(e)&&r.base&&(e.qDef.base=t()(!0,{},r.base)))}(e)}))}function He(e){var t=je(e);Array.isArray(t)&&t.forEach((function(t){"object"===De(t)&&(t.disabled||!Pe[t.type]&&$e(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)}))}function We(e){return e.base||e.qDef&&e.qDef.base}function Ge(e){var t=We(e);return e.qLibraryId||t&&t.qLibraryId}function Ve(e){var t=e.measure,r=e.properties,n=e.layout;return!Ge(t)&&Ue({modifiers:je(t),properties:r,layout:n})}function Ue(e){var t=e.modifiers,r=e.properties,n=e.layout,o={};return Array.isArray(t)&&t.some((function(e){return!("object"!==De(e)||e.disabled||!Pe[e.type])&&(void 0===o[e.type]&&(o[e.type]=Pe[e.type].isApplicable({properties:r,layout:n})),o[e.type])}))}function Ye(e){var t=e.model,r=e.dimensionAndFieldList;if(r)return Promise.resolve(r);var n=[],o={},i=t.app.getDimensionList().then((function(e){o.dimensionList=e}));n.push(i);var a=t.app.getFieldList().then((function(e){o.fieldList=e}));return n.push(a),Promise.all(n).then((function(){return o}))}function Ke(e){var t=e.libraryIds,r=e.model,n=e.libraryItemsProps;if(n)return Promise.resolve(n);var o=t.measureLibraryIds,i=t.dimensionLibraryIds,a={},s=[];return o.forEach((function(e){var t=r.app.getMeasure(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),i.forEach((function(e){var t=r.app.getDimension(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),Promise.all(s).then((function(){return a}))}function Xe(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Je(e){var t=e.oldProperties,r=e.newProperties,n=e.model,o=JSON.stringify(i(t,"qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(i(r,"qHyperCubeDef.qMeasures"),Xe)||JSON.stringify(i(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(i(r,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe);return o?function(e){var t=e.model,r=e.oldProperties,n=e.newProperties,o=t.layout;return o&&!o.qHasSoftPatches&&!o.qExtendsId&&i(o,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(n):k(t,r,n)}({model:n,oldProperties:t,newProperties:r}).then((function(){return o})):Promise.resolve(o)}function Ze(e){var t=e.modifiers,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some((function(e){return"object"===De(e)&&!e.disabled&&Pe[e.type]&&Pe[e.type].needDimension({modifier:e,properties:r,layout:n})}))}function Qe(e){var t=ze(e),r=[],n=[],o=!1;return t.forEach((function(t){var n=je(t);if(Ue({modifiers:n,properties:e})){var i=Ge(t);i&&r.push(i),o=o||Ze({modifiers:n,properties:e})}})),i(e,"qHyperCubeDef.qDimensions",[]).forEach((function(e){var t=e.qLibraryId;t&&n.push(t)})),{measureLibraryIds:r,dimensionLibraryIds:n}}function et(e){var t=e.model,r=e.libraryIds;return!e.masterItem&&r&&(r.measureLibraryIds.length||r.dimensionLibraryIds.length)?(_e[t.id].masterItemSubscriber=_e[t.id].masterItemSubscriber||function(e){var t=e.model,r=e.callback,n={},o={},a={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},r=i(e,"qInfo.qType");return r&&s[r]&&s[r].forEach((function(r){t[r]=i(e,r)})),JSON.stringify(t)}function u(e){var t=e.qInfo.qId;if(n[t]){var o=l(e);n[t].properties!==o&&(n[t].properties=o,"function"==typeof r&&n[t].enabled&&r(e)),n[t].enabled=!0}}function c(e,r){return t.app[r](e).then((function(t){n[e]={listener:t.layoutSubscribe(u),enabled:!1,properties:l(t.layout)}}))}return{subscribe:function(e){var r=e.measureLibraryIds,i=e.dimensionLibraryIds,s=[];return function(e){var t=e.dimensionLibraryIds;o={},e.measureLibraryIds.forEach((function(e){o[e]=!0})),a={},t.forEach((function(e){a[e]=!0}))}({measureLibraryIds:r,dimensionLibraryIds:i}),Object.keys(n).forEach((function(e){o[e]||a[e]||(n[e].listener.dispose(),delete n[e])})),t.app&&(Object.keys(o).forEach((function(e){o[e]&&!n[e]&&s.push(c(e,"getMeasure"))})),Object.keys(a).forEach((function(e){a[e]&&!n[e]&&s.push(c(e,"getDimension"))}))),Promise.all(s)},unsubscribe:function(){Object.keys(n).forEach((function(e){n[e].listener.dispose()})),n={}}}}({model:t,callback:function(e){return Te({model:t,masterItem:e}).then((function(){return t.app.clearUndoBuffer()}))}}),_e[t.id].masterItemSubscriber.subscribe(r)):Promise.resolve()}})(),e.default=o.default,Object.defineProperty(e,"__esModule",{value:!0})})()}(Ug);var Yg=B(Ug);const Kg=(e,t)=>{if(e||t)return{uses:"dimensionRepresentationItems.representationType",options(){const r=[{value:"text",translation:"Object.Table.Representation.Text"}];return t&&r.push({value:"url",translation:"Object.Table.Representation.Link"}),e&&r.push({value:"image",translation:"Object.Table.Representation.Image"}),r}}},Xg=e=>{if(e)return{representationUrlPosition:{uses:"dimensionRepresentationItems.representationUrlPosition"},representationUrlLabel:{uses:"dimensionRepresentationItems.representationUrlLabel"},representationLinkUrl:{uses:"dimensionRepresentationItems.representationLinkUrl"}}},Jg=e=>{if(e)return{representationImage:{uses:"dimensionRepresentationItems.representationImage",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"}]}}}}},Zg=e=>{var t,r;const{anything:n,flags:o}=e,i=o.isEnabled("CLIENT_IM_5715_LINKS"),a=o.isEnabled("CLIENT_IM_5715_LINKS_AND_IMAGES")&&!(null!=n&&null!==(t=n.sense)&&void 0!==t&&null!==(r=t.isUnsupportedFeature)&&void 0!==r&&r.call(t,"tableImages"));return{representationType:Kg(a,i),...Xg(i),...Jg(a)}},Qg=e=>{var t,r;const{flags:n,anything:o}=e,i=n.isEnabled("CLIENT_IM_5715_LINKS_AND_IMAGES")&&!(null!=o&&null!==(t=o.sense)&&void 0!==t&&null!==(r=t.isUnsupportedFeature)&&void 0!==r&&r.call(t,"tableImages"));return{representationType:i?{uses:"measureRepresentationItems.representationType",options:[{value:"text",translation:"Object.Table.Representation.Text"},{value:"image",translation:"Object.Table.Representation.Image"}]}:void 0,representationImage:i?{uses:"measureRepresentationItems.representationImage",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}},eb={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}},tb=e=>{var t,r,n,o;return{type:"items",grouped:!0,items:{totalsAggrGroup:{type:"items",items:{totalsAggrFunc:{type:"string",component:"dropdown",ref:"qDef.qAggrFunc",translation:"Object.Table.AggrFunc",options:(e,t)=>(!Yg.hasActiveModifiers({measures:[e],properties:t.properties})||Yg.ifEnableTotalsFunction(e)?[{value:"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:null!=e&&null!==(t=e.anything)&&void 0!==t&&null!==(t=t.sense)&&void 0!==t&&null!==(r=t.isUnsupportedFeature)&&void 0!==r&&r.call(t,"totals")?"None":"Expr"}}}},show:!(null!=e&&null!==(n=e.anything)&&void 0!==n&&null!==(n=n.sense)&&void 0!==n&&null!==(o=n.isUnsupportedFeature)&&void 0!==o&&o.call(n,"totals"))}},rb={type:{type:"string",component:"dropdown",ref:"qDef.columnWidth.type",translation:"Object.Table.Column.Width",options:[{value:ph.Auto,translation:"Common.Auto"},{value:ph.FitToContent,translation:"Object.Table.Column.FitToContent"},{value:ph.Pixels,translation:"Object.Table.Column.Pixels"},{value:ph.Percentage,translation:"Object.Table.Column.Percentage"}],defaultValue:ph.Auto},sizePixels:{ref:"qDef.columnWidth.pixels",translation:"Object.Table.Column.Pixels",type:"number",expression:"optional",defaultValue:200,show:e=>{var t;return(null===(t=e.qDef.columnWidth)||void 0===t?void 0:t.type)===ph.Pixels},change(e){e.qDef.columnWidth.pixels=void 0===e.qDef.columnWidth.pixels?e.qDef.columnWidth.pixels:Math.max(1,Math.min(dh.PixelsMax,e.qDef.columnWidth.pixels))}},sizePercentage:{ref:"qDef.columnWidth.percentage",translation:"Object.Table.Column.Percentage",type:"number",expression:"optional",defaultValue:20,show:e=>{var t;return(null===(t=e.qDef.columnWidth)||void 0===t?void 0:t.type)===ph.Percentage},change(e){e.qDef.columnWidth.percentage=void 0===e.qDef.columnWidth.percentage?e.qDef.columnWidth.percentage:Math.max(1,Math.min(dh.PercentageMax,e.qDef.columnWidth.percentage))}}},nb={autoSort:{ref:"qDef.autoSort",type:"boolean",defaultValue:!0,show:!1},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},tableCellColoring:{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",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}]},...eb,...rb},ob={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},createMasterItemButton:{},divider:{uses:"divider"},dimensionLimits:{uses:"dimensions.items.dimensionLimits"},showOthers:{uses:"dimensions.items.others"}},ib=e=>({libraryId:{type:"string",component:"library-item",libraryItemType:"measure",ref:"qLibraryId",translation:"Common.Measure",show:e=>e.qLibraryId},inlineMeasure:{component:"inline-measure",show:e=>!e.qLibraryId},numberFormatting:{uses:"measures.items.numberFormatting"},createMasterItemButton:{},divider:{uses:"divider"},totalsAggr:tb(e)}),ab=e=>({type:"items",translation:"Common.Data",component:"data-assets-panel",items:{dimensions:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qDimensions",items:{field:{type:"items",translation:"Common.Field",items:ob},presentation:{type:"items",translation:"properties.presentation",items:{...nb,...Zg(e)}}}},measures:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qMeasures",items:{field:{type:"items",translation:"Common.Field",items:ib(e)},presentation:{type:"items",translation:"properties.presentation",items:{...nb,...Qg(e)}}}}}}),sb=e=>({type:"items",items:[{component:"styling-panel",chartTitle:"Object.StraightTable",subtitle:"LayerStyleEditor.component.styling",translation:"LayerStyleEditor.component.styling",ref:"components",useGeneral:!0,useBackground:e.flags.isEnabled("CLIENT_IM_6546_TABLE_BG_COLOR"),defaultValue:[],items:{headerSection:{translation:"properties.Header",component:"panel-section",items:{headerFontItem:{component:"items",ref:"components",key:"theme",items:{headerFontWrapper:{component:"inline-wrapper",items:{headerFontSize:{component:"integer",ref:"header.fontSize",translation:"properties.fontSize",width:9,min:5,max:300,defaultValue(e,t,r){var n,o;const i=r.theme.current();return parseInt(null!==(n=null===(o=i.object)||void 0===o||null===(o=o.straightTableV2)||void 0===o||null===(o=o.header)||void 0===o?void 0:o.fontSize)&&void 0!==n?n:i.fontSize,10)},change(e){e.header.fontSize=e.header.fontSize?Math.max(5,Math.min(300,Math.floor(e.header.fontSize))):e.header.fontSize}},headerFontColor:{show:!0,ref:"header.fontColor",type:"object",component:"color-picker",defaultValue(e,t,r){var n,o;const i=r.theme.current();return{color:null!==(n=null===(o=i.object)||void 0===o||null===(o=o.straightTableV2)||void 0===o||null===(o=o.header)||void 0===o?void 0:o.color)&&void 0!==n?n:i.color}},dualOutput:!0}}}}}}},contentSection:{component:"panel-section",translation:"properties.Content",items:{contentFontItem:{component:"items",ref:"components",key:"theme",items:{contentFontWrapper:{component:"inline-wrapper",items:{contentFontSize:{component:"integer",ref:"content.fontSize",translation:"properties.fontSize",width:9,min:5,max:300,defaultValue(e,t,r){var n,o;const i=r.theme.current();return parseInt(null!==(n=null===(o=i.object)||void 0===o||null===(o=o.straightTableV2)||void 0===o||null===(o=o.content)||void 0===o?void 0:o.fontSize)&&void 0!==n?n:i.fontSize,10)},change(e){e.content.fontSize=e.content.fontSize?Math.max(5,Math.min(300,Math.floor(e.content.fontSize))):e.content.fontSize}},contentFontColor:{ref:"content.fontColor",type:"object",component:"color-picker",defaultValue(e,t,r){var n,o;const i=r.theme.current();return{color:null!==(n=null===(o=i.object)||void 0===o||null===(o=o.straightTableV2)||void 0===o||null===(o=o.content)||void 0===o?void 0:o.color)&&void 0!==n?n:i.color}},dualOutput:!0}}}}}}},rowHeightSection:{show:()=>e.flags.isEnabled("CLIENT_IM_5715_LINKS_AND_IMAGES"),component:"panel-section",translation:"ThemeStyleEditor.style.rowHeight",items:{rowHeightItem:{component:"items",ref:"components",key:"theme",items:{rowHeightWrapper:{ref:"content.rowHeight",component:"integer",placeholder:1,maxlength:4,change(e){""!==e.content.rowHeight&&null!==e.content.rowHeight&&void 0!==e.content.rowHeight?e.content.rowHeight=Math.max(1,Math.min(50,Math.floor(e.content.rowHeight))):e.content.rowHeight=void 0}}}}}},hoverEffectSection:{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(e){var t;return null==e||null===(t=e.content)||void 0===t?void 0:t.hoverEffect},ref:"content.hoverColor",translation:"ThemeStyleEditor.style.hoverStyle",type:"object",component:"color-picker",dualOutput:!0},hoverEffectFontColorItem:{show(e){var t;return null==e||null===(t=e.content)||void 0===t?void 0:t.hoverEffect},ref:"content.hoverFontColor",translation:"ThemeStyleEditor.style.hoverFontStyle",type:"object",component:"color-picker",dualOutput:!0}}}}}}}]}),lb=e=>{var t,r;return{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:!(null!=e&&null!==(t=e.anything)&&void 0!==t&&null!==(t=t.sense)&&void 0!==t&&null!==(r=t.isUnsupportedFeature)&&void 0!==r&&r.call(t,"totals"))}},ub={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}},cb=e=>({uses:"settings",items:{presentation:{grouped:!0,type:"items",translation:"properties.presentation",items:[sb(e),lb(e),{ref:"usePagination",translation:"properties.usePagination",type:"boolean",component:"checkbox",defaultValue:!1}]},...ub}}),db={uses:"sorting"},pb={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}}}},fb=e=>({type:"items",component:"accordion",items:{data:ab(e),sorting:db,addOns:pb,settings:cb(e)}});function mb(e){return{definition:fb(e),exploration:$g,data:Vg(e),support:{export:!0,exportData:!0,snapshot:!0,viewData:!1,exploration:!0,cssScaling:!0},importProperties(e,t,r,n){const o={defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()};return jg({exportFormat:e,initialProperties:t,extension:r,hypercubePath:n,defaultPropertyValues:o})},exportProperties:(e,t)=>Fg({propertyTree:e,hyperCubePath:t})}}const hb=(e,t)=>o((()=>((e,t)=>(r,{isDim:n,colIdx:o})=>{const i=n?o:o-e.qDimensionInfo.length,a=`/qHyperCubeDef/${n?"qDimensions":"qMeasures"}/${i}/qDef/columnWidth`,s=e[n?"qDimensionInfo":"qMeasureInfo"][i].columnWidth,l=s?{qPath:a,qOp:"Replace",qValue:JSON.stringify({...s,...r})}:{qPath:a,qOp:"Add",qValue:JSON.stringify(r)};null==t||t.applyPatches([l],!0)})(e,t)),[e,t]),gb=e=>-1===e?{}:e.qAttrExprInfo.reduce(((e,{id:t},r)=>(e[t]=r,e)),{});let bb;const vb=new Uint8Array(16);function yb(){if(!bb&&(bb="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!bb))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return bb(vb)}const xb=[];for(let e=0;e<256;++e)xb.push((e+256).toString(16).slice(1));var Sb={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Eb(e,t,r){if(Sb.randomUUID&&!t&&!e)return Sb.randomUUID();const n=(e=e||{}).random||(e.rng||yb)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=n[e];return t}return function(e,t=0){return xb[e[t+0]]+xb[e[t+1]]+xb[e[t+2]]+xb[e[t+3]]+"-"+xb[e[t+4]]+xb[e[t+5]]+"-"+xb[e[t+6]]+xb[e[t+7]]+"-"+xb[e[t+8]]+xb[e[t+9]]+"-"+xb[e[t+10]]+xb[e[t+11]]+xb[e[t+12]]+xb[e[t+13]]+xb[e[t+14]]+xb[e[t+15]]}(n)}const Cb=()=>{var e,t,r;return null!==(e=null===(t=crypto)||void 0===t||null===(r=t.randomUUID)||void 0===r?void 0:r.call(t))&&void 0!==e?e:Eb()},wb=({qLibraryId:e,cId:t})=>{var r;return null!==(r=null!=e?e:t)&&void 0!==r?r:Cb()};function Rb(e){return Rb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rb(e)}function Ab(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ib(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(o=n.key,i=void 0,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"))?i:String(i)),n)}var o,i}function Lb(e,t,r){return t&&Ib(e.prototype,t),r&&Ib(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Db(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mb(e,t)}function Pb(e){return Pb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Pb(e)}function Mb(e,t){return Mb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Mb(e,t)}function _b(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Tb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Pb(e);if(t){var o=Pb(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return _b(this,r)}}function kb(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ob(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ob(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ob(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var qb={fromSearchString:function(e){if(!e)return[];"?"===e[0]&&(e=e.substr(1));var t=[];return e.split("&").forEach((function(e){if(e){var r,n=e.indexOf("="),o="",i=!1;-1===n?r=e:(r=e.slice(0,n),o=e.slice(n+1),i=!0),t.push(function(e,t,r){return{key:Nb(e),value:Nb(t),useEqualSign:r}}(r,o,i))}})),t}};function Nb(e){try{return decodeURIComponent(e)}catch(t){return e}}function Fb(e){if(!(this instanceof Fb))throw new Error("Url needs to be called with the new keyword");if(!e)throw new Error("Url needs a string to operate on");var t=function(e){var t={authorityAndPath:"",search:"",hash:""},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:function(){return qb.fromSearchString(t.search)}}})}function zb(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";")}Fb.encodeAuthorityAndPath=function(e){return encodeURI(e).replace(/%5B/gi,"[").replace(/%5D/gi,"]").replace(/%25/gi,"%")},Fb.encodeSearchParams=function(e){for(var t,r="",n=0;n<e.length;n++)r+=0===n?"?":"&",r+=zb((t=e[n]).key),t.value?r+="=".concat(zb(t.value)):r+=t.useEqualSign?"=":"";return r};var jb,$b=function(){function e(t){Ab(this,e),this._input=t,this._pushback=null,this._temp=null,this._index=0,this._mark=0}return Lb(e,[{key:"_hasNext",value:function(){return null!=this._input&&(0!==this._input.length&&this._index<this._input.length)}},{key:"pushback",value:function(e){this._pushback=e}},{key:"index",value:function(){return this._index}},{key:"hasNext",value:function(){return null!=this._pushback||this._hasNext()}},{key:"next",value:function(){if(null!=this._pushback){var e=this._pushback;return this._pushback=null,e}return this._hasNext()?this._input.charAt(this._index++):null}},{key:"nextHex",value:function(){var e=this.next();return null==e?null:e.match(/[0-9A-Fa-f]/)?e:null}},{key:"peek",value:function(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}},{key:"mark",value:function(){this._temp=this._pushback,this._mark=this._index}},{key:"reset",value:function(){this._pushback=this._temp,this._index=this._mark}},{key:"remainder",value:function(){var e=this._input.substr(this._index);return null!=this._pushback&&(e=this._pushback+e),e}}]),e}(),Bb=function(){function e(){Ab(this,e)}return Lb(e,[{key:"decode",value:function(e){for(var t,r="",n=new $b(e);n.hasNext();)r+=null!=(t=this.decodeCharacter(n))?t:n.next();return r}},{key:"decodeCharacter",value:function(e){return e.next()}}]),e}(),Hb=function(e){return e>=0&&e<=1114111},Wb=function(e){return e.match(/[\s]/)},Gb=function(e){Db(r,e);var t=Tb(r);function r(){return Ab(this,r),t.apply(this,arguments)}return Lb(r,[{key:"decodeCharacter",value:function(e){e.mark();var t,r,n,o=e.next();if(null==o||"\\"!==o)return e.reset(),null;var 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(t=i,r=0;r<5&&(null!=(n=e.next())&&!Wb(n));r++){if("NaN"===parseInt(n,16)){e.pushback(n);break}t+=n}var a=parseInt(t,16);return Hb(a)?String.fromCharCode(a):"�"}}]),r}(Bb),Vb=function(){function e(t,r){Ab(this,e),this._key=t,this._value=r}return Lb(e,[{key:"getKey",value:function(){return this._key}},{key:"getValue",value:function(){return this._value}},{key:"equals",value:function(t){return t instanceof e&&(this._key===t._key&&this._value===t._value)}}],[{key:"newInstanceIfNeeded",value:function(){var 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}}]),e}(),Ub=function(){function e(){Ab(this,e)}return Lb(e,[{key:"setValue",value:function(e){this._nextMap=null,this._value=e}},{key:"getNextNode",value:function(e){return this._nextMap?this._nextMap[e]:null}},{key:"put",value:function(t,r,n){var o,i;if(t.length===r)return i=this._value,this.setValue(n),i;var a=t.charAt(r);return this._nextMap?(o=this._nextMap[a])||(o=new e,this._nextMap[a]=o):(this._nextMap={},o=new e,this._nextMap[a]=o),o.put(t,r+1,n)}},{key:"get",value:function(e,t){if(e.length<=t)return this._value;var r=this.getNextNode(e.charAt(t));return r?r.get(e,t+1):null}},{key:"getLongestMatch",value:function(e,t){if(e.length<=t)return Vb.newInstanceIfNeeded(e,this._value);var r=this.getNextNode(e.charAt(t));if(!r)return Vb.newInstanceIfNeeded(e,t,this._value);var n=r.getLongestMatch(e,t+1);return n||Vb.newInstanceIfNeeded(e,t,this._value)}}]),e}(),Yb=function(){function e(){Ab(this,e),this.clear()}return Lb(e,[{key:"getLongestMatch",value:function(e){return this.root&&e?this.root.getLongestMatch(e,0):null}},{key:"getMaxKeyLength",value:function(){return this.maxKeyLen}},{key:"clear",value:function(){this.root=null,this.maxKeyLen=0,this.size=0}},{key:"put",value:function(e,t){this.root||(this.root=new Ub);var r=this.root.put(e,0,t);return r||(e.length>this.maxKeyLen&&(this.maxKeyLen=e.length),this.size++,null)}}]),e}(),Kb=function(){var e,t,r,n=[],o=[],i=new Yb;for(e in n["&quot"]="34",n["&amp"]="38",n["&lt"]="60",n["&gt"]="62",n["&nbsp"]="160",n["&iexcl"]="161",n["&cent"]="162",n["&pound"]="163",n["&curren"]="164",n["&yen"]="165",n["&brvbar"]="166",n["&sect"]="167",n["&uml"]="168",n["&copy"]="169",n["&ordf"]="170",n["&laquo"]="171",n["&not"]="172",n["&shy"]="173",n["&reg"]="174",n["&macr"]="175",n["&deg"]="176",n["&plusmn"]="177",n["&sup2"]="178",n["&sup3"]="179",n["&acute"]="180",n["&micro"]="181",n["&para"]="182",n["&middot"]="183",n["&cedil"]="184",n["&sup1"]="185",n["&ordm"]="186",n["&raquo"]="187",n["&frac14"]="188",n["&frac12"]="189",n["&frac34"]="190",n["&iquest"]="191",n["&Agrave"]="192",n["&Aacute"]="193",n["&Acirc"]="194",n["&Atilde"]="195",n["&Auml"]="196",n["&Aring"]="197",n["&AElig"]="198",n["&Ccedil"]="199",n["&Egrave"]="200",n["&Eacute"]="201",n["&Ecirc"]="202",n["&Euml"]="203",n["&Igrave"]="204",n["&Iacute"]="205",n["&Icirc"]="206",n["&Iuml"]="207",n["&ETH"]="208",n["&Ntilde"]="209",n["&Ograve"]="210",n["&Oacute"]="211",n["&Ocirc"]="212",n["&Otilde"]="213",n["&Ouml"]="214",n["&times"]="215",n["&Oslash"]="216",n["&Ugrave"]="217",n["&Uacute"]="218",n["&Ucirc"]="219",n["&Uuml"]="220",n["&Yacute"]="221",n["&THORN"]="222",n["&szlig"]="223",n["&agrave"]="224",n["&aacute"]="225",n["&acirc"]="226",n["&atilde"]="227",n["&auml"]="228",n["&aring"]="229",n["&aelig"]="230",n["&ccedil"]="231",n["&egrave"]="232",n["&eacute"]="233",n["&ecirc"]="234",n["&euml"]="235",n["&igrave"]="236",n["&iacute"]="237",n["&icirc"]="238",n["&iuml"]="239",n["&eth"]="240",n["&ntilde"]="241",n["&ograve"]="242",n["&oacute"]="243",n["&ocirc"]="244",n["&otilde"]="245",n["&ouml"]="246",n["&divide"]="247",n["&oslash"]="248",n["&ugrave"]="249",n["&uacute"]="250",n["&ucirc"]="251",n["&uuml"]="252",n["&yacute"]="253",n["&thorn"]="254",n["&yuml"]="255",n["&OElig"]="338",n["&oelig"]="339",n["&Scaron"]="352",n["&scaron"]="353",n["&Yuml"]="376",n["&fnof"]="402",n["&circ"]="710",n["&tilde"]="732",n["&Alpha"]="913",n["&Beta"]="914",n["&Gamma"]="915",n["&Delta"]="916",n["&Epsilon"]="917",n["&Zeta"]="918",n["&Eta"]="919",n["&Theta"]="920",n["&Iota"]="921",n["&Kappa"]="922",n["&Lambda"]="923",n["&Mu"]="924",n["&Nu"]="925",n["&Xi"]="926",n["&Omicron"]="927",n["&Pi"]="928",n["&Rho"]="929",n["&Sigma"]="931",n["&Tau"]="932",n["&Upsilon"]="933",n["&Phi"]="934",n["&Chi"]="935",n["&Psi"]="936",n["&Omega"]="937",n["&alpha"]="945",n["&beta"]="946",n["&gamma"]="947",n["&delta"]="948",n["&epsilon"]="949",n["&zeta"]="950",n["&eta"]="951",n["&theta"]="952",n["&iota"]="953",n["&kappa"]="954",n["&lambda"]="955",n["&mu"]="956",n["&nu"]="957",n["&xi"]="958",n["&omicron"]="959",n["&pi"]="960",n["&rho"]="961",n["&sigmaf"]="962",n["&sigma"]="963",n["&tau"]="964",n["&upsilon"]="965",n["&phi"]="966",n["&chi"]="967",n["&psi"]="968",n["&omega"]="969",n["&thetasym"]="977",n["&upsih"]="978",n["&piv"]="982",n["&ensp"]="8194",n["&emsp"]="8195",n["&thinsp"]="8201",n["&zwnj"]="8204",n["&zwj"]="8205",n["&lrm"]="8206",n["&rlm"]="8207",n["&ndash"]="8211",n["&mdash"]="8212",n["&lsquo"]="8216",n["&rsquo"]="8217",n["&sbquo"]="8218",n["&ldquo"]="8220",n["&rdquo"]="8221",n["&bdquo"]="8222",n["&dagger"]="8224",n["&Dagger"]="8225",n["&bull"]="8226",n["&hellip"]="8230",n["&permil"]="8240",n["&prime"]="8242",n["&Prime"]="8243",n["&lsaquo"]="8249",n["&rsaquo"]="8250",n["&oline"]="8254",n["&frasl"]="8260",n["&euro"]="8364",n["&image"]="8365",n["&weierp"]="8472",n["&real"]="8476",n["&trade"]="8482",n["&alefsym"]="8501",n["&larr"]="8592",n["&uarr"]="8593",n["&rarr"]="8594",n["&darr"]="8595",n["&harr"]="8596",n["&crarr"]="8629",n["&lArr"]="8656",n["&uArr"]="8657",n["&rArr"]="8658",n["&dArr"]="8659",n["&hArr"]="8660",n["&forall"]="8704",n["&part"]="8706",n["&exist"]="8707",n["&empty"]="8709",n["&nabla"]="8711",n["&isin"]="8712",n["&notin"]="8713",n["&ni"]="8715",n["&prod"]="8719",n["&sum"]="8721",n["&minus"]="8722",n["&lowast"]="8727",n["&radic"]="8730",n["&prop"]="8733",n["&infin"]="8734",n["&ang"]="8736",n["&and"]="8743",n["&or"]="8744",n["&cap"]="8745",n["&cup"]="8746",n["&int"]="8747",n["&there4"]="8756",n["&sim"]="8764",n["&cong"]="8773",n["&asymp"]="8776",n["&ne"]="8800",n["&equiv"]="8801",n["&le"]="8804",n["&ge"]="8805",n["&sub"]="8834",n["&sup"]="8835",n["&nsub"]="8836",n["&sube"]="8838",n["&supe"]="8839",n["&oplus"]="8853",n["&otimes"]="8855",n["&perp"]="8869",n["&sdot"]="8901",n["&lceil"]="8968",n["&rceil"]="8969",n["&lfloor"]="8970",n["&rfloor"]="8971",n["&lang"]="9001",n["&rang"]="9002",n["&loz"]="9674",n["&spades"]="9824",n["&clubs"]="9827",n["&hearts"]="9829",n["&diams"]="9830",n)"function"!=typeof n[e]&&n.hasOwnProperty(e)&&(o[n[e]]=e);for(t in o)"function"!=typeof o[t]&&o.hasOwnProperty(t)&&(r=o[t].toLowerCase().substr(1),i.put(r,String.fromCharCode(t)));return i}(),Xb=function(e){Db(r,e);var t=Tb(r);function r(){return Ab(this,r),t.apply(this,arguments)}return Lb(r,[{key:"decodeCharacter",value:function(e){var t;e.mark();var r=e.next();if(null==r||"&"!==r)return e.reset(),null;var n=e.next();if(null==n)return e.reset(),null;if("#"===n){if(null!=(t=this._getNumericEntity(e)))return t}else if(n.match(/[A-Za-z]/)&&(e.pushback(n),null!=(t=this._getNamedEntity(e))))return t;return e.reset(),null}},{key:"_getNamedEntity",value:function(e){var t,r,n,o="";for(t=Math.min(e.remainder().length,Kb.getMaxKeyLength()),n=0;n<t;n++)o+=e.next().toLowerCase();var i=Kb.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()}},{key:"_getNumericEntity",value:function(e){var t=e.peek();return null==t?null:"x"===t||"X"===t?(e.next(),this._parseHex(e)):this._parseNumber(e)}},{key:"_parseHex",value:function(e){for(var t,r="";e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,16))){if(";"===t){e.next();break}break}r+=t,e.next()}var n=parseInt(r,16);return!Number.isNaN(+n)&&Hb(n)?String.fromCharCode(n):null}},{key:"_parseNumber",value:function(e){for(var t,r="";e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,10))){if(";"===t){e.next();break}break}r+=t,e.next()}var n=parseInt(r,10);return!Number.isNaN(+n)&&Hb(n)?String.fromCharCode(n):null}}]),r}(Bb),Jb=function(e){Db(r,e);var t=Tb(r);function r(){return Ab(this,r),t.apply(this,arguments)}return Lb(r,[{key:"decodeCharacter",value:function(e){e.mark();var t,r,n,o,i=e.next();if(null==i)return e.reset(),null;if("%"!==i)return e.reset(),null;for(t="",r=0;r<2;r++)null!=(n=e.nextHex())&&(t+=n);return 2===t.length&&(o=parseInt(t,16),Hb(o))?String.fromCharCode(o):(e.reset(),null)}}]),r}(Bb),Zb=/^data:(?<!\s)\s*(image\/[\w+-.]+)(?<!\s)\s*(;.*?){0,1}(?<!\s)\s*,(.*)/i;"undefined"!=typeof document&&(jb=document.createElement("div"));var Qb=Array.prototype.indexOf,ev=[",",".","_"," "],tv={default:[",",".","-","_"," "]},rv={width:["%"],height:["%"]},nv={default:["-"," ","%"],color:["#"," ","(",")"],image:["(",")",":","/","?","&","-",".",'"',"="," "]},ov={background:["(",")",":","%","/","?","&","-"," ",".",'"',"=","#"],"background-image":nv.image,"background-color":nv.color,"border-color":nv.color,"border-image":nv.image,color:nv.color,icon:nv.image,"list-style-image":nv.image,"outline-color":nv.color},iv={attr_name:["on[a-z]{1,}","style","href","src"],attr_val:["javascript:"],css_key:["behavior","-moz-behavior","-ms-behavior"],css_val:["expression"]};function av(e,t,r){var n;if(t){if(Qb)return Qb.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 sv(e){if(null==e)return"";var t,r=document.createTextNode(e);return jb.appendChild(r),t=jb.innerHTML,jb.removeChild(r),t}function lv(e,t,r){var n,o,i,a,s,l,u,c,d;if(e=cv(e).toLowerCase(),t=cv(t),av(e,iv.attr_name)>=0)throw new Error("Unsafe attribute name used: ".concat(e));for(i=0;i<iv.attr_val;i++)if(t.toLowerCase().match(iv.attr_val[i]))throw new Error("Unsafe attribute value used: ".concat(t));if((n=rv[e])||(n=tv.default),o="",!r){for(a=0;a<e.length;a++){if(!(s=e.charAt(a)).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]/)&&av(u,n)<0?(d=c.toString(16),o+="&#x".concat(d,";")):o+=u;return r||(o+='"'),o}function uv(e,t,r){var n,o,i,a,s,l,u,c,d,p;if(e=cv(e).toLowerCase(),t=cv(t),av(e,iv.css_key)>=0)throw new Error("Unsafe property name used: ".concat(e));for(n=0;n<iv.css_val.length;n++)if(t.toLowerCase().indexOf(iv.css_val[n])>=0)throw new Error("Unsafe property value used: ".concat(t));if((o=ov[e])||(o=nv.default),i="",!r){for(a=0;a<e.length;a++){if(!(s=e.charAt(a)).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]/)&&av(u,o)<0?(d=c.toString(16),p="000000".substr(d.length),i+="\\".concat(p).concat(d)):i+=u;return i}function cv(e,t){var r,n,o,i,a=!1;if(null===e)return null;r=e,n=e,o=0;for(var s=[new Xb,new Jb,new Gb];!a;){n=r;for(var l=0;l<s.length;l++)(i=s[l].decode(r))!==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}for(var dv=[],pv=0;pv<255;pv++)dv[pv]=pv>=48&&pv<=57||pv>=65&&pv<=90||pv>=97&&pv<=122?null:pv.toString(16);var fv=function(e){return sv(e.unsafe)},mv=function(e){var t,r=[],n=[],o={},i="";for(t in e.map?r=e.map:r[e.name]=e.unsafe,r)"function"!=typeof r[t]&&r.hasOwnProperty(t)&&(n[t]=uv(t,r[t],!0),i+=uv(t,r[t],!0),o[t]=n[t]);return e.map?o:i},hv=function(e){var t=[],r=[],n={},o="";for(var i in e.map?t=e.map:t[e.name]=e.unsafe,t)"function"!=typeof t[i]&&t.hasOwnProperty(i)&&(r[i]=lv(i,t[i],!0),o+=lv(i,t[i],!0),n[i]=r[i]);return e.map?n:o};function gv(e,t){throw new Error(t)}var bv={canonicalize:cv,encode:function(){var e={context:"html",unsafe:null,name:null,map:null,setter:null,strict:!0};return 1===arguments.length&&"object"===Rb(arguments[0])?function(){for(var e,t,r,n=arguments[0]||{},o=1,i=arguments.length;o<i;o++)if(null!=(e=arguments[o]))for(t in e)if(e.hasOwnProperty(t)){if(n===(r=e[t]))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?fv(e):"css"===e.context?(null!=e.map&&"object"!==Rb(e.map)&&gv(this,"Invalid parameter type"),mv(e)):"attr"===e.context?(null!=e.map&&"object"!==Rb(e.map)&&gv(this,"Invalid parameter type"),hv(e)):void gv(this,"Invalid parameter type")},encodeForAttr:lv,encodeForAttr2:function(e){return lv("nonsens",e,!0)},encodeForCSS:uv,encodeForHref:function(e){cv(e),0!==e.search("[a-zA-Z0-9]+:")&&(e="http://".concat(e));var t=new Fb(e),r=Fb.encodeAuthorityAndPath(decodeURI(t.authorityAndPath)),n=t.searchParams,o=(e=r+Fb.encodeSearchParams(n)+t.hash).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){var r,n,o,i,a,s;for(t||(t=ev),s="",r=0;r<e.length;r++)o=e.charAt(r),i=e.charCodeAt(r),av(o,t)>=0||null==dv[i]?s+=o:(n=i.toString(16),i<256?(a="00".substr(n.length),s+="\\x".concat(a).concat(n.toUpperCase())):(a="0000".substr(n.length),s+="\\u".concat(a).concat(n.toUpperCase())));return s},encodeForHTML:sv,encodeForURL:function(e,t){var r="";return t&&(t.match(/^[A-Za-z\-0-9]{1,}$/)?r+=cv(t).toLowerCase():gv(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?'"':""},isSafeDataURL:function(e,t){var r=null!=t?t:{},n=r.maxByteSizeSvg,o=void 0===n?5e5:n,i=r.maxByteSizeImage,a=void 0===i?5e6:i,s=function(e){var t,r=kb(null!==(t=Zb.exec(e.trim()))&&void 0!==t?t:[],4),n=r[1];return{encoding:r[2],data:r[3],mimeType:null==n?void 0:n.toLocaleLowerCase()}}(e),l=s.mimeType,u=s.encoding,c=s.data;if(!c)return!0;var d=function(e,t,r){var n={type:e};if(null!=t&&t.includes(";base64"))try{return new Blob([atob(r)],n).size}catch(e){return new Blob([r],n).size}return"image/svg+xml"===e?new Blob([r],n).size:0}(l,u,c);return"image/svg+xml"===l?d<=o:d<=a}};const vv=(e,t)=>{var r;const n=Array.isArray(t.qAttrExps)?t.qAttrExps[0]:t.qAttrExps;return null==n||null===(r=n.qValues)||void 0===r?void 0:r[e]},yv=e=>{switch(e){case"topLeft":default:return{horizontal:"flex-start",vertical:"flex-start"};case"centerLeft":return{horizontal:"center",vertical:"flex-start"};case"bottomLeft":return{horizontal:"flex-end",vertical:"flex-start"};case"topCenter":return{horizontal:"flex-start",vertical:"center"};case"centerCenter":return{horizontal:"center",vertical:"center"};case"bottomCenter":return{horizontal:"flex-end",vertical:"center"};case"topRight":return{horizontal:"flex-start",vertical:"flex-end"};case"centerRight":return{horizontal:"center",vertical:"flex-end"};case"bottomRight":return{horizontal:"flex-end",vertical:"flex-end"}}};let xv=function(e){return e.Text="text",e.Link="link",e.Image="image",e}({}),Sv=function(e){return e.Attribute="attribute",e.Dimension="dimension",e}({});const Ev=({text:e,url:t,imageSize:r,imagePosition:n})=>n&&t&&!t.toLowerCase().includes("javascript:")&&bv.isSafeDataURL(t)?{type:xv.Image,url:t,text:e,imageSize:r,resolvedImagePosition:yv(n)}:{type:xv.Text,url:void 0,text:e},Cv=(e,t,r)=>{var n;const o=Array.isArray(t.qAttrExps)?t.qAttrExps[0]:t.qAttrExps,i=null==o||null===(n=o.qValues)||void 0===n?void 0:n[e];if(i){const e=Number.isNaN(+i.qNum)?void 0:`${i.qNum}`;return i.qText||e}return(null==r?void 0:r.urlPosition)===Sv.Attribute||null==r?void 0:r.urlLabel},wv=({text:e,url:t})=>{try{if(!t)throw Error("Invalid url");return{type:xv.Link,url:bv.encodeForHref(t),text:e}}catch(t){return{type:xv.Text,url:void 0,text:e}}},Rv=(e,t,r,n)=>{var o,i;const a=(e=>{switch(null==e?void 0:e.type){case"url":return xv.Link;case"image":return xv.Image;default:return xv.Text}})(t);return a!==xv.Image||!n.flags.isEnabled("CLIENT_IM_5715_LINKS_AND_IMAGES")||null!==(o=n.anything.sense)&&void 0!==o&&null!==(i=o.isUnsupportedFeature)&&void 0!==i&&i.call(o,"tableImages")?a===xv.Link&&n.flags.isEnabled("CLIENT_IM_5715_LINKS")?((e,t,r)=>{const{urlPosition:n}=null!=t?t:{};if(n===Sv.Attribute){var o;const n=Cv(null!==(o=r.url)&&void 0!==o?o:-1,e,t),i=e.qText||n||"";return wv({text:i,url:n})}if(n===Sv.Dimension){var i;const n=Cv(null!==(i=r.urlLabel)&&void 0!==i?i:-1,e,t)||e.qText;return wv({text:n,url:e.qText})}return{type:xv.Text,url:void 0,text:e.qText}})(e,t,r):{type:xv.Text,url:void 0,text:e.qText}:((e,t,r)=>{const{imageSize:n,imagePosition:o,imageSetting:i,imageLabel:a}=null!=t?t:{};if("url"===i){var s,l;const t=e.qText,i=null===(s=vv(null!==(l=r.imageUrl)&&void 0!==l?l:-1,e))||void 0===s?void 0:s.qText;return Ev({text:t,url:i,imageSize:n,imagePosition:o})}if("label"===i){var u,c,d;const t=e.qText;if(-1===r.imageLabel)return Ev({text:a||t||"",url:t,imageSize:n,imagePosition:o});const i=null!==(u=null===(c=vv(null!==(d=r.imageLabel)&&void 0!==d?d:-1,e))||void 0===c?void 0:c.qText)&&void 0!==u?u:e.qText;return Ev({text:i,url:t,imageSize:n,imagePosition:o})}return{type:xv.Text,url:void 0,text:e.qText}})(e,t,r)},Av=e=>!Number.isNaN(+e),Iv=e=>!(!e.qNum&&0!==e.qNum||!Av(e.qNum)),Lv=1e4;function Dv(e,t){return[...t].reverse().find((t=>t*e<=Lv))||Math.floor(Lv/e)}function Pv(e,t){var r,n;if(null!==(r=t.viewState)&&void 0!==r&&r.skipTotals)return{atTop:!1,atBottom:!1};const[o,i,a,s,l]=[e.qHyperCube.qDimensionInfo.length>0,e.qHyperCube.qMeasureInfo.length>0,e.qHyperCube.qGrandTotalRow.length>0,null===(n=e.totals)||void 0===n?void 0:n.show,e.totals.position];if(a&&(o&&i||!s&&!o)){if(s||"top"===l)return{atTop:!0,atBottom:!1};if(!s&&"bottom"===l)return{atTop:!1,atBottom:!0}}return{atTop:!1,atBottom:!1}}function Mv(e,t,r,n){var o,i,a;return t?0===r&&null!==(a=e.totals.label)&&void 0!==a?a:"":null!==(o=null===(i=e.qHyperCube.qGrandTotalRow[n])||void 0===i?void 0:i.qText)&&void 0!==o?o:""}function _v(e,t){const r=e.qHyperCube.qGrandTotalRow[t];return Av(null==r?void 0:r.qNum)}function Tv(e,t,r){return e&&!e.auto?{headTextAlign:e.align,totalsTextAlign:e.align,bodyTextAlign:e.align}:{headTextAlign:"N"===t||void 0===t?"right":"left",totalsTextAlign:r?"left":"right",bodyTextAlign:"auto"}}const kv=(e,t)=>"auto"!==t?t:Iv(e)?"right":"left";const Ov=e=>{const{qHyperCube:{qColumnOrder:t,qDimensionInfo:r,qMeasureInfo:n}}=e,o=r.length+n.length,i=(null==t?void 0:t.length)===o?t:Array.from(Array(o).keys()),{visibleColumnsOrder:a,visibleColumnIndexes:s}=((e,t,r)=>{const n=t.length,o=[];let i=0,a=0;return{visibleColumnsOrder:e.filter((e=>{const s=e<n,{qError:l}=s?t[e]:r[e-n],u=7005===(null==l?void 0:l.qErrorCode);return u?s?i++:a++:o[e]=s?e-i:e-n-a,!u})),visibleColumnIndexes:o}})(i,r,n);return a.map(((t,r)=>function(e,t,r,n){const{qDimensionInfo:o,qMeasureInfo:i,qEffectiveInterColumnSortOrder:a}=e.qHyperCube,s=o.length,l=t<s,u=l?o[t]:i[t-s],c=t===a[0];let d,p=0,f="",m=!1,h=-1;const{representation:g}=u;if(l){const e=u;p=e.qGroupPos,f=e.qGroupFieldDefs[p],m=e.qLocked,h=n,({qDimensionType:d}=e)}const{qFallbackTitle:b,textAlign:v,qAttrExprInfo:y,qSortIndicator:x,qReverseSort:S,qApprMaxGlyphCount:E,columnWidth:C,qLibraryId:w}=u;return{isDim:l,isLocked:m,fieldId:f,colIdx:t,qLibraryId:w,pageColIdx:r,qApprMaxGlyphCount:E,qReverseSort:S,columnWidth:C,selectionColIdx:h,isActivelySorted:c,id:wb(u),label:b,qAttrExprInfoIDs:y.map((e=>e.id)),qAttrExprInfoIndex:gb(u),sortDirection:x&&"N"!==x?x:"A",totalInfo:Mv(e,l,r,n),...!l&&{isTotalNumeric:_v(e,n)},...Tv(v,d,l),representation:g}}(e,t,r,s[t])))};const qv=(e,t)=>{var r;return!!(e.snapshotData||null!==(r=t.viewState)&&void 0!==r&&r.visibleHeight)},Nv=(e,t)=>{var r;return void 0!==(null===(r=t.viewState)||void 0===r?void 0:r.usePagination)?t.viewState.usePagination:!1!==e.usePagination||qv(e,t)};var Fv="$$material";function zv(e){const{injectFirst:t,children:r}=e;if(t&&"undefined"!=typeof window){const e=document.head;if(!e.querySelector('[data-styled="active"]')){const t=document.createElement("style");t.setAttribute("data-styled","active"),e.insertBefore(t,e.firstChild)}}return r}zv.propTypes={children:U.node,injectFirst:U.bool};const jv=Ln((e=>{const{styles:t,defaultTheme:r={}}=e;return"function"==typeof t?t(null==(n=e.theme)||0===Object.keys(n).length?r:e.theme):t;var n}));var $v=jv;
101
+ e.exports=function(e,t){if(!e||isNaN(+t))return t;var r,n,o,i,a,s,l,u,c,d,p=e.length,f=e.search(/[0-9\-\+#]/),m=f>0?e.substring(0,f):"",h=e.split("").reverse().join(""),g=h.search(/[0-9\-\+#]/),b=p-g,v=e.substring(b,b+1),y=b+("."===v||","===v?1:0),x=g>0?e.substring(y,p):"";if(r=(t="-"===(e=e.substring(f,y)).charAt(0)?-t:+t)<0?t=-t:0,o=(n=e.match(/[^\d\-\+#]/g))&&n[n.length-1]||".",i=n&&n[1]&&n[0]||",",e=e.split(o),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(u=t.split("."))[1]||u[1]&&u[1].length<=s)&&(t=(+t).toFixed(s+1)),c=e[0].split(i),e[0]=c.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;u[0].length<e[0].length-a;)u[0]="0"+u[0];else 0==+u[0]&&(u[0]="");if((t=t.split("."))[0]=u[0],l=c[1]&&c[c.length-1].length){for(h="",b=(d=t[0]).length%l,p=d.length,y=0;y<p;y++)h+=d.charAt(y),!((y-b+1)%l)&&y<p-l&&(h+=i);t[0]=h}return t[1]=e[1]&&t[1]?o+t[1]:"","0"!==(n=t.join(""))&&""!==n||(r=!1),m+(r?"-":"")+n+x}},Sg({exports:{}});var Mg={exports:{}};self,Mg.exports=(()=>{var e={229:e=>{var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},a=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var n,o=t.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!i)return!1;for(n in e);return void 0===n||t.call(e,n)},s=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,r){if("__proto__"===r){if(!t.call(e,r))return;if(o)return o(e,r).value}return e[r]};e.exports=function e(){var t,r,n,o,u,c,d=arguments[0],p=1,f=arguments.length,m=!1;for("boolean"==typeof d&&(m=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(r in t)n=l(d,r),d!==(o=l(t,r))&&(m&&o&&(a(o)||(u=i(o)))?(u?(u=!1,c=n&&i(n)?n:[]):c=n&&a(n)?n:{},s(d,{name:r,newValue:e(m,c,o)})):void 0!==o&&s(d,{name:r,newValue:o}));return d}},645:(e,t)=>{(()=>{var e={229:e=>{var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},a=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var n,o=t.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!i)return!1;for(n in e);return void 0===n||t.call(e,n)},s=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,r){if("__proto__"===r){if(!t.call(e,r))return;if(o)return o(e,r).value}return e[r]};e.exports=function e(){var t,r,n,o,u,c,d=arguments[0],p=1,f=arguments.length,m=!1;for("boolean"==typeof d&&(m=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(r in t)n=l(d,r),d!==(o=l(t,r))&&(m&&o&&(a(o)||(u=i(o)))?(u?(u=!1,c=n&&i(n)?n:[]):c=n&&a(n)?n:{},s(d,{name:r,newValue:e(m,c,o)})):void 0!==o&&s(d,{name:r,newValue:o}));return d}}},r={};function n(t){var o=r[t];if(void 0!==o)return o.exports;var i=r[t]={exports:{}};return e[t](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{n.r(o),n.d(o,{default:()=>Me});var e=n(229),t=n.n(e);const r=function(e,t,r){if(!t)return!1;var n,o=t.split("."),i=o[o.length-1],a=e;for(n=0;n<o.length-1;++n)void 0===a[o[n]]&&(a[o[n]]=Number.isNaN(+o[n+1])?{}:[]),a=a[o[n]];if(void 0!==r){var s=a[i];return a[i]=r,{updated:r,previous:s}}return delete a[i],!1},i=function(e,t,r){var n,o=t.split("."),i=e;if(void 0===i)return r;for(n=0;n<o.length;++n){if(void 0===i[o[n]])return r;i=i[o[n]]}return i},a={EXPRESSIONS:{observed:"",trend:"STL_Trend",seasonal:"STL_Seasonal",residual:"STL_Residual"},OPTIONS:[{value:"observed",translation:"cao.trendDecomposition.parameters.decomposition.observed"},{value:"trend",translation:"cao.trendDecomposition.parameters.decomposition.trend"},{value:"seasonal",translation:"cao.trendDecomposition.parameters.decomposition.seasonal"},{value:"residual",translation:"cao.trendDecomposition.parameters.decomposition.residual"}]};var s="".concat(" ","(").concat(" "),l="".concat(" ",")").concat(" ");function u(e){return s+e+l}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var r=function(e,t){if(!t)return null;var r,n;for(r=0;r<t.length;r++)if((n=t[r]).qInfo.qId===e)return n;return null}(e.qLibraryId,t.dimensionList);return r&&r.qData.info[0].qTags.indexOf("$numeric")>-1}var n=function(e,t){if(!t)return null;var r,n,o=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var r=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(r)&&(t=(t=t.substring(1,r)).trim()),t}(e);for(r=0;r<t.length;r++){if((n=t[r]).qName===o)return n;if(n.qDerivedFieldData)for(var i=0;i<n.qDerivedFieldData.qDerivedFieldLists.length;++i)for(var a=n.qDerivedFieldData.qDerivedFieldLists[i],s=0;s<a.qFieldDefs.length;++s){var l=a.qFieldDefs[s];if(l.qName===o)return l}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return n&&n.qTags.indexOf("$numeric")>-1}function d(e){return!(!e.fullAccumulation&&!e.fullRange)}function p(e,t){var r=e.crossAllDimensions;return 2===t&&r?"RowNo(Total)":"RowNo()"}function f(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e),r=t.trim();return"="===r.substring(0,1)?r.substring(1).trim():r}function m(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function h(e,t){var r=e.crossAllDimensions;return 2===t&&r?"Above(Total ":"Above("}function g(e){return void 0===e?")":", 0, ".concat(e,")")}function b(e){return"Replace(Replace(".concat(e,",'''',''''''),'$','$''&''')")}function v(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=").concat(b("MinString(".concat(t,")")),")' and Only({1}").concat(t,")<='$(=").concat(b("MaxString(".concat(t,")")),")'\"}")}function y(e){var t=e.modifier,r=void 0===t?{}:t,n=e.dimensions,o=e.dimensionAndFieldList,i=e.funcComp,a=void 0===i?"Sum":i,s=e.valueComp,l=void 0===s?"0":s;if(!r.showExcludedValues)return"";if(n&&1===n.length){var u=v(c(n[0],o),m(0));return"".concat(a,"({1<").concat(u,">}").concat(l,")")}if(n&&2===n.length){var d=c(n[0],o),p=c(n[1],o),f=m(0),h=m(1),g=v(d,f),b=v(p,h);return"".concat(a,"({1<").concat(g,",").concat(b,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function x(e){return"".concat(e,"(")}function S(e){var t=e.properties,r=e.layout;return i(t,"qHyperCubeDef.qDimensions",i(r,"qHyperCube.qDimensionInfo",[])).length}const E={isFullRange:d,getNumDimensions:S,getExpressionWithExcludedComp:function(e){var t=e.expression,r=e.modifier,n=e.dimensions,o=e.dimensionAndFieldList,i=e.treatMissingAsNull,a=u(f(t));if(!r.showExcludedValues)return a;var s=y({modifier:r,dimensions:n,dimensionAndFieldList:o}),l=i?"":", 0";if(n&&1===n.length){var c=m(0);return"If(Count(".concat(c,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(n&&2===n.length){var d=m(0),p=m(1);return"If(Count(".concat(d,") * Count(").concat(p,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:p,getNumStepComp:function(e,t){if(!d(e)){var r=e.steps;return"number"!=typeof r||Number.isNaN(r)?6:r}return p(e,t)},getAboveCompPrefix:h,getAboveCompSuffix:g,getAboveComp:function(e,t,r,n){return h(e,t)+r+g(n)},getFunctionPrefix:x,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return x(e)+t+")"},getAggrComp:function(e,t,r){return"Aggr(".concat(e,", ").concat(t,", ").concat(r,")")},getExcludedComp:y,needDimension:function(e){var t=e.modifier,r=e.properties,n=e.layout,o=function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t);return 0===o&&2===S({properties:r,layout:n})},getDimComp:function(e,t){var r=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),n=m(t);if(!r.qSortByExpression&&!r.qSortByNumeric&&!r.qSortByAscii)return n;var o=["Descending","Ascending"],i=r.qSortByNumeric?"(Numeric, ".concat(o[(r.qSortByNumeric+1)/2],")"):"",a=r.qSortByAscii?"(Text, ".concat(o[(r.qSortByAscii+1)/2],")"):"";return r.qSortByNumeric&&r.qSortByAscii?"(".concat(n,", ").concat(i,", ").concat(a,")"):r.qSortByNumeric?"(".concat(n,", ").concat(i,")"):r.qSortByAscii?"(".concat(n,", ").concat(a,")"):n},simplifyExpression:f,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var r=t.indexOf(s);if(-1!==r){var n=t.indexOf(l);if(-1!==n)return t.substring(r+s.length,n)}}},initModifier:function(e,t){Object.keys(t).forEach((function(r){void 0===e[r]&&(e[r]=t[r])}))},isNumeric:c,isApplicable:function(e){var t=e.properties,r=e.layout,n=e.minDimensions,o=void 0===n?1:n,i=e.maxDimensions,a=void 0===i?2:i;if(!t&&!r)return!0;var s=S({properties:t,layout:r});return s>=o&&s<=a},getExpressionWithMarkers:u,canExtract:function(e){var t=e.indexOf(s),r=e.indexOf(l);return t>-1&&r>-1&&t<r},getDimDefWithWrapper:m,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")},generateTSDExpression:function(e,t,r){var n=t||e.outputExpression;if(e.base&&e.base.qDef&&(n=t!==e.base.qDef?t:e.base.qDef),"observed"!==e.decomposition){var o=r.qHyperCubeDef.qMeasures.find((function(t){return t.qDef.base&&t.qDef.base.qLibraryId&&e.base&&e.base.qLibraryId?t.qDef.base.qLibraryId===e.base.qLibraryId:null}));o&&t!==o.qDef.qLabel&&(n=o.qLibraryId||o.qDef.base.qLibraryId?"[".concat(o.qDef.qLabel,"]"):o.qDef.base.qDef);var i=function(e){var t=a.OPTIONS.find((function(t){return t.value===e.decomposition}));return t?a.EXPRESSIONS[t.value]:""}(e);n=n.startsWith("=")?n.substr(1):n,n="".concat(i,"(").concat(n,", ").concat(e.steps,")")}return n},getDecomposition:function(e){var t="observed";return Object.values(a.EXPRESSIONS).find((function(r){var n=e.qDef.base.qDef.toLowerCase()||e.qDef.qDef.toLowerCase();return a.EXPRESSIONS[r]&&n.includes(a.EXPRESSIONS[r].toLowerCase())&&(t=r),r})),t}};function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}var R=t().bind(null,!0),A={},I=Array.isArray;function L(e){return null!=e&&!Array.isArray(e)&&"object"===w(e)}function D(e){return void 0===e}function P(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function M(e,t){var r,n=t.substring(1).split("/").slice(0,-1);return n.forEach((function(t,o){if(o!==n.length){r=+t;var i=Number.isNaN(r)?{}:[];e[r||t]=D(e[r||t])?i:e[t],e=e[r||t]}})),e}function _(e,t){var r=!0;if(L(e)&&L(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((function(n){_(e[n],t[n])||(r=!1)})),r);if(I(e)&&I(t)){if(e.length!==t.length)return!1;for(var n=0,o=e.length;n<o;n+=1)if(!_(e[n],t[n]))return!1;return!0}return e===t}A.generate=function(e,t,r){r=r||"";var n=[];return Object.keys(t).forEach((function(o){var i=function(e){return e?R({},{val:e}).val:e}(t[o]),a=e[o],s="".concat(r,"/").concat(o);_(i,a)||P(t,o)||(D(a)?n.push({op:"add",path:s,value:i}):L(i)&&L(a)?n=n.concat(A.generate(a,i,s)):I(i)&&I(a)?n=n.concat(function(e,t,r){var n=[],o=e.slice(),i=-1;function a(e,t,r){if(e[r]&&D(e[r].qInfo))return null;if(e[r]&&e[r].qInfo.qId===t)return r;for(var n=0,o=e.length;n<o;n+=1)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(_(t,o))return n;if(!D(t[0])&&D(t[0].qInfo))return n.push({op:"replace",path:r,value:t}),n;for(var s=o.length-1;s>=0;s-=1)-1===(i=a(t,o[s].qInfo&&o[s].qInfo.qId,s))?(n.push({op:"remove",path:"".concat(r,"/").concat(s)}),o.splice(s,1)):n=n.concat(A.generate(o[s],t[i],"".concat(r,"/").concat(s)));for(var l=0,u=t.length;l<u;l+=1)-1===(i=a(o,t[l].qInfo&&t[l].qInfo.qId))?(n.push({op:"add",path:"".concat(r,"/").concat(l),value:t[l]}),o.splice(l,0,t[l])):i!==l&&(n.push({op:"move",path:"".concat(r,"/").concat(l),from:"".concat(r,"/").concat(i)}),o.splice(l,0,o.splice(i,1)[0]));return n}(a,i,s)):n.push({op:"replace",path:"".concat(r,"/").concat(o),value:i}))})),Object.keys(e).forEach((function(o){D(t[o])&&!P(e,o)&&n.push({op:"remove",path:"".concat(r,"/").concat(o)})})),n},A.apply=function(e,t){t.forEach((function(t){var r,n,o=M(e,t.path),i=t.path.split("/").splice(-1)[0],a=i&&Number.isNaN(+i)?o[i]:o[+i]||o,s=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(o=null,a=e),"add"===t.op||"replace"===t.op)if(I(o))"-"===i&&(i=o.length),o.splice(+i,"add"===t.op?0:1,t.value);else if(I(a)&&I(t.value)){var l,u=t.value.slice();a.length=0,(l=a).push.apply(l,function(e){if(Array.isArray(e))return C(e)}(n=u)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?C(e,t):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}else if(L(a)&&L(t.value))r=a,Object.keys(r).forEach((function(e){Object.getOwnPropertyDescriptor(r,e).configurable&&!P(r,e)&&delete r[e]})),R(a,t.value);else{if(!o)throw new Error("Patchee is not an object we can patch");o[i]=t.value}else if("move"===t.op){var c=M(e,t.from);I(o)?o.splice(+i,0,c.splice(+s,1)[0]):(o[i]=c[s],delete c[s])}else"remove"===t.op&&(I(o)?o.splice(+i,1):delete o[i])}))},A.clone=function(e){return R({},e)},A.createPatch=function(e,t,r){var n={op:e.toLowerCase(),path:r};return"move"===n.op?n.from=t:void 0!==t&&(n.value=t),n},A.updateObject=function(e,t){Object.keys(e).length?A.apply(e,A.generate(e,t)):R(e,t)};const T=A,k=function(e,r,n){if(!e)return Promise.resolve();var o=T.generate(r,n);return t()(!0,r,n),o&&o.length?(o=o.map((function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}})),e.applyPatches(o,!0)):Promise.resolve()};var O="accumulation";function q(e,t){var r=i(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===O)return r[n]}function N(e,t){var r=function(e,t){var r=i(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===O)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var F={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""};const z={translationKey:"properties.modifier.accumulation",needDimension:E.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return E.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,o=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=a;void 0===l&&(l=E.getNumDimensions({properties:n,layout:o}));var u=i(n,"qHyperCubeDef.qDimensions",[]),c=E.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),d=E.getNumStepComp(r,l),p=E.getAboveComp(r,l,c,d),f=E.getRangeComp("RangeSum",p);if(E.needDimension({modifier:r,properties:n,layout:o})){var m=E.getDimComp(u,1),h=E.getDimComp(u,0),g=E.getAggrComp(f,m,h);f=r.showExcludedValues?E.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:s,valueComp:g}):g}return f},extractInputExpression:E.extractInputExpression,initModifier:function(e){E.initModifier(e,F)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!E.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(N(t,e),".accumulationDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.accumulation.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(N(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.accumulation.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(N(t,e),".fullAccumulation")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(N(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var r=q(t,e);if(r){var n=r.steps;r.steps="number"!=typeof n||Number.isNaN(n)?6:Math.abs(n)}},show:function(t){var r=q(t,e);return r&&!r.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(N(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return E.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(O))return!1;var i=q(t,e);return i&&!i.disabled}};return r}};var j="movingAverage";function $(e,t){var r=i(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===j)return r[n]}function B(e,t){var r=function(e,t){var r=i(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===j)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var H={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1};const W={translationKey:"properties.modifier.movingAverage",needDimension:E.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return E.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,r=e.expression,n=e.modifier,o=e.properties,a=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!n)return r;var u=s;void 0===u&&(u=E.getNumDimensions({properties:o,layout:a}));var c=i(o,"qHyperCubeDef.qDimensions",[]),d=n.showExcludedValues&&n.nullSuppression,p=E.getExpressionWithExcludedComp({expression:r,modifier:n,dimensions:c,dimensionAndFieldList:l,treatMissingAsNull:d}),f=E.getNumStepComp(n,u),m=E.getAboveComp(n,u,p,f);if(n.nullSuppression)t=E.getRangeComp("RangeAvg",m);else{var h=E.getRangeComp("RangeSum",m),g=function(e,t){var r=E.getRowNoComp(e,t);if(!E.isFullRange(e)){var n=e.steps,o="number"!=typeof n||Number.isNaN(n)?6:n;return"RangeMin(".concat(o,", ").concat(r,")")}return r}(n,u);t="".concat(h," / ").concat(g)}var b=t;if(E.needDimension({modifier:n,properties:o,layout:a})){var v=E.getDimComp(c,1),y=E.getDimComp(c,0),x=E.getAggrComp(b,v,y);b=n.showExcludedValues?E.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return b},extractInputExpression:E.extractInputExpression,initModifier:function(e){E.initModifier(e,H)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:function(e,t){return!E.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(B(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.movingAverage.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(B(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.movingAverage.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(B(t,e),".fullRange")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(B(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var r=$(t,e);if(r){var n=r.steps;r.steps="number"!=typeof n||Number.isNaN(n)?6:Math.abs(n)}},show:function(t){var r=$(t,e);return r&&!r.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(B(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(B(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return E.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(j))return!1;var i=$(t,e);return i&&!i.disabled}};return r}};var G="timeSeriesDecomposition";function V(e,t){var r=i(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===G)return r[n]}function U(e,t){var r=function(e,t){var r=i(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===G)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var Y={type:"timeSeriesDecomposition",disabled:!1,decomposition:"",steps:2,outputExpression:""};const K={translationKey:"properties.modifier.timeSeriesDecomposition",needDimension:E.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return E.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties;return r?E.generateTSDExpression(r,t,n):t},extractInputExpression:E.extractInputExpression,initModifier:function(e,t){E.initModifier(e,Y),""===e.decomposition&&t&&(e.decomposition=E.getDecomposition(t))},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.timeSeriesDecomposition||"properties.modifier.timeSeriesDecomposition",show:function(e,t){return!E.isApplicable({properties:t.properties})}},settings:{type:"items",items:{decomposition:{refFn:function(t){return"".concat(U(t,e),".decomposition")},type:"string",translation:t.modifierTrendDecompositionDecomposition||"properties.modifier.trendDecomposition.decomposition",component:"dropdown",schemaIgnore:!0,defaultValue:t.trendDecompositionParametersDecompositionObserved||"cao.trendDecomposition.parameters.decomposition.observed",options:a.OPTIONS},steps:{refFn:function(t){return"".concat(U(t,e),".steps")},type:"integer",translation:t.modifierTimeSeriesDecompositionPeriods||"properties.modifier.timeSeriesDecomposition.periods",schemaIgnore:!0,defaultValue:2,change:function(t,r){var n=V(t,e);if(n){var o=n.steps;n.steps="number"!=typeof o||Number.isNaN(o)?2:Math.abs(o),r.properties.qHyperCubeDef.qMeasures=r.properties.qHyperCubeDef.qMeasures.map((function(e){return e.qDef.modifiers.map((function(e){return"timeSeriesDecomposition"===e.type?e.steps=o:e.steps=e.steps,e})),e}))}},show:function(t){var r=V(t,e);return r&&!r.fullRange}}},show:function(e,t){return E.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(G))return!1;var i=V(t,e);return i&&!i.disabled}};return r}};var X="difference";function J(e,t){var r=i(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===X)return r[n]}function Z(e,t){var r=function(e,t){var r=i(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===X)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var Q={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""};const ee={translationKey:"properties.modifier.difference",needDimension:E.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return E.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:E.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,o=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=a;void 0===l&&(l=E.getNumDimensions({properties:n,layout:o}));var u=i(n,"qHyperCubeDef.qDimensions",[]),c=E.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),d=E.getAboveComp(r,l,c),p="".concat(c," - ").concat(d);if(E.needDimension({modifier:r,properties:n,layout:o})){var f=E.getDimComp(u,1),m=E.getDimComp(u,0),h=E.getAggrComp(p,f,m);p=r.showExcludedValues?E.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:s,funcComp:"Only",valueComp:h}):h}return p},initModifier:function(e){Object.keys(Q).forEach((function(t){void 0===e[t]&&(e[t]=Q[t])}))},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!E.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(Z(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.difference.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(Z(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.difference.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},showExcludedValues:{refFn:function(t){return"".concat(Z(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return E.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(X))return!1;var i=J(t,e);return i&&!i.disabled}};return r}};var te="normalization";function re(e,t){var r=i(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===te)return r[n]}function ne(e,t){var r=function(e,t){var r=i(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===te)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}function oe(e,t){for(var r=0;r<e.length;r++)if(e[r].value===t)return r;return-1}var ie={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:2,selectionScope:2};function ae(e){return 2===e?"{1}":""}function se(e,t,r){return 1===e?"{$<".concat(E.getFieldWithWrapper(t),"={'").concat(r,"'}>}"):""}function le(e,t){return 0===e&&t>1||2===e?"Total":""}function ue(e,t,r){return 0===e&&t>1?"<".concat(E.getDimDefWithWrapper(r),">"):""}const ce={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,r=e.layout;return E.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:E.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,o=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=a;void 0===l&&(l=E.getNumDimensions({properties:n,layout:o}));var u=i(n,"qHyperCubeDef.qDimensions",[]),c=E.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),d=r.selectionScope,p=r.dimensionalScope;return function(e,t,r,n,o,i,a){var s=ae(t),l=se(t,r,n),u=""===s&&""===l?"":s||l,c=le(o,i),d=ue(o,i,a),p=function(e){for(var t=[],r=0;r<e;r++)t[r]=E.getDimDefWithWrapper(r);return t.join(", ")}(i);return"".concat(e,"/ Sum(").concat(u," ").concat(c).concat(d," Aggr(").concat(u," ").concat(e,", ").concat(p,"))")}(c,d,r.field,r.value,p,l,r.primaryDimension)},initModifier:function(e){Object.keys(ie).forEach((function(t){void 0===e[t]&&(e[t]=ie[t])}))},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!E.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(ne(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,options:function(r){return function(e,t,r){var n=[{value:0,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:1,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:2,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return n=function(e,t,r){if(1===e){var n=oe(t,0);t.splice(n,1)}return t}(re(e,r).dimensionalScope,n),n}(r,t,e)}},field:{refFn:function(t){return"".concat(ne(t,e),".field")},type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:function(e,t,r){return r.app.getFieldList().then((function(e){return e.map((function(e){return{label:e.qName,value:e.qName}}))}))},show:function(t){return 1===re(t,e).selectionScope}},value:{refFn:function(t){return"".concat(ne(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return 1===re(t,e).selectionScope}},dimensionalScope:{refFn:function(t){return"".concat(ne(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,supportTooltip:!0,options:function(r,n){return function(e,t,r,n){var o=t.layout.qHyperCube.qDimensionInfo.length,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.".concat(2===o?"respectAllDimensions":"respectDimension"),tooltipTranslation:r.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===o?"respectAllDimensions":"respectDimension",".tooltip")},{value:2,translation:r.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===o?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:r.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===o?"disregardAllDimensions":"disregardDimension",".tooltip")}];return i=function(e,t,r){if(e<2){var n=oe(t,0);t.splice(n,1)}return t}(o,i),i=function(e,t,r){if(0===e){var n=oe(t,1);t.splice(n,1)}return t}(re(e,n).selectionScope,i),i}(r,n,t,e)}},primaryDimension:{refFn:function(t){return"".concat(ne(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.normalization.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(t,r){return 0===(re(t,e).dimensionalScope||0)&&r.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return E.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(te))return!1;var i=re(t,e);return i&&!i.disabled}};return r},getDisregardSelectionComp:ae,getFieldSelectionComp:se,getTotalComp:le,getSelectedDimComp:ue};var de="qDef.base",pe="qDef.qDef",fe="qDef.base.qDef",me="qLibraryId",he="qDef.base.qLibraryId";const ge={getExpression:function(e){var t=i(e,fe);return void 0!==t?t:i(e,pe)},getExpressionRef:function(e){return void 0!==i(e,fe)?fe:pe},getLibraryIdRef:function(e){return i(e,he)?he:me},getLibraryId:function(e){return i(e,he)||i(e,me)},getLabelRef:function(e){return i(e,de)?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return i(e,de)?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}};var be="qDef.qDef",ve="qDef.base.qDef",ye="qLibraryId",xe="qDef.base.qLibraryId",Se="qDef.qLabel",Ee="qDef.qLabelExpression",Ce="qDef.base.qLabel",we="qDef.base.qLabelExpression",Re="qDef.qAggrFunc",Ae="qDef.base.qAggrFunc",Ie={initBase:function(e,t){(t||Ie.isValid(e))&&(r(e,ve,i(e,be)),r(e,xe,i(e,ye)),r(e,Ce,i(e,Se)),r(e,we,i(e,Ee)))},restoreBase:function(e){Ie.isValid(e)&&(r(e,be,i(e,ve)),r(e,ye,i(e,xe)),r(e,Se,i(e,Ce)),r(e,Ee,i(e,we)),i(e,Re)&&i(e,Ae)&&r(e,Re,i(e,Ae)),delete e.qDef.base)},isValid:function(e){var t=i(e,ve),r=i(e,xe);return void 0!==t||void 0!==r}};const Le=Ie;function De(e){return De="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},De(e)}var Pe={accumulation:z,movingAverage:W,difference:ee,normalization:ce,timeSeriesDecomposition:K};const Me={modifiers:Pe,apply:Te,applyModifiers:ke,cleanUpMeasure:Oe,destroy:function(e){e&&_e[e.id]&&_e[e.id].masterItemSubscriber&&(_e[e.id].masterItemSubscriber&&_e[e.id].masterItemSubscriber.unsubscribe(),delete _e[e.id])},hasActiveModifiers:qe,getActiveModifier:Ne,initBase:Le.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some((function(e){return Pe[e]}))},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some((function(e){return Pe[e]&&Pe[e].isApplicable({properties:r,layout:n})}))},measureBase:ge,limitedSorting:function(e){var t=e.measures,r=e.properties,n=e.layout,o=!1,i=!1;return t.forEach((function(e){var t=je(e);Ue({modifiers:t,properties:r,layout:n})&&(o=!0,i=i||Ze({modifiers:t,properties:r,layout:n}))})),o&&!i},ifEnableTotalsFunction:Fe};var _e={};function Te(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.model,n=e.properties,o=e.isSnapshot,a=void 0!==o&&o,s=e.masterItem,l=!1;_e[r.id]=_e[r.id]||{isFirstTime:!0};var u=_e[r.id].isFirstTime;if(_e[r.id].isFirstTime=!1,n&&"object"===De(n))return ke({model:r,properties:n});var c=r?r.layout:void 0,d=i(c,"qSelectionInfo.qInSelections");if(a||d)return Promise.resolve(l);var p=i(c,"qHyperCube.qMeasureInfo"),f=_e[r.id].lastReloadTime;if(_e[r.id].lastReloadTime=i(r,"app.layout.qLastReloadTime"),qe({measures:p,layout:c})){var m=function(e){var t=e.measures,r=e.layout,n=e.lastReloadTime;return i(e.model,"app.layout.qLastReloadTime")!==n&&function(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ve({measure:e,properties:r,layout:n})}))}({measures:t,layout:r})}({measures:p,layout:c,model:r,lastReloadTime:f});return m||function(e){var t=e.measures,r=e.layout,n=e.masterItem,o=e.isFirstTime;return!!Array.isArray(t)&&(o||n||t.some((function(e){return function(e){var t=e.measure,r=e.layout;return Ue({modifiers:je(t),layout:r})?!t.base:!!t.base}({measure:e,layout:r})})))}({measures:p,layout:c,masterItem:s,isFirstTime:u})?r.getEffectiveProperties().then((function(e){var n=t()(!0,{},e);Be(n);var o=Qe(n);return Ye({model:r}).then((function(t){return Ke({libraryIds:o,model:r}).then((function(o){return m&&function(e){var t=e.properties;ze(t).forEach((function(e){return function(e){var t=e.measure;if(Ve({measure:t,properties:e.properties})){var r=0,n=t.qDef.modifiers;Array.isArray(n)&&n.forEach((function(e){if("object"===De(e)&&!e.disabled){if(r++,"object"!==De(Pe[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(r>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var n=Pe[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==n&&We(t)&&E.simplifyExpression(t.qDef.base.qDef)!==E.simplifyExpression(n)&&(t.qDef.base.qDef=n)}}))}}({measure:e,properties:t})}))}({properties:n}),ke({model:r,oldProperties:e,properties:n,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:o,dimensionAndFieldList:t})}))}))})):Promise.resolve(l)}return function(e){return!!Array.isArray(e)&&e.some((function(e){return"object"===De(e.base)}))}(p)?r.getEffectiveProperties().then((function(e){return function(e){var r=e.model,n=e.properties,o=Qe(n);return et({model:r,libraryIds:o}).then((function(){var e=t()(!0,{},n);return ze(n).forEach((function(e){return Oe(e)})),Je({oldProperties:e,newProperties:n,model:r})}))}({model:r,properties:e})})):Promise.resolve(l)}function ke(e){var r=e.model,n=e.oldProperties,o=e.properties,a=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,u=e.masterItem,c=e.libraryItemsProps,d=e.dimensionAndFieldList;void 0===n&&(n=l?t()(!0,{},o):o),Be(o);var p=Qe(o);return et({model:r,libraryIds:p,masterItem:u}).then((function(){return function(e){var r=e.measures,n=e.properties,o=e.model,a=e.libraryItemsProps,s=e.dimensionAndFieldList;if(r||(r=ze(n)),!r.length)return Promise.resolve();if(!qe({measures:r,properties:n}))return r.forEach((function(e){return Oe(e)})),Promise.resolve();var l=a?void 0:Qe(n);return Ye({model:o,dimensionAndFieldList:s}).then((function(e){return Ke({libraryIds:l,model:o,libraryItemsProps:a}).then((function(o){r.forEach((function(r){Ue({modifiers:r.qDef.modifiers,properties:n})?(function(e){var r=e.measure,n=e.properties,o=e.libraryItemsProps,a=e.dimensionAndFieldList,s=0;Le.isValid(r)||Le.initBase(r,!0);var l=r.qDef,u=l.modifiers,c=l.base;Array.isArray(u)&&u.forEach((function(e){if("object"===De(e)&&!e.disabled){if(s++,"object"!==De(Pe[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(s>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");Pe[e.type].initModifier(e,r);var l=r.qLibraryId||c&&c.qLibraryId;l?function(e){var r=e.measure,n=e.modifier,o=e.properties,i=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=""===s?s:Pe[n.type].generateExpression({expression:s,modifier:n,properties:o,dimensionAndFieldList:i});n.outputExpression=l,r.qDef.qDef=n.outputExpression,(r.qDef.qLabel||a.qMeasure.qLabel)&&(r.qDef.qLabel=a.qMeasure.qLabel),(r.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(r.qDef.qLabelExpression=a.qMeasure.qLabelExpression),r.qDef.quarantine&&r.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(r.qDef.qNumFormat=a.qMeasure.qNumFormat,r.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete r.qLibraryId,r.qDef.coloring=a.qMeasure.coloring,n.base=t()(!0,{},r.qDef.base)}({measure:r,modifier:e,libraryId:l,properties:n,libraryItemsProps:o,dimensionAndFieldList:a}):function(e){var r=e.measure,n=e.modifier,o=e.properties,i=e.dimensionAndFieldList;"function"==typeof Pe[n.type].updateModifier&&Pe[n.type].updateModifier(n,o.qHyperCubeDef);var a=ge.getExpression(r),s=""===a?a:Pe[n.type].generateExpression({expression:a,modifier:n,properties:o,dimensionAndFieldList:i});n.outputExpression=s,r.qDef.qDef=n.outputExpression,r.qDef.base.qLabelExpression?r.qDef.qLabelExpression=r.qDef.base.qLabelExpression:r.qDef.qLabel=r.qDef.base.qLabel||a,n.base=t()(!0,{},r.qDef.base)}({measure:r,modifier:e,properties:n,dimensionAndFieldList:a}),function(e){var t=i(e,"qDef.qAggrFunc");"Expr"!==t||Fe(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&Fe(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(r)}}))}({measure:r,properties:n,libraryItemsProps:o,dimensionAndFieldList:e}),He(r)):Oe(r)}))}))}))}({measures:a,properties:o,model:r,libraryItemsProps:c,dimensionAndFieldList:d}).then((function(){return l?Je({oldProperties:n,newProperties:o,model:r}):Promise.resolve(!1)}))}))}function Oe(e){!function(e){var t=je(e);return Array.isArray(t)&&t.some((function(e){return"object"===De(e)&&!e.disabled&&!Pe[e.type]}))}(e)?Le.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,He(e)}function qe(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ue({modifiers:je(e),properties:r,layout:n})}))}function Ne(e){var t=je(e);if(Array.isArray(t))for(var r=0;r<t.length;r++){var n=t[r];if(Pe[n.type]&&!n.disabled)return n}}function Fe(e){var t=Ne(e);return!t||Pe[t.type].enableTotalsFunction(e)}function ze(e){return i(e,"qHyperCubeDef.qMeasures",[]).concat(i(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function je(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function $e(e){return i(e,"outputExpression.qValueExpression.qExpr")||i(e,"outputExpression")}function Be(e){ze(e).forEach((function(e){return function(e){var r=Ne(e);r&&(void 0!==r.outputExpression&&$e(r)!==e.qDef.qDef?delete e.qDef.base:!Le.isValid(e)&&r.base&&(e.qDef.base=t()(!0,{},r.base)))}(e)}))}function He(e){var t=je(e);Array.isArray(t)&&t.forEach((function(t){"object"===De(t)&&(t.disabled||!Pe[t.type]&&$e(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)}))}function We(e){return e.base||e.qDef&&e.qDef.base}function Ge(e){var t=We(e);return e.qLibraryId||t&&t.qLibraryId}function Ve(e){var t=e.measure,r=e.properties,n=e.layout;return!Ge(t)&&Ue({modifiers:je(t),properties:r,layout:n})}function Ue(e){var t=e.modifiers,r=e.properties,n=e.layout,o={};return Array.isArray(t)&&t.some((function(e){return!("object"!==De(e)||e.disabled||!Pe[e.type])&&(void 0===o[e.type]&&(o[e.type]=Pe[e.type].isApplicable({properties:r,layout:n})),o[e.type])}))}function Ye(e){var t=e.model,r=e.dimensionAndFieldList;if(r)return Promise.resolve(r);var n=[],o={},i=t.app.getDimensionList().then((function(e){o.dimensionList=e}));n.push(i);var a=t.app.getFieldList().then((function(e){o.fieldList=e}));return n.push(a),Promise.all(n).then((function(){return o}))}function Ke(e){var t=e.libraryIds,r=e.model,n=e.libraryItemsProps;if(n)return Promise.resolve(n);var o=t.measureLibraryIds,i=t.dimensionLibraryIds,a={},s=[];return o.forEach((function(e){var t=r.app.getMeasure(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),i.forEach((function(e){var t=r.app.getDimension(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),Promise.all(s).then((function(){return a}))}function Xe(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Je(e){var t=e.oldProperties,r=e.newProperties,n=e.model,o=JSON.stringify(i(t,"qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(i(r,"qHyperCubeDef.qMeasures"),Xe)||JSON.stringify(i(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(i(r,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe);return o?function(e){var t=e.model,r=e.oldProperties,n=e.newProperties,o=t.layout;return o&&!o.qHasSoftPatches&&!o.qExtendsId&&i(o,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(n):k(t,r,n)}({model:n,oldProperties:t,newProperties:r}).then((function(){return o})):Promise.resolve(o)}function Ze(e){var t=e.modifiers,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some((function(e){return"object"===De(e)&&!e.disabled&&Pe[e.type]&&Pe[e.type].needDimension({modifier:e,properties:r,layout:n})}))}function Qe(e){var t=ze(e),r=[],n=[],o=!1;return t.forEach((function(t){var n=je(t);if(Ue({modifiers:n,properties:e})){var i=Ge(t);i&&r.push(i),o=o||Ze({modifiers:n,properties:e})}})),i(e,"qHyperCubeDef.qDimensions",[]).forEach((function(e){var t=e.qLibraryId;t&&n.push(t)})),{measureLibraryIds:r,dimensionLibraryIds:n}}function et(e){var t=e.model,r=e.libraryIds;return!e.masterItem&&r&&(r.measureLibraryIds.length||r.dimensionLibraryIds.length)?(_e[t.id].masterItemSubscriber=_e[t.id].masterItemSubscriber||function(e){var t=e.model,r=e.callback,n={},o={},a={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},r=i(e,"qInfo.qType");return r&&s[r]&&s[r].forEach((function(r){t[r]=i(e,r)})),JSON.stringify(t)}function u(e){var t=e.qInfo.qId;if(n[t]){var o=l(e);n[t].properties!==o&&(n[t].properties=o,"function"==typeof r&&n[t].enabled&&r(e)),n[t].enabled=!0}}function c(e,r){return t.app[r](e).then((function(t){n[e]={listener:t.layoutSubscribe(u),enabled:!1,properties:l(t.layout)}}))}return{subscribe:function(e){var r=e.measureLibraryIds,i=e.dimensionLibraryIds,s=[];return function(e){var t=e.dimensionLibraryIds;o={},e.measureLibraryIds.forEach((function(e){o[e]=!0})),a={},t.forEach((function(e){a[e]=!0}))}({measureLibraryIds:r,dimensionLibraryIds:i}),Object.keys(n).forEach((function(e){o[e]||a[e]||(n[e].listener.dispose(),delete n[e])})),t.app&&(Object.keys(o).forEach((function(e){o[e]&&!n[e]&&s.push(c(e,"getMeasure"))})),Object.keys(a).forEach((function(e){a[e]&&!n[e]&&s.push(c(e,"getDimension"))}))),Promise.all(s)},unsubscribe:function(){Object.keys(n).forEach((function(e){n[e].listener.dispose()})),n={}}}}({model:t,callback:function(e){return Te({model:t,masterItem:e}).then((function(){return t.app.clearUndoBuffer()}))}}),_e[t.id].masterItemSubscriber.subscribe(r)):Promise.resolve()}})(),t.default=o.default,Object.defineProperty(t,"__esModule",{value:!0})})()}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var n={};return(()=>{function e(t){var r,n=t;return n>9?(r=65+n-10)>90&&(r+=6):n="".concat(n).charCodeAt(0),[48,111,79,105,73,108].indexOf(r)>-1?e(n+1):String.fromCharCode(r)}function t(r){var n=e(r%62),o=Math.floor(r/62);return o>0?t(o)+n:n}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}r.d(n,{default:()=>Be});const i={getValue:function(e,t,r){if(null==e||null==t)return r;for(var n=t.split("."),o=e,i=0;i<n.length;++i){var a=n[i];if(""!==a){if(void 0===o[a]||null===o[a])return r;o=o[a]}}return o},setValue:function(e,t,r){if(null!=e&&null!=t){for(var n=t.split("."),o=n[n.length-1],i=e,a=0;a<n.length-1;++a){var s=n[a];void 0!==i[s]&&null!==i[s]||(i[s]=Number.isNaN(+n[a+1])?{}:[]),i=i[s]}void 0!==r?i[o]=r:delete i[o]}},isEmpty:function(e){return 0===Object.keys(e).length&&e.constructor===Object},isAtomicValue:function(e){return/boolean|number|string/.test(o(e))},generateId:function(){return t(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function a(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function l(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t,r){if(e){for(var n=0;n<e.length;n++)if(e[n][t]===r)return n;return-1}return-1}const d={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;var r=e.indexOf(t[0]);if(-1!==r){for(var n=0;n<t.length;n++){var o=e.indexOf(t[n]);if(r>o)return!1;r=o}return!0}return!1},indexAdded:function(e,t){var r;for(r=0;r<e.length;++r)e[r]>=0&&e[r]>=t&&++e[r];e.push(t)},indexRemoved:function(e,t){var r,n=0;for(r=0;r<e.length;++r)e[r]>t?--e[r]:e[r]===t&&(n=r);return e.splice(n,1),n},findItemByPropertyValue:function(e,t,r){if(e){for(var n=0;n<e.length;n++)if(e[n][t]===r)return e[n];return null}return null},findIndexByPropertyValue:c};var p=r(645),f=r.n(p);const m=function(e){var t,r=e.exportFormat,n=e.qHyperCubeDef,o=r.data[0];(t=o.dimensions).push.apply(t,a(n.qDimensions));var s,l=i.getValue(n,"qLayoutExclude.qHyperCubeDef.qDimensions");l&&(s=o.excludedDimensions).push.apply(s,a(l))},h=function(e){var t,r=e.exportFormat,n=e.qHyperCubeDef,o=r.data[0];(t=o.measures).push.apply(t,l(n.qMeasures));var a,s=i.getValue(n,"qLayoutExclude.qHyperCubeDef.qMeasures");s&&(a=o.excludedMeasures).push.apply(a,l(s))},g=function(e){var t=e.exportFormat,r=e.qHyperCubeDef,n=t.data[0];r.qInterColumnSortOrder||(r.qInterColumnSortOrder=[]),n.interColumnSortOrder=r.qInterColumnSortOrder.concat();var o=i.getValue(r,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");o&&d.isOrderedSubset(o,n.interColumnSortOrder)&&(n.interColumnSortOrder=o.concat())},b=function(e){var t=e.exportFormat,r=e.properties;Object.keys(r).forEach((function(e){t.properties[e]=r[e]}))},v=function(e){var t=e.exportFormat,r=e.properties;r.qLayoutExclude||(r.qLayoutExclude={}),r.qLayoutExclude.disabled&&(Object.keys(r.qLayoutExclude.disabled).forEach((function(e){t.properties.hasOwnProperty(e)||(t.properties[e]=r.qLayoutExclude.disabled[e])})),delete r.qLayoutExclude.disabled),r.qLayoutExclude.changed&&(function(e){Object.keys(e.qLayoutExclude.changed).forEach((function(t){e.qLayoutExclude.changed[t].to===i.getValue(e,t)&&i.setValue(e,t,e.qLayoutExclude.changed[t].from)}))}(r),delete r.qLayoutExclude.changed),r.qLayoutExclude.quarantine&&!i.isEmpty(r.qLayoutExclude.quarantine)||delete r.qLayoutExclude},y=function(e){e.forEach((function(e){f().cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)}))};function x(e,t,r){var n,o,a=i.getValue(e,t);if(!i.isAtomicValue(a))try{if((o=(o=(n=JSON.stringify(a)).match(/:\{/g))?o.length:0)>2)return;a=JSON.parse(n)}catch(e){return}i.getValue(e,"qLayoutExclude.quarantine")||i.setValue(e,"qLayoutExclude.quarantine",{});var s=i.getValue(e,"qLayoutExclude.quarantine");s[r]||(s[r]={}),s[r][t]=a}var S=r(229),E=r.n(S);function C(e,t){var r=E()(!0,{},t,e);return i.getValue(r,"qOtherTotalSpec.qOtherCounted")||i.setValue(r,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),i.getValue(r,"qOtherTotalSpec.qOtherLimit")||i.setValue(r,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),r.hasOwnProperty("othersLabel")||(r.othersLabel="Others"),r}function w(e,t){return E()(!0,{},t,e)}function R(e,t,r){return"function"==typeof e?e(t):Number.isNaN(+e)?r:e}var A=Math.pow(2,53)-1;function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function L(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}const D=function(e,t,r){var n="masterobject"===i.getValue(t,"properties.qInfo.qType")?"masterobject":i.getValue(r,"qInfo.qType");i.setValue(e,"qInfo.qType",n),e.visualization=r.visualization},P=function(e,t,r){t.hasOwnProperty(e)&&(r[e]=t[e])},M=function(e,t,r,n){t.hasOwnProperty(e)?r[e]=t[e]:r[e]=n},_=function(){return{qDef:{autoSort:!0,cId:"",othersLabel:"Others"},qLibraryId:"",qNullSuppression:!1,qOtherLabel:"Others",qOtherTotalSpec:{qOtherLimitMode:"OTHER_GE_LIMIT",qOtherMode:"OTHER_OFF",qOtherSortMode:"OTHER_SORT_DESCENDING",qSuppressOther:!1}}},T=function(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}},k=function(e){var t,r=e.exportFormat,n=e.maxDimensions,o=e.minDimensions,i=e.newHyperCubeDef,a=e.defaultDimension,s=r.data[0];for(t=0;t<s.dimensions.length;++t){var l=C(s.dimensions[t],a);i.qDimensions.length<n?i.qDimensions.push(l):i.qLayoutExclude.qHyperCubeDef.qDimensions.push(l)}for(t=0;t<s.excludedDimensions.length;++t){var u=C(s.excludedDimensions[t],a);i.qDimensions.length<o?i.qDimensions.push(u):i.qLayoutExclude.qHyperCubeDef.qDimensions.push(u)}},O=function(e){var t,r=e.exportFormat,n=e.maxMeasures,o=e.minMeasures,i=e.newHyperCubeDef,a=e.defaultMeasure,s=r.data[0];for(t=0;t<s.measures.length;++t){var l=w(s.measures[t],a);i.qMeasures.length<n?i.qMeasures.push(l):i.qLayoutExclude.qHyperCubeDef.qMeasures.push(l)}for(t=0;t<s.excludedMeasures.length;++t){var u=w(s.excludedMeasures[t],a);i.qMeasures.length<o?i.qMeasures.push(u):i.qLayoutExclude.qHyperCubeDef.qMeasures.push(u)}},q=function(e){var t=e.exportFormat,r=e.dataDefinition,n=void 0===r?{}:r,o=t.data[0],i=n.dimensions||{max:0},a=n.measures||{max:0},s=R(a.max,o.dimensions.length,A),l=R(a.min,o.dimensions.length,0);return{maxDimensions:R(i.max,s,A),minDimensions:R(i.min,l,0),maxMeasures:s,minMeasures:l}},N=function(e){var t=e.exportFormat,r=e.newHyperCubeDef,n=t.data[0],o=r.qDimensions.length+r.qMeasures.length;r.qInterColumnSortOrder=n.interColumnSortOrder.concat();var i=r.qInterColumnSortOrder.length;if(i!==o)for(r.qLayoutExclude&&(r.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=n.interColumnSortOrder.concat());i!==o;)i<o?(d.indexAdded(r.qInterColumnSortOrder,i),++i):(--i,d.indexRemoved(r.qInterColumnSortOrder,i))},F=function(e){var t=e.exportFormat,r=e.initialProperties,n=e.hypercubePath,o={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach((function(e){"qLayoutExclude"===e?t.properties[e].quarantine&&(o.qLayoutExclude.quarantine=E()(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&n?i.setValue(o,"".concat(n,".qHyperCubeDef"),t.properties.qHyperCubeDef):r.hasOwnProperty(e)||-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)||function(e,t){return"components"===t&&Array.isArray(e[t])&&e[t].some((function(e){return"general"===e.key}))}(t.properties,e)?o[e]=t.properties[e]:o.qLayoutExclude.disabled[e]=t.properties[e]})),null===(o=E()(!0,{},r,o)).components&&(o.components=[]),o},z=function(e){var t=e.exportFormat,r=e.maxDimensions,n=e.minDimensions,o=e.maxMeasures,i=e.minMeasures,a=t.data[0];return a.dimensions.length>r&&r>0||a.measures.length>o&&o>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>n||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>i||!o&&a.measures.length>0||!r&&a.dimensions.length>0},j=function(e){var t=e.exportFormat,r=e.maxDimensions,n=e.minDimensions,o=e.maxMeasures,i=e.minMeasures,a=e.newHyperCubeDef,s=t.data[0];a.qLayoutExclude||(a.qLayoutExclude={}),a.qLayoutExclude.qHyperCubeDef||(a.qLayoutExclude.qHyperCubeDef={}),(s.dimensions.length>r&&r>0||s.excludedDimensions&&s.excludedDimensions.length&&s.dimensions.length+s.excludedDimensions.length>n)&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(s.measures.length>o&&o>0||s.excludedMeasures&&s.excludedMeasures.length&&s.measures.length+s.excludedMeasures.length>i)&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!o&&s.measures.length&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!r&&s.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))},$=function(e){var t,r=e.newProperties,n=e.dataDefinition,o=e.hypercubePath;if(n.dimensions&&"function"==typeof n.dimensions.added){var a=i.getValue(r,o||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return I(e)}(t=a.qDimensions)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return I(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?I(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();a.qDimensions=[],s.forEach((function(e){a.qDimensions.push(e),n.dimensions.added(e,r)}))}},B=function(e){var t,r=e.newProperties,n=e.dataDefinition,o=e.hypercubePath;if(n.measures&&"function"==typeof n.measures.added){var a=i.getValue(r,o||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return L(e)}(t=a.qMeasures)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return L(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?L(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();a.qMeasures=[],s.forEach((function(e){a.qMeasures.push(e),n.measures.added(e,r)}))}},H=function(e){var t=e.measures,r=e.modifierTypes;t&&r&&f().isSupportedModifiers(r)&&t.forEach((function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store}))};function W(e,t){var r=i.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!r&&(Object.keys(r).forEach((function(t){i.setValue(e,t,r[t])})),delete e.qLayoutExclude.quarantine[t],!0)}const G={exportProperties:function(e){var t=e.propertyTree,r=e.hypercubePath,n=e.viewDataMode,o=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t={data:[],properties:{}},r=0;r<e;++r)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}(),a=t.qProperty,s=i.getValue(a,r||""),l=s.qHyperCubeDef;return l.qInterColumnSortOrder||(l.qInterColumnSortOrder=[]),m({exportFormat:o,qHyperCubeDef:l}),h({exportFormat:o,qHyperCubeDef:l}),g({exportFormat:o,qHyperCubeDef:l}),delete l.qLayoutExclude,b({exportFormat:o,properties:a}),r&&(o.properties.qHyperCubeDef=l,delete s.qHyperCubeDef),v({exportFormat:o,properties:a}),n||y(o.properties.qHyperCubeDef.qMeasures),Array.isArray(o.properties.filters)&&(x(o.properties,"filters","storedFilters"),delete o.properties.filters),o.properties.qHyperCubeDef.qContextSetExpression&&(x(o.properties,"qHyperCubeDef.qContextSetExpression","storedFilters"),o.properties.qHyperCubeDef.qContextSetExpression=""),o.properties.qHyperCubeDef.qDynamicScript&&o.properties.qHyperCubeDef.qDynamicScript.length&&(x(o.properties,"qHyperCubeDef.qDynamicScript","dynamicScript"),o.properties.qHyperCubeDef.qDynamicScript=[]),o},importProperties:function(e){var t=e.exportFormat,r=e.initialProperties,n=void 0===r?{}:r,o=e.dataDefinition,a=void 0===o?{}:o,s=e.defaultPropertyValues,l=void 0===s?{}:s,u=e.hypercubePath,c=e.extension,d=e.supportedFilters,p=void 0===d||d,f=e.isHCModifierSupported,m=void 0===f||f,h={qChildren:[]},g=F({exportFormat:t,initialProperties:n,hypercubePath:u}),b=i.getValue(n,u||"").qHyperCubeDef,v=i.getValue(g,u||"").qHyperCubeDef,y=q({exportFormat:t,dataDefinition:a}),x=y.maxDimensions,S=y.minDimensions,E=y.maxMeasures,C=y.minMeasures,w=l.defaultDimension,R=void 0===w?_():w,A=l.defaultMeasure,I=void 0===A?T():A;v.qDimensions.length=0,v.qMeasures.length=0,z({exportFormat:t,maxDimensions:x,minDimensions:S,maxMeasures:E,minMeasures:C})&&j({exportFormat:t,maxDimensions:x,minDimensions:S,maxMeasures:E,minMeasures:C,newHyperCubeDef:v}),k({exportFormat:t,maxDimensions:x,minDimensions:S,newHyperCubeDef:v,defaultDimension:R}),O({exportFormat:t,maxMeasures:E,minMeasures:C,newHyperCubeDef:v,defaultMeasure:I}),$({newProperties:g,dataDefinition:a,hypercubePath:u}),B({newProperties:g,dataDefinition:a,hypercubePath:u}),N({exportFormat:t,newHyperCubeDef:v}),P("qMaxStackedCells",b,v),P("qNoOfLeftDims",b,v),M("qInitialDataFetch",b,v,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),M("qMode",b,v,"S"),M("qReductionMode",b,v,"N"),M("qSortbyYValue",b,v),M("qIndentMode",b,v),M("qShowTotalsAbove",b,v),D(g,t,n),h.qProperty=g;var L=i.getValue(c||{},"support.modifiers");return H({measures:v.qMeasures,modifierTypes:L}),p&&W(h.qProperty,"storedFilters"),"S"===v.qMode&&m&&W(h.qProperty,"dynamicScript"),h}};var V={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function U(e,t,r,n){t=t||[];var o=c(e,n,r),i=c(t,n,r);if(-1!==o&&-1===i){var a=e.splice(o,1);t.push(a[0])}return t}function Y(e,t){return e.length!==t}const K={create:function(e,t){if(!e||!V[e])throw new Error("Attribute Expressions Util: ID required");var r={};return t&&Object.keys(t).forEach((function(e){r[e]=t[e]})),r.id=e,r.qAttribute=!0,r},moveByIdFromGroup:function(e,t,r,n,o){r=r||"qAttributeExpressions",o=o||"id";for(var i=0;i<e.length;i++){var a=e[i][r],s=t.length;if(U(a,t,n,o),Y(t,s))return t}return t},IDMAP:{CELL_BACKGROUND_COLOR:"cellBackgroundColor",CELL_FOREGROUND_COLOR:"cellForegroundColor",COLOR_BY_ALTERNATIVE:"colorByAlternative",COLOR_BY_EXPRESSION:"colorByExpression",TOOLTIP:"tooltip",CELL_LINK_LABEL:"urlLabel",CELL_LINK_URL:"url"}},X={getNumDimensions:function(e){return i.getValue(e,"qHyperCubeDef.qDimensions.length",0)},getNumMeasures:function(e){return i.getValue(e,"qHyperCubeDef.qMeasures.length",0)},wrapFieldName:function(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e},getItemLabel:function(e){return e.label||e.name}},J={colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>0&&X.getNumMeasures(e)<=1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)>0},expression:function(e){return X.getNumMeasures(e)>=1}}},Z={colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumMeasures(e)>=1}}};var Q={scatterplot:Z,"sn-scatter-plot":Z,piechart:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumMeasures(e)>=1}}},linechart:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)<=1},expression:function(e){return X.getNumMeasures(e)>=1}}},map:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>=1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)>=1},expression:function(e){return X.getNumDimensions(e)>=1}}},distributionplot:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumDimensions(e)>=1}}}};function ee(e,t,r){if(Array.isArray(e[t])){var n=d.findIndexByPropertyValue(e[t],"id",r);n>=0&&e[t].splice(n,1)}else e[t]=[]}function te(e,t){var r=K.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach((function(e){ee(e,"qAttributeDimensions",r),ee(e,"qAttributeExpressions",r)})),t.forEach((function(e){ee(e,"qAttributeDimensions",r),ee(e,"qAttributeExpressions",r)}))}function re(e,t){if(t){var r="="===t.charAt(0);e.color.altLabel=r?{qStringExpression:{qExpr:t.substr(1)}}:t}}function ne(e){var t=e.properties,r=e.isDimension,n=e.dimensions,o=e.excludedDimensions,a=e.measures,s=e.label;te(n,o);var l=n[n.length-1];if(l){var u=r?i.getValue(t,"color.byDimDef"):i.getValue(t,"color.byMeasureDef"),c=i.getValue(t,"color.formatting.qNumFormat"),p=i.getValue(t,"color.formatting.isCustomFormatted");if(u){var f=K.create(K.IDMAP.COLOR_BY_ALTERNATIVE);switch(u.type){case"expression":!function(e){var t=e.attributeExpression,r=e.label,n=e.item,o=e.isDimension,i=e.qNumFormat,a=e.isCustomFormatted;t.label=r||n.label,o?t.qDef=n.key:(t.qExpression=n.key,i&&(t.qNumFormat=i,t.isCustomFormatted=a)),t.matchMeasure=n.activeMeasureIndex,t.label&&"="===t.label.charAt(0)&&(t.labelExpRef="color.altLabel")}({attributeExpression:f,label:s,item:u,isDimension:r,qNumFormat:c,isCustomFormatted:p});break;case"libraryItem":!function(e){var t=e.attributeExpression,r=e.measures,n=e.item,o=e.qNumFormat,i=e.isCustomFormatted;e.isDimension||(t.matchMeasure=d.findIndexByPropertyValue(r,"qLibraryId",n.key),o&&(t.qNumFormat=o,t.isCustomFormatted=i)),void 0!==n.expression?t.qExpression=n.expression:t.qLibraryId=n.key,t.colorMapRef=n.key}({attributeExpression:f,measures:a,item:u,isDimension:r,qNumFormat:c,isCustomFormatted:p})}r?(f.qSortBy={qSortByAscii:1},l.qAttributeDimensions.push(f)):l.qAttributeExpressions.push(f)}}}function oe(e,t,r,n){var o,i,a,s={};switch(e){case"dimension":r.qLibraryId?(s.type="dimension",s.name=r.qLibraryId,s.id=r.qLibraryId):(s.type="field",t?(s.name=r.label||r.qDef,s.id=r.qDef):(s.name=r.qDef.qFieldDefs[0],s.label=(a=r.qDef).qLabelExpression?a.qLabelExpression:a.qFieldLabels&&a.qFieldLabels[0]?a.qFieldLabels[0]:a.qFieldDefs[0]));break;case"measure":o=function(e,t){return t?e.qLibraryId:f().measureBase.getLibraryId(e)}(r,t),o?(s.type="measure",s.name=o,s.id=o,i=function(e,t){return f().hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}(r,n),i&&(s.expression=i)):(s.type="expression",t?(s.name=r.label||r.qExpression,s.id=r.qExpression):(s.name=r.qDef.qDef,s.label=function(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qLabel?t.qLabel:t.qDef}(r)));break;default:throw new Error('columnType should be "dimension" or "measure"')}return s}const ie={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}};function ae(e,t,r,n){var o=r?"expression":t.type,i=e.color,a=i.mode,s=X.getItemLabel(t);switch(re(e,s||""),o){case"field":a="byDimension",i.byDimDef={label:t.label||X.wrapFieldName(t.name),key:X.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":a="byMeasure",i.byMeasureDef={label:r||s,key:r||t.name,type:"expression",activeMeasureIndex:t.activeMeasureIndex};break;case"dimension":a="byDimension",i.byDimDef={label:t.name,key:t.id,type:"libraryItem",activeDimensionIndex:t.activeDimensionIndex};break;case"measure":a="byMeasure",i.byMeasureDef={label:t.name,key:t.id,expression:t.expression,type:"libraryItem",activeMeasureIndex:t.activeMeasureIndex},i.formatting&&ie.useMasterNumberFormat(i.formatting)}n||(i.auto=!1,i.mode=a)}function se(e,t){var r=i.getValue(e,"".concat(t,"qDimensions"),[]),n=i.getValue(e,"".concat(t,"qMeasures"),[]),o=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=i.getValue(e,"color.byDimDef");if(a&&re(e,a.label),function(e){return!!(e&&e.activeDimensionIndex>-1)}(a))!function(e,t){var r=i.getValue(e,"".concat(t,"qDimensions"),[]),n=i.getValue(e,"color.byDimDef");n.activeDimensionIndex=Math.min(n.activeDimensionIndex,r.length-1);var o=oe("dimension",!1,r[n.activeDimensionIndex]);o.activeDimensionIndex=n.activeDimensionIndex,ae(e,o)}(e,t);else if(function(e){return!e||!e.key}(a)&&function(e,t){var r=i.getValue(e,"".concat(t,"qDimensions"),[]),n=r[function(e,t,r){var n=i.getValue(t,"visualization"),o=r.split("."),a=Number(o[1]),s=i.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===n&&"point"===s}(r,e,t)?0:r.length-1],o=K.IDMAP.COLOR_BY_ALTERNATIVE,a=d.findItemByPropertyValue(n.qAttributeDimensions,"id",o);return ae(e,oe("dimension",!!a,a||n)),!!a}(e,t))return;ne({properties:e,isDimension:!0,dimensions:r,excludedDimensions:o,measures:n,label:i.getValue(e,"color.byDimDef.label")})}const le=function(e,t,r){i.setValue(e,t,r),i.isAtomicValue(r)&&function(e,t,r){var n=e.qLayoutExclude;n&&(n.changed||(n.changed={}),n.changed[t]={from:i.getValue(e,t),to:r})}(e,t,r)},ue=function(e,t){var r={primary:!0};if(e){var n=(Q[t]||J).colorModeOptions||J.colorModeOptions;r.byDimension=n.dimension(e),r.byMeasure=n.measure(e),r.byMultiple=n.multiColor(e),r.byExpression=n.expression(e)}return r},ce=function(e){var t=e.canColorBy,r=e.autoColor,n=e.colorMode,o=e.dimensions;return!(t[n]&&!r&&("byDimension"!==n&&"byMeasure"!==n||!o.length))},de=function(e,t){var r,n=i.getValue(e,"color.mode"),o=i.getValue(e,"color.auto"),a=i.getValue(e,"".concat(t,"qDimensions"),[]),s=i.getValue(e,"".concat(t,"qMeasures"),[]),l=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);o?te(a,l):!(r={auto:o,colorMode:n,dimensions:a}).auto&&"byDimension"===r.colorMode&&r.dimensions.length>0?se(e,t):function(e){var t=e.auto,r=e.colorMode,n=e.dimensions,o=e.measures,a=e.properties,s=i.getValue(a,"visualization");return!(t||"byMeasure"!==r||!n.length||"map"!==s&&!o.length)}({auto:o,colorMode:n,dimensions:a,measures:s,properties:e})?function(e,t){var r=i.getValue(e,"".concat(t,"qDimensions"),[]),n=i.getValue(e,"".concat(t,"qMeasures"),[]),o=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=i.getValue(e,"color.byMeasureDef");if(a&&re(e,a.label),function(e){return!!(e&&e.activeMeasureIndex>-1)}(a))!function(e,t){var r=i.getValue(e,"".concat(t,"qMeasures"),[]),n=i.getValue(e,"color.byMeasureDef");if(n.activeMeasureIndex=Math.min(n.activeMeasureIndex,r.length-1),n.activeMeasureIndex>-1){var o=oe("measure",!1,r[n.activeMeasureIndex],!0);o.activeMeasureIndex=n.activeMeasureIndex,ae(e,o)}}(e,t);else if(function(e,t){return(!e||!e.key)&&t.length>0}(a,n)&&function(e,t){var r=i.getValue(e,"".concat(t,"qDimensions"),[]),n=i.getValue(e,"".concat(t,"qMeasures"),[]),o=r[r.length-1],a=K.IDMAP.COLOR_BY_ALTERNATIVE,s=d.findItemByPropertyValue(o.qAttributeExpressions,"id",a);return ae(e,oe("measure",!!s,s||n[0])),!!s}(e,t))return;ne({properties:e,isDimension:!1,dimensions:r,excludedDimensions:o,measures:n,label:i.getValue(e,"color.byMeasureDef.label")})}(e,t):function(e,t){var r=i.getValue(e,"color.mode"),n=i.getValue(e,"".concat(t,"qDimensions"),[]),o=i.getValue(e,"".concat(t,"qMeasures"),[]),a=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===r&&o.length<2&&i.setValue(e,"color.mode","primary"),te(n,a)}(e,t)},pe=function(e){e.forEach((function(e){e.qOtherTotalSpec&&"qTotalMode"in e.qOtherTotalSpec&&delete e.qOtherTotalSpec.qTotalMode}))},fe=function(e){var t=e.shouldUpdateColorBy,r=e.properties,n=i.getValue(r,"qHyperCubeDef.qMeasures",[]),o=i.getValue(r,"color.mode","");return!t&&"byExpression"===o&&n.length>0},me=function(e){var t=i.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),r=i.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:r,id:"colorByExpression"}),i.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)},he=function(e){i.setValue(e,"color.mode","primary"),i.setValue(e,"color.auto",!0)},ge=function(e){var t=i.getValue(e,"qHyperCubeDef.qDimensions",[]),r=i.getValue(e,"color.persistent",!1);return t.length>1&&!r},be={exportProperties:function(e){var t=e.propertyTree,r=e.hypercubePath,n=e.viewDataMode,o=G.exportProperties({propertyTree:t,hypercubePath:r,viewDataMode:n}),i=o.data[0],a=i.dimensions.concat(i.excludedDimensions),s=i.measures.concat(i.excludedMeasures),l=K.IDMAP,u=l.COLOR_BY_ALTERNATIVE,c=l.COLOR_BY_EXPRESSION;return K.moveByIdFromGroup(a,[],"qAttributeDimensions",u),K.moveByIdFromGroup(a,[],"qAttributeExpressions",u),K.moveByIdFromGroup(s,[],"qAttributeExpressions",c),o},importProperties:function(e){var t=e.exportFormat,r=e.initialProperties,n=e.dataDefinition,o=e.defaultPropertyValues,a=e.hypercubePath,s=e.extension,l=e.supportedFilters,u=e.isHCModifierSupported,c=G.importProperties({exportFormat:t,initialProperties:r,dataDefinition:n,defaultPropertyValues:o,hypercubePath:a,extension:s,supportedFilters:l,isHCModifierSupported:u}),d=c.qProperty,p=i.getValue(d,"visualization"),f=i.getValue(d,"qHyperCubeDef.qDimensions",[]),m=i.getValue(d,"color.mode",""),h=i.getValue(d,"color.auto",""),g=ue(d,p),b=ce({canColorBy:g,autoColor:h,colorMode:m,dimensions:f});return g[m]?fe({shouldUpdateColorBy:b,properties:d})&&me(d):he(d),b&&de(d,"qHyperCubeDef."),ge(d)&&le(d,"color.persistent",!0),pe(f),c}};var ve=["bar","marker","line"];const ye=function(e){var t=e.initialProperties,r=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?W(r,"unsupportedAutoMinMax")||E()(r.measureAxis,t.measureAxis):W(r,"supportedAutoMinMax")||E()(r.measureAxis,t.measureAxis)},xe=function(e){var t,r=e.exportFormat,n=e.initialProperties,o=e.properties,i=e.measureType,a=o.qHyperCubeDef,s=o.measureAxis;if(function(e){var t=e.initialProperties;return!(!e.exportFormat.properties.measureAxes||t.measureAxes||!t.measureAxis||void 0===t.measureAxis.autoMinMax)}({exportFormat:r,initialProperties:n})){var l=function(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach((function(e){if(e.qDef.series){var r=e.qDef.series,n=r.type,o=r.axis;t[o]||(t[o]={axis:o,type:{line:0,marker:0,bar:0,total:0}}),ve.includes(n)&&t[o].type[n]++,t[o].type.total++}})),t}(a);l.length?(i&&(t=l.filter((function(e){return e.type[i]>0})).sort((function(e,t){return t.type[i]-e.type[i]}))),t&&t.length||(t=l.sort((function(e,t){return t.type.total-e.type.total}))),t&&t[0]&&E()(s,r.properties.measureAxes[t[0].axis])):E()(s,r.properties.measureAxes[0])}},Se=function(e){if(e.qDimensions.length>1){var t=e.qInterColumnSortOrder.indexOf(0);if(0!==t){var r=e.qInterColumnSortOrder[0];e.qInterColumnSortOrder[0]=0,e.qInterColumnSortOrder[t]=r}}},Ee={exportProperties:function(e){var t=e.propertyTree,r=e.hypercubePath,n=e.viewDataMode,o=e.supportedAutoMinMax,i=void 0===o||o,a=be.exportProperties({propertyTree:t,hypercubePath:r,viewDataMode:n}),s=a.properties;return i?(x(s,"measureAxis.min","supportedAutoMinMax"),x(s,"measureAxis.max","supportedAutoMinMax")):(x(s,"measureAxis.min","unsupportedAutoMinMax"),x(s,"measureAxis.max","unsupportedAutoMinMax")),a},importProperties:function(e){var t=e.exportFormat,r=e.initialProperties,n=e.dataDefinition,o=e.defaultPropertyValues,i=e.hypercubePath,a=e.measureType,s=e.extension,l=e.supportedFilters,u=e.isHCModifierSupported,c=be.importProperties({exportFormat:t,initialProperties:r,dataDefinition:n,defaultPropertyValues:o,hypercubePath:i,extension:s,supportedFilters:l,isHCModifierSupported:u}),d=c.qProperty;return ye({initialProperties:r,properties:d}),xe({exportFormat:t,initialProperties:r,properties:d,measureType:a}),Se(d.qHyperCubeDef),d.qHyperCubeDef.qColumnOrder=[],d.qHyperCubeDef.columnOrder=[],c}};function Ce(e,t,r){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(r)}function we(e){var t=e.properties,r=e.arrayPath,n=e.quarantineName,o=e.arrayName,a=e.itemPath;i.getValue(t,r,[]).forEach((function(e){return function(e){var t=e.properties,r=e.quarantineName,n=e.arrayName,o=e.item,a=e.itemPath,s=i.getValue(o,a);if(void 0!==s){var l=i.getValue(o,"qDef.cId");l||(l=i.generateId(),i.setValue(o,"qDef.cId",l));var u=Ce(r,n,l);i.setValue(t,u,s),i.setValue(o,a,void 0)}}({properties:t,quarantineName:n,arrayName:o,item:e,itemPath:a})}))}function Re(e){var t=e.properties,r=e.arrayPath,n=e.quarantineName,o=e.arrayName,a=e.itemPath;i.getValue(t,r,[]).forEach((function(e){return function(e){var t=e.properties,r=e.quarantineName,n=e.arrayName,o=e.item,a=e.itemPath,s=i.getValue(o,"qDef.cId");if(s){var l=Ce(r,n,s),u=i.getValue(t,l);void 0!==u&&(i.setValue(o,a,u),i.setValue(t,l,void 0))}}({properties:t,quarantineName:n,arrayName:o,item:e,itemPath:a})}))}var Ae="qHyperCubeDef.qMeasures",Ie="conditionalColoring",Le="measures",De="qDef.conditionalColoring";const Pe={quarantine:function(e){we({properties:e,arrayPath:Ae,quarantineName:Ie,arrayName:Le,itemPath:De})},unquarantine:function(e){Re({properties:e,arrayPath:Ae,itemPath:De,arrayName:Le,quarantineName:Ie})}};var Me="qHyperCubeDef.qMeasures",_e="measures",Te="qHyperCubeDef.qDimensions",ke="dimensions",Oe="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",qe="alternativeMeasures",Ne="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",Fe="alternativeDimensions",ze="qCalcCondition",je="conditionalShowHide";const $e={quarantine:function(e){we({properties:e,arrayPath:Me,quarantineName:je,arrayName:_e,itemPath:ze}),we({properties:e,arrayPath:Te,quarantineName:je,arrayName:ke,itemPath:ze})},unquarantine:function(e){Re({properties:e,arrayPath:Me,quarantineName:je,arrayName:_e,itemPath:ze}),Re({properties:e,arrayPath:Te,quarantineName:je,arrayName:ke,itemPath:ze})},quarantineAlternative:function(e){we({properties:e,arrayPath:Oe,quarantineName:je,arrayName:qe,itemPath:ze}),we({properties:e,arrayPath:Ne,quarantineName:je,arrayName:Fe,itemPath:ze})},unquarantineAlternative:function(e){Re({properties:e,arrayPath:Oe,quarantineName:je,arrayName:qe,itemPath:ze}),Re({properties:e,arrayPath:Ne,quarantineName:je,arrayName:Fe,itemPath:ze})}},Be={hypercube:G,colorChart:be,axisChart:Ee,quarantineProperty:x,unquarantineProperty:W,quarantineArrayProp:we,unquarantineArrayProp:Re,conditionalColoring:Pe,conditionalShow:$e}})(),n.default})();var _g=B(Mg.exports);const Tg="qHyperCubeDef.qDimensions",kg="dimensions",Og="qDef.representation",qg="tableRepresentation",Ng=(e,t,r)=>{const n=e.length+t.length,o=((null==r?void 0:r.length)===n?r:Array.from(Array(n).keys())).map((r=>((e,t,r)=>{var n;const o=t.length,i=e<o?t[e]:r[e-o],{columnWidth:a}=i.qDef;return"pixels"===(null==a?void 0:a.type)?null!==(n=a.pixels)&&void 0!==n?n:dh.PixelsDefault:-1})(r,e,t)));return o},Fg=({propertyTree:e,hyperCubePath:t})=>{const r=_g.hypercube.exportProperties({propertyTree:e,hyperCubePath:t}),{qHyperCubeDef:{qColumnOrder:n,qDimensions:o,qMeasures:i}}=r.properties,a=Ng(o,i,n);return Cg(r,"properties.qHyperCubeDef",{...r.properties.qHyperCubeDef,columnWidths:a}),_g.quarantineProperty(r.properties,"qHyperCubeDef.columnWidths","straightTableColumnWidths"),_g.quarantineProperty(r.properties,"qHyperCubeDef.qColumnOrder","straightTableColumnOrder"),_g.quarantineProperty(r.properties,"qHyperCubeDef.columnOrder","straightTableColumnOrder"),(e=>{_g.quarantineArrayProp({properties:e,arrayPath:Tg,itemPath:Og,arrayName:kg,quarantineName:qg})})(r.properties),r};const zg=(e,t,r,n)=>{let o=t;n&&(o=t-n);const i=JSON.parse(JSON.stringify(e[o]));if(Array.isArray(r)&&r.length>0){const e=r[t];i.qDef.columnWidth=-1===e?{type:ph.FitToContent}:{type:ph.Pixels,pixels:e}}return i},jg=({exportFormat:e,initialProperties:t,extension:r,hypercubePath:n,defaultPropertyValues:o,viewDataMode:i})=>{const a=_g.hypercube.importProperties({exportFormat:e,initialProperties:t,dataDefinition:{path:"/qHyperCubeDef",dimensions:{min:0,max:1e3},measures:{min:0,max:1e3}},defaultPropertyValues:o,hypercubePath:n,extension:r});_g.unquarantineProperty(a.qProperty,"straightTableColumnOrder"),(e=>{_g.unquarantineArrayProp({properties:e,arrayPath:Tg,itemPath:Og,arrayName:kg,quarantineName:qg})})(a.qProperty);const{qHyperCubeDef:{qDimensions:s,qMeasures:l,qColumnOrder:u,columnWidths:c}}=a.qProperty,{dimensions:d,measures:p}=((e,t,r,n)=>{const o=e.length,i=o+t.length,a=(null==r?void 0:r.length)===i?r:Array.from(Array(i).keys());return{dimensions:a.filter((e=>e<o)).map((t=>zg(e,t,n))),measures:a.filter((e=>e>=o)).map((e=>zg(t,e,n,o)))}})(s,l,u,c);return Array.isArray(c)&&c.length>0&&(Cg(a,"qProperty.qHyperCubeDef.qDimensions",d),Cg(a,"qProperty.qHyperCubeDef.qMeasures",p)),i&&(Cg(a,"qProperty.totals.show",!1),Cg(a,"qProperty.usePagination",!0)),_g.conditionalShow.unquarantine(a.qProperty),a};var $g={component:"items",items:{columnHandler:{component:"column-handler",search:!0,selectAll:!1}},classification:{tags:["exploration"],exclusive:!0}};function Bg(e,t){let r;for(r=0;r<e.length;++r)e[r]>=0&&e[r]>=t&&++e[r];e.push(t)}function Hg(e,t){let r,n=0;for(r=0;r<e.length;++r)e[r]>t?--e[r]:e[r]===t&&(n=r);return e.splice(n,1),n}function Wg(e){return e>0?0:1}function Gg(e){return e.translator.get("Visualizations.Descriptions.Column")}function Vg(e){return{measures:{min:Wg,max:1e3,description:()=>Gg(e),add(e,t,r){const{qColumnOrder:n}=r.hcProperties;Bg(n,r.getDimensions().length+r.getMeasures().length-1)},remove(e,t,r,n){const{qColumnOrder:o}=r.hcProperties;Hg(o,(r.hcProperties.qDimensions?r.hcProperties.qDimensions.length:0)+n)}},dimensions:{min:Wg,max:1e3,description:()=>Gg(e),add(e,t,r){const{qColumnOrder:n}=r.hcProperties;return Bg(n,r.getDimensions().length-1),e},remove(e,t,r,n){if(null!=e&&e.isAlternative)return;const{qColumnOrder:o}=r.hcProperties;Hg(o,n)}}}}var Ug={};!function(e){(()=>{var t={229:e=>{var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},a=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var n,o=t.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!i)return!1;for(n in e);return void 0===n||t.call(e,n)},s=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,r){if("__proto__"===r){if(!t.call(e,r))return;if(o)return o(e,r).value}return e[r]};e.exports=function e(){var t,r,n,o,u,c,d=arguments[0],p=1,f=arguments.length,m=!1;for("boolean"==typeof d&&(m=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(r in t)n=l(d,r),d!==(o=l(t,r))&&(m&&o&&(a(o)||(u=i(o)))?(u?(u=!1,c=n&&i(n)?n:[]):c=n&&a(n)?n:{},s(d,{name:r,newValue:e(m,c,o)})):void 0!==o&&s(d,{name:r,newValue:o}));return d}}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var i=r[e]={exports:{}};return t[e](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{n.r(o),n.d(o,{default:()=>Me});var e=n(229),t=n.n(e);const r=function(e,t,r){if(!t)return!1;var n,o=t.split("."),i=o[o.length-1],a=e;for(n=0;n<o.length-1;++n)void 0===a[o[n]]&&(a[o[n]]=Number.isNaN(+o[n+1])?{}:[]),a=a[o[n]];if(void 0!==r){var s=a[i];return a[i]=r,{updated:r,previous:s}}return delete a[i],!1},i=function(e,t,r){var n,o=t.split("."),i=e;if(void 0===i)return r;for(n=0;n<o.length;++n){if(void 0===i[o[n]])return r;i=i[o[n]]}return i},a={EXPRESSIONS:{observed:"",trend:"STL_Trend",seasonal:"STL_Seasonal",residual:"STL_Residual"},OPTIONS:[{value:"observed",translation:"cao.trendDecomposition.parameters.decomposition.observed"},{value:"trend",translation:"cao.trendDecomposition.parameters.decomposition.trend"},{value:"seasonal",translation:"cao.trendDecomposition.parameters.decomposition.seasonal"},{value:"residual",translation:"cao.trendDecomposition.parameters.decomposition.residual"}]};var s="".concat(" ","(").concat(" "),l="".concat(" ",")").concat(" ");function u(e){return s+e+l}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var r=function(e,t){if(!t)return null;var r,n;for(r=0;r<t.length;r++)if((n=t[r]).qInfo.qId===e)return n;return null}(e.qLibraryId,t.dimensionList);return r&&r.qData.info[0].qTags.indexOf("$numeric")>-1}var n=function(e,t){if(!t)return null;var r,n,o=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var r=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(r)&&(t=(t=t.substring(1,r)).trim()),t}(e);for(r=0;r<t.length;r++){if((n=t[r]).qName===o)return n;if(n.qDerivedFieldData)for(var i=0;i<n.qDerivedFieldData.qDerivedFieldLists.length;++i)for(var a=n.qDerivedFieldData.qDerivedFieldLists[i],s=0;s<a.qFieldDefs.length;++s){var l=a.qFieldDefs[s];if(l.qName===o)return l}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return n&&n.qTags.indexOf("$numeric")>-1}function d(e){return!(!e.fullAccumulation&&!e.fullRange)}function p(e,t){var r=e.crossAllDimensions;return 2===t&&r?"RowNo(Total)":"RowNo()"}function f(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e),r=t.trim();return"="===r.substring(0,1)?r.substring(1).trim():r}function m(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function h(e,t){var r=e.crossAllDimensions;return 2===t&&r?"Above(Total ":"Above("}function g(e){return void 0===e?")":", 0, ".concat(e,")")}function b(e){return"Replace(Replace(".concat(e,",'''',''''''),'$','$''&''')")}function v(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=").concat(b("MinString(".concat(t,")")),")' and Only({1}").concat(t,")<='$(=").concat(b("MaxString(".concat(t,")")),")'\"}")}function y(e){var t=e.modifier,r=void 0===t?{}:t,n=e.dimensions,o=e.dimensionAndFieldList,i=e.funcComp,a=void 0===i?"Sum":i,s=e.valueComp,l=void 0===s?"0":s;if(!r.showExcludedValues)return"";if(n&&1===n.length){var u=v(c(n[0],o),m(0));return"".concat(a,"({1<").concat(u,">}").concat(l,")")}if(n&&2===n.length){var d=c(n[0],o),p=c(n[1],o),f=m(0),h=m(1),g=v(d,f),b=v(p,h);return"".concat(a,"({1<").concat(g,",").concat(b,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function x(e){return"".concat(e,"(")}function S(e){var t=e.properties,r=e.layout;return i(t,"qHyperCubeDef.qDimensions",i(r,"qHyperCube.qDimensionInfo",[])).length}const E={isFullRange:d,getNumDimensions:S,getExpressionWithExcludedComp:function(e){var t=e.expression,r=e.modifier,n=e.dimensions,o=e.dimensionAndFieldList,i=e.treatMissingAsNull,a=u(f(t));if(!r.showExcludedValues)return a;var s=y({modifier:r,dimensions:n,dimensionAndFieldList:o}),l=i?"":", 0";if(n&&1===n.length){var c=m(0);return"If(Count(".concat(c,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(n&&2===n.length){var d=m(0),p=m(1);return"If(Count(".concat(d,") * Count(").concat(p,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:p,getNumStepComp:function(e,t){if(!d(e)){var r=e.steps;return"number"!=typeof r||Number.isNaN(r)?6:r}return p(e,t)},getAboveCompPrefix:h,getAboveCompSuffix:g,getAboveComp:function(e,t,r,n){return h(e,t)+r+g(n)},getFunctionPrefix:x,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return x(e)+t+")"},getAggrComp:function(e,t,r){return"Aggr(".concat(e,", ").concat(t,", ").concat(r,")")},getExcludedComp:y,needDimension:function(e){var t=e.modifier,r=e.properties,n=e.layout,o=function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t);return 0===o&&2===S({properties:r,layout:n})},getDimComp:function(e,t){var r=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),n=m(t);if(!r.qSortByExpression&&!r.qSortByNumeric&&!r.qSortByAscii)return n;var o=["Descending","Ascending"],i=r.qSortByNumeric?"(Numeric, ".concat(o[(r.qSortByNumeric+1)/2],")"):"",a=r.qSortByAscii?"(Text, ".concat(o[(r.qSortByAscii+1)/2],")"):"";return r.qSortByNumeric&&r.qSortByAscii?"(".concat(n,", ").concat(i,", ").concat(a,")"):r.qSortByNumeric?"(".concat(n,", ").concat(i,")"):r.qSortByAscii?"(".concat(n,", ").concat(a,")"):n},simplifyExpression:f,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var r=t.indexOf(s);if(-1!==r){var n=t.indexOf(l);if(-1!==n)return t.substring(r+s.length,n)}}},initModifier:function(e,t){Object.keys(t).forEach((function(r){void 0===e[r]&&(e[r]=t[r])}))},isNumeric:c,isApplicable:function(e){var t=e.properties,r=e.layout,n=e.minDimensions,o=void 0===n?1:n,i=e.maxDimensions,a=void 0===i?2:i;if(!t&&!r)return!0;var s=S({properties:t,layout:r});return s>=o&&s<=a},getExpressionWithMarkers:u,canExtract:function(e){var t=e.indexOf(s),r=e.indexOf(l);return t>-1&&r>-1&&t<r},getDimDefWithWrapper:m,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")},generateTSDExpression:function(e,t,r){var n=t||e.outputExpression;if(e.base&&e.base.qDef&&(n=t!==e.base.qDef?t:e.base.qDef),"observed"!==e.decomposition){var o=r.qHyperCubeDef.qMeasures.find((function(t){return t.qDef.base&&t.qDef.base.qLibraryId&&e.base&&e.base.qLibraryId?t.qDef.base.qLibraryId===e.base.qLibraryId:null}));o&&t!==o.qDef.qLabel&&(n=o.qLibraryId||o.qDef.base.qLibraryId?"[".concat(o.qDef.qLabel,"]"):o.qDef.base.qDef);var i=function(e){var t=a.OPTIONS.find((function(t){return t.value===e.decomposition}));return t?a.EXPRESSIONS[t.value]:""}(e);n=n.startsWith("=")?n.substr(1):n,n="".concat(i,"(").concat(n,", ").concat(e.steps,")")}return n},getDecomposition:function(e){var t="observed";return Object.values(a.EXPRESSIONS).find((function(r){var n=e.qDef.base.qDef.toLowerCase()||e.qDef.qDef.toLowerCase();return a.EXPRESSIONS[r]&&n.includes(a.EXPRESSIONS[r].toLowerCase())&&(t=r),r})),t}};function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}var R=t().bind(null,!0),A={},I=Array.isArray;function L(e){return null!=e&&!Array.isArray(e)&&"object"===w(e)}function D(e){return void 0===e}function P(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function M(e,t){var r,n=t.substring(1).split("/").slice(0,-1);return n.forEach((function(t,o){if(o!==n.length){r=+t;var i=Number.isNaN(r)?{}:[];e[r||t]=D(e[r||t])?i:e[t],e=e[r||t]}})),e}function _(e,t){var r=!0;if(L(e)&&L(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((function(n){_(e[n],t[n])||(r=!1)})),r);if(I(e)&&I(t)){if(e.length!==t.length)return!1;for(var n=0,o=e.length;n<o;n+=1)if(!_(e[n],t[n]))return!1;return!0}return e===t}A.generate=function(e,t,r){r=r||"";var n=[];return Object.keys(t).forEach((function(o){var i=function(e){return e?R({},{val:e}).val:e}(t[o]),a=e[o],s="".concat(r,"/").concat(o);_(i,a)||P(t,o)||(D(a)?n.push({op:"add",path:s,value:i}):L(i)&&L(a)?n=n.concat(A.generate(a,i,s)):I(i)&&I(a)?n=n.concat(function(e,t,r){var n=[],o=e.slice(),i=-1;function a(e,t,r){if(e[r]&&D(e[r].qInfo))return null;if(e[r]&&e[r].qInfo.qId===t)return r;for(var n=0,o=e.length;n<o;n+=1)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(_(t,o))return n;if(!D(t[0])&&D(t[0].qInfo))return n.push({op:"replace",path:r,value:t}),n;for(var s=o.length-1;s>=0;s-=1)-1===(i=a(t,o[s].qInfo&&o[s].qInfo.qId,s))?(n.push({op:"remove",path:"".concat(r,"/").concat(s)}),o.splice(s,1)):n=n.concat(A.generate(o[s],t[i],"".concat(r,"/").concat(s)));for(var l=0,u=t.length;l<u;l+=1)-1===(i=a(o,t[l].qInfo&&t[l].qInfo.qId))?(n.push({op:"add",path:"".concat(r,"/").concat(l),value:t[l]}),o.splice(l,0,t[l])):i!==l&&(n.push({op:"move",path:"".concat(r,"/").concat(l),from:"".concat(r,"/").concat(i)}),o.splice(l,0,o.splice(i,1)[0]));return n}(a,i,s)):n.push({op:"replace",path:"".concat(r,"/").concat(o),value:i}))})),Object.keys(e).forEach((function(o){D(t[o])&&!P(e,o)&&n.push({op:"remove",path:"".concat(r,"/").concat(o)})})),n},A.apply=function(e,t){t.forEach((function(t){var r,n,o=M(e,t.path),i=t.path.split("/").splice(-1)[0],a=i&&Number.isNaN(+i)?o[i]:o[+i]||o,s=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(o=null,a=e),"add"===t.op||"replace"===t.op)if(I(o))"-"===i&&(i=o.length),o.splice(+i,"add"===t.op?0:1,t.value);else if(I(a)&&I(t.value)){var l,u=t.value.slice();a.length=0,(l=a).push.apply(l,function(e){if(Array.isArray(e))return C(e)}(n=u)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?C(e,t):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}else if(L(a)&&L(t.value))r=a,Object.keys(r).forEach((function(e){Object.getOwnPropertyDescriptor(r,e).configurable&&!P(r,e)&&delete r[e]})),R(a,t.value);else{if(!o)throw new Error("Patchee is not an object we can patch");o[i]=t.value}else if("move"===t.op){var c=M(e,t.from);I(o)?o.splice(+i,0,c.splice(+s,1)[0]):(o[i]=c[s],delete c[s])}else"remove"===t.op&&(I(o)?o.splice(+i,1):delete o[i])}))},A.clone=function(e){return R({},e)},A.createPatch=function(e,t,r){var n={op:e.toLowerCase(),path:r};return"move"===n.op?n.from=t:void 0!==t&&(n.value=t),n},A.updateObject=function(e,t){Object.keys(e).length?A.apply(e,A.generate(e,t)):R(e,t)};const T=A,k=function(e,r,n){if(!e)return Promise.resolve();var o=T.generate(r,n);return t()(!0,r,n),o&&o.length?(o=o.map((function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}})),e.applyPatches(o,!0)):Promise.resolve()};var O="accumulation";function q(e,t){var r=i(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===O)return r[n]}function N(e,t){var r=function(e,t){var r=i(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===O)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var F={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""};const z={translationKey:"properties.modifier.accumulation",needDimension:E.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return E.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,o=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=a;void 0===l&&(l=E.getNumDimensions({properties:n,layout:o}));var u=i(n,"qHyperCubeDef.qDimensions",[]),c=E.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),d=E.getNumStepComp(r,l),p=E.getAboveComp(r,l,c,d),f=E.getRangeComp("RangeSum",p);if(E.needDimension({modifier:r,properties:n,layout:o})){var m=E.getDimComp(u,1),h=E.getDimComp(u,0),g=E.getAggrComp(f,m,h);f=r.showExcludedValues?E.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:s,valueComp:g}):g}return f},extractInputExpression:E.extractInputExpression,initModifier:function(e){E.initModifier(e,F)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!E.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(N(t,e),".accumulationDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.accumulation.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(N(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.accumulation.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(N(t,e),".fullAccumulation")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(N(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var r=q(t,e);if(r){var n=r.steps;r.steps="number"!=typeof n||Number.isNaN(n)?6:Math.abs(n)}},show:function(t){var r=q(t,e);return r&&!r.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(N(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return E.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(O))return!1;var i=q(t,e);return i&&!i.disabled}};return r}};var j="movingAverage";function $(e,t){var r=i(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===j)return r[n]}function B(e,t){var r=function(e,t){var r=i(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===j)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var H={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1};const W={translationKey:"properties.modifier.movingAverage",needDimension:E.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return E.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,r=e.expression,n=e.modifier,o=e.properties,a=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!n)return r;var u=s;void 0===u&&(u=E.getNumDimensions({properties:o,layout:a}));var c=i(o,"qHyperCubeDef.qDimensions",[]),d=n.showExcludedValues&&n.nullSuppression,p=E.getExpressionWithExcludedComp({expression:r,modifier:n,dimensions:c,dimensionAndFieldList:l,treatMissingAsNull:d}),f=E.getNumStepComp(n,u),m=E.getAboveComp(n,u,p,f);if(n.nullSuppression)t=E.getRangeComp("RangeAvg",m);else{var h=E.getRangeComp("RangeSum",m),g=function(e,t){var r=E.getRowNoComp(e,t);if(!E.isFullRange(e)){var n=e.steps,o="number"!=typeof n||Number.isNaN(n)?6:n;return"RangeMin(".concat(o,", ").concat(r,")")}return r}(n,u);t="".concat(h," / ").concat(g)}var b=t;if(E.needDimension({modifier:n,properties:o,layout:a})){var v=E.getDimComp(c,1),y=E.getDimComp(c,0),x=E.getAggrComp(b,v,y);b=n.showExcludedValues?E.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return b},extractInputExpression:E.extractInputExpression,initModifier:function(e){E.initModifier(e,H)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:function(e,t){return!E.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(B(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.movingAverage.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(B(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.movingAverage.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(B(t,e),".fullRange")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(B(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var r=$(t,e);if(r){var n=r.steps;r.steps="number"!=typeof n||Number.isNaN(n)?6:Math.abs(n)}},show:function(t){var r=$(t,e);return r&&!r.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(B(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(B(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return E.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(j))return!1;var i=$(t,e);return i&&!i.disabled}};return r}};var G="timeSeriesDecomposition";function V(e,t){var r=i(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===G)return r[n]}function U(e,t){var r=function(e,t){var r=i(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===G)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var Y={type:"timeSeriesDecomposition",disabled:!1,decomposition:"",steps:2,outputExpression:""};const K={translationKey:"properties.modifier.timeSeriesDecomposition",needDimension:E.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return E.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties;return r?E.generateTSDExpression(r,t,n):t},extractInputExpression:E.extractInputExpression,initModifier:function(e,t){E.initModifier(e,Y),""===e.decomposition&&t&&(e.decomposition=E.getDecomposition(t))},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.timeSeriesDecomposition||"properties.modifier.timeSeriesDecomposition",show:function(e,t){return!E.isApplicable({properties:t.properties})}},settings:{type:"items",items:{decomposition:{refFn:function(t){return"".concat(U(t,e),".decomposition")},type:"string",translation:t.modifierTrendDecompositionDecomposition||"properties.modifier.trendDecomposition.decomposition",component:"dropdown",schemaIgnore:!0,defaultValue:t.trendDecompositionParametersDecompositionObserved||"cao.trendDecomposition.parameters.decomposition.observed",options:a.OPTIONS},steps:{refFn:function(t){return"".concat(U(t,e),".steps")},type:"integer",translation:t.modifierTimeSeriesDecompositionPeriods||"properties.modifier.timeSeriesDecomposition.periods",schemaIgnore:!0,defaultValue:2,change:function(t,r){var n=V(t,e);if(n){var o=n.steps;n.steps="number"!=typeof o||Number.isNaN(o)?2:Math.abs(o),r.properties.qHyperCubeDef.qMeasures=r.properties.qHyperCubeDef.qMeasures.map((function(e){return e.qDef.modifiers.map((function(e){return"timeSeriesDecomposition"===e.type?e.steps=o:e.steps=e.steps,e})),e}))}},show:function(t){var r=V(t,e);return r&&!r.fullRange}}},show:function(e,t){return E.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(G))return!1;var i=V(t,e);return i&&!i.disabled}};return r}};var X="difference";function J(e,t){var r=i(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===X)return r[n]}function Z(e,t){var r=function(e,t){var r=i(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===X)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var Q={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""};const ee={translationKey:"properties.modifier.difference",needDimension:E.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return E.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:E.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,o=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=a;void 0===l&&(l=E.getNumDimensions({properties:n,layout:o}));var u=i(n,"qHyperCubeDef.qDimensions",[]),c=E.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),d=E.getAboveComp(r,l,c),p="".concat(c," - ").concat(d);if(E.needDimension({modifier:r,properties:n,layout:o})){var f=E.getDimComp(u,1),m=E.getDimComp(u,0),h=E.getAggrComp(p,f,m);p=r.showExcludedValues?E.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:s,funcComp:"Only",valueComp:h}):h}return p},initModifier:function(e){Object.keys(Q).forEach((function(t){void 0===e[t]&&(e[t]=Q[t])}))},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!E.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(Z(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.difference.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(Z(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.difference.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},showExcludedValues:{refFn:function(t){return"".concat(Z(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return E.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(X))return!1;var i=J(t,e);return i&&!i.disabled}};return r}};var te="normalization";function re(e,t){var r=i(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===te)return r[n]}function ne(e,t){var r=function(e,t){var r=i(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===te)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}function oe(e,t){for(var r=0;r<e.length;r++)if(e[r].value===t)return r;return-1}var ie={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:2,selectionScope:2};function ae(e){return 2===e?"{1}":""}function se(e,t,r){return 1===e?"{$<".concat(E.getFieldWithWrapper(t),"={'").concat(r,"'}>}"):""}function le(e,t){return 0===e&&t>1||2===e?"Total":""}function ue(e,t,r){return 0===e&&t>1?"<".concat(E.getDimDefWithWrapper(r),">"):""}const ce={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,r=e.layout;return E.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:E.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,o=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=a;void 0===l&&(l=E.getNumDimensions({properties:n,layout:o}));var u=i(n,"qHyperCubeDef.qDimensions",[]),c=E.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),d=r.selectionScope,p=r.dimensionalScope;return function(e,t,r,n,o,i,a){var s=ae(t),l=se(t,r,n),u=""===s&&""===l?"":s||l,c=le(o,i),d=ue(o,i,a),p=function(e){for(var t=[],r=0;r<e;r++)t[r]=E.getDimDefWithWrapper(r);return t.join(", ")}(i);return"".concat(e,"/ Sum(").concat(u," ").concat(c).concat(d," Aggr(").concat(u," ").concat(e,", ").concat(p,"))")}(c,d,r.field,r.value,p,l,r.primaryDimension)},initModifier:function(e){Object.keys(ie).forEach((function(t){void 0===e[t]&&(e[t]=ie[t])}))},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!E.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(ne(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,options:function(r){return function(e,t,r){var n=[{value:0,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:1,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:2,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return n=function(e,t,r){if(1===e){var n=oe(t,0);t.splice(n,1)}return t}(re(e,r).dimensionalScope,n),n}(r,t,e)}},field:{refFn:function(t){return"".concat(ne(t,e),".field")},type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:function(e,t,r){return r.app.getFieldList().then((function(e){return e.map((function(e){return{label:e.qName,value:e.qName}}))}))},show:function(t){return 1===re(t,e).selectionScope}},value:{refFn:function(t){return"".concat(ne(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return 1===re(t,e).selectionScope}},dimensionalScope:{refFn:function(t){return"".concat(ne(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,supportTooltip:!0,options:function(r,n){return function(e,t,r,n){var o=t.layout.qHyperCube.qDimensionInfo.length,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.".concat(2===o?"respectAllDimensions":"respectDimension"),tooltipTranslation:r.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===o?"respectAllDimensions":"respectDimension",".tooltip")},{value:2,translation:r.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===o?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:r.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===o?"disregardAllDimensions":"disregardDimension",".tooltip")}];return i=function(e,t,r){if(e<2){var n=oe(t,0);t.splice(n,1)}return t}(o,i),i=function(e,t,r){if(0===e){var n=oe(t,1);t.splice(n,1)}return t}(re(e,n).selectionScope,i),i}(r,n,t,e)}},primaryDimension:{refFn:function(t){return"".concat(ne(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.normalization.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(t,r){return 0===(re(t,e).dimensionalScope||0)&&r.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return E.isApplicable({properties:t.properties})}}},show:function(t,r,n){var o=n.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(te))return!1;var i=re(t,e);return i&&!i.disabled}};return r},getDisregardSelectionComp:ae,getFieldSelectionComp:se,getTotalComp:le,getSelectedDimComp:ue};var de="qDef.base",pe="qDef.qDef",fe="qDef.base.qDef",me="qLibraryId",he="qDef.base.qLibraryId";const ge={getExpression:function(e){var t=i(e,fe);return void 0!==t?t:i(e,pe)},getExpressionRef:function(e){return void 0!==i(e,fe)?fe:pe},getLibraryIdRef:function(e){return i(e,he)?he:me},getLibraryId:function(e){return i(e,he)||i(e,me)},getLabelRef:function(e){return i(e,de)?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return i(e,de)?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}};var be="qDef.qDef",ve="qDef.base.qDef",ye="qLibraryId",xe="qDef.base.qLibraryId",Se="qDef.qLabel",Ee="qDef.qLabelExpression",Ce="qDef.base.qLabel",we="qDef.base.qLabelExpression",Re="qDef.qAggrFunc",Ae="qDef.base.qAggrFunc",Ie={initBase:function(e,t){(t||Ie.isValid(e))&&(r(e,ve,i(e,be)),r(e,xe,i(e,ye)),r(e,Ce,i(e,Se)),r(e,we,i(e,Ee)))},restoreBase:function(e){Ie.isValid(e)&&(r(e,be,i(e,ve)),r(e,ye,i(e,xe)),r(e,Se,i(e,Ce)),r(e,Ee,i(e,we)),i(e,Re)&&i(e,Ae)&&r(e,Re,i(e,Ae)),delete e.qDef.base)},isValid:function(e){var t=i(e,ve),r=i(e,xe);return void 0!==t||void 0!==r}};const Le=Ie;function De(e){return De="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},De(e)}var Pe={accumulation:z,movingAverage:W,difference:ee,normalization:ce,timeSeriesDecomposition:K};const Me={modifiers:Pe,apply:Te,applyModifiers:ke,cleanUpMeasure:Oe,destroy:function(e){e&&_e[e.id]&&_e[e.id].masterItemSubscriber&&(_e[e.id].masterItemSubscriber&&_e[e.id].masterItemSubscriber.unsubscribe(),delete _e[e.id])},hasActiveModifiers:qe,getActiveModifier:Ne,initBase:Le.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some((function(e){return Pe[e]}))},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some((function(e){return Pe[e]&&Pe[e].isApplicable({properties:r,layout:n})}))},measureBase:ge,limitedSorting:function(e){var t=e.measures,r=e.properties,n=e.layout,o=!1,i=!1;return t.forEach((function(e){var t=je(e);Ue({modifiers:t,properties:r,layout:n})&&(o=!0,i=i||Ze({modifiers:t,properties:r,layout:n}))})),o&&!i},ifEnableTotalsFunction:Fe};var _e={};function Te(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.model,n=e.properties,o=e.isSnapshot,a=void 0!==o&&o,s=e.masterItem,l=!1;_e[r.id]=_e[r.id]||{isFirstTime:!0};var u=_e[r.id].isFirstTime;if(_e[r.id].isFirstTime=!1,n&&"object"===De(n))return ke({model:r,properties:n});var c=r?r.layout:void 0,d=i(c,"qSelectionInfo.qInSelections");if(a||d)return Promise.resolve(l);var p=i(c,"qHyperCube.qMeasureInfo"),f=_e[r.id].lastReloadTime;if(_e[r.id].lastReloadTime=i(r,"app.layout.qLastReloadTime"),qe({measures:p,layout:c})){var m=function(e){var t=e.measures,r=e.layout,n=e.model,o=e.lastReloadTime;return i(n,"app.layout.qLastReloadTime")!==o&&function(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ve({measure:e,properties:r,layout:n})}))}({measures:t,layout:r})}({measures:p,layout:c,model:r,lastReloadTime:f});return m||function(e){var t=e.measures,r=e.layout,n=e.masterItem,o=e.isFirstTime;return!!Array.isArray(t)&&(o||n||t.some((function(e){return function(e){var t=e.measure,r=e.layout;return Ue({modifiers:je(t),layout:r})?!t.base:!!t.base}({measure:e,layout:r})})))}({measures:p,layout:c,masterItem:s,isFirstTime:u})?r.getEffectiveProperties().then((function(e){var n=t()(!0,{},e);Be(n);var o=Qe(n);return Ye({model:r}).then((function(t){return Ke({libraryIds:o,model:r}).then((function(o){return m&&function(e){var t=e.properties;ze(t).forEach((function(e){return function(e){var t=e.measure;if(Ve({measure:t,properties:e.properties})){var r=0,n=t.qDef.modifiers;Array.isArray(n)&&n.forEach((function(e){if("object"===De(e)&&!e.disabled){if(r++,"object"!==De(Pe[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(r>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var n=Pe[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==n&&We(t)&&E.simplifyExpression(t.qDef.base.qDef)!==E.simplifyExpression(n)&&(t.qDef.base.qDef=n)}}))}}({measure:e,properties:t})}))}({properties:n}),ke({model:r,oldProperties:e,properties:n,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:o,dimensionAndFieldList:t})}))}))})):Promise.resolve(l)}return function(e){return!!Array.isArray(e)&&e.some((function(e){return"object"===De(e.base)}))}(p)?r.getEffectiveProperties().then((function(e){return function(e){var r=e.model,n=e.properties,o=Qe(n);return et({model:r,libraryIds:o}).then((function(){var e=t()(!0,{},n);return ze(n).forEach((function(e){return Oe(e)})),Je({oldProperties:e,newProperties:n,model:r})}))}({model:r,properties:e})})):Promise.resolve(l)}function ke(e){var r=e.model,n=e.oldProperties,o=e.properties,a=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,u=e.masterItem,c=e.libraryItemsProps,d=e.dimensionAndFieldList;void 0===n&&(n=l?t()(!0,{},o):o),Be(o);var p=Qe(o);return et({model:r,libraryIds:p,masterItem:u}).then((function(){return function(e){var r=e.measures,n=e.properties,o=e.model,a=e.libraryItemsProps,s=e.dimensionAndFieldList;if(r||(r=ze(n)),!r.length)return Promise.resolve();if(!qe({measures:r,properties:n}))return r.forEach((function(e){return Oe(e)})),Promise.resolve();var l=a?void 0:Qe(n);return Ye({model:o,dimensionAndFieldList:s}).then((function(e){return Ke({libraryIds:l,model:o,libraryItemsProps:a}).then((function(o){r.forEach((function(r){Ue({modifiers:r.qDef.modifiers,properties:n})?(function(e){var r=e.measure,n=e.properties,o=e.libraryItemsProps,a=e.dimensionAndFieldList,s=0;Le.isValid(r)||Le.initBase(r,!0);var l=r.qDef,u=l.modifiers,c=l.base;Array.isArray(u)&&u.forEach((function(e){if("object"===De(e)&&!e.disabled){if(s++,"object"!==De(Pe[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(s>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");Pe[e.type].initModifier(e,r);var l=r.qLibraryId||c&&c.qLibraryId;l?function(e){var r=e.measure,n=e.modifier,o=e.properties,i=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=""===s?s:Pe[n.type].generateExpression({expression:s,modifier:n,properties:o,dimensionAndFieldList:i});n.outputExpression=l,r.qDef.qDef=n.outputExpression,(r.qDef.qLabel||a.qMeasure.qLabel)&&(r.qDef.qLabel=a.qMeasure.qLabel),(r.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(r.qDef.qLabelExpression=a.qMeasure.qLabelExpression),r.qDef.quarantine&&r.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(r.qDef.qNumFormat=a.qMeasure.qNumFormat,r.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete r.qLibraryId,r.qDef.coloring=a.qMeasure.coloring,n.base=t()(!0,{},r.qDef.base)}({measure:r,modifier:e,libraryId:l,properties:n,libraryItemsProps:o,dimensionAndFieldList:a}):function(e){var r=e.measure,n=e.modifier,o=e.properties,i=e.dimensionAndFieldList;"function"==typeof Pe[n.type].updateModifier&&Pe[n.type].updateModifier(n,o.qHyperCubeDef);var a=ge.getExpression(r),s=""===a?a:Pe[n.type].generateExpression({expression:a,modifier:n,properties:o,dimensionAndFieldList:i});n.outputExpression=s,r.qDef.qDef=n.outputExpression,r.qDef.base.qLabelExpression?r.qDef.qLabelExpression=r.qDef.base.qLabelExpression:r.qDef.qLabel=r.qDef.base.qLabel||a,n.base=t()(!0,{},r.qDef.base)}({measure:r,modifier:e,properties:n,dimensionAndFieldList:a}),function(e){var t=i(e,"qDef.qAggrFunc");"Expr"!==t||Fe(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&Fe(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(r)}}))}({measure:r,properties:n,libraryItemsProps:o,dimensionAndFieldList:e}),He(r)):Oe(r)}))}))}))}({measures:a,properties:o,model:r,libraryItemsProps:c,dimensionAndFieldList:d}).then((function(){return l?Je({oldProperties:n,newProperties:o,model:r}):Promise.resolve(!1)}))}))}function Oe(e){!function(e){var t=je(e);return Array.isArray(t)&&t.some((function(e){return"object"===De(e)&&!e.disabled&&!Pe[e.type]}))}(e)?Le.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,He(e)}function qe(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ue({modifiers:je(e),properties:r,layout:n})}))}function Ne(e){var t=je(e);if(Array.isArray(t))for(var r=0;r<t.length;r++){var n=t[r];if(Pe[n.type]&&!n.disabled)return n}}function Fe(e){var t=Ne(e);return!t||Pe[t.type].enableTotalsFunction(e)}function ze(e){return i(e,"qHyperCubeDef.qMeasures",[]).concat(i(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function je(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function $e(e){return i(e,"outputExpression.qValueExpression.qExpr")||i(e,"outputExpression")}function Be(e){ze(e).forEach((function(e){return function(e){var r=Ne(e);r&&(void 0!==r.outputExpression&&$e(r)!==e.qDef.qDef?delete e.qDef.base:!Le.isValid(e)&&r.base&&(e.qDef.base=t()(!0,{},r.base)))}(e)}))}function He(e){var t=je(e);Array.isArray(t)&&t.forEach((function(t){"object"===De(t)&&(t.disabled||!Pe[t.type]&&$e(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)}))}function We(e){return e.base||e.qDef&&e.qDef.base}function Ge(e){var t=We(e);return e.qLibraryId||t&&t.qLibraryId}function Ve(e){var t=e.measure,r=e.properties,n=e.layout;return!Ge(t)&&Ue({modifiers:je(t),properties:r,layout:n})}function Ue(e){var t=e.modifiers,r=e.properties,n=e.layout,o={};return Array.isArray(t)&&t.some((function(e){return!("object"!==De(e)||e.disabled||!Pe[e.type])&&(void 0===o[e.type]&&(o[e.type]=Pe[e.type].isApplicable({properties:r,layout:n})),o[e.type])}))}function Ye(e){var t=e.model,r=e.dimensionAndFieldList;if(r)return Promise.resolve(r);var n=[],o={},i=t.app.getDimensionList().then((function(e){o.dimensionList=e}));n.push(i);var a=t.app.getFieldList().then((function(e){o.fieldList=e}));return n.push(a),Promise.all(n).then((function(){return o}))}function Ke(e){var t=e.libraryIds,r=e.model,n=e.libraryItemsProps;if(n)return Promise.resolve(n);var o=t.measureLibraryIds,i=t.dimensionLibraryIds,a={},s=[];return o.forEach((function(e){var t=r.app.getMeasure(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),i.forEach((function(e){var t=r.app.getDimension(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),Promise.all(s).then((function(){return a}))}function Xe(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Je(e){var t=e.oldProperties,r=e.newProperties,n=e.model,o=JSON.stringify(i(t,"qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(i(r,"qHyperCubeDef.qMeasures"),Xe)||JSON.stringify(i(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(i(r,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe);return o?function(e){var t=e.model,r=e.oldProperties,n=e.newProperties,o=t.layout;return o&&!o.qHasSoftPatches&&!o.qExtendsId&&i(o,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(n):k(t,r,n)}({model:n,oldProperties:t,newProperties:r}).then((function(){return o})):Promise.resolve(o)}function Ze(e){var t=e.modifiers,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some((function(e){return"object"===De(e)&&!e.disabled&&Pe[e.type]&&Pe[e.type].needDimension({modifier:e,properties:r,layout:n})}))}function Qe(e){var t=ze(e),r=[],n=[],o=!1;return t.forEach((function(t){var n=je(t);if(Ue({modifiers:n,properties:e})){var i=Ge(t);i&&r.push(i),o=o||Ze({modifiers:n,properties:e})}})),i(e,"qHyperCubeDef.qDimensions",[]).forEach((function(e){var t=e.qLibraryId;t&&n.push(t)})),{measureLibraryIds:r,dimensionLibraryIds:n}}function et(e){var t=e.model,r=e.libraryIds;return!e.masterItem&&r&&(r.measureLibraryIds.length||r.dimensionLibraryIds.length)?(_e[t.id].masterItemSubscriber=_e[t.id].masterItemSubscriber||function(e){var t=e.model,r=e.callback,n={},o={},a={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},r=i(e,"qInfo.qType");return r&&s[r]&&s[r].forEach((function(r){t[r]=i(e,r)})),JSON.stringify(t)}function u(e){var t=e.qInfo.qId;if(n[t]){var o=l(e);n[t].properties!==o&&(n[t].properties=o,"function"==typeof r&&n[t].enabled&&r(e)),n[t].enabled=!0}}function c(e,r){return t.app[r](e).then((function(t){n[e]={listener:t.layoutSubscribe(u),enabled:!1,properties:l(t.layout)}}))}return{subscribe:function(e){var r=e.measureLibraryIds,i=e.dimensionLibraryIds,s=[];return function(e){var t=e.dimensionLibraryIds;o={},e.measureLibraryIds.forEach((function(e){o[e]=!0})),a={},t.forEach((function(e){a[e]=!0}))}({measureLibraryIds:r,dimensionLibraryIds:i}),Object.keys(n).forEach((function(e){o[e]||a[e]||(n[e].listener.dispose(),delete n[e])})),t.app&&(Object.keys(o).forEach((function(e){o[e]&&!n[e]&&s.push(c(e,"getMeasure"))})),Object.keys(a).forEach((function(e){a[e]&&!n[e]&&s.push(c(e,"getDimension"))}))),Promise.all(s)},unsubscribe:function(){Object.keys(n).forEach((function(e){n[e].listener.dispose()})),n={}}}}({model:t,callback:function(e){return Te({model:t,masterItem:e}).then((function(){return t.app.clearUndoBuffer()}))}}),_e[t.id].masterItemSubscriber.subscribe(r)):Promise.resolve()}})(),e.default=o.default,Object.defineProperty(e,"__esModule",{value:!0})})()}(Ug);var Yg=B(Ug);const Kg=(e,t)=>{if(e||t)return{uses:"dimensionRepresentationItems.representationType",options(){const r=[{value:"text",translation:"Object.Table.Representation.Text"}];return t&&r.push({value:"url",translation:"Object.Table.Representation.Link"}),e&&r.push({value:"image",translation:"Object.Table.Representation.Image"}),r}}},Xg=e=>{if(e)return{representationUrlPosition:{uses:"dimensionRepresentationItems.representationUrlPosition"},representationUrlLabel:{uses:"dimensionRepresentationItems.representationUrlLabel"},representationLinkUrl:{uses:"dimensionRepresentationItems.representationLinkUrl"}}},Jg=e=>{if(e)return{representationImage:{uses:"dimensionRepresentationItems.representationImage",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"}]}}}}},Zg=e=>{var t,r;const{anything:n,flags:o}=e,i=o.isEnabled("CLIENT_IM_5715_LINKS"),a=o.isEnabled("CLIENT_IM_5715_LINKS_AND_IMAGES")&&!(null!=n&&null!==(t=n.sense)&&void 0!==t&&null!==(r=t.isUnsupportedFeature)&&void 0!==r&&r.call(t,"tableImages"));return{representationType:Kg(a,i),...Xg(i),...Jg(a)}},Qg=e=>{var t,r;const{flags:n,anything:o}=e,i=n.isEnabled("CLIENT_IM_5715_LINKS_AND_IMAGES")&&!(null!=o&&null!==(t=o.sense)&&void 0!==t&&null!==(r=t.isUnsupportedFeature)&&void 0!==r&&r.call(t,"tableImages"));return{representationType:i?{uses:"measureRepresentationItems.representationType",options:[{value:"text",translation:"Object.Table.Representation.Text"},{value:"image",translation:"Object.Table.Representation.Image"}]}:void 0,representationImage:i?{uses:"measureRepresentationItems.representationImage",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}},eb={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}},tb=e=>{var t,r,n,o;return{type:"items",grouped:!0,items:{totalsAggrGroup:{type:"items",items:{totalsAggrFunc:{type:"string",component:"dropdown",ref:"qDef.qAggrFunc",translation:"Object.Table.AggrFunc",options:(e,t)=>(!Yg.hasActiveModifiers({measures:[e],properties:t.properties})||Yg.ifEnableTotalsFunction(e)?[{value:"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:null!=e&&null!==(t=e.anything)&&void 0!==t&&null!==(t=t.sense)&&void 0!==t&&null!==(r=t.isUnsupportedFeature)&&void 0!==r&&r.call(t,"totals")?"None":"Expr"}}}},show:!(null!=e&&null!==(n=e.anything)&&void 0!==n&&null!==(n=n.sense)&&void 0!==n&&null!==(o=n.isUnsupportedFeature)&&void 0!==o&&o.call(n,"totals"))}},rb={type:{type:"string",component:"dropdown",ref:"qDef.columnWidth.type",translation:"Object.Table.Column.Width",options:[{value:ph.Auto,translation:"Common.Auto"},{value:ph.FitToContent,translation:"Object.Table.Column.FitToContent"},{value:ph.Pixels,translation:"Object.Table.Column.Pixels"},{value:ph.Percentage,translation:"Object.Table.Column.Percentage"}],defaultValue:ph.Auto},sizePixels:{ref:"qDef.columnWidth.pixels",translation:"Object.Table.Column.Pixels",type:"number",expression:"optional",defaultValue:200,show:e=>{var t;return(null===(t=e.qDef.columnWidth)||void 0===t?void 0:t.type)===ph.Pixels},change(e){e.qDef.columnWidth.pixels=void 0===e.qDef.columnWidth.pixels?e.qDef.columnWidth.pixels:Math.max(1,Math.min(dh.PixelsMax,e.qDef.columnWidth.pixels))}},sizePercentage:{ref:"qDef.columnWidth.percentage",translation:"Object.Table.Column.Percentage",type:"number",expression:"optional",defaultValue:20,show:e=>{var t;return(null===(t=e.qDef.columnWidth)||void 0===t?void 0:t.type)===ph.Percentage},change(e){e.qDef.columnWidth.percentage=void 0===e.qDef.columnWidth.percentage?e.qDef.columnWidth.percentage:Math.max(1,Math.min(dh.PercentageMax,e.qDef.columnWidth.percentage))}}},nb={autoSort:{ref:"qDef.autoSort",type:"boolean",defaultValue:!0,show:!1},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},tableCellColoring:{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",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}]},...eb,...rb},ob={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},createMasterItemButton:{},divider:{uses:"divider"},dimensionLimits:{uses:"dimensions.items.dimensionLimits"},showOthers:{uses:"dimensions.items.others"}},ib=(e,t)=>({libraryId:{type:"string",component:"library-item",libraryItemType:"measure",ref:"qLibraryId",translation:"Common.Measure",show:e=>{var r;return t?!!(e.qLibraryId||null!==(r=e.qDef.base)&&void 0!==r&&r.qLibraryId):!!e.qLibraryId}},inlineMeasure:{component:"inline-measure",show:e=>{var r;return t?!(e.qLibraryId||null!==(r=e.qDef.base)&&void 0!==r&&r.qLibraryId):!e.qLibraryId}},numberFormatting:{uses:"measures.items.numberFormatting"},createMasterItemButton:{},divider:{uses:"divider"},totalsAggr:tb(e)}),ab=(e,t)=>({type:"items",translation:"Common.Data",component:"data-assets-panel",items:{dimensions:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qDimensions",items:{field:{type:"items",translation:"Common.Field",items:ob},presentation:{type:"items",translation:"properties.presentation",items:{...nb,...Zg(e)}}}},measures:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qMeasures",items:{field:{type:"items",translation:"Common.Field",items:ib(e,t)},presentation:{type:"items",translation:"properties.presentation",items:{...nb,...Qg(e)}}}}}}),sb=e=>({type:"items",items:[{component:"styling-panel",chartTitle:"Object.StraightTable",subtitle:"LayerStyleEditor.component.styling",translation:"LayerStyleEditor.component.styling",ref:"components",useGeneral:!0,useBackground:e.flags.isEnabled("CLIENT_IM_6546_TABLE_BG_COLOR"),defaultValue:[],items:{headerSection:{translation:"properties.Header",component:"panel-section",items:{headerFontItem:{component:"items",ref:"components",key:"theme",items:{headerFontWrapper:{component:"inline-wrapper",items:{headerFontSize:{component:"integer",ref:"header.fontSize",translation:"properties.fontSize",width:9,min:5,max:300,defaultValue(e,t,r){var n,o;const i=r.theme.current();return parseInt(null!==(n=null===(o=i.object)||void 0===o||null===(o=o.straightTableV2)||void 0===o||null===(o=o.header)||void 0===o?void 0:o.fontSize)&&void 0!==n?n:i.fontSize,10)},change(e){e.header.fontSize=e.header.fontSize?Math.max(5,Math.min(300,Math.floor(e.header.fontSize))):e.header.fontSize}},headerFontColor:{show:!0,ref:"header.fontColor",type:"object",component:"color-picker",defaultValue(e,t,r){var n,o;const i=r.theme.current();return{color:null!==(n=null===(o=i.object)||void 0===o||null===(o=o.straightTableV2)||void 0===o||null===(o=o.header)||void 0===o?void 0:o.color)&&void 0!==n?n:i.color}},dualOutput:!0}}}}}}},contentSection:{component:"panel-section",translation:"properties.Content",items:{contentFontItem:{component:"items",ref:"components",key:"theme",items:{contentFontWrapper:{component:"inline-wrapper",items:{contentFontSize:{component:"integer",ref:"content.fontSize",translation:"properties.fontSize",width:9,min:5,max:300,defaultValue(e,t,r){var n,o;const i=r.theme.current();return parseInt(null!==(n=null===(o=i.object)||void 0===o||null===(o=o.straightTableV2)||void 0===o||null===(o=o.content)||void 0===o?void 0:o.fontSize)&&void 0!==n?n:i.fontSize,10)},change(e){e.content.fontSize=e.content.fontSize?Math.max(5,Math.min(300,Math.floor(e.content.fontSize))):e.content.fontSize}},contentFontColor:{ref:"content.fontColor",type:"object",component:"color-picker",defaultValue(e,t,r){var n,o;const i=r.theme.current();return{color:null!==(n=null===(o=i.object)||void 0===o||null===(o=o.straightTableV2)||void 0===o||null===(o=o.content)||void 0===o?void 0:o.color)&&void 0!==n?n:i.color}},dualOutput:!0}}}}}}},rowHeightSection:{show:()=>e.flags.isEnabled("CLIENT_IM_5715_LINKS_AND_IMAGES"),component:"panel-section",translation:"ThemeStyleEditor.style.rowHeight",items:{rowHeightItem:{component:"items",ref:"components",key:"theme",items:{rowHeightWrapper:{ref:"content.rowHeight",component:"integer",placeholder:1,maxlength:4,change(e){""!==e.content.rowHeight&&null!==e.content.rowHeight&&void 0!==e.content.rowHeight?e.content.rowHeight=Math.max(1,Math.min(50,Math.floor(e.content.rowHeight))):e.content.rowHeight=void 0}}}}}},hoverEffectSection:{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(e){var t;return null==e||null===(t=e.content)||void 0===t?void 0:t.hoverEffect},ref:"content.hoverColor",translation:"ThemeStyleEditor.style.hoverStyle",type:"object",component:"color-picker",dualOutput:!0},hoverEffectFontColorItem:{show(e){var t;return null==e||null===(t=e.content)||void 0===t?void 0:t.hoverEffect},ref:"content.hoverFontColor",translation:"ThemeStyleEditor.style.hoverFontStyle",type:"object",component:"color-picker",dualOutput:!0}}}}}}}]}),lb=e=>{var t,r;return{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:!(null!=e&&null!==(t=e.anything)&&void 0!==t&&null!==(t=t.sense)&&void 0!==t&&null!==(r=t.isUnsupportedFeature)&&void 0!==r&&r.call(t,"totals"))}},ub={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}},cb=e=>({uses:"settings",items:{presentation:{grouped:!0,type:"items",translation:"properties.presentation",items:[sb(e),lb(e),{ref:"usePagination",translation:"properties.usePagination",type:"boolean",component:"checkbox",defaultValue:!1}]},...ub}}),db={uses:"sorting"},pb={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}}}},fb=(e,t)=>({type:"items",component:"accordion",items:{data:ab(e,t),sorting:db,addOns:pb,settings:cb(e)}});function mb(e){const t=e.flags.isEnabled("CLIENT_IM-6276_PIVOT_MODIFIER");return{definition:fb(e,t),exploration:$g,data:Vg(e),support:{export:!0,exportData:!0,snapshot:!0,viewData:!1,exploration:!0,cssScaling:!0,modifiers:t?["accumulation","movingAverage","difference","normalization"]:void 0},importProperties(e,t,r,n){const o={defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()};return jg({exportFormat:e,initialProperties:t,extension:r,hypercubePath:n,defaultPropertyValues:o})},exportProperties:(e,t)=>Fg({propertyTree:e,hyperCubePath:t})}}const hb=(e,t)=>o((()=>((e,t)=>(r,{isDim:n,colIdx:o})=>{const i=n?o:o-e.qDimensionInfo.length,a=`/qHyperCubeDef/${n?"qDimensions":"qMeasures"}/${i}/qDef/columnWidth`,s=e[n?"qDimensionInfo":"qMeasureInfo"][i].columnWidth,l=s?{qPath:a,qOp:"Replace",qValue:JSON.stringify({...s,...r})}:{qPath:a,qOp:"Add",qValue:JSON.stringify(r)};null==t||t.applyPatches([l],!0)})(e,t)),[e,t]),gb=e=>-1===e?{}:e.qAttrExprInfo.reduce(((e,{id:t},r)=>(e[t]=r,e)),{});let bb;const vb=new Uint8Array(16);function yb(){if(!bb&&(bb="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!bb))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return bb(vb)}const xb=[];for(let e=0;e<256;++e)xb.push((e+256).toString(16).slice(1));var Sb={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Eb(e,t,r){if(Sb.randomUUID&&!t&&!e)return Sb.randomUUID();const n=(e=e||{}).random||(e.rng||yb)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=n[e];return t}return function(e,t=0){return xb[e[t+0]]+xb[e[t+1]]+xb[e[t+2]]+xb[e[t+3]]+"-"+xb[e[t+4]]+xb[e[t+5]]+"-"+xb[e[t+6]]+xb[e[t+7]]+"-"+xb[e[t+8]]+xb[e[t+9]]+"-"+xb[e[t+10]]+xb[e[t+11]]+xb[e[t+12]]+xb[e[t+13]]+xb[e[t+14]]+xb[e[t+15]]}(n)}const Cb=()=>{var e,t,r;return null!==(e=null===(t=crypto)||void 0===t||null===(r=t.randomUUID)||void 0===r?void 0:r.call(t))&&void 0!==e?e:Eb()},wb=({qLibraryId:e,cId:t})=>{var r;return null!==(r=null!=e?e:t)&&void 0!==r?r:Cb()};function Rb(e){return Rb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rb(e)}function Ab(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ib(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(o=n.key,i=void 0,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"))?i:String(i)),n)}var o,i}function Lb(e,t,r){return t&&Ib(e.prototype,t),r&&Ib(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Db(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mb(e,t)}function Pb(e){return Pb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Pb(e)}function Mb(e,t){return Mb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Mb(e,t)}function _b(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Tb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Pb(e);if(t){var o=Pb(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return _b(this,r)}}function kb(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ob(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ob(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ob(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var qb={fromSearchString:function(e){if(!e)return[];"?"===e[0]&&(e=e.substr(1));var t=[];return e.split("&").forEach((function(e){if(e){var r,n=e.indexOf("="),o="",i=!1;-1===n?r=e:(r=e.slice(0,n),o=e.slice(n+1),i=!0),t.push(function(e,t,r){return{key:Nb(e),value:Nb(t),useEqualSign:r}}(r,o,i))}})),t}};function Nb(e){try{return decodeURIComponent(e)}catch(t){return e}}function Fb(e){if(!(this instanceof Fb))throw new Error("Url needs to be called with the new keyword");if(!e)throw new Error("Url needs a string to operate on");var t=function(e){var t={authorityAndPath:"",search:"",hash:""},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:function(){return qb.fromSearchString(t.search)}}})}function zb(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";")}Fb.encodeAuthorityAndPath=function(e){return encodeURI(e).replace(/%5B/gi,"[").replace(/%5D/gi,"]").replace(/%25/gi,"%")},Fb.encodeSearchParams=function(e){for(var t,r="",n=0;n<e.length;n++)r+=0===n?"?":"&",r+=zb((t=e[n]).key),t.value?r+="=".concat(zb(t.value)):r+=t.useEqualSign?"=":"";return r};var jb,$b=function(){function e(t){Ab(this,e),this._input=t,this._pushback=null,this._temp=null,this._index=0,this._mark=0}return Lb(e,[{key:"_hasNext",value:function(){return null!=this._input&&(0!==this._input.length&&this._index<this._input.length)}},{key:"pushback",value:function(e){this._pushback=e}},{key:"index",value:function(){return this._index}},{key:"hasNext",value:function(){return null!=this._pushback||this._hasNext()}},{key:"next",value:function(){if(null!=this._pushback){var e=this._pushback;return this._pushback=null,e}return this._hasNext()?this._input.charAt(this._index++):null}},{key:"nextHex",value:function(){var e=this.next();return null==e?null:e.match(/[0-9A-Fa-f]/)?e:null}},{key:"peek",value:function(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}},{key:"mark",value:function(){this._temp=this._pushback,this._mark=this._index}},{key:"reset",value:function(){this._pushback=this._temp,this._index=this._mark}},{key:"remainder",value:function(){var e=this._input.substr(this._index);return null!=this._pushback&&(e=this._pushback+e),e}}]),e}(),Bb=function(){function e(){Ab(this,e)}return Lb(e,[{key:"decode",value:function(e){for(var t,r="",n=new $b(e);n.hasNext();)r+=null!=(t=this.decodeCharacter(n))?t:n.next();return r}},{key:"decodeCharacter",value:function(e){return e.next()}}]),e}(),Hb=function(e){return e>=0&&e<=1114111},Wb=function(e){return e.match(/[\s]/)},Gb=function(e){Db(r,e);var t=Tb(r);function r(){return Ab(this,r),t.apply(this,arguments)}return Lb(r,[{key:"decodeCharacter",value:function(e){e.mark();var t,r,n,o=e.next();if(null==o||"\\"!==o)return e.reset(),null;var 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(t=i,r=0;r<5&&(null!=(n=e.next())&&!Wb(n));r++){if("NaN"===parseInt(n,16)){e.pushback(n);break}t+=n}var a=parseInt(t,16);return Hb(a)?String.fromCharCode(a):"�"}}]),r}(Bb),Vb=function(){function e(t,r){Ab(this,e),this._key=t,this._value=r}return Lb(e,[{key:"getKey",value:function(){return this._key}},{key:"getValue",value:function(){return this._value}},{key:"equals",value:function(t){return t instanceof e&&(this._key===t._key&&this._value===t._value)}}],[{key:"newInstanceIfNeeded",value:function(){var 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}}]),e}(),Ub=function(){function e(){Ab(this,e)}return Lb(e,[{key:"setValue",value:function(e){this._nextMap=null,this._value=e}},{key:"getNextNode",value:function(e){return this._nextMap?this._nextMap[e]:null}},{key:"put",value:function(t,r,n){var o,i;if(t.length===r)return i=this._value,this.setValue(n),i;var a=t.charAt(r);return this._nextMap?(o=this._nextMap[a])||(o=new e,this._nextMap[a]=o):(this._nextMap={},o=new e,this._nextMap[a]=o),o.put(t,r+1,n)}},{key:"get",value:function(e,t){if(e.length<=t)return this._value;var r=this.getNextNode(e.charAt(t));return r?r.get(e,t+1):null}},{key:"getLongestMatch",value:function(e,t){if(e.length<=t)return Vb.newInstanceIfNeeded(e,this._value);var r=this.getNextNode(e.charAt(t));if(!r)return Vb.newInstanceIfNeeded(e,t,this._value);var n=r.getLongestMatch(e,t+1);return n||Vb.newInstanceIfNeeded(e,t,this._value)}}]),e}(),Yb=function(){function e(){Ab(this,e),this.clear()}return Lb(e,[{key:"getLongestMatch",value:function(e){return this.root&&e?this.root.getLongestMatch(e,0):null}},{key:"getMaxKeyLength",value:function(){return this.maxKeyLen}},{key:"clear",value:function(){this.root=null,this.maxKeyLen=0,this.size=0}},{key:"put",value:function(e,t){this.root||(this.root=new Ub);var r=this.root.put(e,0,t);return r||(e.length>this.maxKeyLen&&(this.maxKeyLen=e.length),this.size++,null)}}]),e}(),Kb=function(){var e,t,r,n=[],o=[],i=new Yb;for(e in n["&quot"]="34",n["&amp"]="38",n["&lt"]="60",n["&gt"]="62",n["&nbsp"]="160",n["&iexcl"]="161",n["&cent"]="162",n["&pound"]="163",n["&curren"]="164",n["&yen"]="165",n["&brvbar"]="166",n["&sect"]="167",n["&uml"]="168",n["&copy"]="169",n["&ordf"]="170",n["&laquo"]="171",n["&not"]="172",n["&shy"]="173",n["&reg"]="174",n["&macr"]="175",n["&deg"]="176",n["&plusmn"]="177",n["&sup2"]="178",n["&sup3"]="179",n["&acute"]="180",n["&micro"]="181",n["&para"]="182",n["&middot"]="183",n["&cedil"]="184",n["&sup1"]="185",n["&ordm"]="186",n["&raquo"]="187",n["&frac14"]="188",n["&frac12"]="189",n["&frac34"]="190",n["&iquest"]="191",n["&Agrave"]="192",n["&Aacute"]="193",n["&Acirc"]="194",n["&Atilde"]="195",n["&Auml"]="196",n["&Aring"]="197",n["&AElig"]="198",n["&Ccedil"]="199",n["&Egrave"]="200",n["&Eacute"]="201",n["&Ecirc"]="202",n["&Euml"]="203",n["&Igrave"]="204",n["&Iacute"]="205",n["&Icirc"]="206",n["&Iuml"]="207",n["&ETH"]="208",n["&Ntilde"]="209",n["&Ograve"]="210",n["&Oacute"]="211",n["&Ocirc"]="212",n["&Otilde"]="213",n["&Ouml"]="214",n["&times"]="215",n["&Oslash"]="216",n["&Ugrave"]="217",n["&Uacute"]="218",n["&Ucirc"]="219",n["&Uuml"]="220",n["&Yacute"]="221",n["&THORN"]="222",n["&szlig"]="223",n["&agrave"]="224",n["&aacute"]="225",n["&acirc"]="226",n["&atilde"]="227",n["&auml"]="228",n["&aring"]="229",n["&aelig"]="230",n["&ccedil"]="231",n["&egrave"]="232",n["&eacute"]="233",n["&ecirc"]="234",n["&euml"]="235",n["&igrave"]="236",n["&iacute"]="237",n["&icirc"]="238",n["&iuml"]="239",n["&eth"]="240",n["&ntilde"]="241",n["&ograve"]="242",n["&oacute"]="243",n["&ocirc"]="244",n["&otilde"]="245",n["&ouml"]="246",n["&divide"]="247",n["&oslash"]="248",n["&ugrave"]="249",n["&uacute"]="250",n["&ucirc"]="251",n["&uuml"]="252",n["&yacute"]="253",n["&thorn"]="254",n["&yuml"]="255",n["&OElig"]="338",n["&oelig"]="339",n["&Scaron"]="352",n["&scaron"]="353",n["&Yuml"]="376",n["&fnof"]="402",n["&circ"]="710",n["&tilde"]="732",n["&Alpha"]="913",n["&Beta"]="914",n["&Gamma"]="915",n["&Delta"]="916",n["&Epsilon"]="917",n["&Zeta"]="918",n["&Eta"]="919",n["&Theta"]="920",n["&Iota"]="921",n["&Kappa"]="922",n["&Lambda"]="923",n["&Mu"]="924",n["&Nu"]="925",n["&Xi"]="926",n["&Omicron"]="927",n["&Pi"]="928",n["&Rho"]="929",n["&Sigma"]="931",n["&Tau"]="932",n["&Upsilon"]="933",n["&Phi"]="934",n["&Chi"]="935",n["&Psi"]="936",n["&Omega"]="937",n["&alpha"]="945",n["&beta"]="946",n["&gamma"]="947",n["&delta"]="948",n["&epsilon"]="949",n["&zeta"]="950",n["&eta"]="951",n["&theta"]="952",n["&iota"]="953",n["&kappa"]="954",n["&lambda"]="955",n["&mu"]="956",n["&nu"]="957",n["&xi"]="958",n["&omicron"]="959",n["&pi"]="960",n["&rho"]="961",n["&sigmaf"]="962",n["&sigma"]="963",n["&tau"]="964",n["&upsilon"]="965",n["&phi"]="966",n["&chi"]="967",n["&psi"]="968",n["&omega"]="969",n["&thetasym"]="977",n["&upsih"]="978",n["&piv"]="982",n["&ensp"]="8194",n["&emsp"]="8195",n["&thinsp"]="8201",n["&zwnj"]="8204",n["&zwj"]="8205",n["&lrm"]="8206",n["&rlm"]="8207",n["&ndash"]="8211",n["&mdash"]="8212",n["&lsquo"]="8216",n["&rsquo"]="8217",n["&sbquo"]="8218",n["&ldquo"]="8220",n["&rdquo"]="8221",n["&bdquo"]="8222",n["&dagger"]="8224",n["&Dagger"]="8225",n["&bull"]="8226",n["&hellip"]="8230",n["&permil"]="8240",n["&prime"]="8242",n["&Prime"]="8243",n["&lsaquo"]="8249",n["&rsaquo"]="8250",n["&oline"]="8254",n["&frasl"]="8260",n["&euro"]="8364",n["&image"]="8365",n["&weierp"]="8472",n["&real"]="8476",n["&trade"]="8482",n["&alefsym"]="8501",n["&larr"]="8592",n["&uarr"]="8593",n["&rarr"]="8594",n["&darr"]="8595",n["&harr"]="8596",n["&crarr"]="8629",n["&lArr"]="8656",n["&uArr"]="8657",n["&rArr"]="8658",n["&dArr"]="8659",n["&hArr"]="8660",n["&forall"]="8704",n["&part"]="8706",n["&exist"]="8707",n["&empty"]="8709",n["&nabla"]="8711",n["&isin"]="8712",n["&notin"]="8713",n["&ni"]="8715",n["&prod"]="8719",n["&sum"]="8721",n["&minus"]="8722",n["&lowast"]="8727",n["&radic"]="8730",n["&prop"]="8733",n["&infin"]="8734",n["&ang"]="8736",n["&and"]="8743",n["&or"]="8744",n["&cap"]="8745",n["&cup"]="8746",n["&int"]="8747",n["&there4"]="8756",n["&sim"]="8764",n["&cong"]="8773",n["&asymp"]="8776",n["&ne"]="8800",n["&equiv"]="8801",n["&le"]="8804",n["&ge"]="8805",n["&sub"]="8834",n["&sup"]="8835",n["&nsub"]="8836",n["&sube"]="8838",n["&supe"]="8839",n["&oplus"]="8853",n["&otimes"]="8855",n["&perp"]="8869",n["&sdot"]="8901",n["&lceil"]="8968",n["&rceil"]="8969",n["&lfloor"]="8970",n["&rfloor"]="8971",n["&lang"]="9001",n["&rang"]="9002",n["&loz"]="9674",n["&spades"]="9824",n["&clubs"]="9827",n["&hearts"]="9829",n["&diams"]="9830",n)"function"!=typeof n[e]&&n.hasOwnProperty(e)&&(o[n[e]]=e);for(t in o)"function"!=typeof o[t]&&o.hasOwnProperty(t)&&(r=o[t].toLowerCase().substr(1),i.put(r,String.fromCharCode(t)));return i}(),Xb=function(e){Db(r,e);var t=Tb(r);function r(){return Ab(this,r),t.apply(this,arguments)}return Lb(r,[{key:"decodeCharacter",value:function(e){var t;e.mark();var r=e.next();if(null==r||"&"!==r)return e.reset(),null;var n=e.next();if(null==n)return e.reset(),null;if("#"===n){if(null!=(t=this._getNumericEntity(e)))return t}else if(n.match(/[A-Za-z]/)&&(e.pushback(n),null!=(t=this._getNamedEntity(e))))return t;return e.reset(),null}},{key:"_getNamedEntity",value:function(e){var t,r,n,o="";for(t=Math.min(e.remainder().length,Kb.getMaxKeyLength()),n=0;n<t;n++)o+=e.next().toLowerCase();var i=Kb.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()}},{key:"_getNumericEntity",value:function(e){var t=e.peek();return null==t?null:"x"===t||"X"===t?(e.next(),this._parseHex(e)):this._parseNumber(e)}},{key:"_parseHex",value:function(e){for(var t,r="";e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,16))){if(";"===t){e.next();break}break}r+=t,e.next()}var n=parseInt(r,16);return!Number.isNaN(+n)&&Hb(n)?String.fromCharCode(n):null}},{key:"_parseNumber",value:function(e){for(var t,r="";e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,10))){if(";"===t){e.next();break}break}r+=t,e.next()}var n=parseInt(r,10);return!Number.isNaN(+n)&&Hb(n)?String.fromCharCode(n):null}}]),r}(Bb),Jb=function(e){Db(r,e);var t=Tb(r);function r(){return Ab(this,r),t.apply(this,arguments)}return Lb(r,[{key:"decodeCharacter",value:function(e){e.mark();var t,r,n,o,i=e.next();if(null==i)return e.reset(),null;if("%"!==i)return e.reset(),null;for(t="",r=0;r<2;r++)null!=(n=e.nextHex())&&(t+=n);return 2===t.length&&(o=parseInt(t,16),Hb(o))?String.fromCharCode(o):(e.reset(),null)}}]),r}(Bb),Zb=/^data:(?<!\s)\s*(image\/[\w+-.]+)(?<!\s)\s*(;.*?){0,1}(?<!\s)\s*,(.*)/i;"undefined"!=typeof document&&(jb=document.createElement("div"));var Qb=Array.prototype.indexOf,ev=[",",".","_"," "],tv={default:[",",".","-","_"," "]},rv={width:["%"],height:["%"]},nv={default:["-"," ","%"],color:["#"," ","(",")"],image:["(",")",":","/","?","&","-",".",'"',"="," "]},ov={background:["(",")",":","%","/","?","&","-"," ",".",'"',"=","#"],"background-image":nv.image,"background-color":nv.color,"border-color":nv.color,"border-image":nv.image,color:nv.color,icon:nv.image,"list-style-image":nv.image,"outline-color":nv.color},iv={attr_name:["on[a-z]{1,}","style","href","src"],attr_val:["javascript:"],css_key:["behavior","-moz-behavior","-ms-behavior"],css_val:["expression"]};function av(e,t,r){var n;if(t){if(Qb)return Qb.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 sv(e){if(null==e)return"";var t,r=document.createTextNode(e);return jb.appendChild(r),t=jb.innerHTML,jb.removeChild(r),t}function lv(e,t,r){var n,o,i,a,s,l,u,c,d;if(e=cv(e).toLowerCase(),t=cv(t),av(e,iv.attr_name)>=0)throw new Error("Unsafe attribute name used: ".concat(e));for(i=0;i<iv.attr_val;i++)if(t.toLowerCase().match(iv.attr_val[i]))throw new Error("Unsafe attribute value used: ".concat(t));if((n=rv[e])||(n=tv.default),o="",!r){for(a=0;a<e.length;a++){if(!(s=e.charAt(a)).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]/)&&av(u,n)<0?(d=c.toString(16),o+="&#x".concat(d,";")):o+=u;return r||(o+='"'),o}function uv(e,t,r){var n,o,i,a,s,l,u,c,d,p;if(e=cv(e).toLowerCase(),t=cv(t),av(e,iv.css_key)>=0)throw new Error("Unsafe property name used: ".concat(e));for(n=0;n<iv.css_val.length;n++)if(t.toLowerCase().indexOf(iv.css_val[n])>=0)throw new Error("Unsafe property value used: ".concat(t));if((o=ov[e])||(o=nv.default),i="",!r){for(a=0;a<e.length;a++){if(!(s=e.charAt(a)).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]/)&&av(u,o)<0?(d=c.toString(16),p="000000".substr(d.length),i+="\\".concat(p).concat(d)):i+=u;return i}function cv(e,t){var r,n,o,i,a=!1;if(null===e)return null;r=e,n=e,o=0;for(var s=[new Xb,new Jb,new Gb];!a;){n=r;for(var l=0;l<s.length;l++)(i=s[l].decode(r))!==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}for(var dv=[],pv=0;pv<255;pv++)dv[pv]=pv>=48&&pv<=57||pv>=65&&pv<=90||pv>=97&&pv<=122?null:pv.toString(16);var fv=function(e){return sv(e.unsafe)},mv=function(e){var t,r=[],n=[],o={},i="";for(t in e.map?r=e.map:r[e.name]=e.unsafe,r)"function"!=typeof r[t]&&r.hasOwnProperty(t)&&(n[t]=uv(t,r[t],!0),i+=uv(t,r[t],!0),o[t]=n[t]);return e.map?o:i},hv=function(e){var t=[],r=[],n={},o="";for(var i in e.map?t=e.map:t[e.name]=e.unsafe,t)"function"!=typeof t[i]&&t.hasOwnProperty(i)&&(r[i]=lv(i,t[i],!0),o+=lv(i,t[i],!0),n[i]=r[i]);return e.map?n:o};function gv(e,t){throw new Error(t)}var bv={canonicalize:cv,encode:function(){var e={context:"html",unsafe:null,name:null,map:null,setter:null,strict:!0};return 1===arguments.length&&"object"===Rb(arguments[0])?function(){for(var e,t,r,n=arguments[0]||{},o=1,i=arguments.length;o<i;o++)if(null!=(e=arguments[o]))for(t in e)if(e.hasOwnProperty(t)){if(n===(r=e[t]))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?fv(e):"css"===e.context?(null!=e.map&&"object"!==Rb(e.map)&&gv(this,"Invalid parameter type"),mv(e)):"attr"===e.context?(null!=e.map&&"object"!==Rb(e.map)&&gv(this,"Invalid parameter type"),hv(e)):void gv(this,"Invalid parameter type")},encodeForAttr:lv,encodeForAttr2:function(e){return lv("nonsens",e,!0)},encodeForCSS:uv,encodeForHref:function(e){cv(e),0!==e.search("[a-zA-Z0-9]+:")&&(e="http://".concat(e));var t=new Fb(e),r=Fb.encodeAuthorityAndPath(decodeURI(t.authorityAndPath)),n=t.searchParams,o=(e=r+Fb.encodeSearchParams(n)+t.hash).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){var r,n,o,i,a,s;for(t||(t=ev),s="",r=0;r<e.length;r++)o=e.charAt(r),i=e.charCodeAt(r),av(o,t)>=0||null==dv[i]?s+=o:(n=i.toString(16),i<256?(a="00".substr(n.length),s+="\\x".concat(a).concat(n.toUpperCase())):(a="0000".substr(n.length),s+="\\u".concat(a).concat(n.toUpperCase())));return s},encodeForHTML:sv,encodeForURL:function(e,t){var r="";return t&&(t.match(/^[A-Za-z\-0-9]{1,}$/)?r+=cv(t).toLowerCase():gv(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?'"':""},isSafeDataURL:function(e,t){var r=null!=t?t:{},n=r.maxByteSizeSvg,o=void 0===n?5e5:n,i=r.maxByteSizeImage,a=void 0===i?5e6:i,s=function(e){var t,r=kb(null!==(t=Zb.exec(e.trim()))&&void 0!==t?t:[],4),n=r[1];return{encoding:r[2],data:r[3],mimeType:null==n?void 0:n.toLocaleLowerCase()}}(e),l=s.mimeType,u=s.encoding,c=s.data;if(!c)return!0;var d=function(e,t,r){var n={type:e};if(null!=t&&t.includes(";base64"))try{return new Blob([atob(r)],n).size}catch(e){return new Blob([r],n).size}return"image/svg+xml"===e?new Blob([r],n).size:0}(l,u,c);return"image/svg+xml"===l?d<=o:d<=a}};const vv=(e,t)=>{var r;const n=Array.isArray(t.qAttrExps)?t.qAttrExps[0]:t.qAttrExps;return null==n||null===(r=n.qValues)||void 0===r?void 0:r[e]},yv=e=>{switch(e){case"topLeft":default:return{horizontal:"flex-start",vertical:"flex-start"};case"centerLeft":return{horizontal:"center",vertical:"flex-start"};case"bottomLeft":return{horizontal:"flex-end",vertical:"flex-start"};case"topCenter":return{horizontal:"flex-start",vertical:"center"};case"centerCenter":return{horizontal:"center",vertical:"center"};case"bottomCenter":return{horizontal:"flex-end",vertical:"center"};case"topRight":return{horizontal:"flex-start",vertical:"flex-end"};case"centerRight":return{horizontal:"center",vertical:"flex-end"};case"bottomRight":return{horizontal:"flex-end",vertical:"flex-end"}}};let xv=function(e){return e.Text="text",e.Link="link",e.Image="image",e}({}),Sv=function(e){return e.Attribute="attribute",e.Dimension="dimension",e}({});const Ev=({text:e,url:t,imageSize:r,imagePosition:n})=>n&&t&&!t.toLowerCase().includes("javascript:")&&bv.isSafeDataURL(t)?{type:xv.Image,url:t,text:e,imageSize:r,resolvedImagePosition:yv(n)}:{type:xv.Text,url:void 0,text:e},Cv=(e,t,r)=>{var n;const o=Array.isArray(t.qAttrExps)?t.qAttrExps[0]:t.qAttrExps,i=null==o||null===(n=o.qValues)||void 0===n?void 0:n[e];if(i){const e=Number.isNaN(+i.qNum)?void 0:`${i.qNum}`;return i.qText||e}return(null==r?void 0:r.urlPosition)===Sv.Attribute||null==r?void 0:r.urlLabel},wv=({text:e,url:t})=>{try{if(!t)throw Error("Invalid url");return{type:xv.Link,url:bv.encodeForHref(t),text:e}}catch(t){return{type:xv.Text,url:void 0,text:e}}},Rv=(e,t,r,n)=>{var o,i;const a=(e=>{switch(null==e?void 0:e.type){case"url":return xv.Link;case"image":return xv.Image;default:return xv.Text}})(t);return a!==xv.Image||!n.flags.isEnabled("CLIENT_IM_5715_LINKS_AND_IMAGES")||null!==(o=n.anything.sense)&&void 0!==o&&null!==(i=o.isUnsupportedFeature)&&void 0!==i&&i.call(o,"tableImages")?a===xv.Link&&n.flags.isEnabled("CLIENT_IM_5715_LINKS")?((e,t,r)=>{const{urlPosition:n}=null!=t?t:{};if(n===Sv.Attribute){var o;const n=Cv(null!==(o=r.url)&&void 0!==o?o:-1,e,t),i=e.qText||n||"";return wv({text:i,url:n})}if(n===Sv.Dimension){var i;const n=Cv(null!==(i=r.urlLabel)&&void 0!==i?i:-1,e,t)||e.qText;return wv({text:n,url:e.qText})}return{type:xv.Text,url:void 0,text:e.qText}})(e,t,r):{type:xv.Text,url:void 0,text:e.qText}:((e,t,r)=>{const{imageSize:n,imagePosition:o,imageSetting:i,imageLabel:a}=null!=t?t:{};if("url"===i){var s,l;const t=e.qText,i=null===(s=vv(null!==(l=r.imageUrl)&&void 0!==l?l:-1,e))||void 0===s?void 0:s.qText;return Ev({text:t,url:i,imageSize:n,imagePosition:o})}if("label"===i){var u,c,d;const t=e.qText;if(-1===r.imageLabel)return Ev({text:a||t||"",url:t,imageSize:n,imagePosition:o});const i=null!==(u=null===(c=vv(null!==(d=r.imageLabel)&&void 0!==d?d:-1,e))||void 0===c?void 0:c.qText)&&void 0!==u?u:e.qText;return Ev({text:i,url:t,imageSize:n,imagePosition:o})}return{type:xv.Text,url:void 0,text:e.qText}})(e,t,r)},Av=e=>!Number.isNaN(+e),Iv=e=>!(!e.qNum&&0!==e.qNum||!Av(e.qNum)),Lv=1e4;function Dv(e,t){return[...t].reverse().find((t=>t*e<=Lv))||Math.floor(Lv/e)}function Pv(e,t){var r,n;if(null!==(r=t.viewState)&&void 0!==r&&r.skipTotals)return{atTop:!1,atBottom:!1};const[o,i,a,s,l]=[e.qHyperCube.qDimensionInfo.length>0,e.qHyperCube.qMeasureInfo.length>0,e.qHyperCube.qGrandTotalRow.length>0,null===(n=e.totals)||void 0===n?void 0:n.show,e.totals.position];if(a&&(o&&i||!s&&!o)){if(s||"top"===l)return{atTop:!0,atBottom:!1};if(!s&&"bottom"===l)return{atTop:!1,atBottom:!0}}return{atTop:!1,atBottom:!1}}function Mv(e,t,r,n){var o,i,a;return t?0===r&&null!==(a=e.totals.label)&&void 0!==a?a:"":null!==(o=null===(i=e.qHyperCube.qGrandTotalRow[n])||void 0===i?void 0:i.qText)&&void 0!==o?o:""}function _v(e,t){const r=e.qHyperCube.qGrandTotalRow[t];return Av(null==r?void 0:r.qNum)}function Tv(e,t,r){return e&&!e.auto?{headTextAlign:e.align,totalsTextAlign:e.align,bodyTextAlign:e.align}:{headTextAlign:"N"===t||void 0===t?"right":"left",totalsTextAlign:r?"left":"right",bodyTextAlign:"auto"}}const kv=(e,t)=>"auto"!==t?t:Iv(e)?"right":"left";const Ov=e=>{const{qHyperCube:{qColumnOrder:t,qDimensionInfo:r,qMeasureInfo:n}}=e,o=r.length+n.length,i=(null==t?void 0:t.length)===o?t:Array.from(Array(o).keys()),{visibleColumnsOrder:a,visibleColumnIndexes:s}=((e,t,r)=>{const n=t.length,o=[];let i=0,a=0;return{visibleColumnsOrder:e.filter((e=>{const s=e<n,{qError:l}=s?t[e]:r[e-n],u=7005===(null==l?void 0:l.qErrorCode);return u?s?i++:a++:o[e]=s?e-i:e-n-a,!u})),visibleColumnIndexes:o}})(i,r,n);return a.map(((t,r)=>function(e,t,r,n){const{qDimensionInfo:o,qMeasureInfo:i,qEffectiveInterColumnSortOrder:a}=e.qHyperCube,s=o.length,l=t<s,u=l?o[t]:i[t-s],c=t===a[0];let d,p=0,f="",m=!1,h=-1;const{representation:g}=u;if(l){const e=u;p=e.qGroupPos,f=e.qGroupFieldDefs[p],m=e.qLocked,h=n,({qDimensionType:d}=e)}const{qFallbackTitle:b,textAlign:v,qAttrExprInfo:y,qSortIndicator:x,qReverseSort:S,qApprMaxGlyphCount:E,columnWidth:C,qLibraryId:w}=u;return{isDim:l,isLocked:m,fieldId:f,colIdx:t,qLibraryId:w,pageColIdx:r,qApprMaxGlyphCount:E,qReverseSort:S,columnWidth:C,selectionColIdx:h,isActivelySorted:c,id:wb(u),label:b,qAttrExprInfoIDs:y.map((e=>e.id)),qAttrExprInfoIndex:gb(u),sortDirection:x&&"N"!==x?x:"A",totalInfo:Mv(e,l,r,n),...!l&&{isTotalNumeric:_v(e,n)},...Tv(v,d,l),representation:g}}(e,t,r,s[t])))};const qv=(e,t)=>{var r;return!!(e.snapshotData||null!==(r=t.viewState)&&void 0!==r&&r.visibleHeight)},Nv=(e,t)=>{var r;return void 0!==(null===(r=t.viewState)||void 0===r?void 0:r.usePagination)?t.viewState.usePagination:!1!==e.usePagination||qv(e,t)};var Fv="$$material";function zv(e){const{injectFirst:t,children:r}=e;if(t&&"undefined"!=typeof window){const e=document.head;if(!e.querySelector('[data-styled="active"]')){const t=document.createElement("style");t.setAttribute("data-styled","active"),e.insertBefore(t,e.firstChild)}}return r}zv.propTypes={children:U.node,injectFirst:U.bool};const jv=Ln((e=>{const{styles:t,defaultTheme:r={}}=e;return"function"==typeof t?t(null==(n=e.theme)||0===Object.keys(n).length?r:e.theme):t;var n}));var $v=jv;
102
102
  /**
103
103
  * @mui/styled-engine-sc v6.0.0-alpha.18
104
104
  *
@@ -198,4 +198,4 @@ function Bv(e,t){let r;return r=t?An(e).withConfig({displayName:t.label,shouldFo
198
198
  animation-iteration-count: infinite;
199
199
  animation-delay: 200ms;
200
200
  }
201
- `),wE.rippleVisible,ME,550,(({theme:e})=>e.transitions.easing.easeInOut),wE.ripplePulsate,(({theme:e})=>e.transitions.duration.shorter),wE.child,wE.childLeaving,_E,550,(({theme:e})=>e.transitions.easing.easeInOut),wE.childPulsate,TE,(({theme:e})=>e.transitions.easing.easeInOut));var qE=x.forwardRef((function(e,t){const r=cS({props:e,name:"MuiTouchRipple"}),{center:n=!1,classes:o={},className:i}=r,a=X(r,RE),[s,l]=x.useState([]),u=x.useRef(0),c=x.useRef(null);x.useEffect((()=>{c.current&&(c.current(),c.current=null)}),[s]);const d=x.useRef(!1),p=xo(),f=x.useRef(null),m=x.useRef(null),h=x.useCallback((e=>{const{pulsate:t,rippleX:r,rippleY:n,rippleSize:i,cb:a}=e;l((e=>[...e,Qi.jsx(OE,{classes:{ripple:ia(o.ripple,wE.ripple),rippleVisible:ia(o.rippleVisible,wE.rippleVisible),ripplePulsate:ia(o.ripplePulsate,wE.ripplePulsate),child:ia(o.child,wE.child),childLeaving:ia(o.childLeaving,wE.childLeaving),childPulsate:ia(o.childPulsate,wE.childPulsate)},timeout:550,pulsate:t,rippleX:r,rippleY:n,rippleSize:i},u.current)])),u.current+=1,c.current=a}),[o]),g=x.useCallback(((e={},t={},r=(()=>{}))=>{const{pulsate:o=!1,center:i=n||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&d.current)return void(d.current=!1);"touchstart"===(null==e?void 0:e.type)&&(d.current=!0);const s=a?null:m.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let u,c,g;if(i||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)u=Math.round(l.width/2),c=Math.round(l.height/2);else{const{clientX:t,clientY:r}=e.touches&&e.touches.length>0?e.touches[0]:e;u=Math.round(t-l.left),c=Math.round(r-l.top)}if(i)g=Math.sqrt((2*l.width**2+l.height**2)/3),g%2==0&&(g+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-u),u)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-c),c)+2;g=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===f.current&&(f.current=()=>{h({pulsate:o,rippleX:u,rippleY:c,rippleSize:g,cb:r})},p.start(80,(()=>{f.current&&(f.current(),f.current=null)}))):h({pulsate:o,rippleX:u,rippleY:c,rippleSize:g,cb:r})}),[n,h,p]),b=x.useCallback((()=>{g({},{pulsate:!0})}),[g]),v=x.useCallback(((e,t)=>{if(p.clear(),"touchend"===(null==e?void 0:e.type)&&f.current)return f.current(),f.current=null,void p.start(0,(()=>{v(e,t)}));f.current=null,l((e=>e.length>0?e.slice(1):e)),c.current=t}),[p]);return x.useImperativeHandle(t,(()=>({pulsate:b,start:g,stop:v})),[b,g,v]),Qi.jsx(kE,$({className:ia(wE.root,o.root,i),ref:m},a,{children:Qi.jsx(ml,{component:null,exit:!0,children:s})}))}));function NE(e){return Oo("MuiButtonBase",e)}var FE=qo("MuiButtonBase",["root","disabled","focusVisible"]);const zE=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],jE=$S("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${FE.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),$E=x.forwardRef((function(e,t){const r=cS({props:e,name:"MuiButtonBase"}),{action:n,centerRipple:o=!1,children:i,className:a,component:s="button",disabled:l=!1,disableRipple:u=!1,disableTouchRipple:c=!1,focusRipple:d=!1,LinkComponent:p="a",onBlur:f,onClick:m,onContextMenu:h,onDragLeave:g,onFocus:b,onFocusVisible:v,onKeyDown:y,onKeyUp:S,onMouseDown:E,onMouseLeave:C,onMouseUp:w,onTouchEnd:R,onTouchMove:A,onTouchStart:I,tabIndex:L=0,TouchRippleProps:D,touchRippleRef:P,type:M}=r,_=X(r,zE),T=x.useRef(null),k=x.useRef(null),O=go(k,P),{isFocusVisibleRef:q,onFocus:N,onBlur:F,ref:z}=Do(),[j,B]=x.useState(!1);l&&j&&B(!1),x.useImperativeHandle(n,(()=>({focusVisible:()=>{B(!0),T.current.focus()}})),[]);const[H,W]=x.useState(!1);x.useEffect((()=>{W(!0)}),[]);const G=H&&!u&&!l;function V(e,t,r=c){return ho((n=>{t&&t(n);return!r&&k.current&&k.current[e](n),!0}))}x.useEffect((()=>{j&&d&&!u&&H&&k.current.pulsate()}),[u,d,j,H]);const U=V("start",E),Y=V("stop",h),K=V("stop",g),J=V("stop",w),Z=V("stop",(e=>{j&&e.preventDefault(),C&&C(e)})),Q=V("start",I),ee=V("stop",R),te=V("stop",A),re=V("stop",(e=>{F(e),!1===q.current&&B(!1),f&&f(e)}),!1),ne=ho((e=>{T.current||(T.current=e.currentTarget),N(e),!0===q.current&&(B(!0),v&&v(e)),b&&b(e)})),oe=()=>{const e=T.current;return s&&"button"!==s&&!("A"===e.tagName&&e.href)},ie=x.useRef(!1),ae=ho((e=>{d&&!ie.current&&j&&k.current&&" "===e.key&&(ie.current=!0,k.current.stop(e,(()=>{k.current.start(e)}))),e.target===e.currentTarget&&oe()&&" "===e.key&&e.preventDefault(),y&&y(e),e.target===e.currentTarget&&oe()&&"Enter"===e.key&&!l&&(e.preventDefault(),m&&m(e))})),se=ho((e=>{d&&" "===e.key&&k.current&&j&&!e.defaultPrevented&&(ie.current=!1,k.current.stop(e,(()=>{k.current.pulsate(e)}))),S&&S(e),m&&e.target===e.currentTarget&&oe()&&" "===e.key&&!e.defaultPrevented&&m(e)}));let le=s;"button"===le&&(_.href||_.to)&&(le=p);const ue={};"button"===le?(ue.type=void 0===M?"button":M,ue.disabled=l):(_.href||_.to||(ue.role="button"),l&&(ue["aria-disabled"]=l));const ce=go(t,z,T),de=$({},r,{centerRipple:o,component:s,disabled:l,disableRipple:u,disableTouchRipple:c,focusRipple:d,tabIndex:L,focusVisible:j}),pe=(e=>{const{disabled:t,focusVisible:r,focusVisibleClassName:n,classes:o}=e,i=Mo({root:["root",t&&"disabled",r&&"focusVisible"]},NE,o);return r&&n&&(i.root+=` ${n}`),i})(de);return Qi.jsxs(jE,$({as:le,className:ia(pe.root,a),ownerState:de,onBlur:re,onClick:m,onContextMenu:Y,onFocus:ne,onKeyDown:ae,onKeyUp:se,onMouseDown:U,onMouseLeave:Z,onMouseUp:J,onDragLeave:K,onTouchEnd:ee,onTouchMove:te,onTouchStart:Q,ref:ce,tabIndex:l?-1:L,type:M},ue,_,{children:[i,G?Qi.jsx(qE,$({ref:O,center:o},D)):null]}))}));var BE=$E;var HE=qo("MuiBox",["root"]);const WE=lS(),GE=function(e={}){const{themeId:t,defaultTheme:r,defaultClassName:n="MuiBox-root",generateClassName:o}=e,i=Bv("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(Wy);return x.forwardRef((function(e,a){const s=Jy(r),l=ex(e),{className:u,component:c="div"}=l,d=X(l,rx);return Qi.jsx(i,$({as:c,ref:a,className:ia(u,o?o(n):n),theme:t&&s[t]||s},d))}))}({themeId:Fv,defaultTheme:WE,defaultClassName:HE.root,generateClassName:To.generate});var VE=GE;function UE(e){return Oo("MuiDivider",e)}var YE=qo("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);const KE=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],XE=$S("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.absolute&&t.absolute,t[r.variant],r.light&&t.light,"vertical"===r.orientation&&t.vertical,r.flexItem&&t.flexItem,r.children&&t.withChildren,r.children&&"vertical"===r.orientation&&t.withChildrenVertical,"right"===r.textAlign&&"vertical"!==r.orientation&&t.textAlignRight,"left"===r.textAlign&&"vertical"!==r.orientation&&t.textAlignLeft]}})((({theme:e,ownerState:t})=>$({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},t.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},t.light&&{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:vx(e.palette.divider,.08)},"inset"===t.variant&&{marginLeft:72},"middle"===t.variant&&"horizontal"===t.orientation&&{marginLeft:e.spacing(2),marginRight:e.spacing(2)},"middle"===t.variant&&"vertical"===t.orientation&&{marginTop:e.spacing(1),marginBottom:e.spacing(1)},"vertical"===t.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},t.flexItem&&{alignSelf:"stretch",height:"auto"})),(({ownerState:e})=>$({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{content:'""',alignSelf:"center"}})),(({theme:e,ownerState:t})=>$({},t.children&&"vertical"!==t.orientation&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`}})),(({theme:e,ownerState:t})=>$({},t.children&&"vertical"===t.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`}})),(({ownerState:e})=>$({},"right"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}}))),JE=$S("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.wrapper,"vertical"===r.orientation&&t.wrapperVertical]}})((({theme:e,ownerState:t})=>$({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`},"vertical"===t.orientation&&{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}))),ZE=x.forwardRef((function(e,t){const r=cS({props:e,name:"MuiDivider"}),{absolute:n=!1,children:o,className:i,component:a=(o?"div":"hr"),flexItem:s=!1,light:l=!1,orientation:u="horizontal",role:c=("hr"!==a?"separator":void 0),textAlign:d="center",variant:p="fullWidth"}=r,f=X(r,KE),m=$({},r,{absolute:n,component:a,flexItem:s,light:l,orientation:u,role:c,textAlign:d,variant:p}),h=(e=>{const{absolute:t,children:r,classes:n,flexItem:o,light:i,orientation:a,textAlign:s,variant:l}=e;return Mo({root:["root",t&&"absolute",l,i&&"light","vertical"===a&&"vertical",o&&"flexItem",r&&"withChildren",r&&"vertical"===a&&"withChildrenVertical","right"===s&&"vertical"!==a&&"textAlignRight","left"===s&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]},UE,n)})(m);return Qi.jsx(XE,$({as:a,className:ia(h.root,i),role:c,ref:t,ownerState:m},f,{children:o?Qi.jsx(JE,{className:h.wrapper,ownerState:m,children:o}):null}))}));ZE.muiSkipListHighlight=!0;var QE=ZE;var eC=x.createContext({});function tC(e){return Oo("MuiListItemIcon",e)}var rC=qo("MuiListItemIcon",["root","alignItemsFlexStart"]);const nC=["className"],oC=$S("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,"flex-start"===r.alignItems&&t.alignItemsFlexStart]}})((({theme:e,ownerState:t})=>$({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===t.alignItems&&{marginTop:8})));var iC=x.forwardRef((function(e,t){const r=cS({props:e,name:"MuiListItemIcon"}),{className:n}=r,o=X(r,nC),i=$({},r,{alignItems:x.useContext(eC).alignItems}),a=(e=>{const{alignItems:t,classes:r}=e;return Mo({root:["root","flex-start"===t&&"alignItemsFlexStart"]},tC,r)})(i);return Qi.jsx(oC,$({className:ia(a.root,n),ownerState:i,ref:t},o))}));var aC=qo("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);function sC(e){return Oo("MuiMenuItem",e)}var lC=qo("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]);const uC=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],cC=$S(BE,{shouldForwardProp:e=>jS(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.dense&&t.dense,r.divider&&t.divider,!r.disableGutters&&t.gutters]}})((({theme:e,ownerState:t})=>$({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${lC.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:vx(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${lC.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:vx(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${lC.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:vx(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:vx(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${lC.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${lC.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${YE.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${YE.inset}`]:{marginLeft:52},[`& .${aC.root}`]:{marginTop:0,marginBottom:0},[`& .${aC.inset}`]:{paddingLeft:36},[`& .${rC.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&$({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${rC.root} svg`]:{fontSize:"1.25rem"}}))));var dC=x.forwardRef((function(e,t){const r=cS({props:e,name:"MuiMenuItem"}),{autoFocus:n=!1,component:o="li",dense:i=!1,divider:a=!1,disableGutters:s=!1,focusVisibleClassName:l,role:u="menuitem",tabIndex:c,className:d}=r,p=X(r,uC),f=x.useContext(eC),m=x.useMemo((()=>({dense:i||f.dense||!1,disableGutters:s})),[f.dense,i,s]),h=x.useRef(null);mo((()=>{n&&h.current&&h.current.focus()}),[n]);const g=$({},r,{dense:m.dense,divider:a,disableGutters:s}),b=(e=>{const{disabled:t,dense:r,divider:n,disableGutters:o,selected:i,classes:a}=e;return $({},a,Mo({root:["root",r&&"dense",t&&"disabled",!o&&"gutters",n&&"divider",i&&"selected"]},sC,a))})(r),v=go(h,t);let y;return r.disabled||(y=void 0!==c?c:-1),Qi.jsx(eC.Provider,{value:m,children:Qi.jsx(cC,$({ref:v,role:u,tabIndex:y,component:o,focusVisibleClassName:ia(b.focusVisible,l),className:ia(b.root,d)},p,{ownerState:g,classes:b}))})}));var pC=x.createContext();function fC(e){return Oo("MuiTable",e)}qo("MuiTable",["root","stickyHeader"]);const mC=["className","component","padding","size","stickyHeader"],hC=$S("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.stickyHeader&&t.stickyHeader]}})((({theme:e,ownerState:t})=>$({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":$({},e.typography.body2,{padding:e.spacing(2),color:(e.vars||e).palette.text.secondary,textAlign:"left",captionSide:"bottom"})},t.stickyHeader&&{borderCollapse:"separate"}))),gC="table",bC=x.forwardRef((function(e,t){const r=cS({props:e,name:"MuiTable"}),{className:n,component:o=gC,padding:i="normal",size:a="medium",stickyHeader:s=!1}=r,l=X(r,mC),u=$({},r,{component:o,padding:i,size:a,stickyHeader:s}),c=(e=>{const{classes:t,stickyHeader:r}=e;return Mo({root:["root",r&&"stickyHeader"]},fC,t)})(u),d=x.useMemo((()=>({padding:i,size:a,stickyHeader:s})),[i,a,s]);return Qi.jsx(pC.Provider,{value:d,children:Qi.jsx(hC,$({as:o,role:o===gC?null:"table",ref:t,className:ia(c.root,n),ownerState:u},l))})}));var vC=bC;var yC=x.createContext();function xC(e){return Oo("MuiTableBody",e)}qo("MuiTableBody",["root"]);const SC=["className","component"],EC=$S("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-row-group"}),CC={variant:"body"},wC="tbody";var RC=x.forwardRef((function(e,t){const r=cS({props:e,name:"MuiTableBody"}),{className:n,component:o=wC}=r,i=X(r,SC),a=$({},r,{component:o}),s=(e=>{const{classes:t}=e;return Mo({root:["root"]},xC,t)})(a);return Qi.jsx(yC.Provider,{value:CC,children:Qi.jsx(EC,$({className:ia(s.root,n),as:o,ref:t,role:o===wC?null:"rowgroup",ownerState:a},i))})}));function AC(e){return Oo("MuiTableCell",e)}var IC=qo("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]);const LC=["align","className","component","padding","scope","size","sortDirection","variant"],DC=$S("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`size${so(r.size)}`],"normal"!==r.padding&&t[`padding${so(r.padding)}`],"inherit"!==r.align&&t[`align${so(r.align)}`],r.stickyHeader&&t.stickyHeader]}})((({theme:e,ownerState:t})=>$({},e.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid\n ${"light"===e.palette.mode?Sx(vx(e.palette.divider,1),.88):yx(vx(e.palette.divider,1),.68)}`,textAlign:"left",padding:16},"head"===t.variant&&{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium},"body"===t.variant&&{color:(e.vars||e).palette.text.primary},"footer"===t.variant&&{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)},"small"===t.size&&{padding:"6px 16px",[`&.${IC.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},"checkbox"===t.padding&&{width:48,padding:"0 0 0 4px"},"none"===t.padding&&{padding:0},"left"===t.align&&{textAlign:"left"},"center"===t.align&&{textAlign:"center"},"right"===t.align&&{textAlign:"right",flexDirection:"row-reverse"},"justify"===t.align&&{textAlign:"justify"},t.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default}))),PC=x.forwardRef((function(e,t){const r=cS({props:e,name:"MuiTableCell"}),{align:n="inherit",className:o,component:i,padding:a,scope:s,size:l,sortDirection:u,variant:c}=r,d=X(r,LC),p=x.useContext(pC),f=x.useContext(yC),m=f&&"head"===f.variant;let h;h=i||(m?"th":"td");let g=s;"td"===h?g=void 0:!g&&m&&(g="col");const b=c||f&&f.variant,v=$({},r,{align:n,component:h,padding:a||(p&&p.padding?p.padding:"normal"),size:l||(p&&p.size?p.size:"medium"),sortDirection:u,stickyHeader:"head"===b&&p&&p.stickyHeader,variant:b}),y=(e=>{const{classes:t,variant:r,align:n,padding:o,size:i,stickyHeader:a}=e;return Mo({root:["root",r,a&&"stickyHeader","inherit"!==n&&`align${so(n)}`,"normal"!==o&&`padding${so(o)}`,`size${so(i)}`]},AC,t)})(v);let S=null;return u&&(S="asc"===u?"ascending":"descending"),Qi.jsx(DC,$({as:h,ref:t,className:ia(y.root,o),"aria-sort":S,scope:g,ownerState:v},d))}));var MC=PC;function _C(e){return Oo("MuiTableContainer",e)}qo("MuiTableContainer",["root"]);const TC=["className","component"],kC=$S("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"});var OC=x.forwardRef((function(e,t){const r=cS({props:e,name:"MuiTableContainer"}),{className:n,component:o="div"}=r,i=X(r,TC),a=$({},r,{component:o}),s=(e=>{const{classes:t}=e;return Mo({root:["root"]},_C,t)})(a);return Qi.jsx(kC,$({ref:t,as:o,className:ia(s.root,n),ownerState:a},i))}));function qC(e){return Oo("MuiTableHead",e)}qo("MuiTableHead",["root"]);const NC=["className","component"],FC=$S("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),zC={variant:"head"},jC="thead";var $C=x.forwardRef((function(e,t){const r=cS({props:e,name:"MuiTableHead"}),{className:n,component:o=jC}=r,i=X(r,NC),a=$({},r,{component:o}),s=(e=>{const{classes:t}=e;return Mo({root:["root"]},qC,t)})(a);return Qi.jsx(yC.Provider,{value:zC,children:Qi.jsx(FC,$({as:o,className:ia(s.root,n),ref:t,role:o===jC?null:"rowgroup",ownerState:a},i))})}));function BC(e){return Oo("MuiTableRow",e)}var HC=qo("MuiTableRow",["root","selected","hover","head","footer"]);const WC=["className","component","hover","selected"],GC=$S("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.head&&t.head,r.footer&&t.footer]}})((({theme:e})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${HC.hover}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${HC.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:vx(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:vx(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)}}}))),VC="tr",UC=x.forwardRef((function(e,t){const r=cS({props:e,name:"MuiTableRow"}),{className:n,component:o=VC,hover:i=!1,selected:a=!1}=r,s=X(r,WC),l=x.useContext(yC),u=$({},r,{component:o,hover:i,selected:a,head:l&&"head"===l.variant,footer:l&&"footer"===l.variant}),c=(e=>{const{classes:t,selected:r,hover:n,head:o,footer:i}=e;return Mo({root:["root",r&&"selected",n&&"hover",o&&"head",i&&"footer"]},BC,t)})(u);return Qi.jsx(GC,$({as:o,ref:t,className:ia(c.root,n),role:o===VC?null:"row",ownerState:u},s))}));var YC=UC,KC=(e={})=>S.createElement(vE,{...e},S.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},S.createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},S.createElement("rect",{stroke:tE.GREYSCALE_0_42,fill:"currentColor",x:"0.5",y:"0.5",width:"15",height:"15",rx:"3"}))));const XC={MuiAccordion:{styleOverrides:{root:{backgroundColor:tE.GREYSCALE_98,"&:before":{backgroundColor:"unset"},"&.Mui-expanded":{margin:"0px"}}}},MuiAccordionDetails:{styleOverrides:{root:{backgroundColor:tE.WHITE}}},MuiAccordionSummary:{defaultProps:{expandIcon:S.createElement(hE,{"aria-hidden":"true",viewBox:"0 0 16 16",width:16,height:16})},styleOverrides:{root:{padding:"0px 12px 0px 16px",minHeight:"auto",boxShadow:`inset 0px -1px 0px 0px ${tE.GREYSCALE_0_15}`,"&.Mui-focusVisible":{borderColor:tE.MISC_FOCUS_BORDER,boxShadow:`inset 0 0 0 2px ${tE.MISC_FOCUS_BORDER}`,borderRadius:aE,backgroundColor:tE.GREYSCALE_0_03},"&.Mui-expanded":{minHeight:"auto"}},content:{overflow:"hidden",textOverflow:"ellipsis","&.Mui-expanded":{margin:"12px 0px"}}}},MuiAppBar:{defaultProps:{elevation:0},styleOverrides:{root:{flex:"0 0 48px",boxShadow:`inset 0 -1px 0 0 ${tE.GREYSCALE_0_15}`},colorPrimary:{backgroundColor:tE.WHITE,color:tE.TEXT_PRIMARY}}},MuiBadge:{styleOverrides:{badge:{height:"16px",minWidth:"16px",fontSize:"12px",padding:"0px 5px"},anchorOriginTopRightRectangular:{top:"-3px",right:"-3px"}}},MuiButtonBase:{defaultProps:{disableRipple:!0,disableTouchRipple:!0,focusVisibleClassName:"sprout-focus-visible"}},MuiButtonGroup:{defaultProps:{disableRipple:!0},styleOverrides:{root:{height:"32px",lineHeight:"16px",fontSize:14,borderRadius:aE},text:{padding:"8px 16px","&.Mui-focusVisible":{boxShadow:`0 0 0 2px ${tE.MISC_FOCUS_BORDER}`}},outlined:{padding:"7px 16px",borderColor:tE.GREYSCALE_0_15,backgroundColor:tE.GREYSCALE_100_60,"&.Mui-focusVisible":{borderColor:tE.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${tE.MISC_FOCUS_BORDER}`}},contained:{padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"}},groupedContainedPrimary:{"&:hover":{backgroundColor:tE.GREEN_PALE},"&:active":{backgroundColor:tE.GREEN_DARK},"&.Mui-focusVisible":{borderColor:tE.GREEN_PALE,boxShadow:`0 0 0 3px ${ix(tE.GREEN_PALE,.5)}`}},groupedContainedSecondary:{"&:hover":{backgroundColor:tE.BLUE_PALE},"&:active":{backgroundColor:tE.BLUE_DARK},"&.Mui-focusVisible":{borderColor:tE.BLUE_PALE,boxShadow:`0 0 0 3px ${ix(tE.BLUE_PALE,.5)}`}}},variants:[{props:{size:"small"},style:{height:"24px"}},{props:{size:"large"},style:{height:"40px"}}]},MuiButton:{defaultProps:{color:"inherit",disableRipple:!0,focusVisibleClassName:"sprout-focus-visible"},styleOverrides:{root:{height:"32px",lineHeight:"16px",minWidth:"24px",fontSize:14,borderRadius:aE,"& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},text:{padding:"8px 16px","&:active":{backgroundColor:tE.GREYSCALE_0_10},"&.Mui-focusVisible":{boxShadow:`0 0 0 2px ${tE.MISC_FOCUS_BORDER}`}},outlined:({ownerState:e})=>({padding:"7px 16px",borderColor:tE.GREYSCALE_0_15,backgroundColor:tE.GREYSCALE_100_60,"&:active":{backgroundColor:tE.GREYSCALE_0_10},"&.Mui-focusVisible":{borderColor:tE.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${tE.MISC_FOCUS_BORDER}`},..."amethyst"===e.color&&{borderColor:tE.PURPLE,"&.Mui-focusVisible":{borderColor:tE.PURPLE,boxShadow:`0 0 0 3px ${ix(tE.PURPLE_PALE,.5)}`}}}),outlinedPrimary:{borderColor:tE.GREEN,"&.Mui-focusVisible":{borderColor:tE.GREEN,boxShadow:`0 0 0 3px ${ix(tE.GREEN_PALE,.5)}`}},outlinedSecondary:{borderColor:tE.BLUE,"&.Mui-focusVisible":{borderColor:tE.BLUE,boxShadow:`0 0 0 3px ${ix(tE.BLUE_PALE,.5)}`}},outlinedWarning:{borderColor:tE.ORANGE,"&.Mui-focusVisible":{borderColor:tE.ORANGE,boxShadow:`0 0 0 3px ${ix(tE.ORANGE_PALE,.5)}`}},outlinedError:{borderColor:tE.RED,"&.Mui-focusVisible":{borderColor:tE.RED,boxShadow:`0 0 0 3px ${ix(tE.RED_PALE,.5)}`}},contained:({ownerState:e})=>({color:tE.WHITE,padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"},..."amethyst"===e.color&&{"&:hover":{backgroundColor:tE.PURPLE_PALE},"&:active":{backgroundColor:tE.PURPLE_DARK},"&.Mui-focusVisible":{borderColor:tE.PURPLE_PALE,boxShadow:`0 0 0 3px ${ix(tE.PURPLE_PALE,.5)}`}}}),containedPrimary:{"&:hover":{backgroundColor:tE.GREEN_PALE},"&:active":{backgroundColor:tE.GREEN_DARK},"&.Mui-focusVisible":{borderColor:tE.GREEN_PALE,boxShadow:`0 0 0 3px ${ix(tE.GREEN_PALE,.5)}`}},containedSecondary:{"&:hover":{backgroundColor:tE.BLUE_PALE},"&:active":{backgroundColor:tE.BLUE_DARK},"&.Mui-focusVisible":{borderColor:tE.BLUE_PALE,boxShadow:`0 0 0 3px ${ix(tE.BLUE_PALE,.5)}`}},containedWarning:{"&:hover":{backgroundColor:tE.ORANGE_PALE},"&:active":{backgroundColor:tE.ORANGE_DARK},"&.Mui-focusVisible":{borderColor:tE.ORANGE_PALE,boxShadow:`0 0 0 3px ${ix(tE.ORANGE_PALE,.5)}`}},containedError:{"&:hover":{backgroundColor:tE.RED_PALE},"&:active":{backgroundColor:tE.RED_DARK},"&.Mui-focusVisible":{borderColor:tE.RED_PALE,boxShadow:`0 0 0 3px ${ix(tE.RED_PALE,.5)}`}},sizeSmall:{fontSize:12,height:"24px","& > svg:only-child, & > i:only-child":{marginLeft:"-7px",marginRight:"-7px"}},sizeLarge:{fontSize:16,height:"40px",lineHeight:"20px","& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},textSizeSmall:{padding:"4px 11px"},textSizeLarge:{padding:"10px 19px"},outlinedSizeSmall:{padding:"3px 11px"},outlinedSizeLarge:{padding:"9px 19px"},containedSizeSmall:{padding:"4px 11px"},containedSizeLarge:{padding:"10px 19px"}},variants:[]},MuiCardActionArea:{styleOverrides:{root:{height:"100%","&.MuiCardActionArea-focusHighlight":{opacity:0},"&:hover":{boxShadow:"none",backgroundColor:tE.GREYSCALE_0_03,"&.MuiCardActionArea-focusHighlight":{opacity:0}},"&:active":{backgroundColor:tE.GREYSCALE_95,boxShadow:"none"},"&.Mui-focusVisible":{borderRadius:aE,boxShadow:`inset 0 0 0 2px ${tE.MISC_FOCUS_BORDER}`,"&.MuiCardActionArea-focusHighlight":{opacity:0}}}}},MuiChip:{defaultProps:{deleteIcon:S.createElement(bE,{"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),variant:"outlined"},styleOverrides:{root:{height:"24px",fontSize:rE,borderRadius:aE,color:tE.TEXT_PRIMARY,backgroundColor:tE.GREYSCALE_100_15,"&.sprout-focus-visible":{borderColor:tE.MISC_FOCUS_BORDER,boxShadow:`0px 0px 0px 1px ${tE.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{backgroundColor:tE.GREYSCALE_0_05,color:tE.GREYSCALE_0_30,border:"none",opacity:1},"&.MuiChip-outlinedSuccess":{color:tE.GREEN,borderColor:tE.GREEN},"&.MuiChip-outlinedInfo":{color:tE.BLUE,borderColor:tE.BLUE},"&.MuiChip-outlinedWarning":{color:tE.ORANGE,borderColor:tE.ORANGE},"&.MuiChip-outlinedError":{color:tE.RED,borderColor:tE.RED}},outlined:{border:`solid 1px ${tE.GREYSCALE_0_15}`,backgroundColor:tE.GREYSCALE_100_15,".MuiChip-clickable&:active ":{boxSizing:"border-box",borderRadius:aE,boxShadow:"none",backgroundColor:tE.GREYSCALE_0_10},"&.MuiChip-deleteIconSmall":{height:13,color:"inherit"}},outlinedPrimary:{color:tE.GREEN,borderColor:tE.GREEN},outlinedSecondary:{color:tE.BLUE,borderColor:tE.BLUE},label:{fontFamily:dE.FONT_FAMILY,lineHeight:"16px"}}},MuiAutocomplete:{defaultProps:{clearIcon:S.createElement(bE,{"aria-hidden":"true",viewBox:"0 0 16 16",height:12,width:12}),popupIcon:S.createElement(hE,{"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),forcePopupIcon:!0},styleOverrides:{root:{"& .MuiAutocomplete-endAdornment > button":{border:"none",backgroundColor:"unset"}},input:{"&.MuiAutocomplete-input":{padding:"6px 4px"}},inputRoot:{padding:"0px 2px",boxSizing:"border-box",borderRadius:aE},listbox:{padding:"0","& .MuiAutocomplete-option":{height:"32px",minHeight:"32px"}},option:{borderRadius:aE,fontSize:nE,height:"32px",padding:"6px 16px",minHeight:"32px","&.MuiAutocomplete-option.Mui-focused":{backgroundColor:tE.GREYSCALE_0_03,"&.Mui-focusVisible":{border:`solid 2px ${tE.MISC_FOCUS_BORDER}`,padding:"4px 14px"}},'&.MuiAutocomplete-option[aria-selected="true"]':{backgroundColor:tE.GREYSCALE_0_05,"&.Mui-focused":{backgroundColor:tE.GREYSCALE_0_05},"&.Mui-focusVisible":{backgroundColor:tE.GREYSCALE_0_05}}},popupIndicator:{borderRadius:aE,border:`solid 1px ${tE.GREYSCALE_0_15}`,color:tE.GREYSCALE_0_60,marginRight:0,width:iE,height:iE},paper:{marginTop:"4px",boxShadow:`0px 2px 4px 0px ${tE.GREYSCALE_0_15}`},clearIndicator:{borderRadius:aE,marginRight:"4px"},popupIndicatorOpen:{backgroundColor:tE.GREYSCALE_0_10}}},MuiFormControlLabel:{styleOverrides:{root:{marginLeft:"-10px"},label:{fontSize:nE}}},MuiFormHelperText:{styleOverrides:{root:{fontSize:rE,lineHeight:"16px",margin:"4px 0 0 0","&.Mui-error":{color:tE.RED}},contained:{marginLeft:0,marginRight:0}}},MuiFormLabel:{styleOverrides:{root:{color:tE.GREYSCALE_25,fontSize:rE,fontFamily:dE.FONT_FAMILY,fontWeight:uE,fontStretch:"normal",fontStyle:"normal",letterSpacing:"normal",lineHeight:1,"&.Mui-focused":{color:tE.TEXT_PRIMARY},"&.Mui-error":{color:tE.TEXT_SECONDARY},"&[optional=true]":{"&:after":{color:tE.TEXT_SECONDARY,content:"'(optional)'",fontWeight:lE,marginLeft:"4px"}}},asterisk:{visibility:"collapse",display:"inline-flex","&::after":{visibility:"visible",color:tE.TEXT_SECONDARY,content:"'(required)'",fontWeight:lE,marginLeft:"4px"}}}},MuiOutlinedInput:{defaultProps:{notched:!1},styleOverrides:{root:{fontSize:nE,lineHeight:"16px",backgroundColor:tE.WHITE,borderRadius:aE,"&:not(.Mui-focused):not(.Mui-error):not(.Mui-disabled):hover .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${tE.GREYSCALE_0_05}`,borderColor:tE.GREYSCALE_0_30},"&.Mui-focused:not(.Mui-error) .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${tE.MISC_FOCUS_BORDER}`,boxShadow:`0px 0px 0px 1px ${tE.MISC_FOCUS_BORDER}, inset 0 2px 0 0 ${tE.GREYSCALE_0_05}`},"&.Mui-focused.Mui-error .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${tE.RED}`,boxShadow:`0px 0px 0px 1px ${tE.RED}, inset 0 2px 0 0 ${tE.GREYSCALE_0_05}`},"&.Mui-disabled":{backgroundColor:"transparent"},"&.Mui-disabled .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${tE.GREYSCALE_0_10}`,borderColor:tE.GREYSCALE_0_10,backgroundColor:tE.GREYSCALE_0_05}},adornedStart:{paddingLeft:0},adornedEnd:{paddingRight:0},input:{color:tE.TEXT_PRIMARY,padding:"6px 12px","&.Mui-disabled":{opacity:.45}},inputSizeSmall:{padding:"0px 12px"},notchedOutline:{borderColor:tE.GREYSCALE_0_15,borderRadius:aE,boxShadow:`inset 0 2px 0 0 ${tE.GREYSCALE_0_05}`},multiline:{padding:"0"}}},MuiSelect:{defaultProps:{IconComponent:e=>S.createElement(hE,{...e,"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}}},styleOverrides:{select:{padding:"7px 12px",borderRadius:"3px !important",minHeight:"1em","& em":{color:tE.TEXT_SECONDARY},"& ~svg":{position:"absolute",right:"12px",top:"unset",cursor:"pointer"},"&[aria-expanded=true]":{backgroundColor:tE.GREYSCALE_0_05},"& ~fieldset":{boxShadow:"none !important",border:"none !important",backgroundColor:"unset !important"},"&:hover":{backgroundColor:tE.GREYSCALE_0_03},"&:active":{backgroundColor:tE.GREYSCALE_0_10},"&:focus":{backgroundColor:tE.GREYSCALE_0_03,borderRadius:"3px !important",border:`solid 1px ${tE.MISC_FOCUS_BORDER}`,boxShadow:`inset 0px 0px 0px 1px ${tE.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{opacity:"unset",color:tE.GREYSCALE_0_30,"&:hover":{backgroundColor:tE.GREYSCALE_0_0,borderColor:tE.GREYSCALE_0_15},"& ~svg":{color:tE.GREYSCALE_0_30}}},outlined:{border:`solid 1px ${tE.GREYSCALE_0_15}`},nativeInput:{height:"42px"}}},MuiIconButton:{styleOverrides:{root:{borderRadius:aE}}},MuiInput:{styleOverrides:{root:{"&.Mui-focused":{borderColor:tE.MISC_FOCUS_BORDER,boxShadow:`0 0 0 2px ${tE.MISC_FOCUS_BORDER}`}}}},MuiInputAdornment:{styleOverrides:{root:{padding:"4px 8px",color:tE.GREYSCALE_55},positionStart:{marginRight:0},positionEnd:{marginLeft:0}}},MuiInputBase:{styleOverrides:{root:{fieldset:{boxShadow:"none"}},input:{height:"20px",fontSize:nE,padding:"8px 12px",lineHeight:"16px","&.MuiInputBase-inputAdornedStart":{paddingLeft:0},"&.MuiInputBase-inputAdornedEnd":{paddingRight:0}},sizeSmall:{height:"24px",input:{fontSize:rE,paddingLeft:"8px"}}}},MuiInputLabel:{defaultProps:{shrink:!0},styleOverrides:{outlined:{fontSize:rE,fontWeight:uE,color:tE.GREYSCALE_25,"&.MuiInputLabel-shrink":{transform:"translate(0px, -16px)",fontWeight:uE}}}},MuiPopover:{styleOverrides:{paper:{minWidth:"160px",top:"60px",marginTop:"5px","&ul":{padding:"0px"},boxShadow:`0px 4px 10px ${tE.GREYSCALE_0_15}, 0px 0px 0px 1px ${tE.GREYSCALE_0_05}`}}},MuiRadio:{defaultProps:{size:"small",icon:S.createElement(SE,null),checkedIcon:S.createElement(EE,null)},styleOverrides:{root:{"&:hover":{backgroundColor:"unset"},fill:tE.GREYSCALE_100_60,stroke:"black","&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:"50%",boxShadow:`0 0 0 2px ${tE.MISC_FOCUS_BORDER}`},"&.Mui-checked":{"&.MuiRadio-colorPrimary":{"&.sprout-focus-visible i":{borderColor:tE.GREEN_PALE,boxShadow:`0 0 0 3px ${ix(tE.GREEN_PALE,.5)}`}},"&.MuiRadio-colorSecondary":{"&.sprout-focus-visible i":{borderColor:tE.BLUE_PALE,boxShadow:`0 0 0 3px ${ix(tE.BLUE_PALE,.5)}`}},"&.Mui-disabled":{color:tE.GREYSCALE_0_20}},"&.Mui-disabled":{fill:tE.GREYSCALE_0_20,stroke:"none"}}}},MuiCheckbox:{defaultProps:{size:"small",icon:S.createElement(KC,null),checkedIcon:S.createElement(yE,null),indeterminateIcon:S.createElement(xE,null)},styleOverrides:{root:{borderWidth:1,"&:hover":{backgroundColor:"unset"},"&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:aE,boxShadow:" 0px 0px 0px 2px #FFFFFF, 0px 0px 0px 4px #177FE6"},"&:not(.Mui-disabled)":{"&:not(.Mui-checked)":{"&:not(.MuiCheckbox-indeterminate)":{color:tE.GREYSCALE_100_60,"&:hover":{g:{rect:{stroke:tE.GREYSCALE_0_55,color:tE.GREYSCALE_0_03}}},"&.sprout-focus-visible i":{boxShadow:"0px 0px 0px 2px #0275D9",g:{rect:{stroke:"none"}}}}}},"&.Mui-disabled":{"& i":{pointerEvents:"auto",cursor:"not-allowed !important",color:tE.GREYSCALE_0_15,g:{rect:{stroke:"none"}}}}},colorPrimary:{"&.MuiCheckbox-root":{"&:not(.Mui-disabled)":{"&:hover":{color:tE.GREEN_DARK}}}},colorSecondary:{"&.MuiCheckbox-root":{"&:not(.Mui-disabled)":{color:tE.GREYSCALE_0_55,"&:hover":{color:tE.GREYSCALE_25}}}}}},MuiCircularProgress:{defaultProps:{thickness:3,disableShrink:!0}},MuiDialog:{defaultProps:{fullWidth:!0}},MuiDialogActions:{styleOverrides:{root:{padding:"16px"}}},MuiDialogTitle:{styleOverrides:{root:{display:"flex",alignItems:"center",justifyContent:"space-between",boxSizing:"content-box",minHeight:"31px",padding:"16px 16px 16px 24px",fontSize:"16px",lineHeight:"24px"}}},MuiDialogContentText:{defaultProps:{variant:"body2"},styleOverrides:{root:{marginBottom:0}}},MuiDialogContent:{styleOverrides:{root:{padding:"16px 24px !important"}}},MuiDivider:{styleOverrides:{middle:{margin:"4px 8px"}}},MuiLink:{defaultProps:{underline:"none",color:tE.MISC_FOCUS_BORDER}},MuiListItemIcon:{styleOverrides:{root:{color:tE.GREYSCALE_25,minWidth:"16px",marginRight:"16px"}}},MuiListItemText:{styleOverrides:{root:{fontSize:"12px"},primary:{fontSize:nE,color:tE.TEXT_PRIMARY,lineHeight:"16px",fontWeight:uE},secondary:{fontSize:rE,color:tE.GREYSCALE_45,fontWeight:lE,lineHeight:"16px"}}},MuiListItem:{styleOverrides:{root:{fontSize:nE,minHeight:"32px"},gutters:{paddingLeft:"12px",paddingRight:"12px"},button:{"&:hover":{backgroundColor:tE.GREYSCALE_0_03},"&:active":{backgroundColor:tE.GREYSCALE_0_05}}}},MuiListItemButton:{styleOverrides:{root:{fontSize:nE,height:"32px"}}},MuiListSubheader:{styleOverrides:{root:{'&[role="option"]':{color:tE.TEXT_PRIMARY,lineHeight:1.33,padding:"4px 12px",fontWeight:600,fontSize:rE,borderBottom:`solid 1px ${tE.GREYSCALE_0_15}`,pointerEvents:"none"}}}},MuiList:{styleOverrides:{padding:{paddingTop:"0px",paddingBottom:"0px"}}},MuiMenuItem:{styleOverrides:{root:{fontSize:nE,color:tE.GREYSCALE_25,height:"32px",'[class*="MuiListItemIcon-root"]':{minWidth:"16px"},"&:hover":{backgroundColor:tE.GREYSCALE_0_03},"&.Mui-selected":{backgroundColor:"unset","&:hover":{backgroundColor:tE.GREYSCALE_0_10},"&.Mui-focusVisible":{backgroundColor:tE.GREYSCALE_0_10},"&:not(.Mui-disabled)":{"&::after":{content:"url('data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%228px%22%20height%3D%227px%22%20viewBox%3D%220%200%208%207%22%20version%3D%221.1%22%20%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20aria-labelledby%3D%22Tick%22%3E%20%20%3Cg%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%3Cg%20transform%3D%22translate%280.000000%2C%20-1.000000%29%22%3E%20%20%20%20%20%20%3Cpath%20d%3D%22M7.51662484%2C1.29325%20C7.12545778%2C0.90225%206.49218732%2C0.90225%206.10202068%2C1.29325%20L2.73658335%2C4.65725%20L1.90722914%2C3.82925%20C1.5170625%2C3.43825%200.883792042%2C3.43825%200.492624979%2C3.82925%20C0.102458344%2C4.21925%200.102458344%2C4.85225%200.492624979%2C5.24325%20L2.02928127%2C6.77825%20C2.4194479%2C7.16925%203.05271836%2C7.16925%203.44388542%2C6.77825%20L7.51662484%2C2.70725%20C7.9077919%2C2.31725%207.9077919%2C1.68425%207.51662484%2C1.29325%22%3E%3C%2Fpath%3E%20%20%20%20%3C%2Fg%3E%20%20%3C%2Fg%3E%3C%2Fsvg%3E')",fontFamily:"LUI icons",position:"absolute",fontSize:"10px",right:"10px",color:tE.RED}}},"&.Mui-focusVisible":{backgroundColor:tE.GREYSCALE_0_03}},divider:{marginTop:"8px",marginBottom:"8px"},gutters:{paddingLeft:"12px",paddingRight:"12px"}}},MuiMenu:{styleOverrides:{list:{paddingTop:"4px",paddingBottom:"4px"},paper:{marginTop:"4px !important",marginBottom:"4px",background:tE.WHITE,boxShadow:"0 0 0 1px rgba(0,0,0,0.05), 0 4px 10px 0 rgba(0,0,0,0.15) !important",borderRadius:"2px !important"}}},MuiSlider:{styleOverrides:{root:{color:tE.GREEN,height:"24px","&.Mui-disabled":{color:tE.GREYSCALE_0_15}},rail:{backgroundColor:tE.GREYSCALE_0_05,height:"4px",opacity:"1",border:`solid 1px ${tE.GREYSCALE_0_05}`,borderRadius:aE,boxShadow:`inset 0px 0px 0px 1px ${tE.GREYSCALE_0_05}`},track:{height:"4px",backgroundColor:"currentColor",opacity:"1",border:`solid 1px ${tE.GREYSCALE_0_05}`,borderRadius:aE},thumb:{height:"16px",width:"16px",borderRadius:aE,backgroundColor:tE.WHITE,boxShadow:`0px 1px 2px 0px ${tE.GREYSCALE_0_15}, 0px 0px 0px 1px ${tE.GREYSCALE_0_05}`,"&:hover":{borderRadius:aE,boxShadow:`0 2px 4px 0 ${tE.GREYSCALE_0_30}, 0 0 0 1px ${tE.GREYSCALE_0_06}`},"&:focus":{boxShadow:`0 1px 2px 0 ${tE.GREYSCALE_0_15}, 0 0 0 1px ${tE.GREYSCALE_0_06}, 0 0 0 2px ${tE.MISC_FOCUS_BORDER}`},"&.Mui-focusVisible":{boxShadow:`0 1px 2px 0 ${tE.GREYSCALE_0_15}, 0 0 0 1px ${tE.GREYSCALE_0_06}, 0 0 0 2px ${tE.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{width:"16px",height:"16px",marginTop:"-5px",marginLeft:"-8px",backgroundColor:tE.GREYSCALE_90},"& .custom-bar":{height:"8px",width:"1px",backgroundColor:tE.GREYSCALE_0_30,marginLeft:1,marginRight:1}},mark:{width:"1px",height:"4px",margin:"16px 0px 0px 0px",backgroundColor:tE.GREYSCALE_0_15},markActive:{opacity:1,backgroundColor:tE.GREYSCALE_0_15},markLabel:{color:tE.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"},markLabelActive:{color:tE.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"}}},MuiSnackbar:{defaultProps:{anchorOrigin:{vertical:"bottom",horizontal:"center"}}},MuiSnackbarContent:{styleOverrides:{root:{backgroundColor:tE.WHITE,color:tE.GREYSCALE_25}}},MuiSwitch:{defaultProps:{color:"primary",size:"small"},styleOverrides:{root:{padding:"10px",width:"60px",height:"40px","& .MuiSwitch-switchBase":{"&:hover":{backgroundColor:"unset"},"&.Mui-checked":{"&:hover":{backgroundColor:"unset"}}}},switchBase:{padding:"12px","&.Mui-disabled":{"&.MuiSwitch-thumb":{backgroundColor:tE.GREYSCALE_100_50}},"&.Mui-checked + .MuiSwitch-track":{opacity:1},"&.Mui-disabled + .MuiSwitch-track":{opacity:.12},"&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"}},colorPrimary:{"&.sprout-focus-visible + .MuiSwitch-track":{borderColor:tE.GREEN_PALE,boxShadow:`0 0 0 3px ${ix(tE.GREEN_PALE,.5)}`}},colorSecondary:{"&.sprout-focus-visible + .MuiSwitch-track":{borderColor:tE.BLUE_PALE,boxShadow:`0 0 0 3px ${ix(tE.BLUE_PALE,.5)}`}},track:{opacity:1,backgroundColor:tE.GREYSCALE_0_15,borderRadius:aE},thumb:{height:"16px",width:"16px",borderRadius:aE,backgroundColor:tE.GREYSCALE_100},sizeSmall:{height:"32px",width:"52px",padding:"8px 10px","& .MuiSwitch-thumb":{height:"12px",width:"12px"},"& .MuiSwitch-switchBase":{padding:"10px 12px"}}}},MuiTextField:{defaultProps:{margin:"dense",variant:"outlined"},styleOverrides:{root:{marginBottom:0}}},MuiTab:{styleOverrides:{root:{fontSize:nE,fontWeight:uE,textTransform:"none",minWidth:"auto",boxSizing:"border-box",paddingBottom:"12px","&:hover":{borderBottom:`2px solid ${tE.GREYSCALE_80}`,paddingBottom:"10px"},"&.sprout-focus-visible":{boxShadow:`inset 0 0 0 2px ${tE.MISC_FOCUS_BORDER}`,backgroundColor:tE.GREYSCALE_0_03,borderRadius:aE},"&.Mui-disabled":{opacity:.3}},textColorPrimary:{color:tE.GREYSCALE_25,"&.Mui-selected":{color:tE.GREYSCALE_25}},textColorInherit:{opacity:"unset"},labelIcon:{minWidth:"40px",minHeight:"48px"}}},MuiTabs:{defaultProps:{indicatorColor:"primary",textColor:"primary"},styleOverrides:{root:{fontSize:nE,fontWeight:"bold"},scroller:{height:"100%"},flexContainer:{height:"100%",marginLeft:2,marginRight:2},indicator:{height:2},scrollableY:{marginBlock:"4px"},scrollButtons:{borderRadius:aE,"&:hover":{backgroundColor:`${tE.GREYSCALE_0_03}`},"&.Mui-disabled":{opacity:"unset","& .MuiSvgIcon-root":{opacity:.3}}},vertical:{"& .MuiTabs-indicator":{left:0,right:"unset",transition:"none",clipPath:"inset(12px 0 12px 0)",marginLeft:"3px"},"& .MuiTabs-scrollButtons":{marginBlock:"-1px",borderTop:`1px solid ${tE.GREYSCALE_0_15}`,borderBottom:`1px solid ${tE.GREYSCALE_0_15}`},"& .MuiTab-root":{fontWeight:"normal",borderRadius:aE,marginBlock:"4px","&.Mui-selected":{backgroundColor:tE.GREYSCALE_0_05},"&:hover":{backgroundColor:`${tE.GREYSCALE_0_03}`,borderBottomColor:"transparent"}}}}},MuiTableCell:{styleOverrides:{root:{padding:"0px 8px 0px 16px",borderBottom:`1px solid ${tE.GREYSCALE_85}`,borderRight:`1px solid ${tE.GREYSCALE_85}`,height:"39px"},head:{height:"41px",fontWeight:uE,backgroundColor:tE.GREYSCALE_98},paddingCheckbox:{width:"40px",padding:"0px"},paddingNone:{padding:"0px"},sizeSmall:{padding:"0px 8px",height:"29px","&.MuiTableCell-head":{height:"31px"},"&.MuiTableCell-paddingCheckbox":{width:"40px",padding:"0px"}},stickyHeader:{backgroundColor:tE.GREYSCALE_98,borderBottom:`1px solid ${tE.GREYSCALE_85}`}}},MuiTableContainer:{styleOverrides:{root:{borderBottom:`1px solid ${tE.GREYSCALE_85}`,borderTop:`1px solid ${tE.GREYSCALE_85}`}}},MuiTableHead:{styleOverrides:{root:{backgroundColor:tE.GREYSCALE_98}}},MuiTableRow:{styleOverrides:{root:{"&.Mui-selected":{backgroundColor:tE.GREYSCALE_0_05,"&:hover":{backgroundColor:tE.GREYSCALE_0_03}},"&&:hover":{backgroundColor:tE.GREYSCALE_0_03}}}},MuiTableSortLabel:{defaultProps:{IconComponent:({className:e})=>S.createElement(CE,{className:e})},styleOverrides:{root:{display:"flex",justifyContent:"space-between","&:hover":{"& icon":{opacity:.5}},"&.Mui-active":{"&& icon":{opacity:1}}},icon:{opacity:0},iconDirectionDesc:{transform:"rotate(180deg)"},iconDirectionAsc:{transform:"rotate(0deg)"}}},MuiTable:{styleOverrides:{root:{borderLeft:`1px solid ${tE.GREYSCALE_85}`}}},MuiToggleButton:{styleOverrides:{root:{height:32,lineHeight:"16px",width:32,fontSize:nE,borderRadius:aE,padding:"7px 16px",border:`1px solid ${tE.GREYSCALE_0_15}`,backgroundColor:tE.GREYSCALE_100_60,color:tE.GREYSCALE_25,zIndex:1,"&:active":{backgroundColor:tE.GREYSCALE_0_10,border:`1px solid ${tE.GREYSCALE_0_30}`},"&:hover":{backgroundColor:tE.GREYSCALE_0_03,border:`1px solid ${tE.GREYSCALE_0_30}`},"&.sprout-focus-visible":{backgroundColor:tE.GREYSCALE_0_03,boxShadow:`0 0 0 1px ${tE.MISC_FOCUS_BORDER}`,border:`1px solid ${tE.MISC_FOCUS_BORDER}`,zIndex:2},"&.Mui-selected":{color:tE.GREYSCALE_25,backgroundColor:tE.GREYSCALE_0_10,zIndex:2,"&:hover":{backgroundColor:tE.GREYSCALE_0_10,border:`1px solid ${tE.GREYSCALE_0_15}`}}},sizeSmall:{fontSize:rE,height:24,width:24,padding:7},sizeLarge:{fontSize:oE,height:40,width:40,lineHeight:"20px"}}},MuiToggleButtonGroup:{styleOverrides:{root:{height:"32px",lineHeight:"16px",fontSize:nE,borderRadius:aE}}},MuiToolbar:{defaultProps:{disableGutters:!0},styleOverrides:{root:{display:"flex",flex:1,padding:"0 16px"},dense:{minHeight:"46px",padding:"0 8px"}}},MuiTooltip:{defaultProps:{arrow:!0},styleOverrides:{arrow:{color:tE.GREYSCALE_20},tooltip:{backgroundColor:tE.GREYSCALE_20,fontSize:rE,lineHeight:"16px"},popper:{whiteSpace:"pre-line"}}}};var JC=e=>XC;const ZC={mode:"light",primary:{ultraLight:tE.GREEN_ULTRA_LIGHT,light:tE.GREEN_PALE,main:tE.GREEN,dark:tE.GREEN_DARK,extraDark:tE.GREEN_EXTRA_DARK,contrastText:tE.WHITE},secondary:{ultraLight:tE.BLUE_ULTRA_LIGHT,light:tE.BLUE_PALE,main:tE.BLUE,dark:tE.BLUE_DARK,extraDark:tE.BLUE_EXTRA_DARK,contrastText:tE.WHITE},error:{ultraLight:tE.RED_ULTRA_LIGHT,light:tE.RED_PALE,main:tE.RED,dark:tE.RED_DARK,extraDark:tE.RED_EXTRA_DARK,contrastText:tE.WHITE},warning:{ultraLight:tE.ORANGE_ULTRA_LIGHT,light:tE.ORANGE_PALE,main:tE.ORANGE,dark:tE.ORANGE_DARK,extraDark:tE.ORANGE_EXTRA_DARK,contrastText:tE.WHITE},success:{ultraLight:tE.GREEN_ULTRA_LIGHT,light:tE.GREEN_PALE,main:tE.GREEN,dark:tE.GREEN_DARK,extraDark:tE.GREEN_EXTRA_DARK,contrastText:tE.WHITE},info:{ultraLight:tE.BLUE_ULTRA_LIGHT,light:tE.BLUE_PALE,main:tE.BLUE,dark:tE.BLUE_DARK,extraDark:tE.BLUE_EXTRA_DARK,contrastText:tE.WHITE},text:{primary:tE.TEXT_PRIMARY,secondary:tE.TEXT_SECONDARY,disabled:tE.GREYSCALE_0_30},action:{hover:tE.GREYSCALE_0_03,hoverOpacity:.03,selected:tE.GREYSCALE_0_05,selectedOpacity:.05,focus:tE.MISC_FOCUS_BORDER},amethyst:{ultraLight:tE.WHITE,main:tE.PURPLE,light:tE.PURPLE_PALE,dark:tE.PURPLE_DARK,extraDark:tE.GREYSCALE_0_0,contrastText:tE.WHITE},background:{paper:tE.WHITE,default:tE.GREYSCALE_95},divider:tE.GREYSCALE_0_15},QC=e=>({components:JC(),palette:ZC,breakpoints:{keys:["xs","sm","md","lg","xl"],values:{xs:0,sm:600,md:960,lg:1280,xl:1920}},spacing:8,shadows:["none","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)"],transitions:{easing:{easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},duration:{standard:300,short:250,enteringScreen:225,shorter:200,leavingScreen:195,shortest:150,complex:375}},typography:{fontSize:nE,fontWeightLight:sE,fontWeightRegular:lE,fontWeightMedium:uE,fontWeightBold:cE,htmlFontSize:nE,fontFamily:dE.FONT_FAMILY,button:{fontWeight:uE,fontSize:nE,textTransform:"none"},body1:{fontSize:oE,lineHeight:"24px"},body2:{fontSize:nE,lineHeight:"20px"},h1:{fontSize:32,lineHeight:"32px"},h2:{fontSize:28,lineHeight:"32px"},h3:{fontSize:iE,lineHeight:"24px"},h4:{fontSize:20,lineHeight:"24px"},h5:{fontSize:oE,fontWeight:uE,lineHeight:"16px"},h6:{fontSize:nE,fontWeight:uE,lineHeight:"16px"},caption:{color:tE.TEXT_SECONDARY},subtitle1:{fontSize:nE,color:tE.TEXT_SECONDARY},subtitle2:{fontSize:rE,color:tE.TEXT_SECONDARY}},shape:{borderRadius:aE}}),ew={...eE,MISC_FOCUS_BORDER:tE.MISC_FOCUS_BORDER},tw=(e="light")=>QC(),rw=tw().palette,nw={SELECTED:{color:ew.GREYSCALE_100,background:rw.primary.light,selectedCellClass:GS.SELECTED},POSSIBLE:{color:rw.text.primary,background:ew.GREYSCALE_100},EXCLUDED_BACKGROUND:"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)"},ow=4/3,iw="12px",aw="600",sw={height:"auto",fontSize:iw,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"}},lw=25e4,uw=(e,t,r)=>{if(null==e||!e.length)return[];const n=[],o=[];let i=t;if(e.forEach(((e,a)=>{var s;if(e.columnWidth){const{columnWidth:{type:l,pixels:u,percentage:c},label:d,qApprMaxGlyphCount:p,totalInfo:f}=e;let m=0;const h=()=>{n[a]=Math.min(dh.PixelsMax,Math.max(dh.PixelsMin,m)),i-=n[a]};switch(l){case ph.Pixels:m=u||dh.PixelsDefault,h();break;case ph.Percentage:m=(c||dh.PercentageDefault)/100*t,h();break;case ph.FitToContent:(null===(s=e.representation)||void 0===s?void 0:s.type)===xv.Image?o.push(a):(m=r(d,f,p,e.isLocked,e.isActivelySorted),h());break;case ph.Auto:o.push(a);break;default:throw new Error(`${l} is not a valid column width type`)}}else o.push(a)})),o.length){const e=i/o.length;o.forEach((t=>{n[t]=Math.max(dh.AutoMinTable,e)}))}return n},cw=e=>e.ctrlKey||e.metaKey,dw=e=>e.shiftKey&&cw(e),pw=e=>[US.LEFT,US.RIGHT,US.UP,US.DOWN].includes(e),fw=e=>e.shiftKey&&pw(e.key),mw=(e,t)=>{const{colIdx:r,rows:n,api:o}=t;let i=GS.INACTIVE;return null!=o&&o.isModal()&&(i=r!==e.selectionColIdx?GS.EXCLUDED:void 0!==n[e.qElemNumber]?GS.SELECTED:GS.POSSIBLE),i},hw=(e,t,r)=>{const n=Object.keys(r).length,o=n>=Object.keys(t).length;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"]})},gw=(e,t)=>{const{api:r,rows:n,colIdx:o}=e,{cell:i,announce:a,evt:s}=t;let l={};if(-1===o)null==r||r.begin(["/qHyperCubeDef"]);else{if(o!==i.selectionColIdx)return e;l={...n}}return l=((e,t,r)=>{const{qElemNumber:n,rowIdx:o}=t;return r.ctrlKey||r.metaKey?{[n]:o}:(void 0!==e[n]?delete e[n]:e[n]=o,{...e})})(l,i,s),hw(a,n,l),Object.keys(l).length?(null==r||r.select({method:"selectHyperCubeCells",params:["/qHyperCubeDef",Object.values(l),[i.selectionColIdx]]}),{...e,rows:l,colIdx:i.selectionColIdx}):(null==r||r.cancel(),{...e,rows:l,colIdx:-1})},bw=(e,t)=>{var r;const{api:n,rows:o,colIdx:i,pageRows:a,firstCell:s}=e,{cell:l,announce:u,evt:c}=t;let d={};return s||"key"in c&&fw(c)?(-1===i?null==n||n.begin(["/qHyperCubeDef"]):d={...o},d=((e,t,r,n,o)=>{const i={...t};if("key"in n&&fw(n)){i[r.qElemNumber]=r.rowIdx;const t=n.key===US.DOWN?1:-1;return i[e[r.pageRowIdx+t][r.pageColIdx].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];i[r.qElemNumber]=r.rowIdx}return i})(a,d,l,c,s),hw(u,o,d),{...e,rows:d,colIdx:null!==(r=null==s?void 0:s.selectionColIdx)&&void 0!==r?r:l.selectionColIdx,isSelectMultiValues:!0}):e},vw=e=>{const{api:t,rows:r,colIdx:n,isSelectMultiValues:o,mouseupOutsideCallback:i}=e;return i&&document.removeEventListener("mouseup",i),o&&(null==t||t.select({method:"selectHyperCubeCells",params:["/qHyperCubeDef",Object.values(r),[n]]})),{...e,isSelectMultiValues:!1,firstCell:void 0,mouseupOutsideCallback:void 0}},yw=(e,t)=>{var r;switch(t.type){case VS.SELECT:return gw(e,t.payload);case VS.SELECT_MOUSE_DOWN: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 VS.SELECT_MOUSE_UP:return((e,t)=>vw(e.isSelectMultiValues||e.firstCell!==t.cell?e:gw(e,t)))(e,t.payload);case VS.SELECT_MULTI_ADD:return bw(e,t.payload);case VS.SELECT_MULTI_END:return vw(e);case VS.RESET:return null!==(r=e.api)&&void 0!==r&&r.isModal()?e:{...e,rows:{},colIdx:-1};case VS.CLEAR:return Object.keys(e.rows).length?{...e,rows:{}}:e;case VS.UPDATE_PAGE_ROWS:return{...e,pageRows:t.payload.pageRows};default:throw new Error("reducer called with invalid action type")}},xw=4/3,Sw={hover:{darker:.15,brighter:.3,opacity:.03},active:{darker:.3,brighter:.5,opacity:.05}},Ew=e=>parseInt(e,10)*xw+8+1,Cw=e=>!!e&&(null!==e.color||e.index>-1);function ww(e,t,r={}){const n=t.getColorPickerColor(r);return n&&"none"!==n?n:e}const Rw=e=>Rf(e)?Cp.WHITE:Cp.TEXT,Aw=(e,t)=>e?{borderBottomColor:Cp.DARK_MODE_BORDER,borderRightColor:Cp.DARK_MODE_BORDER,borderLeftColor:Cp.DARK_MODE_BORDER,borderTopColor:Cp.DARK_MODE_BORDER}:{borderLeftColor:Cp.BORDER_MEDIUM,borderRightColor:Cp.BORDER_MEDIUM,borderTopColor:Cp.BORDER_HEAVY,borderBottomColor:t?Cp.BORDER_HEAVY:Cp.BORDER_LIGHT},Iw=e=>{var t;return null===(t=e.components)||void 0===t?void 0:t.find((e=>"theme"===e.key))},Lw=(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:Cw(null==r?void 0:r.fontColor)?ww(Cp.TEXT,t,null==r?void 0:r.fontColor):i||Cp.TEXT,fontSize:(null==r?void 0:r.fontSize)&&`${r.fontSize}px`||a,padding:r&&"padding"in r?null==r?void 0:r.padding:void 0,...Aw(t.background.isDark,n)};return Object.keys(s).forEach((e=>{const t=e;null==s[t]&&delete s[t]})),s};function Dw(e,t,r){var n,o,i;const a=null===(n=Iw(e))||void 0===n?void 0:n.header,s=Lw("header",t,a,r);return s.background=Pf(t.background.headerColor),s.hoverBackground=wf(null!==(o=s.background)&&void 0!==o?o:Cp.WHITE,Sw.hover),s.activeBackground=wf(null!==(i=s.background)&&void 0!==i?i:Cp.WHITE,Sw.active),s}function Pw(e,t,r,n){var o;const i=null===(o=Iw(e))||void 0===o?void 0:o.content,a=Lw("content",t,i);a.background=t.background.color;const s=((e,t,r)=>{if(e&&t&&r)return Ew(e)*(t+2)<r.clientHeight-40?"1px":"0px";return"0px"})(null==a?void 0:a.fontSize,r,n),l=null==i?void 0:i.hoverColor,u=null==i?void 0:i.hoverFontColor,c=t.getStyle("object","","straightTableV2.content.hover.backgroundColor"),d=t.getStyle("object","","straightTableV2.content.hover.color"),p=Cw(u)||!!d,f=Cw(l)||!!c,m=p||f;let h;h=Cw(l)?ww(Cp.HOVER,t,l):c||(p?"":Cp.HOVER);const g=m?ww(Rw(h),t,Cw(u)?u:d):"";return{...a,lastRowBottomBorder:s,hoverColors:{background:h,color:g}}}function Mw(e,t,r){var n;const o={};return null==t||null===(n=t.qValues)||void 0===n||n.forEach(((e,t)=>{const n=e.qText&&Df(e.qText);n&&"none"!==n&&(o[r[t]]=n)})),o.cellBackgroundColor&&!o.cellForegroundColor&&(o.cellForegroundColor=Rw(o.cellBackgroundColor)),{...e,...o,color:o.cellForegroundColor||e.color,background:o.cellBackgroundColor||e.background}}const _w=(e,t,r,n)=>{const o=C((()=>{const o=r.totalsPosition.atTop,i=Pw(e,t,r.rows.length,n),a=Dw(e,t,!o),s=function(e,t,r){var n;const o=null===(n=Iw(e))||void 0===n?void 0:n.content,i=Lw("content",t,o),{borderBottomColor:a,borderTopColor:s,background:l}=Dw(e,t,r);return{...i,borderBottomColor:a,background:l,borderTopColor:s}}(e,t,o);return{body:i,head:a,totals:s}}),[e,t,r,n]);return o},Tw=new Map;const kw=M({}),Ow=function(e){const t=M([()=>{},new Set]);return Tw.set(e,t),({children:r,value:n})=>{const o=_(n),i=_(new Set);w((()=>{o.current=n,i.current.forEach((e=>{e(n)}))}),[n]);const a=T((()=>o.current),[o]),s=C((()=>[a,i.current]),[a]);return Qi.jsx(e.Provider,{value:n,children:Qi.jsx(t.Provider,{value:s,children:r})})}}(kw),qw={rows:[],columns:[],totalsPosition:{}},Nw=({app:e,children:t,tableData:r=qw,selectionsAPI:n,cellCoordMock:o,layout:i,model:a,translator:s,interactions:l,theme:u,keyboard:c,rootElement:d,embed:p,changeSortOrder:f,applyColumnWidths:m,setPage:h,pageInfo:g,initialDataPages:b,rect:v,viewService:y,env:x})=>{const[S,w]=E(0),[R,A]=E(o||QS),[I,L]=((e,t)=>{const[r,n]=P(yw,{pageRows:e,rows:{},colIdx:-1,api:t,isSelectMultiValues:!1});return[r,n]})(r.rows,n),[D,M]=E(-1),_=_w(i,u,r,d),[T,k,O,q]=((e,t,r,{head:n,body:o})=>{const i=t.atBottom||t.atTop,a=Jm({...n,fontWeight:aw},{maxNbrLinesOfText:3}).measureText,s=Jm({...o,fontWeight:aw},{maxNbrLinesOfText:3}).measureText,{estimateWidth:l}=Jm(n,{maxNbrLinesOfText:3}),u=C((()=>(e,t,r,n,o)=>{let u=25;return u+=28,n&&(u+=24),o&&(u+=20),Math.max(a(e)+u,i?s(t)+24+1:0,l(r))}),[l,a,s,i]),[c,d]=E(0),[p,f]=E((()=>uw(e,r,u)));eh((()=>{f(uw(e,r-c,u))}),[e,r,c,u]);const m=C((()=>((e,t,r)=>!!(e&&e.length>0)&&e.reduce(((e,t)=>e+t))+t<r)(p,c,r)),[p,c,r]);return[p,f,d,m]})(r.columns,r.totalsPosition,v.width,_),N=C((()=>({app:e,selectionsAPI:n,layout:i,model:a,translator:s,interactions:l,theme:u,keyboard:c,rootElement:d,embed:p,changeSortOrder:f,applyColumnWidths:m,styling:_,rect:v,viewService:y})),[e,n,i,a,s,l,u,c.active,d,p,f,m,_,v,y]);return Qi.jsx(Ow,{value:{headRowHeight:S,setHeadRowHeight:w,focusedCellCoord:R,setFocusedCellCoord:A,selectionState:I,selectionDispatch:L,hoverIndex:D,setHoverIndex:M,columnWidths:T,setColumnWidths:k,baseProps:N,tableData:r,setYScrollbarWidth:O,setPage:h,pageInfo:g,initialDataPages:b,showRightBorder:q,env:x},children:t})};function Fw(e,t){const r=function(e){return Tw.get(e)}(e),[n,o]=R(r),[,i]=P((e=>e+1),0),a=_(t),s=_(),l=n();if(void 0===l)throw new Error("You must call useContextSelector inside a valid context.");const u=C((()=>t(l)),[l,t]);return w((()=>{a.current=t,s.current=u}),[l,u,t]),w((()=>{const e=e=>{(a.current&&a.current(e))!==s.current&&i()};return o.add(e),()=>{o.delete(e)}}),[o]),u}function zw(e){var t;const r=tw();return null!=r&&null!==(t=r.components)&&void 0!==t&&null!==(t=t.MuiTable)&&void 0!==t&&t.styleOverrides&&(r.components.MuiTable.styleOverrides.root={}),lS({...r,direction:e})}const jw=Is(Xu,{shouldForwardProp:e=>"isLastColumn"!==e&&"hoverColor"!==e})((({isLastColumn:e,hoverColor:t})=>({pointerEvents:"auto",touchAction:"none",display:"flex",position:"absolute",height:"100%",top:0,cursor:"col-resize",width:(e?4:9)+"px",justifyContent:e?"flex-end":"center",marginLeft:"-4px","&:hover:not(:focus, :active)":{[`& .${ch}`]:{background:t||"#D9D9D9","@media (hover: none)":{background:"none"}}},"&:focus-visible, &:active":{outline:"none",[`& .${ch}`]:{background:"#177fe6",borderLeft:"1px solid #fff",borderRight:e?void 0:"1px solid #fff"}}}))),$w=Is(Xu)({position:"absolute",height:"100%",width:"3px"}),Bw=({columnWidth:e,keyValue:t,isLastColumn:r,isPivot:n,hoverColor:o,updateWidthCallback:i,confirmWidthCallback:a,handleBlur:s,setIsAdjustingWidth:l,isLeftColumn:u})=>{const c=_({initWidth:e,columnWidth:e,initX:0}),d=r?0:1,p=n&&!u,f={left:p?c.current.columnWidth-d:"100%"},m=t=>{c.current={initWidth:e,columnWidth:e,initX:null!=t?t:c.current.initX}};eh((()=>p&&m()),[e]);const h=e=>{const t=Math.max(e,dh.PixelsMin);c.current.columnWidth=t,i(t)},g=()=>{if(c.current.columnWidth!==c.current.initWidth){const e={type:ph.Pixels,pixels:c.current.columnWidth};a(e)}else null==l||l(!1)},b=e=>{const t=c.current.initWidth+e.clientX-c.current.initX;h(t)},v=e=>{_f(e),document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",v),g()},y=e=>{const t=c.current.initWidth+e.touches[0].clientX-c.current.initX;h(t)},x=e=>{_f(e),document.removeEventListener("touchmove",y),document.removeEventListener("touchend",x),g()},E=!n&&s?e=>{if(e.key===lh.LEFT||e.key===lh.RIGHT){_f(e);const t=5,r=e.key===lh.LEFT?-t:t;h(c.current.columnWidth+r)}else e.key===lh.SPACE||e.key===lh.ENTER?(_f(e),s(e),g()):e.key===lh.ESC&&(_f(e),s(e),h(c.current.initWidth))}:void 0;return S.createElement(jw,{className:uh,isLastColumn:r,hoverColor:o,style:f,key:t,onMouseDown:e=>{e.stopPropagation(),document.addEventListener("mousemove",b),document.addEventListener("mouseup",v),null==l||l(!0),m(e.clientX)},onDoubleClick:()=>a({type:ph.FitToContent}),onTouchStart:e=>{1===e.touches.length&&(e.stopPropagation(),document.addEventListener("touchmove",y),document.addEventListener("touchend",x),null==l||l(!0),m(e.touches[0].clientX))},onKeyDown:E,onBlur:s,onFocus:()=>m(),"data-testid":uh},S.createElement($w,{className:ch}))};function Hw(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Ww=(e,t)=>S.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Hw(e,t,r[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),S.createElement("path",{d:"M15 4H1V2h14zm0 10H1v-2h14zm0-5H1V7h14z"})),Gw=k(Ww);function Vw(){return Vw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Vw.apply(this,arguments)}const Uw=Is(Xu,{shouldForwardProp:e=>"rightAligned"!==e&&"shouldShowMenuIcon"!==e})((({rightAligned:e,shouldShowMenuIcon:t})=>({...e?{marginRight:"auto"}:{marginLeft:"auto"},height:24,display:t?"flex":"none",fontWeight:"bold",width:"100%",alignItems:"center",justifyContent:"center"}))),Yw=Is(Gw,{shouldForwardProp:e=>"isInteractionsActive"!==e})((({isInteractionsActive:e})=>({minWidth:"unset",position:"relative",cursor:e?"pointer":"default"}))),Kw=Is(Id)((({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}}))),Xw=Is(xc)((({theme:e})=>({"&.MuiDivider-root":{margin:e.spacing(.5)}}))),Jw=Is(_d)((({theme:e})=>({fontSize:"12px",height:24,fontWeight:"bold",padding:`${e.spacing(.25,2)} !important`,marginBottom:e.spacing(.5)}))),Zw=Is(_d,{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")}))),Qw=Is("div")((({theme:e})=>({position:"absolute",width:e.spacing(.5),height:16,left:0,top:"50%",transform:"TranslateY(-50%)",borderRadius:"0 2px 2px 0",background:"#01873d"}))),eR=Is("div")((()=>({display:"flex",justifyContent:"space-between",alignItems:"center"}))),tR=Is(Jl)((()=>({fontFamily:'"Source Sans Pro", HelveticaNeue, "Helvetica Neue", Helvetica, Arial, sans-serif',fontSize:"14px"}))),rR=Is(ed)((({theme:e})=>({width:16,minWidth:"unset !important",marginRight:e.spacing(1.5),lineHeight:0})));function nR(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const oR=(e,t)=>S.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){nR(e,t,r[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),S.createElement("path",{d:"M8.5 8 4 3.5 5.5 2l6 6-6 6L4 12.5z"})),iR=k(oR);let aR={};const sR=({autoFocus:e,id:t,onClick:r,itemTitle:n,icon:o,enabled:i,subMenus:a,isSubMenu:s,isActive:l,handleHeadCellMenuKeyDown:u})=>{const[c,d]=E(!1),p=_(null),f=T((e=>{e.stopPropagation(),d(!1)}),[d]);return S.createElement(S.Fragment,null,S.createElement(Zw,{ref:a?p:null,key:t,"data-testid":`menu-item-${t}`,className:"nebula-table-utils-head-menu-item",onClick:async e=>{"keyup"!==e.type&&(r&&(await r(e),aR={}),null!=a&&a.length&&(d(!0),aR[n]=d))},disabled:!i,autoFocus:e,isSubMenu:!!s,isActive:!!l,onKeyDown:u},l&&S.createElement(Qw,null),S.createElement(eR,null,S.createElement(rR,null,S.createElement(o,null)),S.createElement(tR,{variant:"body2"},n)),null!=a&&a.length?S.createElement(iR,null):null),(null==a?void 0:a.length)&&S.createElement(cR,{isSubMenu:!0,open:c,anchorEl:p.current,onClose:f,menuGroups:(m=a,h=aR,m.map((e=>e.map((e=>{var t;return{...e.groupHeading?{groupHeading:e.groupHeading}:{},items:null===(t=e.items)||void 0===t?void 0:t.map((({onClick:e,...t})=>({...t,...e?{onClick:async t=>{Object.entries(h).map((([,e])=>e(!1))),await e(t)}}:{}})))}}))))),transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},handleHeadCellMenuKeyDown:u}));var m,h},lR=({menuGroup:e,isSubMenu:t,handleHeadCellMenuKeyDown:r})=>e.map((e=>{var n;return[[e.groupHeading&&S.createElement(Jw,{disabled:!0,style:{opacity:1}},e.groupHeading),null===(n=e.items)||void 0===n?void 0:n.map((e=>S.createElement(sR,Vw({key:e.id},e,{isSubMenu:t,handleHeadCellMenuKeyDown:r}))))].filter(Boolean)]})),uR={appear:200,enter:200,exit:100},cR=({anchorEl:e,open:t,onClose:r,menuGroups:n,transformOrigin:o,anchorOrigin:i,isSubMenu:a,handleHeadCellMenuKeyDown:s})=>n.length?S.createElement(Kw,Vw({className:"nebula-table-utils-head-menu",open:t,anchorEl:e,onClose:r,transitionDuration:uR,MenuListProps:{id:ah}},i?{anchorOrigin:i}:{},o?{transformOrigin:o}:{}),(({itemGroups:e,isSubMenu:t,handleHeadCellMenuKeyDown:r})=>e.map(((n,o)=>[lR({menuGroup:n,isSubMenu:t,handleHeadCellMenuKeyDown:r}),o<e.length-1?S.createElement(Xw,{"data-testid":"group-divider",variant:"middle",key:"divider"}):void 0])))({itemGroups:n,isSubMenu:a,handleHeadCellMenuKeyDown:s})):null,dR={canSelectAll:!1,canClearSelections:!1,canSelectPossible:!1,canSelectAlternative:!1,canSelectExcluded:!1},pR=(e,t)=>e.some((e=>t[e]>0));function fR(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const mR=(e,t)=>S.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){fR(e,t,r[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),S.createElement("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"})),hR=k(mR);function gR(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const bR=(e,t)=>S.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){gR(e,t,r[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),S.createElement("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 0m0-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m-1-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 0M9.166 6.166c1.555-1.555 4.113-1.555 5.668 0s1.555 4.113 0 5.668-4.113 1.555-5.668 0-1.555-4.063 0-5.668m4.966 1.555a.56.56 0 0 0 0-.803.56.56 0 0 0-.803 0l-1.304 1.305-1.304-1.305a.522.522 0 0 0-.803 0 .524.524 0 0 0 0 .803l1.305 1.304-1.305 1.304c-.25.2-.25.552 0 .803.251.25.602.25.803 0l1.304-1.304 1.304 1.304c.2.25.552.25.803 0 .2-.201.25-.602 0-.803l-1.304-1.304z"})),vR=k(bR);function yR(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const xR=(e,t)=>S.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){yR(e,t,r[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),S.createElement("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"})),SR=k(xR);function ER(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const CR=(e,t)=>S.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){ER(e,t,r[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),S.createElement("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"})),wR=k(CR);function RR(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const AR=(e,t)=>S.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){RR(e,t,r[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),S.createElement("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"})),IR=k(AR);function LR(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const DR=(e,t)=>S.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){LR(e,t,r[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),S.createElement("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"})),PR=k(DR);function MR(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const _R=(e,t)=>S.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){MR(e,t,r[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),S.createElement("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"})),TR=k(_R);function kR(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const OR=(e,t)=>S.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){kR(e,t,r[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),S.createElement("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"})),qR=k(OR);function NR(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const FR=(e,t)=>S.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){NR(e,t,r[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),S.createElement("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"})),zR=k(FR);function jR(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const $R=(e,t)=>S.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){jR(e,t,r[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),S.createElement("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"})),BR=k($R);let HR=function(e){return e.SORTING="sorting",e.SEARCHING="searching",e.SELECTIONS="selections",e.ADJUST_HEADER_SIZE="adjustHeaderSize",e}({});const WR=({headerData:e,translator:t,menuAvailabilityFlags:r,setOpen:n,sortFromMenu:o,interactions:i,embedListbox:a,fieldInstance:s,selectionActionsEnabledStatus:l,anchorRef:u,setFocusOnColumnAdjuster:c})=>{const d=[];if(r[HR.SORTING]){const{isActivelySorted:r,sortDirection:i,isPivot:a}=e,s=!a&&!r||"D"===i,l=!a&&!r||"A"===i;d.push([{groupHeading:t.get("NebulaTableUtils.MenuGroupLabel.Sorting"),items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortAscending"),onClick:async e=>{e.stopPropagation(),await(null==o?void 0:o(e)),n(!1)},icon:hR,enabled:s,isActive:!!r&&"A"===i,autoFocus:s},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortDescending"),onClick:async e=>{e.stopPropagation(),await(null==o?void 0:o(e)),n(!1)},icon:wR,enabled:l,isActive:!!r&&"D"===i,autoFocus:!s&&l}]}])}if(e.isDim&&null!=i&&i.select){const e=[];r[HR.SEARCHING]&&e.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Search"),onClick:e=>{e.stopPropagation(),n(!1),a()},icon:IR,enabled:!0}]}]),r[HR.SELECTIONS]&&e.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Selections"),icon:BR,enabled:!0,subMenus:[[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAll"),onClick:async e=>{e.stopPropagation(),n(!1),await(null==s?void 0:s.selectAll())},icon:PR,enabled:l.canSelectAll},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectPossible"),onClick:async e=>{e.stopPropagation(),n(!1),await(null==s?void 0:s.selectPossible())},icon:zR,enabled:l.canSelectPossible},{id:3,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAlternative"),onClick:async e=>{e.stopPropagation(),n(!1),await(null==s?void 0:s.selectAlternative())},icon:TR,enabled:l.canSelectAlternative},{id:4,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectExcluded"),onClick:async e=>{e.stopPropagation(),n(!1),await(null==s?void 0:s.selectExcluded())},icon:qR,enabled:l.canSelectExcluded}]}],[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.ClearSelections"),onClick:async e=>{e.stopPropagation(),n(!1),await(null==s?void 0:s.clear())},icon:vR,enabled:l.canClearSelections}]}]]}]}]),e.length>0&&d.push(...e)}return r[HR.ADJUST_HEADER_SIZE]&&d.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.AdjustColumnSize"),onClick:e=>{e.stopPropagation(),e.preventDefault(),n(!1),null==c||c(u)},icon:SR,enabled:!0}]}]),d},GR=({open:e,setOpen:t,anchorRef:r,headerData:n,translator:o,interactions:i,handleHeadCellMenuKeyDown:a,menuAvailabilityFlags:s,shouldShowMenuIcon:l=!0,sortRelatedArgs:u,searchRelatedArgs:c,selectionRelatedArgs:d,adjustHeaderSizeRelatedArgs:p})=>{var f;const m=rh({translator:o}),{headTextAlign:h,qLibraryId:g,fieldId:b}=n,{fieldInstance:v,selectionActionsEnabledStatus:y,resetSelectionActionsEnabledStatus:x,updateSelectionActionsEnabledStatus:C}=(({headerData:e,app:t})=>{const[r,n]=E(null),[o,i]=E(dR);return w((()=>{t&&t.getField&&e&&e.isDim&&t.getField(e.fieldId).then(n).catch(console.error)}),[t,e]),{fieldInstance:r,selectionActionsEnabledStatus:o,resetSelectionActionsEnabledStatus:T((()=>i(dR)),[]),updateSelectionActionsEnabledStatus:T((t=>{const r=t.qHyperCube.qDimensionInfo.find((t=>t.qFallbackTitle===e.label));r&&i({canSelectAll:pR(["qOption","qAlternative","qExcluded","qDeselected"],r.qStateCounts),canClearSelections:pR(["qSelected"],r.qStateCounts),canSelectPossible:pR(["qOption"],r.qStateCounts),canSelectAlternative:pR(["qAlternative"],r.qStateCounts),canSelectExcluded:pR(["qAlternative","qExcluded"],r.qStateCounts)})}),[e.label,i])}})({headerData:n,app:null==d?void 0:d.app}),R=T((()=>{const e=g?{qLibraryId:g,type:"dimension"}:b;if(null!=c&&c.embed&&c.listboxRef){const{embed:t,listboxRef:r}=c;t.__DO_NOT_USE__.popover(r.current,e,{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}})}}),[c,b,g]);w((()=>{e||(x(),null!=d&&d.model&&d.model.getLayout().then((e=>{C(e)})).catch((e=>console.error(e))))}),[e,x,C,null==d?void 0:d.model]);const A=T((e=>{e.stopPropagation(),t(!1)}),[t]);return i.active?S.createElement(Uw,{rightAligned:"right"===h,shouldShowMenuIcon:l,className:ih},l&&S.createElement(Yw,{height:nh,className:oh,"data-testid":oh,isInteractionsActive:null!==(f=i.active)&&void 0!==f&&f},S.createElement(Gw,null)),S.createElement(cR,{open:e,anchorEl:r.current,onClose:A,menuGroups:WR({headerData:n,translator:m,menuAvailabilityFlags:s,setOpen:t,...u,embedListbox:R,interactions:i,fieldInstance:v,selectionActionsEnabledStatus:y,anchorRef:r,setFocusOnColumnAdjuster:null==p?void 0:p.setFocusOnColumnAdjuster}),handleHeadCellMenuKeyDown:a})):null},VR=e=>e.isDark?{background:e.color,borderColor:Cp.DARK_MODE_BORDER,color:Cp.DARK_MODE_TEXT,disabledColor:Cp.DARK_MODE_DISABLED,iconColor:Cp.DARK_MODE_TEXT}:{background:e.color,borderColor:Cp.BORDER_MEDIUM,color:Cp.TEXT,disabledColor:Cp.DISABLED},UR=Is(Xu,{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}`}))),YR=Is(gp,{shouldForwardProp:e=>"footerStyle"!==e})((({footerStyle:e,theme:t})=>({background:"inherit",marginRight:t.spacing(1),color:e.color,"& .MuiNativeSelect-icon, .MuiNativeSelect-select":{color:e.iconColor}}))),KR=Is(sc,{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)}))),XR=Is(Jl)((({theme:e})=>({color:"inherit",margin:e.spacing(0,1,0,1)}))),JR=({children:e,footerContainer:t,interactions:r,theme:n,paginationNeeded:o=!0})=>{const i=C((()=>VR(n.background)),[n]);if(!r.active)return null;const a=o?S.createElement(UR,{footerStyle:i},e):null;return t?z.createPortal(e,t):a},ZR=M({}),QR=()=>R(ZR),eA=({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:m,layout:h})=>{const g=(e=>!e.enabled||e.active)(c)?0:-1,b=C((()=>VR(p.background)),[p]),v=o?o.getBoundingClientRect().width:m.width,y=rh({translator:d}),x=C((()=>({direction:t,pageInfo:r,handleChangeRowsPerPage:n,footerContainer:o,isSelectionMode:i,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:u,keyboard:c,translator:y,theme:p,interactions:f,rect:m,layout:h,footerStyle:b,tabIndex:g,width:v})),[t,r,n,o,i,a,s,l,u,c,y,p,f,m,h,b,g,v]);return S.createElement(ZR.Provider,{value:x},e)};let tA=function(e){return e.FirstPage="FirstPage",e.LastPage="LastPage",e.NextPage="NextPage",e.PreviousPage="PreviousPage",e}({}),rA=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}({});function nA(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const oA=(e,t)=>S.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){nA(e,t,r[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),S.createElement("path",{d:"m7 8 4.5 4.5L10 14 4 8l6-6 1.5 1.5z"})),iA=k(oA);function aA(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const sA=(e,t)=>S.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){aA(e,t,r[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),S.createElement("path",{d:"m12 2 1.5 1.5L9 8l4.5 4.5L12 14 6 8zM4 2v12H2V2z"})),lA=k(sA);function uA(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const cA=(e,t)=>S.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){uA(e,t,r[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),S.createElement("path",{d:"m3.5 2 6 6-6 6L2 12.5 6.5 8 2 3.5zM14 2v12h-2V2z"})),dA=k(cA),pA={FirstPage:lA,PreviousPage:iA,NextPage:iR,LastPage:dA,FirstPageRTL:dA,PreviousPageRTL:iR,NextPageRTL:iA,LastPageRTL:lA},fA=({disabledCondition:e,pageNumber:t,type:r})=>{const{direction:n,footerStyle:o,handleChangePage:i,translator:a,interactions:s,tabIndex:l}=QR(),u=pA[`${r}${"rtl"===n?"RTL":""}`];return{styledProps:{footerStyle:o,disabledCondition:e,size:"small","data-testid":"pagination-action-icon-button","aria-disabled":e,"aria-label":a.get(`NebulaTableUtils.Pagination.${r}`),title:s.passive?a.get(`NebulaTableUtils.Pagination.${r}`):void 0,tabIndex:l,onClick:e?null:()=>i(t)},IconComponent:u}},mA=()=>{const{pageInfo:e,width:t}=QR(),r=0===e.page,{IconComponent:n,styledProps:o}=fA({type:tA.FirstPage,disabledCondition:r,pageNumber:0});return t<=rA.FirstPage?null:S.createElement(KR,o,S.createElement(n,{height:nh}))},hA=(e,t,r=!1)=>{r&&e.key===lh.TAB&&!e.shiftKey&&(_f(e),Mf(e.target,t,!1))},gA=()=>{const{pageInfo:e,keyboard:t,totalPages:r,isSelectionMode:n,width:o}=QR(),i=e.page>=r-1,{IconComponent:a,styledProps:s}=fA({type:tA.LastPage,disabledCondition:i,pageNumber:r-1}),l=t.enabled?e=>hA(e,t,n):null;return o<=rA.LastPage?null:S.createElement(KR,Vw({},s,{onKeyDown:l}),S.createElement(a,{height:nh}))},bA=()=>{const{pageInfo:e,keyboard:t,totalPages:r,isSelectionMode:n,width:o}=QR(),i=e.page>=r-1,{IconComponent:a,styledProps:s}=fA({type:tA.NextPage,disabledCondition:i,pageNumber:e.page+1}),l=!(o>rA.FirstPage&&o>rA.LastPage)&&t.enabled?e=>hA(e,t,n):null;return S.createElement(KR,Vw({},s,{onKeyDown:l}),S.createElement(a,{height:nh}))},vA=()=>{const{pageInfo:e}=QR(),t=0===e.page,{IconComponent:r,styledProps:n}=fA({type:tA.PreviousPage,disabledCondition:t,pageNumber:e.page-1});return S.createElement(KR,n,S.createElement(r,{height:nh}))},yA=()=>{const{translator:e,width:t,pageInfo:r,totalRowCount:n}=QR(),{page:o,rowsPerPage:i}=r;if(t<=rA.DisplayedRowsLabel)return null;const a=e.get("NebulaTableUtils.Pagination.DisplayedRowsLabel",[`${o*i+1} - ${Math.min((o+1)*i,n)}`,n.toString()]);return S.createElement(XR,{variant:"caption"},a)},xA=({name:e,value:t,options:r,handleChange:n})=>{const{layout:o,footerStyle:i,translator:a,tabIndex:s}=QR(),l=o.qInfo.qId,u=a.get(`NebulaTableUtils.Pagination.${e}`),c=`${e}-dropdown`,d=`${c}-label-${l}`,p={tabIndex:s,id:`${c}-${l}`,"data-testid":c,"aria-labelledby":d};return S.createElement(S.Fragment,null,S.createElement(XR,{variant:"caption",id:d},u,":"),S.createElement(YR,{footerStyle:i,size:"small",native:!0,value:t,onChange:n,inputProps:p},r))},SA=()=>{var e;const{pageInfo:t,isSelectionMode:r,totalColumnCount:n,width:o,handleChangeRowsPerPage:i}=QR();if(!(!(null===(e=t.rowsPerPageOptions)||void 0===e||!e.length)&&!r&&o>rA.RowsPerPage&&n<=100)||void 0===t.rowsPerPageOptions)return null;const a=S.createElement(S.Fragment,null,t.rowsPerPageOptions.map((e=>S.createElement("option",{key:e,value:e},e))));return S.createElement(xA,{name:"RowsPerPage",value:t.rowsPerPage,options:a,handleChange:e=>{null==i||i(+e.target.value)}})},EA=1e3,CA="…",wA=({totalPages:e,page:t})=>{const r=Math.min(e,EA),n=r<e&&t>500,o=n?Math.min(500+t,e):r,i=n?Math.max(0,o-EA):0,a=Array.from(Array(r).keys()).map((e=>{const t=e+i;return S.createElement("option",{key:t,value:t},t+1)}));return i>0&&a.unshift(S.createElement("option",{key:"startMoreOptions",value:CA,disabled:!0},CA)),o<e-1&&a.push(S.createElement("option",{key:"endMoreOptions",value:CA,disabled:!0},CA)),S.createElement(S.Fragment,null,a)},RA=()=>{const{pageInfo:e,width:t,totalPages:r,handleChangePage:n}=QR(),{page:o}=e;if(t<=rA.SelectPage)return null;const i=S.createElement(wA,{totalPages:r,page:o});return S.createElement(xA,{name:"SelectPage",value:o,options:i,handleChange:e=>n(+e.target.value)})};var AA=O((e=>S.createElement(eA,e,S.createElement(SA,null),S.createElement(RA,null),S.createElement(yA,null),S.createElement(mA,null),S.createElement(vA,null),S.createElement(bA,null),S.createElement(gA,null))));const IA=e=>S.createElement(JR,e,S.createElement(AA,e)),LA=$S(VE,{shouldForwardProp:e=>"background"!==e})((({background:e})=>({height:"100%",background:e.color}))),DA=$S(VE,{shouldForwardProp:e=>"lines"!==e&&"allIconsDisabled"!==e&&"headCell"!==e&&"isPagination"!==e&&"wordBreak"!==e&&"virtualizedCell"!==e})((({lines:e,wordBreak:t,allIconsDisabled:r=!1,headCell:n=!1,isPagination:o=!1,virtualizedCell:i=!1})=>({lineHeight:"calc(4/3)",fontSize:"inherit",...(n||t||1===e)&&{height:"100%",textOverflow:"ellipsis",overflow:"hidden",wordBreak:n&&o?"break-word":"break-all",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical",...n&&{whiteSpace:r||i?"normal":"nowrap"}}}))),PA=$S(VE)({overflow:"hidden",textOverflow:"ellipsis"});function MA(e,t){const r=_(!1);w((()=>{r.current?e():r.current=!0}),t)}const _A=(e,t)=>{var r;return null===(r=e.getElementsByClassName("sn-table-row")[t[0]])||void 0===r?void 0:r.getElementsByClassName("sn-table-cell")[t[1]]},TA=e=>e.querySelector("td[tabindex='0'], th[tabindex='0']"),kA=e=>{const t=e.nextElementSibling;var r;return t?"HR"===t.tagName?kA(t):t:null===(r=e.parentElement)||void 0===r||null===(r=r.children)||void 0===r?void 0:r[0]},OA=e=>{const t=e.previousElementSibling;if(!t){var r,n;const t=null===(r=e.parentElement)||void 0===r||null===(r=r.children)||void 0===r?void 0:r.length;return null===(n=e.parentElement)||void 0===n||null===(n=n.children)||void 0===n?void 0:n[t-1]}return"HR"===t.tagName?OA(t):t},qA=e=>{setTimeout((()=>{var t;const r=null===(t=e.current)||void 0===t||null===(t=t.closest(".sn-table-cell"))||void 0===t?void 0:t.querySelector(`.${uh}`);null==r||r.setAttribute("tabIndex","0"),null==r||r.focus()}),0)},NA=({focusType:e,cell:t})=>{if(t)switch(e){case YS.FOCUS:t.focus(),t.setAttribute("tabIndex","0");break;case YS.FOCUS_BUTTON:const e=t.querySelector(".sn-table-head-label");null==e||e.focus();break;case YS.BLUR:t.blur(),t.setAttribute("tabIndex","-1");break;case YS.ADD_TAB:t.setAttribute("tabIndex","0");break;case YS.REMOVE_TAB:t.setAttribute("tabIndex","-1")}},FA=({evt:e,rootElement:t,cellCoord:r,setFocusedCellCoord:n,allowedRows:o})=>{NA({focusType:YS.REMOVE_TAB,cell:e.currentTarget});const i=((e,t,r,n={top:0,bottom:0})=>{const o=n.top>0,i=n.top,a=t.getElementsByClassName("sn-table-row").length-1-n.bottom,s=t.getElementsByClassName("sn-table-head-cell").length-1;let[l,u]=r;switch(e.key){case US.DOWN:l<a&&l++;break;case US.UP:l>i&&l--;break;case US.RIGHT:if(o)break;u<s?u++:l<a&&(l++,u=0);break;case US.LEFT:if(o)break;u>0?u--:l>0&&(l--,u=s)}return[l,u]})(e,t,r,o),a=_A(t,i);return NA({focusType:YS.FOCUS,cell:a}),n(i),a},zA=(e,t,r,n)=>{var o;(NA({focusType:YS.REMOVE_TAB,cell:TA(t)}),r(e),n.enabled&&!n.active)?null===(o=n.focus)||void 0===o||o.call(n):NA({focusType:YS.ADD_TAB,cell:_A(t,e)})},jA=(e,t,r)=>{w((()=>{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;let{scrollLeft:o}=r,i=o+e.deltaX;t&&(i=n+i),n>0&&(i<0||i>n+1)&&(e.preventDefault(),o=t?Math.min(0,Math.min(n,i)):Math.max(0,Math.min(n,i)))})(e,"rtl"===t,n),i=e=>{var t;r.scrollLeft=(null===(t=e.currentTarget)||void 0===t?void 0:t.scrollLeft)||0};return n.addEventListener("wheel",o),n.addEventListener("scroll",i),()=>{n.removeEventListener("wheel",o),n.removeEventListener("scroll",i)}}),[e,t,r])},$A=(e,t=!1)=>e.key===US.ESC&&!t||(e.key===US.LEFT||e.key===US.RIGHT)&&dw(e),BA=({evt:e,rootElement:t,cell:r,selectionDispatch:n,isSelectionsEnabled:o,setFocusedCellCoord:i,announce:a,totalsPosition:s,isSelectionMode:l})=>{const u=s.atTop?2:1,c=[r.pageRowIdx+u,r.pageColIdx],d={top:l?u:0,bottom:l&&s.atBottom?1:0},p=FA({evt:e,rootElement:t,cellCoord:c,setFocusedCellCoord:i,allowedRows:d});e.key!==US.UP&&e.key!==US.DOWN||(e.key===US.UP&&((e,t)=>{const r=t.getElementsByClassName("sn-table-container")[0];if(null==r||!r.scrollTo)return;const[n,o]=e;if(n<2)r.scrollTo({top:0,behavior:"auto"});else{var i;const e=t.getElementsByClassName("sn-table-head-cell")[0],a=null===(i=t.getElementsByClassName("sn-table-row")[n])||void 0===i?void 0:i.getElementsByClassName("sn-table-cell")[o];if(!a||!e)return;if(a.offsetTop-e.offsetHeight<r.scrollTop){const t=r.scrollTop-a.offsetHeight-e.offsetHeight;r.scrollTo({top:Math.max(0,t),behavior:"auto"})}}})([r.pageRowIdx,r.pageColIdx],t),((e,t,r)=>t.shiftKey&&(t.key===US.UP&&0!==r.pageRowIdx||t.key===US.DOWN&&!r.isLastRow)&&e&&r.isSelectable)(o,e,r)?n({type:VS.SELECT_MULTI_ADD,payload:{cell:r,evt:e,announce:a}}):((e,t,r=!1)=>{r&&t&&e(t.classList.contains("selected")?{keys:["SNTable.SelectionLabel.SelectedValue"]}:{keys:["SNTable.SelectionLabel.NotSelectedValue"]})})(a,p,l))},HA=e=>{var t;const{key:r,currentTarget:n}=e,o=null!==(t=document.activeElement)&&void 0!==t?t:n;if(r===US.DOWN||r===US.UP){const t=e=>r===US.DOWN?kA(e):OA(e);_f(e);let n=t(o);for(;n;){if("true"!==n.ariaDisabled){n.focus();break}n=t(n)}}},WA=({evt:e,rootElement:t,cell:r,selectionDispatch:n,isSelectionsEnabled:o,setFocusedCellCoord:i,announce:a,keyboard:s,paginationNeeded:l,totalsPosition:u,selectionsAPI:c})=>{if(e.currentTarget.classList.contains("excluded"))return void _f(e);const d=null==c?void 0:c.isModal();if(!$A(e,d))switch(e.key){case US.SPACE:_f(e),r.isSelectable&&o&&n({type:VS.SELECT,payload:{cell:r,evt:e,announce:a}});break;case US.ENTER:_f(e),d&&(null==c||c.confirm(),a({keys:["SNTable.SelectionLabel.SelectionsConfirmed"]}));break;case US.ESC:_f(e),null==c||c.cancel(),a({keys:["SNTable.SelectionLabel.ExitedSelectionMode"]});break;case US.TAB:(({evt:e,keyboard:t,isSelectionMode:r,paginationNeeded:n})=>{(null==t?void 0:t.enabled)&&r&&(e.shiftKey||!e.shiftKey&&!n)&&(_f(e),Mf(e.currentTarget,t,e.shiftKey))})({evt:e,keyboard:s,isSelectionMode:d,paginationNeeded:l});break;case US.C:_f(e),cw(e)&&hh(e.currentTarget);break;default:pw(e.key)&&(_f(e),BA({evt:e,rootElement:t,cell:r,selectionDispatch:n,isSelectionsEnabled:o,setFocusedCellCoord:i,announce:a,totalsPosition:u,isSelectionMode:d}))}},GA=e=>{const{layout:t,rect:r,theme:n}=Fw(kw,(e=>e.baseProps)),[o,i]=E(0),[a,s]=E(0);return q((()=>{if(e.current){var t;const{offsetWidth:r=0,offsetHeight:n=0,clientWidth:o=0,clientHeight:a=0}=null!==(t=e.current)&&void 0!==t?t:{},l=n-a;s(r-o),i(l)}}),[e,t,r,n]),{xScrollbarWidth:o,yScrollbarWidth:a}},VA=$S("div")({clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",overflow:"hidden",position:"absolute",whiteSpace:"nowrap",width:"1px"}),UA=$S(OC,{shouldForwardProp:e=>"fullHeight"!==e&&"interactions"!==e})((({fullHeight:e,interactions:t})=>({height:e?"100%":"calc(100% - 41px)",overflow:t.active?"auto":"hidden",border:"none"}))),YA=$S(vC,{shouldForwardProp:e=>"showRightBorder"!==e&&"styling"!==e})((({showRightBorder:e,styling:t})=>({tableLayout:"fixed",width:"min-content",borderRight:e?`1px solid ${t.body.borderRightColor}`:void 0}))),KA=()=>Qi.jsxs(Qi.Fragment,{children:[Qi.jsx(VA,{className:"sn-table-announcer-1","aria-live":"polite","aria-atomic":"true"}),Qi.jsx(VA,{className:"sn-table-announcer-2","aria-live":"polite","aria-atomic":"true"})]}),XA=e=>e.stopPropagation(),JA=({href:e,text:t,interactions:r,color:n})=>S.createElement(Wc,{href:e,rel:"noreferrer",target:"_blank",underline:"hover",title:t,onClick:XA,style:{pointerEvents:r.active?"auto":"none",color:null!=n?n:void 0,opacity:r.active&&r.passive||n?void 0:.4}},t),ZA=({layout:e,viewService:t,isImagesEnabled:r})=>{var n,o;let i=null===(n=t.viewState)||void 0===n?void 0:n.maxLineCount;var a,s;r&&(i=null!==(a=i)&&void 0!==a?a:null===(s=Iw(e))||void 0===s||null===(s=s.content)||void 0===s?void 0:s.rowHeight);return{maxNbrLines:null!==(o=i)&&void 0!==o?o:3,isStaticNbrOfLines:void 0!==i}},QA=({children:e,fontSize:t="",wordBreak:r=!1,isPagination:n=!1,virtualizedCell:o=!1,lines:i=3,headCell:a=!1,allIconsDisabled:s=!1})=>{if(a)return Qi.jsx(DA,{component:"span",className:"sn-table-cell-text",lines:i,isPagination:n,headCell:!0,allIconsDisabled:s,children:e});const l=parseInt(t||iw,10),u=Qi.jsx(DA,{component:"span",className:"sn-table-cell-text",wordBreak:r,lines:i,virtualizedCell:o,children:e});return r?u:Qi.jsx(PA,{minHeight:l*ow,maxHeight:l*ow*i,children:u})},eI=e=>{let t="center",r="center";return"flex-start"===(null==e?void 0:e.vertical)?t="top":"flex-end"===(null==e?void 0:e.vertical)&&(t="bottom"),"flex-start"===(null==e?void 0:e.horizontal)?r="left":"flex-end"===(null==e?void 0:e.horizontal)&&(r="right"),`${r} ${t}`},tI=e=>{switch(e){case"alwaysFit":return"contain";case"fill":return"fill";case"fitHeight":case"fitWidth":return"cover";case"originalSize":return"none";default:return}},rI=({representation:e,textStyle:t,maxImageHeight:r,wrapInContainer:n})=>{const{url:o,text:i,imageSize:a,resolvedImagePosition:s}=e,l="fitHeight"===a,u=Qi.jsx("img",{src:o,alt:i,style:{width:l?"auto":"100%",height:"100%",maxHeight:r,objectFit:tI(a),objectPosition:eI(s),...t,overflow:"hidden"}});var c;return n?Qi.jsx("div",{"data-key":"image-horizontal-container",style:{width:"100%",height:l?r:"100%",overflow:"hidden",display:"flex",justifyContent:l?null==e||null===(c=e.resolvedImagePosition)||void 0===c?void 0:c.horizontal:void 0},children:u}):u},nI=({cell:e,style:t,maxImageHeight:r,virtualizedCell:n})=>{const{flags:o}=Fw(kw,(e=>e.env)),{interactions:i,viewService:a,layout:s}=Fw(kw,(e=>e.baseProps)),l=Fw(kw,(e=>{var t;return null===(t=e.selectionState.api)||void 0===t?void 0:t.isActive()})),{maxNbrLines:u}=ZA({viewService:a,layout:s,isImagesEnabled:o.isEnabled("CLIENT_IM_5715_LINKS_AND_IMAGES")});let c=e.representation.text;return e.representation.type!==xv.Link||l||(c=Qi.jsx(JA,{href:e.representation.url,text:e.representation.text,interactions:i,color:t.cellForegroundColor})),e.representation.type===xv.Image?Qi.jsx(rI,{representation:e.representation,textStyle:t,maxImageHeight:r,wrapInContainer:!n}):Qi.jsx(QA,{wordBreak:!e.isNumeric,fontSize:t.fontSize,lines:u,virtualizedCell:n,children:c})},oI=({selectionsAPI:e,selectionDispatch:t,setShouldRefocus:r,keyboard:n,tableWrapperRef:o})=>{w((()=>{const i=()=>{t({type:VS.RESET})},a=()=>{t({type:VS.CLEAR})},s=()=>{var e;if(null!==(e=o.current)&&void 0!==e&&e.contains(document.activeElement))r();else if(n.enabled){var t;null===(t=n.blur)||void 0===t||t.call(n,!0)}i()};return null==e||e.on("deactivated",i),null==e||e.on("canceled",i),null==e||e.on("confirmed",s),null==e||e.on("cleared",a),()=>{null==e||e.removeListener("deactivated",i),null==e||e.removeListener("canceled",i),null==e||e.removeListener("confirmed",s),null==e||e.removeListener("cleared",a)}}),[e,n,t,r,o])},iI=e=>parseInt(null!=e?e:sw.fontSize,10)*ow,aI=({maxNbrLines:e,isStaticNbrOfLines:t,lineHeight:r})=>t?r*e+8+1:void 0,sI=(e,t,r,n)=>({handleMouseDown:n=>{null==e||e(n);const o=n.target;if(t.isSelectable&&"A"!==o.tagName){const e=()=>r({type:VS.SELECT_MULTI_END});r({type:VS.SELECT_MOUSE_DOWN,payload:{cell:t,mouseupOutsideCallback:e}})}},handleMouseOver:e=>{1===e.buttons&&r({type:VS.SELECT_MULTI_ADD,payload:{cell:t,evt:e,announce:n}})},handleMouseUp:e=>{0===e.button&&r({type:VS.SELECT_MOUSE_UP,payload:{cell:t,evt:e,announce:n}})}}),lI=$S(RC,{shouldForwardProp:e=>"lastRowBottomBorder"!==e})((({lastRowBottomBorder:e})=>({"& tr:last-child":{"& td, th":{borderBottomWidth:e}}}))),uI=$S(YC,{shouldForwardProp:e=>"hoverColors"!==e&&"hover"!==e})((({hover:e,hoverColors:t})=>({"&&:hover":{background:"none"},...e&&{"&&:hover":{"& td:not(.selected), th:not(.selected)":t}}}))),cI=$S(MC,{shouldForwardProp:e=>"cellStyle"!==e})((({cellStyle:e,theme:t})=>({...sw,...e,padding:t.spacing(.5,1.5),verticalAlign:"top",width:"100%",height:"100%"}))),dI=$S(MC,{shouldForwardProp:e=>"atTop"!==e&&"headRowHeight"!==e&&"totalsStyle"!==e})((({totalsStyle:e,atTop:t,headRowHeight:r,theme:n})=>({...sw,...e,fontWeight:aw,position:"sticky",padding:n.spacing(.5,1.5),borderWidth:t?"0px 1px 1px 0px":"1px 1px 1px 0px",top:t&&r,bottom:!t&&0,verticalAlign:t?"bottom":"top"})));function pI(e){return t=>{const{cell:r,styling:n,announce:o,onMouseDown:i}=t,a=Fw(kw,(e=>mw(r,e.selectionState))),s=Fw(kw,(e=>e.selectionDispatch)),{handleMouseDown:l,handleMouseOver:u,handleMouseUp:c}=sI(i,r,s,o),d=function(e,t){let r={};switch(t){case GS.SELECTED:r=nw.SELECTED;break;case GS.POSSIBLE:r=nw.POSSIBLE;break;case GS.EXCLUDED:r={background:`${nw.EXCLUDED_BACKGROUND}, ${e.background}`,selectedCellClass:GS.EXCLUDED}}return{...e,...r}}(n,a);return Qi.jsx(e,{...t,styling:d,onMouseUp:c,onMouseDown:l,onMouseOver:u})}}function fI(e,t){let r=(n=cI,e=>{const{styling:{selectedCellClass:t,...r},component:o,align:i,children:a,scope:s,tabIndex:l,onKeyDown:u,onMouseDown:c,onKeyUp:d,onMouseUp:p,onMouseOver:f,title:m}=e;return Qi.jsx(n,{cellStyle:r,component:o,scope:s,align:i,tabIndex:l,className:`sn-table-cell ${t||""} ${sh}`,title:m,onKeyDown:u,onMouseDown:c,onKeyUp:d,onMouseUp:p,onMouseOver:f,children:a})});var n;return t&&(r=pI(r)),e&&(r=function(e){return t=>{const{cell:r,column:n,styling:o}=t,i=C((()=>Mw(o,r.qAttrExps,n.qAttrExprInfoIDs)),[o,r.qAttrExps,n.qAttrExprInfoIDs]);return Qi.jsx(e,{...t,styling:i})}}(r)),r}const mI=()=>{const{columns:e,totalsPosition:{atTop:t},rows:r}=Fw(kw,(e=>e.tableData)),{rootElement:n,selectionsAPI:o,keyboard:i,styling:a,interactions:s}=Fw(kw,(e=>e.baseProps)),l=Fw(kw,(e=>e.headRowHeight)),u=Fw(kw,(e=>e.setFocusedCellCoord));return Qi.jsx(YC,{className:"sn-table-row sn-table-totals-row",children:e.map(((e,c)=>{const d=[t?1:r.length+1,c];return Qi.jsx(dI,{totalsStyle:a.totals,headRowHeight:l,atTop:t,align:e.totalsTextAlign,className:`sn-table-cell ${sh}`,tabIndex:-1,title:s.passive?e.totalInfo:void 0,onKeyDown:e=>{((e,t,r,n,o=!1)=>{if(o)_f(e);else if(!$A(e))switch(e.key){case US.C:_f(e),cw(e)&&hh(e.currentTarget);break;case US.SPACE:e.preventDefault();break;default:pw(e.key)&&(_f(e),FA({evt:e,rootElement:t,cellCoord:r,setFocusedCellCoord:n}))}})(e,n,d,u,null==o?void 0:o.isModal())},onMouseDown:()=>{zA(d,n,u,i)},children:Qi.jsx(QA,{wordBreak:!e.isTotalNumeric,fontSize:a.totals.fontSize,children:e.totalInfo})},e.id)}))})};var hI=O(mI);const gI=({setShouldRefocus:e,tableWrapperRef:t,announce:r})=>{var n;const{rows:o,columns:i,paginationNeeded:a,totalsPosition:s}=Fw(kw,(e=>e.tableData)),{selectionsAPI:l,rootElement:u,keyboard:c,layout:d,interactions:p,styling:{body:{hoverColors:f,lastRowBottomBorder:m,...h}},viewService:g}=Fw(kw,(e=>e.baseProps)),b=Fw(kw,(e=>e.setFocusedCellCoord)),v=Fw(kw,(e=>e.selectionDispatch)),{flags:y}=Fw(kw,(e=>e.env)),x=!!p.active&&!!p.select,S=JSON.stringify(i.map((e=>e.qAttrExprInfoIDs))),E=C((()=>JSON.parse(S).map((e=>fI(e.some((e=>"cellBackgroundColor"===e||"cellForegroundColor"===e)),x)))),[S,x]),w=!(null===(n=Iw(d))||void 0===n||null===(n=n.content)||void 0===n||!n.hoverEffect),{maxNbrLines:R,isStaticNbrOfLines:A}=ZA({viewService:g,layout:d,isImagesEnabled:y.isEnabled("CLIENT_IM_5715_LINKS_AND_IMAGES")}),I=iI(h.fontSize),L=aI({maxNbrLines:R,isStaticNbrOfLines:A,lineHeight:I});return oI({keyboard:c,selectionDispatch:v,selectionsAPI:l,setShouldRefocus:e,tableWrapperRef:t}),Qi.jsxs(lI,{lastRowBottomBorder:m,children:[s.atTop?Qi.jsx(hI,{}):void 0,o.map(((e,t)=>Qi.jsx(uI,{hoverColors:f,hover:w,tabIndex:-1,className:"sn-table-row sn-table-data-row",rowindex:t,height:L,children:i.map(((t,n)=>{const{id:o}=t,i=e[n],d=E[n],f=Mw({},i.qAttrExps,t.qAttrExprInfoIDs);return d&&Qi.jsx(d,{scope:0===n?"row":void 0,component:0===n?"th":void 0,cell:i,column:t,align:i.align,styling:h,tabIndex:-1,announce:r,title:p.passive?i.representation.text:void 0,onKeyDown:e=>{WA({evt:e,rootElement:u,selectionsAPI:l,cell:i,selectionDispatch:v,isSelectionsEnabled:x,setFocusedCellCoord:b,announce:r,keyboard:c,paginationNeeded:a,totalsPosition:s})},onKeyUp:e=>((e,t)=>{e.key===US.SHIFT&&t({type:VS.SELECT_MULTI_END})})(e,v),onMouseDown:()=>((e,t,r,n,o)=>{const{pageRowIdx:i,pageColIdx:a}=e,s=o.atTop?i+2:i+1;zA([s,a],t,r,n)})(i,u,b,c,s),children:Qi.jsx(nI,{cell:i,style:f,maxImageHeight:A?I*R:I})},o)}))},`row-${t}`))),s.atBottom?Qi.jsx(hI,{}):void 0]})};var bI=O(gI);const vI=({column:e,isLastColumn:t,onColumnResize:r,setIsAdjustingWidth:n})=>{const{pageColIdx:o}=e,{applyColumnWidths:i,interactions:a}=Fw(kw,(e=>e.baseProps)),s=Fw(kw,(e=>e.columnWidths)),l=Fw(kw,(e=>e.setColumnWidths));if(!a.active)return null;return Qi.jsx(Bw,{columnWidth:s[o],isLastColumn:t,keyValue:`adjuster-${o}`,updateWidthCallback:e=>{null==r||r();const t=[...s];t[o]=e,l(t)},confirmWidthCallback:t=>{i(t,e)},handleBlur:e=>(e=>{e.setAttribute("tabIndex","-1");const t=e.closest(".sn-table-cell");NA({focusType:YS.FOCUS,cell:t})})(e.currentTarget),setIsAdjustingWidth:n})};function yI(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const xI=(e,t)=>S.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){yI(e,t,r[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),S.createElement("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"})),SI=k(xI);function EI(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const CI=(e,t)=>S.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){EI(e,t,r[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),S.createElement("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"})),wI=k(CI);function RI(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const AI=(e,t)=>S.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){RI(e,t,r[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),S.createElement("path",{d:"M13 7H8zV4.982C13 2.23 10.761 0 8 0S3 2.23 3 4.982V7h.75H3h1.5V5.332C4.5 3.216 5.549 1.5 8 1.5s3.5 1.716 3.5 3.832V7h.75H3a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1H3z"}),S.createElement("use",{fillRule:"evenodd"})),II=k(AI),LI=$S("div")({position:"absolute",left:0,bottom:0}),DI=$S(VE,{shouldForwardProp:e=>!["textAlign"].includes(e)})((({textAlign:e,theme:t})=>({textAlign:e,height:"auto",padding:t.spacing(.5,1),display:"flex",alignItems:"flex-end",justifySelf:e,alignSelf:"center"})));$S("span")({border:0,clip:"rect(0 0 0 0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",top:20,width:1});const PI=$S(VE,{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},[`& .${ih}`]:{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:2},[`& .${ih}`]:{gridColumn:1}}}return{width:"100%",display:"grid",gridAutoFlow:"dense",fontSize:"inherit",fontFamily:"inherit",alignItems:"end",overflow:"hidden",...o}})),MI=$S(VE,{shouldForwardProp:e=>"rightAligned"!==e})((({rightAligned:e})=>({display:"flex",alignItems:"center",width:"20px",height:"24px",flexShrink:0,flexDirection:"inherit",justifyContent:e?"flex-start":"flex-end"})));$S(VE,{shouldForwardProp:e=>"isVisible"!==e&&"rightAligned"!==e})((({rightAligned:e})=>({...e?{marginRight:"auto"}:{marginLeft:"auto"},height:"24px",display:"flex"}))),$S(QE)((({theme:e})=>({"&.MuiDivider-root":{margin:e.spacing(.5)}}))),$S(dC)((({theme:e})=>({borderRadius:"4px",margin:e.spacing(0,.5),padding:e.spacing(1,1.5),display:"flex",justifyContent:"space-between","&&:focus":{boxShadow:"rgb(23, 127, 230) 0px 0px 0px 2px"}}))),$S("div")((()=>({display:"flex",justifyContent:"space-between",alignItems:"center"}))),$S(iC)((({theme:e})=>({marginRight:e.spacing(1.5),lineHeight:0}))),$S("div")((({theme:e})=>({height:"350px",boxSizing:"border-box",background:e.palette.common.white})));const _I=$S(MC,{shouldForwardProp:e=>"headerStyle"!==e&&"interactions"!==e&&"hoverBackground"!==e&&"background"!==e})((({headerStyle:e,interactions:t,hoverBackground:r,background:n})=>({...sw,...e,cursor:t.active?"pointer":"default",background:n,verticalAlign:"bottom","&&:focus-visible, &&:hover":{background:t.active?r:n}})));$S("div")({display:"flex",alignItems:"center"});const TI=$S("span",{shouldForwardProp:e=>"align"!==e})((({align:e})=>({minWidth:iw,display:"flex",paddingBottom:"2px",alignSelf:"end",..."right"===e?{paddingRight:"8px"}:{paddingLeft:"8px"}}))),kI=({column:e,isInteractionEnabled:t,open:r,setOpen:n,allColumnsIconVisibilityStatusRef:o,isPagination:i})=>{const{translator:a,changeSortOrder:s,interactions:l,embed:u,app:c,model:d,styling:p}=Fw(kw,(e=>e.baseProps)),f=Fw(kw,(t=>t.columnWidths[e.pageColIdx])),m=_(null),h=_(null),{getHeadCellsIconsVisibilityStatus:g,allIconsDisabled:b}=(({styling:e,column:t,columnWidth:r})=>{const{measureText:n}=Jm({fontSize:e.head.fontSize,fontFamily:e.head.fontFamily,fontWeight:aw}),o=T((()=>{let e=!1,o=!1,i=!1;const a=t.isLocked,s=t.isActivelySorted,l=r-25,u=a?20:0,c=s?20:0;let d=n(t.label);return a&&d+u<=l&&(i=!0,d+=u,s&&d+c<=l&&(o=!0,d+=c)),!a&&s&&d+c<=l&&(o=!0,d+=c),d+24<=l&&(e=!0,d+=24),{shouldShowMenuIcon:e,shouldShowSortIcon:o,shouldShowLockIcon:i}}),[t.isLocked,t.label,t.isActivelySorted,r,n]);return{getHeadCellsIconsVisibilityStatus:o,allIconsDisabled:Object.values(o()).every((e=>!1===e))}})({styling:p,column:e,columnWidth:f}),v=g(),{StartIcon:y,EndIcon:x,LockIcon:S}=(({sortDirection:e,headTextAlign:t},{shouldShowSortIcon:r,shouldShowLockIcon:n})=>{const o="A"===e?Qi.jsx(SI,{height:iw,"data-testid":"head-cell-sort-ascending-icon"}):Qi.jsx(wI,{height:iw,"data-testid":"head-cell-sort-descending-icon"}),i=r?Qi.jsx(TI,{align:t,children:o}):void 0,a=n?Qi.jsx(MI,{rightAligned:"right"===t,className:"sn-table-lock-icon",children:Qi.jsx(II,{height:iw,"data-testid":"head-cell-lock-icon"})}):void 0;return"right"===t?{StartIcon:i,LockIcon:a}:{EndIcon:i,LockIcon:a}})(e,v);o&&(o.current[e.pageColIdx]=v);return Qi.jsxs(PI,{shouldShowMenuIcon:v.shouldShowMenuIcon,shouldShowLockIcon:v.shouldShowLockIcon,alignment:e.headTextAlign,children:[S,Qi.jsxs(DI,{className:"sn-table-head-label",textAlign:e.headTextAlign,children:[y,Qi.jsx(QA,{allIconsDisabled:b,isPagination:i,virtualizedCell:!i,headCell:!0,children:e.label}),x]}),t&&Qi.jsxs(Qi.Fragment,{children:[Qi.jsx(GR,{headerData:e,translator:a,anchorRef:m,handleHeadCellMenuKeyDown:HA,menuAvailabilityFlags:{[HR.SORTING]:!0,[HR.SEARCHING]:!0,[HR.SELECTIONS]:!0,[HR.ADJUST_HEADER_SIZE]:!0},open:r,setOpen:n,interactions:l,sortRelatedArgs:{sortFromMenu:t=>(t.stopPropagation(),s(e))},searchRelatedArgs:{embed:u,listboxRef:h},selectionRelatedArgs:{app:c,model:d},adjustHeaderSizeRelatedArgs:{setFocusOnColumnAdjuster:qA},shouldShowMenuIcon:v.shouldShowMenuIcon}),Qi.jsx(LI,{ref:h}),Qi.jsx(LI,{ref:m})]})]})},OI=({isInteractionEnabled:e,columnsData:t})=>{const[r,n]=E(!1),{isAdjustingWidth:o,setIsAdjustingWidth:i}=(e=>{const[t,r]=E(!1);return eh((()=>{r(!1)}),e),{isAdjustingWidth:t,setIsAdjustingWidth:r}})([t]);return{open:r,setOpen:n,handleOpenMenu:t=>e&&!(e=>{var t;return null===(t=e.target)||void 0===t||null===(t=t.getAttribute("class"))||void 0===t?void 0:t.includes(uh)})(t)&&!o&&n(!0),setIsAdjustingWidth:i}},qI=({column:e,columnIndex:t,columnsLength:r})=>{const{styling:n,interactions:o,rootElement:i,keyboard:a,styling:{head:{activeBackground:s,background:l,hoverBackground:u}}}=Fw(kw,(e=>e.baseProps)),{columns:c}=Fw(kw,(e=>e.tableData)),d=Fw(kw,(e=>e.columnWidths[t])),p=Fw(kw,(e=>{var t;return null===(t=e.baseProps.selectionsAPI)||void 0===t?void 0:t.isModal()})),f=Fw(kw,(e=>e.setFocusedCellCoord)),m=Fw(kw,(({focusedCellCoord:[e,r]})=>0===e&&r===t)),h=!!o.active&&!p,{open:g,setOpen:b,handleOpenMenu:v,setIsAdjustingWidth:y}=OI({isInteractionEnabled:h,columnsData:c}),x=e.isActivelySorted?KS[e.sortDirection]:void 0,S=g?ah:void 0,E=g?"true":void 0,C=t===r-1,w=[0,e.pageColIdx],R={width:d-(C?8:9),zIndex:c.length-t},A=m&&0===t&&!a.enabled&&h?0:-1;return Qi.jsxs(_I,{headerStyle:n.head,background:g?s:l,hoverBackground:u,interactions:o,style:R,align:e.headTextAlign,className:`sn-table-head-cell sn-table-cell ${sh}`,tabIndex:A,title:o.passive?e.label:void 0,onKeyDown:e=>(({evt:e,rootElement:t,cellCoord:r,setFocusedCellCoord:n,isInteractionEnabled:o,handleOpenMenu:i})=>{if(o){if(!$A(e))switch(e.key){case US.C:_f(e),cw(e)&&hh(e.currentTarget);break;case US.ENTER:case US.SPACE:i&&i(e);break;default:pw(e.key)&&(_f(e),FA({evt:e,rootElement:t,cellCoord:r,setFocusedCellCoord:n}))}}else _f(e)})({evt:e,rootElement:i,cellCoord:w,setFocusedCellCoord:f,isInteractionEnabled:h,handleOpenMenu:v}),onMouseDown:e=>(({evt:e,rootElement:t,cellCoord:r,setFocusedCellCoord:n,keyboard:o,isInteractionEnabled:i})=>{var a;e.preventDefault(),i&&(n(r),o.enabled&&!o.active?null===(a=o.focus)||void 0===a||a.call(o):NA({focusType:YS.FOCUS,cell:_A(t,r)}))})({evt:e,rootElement:i,cellCoord:w,setFocusedCellCoord:f,keyboard:a,isInteractionEnabled:h}),onClick:v,"aria-sort":x,"aria-controls":S,"aria-expanded":E,"aria-haspopup":"true",children:[Qi.jsx(kI,{column:e,isInteractionEnabled:h,open:g,setOpen:b,isPagination:!0}),Qi.jsx(vI,{column:e,isLastColumn:C,setIsAdjustingWidth:y})]},e.id)},NI=()=>{var e;const{columns:t}=Fw(kw,(e=>e.tableData)),{styling:r,viewService:n}=Fw(kw,(e=>e.baseProps)),o=Fw(kw,(e=>e.setHeadRowHeight)),i=Fw(kw,(e=>e.columnWidths)),a=_(null);return w((()=>{a.current&&o(a.current.clientHeight)}),[r.head.fontSize,i,o]),null!==(e=n.viewState)&&void 0!==e&&e.skipHeader?null:Qi.jsx($C,{children:Qi.jsx(YC,{ref:a,className:"sn-table-row sn-table-head-row",children:t.map(((e,r)=>Qi.jsx(qI,{column:e,columnIndex:r,columnsLength:t.length},e.id)))})})};var FI=O(NI);const zI=e=>{var t,r;const{pageInfo:n,setPageInfo:o,direction:i,footerContainer:a,announce:s}=e,{page:l,rowsPerPage:u}=n,{totalColumnCount:c,totalRowCount:d,totalPages:p,paginationNeeded:f,rows:m,columns:h,totalsPosition:g}=Fw(kw,(e=>e.tableData)),{rootElement:b,keyboard:v,translator:y,theme:x,interactions:S,styling:E,viewService:C,layout:R,rect:A}=Fw(kw,(e=>e.baseProps)),I=Fw(kw,(e=>e.focusedCellCoord)),L=Fw(kw,(e=>e.setFocusedCellCoord)),D=Fw(kw,(e=>e.setYScrollbarWidth)),P=Fw(kw,(e=>e.showRightBorder)),M=Fw(kw,(e=>e.selectionDispatch)),k=Fw(kw,(e=>{var t;return null===(t=e.baseProps.selectionsAPI)||void 0===t?void 0:t.isModal()})),O=_(!1),q=_(null),N=_(null),{yScrollbarWidth:F}=GA(q),z=`${y.get("SNTable.Accessibility.RowsAndColumns",[String(m.length),String(h.length)])} ${y.get("SNTable.Accessibility.NavigationInstructions")}`,j=qv(R,C),$=j&&null!==(t=C.scrollLeft)&&void 0!==t?t:0,B=j&&null!==(r=C.rowPartialHeight)&&void 0!==r?r:0,H=T((()=>{O.current=b.getElementsByTagName("table")[0].contains(document.activeElement)}),[b]),W=T((e=>{o({...n,page:e}),s({keys:[["SNTable.Pagination.PageStatusReport",(e+1).toString(),p.toString()]],politeness:"assertive"})}),[n,o,p,s]),G=T((e=>{o({...n,page:0,rowsPerPage:e}),s({keys:[["SNTable.Pagination.RowsPerPageChange",e.toString()]],politeness:"assertive"})}),[s,n,o]);return((e,t,r)=>{w((()=>{const n=e.current;if(!n)return;const o=e=>((e,t,r)=>{const n=e.currentTarget,o=e.relatedTarget,i=!(null==n||!n.contains(o)),a=null==o?void 0:o.closest(".sn-table-head-menu");if(r.enabled&&!i&&!a&&!t.current&&n){var s;const e=n.querySelector(".sn-table-announcer-1"),t=n.querySelector(".sn-table-announcer-2");e&&t&&(e.innerHTML="",t.innerHTML=""),null===(s=r.blur)||void 0===s||s.call(r,!1)}})(e,t,r);return n.addEventListener("focusout",o),()=>{n.removeEventListener("focusout",o)}}),[e,t,r])})(N,O,v),jA(q,i,C),(()=>{const{rootElement:e,keyboard:t}=Fw(kw,(e=>e.baseProps)),r=Fw(kw,(e=>e.focusedCellCoord));eh((()=>{const n=t.active?YS.FOCUS:YS.BLUR,o=t.active?_A(e,r):TA(e);NA({focusType:n,cell:o})}),[t.active,e])})(),w((()=>{const e=q.current;e&&(e.scrollLeft=$,e.scrollTop=B)}),[n,d,$,B]),MA((()=>{(({focusedCellCoord:e,rootElement:t,shouldRefocus:r,isSelectionMode:n,setFocusedCellCoord:o,keyboard:i,announce:a,totalsPosition:s})=>{NA({focusType:YS.REMOVE_TAB,cell:TA(t)});const l=[s.atTop?2:1,e[1]],u=n?l:QS;if(o(u),!(e=>!e.enabled||e.active)(i))return;const c=r.current?YS.FOCUS:YS.ADD_TAB;r.current=!1;const d=_A(t,u);if(NA({focusType:c,cell:d}),n){var p;const e=null==d||null===(p=d.classList)||void 0===p?void 0:p.contains("selected");a({keys:[`${null==d?void 0:d.textContent},`,e?"SNTable.SelectionLabel.SelectedValue":"SNTable.SelectionLabel.NotSelectedValue"]})}})({focusedCellCoord:I,rootElement:b,shouldRefocus:O,setFocusedCellCoord:L,isSelectionMode:k,keyboard:v,announce:s,totalsPosition:g})}),[m.length,d,c,l]),MA((()=>{D(F)}),[F]),MA((()=>{M({type:VS.UPDATE_PAGE_ROWS,payload:{pageRows:m}})}),[m]),Qi.jsxs(LA,{ref:N,background:x.background,dir:i,onKeyDown:e=>{(({evt:e,totalRowCount:t,page:r,rowsPerPage:n,handleChangePage:o,setShouldRefocus:i,keyboard:a,isSelectionMode:s})=>{if(dw(e)){_f(e);const a=Math.ceil(t/n)-1;e.key===US.RIGHT&&r<a?(i(),o(r+1)):e.key===US.LEFT&&r>0&&(i(),o(r-1))}else if(e.key===US.ESC&&a.enabled&&!s){var l;_f(e),null===(l=a.blur)||void 0===l||l.call(a,!0)}else pw(e.key)&&_f(e)})({evt:e,totalRowCount:d,page:l,rowsPerPage:u,handleChangePage:W,setShouldRefocus:H,keyboard:v,isSelectionMode:k})},"data-testid":"sn-table",children:[Qi.jsx(KA,{}),Qi.jsx(UA,{ref:q,className:"sn-table-container",fullHeight:a||!S.active||!f,interactions:S,tabIndex:-1,role:"application","data-testid":"table-container",children:Qi.jsxs(YA,{styling:E,showRightBorder:P,stickyHeader:!0,"aria-label":z,children:[Qi.jsx(FI,{}),Qi.jsx(bI,{...e,setShouldRefocus:H,tableWrapperRef:N})]})}),Qi.jsx(IA,{footerContainer:a,pageInfo:n,paginationNeeded:f,theme:x,totalRowCount:d,totalColumnCount:c,totalPages:p,keyboard:v,translator:y,interactions:S,rect:A,layout:R,handleChangePage:W,handleChangeRowsPerPage:G,isSelectionMode:k})]})};var jI=O(zI);function $I(){return $I=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$I.apply(this,arguments)}function BI(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function HI(e,t){return HI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},HI(e,t)}function WI(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,HI(e,t)}var GI=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function VI(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(n=e[r],o=t[r],!(n===o||GI(n)&&GI(o)))return!1;var n,o;return!0}function UI(e,t){var r;void 0===t&&(t=VI);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}}function YI(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}var KI="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function XI(e){cancelAnimationFrame(e.id)}function JI(e,t){var r=KI();var n={id:requestAnimationFrame((function o(){KI()-r>=t?e.call(null):n.id=requestAnimationFrame(o)}))};return n}var ZI=-1;function QI(e){if(void 0===e&&(e=!1),-1===ZI||e){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",document.body.appendChild(t),ZI=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return ZI}var eL=null;function tL(e){if(void 0===e&&(e=!1),null===eL||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?eL="positive-descending":(t.scrollLeft=1,eL=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),eL}return eL}var rL=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function nL(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,m=e.initInstanceProps,h=e.shouldResetStyleCacheOnItemSizeChange,g=e.validateProps;return t=function(e){function t(t){var n;return(n=e.call(this,t)||this)._instanceProps=m(n.props,BI(n)),n._resetIsScrollingTimeoutId=null,n._outerRef=void 0,n.state={instance:BI(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=UI((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=UI((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(h&&s,h&&l,h&&u),f=e+":"+t;if(p.hasOwnProperty(f))o=p[f];else{var m=r(n.props,t,n._instanceProps),g="rtl"===l;p[f]=o={position:"absolute",left:g?void 0:m,right:g?m: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=UI((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(tL()){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&&XI(n._resetIsScrollingTimeoutId),n._resetIsScrollingTimeoutId=JI(n._resetIsScrolling,150)},n._resetIsScrolling=function(){n._resetIsScrollingTimeoutId=null,n.setState({isScrolling:!1},(function(){n._getItemStyleCache(-1)}))},n}WI(t,e),t.getDerivedStateFromProps=function(e,t){return oL(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,m=this.state,h=m.scrollLeft,g=m.scrollTop,b=QI();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,h,this._instanceProps,x):h,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(tL()){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&&XI(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?rL:p,m=e.outerElementType,h=e.outerTagName,g=e.rowCount,b=e.style,v=e.useIsScrolling,y=e.width,x=this.state.isScrolling,S=this._getHorizontalRangeToRender(),E=S[0],C=S[1],w=this._getVerticalRangeToRender(),R=w[0],I=w[1],L=[];if(n>0&&g)for(var D=R;D<=I;D++)for(var P=E;P<=C;P++)L.push(A(t,{columnIndex:P,data:d,isScrolling:v?x:void 0,key:f({columnIndex:P,data:d,rowIndex:D}),rowIndex:D,style:this._getItemStyle(D,P)}));var M=a(this.props,this._instanceProps),_=s(this.props,this._instanceProps);return A(m||h||"div",{className:r,onScroll:this._onScroll,ref:this._outerRefSetter,style:$I({position:"relative",height:i,width:y,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},b)},A(u||c||"div",{children:L,ref:l,style:{height:M,pointerEvents:x?"none":void 0,width:_}}))},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],m=c[3];this._callOnItemsRendered(a,s,d,p,l,u,f,m)}if("function"==typeof n){var h=this.state,g=h.horizontalScrollDirection,b=h.scrollLeft,v=h.scrollTop,y=h.scrollUpdateWasRequested,x=h.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),m=o(this.props,f,d,this._instanceProps),h=c&&"backward"!==u?1:Math.max(1,p),g=c&&"forward"!==u?1:Math.max(1,p);return[Math.max(0,f-h),Math.max(0,Math.min(t-1,m+g)),f,m]},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),m=f(this.props,d,u,this._instanceProps),h=s&&"backward"!==l?1:Math.max(1,c),g=s&&"forward"!==l?1:Math.max(1,c);return[Math.max(0,d-h),Math.max(0,Math.min(i-1,m+g)),d,m]},t}(N),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var oL=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},iL=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},aL=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},sL=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]},lL=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?uL(e,t,r,i,0,n):cL(e,t,r,Math.max(0,i),n)},uL=function(e,t,r,n,o,i){for(;o<=n;){var a=o+Math.floor((n-o)/2),s=sL(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},cL=function(e,t,r,n,o){for(var i="column"===e?t.columnCount:t.rowCount,a=1;n<i&&sL(e,t,n,r).offset<o;)n+=a,a*=2;return uL(e,t,r,Math.min(n,i-1),Math.floor(n/2),o)},dL=function(e,t,r,n,o,i,a){var s="column"===e?t.width:t.height,l=sL(e,t,r,i),u="column"===e?aL(t,i):iL(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}},pL=nL({getColumnOffset:function(e,t,r){return sL("column",e,t,r).offset},getColumnStartIndexForOffset:function(e,t,r){return lL("column",e,r,t)},getColumnStopIndexForStartIndex:function(e,t,r,n){for(var o=e.columnCount,i=e.width,a=sL("column",e,t,n),s=r+i,l=a.offset+a.size,u=t;u<o-1&&l<s;)u++,l+=sL("column",e,u,n).size;return u},getColumnWidth:function(e,t,r){return r.columnMetadataMap[t].size},getEstimatedTotalHeight:iL,getEstimatedTotalWidth:aL,getOffsetForColumnAndAlignment:function(e,t,r,n,o,i){return dL("column",e,t,r,n,o,i)},getOffsetForRowAndAlignment:function(e,t,r,n,o,i){return dL("row",e,t,r,n,o,i)},getRowOffset:function(e,t,r){return sL("row",e,t,r).offset},getRowHeight:function(e,t,r){return r.rowMetadataMap[t].size},getRowStartIndexForOffset:function(e,t,r){return lL("row",e,r,t)},getRowStopIndexForStartIndex:function(e,t,r,n){for(var o=e.rowCount,i=e.height,a=sL("row",e,t,n),s=r+i,l=a.offset+a.size,u=t;u<o-1&&l<s;)u++,l+=sL("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}}),fL=function(e,t){return e};function mL(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,BI(n)),n._outerRef=void 0,n._resetIsScrollingTimeoutId=null,n.state={instance:BI(n),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof n.props.initialScrollOffset?n.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},n._callOnItemsRendered=void 0,n._callOnItemsRendered=UI((function(e,t,r,o){return n.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:r,visibleStopIndex:o})})),n._callOnScroll=void 0,n._callOnScroll=UI((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,m="rtl"===a,h=f?d:0;c[e]=t={position:"absolute",left:m?void 0:h,right:m?h:void 0,top:f?0:d,height:f?"100%":p,width:f?p:"100%"}}return t},n._getItemStyleCache=void 0,n._getItemStyleCache=UI((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(tL()){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&&XI(n._resetIsScrollingTimeoutId),n._resetIsScrollingTimeoutId=JI(n._resetIsScrolling,150)},n._resetIsScrolling=function(){n._resetIsScrollingTimeoutId=null,n.setState({isScrolling:!1},(function(){n._getItemStyleCache(-1,null)}))},n}WI(t,e),t.getDerivedStateFromProps=function(e,t){return hL(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?QI():0:l.scrollHeight>l.clientHeight?QI():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(tL()){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&&XI(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?fL:d,f=e.layout,m=e.outerElementType,h=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,E=this._getRangeToRender(),C=E[0],w=E[1],R=[];if(u>0)for(var I=C;I<=w;I++)R.push(A(t,{data:c,key:p(I,c),index:I,isScrolling:b?y:void 0,style:this._getItemStyle(I)}));var L=n(this.props,this._instanceProps);return A(m||h||"div",{className:r,onScroll:S,ref:this._outerRefSetter,style:$I({position:"relative",height:i,width:v,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},g)},A(s||l||"div",{children:R,ref:a,style:{height:x?"100%":L,pointerEvents:y?"none":void 0,width:x?L:"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}(N),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var hL=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},gL=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]},bL=function(e,t,r,n,o){for(;n<=r;){var i=n+Math.floor((r-n)/2),a=gL(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},vL=function(e,t,r,n){for(var o=e.itemCount,i=1;r<o&&gL(e,r,t).offset<n;)r+=i,i*=2;return bL(e,t,Math.min(r,o-1),Math.floor(r/2),n)},yL=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},xL=mL({getItemOffset:function(e,t,r){return gL(e,t,r).offset},getItemSize:function(e,t,r){return r.itemMetadataMap[t].size},getEstimatedTotalSize:yL,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=gL(e,t,o),p=yL(e,o),f=Math.max(0,Math.min(p-c,d.offset)),m=Math.max(0,d.offset-c+d.size+i);switch("smart"===r&&(r=n>=m-c&&n<=f+c?"auto":"center"),r){case"start":return f;case"end":return m;case"center":return Math.round(m+(f-m)/2);default:return n>=m&&n<=f?n:n<m?m: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?bL(e,t,o,0,r):vL(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=gL(e,t,n),d=r+u,p=c.offset+c.size,f=t;f<a-1&&p<d;)f++,p+=gL(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 SL(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 EL=["style"],CL=["style"];function wL(e,t){var r=e.style,n=YI(e,EL),o=t.style,i=YI(t,CL);return!SL(r,o)&&!SL(n,i)}const RL=({style:e})=>Qi.jsx("div",{className:"sn-table-cell",style:{...e,borderWidth:"0px 1px 1px 0px",boxSizing:"border-box"}});var AL=S.memo(RL,wL);const IL=()=>{},LL=e=>e.preventDefault();const DL=({columnIndex:e,rowIndex:t,style:r,data:n})=>{var o;const{rowsInPage:i,columns:a,bodyStyle:s,isHoverEnabled:l,maxImageHeight:u}=n,c=Fw(kw,(e=>e.hoverIndex===t)),d=Fw(kw,(e=>e.setHoverIndex)),{interactions:p}=Fw(kw,(e=>e.baseProps)),f=Fw(kw,(e=>e.showRightBorder)),m=null===(o=i[t])||void 0===o?void 0:o[e],{handleMouseDown:h,handleMouseOver:g,handleMouseUp:b,cellSelectionState:v}=function(e){const{interactions:t}=Fw(kw,(e=>e.baseProps)),r=Fw(kw,(e=>e.selectionDispatch)),n="object"==typeof e,o=Fw(kw,(t=>n?mw(e,t.selectionState):GS.INACTIVE)),i=t.active&&t.select;if(n&&i){const{handleMouseDown:t,handleMouseOver:n,handleMouseUp:i}=sI(LL,e,r,IL);return{handleMouseDown:t,handleMouseOver:n,handleMouseUp:i,cellSelectionState:o}}return{cellSelectionState:o}}(m);if("object"==typeof m){var y;const n=((e,t,r,n,o)=>{const{hoverColors:i,lastRowBottomBorder:a,...s}=o,l=t.qAttrExprInfoIDs.length?Mw(s,e.qAttrExps,t.qAttrExprInfoIDs):s;return n===GS.SELECTED?{...l,...nw.SELECTED}:n===GS.EXCLUDED?{...l,color:r?null==i?void 0:i.color:l.color,background:`${nw.EXCLUDED_BACKGROUND}, ${r?null==i?void 0:i.background:l.background}`}:r?{...l,...i}:l})(m,a[e],l&&c,v,s),o={rowindex:t,columnindex:e};return Qi.jsx("div",{className:`sn-table-cell ${v} ${sh}`,style:{...r,...n,display:"flex",alignItems:"start",borderWidth:"0px",borderBottomWidth:m.isLastRow?"0px":"1px",borderRightWidth:m.isLastColumn&&!f?"0px":"1px",borderStyle:"solid",justifyContent:m.representation.type===xv.Image&&"fitHeight"===m.representation.imageSize?null===(y=m.representation)||void 0===y||null===(y=y.resolvedImagePosition)||void 0===y?void 0:y.horizontal:m.align,padding:"4px 12px",boxSizing:"border-box",cursor:"default",overflow:"hidden"},onMouseDown:h,onMouseUp:b,onMouseOver:g,onMouseEnter:l?()=>d(t):void 0,onMouseLeave:l?()=>d(-1):void 0,title:p.passive?m.representation.text:void 0,...o,children:Qi.jsx(nI,{cell:m,style:n,maxImageHeight:u,virtualizedCell:!0})})}return Qi.jsx(AL,{style:{...r,...s,borderWidth:"0px 1px 1px 0px",borderStyle:"solid",boxSizing:"border-box"}})};var PL=S.memo(DL,wL);const ML=e=>{const t=_(e);return t.current=e,t},_L=({qLeft:e,qTop:t,qWidth:r,qHeight:n})=>`${e}-${t}-${r}-${n}`,TL=(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((null==t?void 0:t.rowIdx)!==o)return!0}return!1},kL=(e,t,r,n)=>{const o=e.slice(r,n);return 0===o.length||o.some((e=>!(null!=e&&e[t])))},OL=(e,t,r,n,o,i,a)=>{e.forEach((e=>{e.qMatrix.forEach(((s,l)=>{const u=e.qArea.qTop-t.page*t.rowsPerPage,{row:c,pageRowIdx:d}=((e,t,r,n,o,i,a,s,l)=>{var u;const{qSize:c}=a.qHyperCube,d=n.qTop+r,p=o+r,f=null!==(u=e[p])&&void 0!==u?u:[];return t.forEach(((e,t)=>{var r,o;const a=t+n.qLeft,{colIdx:u,isDim:m,isLocked:h,bodyTextAlign:g,selectionColIdx:b,qAttrExprInfoIndex:v,representation:y}=i[a],x=Iv(e);f[a]=null!==(r=f[a])&&void 0!==r?r:{id:Cb(),...e,align:kv(e,g),rowIdx:d,colIdx:u,isSelectable:m&&!h,pageRowIdx:p,pageColIdx:a,selectionColIdx:b,isLastRow:d===c.qcy-1,isLastColumn:a===c.qcx-1,isNumeric:x,representation:Rv(e,y,v,l)},s(null!==(o=f[a].representation.text)&&void 0!==o?o:"",p,a,x)})),{row:f,pageRowIdx:p}})(r,s,l,e.qArea,u,n,o,i,a);r[d]=c}))}))},qL=({layout:e,model:t,theme:r,initialDataPages:n,pageInfo:o,rowCount:i,visibleRowCount:a,visibleColumnCount:s,columns:l,setCellSize:u,gridState:c})=>{const d=Fw(kw,(e=>e.env)),p=_([]),f=ML(u),m=T(((t,r)=>{const n=Array.isArray(r)?r.slice(0,i):(e=>Array(e).fill(void 0))(i);return OL(t,o,n,l,e,f.current,d),p.current=n,n}),[i,o,l,e,f,d]),[h,g]=E((()=>m(null!=n?n:[])));eh((()=>{g(m(null!=n?n:[]))}),[n]);const b=((e,t)=>{const r=_(new Set),n=_(new Set),o=_(new Set),i=ML(e),a=ML(t),s=C((()=>({enqueue:e=>{const t=_L(e);o.current.has(t)||(r.current.add(e),o.current.add(t),1===r.current.size&&setTimeout((async()=>{const e=Array.from(r.current.values());if(0!==e.length){r.current.clear(),n.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 i.current(t);n.current.has(e)&&a.current(r)}catch(t){e.forEach((e=>{o.current.delete(_L(e))}))}finally{n.current.delete(e)}}}),75))},clear:()=>{r.current.clear(),n.current.clear(),o.current.clear()}})),[i,a]);return s})((e=>t.getHyperCubeData("/qHyperCubeDef",e)),(e=>g((t=>m(e,t))))),v=T(((e,t,r,n)=>{for(let o=e;o<e+r;o++)if(kL(p.current,o,t,n)){const e={qLeft:o,qTop:t,qHeight:n,qWidth:1};b.enqueue(e)}}),[p,b]),y=T(((e,t,r,n)=>{for(let i=t;i<t+n;i++){const t=Math.max(0,i-o.page*o.rowsPerPage);if(TL(p.current,e,t,r,i)){const t={qLeft:e,qTop:i,qHeight:1,qWidth:r};b.enqueue(t)}}}),[p,b,o]);return w((()=>{const{qcx:t,qcy:r}=e.qHyperCube.qSize,n=c.current.overscanRowStartIndex,i=c.current.overscanColumnStartIndex,l=n+o.page*o.rowsPerPage,u=t-i,d=o.rowsPerPage-n,p=Math.min(100,u,t,s+5),f=Math.min(100,d,r,a+25);return y(i,l,p,f),()=>{b.clear()}}),[e,a,s,o,b,y,c,r]),{rowsInPage:h,loadRows:y,loadColumns:v}},NL=({style:e,columnWidths:t,rowHeight:r,pageInfo:n,rowCount:o,gridRef:i,lineRef:a,columns:s,fontWeight:l,gridState:u,isSnapshot:c,viewService:d,maxNbrLines:p=3,isStaticNbrOfLines:f,allColumnsIconVisibilityStatus:m})=>{const h=_({lastScrollToRatio:0,resetAfterRowIndex:0,heights:[],totalHeight:0,count:0,measuredCells:new Map}),{layout:g,rect:b}=Fw(kw,(e=>e.baseProps)),[v,y]=E(r||24),{measureText:x,estimateLineCount:S}=Jm({...e,fontWeight:l},{maxNbrLinesOfText:p}),C=iI(e.fontSize),w=8e6/o-8-1,R=Math.max(0,Math.min(p,Math.round(w/C))),A=aI({maxNbrLines:R,isStaticNbrOfLines:f,lineHeight:C}),I=f?R*C:C,L=T(((e,r,n)=>{const o=s?(({width:e,columnIconsVisibilityStatus:t})=>{let r=0,n=0,o=0,i=0;if(t){const{shouldShowLockIcon:e,shouldShowSortIcon:r,shouldShowMenuIcon:a}=t;n=e?20:0,o=r?20:0,i=a?24:0}return r=e-25-n-o-i,Math.max(0,r)})({width:t[r],columnIconsVisibilityStatus:null==m?void 0:m[r]}):(e=>Math.max(0,e-24-1))(t[r]),i=Math.min(R,S({text:e.trim(),maxWidth:o,isNumeric:n}));return Math.max(1,i)*C+8+1}),[t,C,R,s,S,m]),D=T(((e,t,n,o=!1,i=!1)=>{const a=`${t}-${n}`;if(h.current.measuredCells.has(a))return;if(f)return h.current.measuredCells.set(a,[e,t,n,o]),void y(A);h.current.measuredCells.set(a,[e,t,n,o]);const l=r||24,d=((e,t,r)=>{var n;return(null==t||null===(n=t[e].representation)||void 0===n?void 0:n.type)===xv.Image&&r})(n,s,u)?l:L(e,n,o),p=h.current.heights[t],m=d-p;m>0?(h.current.totalHeight+=m,h.current.heights[t]=d):void 0===p&&(h.current.count+=1,h.current.totalHeight+=d,h.current.heights[t]=d),i||c||y(h.current.totalHeight/h.current.count)}),[L,c,f,A,s,r,u]),P=T((e=>{var t;return null!==(t=h.current.heights[e])&&void 0!==t?t:v}),[h,v]),M=T((()=>{h.current.lastScrollToRatio=0,h.current.resetAfterRowIndex=0,h.current.heights=[],h.current.totalHeight=0,h.current.count=0,h.current.measuredCells.clear()}),[h]),k=ML(D),O=T((()=>{if(f)return void M();const e=new Map(h.current.measuredCells);M(),e.forEach((([e,t,r,n])=>{k.current(e,t,r,n,!0)})),c||y(h.current.totalHeight/h.current.count)}),[M,c,k,f]);eh((()=>{M()}),[g,n]),eh((()=>{O()}),[x,b.width]);return null!=i&&i.current?i.current.resetAfterRowIndex(h.current.resetAfterRowIndex,!1):null!=a&&a.current&&a.current.resetAfterIndex(h.current.resetAfterRowIndex,!1),d.estimatedRowHeight=v,{setCellSize:D,getRowHeight:P,rowMeta:h,estimatedRowHeight:v,maxLineCount:R,resizeVisibleCells:e=>{if(!u||f)return;M();const{overscanRowStartIndex:t,overscanRowStopIndex:r}=u.current,n=Math.min(r,g.qHyperCube.qSize.qcy-1);for(let r=t;r<=n;r++){var o;const t=null!==(o=e[r])&&void 0!==o?o:{};Object.values(t).forEach((e=>{var t;"object"==typeof e&&D(null!==(t=e.representation.text)&&void 0!==t?t:"",r,e.pageColIdx,e.isNumeric)}))}},resizeAllCells:O,resetRowMeta:M,maxImageHeight:I}};var FL;!function(e){e.Left="Left",e.Right="Right",e.Up="Up",e.Down="Down",e.None="None"}(FL||(FL={}));const zL={enabled:!1},jL=()=>{},$L={current:null};const BL=(e,t,r,n,o)=>{const i=Math.min(t.rowsPerPage,e.qHyperCube.qSize.qcy-t.page*t.rowsPerPage),a=Math.min(i,Math.ceil(r.height/o)),s=C((()=>n.reduce(((e,t)=>e.width<r.width?{width:e.width+t,count:e.count+1}:e),{count:0,width:0})),[r,n]).count;return{rowCount:i,visibleRowCount:a,visibleColumnCount:s}},HL=({columnIndex:e,data:t,rowIndex:r})=>{var n,o;const i=null===(n=t.rowsInPage[r])||void 0===n?void 0:n[e];return null!==(o=null==i?void 0:i.id)&&void 0!==o?o:`${r}-${e}`},WL={overflow:"hidden",willChange:"auto"};var GL=O(k(((e,t)=>{var r;const{rect:n,columns:o,innerForwardRef:i,pageInfo:a,bodyStyle:s,rowHeight:l,headerAndTotalsHeight:u,syncHeight:c}=e,{flags:d}=Fw(kw,(e=>e.env)),{layout:p,model:f,theme:m,viewService:h}=Fw(kw,(e=>e.baseProps)),g=Fw(kw,(e=>e.columnWidths)),b=Fw(kw,(e=>e.initialDataPages)),{maxNbrLines:v,isStaticNbrOfLines:y}=ZA({viewService:h,layout:p,isImagesEnabled:d.isEnabled("CLIENT_IM_5715_LINKS_AND_IMAGES")}),x=_(null),S=_({overscanColumnStartIndex:0,overscanRowStartIndex:0,overscanColumnStopIndex:0,overscanRowStopIndex:0}),E=!(null===(r=Iw(p))||void 0===r||null===(r=r.content)||void 0===r||!r.hoverEffect),{scrollHandler:R,verticalScrollDirection:A,horizontalScrollDirection:I}=(()=>{const e=_(0),t=_(0),r=_(FL.None),n=_(FL.None);return{scrollHandler:T((({scrollTop:o,scrollLeft:i})=>{o>t.current?r.current=FL.Down:o<t.current?r.current=FL.Up:r.current=FL.None,i>e.current?n.current=FL.Right:i<e.current?n.current=FL.Left:n.current=FL.None,t.current=o,e.current=i}),[t,e,r,n]),verticalScrollDirection:r,horizontalScrollDirection:n}})(),{rowCount:L,visibleRowCount:D,visibleColumnCount:P}=BL(p,a,n,g,l),{setCellSize:M,getRowHeight:k,rowMeta:O,estimatedRowHeight:N,maxLineCount:z,resizeVisibleCells:j,maxImageHeight:$}=NL({pageInfo:a,style:s,rowHeight:l,columnWidths:g,columns:o,gridRef:x,rowCount:L,gridState:S,isSnapshot:!!p.snapshotData,viewService:h,maxNbrLines:v,isStaticNbrOfLines:y}),{rowsInPage:B,loadRows:H,loadColumns:W}=qL({layout:p,model:f,theme:m,initialDataPages:b,pageInfo:a,rowCount:L,visibleRowCount:D,visibleColumnCount:P,columns:o,setCellSize:M,gridState:S}),G=(({layout:e,loadRows:t,loadColumns:r,verticalScrollDirection:n,horizontalScrollDirection:o,rowCount:i,pageInfo:a,gridState:s,viewService:l})=>T((({overscanColumnStartIndex:u,overscanColumnStopIndex:c,overscanRowStartIndex:d,overscanRowStopIndex:p,visibleColumnStartIndex:f,visibleColumnStopIndex:m,visibleRowStartIndex:h,visibleRowStopIndex:g})=>{if(s.current.overscanColumnStartIndex=u,s.current.overscanColumnStopIndex=c,s.current.overscanRowStartIndex=d,s.current.overscanRowStopIndex=p,d>i)return;const b=u,v=d+a.page*a.rowsPerPage,y=c-u+1,x=p-d+1;if(l.visibleLeft=f,l.visibleWidth=m-f+1,l.visibleTop=h+a.page*a.rowsPerPage,l.visibleHeight=g-h+1,l.page=a.page,l.rowsPerPage=a.rowsPerPage,n.current===FL.Down){const e=x+25;t(b,v,y,d+e>i?i-d:e)}else if(n.current===FL.Up){const e=x+25,r=a.page*a.rowsPerPage,n=Math.max(r,v-25);t(b,n,y,e)}if(o.current===FL.Right){const t=e.qHyperCube.qSize.qcx-b,n=y+5,o=Math.min(t,n);r(b,v,o,x)}else if(o.current===FL.Left){const t=Math.max(0,b-5),n=Math.min(e.qHyperCube.qSize.qcx,y+5);r(t,v,n,x)}}),[s,i,a.page,a.rowsPerPage,l,n,o,t,e.qHyperCube.qSize.qcx,r]))({layout:p,loadRows:H,loadColumns:W,verticalScrollDirection:A,horizontalScrollDirection:I,rowCount:L,pageInfo:a,gridState:S,viewService:h}),V=C((()=>({rowsInPage:B,columns:o,bodyStyle:s,isHoverEnabled:E,maxLineCount:z,maxImageHeight:$})),[B,o,s,E,z,$]),U=((e,t,r,n)=>{let{height:o}=e;return o-=t,r*n<o&&(o=Math.min(r*n,o)),o})(n,u,L,N);return q((()=>{var e,t;c(null!==(e=null===(t=i.current)||void 0===t?void 0:t.clientHeight)&&void 0!==e?e:0,!0)}),[L,c,i]),q((()=>{var e,t,r;(c(null!==(e=null===(t=i.current)||void 0===t?void 0:t.clientHeight)&&void 0!==e?e:0,!1),1===O.current.lastScrollToRatio)&&(null===(r=x.current)||void 0===r||r.scrollToItem({rowIndex:L-1,align:"start"}))})),function(e){const{selectionsAPI:t}=Fw(kw,(e=>e.baseProps)),r=Fw(kw,(e=>e.selectionDispatch));w((()=>{r({type:VS.UPDATE_PAGE_ROWS,payload:{pageRows:e}})}),[r,e]),oI({selectionsAPI:t,selectionDispatch:r,setShouldRefocus:jL,keyboard:zL,tableWrapperRef:$L})}(B),eh((()=>{var e;null===(e=x.current)||void 0===e||e.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!1})}),[p,a,m,n.width,g]),F(t,(()=>({interpolatedScrollTo:(e,t)=>{var r,n;const o=(null!==(r=null===(n=i.current)||void 0===n?void 0:n.clientHeight)&&void 0!==r?r:U)-U,a=Math.round(o*e);var s,l,u;(O.current.lastScrollToRatio=e,1===O.current.lastScrollToRatio)?(null===(s=x.current)||void 0===s||s.scrollToItem({rowIndex:L-1,align:"start"}),null===(l=x.current)||void 0===l||l.scrollTo({scrollLeft:t})):null===(u=x.current)||void 0===u||u.scrollTo({scrollTop:a,scrollLeft:t})},resizeCells:()=>{var e;null===(e=x.current)||void 0===e||e.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!1}),j(B)}})),[i,U,O,L,j,B]),Qi.jsx(pL,{"data-key":"body",ref:x,innerRef:i,style:WL,columnCount:p.qHyperCube.qSize.qcx,columnWidth:e=>g[e],height:U,rowCount:L,rowHeight:k,estimatedRowHeight:N,width:n.width,itemData:V,onItemsRendered:G,onScroll:R,itemKey:HL,className:"sn-table-body",children:PL})})));const VL=({width:e,height:t,children:r})=>Qi.jsx("div",{"data-key":"full-size-container",style:{display:"block",width:e,height:t},children:r}),UL=$S("div",{shouldForwardProp:e=>"interactions"!==e&&"hoverBackground"!==e&&"background"!==e&&"applicableStyle"!==e})((({interactions:e,hoverBackground:t,background:r,applicableStyle:n})=>({...n,background:r,"&&:hover":{background:e.active?t:r}}))),YL=({index:e,style:t,data:r})=>{const{columns:n,columResizeHandler:o,allColumnsIconVisibilityStatusRef:i}=r,{interactions:a,styling:s}=Fw(kw,(e=>e.baseProps)),l=Fw(kw,(e=>{var t;return null===(t=e.baseProps.selectionsAPI)||void 0===t?void 0:t.isModal()})),u=Fw(kw,(e=>e.showRightBorder)),c=!!a.active&&!l,{open:d,setOpen:p,handleOpenMenu:f,setIsAdjustingWidth:m}=OI({isInteractionEnabled:c,columnsData:n}),h=n[e],g=n.length-1===e,b="right"===h.headTextAlign?"row-reverse":"row";return Qi.jsxs(UL,{className:`sn-table-cell ${sh}`,title:a.passive?h.label:void 0,onClick:f,applicableStyle:s.head,style:{...t,cursor:"pointer",display:"flex",alignItems:"flex-end",borderStyle:"solid",borderWidth:g&&!u?"0px 0px 1px 0px":"0px 1px 1px 0px",padding:"4px",justifyContent:h.headTextAlign,boxSizing:"border-box",zIndex:n.length-e,flexDirection:b,userSelect:"none",fontWeight:aw},interactions:a,hoverBackground:s.head.hoverBackground,background:d?s.head.activeBackground:s.body.background,children:[Qi.jsx(kI,{column:h,isInteractionEnabled:c,open:d,setOpen:p,allColumnsIconVisibilityStatusRef:i}),Qi.jsx(vI,{column:h,isLastColumn:g,onColumnResize:o,setIsAdjustingWidth:m})]})},KL=(e,t,r,n,o)=>{q((()=>{var t;null==e||null===(t=e.current)||void 0===t||t.resetAfterIndex(0,!0)}),[t,r,e,n,o])},XL={overflow:"hidden",boxSizing:"border-box",willChange:"auto"},JL=e=>{const{rect:t,forwardRef:r,columns:n,pageInfo:o,rowHeight:i,columResizeHandler:a,allColumnsIconVisibilityStatusRef:s}=e,{layout:l,theme:u}=Fw(kw,(e=>e.baseProps)),c=Fw(kw,(e=>e.columnWidths));return KL(r,l,o,c,u),Qi.jsx(xL,{ref:r,layout:"horizontal",style:XL,itemCount:l.qHyperCube.qSize.qcx,itemSize:e=>c[e],height:i,width:t.width,itemData:{columns:n,columResizeHandler:a,allColumnsIconVisibilityStatusRef:s},children:YL})};var ZL=O(JL);const QL=S.forwardRef(((e,t)=>{const{children:r,width:n,height:o,onScroll:i}=e,{interactions:a}=Fw(kw,(e=>e.baseProps));return Qi.jsx("div",{"data-testid":"scrollable-container",ref:t,style:{overflow:a.active?"auto":"hidden",width:n,height:o},onScroll:i,children:r})})),eD=({children:e,rect:t})=>Qi.jsx("div",{"data-testid":"sticky-container",style:{position:"sticky",top:"0px",left:"0px",width:t.width,height:t.height},children:e}),tD=({index:e,style:t,data:r})=>{const{layout:n,interactions:o,styling:i}=Fw(kw,(e=>e.baseProps)),a=Fw(kw,(e=>e.showRightBorder)),{totalsStyle:{hoverColors:s,...l},columns:u,totals:c}=r,d=u[e].totalInfo,{totalsTextAlign:p,isTotalNumeric:f}=u[e],m=n.qHyperCube.qSize.qcx-1===e;return Qi.jsx("div",{className:`sn-table-cell ${sh}`,title:o.passive?d:void 0,style:{...t,...l,background:i.body.background,display:"flex",alignItems:c.atTop?"end":"start",borderStyle:"solid",borderLeftWidth:"0px",borderRightWidth:m&&!a?"0px":"1px",borderTopWidth:c.atBottom?"1px":"0px",borderBottomWidth:c.atTop?"1px":"0px",padding:"4px 12px",justifyContent:p,boxSizing:"border-box",cursor:"default",fontWeight:aw},children:Qi.jsx(QA,{wordBreak:!f,lines:3,virtualizedCell:!0,children:d})})},rD=e=>{const{rect:t,forwardRef:r,pageInfo:n,totals:o,rowHeight:i,columns:a}=e,{layout:s,styling:l,theme:u}=Fw(kw,(e=>e.baseProps)),c=Fw(kw,(e=>e.columnWidths));return KL(r,s,n,c,u),Qi.jsx(xL,{ref:r,layout:"horizontal",style:XL,itemCount:s.qHyperCube.qSize.qcx,itemSize:e=>c[e],height:i,width:t.width,itemData:{totalsStyle:l.totals,columns:a,totals:o},children:tD})};var nD=O(rD);const oD=({columns:e,columnWidths:t,pageInfo:r,headerRef:n,totalsRef:o,totalsPosition:i,isSnapshot:a,viewService:s,allColumnsIconVisibilityStatus:l})=>{const{styling:u}=Fw(kw,(e=>e.baseProps)),c=NL({style:u.head,columnWidths:t,lineRef:n,rowCount:1,pageInfo:r,fontWeight:aw,columns:e,isSnapshot:a,viewService:s,allColumnsIconVisibilityStatus:l}),d=NL({style:u.totals,columnWidths:t,lineRef:o,rowCount:1,pageInfo:r,fontWeight:aw,isSnapshot:a,viewService:s});e.forEach(((e,t)=>{c.setCellSize(e.label,0,t),d.setCellSize(e.totalInfo,0,t,Av(e.totalInfo))}));const p=c.getRowHeight(0)+8,f=d.getRowHeight(0);return{headerRowHeight:p,totalsRowHeight:f,bodyRowHeight:a?s.estimatedRowHeight:(({fontSize:e=sw.fontSize})=>Math.max(24,Ew(e)))(u.body),headerAndTotalsHeight:i.atTop||i.atBottom?p+f:p,resizeAllHeaderCells:c.resizeAllCells,resizeAllTotalCells:d.resizeAllCells}},iD=e=>{var t;const{pageInfo:r}=e,{totalsPosition:n,columns:o,paginationNeeded:i}=Fw(kw,(e=>e.tableData)),{layout:a,theme:s,styling:l,rect:u,viewService:c}=Fw(kw,(e=>e.baseProps)),d=Fw(kw,(e=>e.columnWidths)),p=Fw(kw,(e=>e.setYScrollbarWidth)),f=_(null),m=_(null),h=_(null),g=_(null),b=_(),{xScrollbarWidth:v,yScrollbarWidth:y}=GA(f),x=C((()=>{var e;return{...l.body,background:null!==(e=s.background.color)&&void 0!==e?e:"transparent"}}),[s.background.color,l]),S=_([]),{headerRowHeight:w,totalsRowHeight:R,bodyRowHeight:A,headerAndTotalsHeight:I,resizeAllHeaderCells:L,resizeAllTotalCells:D}=oD({columns:o,columnWidths:d,pageInfo:r,totalsPosition:n,headerRef:m,totalsRef:h,isSnapshot:!!a.snapshotData,viewService:c,allColumnsIconVisibilityStatus:S.current}),P=C((()=>((e,t)=>{const r=e.height-(t?41:0);return{width:e.width,height:r}})(u,i)),[u,i]),M=C((()=>((e,t,r)=>({width:e.width-r,height:e.height-t}))(P,v,y)),[P,v,y]),{rowCount:k}=BL(a,r,M,d,A),[O,N]=E(k*A+I),F=d.reduce(((e,t)=>e+t),0),z=((e,t,r,n)=>T((o=>{var i,a,s;const{scrollHeight:l,clientHeight:u,scrollTop:c,scrollLeft:d}=o.currentTarget,p=Math.max(0,Math.min(1,c/(l-u)));n.scrollTopRatio=p,n.scrollLeft=d,null===(i=r.current)||void 0===i||i.interpolatedScrollTo(Number.isNaN(p)?0:p,d),null===(a=e.current)||void 0===a||a.scrollTo(d),null===(s=t.current)||void 0===s||s.scrollTo(d)}),[n,r,e,t]))(m,h,g,c),j=T(((e,t=!1)=>{const r=e+I;(O<M.height&&r>M.height||t)&&N(r)}),[O,I,M.height]),$=T((()=>{var e;f.current&&(f.current.scrollTop=0),null===(e=g.current)||void 0===e||e.resizeCells(),L(),D()}),[f,L,D]);q((()=>{f.current&&(f.current.scrollLeft=0,f.current.scrollTop=0)}),[o.length]),q((()=>{f.current&&(f.current.scrollTop=0)}),[r,k,s]),MA((()=>{p(y)}),[y]);const B=Qi.jsx(nD,{rect:M,pageInfo:r,columns:o,forwardRef:h,totals:n,rowHeight:R});return Qi.jsx(QL,{ref:f,width:P.width,height:P.height,onScroll:z,children:Qi.jsx(VL,{width:F,height:O,children:Qi.jsxs(eD,{rect:M,children:[null!==(t=c.viewState)&&void 0!==t&&t.skipHeader?null:Qi.jsx(ZL,{rect:M,pageInfo:r,columns:o,forwardRef:m,rowHeight:w,columResizeHandler:$,allColumnsIconVisibilityStatusRef:S}),n.atTop?B:null,Qi.jsx(GL,{ref:g,innerForwardRef:b,bodyStyle:x,rect:M,pageInfo:r,columns:o,rowHeight:A,headerAndTotalsHeight:I,syncHeight:j}),n.atBottom?B:null]})})})};var aD=O(iD);const sD=()=>{const{theme:e,keyboard:t,translator:r,interactions:n,rect:o,layout:i}=Fw(kw,(e=>e.baseProps)),{paginationNeeded:a,totalRowCount:s,totalColumnCount:l,totalPages:u}=Fw(kw,(e=>e.tableData)),c=Fw(kw,(e=>e.pageInfo)),d=Fw(kw,(e=>e.setPage));return Qi.jsxs(LA,{"data-testid":"sn-table",background:e.background,dir:"ltr",children:[Qi.jsx(aD,{pageInfo:c}),Qi.jsx(IA,{paginationNeeded:a,handleChangePage:e=>d(e),pageInfo:c,totalRowCount:s,totalColumnCount:l,totalPages:u,keyboard:t,translator:r,theme:e,interactions:n,rect:o,layout:i})]})};var lD=O(sD);var uD,cD={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 in den Tabellenzellen zu navigieren, und die Tabulatortaste, um zu den Paginierungssteuerungen zu wechseln. Alle Angaben zur Tastaturnavigation finden Sie in der Dokumentation.","en-US":"Use arrow keys to navigate in table cells and tab to move to pagination controls. For the full range of keyboard navigation, see the documentation.","es-ES":"Use las teclas de flecha para navegar en las celdas de la tabla y la pestaña para moverse a los controles de paginación. Para conocer la gama completa de navegación con teclado, consulte la documentación.","fr-FR":"Utilisez les touches fléchées pour parcourir les cellules du tableau et la tabulation pour accéder aux commandes de pagination. Pour connaître la gamme complète des commandes de navigation au clavier, voir la documentation.","it-IT":"Utilizzare i tasti freccia per navigare nelle celle della tabella e il tasto TAB per passare ai controlli di paginazione. Per informazioni complete sulla navigazione da tastiera, vedere la documentazione.","ja-JP":"矢印キーで表のセル内を移動し、タブ キーでページネーション コントロールに移動します。キーボード ナビゲーションの全範囲については、ドキュメントをご覧ください。","ko-KR":"화살표 키를 사용하여 테이블 셀을 탐색하고 탭을 사용하여 페이지 매김 컨트롤로 이동합니다. 전체 키보드 탐색 범위는 설명서를 참조하십시오.","nl-NL":"Gebruik de pijltjestoetsen om te navigeren in tabelcellen en de Tab-toets om naar besturingselementen voor paginering te gaan. Raadpleeg de documentatie voor een volledig overzicht van de toetsenbordnavigatie.","pl-PL":"Użyj klawiszy strzałek do poruszania się po komórkach tabeli oraz tabulatora do poruszania się po elementach sterujących stronami. Pełne informacje o nawigacji przy użyciu klawiatury zawiera dokumentacja.","pt-BR":"Use as setas para navegar nas células da tabela e Tab para mover para os controles de paginação. Para toda a gama de navegação do teclado, consulte a documentação.","ru-RU":"Используйте клавиши со стрелками для перемещения по ячейкам таблицы и клавишу табуляции для перехода к элементам управления разбивки на страницы. Полный перечень возможностей навигации с помощью клавиатуры см. в документации.","sv-SE":"Använd piltangenterna för att navigera i tabellcellerna och tabbtangenten för att flytta till pagineringskontrollerna. Se dokumentationen för komplett information om tangentbordsnavigering.","tr-TR":"Tablo hücrelerinde gezinmek için ok tuşlarını, sayfalandırma kontrollerine geçmek için sekmeyi kullanın. Tam kapsamlı klavye gezintisi için belgelere bakın.","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":"已依遞減順序排序。"}}};!function(e){e.FIRST="first-announcer-element",e.SECOND="second-announcer-element"}(uD||(uD={}));const dD=(e,t)=>o((()=>(function(e){if(e&&e.get&&e.add){const t="SNTable.Accessibility.RowsAndColumns";if(e.get(t)!==t)return;Object.keys(cD).forEach((t=>{e.add(cD[t])}))}}(t),((e,t,r)=>{let n=r||null;return({keys:r,shouldBeAtomic:o=!0,politeness:i="polite"})=>{const a=r.map((e=>{if(Array.isArray(e)){const[r,...n]=e;return t.get(r,n)}return t.get(e)})).join(" "),s=e.querySelector(".sn-table-announcer-1"),l=e.querySelector(".sn-table-announcer-2");let u;n===uD.FIRST?(u=l,n=uD.SECOND):(u=s,n=uD.FIRST),u.innerHTML=u.innerHTML.endsWith(" ­")?a:`${a} ­`,u.setAttribute("aria-atomic",o.toString()),u.setAttribute("aria-live",i)}})(e,t))),[e,t.language()]),pD={page:0,rowsPerPage:100,rowsPerPageOptions:[10,25,100]},fD=({app:e,model:n,rootElement:o,layout:i,interactions:l,translator:u,selectionsAPI:c,theme:d,changeSortOrder:p,keyboard:f,rect:m,embed:h,reactRoot:g,applyColumnWidths:b,isFontLoaded:v,viewService:y,env:x})=>{const{direction:S,footerContainer:E}=a(),C=qv(i,y),w=Nv(i,y),R=dD(o,u),A=C?{page:y.page||pD.page,rowsPerPage:y.rowsPerPage||pD.rowsPerPage,rowsPerPageOptions:pD.rowsPerPageOptions}:pD,[I,L]=t(A),[D]=s((async()=>w?async function(e,t,r,n,o,i){var a,s;const{page:l,rowsPerPage:u,rowsPerPageOptions:c}=r,d=t.qHyperCube.qSize.qcx,p=t.qHyperCube.qSize.qcy,f=Math.ceil(p/u),m=null!==(a=o.visibleTop)&&void 0!==a?a:l*u,h=null!==(s=o.visibleHeight)&&void 0!==s?s:Math.min(u,p-m);if(l>0&&m>=p)return n({...r,page:0}),null;if(h*d>Lv)return n({...r,rowsPerPage:Dv(d,c),page:0}),null;const g=p>10,b=Pv(t,o),v=Ov(t),y=!!t.snapshotData,x=y?t.qHyperCube.qDataPages:await e.getHyperCubeData("/qHyperCubeDef",[{qTop:m,qLeft:0,qHeight:h,qWidth:d}]);o&&!y&&(o.qTop=m,o.qHeight=h,o.rowsPerPage=r.rowsPerPage,o.page=r.page);const S=(null==x?void 0:x[0].qMatrix.map(((e,t)=>{const r=[];return v.forEach(((n,o)=>{r[o]={id:Cb(),...e[o],align:kv(e[o],n.bodyTextAlign),rowIdx:t+m,colIdx:n.colIdx,pageRowIdx:t,pageColIdx:o,selectionColIdx:n.selectionColIdx,isSelectable:n.isDim&&!n.isLocked,isLastRow:t===h-1,isNumeric:Iv(e[o]),representation:Rv(e[o],n.representation,n.qAttrExprInfoIndex,i)}})),r})))||[];return{totalColumnCount:d,totalRowCount:p,totalPages:f,paginationNeeded:g,totalsPosition:b,columns:v,rows:S}}(n,i,I,L,y,x):null),[i,I,n,l,w]);r((()=>{!!(w&&g&&n&&(i.snapshotData||e)&&i&&D&&p&&d&&c&&v&&h)&&function(e,t){const{app:r,model:n,direction:o,selectionsAPI:i,layout:a,translator:s,interactions:l,theme:u,keyboard:c,rootElement:d,embed:p,changeSortOrder:f,applyColumnWidths:m,tableData:h,rect:g,viewService:b,env:v,...y}=e,x=zw(o);null==t||t.render(Qi.jsx(ln,{stylisPlugins:"rtl"===o?[ZS]:void 0,children:Qi.jsx(HS,{theme:x,children:Qi.jsx(Nw,{app:r,model:n,tableData:h,selectionsAPI:i,layout:a,translator:s,interactions:l,theme:u,keyboard:c,rootElement:d,embed:p,changeSortOrder:f,applyColumnWidths:m,rect:g,viewService:b,env:v,children:Qi.jsx(jI,{...y,direction:o})})})}))}({app:e,model:n,rootElement:o,layout:i,tableData:D,direction:S,pageInfo:I,setPageInfo:L,interactions:l,translator:u,selectionsAPI:c,theme:d,changeSortOrder:p,keyboard:f,rect:m,footerContainer:E,announce:R,embed:h,applyColumnWidths:b,viewService:y,env:x},g)}),[e,n,g,D,l,S,d,f.active,R,p,b,w,i,c,h,o,I,L,u,m,E,v,x])},mD=e=>{const t=o((()=>Zm(e)),[e]);return r((()=>()=>t.unmount()),[t]),t},hD=(e,t)=>o((()=>((e,t)=>{if(t)return async(r,n)=>{const{isDim:o,colIdx:i,qReverseSort:a,sortDirection:s,isActivelySorted:l}=r,u=o?i:i-e,c=(await t.getEffectiveProperties()).qHyperCubeDef.qInterColumnSortOrder,d=[],p=n&&n!==s||!n&&l;l||(c.splice(c.indexOf(i),1),c.unshift(i),d.push({qPath:"/qHyperCubeDef/qInterColumnSortOrder",qOp:"Replace",qValue:`[${c.join(",")}]`})),p&&d.push({qPath:`/qHyperCubeDef/${o?"qDimensions":"qMeasures"}/${u}/qDef/qReverseSort`,qOp:"Replace",qValue:(!a).toString()}),t.applyPatches(d,!0)}})(e.qDimensionInfo.length,t)),[e.qDimensionInfo.length,t]);const gD=({model:e,layout:t,shouldRender:r,page:n})=>{const[o]=s((async()=>{if(r&&e)return(async(e,t,r)=>{let{qDataPages:n}=t.qHyperCube;if(0!==r||void 0===n||0===n.length){const o=r*Math.min(lw,t.qHyperCube.qSize.qcy);n=await e.getHyperCubeData("/qHyperCubeDef",[{qLeft:0,qTop:o,qWidth:50,qHeight:100}])}return{initialDataPages:n,derivedFrom:{layout:t,page:r}}})(e,t,n)}),[e,t,n]),i=(null==o?void 0:o.derivedFrom.layout)!==t||(null==o?void 0:o.derivedFrom.page)!==n;return{initialDataPages:null==o?void 0:o.initialDataPages,isLoading:i}},bD=({app:e,layout:n,model:i,rect:a,theme:s,keyboard:l,translator:u,interactions:c,selectionsAPI:d,changeSortOrder:p,rootElement:f,embed:m,reactRoot:h,applyColumnWidths:g,isFontLoaded:b,viewService:v,env:y})=>{const x=!Nv(n,v),E=o((()=>function(e,t,r){const n=Pv(e,r),o=Ov(e),i=e.qHyperCube.qSize.qcy,a=Math.min(lw,i),s=i>lw&&!!t.active;return{totalsPosition:n,columns:o,rows:[],totalRowCount:i,totalColumnCount:e.qHyperCube.qSize.qcx,totalPages:Math.ceil(i/a),paginationNeeded:s}}(n,c,v)),[n,c,v]),{pageInfo:C,setPage:w}=((e,r)=>{const[n,i]=t(0),a=Math.min(lw,e.qHyperCube.qSize.qcy),s=o((()=>({page:n,rowsPerPage:a,rowsPerPageOptions:[]})),[a,n]);if(r){const t=Math.floor(e.qHyperCube.qSize.qcy/lw);t<n&&i(t)}return{pageInfo:s,setPage:i}})(n,x),{initialDataPages:R,isLoading:A}=gD({model:i,layout:n,page:C.page,shouldRender:x});r((()=>{var e;x&&l.active&&(null===(e=l.blur)||void 0===e||e.call(l,!1))}),[l.active]),r((()=>{x&&i&&p&&R&&!A&&b&&function(e,t){const{app:r,selectionsAPI:n,layout:o,model:i,translator:a,interactions:s,theme:l,keyboard:u,rect:c,rootElement:d,embed:p,changeSortOrder:f,tableData:m,applyColumnWidths:h,setPage:g,pageInfo:b,initialDataPages:v,viewService:y,env:x}=e,E=zw("ltr");t.render(Qi.jsx(S.StrictMode,{children:Qi.jsx(HS,{theme:E,children:Qi.jsx(Nw,{app:r,selectionsAPI:n,layout:o,model:i,translator:a,interactions:s,theme:l,keyboard:u,rootElement:d,embed:p,changeSortOrder:f,tableData:m,applyColumnWidths:h,rect:c,setPage:g,pageInfo:b,initialDataPages:v,viewService:y,env:x,children:Qi.jsx(lD,{})})})}))}({app:e,layout:n,model:i,rect:a,theme:s,keyboard:l,translator:u,interactions:c,selectionsAPI:d,rootElement:f,embed:m,changeSortOrder:p,tableData:E,applyColumnWidths:g,setPage:w,pageInfo:C,initialDataPages:R,viewService:v,env:y},h)}),[e,n,i,a,s,l.active,u,c,d,p,x,f,m,h,E,g,w,C,A,R,b,y])},vD=(e,t)=>{const{fontSize:r,fontFamily:n}=Dw(t,e,!1),{fontSize:o,fontFamily:i}=Pw(t,e),[a,l]=s((async()=>(await document.fonts.load(`600 ${r} ${n}`),await document.fonts.load(`${o} ${i}`),!0)),[r,n,o,i]);return l?(console.warn("Failed to load font:",l),!0):!!a},yD={version:JSON.stringify("3.6.2"),qHyperCubeDef:{qDimensions:[],qMeasures:[],qColumnOrder:[],qInitialDataFetch:[{qWidth:50,qHeight:100}]},showTitles:!0,enableChartExploration:!1,title:"",subtitle:"",footnote:"",totals:{show:!0,position:"noTotals",label:"Totals"},usePagination:!1,components:[]};var xD=()=>({properties:{initial:yD},data:{targets:[{path:"/qHyperCubeDef",dimensions:{min:0,max:1e3},measures:{min:0,max:1e3}}]},importProperties:jg,exportProperties:Fg,exploration:$g});function SD(e,t){const r=e.getElementsByClassName("sn-table-container")[0];if(!r)return{};const n=(null==r?void 0:r.getBoundingClientRect())||{},o=e.getElementsByClassName("sn-table-head-row")[0],i=(null==o?void 0:o.getBoundingClientRect())||{height:0},a=e.getElementsByClassName("sn-table-totals-row")[0],s=(null==a?void 0: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 ED=(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]}},CD=(e,t,r)=>{if(!e)return!1;const n=e.y+e.height/2;return n>=t&&n<=r};const wD=(e,t,r,n)=>{var o;if(e<0)return 0;const i=r.qHyperCube.qSize.qcy,a=n.rowsPerPage||pD.rowsPerPage,s=null!==(o=n.viewState)&&void 0!==o&&o.isMultiPage?0:3;return Math.min(i,a,e-t+1+s)},RD=(e,t,r)=>{if(t.viewState&&!t.viewState.isMultiPage)return t.viewState;const n=Pv(e,t);if(Nv(e,t)){const{visibleRowStartIndex:o=-1,visibleRowEndIndex:i=-1,rowPartialHeight:a}=SD(r,n);return{rowPartialHeight:a,scrollLeft:t.scrollLeft,visibleTop:t.qTop+o,visibleHeight:wD(i,o,e,t),rowsPerPage:t.rowsPerPage,page:t.page,totalsPosition:n}}const{visibleRowStartIndex:o=-1,visibleRowEndIndex:i=-1}=function(e,t){const r=e.querySelector(".sn-table-body"),n=null==r?void 0:r.getBoundingClientRect(),o=null==r?void 0: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=ED(d,o),m=null==f?void 0:f.getBoundingClientRect();if(!f||!m)return{};const h=n.y;if(1-i<.001)return{visibleRowStartIndex:d+(m.y>=h-4?0:1)+c,visibleRowEndIndex:p+c};const g=n.y+n.height,b=(CD(m,h,g)?d:d+1)+c;let v=p+c;const y=ED(p,o),x=null==y?void 0:y.getBoundingClientRect();return y&&x&&(CD(x,h,g)||(v=p-1+c)),{visibleRowStartIndex:b,visibleRowEndIndex:v}}(r,t);return{scrollLeft:t.scrollLeft,visibleLeft:t.visibleLeft,visibleWidth:t.visibleWidth,visibleTop:o,visibleHeight:wD(i,o,e,t),scrollTopRatio:t.scrollTopRatio,rowsPerPage:t.rowsPerPage,page:t.page,totalsPosition:n}},AD=({layout:e,viewService:t,model:r,rootElement:n,contentRect:o})=>{l((async i=>{if(!i.snapshotData||!r||i.snapshotData.content)return i;if(r.getHyperCubeData){i.qHyperCube||(i.qHyperCube={});const{rowPartialHeight:a,scrollLeft:s,scrollTopRatio:l,visibleLeft:u,visibleWidth:c,visibleTop:d,visibleHeight:p,rowsPerPage:f,page:m}=RD(e,t,n);i.qHyperCube.qDataPages=await r.getHyperCubeData("/qHyperCubeDef",[{qLeft:0,qTop:null!=d?d:0,qWidth:e.qHyperCube.qSize.qcx,qHeight:null!=p?p:0}]),i.snapshotData.content={rowPartialHeight:a,scrollLeft:s,scrollTopRatio:l,visibleLeft:u,visibleWidth:c,visibleTop:d,visibleHeight:p,rowsPerPage:f,page:m,size:{width:o.width,height:o.height},estimatedRowHeight:t.estimatedRowHeight}}return i})),u((()=>({getViewState:()=>RD(e,t,n)})),[e,t,n])},ID=e=>{const{viewState:t}=a();return o((()=>((e,t)=>{var r,n,o,i,a,s,l,u,c,d,p,f,m,h,g,b,v;return{qTop:0,qHeight:0,rowPartialHeight:null!==(r=null==t||null===(n=t.content)||void 0===n?void 0:n.rowPartialHeight)&&void 0!==r?r:0,visibleTop:null!==(o=null==t||null===(i=t.content)||void 0===i?void 0:i.visibleTop)&&void 0!==o?o:null==e?void 0:e.visibleTop,visibleHeight:null!==(a=null==t||null===(s=t.content)||void 0===s?void 0:s.visibleHeight)&&void 0!==a?a:null==e?void 0:e.visibleHeight,scrollLeft:null!==(l=null!==(u=null==t||null===(c=t.content)||void 0===c?void 0:c.scrollLeft)&&void 0!==u?u:null==e?void 0:e.scrollLeft)&&void 0!==l?l:0,scrollTopRatio:null!==(d=null==t||null===(p=t.content)||void 0===p?void 0:p.scrollTopRatio)&&void 0!==d?d:null==e?void 0:e.scrollTopRatio,rowsPerPage:null!==(f=null==t||null===(m=t.content)||void 0===m?void 0:m.rowsPerPage)&&void 0!==f?f:null==e?void 0:e.rowsPerPage,page:null!==(h=null==t||null===(g=t.content)||void 0===g?void 0:g.page)&&void 0!==h?h:null==e?void 0:e.page,viewState:e,estimatedRowHeight:null!==(b=null==t||null===(v=t.content)||void 0===v?void 0:v.estimatedRowHeight)&&void 0!==b?b:0}})(t,e.snapshotData)),[t,e.snapshotData,e.usePagination])},LD=e=>e.getStyle("","","object.straightTableV2.backgroundColor"),DD=e=>e.getStyle("object","straightTableV2","backgroundColor")}}}));
201
+ `),wE.rippleVisible,ME,550,(({theme:e})=>e.transitions.easing.easeInOut),wE.ripplePulsate,(({theme:e})=>e.transitions.duration.shorter),wE.child,wE.childLeaving,_E,550,(({theme:e})=>e.transitions.easing.easeInOut),wE.childPulsate,TE,(({theme:e})=>e.transitions.easing.easeInOut));var qE=x.forwardRef((function(e,t){const r=cS({props:e,name:"MuiTouchRipple"}),{center:n=!1,classes:o={},className:i}=r,a=X(r,RE),[s,l]=x.useState([]),u=x.useRef(0),c=x.useRef(null);x.useEffect((()=>{c.current&&(c.current(),c.current=null)}),[s]);const d=x.useRef(!1),p=xo(),f=x.useRef(null),m=x.useRef(null),h=x.useCallback((e=>{const{pulsate:t,rippleX:r,rippleY:n,rippleSize:i,cb:a}=e;l((e=>[...e,Qi.jsx(OE,{classes:{ripple:ia(o.ripple,wE.ripple),rippleVisible:ia(o.rippleVisible,wE.rippleVisible),ripplePulsate:ia(o.ripplePulsate,wE.ripplePulsate),child:ia(o.child,wE.child),childLeaving:ia(o.childLeaving,wE.childLeaving),childPulsate:ia(o.childPulsate,wE.childPulsate)},timeout:550,pulsate:t,rippleX:r,rippleY:n,rippleSize:i},u.current)])),u.current+=1,c.current=a}),[o]),g=x.useCallback(((e={},t={},r=(()=>{}))=>{const{pulsate:o=!1,center:i=n||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&d.current)return void(d.current=!1);"touchstart"===(null==e?void 0:e.type)&&(d.current=!0);const s=a?null:m.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let u,c,g;if(i||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)u=Math.round(l.width/2),c=Math.round(l.height/2);else{const{clientX:t,clientY:r}=e.touches&&e.touches.length>0?e.touches[0]:e;u=Math.round(t-l.left),c=Math.round(r-l.top)}if(i)g=Math.sqrt((2*l.width**2+l.height**2)/3),g%2==0&&(g+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-u),u)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-c),c)+2;g=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===f.current&&(f.current=()=>{h({pulsate:o,rippleX:u,rippleY:c,rippleSize:g,cb:r})},p.start(80,(()=>{f.current&&(f.current(),f.current=null)}))):h({pulsate:o,rippleX:u,rippleY:c,rippleSize:g,cb:r})}),[n,h,p]),b=x.useCallback((()=>{g({},{pulsate:!0})}),[g]),v=x.useCallback(((e,t)=>{if(p.clear(),"touchend"===(null==e?void 0:e.type)&&f.current)return f.current(),f.current=null,void p.start(0,(()=>{v(e,t)}));f.current=null,l((e=>e.length>0?e.slice(1):e)),c.current=t}),[p]);return x.useImperativeHandle(t,(()=>({pulsate:b,start:g,stop:v})),[b,g,v]),Qi.jsx(kE,$({className:ia(wE.root,o.root,i),ref:m},a,{children:Qi.jsx(ml,{component:null,exit:!0,children:s})}))}));function NE(e){return Oo("MuiButtonBase",e)}var FE=qo("MuiButtonBase",["root","disabled","focusVisible"]);const zE=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],jE=$S("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${FE.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),$E=x.forwardRef((function(e,t){const r=cS({props:e,name:"MuiButtonBase"}),{action:n,centerRipple:o=!1,children:i,className:a,component:s="button",disabled:l=!1,disableRipple:u=!1,disableTouchRipple:c=!1,focusRipple:d=!1,LinkComponent:p="a",onBlur:f,onClick:m,onContextMenu:h,onDragLeave:g,onFocus:b,onFocusVisible:v,onKeyDown:y,onKeyUp:S,onMouseDown:E,onMouseLeave:C,onMouseUp:w,onTouchEnd:R,onTouchMove:A,onTouchStart:I,tabIndex:L=0,TouchRippleProps:D,touchRippleRef:P,type:M}=r,_=X(r,zE),T=x.useRef(null),k=x.useRef(null),O=go(k,P),{isFocusVisibleRef:q,onFocus:N,onBlur:F,ref:z}=Do(),[j,B]=x.useState(!1);l&&j&&B(!1),x.useImperativeHandle(n,(()=>({focusVisible:()=>{B(!0),T.current.focus()}})),[]);const[H,W]=x.useState(!1);x.useEffect((()=>{W(!0)}),[]);const G=H&&!u&&!l;function V(e,t,r=c){return ho((n=>{t&&t(n);return!r&&k.current&&k.current[e](n),!0}))}x.useEffect((()=>{j&&d&&!u&&H&&k.current.pulsate()}),[u,d,j,H]);const U=V("start",E),Y=V("stop",h),K=V("stop",g),J=V("stop",w),Z=V("stop",(e=>{j&&e.preventDefault(),C&&C(e)})),Q=V("start",I),ee=V("stop",R),te=V("stop",A),re=V("stop",(e=>{F(e),!1===q.current&&B(!1),f&&f(e)}),!1),ne=ho((e=>{T.current||(T.current=e.currentTarget),N(e),!0===q.current&&(B(!0),v&&v(e)),b&&b(e)})),oe=()=>{const e=T.current;return s&&"button"!==s&&!("A"===e.tagName&&e.href)},ie=x.useRef(!1),ae=ho((e=>{d&&!ie.current&&j&&k.current&&" "===e.key&&(ie.current=!0,k.current.stop(e,(()=>{k.current.start(e)}))),e.target===e.currentTarget&&oe()&&" "===e.key&&e.preventDefault(),y&&y(e),e.target===e.currentTarget&&oe()&&"Enter"===e.key&&!l&&(e.preventDefault(),m&&m(e))})),se=ho((e=>{d&&" "===e.key&&k.current&&j&&!e.defaultPrevented&&(ie.current=!1,k.current.stop(e,(()=>{k.current.pulsate(e)}))),S&&S(e),m&&e.target===e.currentTarget&&oe()&&" "===e.key&&!e.defaultPrevented&&m(e)}));let le=s;"button"===le&&(_.href||_.to)&&(le=p);const ue={};"button"===le?(ue.type=void 0===M?"button":M,ue.disabled=l):(_.href||_.to||(ue.role="button"),l&&(ue["aria-disabled"]=l));const ce=go(t,z,T),de=$({},r,{centerRipple:o,component:s,disabled:l,disableRipple:u,disableTouchRipple:c,focusRipple:d,tabIndex:L,focusVisible:j}),pe=(e=>{const{disabled:t,focusVisible:r,focusVisibleClassName:n,classes:o}=e,i=Mo({root:["root",t&&"disabled",r&&"focusVisible"]},NE,o);return r&&n&&(i.root+=` ${n}`),i})(de);return Qi.jsxs(jE,$({as:le,className:ia(pe.root,a),ownerState:de,onBlur:re,onClick:m,onContextMenu:Y,onFocus:ne,onKeyDown:ae,onKeyUp:se,onMouseDown:U,onMouseLeave:Z,onMouseUp:J,onDragLeave:K,onTouchEnd:ee,onTouchMove:te,onTouchStart:Q,ref:ce,tabIndex:l?-1:L,type:M},ue,_,{children:[i,G?Qi.jsx(qE,$({ref:O,center:o},D)):null]}))}));var BE=$E;var HE=qo("MuiBox",["root"]);const WE=lS(),GE=function(e={}){const{themeId:t,defaultTheme:r,defaultClassName:n="MuiBox-root",generateClassName:o}=e,i=Bv("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(Wy);return x.forwardRef((function(e,a){const s=Jy(r),l=ex(e),{className:u,component:c="div"}=l,d=X(l,rx);return Qi.jsx(i,$({as:c,ref:a,className:ia(u,o?o(n):n),theme:t&&s[t]||s},d))}))}({themeId:Fv,defaultTheme:WE,defaultClassName:HE.root,generateClassName:To.generate});var VE=GE;function UE(e){return Oo("MuiDivider",e)}var YE=qo("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);const KE=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],XE=$S("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.absolute&&t.absolute,t[r.variant],r.light&&t.light,"vertical"===r.orientation&&t.vertical,r.flexItem&&t.flexItem,r.children&&t.withChildren,r.children&&"vertical"===r.orientation&&t.withChildrenVertical,"right"===r.textAlign&&"vertical"!==r.orientation&&t.textAlignRight,"left"===r.textAlign&&"vertical"!==r.orientation&&t.textAlignLeft]}})((({theme:e,ownerState:t})=>$({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},t.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},t.light&&{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:vx(e.palette.divider,.08)},"inset"===t.variant&&{marginLeft:72},"middle"===t.variant&&"horizontal"===t.orientation&&{marginLeft:e.spacing(2),marginRight:e.spacing(2)},"middle"===t.variant&&"vertical"===t.orientation&&{marginTop:e.spacing(1),marginBottom:e.spacing(1)},"vertical"===t.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},t.flexItem&&{alignSelf:"stretch",height:"auto"})),(({ownerState:e})=>$({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{content:'""',alignSelf:"center"}})),(({theme:e,ownerState:t})=>$({},t.children&&"vertical"!==t.orientation&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`}})),(({theme:e,ownerState:t})=>$({},t.children&&"vertical"===t.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`}})),(({ownerState:e})=>$({},"right"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}}))),JE=$S("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.wrapper,"vertical"===r.orientation&&t.wrapperVertical]}})((({theme:e,ownerState:t})=>$({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`},"vertical"===t.orientation&&{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}))),ZE=x.forwardRef((function(e,t){const r=cS({props:e,name:"MuiDivider"}),{absolute:n=!1,children:o,className:i,component:a=(o?"div":"hr"),flexItem:s=!1,light:l=!1,orientation:u="horizontal",role:c=("hr"!==a?"separator":void 0),textAlign:d="center",variant:p="fullWidth"}=r,f=X(r,KE),m=$({},r,{absolute:n,component:a,flexItem:s,light:l,orientation:u,role:c,textAlign:d,variant:p}),h=(e=>{const{absolute:t,children:r,classes:n,flexItem:o,light:i,orientation:a,textAlign:s,variant:l}=e;return Mo({root:["root",t&&"absolute",l,i&&"light","vertical"===a&&"vertical",o&&"flexItem",r&&"withChildren",r&&"vertical"===a&&"withChildrenVertical","right"===s&&"vertical"!==a&&"textAlignRight","left"===s&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]},UE,n)})(m);return Qi.jsx(XE,$({as:a,className:ia(h.root,i),role:c,ref:t,ownerState:m},f,{children:o?Qi.jsx(JE,{className:h.wrapper,ownerState:m,children:o}):null}))}));ZE.muiSkipListHighlight=!0;var QE=ZE;var eC=x.createContext({});function tC(e){return Oo("MuiListItemIcon",e)}var rC=qo("MuiListItemIcon",["root","alignItemsFlexStart"]);const nC=["className"],oC=$S("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,"flex-start"===r.alignItems&&t.alignItemsFlexStart]}})((({theme:e,ownerState:t})=>$({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===t.alignItems&&{marginTop:8})));var iC=x.forwardRef((function(e,t){const r=cS({props:e,name:"MuiListItemIcon"}),{className:n}=r,o=X(r,nC),i=$({},r,{alignItems:x.useContext(eC).alignItems}),a=(e=>{const{alignItems:t,classes:r}=e;return Mo({root:["root","flex-start"===t&&"alignItemsFlexStart"]},tC,r)})(i);return Qi.jsx(oC,$({className:ia(a.root,n),ownerState:i,ref:t},o))}));var aC=qo("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);function sC(e){return Oo("MuiMenuItem",e)}var lC=qo("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]);const uC=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],cC=$S(BE,{shouldForwardProp:e=>jS(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.dense&&t.dense,r.divider&&t.divider,!r.disableGutters&&t.gutters]}})((({theme:e,ownerState:t})=>$({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${lC.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:vx(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${lC.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:vx(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${lC.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:vx(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:vx(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${lC.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${lC.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${YE.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${YE.inset}`]:{marginLeft:52},[`& .${aC.root}`]:{marginTop:0,marginBottom:0},[`& .${aC.inset}`]:{paddingLeft:36},[`& .${rC.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&$({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${rC.root} svg`]:{fontSize:"1.25rem"}}))));var dC=x.forwardRef((function(e,t){const r=cS({props:e,name:"MuiMenuItem"}),{autoFocus:n=!1,component:o="li",dense:i=!1,divider:a=!1,disableGutters:s=!1,focusVisibleClassName:l,role:u="menuitem",tabIndex:c,className:d}=r,p=X(r,uC),f=x.useContext(eC),m=x.useMemo((()=>({dense:i||f.dense||!1,disableGutters:s})),[f.dense,i,s]),h=x.useRef(null);mo((()=>{n&&h.current&&h.current.focus()}),[n]);const g=$({},r,{dense:m.dense,divider:a,disableGutters:s}),b=(e=>{const{disabled:t,dense:r,divider:n,disableGutters:o,selected:i,classes:a}=e;return $({},a,Mo({root:["root",r&&"dense",t&&"disabled",!o&&"gutters",n&&"divider",i&&"selected"]},sC,a))})(r),v=go(h,t);let y;return r.disabled||(y=void 0!==c?c:-1),Qi.jsx(eC.Provider,{value:m,children:Qi.jsx(cC,$({ref:v,role:u,tabIndex:y,component:o,focusVisibleClassName:ia(b.focusVisible,l),className:ia(b.root,d)},p,{ownerState:g,classes:b}))})}));var pC=x.createContext();function fC(e){return Oo("MuiTable",e)}qo("MuiTable",["root","stickyHeader"]);const mC=["className","component","padding","size","stickyHeader"],hC=$S("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.stickyHeader&&t.stickyHeader]}})((({theme:e,ownerState:t})=>$({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":$({},e.typography.body2,{padding:e.spacing(2),color:(e.vars||e).palette.text.secondary,textAlign:"left",captionSide:"bottom"})},t.stickyHeader&&{borderCollapse:"separate"}))),gC="table",bC=x.forwardRef((function(e,t){const r=cS({props:e,name:"MuiTable"}),{className:n,component:o=gC,padding:i="normal",size:a="medium",stickyHeader:s=!1}=r,l=X(r,mC),u=$({},r,{component:o,padding:i,size:a,stickyHeader:s}),c=(e=>{const{classes:t,stickyHeader:r}=e;return Mo({root:["root",r&&"stickyHeader"]},fC,t)})(u),d=x.useMemo((()=>({padding:i,size:a,stickyHeader:s})),[i,a,s]);return Qi.jsx(pC.Provider,{value:d,children:Qi.jsx(hC,$({as:o,role:o===gC?null:"table",ref:t,className:ia(c.root,n),ownerState:u},l))})}));var vC=bC;var yC=x.createContext();function xC(e){return Oo("MuiTableBody",e)}qo("MuiTableBody",["root"]);const SC=["className","component"],EC=$S("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-row-group"}),CC={variant:"body"},wC="tbody";var RC=x.forwardRef((function(e,t){const r=cS({props:e,name:"MuiTableBody"}),{className:n,component:o=wC}=r,i=X(r,SC),a=$({},r,{component:o}),s=(e=>{const{classes:t}=e;return Mo({root:["root"]},xC,t)})(a);return Qi.jsx(yC.Provider,{value:CC,children:Qi.jsx(EC,$({className:ia(s.root,n),as:o,ref:t,role:o===wC?null:"rowgroup",ownerState:a},i))})}));function AC(e){return Oo("MuiTableCell",e)}var IC=qo("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]);const LC=["align","className","component","padding","scope","size","sortDirection","variant"],DC=$S("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`size${so(r.size)}`],"normal"!==r.padding&&t[`padding${so(r.padding)}`],"inherit"!==r.align&&t[`align${so(r.align)}`],r.stickyHeader&&t.stickyHeader]}})((({theme:e,ownerState:t})=>$({},e.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid\n ${"light"===e.palette.mode?Sx(vx(e.palette.divider,1),.88):yx(vx(e.palette.divider,1),.68)}`,textAlign:"left",padding:16},"head"===t.variant&&{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium},"body"===t.variant&&{color:(e.vars||e).palette.text.primary},"footer"===t.variant&&{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)},"small"===t.size&&{padding:"6px 16px",[`&.${IC.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},"checkbox"===t.padding&&{width:48,padding:"0 0 0 4px"},"none"===t.padding&&{padding:0},"left"===t.align&&{textAlign:"left"},"center"===t.align&&{textAlign:"center"},"right"===t.align&&{textAlign:"right",flexDirection:"row-reverse"},"justify"===t.align&&{textAlign:"justify"},t.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default}))),PC=x.forwardRef((function(e,t){const r=cS({props:e,name:"MuiTableCell"}),{align:n="inherit",className:o,component:i,padding:a,scope:s,size:l,sortDirection:u,variant:c}=r,d=X(r,LC),p=x.useContext(pC),f=x.useContext(yC),m=f&&"head"===f.variant;let h;h=i||(m?"th":"td");let g=s;"td"===h?g=void 0:!g&&m&&(g="col");const b=c||f&&f.variant,v=$({},r,{align:n,component:h,padding:a||(p&&p.padding?p.padding:"normal"),size:l||(p&&p.size?p.size:"medium"),sortDirection:u,stickyHeader:"head"===b&&p&&p.stickyHeader,variant:b}),y=(e=>{const{classes:t,variant:r,align:n,padding:o,size:i,stickyHeader:a}=e;return Mo({root:["root",r,a&&"stickyHeader","inherit"!==n&&`align${so(n)}`,"normal"!==o&&`padding${so(o)}`,`size${so(i)}`]},AC,t)})(v);let S=null;return u&&(S="asc"===u?"ascending":"descending"),Qi.jsx(DC,$({as:h,ref:t,className:ia(y.root,o),"aria-sort":S,scope:g,ownerState:v},d))}));var MC=PC;function _C(e){return Oo("MuiTableContainer",e)}qo("MuiTableContainer",["root"]);const TC=["className","component"],kC=$S("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"});var OC=x.forwardRef((function(e,t){const r=cS({props:e,name:"MuiTableContainer"}),{className:n,component:o="div"}=r,i=X(r,TC),a=$({},r,{component:o}),s=(e=>{const{classes:t}=e;return Mo({root:["root"]},_C,t)})(a);return Qi.jsx(kC,$({ref:t,as:o,className:ia(s.root,n),ownerState:a},i))}));function qC(e){return Oo("MuiTableHead",e)}qo("MuiTableHead",["root"]);const NC=["className","component"],FC=$S("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),zC={variant:"head"},jC="thead";var $C=x.forwardRef((function(e,t){const r=cS({props:e,name:"MuiTableHead"}),{className:n,component:o=jC}=r,i=X(r,NC),a=$({},r,{component:o}),s=(e=>{const{classes:t}=e;return Mo({root:["root"]},qC,t)})(a);return Qi.jsx(yC.Provider,{value:zC,children:Qi.jsx(FC,$({as:o,className:ia(s.root,n),ref:t,role:o===jC?null:"rowgroup",ownerState:a},i))})}));function BC(e){return Oo("MuiTableRow",e)}var HC=qo("MuiTableRow",["root","selected","hover","head","footer"]);const WC=["className","component","hover","selected"],GC=$S("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.head&&t.head,r.footer&&t.footer]}})((({theme:e})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${HC.hover}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${HC.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:vx(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:vx(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)}}}))),VC="tr",UC=x.forwardRef((function(e,t){const r=cS({props:e,name:"MuiTableRow"}),{className:n,component:o=VC,hover:i=!1,selected:a=!1}=r,s=X(r,WC),l=x.useContext(yC),u=$({},r,{component:o,hover:i,selected:a,head:l&&"head"===l.variant,footer:l&&"footer"===l.variant}),c=(e=>{const{classes:t,selected:r,hover:n,head:o,footer:i}=e;return Mo({root:["root",r&&"selected",n&&"hover",o&&"head",i&&"footer"]},BC,t)})(u);return Qi.jsx(GC,$({as:o,ref:t,className:ia(c.root,n),role:o===VC?null:"row",ownerState:u},s))}));var YC=UC,KC=(e={})=>S.createElement(vE,{...e},S.createElement("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},S.createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},S.createElement("rect",{stroke:tE.GREYSCALE_0_42,fill:"currentColor",x:"0.5",y:"0.5",width:"15",height:"15",rx:"3"}))));const XC={MuiAccordion:{styleOverrides:{root:{backgroundColor:tE.GREYSCALE_98,"&:before":{backgroundColor:"unset"},"&.Mui-expanded":{margin:"0px"}}}},MuiAccordionDetails:{styleOverrides:{root:{backgroundColor:tE.WHITE}}},MuiAccordionSummary:{defaultProps:{expandIcon:S.createElement(hE,{"aria-hidden":"true",viewBox:"0 0 16 16",width:16,height:16})},styleOverrides:{root:{padding:"0px 12px 0px 16px",minHeight:"auto",boxShadow:`inset 0px -1px 0px 0px ${tE.GREYSCALE_0_15}`,"&.Mui-focusVisible":{borderColor:tE.MISC_FOCUS_BORDER,boxShadow:`inset 0 0 0 2px ${tE.MISC_FOCUS_BORDER}`,borderRadius:aE,backgroundColor:tE.GREYSCALE_0_03},"&.Mui-expanded":{minHeight:"auto"}},content:{overflow:"hidden",textOverflow:"ellipsis","&.Mui-expanded":{margin:"12px 0px"}}}},MuiAppBar:{defaultProps:{elevation:0},styleOverrides:{root:{flex:"0 0 48px",boxShadow:`inset 0 -1px 0 0 ${tE.GREYSCALE_0_15}`},colorPrimary:{backgroundColor:tE.WHITE,color:tE.TEXT_PRIMARY}}},MuiBadge:{styleOverrides:{badge:{height:"16px",minWidth:"16px",fontSize:"12px",padding:"0px 5px"},anchorOriginTopRightRectangular:{top:"-3px",right:"-3px"}}},MuiButtonBase:{defaultProps:{disableRipple:!0,disableTouchRipple:!0,focusVisibleClassName:"sprout-focus-visible"}},MuiButtonGroup:{defaultProps:{disableRipple:!0},styleOverrides:{root:{height:"32px",lineHeight:"16px",fontSize:14,borderRadius:aE},text:{padding:"8px 16px","&.Mui-focusVisible":{boxShadow:`0 0 0 2px ${tE.MISC_FOCUS_BORDER}`}},outlined:{padding:"7px 16px",borderColor:tE.GREYSCALE_0_15,backgroundColor:tE.GREYSCALE_100_60,"&.Mui-focusVisible":{borderColor:tE.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${tE.MISC_FOCUS_BORDER}`}},contained:{padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"}},groupedContainedPrimary:{"&:hover":{backgroundColor:tE.GREEN_PALE},"&:active":{backgroundColor:tE.GREEN_DARK},"&.Mui-focusVisible":{borderColor:tE.GREEN_PALE,boxShadow:`0 0 0 3px ${ix(tE.GREEN_PALE,.5)}`}},groupedContainedSecondary:{"&:hover":{backgroundColor:tE.BLUE_PALE},"&:active":{backgroundColor:tE.BLUE_DARK},"&.Mui-focusVisible":{borderColor:tE.BLUE_PALE,boxShadow:`0 0 0 3px ${ix(tE.BLUE_PALE,.5)}`}}},variants:[{props:{size:"small"},style:{height:"24px"}},{props:{size:"large"},style:{height:"40px"}}]},MuiButton:{defaultProps:{color:"inherit",disableRipple:!0,focusVisibleClassName:"sprout-focus-visible"},styleOverrides:{root:{height:"32px",lineHeight:"16px",minWidth:"24px",fontSize:14,borderRadius:aE,"& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},text:{padding:"8px 16px","&:active":{backgroundColor:tE.GREYSCALE_0_10},"&.Mui-focusVisible":{boxShadow:`0 0 0 2px ${tE.MISC_FOCUS_BORDER}`}},outlined:({ownerState:e})=>({padding:"7px 16px",borderColor:tE.GREYSCALE_0_15,backgroundColor:tE.GREYSCALE_100_60,"&:active":{backgroundColor:tE.GREYSCALE_0_10},"&.Mui-focusVisible":{borderColor:tE.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${tE.MISC_FOCUS_BORDER}`},..."amethyst"===e.color&&{borderColor:tE.PURPLE,"&.Mui-focusVisible":{borderColor:tE.PURPLE,boxShadow:`0 0 0 3px ${ix(tE.PURPLE_PALE,.5)}`}}}),outlinedPrimary:{borderColor:tE.GREEN,"&.Mui-focusVisible":{borderColor:tE.GREEN,boxShadow:`0 0 0 3px ${ix(tE.GREEN_PALE,.5)}`}},outlinedSecondary:{borderColor:tE.BLUE,"&.Mui-focusVisible":{borderColor:tE.BLUE,boxShadow:`0 0 0 3px ${ix(tE.BLUE_PALE,.5)}`}},outlinedWarning:{borderColor:tE.ORANGE,"&.Mui-focusVisible":{borderColor:tE.ORANGE,boxShadow:`0 0 0 3px ${ix(tE.ORANGE_PALE,.5)}`}},outlinedError:{borderColor:tE.RED,"&.Mui-focusVisible":{borderColor:tE.RED,boxShadow:`0 0 0 3px ${ix(tE.RED_PALE,.5)}`}},contained:({ownerState:e})=>({color:tE.WHITE,padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"},..."amethyst"===e.color&&{"&:hover":{backgroundColor:tE.PURPLE_PALE},"&:active":{backgroundColor:tE.PURPLE_DARK},"&.Mui-focusVisible":{borderColor:tE.PURPLE_PALE,boxShadow:`0 0 0 3px ${ix(tE.PURPLE_PALE,.5)}`}}}),containedPrimary:{"&:hover":{backgroundColor:tE.GREEN_PALE},"&:active":{backgroundColor:tE.GREEN_DARK},"&.Mui-focusVisible":{borderColor:tE.GREEN_PALE,boxShadow:`0 0 0 3px ${ix(tE.GREEN_PALE,.5)}`}},containedSecondary:{"&:hover":{backgroundColor:tE.BLUE_PALE},"&:active":{backgroundColor:tE.BLUE_DARK},"&.Mui-focusVisible":{borderColor:tE.BLUE_PALE,boxShadow:`0 0 0 3px ${ix(tE.BLUE_PALE,.5)}`}},containedWarning:{"&:hover":{backgroundColor:tE.ORANGE_PALE},"&:active":{backgroundColor:tE.ORANGE_DARK},"&.Mui-focusVisible":{borderColor:tE.ORANGE_PALE,boxShadow:`0 0 0 3px ${ix(tE.ORANGE_PALE,.5)}`}},containedError:{"&:hover":{backgroundColor:tE.RED_PALE},"&:active":{backgroundColor:tE.RED_DARK},"&.Mui-focusVisible":{borderColor:tE.RED_PALE,boxShadow:`0 0 0 3px ${ix(tE.RED_PALE,.5)}`}},sizeSmall:{fontSize:12,height:"24px","& > svg:only-child, & > i:only-child":{marginLeft:"-7px",marginRight:"-7px"}},sizeLarge:{fontSize:16,height:"40px",lineHeight:"20px","& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},textSizeSmall:{padding:"4px 11px"},textSizeLarge:{padding:"10px 19px"},outlinedSizeSmall:{padding:"3px 11px"},outlinedSizeLarge:{padding:"9px 19px"},containedSizeSmall:{padding:"4px 11px"},containedSizeLarge:{padding:"10px 19px"}},variants:[]},MuiCardActionArea:{styleOverrides:{root:{height:"100%","&.MuiCardActionArea-focusHighlight":{opacity:0},"&:hover":{boxShadow:"none",backgroundColor:tE.GREYSCALE_0_03,"&.MuiCardActionArea-focusHighlight":{opacity:0}},"&:active":{backgroundColor:tE.GREYSCALE_95,boxShadow:"none"},"&.Mui-focusVisible":{borderRadius:aE,boxShadow:`inset 0 0 0 2px ${tE.MISC_FOCUS_BORDER}`,"&.MuiCardActionArea-focusHighlight":{opacity:0}}}}},MuiChip:{defaultProps:{deleteIcon:S.createElement(bE,{"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),variant:"outlined"},styleOverrides:{root:{height:"24px",fontSize:rE,borderRadius:aE,color:tE.TEXT_PRIMARY,backgroundColor:tE.GREYSCALE_100_15,"&.sprout-focus-visible":{borderColor:tE.MISC_FOCUS_BORDER,boxShadow:`0px 0px 0px 1px ${tE.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{backgroundColor:tE.GREYSCALE_0_05,color:tE.GREYSCALE_0_30,border:"none",opacity:1},"&.MuiChip-outlinedSuccess":{color:tE.GREEN,borderColor:tE.GREEN},"&.MuiChip-outlinedInfo":{color:tE.BLUE,borderColor:tE.BLUE},"&.MuiChip-outlinedWarning":{color:tE.ORANGE,borderColor:tE.ORANGE},"&.MuiChip-outlinedError":{color:tE.RED,borderColor:tE.RED}},outlined:{border:`solid 1px ${tE.GREYSCALE_0_15}`,backgroundColor:tE.GREYSCALE_100_15,".MuiChip-clickable&:active ":{boxSizing:"border-box",borderRadius:aE,boxShadow:"none",backgroundColor:tE.GREYSCALE_0_10},"&.MuiChip-deleteIconSmall":{height:13,color:"inherit"}},outlinedPrimary:{color:tE.GREEN,borderColor:tE.GREEN},outlinedSecondary:{color:tE.BLUE,borderColor:tE.BLUE},label:{fontFamily:dE.FONT_FAMILY,lineHeight:"16px"}}},MuiAutocomplete:{defaultProps:{clearIcon:S.createElement(bE,{"aria-hidden":"true",viewBox:"0 0 16 16",height:12,width:12}),popupIcon:S.createElement(hE,{"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),forcePopupIcon:!0},styleOverrides:{root:{"& .MuiAutocomplete-endAdornment > button":{border:"none",backgroundColor:"unset"}},input:{"&.MuiAutocomplete-input":{padding:"6px 4px"}},inputRoot:{padding:"0px 2px",boxSizing:"border-box",borderRadius:aE},listbox:{padding:"0","& .MuiAutocomplete-option":{height:"32px",minHeight:"32px"}},option:{borderRadius:aE,fontSize:nE,height:"32px",padding:"6px 16px",minHeight:"32px","&.MuiAutocomplete-option.Mui-focused":{backgroundColor:tE.GREYSCALE_0_03,"&.Mui-focusVisible":{border:`solid 2px ${tE.MISC_FOCUS_BORDER}`,padding:"4px 14px"}},'&.MuiAutocomplete-option[aria-selected="true"]':{backgroundColor:tE.GREYSCALE_0_05,"&.Mui-focused":{backgroundColor:tE.GREYSCALE_0_05},"&.Mui-focusVisible":{backgroundColor:tE.GREYSCALE_0_05}}},popupIndicator:{borderRadius:aE,border:`solid 1px ${tE.GREYSCALE_0_15}`,color:tE.GREYSCALE_0_60,marginRight:0,width:iE,height:iE},paper:{marginTop:"4px",boxShadow:`0px 2px 4px 0px ${tE.GREYSCALE_0_15}`},clearIndicator:{borderRadius:aE,marginRight:"4px"},popupIndicatorOpen:{backgroundColor:tE.GREYSCALE_0_10}}},MuiFormControlLabel:{styleOverrides:{root:{marginLeft:"-10px"},label:{fontSize:nE}}},MuiFormHelperText:{styleOverrides:{root:{fontSize:rE,lineHeight:"16px",margin:"4px 0 0 0","&.Mui-error":{color:tE.RED}},contained:{marginLeft:0,marginRight:0}}},MuiFormLabel:{styleOverrides:{root:{color:tE.GREYSCALE_25,fontSize:rE,fontFamily:dE.FONT_FAMILY,fontWeight:uE,fontStretch:"normal",fontStyle:"normal",letterSpacing:"normal",lineHeight:1,"&.Mui-focused":{color:tE.TEXT_PRIMARY},"&.Mui-error":{color:tE.TEXT_SECONDARY},"&[optional=true]":{"&:after":{color:tE.TEXT_SECONDARY,content:"'(optional)'",fontWeight:lE,marginLeft:"4px"}}},asterisk:{visibility:"collapse",display:"inline-flex","&::after":{visibility:"visible",color:tE.TEXT_SECONDARY,content:"'(required)'",fontWeight:lE,marginLeft:"4px"}}}},MuiOutlinedInput:{defaultProps:{notched:!1},styleOverrides:{root:{fontSize:nE,lineHeight:"16px",backgroundColor:tE.WHITE,borderRadius:aE,"&:not(.Mui-focused):not(.Mui-error):not(.Mui-disabled):hover .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${tE.GREYSCALE_0_05}`,borderColor:tE.GREYSCALE_0_30},"&.Mui-focused:not(.Mui-error) .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${tE.MISC_FOCUS_BORDER}`,boxShadow:`0px 0px 0px 1px ${tE.MISC_FOCUS_BORDER}, inset 0 2px 0 0 ${tE.GREYSCALE_0_05}`},"&.Mui-focused.Mui-error .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${tE.RED}`,boxShadow:`0px 0px 0px 1px ${tE.RED}, inset 0 2px 0 0 ${tE.GREYSCALE_0_05}`},"&.Mui-disabled":{backgroundColor:"transparent"},"&.Mui-disabled .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${tE.GREYSCALE_0_10}`,borderColor:tE.GREYSCALE_0_10,backgroundColor:tE.GREYSCALE_0_05}},adornedStart:{paddingLeft:0},adornedEnd:{paddingRight:0},input:{color:tE.TEXT_PRIMARY,padding:"6px 12px","&.Mui-disabled":{opacity:.45}},inputSizeSmall:{padding:"0px 12px"},notchedOutline:{borderColor:tE.GREYSCALE_0_15,borderRadius:aE,boxShadow:`inset 0 2px 0 0 ${tE.GREYSCALE_0_05}`},multiline:{padding:"0"}}},MuiSelect:{defaultProps:{IconComponent:e=>S.createElement(hE,{...e,"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}}},styleOverrides:{select:{padding:"7px 12px",borderRadius:"3px !important",minHeight:"1em","& em":{color:tE.TEXT_SECONDARY},"& ~svg":{position:"absolute",right:"12px",top:"unset",cursor:"pointer"},"&[aria-expanded=true]":{backgroundColor:tE.GREYSCALE_0_05},"& ~fieldset":{boxShadow:"none !important",border:"none !important",backgroundColor:"unset !important"},"&:hover":{backgroundColor:tE.GREYSCALE_0_03},"&:active":{backgroundColor:tE.GREYSCALE_0_10},"&:focus":{backgroundColor:tE.GREYSCALE_0_03,borderRadius:"3px !important",border:`solid 1px ${tE.MISC_FOCUS_BORDER}`,boxShadow:`inset 0px 0px 0px 1px ${tE.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{opacity:"unset",color:tE.GREYSCALE_0_30,"&:hover":{backgroundColor:tE.GREYSCALE_0_0,borderColor:tE.GREYSCALE_0_15},"& ~svg":{color:tE.GREYSCALE_0_30}}},outlined:{border:`solid 1px ${tE.GREYSCALE_0_15}`},nativeInput:{height:"42px"}}},MuiIconButton:{styleOverrides:{root:{borderRadius:aE}}},MuiInput:{styleOverrides:{root:{"&.Mui-focused":{borderColor:tE.MISC_FOCUS_BORDER,boxShadow:`0 0 0 2px ${tE.MISC_FOCUS_BORDER}`}}}},MuiInputAdornment:{styleOverrides:{root:{padding:"4px 8px",color:tE.GREYSCALE_55},positionStart:{marginRight:0},positionEnd:{marginLeft:0}}},MuiInputBase:{styleOverrides:{root:{fieldset:{boxShadow:"none"}},input:{height:"20px",fontSize:nE,padding:"8px 12px",lineHeight:"16px","&.MuiInputBase-inputAdornedStart":{paddingLeft:0},"&.MuiInputBase-inputAdornedEnd":{paddingRight:0}},sizeSmall:{height:"24px",input:{fontSize:rE,paddingLeft:"8px"}}}},MuiInputLabel:{defaultProps:{shrink:!0},styleOverrides:{outlined:{fontSize:rE,fontWeight:uE,color:tE.GREYSCALE_25,"&.MuiInputLabel-shrink":{transform:"translate(0px, -16px)",fontWeight:uE}}}},MuiPopover:{styleOverrides:{paper:{minWidth:"160px",top:"60px",marginTop:"5px","&ul":{padding:"0px"},boxShadow:`0px 4px 10px ${tE.GREYSCALE_0_15}, 0px 0px 0px 1px ${tE.GREYSCALE_0_05}`}}},MuiRadio:{defaultProps:{size:"small",icon:S.createElement(SE,null),checkedIcon:S.createElement(EE,null)},styleOverrides:{root:{"&:hover":{backgroundColor:"unset"},fill:tE.GREYSCALE_100_60,stroke:"black","&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:"50%",boxShadow:`0 0 0 2px ${tE.MISC_FOCUS_BORDER}`},"&.Mui-checked":{"&.MuiRadio-colorPrimary":{"&.sprout-focus-visible i":{borderColor:tE.GREEN_PALE,boxShadow:`0 0 0 3px ${ix(tE.GREEN_PALE,.5)}`}},"&.MuiRadio-colorSecondary":{"&.sprout-focus-visible i":{borderColor:tE.BLUE_PALE,boxShadow:`0 0 0 3px ${ix(tE.BLUE_PALE,.5)}`}},"&.Mui-disabled":{color:tE.GREYSCALE_0_20}},"&.Mui-disabled":{fill:tE.GREYSCALE_0_20,stroke:"none"}}}},MuiCheckbox:{defaultProps:{size:"small",icon:S.createElement(KC,null),checkedIcon:S.createElement(yE,null),indeterminateIcon:S.createElement(xE,null)},styleOverrides:{root:{borderWidth:1,"&:hover":{backgroundColor:"unset"},"&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:aE,boxShadow:" 0px 0px 0px 2px #FFFFFF, 0px 0px 0px 4px #177FE6"},"&:not(.Mui-disabled)":{"&:not(.Mui-checked)":{"&:not(.MuiCheckbox-indeterminate)":{color:tE.GREYSCALE_100_60,"&:hover":{g:{rect:{stroke:tE.GREYSCALE_0_55,color:tE.GREYSCALE_0_03}}},"&.sprout-focus-visible i":{boxShadow:"0px 0px 0px 2px #0275D9",g:{rect:{stroke:"none"}}}}}},"&.Mui-disabled":{"& i":{pointerEvents:"auto",cursor:"not-allowed !important",color:tE.GREYSCALE_0_15,g:{rect:{stroke:"none"}}}}},colorPrimary:{"&.MuiCheckbox-root":{"&:not(.Mui-disabled)":{"&:hover":{color:tE.GREEN_DARK}}}},colorSecondary:{"&.MuiCheckbox-root":{"&:not(.Mui-disabled)":{color:tE.GREYSCALE_0_55,"&:hover":{color:tE.GREYSCALE_25}}}}}},MuiCircularProgress:{defaultProps:{thickness:3,disableShrink:!0}},MuiDialog:{defaultProps:{fullWidth:!0}},MuiDialogActions:{styleOverrides:{root:{padding:"16px"}}},MuiDialogTitle:{styleOverrides:{root:{display:"flex",alignItems:"center",justifyContent:"space-between",boxSizing:"content-box",minHeight:"31px",padding:"16px 16px 16px 24px",fontSize:"16px",lineHeight:"24px"}}},MuiDialogContentText:{defaultProps:{variant:"body2"},styleOverrides:{root:{marginBottom:0}}},MuiDialogContent:{styleOverrides:{root:{padding:"16px 24px !important"}}},MuiDivider:{styleOverrides:{middle:{margin:"4px 8px"}}},MuiLink:{defaultProps:{underline:"none",color:tE.MISC_FOCUS_BORDER}},MuiListItemIcon:{styleOverrides:{root:{color:tE.GREYSCALE_25,minWidth:"16px",marginRight:"16px"}}},MuiListItemText:{styleOverrides:{root:{fontSize:"12px"},primary:{fontSize:nE,color:tE.TEXT_PRIMARY,lineHeight:"16px",fontWeight:uE},secondary:{fontSize:rE,color:tE.GREYSCALE_45,fontWeight:lE,lineHeight:"16px"}}},MuiListItem:{styleOverrides:{root:{fontSize:nE,minHeight:"32px"},gutters:{paddingLeft:"12px",paddingRight:"12px"},button:{"&:hover":{backgroundColor:tE.GREYSCALE_0_03},"&:active":{backgroundColor:tE.GREYSCALE_0_05}}}},MuiListItemButton:{styleOverrides:{root:{fontSize:nE,height:"32px"}}},MuiListSubheader:{styleOverrides:{root:{'&[role="option"]':{color:tE.TEXT_PRIMARY,lineHeight:1.33,padding:"4px 12px",fontWeight:600,fontSize:rE,borderBottom:`solid 1px ${tE.GREYSCALE_0_15}`,pointerEvents:"none"}}}},MuiList:{styleOverrides:{padding:{paddingTop:"0px",paddingBottom:"0px"}}},MuiMenuItem:{styleOverrides:{root:{fontSize:nE,color:tE.GREYSCALE_25,height:"32px",'[class*="MuiListItemIcon-root"]':{minWidth:"16px"},"&:hover":{backgroundColor:tE.GREYSCALE_0_03},"&.Mui-selected":{backgroundColor:"unset","&:hover":{backgroundColor:tE.GREYSCALE_0_10},"&.Mui-focusVisible":{backgroundColor:tE.GREYSCALE_0_10},"&:not(.Mui-disabled)":{"&::after":{content:"url('data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20width%3D%228px%22%20height%3D%227px%22%20viewBox%3D%220%200%208%207%22%20version%3D%221.1%22%20%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20aria-labelledby%3D%22Tick%22%3E%20%20%3Cg%20stroke%3D%22none%22%20stroke-width%3D%221%22%20fill-rule%3D%22evenodd%22%3E%20%20%20%20%3Cg%20transform%3D%22translate%280.000000%2C%20-1.000000%29%22%3E%20%20%20%20%20%20%3Cpath%20d%3D%22M7.51662484%2C1.29325%20C7.12545778%2C0.90225%206.49218732%2C0.90225%206.10202068%2C1.29325%20L2.73658335%2C4.65725%20L1.90722914%2C3.82925%20C1.5170625%2C3.43825%200.883792042%2C3.43825%200.492624979%2C3.82925%20C0.102458344%2C4.21925%200.102458344%2C4.85225%200.492624979%2C5.24325%20L2.02928127%2C6.77825%20C2.4194479%2C7.16925%203.05271836%2C7.16925%203.44388542%2C6.77825%20L7.51662484%2C2.70725%20C7.9077919%2C2.31725%207.9077919%2C1.68425%207.51662484%2C1.29325%22%3E%3C%2Fpath%3E%20%20%20%20%3C%2Fg%3E%20%20%3C%2Fg%3E%3C%2Fsvg%3E')",fontFamily:"LUI icons",position:"absolute",fontSize:"10px",right:"10px",color:tE.RED}}},"&.Mui-focusVisible":{backgroundColor:tE.GREYSCALE_0_03}},divider:{marginTop:"8px",marginBottom:"8px"},gutters:{paddingLeft:"12px",paddingRight:"12px"}}},MuiMenu:{styleOverrides:{list:{paddingTop:"4px",paddingBottom:"4px"},paper:{marginTop:"4px !important",marginBottom:"4px",background:tE.WHITE,boxShadow:"0 0 0 1px rgba(0,0,0,0.05), 0 4px 10px 0 rgba(0,0,0,0.15) !important",borderRadius:"2px !important"}}},MuiSlider:{styleOverrides:{root:{color:tE.GREEN,height:"24px","&.Mui-disabled":{color:tE.GREYSCALE_0_15}},rail:{backgroundColor:tE.GREYSCALE_0_05,height:"4px",opacity:"1",border:`solid 1px ${tE.GREYSCALE_0_05}`,borderRadius:aE,boxShadow:`inset 0px 0px 0px 1px ${tE.GREYSCALE_0_05}`},track:{height:"4px",backgroundColor:"currentColor",opacity:"1",border:`solid 1px ${tE.GREYSCALE_0_05}`,borderRadius:aE},thumb:{height:"16px",width:"16px",borderRadius:aE,backgroundColor:tE.WHITE,boxShadow:`0px 1px 2px 0px ${tE.GREYSCALE_0_15}, 0px 0px 0px 1px ${tE.GREYSCALE_0_05}`,"&:hover":{borderRadius:aE,boxShadow:`0 2px 4px 0 ${tE.GREYSCALE_0_30}, 0 0 0 1px ${tE.GREYSCALE_0_06}`},"&:focus":{boxShadow:`0 1px 2px 0 ${tE.GREYSCALE_0_15}, 0 0 0 1px ${tE.GREYSCALE_0_06}, 0 0 0 2px ${tE.MISC_FOCUS_BORDER}`},"&.Mui-focusVisible":{boxShadow:`0 1px 2px 0 ${tE.GREYSCALE_0_15}, 0 0 0 1px ${tE.GREYSCALE_0_06}, 0 0 0 2px ${tE.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{width:"16px",height:"16px",marginTop:"-5px",marginLeft:"-8px",backgroundColor:tE.GREYSCALE_90},"& .custom-bar":{height:"8px",width:"1px",backgroundColor:tE.GREYSCALE_0_30,marginLeft:1,marginRight:1}},mark:{width:"1px",height:"4px",margin:"16px 0px 0px 0px",backgroundColor:tE.GREYSCALE_0_15},markActive:{opacity:1,backgroundColor:tE.GREYSCALE_0_15},markLabel:{color:tE.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"},markLabelActive:{color:tE.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"}}},MuiSnackbar:{defaultProps:{anchorOrigin:{vertical:"bottom",horizontal:"center"}}},MuiSnackbarContent:{styleOverrides:{root:{backgroundColor:tE.WHITE,color:tE.GREYSCALE_25}}},MuiSwitch:{defaultProps:{color:"primary",size:"small"},styleOverrides:{root:{padding:"10px",width:"60px",height:"40px","& .MuiSwitch-switchBase":{"&:hover":{backgroundColor:"unset"},"&.Mui-checked":{"&:hover":{backgroundColor:"unset"}}}},switchBase:{padding:"12px","&.Mui-disabled":{"&.MuiSwitch-thumb":{backgroundColor:tE.GREYSCALE_100_50}},"&.Mui-checked + .MuiSwitch-track":{opacity:1},"&.Mui-disabled + .MuiSwitch-track":{opacity:.12},"&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"}},colorPrimary:{"&.sprout-focus-visible + .MuiSwitch-track":{borderColor:tE.GREEN_PALE,boxShadow:`0 0 0 3px ${ix(tE.GREEN_PALE,.5)}`}},colorSecondary:{"&.sprout-focus-visible + .MuiSwitch-track":{borderColor:tE.BLUE_PALE,boxShadow:`0 0 0 3px ${ix(tE.BLUE_PALE,.5)}`}},track:{opacity:1,backgroundColor:tE.GREYSCALE_0_15,borderRadius:aE},thumb:{height:"16px",width:"16px",borderRadius:aE,backgroundColor:tE.GREYSCALE_100},sizeSmall:{height:"32px",width:"52px",padding:"8px 10px","& .MuiSwitch-thumb":{height:"12px",width:"12px"},"& .MuiSwitch-switchBase":{padding:"10px 12px"}}}},MuiTextField:{defaultProps:{margin:"dense",variant:"outlined"},styleOverrides:{root:{marginBottom:0}}},MuiTab:{styleOverrides:{root:{fontSize:nE,fontWeight:uE,textTransform:"none",minWidth:"auto",boxSizing:"border-box",paddingBottom:"12px","&:hover":{borderBottom:`2px solid ${tE.GREYSCALE_80}`,paddingBottom:"10px"},"&.sprout-focus-visible":{boxShadow:`inset 0 0 0 2px ${tE.MISC_FOCUS_BORDER}`,backgroundColor:tE.GREYSCALE_0_03,borderRadius:aE},"&.Mui-disabled":{opacity:.3}},textColorPrimary:{color:tE.GREYSCALE_25,"&.Mui-selected":{color:tE.GREYSCALE_25}},textColorInherit:{opacity:"unset"},labelIcon:{minWidth:"40px",minHeight:"48px"}}},MuiTabs:{defaultProps:{indicatorColor:"primary",textColor:"primary"},styleOverrides:{root:{fontSize:nE,fontWeight:"bold"},scroller:{height:"100%"},flexContainer:{height:"100%",marginLeft:2,marginRight:2},indicator:{height:2},scrollableY:{marginBlock:"4px"},scrollButtons:{borderRadius:aE,"&:hover":{backgroundColor:`${tE.GREYSCALE_0_03}`},"&.Mui-disabled":{opacity:"unset","& .MuiSvgIcon-root":{opacity:.3}}},vertical:{"& .MuiTabs-indicator":{left:0,right:"unset",transition:"none",clipPath:"inset(12px 0 12px 0)",marginLeft:"3px"},"& .MuiTabs-scrollButtons":{marginBlock:"-1px",borderTop:`1px solid ${tE.GREYSCALE_0_15}`,borderBottom:`1px solid ${tE.GREYSCALE_0_15}`},"& .MuiTab-root":{fontWeight:"normal",borderRadius:aE,marginBlock:"4px","&.Mui-selected":{backgroundColor:tE.GREYSCALE_0_05},"&:hover":{backgroundColor:`${tE.GREYSCALE_0_03}`,borderBottomColor:"transparent"}}}}},MuiTableCell:{styleOverrides:{root:{padding:"0px 8px 0px 16px",borderBottom:`1px solid ${tE.GREYSCALE_85}`,borderRight:`1px solid ${tE.GREYSCALE_85}`,height:"39px"},head:{height:"41px",fontWeight:uE,backgroundColor:tE.GREYSCALE_98},paddingCheckbox:{width:"40px",padding:"0px"},paddingNone:{padding:"0px"},sizeSmall:{padding:"0px 8px",height:"29px","&.MuiTableCell-head":{height:"31px"},"&.MuiTableCell-paddingCheckbox":{width:"40px",padding:"0px"}},stickyHeader:{backgroundColor:tE.GREYSCALE_98,borderBottom:`1px solid ${tE.GREYSCALE_85}`}}},MuiTableContainer:{styleOverrides:{root:{borderBottom:`1px solid ${tE.GREYSCALE_85}`,borderTop:`1px solid ${tE.GREYSCALE_85}`}}},MuiTableHead:{styleOverrides:{root:{backgroundColor:tE.GREYSCALE_98}}},MuiTableRow:{styleOverrides:{root:{"&.Mui-selected":{backgroundColor:tE.GREYSCALE_0_05,"&:hover":{backgroundColor:tE.GREYSCALE_0_03}},"&&:hover":{backgroundColor:tE.GREYSCALE_0_03}}}},MuiTableSortLabel:{defaultProps:{IconComponent:({className:e})=>S.createElement(CE,{className:e})},styleOverrides:{root:{display:"flex",justifyContent:"space-between","&:hover":{"& icon":{opacity:.5}},"&.Mui-active":{"&& icon":{opacity:1}}},icon:{opacity:0},iconDirectionDesc:{transform:"rotate(180deg)"},iconDirectionAsc:{transform:"rotate(0deg)"}}},MuiTable:{styleOverrides:{root:{borderLeft:`1px solid ${tE.GREYSCALE_85}`}}},MuiToggleButton:{styleOverrides:{root:{height:32,lineHeight:"16px",width:32,fontSize:nE,borderRadius:aE,padding:"7px 16px",border:`1px solid ${tE.GREYSCALE_0_15}`,backgroundColor:tE.GREYSCALE_100_60,color:tE.GREYSCALE_25,zIndex:1,"&:active":{backgroundColor:tE.GREYSCALE_0_10,border:`1px solid ${tE.GREYSCALE_0_30}`},"&:hover":{backgroundColor:tE.GREYSCALE_0_03,border:`1px solid ${tE.GREYSCALE_0_30}`},"&.sprout-focus-visible":{backgroundColor:tE.GREYSCALE_0_03,boxShadow:`0 0 0 1px ${tE.MISC_FOCUS_BORDER}`,border:`1px solid ${tE.MISC_FOCUS_BORDER}`,zIndex:2},"&.Mui-selected":{color:tE.GREYSCALE_25,backgroundColor:tE.GREYSCALE_0_10,zIndex:2,"&:hover":{backgroundColor:tE.GREYSCALE_0_10,border:`1px solid ${tE.GREYSCALE_0_15}`}}},sizeSmall:{fontSize:rE,height:24,width:24,padding:7},sizeLarge:{fontSize:oE,height:40,width:40,lineHeight:"20px"}}},MuiToggleButtonGroup:{styleOverrides:{root:{height:"32px",lineHeight:"16px",fontSize:nE,borderRadius:aE}}},MuiToolbar:{defaultProps:{disableGutters:!0},styleOverrides:{root:{display:"flex",flex:1,padding:"0 16px"},dense:{minHeight:"46px",padding:"0 8px"}}},MuiTooltip:{defaultProps:{arrow:!0},styleOverrides:{arrow:{color:tE.GREYSCALE_20},tooltip:{backgroundColor:tE.GREYSCALE_20,fontSize:rE,lineHeight:"16px"},popper:{whiteSpace:"pre-line"}}}};var JC=e=>XC;const ZC={mode:"light",primary:{ultraLight:tE.GREEN_ULTRA_LIGHT,light:tE.GREEN_PALE,main:tE.GREEN,dark:tE.GREEN_DARK,extraDark:tE.GREEN_EXTRA_DARK,contrastText:tE.WHITE},secondary:{ultraLight:tE.BLUE_ULTRA_LIGHT,light:tE.BLUE_PALE,main:tE.BLUE,dark:tE.BLUE_DARK,extraDark:tE.BLUE_EXTRA_DARK,contrastText:tE.WHITE},error:{ultraLight:tE.RED_ULTRA_LIGHT,light:tE.RED_PALE,main:tE.RED,dark:tE.RED_DARK,extraDark:tE.RED_EXTRA_DARK,contrastText:tE.WHITE},warning:{ultraLight:tE.ORANGE_ULTRA_LIGHT,light:tE.ORANGE_PALE,main:tE.ORANGE,dark:tE.ORANGE_DARK,extraDark:tE.ORANGE_EXTRA_DARK,contrastText:tE.WHITE},success:{ultraLight:tE.GREEN_ULTRA_LIGHT,light:tE.GREEN_PALE,main:tE.GREEN,dark:tE.GREEN_DARK,extraDark:tE.GREEN_EXTRA_DARK,contrastText:tE.WHITE},info:{ultraLight:tE.BLUE_ULTRA_LIGHT,light:tE.BLUE_PALE,main:tE.BLUE,dark:tE.BLUE_DARK,extraDark:tE.BLUE_EXTRA_DARK,contrastText:tE.WHITE},text:{primary:tE.TEXT_PRIMARY,secondary:tE.TEXT_SECONDARY,disabled:tE.GREYSCALE_0_30},action:{hover:tE.GREYSCALE_0_03,hoverOpacity:.03,selected:tE.GREYSCALE_0_05,selectedOpacity:.05,focus:tE.MISC_FOCUS_BORDER},amethyst:{ultraLight:tE.WHITE,main:tE.PURPLE,light:tE.PURPLE_PALE,dark:tE.PURPLE_DARK,extraDark:tE.GREYSCALE_0_0,contrastText:tE.WHITE},background:{paper:tE.WHITE,default:tE.GREYSCALE_95},divider:tE.GREYSCALE_0_15},QC=e=>({components:JC(),palette:ZC,breakpoints:{keys:["xs","sm","md","lg","xl"],values:{xs:0,sm:600,md:960,lg:1280,xl:1920}},spacing:8,shadows:["none","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)"],transitions:{easing:{easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},duration:{standard:300,short:250,enteringScreen:225,shorter:200,leavingScreen:195,shortest:150,complex:375}},typography:{fontSize:nE,fontWeightLight:sE,fontWeightRegular:lE,fontWeightMedium:uE,fontWeightBold:cE,htmlFontSize:nE,fontFamily:dE.FONT_FAMILY,button:{fontWeight:uE,fontSize:nE,textTransform:"none"},body1:{fontSize:oE,lineHeight:"24px"},body2:{fontSize:nE,lineHeight:"20px"},h1:{fontSize:32,lineHeight:"32px"},h2:{fontSize:28,lineHeight:"32px"},h3:{fontSize:iE,lineHeight:"24px"},h4:{fontSize:20,lineHeight:"24px"},h5:{fontSize:oE,fontWeight:uE,lineHeight:"16px"},h6:{fontSize:nE,fontWeight:uE,lineHeight:"16px"},caption:{color:tE.TEXT_SECONDARY},subtitle1:{fontSize:nE,color:tE.TEXT_SECONDARY},subtitle2:{fontSize:rE,color:tE.TEXT_SECONDARY}},shape:{borderRadius:aE}}),ew={...eE,MISC_FOCUS_BORDER:tE.MISC_FOCUS_BORDER},tw=(e="light")=>QC(),rw=tw().palette,nw={SELECTED:{color:ew.GREYSCALE_100,background:rw.primary.light,selectedCellClass:GS.SELECTED},POSSIBLE:{color:rw.text.primary,background:ew.GREYSCALE_100},EXCLUDED_BACKGROUND:"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)"},ow=4/3,iw="12px",aw="600",sw={height:"auto",fontSize:iw,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"}},lw=25e4,uw=(e,t,r)=>{if(null==e||!e.length)return[];const n=[],o=[];let i=t;if(e.forEach(((e,a)=>{var s;if(e.columnWidth){const{columnWidth:{type:l,pixels:u,percentage:c},label:d,qApprMaxGlyphCount:p,totalInfo:f}=e;let m=0;const h=()=>{n[a]=Math.min(dh.PixelsMax,Math.max(dh.PixelsMin,m)),i-=n[a]};switch(l){case ph.Pixels:m=u||dh.PixelsDefault,h();break;case ph.Percentage:m=(c||dh.PercentageDefault)/100*t,h();break;case ph.FitToContent:(null===(s=e.representation)||void 0===s?void 0:s.type)===xv.Image?o.push(a):(m=r(d,f,p,e.isLocked,e.isActivelySorted),h());break;case ph.Auto:o.push(a);break;default:throw new Error(`${l} is not a valid column width type`)}}else o.push(a)})),o.length){const e=i/o.length;o.forEach((t=>{n[t]=Math.max(dh.AutoMinTable,e)}))}return n},cw=e=>e.ctrlKey||e.metaKey,dw=e=>e.shiftKey&&cw(e),pw=e=>[US.LEFT,US.RIGHT,US.UP,US.DOWN].includes(e),fw=e=>e.shiftKey&&pw(e.key),mw=(e,t)=>{const{colIdx:r,rows:n,api:o}=t;let i=GS.INACTIVE;return null!=o&&o.isModal()&&(i=r!==e.selectionColIdx?GS.EXCLUDED:void 0!==n[e.qElemNumber]?GS.SELECTED:GS.POSSIBLE),i},hw=(e,t,r)=>{const n=Object.keys(r).length,o=n>=Object.keys(t).length;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"]})},gw=(e,t)=>{const{api:r,rows:n,colIdx:o}=e,{cell:i,announce:a,evt:s}=t;let l={};if(-1===o)null==r||r.begin(["/qHyperCubeDef"]);else{if(o!==i.selectionColIdx)return e;l={...n}}return l=((e,t,r)=>{const{qElemNumber:n,rowIdx:o}=t;return r.ctrlKey||r.metaKey?{[n]:o}:(void 0!==e[n]?delete e[n]:e[n]=o,{...e})})(l,i,s),hw(a,n,l),Object.keys(l).length?(null==r||r.select({method:"selectHyperCubeCells",params:["/qHyperCubeDef",Object.values(l),[i.selectionColIdx]]}),{...e,rows:l,colIdx:i.selectionColIdx}):(null==r||r.cancel(),{...e,rows:l,colIdx:-1})},bw=(e,t)=>{var r;const{api:n,rows:o,colIdx:i,pageRows:a,firstCell:s}=e,{cell:l,announce:u,evt:c}=t;let d={};return s||"key"in c&&fw(c)?(-1===i?null==n||n.begin(["/qHyperCubeDef"]):d={...o},d=((e,t,r,n,o)=>{const i={...t};if("key"in n&&fw(n)){i[r.qElemNumber]=r.rowIdx;const t=n.key===US.DOWN?1:-1;return i[e[r.pageRowIdx+t][r.pageColIdx].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];i[r.qElemNumber]=r.rowIdx}return i})(a,d,l,c,s),hw(u,o,d),{...e,rows:d,colIdx:null!==(r=null==s?void 0:s.selectionColIdx)&&void 0!==r?r:l.selectionColIdx,isSelectMultiValues:!0}):e},vw=e=>{const{api:t,rows:r,colIdx:n,isSelectMultiValues:o,mouseupOutsideCallback:i}=e;return i&&document.removeEventListener("mouseup",i),o&&(null==t||t.select({method:"selectHyperCubeCells",params:["/qHyperCubeDef",Object.values(r),[n]]})),{...e,isSelectMultiValues:!1,firstCell:void 0,mouseupOutsideCallback:void 0}},yw=(e,t)=>{var r;switch(t.type){case VS.SELECT:return gw(e,t.payload);case VS.SELECT_MOUSE_DOWN: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 VS.SELECT_MOUSE_UP:return((e,t)=>vw(e.isSelectMultiValues||e.firstCell!==t.cell?e:gw(e,t)))(e,t.payload);case VS.SELECT_MULTI_ADD:return bw(e,t.payload);case VS.SELECT_MULTI_END:return vw(e);case VS.RESET:return null!==(r=e.api)&&void 0!==r&&r.isModal()?e:{...e,rows:{},colIdx:-1};case VS.CLEAR:return Object.keys(e.rows).length?{...e,rows:{}}:e;case VS.UPDATE_PAGE_ROWS:return{...e,pageRows:t.payload.pageRows};default:throw new Error("reducer called with invalid action type")}},xw=4/3,Sw={hover:{darker:.15,brighter:.3,opacity:.03},active:{darker:.3,brighter:.5,opacity:.05}},Ew=e=>parseInt(e,10)*xw+8+1,Cw=e=>!!e&&(null!==e.color||e.index>-1);function ww(e,t,r={}){const n=t.getColorPickerColor(r);return n&&"none"!==n?n:e}const Rw=e=>Rf(e)?Cp.WHITE:Cp.TEXT,Aw=(e,t)=>e?{borderBottomColor:Cp.DARK_MODE_BORDER,borderRightColor:Cp.DARK_MODE_BORDER,borderLeftColor:Cp.DARK_MODE_BORDER,borderTopColor:Cp.DARK_MODE_BORDER}:{borderLeftColor:Cp.BORDER_MEDIUM,borderRightColor:Cp.BORDER_MEDIUM,borderTopColor:Cp.BORDER_HEAVY,borderBottomColor:t?Cp.BORDER_HEAVY:Cp.BORDER_LIGHT},Iw=e=>{var t;return null===(t=e.components)||void 0===t?void 0:t.find((e=>"theme"===e.key))},Lw=(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:Cw(null==r?void 0:r.fontColor)?ww(Cp.TEXT,t,null==r?void 0:r.fontColor):i||Cp.TEXT,fontSize:(null==r?void 0:r.fontSize)&&`${r.fontSize}px`||a,padding:r&&"padding"in r?null==r?void 0:r.padding:void 0,...Aw(t.background.isDark,n)};return Object.keys(s).forEach((e=>{const t=e;null==s[t]&&delete s[t]})),s};function Dw(e,t,r){var n,o,i;const a=null===(n=Iw(e))||void 0===n?void 0:n.header,s=Lw("header",t,a,r);return s.background=Pf(t.background.headerColor),s.hoverBackground=wf(null!==(o=s.background)&&void 0!==o?o:Cp.WHITE,Sw.hover),s.activeBackground=wf(null!==(i=s.background)&&void 0!==i?i:Cp.WHITE,Sw.active),s}function Pw(e,t,r,n){var o;const i=null===(o=Iw(e))||void 0===o?void 0:o.content,a=Lw("content",t,i);a.background=t.background.color;const s=((e,t,r)=>{if(e&&t&&r)return Ew(e)*(t+2)<r.clientHeight-40?"1px":"0px";return"0px"})(null==a?void 0:a.fontSize,r,n),l=null==i?void 0:i.hoverColor,u=null==i?void 0:i.hoverFontColor,c=t.getStyle("object","","straightTableV2.content.hover.backgroundColor"),d=t.getStyle("object","","straightTableV2.content.hover.color"),p=Cw(u)||!!d,f=Cw(l)||!!c,m=p||f;let h;h=Cw(l)?ww(Cp.HOVER,t,l):c||(p?"":Cp.HOVER);const g=m?ww(Rw(h),t,Cw(u)?u:d):"";return{...a,lastRowBottomBorder:s,hoverColors:{background:h,color:g}}}function Mw(e,t,r){var n;const o={};return null==t||null===(n=t.qValues)||void 0===n||n.forEach(((e,t)=>{const n=e.qText&&Df(e.qText);n&&"none"!==n&&(o[r[t]]=n)})),o.cellBackgroundColor&&!o.cellForegroundColor&&(o.cellForegroundColor=Rw(o.cellBackgroundColor)),{...e,...o,color:o.cellForegroundColor||e.color,background:o.cellBackgroundColor||e.background}}const _w=(e,t,r,n)=>{const o=C((()=>{const o=r.totalsPosition.atTop,i=Pw(e,t,r.rows.length,n),a=Dw(e,t,!o),s=function(e,t,r){var n;const o=null===(n=Iw(e))||void 0===n?void 0:n.content,i=Lw("content",t,o),{borderBottomColor:a,borderTopColor:s,background:l}=Dw(e,t,r);return{...i,borderBottomColor:a,background:l,borderTopColor:s}}(e,t,o);return{body:i,head:a,totals:s}}),[e,t,r,n]);return o},Tw=new Map;const kw=M({}),Ow=function(e){const t=M([()=>{},new Set]);return Tw.set(e,t),({children:r,value:n})=>{const o=_(n),i=_(new Set);w((()=>{o.current=n,i.current.forEach((e=>{e(n)}))}),[n]);const a=T((()=>o.current),[o]),s=C((()=>[a,i.current]),[a]);return Qi.jsx(e.Provider,{value:n,children:Qi.jsx(t.Provider,{value:s,children:r})})}}(kw),qw={rows:[],columns:[],totalsPosition:{}},Nw=({app:e,children:t,tableData:r=qw,selectionsAPI:n,cellCoordMock:o,layout:i,model:a,translator:s,interactions:l,theme:u,keyboard:c,rootElement:d,embed:p,changeSortOrder:f,applyColumnWidths:m,setPage:h,pageInfo:g,initialDataPages:b,rect:v,viewService:y,env:x})=>{const[S,w]=E(0),[R,A]=E(o||QS),[I,L]=((e,t)=>{const[r,n]=P(yw,{pageRows:e,rows:{},colIdx:-1,api:t,isSelectMultiValues:!1});return[r,n]})(r.rows,n),[D,M]=E(-1),_=_w(i,u,r,d),[T,k,O,q]=((e,t,r,{head:n,body:o})=>{const i=t.atBottom||t.atTop,a=Jm({...n,fontWeight:aw},{maxNbrLinesOfText:3}).measureText,s=Jm({...o,fontWeight:aw},{maxNbrLinesOfText:3}).measureText,{estimateWidth:l}=Jm(n,{maxNbrLinesOfText:3}),u=C((()=>(e,t,r,n,o)=>{let u=25;return u+=28,n&&(u+=24),o&&(u+=20),Math.max(a(e)+u,i?s(t)+24+1:0,l(r))}),[l,a,s,i]),[c,d]=E(0),[p,f]=E((()=>uw(e,r,u)));eh((()=>{f(uw(e,r-c,u))}),[e,r,c,u]);const m=C((()=>((e,t,r)=>!!(e&&e.length>0)&&e.reduce(((e,t)=>e+t))+t<r)(p,c,r)),[p,c,r]);return[p,f,d,m]})(r.columns,r.totalsPosition,v.width,_),N=C((()=>({app:e,selectionsAPI:n,layout:i,model:a,translator:s,interactions:l,theme:u,keyboard:c,rootElement:d,embed:p,changeSortOrder:f,applyColumnWidths:m,styling:_,rect:v,viewService:y})),[e,n,i,a,s,l,u,c.active,d,p,f,m,_,v,y]);return Qi.jsx(Ow,{value:{headRowHeight:S,setHeadRowHeight:w,focusedCellCoord:R,setFocusedCellCoord:A,selectionState:I,selectionDispatch:L,hoverIndex:D,setHoverIndex:M,columnWidths:T,setColumnWidths:k,baseProps:N,tableData:r,setYScrollbarWidth:O,setPage:h,pageInfo:g,initialDataPages:b,showRightBorder:q,env:x},children:t})};function Fw(e,t){const r=function(e){return Tw.get(e)}(e),[n,o]=R(r),[,i]=P((e=>e+1),0),a=_(t),s=_(),l=n();if(void 0===l)throw new Error("You must call useContextSelector inside a valid context.");const u=C((()=>t(l)),[l,t]);return w((()=>{a.current=t,s.current=u}),[l,u,t]),w((()=>{const e=e=>{(a.current&&a.current(e))!==s.current&&i()};return o.add(e),()=>{o.delete(e)}}),[o]),u}function zw(e){var t;const r=tw();return null!=r&&null!==(t=r.components)&&void 0!==t&&null!==(t=t.MuiTable)&&void 0!==t&&t.styleOverrides&&(r.components.MuiTable.styleOverrides.root={}),lS({...r,direction:e})}const jw=Is(Xu,{shouldForwardProp:e=>"isLastColumn"!==e&&"hoverColor"!==e})((({isLastColumn:e,hoverColor:t})=>({pointerEvents:"auto",touchAction:"none",display:"flex",position:"absolute",height:"100%",top:0,cursor:"col-resize",width:(e?4:9)+"px",justifyContent:e?"flex-end":"center",marginLeft:"-4px","&:hover:not(:focus, :active)":{[`& .${ch}`]:{background:t||"#D9D9D9","@media (hover: none)":{background:"none"}}},"&:focus-visible, &:active":{outline:"none",[`& .${ch}`]:{background:"#177fe6",borderLeft:"1px solid #fff",borderRight:e?void 0:"1px solid #fff"}}}))),$w=Is(Xu)({position:"absolute",height:"100%",width:"3px"}),Bw=({columnWidth:e,keyValue:t,isLastColumn:r,isPivot:n,hoverColor:o,updateWidthCallback:i,confirmWidthCallback:a,handleBlur:s,setIsAdjustingWidth:l,isLeftColumn:u})=>{const c=_({initWidth:e,columnWidth:e,initX:0}),d=r?0:1,p=n&&!u,f={left:p?c.current.columnWidth-d:"100%"},m=t=>{c.current={initWidth:e,columnWidth:e,initX:null!=t?t:c.current.initX}};eh((()=>p&&m()),[e]);const h=e=>{const t=Math.max(e,dh.PixelsMin);c.current.columnWidth=t,i(t)},g=()=>{if(c.current.columnWidth!==c.current.initWidth){const e={type:ph.Pixels,pixels:c.current.columnWidth};a(e)}else null==l||l(!1)},b=e=>{const t=c.current.initWidth+e.clientX-c.current.initX;h(t)},v=e=>{_f(e),document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",v),g()},y=e=>{const t=c.current.initWidth+e.touches[0].clientX-c.current.initX;h(t)},x=e=>{_f(e),document.removeEventListener("touchmove",y),document.removeEventListener("touchend",x),g()},E=!n&&s?e=>{if(e.key===lh.LEFT||e.key===lh.RIGHT){_f(e);const t=5,r=e.key===lh.LEFT?-t:t;h(c.current.columnWidth+r)}else e.key===lh.SPACE||e.key===lh.ENTER?(_f(e),s(e),g()):e.key===lh.ESC&&(_f(e),s(e),h(c.current.initWidth))}:void 0;return S.createElement(jw,{className:uh,isLastColumn:r,hoverColor:o,style:f,key:t,onMouseDown:e=>{e.stopPropagation(),document.addEventListener("mousemove",b),document.addEventListener("mouseup",v),null==l||l(!0),m(e.clientX)},onDoubleClick:()=>a({type:ph.FitToContent}),onTouchStart:e=>{1===e.touches.length&&(e.stopPropagation(),document.addEventListener("touchmove",y),document.addEventListener("touchend",x),null==l||l(!0),m(e.touches[0].clientX))},onKeyDown:E,onBlur:s,onFocus:()=>m(),"data-testid":uh},S.createElement($w,{className:ch}))};function Hw(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const Ww=(e,t)=>S.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Hw(e,t,r[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),S.createElement("path",{d:"M15 4H1V2h14zm0 10H1v-2h14zm0-5H1V7h14z"})),Gw=k(Ww);function Vw(){return Vw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Vw.apply(this,arguments)}const Uw=Is(Xu,{shouldForwardProp:e=>"rightAligned"!==e&&"shouldShowMenuIcon"!==e})((({rightAligned:e,shouldShowMenuIcon:t})=>({...e?{marginRight:"auto"}:{marginLeft:"auto"},height:24,display:t?"flex":"none",fontWeight:"bold",width:"100%",alignItems:"center",justifyContent:"center"}))),Yw=Is(Gw,{shouldForwardProp:e=>"isInteractionsActive"!==e})((({isInteractionsActive:e})=>({minWidth:"unset",position:"relative",cursor:e?"pointer":"default"}))),Kw=Is(Id)((({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}}))),Xw=Is(xc)((({theme:e})=>({"&.MuiDivider-root":{margin:e.spacing(.5)}}))),Jw=Is(_d)((({theme:e})=>({fontSize:"12px",height:24,fontWeight:"bold",padding:`${e.spacing(.25,2)} !important`,marginBottom:e.spacing(.5)}))),Zw=Is(_d,{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")}))),Qw=Is("div")((({theme:e})=>({position:"absolute",width:e.spacing(.5),height:16,left:0,top:"50%",transform:"TranslateY(-50%)",borderRadius:"0 2px 2px 0",background:"#01873d"}))),eR=Is("div")((()=>({display:"flex",justifyContent:"space-between",alignItems:"center"}))),tR=Is(Jl)((()=>({fontFamily:'"Source Sans Pro", HelveticaNeue, "Helvetica Neue", Helvetica, Arial, sans-serif',fontSize:"14px"}))),rR=Is(ed)((({theme:e})=>({width:16,minWidth:"unset !important",marginRight:e.spacing(1.5),lineHeight:0})));function nR(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const oR=(e,t)=>S.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){nR(e,t,r[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),S.createElement("path",{d:"M8.5 8 4 3.5 5.5 2l6 6-6 6L4 12.5z"})),iR=k(oR);let aR={};const sR=({autoFocus:e,id:t,onClick:r,itemTitle:n,icon:o,enabled:i,subMenus:a,isSubMenu:s,isActive:l,handleHeadCellMenuKeyDown:u})=>{const[c,d]=E(!1),p=_(null),f=T((e=>{e.stopPropagation(),d(!1)}),[d]);return S.createElement(S.Fragment,null,S.createElement(Zw,{ref:a?p:null,key:t,"data-testid":`menu-item-${t}`,className:"nebula-table-utils-head-menu-item",onClick:async e=>{"keyup"!==e.type&&(r&&(await r(e),aR={}),null!=a&&a.length&&(d(!0),aR[n]=d))},disabled:!i,autoFocus:e,isSubMenu:!!s,isActive:!!l,onKeyDown:u},l&&S.createElement(Qw,null),S.createElement(eR,null,S.createElement(rR,null,S.createElement(o,null)),S.createElement(tR,{variant:"body2"},n)),null!=a&&a.length?S.createElement(iR,null):null),(null==a?void 0:a.length)&&S.createElement(cR,{isSubMenu:!0,open:c,anchorEl:p.current,onClose:f,menuGroups:(m=a,h=aR,m.map((e=>e.map((e=>{var t;return{...e.groupHeading?{groupHeading:e.groupHeading}:{},items:null===(t=e.items)||void 0===t?void 0:t.map((({onClick:e,...t})=>({...t,...e?{onClick:async t=>{Object.entries(h).map((([,e])=>e(!1))),await e(t)}}:{}})))}}))))),transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},handleHeadCellMenuKeyDown:u}));var m,h},lR=({menuGroup:e,isSubMenu:t,handleHeadCellMenuKeyDown:r})=>e.map((e=>{var n;return[[e.groupHeading&&S.createElement(Jw,{disabled:!0,style:{opacity:1}},e.groupHeading),null===(n=e.items)||void 0===n?void 0:n.map((e=>S.createElement(sR,Vw({key:e.id},e,{isSubMenu:t,handleHeadCellMenuKeyDown:r}))))].filter(Boolean)]})),uR={appear:200,enter:200,exit:100},cR=({anchorEl:e,open:t,onClose:r,menuGroups:n,transformOrigin:o,anchorOrigin:i,isSubMenu:a,handleHeadCellMenuKeyDown:s})=>n.length?S.createElement(Kw,Vw({className:"nebula-table-utils-head-menu",open:t,anchorEl:e,onClose:r,transitionDuration:uR,MenuListProps:{id:ah}},i?{anchorOrigin:i}:{},o?{transformOrigin:o}:{}),(({itemGroups:e,isSubMenu:t,handleHeadCellMenuKeyDown:r})=>e.map(((n,o)=>[lR({menuGroup:n,isSubMenu:t,handleHeadCellMenuKeyDown:r}),o<e.length-1?S.createElement(Xw,{"data-testid":"group-divider",variant:"middle",key:"divider"}):void 0])))({itemGroups:n,isSubMenu:a,handleHeadCellMenuKeyDown:s})):null,dR={canSelectAll:!1,canClearSelections:!1,canSelectPossible:!1,canSelectAlternative:!1,canSelectExcluded:!1},pR=(e,t)=>e.some((e=>t[e]>0));function fR(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const mR=(e,t)=>S.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){fR(e,t,r[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),S.createElement("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"})),hR=k(mR);function gR(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const bR=(e,t)=>S.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){gR(e,t,r[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),S.createElement("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 0m0-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m-1-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 0M9.166 6.166c1.555-1.555 4.113-1.555 5.668 0s1.555 4.113 0 5.668-4.113 1.555-5.668 0-1.555-4.063 0-5.668m4.966 1.555a.56.56 0 0 0 0-.803.56.56 0 0 0-.803 0l-1.304 1.305-1.304-1.305a.522.522 0 0 0-.803 0 .524.524 0 0 0 0 .803l1.305 1.304-1.305 1.304c-.25.2-.25.552 0 .803.251.25.602.25.803 0l1.304-1.304 1.304 1.304c.2.25.552.25.803 0 .2-.201.25-.602 0-.803l-1.304-1.304z"})),vR=k(bR);function yR(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const xR=(e,t)=>S.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){yR(e,t,r[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),S.createElement("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"})),SR=k(xR);function ER(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const CR=(e,t)=>S.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){ER(e,t,r[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),S.createElement("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"})),wR=k(CR);function RR(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const AR=(e,t)=>S.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){RR(e,t,r[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),S.createElement("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"})),IR=k(AR);function LR(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const DR=(e,t)=>S.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){LR(e,t,r[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),S.createElement("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"})),PR=k(DR);function MR(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const _R=(e,t)=>S.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){MR(e,t,r[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),S.createElement("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"})),TR=k(_R);function kR(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const OR=(e,t)=>S.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){kR(e,t,r[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),S.createElement("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"})),qR=k(OR);function NR(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const FR=(e,t)=>S.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){NR(e,t,r[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),S.createElement("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"})),zR=k(FR);function jR(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const $R=(e,t)=>S.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){jR(e,t,r[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),S.createElement("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"})),BR=k($R);let HR=function(e){return e.SORTING="sorting",e.SEARCHING="searching",e.SELECTIONS="selections",e.ADJUST_HEADER_SIZE="adjustHeaderSize",e}({});const WR=({headerData:e,translator:t,menuAvailabilityFlags:r,setOpen:n,sortFromMenu:o,interactions:i,embedListbox:a,fieldInstance:s,selectionActionsEnabledStatus:l,anchorRef:u,setFocusOnColumnAdjuster:c})=>{const d=[];if(r[HR.SORTING]){const{isActivelySorted:r,sortDirection:i,isPivot:a}=e,s=!a&&!r||"D"===i,l=!a&&!r||"A"===i;d.push([{groupHeading:t.get("NebulaTableUtils.MenuGroupLabel.Sorting"),items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortAscending"),onClick:async e=>{e.stopPropagation(),await(null==o?void 0:o(e)),n(!1)},icon:hR,enabled:s,isActive:!!r&&"A"===i,autoFocus:s},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortDescending"),onClick:async e=>{e.stopPropagation(),await(null==o?void 0:o(e)),n(!1)},icon:wR,enabled:l,isActive:!!r&&"D"===i,autoFocus:!s&&l}]}])}if(e.isDim&&null!=i&&i.select){const e=[];r[HR.SEARCHING]&&e.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Search"),onClick:e=>{e.stopPropagation(),n(!1),a()},icon:IR,enabled:!0}]}]),r[HR.SELECTIONS]&&e.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Selections"),icon:BR,enabled:!0,subMenus:[[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAll"),onClick:async e=>{e.stopPropagation(),n(!1),await(null==s?void 0:s.selectAll())},icon:PR,enabled:l.canSelectAll},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectPossible"),onClick:async e=>{e.stopPropagation(),n(!1),await(null==s?void 0:s.selectPossible())},icon:zR,enabled:l.canSelectPossible},{id:3,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAlternative"),onClick:async e=>{e.stopPropagation(),n(!1),await(null==s?void 0:s.selectAlternative())},icon:TR,enabled:l.canSelectAlternative},{id:4,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectExcluded"),onClick:async e=>{e.stopPropagation(),n(!1),await(null==s?void 0:s.selectExcluded())},icon:qR,enabled:l.canSelectExcluded}]}],[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.ClearSelections"),onClick:async e=>{e.stopPropagation(),n(!1),await(null==s?void 0:s.clear())},icon:vR,enabled:l.canClearSelections}]}]]}]}]),e.length>0&&d.push(...e)}return r[HR.ADJUST_HEADER_SIZE]&&d.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.AdjustColumnSize"),onClick:e=>{e.stopPropagation(),e.preventDefault(),n(!1),null==c||c(u)},icon:SR,enabled:!0}]}]),d},GR=({open:e,setOpen:t,anchorRef:r,headerData:n,translator:o,interactions:i,handleHeadCellMenuKeyDown:a,menuAvailabilityFlags:s,shouldShowMenuIcon:l=!0,sortRelatedArgs:u,searchRelatedArgs:c,selectionRelatedArgs:d,adjustHeaderSizeRelatedArgs:p})=>{var f;const m=rh({translator:o}),{headTextAlign:h,qLibraryId:g,fieldId:b}=n,{fieldInstance:v,selectionActionsEnabledStatus:y,resetSelectionActionsEnabledStatus:x,updateSelectionActionsEnabledStatus:C}=(({headerData:e,app:t})=>{const[r,n]=E(null),[o,i]=E(dR);return w((()=>{t&&t.getField&&e&&e.isDim&&t.getField(e.fieldId).then(n).catch(console.error)}),[t,e]),{fieldInstance:r,selectionActionsEnabledStatus:o,resetSelectionActionsEnabledStatus:T((()=>i(dR)),[]),updateSelectionActionsEnabledStatus:T((t=>{const r=t.qHyperCube.qDimensionInfo.find((t=>t.qFallbackTitle===e.label));r&&i({canSelectAll:pR(["qOption","qAlternative","qExcluded","qDeselected"],r.qStateCounts),canClearSelections:pR(["qSelected"],r.qStateCounts),canSelectPossible:pR(["qOption"],r.qStateCounts),canSelectAlternative:pR(["qAlternative"],r.qStateCounts),canSelectExcluded:pR(["qAlternative","qExcluded"],r.qStateCounts)})}),[e.label,i])}})({headerData:n,app:null==d?void 0:d.app}),R=T((()=>{const e=g?{qLibraryId:g,type:"dimension"}:b;if(null!=c&&c.embed&&c.listboxRef){const{embed:t,listboxRef:r}=c;t.__DO_NOT_USE__.popover(r.current,e,{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}})}}),[c,b,g]);w((()=>{e||(x(),null!=d&&d.model&&d.model.getLayout().then((e=>{C(e)})).catch((e=>console.error(e))))}),[e,x,C,null==d?void 0:d.model]);const A=T((e=>{e.stopPropagation(),t(!1)}),[t]);return i.active?S.createElement(Uw,{rightAligned:"right"===h,shouldShowMenuIcon:l,className:ih},l&&S.createElement(Yw,{height:nh,className:oh,"data-testid":oh,isInteractionsActive:null!==(f=i.active)&&void 0!==f&&f},S.createElement(Gw,null)),S.createElement(cR,{open:e,anchorEl:r.current,onClose:A,menuGroups:WR({headerData:n,translator:m,menuAvailabilityFlags:s,setOpen:t,...u,embedListbox:R,interactions:i,fieldInstance:v,selectionActionsEnabledStatus:y,anchorRef:r,setFocusOnColumnAdjuster:null==p?void 0:p.setFocusOnColumnAdjuster}),handleHeadCellMenuKeyDown:a})):null},VR=e=>e.isDark?{background:e.color,borderColor:Cp.DARK_MODE_BORDER,color:Cp.DARK_MODE_TEXT,disabledColor:Cp.DARK_MODE_DISABLED,iconColor:Cp.DARK_MODE_TEXT}:{background:e.color,borderColor:Cp.BORDER_MEDIUM,color:Cp.TEXT,disabledColor:Cp.DISABLED},UR=Is(Xu,{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}`}))),YR=Is(gp,{shouldForwardProp:e=>"footerStyle"!==e})((({footerStyle:e,theme:t})=>({background:"inherit",marginRight:t.spacing(1),color:e.color,"& .MuiNativeSelect-icon, .MuiNativeSelect-select":{color:e.iconColor}}))),KR=Is(sc,{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)}))),XR=Is(Jl)((({theme:e})=>({color:"inherit",margin:e.spacing(0,1,0,1)}))),JR=({children:e,footerContainer:t,interactions:r,theme:n,paginationNeeded:o=!0})=>{const i=C((()=>VR(n.background)),[n]);if(!r.active)return null;const a=o?S.createElement(UR,{footerStyle:i},e):null;return t?z.createPortal(e,t):a},ZR=M({}),QR=()=>R(ZR),eA=({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:m,layout:h})=>{const g=(e=>!e.enabled||e.active)(c)?0:-1,b=C((()=>VR(p.background)),[p]),v=o?o.getBoundingClientRect().width:m.width,y=rh({translator:d}),x=C((()=>({direction:t,pageInfo:r,handleChangeRowsPerPage:n,footerContainer:o,isSelectionMode:i,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:u,keyboard:c,translator:y,theme:p,interactions:f,rect:m,layout:h,footerStyle:b,tabIndex:g,width:v})),[t,r,n,o,i,a,s,l,u,c,y,p,f,m,h,b,g,v]);return S.createElement(ZR.Provider,{value:x},e)};let tA=function(e){return e.FirstPage="FirstPage",e.LastPage="LastPage",e.NextPage="NextPage",e.PreviousPage="PreviousPage",e}({}),rA=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}({});function nA(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const oA=(e,t)=>S.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){nA(e,t,r[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),S.createElement("path",{d:"m7 8 4.5 4.5L10 14 4 8l6-6 1.5 1.5z"})),iA=k(oA);function aA(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const sA=(e,t)=>S.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){aA(e,t,r[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),S.createElement("path",{d:"m12 2 1.5 1.5L9 8l4.5 4.5L12 14 6 8zM4 2v12H2V2z"})),lA=k(sA);function uA(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const cA=(e,t)=>S.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){uA(e,t,r[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),S.createElement("path",{d:"m3.5 2 6 6-6 6L2 12.5 6.5 8 2 3.5zM14 2v12h-2V2z"})),dA=k(cA),pA={FirstPage:lA,PreviousPage:iA,NextPage:iR,LastPage:dA,FirstPageRTL:dA,PreviousPageRTL:iR,NextPageRTL:iA,LastPageRTL:lA},fA=({disabledCondition:e,pageNumber:t,type:r})=>{const{direction:n,footerStyle:o,handleChangePage:i,translator:a,interactions:s,tabIndex:l}=QR(),u=pA[`${r}${"rtl"===n?"RTL":""}`];return{styledProps:{footerStyle:o,disabledCondition:e,size:"small","data-testid":"pagination-action-icon-button","aria-disabled":e,"aria-label":a.get(`NebulaTableUtils.Pagination.${r}`),title:s.passive?a.get(`NebulaTableUtils.Pagination.${r}`):void 0,tabIndex:l,onClick:e?null:()=>i(t)},IconComponent:u}},mA=()=>{const{pageInfo:e,width:t}=QR(),r=0===e.page,{IconComponent:n,styledProps:o}=fA({type:tA.FirstPage,disabledCondition:r,pageNumber:0});return t<=rA.FirstPage?null:S.createElement(KR,o,S.createElement(n,{height:nh}))},hA=(e,t,r=!1)=>{r&&e.key===lh.TAB&&!e.shiftKey&&(_f(e),Mf(e.target,t,!1))},gA=()=>{const{pageInfo:e,keyboard:t,totalPages:r,isSelectionMode:n,width:o}=QR(),i=e.page>=r-1,{IconComponent:a,styledProps:s}=fA({type:tA.LastPage,disabledCondition:i,pageNumber:r-1}),l=t.enabled?e=>hA(e,t,n):null;return o<=rA.LastPage?null:S.createElement(KR,Vw({},s,{onKeyDown:l}),S.createElement(a,{height:nh}))},bA=()=>{const{pageInfo:e,keyboard:t,totalPages:r,isSelectionMode:n,width:o}=QR(),i=e.page>=r-1,{IconComponent:a,styledProps:s}=fA({type:tA.NextPage,disabledCondition:i,pageNumber:e.page+1}),l=!(o>rA.FirstPage&&o>rA.LastPage)&&t.enabled?e=>hA(e,t,n):null;return S.createElement(KR,Vw({},s,{onKeyDown:l}),S.createElement(a,{height:nh}))},vA=()=>{const{pageInfo:e}=QR(),t=0===e.page,{IconComponent:r,styledProps:n}=fA({type:tA.PreviousPage,disabledCondition:t,pageNumber:e.page-1});return S.createElement(KR,n,S.createElement(r,{height:nh}))},yA=()=>{const{translator:e,width:t,pageInfo:r,totalRowCount:n}=QR(),{page:o,rowsPerPage:i}=r;if(t<=rA.DisplayedRowsLabel)return null;const a=e.get("NebulaTableUtils.Pagination.DisplayedRowsLabel",[`${o*i+1} - ${Math.min((o+1)*i,n)}`,n.toString()]);return S.createElement(XR,{variant:"caption"},a)},xA=({name:e,value:t,options:r,handleChange:n})=>{const{layout:o,footerStyle:i,translator:a,tabIndex:s}=QR(),l=o.qInfo.qId,u=a.get(`NebulaTableUtils.Pagination.${e}`),c=`${e}-dropdown`,d=`${c}-label-${l}`,p={tabIndex:s,id:`${c}-${l}`,"data-testid":c,"aria-labelledby":d};return S.createElement(S.Fragment,null,S.createElement(XR,{variant:"caption",id:d},u,":"),S.createElement(YR,{footerStyle:i,size:"small",native:!0,value:t,onChange:n,inputProps:p},r))},SA=()=>{var e;const{pageInfo:t,isSelectionMode:r,totalColumnCount:n,width:o,handleChangeRowsPerPage:i}=QR();if(!(!(null===(e=t.rowsPerPageOptions)||void 0===e||!e.length)&&!r&&o>rA.RowsPerPage&&n<=100)||void 0===t.rowsPerPageOptions)return null;const a=S.createElement(S.Fragment,null,t.rowsPerPageOptions.map((e=>S.createElement("option",{key:e,value:e},e))));return S.createElement(xA,{name:"RowsPerPage",value:t.rowsPerPage,options:a,handleChange:e=>{null==i||i(+e.target.value)}})},EA=1e3,CA="…",wA=({totalPages:e,page:t})=>{const r=Math.min(e,EA),n=r<e&&t>500,o=n?Math.min(500+t,e):r,i=n?Math.max(0,o-EA):0,a=Array.from(Array(r).keys()).map((e=>{const t=e+i;return S.createElement("option",{key:t,value:t},t+1)}));return i>0&&a.unshift(S.createElement("option",{key:"startMoreOptions",value:CA,disabled:!0},CA)),o<e-1&&a.push(S.createElement("option",{key:"endMoreOptions",value:CA,disabled:!0},CA)),S.createElement(S.Fragment,null,a)},RA=()=>{const{pageInfo:e,width:t,totalPages:r,handleChangePage:n}=QR(),{page:o}=e;if(t<=rA.SelectPage)return null;const i=S.createElement(wA,{totalPages:r,page:o});return S.createElement(xA,{name:"SelectPage",value:o,options:i,handleChange:e=>n(+e.target.value)})};var AA=O((e=>S.createElement(eA,e,S.createElement(SA,null),S.createElement(RA,null),S.createElement(yA,null),S.createElement(mA,null),S.createElement(vA,null),S.createElement(bA,null),S.createElement(gA,null))));const IA=e=>S.createElement(JR,e,S.createElement(AA,e)),LA=$S(VE,{shouldForwardProp:e=>"background"!==e})((({background:e})=>({height:"100%",background:e.color}))),DA=$S(VE,{shouldForwardProp:e=>"lines"!==e&&"allIconsDisabled"!==e&&"headCell"!==e&&"isPagination"!==e&&"wordBreak"!==e&&"virtualizedCell"!==e})((({lines:e,wordBreak:t,allIconsDisabled:r=!1,headCell:n=!1,isPagination:o=!1,virtualizedCell:i=!1})=>({lineHeight:"calc(4/3)",fontSize:"inherit",...(n||t||1===e)&&{height:"100%",textOverflow:"ellipsis",overflow:"hidden",wordBreak:n&&o?"break-word":"break-all",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical",...n&&{whiteSpace:r||i?"normal":"nowrap"}}}))),PA=$S(VE)({overflow:"hidden",textOverflow:"ellipsis"});function MA(e,t){const r=_(!1);w((()=>{r.current?e():r.current=!0}),t)}const _A=(e,t)=>{var r;return null===(r=e.getElementsByClassName("sn-table-row")[t[0]])||void 0===r?void 0:r.getElementsByClassName("sn-table-cell")[t[1]]},TA=e=>e.querySelector("td[tabindex='0'], th[tabindex='0']"),kA=e=>{const t=e.nextElementSibling;var r;return t?"HR"===t.tagName?kA(t):t:null===(r=e.parentElement)||void 0===r||null===(r=r.children)||void 0===r?void 0:r[0]},OA=e=>{const t=e.previousElementSibling;if(!t){var r,n;const t=null===(r=e.parentElement)||void 0===r||null===(r=r.children)||void 0===r?void 0:r.length;return null===(n=e.parentElement)||void 0===n||null===(n=n.children)||void 0===n?void 0:n[t-1]}return"HR"===t.tagName?OA(t):t},qA=e=>{setTimeout((()=>{var t;const r=null===(t=e.current)||void 0===t||null===(t=t.closest(".sn-table-cell"))||void 0===t?void 0:t.querySelector(`.${uh}`);null==r||r.setAttribute("tabIndex","0"),null==r||r.focus()}),0)},NA=({focusType:e,cell:t})=>{if(t)switch(e){case YS.FOCUS:t.focus(),t.setAttribute("tabIndex","0");break;case YS.FOCUS_BUTTON:const e=t.querySelector(".sn-table-head-label");null==e||e.focus();break;case YS.BLUR:t.blur(),t.setAttribute("tabIndex","-1");break;case YS.ADD_TAB:t.setAttribute("tabIndex","0");break;case YS.REMOVE_TAB:t.setAttribute("tabIndex","-1")}},FA=({evt:e,rootElement:t,cellCoord:r,setFocusedCellCoord:n,allowedRows:o})=>{NA({focusType:YS.REMOVE_TAB,cell:e.currentTarget});const i=((e,t,r,n={top:0,bottom:0})=>{const o=n.top>0,i=n.top,a=t.getElementsByClassName("sn-table-row").length-1-n.bottom,s=t.getElementsByClassName("sn-table-head-cell").length-1;let[l,u]=r;switch(e.key){case US.DOWN:l<a&&l++;break;case US.UP:l>i&&l--;break;case US.RIGHT:if(o)break;u<s?u++:l<a&&(l++,u=0);break;case US.LEFT:if(o)break;u>0?u--:l>0&&(l--,u=s)}return[l,u]})(e,t,r,o),a=_A(t,i);return NA({focusType:YS.FOCUS,cell:a}),n(i),a},zA=(e,t,r,n)=>{var o;(NA({focusType:YS.REMOVE_TAB,cell:TA(t)}),r(e),n.enabled&&!n.active)?null===(o=n.focus)||void 0===o||o.call(n):NA({focusType:YS.ADD_TAB,cell:_A(t,e)})},jA=(e,t,r)=>{w((()=>{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;let{scrollLeft:o}=r,i=o+e.deltaX;t&&(i=n+i),n>0&&(i<0||i>n+1)&&(e.preventDefault(),o=t?Math.min(0,Math.min(n,i)):Math.max(0,Math.min(n,i)))})(e,"rtl"===t,n),i=e=>{var t;r.scrollLeft=(null===(t=e.currentTarget)||void 0===t?void 0:t.scrollLeft)||0};return n.addEventListener("wheel",o),n.addEventListener("scroll",i),()=>{n.removeEventListener("wheel",o),n.removeEventListener("scroll",i)}}),[e,t,r])},$A=(e,t=!1)=>e.key===US.ESC&&!t||(e.key===US.LEFT||e.key===US.RIGHT)&&dw(e),BA=({evt:e,rootElement:t,cell:r,selectionDispatch:n,isSelectionsEnabled:o,setFocusedCellCoord:i,announce:a,totalsPosition:s,isSelectionMode:l})=>{const u=s.atTop?2:1,c=[r.pageRowIdx+u,r.pageColIdx],d={top:l?u:0,bottom:l&&s.atBottom?1:0},p=FA({evt:e,rootElement:t,cellCoord:c,setFocusedCellCoord:i,allowedRows:d});e.key!==US.UP&&e.key!==US.DOWN||(e.key===US.UP&&((e,t)=>{const r=t.getElementsByClassName("sn-table-container")[0];if(null==r||!r.scrollTo)return;const[n,o]=e;if(n<2)r.scrollTo({top:0,behavior:"auto"});else{var i;const e=t.getElementsByClassName("sn-table-head-cell")[0],a=null===(i=t.getElementsByClassName("sn-table-row")[n])||void 0===i?void 0:i.getElementsByClassName("sn-table-cell")[o];if(!a||!e)return;if(a.offsetTop-e.offsetHeight<r.scrollTop){const t=r.scrollTop-a.offsetHeight-e.offsetHeight;r.scrollTo({top:Math.max(0,t),behavior:"auto"})}}})([r.pageRowIdx,r.pageColIdx],t),((e,t,r)=>t.shiftKey&&(t.key===US.UP&&0!==r.pageRowIdx||t.key===US.DOWN&&!r.isLastRow)&&e&&r.isSelectable)(o,e,r)?n({type:VS.SELECT_MULTI_ADD,payload:{cell:r,evt:e,announce:a}}):((e,t,r=!1)=>{r&&t&&e(t.classList.contains("selected")?{keys:["SNTable.SelectionLabel.SelectedValue"]}:{keys:["SNTable.SelectionLabel.NotSelectedValue"]})})(a,p,l))},HA=e=>{var t;const{key:r,currentTarget:n}=e,o=null!==(t=document.activeElement)&&void 0!==t?t:n;if(r===US.DOWN||r===US.UP){const t=e=>r===US.DOWN?kA(e):OA(e);_f(e);let n=t(o);for(;n;){if("true"!==n.ariaDisabled){n.focus();break}n=t(n)}}},WA=({evt:e,rootElement:t,cell:r,selectionDispatch:n,isSelectionsEnabled:o,setFocusedCellCoord:i,announce:a,keyboard:s,paginationNeeded:l,totalsPosition:u,selectionsAPI:c})=>{if(e.currentTarget.classList.contains("excluded"))return void _f(e);const d=null==c?void 0:c.isModal();if(!$A(e,d))switch(e.key){case US.SPACE:_f(e),r.isSelectable&&o&&n({type:VS.SELECT,payload:{cell:r,evt:e,announce:a}});break;case US.ENTER:_f(e),d&&(null==c||c.confirm(),a({keys:["SNTable.SelectionLabel.SelectionsConfirmed"]}));break;case US.ESC:_f(e),null==c||c.cancel(),a({keys:["SNTable.SelectionLabel.ExitedSelectionMode"]});break;case US.TAB:(({evt:e,keyboard:t,isSelectionMode:r,paginationNeeded:n})=>{(null==t?void 0:t.enabled)&&r&&(e.shiftKey||!e.shiftKey&&!n)&&(_f(e),Mf(e.currentTarget,t,e.shiftKey))})({evt:e,keyboard:s,isSelectionMode:d,paginationNeeded:l});break;case US.C:_f(e),cw(e)&&hh(e.currentTarget);break;default:pw(e.key)&&(_f(e),BA({evt:e,rootElement:t,cell:r,selectionDispatch:n,isSelectionsEnabled:o,setFocusedCellCoord:i,announce:a,totalsPosition:u,isSelectionMode:d}))}},GA=e=>{const{layout:t,rect:r,theme:n}=Fw(kw,(e=>e.baseProps)),[o,i]=E(0),[a,s]=E(0);return q((()=>{if(e.current){var t;const{offsetWidth:r=0,offsetHeight:n=0,clientWidth:o=0,clientHeight:a=0}=null!==(t=e.current)&&void 0!==t?t:{},l=n-a;s(r-o),i(l)}}),[e,t,r,n]),{xScrollbarWidth:o,yScrollbarWidth:a}},VA=$S("div")({clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",overflow:"hidden",position:"absolute",whiteSpace:"nowrap",width:"1px"}),UA=$S(OC,{shouldForwardProp:e=>"fullHeight"!==e&&"interactions"!==e})((({fullHeight:e,interactions:t})=>({height:e?"100%":"calc(100% - 41px)",overflow:t.active?"auto":"hidden",border:"none"}))),YA=$S(vC,{shouldForwardProp:e=>"showRightBorder"!==e&&"styling"!==e})((({showRightBorder:e,styling:t})=>({tableLayout:"fixed",width:"min-content",borderRight:e?`1px solid ${t.body.borderRightColor}`:void 0}))),KA=()=>Qi.jsxs(Qi.Fragment,{children:[Qi.jsx(VA,{className:"sn-table-announcer-1","aria-live":"polite","aria-atomic":"true"}),Qi.jsx(VA,{className:"sn-table-announcer-2","aria-live":"polite","aria-atomic":"true"})]}),XA=e=>e.stopPropagation(),JA=({href:e,text:t,interactions:r,color:n})=>S.createElement(Wc,{href:e,rel:"noreferrer",target:"_blank",underline:"hover",title:t,onClick:XA,style:{pointerEvents:r.active?"auto":"none",color:null!=n?n:void 0,opacity:r.active&&r.passive||n?void 0:.4}},t),ZA=({layout:e,viewService:t,isImagesEnabled:r})=>{var n,o;let i=null===(n=t.viewState)||void 0===n?void 0:n.maxLineCount;var a,s;r&&(i=null!==(a=i)&&void 0!==a?a:null===(s=Iw(e))||void 0===s||null===(s=s.content)||void 0===s?void 0:s.rowHeight);return{maxNbrLines:null!==(o=i)&&void 0!==o?o:3,isStaticNbrOfLines:void 0!==i}},QA=({children:e,fontSize:t="",wordBreak:r=!1,isPagination:n=!1,virtualizedCell:o=!1,lines:i=3,headCell:a=!1,allIconsDisabled:s=!1})=>{if(a)return Qi.jsx(DA,{component:"span",className:"sn-table-cell-text",lines:i,isPagination:n,headCell:!0,allIconsDisabled:s,children:e});const l=parseInt(t||iw,10),u=Qi.jsx(DA,{component:"span",className:"sn-table-cell-text",wordBreak:r,lines:i,virtualizedCell:o,children:e});return r?u:Qi.jsx(PA,{minHeight:l*ow,maxHeight:l*ow*i,children:u})},eI=e=>{let t="center",r="center";return"flex-start"===(null==e?void 0:e.vertical)?t="top":"flex-end"===(null==e?void 0:e.vertical)&&(t="bottom"),"flex-start"===(null==e?void 0:e.horizontal)?r="left":"flex-end"===(null==e?void 0:e.horizontal)&&(r="right"),`${r} ${t}`},tI=e=>{switch(e){case"alwaysFit":return"contain";case"fill":return"fill";case"fitHeight":case"fitWidth":return"cover";case"originalSize":return"none";default:return}},rI=({representation:e,textStyle:t,maxImageHeight:r,wrapInContainer:n})=>{const{url:o,text:i,imageSize:a,resolvedImagePosition:s}=e,l="fitHeight"===a,u=Qi.jsx("img",{src:o,alt:i,style:{width:l?"auto":"100%",height:"100%",maxHeight:r,objectFit:tI(a),objectPosition:eI(s),...t,overflow:"hidden"}});var c;return n?Qi.jsx("div",{"data-key":"image-horizontal-container",style:{width:"100%",height:l?r:"100%",overflow:"hidden",display:"flex",justifyContent:l?null==e||null===(c=e.resolvedImagePosition)||void 0===c?void 0:c.horizontal:void 0},children:u}):u},nI=({cell:e,style:t,maxImageHeight:r,virtualizedCell:n})=>{const{flags:o}=Fw(kw,(e=>e.env)),{interactions:i,viewService:a,layout:s}=Fw(kw,(e=>e.baseProps)),l=Fw(kw,(e=>{var t;return null===(t=e.selectionState.api)||void 0===t?void 0:t.isActive()})),{maxNbrLines:u}=ZA({viewService:a,layout:s,isImagesEnabled:o.isEnabled("CLIENT_IM_5715_LINKS_AND_IMAGES")});let c=e.representation.text;return e.representation.type!==xv.Link||l||(c=Qi.jsx(JA,{href:e.representation.url,text:e.representation.text,interactions:i,color:t.cellForegroundColor})),e.representation.type===xv.Image?Qi.jsx(rI,{representation:e.representation,textStyle:t,maxImageHeight:r,wrapInContainer:!n}):Qi.jsx(QA,{wordBreak:!e.isNumeric,fontSize:t.fontSize,lines:u,virtualizedCell:n,children:c})},oI=({selectionsAPI:e,selectionDispatch:t,setShouldRefocus:r,keyboard:n,tableWrapperRef:o})=>{w((()=>{const i=()=>{t({type:VS.RESET})},a=()=>{t({type:VS.CLEAR})},s=()=>{var e;if(null!==(e=o.current)&&void 0!==e&&e.contains(document.activeElement))r();else if(n.enabled){var t;null===(t=n.blur)||void 0===t||t.call(n,!0)}i()};return null==e||e.on("deactivated",i),null==e||e.on("canceled",i),null==e||e.on("confirmed",s),null==e||e.on("cleared",a),()=>{null==e||e.removeListener("deactivated",i),null==e||e.removeListener("canceled",i),null==e||e.removeListener("confirmed",s),null==e||e.removeListener("cleared",a)}}),[e,n,t,r,o])},iI=e=>parseInt(null!=e?e:sw.fontSize,10)*ow,aI=({maxNbrLines:e,isStaticNbrOfLines:t,lineHeight:r})=>t?r*e+8+1:void 0,sI=(e,t,r,n)=>({handleMouseDown:n=>{null==e||e(n);const o=n.target;if(t.isSelectable&&"A"!==o.tagName){const e=()=>r({type:VS.SELECT_MULTI_END});r({type:VS.SELECT_MOUSE_DOWN,payload:{cell:t,mouseupOutsideCallback:e}})}},handleMouseOver:e=>{1===e.buttons&&r({type:VS.SELECT_MULTI_ADD,payload:{cell:t,evt:e,announce:n}})},handleMouseUp:e=>{0===e.button&&r({type:VS.SELECT_MOUSE_UP,payload:{cell:t,evt:e,announce:n}})}}),lI=$S(RC,{shouldForwardProp:e=>"lastRowBottomBorder"!==e})((({lastRowBottomBorder:e})=>({"& tr:last-child":{"& td, th":{borderBottomWidth:e}}}))),uI=$S(YC,{shouldForwardProp:e=>"hoverColors"!==e&&"hover"!==e})((({hover:e,hoverColors:t})=>({"&&:hover":{background:"none"},...e&&{"&&:hover":{"& td:not(.selected), th:not(.selected)":t}}}))),cI=$S(MC,{shouldForwardProp:e=>"cellStyle"!==e})((({cellStyle:e,theme:t})=>({...sw,...e,padding:t.spacing(.5,1.5),verticalAlign:"top",width:"100%",height:"100%"}))),dI=$S(MC,{shouldForwardProp:e=>"atTop"!==e&&"headRowHeight"!==e&&"totalsStyle"!==e})((({totalsStyle:e,atTop:t,headRowHeight:r,theme:n})=>({...sw,...e,fontWeight:aw,position:"sticky",padding:n.spacing(.5,1.5),borderWidth:t?"0px 1px 1px 0px":"1px 1px 1px 0px",top:t&&r,bottom:!t&&0,verticalAlign:t?"bottom":"top"})));function pI(e){return t=>{const{cell:r,styling:n,announce:o,onMouseDown:i}=t,a=Fw(kw,(e=>mw(r,e.selectionState))),s=Fw(kw,(e=>e.selectionDispatch)),{handleMouseDown:l,handleMouseOver:u,handleMouseUp:c}=sI(i,r,s,o),d=function(e,t){let r={};switch(t){case GS.SELECTED:r=nw.SELECTED;break;case GS.POSSIBLE:r=nw.POSSIBLE;break;case GS.EXCLUDED:r={background:`${nw.EXCLUDED_BACKGROUND}, ${e.background}`,selectedCellClass:GS.EXCLUDED}}return{...e,...r}}(n,a);return Qi.jsx(e,{...t,styling:d,onMouseUp:c,onMouseDown:l,onMouseOver:u})}}function fI(e,t){let r=(n=cI,e=>{const{styling:{selectedCellClass:t,...r},component:o,align:i,children:a,scope:s,tabIndex:l,onKeyDown:u,onMouseDown:c,onKeyUp:d,onMouseUp:p,onMouseOver:f,title:m}=e;return Qi.jsx(n,{cellStyle:r,component:o,scope:s,align:i,tabIndex:l,className:`sn-table-cell ${t||""} ${sh}`,title:m,onKeyDown:u,onMouseDown:c,onKeyUp:d,onMouseUp:p,onMouseOver:f,children:a})});var n;return t&&(r=pI(r)),e&&(r=function(e){return t=>{const{cell:r,column:n,styling:o}=t,i=C((()=>Mw(o,r.qAttrExps,n.qAttrExprInfoIDs)),[o,r.qAttrExps,n.qAttrExprInfoIDs]);return Qi.jsx(e,{...t,styling:i})}}(r)),r}const mI=()=>{const{columns:e,totalsPosition:{atTop:t},rows:r}=Fw(kw,(e=>e.tableData)),{rootElement:n,selectionsAPI:o,keyboard:i,styling:a,interactions:s}=Fw(kw,(e=>e.baseProps)),l=Fw(kw,(e=>e.headRowHeight)),u=Fw(kw,(e=>e.setFocusedCellCoord));return Qi.jsx(YC,{className:"sn-table-row sn-table-totals-row",children:e.map(((e,c)=>{const d=[t?1:r.length+1,c];return Qi.jsx(dI,{totalsStyle:a.totals,headRowHeight:l,atTop:t,align:e.totalsTextAlign,className:`sn-table-cell ${sh}`,tabIndex:-1,title:s.passive?e.totalInfo:void 0,onKeyDown:e=>{((e,t,r,n,o=!1)=>{if(o)_f(e);else if(!$A(e))switch(e.key){case US.C:_f(e),cw(e)&&hh(e.currentTarget);break;case US.SPACE:e.preventDefault();break;default:pw(e.key)&&(_f(e),FA({evt:e,rootElement:t,cellCoord:r,setFocusedCellCoord:n}))}})(e,n,d,u,null==o?void 0:o.isModal())},onMouseDown:()=>{zA(d,n,u,i)},children:Qi.jsx(QA,{wordBreak:!e.isTotalNumeric,fontSize:a.totals.fontSize,children:e.totalInfo})},e.id)}))})};var hI=O(mI);const gI=({setShouldRefocus:e,tableWrapperRef:t,announce:r})=>{var n;const{rows:o,columns:i,paginationNeeded:a,totalsPosition:s}=Fw(kw,(e=>e.tableData)),{selectionsAPI:l,rootElement:u,keyboard:c,layout:d,interactions:p,styling:{body:{hoverColors:f,lastRowBottomBorder:m,...h}},viewService:g}=Fw(kw,(e=>e.baseProps)),b=Fw(kw,(e=>e.setFocusedCellCoord)),v=Fw(kw,(e=>e.selectionDispatch)),{flags:y}=Fw(kw,(e=>e.env)),x=!!p.active&&!!p.select,S=JSON.stringify(i.map((e=>e.qAttrExprInfoIDs))),E=C((()=>JSON.parse(S).map((e=>fI(e.some((e=>"cellBackgroundColor"===e||"cellForegroundColor"===e)),x)))),[S,x]),w=!(null===(n=Iw(d))||void 0===n||null===(n=n.content)||void 0===n||!n.hoverEffect),{maxNbrLines:R,isStaticNbrOfLines:A}=ZA({viewService:g,layout:d,isImagesEnabled:y.isEnabled("CLIENT_IM_5715_LINKS_AND_IMAGES")}),I=iI(h.fontSize),L=aI({maxNbrLines:R,isStaticNbrOfLines:A,lineHeight:I});return oI({keyboard:c,selectionDispatch:v,selectionsAPI:l,setShouldRefocus:e,tableWrapperRef:t}),Qi.jsxs(lI,{lastRowBottomBorder:m,children:[s.atTop?Qi.jsx(hI,{}):void 0,o.map(((e,t)=>Qi.jsx(uI,{hoverColors:f,hover:w,tabIndex:-1,className:"sn-table-row sn-table-data-row",rowindex:t,height:L,children:i.map(((t,n)=>{const{id:o}=t,i=e[n],d=E[n],f=Mw({},i.qAttrExps,t.qAttrExprInfoIDs);return d&&Qi.jsx(d,{scope:0===n?"row":void 0,component:0===n?"th":void 0,cell:i,column:t,align:i.align,styling:h,tabIndex:-1,announce:r,title:p.passive?i.representation.text:void 0,onKeyDown:e=>{WA({evt:e,rootElement:u,selectionsAPI:l,cell:i,selectionDispatch:v,isSelectionsEnabled:x,setFocusedCellCoord:b,announce:r,keyboard:c,paginationNeeded:a,totalsPosition:s})},onKeyUp:e=>((e,t)=>{e.key===US.SHIFT&&t({type:VS.SELECT_MULTI_END})})(e,v),onMouseDown:()=>((e,t,r,n,o)=>{const{pageRowIdx:i,pageColIdx:a}=e,s=o.atTop?i+2:i+1;zA([s,a],t,r,n)})(i,u,b,c,s),children:Qi.jsx(nI,{cell:i,style:f,maxImageHeight:A?I*R:I})},o)}))},`row-${t}`))),s.atBottom?Qi.jsx(hI,{}):void 0]})};var bI=O(gI);const vI=({column:e,isLastColumn:t,onColumnResize:r,setIsAdjustingWidth:n})=>{const{pageColIdx:o}=e,{applyColumnWidths:i,interactions:a}=Fw(kw,(e=>e.baseProps)),s=Fw(kw,(e=>e.columnWidths)),l=Fw(kw,(e=>e.setColumnWidths));if(!a.active)return null;return Qi.jsx(Bw,{columnWidth:s[o],isLastColumn:t,keyValue:`adjuster-${o}`,updateWidthCallback:e=>{null==r||r();const t=[...s];t[o]=e,l(t)},confirmWidthCallback:t=>{i(t,e)},handleBlur:e=>(e=>{e.setAttribute("tabIndex","-1");const t=e.closest(".sn-table-cell");NA({focusType:YS.FOCUS,cell:t})})(e.currentTarget),setIsAdjustingWidth:n})};function yI(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const xI=(e,t)=>S.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){yI(e,t,r[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),S.createElement("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"})),SI=k(xI);function EI(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const CI=(e,t)=>S.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){EI(e,t,r[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),S.createElement("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"})),wI=k(CI);function RI(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const AI=(e,t)=>S.createElement("svg",function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){RI(e,t,r[t])}))}return e}({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t},e),S.createElement("path",{d:"M13 7H8zV4.982C13 2.23 10.761 0 8 0S3 2.23 3 4.982V7h.75H3h1.5V5.332C4.5 3.216 5.549 1.5 8 1.5s3.5 1.716 3.5 3.832V7h.75H3a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1H3z"}),S.createElement("use",{fillRule:"evenodd"})),II=k(AI),LI=$S("div")({position:"absolute",left:0,bottom:0}),DI=$S(VE,{shouldForwardProp:e=>!["textAlign"].includes(e)})((({textAlign:e,theme:t})=>({textAlign:e,height:"auto",padding:t.spacing(.5,1),display:"flex",alignItems:"flex-end",justifySelf:e,alignSelf:"center"})));$S("span")({border:0,clip:"rect(0 0 0 0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",top:20,width:1});const PI=$S(VE,{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},[`& .${ih}`]:{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:2},[`& .${ih}`]:{gridColumn:1}}}return{width:"100%",display:"grid",gridAutoFlow:"dense",fontSize:"inherit",fontFamily:"inherit",alignItems:"end",overflow:"hidden",...o}})),MI=$S(VE,{shouldForwardProp:e=>"rightAligned"!==e})((({rightAligned:e})=>({display:"flex",alignItems:"center",width:"20px",height:"24px",flexShrink:0,flexDirection:"inherit",justifyContent:e?"flex-start":"flex-end"})));$S(VE,{shouldForwardProp:e=>"isVisible"!==e&&"rightAligned"!==e})((({rightAligned:e})=>({...e?{marginRight:"auto"}:{marginLeft:"auto"},height:"24px",display:"flex"}))),$S(QE)((({theme:e})=>({"&.MuiDivider-root":{margin:e.spacing(.5)}}))),$S(dC)((({theme:e})=>({borderRadius:"4px",margin:e.spacing(0,.5),padding:e.spacing(1,1.5),display:"flex",justifyContent:"space-between","&&:focus":{boxShadow:"rgb(23, 127, 230) 0px 0px 0px 2px"}}))),$S("div")((()=>({display:"flex",justifyContent:"space-between",alignItems:"center"}))),$S(iC)((({theme:e})=>({marginRight:e.spacing(1.5),lineHeight:0}))),$S("div")((({theme:e})=>({height:"350px",boxSizing:"border-box",background:e.palette.common.white})));const _I=$S(MC,{shouldForwardProp:e=>"headerStyle"!==e&&"interactions"!==e&&"hoverBackground"!==e&&"background"!==e})((({headerStyle:e,interactions:t,hoverBackground:r,background:n})=>({...sw,...e,cursor:t.active?"pointer":"default",background:n,verticalAlign:"bottom","&&:focus-visible, &&:hover":{background:t.active?r:n}})));$S("div")({display:"flex",alignItems:"center"});const TI=$S("span",{shouldForwardProp:e=>"align"!==e})((({align:e})=>({minWidth:iw,display:"flex",paddingBottom:"2px",alignSelf:"end",..."right"===e?{paddingRight:"8px"}:{paddingLeft:"8px"}}))),kI=({column:e,isInteractionEnabled:t,open:r,setOpen:n,allColumnsIconVisibilityStatusRef:o,isPagination:i})=>{const{translator:a,changeSortOrder:s,interactions:l,embed:u,app:c,model:d,styling:p}=Fw(kw,(e=>e.baseProps)),f=Fw(kw,(t=>t.columnWidths[e.pageColIdx])),m=_(null),h=_(null),{getHeadCellsIconsVisibilityStatus:g,allIconsDisabled:b}=(({styling:e,column:t,columnWidth:r})=>{const{measureText:n}=Jm({fontSize:e.head.fontSize,fontFamily:e.head.fontFamily,fontWeight:aw}),o=T((()=>{let e=!1,o=!1,i=!1;const a=t.isLocked,s=t.isActivelySorted,l=r-25,u=a?20:0,c=s?20:0;let d=n(t.label);return a&&d+u<=l&&(i=!0,d+=u,s&&d+c<=l&&(o=!0,d+=c)),!a&&s&&d+c<=l&&(o=!0,d+=c),d+24<=l&&(e=!0,d+=24),{shouldShowMenuIcon:e,shouldShowSortIcon:o,shouldShowLockIcon:i}}),[t.isLocked,t.label,t.isActivelySorted,r,n]);return{getHeadCellsIconsVisibilityStatus:o,allIconsDisabled:Object.values(o()).every((e=>!1===e))}})({styling:p,column:e,columnWidth:f}),v=g(),{StartIcon:y,EndIcon:x,LockIcon:S}=(({sortDirection:e,headTextAlign:t},{shouldShowSortIcon:r,shouldShowLockIcon:n})=>{const o="A"===e?Qi.jsx(SI,{height:iw,"data-testid":"head-cell-sort-ascending-icon"}):Qi.jsx(wI,{height:iw,"data-testid":"head-cell-sort-descending-icon"}),i=r?Qi.jsx(TI,{align:t,children:o}):void 0,a=n?Qi.jsx(MI,{rightAligned:"right"===t,className:"sn-table-lock-icon",children:Qi.jsx(II,{height:iw,"data-testid":"head-cell-lock-icon"})}):void 0;return"right"===t?{StartIcon:i,LockIcon:a}:{EndIcon:i,LockIcon:a}})(e,v);o&&(o.current[e.pageColIdx]=v);return Qi.jsxs(PI,{shouldShowMenuIcon:v.shouldShowMenuIcon,shouldShowLockIcon:v.shouldShowLockIcon,alignment:e.headTextAlign,children:[S,Qi.jsxs(DI,{className:"sn-table-head-label",textAlign:e.headTextAlign,children:[y,Qi.jsx(QA,{allIconsDisabled:b,isPagination:i,virtualizedCell:!i,headCell:!0,children:e.label}),x]}),t&&Qi.jsxs(Qi.Fragment,{children:[Qi.jsx(GR,{headerData:e,translator:a,anchorRef:m,handleHeadCellMenuKeyDown:HA,menuAvailabilityFlags:{[HR.SORTING]:!0,[HR.SEARCHING]:!0,[HR.SELECTIONS]:!0,[HR.ADJUST_HEADER_SIZE]:!0},open:r,setOpen:n,interactions:l,sortRelatedArgs:{sortFromMenu:t=>(t.stopPropagation(),s(e))},searchRelatedArgs:{embed:u,listboxRef:h},selectionRelatedArgs:{app:c,model:d},adjustHeaderSizeRelatedArgs:{setFocusOnColumnAdjuster:qA},shouldShowMenuIcon:v.shouldShowMenuIcon}),Qi.jsx(LI,{ref:h}),Qi.jsx(LI,{ref:m})]})]})},OI=({isInteractionEnabled:e,columnsData:t})=>{const[r,n]=E(!1),{isAdjustingWidth:o,setIsAdjustingWidth:i}=(e=>{const[t,r]=E(!1);return eh((()=>{r(!1)}),e),{isAdjustingWidth:t,setIsAdjustingWidth:r}})([t]);return{open:r,setOpen:n,handleOpenMenu:t=>e&&!(e=>{var t;return null===(t=e.target)||void 0===t||null===(t=t.getAttribute("class"))||void 0===t?void 0:t.includes(uh)})(t)&&!o&&n(!0),setIsAdjustingWidth:i}},qI=({column:e,columnIndex:t,columnsLength:r})=>{const{styling:n,interactions:o,rootElement:i,keyboard:a,styling:{head:{activeBackground:s,background:l,hoverBackground:u}}}=Fw(kw,(e=>e.baseProps)),{columns:c}=Fw(kw,(e=>e.tableData)),d=Fw(kw,(e=>e.columnWidths[t])),p=Fw(kw,(e=>{var t;return null===(t=e.baseProps.selectionsAPI)||void 0===t?void 0:t.isModal()})),f=Fw(kw,(e=>e.setFocusedCellCoord)),m=Fw(kw,(({focusedCellCoord:[e,r]})=>0===e&&r===t)),h=!!o.active&&!p,{open:g,setOpen:b,handleOpenMenu:v,setIsAdjustingWidth:y}=OI({isInteractionEnabled:h,columnsData:c}),x=e.isActivelySorted?KS[e.sortDirection]:void 0,S=g?ah:void 0,E=g?"true":void 0,C=t===r-1,w=[0,e.pageColIdx],R={width:d-(C?8:9),zIndex:c.length-t},A=m&&0===t&&!a.enabled&&h?0:-1;return Qi.jsxs(_I,{headerStyle:n.head,background:g?s:l,hoverBackground:u,interactions:o,style:R,align:e.headTextAlign,className:`sn-table-head-cell sn-table-cell ${sh}`,tabIndex:A,title:o.passive?e.label:void 0,onKeyDown:e=>(({evt:e,rootElement:t,cellCoord:r,setFocusedCellCoord:n,isInteractionEnabled:o,handleOpenMenu:i})=>{if(o){if(!$A(e))switch(e.key){case US.C:_f(e),cw(e)&&hh(e.currentTarget);break;case US.ENTER:case US.SPACE:i&&i(e);break;default:pw(e.key)&&(_f(e),FA({evt:e,rootElement:t,cellCoord:r,setFocusedCellCoord:n}))}}else _f(e)})({evt:e,rootElement:i,cellCoord:w,setFocusedCellCoord:f,isInteractionEnabled:h,handleOpenMenu:v}),onMouseDown:e=>(({evt:e,rootElement:t,cellCoord:r,setFocusedCellCoord:n,keyboard:o,isInteractionEnabled:i})=>{var a;e.preventDefault(),i&&(n(r),o.enabled&&!o.active?null===(a=o.focus)||void 0===a||a.call(o):NA({focusType:YS.FOCUS,cell:_A(t,r)}))})({evt:e,rootElement:i,cellCoord:w,setFocusedCellCoord:f,keyboard:a,isInteractionEnabled:h}),onClick:v,"aria-sort":x,"aria-controls":S,"aria-expanded":E,"aria-haspopup":"true",children:[Qi.jsx(kI,{column:e,isInteractionEnabled:h,open:g,setOpen:b,isPagination:!0}),Qi.jsx(vI,{column:e,isLastColumn:C,setIsAdjustingWidth:y})]},e.id)},NI=()=>{var e;const{columns:t}=Fw(kw,(e=>e.tableData)),{styling:r,viewService:n}=Fw(kw,(e=>e.baseProps)),o=Fw(kw,(e=>e.setHeadRowHeight)),i=Fw(kw,(e=>e.columnWidths)),a=_(null);return w((()=>{a.current&&o(a.current.clientHeight)}),[r.head.fontSize,i,o]),null!==(e=n.viewState)&&void 0!==e&&e.skipHeader?null:Qi.jsx($C,{children:Qi.jsx(YC,{ref:a,className:"sn-table-row sn-table-head-row",children:t.map(((e,r)=>Qi.jsx(qI,{column:e,columnIndex:r,columnsLength:t.length},e.id)))})})};var FI=O(NI);const zI=e=>{var t,r;const{pageInfo:n,setPageInfo:o,direction:i,footerContainer:a,announce:s}=e,{page:l,rowsPerPage:u}=n,{totalColumnCount:c,totalRowCount:d,totalPages:p,paginationNeeded:f,rows:m,columns:h,totalsPosition:g}=Fw(kw,(e=>e.tableData)),{rootElement:b,keyboard:v,translator:y,theme:x,interactions:S,styling:E,viewService:C,layout:R,rect:A}=Fw(kw,(e=>e.baseProps)),I=Fw(kw,(e=>e.focusedCellCoord)),L=Fw(kw,(e=>e.setFocusedCellCoord)),D=Fw(kw,(e=>e.setYScrollbarWidth)),P=Fw(kw,(e=>e.showRightBorder)),M=Fw(kw,(e=>e.selectionDispatch)),k=Fw(kw,(e=>{var t;return null===(t=e.baseProps.selectionsAPI)||void 0===t?void 0:t.isModal()})),O=_(!1),q=_(null),N=_(null),{yScrollbarWidth:F}=GA(q),z=`${y.get("SNTable.Accessibility.RowsAndColumns",[String(m.length),String(h.length)])} ${y.get("SNTable.Accessibility.NavigationInstructions")}`,j=qv(R,C),$=j&&null!==(t=C.scrollLeft)&&void 0!==t?t:0,B=j&&null!==(r=C.rowPartialHeight)&&void 0!==r?r:0,H=T((()=>{O.current=b.getElementsByTagName("table")[0].contains(document.activeElement)}),[b]),W=T((e=>{o({...n,page:e}),s({keys:[["SNTable.Pagination.PageStatusReport",(e+1).toString(),p.toString()]],politeness:"assertive"})}),[n,o,p,s]),G=T((e=>{o({...n,page:0,rowsPerPage:e}),s({keys:[["SNTable.Pagination.RowsPerPageChange",e.toString()]],politeness:"assertive"})}),[s,n,o]);return((e,t,r)=>{w((()=>{const n=e.current;if(!n)return;const o=e=>((e,t,r)=>{const n=e.currentTarget,o=e.relatedTarget,i=!(null==n||!n.contains(o)),a=null==o?void 0:o.closest(".sn-table-head-menu");if(r.enabled&&!i&&!a&&!t.current&&n){var s;const e=n.querySelector(".sn-table-announcer-1"),t=n.querySelector(".sn-table-announcer-2");e&&t&&(e.innerHTML="",t.innerHTML=""),null===(s=r.blur)||void 0===s||s.call(r,!1)}})(e,t,r);return n.addEventListener("focusout",o),()=>{n.removeEventListener("focusout",o)}}),[e,t,r])})(N,O,v),jA(q,i,C),(()=>{const{rootElement:e,keyboard:t}=Fw(kw,(e=>e.baseProps)),r=Fw(kw,(e=>e.focusedCellCoord));eh((()=>{const n=t.active?YS.FOCUS:YS.BLUR,o=t.active?_A(e,r):TA(e);NA({focusType:n,cell:o})}),[t.active,e])})(),w((()=>{const e=q.current;e&&(e.scrollLeft=$,e.scrollTop=B)}),[n,d,$,B]),MA((()=>{(({focusedCellCoord:e,rootElement:t,shouldRefocus:r,isSelectionMode:n,setFocusedCellCoord:o,keyboard:i,announce:a,totalsPosition:s})=>{NA({focusType:YS.REMOVE_TAB,cell:TA(t)});const l=[s.atTop?2:1,e[1]],u=n?l:QS;if(o(u),!(e=>!e.enabled||e.active)(i))return;const c=r.current?YS.FOCUS:YS.ADD_TAB;r.current=!1;const d=_A(t,u);if(NA({focusType:c,cell:d}),n){var p;const e=null==d||null===(p=d.classList)||void 0===p?void 0:p.contains("selected");a({keys:[`${null==d?void 0:d.textContent},`,e?"SNTable.SelectionLabel.SelectedValue":"SNTable.SelectionLabel.NotSelectedValue"]})}})({focusedCellCoord:I,rootElement:b,shouldRefocus:O,setFocusedCellCoord:L,isSelectionMode:k,keyboard:v,announce:s,totalsPosition:g})}),[m.length,d,c,l]),MA((()=>{D(F)}),[F]),MA((()=>{M({type:VS.UPDATE_PAGE_ROWS,payload:{pageRows:m}})}),[m]),Qi.jsxs(LA,{ref:N,background:x.background,dir:i,onKeyDown:e=>{(({evt:e,totalRowCount:t,page:r,rowsPerPage:n,handleChangePage:o,setShouldRefocus:i,keyboard:a,isSelectionMode:s})=>{if(dw(e)){_f(e);const a=Math.ceil(t/n)-1;e.key===US.RIGHT&&r<a?(i(),o(r+1)):e.key===US.LEFT&&r>0&&(i(),o(r-1))}else if(e.key===US.ESC&&a.enabled&&!s){var l;_f(e),null===(l=a.blur)||void 0===l||l.call(a,!0)}else pw(e.key)&&_f(e)})({evt:e,totalRowCount:d,page:l,rowsPerPage:u,handleChangePage:W,setShouldRefocus:H,keyboard:v,isSelectionMode:k})},"data-testid":"sn-table",children:[Qi.jsx(KA,{}),Qi.jsx(UA,{ref:q,className:"sn-table-container",fullHeight:a||!S.active||!f,interactions:S,tabIndex:-1,role:"application","data-testid":"table-container",children:Qi.jsxs(YA,{styling:E,showRightBorder:P,stickyHeader:!0,"aria-label":z,children:[Qi.jsx(FI,{}),Qi.jsx(bI,{...e,setShouldRefocus:H,tableWrapperRef:N})]})}),Qi.jsx(IA,{footerContainer:a,pageInfo:n,paginationNeeded:f,theme:x,totalRowCount:d,totalColumnCount:c,totalPages:p,keyboard:v,translator:y,interactions:S,rect:A,layout:R,handleChangePage:W,handleChangeRowsPerPage:G,isSelectionMode:k})]})};var jI=O(zI);function $I(){return $I=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$I.apply(this,arguments)}function BI(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function HI(e,t){return HI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},HI(e,t)}function WI(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,HI(e,t)}var GI=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function VI(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(n=e[r],o=t[r],!(n===o||GI(n)&&GI(o)))return!1;var n,o;return!0}function UI(e,t){var r;void 0===t&&(t=VI);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}}function YI(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}var KI="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function XI(e){cancelAnimationFrame(e.id)}function JI(e,t){var r=KI();var n={id:requestAnimationFrame((function o(){KI()-r>=t?e.call(null):n.id=requestAnimationFrame(o)}))};return n}var ZI=-1;function QI(e){if(void 0===e&&(e=!1),-1===ZI||e){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",document.body.appendChild(t),ZI=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return ZI}var eL=null;function tL(e){if(void 0===e&&(e=!1),null===eL||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?eL="positive-descending":(t.scrollLeft=1,eL=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),eL}return eL}var rL=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function nL(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,m=e.initInstanceProps,h=e.shouldResetStyleCacheOnItemSizeChange,g=e.validateProps;return t=function(e){function t(t){var n;return(n=e.call(this,t)||this)._instanceProps=m(n.props,BI(n)),n._resetIsScrollingTimeoutId=null,n._outerRef=void 0,n.state={instance:BI(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=UI((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=UI((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(h&&s,h&&l,h&&u),f=e+":"+t;if(p.hasOwnProperty(f))o=p[f];else{var m=r(n.props,t,n._instanceProps),g="rtl"===l;p[f]=o={position:"absolute",left:g?void 0:m,right:g?m: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=UI((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(tL()){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&&XI(n._resetIsScrollingTimeoutId),n._resetIsScrollingTimeoutId=JI(n._resetIsScrolling,150)},n._resetIsScrolling=function(){n._resetIsScrollingTimeoutId=null,n.setState({isScrolling:!1},(function(){n._getItemStyleCache(-1)}))},n}WI(t,e),t.getDerivedStateFromProps=function(e,t){return oL(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,m=this.state,h=m.scrollLeft,g=m.scrollTop,b=QI();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,h,this._instanceProps,x):h,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(tL()){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&&XI(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?rL:p,m=e.outerElementType,h=e.outerTagName,g=e.rowCount,b=e.style,v=e.useIsScrolling,y=e.width,x=this.state.isScrolling,S=this._getHorizontalRangeToRender(),E=S[0],C=S[1],w=this._getVerticalRangeToRender(),R=w[0],I=w[1],L=[];if(n>0&&g)for(var D=R;D<=I;D++)for(var P=E;P<=C;P++)L.push(A(t,{columnIndex:P,data:d,isScrolling:v?x:void 0,key:f({columnIndex:P,data:d,rowIndex:D}),rowIndex:D,style:this._getItemStyle(D,P)}));var M=a(this.props,this._instanceProps),_=s(this.props,this._instanceProps);return A(m||h||"div",{className:r,onScroll:this._onScroll,ref:this._outerRefSetter,style:$I({position:"relative",height:i,width:y,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},b)},A(u||c||"div",{children:L,ref:l,style:{height:M,pointerEvents:x?"none":void 0,width:_}}))},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],m=c[3];this._callOnItemsRendered(a,s,d,p,l,u,f,m)}if("function"==typeof n){var h=this.state,g=h.horizontalScrollDirection,b=h.scrollLeft,v=h.scrollTop,y=h.scrollUpdateWasRequested,x=h.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),m=o(this.props,f,d,this._instanceProps),h=c&&"backward"!==u?1:Math.max(1,p),g=c&&"forward"!==u?1:Math.max(1,p);return[Math.max(0,f-h),Math.max(0,Math.min(t-1,m+g)),f,m]},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),m=f(this.props,d,u,this._instanceProps),h=s&&"backward"!==l?1:Math.max(1,c),g=s&&"forward"!==l?1:Math.max(1,c);return[Math.max(0,d-h),Math.max(0,Math.min(i-1,m+g)),d,m]},t}(N),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var oL=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},iL=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},aL=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},sL=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]},lL=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?uL(e,t,r,i,0,n):cL(e,t,r,Math.max(0,i),n)},uL=function(e,t,r,n,o,i){for(;o<=n;){var a=o+Math.floor((n-o)/2),s=sL(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},cL=function(e,t,r,n,o){for(var i="column"===e?t.columnCount:t.rowCount,a=1;n<i&&sL(e,t,n,r).offset<o;)n+=a,a*=2;return uL(e,t,r,Math.min(n,i-1),Math.floor(n/2),o)},dL=function(e,t,r,n,o,i,a){var s="column"===e?t.width:t.height,l=sL(e,t,r,i),u="column"===e?aL(t,i):iL(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}},pL=nL({getColumnOffset:function(e,t,r){return sL("column",e,t,r).offset},getColumnStartIndexForOffset:function(e,t,r){return lL("column",e,r,t)},getColumnStopIndexForStartIndex:function(e,t,r,n){for(var o=e.columnCount,i=e.width,a=sL("column",e,t,n),s=r+i,l=a.offset+a.size,u=t;u<o-1&&l<s;)u++,l+=sL("column",e,u,n).size;return u},getColumnWidth:function(e,t,r){return r.columnMetadataMap[t].size},getEstimatedTotalHeight:iL,getEstimatedTotalWidth:aL,getOffsetForColumnAndAlignment:function(e,t,r,n,o,i){return dL("column",e,t,r,n,o,i)},getOffsetForRowAndAlignment:function(e,t,r,n,o,i){return dL("row",e,t,r,n,o,i)},getRowOffset:function(e,t,r){return sL("row",e,t,r).offset},getRowHeight:function(e,t,r){return r.rowMetadataMap[t].size},getRowStartIndexForOffset:function(e,t,r){return lL("row",e,r,t)},getRowStopIndexForStartIndex:function(e,t,r,n){for(var o=e.rowCount,i=e.height,a=sL("row",e,t,n),s=r+i,l=a.offset+a.size,u=t;u<o-1&&l<s;)u++,l+=sL("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}}),fL=function(e,t){return e};function mL(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,BI(n)),n._outerRef=void 0,n._resetIsScrollingTimeoutId=null,n.state={instance:BI(n),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof n.props.initialScrollOffset?n.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},n._callOnItemsRendered=void 0,n._callOnItemsRendered=UI((function(e,t,r,o){return n.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:r,visibleStopIndex:o})})),n._callOnScroll=void 0,n._callOnScroll=UI((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,m="rtl"===a,h=f?d:0;c[e]=t={position:"absolute",left:m?void 0:h,right:m?h:void 0,top:f?0:d,height:f?"100%":p,width:f?p:"100%"}}return t},n._getItemStyleCache=void 0,n._getItemStyleCache=UI((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(tL()){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&&XI(n._resetIsScrollingTimeoutId),n._resetIsScrollingTimeoutId=JI(n._resetIsScrolling,150)},n._resetIsScrolling=function(){n._resetIsScrollingTimeoutId=null,n.setState({isScrolling:!1},(function(){n._getItemStyleCache(-1,null)}))},n}WI(t,e),t.getDerivedStateFromProps=function(e,t){return hL(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?QI():0:l.scrollHeight>l.clientHeight?QI():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(tL()){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&&XI(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?fL:d,f=e.layout,m=e.outerElementType,h=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,E=this._getRangeToRender(),C=E[0],w=E[1],R=[];if(u>0)for(var I=C;I<=w;I++)R.push(A(t,{data:c,key:p(I,c),index:I,isScrolling:b?y:void 0,style:this._getItemStyle(I)}));var L=n(this.props,this._instanceProps);return A(m||h||"div",{className:r,onScroll:S,ref:this._outerRefSetter,style:$I({position:"relative",height:i,width:v,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},g)},A(s||l||"div",{children:R,ref:a,style:{height:x?"100%":L,pointerEvents:y?"none":void 0,width:x?L:"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}(N),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var hL=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},gL=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]},bL=function(e,t,r,n,o){for(;n<=r;){var i=n+Math.floor((r-n)/2),a=gL(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},vL=function(e,t,r,n){for(var o=e.itemCount,i=1;r<o&&gL(e,r,t).offset<n;)r+=i,i*=2;return bL(e,t,Math.min(r,o-1),Math.floor(r/2),n)},yL=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},xL=mL({getItemOffset:function(e,t,r){return gL(e,t,r).offset},getItemSize:function(e,t,r){return r.itemMetadataMap[t].size},getEstimatedTotalSize:yL,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=gL(e,t,o),p=yL(e,o),f=Math.max(0,Math.min(p-c,d.offset)),m=Math.max(0,d.offset-c+d.size+i);switch("smart"===r&&(r=n>=m-c&&n<=f+c?"auto":"center"),r){case"start":return f;case"end":return m;case"center":return Math.round(m+(f-m)/2);default:return n>=m&&n<=f?n:n<m?m: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?bL(e,t,o,0,r):vL(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=gL(e,t,n),d=r+u,p=c.offset+c.size,f=t;f<a-1&&p<d;)f++,p+=gL(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 SL(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 EL=["style"],CL=["style"];function wL(e,t){var r=e.style,n=YI(e,EL),o=t.style,i=YI(t,CL);return!SL(r,o)&&!SL(n,i)}const RL=({style:e})=>Qi.jsx("div",{className:"sn-table-cell",style:{...e,borderWidth:"0px 1px 1px 0px",boxSizing:"border-box"}});var AL=S.memo(RL,wL);const IL=()=>{},LL=e=>e.preventDefault();const DL=({columnIndex:e,rowIndex:t,style:r,data:n})=>{var o;const{rowsInPage:i,columns:a,bodyStyle:s,isHoverEnabled:l,maxImageHeight:u}=n,c=Fw(kw,(e=>e.hoverIndex===t)),d=Fw(kw,(e=>e.setHoverIndex)),{interactions:p}=Fw(kw,(e=>e.baseProps)),f=Fw(kw,(e=>e.showRightBorder)),m=null===(o=i[t])||void 0===o?void 0:o[e],{handleMouseDown:h,handleMouseOver:g,handleMouseUp:b,cellSelectionState:v}=function(e){const{interactions:t}=Fw(kw,(e=>e.baseProps)),r=Fw(kw,(e=>e.selectionDispatch)),n="object"==typeof e,o=Fw(kw,(t=>n?mw(e,t.selectionState):GS.INACTIVE)),i=t.active&&t.select;if(n&&i){const{handleMouseDown:t,handleMouseOver:n,handleMouseUp:i}=sI(LL,e,r,IL);return{handleMouseDown:t,handleMouseOver:n,handleMouseUp:i,cellSelectionState:o}}return{cellSelectionState:o}}(m);if("object"==typeof m){var y;const n=((e,t,r,n,o)=>{const{hoverColors:i,lastRowBottomBorder:a,...s}=o,l=t.qAttrExprInfoIDs.length?Mw(s,e.qAttrExps,t.qAttrExprInfoIDs):s;return n===GS.SELECTED?{...l,...nw.SELECTED}:n===GS.EXCLUDED?{...l,color:r?null==i?void 0:i.color:l.color,background:`${nw.EXCLUDED_BACKGROUND}, ${r?null==i?void 0:i.background:l.background}`}:r?{...l,...i}:l})(m,a[e],l&&c,v,s),o={rowindex:t,columnindex:e};return Qi.jsx("div",{className:`sn-table-cell ${v} ${sh}`,style:{...r,...n,display:"flex",alignItems:"start",borderWidth:"0px",borderBottomWidth:m.isLastRow?"0px":"1px",borderRightWidth:m.isLastColumn&&!f?"0px":"1px",borderStyle:"solid",justifyContent:m.representation.type===xv.Image&&"fitHeight"===m.representation.imageSize?null===(y=m.representation)||void 0===y||null===(y=y.resolvedImagePosition)||void 0===y?void 0:y.horizontal:m.align,padding:"4px 12px",boxSizing:"border-box",cursor:"default",overflow:"hidden"},onMouseDown:h,onMouseUp:b,onMouseOver:g,onMouseEnter:l?()=>d(t):void 0,onMouseLeave:l?()=>d(-1):void 0,title:p.passive?m.representation.text:void 0,...o,children:Qi.jsx(nI,{cell:m,style:n,maxImageHeight:u,virtualizedCell:!0})})}return Qi.jsx(AL,{style:{...r,...s,borderWidth:"0px 1px 1px 0px",borderStyle:"solid",boxSizing:"border-box"}})};var PL=S.memo(DL,wL);const ML=e=>{const t=_(e);return t.current=e,t},_L=({qLeft:e,qTop:t,qWidth:r,qHeight:n})=>`${e}-${t}-${r}-${n}`,TL=(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((null==t?void 0:t.rowIdx)!==o)return!0}return!1},kL=(e,t,r,n)=>{const o=e.slice(r,n);return 0===o.length||o.some((e=>!(null!=e&&e[t])))},OL=(e,t,r,n,o,i,a)=>{e.forEach((e=>{e.qMatrix.forEach(((s,l)=>{const u=e.qArea.qTop-t.page*t.rowsPerPage,{row:c,pageRowIdx:d}=((e,t,r,n,o,i,a,s,l)=>{var u;const{qSize:c}=a.qHyperCube,d=n.qTop+r,p=o+r,f=null!==(u=e[p])&&void 0!==u?u:[];return t.forEach(((e,t)=>{var r,o;const a=t+n.qLeft,{colIdx:u,isDim:m,isLocked:h,bodyTextAlign:g,selectionColIdx:b,qAttrExprInfoIndex:v,representation:y}=i[a],x=Iv(e);f[a]=null!==(r=f[a])&&void 0!==r?r:{id:Cb(),...e,align:kv(e,g),rowIdx:d,colIdx:u,isSelectable:m&&!h,pageRowIdx:p,pageColIdx:a,selectionColIdx:b,isLastRow:d===c.qcy-1,isLastColumn:a===c.qcx-1,isNumeric:x,representation:Rv(e,y,v,l)},s(null!==(o=f[a].representation.text)&&void 0!==o?o:"",p,a,x)})),{row:f,pageRowIdx:p}})(r,s,l,e.qArea,u,n,o,i,a);r[d]=c}))}))},qL=({layout:e,model:t,theme:r,initialDataPages:n,pageInfo:o,rowCount:i,visibleRowCount:a,visibleColumnCount:s,columns:l,setCellSize:u,gridState:c})=>{const d=Fw(kw,(e=>e.env)),p=_([]),f=ML(u),m=T(((t,r)=>{const n=Array.isArray(r)?r.slice(0,i):(e=>Array(e).fill(void 0))(i);return OL(t,o,n,l,e,f.current,d),p.current=n,n}),[i,o,l,e,f,d]),[h,g]=E((()=>m(null!=n?n:[])));eh((()=>{g(m(null!=n?n:[]))}),[n]);const b=((e,t)=>{const r=_(new Set),n=_(new Set),o=_(new Set),i=ML(e),a=ML(t),s=C((()=>({enqueue:e=>{const t=_L(e);o.current.has(t)||(r.current.add(e),o.current.add(t),1===r.current.size&&setTimeout((async()=>{const e=Array.from(r.current.values());if(0!==e.length){r.current.clear(),n.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 i.current(t);n.current.has(e)&&a.current(r)}catch(t){e.forEach((e=>{o.current.delete(_L(e))}))}finally{n.current.delete(e)}}}),75))},clear:()=>{r.current.clear(),n.current.clear(),o.current.clear()}})),[i,a]);return s})((e=>t.getHyperCubeData("/qHyperCubeDef",e)),(e=>g((t=>m(e,t))))),v=T(((e,t,r,n)=>{for(let o=e;o<e+r;o++)if(kL(p.current,o,t,n)){const e={qLeft:o,qTop:t,qHeight:n,qWidth:1};b.enqueue(e)}}),[p,b]),y=T(((e,t,r,n)=>{for(let i=t;i<t+n;i++){const t=Math.max(0,i-o.page*o.rowsPerPage);if(TL(p.current,e,t,r,i)){const t={qLeft:e,qTop:i,qHeight:1,qWidth:r};b.enqueue(t)}}}),[p,b,o]);return w((()=>{const{qcx:t,qcy:r}=e.qHyperCube.qSize,n=c.current.overscanRowStartIndex,i=c.current.overscanColumnStartIndex,l=n+o.page*o.rowsPerPage,u=t-i,d=o.rowsPerPage-n,p=Math.min(100,u,t,s+5),f=Math.min(100,d,r,a+25);return y(i,l,p,f),()=>{b.clear()}}),[e,a,s,o,b,y,c,r]),{rowsInPage:h,loadRows:y,loadColumns:v}},NL=({style:e,columnWidths:t,rowHeight:r,pageInfo:n,rowCount:o,gridRef:i,lineRef:a,columns:s,fontWeight:l,gridState:u,isSnapshot:c,viewService:d,maxNbrLines:p=3,isStaticNbrOfLines:f,allColumnsIconVisibilityStatus:m})=>{const h=_({lastScrollToRatio:0,resetAfterRowIndex:0,heights:[],totalHeight:0,count:0,measuredCells:new Map}),{layout:g,rect:b}=Fw(kw,(e=>e.baseProps)),[v,y]=E(r||24),{measureText:x,estimateLineCount:S}=Jm({...e,fontWeight:l},{maxNbrLinesOfText:p}),C=iI(e.fontSize),w=8e6/o-8-1,R=Math.max(0,Math.min(p,Math.round(w/C))),A=aI({maxNbrLines:R,isStaticNbrOfLines:f,lineHeight:C}),I=f?R*C:C,L=T(((e,r,n)=>{const o=s?(({width:e,columnIconsVisibilityStatus:t})=>{let r=0,n=0,o=0,i=0;if(t){const{shouldShowLockIcon:e,shouldShowSortIcon:r,shouldShowMenuIcon:a}=t;n=e?20:0,o=r?20:0,i=a?24:0}return r=e-25-n-o-i,Math.max(0,r)})({width:t[r],columnIconsVisibilityStatus:null==m?void 0:m[r]}):(e=>Math.max(0,e-24-1))(t[r]),i=Math.min(R,S({text:e.trim(),maxWidth:o,isNumeric:n}));return Math.max(1,i)*C+8+1}),[t,C,R,s,S,m]),D=T(((e,t,n,o=!1,i=!1)=>{const a=`${t}-${n}`;if(h.current.measuredCells.has(a))return;if(f)return h.current.measuredCells.set(a,[e,t,n,o]),void y(A);h.current.measuredCells.set(a,[e,t,n,o]);const l=r||24,d=((e,t,r)=>{var n;return(null==t||null===(n=t[e].representation)||void 0===n?void 0:n.type)===xv.Image&&r})(n,s,u)?l:L(e,n,o),p=h.current.heights[t],m=d-p;m>0?(h.current.totalHeight+=m,h.current.heights[t]=d):void 0===p&&(h.current.count+=1,h.current.totalHeight+=d,h.current.heights[t]=d),i||c||y(h.current.totalHeight/h.current.count)}),[L,c,f,A,s,r,u]),P=T((e=>{var t;return null!==(t=h.current.heights[e])&&void 0!==t?t:v}),[h,v]),M=T((()=>{h.current.lastScrollToRatio=0,h.current.resetAfterRowIndex=0,h.current.heights=[],h.current.totalHeight=0,h.current.count=0,h.current.measuredCells.clear()}),[h]),k=ML(D),O=T((()=>{if(f)return void M();const e=new Map(h.current.measuredCells);M(),e.forEach((([e,t,r,n])=>{k.current(e,t,r,n,!0)})),c||y(h.current.totalHeight/h.current.count)}),[M,c,k,f]);eh((()=>{M()}),[g,n]),eh((()=>{O()}),[x,b.width]);return null!=i&&i.current?i.current.resetAfterRowIndex(h.current.resetAfterRowIndex,!1):null!=a&&a.current&&a.current.resetAfterIndex(h.current.resetAfterRowIndex,!1),d.estimatedRowHeight=v,{setCellSize:D,getRowHeight:P,rowMeta:h,estimatedRowHeight:v,maxLineCount:R,resizeVisibleCells:e=>{if(!u||f)return;M();const{overscanRowStartIndex:t,overscanRowStopIndex:r}=u.current,n=Math.min(r,g.qHyperCube.qSize.qcy-1);for(let r=t;r<=n;r++){var o;const t=null!==(o=e[r])&&void 0!==o?o:{};Object.values(t).forEach((e=>{var t;"object"==typeof e&&D(null!==(t=e.representation.text)&&void 0!==t?t:"",r,e.pageColIdx,e.isNumeric)}))}},resizeAllCells:O,resetRowMeta:M,maxImageHeight:I}};var FL;!function(e){e.Left="Left",e.Right="Right",e.Up="Up",e.Down="Down",e.None="None"}(FL||(FL={}));const zL={enabled:!1},jL=()=>{},$L={current:null};const BL=(e,t,r,n,o)=>{const i=Math.min(t.rowsPerPage,e.qHyperCube.qSize.qcy-t.page*t.rowsPerPage),a=Math.min(i,Math.ceil(r.height/o)),s=C((()=>n.reduce(((e,t)=>e.width<r.width?{width:e.width+t,count:e.count+1}:e),{count:0,width:0})),[r,n]).count;return{rowCount:i,visibleRowCount:a,visibleColumnCount:s}},HL=({columnIndex:e,data:t,rowIndex:r})=>{var n,o;const i=null===(n=t.rowsInPage[r])||void 0===n?void 0:n[e];return null!==(o=null==i?void 0:i.id)&&void 0!==o?o:`${r}-${e}`},WL={overflow:"hidden",willChange:"auto"};var GL=O(k(((e,t)=>{var r;const{rect:n,columns:o,innerForwardRef:i,pageInfo:a,bodyStyle:s,rowHeight:l,headerAndTotalsHeight:u,syncHeight:c}=e,{flags:d}=Fw(kw,(e=>e.env)),{layout:p,model:f,theme:m,viewService:h}=Fw(kw,(e=>e.baseProps)),g=Fw(kw,(e=>e.columnWidths)),b=Fw(kw,(e=>e.initialDataPages)),{maxNbrLines:v,isStaticNbrOfLines:y}=ZA({viewService:h,layout:p,isImagesEnabled:d.isEnabled("CLIENT_IM_5715_LINKS_AND_IMAGES")}),x=_(null),S=_({overscanColumnStartIndex:0,overscanRowStartIndex:0,overscanColumnStopIndex:0,overscanRowStopIndex:0}),E=!(null===(r=Iw(p))||void 0===r||null===(r=r.content)||void 0===r||!r.hoverEffect),{scrollHandler:R,verticalScrollDirection:A,horizontalScrollDirection:I}=(()=>{const e=_(0),t=_(0),r=_(FL.None),n=_(FL.None);return{scrollHandler:T((({scrollTop:o,scrollLeft:i})=>{o>t.current?r.current=FL.Down:o<t.current?r.current=FL.Up:r.current=FL.None,i>e.current?n.current=FL.Right:i<e.current?n.current=FL.Left:n.current=FL.None,t.current=o,e.current=i}),[t,e,r,n]),verticalScrollDirection:r,horizontalScrollDirection:n}})(),{rowCount:L,visibleRowCount:D,visibleColumnCount:P}=BL(p,a,n,g,l),{setCellSize:M,getRowHeight:k,rowMeta:O,estimatedRowHeight:N,maxLineCount:z,resizeVisibleCells:j,maxImageHeight:$}=NL({pageInfo:a,style:s,rowHeight:l,columnWidths:g,columns:o,gridRef:x,rowCount:L,gridState:S,isSnapshot:!!p.snapshotData,viewService:h,maxNbrLines:v,isStaticNbrOfLines:y}),{rowsInPage:B,loadRows:H,loadColumns:W}=qL({layout:p,model:f,theme:m,initialDataPages:b,pageInfo:a,rowCount:L,visibleRowCount:D,visibleColumnCount:P,columns:o,setCellSize:M,gridState:S}),G=(({layout:e,loadRows:t,loadColumns:r,verticalScrollDirection:n,horizontalScrollDirection:o,rowCount:i,pageInfo:a,gridState:s,viewService:l})=>T((({overscanColumnStartIndex:u,overscanColumnStopIndex:c,overscanRowStartIndex:d,overscanRowStopIndex:p,visibleColumnStartIndex:f,visibleColumnStopIndex:m,visibleRowStartIndex:h,visibleRowStopIndex:g})=>{if(s.current.overscanColumnStartIndex=u,s.current.overscanColumnStopIndex=c,s.current.overscanRowStartIndex=d,s.current.overscanRowStopIndex=p,d>i)return;const b=u,v=d+a.page*a.rowsPerPage,y=c-u+1,x=p-d+1;if(l.visibleLeft=f,l.visibleWidth=m-f+1,l.visibleTop=h+a.page*a.rowsPerPage,l.visibleHeight=g-h+1,l.page=a.page,l.rowsPerPage=a.rowsPerPage,n.current===FL.Down){const e=x+25;t(b,v,y,d+e>i?i-d:e)}else if(n.current===FL.Up){const e=x+25,r=a.page*a.rowsPerPage,n=Math.max(r,v-25);t(b,n,y,e)}if(o.current===FL.Right){const t=e.qHyperCube.qSize.qcx-b,n=y+5,o=Math.min(t,n);r(b,v,o,x)}else if(o.current===FL.Left){const t=Math.max(0,b-5),n=Math.min(e.qHyperCube.qSize.qcx,y+5);r(t,v,n,x)}}),[s,i,a.page,a.rowsPerPage,l,n,o,t,e.qHyperCube.qSize.qcx,r]))({layout:p,loadRows:H,loadColumns:W,verticalScrollDirection:A,horizontalScrollDirection:I,rowCount:L,pageInfo:a,gridState:S,viewService:h}),V=C((()=>({rowsInPage:B,columns:o,bodyStyle:s,isHoverEnabled:E,maxLineCount:z,maxImageHeight:$})),[B,o,s,E,z,$]),U=((e,t,r,n)=>{let{height:o}=e;return o-=t,r*n<o&&(o=Math.min(r*n,o)),o})(n,u,L,N);return q((()=>{var e,t;c(null!==(e=null===(t=i.current)||void 0===t?void 0:t.clientHeight)&&void 0!==e?e:0,!0)}),[L,c,i]),q((()=>{var e,t,r;(c(null!==(e=null===(t=i.current)||void 0===t?void 0:t.clientHeight)&&void 0!==e?e:0,!1),1===O.current.lastScrollToRatio)&&(null===(r=x.current)||void 0===r||r.scrollToItem({rowIndex:L-1,align:"start"}))})),function(e){const{selectionsAPI:t}=Fw(kw,(e=>e.baseProps)),r=Fw(kw,(e=>e.selectionDispatch));w((()=>{r({type:VS.UPDATE_PAGE_ROWS,payload:{pageRows:e}})}),[r,e]),oI({selectionsAPI:t,selectionDispatch:r,setShouldRefocus:jL,keyboard:zL,tableWrapperRef:$L})}(B),eh((()=>{var e;null===(e=x.current)||void 0===e||e.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!1})}),[p,a,m,n.width,g]),F(t,(()=>({interpolatedScrollTo:(e,t)=>{var r,n;const o=(null!==(r=null===(n=i.current)||void 0===n?void 0:n.clientHeight)&&void 0!==r?r:U)-U,a=Math.round(o*e);var s,l,u;(O.current.lastScrollToRatio=e,1===O.current.lastScrollToRatio)?(null===(s=x.current)||void 0===s||s.scrollToItem({rowIndex:L-1,align:"start"}),null===(l=x.current)||void 0===l||l.scrollTo({scrollLeft:t})):null===(u=x.current)||void 0===u||u.scrollTo({scrollTop:a,scrollLeft:t})},resizeCells:()=>{var e;null===(e=x.current)||void 0===e||e.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!1}),j(B)}})),[i,U,O,L,j,B]),Qi.jsx(pL,{"data-key":"body",ref:x,innerRef:i,style:WL,columnCount:p.qHyperCube.qSize.qcx,columnWidth:e=>g[e],height:U,rowCount:L,rowHeight:k,estimatedRowHeight:N,width:n.width,itemData:V,onItemsRendered:G,onScroll:R,itemKey:HL,className:"sn-table-body",children:PL})})));const VL=({width:e,height:t,children:r})=>Qi.jsx("div",{"data-key":"full-size-container",style:{display:"block",width:e,height:t},children:r}),UL=$S("div",{shouldForwardProp:e=>"interactions"!==e&&"hoverBackground"!==e&&"background"!==e&&"applicableStyle"!==e})((({interactions:e,hoverBackground:t,background:r,applicableStyle:n})=>({...n,background:r,"&&:hover":{background:e.active?t:r}}))),YL=({index:e,style:t,data:r})=>{const{columns:n,columResizeHandler:o,allColumnsIconVisibilityStatusRef:i}=r,{interactions:a,styling:s}=Fw(kw,(e=>e.baseProps)),l=Fw(kw,(e=>{var t;return null===(t=e.baseProps.selectionsAPI)||void 0===t?void 0:t.isModal()})),u=Fw(kw,(e=>e.showRightBorder)),c=!!a.active&&!l,{open:d,setOpen:p,handleOpenMenu:f,setIsAdjustingWidth:m}=OI({isInteractionEnabled:c,columnsData:n}),h=n[e],g=n.length-1===e,b="right"===h.headTextAlign?"row-reverse":"row";return Qi.jsxs(UL,{className:`sn-table-cell ${sh}`,title:a.passive?h.label:void 0,onClick:f,applicableStyle:s.head,style:{...t,cursor:"pointer",display:"flex",alignItems:"flex-end",borderStyle:"solid",borderWidth:g&&!u?"0px 0px 1px 0px":"0px 1px 1px 0px",padding:"4px",justifyContent:h.headTextAlign,boxSizing:"border-box",zIndex:n.length-e,flexDirection:b,userSelect:"none",fontWeight:aw},interactions:a,hoverBackground:s.head.hoverBackground,background:d?s.head.activeBackground:s.body.background,children:[Qi.jsx(kI,{column:h,isInteractionEnabled:c,open:d,setOpen:p,allColumnsIconVisibilityStatusRef:i}),Qi.jsx(vI,{column:h,isLastColumn:g,onColumnResize:o,setIsAdjustingWidth:m})]})},KL=(e,t,r,n,o)=>{q((()=>{var t;null==e||null===(t=e.current)||void 0===t||t.resetAfterIndex(0,!0)}),[t,r,e,n,o])},XL={overflow:"hidden",boxSizing:"border-box",willChange:"auto"},JL=e=>{const{rect:t,forwardRef:r,columns:n,pageInfo:o,rowHeight:i,columResizeHandler:a,allColumnsIconVisibilityStatusRef:s}=e,{layout:l,theme:u}=Fw(kw,(e=>e.baseProps)),c=Fw(kw,(e=>e.columnWidths));return KL(r,l,o,c,u),Qi.jsx(xL,{ref:r,layout:"horizontal",style:XL,itemCount:l.qHyperCube.qSize.qcx,itemSize:e=>c[e],height:i,width:t.width,itemData:{columns:n,columResizeHandler:a,allColumnsIconVisibilityStatusRef:s},children:YL})};var ZL=O(JL);const QL=S.forwardRef(((e,t)=>{const{children:r,width:n,height:o,onScroll:i}=e,{interactions:a}=Fw(kw,(e=>e.baseProps));return Qi.jsx("div",{"data-testid":"scrollable-container",ref:t,style:{overflow:a.active?"auto":"hidden",width:n,height:o},onScroll:i,children:r})})),eD=({children:e,rect:t})=>Qi.jsx("div",{"data-testid":"sticky-container",style:{position:"sticky",top:"0px",left:"0px",width:t.width,height:t.height},children:e}),tD=({index:e,style:t,data:r})=>{const{layout:n,interactions:o,styling:i}=Fw(kw,(e=>e.baseProps)),a=Fw(kw,(e=>e.showRightBorder)),{totalsStyle:{hoverColors:s,...l},columns:u,totals:c}=r,d=u[e].totalInfo,{totalsTextAlign:p,isTotalNumeric:f}=u[e],m=n.qHyperCube.qSize.qcx-1===e;return Qi.jsx("div",{className:`sn-table-cell ${sh}`,title:o.passive?d:void 0,style:{...t,...l,background:i.body.background,display:"flex",alignItems:c.atTop?"end":"start",borderStyle:"solid",borderLeftWidth:"0px",borderRightWidth:m&&!a?"0px":"1px",borderTopWidth:c.atBottom?"1px":"0px",borderBottomWidth:c.atTop?"1px":"0px",padding:"4px 12px",justifyContent:p,boxSizing:"border-box",cursor:"default",fontWeight:aw},children:Qi.jsx(QA,{wordBreak:!f,lines:3,virtualizedCell:!0,children:d})})},rD=e=>{const{rect:t,forwardRef:r,pageInfo:n,totals:o,rowHeight:i,columns:a}=e,{layout:s,styling:l,theme:u}=Fw(kw,(e=>e.baseProps)),c=Fw(kw,(e=>e.columnWidths));return KL(r,s,n,c,u),Qi.jsx(xL,{ref:r,layout:"horizontal",style:XL,itemCount:s.qHyperCube.qSize.qcx,itemSize:e=>c[e],height:i,width:t.width,itemData:{totalsStyle:l.totals,columns:a,totals:o},children:tD})};var nD=O(rD);const oD=({columns:e,columnWidths:t,pageInfo:r,headerRef:n,totalsRef:o,totalsPosition:i,isSnapshot:a,viewService:s,allColumnsIconVisibilityStatus:l})=>{const{styling:u}=Fw(kw,(e=>e.baseProps)),c=NL({style:u.head,columnWidths:t,lineRef:n,rowCount:1,pageInfo:r,fontWeight:aw,columns:e,isSnapshot:a,viewService:s,allColumnsIconVisibilityStatus:l}),d=NL({style:u.totals,columnWidths:t,lineRef:o,rowCount:1,pageInfo:r,fontWeight:aw,isSnapshot:a,viewService:s});e.forEach(((e,t)=>{c.setCellSize(e.label,0,t),d.setCellSize(e.totalInfo,0,t,Av(e.totalInfo))}));const p=c.getRowHeight(0)+8,f=d.getRowHeight(0);return{headerRowHeight:p,totalsRowHeight:f,bodyRowHeight:a?s.estimatedRowHeight:(({fontSize:e=sw.fontSize})=>Math.max(24,Ew(e)))(u.body),headerAndTotalsHeight:i.atTop||i.atBottom?p+f:p,resizeAllHeaderCells:c.resizeAllCells,resizeAllTotalCells:d.resizeAllCells}},iD=e=>{var t;const{pageInfo:r}=e,{totalsPosition:n,columns:o,paginationNeeded:i}=Fw(kw,(e=>e.tableData)),{layout:a,theme:s,styling:l,rect:u,viewService:c}=Fw(kw,(e=>e.baseProps)),d=Fw(kw,(e=>e.columnWidths)),p=Fw(kw,(e=>e.setYScrollbarWidth)),f=_(null),m=_(null),h=_(null),g=_(null),b=_(),{xScrollbarWidth:v,yScrollbarWidth:y}=GA(f),x=C((()=>{var e;return{...l.body,background:null!==(e=s.background.color)&&void 0!==e?e:"transparent"}}),[s.background.color,l]),S=_([]),{headerRowHeight:w,totalsRowHeight:R,bodyRowHeight:A,headerAndTotalsHeight:I,resizeAllHeaderCells:L,resizeAllTotalCells:D}=oD({columns:o,columnWidths:d,pageInfo:r,totalsPosition:n,headerRef:m,totalsRef:h,isSnapshot:!!a.snapshotData,viewService:c,allColumnsIconVisibilityStatus:S.current}),P=C((()=>((e,t)=>{const r=e.height-(t?41:0);return{width:e.width,height:r}})(u,i)),[u,i]),M=C((()=>((e,t,r)=>({width:e.width-r,height:e.height-t}))(P,v,y)),[P,v,y]),{rowCount:k}=BL(a,r,M,d,A),[O,N]=E(k*A+I),F=d.reduce(((e,t)=>e+t),0),z=((e,t,r,n)=>T((o=>{var i,a,s;const{scrollHeight:l,clientHeight:u,scrollTop:c,scrollLeft:d}=o.currentTarget,p=Math.max(0,Math.min(1,c/(l-u)));n.scrollTopRatio=p,n.scrollLeft=d,null===(i=r.current)||void 0===i||i.interpolatedScrollTo(Number.isNaN(p)?0:p,d),null===(a=e.current)||void 0===a||a.scrollTo(d),null===(s=t.current)||void 0===s||s.scrollTo(d)}),[n,r,e,t]))(m,h,g,c),j=T(((e,t=!1)=>{const r=e+I;(O<M.height&&r>M.height||t)&&N(r)}),[O,I,M.height]),$=T((()=>{var e;f.current&&(f.current.scrollTop=0),null===(e=g.current)||void 0===e||e.resizeCells(),L(),D()}),[f,L,D]);q((()=>{f.current&&(f.current.scrollLeft=0,f.current.scrollTop=0)}),[o.length]),q((()=>{f.current&&(f.current.scrollTop=0)}),[r,k,s]),MA((()=>{p(y)}),[y]);const B=Qi.jsx(nD,{rect:M,pageInfo:r,columns:o,forwardRef:h,totals:n,rowHeight:R});return Qi.jsx(QL,{ref:f,width:P.width,height:P.height,onScroll:z,children:Qi.jsx(VL,{width:F,height:O,children:Qi.jsxs(eD,{rect:M,children:[null!==(t=c.viewState)&&void 0!==t&&t.skipHeader?null:Qi.jsx(ZL,{rect:M,pageInfo:r,columns:o,forwardRef:m,rowHeight:w,columResizeHandler:$,allColumnsIconVisibilityStatusRef:S}),n.atTop?B:null,Qi.jsx(GL,{ref:g,innerForwardRef:b,bodyStyle:x,rect:M,pageInfo:r,columns:o,rowHeight:A,headerAndTotalsHeight:I,syncHeight:j}),n.atBottom?B:null]})})})};var aD=O(iD);const sD=()=>{const{theme:e,keyboard:t,translator:r,interactions:n,rect:o,layout:i}=Fw(kw,(e=>e.baseProps)),{paginationNeeded:a,totalRowCount:s,totalColumnCount:l,totalPages:u}=Fw(kw,(e=>e.tableData)),c=Fw(kw,(e=>e.pageInfo)),d=Fw(kw,(e=>e.setPage));return Qi.jsxs(LA,{"data-testid":"sn-table",background:e.background,dir:"ltr",children:[Qi.jsx(aD,{pageInfo:c}),Qi.jsx(IA,{paginationNeeded:a,handleChangePage:e=>d(e),pageInfo:c,totalRowCount:s,totalColumnCount:l,totalPages:u,keyboard:t,translator:r,theme:e,interactions:n,rect:o,layout:i})]})};var lD=O(sD);var uD,cD={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 in den Tabellenzellen zu navigieren, und die Tabulatortaste, um zu den Paginierungssteuerungen zu wechseln. Alle Angaben zur Tastaturnavigation finden Sie in der Dokumentation.","en-US":"Use arrow keys to navigate in table cells and tab to move to pagination controls. For the full range of keyboard navigation, see the documentation.","es-ES":"Use las teclas de flecha para navegar en las celdas de la tabla y la pestaña para moverse a los controles de paginación. Para conocer la gama completa de navegación con teclado, consulte la documentación.","fr-FR":"Utilisez les touches fléchées pour parcourir les cellules du tableau et la tabulation pour accéder aux commandes de pagination. Pour connaître la gamme complète des commandes de navigation au clavier, voir la documentation.","it-IT":"Utilizzare i tasti freccia per navigare nelle celle della tabella e il tasto TAB per passare ai controlli di paginazione. Per informazioni complete sulla navigazione da tastiera, vedere la documentazione.","ja-JP":"矢印キーで表のセル内を移動し、タブ キーでページネーション コントロールに移動します。キーボード ナビゲーションの全範囲については、ドキュメントをご覧ください。","ko-KR":"화살표 키를 사용하여 테이블 셀을 탐색하고 탭을 사용하여 페이지 매김 컨트롤로 이동합니다. 전체 키보드 탐색 범위는 설명서를 참조하십시오.","nl-NL":"Gebruik de pijltjestoetsen om te navigeren in tabelcellen en de Tab-toets om naar besturingselementen voor paginering te gaan. Raadpleeg de documentatie voor een volledig overzicht van de toetsenbordnavigatie.","pl-PL":"Użyj klawiszy strzałek do poruszania się po komórkach tabeli oraz tabulatora do poruszania się po elementach sterujących stronami. Pełne informacje o nawigacji przy użyciu klawiatury zawiera dokumentacja.","pt-BR":"Use as setas para navegar nas células da tabela e Tab para mover para os controles de paginação. Para toda a gama de navegação do teclado, consulte a documentação.","ru-RU":"Используйте клавиши со стрелками для перемещения по ячейкам таблицы и клавишу табуляции для перехода к элементам управления разбивки на страницы. Полный перечень возможностей навигации с помощью клавиатуры см. в документации.","sv-SE":"Använd piltangenterna för att navigera i tabellcellerna och tabbtangenten för att flytta till pagineringskontrollerna. Se dokumentationen för komplett information om tangentbordsnavigering.","tr-TR":"Tablo hücrelerinde gezinmek için ok tuşlarını, sayfalandırma kontrollerine geçmek için sekmeyi kullanın. Tam kapsamlı klavye gezintisi için belgelere bakın.","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":"已依遞減順序排序。"}}};!function(e){e.FIRST="first-announcer-element",e.SECOND="second-announcer-element"}(uD||(uD={}));const dD=(e,t)=>o((()=>(function(e){if(e&&e.get&&e.add){const t="SNTable.Accessibility.RowsAndColumns";if(e.get(t)!==t)return;Object.keys(cD).forEach((t=>{e.add(cD[t])}))}}(t),((e,t,r)=>{let n=r||null;return({keys:r,shouldBeAtomic:o=!0,politeness:i="polite"})=>{const a=r.map((e=>{if(Array.isArray(e)){const[r,...n]=e;return t.get(r,n)}return t.get(e)})).join(" "),s=e.querySelector(".sn-table-announcer-1"),l=e.querySelector(".sn-table-announcer-2");let u;n===uD.FIRST?(u=l,n=uD.SECOND):(u=s,n=uD.FIRST),u.innerHTML=u.innerHTML.endsWith(" ­")?a:`${a} ­`,u.setAttribute("aria-atomic",o.toString()),u.setAttribute("aria-live",i)}})(e,t))),[e,t.language()]),pD={page:0,rowsPerPage:100,rowsPerPageOptions:[10,25,100]},fD=({app:e,model:n,rootElement:o,layout:i,interactions:l,translator:u,selectionsAPI:c,theme:d,changeSortOrder:p,keyboard:f,rect:m,embed:h,reactRoot:g,applyColumnWidths:b,isFontLoaded:v,viewService:y,env:x})=>{const{direction:S,footerContainer:E}=a(),C=qv(i,y),w=Nv(i,y),R=dD(o,u),A=C?{page:y.page||pD.page,rowsPerPage:y.rowsPerPage||pD.rowsPerPage,rowsPerPageOptions:pD.rowsPerPageOptions}:pD,[I,L]=t(A),[D]=s((async()=>w?async function(e,t,r,n,o,i){var a,s;const{page:l,rowsPerPage:u,rowsPerPageOptions:c}=r,d=t.qHyperCube.qSize.qcx,p=t.qHyperCube.qSize.qcy,f=Math.ceil(p/u),m=null!==(a=o.visibleTop)&&void 0!==a?a:l*u,h=null!==(s=o.visibleHeight)&&void 0!==s?s:Math.min(u,p-m);if(l>0&&m>=p)return n({...r,page:0}),null;if(h*d>Lv)return n({...r,rowsPerPage:Dv(d,c),page:0}),null;const g=p>10,b=Pv(t,o),v=Ov(t),y=!!t.snapshotData,x=y?t.qHyperCube.qDataPages:await e.getHyperCubeData("/qHyperCubeDef",[{qTop:m,qLeft:0,qHeight:h,qWidth:d}]);o&&!y&&(o.qTop=m,o.qHeight=h,o.rowsPerPage=r.rowsPerPage,o.page=r.page);const S=(null==x?void 0:x[0].qMatrix.map(((e,t)=>{const r=[];return v.forEach(((n,o)=>{r[o]={id:Cb(),...e[o],align:kv(e[o],n.bodyTextAlign),rowIdx:t+m,colIdx:n.colIdx,pageRowIdx:t,pageColIdx:o,selectionColIdx:n.selectionColIdx,isSelectable:n.isDim&&!n.isLocked,isLastRow:t===h-1,isNumeric:Iv(e[o]),representation:Rv(e[o],n.representation,n.qAttrExprInfoIndex,i)}})),r})))||[];return{totalColumnCount:d,totalRowCount:p,totalPages:f,paginationNeeded:g,totalsPosition:b,columns:v,rows:S}}(n,i,I,L,y,x):null),[i,I,n,l,w]);r((()=>{!!(w&&g&&n&&(i.snapshotData||e)&&i&&D&&p&&d&&c&&v&&h)&&function(e,t){const{app:r,model:n,direction:o,selectionsAPI:i,layout:a,translator:s,interactions:l,theme:u,keyboard:c,rootElement:d,embed:p,changeSortOrder:f,applyColumnWidths:m,tableData:h,rect:g,viewService:b,env:v,...y}=e,x=zw(o);null==t||t.render(Qi.jsx(ln,{stylisPlugins:"rtl"===o?[ZS]:void 0,children:Qi.jsx(HS,{theme:x,children:Qi.jsx(Nw,{app:r,model:n,tableData:h,selectionsAPI:i,layout:a,translator:s,interactions:l,theme:u,keyboard:c,rootElement:d,embed:p,changeSortOrder:f,applyColumnWidths:m,rect:g,viewService:b,env:v,children:Qi.jsx(jI,{...y,direction:o})})})}))}({app:e,model:n,rootElement:o,layout:i,tableData:D,direction:S,pageInfo:I,setPageInfo:L,interactions:l,translator:u,selectionsAPI:c,theme:d,changeSortOrder:p,keyboard:f,rect:m,footerContainer:E,announce:R,embed:h,applyColumnWidths:b,viewService:y,env:x},g)}),[e,n,g,D,l,S,d,f.active,R,p,b,w,i,c,h,o,I,L,u,m,E,v,x])},mD=e=>{const t=o((()=>Zm(e)),[e]);return r((()=>()=>t.unmount()),[t]),t},hD=(e,t)=>o((()=>((e,t)=>{if(t)return async(r,n)=>{const{isDim:o,colIdx:i,qReverseSort:a,sortDirection:s,isActivelySorted:l}=r,u=o?i:i-e,c=(await t.getEffectiveProperties()).qHyperCubeDef.qInterColumnSortOrder,d=[],p=n&&n!==s||!n&&l;l||(c.splice(c.indexOf(i),1),c.unshift(i),d.push({qPath:"/qHyperCubeDef/qInterColumnSortOrder",qOp:"Replace",qValue:`[${c.join(",")}]`})),p&&d.push({qPath:`/qHyperCubeDef/${o?"qDimensions":"qMeasures"}/${u}/qDef/qReverseSort`,qOp:"Replace",qValue:(!a).toString()}),t.applyPatches(d,!0)}})(e.qDimensionInfo.length,t)),[e.qDimensionInfo.length,t]);const gD=({model:e,layout:t,shouldRender:r,page:n})=>{const[o]=s((async()=>{if(r&&e)return(async(e,t,r)=>{let{qDataPages:n}=t.qHyperCube;if(0!==r||void 0===n||0===n.length){const o=r*Math.min(lw,t.qHyperCube.qSize.qcy);n=await e.getHyperCubeData("/qHyperCubeDef",[{qLeft:0,qTop:o,qWidth:50,qHeight:100}])}return{initialDataPages:n,derivedFrom:{layout:t,page:r}}})(e,t,n)}),[e,t,n]),i=(null==o?void 0:o.derivedFrom.layout)!==t||(null==o?void 0:o.derivedFrom.page)!==n;return{initialDataPages:null==o?void 0:o.initialDataPages,isLoading:i}},bD=({app:e,layout:n,model:i,rect:a,theme:s,keyboard:l,translator:u,interactions:c,selectionsAPI:d,changeSortOrder:p,rootElement:f,embed:m,reactRoot:h,applyColumnWidths:g,isFontLoaded:b,viewService:v,env:y})=>{const x=!Nv(n,v),E=o((()=>function(e,t,r){const n=Pv(e,r),o=Ov(e),i=e.qHyperCube.qSize.qcy,a=Math.min(lw,i),s=i>lw&&!!t.active;return{totalsPosition:n,columns:o,rows:[],totalRowCount:i,totalColumnCount:e.qHyperCube.qSize.qcx,totalPages:Math.ceil(i/a),paginationNeeded:s}}(n,c,v)),[n,c,v]),{pageInfo:C,setPage:w}=((e,r)=>{const[n,i]=t(0),a=Math.min(lw,e.qHyperCube.qSize.qcy),s=o((()=>({page:n,rowsPerPage:a,rowsPerPageOptions:[]})),[a,n]);if(r){const t=Math.floor(e.qHyperCube.qSize.qcy/lw);t<n&&i(t)}return{pageInfo:s,setPage:i}})(n,x),{initialDataPages:R,isLoading:A}=gD({model:i,layout:n,page:C.page,shouldRender:x});r((()=>{var e;x&&l.active&&(null===(e=l.blur)||void 0===e||e.call(l,!1))}),[l.active]),r((()=>{x&&i&&p&&R&&!A&&b&&function(e,t){const{app:r,selectionsAPI:n,layout:o,model:i,translator:a,interactions:s,theme:l,keyboard:u,rect:c,rootElement:d,embed:p,changeSortOrder:f,tableData:m,applyColumnWidths:h,setPage:g,pageInfo:b,initialDataPages:v,viewService:y,env:x}=e,E=zw("ltr");t.render(Qi.jsx(S.StrictMode,{children:Qi.jsx(HS,{theme:E,children:Qi.jsx(Nw,{app:r,selectionsAPI:n,layout:o,model:i,translator:a,interactions:s,theme:l,keyboard:u,rootElement:d,embed:p,changeSortOrder:f,tableData:m,applyColumnWidths:h,rect:c,setPage:g,pageInfo:b,initialDataPages:v,viewService:y,env:x,children:Qi.jsx(lD,{})})})}))}({app:e,layout:n,model:i,rect:a,theme:s,keyboard:l,translator:u,interactions:c,selectionsAPI:d,rootElement:f,embed:m,changeSortOrder:p,tableData:E,applyColumnWidths:g,setPage:w,pageInfo:C,initialDataPages:R,viewService:v,env:y},h)}),[e,n,i,a,s,l.active,u,c,d,p,x,f,m,h,E,g,w,C,A,R,b,y])},vD=(e,t)=>{const{fontSize:r,fontFamily:n}=Dw(t,e,!1),{fontSize:o,fontFamily:i}=Pw(t,e),[a,l]=s((async()=>(await document.fonts.load(`600 ${r} ${n}`),await document.fonts.load(`${o} ${i}`),!0)),[r,n,o,i]);return l?(console.warn("Failed to load font:",l),!0):!!a},yD={version:JSON.stringify("3.7.0"),qHyperCubeDef:{qDimensions:[],qMeasures:[],qColumnOrder:[],qInitialDataFetch:[{qWidth:50,qHeight:100}]},showTitles:!0,enableChartExploration:!1,title:"",subtitle:"",footnote:"",totals:{show:!0,position:"noTotals",label:"Totals"},usePagination:!1,components:[]};var xD=()=>({properties:{initial:yD},data:{targets:[{path:"/qHyperCubeDef",dimensions:{min:0,max:1e3},measures:{min:0,max:1e3}}]},importProperties:jg,exportProperties:Fg,exploration:$g});function SD(e,t){const r=e.getElementsByClassName("sn-table-container")[0];if(!r)return{};const n=(null==r?void 0:r.getBoundingClientRect())||{},o=e.getElementsByClassName("sn-table-head-row")[0],i=(null==o?void 0:o.getBoundingClientRect())||{height:0},a=e.getElementsByClassName("sn-table-totals-row")[0],s=(null==a?void 0: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 ED=(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]}},CD=(e,t,r)=>{if(!e)return!1;const n=e.y+e.height/2;return n>=t&&n<=r};const wD=(e,t,r,n)=>{var o;if(e<0)return 0;const i=r.qHyperCube.qSize.qcy,a=n.rowsPerPage||pD.rowsPerPage,s=null!==(o=n.viewState)&&void 0!==o&&o.isMultiPage?0:3;return Math.min(i,a,e-t+1+s)},RD=(e,t,r)=>{if(t.viewState&&!t.viewState.isMultiPage)return t.viewState;const n=Pv(e,t);if(Nv(e,t)){const{visibleRowStartIndex:o=-1,visibleRowEndIndex:i=-1,rowPartialHeight:a}=SD(r,n);return{rowPartialHeight:a,scrollLeft:t.scrollLeft,visibleTop:t.qTop+o,visibleHeight:wD(i,o,e,t),rowsPerPage:t.rowsPerPage,page:t.page,totalsPosition:n}}const{visibleRowStartIndex:o=-1,visibleRowEndIndex:i=-1}=function(e,t){const r=e.querySelector(".sn-table-body"),n=null==r?void 0:r.getBoundingClientRect(),o=null==r?void 0: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=ED(d,o),m=null==f?void 0:f.getBoundingClientRect();if(!f||!m)return{};const h=n.y;if(1-i<.001)return{visibleRowStartIndex:d+(m.y>=h-4?0:1)+c,visibleRowEndIndex:p+c};const g=n.y+n.height,b=(CD(m,h,g)?d:d+1)+c;let v=p+c;const y=ED(p,o),x=null==y?void 0:y.getBoundingClientRect();return y&&x&&(CD(x,h,g)||(v=p-1+c)),{visibleRowStartIndex:b,visibleRowEndIndex:v}}(r,t);return{scrollLeft:t.scrollLeft,visibleLeft:t.visibleLeft,visibleWidth:t.visibleWidth,visibleTop:o,visibleHeight:wD(i,o,e,t),scrollTopRatio:t.scrollTopRatio,rowsPerPage:t.rowsPerPage,page:t.page,totalsPosition:n}},AD=({layout:e,viewService:t,model:r,rootElement:n,contentRect:o})=>{l((async i=>{if(!i.snapshotData||!r||i.snapshotData.content)return i;if(r.getHyperCubeData){i.qHyperCube||(i.qHyperCube={});const{rowPartialHeight:a,scrollLeft:s,scrollTopRatio:l,visibleLeft:u,visibleWidth:c,visibleTop:d,visibleHeight:p,rowsPerPage:f,page:m}=RD(e,t,n);i.qHyperCube.qDataPages=await r.getHyperCubeData("/qHyperCubeDef",[{qLeft:0,qTop:null!=d?d:0,qWidth:e.qHyperCube.qSize.qcx,qHeight:null!=p?p:0}]),i.snapshotData.content={rowPartialHeight:a,scrollLeft:s,scrollTopRatio:l,visibleLeft:u,visibleWidth:c,visibleTop:d,visibleHeight:p,rowsPerPage:f,page:m,size:{width:o.width,height:o.height},estimatedRowHeight:t.estimatedRowHeight}}return i})),u((()=>({getViewState:()=>RD(e,t,n)})),[e,t,n])},ID=e=>{const{viewState:t}=a();return o((()=>((e,t)=>{var r,n,o,i,a,s,l,u,c,d,p,f,m,h,g,b,v;return{qTop:0,qHeight:0,rowPartialHeight:null!==(r=null==t||null===(n=t.content)||void 0===n?void 0:n.rowPartialHeight)&&void 0!==r?r:0,visibleTop:null!==(o=null==t||null===(i=t.content)||void 0===i?void 0:i.visibleTop)&&void 0!==o?o:null==e?void 0:e.visibleTop,visibleHeight:null!==(a=null==t||null===(s=t.content)||void 0===s?void 0:s.visibleHeight)&&void 0!==a?a:null==e?void 0:e.visibleHeight,scrollLeft:null!==(l=null!==(u=null==t||null===(c=t.content)||void 0===c?void 0:c.scrollLeft)&&void 0!==u?u:null==e?void 0:e.scrollLeft)&&void 0!==l?l:0,scrollTopRatio:null!==(d=null==t||null===(p=t.content)||void 0===p?void 0:p.scrollTopRatio)&&void 0!==d?d:null==e?void 0:e.scrollTopRatio,rowsPerPage:null!==(f=null==t||null===(m=t.content)||void 0===m?void 0:m.rowsPerPage)&&void 0!==f?f:null==e?void 0:e.rowsPerPage,page:null!==(h=null==t||null===(g=t.content)||void 0===g?void 0:g.page)&&void 0!==h?h:null==e?void 0:e.page,viewState:e,estimatedRowHeight:null!==(b=null==t||null===(v=t.content)||void 0===v?void 0:v.estimatedRowHeight)&&void 0!==b?b:0}})(t,e.snapshotData)),[t,e.snapshotData,e.usePagination])},LD=e=>e.getStyle("","","object.straightTableV2.backgroundColor"),DD=e=>e.getStyle("object","straightTableV2","backgroundColor")}}}));