@nebula.js/sn-waterfall 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/esm/index.js +3 -5
- package/core/esm/index.js.map +1 -1
- package/dist/sn-waterfall.js +6 -8
- package/dist/sn-waterfall.js.map +1 -1
- package/dist/sn-waterfall.systemjs.js +5 -7
- package/dist/sn-waterfall.systemjs.js.map +1 -1
- package/package.json +6 -6
- package/sn-waterfall-ext/dist/sn-waterfall.js +6 -8
- package/sn-waterfall-ext/sn-waterfall.qext +1 -1
package/core/esm/index.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @nebula.js/sn-waterfall v1.0.
|
|
2
|
+
* @nebula.js/sn-waterfall v1.0.1
|
|
3
3
|
* Copyright (c) 2025 QlikTech International AB
|
|
4
4
|
* Released under the MIT license.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import{useRect as e,useOptions as t,useConstraints as r,usePromise as n,useApp as i,useAppLayout as o,useDeviceType as a,useTheme as s,useTranslator as l,useMemo as u,onTakeSnapshot as c,useImperativeHandle as p,useElement as d,useStaleLayout as f,useState as m,useEffect as h}from"@nebula.js/stardust";import g from"jquery";import y from"picasso.js";import b from"picasso-plugin-q";import v from"picasso-plugin-hammer";import x from"hammerjs";import q from"extend";var D={"Visualization.Histogram.MeasureAxisLabel":{id:"Visualization.Histogram.MeasureAxisLabel",locale:{"en-US":"Frequency","zh-TW":"頻率","zh-CN":"频率","tr-TR":"Sıklık","sv-SE":"Frekvens","it-IT":"Frequenza","es-ES":"Frecuencia","de-DE":"Häufigkeit","pl-PL":"Częstotliwość","nl-NL":"Frequentie","ko-KR":"빈도","pt-BR":"Frequência","fr-FR":"Fréquence","ja-JP":"レコード数","ru-RU":"Частота"}},"waterfall.legend.positiveValue.label":{id:"waterfall.legend.positiveValue.label",locale:{"en-US":"Positive","zh-TW":"正值","zh-CN":"正","tr-TR":"Pozitif","sv-SE":"Positiv","it-IT":"Positivi","es-ES":"Positivo","de-DE":"Positiv","pl-PL":"Dodatnie","nl-NL":"Positief","ko-KR":"양수","pt-BR":"Positivo","fr-FR":"Positive","ja-JP":"正","ru-RU":"Положительное"}},"waterfall.legend.negativeValue.label":{id:"waterfall.legend.negativeValue.label",locale:{"en-US":"Negative","zh-TW":"負值","zh-CN":"负","tr-TR":"Negatif","sv-SE":"Negativ","it-IT":"Negativi","es-ES":"Negativo","de-DE":"Negativ","pl-PL":"Ujemne","nl-NL":"Negatief","ko-KR":"음수","pt-BR":"Negativo","fr-FR":"Négative","ja-JP":"負","ru-RU":"Отрицательное"}},"waterfall.legend.subtotal.label":{id:"waterfall.legend.subtotal.label",locale:{"en-US":"Subtotal","zh-TW":"小計","zh-CN":"小计","tr-TR":"Ara Toplam","sv-SE":"Deltotal","it-IT":"Subtotale","es-ES":"Subtotal","de-DE":"Teilsumme","pl-PL":"Suma częściowa","nl-NL":"Subtotaal","ko-KR":"소계","pt-BR":"Subtotal","fr-FR":"Sous-total","ja-JP":"小計","ru-RU":"Подытог"}},Object_Disclaimer_LimitedData:{id:"Object.Disclaimer.LimitedData",locale:{"en-US":"Currently showing a limited data set.","zh-TW":"目前顯示的是有限的資料集。","zh-CN":"当前正显示有限的数据集。","tr-TR":"Şu anda sınırlı bir veri kümesi gösteriliyor.","sv-SE":"Just nu visas en begränsad uppsättning data.","it-IT":"Attualmente viene visualizzata una serie di dati limitata.","es-ES":"Mostrando actualmente un conjunto limitado de datos.","de-DE":"Zurzeit wird nur ein beschränkter Datensatz angezeigt.","pl-PL":"Aktualnie przedstawiany jest ograniczony zestaw danych.","nl-NL":"Momenteel wordt een beperkte gegevensverzameling getoond.","ko-KR":"현재 제한된 데이터 집합을 표시하고 있습니다.","pt-BR":"Mostrando um conjunto de dados limitado.","fr-FR":"Affichage d'un ensemble de données limité pour l'instant.","ja-JP":"現在、限定的なデータ セットを表示しています。","ru-RU":"В настоящее время отображается ограниченный набор данных."}},Object_Disclaimer_OnlyNanData:{id:"Object.Disclaimer.OnlyNanData",locale:{"en-US":"The chart is not displayed because it contains only undefined values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含未定義的值。","zh-CN":"未显示图表,因为它仅包含未定义的值。","tr-TR":"Yalnızca tanımsız değerleri içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller odefinierade värden.","it-IT":"Il grafico non è visualizzato poiché contiene solo valori non definiti.","es-ES":"El gráfico no se muestra porque solo contiene valores indefinidos.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur nicht definierte Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości niezdefiniowane.","nl-NL":"De grafiek wordt niet weergegeven omdat deze alleen ongedefinieerde waarden bevat.","ko-KR":"정의되지 않은 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores não definidos.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs non définies.","ja-JP":"未定義の値しか含まれていないため、チャートは表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только неопределенные значения."}},Object_Disclaimer_OnlyNegativeOrZeroValues:{id:"Object.Disclaimer.OnlyNegativeOrZeroValues",locale:{"en-US":"The chart is not displayed because it contains only negative or zero values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含負值或零值。","zh-CN":"未显示图表,因为它仅包含负值或零值。","tr-TR":"Yalnızca negatif veya sıfır değerlerini içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller negativa eller nollvärden","it-IT":"Il grafico non viene visualizzato poiché contiene solo valori negativi o uguali a zero.","es-ES":"El gráfico no se muestra porque sólo contiene valores negativos o valores cero.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur negative oder 0-Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości ujemne lub zerowe.","nl-NL":"De grafiek wordt niet weergegeven omdat het alleen negatieve waarden of nulwaarden bevat.","ko-KR":"음수 또는 zero 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores negativos ou zero.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs négatives ou égales à zéro.","ja-JP":"チャートは負の値またはゼロ値しか含まれていないため、表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только отрицательные или нулевые значения."}},Object_Disclaimer_RequireNumericDimension:{id:"Object.Disclaimer.RequireNumericDimension",locale:{"en-US":"This visualization requires a numeric diemnsion."}},"properties.boxplot.calculationMode.tukey.elements.boxEnd":{id:"properties.boxplot.calculationMode.tukey.elements.boxEnd",locale:{"en-US":"Third quartile","zh-TW":"第三四分位數","zh-CN":"第 3 个四分位","tr-TR":"Üçüncü çeyrek","sv-SE":"Tredje kvartilen","it-IT":"Terzo quartile","es-ES":"Tercer cuartil","de-DE":"Drittes Quartil","pl-PL":"Trzeci kwartyl","nl-NL":"Derde kwartiel","ko-KR":"3번째 사분위수","pt-BR":"Terceiro quartil","fr-FR":"Troisième quartile","ja-JP":"第 3 四分位数","ru-RU":"Третий квартиль"}},"properties.boxplot.calculationMode.tukey.elements.boxMiddle":{id:"properties.boxplot.calculationMode.tukey.elements.boxMiddle",locale:{"en-US":"Median","zh-TW":"中位數","zh-CN":"中间值","tr-TR":"Medyan","sv-SE":"Median","it-IT":"Mediana","es-ES":"Mediana","de-DE":"Drittes Quartil","pl-PL":"Mediana","nl-NL":"Mediaan","ko-KR":"중앙값","pt-BR":"Mediano","fr-FR":"Médiane","ja-JP":"中央値","ru-RU":"Медианное"}},"properties.boxplot.calculationMode.tukey.elements.boxStart":{id:"properties.boxplot.calculationMode.tukey.elements.boxStart",locale:{"en-US":"First quartile","zh-TW":"第一四分位數","zh-CN":"第 1 个四分位","tr-TR":"İlk çeyrek","sv-SE":"Första kvartilen","it-IT":"Primo quartile","es-ES":"Primer cuartil","de-DE":"Erstes Quartil","pl-PL":"Pierwszy kwartyl","nl-NL":"Eerste kwartiel","ko-KR":"1번째 사분위수","pt-BR":"Primeiro quartil","fr-FR":"Premier quartile","ja-JP":"第 1 四分位数","ru-RU":"Первый квартиль"}},"properties.boxplot.calculationMode.tukey.elements.firstWhisker":{id:"properties.boxplot.calculationMode.tukey.elements.firstWhisker",locale:{"en-US":"Box start - {0} IQR","zh-TW":"方塊開始 - {0} IQR","zh-CN":"框开始 - {0} IQR","tr-TR":"Kutu başlangıcı - {0} IQR","sv-SE":"Rutans start - {0} IQR","it-IT":"Inizio scatola - {0} IQR","es-ES":"Inicio de caja - {0} IQR","de-DE":"Box-Beginn - {0} IQR","pl-PL":"Początek wykresu pudełkowego - {0} IQR","nl-NL":"Begin box - {0} IQR","ko-KR":"상자 시작 - {0} IQR","pt-BR":"Início da caixa - {0} IQR","fr-FR":"Début de la boîte - {0} IQR","ja-JP":"ボックス開始 - {0} IQR","ru-RU":"Начало поля - {0} IQR"}},"properties.boxplot.calculationMode.tukey.elements.lastWhisker":{id:"properties.boxplot.calculationMode.tukey.elements.lastWhisker",locale:{"en-US":"Box end + {0} IQR","zh-TW":"方塊結束 + {0} IQR","zh-CN":"框结束 + {0} IQR","tr-TR":"Kutu bitişi + {0} IQR","sv-SE":"Rutans slut + {0} IQR","it-IT":"Fine scatola + {0} IQR","es-ES":"Fin de caja + {0} IQR","de-DE":"Box-Ende + {0} IQR","pl-PL":"Koniec wykresu pudełkowego - {0} IQR","nl-NL":"Einde box + {0} IQR","ko-KR":"상자 끝 + {0} IQR","pt-BR":"Fim da caixa + {0} IQR","fr-FR":"Fin de la boîte + {0} IQR","ja-JP":"ボックス終了 + {0} IQR","ru-RU":"Конец поля + {0} IQR"}},"properties.boxplot.calculationMode.stdDev.elements.boxEnd":{id:"properties.boxplot.calculationMode.stdDev.elements.boxEnd",locale:{"en-US":"Box middle + 1 standard deviation","zh-TW":"方塊中間 + 1 個標準差","zh-CN":"框中部 + 1 个标准偏差","tr-TR":"Kutu ortası + 1 standart sapma","sv-SE":"Rutans mitt + 1 standardavvikelse","it-IT":"Centro scatola + 1 deviazione standard","es-ES":"Mitad de la caja + 1 desviación estándar","de-DE":"Box-Mitte +1 Standardabweichung","pl-PL":"Środek wykresu pudełkowego + 1 odch. stand","nl-NL":"Midden box + 1 standaardafwijking","ko-KR":"상자 중간 + 1개 표준 편차","pt-BR":"Meio da caixa + 1 desvio padrão","fr-FR":"Milieu de la boîte + 1 écart type","ja-JP":"ボックス中間 + 1 標準偏差","ru-RU":"Середина поля + 1 стандартное отклонение"}},"properties.boxplot.calculationMode.stdDev.elements.boxMiddle":{id:"properties.boxplot.calculationMode.stdDev.elements.boxMiddle",locale:{"en-US":"Average","zh-TW":"平均值","zh-CN":"平均值","tr-TR":"Ortalama","sv-SE":"Medel","it-IT":"Media","es-ES":"Media","de-DE":"Durchschnitt","pl-PL":"Średnia","nl-NL":"Gemiddelde","ko-KR":"평균","pt-BR":"Média","fr-FR":"Moyenne","ja-JP":"平均値","ru-RU":"Среднее"}},"properties.boxplot.calculationMode.stdDev.elements.boxStart":{id:"properties.boxplot.calculationMode.stdDev.elements.boxStart",locale:{"en-US":"Box middle - 1 standard deviation","zh-TW":"方塊中間 - 1 個標準差","zh-CN":"框中部 - 1 个标准偏差","tr-TR":"Kutu ortası - 1 standart sapma","sv-SE":"Rutans mitt - 1 standardavvikelse","it-IT":"Centro scatola - 1 deviazione standard","es-ES":"Mitad de la caja - {1} desviación estándar","de-DE":"Box-Mitte -1 Standardabweichung","pl-PL":"Środek wykresu pudełkowego - 1 odch. stand","nl-NL":"Midden box - 1 standaardafwijking","ko-KR":"상자 중간 - 1개 표준 편차","pt-BR":"Середина поля - 1 стандартное отклонение","fr-FR":"Milieu de la boîte - 1 écart type","ja-JP":"ボックス中間 - 1 標準偏差","ru-RU":"Первый квартиль"}},"properties.boxplot.calculationMode.stdDev.elements.firstWhisker":{id:"properties.boxplot.calculationMode.stdDev.elements.firstWhisker",locale:{"en-US":"Box middle - {0} standard deviations","zh-TW":"方塊中間 - {0} 個標準差","zh-CN":"框中部 - {0} 个标准偏差","tr-TR":"Kutu ortası - {0} standart sapma","sv-SE":"Rutans mitt - {0} standardavvikelser","it-IT":"Centro scatola - {0} deviazioni standard","es-ES":"Mitad de la caja - {0} desviaciones estándar","de-DE":"Box-Mitte -{0} Standardabweichung","pl-PL":"Środek wykresu pudełkowego - {0} odch. stand","nl-NL":"Midden box - {0} standaardafwijkingen","ko-KR":"상자 중간 - {0}개 표준 편차","pt-BR":"Meio da caixa - {0} desvios padrão","fr-FR":"Milieu de la boîte - {0} écarts types","ja-JP":"ボックス中間 - {0} 標準偏差","ru-RU":"Середина поля - {0} стандартное(ых) отклонение(й)"}},"properties.boxplot.calculationMode.stdDev.elements.lastWhisker":{id:"properties.boxplot.calculationMode.stdDev.elements.lastWhisker",locale:{"en-US":"Box middle + {0} standard deviations","zh-TW":"方塊中間 + {0} 個標準差","zh-CN":"框中部 + {0} 个标准偏差","tr-TR":"Kutu ortası + {0} standart sapma","sv-SE":"Rutans mitt + {0} standardavvikelser","it-IT":"Centro scatola + {0} deviazioni standard","es-ES":"Mitad de la caja + {0} desviaciones estándar","de-DE":"Box-Mitte +{0} Standardabweichung","pl-PL":"Środek wykresu pudełkowego + {0} odch. stand","nl-NL":"Midden box + {0} standaardafwijkingen","ko-KR":"상자 중간 + {0}개 표준 편차","pt-BR":"Meio da caixa + {0} desvios padrão","fr-FR":"Milieu de la boîte + {0} écarts types","ja-JP":"ボックス中間 + {0} 標準偏差","ru-RU":"Середина поля + {0} стандартное(ых) отклонение(й)"}},"properties.boxplot.calculationMode.fractiles.elements.boxEnd":{id:"properties.boxplot.calculationMode.fractiles.elements.boxEnd",locale:{"en-US":"Third quartile","zh-TW":"第三四分位數","zh-CN":"第 3 个四分位","tr-TR":"Üçüncü çeyrek","sv-SE":"Tredje kvartilen","it-IT":"Terzo quartile<","es-ES":"Tercer cuartil","de-DE":"Drittes Quartil","pl-PL":"Trzeci kwartyl","nl-NL":"Derde kwartiel","ko-KR":"3번째 사분위수","pt-BR":"Terceiro quartil","fr-FR":"Troisième quartile","ja-JP":"第 3 四分位数","ru-RU":"Третий квартиль"}},"properties.boxplot.calculationMode.fractiles.elements.boxMiddle":{id:"properties.boxplot.calculationMode.fractiles.elements.boxMiddle",locale:{"en-US":"Median","zh-TW":"中位數","zh-CN":"中间值","tr-TR":"Medyan","sv-SE":"Median","it-IT":"Mediana","es-ES":"Mediana","de-DE":"Median","pl-PL":"Mediana","nl-NL":"Mediaan","ko-KR":"중앙값","pt-BR":"Mediano","fr-FR":"Médiane","ja-JP":"中央値","ru-RU":"Медианное"}},"properties.boxplot.calculationMode.fractiles.elements.boxStart":{id:"properties.boxplot.calculationMode.fractiles.elements.boxStart",locale:{"en-US":"First quartile","zh-TW":"第一四分位數","zh-CN":"第 1 个四分位","tr-TR":"İlk çeyrek","sv-SE":"Första kvartilen","it-IT":"Primo quartile","es-ES":"Primer cuartil","de-DE":"Erstes Quartil","pl-PL":"Pierwszy kwartyl","nl-NL":"Eerste kwartiel","ko-KR":"1번째 사분위수","pt-BR":"Primeiro quartil","fr-FR":"Premier quartile","ja-JP":"第 1 四分位数","ru-RU":"Первый квартиль"}},"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.fifth":{id:"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.fifth",locale:{"en-US":"5th percentile","zh-TW":"第 5 個百分位數","zh-CN":"第 5 个百分位","tr-TR":"5. yüzdebirlik","sv-SE":"5:e percentilen","it-IT":"5° percentile","es-ES":"5º percentil","de-DE":"5. Perzentil","pl-PL":"5. percentyl","nl-NL":"5e percentiel","ko-KR":"5번째 백분위수","pt-BR":"5º percentil","fr-FR":"5e centile","ja-JP":"5 番目のパーセンタイル","ru-RU":"5-й процентиль"}},"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.first":{id:"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.first",locale:{"en-US":"1st percentile","zh-TW":"第 1 個百分位數","zh-CN":"第 1 个百分位","tr-TR":"1. yüzdebirlik","sv-SE":"1:e percentilen","it-IT":"1° percentile","es-ES":"1er percentil","de-DE":"1. Perzentil","pl-PL":"1. percentyl","nl-NL":"1e percentiel","ko-KR":"1번째 백분위수","pt-BR":"1º percentil","fr-FR":"1er centile","ja-JP":"1 番目のパーセンタイル","ru-RU":"1-й процентиль"}},"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.min":{id:"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.min",locale:{"en-US":"Minimum","zh-TW":"最小","zh-CN":"最小值","tr-TR":"En az","sv-SE":"Min","it-IT":"Minimo","es-ES":"Mínimo","de-DE":"Minimum","pl-PL":"Minimum","nl-NL":"Minimum","ko-KR":"최소","pt-BR":"Mínimo","fr-FR":"Minimale","ja-JP":"最小値","ru-RU":"Минимум"}},"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.tenth":{id:"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.tenth",locale:{"en-US":"10th percentile","zh-TW":"第 10 個百分位數","zh-CN":"第 10 个百分位","tr-TR":"10. yüzdebirlik","sv-SE":"10:e percentilen","it-IT":"10° percentile","es-ES":"10º percentil","de-DE":"10. Perzentil","pl-PL":"10. percentyl","nl-NL":"10e percentiel","ko-KR":"10번째 백분위수","pt-BR":"10º percentil","fr-FR":"10e centile","ja-JP":"10 番目のパーセンタイル","ru-RU":"10-й процентиль"}},"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.max":{id:"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.max",locale:{"en-US":"Maximum","zh-TW":"最大","zh-CN":"最大值","tr-TR":"En fazla","sv-SE":"Max","it-IT":"Massimo","es-ES":"Máximo","de-DE":"Maximum","pl-PL":"Maksimum","nl-NL":"Maximum","ko-KR":"최대","pt-BR":"Máximo","fr-FR":"Maximale","ja-JP":"最大値","ru-RU":"Максимум"}},"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.ninetieth":{id:"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.ninetieth",locale:{"en-US":"90th percentile","zh-TW":"第 90 個百分位數","zh-CN":"第 90 个百分位","tr-TR":"90. yüzdebirlik","sv-SE":"90:e percentilen","it-IT":"90° percentile","es-ES":"90º percentil","de-DE":"90. Perzentil","pl-PL":"90. percentyl","nl-NL":"90e percentiel","ko-KR":"90번째 백분위수","pt-BR":"90º percentil","fr-FR":"90e centile","ja-JP":"90 番目の百分位数","ru-RU":"90-й процентиль"}},"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.ninetyfifth":{id:"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.ninetyfifth",locale:{"en-US":"95th percentile","zh-TW":"第 95 個百分位數","zh-CN":"第 95 个百分位","tr-TR":"95. yüzdebirlik","sv-SE":"95:e percentilen","it-IT":"95° percentile","es-ES":"95º percentil","de-DE":"95. Perzentil","pl-PL":"95. percentyl","nl-NL":"95e percentiel","ko-KR":"95번째 백분위수","pt-BR":"95º percentil","fr-FR":"95e centile","ja-JP":"95 番目の百分位数","ru-RU":"95-й процентиль"}},"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.ninetynineth":{id:"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.ninetynineth",locale:{"en-US":"99th percentile","zh-TW":"第 99 個百分位數","zh-CN":"第 99 个百分位","tr-TR":"99. yüzdebirlik","sv-SE":"99:e percentilen","it-IT":"99° percentile","es-ES":"99º percentil","de-DE":"99. Perzentil","pl-PL":"99. percentyl","nl-NL":"99e percentiel","ko-KR":"99번째 백분위수","pt-BR":"99º percentil","fr-FR":"99e centile","ja-JP":"99 番目の百分位数","ru-RU":"99-й процентиль"}}};function S(e){e.component("event-area",{mounted(e){e.classList.add("event-area"),e.style.pointerEvents="auto",e.style.zIndex=1},render:()=>[]})}var w={renderer:"dom",disableTriggers:!0,preferredSize:function(){return 22},render(e){const{settings:{label:t,rtl:r},layout:{dock:n}}=this.settings,i="top"!==n&&"bottom"!==n||!r?"ltr":"rtl",o=function(e,t){const r={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#7b7a78",fontStyle:"italic",fontSize:"13px"};switch(e){case"left":r.width=`${t.height}px`,r.transform=`rotate(-90deg) translate(-${t.height}px, 0)`,r.transformOrigin="top left";break;case"right":r.width=`${t.height}px`,r.transform=`rotate(90deg) translate(0, -${t.width}px)`,r.transformOrigin="top left";break;case"center":r.width=`${t.width}px`,r.height=`${t.height}px`,r.color="#595959",r.fontStyle="normal",r.fontSize="1.2em",r.textAlign="center";break;default:r.justifyContent="flex-start",r.alignItems="flex-start"}return r}(n,this.rect),a="center"===n?t:`* ${t}`,s="center"!==n?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}:{};return e("div",{style:o,dir:i},e("span",{ref:this.alignToRef,style:s,title:a},a))}};const M={version:"1.0.0",qHyperCubeDef:{qDimensions:[],qMeasures:[],qMode:"S",qInitialDataFetch:[{qWidth:200,qHeight:10}],qSuppressMissing:!0},color:{auto:!0,positiveValue:{paletteColor:{index:6,color:null}},negativeValue:{paletteColor:{index:-1,color:"#cc6677"}},subtotal:{paletteColor:{index:-1,color:"#c3c3c3"}}},dataPoint:{showLabels:!0},dimensionAxis:{dock:"near",label:"auto",show:"labels"},gridlines:{auto:!0,spacing:2},legend:{dock:"auto",show:!0},measureAxis:{autoMinMax:!0,dock:"near",max:10,min:0,minMax:"min",show:"labels",spacing:1},qDef:{qNumFormat:{},numFormatFromTemplate:!0,isCustomFormatted:!1},refLine:{refLines:[]},showTitles:!0,subtitle:"",title:"",footnote:""};function A(e){const{translator:t}=e;return{path:"/qHyperCubeDef",dimensions:{min:0,max:0},measures:{min:1,max:50,description:()=>t.get("Visualizations.Descriptions.Bars")}}}function E(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var k,C={exports:{}};var N=(k||(k=1,self,C.exports=(()=>{var e={229:e=>{var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},a=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var n,i=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(n in e);return void 0===n||t.call(e,n)},s=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,r){if("__proto__"===r){if(!t.call(e,r))return;if(i)return i(e,r).value}return e[r]};e.exports=function e(){var t,r,n,i,u,c,p=arguments[0],d=1,f=arguments.length,m=!1;for("boolean"==typeof p&&(m=p,p=arguments[1]||{},d=2),(null==p||"object"!=typeof p&&"function"!=typeof p)&&(p={});d<f;++d)if(null!=(t=arguments[d]))for(r in t)n=l(p,r),p!==(i=l(t,r))&&(m&&i&&(a(i)||(u=o(i)))?(u?(u=!1,c=n&&o(n)?n:[]):c=n&&a(n)?n:{},s(p,{name:r,newValue:e(m,c,i)})):void 0!==i&&s(p,{name:r,newValue:i}));return p}},645:(e,t)=>{(()=>{var e={229:e=>{var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},a=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var n,i=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(n in e);return void 0===n||t.call(e,n)},s=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,r){if("__proto__"===r){if(!t.call(e,r))return;if(i)return i(e,r).value}return e[r]};e.exports=function e(){var t,r,n,i,u,c,p=arguments[0],d=1,f=arguments.length,m=!1;for("boolean"==typeof p&&(m=p,p=arguments[1]||{},d=2),(null==p||"object"!=typeof p&&"function"!=typeof p)&&(p={});d<f;++d)if(null!=(t=arguments[d]))for(r in t)n=l(p,r),p!==(i=l(t,r))&&(m&&i&&(a(i)||(u=o(i)))?(u?(u=!1,c=n&&o(n)?n:[]):c=n&&a(n)?n:{},s(p,{name:r,newValue:e(m,c,i)})):void 0!==i&&s(p,{name:r,newValue:i}));return p}}},r={};function n(t){var i=r[t];if(void 0!==i)return i.exports;var o=r[t]={exports:{}};return e[t](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};(()=>{n.r(i),n.d(i,{default:()=>Ie});var e=n(229),t=n.n(e);const r=function(e,t,r){if(!t)return!1;var n,i=t.split("."),o=i[i.length-1],a=e;for(n=0;n<i.length-1;++n)void 0===a[i[n]]&&(a[i[n]]=Number.isNaN(+i[n+1])?{}:[]),a=a[i[n]];if(void 0!==r){var s=a[o];return a[o]=r,{updated:r,previous:s}}return delete a[o],!1},o=function(e,t,r){var n,i=t.split("."),o=e;if(void 0===o)return r;for(n=0;n<i.length;++n){if(void 0===o[i[n]])return r;o=o[i[n]]}return o},a={EXPRESSIONS:{observed:"",trend:"STL_Trend",seasonal:"STL_Seasonal",residual:"STL_Residual"},OPTIONS:[{value:"observed",translation:"cao.trendDecomposition.parameters.decomposition.observed"},{value:"trend",translation:"cao.trendDecomposition.parameters.decomposition.trend"},{value:"seasonal",translation:"cao.trendDecomposition.parameters.decomposition.seasonal"},{value:"residual",translation:"cao.trendDecomposition.parameters.decomposition.residual"}]};var s="".concat(" ","(").concat(" "),l="".concat(" ",")").concat(" ");function u(e){return s+e+l}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var r=function(e,t){if(!t)return null;var r,n;for(r=0;r<t.length;r++)if((n=t[r]).qInfo.qId===e)return n;return null}(e.qLibraryId,t.dimensionList);return r&&r.qData.info[0].qTags.indexOf("$numeric")>-1}var n=function(e,t){if(!t)return null;var r,n,i=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var r=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(r)&&(t=(t=t.substring(1,r)).trim()),t}(e);for(r=0;r<t.length;r++){if((n=t[r]).qName===i)return n;if(n.qDerivedFieldData)for(var o=0;o<n.qDerivedFieldData.qDerivedFieldLists.length;++o)for(var a=n.qDerivedFieldData.qDerivedFieldLists[o],s=0;s<a.qFieldDefs.length;++s){var l=a.qFieldDefs[s];if(l.qName===i)return l}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return n&&n.qTags.indexOf("$numeric")>-1}function p(e){return!(!e.fullAccumulation&&!e.fullRange)}function d(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 y(e){return"Replace(Replace(".concat(e,",'''',''''''),'$','$''&''')")}function b(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=").concat(y("MinString(".concat(t,")")),")' and Only({1}").concat(t,")<='$(=").concat(y("MaxString(".concat(t,")")),")'\"}")}function v(e){var t=e.modifier,r=void 0===t?{}:t,n=e.dimensions,i=e.dimensionAndFieldList,o=e.funcComp,a=void 0===o?"Sum":o,s=e.valueComp,l=void 0===s?"0":s;if(!r.showExcludedValues)return"";if(n&&1===n.length){var u=b(c(n[0],i),m(0));return"".concat(a,"({1<").concat(u,">}").concat(l,")")}if(n&&2===n.length){var p=c(n[0],i),d=c(n[1],i),f=m(0),h=m(1),g=b(p,f),y=b(d,h);return"".concat(a,"({1<").concat(g,",").concat(y,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function x(e){return"".concat(e,"(")}function q(e){var t=e.properties,r=e.layout;return o(t,"qHyperCubeDef.qDimensions",o(r,"qHyperCube.qDimensionInfo",[])).length}const D={isFullRange:p,getNumDimensions:q,getExpressionWithExcludedComp:function(e){var t=e.expression,r=e.modifier,n=e.dimensions,i=e.dimensionAndFieldList,o=e.treatMissingAsNull,a=u(f(t));if(!r.showExcludedValues)return a;var s=v({modifier:r,dimensions:n,dimensionAndFieldList:i}),l=o?"":", 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 p=m(0),d=m(1);return"If(Count(".concat(p,") * Count(").concat(d,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:d,getNumStepComp:function(e,t){if(!p(e)){var r=e.steps;return"number"!=typeof r||Number.isNaN(r)?6:r}return d(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:v,needDimension:function(e){var t=e.modifier,r=e.properties,n=e.layout,i=function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t);return 0===i&&2===q({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 i=["Descending","Ascending"],o=r.qSortByNumeric?"(Numeric, ".concat(i[(r.qSortByNumeric+1)/2],")"):"",a=r.qSortByAscii?"(Text, ".concat(i[(r.qSortByAscii+1)/2],")"):"";return r.qSortByNumeric&&r.qSortByAscii?"(".concat(n,", ").concat(o,", ").concat(a,")"):r.qSortByNumeric?"(".concat(n,", ").concat(o,")"):r.qSortByAscii?"(".concat(n,", ").concat(a,")"):n},simplifyExpression:f,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var r=t.indexOf(s);if(-1!==r){var n=t.indexOf(l);if(-1!==n)return t.substring(r+s.length,n)}}},initModifier:function(e,t){Object.keys(t).forEach((function(r){void 0===e[r]&&(e[r]=t[r])}))},isNumeric:c,isApplicable:function(e){var t=e.properties,r=e.layout,n=e.minDimensions,i=void 0===n?1:n,o=e.maxDimensions,a=void 0===o?2:o;if(!t&&!r)return!0;var s=q({properties:t,layout:r});return s>=i&&s<=a},getExpressionWithMarkers:u,canExtract:function(e){var t=e.indexOf(s),r=e.indexOf(l);return t>-1&&r>-1&&t<r},getDimDefWithWrapper: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 i=r.qHyperCubeDef.qMeasures.find((function(t){return t.qDef.base&&t.qDef.base.qLibraryId&&e.base&&e.base.qLibraryId?t.qDef.base.qLibraryId===e.base.qLibraryId:null}));i&&t!==i.qDef.qLabel&&(n=i.qLibraryId||i.qDef.base.qLibraryId?"[".concat(i.qDef.qLabel,"]"):i.qDef.base.qDef);var o=function(e){var t=a.OPTIONS.find((function(t){return t.value===e.decomposition}));return t?a.EXPRESSIONS[t.value]:""}(e);n=n.startsWith("=")?n.substr(1):n,n="".concat(o,"(").concat(n,", ").concat(e.steps,")")}return n},getDecomposition:function(e){var t="observed";return Object.values(a.EXPRESSIONS).find((function(r){var n=e.qDef.base.qDef.toLowerCase()||e.qDef.qDef.toLowerCase();return a.EXPRESSIONS[r]&&n.includes(a.EXPRESSIONS[r].toLowerCase())&&(t=r),r})),t}};function 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 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 M=t().bind(null,!0),A={},E=Array.isArray;function k(e){return null!=e&&!Array.isArray(e)&&"object"===w(e)}function C(e){return void 0===e}function N(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function I(e,t){var r,n=t.substring(1).split("/").slice(0,-1);return n.forEach((function(t,i){if(i!==n.length){r=+t;var o=Number.isNaN(r)?{}:[];e[r||t]=C(e[r||t])?o:e[t],e=e[r||t]}})),e}function L(e,t){var r=!0;if(k(e)&&k(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((function(n){L(e[n],t[n])||(r=!1)})),r);if(E(e)&&E(t)){if(e.length!==t.length)return!1;for(var n=0,i=e.length;n<i;n+=1)if(!L(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(i){var o=function(e){return e?M({},{val:e}).val:e}(t[i]),a=e[i],s="".concat(r,"/").concat(i);L(o,a)||N(t,i)||(C(a)?n.push({op:"add",path:s,value:o}):k(o)&&k(a)?n=n.concat(A.generate(a,o,s)):E(o)&&E(a)?n=n.concat(function(e,t,r){var n=[],i=e.slice(),o=-1;function a(e,t,r){if(e[r]&&C(e[r].qInfo))return null;if(e[r]&&e[r].qInfo.qId===t)return r;for(var n=0,i=e.length;n<i;n+=1)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(L(t,i))return n;if(!C(t[0])&&C(t[0].qInfo))return n.push({op:"replace",path:r,value:t}),n;for(var s=i.length-1;s>=0;s-=1)-1===(o=a(t,i[s].qInfo&&i[s].qInfo.qId,s))?(n.push({op:"remove",path:"".concat(r,"/").concat(s)}),i.splice(s,1)):n=n.concat(A.generate(i[s],t[o],"".concat(r,"/").concat(s)));for(var l=0,u=t.length;l<u;l+=1)-1===(o=a(i,t[l].qInfo&&t[l].qInfo.qId))?(n.push({op:"add",path:"".concat(r,"/").concat(l),value:t[l]}),i.splice(l,0,t[l])):o!==l&&(n.push({op:"move",path:"".concat(r,"/").concat(l),from:"".concat(r,"/").concat(o)}),i.splice(l,0,i.splice(o,1)[0]));return n}(a,o,s)):n.push({op:"replace",path:"".concat(r,"/").concat(i),value:o}))})),Object.keys(e).forEach((function(i){C(t[i])&&!N(e,i)&&n.push({op:"remove",path:"".concat(r,"/").concat(i)})})),n},A.apply=function(e,t){t.forEach((function(t){var r,n,i=I(e,t.path),o=t.path.split("/").splice(-1)[0],a=o&&Number.isNaN(+o)?i[o]:i[+o]||i,s=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(i=null,a=e),"add"===t.op||"replace"===t.op)if(E(i))"-"===o&&(o=i.length),i.splice(+o,"add"===t.op?0:1,t.value);else if(E(a)&&E(t.value)){var l,u=t.value.slice();a.length=0,(l=a).push.apply(l,function(e){if(Array.isArray(e))return S(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 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}}(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(k(a)&&k(t.value))r=a,Object.keys(r).forEach((function(e){Object.getOwnPropertyDescriptor(r,e).configurable&&!N(r,e)&&delete r[e]})),M(a,t.value);else{if(!i)throw new Error("Patchee is not an object we can patch");i[o]=t.value}else if("move"===t.op){var c=I(e,t.from);E(i)?i.splice(+o,0,c.splice(+s,1)[0]):(i[o]=c[s],delete c[s])}else"remove"===t.op&&(E(i)?i.splice(+o,1):delete i[o])}))},A.clone=function(e){return M({},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)):M(e,t)};const T=A,O=function(e,r,n){if(!e)return Promise.resolve();var i=T.generate(r,n);return t()(!0,r,n),i&&i.length?(i=i.map((function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}})),e.applyPatches(i,!0)):Promise.resolve()};var R="accumulation";function P(e,t){var r=o(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===R)return r[n]}function F(e,t){var r=function(e,t){var r=o(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===R)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var _={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""};const H={translationKey:"properties.modifier.accumulation",needDimension:D.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return D.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=a;void 0===l&&(l=D.getNumDimensions({properties:n,layout:i}));var u=o(n,"qHyperCubeDef.qDimensions",[]),c=D.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),p=D.getNumStepComp(r,l),d=D.getAboveComp(r,l,c,p),f=D.getRangeComp("RangeSum",d);if(D.needDimension({modifier:r,properties:n,layout:i})){var m=D.getDimComp(u,1),h=D.getDimComp(u,0),g=D.getAggrComp(f,m,h);f=r.showExcludedValues?D.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:s,valueComp:g}):g}return f},extractInputExpression:D.extractInputExpression,initModifier:function(e){D.initModifier(e,_)},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!D.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(F(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(F(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(F(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(F(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var r=P(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=P(t,e);return r&&!r.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(F(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return D.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(R))return!1;var o=P(t,e);return o&&!o.disabled}};return r}};var V="movingAverage";function j(e,t){var r=o(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===V)return r[n]}function z(e,t){var r=function(e,t){var r=o(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===V)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var $={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1};const B={translationKey:"properties.modifier.movingAverage",needDimension:D.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return D.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,r=e.expression,n=e.modifier,i=e.properties,a=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!n)return r;var u=s;void 0===u&&(u=D.getNumDimensions({properties:i,layout:a}));var c=o(i,"qHyperCubeDef.qDimensions",[]),p=n.showExcludedValues&&n.nullSuppression,d=D.getExpressionWithExcludedComp({expression:r,modifier:n,dimensions:c,dimensionAndFieldList:l,treatMissingAsNull:p}),f=D.getNumStepComp(n,u),m=D.getAboveComp(n,u,d,f);if(n.nullSuppression)t=D.getRangeComp("RangeAvg",m);else{var h=D.getRangeComp("RangeSum",m),g=function(e,t){var r=D.getRowNoComp(e,t);if(!D.isFullRange(e)){var n=e.steps,i="number"!=typeof n||Number.isNaN(n)?6:n;return"RangeMin(".concat(i,", ").concat(r,")")}return r}(n,u);t="".concat(h," / ").concat(g)}var y=t;if(D.needDimension({modifier:n,properties:i,layout:a})){var b=D.getDimComp(c,1),v=D.getDimComp(c,0),x=D.getAggrComp(y,b,v);y=n.showExcludedValues?D.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return y},extractInputExpression:D.extractInputExpression,initModifier:function(e){D.initModifier(e,$)},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!D.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.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(z(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(z(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(z(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var r=j(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=j(t,e);return r&&!r.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(z(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(z(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return D.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(V))return!1;var o=j(t,e);return o&&!o.disabled}};return r}};var W="timeSeriesDecomposition";function U(e,t){var r=o(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===W)return r[n]}function K(e,t){var r=function(e,t){var r=o(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===W)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var G={type:"timeSeriesDecomposition",disabled:!1,decomposition:"",steps:2,outputExpression:""};const Y={translationKey:"properties.modifier.timeSeriesDecomposition",needDimension:D.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return D.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties;return r?D.generateTSDExpression(r,t,n):t},extractInputExpression:D.extractInputExpression,initModifier:function(e,t){D.initModifier(e,G),""===e.decomposition&&t&&(e.decomposition=D.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!D.isApplicable({properties:t.properties})}},settings:{type:"items",items:{decomposition:{refFn:function(t){return"".concat(K(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(K(t,e),".steps")},type:"integer",translation:t.modifierTimeSeriesDecompositionPeriods||"properties.modifier.timeSeriesDecomposition.periods",schemaIgnore:!0,defaultValue:2,change:function(t,r){var n=U(t,e);if(n){var i=n.steps;n.steps="number"!=typeof i||Number.isNaN(i)?2:Math.abs(i),r.properties.qHyperCubeDef.qMeasures=r.properties.qHyperCubeDef.qMeasures.map((function(e){return e.qDef.modifiers.map((function(e){return"timeSeriesDecomposition"===e.type?e.steps=i:e.steps=e.steps,e})),e}))}},show:function(t){var r=U(t,e);return r&&!r.fullRange}}},show:function(e,t){return D.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(W))return!1;var o=U(t,e);return o&&!o.disabled}};return r}};var X="difference";function J(e,t){var r=o(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===X)return r[n]}function Q(e,t){var r=function(e,t){var r=o(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===X)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var Z={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""};const ee={translationKey:"properties.modifier.difference",needDimension:D.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return D.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:D.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=a;void 0===l&&(l=D.getNumDimensions({properties:n,layout:i}));var u=o(n,"qHyperCubeDef.qDimensions",[]),c=D.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),p=D.getAboveComp(r,l,c),d="".concat(c," - ").concat(p);if(D.needDimension({modifier:r,properties:n,layout:i})){var f=D.getDimComp(u,1),m=D.getDimComp(u,0),h=D.getAggrComp(d,f,m);d=r.showExcludedValues?D.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:s,funcComp:"Only",valueComp:h}):h}return d},initModifier:function(e){Object.keys(Z).forEach((function(t){void 0===e[t]&&(e[t]=Z[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!D.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(Q(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(Q(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(Q(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return D.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(X))return!1;var o=J(t,e);return o&&!o.disabled}};return r}};var te="normalization";function re(e,t){var r=o(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===te)return r[n]}function ne(e,t){var r=function(e,t){var r=o(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===te)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}function ie(e,t){for(var r=0;r<e.length;r++)if(e[r].value===t)return r;return-1}var oe={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:2,selectionScope:2};function ae(e){return 2===e?"{1}":""}function se(e,t,r){return 1===e?"{$<".concat(D.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(D.getDimDefWithWrapper(r),">"):""}const ce={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,r=e.layout;return D.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:D.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=a;void 0===l&&(l=D.getNumDimensions({properties:n,layout:i}));var u=o(n,"qHyperCubeDef.qDimensions",[]),c=D.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),p=r.selectionScope,d=r.dimensionalScope;return function(e,t,r,n,i,o,a){var s=ae(t),l=se(t,r,n),u=""===s&&""===l?"":s||l,c=le(i,o),p=ue(i,o,a),d=function(e){for(var t=[],r=0;r<e;r++)t[r]=D.getDimDefWithWrapper(r);return t.join(", ")}(o);return"".concat(e,"/ Sum(").concat(u," ").concat(c).concat(p," Aggr(").concat(u," ").concat(e,", ").concat(d,"))")}(c,p,r.field,r.value,d,l,r.primaryDimension)},initModifier:function(e){Object.keys(oe).forEach((function(t){void 0===e[t]&&(e[t]=oe[t])}))},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!D.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(ne(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,options:function(r){return function(e,t,r){var n=[{value:0,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:1,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:2,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return n=function(e,t){if(1===e){var r=ie(t,0);t.splice(r,1)}return t}(re(e,r).dimensionalScope,n),n}(r,t,e)}},field:{refFn:function(t){return"".concat(ne(t,e),".field")},type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:function(e,t,r){return r.app.getFieldList().then((function(e){return e.map((function(e){return{label:e.qName,value:e.qName}}))}))},show:function(t){return 1===re(t,e).selectionScope}},value:{refFn:function(t){return"".concat(ne(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return 1===re(t,e).selectionScope}},dimensionalScope:{refFn:function(t){return"".concat(ne(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,supportTooltip:!0,options:function(r,n){return function(e,t,r,n){var i=t.layout.qHyperCube.qDimensionInfo.length,o=[{value:0,translation:r.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:r.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:1,translation:r.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension"),tooltipTranslation:r.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension",".tooltip")},{value:2,translation:r.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:r.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension",".tooltip")}];return o=function(e,t){if(e<2){var r=ie(t,0);t.splice(r,1)}return t}(i,o),o=function(e,t){if(0===e){var r=ie(t,1);t.splice(r,1)}return t}(re(e,n).selectionScope,o),o}(r,n,t,e)}},primaryDimension:{refFn:function(t){return"".concat(ne(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.normalization.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(t,r){return 0===(re(t,e).dimensionalScope||0)&&r.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return D.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(te))return!1;var o=re(t,e);return o&&!o.disabled}};return r},getDisregardSelectionComp:ae,getFieldSelectionComp:se,getTotalComp:le,getSelectedDimComp:ue};var pe="qDef.base",de="qDef.qDef",fe="qDef.base.qDef",me="qLibraryId",he="qDef.base.qLibraryId";const ge={getExpression:function(e){var t=o(e,fe);return void 0!==t?t:o(e,de)},getExpressionRef:function(e){return void 0!==o(e,fe)?fe:de},getLibraryIdRef:function(e){return o(e,he)?he:me},getLibraryId:function(e){return o(e,he)||o(e,me)},getLabelRef:function(e){return o(e,pe)?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return o(e,pe)?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}};var ye="qDef.qDef",be="qDef.base.qDef",ve="qLibraryId",xe="qDef.base.qLibraryId",qe="qDef.qLabel",De="qDef.qLabelExpression",Se="qDef.base.qLabel",we="qDef.base.qLabelExpression",Me="qDef.qAggrFunc",Ae="qDef.base.qAggrFunc",Ee={initBase:function(e,t){(t||Ee.isValid(e))&&(r(e,be,o(e,ye)),r(e,xe,o(e,ve)),r(e,Se,o(e,qe)),r(e,we,o(e,De)))},restoreBase:function(e){Ee.isValid(e)&&(r(e,ye,o(e,be)),r(e,ve,o(e,xe)),r(e,qe,o(e,Se)),r(e,De,o(e,we)),o(e,Me)&&o(e,Ae)&&r(e,Me,o(e,Ae)),delete e.qDef.base)},isValid:function(e){var t=o(e,be),r=o(e,xe);return void 0!==t||void 0!==r}};const ke=Ee;function Ce(e){return Ce="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},Ce(e)}var Ne={accumulation:H,movingAverage:B,difference:ee,normalization:ce,timeSeriesDecomposition:Y};const Ie={modifiers:Ne,apply:Te,applyModifiers:Oe,cleanUpMeasure:Re,destroy:function(e){e&&Le[e.id]&&Le[e.id].masterItemSubscriber&&(Le[e.id].masterItemSubscriber&&Le[e.id].masterItemSubscriber.unsubscribe(),delete Le[e.id])},hasActiveModifiers:Pe,getActiveModifier:Fe,initBase:ke.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some((function(e){return Ne[e]}))},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some((function(e){return Ne[e]&&Ne[e].isApplicable({properties:r,layout:n})}))},measureBase:ge,limitedSorting:function(e){var t=e.measures,r=e.properties,n=e.layout,i=!1,o=!1;return t.forEach((function(e){var t=Ve(e);Ke({modifiers:t,properties:r,layout:n})&&(i=!0,o=o||Qe({modifiers:t,properties:r,layout:n}))})),i&&!o},ifEnableTotalsFunction:_e};var Le={};function Te(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.model,n=e.properties,i=e.isSnapshot,a=void 0!==i&&i,s=e.masterItem,l=!1;Le[r.id]=Le[r.id]||{isFirstTime:!0};var u=Le[r.id].isFirstTime;if(Le[r.id].isFirstTime=!1,n&&"object"===Ce(n))return Oe({model:r,properties:n});var c=r?r.layout:void 0,p=o(c,"qSelectionInfo.qInSelections");if(a||p)return Promise.resolve(l);var d=o(c,"qHyperCube.qMeasureInfo"),f=Le[r.id].lastReloadTime;if(Le[r.id].lastReloadTime=o(r,"app.layout.qLastReloadTime"),Pe({measures:d,layout:c})){var m=function(e){var t=e.measures,r=e.layout,n=e.lastReloadTime;return o(e.model,"app.layout.qLastReloadTime")!==n&&function(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ue({measure:e,properties:r,layout:n})}))}({measures:t,layout:r})}({measures:d,layout:c,model:r,lastReloadTime:f});return m||function(e){var t=e.measures,r=e.layout,n=e.masterItem,i=e.isFirstTime;return!!Array.isArray(t)&&(i||n||t.some((function(e){return function(e){var t=e.measure,r=e.layout;return Ke({modifiers:Ve(t),layout:r})?!t.base:!!t.base}({measure:e,layout:r})})))}({measures:d,layout:c,masterItem:s,isFirstTime:u})?r.getEffectiveProperties().then((function(e){var n=t()(!0,{},e);ze(n);var i=Ze(n);return Ge({model:r}).then((function(t){return Ye({libraryIds:i,model:r}).then((function(i){return m&&function(e){var t=e.properties;He(t).forEach((function(e){return function(e){var t=e.measure;if(Ue({measure:t,properties:e.properties})){var r=0,n=t.qDef.modifiers;Array.isArray(n)&&n.forEach((function(e){if("object"===Ce(e)&&!e.disabled){if(r++,"object"!==Ce(Ne[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=Ne[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==n&&Be(t)&&D.simplifyExpression(t.qDef.base.qDef)!==D.simplifyExpression(n)&&(t.qDef.base.qDef=n)}}))}}({measure:e,properties:t})}))}({properties:n}),Oe({model:r,oldProperties:e,properties:n,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:i,dimensionAndFieldList:t})}))}))})):Promise.resolve(l)}return function(e){return!!Array.isArray(e)&&e.some((function(e){return"object"===Ce(e.base)}))}(d)?r.getEffectiveProperties().then((function(e){return function(e){var r=e.model,n=e.properties,i=Ze(n);return et({model:r,libraryIds:i}).then((function(){var e=t()(!0,{},n);return He(n).forEach((function(e){return Re(e)})),Je({oldProperties:e,newProperties:n,model:r})}))}({model:r,properties:e})})):Promise.resolve(l)}function Oe(e){var r=e.model,n=e.oldProperties,i=e.properties,a=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,u=e.masterItem,c=e.libraryItemsProps,p=e.dimensionAndFieldList;void 0===n&&(n=l?t()(!0,{},i):i),ze(i);var d=Ze(i);return et({model:r,libraryIds:d,masterItem:u}).then((function(){return function(e){var r=e.measures,n=e.properties,i=e.model,a=e.libraryItemsProps,s=e.dimensionAndFieldList;if(r||(r=He(n)),!r.length)return Promise.resolve();if(!Pe({measures:r,properties:n}))return r.forEach((function(e){return Re(e)})),Promise.resolve();var l=a?void 0:Ze(n);return Ge({model:i,dimensionAndFieldList:s}).then((function(e){return Ye({libraryIds:l,model:i,libraryItemsProps:a}).then((function(i){r.forEach((function(r){Ke({modifiers:r.qDef.modifiers,properties:n})?(function(e){var r=e.measure,n=e.properties,i=e.libraryItemsProps,a=e.dimensionAndFieldList,s=0;ke.isValid(r)||ke.initBase(r,!0);var l=r.qDef,u=l.modifiers,c=l.base;Array.isArray(u)&&u.forEach((function(e){if("object"===Ce(e)&&!e.disabled){if(s++,"object"!==Ce(Ne[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)");Ne[e.type].initModifier(e,r);var l=r.qLibraryId||c&&c.qLibraryId;l?function(e){var r=e.measure,n=e.modifier,i=e.properties,o=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=""===s?s:Ne[n.type].generateExpression({expression:s,modifier:n,properties:i,dimensionAndFieldList:o});n.outputExpression=l,r.qDef.qDef=n.outputExpression,(r.qDef.qLabel||a.qMeasure.qLabel)&&(r.qDef.qLabel=a.qMeasure.qLabel),(r.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(r.qDef.qLabelExpression=a.qMeasure.qLabelExpression),r.qDef.quarantine&&r.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(r.qDef.qNumFormat=a.qMeasure.qNumFormat,r.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete r.qLibraryId,r.qDef.coloring=a.qMeasure.coloring,n.base=t()(!0,{},r.qDef.base)}({measure:r,modifier:e,libraryId:l,properties:n,libraryItemsProps:i,dimensionAndFieldList:a}):function(e){var r=e.measure,n=e.modifier,i=e.properties,o=e.dimensionAndFieldList;"function"==typeof Ne[n.type].updateModifier&&Ne[n.type].updateModifier(n,i.qHyperCubeDef);var a=ge.getExpression(r),s=""===a?a:Ne[n.type].generateExpression({expression:a,modifier:n,properties:i,dimensionAndFieldList:o});n.outputExpression=s,r.qDef.qDef=n.outputExpression,r.qDef.base.qLabelExpression?r.qDef.qLabelExpression=r.qDef.base.qLabelExpression:r.qDef.qLabel=r.qDef.base.qLabel||a,n.base=t()(!0,{},r.qDef.base)}({measure:r,modifier:e,properties:n,dimensionAndFieldList:a}),function(e){var t=o(e,"qDef.qAggrFunc");"Expr"!==t||_e(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&_e(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(r)}}))}({measure:r,properties:n,libraryItemsProps:i,dimensionAndFieldList:e}),$e(r)):Re(r)}))}))}))}({measures:a,properties:i,model:r,libraryItemsProps:c,dimensionAndFieldList:p}).then((function(){return l?Je({oldProperties:n,newProperties:i,model:r}):Promise.resolve(!1)}))}))}function Re(e){!function(e){var t=Ve(e);return Array.isArray(t)&&t.some((function(e){return"object"===Ce(e)&&!e.disabled&&!Ne[e.type]}))}(e)?ke.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,$e(e)}function Pe(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ke({modifiers:Ve(e),properties:r,layout:n})}))}function Fe(e){var t=Ve(e);if(Array.isArray(t))for(var r=0;r<t.length;r++){var n=t[r];if(Ne[n.type]&&!n.disabled)return n}}function _e(e){var t=Fe(e);return!t||Ne[t.type].enableTotalsFunction(e)}function He(e){return o(e,"qHyperCubeDef.qMeasures",[]).concat(o(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function Ve(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function je(e){return o(e,"outputExpression.qValueExpression.qExpr")||o(e,"outputExpression")}function ze(e){He(e).forEach((function(e){return function(e){var r=Fe(e);r&&(void 0!==r.outputExpression&&je(r)!==e.qDef.qDef?delete e.qDef.base:!ke.isValid(e)&&r.base&&(e.qDef.base=t()(!0,{},r.base)))}(e)}))}function $e(e){var t=Ve(e);Array.isArray(t)&&t.forEach((function(t){"object"===Ce(t)&&(t.disabled||!Ne[t.type]&&je(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)}))}function Be(e){return e.base||e.qDef&&e.qDef.base}function We(e){var t=Be(e);return e.qLibraryId||t&&t.qLibraryId}function Ue(e){var t=e.measure,r=e.properties,n=e.layout;return!We(t)&&Ke({modifiers:Ve(t),properties:r,layout:n})}function Ke(e){var t=e.modifiers,r=e.properties,n=e.layout,i={};return Array.isArray(t)&&t.some((function(e){return!("object"!==Ce(e)||e.disabled||!Ne[e.type])&&(void 0===i[e.type]&&(i[e.type]=Ne[e.type].isApplicable({properties:r,layout:n})),i[e.type])}))}function Ge(e){var t=e.model,r=e.dimensionAndFieldList;if(r)return Promise.resolve(r);var n=[],i={},o=t.app.getDimensionList().then((function(e){i.dimensionList=e}));n.push(o);var a=t.app.getFieldList().then((function(e){i.fieldList=e}));return n.push(a),Promise.all(n).then((function(){return i}))}function Ye(e){var t=e.libraryIds,r=e.model,n=e.libraryItemsProps;if(n)return Promise.resolve(n);var i=t.measureLibraryIds,o=t.dimensionLibraryIds,a={},s=[];return i.forEach((function(e){var t=r.app.getMeasure(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),o.forEach((function(e){var t=r.app.getDimension(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),Promise.all(s).then((function(){return a}))}function Xe(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Je(e){var t=e.oldProperties,r=e.newProperties,n=e.model,i=JSON.stringify(o(t,"qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(o(r,"qHyperCubeDef.qMeasures"),Xe)||JSON.stringify(o(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(o(r,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe);return i?function(e){var t=e.model,r=e.oldProperties,n=e.newProperties,i=t.layout;return i&&!i.qHasSoftPatches&&!i.qExtendsId&&o(i,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(n):O(t,r,n)}({model:n,oldProperties:t,newProperties:r}).then((function(){return i})):Promise.resolve(i)}function Qe(e){var t=e.modifiers,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some((function(e){return"object"===Ce(e)&&!e.disabled&&Ne[e.type]&&Ne[e.type].needDimension({modifier:e,properties:r,layout:n})}))}function Ze(e){var t=He(e),r=[],n=[],i=!1;return t.forEach((function(t){var n=Ve(t);if(Ke({modifiers:n,properties:e})){var o=We(t);o&&r.push(o),i=i||Qe({modifiers:n,properties:e})}})),o(e,"qHyperCubeDef.qDimensions",[]).forEach((function(e){var t=e.qLibraryId;t&&n.push(t)})),{measureLibraryIds:r,dimensionLibraryIds:n}}function et(e){var t=e.model,r=e.libraryIds;return!e.masterItem&&r&&(r.measureLibraryIds.length||r.dimensionLibraryIds.length)?(Le[t.id].masterItemSubscriber=Le[t.id].masterItemSubscriber||function(e){var t=e.model,r=e.callback,n={},i={},a={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},r=o(e,"qInfo.qType");return r&&s[r]&&s[r].forEach((function(r){t[r]=o(e,r)})),JSON.stringify(t)}function u(e){var t=e.qInfo.qId;if(n[t]){var i=l(e);n[t].properties!==i&&(n[t].properties=i,"function"==typeof r&&n[t].enabled&&r(e)),n[t].enabled=!0}}function c(e,r){return t.app[r](e).then((function(t){n[e]={listener:t.layoutSubscribe(u),enabled:!1,properties:l(t.layout)}}))}return{subscribe:function(e){var r=e.measureLibraryIds,o=e.dimensionLibraryIds,s=[];return function(e){var t=e.dimensionLibraryIds;i={},e.measureLibraryIds.forEach((function(e){i[e]=!0})),a={},t.forEach((function(e){a[e]=!0}))}({measureLibraryIds:r,dimensionLibraryIds:o}),Object.keys(n).forEach((function(e){i[e]||a[e]||(n[e].listener.dispose(),delete n[e])})),t.app&&(Object.keys(i).forEach((function(e){i[e]&&!n[e]&&s.push(c(e,"getMeasure"))})),Object.keys(a).forEach((function(e){a[e]&&!n[e]&&s.push(c(e,"getDimension"))}))),Promise.all(s)},unsubscribe:function(){Object.keys(n).forEach((function(e){n[e].listener.dispose()})),n={}}}}({model:t,callback:function(e){return Te({model:t,masterItem:e}).then((function(){return t.app.clearUndoBuffer()}))}}),Le[t.id].masterItemSubscriber.subscribe(r)):Promise.resolve()}})(),t.default=i.default,Object.defineProperty(t,"__esModule",{value:!0})})()}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var n={};return(()=>{function e(t){var r,n=t;return n>9?(r=65+n-10)>90&&(r+=6):n="".concat(n).charCodeAt(0),[48,111,79,105,73,108].indexOf(r)>-1?e(n+1):String.fromCharCode(r)}function t(r){var n=e(r%62),i=Math.floor(r/62);return i>0?t(i)+n:n}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}r.d(n,{default:()=>ze});const o={getValue:function(e,t,r){if(null==e||null==t)return r;for(var n=t.split("."),i=e,o=0;o<n.length;++o){var a=n[o];if(""!==a){if(void 0===i[a]||null===i[a])return r;i=i[a]}}return i},setValue:function(e,t,r){if(null!=e&&null!=t){for(var n=t.split("."),i=n[n.length-1],o=e,a=0;a<n.length-1;++a){var s=n[a];void 0!==o[s]&&null!==o[s]||(o[s]=Number.isNaN(+n[a+1])?{}:[]),o=o[s]}void 0!==r?o[i]=r:delete o[i]}},isEmpty:function(e){return 0===Object.keys(e).length&&e.constructor===Object},isAtomicValue:function(e){return/boolean|number|string/.test(i(e))},generateId:function(){return t(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function a(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function l(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t,r){if(e){for(var n=0;n<e.length;n++)if(e[n][t]===r)return n;return-1}return-1}const p={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;var r=e.indexOf(t[0]);if(-1!==r){for(var n=0;n<t.length;n++){var i=e.indexOf(t[n]);if(r>i)return!1;r=i}return!0}return!1},indexAdded:function(e,t){var r;for(r=0;r<e.length;++r)e[r]>=0&&e[r]>=t&&++e[r];e.push(t)},indexRemoved:function(e,t){var r,n=0;for(r=0;r<e.length;++r)e[r]>t?--e[r]:e[r]===t&&(n=r);return e.splice(n,1),n},findItemByPropertyValue:function(e,t,r){if(e){for(var n=0;n<e.length;n++)if(e[n][t]===r)return e[n];return null}return null},findIndexByPropertyValue:c};var d=r(645),f=r.n(d);const m=function(e){var t,r=e.exportFormat,n=e.qHyperCubeDef,i=r.data[0];(t=i.dimensions).push.apply(t,a(n.qDimensions));var s,l=o.getValue(n,"qLayoutExclude.qHyperCubeDef.qDimensions");l&&(s=i.excludedDimensions).push.apply(s,a(l))},h=function(e){var t,r=e.exportFormat,n=e.qHyperCubeDef,i=r.data[0];(t=i.measures).push.apply(t,l(n.qMeasures));var a,s=o.getValue(n,"qLayoutExclude.qHyperCubeDef.qMeasures");s&&(a=i.excludedMeasures).push.apply(a,l(s))},g=function(e){var t=e.exportFormat,r=e.qHyperCubeDef,n=t.data[0];r.qInterColumnSortOrder||(r.qInterColumnSortOrder=[]),n.interColumnSortOrder=r.qInterColumnSortOrder.concat();var i=o.getValue(r,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");i&&p.isOrderedSubset(i,n.interColumnSortOrder)&&(n.interColumnSortOrder=i.concat())},y=function(e){var t=e.exportFormat,r=e.properties;Object.keys(r).forEach((function(e){t.properties[e]=r[e]}))},b=function(e){var t=e.exportFormat,r=e.properties;r.qLayoutExclude||(r.qLayoutExclude={}),r.qLayoutExclude.disabled&&(Object.keys(r.qLayoutExclude.disabled).forEach((function(e){t.properties.hasOwnProperty(e)||(t.properties[e]=r.qLayoutExclude.disabled[e])})),delete r.qLayoutExclude.disabled),r.qLayoutExclude.changed&&(function(e){Object.keys(e.qLayoutExclude.changed).forEach((function(t){e.qLayoutExclude.changed[t].to===o.getValue(e,t)&&o.setValue(e,t,e.qLayoutExclude.changed[t].from)}))}(r),delete r.qLayoutExclude.changed),r.qLayoutExclude.quarantine&&!o.isEmpty(r.qLayoutExclude.quarantine)||delete r.qLayoutExclude},v=function(e){e.forEach((function(e){f().cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)}))};function x(e,t,r){var n,i,a=o.getValue(e,t);if(!o.isAtomicValue(a))try{if((i=(i=(n=JSON.stringify(a)).match(/:\{/g))?i.length:0)>2)return;a=JSON.parse(n)}catch(e){return}o.getValue(e,"qLayoutExclude.quarantine")||o.setValue(e,"qLayoutExclude.quarantine",{});var s=o.getValue(e,"qLayoutExclude.quarantine");s[r]||(s[r]={}),s[r][t]=a}var q=r(229),D=r.n(q);function S(e,t){var r=D()(!0,{},t,e);return o.getValue(r,"qOtherTotalSpec.qOtherCounted")||o.setValue(r,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),o.getValue(r,"qOtherTotalSpec.qOtherLimit")||o.setValue(r,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),r.hasOwnProperty("othersLabel")||(r.othersLabel="Others"),r}function w(e,t){return D()(!0,{},t,e)}function M(e,t,r){return"function"==typeof e?e(t):Number.isNaN(+e)?r:e}var A=Math.pow(2,53)-1;function E(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 k(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 C=function(e,t,r){var n="masterobject"===o.getValue(t,"properties.qInfo.qType")?"masterobject":o.getValue(r,"qInfo.qType");o.setValue(e,"qInfo.qType",n),e.visualization=r.visualization},N=function(e,t,r){t.hasOwnProperty(e)&&(r[e]=t[e])},I=function(e,t,r,n){t.hasOwnProperty(e)?r[e]=t[e]:r[e]=n},L=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:[]}},O=function(e){var t,r=e.exportFormat,n=e.maxDimensions,i=e.minDimensions,o=e.newHyperCubeDef,a=e.defaultDimension,s=r.data[0];for(t=0;t<s.dimensions.length;++t){var l=S(s.dimensions[t],a);o.qDimensions.length<n?o.qDimensions.push(l):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(l)}for(t=0;t<s.excludedDimensions.length;++t){var u=S(s.excludedDimensions[t],a);o.qDimensions.length<i?o.qDimensions.push(u):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(u)}},R=function(e){var t,r=e.exportFormat,n=e.maxMeasures,i=e.minMeasures,o=e.newHyperCubeDef,a=e.defaultMeasure,s=r.data[0];for(t=0;t<s.measures.length;++t){var l=w(s.measures[t],a);o.qMeasures.length<n?o.qMeasures.push(l):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(l)}for(t=0;t<s.excludedMeasures.length;++t){var u=w(s.excludedMeasures[t],a);o.qMeasures.length<i?o.qMeasures.push(u):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(u)}},P=function(e){var t=e.exportFormat,r=e.dataDefinition,n=void 0===r?{}:r,i=t.data[0],o=n.dimensions||{max:0},a=n.measures||{max:0},s=M(a.max,i.dimensions.length,A),l=M(a.min,i.dimensions.length,0);return{maxDimensions:M(o.max,s,A),minDimensions:M(o.min,l,0),maxMeasures:s,minMeasures:l}},F=function(e){var t=e.exportFormat,r=e.newHyperCubeDef,n=t.data[0],i=r.qDimensions.length+r.qMeasures.length;r.qInterColumnSortOrder=n.interColumnSortOrder.concat();var o=r.qInterColumnSortOrder.length;if(o!==i)for(r.qLayoutExclude&&(r.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=n.interColumnSortOrder.concat());o!==i;)o<i?(p.indexAdded(r.qInterColumnSortOrder,o),++o):(--o,p.indexRemoved(r.qInterColumnSortOrder,o))},_=function(e){var t=e.exportFormat,r=e.initialProperties,n=e.hypercubePath,i={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach((function(e){"qLayoutExclude"===e?t.properties[e].quarantine&&(i.qLayoutExclude.quarantine=D()(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&n?o.setValue(i,"".concat(n,".qHyperCubeDef"),t.properties.qHyperCubeDef):r.hasOwnProperty(e)||-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)||function(e,t){return"components"===t&&Array.isArray(e[t])&&e[t].some((function(e){return"general"===e.key}))}(t.properties,e)?i[e]=t.properties[e]:i.qLayoutExclude.disabled[e]=t.properties[e]})),null===(i=D()(!0,{},r,i)).components&&(i.components=[]),i},H=function(e){var t=e.exportFormat,r=e.maxDimensions,n=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=t.data[0];return a.dimensions.length>r&&r>0||a.measures.length>i&&i>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>n||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>o||!i&&a.measures.length>0||!r&&a.dimensions.length>0},V=function(e){var t=e.exportFormat,r=e.maxDimensions,n=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=e.newHyperCubeDef,s=t.data[0];a.qLayoutExclude||(a.qLayoutExclude={}),a.qLayoutExclude.qHyperCubeDef||(a.qLayoutExclude.qHyperCubeDef={}),(s.dimensions.length>r&&r>0||s.excludedDimensions&&s.excludedDimensions.length&&s.dimensions.length+s.excludedDimensions.length>n)&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(s.measures.length>i&&i>0||s.excludedMeasures&&s.excludedMeasures.length&&s.measures.length+s.excludedMeasures.length>o)&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!i&&s.measures.length&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!r&&s.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))},j=function(e){var t,r=e.newProperties,n=e.dataDefinition,i=e.hypercubePath;if(n.dimensions&&"function"==typeof n.dimensions.added){var a=o.getValue(r,i||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return E(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 E(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)?E(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)}))}},z=function(e){var t,r=e.newProperties,n=e.dataDefinition,i=e.hypercubePath;if(n.measures&&"function"==typeof n.measures.added){var a=o.getValue(r,i||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return k(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 k(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)?k(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)}))}},$=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 B(e,t){var r=o.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!r&&(Object.keys(r).forEach((function(t){o.setValue(e,t,r[t])})),delete e.qLayoutExclude.quarantine[t],!0)}const W={exportProperties:function(e){var t=e.propertyTree,r=e.hypercubePath,n=e.viewDataMode,i=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t={data:[],properties:{}},r=0;r<e;++r)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}(),a=t.qProperty,s=o.getValue(a,r||""),l=s.qHyperCubeDef;return l.qInterColumnSortOrder||(l.qInterColumnSortOrder=[]),m({exportFormat:i,qHyperCubeDef:l}),h({exportFormat:i,qHyperCubeDef:l}),g({exportFormat:i,qHyperCubeDef:l}),delete l.qLayoutExclude,y({exportFormat:i,properties:a}),r&&(i.properties.qHyperCubeDef=l,delete s.qHyperCubeDef),b({exportFormat:i,properties:a}),n||v(i.properties.qHyperCubeDef.qMeasures),Array.isArray(i.properties.filters)&&(x(i.properties,"filters","storedFilters"),delete i.properties.filters),i.properties.qHyperCubeDef.qContextSetExpression&&(x(i.properties,"qHyperCubeDef.qContextSetExpression","storedFilters"),i.properties.qHyperCubeDef.qContextSetExpression=""),i.properties.qHyperCubeDef.qDynamicScript&&i.properties.qHyperCubeDef.qDynamicScript.length&&(x(i.properties,"qHyperCubeDef.qDynamicScript","dynamicScript"),i.properties.qHyperCubeDef.qDynamicScript=[]),i},importProperties:function(e){var t=e.exportFormat,r=e.initialProperties,n=void 0===r?{}:r,i=e.dataDefinition,a=void 0===i?{}:i,s=e.defaultPropertyValues,l=void 0===s?{}:s,u=e.hypercubePath,c=e.extension,p=e.supportedFilters,d=void 0===p||p,f=e.isHCModifierSupported,m=void 0===f||f,h={qChildren:[]},g=_({exportFormat:t,initialProperties:n,hypercubePath:u}),y=o.getValue(n,u||"").qHyperCubeDef,b=o.getValue(g,u||"").qHyperCubeDef,v=P({exportFormat:t,dataDefinition:a}),x=v.maxDimensions,q=v.minDimensions,D=v.maxMeasures,S=v.minMeasures,w=l.defaultDimension,M=void 0===w?L():w,A=l.defaultMeasure,E=void 0===A?T():A;b.qDimensions.length=0,b.qMeasures.length=0,H({exportFormat:t,maxDimensions:x,minDimensions:q,maxMeasures:D,minMeasures:S})&&V({exportFormat:t,maxDimensions:x,minDimensions:q,maxMeasures:D,minMeasures:S,newHyperCubeDef:b}),O({exportFormat:t,maxDimensions:x,minDimensions:q,newHyperCubeDef:b,defaultDimension:M}),R({exportFormat:t,maxMeasures:D,minMeasures:S,newHyperCubeDef:b,defaultMeasure:E}),j({newProperties:g,dataDefinition:a,hypercubePath:u}),z({newProperties:g,dataDefinition:a,hypercubePath:u}),F({exportFormat:t,newHyperCubeDef:b}),N("qMaxStackedCells",y,b),N("qNoOfLeftDims",y,b),I("qInitialDataFetch",y,b,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),I("qMode",y,b,"S"),I("qReductionMode",y,b,"N"),I("qSortbyYValue",y,b),I("qIndentMode",y,b),I("qShowTotalsAbove",y,b),C(g,t,n),h.qProperty=g;var k=o.getValue(c||{},"support.modifiers");return $({measures:b.qMeasures,modifierTypes:k}),d&&B(h.qProperty,"storedFilters"),"S"===b.qMode&&m&&B(h.qProperty,"dynamicScript"),h}};var U={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function K(e,t,r,n){t=t||[];var i=c(e,n,r),o=c(t,n,r);if(-1!==i&&-1===o){var a=e.splice(i,1);t.push(a[0])}return t}function G(e,t){return e.length!==t}const Y={create:function(e,t){if(!e||!U[e])throw new Error("Attribute Expressions Util: ID required");var r={};return t&&Object.keys(t).forEach((function(e){r[e]=t[e]})),r.id=e,r.qAttribute=!0,r},moveByIdFromGroup:function(e,t,r,n,i){r=r||"qAttributeExpressions",i=i||"id";for(var o=0;o<e.length;o++){var a=e[o][r],s=t.length;if(K(a,t,n,i),G(t,s))return t}return t},IDMAP:{CELL_BACKGROUND_COLOR:"cellBackgroundColor",CELL_FOREGROUND_COLOR:"cellForegroundColor",COLOR_BY_ALTERNATIVE:"colorByAlternative",COLOR_BY_EXPRESSION:"colorByExpression",TOOLTIP:"tooltip",CELL_LINK_LABEL:"urlLabel",CELL_LINK_URL:"url"}},X={getNumDimensions:function(e){return o.getValue(e,"qHyperCubeDef.qDimensions.length",0)},getNumMeasures:function(e){return o.getValue(e,"qHyperCubeDef.qMeasures.length",0)},wrapFieldName:function(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e},getItemLabel:function(e){return e.label||e.name}},J={colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>0&&X.getNumMeasures(e)<=1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)>0},expression:function(e){return X.getNumMeasures(e)>=1}}},Q={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 Z={scatterplot:Q,"sn-scatter-plot":Q,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=p.findIndexByPropertyValue(e[t],"id",r);n>=0&&e[t].splice(n,1)}else e[t]=[]}function te(e,t){var r=Y.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach((function(e){ee(e,"qAttributeDimensions",r),ee(e,"qAttributeExpressions",r)})),t.forEach((function(e){ee(e,"qAttributeDimensions",r),ee(e,"qAttributeExpressions",r)}))}function re(e,t){if(t){var r="="===t.charAt(0);e.color.altLabel=r?{qStringExpression:{qExpr:t.substr(1)}}:t}}function ne(e){var t=e.properties,r=e.isDimension,n=e.dimensions,i=e.excludedDimensions,a=e.measures,s=e.label;te(n,i);var l=n[n.length-1];if(l){var u=r?o.getValue(t,"color.byDimDef"):o.getValue(t,"color.byMeasureDef"),c=o.getValue(t,"color.formatting.qNumFormat"),d=o.getValue(t,"color.formatting.isCustomFormatted");if(u){var f=Y.create(Y.IDMAP.COLOR_BY_ALTERNATIVE);switch(u.type){case"expression":!function(e){var t=e.attributeExpression,r=e.label,n=e.item,i=e.isDimension,o=e.qNumFormat,a=e.isCustomFormatted;t.label=r||n.label,i?t.qDef=n.key:(t.qExpression=n.key,o&&(t.qNumFormat=o,t.isCustomFormatted=a)),t.matchMeasure=n.activeMeasureIndex,t.label&&"="===t.label.charAt(0)&&(t.labelExpRef="color.altLabel")}({attributeExpression:f,label:s,item:u,isDimension:r,qNumFormat:c,isCustomFormatted:d});break;case"libraryItem":!function(e){var t=e.attributeExpression,r=e.measures,n=e.item,i=e.qNumFormat,o=e.isCustomFormatted;e.isDimension||(t.matchMeasure=p.findIndexByPropertyValue(r,"qLibraryId",n.key),i&&(t.qNumFormat=i,t.isCustomFormatted=o)),void 0!==n.expression?t.qExpression=n.expression:t.qLibraryId=n.key,t.colorMapRef=n.key}({attributeExpression:f,measures:a,item:u,isDimension:r,qNumFormat:c,isCustomFormatted:d})}r?(f.qSortBy={qSortByAscii:1},l.qAttributeDimensions.push(f)):l.qAttributeExpressions.push(f)}}}function ie(e,t,r,n){var i,o,a,s={};switch(e){case"dimension":r.qLibraryId?(s.type="dimension",s.name=r.qLibraryId,s.id=r.qLibraryId):(s.type="field",t?(s.name=r.label||r.qDef,s.id=r.qDef):(s.name=r.qDef.qFieldDefs[0],s.label=(a=r.qDef).qLabelExpression?a.qLabelExpression:a.qFieldLabels&&a.qFieldLabels[0]?a.qFieldLabels[0]:a.qFieldDefs[0]));break;case"measure":i=function(e,t){return t?e.qLibraryId:f().measureBase.getLibraryId(e)}(r,t),i?(s.type="measure",s.name=i,s.id=i,o=function(e,t){return f().hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}(r,n),o&&(s.expression=o)):(s.type="expression",t?(s.name=r.label||r.qExpression,s.id=r.qExpression):(s.name=r.qDef.qDef,s.label=function(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qLabel?t.qLabel:t.qDef}(r)));break;default:throw new Error('columnType should be "dimension" or "measure"')}return s}const oe={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}};function ae(e,t,r,n){var i=t.type,o=e.color,a=o.mode,s=X.getItemLabel(t);switch(re(e,s||""),i){case"field":a="byDimension",o.byDimDef={label:t.label||X.wrapFieldName(t.name),key:X.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":a="byMeasure",o.byMeasureDef={label:s,key:t.name,type:"expression",activeMeasureIndex:t.activeMeasureIndex};break;case"dimension":a="byDimension",o.byDimDef={label:t.name,key:t.id,type:"libraryItem",activeDimensionIndex:t.activeDimensionIndex};break;case"measure":a="byMeasure",o.byMeasureDef={label:t.name,key:t.id,expression:t.expression,type:"libraryItem",activeMeasureIndex:t.activeMeasureIndex},o.formatting&&oe.useMasterNumberFormat(o.formatting)}o.auto=!1,o.mode=a}function se(e,t){var r=o.getValue(e,"".concat(t,"qDimensions"),[]),n=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byDimDef");if(a&&re(e,a.label),function(e){return!!(e&&e.activeDimensionIndex>-1)}(a))!function(e,t){var r=o.getValue(e,"".concat(t,"qDimensions"),[]),n=o.getValue(e,"color.byDimDef");n.activeDimensionIndex=Math.min(n.activeDimensionIndex,r.length-1);var i=ie("dimension",!1,r[n.activeDimensionIndex]);i.activeDimensionIndex=n.activeDimensionIndex,ae(e,i)}(e,t);else if(function(e){return!e||!e.key}(a)&&function(e,t){var r=o.getValue(e,"".concat(t,"qDimensions"),[]),n=r[function(e,t,r){var n=o.getValue(t,"visualization"),i=r.split("."),a=Number(i[1]),s=o.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===n&&"point"===s}(r,e,t)?0:r.length-1],i=Y.IDMAP.COLOR_BY_ALTERNATIVE,a=p.findItemByPropertyValue(n.qAttributeDimensions,"id",i);return ae(e,ie("dimension",!!a,a||n)),!!a}(e,t))return;ne({properties:e,isDimension:!0,dimensions:r,excludedDimensions:i,measures:n,label:o.getValue(e,"color.byDimDef.label")})}const le=function(e,t,r){o.setValue(e,t,r),o.isAtomicValue(r)&&function(e,t,r){var n=e.qLayoutExclude;n&&(n.changed||(n.changed={}),n.changed[t]={from:o.getValue(e,t),to:r})}(e,t,r)},ue=function(e,t){var r={primary:!0};if(e){var n=(Z[t]||J).colorModeOptions||J.colorModeOptions;r.byDimension=n.dimension(e),r.byMeasure=n.measure(e),r.byMultiple=n.multiColor(e),r.byExpression=n.expression(e)}return r},ce=function(e){var t=e.canColorBy,r=e.autoColor,n=e.colorMode,i=e.dimensions;return!(t[n]&&!r&&("byDimension"!==n&&"byMeasure"!==n||!i.length))},pe=function(e,t){var r,n=o.getValue(e,"color.mode"),i=o.getValue(e,"color.auto"),a=o.getValue(e,"".concat(t,"qDimensions"),[]),s=o.getValue(e,"".concat(t,"qMeasures"),[]),l=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);i?te(a,l):!(r={auto:i,colorMode:n,dimensions:a}).auto&&"byDimension"===r.colorMode&&r.dimensions.length>0?se(e,t):function(e){var t=e.auto,r=e.colorMode,n=e.dimensions,i=e.measures,a=e.properties,s=o.getValue(a,"visualization");return!(t||"byMeasure"!==r||!n.length||"map"!==s&&!i.length)}({auto:i,colorMode:n,dimensions:a,measures:s,properties:e})?function(e,t){var r=o.getValue(e,"".concat(t,"qDimensions"),[]),n=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byMeasureDef");if(a&&re(e,a.label),function(e){return!!(e&&e.activeMeasureIndex>-1)}(a))!function(e,t){var r=o.getValue(e,"".concat(t,"qMeasures"),[]),n=o.getValue(e,"color.byMeasureDef");if(n.activeMeasureIndex=Math.min(n.activeMeasureIndex,r.length-1),n.activeMeasureIndex>-1){var i=ie("measure",!1,r[n.activeMeasureIndex],!0);i.activeMeasureIndex=n.activeMeasureIndex,ae(e,i)}}(e,t);else if(function(e,t){return(!e||!e.key)&&t.length>0}(a,n)&&function(e,t){var r=o.getValue(e,"".concat(t,"qDimensions"),[]),n=o.getValue(e,"".concat(t,"qMeasures"),[]),i=r[r.length-1],a=Y.IDMAP.COLOR_BY_ALTERNATIVE,s=p.findItemByPropertyValue(i.qAttributeExpressions,"id",a);return ae(e,ie("measure",!!s,s||n[0])),!!s}(e,t))return;ne({properties:e,isDimension:!1,dimensions:r,excludedDimensions:i,measures:n,label:o.getValue(e,"color.byMeasureDef.label")})}(e,t):function(e,t){var r=o.getValue(e,"color.mode"),n=o.getValue(e,"".concat(t,"qDimensions"),[]),i=o.getValue(e,"".concat(t,"qMeasures"),[]),a=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===r&&i.length<2&&o.setValue(e,"color.mode","primary"),te(n,a)}(e,t)},de=function(e){e.forEach((function(e){e.qOtherTotalSpec&&"qTotalMode"in e.qOtherTotalSpec&&delete e.qOtherTotalSpec.qTotalMode}))},fe=function(e){var t=e.shouldUpdateColorBy,r=e.properties,n=o.getValue(r,"qHyperCubeDef.qMeasures",[]),i=o.getValue(r,"color.mode","");return!t&&"byExpression"===i&&n.length>0},me=function(e){var t=o.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),r=o.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:r,id:"colorByExpression"}),o.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)},he=function(e){o.setValue(e,"color.mode","primary"),o.setValue(e,"color.auto",!0)},ge=function(e){var t=o.getValue(e,"qHyperCubeDef.qDimensions",[]),r=o.getValue(e,"color.persistent",!1);return t.length>1&&!r},ye={exportProperties:function(e){var t=e.propertyTree,r=e.hypercubePath,n=e.viewDataMode,i=W.exportProperties({propertyTree:t,hypercubePath:r,viewDataMode:n}),o=i.data[0],a=o.dimensions.concat(o.excludedDimensions),s=o.measures.concat(o.excludedMeasures),l=Y.IDMAP,u=l.COLOR_BY_ALTERNATIVE,c=l.COLOR_BY_EXPRESSION;return Y.moveByIdFromGroup(a,[],"qAttributeDimensions",u),Y.moveByIdFromGroup(a,[],"qAttributeExpressions",u),Y.moveByIdFromGroup(s,[],"qAttributeExpressions",c),i},importProperties:function(e){var t=e.exportFormat,r=e.initialProperties,n=e.dataDefinition,i=e.defaultPropertyValues,a=e.hypercubePath,s=e.extension,l=e.supportedFilters,u=e.isHCModifierSupported,c=W.importProperties({exportFormat:t,initialProperties:r,dataDefinition:n,defaultPropertyValues:i,hypercubePath:a,extension:s,supportedFilters:l,isHCModifierSupported:u}),p=c.qProperty,d=o.getValue(p,"visualization"),f=o.getValue(p,"qHyperCubeDef.qDimensions",[]),m=o.getValue(p,"color.mode",""),h=o.getValue(p,"color.auto",""),g=ue(p,d),y=ce({canColorBy:g,autoColor:h,colorMode:m,dimensions:f});return g[m]?fe({shouldUpdateColorBy:y,properties:p})&&me(p):he(p),y&&pe(p,"qHyperCubeDef."),ge(p)&&le(p,"color.persistent",!0),de(f),c}};var be=["bar","marker","line"];const ve=function(e){var t=e.initialProperties,r=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?B(r,"unsupportedAutoMinMax")||D()(r.measureAxis,t.measureAxis):B(r,"supportedAutoMinMax")||D()(r.measureAxis,t.measureAxis)},xe=function(e){var t,r=e.exportFormat,n=e.initialProperties,i=e.properties,o=e.measureType,a=i.qHyperCubeDef,s=i.measureAxis;if(function(e){var t=e.initialProperties;return!(!e.exportFormat.properties.measureAxes||t.measureAxes||!t.measureAxis||void 0===t.measureAxis.autoMinMax)}({exportFormat:r,initialProperties:n})){var l=function(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach((function(e){if(e.qDef.series){var r=e.qDef.series,n=r.type,i=r.axis;t[i]||(t[i]={axis:i,type:{line:0,marker:0,bar:0,total:0}}),be.includes(n)&&t[i].type[n]++,t[i].type.total++}})),t}(a);l.length?(o&&(t=l.filter((function(e){return e.type[o]>0})).sort((function(e,t){return t.type[o]-e.type[o]}))),t&&t.length||(t=l.sort((function(e,t){return t.type.total-e.type.total}))),t&&t[0]&&D()(s,r.properties.measureAxes[t[0].axis])):D()(s,r.properties.measureAxes[0])}},qe=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}}},De={exportProperties:function(e){var t=e.propertyTree,r=e.hypercubePath,n=e.viewDataMode,i=e.supportedAutoMinMax,o=void 0===i||i,a=ye.exportProperties({propertyTree:t,hypercubePath:r,viewDataMode:n}),s=a.properties;return o?(x(s,"measureAxis.min","supportedAutoMinMax"),x(s,"measureAxis.max","supportedAutoMinMax")):(x(s,"measureAxis.min","unsupportedAutoMinMax"),x(s,"measureAxis.max","unsupportedAutoMinMax")),a},importProperties:function(e){var t=e.exportFormat,r=e.initialProperties,n=e.dataDefinition,i=e.defaultPropertyValues,o=e.hypercubePath,a=e.measureType,s=e.extension,l=e.supportedFilters,u=e.isHCModifierSupported,c=ye.importProperties({exportFormat:t,initialProperties:r,dataDefinition:n,defaultPropertyValues:i,hypercubePath:o,extension:s,supportedFilters:l,isHCModifierSupported:u}),p=c.qProperty;return ve({initialProperties:r,properties:p}),xe({exportFormat:t,initialProperties:r,properties:p,measureType:a}),qe(p.qHyperCubeDef),p.qHyperCubeDef.qColumnOrder=[],p.qHyperCubeDef.columnOrder=[],c}};function Se(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,i=e.arrayName,a=e.itemPath;o.getValue(t,r,[]).forEach((function(e){return function(e){var t=e.properties,r=e.quarantineName,n=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,a);if(void 0!==s){var l=o.getValue(i,"qDef.cId");l||(l=o.generateId(),o.setValue(i,"qDef.cId",l));var u=Se(r,n,l);o.setValue(t,u,s),o.setValue(i,a,void 0)}}({properties:t,quarantineName:n,arrayName:i,item:e,itemPath:a})}))}function Me(e){var t=e.properties,r=e.arrayPath,n=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,r,[]).forEach((function(e){return function(e){var t=e.properties,r=e.quarantineName,n=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,"qDef.cId");if(s){var l=Se(r,n,s),u=o.getValue(t,l);void 0!==u&&(o.setValue(i,a,u),o.setValue(t,l,void 0))}}({properties:t,quarantineName:n,arrayName:i,item:e,itemPath:a})}))}var Ae="qHyperCubeDef.qMeasures",Ee="conditionalColoring",ke="measures",Ce="qDef.conditionalColoring";const Ne={quarantine:function(e){we({properties:e,arrayPath:Ae,quarantineName:Ee,arrayName:ke,itemPath:Ce})},unquarantine:function(e){Me({properties:e,arrayPath:Ae,itemPath:Ce,arrayName:ke,quarantineName:Ee})}};var Ie="qHyperCubeDef.qMeasures",Le="measures",Te="qHyperCubeDef.qDimensions",Oe="dimensions",Re="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",Pe="alternativeMeasures",Fe="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",_e="alternativeDimensions",He="qCalcCondition",Ve="conditionalShowHide";const je={quarantine:function(e){we({properties:e,arrayPath:Ie,quarantineName:Ve,arrayName:Le,itemPath:He}),we({properties:e,arrayPath:Te,quarantineName:Ve,arrayName:Oe,itemPath:He})},unquarantine:function(e){Me({properties:e,arrayPath:Ie,quarantineName:Ve,arrayName:Le,itemPath:He}),Me({properties:e,arrayPath:Te,quarantineName:Ve,arrayName:Oe,itemPath:He})},quarantineAlternative:function(e){we({properties:e,arrayPath:Re,quarantineName:Ve,arrayName:Pe,itemPath:He}),we({properties:e,arrayPath:Fe,quarantineName:Ve,arrayName:_e,itemPath:He})},unquarantineAlternative:function(e){Me({properties:e,arrayPath:Re,quarantineName:Ve,arrayName:Pe,itemPath:He}),Me({properties:e,arrayPath:Fe,quarantineName:Ve,arrayName:_e,itemPath:He})}},ze={hypercube:W,colorChart:ye,axisChart:De,quarantineProperty:x,unquarantineProperty:B,quarantineArrayProp:we,unquarantineArrayProp:Me,conditionalColoring:Ne,conditionalShow:je}})(),n.default})()),C.exports),I=E(N);function L({dataDefinition:e,defaultPropertyValues:t,exportFormat:r,initialProperties:n}){const i=I.hypercube.importProperties({exportFormat:r,initialProperties:n,dataDefinition:e,defaultPropertyValues:t}),o=i.qProperty;return"all"===o.dimensionAxis.show?o.dimensionAxis.show="labels":"title"===o.dimensionAxis.show&&(o.dimensionAxis.show="none"),"all"===o.measureAxis.show?o.measureAxis.show="labels":"title"===o.measureAxis.show&&(o.measureAxis.show="none"),o.qHyperCubeDef.qMeasures.length>0&&(o.qDef.numFormatFromTemplate=o.qHyperCubeDef.qMeasures[0].qDef.numFormatFromTemplate,o.qDef.qNumFormat=o.qHyperCubeDef.qMeasures[0].qDef.qNumFormat,o.qHyperCubeDef.qMeasures.forEach((e=>{e.qDef.numFormatFromTemplate=o.qDef.numFormatFromTemplate,e.qDef.qNumFormat=q(!0,{},o.qDef.qNumFormat)}))),o.qHyperCubeDef.qSuppressZero=!1,i}function T({propertyTree:e,viewDataMode:t}){return I.hypercube.exportProperties({propertyTree:e,viewDataMode:t})}var O=e=>{const t=A(e);return{properties:M,data:{targets:[t]},importProperties:({exportFormat:e,initialProperties:r})=>L({dataDefinition:t,exportFormat:e,initialProperties:r}),exportProperties:T}};function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function P(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,i,o,a,s=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(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 F(e){return function(e){if(Array.isArray(e))return R(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||_(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 _(e,t){if(e){if("string"==typeof e)return R(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?R(e,t):void 0}}var H=["American Typewriter, serif","Andalé Mono, monospace","Arial Black, sans-serif","Arial, sans-serif","Bradley Hand, cursive","Brush Script MT, cursive","Comic Sans MS, cursive","Courier, monospace","Didot, serif","Georgia, serif","Impact, sans-serif","Lucida Console, monospace","Luminari, fantasy","Monaco, monospace","QlikView Sans, sans-serif","Source Sans Pro, sans-serif","Tahoma, sans-serif","Times New Roman, serif","Trebuchet MS, sans-serif","Verdana, sans-serif"],V=["Abril Fatface, serif","Bangers, fantasy","Bebas Neue, sans serif","EB Garamond, serif","Fredoka One, fantasy","Graduate, fantasy","Gravitas One, serif","Indie Flower, fantasy","Inter, sans-serif","Lobster, fantasy","Montserrat, sans-serif","Nixie One, sans-serif","Noto Sans, sans-serif","Open Sans, sans-serif","PT Serif, serif","Pacifico, cursive","Permanent Marker, fantasy","QlikView Sans, sans-serif","Raleway, sans-serif","Rammetto One, fantasy","Roboto, sans-serif","Source Sans Pro, sans-serif","Titan One, fantasy","Yanone Kaffeesatz, sans-serif"];var j=function(e){return{value:e,label:e.charAt(0).toUpperCase()+e.slice(1),groupHeader:!1,disabled:!1,styles:{fontFamily:e}}};function z(e){var t=e.theme,r=e.translator,n=e.defaultValue,i=e.flags,o=[],a=t.getStyle("","","fontFamilies");return Array.isArray(a)&&a.length?o.push.apply(o,F(new Set([n].concat(F(a.map((function(e){return e.split(",").map((function(e){return e.trim()})).map((function(e){return e.replace(/\s+/g," ").trim()})).filter(Boolean).join(", ")}))))))):o.push(n),[{value:"ThemeHeader",label:r.get("properties.themeFonts"),metaText:r.get("properties.theme"),groupHeader:!0}].concat(F(o.map((function(e){return j(e)}))),[{value:"DefaultHeader",label:r.get("properties.allFonts"),metaText:r.get("properties.default"),groupHeader:!0}],F(function(e){return null!=e&&e.isEnabled("PS_20852_WYSIWYG_FONT_SUPPORT")?V:H}(i).map((function(e){return j(e)}))))}function $(e){var t=e.theme,r=e.translator,n=e.id,i=e.path,o=e.flags,a=function(){return t.getStyle(n,i,"fontFamily")};return{getDefaultValue:function(){return a()},getOptions:function(){return z({theme:t,translator:r,defaultValue:a(),flags:o})}}}var B,W,U=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],K=function(e){return{value:e,label:e,groupHeader:!1,disabled:!1}};function G(e){var t=e.theme,r=e.translator,n=e.id,i=e.path,o=function(){return t.getStyle(n,i,"fontSize")};return{getDefaultValue:function(){return o()},getOptions:function(){return function(e){var t=e.translator,r=e.defaultValue,n=[],i=e.theme.getStyle("","","fontSizes");return Array.isArray(i)&&i.length?n.push.apply(n,F(new Set([r].concat(F(i))))):n.push(r),[{value:"ThemeHeader",label:t.get("properties.themeFontSizes"),metaText:t.get("properties.theme"),groupHeader:!0}].concat(F(n.map((function(e){return K(e)}))),[{value:"DefaultHeader",label:t.get("properties.allFontSizes"),metaText:t.get("properties.default"),groupHeader:!0}],F(U.map((function(e){return K(e)}))))}({theme:t,translator:r,defaultValue:o()})}}}function Y(e){var t=e.theme,r=e.translator,n=e.id,i=e.path;return{fontFamily:$({theme:t,translator:r,id:n,path:i,flags:e.flags}),fontSize:G({theme:t,translator:r,id:n,path:i})}}function X(e){var t=e.theme,r=e.translator,n=e.config,i=void 0===n?{}:n,o=e.flags,a=function(e){var t=e.config,r=void 0===t?{}:t,n=r.id,i=r.paths;return{id:void 0===n?"object":"".concat("object",".").concat(n),paths:Array.isArray(i)?i:[]}}({config:i}),s=a.id,l=a.paths,u={};l.forEach((function(e){for(var n=e.split("."),i=u,a=0;a<n.length;a++){var l=n[a];a===n.length-1?i[l]=Y({theme:t,translator:r,id:s,path:e,flags:o}):void 0===i[l]&&(i[l]={}),i=i[l]}}));var c=function(e){for(var t=e.split("."),r=u,n=0;n<t.length;n++){var i=t[n];if(void 0===r[i])throw new Error("font-resolver: Path '".concat(e,"' could not be resolved."));r=r[i]}return r};return u.getDefaultValue=function(e){return c(e).getDefaultValue()},u.getOptions=function(e){return c(e).getOptions()},u}var J,Q=function(){if(W)return B;W=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},o=function(r){if(!r||"[object Object]"!==t.call(r))return!1;var n,i=e.call(r,"constructor"),o=r.constructor&&r.constructor.prototype&&e.call(r.constructor.prototype,"isPrototypeOf");if(r.constructor&&!i&&!o)return!1;for(n in r);return void 0===n||e.call(r,n)},a=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,r){if("__proto__"===r){if(!e.call(t,r))return;if(n)return n(t,r).value}return t[r]};return B=function e(){var t,r,n,l,u,c,p=arguments[0],d=1,f=arguments.length,m=!1;for("boolean"==typeof p&&(m=p,p=arguments[1]||{},d=2),(null==p||"object"!=typeof p&&"function"!=typeof p)&&(p={});d<f;++d)if(null!=(t=arguments[d]))for(r in t)n=s(p,r),p!==(l=s(t,r))&&(m&&l&&(o(l)||(u=i(l)))?(u?(u=!1,c=n&&i(n)?n:[]):c=n&&o(n)?n:{},a(p,{name:r,newValue:e(m,c,l)})):void 0!==l&&a(p,{name:r,newValue:l}));return p},B}();function Z(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function ee(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function te(){}(J=Q)&&J.__esModule&&Object.prototype.hasOwnProperty.call(J,"default")&&J.default;var re=1/.7,ne="\\s*([+-]?\\d+)\\s*",ie="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",oe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ae=/^#([0-9a-f]{3,8})$/,se=new RegExp(`^rgb\\(${ne},${ne},${ne}\\)$`),le=new RegExp(`^rgb\\(${oe},${oe},${oe}\\)$`),ue=new RegExp(`^rgba\\(${ne},${ne},${ne},${ie}\\)$`),ce=new RegExp(`^rgba\\(${oe},${oe},${oe},${ie}\\)$`),pe=new RegExp(`^hsl\\(${ie},${oe},${oe}\\)$`),de=new RegExp(`^hsla\\(${ie},${oe},${oe},${ie}\\)$`),fe={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 me(){return this.rgb().formatHex()}function he(){return this.rgb().formatRgb()}function ge(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=ae.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?ye(t):3===r?new qe(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?be(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?be(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=se.exec(e))?new qe(t[1],t[2],t[3],1):(t=le.exec(e))?new qe(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=ue.exec(e))?be(t[1],t[2],t[3],t[4]):(t=ce.exec(e))?be(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=pe.exec(e))?Ee(t[1],t[2]/100,t[3]/100,1):(t=de.exec(e))?Ee(t[1],t[2]/100,t[3]/100,t[4]):fe.hasOwnProperty(e)?ye(fe[e]):"transparent"===e?new qe(NaN,NaN,NaN,0):null}function ye(e){return new qe(e>>16&255,e>>8&255,255&e,1)}function be(e,t,r,n){return n<=0&&(e=t=r=NaN),new qe(e,t,r,n)}function ve(e){return e instanceof te||(e=ge(e)),e?new qe((e=e.rgb()).r,e.g,e.b,e.opacity):new qe}function xe(e,t,r,n){return 1===arguments.length?ve(e):new qe(e,t,r,null==n?1:n)}function qe(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function De(){return`#${Ae(this.r)}${Ae(this.g)}${Ae(this.b)}`}function Se(){const e=we(this.opacity);return`${1===e?"rgb(":"rgba("}${Me(this.r)}, ${Me(this.g)}, ${Me(this.b)}${1===e?")":`, ${e})`}`}function we(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Me(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ae(e){return((e=Me(e))<16?"0":"")+e.toString(16)}function Ee(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Ce(e,t,r,n)}function ke(e){if(e instanceof Ce)return new Ce(e.h,e.s,e.l,e.opacity);if(e instanceof te||(e=ge(e)),!e)return new Ce;if(e instanceof Ce)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(r-n)/s+6*(r<n):r===o?(n-t)/s+2:(t-r)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Ce(a,s,l,e.opacity)}function Ce(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function Ne(e){return(e=(e||0)%360)<0?e+360:e}function Ie(e){return Math.max(0,Math.min(1,e||0))}function Le(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}Z(te,ge,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:me,formatHex:me,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ke(this).formatHsl()},formatRgb:he,toString:he}),Z(qe,xe,ee(te,{brighter(e){return e=null==e?re:Math.pow(re,e),new qe(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new qe(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new qe(Me(this.r),Me(this.g),Me(this.b),we(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:De,formatHex:De,formatHex8:function(){return`#${Ae(this.r)}${Ae(this.g)}${Ae(this.b)}${Ae(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Se,toString:Se})),Z(Ce,(function(e,t,r,n){return 1===arguments.length?ke(e):new Ce(e,t,r,null==n?1:n)}),ee(te,{brighter(e){return e=null==e?re:Math.pow(re,e),new Ce(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new Ce(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new qe(Le(e>=240?e-240:e+120,i,n),Le(e,i,n),Le(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Ce(Ne(this.h),Ie(this.s),Ie(this.l),we(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=we(this.opacity);return`${1===e?"hsl(":"hsla("}${Ne(this.h)}, ${100*Ie(this.s)}%, ${100*Ie(this.l)}%${1===e?")":`, ${e})`}`}}));const Te=Math.PI/180,Oe=180/Math.PI,Re=4/29,Pe=6/29,Fe=3*Pe*Pe;function _e(e){if(e instanceof He)return new He(e.l,e.a,e.b,e.opacity);if(e instanceof Be)return We(e);e instanceof qe||(e=ve(e));var t,r,n=$e(e.r),i=$e(e.g),o=$e(e.b),a=Ve((.2225045*n+.7168786*i+.0606169*o)/1);return n===i&&i===o?t=r=a:(t=Ve((.4360747*n+.3850649*i+.1430804*o)/.96422),r=Ve((.0139322*n+.0971045*i+.7141733*o)/.82521)),new He(116*a-16,500*(t-a),200*(a-r),e.opacity)}function He(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function Ve(e){return e>.008856451679035631?Math.pow(e,1/3):e/Fe+Re}function je(e){return e>Pe?e*e*e:Fe*(e-Re)}function ze(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function $e(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Be(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}function We(e){if(isNaN(e.h))return new He(e.l,0,0,e.opacity);var t=e.h*Te;return new He(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Z(He,(function(e,t,r,n){return 1===arguments.length?_e(e):new He(e,t,r,null==n?1:n)}),ee(te,{brighter(e){return new He(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new He(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 qe(ze(3.1338561*(t=.96422*je(t))-1.6168667*(e=1*je(e))-.4906146*(r=.82521*je(r))),ze(-.9787684*t+1.9161415*e+.033454*r),ze(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}})),Z(Be,(function(e,t,r,n){return 1===arguments.length?function(e){if(e instanceof Be)return new Be(e.h,e.c,e.l,e.opacity);if(e instanceof He||(e=_e(e)),0===e.a&&0===e.b)return new Be(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Oe;return new Be(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new Be(e,t,r,null==n?1:n)}),ee(te,{brighter(e){return new Be(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new Be(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return We(this).rgb()}}));var Ue=e=>()=>e;function Ke(e,t){var r=t-e;return r?function(e,t){return function(r){return e+r*t}}(e,r):Ue(isNaN(e)?t:e)}!function e(t){var r=function(e){return 1==(e=+e)?Ke: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):Ue(isNaN(t)?r:t)}}(t);function n(e,t){var n=r((e=xe(e)).r,(t=xe(t)).r),i=r(e.g,t.g),o=r(e.b,t.b),a=Ke(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return n.gamma=e,n}(1);var Ge="center",Ye="bottom";[{key:"NoDataExist",alignment:Ge,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:Ge,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:Ge,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:Ge},{key:"DataRangeIncludingZero",alignment:Ye},{key:"LimitedData",alignment:Ye},{key:"NegativeOrZeroValues",alignment:Ye}].reduce((function(e,t){return e[t.key]=t,e}),{});var Xe,Je=["__proto__","constructor"];function Qe(e,t,r){if(void 0!==e&&void 0!==t){var n=t.split("."),i=n[n.length-1];if(!Je.some((function(e){return n.includes(e)}))){for(var o=e,a=0;a<n.length-1;++a){var s=n[a];void 0===o[s]&&(o[s]=Number.isNaN(+n[a+1])?{}:[]),o=o[s]}void 0!==r?o[i]=r:delete o[i]}}}function Ze(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 et(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=rt)):void 0===t&&(t=tt);for(var r,n,i,o,a,s=new ot(e),l=[s];r=l.pop();)if((i=t(r.data))&&(a=(i=Array.from(i)).length))for(r.children=i,o=a-1;o>=0;--o)l.push(n=i[o]=new ot(i[o])),n.parent=r,n.depth=r.depth+1;return s.eachBefore(it)}function tt(e){return e.children}function rt(e){return Array.isArray(e)?e[1]:null}function nt(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function it(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function ot(e){this.data=e,this.depth=this.height=0,this.parent=null}ot.prototype=et.prototype={constructor:ot,count:function(){return this.eachAfter(Ze)},each:function(e,t){let r=-1;for(const n of this)e.call(t,n,++r,this);return this},eachAfter:function(e,t){for(var r,n,i,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),r=o.children)for(n=0,i=r.length;n<i;++n)a.push(r[n]);for(;o=s.pop();)e.call(t,o,++l,this);return this},eachBefore:function(e,t){for(var r,n,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),r=i.children)for(n=r.length-1;n>=0;--n)o.push(r[n]);return this},find:function(e,t){let r=-1;for(const n of this)if(e.call(t,n,++r,this))return n},sum:function(e){return this.eachAfter((function(t){for(var r=+e(t.data)||0,n=t.children,i=n&&n.length;--i>=0;)r+=n[i].value;t.value=r}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,r=function(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),i=null;for(e=r.pop(),t=n.pop();e===t;)i=e,e=r.pop(),t=n.pop();return i}(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var i=n.length;e!==r;)n.splice(i,0,e),e=e.parent;return n},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(r){r!==e&&t.push({source:r.parent,target:r})})),t},copy:function(){return et(this).eachBefore(nt)},[Symbol.iterator]:function*(){var e,t,r,n,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(r=0,n=t.length;r<n;++r)o.push(t[r])}while(o.length)}},Xe=function(e){
|
|
7
|
+
import{useRect as e,useOptions as t,useConstraints as r,usePromise as n,useApp as i,useAppLayout as o,useDeviceType as a,useTheme as s,useTranslator as l,useMemo as u,onTakeSnapshot as c,useImperativeHandle as p,useElement as d,useStaleLayout as m,useState as f,useEffect as h}from"@nebula.js/stardust";import g from"jquery";import y from"picasso.js";import b from"picasso-plugin-q";import v from"picasso-plugin-hammer";import x from"hammerjs";import q from"extend";var D={"Visualization.Histogram.MeasureAxisLabel":{id:"Visualization.Histogram.MeasureAxisLabel",locale:{"en-US":"Frequency","zh-TW":"頻率","zh-CN":"频率","tr-TR":"Sıklık","sv-SE":"Frekvens","it-IT":"Frequenza","es-ES":"Frecuencia","de-DE":"Häufigkeit","pl-PL":"Częstotliwość","nl-NL":"Frequentie","ko-KR":"빈도","pt-BR":"Frequência","fr-FR":"Fréquence","ja-JP":"レコード数","ru-RU":"Частота"}},"waterfall.legend.positiveValue.label":{id:"waterfall.legend.positiveValue.label",locale:{"en-US":"Positive","zh-TW":"正值","zh-CN":"正","tr-TR":"Pozitif","sv-SE":"Positiv","it-IT":"Positivi","es-ES":"Positivo","de-DE":"Positiv","pl-PL":"Dodatnie","nl-NL":"Positief","ko-KR":"양수","pt-BR":"Positivo","fr-FR":"Positive","ja-JP":"正","ru-RU":"Положительное"}},"waterfall.legend.negativeValue.label":{id:"waterfall.legend.negativeValue.label",locale:{"en-US":"Negative","zh-TW":"負值","zh-CN":"负","tr-TR":"Negatif","sv-SE":"Negativ","it-IT":"Negativi","es-ES":"Negativo","de-DE":"Negativ","pl-PL":"Ujemne","nl-NL":"Negatief","ko-KR":"음수","pt-BR":"Negativo","fr-FR":"Négative","ja-JP":"負","ru-RU":"Отрицательное"}},"waterfall.legend.subtotal.label":{id:"waterfall.legend.subtotal.label",locale:{"en-US":"Subtotal","zh-TW":"小計","zh-CN":"小计","tr-TR":"Ara Toplam","sv-SE":"Deltotal","it-IT":"Subtotale","es-ES":"Subtotal","de-DE":"Teilsumme","pl-PL":"Suma częściowa","nl-NL":"Subtotaal","ko-KR":"소계","pt-BR":"Subtotal","fr-FR":"Sous-total","ja-JP":"小計","ru-RU":"Подытог"}},Object_Disclaimer_LimitedData:{id:"Object.Disclaimer.LimitedData",locale:{"en-US":"Currently showing a limited data set.","zh-TW":"目前顯示的是有限的資料集。","zh-CN":"当前正显示有限的数据集。","tr-TR":"Şu anda sınırlı bir veri kümesi gösteriliyor.","sv-SE":"Just nu visas en begränsad uppsättning data.","it-IT":"Attualmente viene visualizzata una serie di dati limitata.","es-ES":"Mostrando actualmente un conjunto limitado de datos.","de-DE":"Zurzeit wird nur ein beschränkter Datensatz angezeigt.","pl-PL":"Aktualnie przedstawiany jest ograniczony zestaw danych.","nl-NL":"Momenteel wordt een beperkte gegevensverzameling getoond.","ko-KR":"현재 제한된 데이터 집합을 표시하고 있습니다.","pt-BR":"Mostrando um conjunto de dados limitado.","fr-FR":"Affichage d'un ensemble de données limité pour l'instant.","ja-JP":"現在、限定的なデータ セットを表示しています。","ru-RU":"В настоящее время отображается ограниченный набор данных."}},Object_Disclaimer_OnlyNanData:{id:"Object.Disclaimer.OnlyNanData",locale:{"en-US":"The chart is not displayed because it contains only undefined values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含未定義的值。","zh-CN":"未显示图表,因为它仅包含未定义的值。","tr-TR":"Yalnızca tanımsız değerleri içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller odefinierade värden.","it-IT":"Il grafico non è visualizzato poiché contiene solo valori non definiti.","es-ES":"El gráfico no se muestra porque solo contiene valores indefinidos.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur nicht definierte Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości niezdefiniowane.","nl-NL":"De grafiek wordt niet weergegeven omdat deze alleen ongedefinieerde waarden bevat.","ko-KR":"정의되지 않은 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores não definidos.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs non définies.","ja-JP":"未定義の値しか含まれていないため、チャートは表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только неопределенные значения."}},Object_Disclaimer_OnlyNegativeOrZeroValues:{id:"Object.Disclaimer.OnlyNegativeOrZeroValues",locale:{"en-US":"The chart is not displayed because it contains only negative or zero values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含負值或零值。","zh-CN":"未显示图表,因为它仅包含负值或零值。","tr-TR":"Yalnızca negatif veya sıfır değerlerini içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller negativa eller nollvärden","it-IT":"Il grafico non viene visualizzato poiché contiene solo valori negativi o uguali a zero.","es-ES":"El gráfico no se muestra porque sólo contiene valores negativos o valores cero.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur negative oder 0-Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości ujemne lub zerowe.","nl-NL":"De grafiek wordt niet weergegeven omdat het alleen negatieve waarden of nulwaarden bevat.","ko-KR":"음수 또는 zero 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores negativos ou zero.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs négatives ou égales à zéro.","ja-JP":"チャートは負の値またはゼロ値しか含まれていないため、表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только отрицательные или нулевые значения."}},Object_Disclaimer_RequireNumericDimension:{id:"Object.Disclaimer.RequireNumericDimension",locale:{"en-US":"This visualization requires a numeric diemnsion."}},"properties.boxplot.calculationMode.tukey.elements.boxEnd":{id:"properties.boxplot.calculationMode.tukey.elements.boxEnd",locale:{"en-US":"Third quartile","zh-TW":"第三四分位數","zh-CN":"第 3 个四分位","tr-TR":"Üçüncü çeyrek","sv-SE":"Tredje kvartilen","it-IT":"Terzo quartile","es-ES":"Tercer cuartil","de-DE":"Drittes Quartil","pl-PL":"Trzeci kwartyl","nl-NL":"Derde kwartiel","ko-KR":"3번째 사분위수","pt-BR":"Terceiro quartil","fr-FR":"Troisième quartile","ja-JP":"第 3 四分位数","ru-RU":"Третий квартиль"}},"properties.boxplot.calculationMode.tukey.elements.boxMiddle":{id:"properties.boxplot.calculationMode.tukey.elements.boxMiddle",locale:{"en-US":"Median","zh-TW":"中位數","zh-CN":"中间值","tr-TR":"Medyan","sv-SE":"Median","it-IT":"Mediana","es-ES":"Mediana","de-DE":"Drittes Quartil","pl-PL":"Mediana","nl-NL":"Mediaan","ko-KR":"중앙값","pt-BR":"Mediano","fr-FR":"Médiane","ja-JP":"中央値","ru-RU":"Медианное"}},"properties.boxplot.calculationMode.tukey.elements.boxStart":{id:"properties.boxplot.calculationMode.tukey.elements.boxStart",locale:{"en-US":"First quartile","zh-TW":"第一四分位數","zh-CN":"第 1 个四分位","tr-TR":"İlk çeyrek","sv-SE":"Första kvartilen","it-IT":"Primo quartile","es-ES":"Primer cuartil","de-DE":"Erstes Quartil","pl-PL":"Pierwszy kwartyl","nl-NL":"Eerste kwartiel","ko-KR":"1번째 사분위수","pt-BR":"Primeiro quartil","fr-FR":"Premier quartile","ja-JP":"第 1 四分位数","ru-RU":"Первый квартиль"}},"properties.boxplot.calculationMode.tukey.elements.firstWhisker":{id:"properties.boxplot.calculationMode.tukey.elements.firstWhisker",locale:{"en-US":"Box start - {0} IQR","zh-TW":"方塊開始 - {0} IQR","zh-CN":"框开始 - {0} IQR","tr-TR":"Kutu başlangıcı - {0} IQR","sv-SE":"Rutans start - {0} IQR","it-IT":"Inizio scatola - {0} IQR","es-ES":"Inicio de caja - {0} IQR","de-DE":"Box-Beginn - {0} IQR","pl-PL":"Początek wykresu pudełkowego - {0} IQR","nl-NL":"Begin box - {0} IQR","ko-KR":"상자 시작 - {0} IQR","pt-BR":"Início da caixa - {0} IQR","fr-FR":"Début de la boîte - {0} IQR","ja-JP":"ボックス開始 - {0} IQR","ru-RU":"Начало поля - {0} IQR"}},"properties.boxplot.calculationMode.tukey.elements.lastWhisker":{id:"properties.boxplot.calculationMode.tukey.elements.lastWhisker",locale:{"en-US":"Box end + {0} IQR","zh-TW":"方塊結束 + {0} IQR","zh-CN":"框结束 + {0} IQR","tr-TR":"Kutu bitişi + {0} IQR","sv-SE":"Rutans slut + {0} IQR","it-IT":"Fine scatola + {0} IQR","es-ES":"Fin de caja + {0} IQR","de-DE":"Box-Ende + {0} IQR","pl-PL":"Koniec wykresu pudełkowego - {0} IQR","nl-NL":"Einde box + {0} IQR","ko-KR":"상자 끝 + {0} IQR","pt-BR":"Fim da caixa + {0} IQR","fr-FR":"Fin de la boîte + {0} IQR","ja-JP":"ボックス終了 + {0} IQR","ru-RU":"Конец поля + {0} IQR"}},"properties.boxplot.calculationMode.stdDev.elements.boxEnd":{id:"properties.boxplot.calculationMode.stdDev.elements.boxEnd",locale:{"en-US":"Box middle + 1 standard deviation","zh-TW":"方塊中間 + 1 個標準差","zh-CN":"框中部 + 1 个标准偏差","tr-TR":"Kutu ortası + 1 standart sapma","sv-SE":"Rutans mitt + 1 standardavvikelse","it-IT":"Centro scatola + 1 deviazione standard","es-ES":"Mitad de la caja + 1 desviación estándar","de-DE":"Box-Mitte +1 Standardabweichung","pl-PL":"Środek wykresu pudełkowego + 1 odch. stand","nl-NL":"Midden box + 1 standaardafwijking","ko-KR":"상자 중간 + 1개 표준 편차","pt-BR":"Meio da caixa + 1 desvio padrão","fr-FR":"Milieu de la boîte + 1 écart type","ja-JP":"ボックス中間 + 1 標準偏差","ru-RU":"Середина поля + 1 стандартное отклонение"}},"properties.boxplot.calculationMode.stdDev.elements.boxMiddle":{id:"properties.boxplot.calculationMode.stdDev.elements.boxMiddle",locale:{"en-US":"Average","zh-TW":"平均值","zh-CN":"平均值","tr-TR":"Ortalama","sv-SE":"Medel","it-IT":"Media","es-ES":"Media","de-DE":"Durchschnitt","pl-PL":"Średnia","nl-NL":"Gemiddelde","ko-KR":"평균","pt-BR":"Média","fr-FR":"Moyenne","ja-JP":"平均値","ru-RU":"Среднее"}},"properties.boxplot.calculationMode.stdDev.elements.boxStart":{id:"properties.boxplot.calculationMode.stdDev.elements.boxStart",locale:{"en-US":"Box middle - 1 standard deviation","zh-TW":"方塊中間 - 1 個標準差","zh-CN":"框中部 - 1 个标准偏差","tr-TR":"Kutu ortası - 1 standart sapma","sv-SE":"Rutans mitt - 1 standardavvikelse","it-IT":"Centro scatola - 1 deviazione standard","es-ES":"Mitad de la caja - {1} desviación estándar","de-DE":"Box-Mitte -1 Standardabweichung","pl-PL":"Środek wykresu pudełkowego - 1 odch. stand","nl-NL":"Midden box - 1 standaardafwijking","ko-KR":"상자 중간 - 1개 표준 편차","pt-BR":"Середина поля - 1 стандартное отклонение","fr-FR":"Milieu de la boîte - 1 écart type","ja-JP":"ボックス中間 - 1 標準偏差","ru-RU":"Первый квартиль"}},"properties.boxplot.calculationMode.stdDev.elements.firstWhisker":{id:"properties.boxplot.calculationMode.stdDev.elements.firstWhisker",locale:{"en-US":"Box middle - {0} standard deviations","zh-TW":"方塊中間 - {0} 個標準差","zh-CN":"框中部 - {0} 个标准偏差","tr-TR":"Kutu ortası - {0} standart sapma","sv-SE":"Rutans mitt - {0} standardavvikelser","it-IT":"Centro scatola - {0} deviazioni standard","es-ES":"Mitad de la caja - {0} desviaciones estándar","de-DE":"Box-Mitte -{0} Standardabweichung","pl-PL":"Środek wykresu pudełkowego - {0} odch. stand","nl-NL":"Midden box - {0} standaardafwijkingen","ko-KR":"상자 중간 - {0}개 표준 편차","pt-BR":"Meio da caixa - {0} desvios padrão","fr-FR":"Milieu de la boîte - {0} écarts types","ja-JP":"ボックス中間 - {0} 標準偏差","ru-RU":"Середина поля - {0} стандартное(ых) отклонение(й)"}},"properties.boxplot.calculationMode.stdDev.elements.lastWhisker":{id:"properties.boxplot.calculationMode.stdDev.elements.lastWhisker",locale:{"en-US":"Box middle + {0} standard deviations","zh-TW":"方塊中間 + {0} 個標準差","zh-CN":"框中部 + {0} 个标准偏差","tr-TR":"Kutu ortası + {0} standart sapma","sv-SE":"Rutans mitt + {0} standardavvikelser","it-IT":"Centro scatola + {0} deviazioni standard","es-ES":"Mitad de la caja + {0} desviaciones estándar","de-DE":"Box-Mitte +{0} Standardabweichung","pl-PL":"Środek wykresu pudełkowego + {0} odch. stand","nl-NL":"Midden box + {0} standaardafwijkingen","ko-KR":"상자 중간 + {0}개 표준 편차","pt-BR":"Meio da caixa + {0} desvios padrão","fr-FR":"Milieu de la boîte + {0} écarts types","ja-JP":"ボックス中間 + {0} 標準偏差","ru-RU":"Середина поля + {0} стандартное(ых) отклонение(й)"}},"properties.boxplot.calculationMode.fractiles.elements.boxEnd":{id:"properties.boxplot.calculationMode.fractiles.elements.boxEnd",locale:{"en-US":"Third quartile","zh-TW":"第三四分位數","zh-CN":"第 3 个四分位","tr-TR":"Üçüncü çeyrek","sv-SE":"Tredje kvartilen","it-IT":"Terzo quartile<","es-ES":"Tercer cuartil","de-DE":"Drittes Quartil","pl-PL":"Trzeci kwartyl","nl-NL":"Derde kwartiel","ko-KR":"3번째 사분위수","pt-BR":"Terceiro quartil","fr-FR":"Troisième quartile","ja-JP":"第 3 四分位数","ru-RU":"Третий квартиль"}},"properties.boxplot.calculationMode.fractiles.elements.boxMiddle":{id:"properties.boxplot.calculationMode.fractiles.elements.boxMiddle",locale:{"en-US":"Median","zh-TW":"中位數","zh-CN":"中间值","tr-TR":"Medyan","sv-SE":"Median","it-IT":"Mediana","es-ES":"Mediana","de-DE":"Median","pl-PL":"Mediana","nl-NL":"Mediaan","ko-KR":"중앙값","pt-BR":"Mediano","fr-FR":"Médiane","ja-JP":"中央値","ru-RU":"Медианное"}},"properties.boxplot.calculationMode.fractiles.elements.boxStart":{id:"properties.boxplot.calculationMode.fractiles.elements.boxStart",locale:{"en-US":"First quartile","zh-TW":"第一四分位數","zh-CN":"第 1 个四分位","tr-TR":"İlk çeyrek","sv-SE":"Första kvartilen","it-IT":"Primo quartile","es-ES":"Primer cuartil","de-DE":"Erstes Quartil","pl-PL":"Pierwszy kwartyl","nl-NL":"Eerste kwartiel","ko-KR":"1번째 사분위수","pt-BR":"Primeiro quartil","fr-FR":"Premier quartile","ja-JP":"第 1 四分位数","ru-RU":"Первый квартиль"}},"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.fifth":{id:"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.fifth",locale:{"en-US":"5th percentile","zh-TW":"第 5 個百分位數","zh-CN":"第 5 个百分位","tr-TR":"5. yüzdebirlik","sv-SE":"5:e percentilen","it-IT":"5° percentile","es-ES":"5º percentil","de-DE":"5. Perzentil","pl-PL":"5. percentyl","nl-NL":"5e percentiel","ko-KR":"5번째 백분위수","pt-BR":"5º percentil","fr-FR":"5e centile","ja-JP":"5 番目のパーセンタイル","ru-RU":"5-й процентиль"}},"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.first":{id:"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.first",locale:{"en-US":"1st percentile","zh-TW":"第 1 個百分位數","zh-CN":"第 1 个百分位","tr-TR":"1. yüzdebirlik","sv-SE":"1:e percentilen","it-IT":"1° percentile","es-ES":"1er percentil","de-DE":"1. Perzentil","pl-PL":"1. percentyl","nl-NL":"1e percentiel","ko-KR":"1번째 백분위수","pt-BR":"1º percentil","fr-FR":"1er centile","ja-JP":"1 番目のパーセンタイル","ru-RU":"1-й процентиль"}},"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.min":{id:"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.min",locale:{"en-US":"Minimum","zh-TW":"最小","zh-CN":"最小值","tr-TR":"En az","sv-SE":"Min","it-IT":"Minimo","es-ES":"Mínimo","de-DE":"Minimum","pl-PL":"Minimum","nl-NL":"Minimum","ko-KR":"최소","pt-BR":"Mínimo","fr-FR":"Minimale","ja-JP":"最小値","ru-RU":"Минимум"}},"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.tenth":{id:"properties.boxplot.calculationMode.fractiles.elements.firstWhisker.tenth",locale:{"en-US":"10th percentile","zh-TW":"第 10 個百分位數","zh-CN":"第 10 个百分位","tr-TR":"10. yüzdebirlik","sv-SE":"10:e percentilen","it-IT":"10° percentile","es-ES":"10º percentil","de-DE":"10. Perzentil","pl-PL":"10. percentyl","nl-NL":"10e percentiel","ko-KR":"10번째 백분위수","pt-BR":"10º percentil","fr-FR":"10e centile","ja-JP":"10 番目のパーセンタイル","ru-RU":"10-й процентиль"}},"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.max":{id:"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.max",locale:{"en-US":"Maximum","zh-TW":"最大","zh-CN":"最大值","tr-TR":"En fazla","sv-SE":"Max","it-IT":"Massimo","es-ES":"Máximo","de-DE":"Maximum","pl-PL":"Maksimum","nl-NL":"Maximum","ko-KR":"최대","pt-BR":"Máximo","fr-FR":"Maximale","ja-JP":"最大値","ru-RU":"Максимум"}},"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.ninetieth":{id:"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.ninetieth",locale:{"en-US":"90th percentile","zh-TW":"第 90 個百分位數","zh-CN":"第 90 个百分位","tr-TR":"90. yüzdebirlik","sv-SE":"90:e percentilen","it-IT":"90° percentile","es-ES":"90º percentil","de-DE":"90. Perzentil","pl-PL":"90. percentyl","nl-NL":"90e percentiel","ko-KR":"90번째 백분위수","pt-BR":"90º percentil","fr-FR":"90e centile","ja-JP":"90 番目の百分位数","ru-RU":"90-й процентиль"}},"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.ninetyfifth":{id:"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.ninetyfifth",locale:{"en-US":"95th percentile","zh-TW":"第 95 個百分位數","zh-CN":"第 95 个百分位","tr-TR":"95. yüzdebirlik","sv-SE":"95:e percentilen","it-IT":"95° percentile","es-ES":"95º percentil","de-DE":"95. Perzentil","pl-PL":"95. percentyl","nl-NL":"95e percentiel","ko-KR":"95번째 백분위수","pt-BR":"95º percentil","fr-FR":"95e centile","ja-JP":"95 番目の百分位数","ru-RU":"95-й процентиль"}},"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.ninetynineth":{id:"properties.boxplot.calculationMode.fractiles.elements.lastWhisker.ninetynineth",locale:{"en-US":"99th percentile","zh-TW":"第 99 個百分位數","zh-CN":"第 99 个百分位","tr-TR":"99. yüzdebirlik","sv-SE":"99:e percentilen","it-IT":"99° percentile","es-ES":"99º percentil","de-DE":"99. Perzentil","pl-PL":"99. percentyl","nl-NL":"99e percentiel","ko-KR":"99번째 백분위수","pt-BR":"99º percentil","fr-FR":"99e centile","ja-JP":"99 番目の百分位数","ru-RU":"99-й процентиль"}}};function S(e){e.component("event-area",{mounted(e){e.classList.add("event-area"),e.style.pointerEvents="auto",e.style.zIndex=1},render:()=>[]})}var M={renderer:"dom",disableTriggers:!0,preferredSize:function(){return 22},render(e){const{settings:{label:t,rtl:r},layout:{dock:n}}=this.settings,i="top"!==n&&"bottom"!==n||!r?"ltr":"rtl",o=function(e,t){const r={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#7b7a78",fontStyle:"italic",fontSize:"13px"};switch(e){case"left":r.width=`${t.height}px`,r.transform=`rotate(-90deg) translate(-${t.height}px, 0)`,r.transformOrigin="top left";break;case"right":r.width=`${t.height}px`,r.transform=`rotate(90deg) translate(0, -${t.width}px)`,r.transformOrigin="top left";break;case"center":r.width=`${t.width}px`,r.height=`${t.height}px`,r.color="#595959",r.fontStyle="normal",r.fontSize="1.2em",r.textAlign="center";break;default:r.justifyContent="flex-start",r.alignItems="flex-start"}return r}(n,this.rect),a="center"===n?t:`* ${t}`,s="center"!==n?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}:{};return e("div",{style:o,dir:i},e("span",{ref:this.alignToRef,style:s,title:a},a))}};const w={version:"1.0.1",qHyperCubeDef:{qDimensions:[],qMeasures:[],qMode:"S",qInitialDataFetch:[{qWidth:200,qHeight:10}],qSuppressMissing:!0},color:{auto:!0,positiveValue:{paletteColor:{index:6,color:null}},negativeValue:{paletteColor:{index:-1,color:"#cc6677"}},subtotal:{paletteColor:{index:-1,color:"#c3c3c3"}}},dataPoint:{showLabels:!0},dimensionAxis:{dock:"near",label:"auto",show:"labels"},gridlines:{auto:!0,spacing:2},legend:{dock:"auto",show:!0},measureAxis:{autoMinMax:!0,dock:"near",max:10,min:0,minMax:"min",show:"labels",spacing:1},qDef:{qNumFormat:{},numFormatFromTemplate:!0,isCustomFormatted:!1},refLine:{refLines:[]},showTitles:!0,subtitle:"",title:"",footnote:""};function A(e){const{translator:t}=e;return{path:"/qHyperCubeDef",dimensions:{min:0,max:0},measures:{min:1,max:50,description:()=>t.get("Visualizations.Descriptions.Bars")}}}function E(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var C,k={exports:{}};var N=(C||(C=1,self,k.exports=(()=>{var e={909:e=>{var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},a=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var n,i=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(n in e);return void 0===n||t.call(e,n)},s=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,r){if("__proto__"===r){if(!t.call(e,r))return;if(i)return i(e,r).value}return e[r]};e.exports=function e(){var t,r,n,i,u,c,p=arguments[0],d=1,m=arguments.length,f=!1;for("boolean"==typeof p&&(f=p,p=arguments[1]||{},d=2),(null==p||"object"!=typeof p&&"function"!=typeof p)&&(p={});d<m;++d)if(null!=(t=arguments[d]))for(r in t)n=l(p,r),p!==(i=l(t,r))&&(f&&i&&(a(i)||(u=o(i)))?(u?(u=!1,c=n&&o(n)?n:[]):c=n&&a(n)?n:{},s(p,{name:r,newValue:e(f,c,i)})):void 0!==i&&s(p,{name:r,newValue:i}));return p}},8:(e,t)=>{(()=>{var e={229:e=>{var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===r.call(e)},a=function(e){if(!e||"[object Object]"!==r.call(e))return!1;var n,i=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(n in e);return void 0===n||t.call(e,n)},s=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,r){if("__proto__"===r){if(!t.call(e,r))return;if(i)return i(e,r).value}return e[r]};e.exports=function e(){var t,r,n,i,u,c,p=arguments[0],d=1,m=arguments.length,f=!1;for("boolean"==typeof p&&(f=p,p=arguments[1]||{},d=2),(null==p||"object"!=typeof p&&"function"!=typeof p)&&(p={});d<m;++d)if(null!=(t=arguments[d]))for(r in t)n=l(p,r),p!==(i=l(t,r))&&(f&&i&&(a(i)||(u=o(i)))?(u?(u=!1,c=n&&o(n)?n:[]):c=n&&a(n)?n:{},s(p,{name:r,newValue:e(f,c,i)})):void 0!==i&&s(p,{name:r,newValue:i}));return p}}},r={};function n(t){var i=r[t];if(void 0!==i)return i.exports;var o=r[t]={exports:{}};return e[t](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};(()=>{n.r(i),n.d(i,{default:()=>Ie});var e=n(229),t=n.n(e);const r=function(e,t,r){if(!t)return!1;var n,i=t.split("."),o=i[i.length-1],a=e;for(n=0;n<i.length-1;++n)void 0===a[i[n]]&&(a[i[n]]=Number.isNaN(+i[n+1])?{}:[]),a=a[i[n]];if(void 0!==r){var s=a[o];return a[o]=r,{updated:r,previous:s}}return delete a[o],!1},o=function(e,t,r){var n,i=t.split("."),o=e;if(void 0===o)return r;for(n=0;n<i.length;++n){if(void 0===o[i[n]])return r;o=o[i[n]]}return o},a={EXPRESSIONS:{observed:"",trend:"STL_Trend",seasonal:"STL_Seasonal",residual:"STL_Residual"},OPTIONS:[{value:"observed",translation:"cao.trendDecomposition.parameters.decomposition.observed"},{value:"trend",translation:"cao.trendDecomposition.parameters.decomposition.trend"},{value:"seasonal",translation:"cao.trendDecomposition.parameters.decomposition.seasonal"},{value:"residual",translation:"cao.trendDecomposition.parameters.decomposition.residual"}]};var s="".concat(" ","(").concat(" "),l="".concat(" ",")").concat(" ");function u(e){return s+e+l}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var r=function(e,t){if(!t)return null;var r,n;for(r=0;r<t.length;r++)if((n=t[r]).qInfo.qId===e)return n;return null}(e.qLibraryId,t.dimensionList);return r&&r.qData.info[0].qTags.indexOf("$numeric")>-1}var n=function(e,t){if(!t)return null;var r,n,i=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var r=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(r)&&(t=(t=t.substring(1,r)).trim()),t}(e);for(r=0;r<t.length;r++){if((n=t[r]).qName===i)return n;if(n.qDerivedFieldData)for(var o=0;o<n.qDerivedFieldData.qDerivedFieldLists.length;++o)for(var a=n.qDerivedFieldData.qDerivedFieldLists[o],s=0;s<a.qFieldDefs.length;++s){var l=a.qFieldDefs[s];if(l.qName===i)return l}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return n&&n.qTags.indexOf("$numeric")>-1}function p(e){return!(!e.fullAccumulation&&!e.fullRange)}function d(e,t){var r=e.crossAllDimensions;return 2===t&&r?"RowNo(Total)":"RowNo()"}function m(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 f(){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 y(e){return"Replace(Replace(".concat(e,",'''',''''''),'$','$''&''')")}function b(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=").concat(y("MinString(".concat(t,")")),")' and Only({1}").concat(t,")<='$(=").concat(y("MaxString(".concat(t,")")),")'\"}")}function v(e){var t=e.modifier,r=void 0===t?{}:t,n=e.dimensions,i=e.dimensionAndFieldList,o=e.funcComp,a=void 0===o?"Sum":o,s=e.valueComp,l=void 0===s?"0":s;if(!r.showExcludedValues)return"";if(n&&1===n.length){var u=b(c(n[0],i),f(0));return"".concat(a,"({1<").concat(u,">}").concat(l,")")}if(n&&2===n.length){var p=c(n[0],i),d=c(n[1],i),m=f(0),h=f(1),g=b(p,m),y=b(d,h);return"".concat(a,"({1<").concat(g,",").concat(y,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function x(e){return"".concat(e,"(")}function q(e){var t=e.properties,r=e.layout;return o(t,"qHyperCubeDef.qDimensions",o(r,"qHyperCube.qDimensionInfo",[])).length}const D={isFullRange:p,getNumDimensions:q,getExpressionWithExcludedComp:function(e){var t=e.expression,r=e.modifier,n=e.dimensions,i=e.dimensionAndFieldList,o=e.treatMissingAsNull,a=u(m(t));if(!r.showExcludedValues)return a;var s=v({modifier:r,dimensions:n,dimensionAndFieldList:i}),l=o?"":", 0";if(n&&1===n.length){var c=f(0);return"If(Count(".concat(c,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(n&&2===n.length){var p=f(0),d=f(1);return"If(Count(".concat(p,") * Count(").concat(d,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:d,getNumStepComp:function(e,t){if(!p(e)){var r=e.steps;return"number"!=typeof r||Number.isNaN(r)?6:r}return d(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:v,needDimension:function(e){var t=e.modifier,r=e.properties,n=e.layout,i=function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t);return 0===i&&2===q({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=f(t);if(!r.qSortByExpression&&!r.qSortByNumeric&&!r.qSortByAscii)return n;var i=["Descending","Ascending"],o=r.qSortByNumeric?"(Numeric, ".concat(i[(r.qSortByNumeric+1)/2],")"):"",a=r.qSortByAscii?"(Text, ".concat(i[(r.qSortByAscii+1)/2],")"):"";return r.qSortByNumeric&&r.qSortByAscii?"(".concat(n,", ").concat(o,", ").concat(a,")"):r.qSortByNumeric?"(".concat(n,", ").concat(o,")"):r.qSortByAscii?"(".concat(n,", ").concat(a,")"):n},simplifyExpression:m,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var r=t.indexOf(s);if(-1!==r){var n=t.indexOf(l);if(-1!==n)return t.substring(r+s.length,n)}}},initModifier:function(e,t){Object.keys(t).forEach((function(r){void 0===e[r]&&(e[r]=t[r])}))},isNumeric:c,isApplicable:function(e){var t=e.properties,r=e.layout,n=e.minDimensions,i=void 0===n?1:n,o=e.maxDimensions,a=void 0===o?2:o;if(!t&&!r)return!0;var s=q({properties:t,layout:r});return s>=i&&s<=a},getExpressionWithMarkers:u,canExtract:function(e){var t=e.indexOf(s),r=e.indexOf(l);return t>-1&&r>-1&&t<r},getDimDefWithWrapper:f,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")},generateTSDExpression:function(e,t,r){var n=t||e.outputExpression;if(e.base&&e.base.qDef&&(n=t!==e.base.qDef?t:e.base.qDef),"observed"!==e.decomposition){var i=r.qHyperCubeDef.qMeasures.find((function(t){return t.qDef.base&&t.qDef.base.qLibraryId&&e.base&&e.base.qLibraryId?t.qDef.base.qLibraryId===e.base.qLibraryId:null}));i&&t!==i.qDef.qLabel&&(n=i.qLibraryId||i.qDef.base.qLibraryId?"[".concat(i.qDef.qLabel,"]"):i.qDef.base.qDef);var o=function(e){var t=a.OPTIONS.find((function(t){return t.value===e.decomposition}));return t?a.EXPRESSIONS[t.value]:""}(e);n=n.startsWith("=")?n.substr(1):n,n="".concat(o,"(").concat(n,", ").concat(e.steps,")")}return n},getDecomposition:function(e){var t="observed";return Object.values(a.EXPRESSIONS).find((function(r){var n=e.qDef.base.qDef.toLowerCase()||e.qDef.qDef.toLowerCase();return a.EXPRESSIONS[r]&&n.includes(a.EXPRESSIONS[r].toLowerCase())&&(t=r),r})),t}};function 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 M(e){return M="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},M(e)}var w=t().bind(null,!0),A={},E=Array.isArray;function C(e){return null!=e&&!Array.isArray(e)&&"object"===M(e)}function k(e){return void 0===e}function N(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function I(e,t){var r,n=t.substring(1).split("/").slice(0,-1);return n.forEach((function(t,i){if(i!==n.length){r=+t;var o=Number.isNaN(r)?{}:[];e[r||t]=k(e[r||t])?o:e[t],e=e[r||t]}})),e}function L(e,t){var r=!0;if(C(e)&&C(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((function(n){L(e[n],t[n])||(r=!1)})),r);if(E(e)&&E(t)){if(e.length!==t.length)return!1;for(var n=0,i=e.length;n<i;n+=1)if(!L(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(i){var o=function(e){return e?w({},{val:e}).val:e}(t[i]),a=e[i],s="".concat(r,"/").concat(i);L(o,a)||N(t,i)||(k(a)?n.push({op:"add",path:s,value:o}):C(o)&&C(a)?n=n.concat(A.generate(a,o,s)):E(o)&&E(a)?n=n.concat(function(e,t,r){var n=[],i=e.slice(),o=-1;function a(e,t,r){if(e[r]&&k(e[r].qInfo))return null;if(e[r]&&e[r].qInfo.qId===t)return r;for(var n=0,i=e.length;n<i;n+=1)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(L(t,i))return n;if(!k(t[0])&&k(t[0].qInfo))return n.push({op:"replace",path:r,value:t}),n;for(var s=i.length-1;s>=0;s-=1)-1===(o=a(t,i[s].qInfo&&i[s].qInfo.qId,s))?(n.push({op:"remove",path:"".concat(r,"/").concat(s)}),i.splice(s,1)):n=n.concat(A.generate(i[s],t[o],"".concat(r,"/").concat(s)));for(var l=0,u=t.length;l<u;l+=1)-1===(o=a(i,t[l].qInfo&&t[l].qInfo.qId))?(n.push({op:"add",path:"".concat(r,"/").concat(l),value:t[l]}),i.splice(l,0,t[l])):o!==l&&(n.push({op:"move",path:"".concat(r,"/").concat(l),from:"".concat(r,"/").concat(o)}),i.splice(l,0,i.splice(o,1)[0]));return n}(a,o,s)):n.push({op:"replace",path:"".concat(r,"/").concat(i),value:o}))})),Object.keys(e).forEach((function(i){k(t[i])&&!N(e,i)&&n.push({op:"remove",path:"".concat(r,"/").concat(i)})})),n},A.apply=function(e,t){t.forEach((function(t){var r,n,i=I(e,t.path),o=t.path.split("/").splice(-1)[0],a=o&&Number.isNaN(+o)?i[o]:i[+o]||i,s=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(i=null,a=e),"add"===t.op||"replace"===t.op)if(E(i))"-"===o&&(o=i.length),i.splice(+o,"add"===t.op?0:1,t.value);else if(E(a)&&E(t.value)){var l,u=t.value.slice();a.length=0,(l=a).push.apply(l,function(e){if(Array.isArray(e))return S(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 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}}(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(C(a)&&C(t.value))r=a,Object.keys(r).forEach((function(e){Object.getOwnPropertyDescriptor(r,e).configurable&&!N(r,e)&&delete r[e]})),w(a,t.value);else{if(!i)throw new Error("Patchee is not an object we can patch");i[o]=t.value}else if("move"===t.op){var c=I(e,t.from);E(i)?i.splice(+o,0,c.splice(+s,1)[0]):(i[o]=c[s],delete c[s])}else"remove"===t.op&&(E(i)?i.splice(+o,1):delete i[o])}))},A.clone=function(e){return w({},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)):w(e,t)};const T=A,O=function(e,r,n){if(!e)return Promise.resolve();var i=T.generate(r,n);return t()(!0,r,n),i&&i.length?(i=i.map((function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}})),e.applyPatches(i,!0)):Promise.resolve()};var R="accumulation";function F(e,t){var r=o(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===R)return r[n]}function P(e,t){var r=function(e,t){var r=o(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===R)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var _={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""};const H={translationKey:"properties.modifier.accumulation",needDimension:D.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return D.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=a;void 0===l&&(l=D.getNumDimensions({properties:n,layout:i}));var u=o(n,"qHyperCubeDef.qDimensions",[]),c=D.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),p=D.getNumStepComp(r,l),d=D.getAboveComp(r,l,c,p),m=D.getRangeComp("RangeSum",d);if(D.needDimension({modifier:r,properties:n,layout:i})){var f=D.getDimComp(u,1),h=D.getDimComp(u,0),g=D.getAggrComp(m,f,h);m=r.showExcludedValues?D.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:s,valueComp:g}):g}return m},extractInputExpression:D.extractInputExpression,initModifier:function(e){D.initModifier(e,_)},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!D.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(P(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(P(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(P(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(P(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var r=F(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=F(t,e);return r&&!r.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(P(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return D.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(R))return!1;var o=F(t,e);return o&&!o.disabled}};return r}};var V="movingAverage";function z(e,t){var r=o(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===V)return r[n]}function j(e,t){var r=function(e,t){var r=o(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===V)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var $={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1};const B={translationKey:"properties.modifier.movingAverage",needDimension:D.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return D.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,r=e.expression,n=e.modifier,i=e.properties,a=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!n)return r;var u=s;void 0===u&&(u=D.getNumDimensions({properties:i,layout:a}));var c=o(i,"qHyperCubeDef.qDimensions",[]),p=n.showExcludedValues&&n.nullSuppression,d=D.getExpressionWithExcludedComp({expression:r,modifier:n,dimensions:c,dimensionAndFieldList:l,treatMissingAsNull:p}),m=D.getNumStepComp(n,u),f=D.getAboveComp(n,u,d,m);if(n.nullSuppression)t=D.getRangeComp("RangeAvg",f);else{var h=D.getRangeComp("RangeSum",f),g=function(e,t){var r=D.getRowNoComp(e,t);if(!D.isFullRange(e)){var n=e.steps,i="number"!=typeof n||Number.isNaN(n)?6:n;return"RangeMin(".concat(i,", ").concat(r,")")}return r}(n,u);t="".concat(h," / ").concat(g)}var y=t;if(D.needDimension({modifier:n,properties:i,layout:a})){var b=D.getDimComp(c,1),v=D.getDimComp(c,0),x=D.getAggrComp(y,b,v);y=n.showExcludedValues?D.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return y},extractInputExpression:D.extractInputExpression,initModifier:function(e){D.initModifier(e,$)},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!D.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(j(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(j(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(j(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(j(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var r=z(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=z(t,e);return r&&!r.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(j(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(j(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return D.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(V))return!1;var o=z(t,e);return o&&!o.disabled}};return r}};var W="timeSeriesDecomposition";function U(e,t){var r=o(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===W)return r[n]}function K(e,t){var r=function(e,t){var r=o(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===W)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var G={type:"timeSeriesDecomposition",disabled:!1,decomposition:"",steps:2,outputExpression:""};const Y={translationKey:"properties.modifier.timeSeriesDecomposition",needDimension:D.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return D.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties;return r?D.generateTSDExpression(r,t,n):t},extractInputExpression:D.extractInputExpression,initModifier:function(e,t){D.initModifier(e,G),""===e.decomposition&&t&&(e.decomposition=D.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!D.isApplicable({properties:t.properties})}},settings:{type:"items",items:{decomposition:{refFn:function(t){return"".concat(K(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(K(t,e),".steps")},type:"integer",translation:t.modifierTimeSeriesDecompositionPeriods||"properties.modifier.timeSeriesDecomposition.periods",schemaIgnore:!0,defaultValue:2,change:function(t,r){var n=U(t,e);if(n){var i=n.steps;n.steps="number"!=typeof i||Number.isNaN(i)?2:Math.abs(i),r.properties.qHyperCubeDef.qMeasures=r.properties.qHyperCubeDef.qMeasures.map((function(e){return e.qDef.modifiers.map((function(e){return"timeSeriesDecomposition"===e.type?e.steps=i:e.steps=e.steps,e})),e}))}},show:function(t){var r=U(t,e);return r&&!r.fullRange}}},show:function(e,t){return D.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(W))return!1;var o=U(t,e);return o&&!o.disabled}};return r}};var X="difference";function J(e,t){var r=o(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===X)return r[n]}function Q(e,t){var r=function(e,t){var r=o(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===X)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var Z={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""};const ee={translationKey:"properties.modifier.difference",needDimension:D.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return D.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:D.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=a;void 0===l&&(l=D.getNumDimensions({properties:n,layout:i}));var u=o(n,"qHyperCubeDef.qDimensions",[]),c=D.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),p=D.getAboveComp(r,l,c),d="".concat(c," - ").concat(p);if(D.needDimension({modifier:r,properties:n,layout:i})){var m=D.getDimComp(u,1),f=D.getDimComp(u,0),h=D.getAggrComp(d,m,f);d=r.showExcludedValues?D.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:s,funcComp:"Only",valueComp:h}):h}return d},initModifier:function(e){Object.keys(Z).forEach((function(t){void 0===e[t]&&(e[t]=Z[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!D.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(Q(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(Q(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(Q(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return D.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(X))return!1;var o=J(t,e);return o&&!o.disabled}};return r}};var te="normalization";function re(e,t){var r=o(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===te)return r[n]}function ne(e,t){var r=function(e,t){var r=o(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===te)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}function ie(e,t){for(var r=0;r<e.length;r++)if(e[r].value===t)return r;return-1}var oe={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:2,selectionScope:2};function ae(e){return 2===e?"{1}":""}function se(e,t,r){return 1===e?"{$<".concat(D.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(D.getDimDefWithWrapper(r),">"):""}const ce={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,r=e.layout;return D.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:D.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=a;void 0===l&&(l=D.getNumDimensions({properties:n,layout:i}));var u=o(n,"qHyperCubeDef.qDimensions",[]),c=D.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),p=r.selectionScope,d=r.dimensionalScope;return function(e,t,r,n,i,o,a){var s=ae(t),l=se(t,r,n),u=""===s&&""===l?"":s||l,c=le(i,o),p=ue(i,o,a),d=function(e){for(var t=[],r=0;r<e;r++)t[r]=D.getDimDefWithWrapper(r);return t.join(", ")}(o);return"".concat(e,"/ Sum(").concat(u," ").concat(c).concat(p," Aggr(").concat(u," ").concat(e,", ").concat(d,"))")}(c,p,r.field,r.value,d,l,r.primaryDimension)},initModifier:function(e){Object.keys(oe).forEach((function(t){void 0===e[t]&&(e[t]=oe[t])}))},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!D.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(ne(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,options:function(r){return function(e,t,r){var n=[{value:0,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:1,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:2,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return n=function(e,t){if(1===e){var r=ie(t,0);t.splice(r,1)}return t}(re(e,r).dimensionalScope,n),n}(r,t,e)}},field:{refFn:function(t){return"".concat(ne(t,e),".field")},type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:function(e,t,r){return r.app.getFieldList().then((function(e){return e.map((function(e){return{label:e.qName,value:e.qName}}))}))},show:function(t){return 1===re(t,e).selectionScope}},value:{refFn:function(t){return"".concat(ne(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return 1===re(t,e).selectionScope}},dimensionalScope:{refFn:function(t){return"".concat(ne(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,supportTooltip:!0,options:function(r,n){return function(e,t,r,n){var i=t.layout.qHyperCube.qDimensionInfo.length,o=[{value:0,translation:r.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:r.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:1,translation:r.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension"),tooltipTranslation:r.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension",".tooltip")},{value:2,translation:r.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:r.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension",".tooltip")}];return o=function(e,t){if(e<2){var r=ie(t,0);t.splice(r,1)}return t}(i,o),o=function(e,t){if(0===e){var r=ie(t,1);t.splice(r,1)}return t}(re(e,n).selectionScope,o),o}(r,n,t,e)}},primaryDimension:{refFn:function(t){return"".concat(ne(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.normalization.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(t,r){return 0===(re(t,e).dimensionalScope||0)&&r.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return D.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(te))return!1;var o=re(t,e);return o&&!o.disabled}};return r},getDisregardSelectionComp:ae,getFieldSelectionComp:se,getTotalComp:le,getSelectedDimComp:ue};var pe="qDef.base",de="qDef.qDef",me="qDef.base.qDef",fe="qLibraryId",he="qDef.base.qLibraryId";const ge={getExpression:function(e){var t=o(e,me);return void 0!==t?t:o(e,de)},getExpressionRef:function(e){return void 0!==o(e,me)?me:de},getLibraryIdRef:function(e){return o(e,he)?he:fe},getLibraryId:function(e){return o(e,he)||o(e,fe)},getLabelRef:function(e){return o(e,pe)?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return o(e,pe)?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}};var ye="qDef.qDef",be="qDef.base.qDef",ve="qLibraryId",xe="qDef.base.qLibraryId",qe="qDef.qLabel",De="qDef.qLabelExpression",Se="qDef.base.qLabel",Me="qDef.base.qLabelExpression",we="qDef.qAggrFunc",Ae="qDef.base.qAggrFunc",Ee={initBase:function(e,t){(t||Ee.isValid(e))&&(r(e,be,o(e,ye)),r(e,xe,o(e,ve)),r(e,Se,o(e,qe)),r(e,Me,o(e,De)))},restoreBase:function(e){Ee.isValid(e)&&(r(e,ye,o(e,be)),r(e,ve,o(e,xe)),r(e,qe,o(e,Se)),r(e,De,o(e,Me)),o(e,we)&&o(e,Ae)&&r(e,we,o(e,Ae)),delete e.qDef.base)},isValid:function(e){var t=o(e,be),r=o(e,xe);return void 0!==t||void 0!==r}};const Ce=Ee;function ke(e){return ke="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},ke(e)}var Ne={accumulation:H,movingAverage:B,difference:ee,normalization:ce,timeSeriesDecomposition:Y};const Ie={modifiers:Ne,apply:Te,applyModifiers:Oe,cleanUpMeasure:Re,destroy:function(e){e&&Le[e.id]&&Le[e.id].masterItemSubscriber&&(Le[e.id].masterItemSubscriber&&Le[e.id].masterItemSubscriber.unsubscribe(),delete Le[e.id])},hasActiveModifiers:Fe,getActiveModifier:Pe,initBase:Ce.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some((function(e){return Ne[e]}))},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some((function(e){return Ne[e]&&Ne[e].isApplicable({properties:r,layout:n})}))},measureBase:ge,limitedSorting:function(e){var t=e.measures,r=e.properties,n=e.layout,i=!1,o=!1;return t.forEach((function(e){var t=Ve(e);Ke({modifiers:t,properties:r,layout:n})&&(i=!0,o=o||Qe({modifiers:t,properties:r,layout:n}))})),i&&!o},ifEnableTotalsFunction:_e};var Le={};function Te(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.model,n=e.properties,i=e.isSnapshot,a=void 0!==i&&i,s=e.masterItem,l=!1;Le[r.id]=Le[r.id]||{isFirstTime:!0};var u=Le[r.id].isFirstTime;if(Le[r.id].isFirstTime=!1,n&&"object"===ke(n))return Oe({model:r,properties:n});var c=r?r.layout:void 0,p=o(c,"qSelectionInfo.qInSelections");if(a||p)return Promise.resolve(l);var d=o(c,"qHyperCube.qMeasureInfo"),m=Le[r.id].lastReloadTime;if(Le[r.id].lastReloadTime=o(r,"app.layout.qLastReloadTime"),Fe({measures:d,layout:c})){var f=function(e){var t=e.measures,r=e.layout,n=e.lastReloadTime;return o(e.model,"app.layout.qLastReloadTime")!==n&&function(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ue({measure:e,properties:r,layout:n})}))}({measures:t,layout:r})}({measures:d,layout:c,model:r,lastReloadTime:m});return f||function(e){var t=e.measures,r=e.layout,n=e.masterItem,i=e.isFirstTime;return!!Array.isArray(t)&&(i||n||t.some((function(e){return function(e){var t=e.measure,r=e.layout;return Ke({modifiers:Ve(t),layout:r})?!t.base:!!t.base}({measure:e,layout:r})})))}({measures:d,layout:c,masterItem:s,isFirstTime:u})?r.getEffectiveProperties().then((function(e){var n=t()(!0,{},e);je(n);var i=Ze(n);return Ge({model:r}).then((function(t){return Ye({libraryIds:i,model:r}).then((function(i){return f&&function(e){var t=e.properties;He(t).forEach((function(e){return function(e){var t=e.measure;if(Ue({measure:t,properties:e.properties})){var r=0,n=t.qDef.modifiers;Array.isArray(n)&&n.forEach((function(e){if("object"===ke(e)&&!e.disabled){if(r++,"object"!==ke(Ne[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=Ne[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==n&&Be(t)&&D.simplifyExpression(t.qDef.base.qDef)!==D.simplifyExpression(n)&&(t.qDef.base.qDef=n)}}))}}({measure:e,properties:t})}))}({properties:n}),Oe({model:r,oldProperties:e,properties:n,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:i,dimensionAndFieldList:t})}))}))})):Promise.resolve(l)}return function(e){return!!Array.isArray(e)&&e.some((function(e){return"object"===ke(e.base)}))}(d)?r.getEffectiveProperties().then((function(e){return function(e){var r=e.model,n=e.properties,i=Ze(n);return et({model:r,libraryIds:i}).then((function(){var e=t()(!0,{},n);return He(n).forEach((function(e){return Re(e)})),Je({oldProperties:e,newProperties:n,model:r})}))}({model:r,properties:e})})):Promise.resolve(l)}function Oe(e){var r=e.model,n=e.oldProperties,i=e.properties,a=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,u=e.masterItem,c=e.libraryItemsProps,p=e.dimensionAndFieldList;void 0===n&&(n=l?t()(!0,{},i):i),je(i);var d=Ze(i);return et({model:r,libraryIds:d,masterItem:u}).then((function(){return function(e){var r=e.measures,n=e.properties,i=e.model,a=e.libraryItemsProps,s=e.dimensionAndFieldList;if(r||(r=He(n)),!r.length)return Promise.resolve();if(!Fe({measures:r,properties:n}))return r.forEach((function(e){return Re(e)})),Promise.resolve();var l=a?void 0:Ze(n);return Ge({model:i,dimensionAndFieldList:s}).then((function(e){return Ye({libraryIds:l,model:i,libraryItemsProps:a}).then((function(i){r.forEach((function(r){Ke({modifiers:r.qDef.modifiers,properties:n})?(function(e){var r=e.measure,n=e.properties,i=e.libraryItemsProps,a=e.dimensionAndFieldList,s=0;Ce.isValid(r)||Ce.initBase(r,!0);var l=r.qDef,u=l.modifiers,c=l.base;Array.isArray(u)&&u.forEach((function(e){if("object"===ke(e)&&!e.disabled){if(s++,"object"!==ke(Ne[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)");Ne[e.type].initModifier(e,r);var l=r.qLibraryId||c&&c.qLibraryId;l?function(e){var r=e.measure,n=e.modifier,i=e.properties,o=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=""===s?s:Ne[n.type].generateExpression({expression:s,modifier:n,properties:i,dimensionAndFieldList:o});n.outputExpression=l,r.qDef.qDef=n.outputExpression,(r.qDef.qLabel||a.qMeasure.qLabel)&&(r.qDef.qLabel=a.qMeasure.qLabel),(r.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(r.qDef.qLabelExpression=a.qMeasure.qLabelExpression),r.qDef.quarantine&&r.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(r.qDef.qNumFormat=a.qMeasure.qNumFormat,r.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete r.qLibraryId,r.qDef.coloring=a.qMeasure.coloring,n.base=t()(!0,{},r.qDef.base)}({measure:r,modifier:e,libraryId:l,properties:n,libraryItemsProps:i,dimensionAndFieldList:a}):function(e){var r=e.measure,n=e.modifier,i=e.properties,o=e.dimensionAndFieldList;"function"==typeof Ne[n.type].updateModifier&&Ne[n.type].updateModifier(n,i.qHyperCubeDef);var a=ge.getExpression(r),s=""===a?a:Ne[n.type].generateExpression({expression:a,modifier:n,properties:i,dimensionAndFieldList:o});n.outputExpression=s,r.qDef.qDef=n.outputExpression,r.qDef.base.qLabelExpression?r.qDef.qLabelExpression=r.qDef.base.qLabelExpression:r.qDef.qLabel=r.qDef.base.qLabel||a,n.base=t()(!0,{},r.qDef.base)}({measure:r,modifier:e,properties:n,dimensionAndFieldList:a}),function(e){var t=o(e,"qDef.qAggrFunc");"Expr"!==t||_e(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&_e(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(r)}}))}({measure:r,properties:n,libraryItemsProps:i,dimensionAndFieldList:e}),$e(r)):Re(r)}))}))}))}({measures:a,properties:i,model:r,libraryItemsProps:c,dimensionAndFieldList:p}).then((function(){return l?Je({oldProperties:n,newProperties:i,model:r}):Promise.resolve(!1)}))}))}function Re(e){!function(e){var t=Ve(e);return Array.isArray(t)&&t.some((function(e){return"object"===ke(e)&&!e.disabled&&!Ne[e.type]}))}(e)?Ce.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,$e(e)}function Fe(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ke({modifiers:Ve(e),properties:r,layout:n})}))}function Pe(e){var t=Ve(e);if(Array.isArray(t))for(var r=0;r<t.length;r++){var n=t[r];if(Ne[n.type]&&!n.disabled)return n}}function _e(e){var t=Pe(e);return!t||Ne[t.type].enableTotalsFunction(e)}function He(e){return o(e,"qHyperCubeDef.qMeasures",[]).concat(o(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function Ve(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function ze(e){return o(e,"outputExpression.qValueExpression.qExpr")||o(e,"outputExpression")}function je(e){He(e).forEach((function(e){return function(e){var r=Pe(e);r&&(void 0!==r.outputExpression&&ze(r)!==e.qDef.qDef?delete e.qDef.base:!Ce.isValid(e)&&r.base&&(e.qDef.base=t()(!0,{},r.base)))}(e)}))}function $e(e){var t=Ve(e);Array.isArray(t)&&t.forEach((function(t){"object"===ke(t)&&(t.disabled||!Ne[t.type]&&ze(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)}))}function Be(e){return e.base||e.qDef&&e.qDef.base}function We(e){var t=Be(e);return e.qLibraryId||t&&t.qLibraryId}function Ue(e){var t=e.measure,r=e.properties,n=e.layout;return!We(t)&&Ke({modifiers:Ve(t),properties:r,layout:n})}function Ke(e){var t=e.modifiers,r=e.properties,n=e.layout,i={};return Array.isArray(t)&&t.some((function(e){return!("object"!==ke(e)||e.disabled||!Ne[e.type])&&(void 0===i[e.type]&&(i[e.type]=Ne[e.type].isApplicable({properties:r,layout:n})),i[e.type])}))}function Ge(e){var t=e.model,r=e.dimensionAndFieldList;if(r)return Promise.resolve(r);var n=[],i={},o=t.app.getDimensionList().then((function(e){i.dimensionList=e}));n.push(o);var a=t.app.getFieldList().then((function(e){i.fieldList=e}));return n.push(a),Promise.all(n).then((function(){return i}))}function Ye(e){var t=e.libraryIds,r=e.model,n=e.libraryItemsProps;if(n)return Promise.resolve(n);var i=t.measureLibraryIds,o=t.dimensionLibraryIds,a={},s=[];return i.forEach((function(e){var t=r.app.getMeasure(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),o.forEach((function(e){var t=r.app.getDimension(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),Promise.all(s).then((function(){return a}))}function Xe(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Je(e){var t=e.oldProperties,r=e.newProperties,n=e.model,i=JSON.stringify(o(t,"qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(o(r,"qHyperCubeDef.qMeasures"),Xe)||JSON.stringify(o(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(o(r,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe);return i?function(e){var t=e.model,r=e.oldProperties,n=e.newProperties,i=t.layout;return i&&!i.qHasSoftPatches&&!i.qExtendsId&&o(i,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(n):O(t,r,n)}({model:n,oldProperties:t,newProperties:r}).then((function(){return i})):Promise.resolve(i)}function Qe(e){var t=e.modifiers,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some((function(e){return"object"===ke(e)&&!e.disabled&&Ne[e.type]&&Ne[e.type].needDimension({modifier:e,properties:r,layout:n})}))}function Ze(e){var t=He(e),r=[],n=[],i=!1;return t.forEach((function(t){var n=Ve(t);if(Ke({modifiers:n,properties:e})){var o=We(t);o&&r.push(o),i=i||Qe({modifiers:n,properties:e})}})),o(e,"qHyperCubeDef.qDimensions",[]).forEach((function(e){var t=e.qLibraryId;t&&n.push(t)})),{measureLibraryIds:r,dimensionLibraryIds:n}}function et(e){var t=e.model,r=e.libraryIds;return!e.masterItem&&r&&(r.measureLibraryIds.length||r.dimensionLibraryIds.length)?(Le[t.id].masterItemSubscriber=Le[t.id].masterItemSubscriber||function(e){var t=e.model,r=e.callback,n={},i={},a={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},r=o(e,"qInfo.qType");return r&&s[r]&&s[r].forEach((function(r){t[r]=o(e,r)})),JSON.stringify(t)}function u(e){var t=e.qInfo.qId;if(n[t]){var i=l(e);n[t].properties!==i&&(n[t].properties=i,"function"==typeof r&&n[t].enabled&&r(e)),n[t].enabled=!0}}function c(e,r){return t.app[r](e).then((function(t){n[e]={listener:t.layoutSubscribe(u),enabled:!1,properties:l(t.layout)}}))}return{subscribe:function(e){var r=e.measureLibraryIds,o=e.dimensionLibraryIds,s=[];return function(e){var t=e.dimensionLibraryIds;i={},e.measureLibraryIds.forEach((function(e){i[e]=!0})),a={},t.forEach((function(e){a[e]=!0}))}({measureLibraryIds:r,dimensionLibraryIds:o}),Object.keys(n).forEach((function(e){i[e]||a[e]||(n[e].listener.dispose(),delete n[e])})),t.app&&(Object.keys(i).forEach((function(e){i[e]&&!n[e]&&s.push(c(e,"getMeasure"))})),Object.keys(a).forEach((function(e){a[e]&&!n[e]&&s.push(c(e,"getDimension"))}))),Promise.all(s)},unsubscribe:function(){Object.keys(n).forEach((function(e){n[e].listener.dispose()})),n={}}}}({model:t,callback:function(e){return Te({model:t,masterItem:e}).then((function(){return t.app.clearUndoBuffer()}))}}),Le[t.id].masterItemSubscriber.subscribe(r)):Promise.resolve()}})(),t.default=i.default,Object.defineProperty(t,"__esModule",{value:!0})})()}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var n={};return(()=>{function e(t){var r,n=t;return n>9?(r=65+n-10)>90&&(r+=6):n="".concat(n).charCodeAt(0),[48,111,79,105,73,108].indexOf(r)>-1?e(n+1):String.fromCharCode(r)}function t(r){var n=e(r%62),i=Math.floor(r/62);return i>0?t(i)+n:n}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}r.d(n,{default:()=>je});const o={getValue:function(e,t,r){if(null==e||null==t)return r;for(var n=t.split("."),i=e,o=0;o<n.length;++o){var a=n[o];if(""!==a){if(void 0===i[a]||null===i[a])return r;i=i[a]}}return i},setValue:function(e,t,r){if(null!=e&&null!=t){for(var n=t.split("."),i=n[n.length-1],o=e,a=0;a<n.length-1;++a){var s=n[a];void 0!==o[s]&&null!==o[s]||(o[s]=Number.isNaN(+n[a+1])?{}:[]),o=o[s]}void 0!==r?o[i]=r:delete o[i]}},isEmpty:function(e){return 0===Object.keys(e).length&&e.constructor===Object},isAtomicValue:function(e){return/boolean|number|string/.test(i(e))},generateId:function(){return t(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function a(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function l(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t,r){if(e){for(var n=0;n<e.length;n++)if(e[n][t]===r)return n;return-1}return-1}const p={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;var r=e.indexOf(t[0]);if(-1!==r){for(var n=0;n<t.length;n++){var i=e.indexOf(t[n]);if(r>i)return!1;r=i}return!0}return!1},indexAdded:function(e,t){var r;for(r=0;r<e.length;++r)e[r]>=0&&e[r]>=t&&++e[r];e.push(t)},indexRemoved:function(e,t){var r,n=0;for(r=0;r<e.length;++r)e[r]>t?--e[r]:e[r]===t&&(n=r);return e.splice(n,1),n},findItemByPropertyValue:function(e,t,r){if(e){for(var n=0;n<e.length;n++)if(e[n][t]===r)return e[n];return null}return null},findIndexByPropertyValue:c};var d=r(8),m=r.n(d);const f=function(e){var t,r=e.exportFormat,n=e.qHyperCubeDef,i=r.data[0];(t=i.dimensions).push.apply(t,a(n.qDimensions));var s,l=o.getValue(n,"qLayoutExclude.qHyperCubeDef.qDimensions");l&&(s=i.excludedDimensions).push.apply(s,a(l))},h=function(e){var t,r=e.exportFormat,n=e.qHyperCubeDef,i=r.data[0];(t=i.measures).push.apply(t,l(n.qMeasures));var a,s=o.getValue(n,"qLayoutExclude.qHyperCubeDef.qMeasures");s&&(a=i.excludedMeasures).push.apply(a,l(s))},g=function(e){var t=e.exportFormat,r=e.qHyperCubeDef,n=t.data[0];r.qInterColumnSortOrder||(r.qInterColumnSortOrder=[]),n.interColumnSortOrder=r.qInterColumnSortOrder.concat();var i=o.getValue(r,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");i&&p.isOrderedSubset(i,n.interColumnSortOrder)&&(n.interColumnSortOrder=i.concat())},y=function(e){var t=e.exportFormat,r=e.properties;Object.keys(r).forEach((function(e){t.properties[e]=r[e]}))},b=function(e){var t=e.exportFormat,r=e.properties;r.qLayoutExclude||(r.qLayoutExclude={}),r.qLayoutExclude.disabled&&(Object.keys(r.qLayoutExclude.disabled).forEach((function(e){t.properties.hasOwnProperty(e)||(t.properties[e]=r.qLayoutExclude.disabled[e])})),delete r.qLayoutExclude.disabled),r.qLayoutExclude.changed&&(function(e){Object.keys(e.qLayoutExclude.changed).forEach((function(t){e.qLayoutExclude.changed[t].to===o.getValue(e,t)&&o.setValue(e,t,e.qLayoutExclude.changed[t].from)}))}(r),delete r.qLayoutExclude.changed),r.qLayoutExclude.quarantine&&!o.isEmpty(r.qLayoutExclude.quarantine)||delete r.qLayoutExclude},v=function(e){e.forEach((function(e){m().cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)}))};function x(e,t,r){var n,i,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=o.getValue(e,t);if(!o.isAtomicValue(s))try{if((i=(i=(n=JSON.stringify(s)).match(/:\{/g))?i.length:0)>2&&!a)return;s=JSON.parse(n)}catch(e){return}o.getValue(e,"qLayoutExclude.quarantine")||o.setValue(e,"qLayoutExclude.quarantine",{});var l=o.getValue(e,"qLayoutExclude.quarantine");l[r]||(l[r]={}),l[r][t]=s}var q=r(909),D=r.n(q);function S(e,t){var r=D()(!0,{},t,e);return o.getValue(r,"qOtherTotalSpec.qOtherCounted")||o.setValue(r,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),o.getValue(r,"qOtherTotalSpec.qOtherLimit")||o.setValue(r,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),r.hasOwnProperty("othersLabel")||(r.othersLabel="Others"),r}function M(e,t){return D()(!0,{},t,e)}function w(e,t,r){return"function"==typeof e?e(t):Number.isNaN(+e)?r:e}var A=Math.pow(2,53)-1;function E(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){(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 k=function(e,t,r){var n="masterobject"===o.getValue(t,"properties.qInfo.qType")?"masterobject":o.getValue(r,"qInfo.qType");o.setValue(e,"qInfo.qType",n),e.visualization=r.visualization},N=function(e,t,r){t.hasOwnProperty(e)&&(r[e]=t[e])},I=function(e,t,r,n){t.hasOwnProperty(e)?r[e]=t[e]:r[e]=n},L=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:[]}},O=function(e){var t,r=e.exportFormat,n=e.maxDimensions,i=e.minDimensions,o=e.newHyperCubeDef,a=e.defaultDimension,s=r.data[0];for(t=0;t<s.dimensions.length;++t){var l=S(s.dimensions[t],a);o.qDimensions.length<n?o.qDimensions.push(l):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(l)}for(t=0;t<s.excludedDimensions.length;++t){var u=S(s.excludedDimensions[t],a);o.qDimensions.length<i?o.qDimensions.push(u):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(u)}},R=function(e){var t,r=e.exportFormat,n=e.maxMeasures,i=e.minMeasures,o=e.newHyperCubeDef,a=e.defaultMeasure,s=r.data[0];for(t=0;t<s.measures.length;++t){var l=M(s.measures[t],a);o.qMeasures.length<n?o.qMeasures.push(l):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(l)}for(t=0;t<s.excludedMeasures.length;++t){var u=M(s.excludedMeasures[t],a);o.qMeasures.length<i?o.qMeasures.push(u):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(u)}},F=function(e){var t=e.exportFormat,r=e.dataDefinition,n=void 0===r?{}:r,i=t.data[0],o=n.dimensions||{max:0},a=n.measures||{max:0},s=w(a.max,i.dimensions.length,A),l=w(a.min,i.dimensions.length,0);return{maxDimensions:w(o.max,s,A),minDimensions:w(o.min,l,0),maxMeasures:s,minMeasures:l}},P=function(e){var t=e.exportFormat,r=e.newHyperCubeDef,n=t.data[0],i=r.qDimensions.length+r.qMeasures.length;r.qInterColumnSortOrder=n.interColumnSortOrder.concat();var o=r.qInterColumnSortOrder.length;if(o!==i)for(r.qLayoutExclude&&(r.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=n.interColumnSortOrder.concat());o!==i;)o<i?(p.indexAdded(r.qInterColumnSortOrder,o),++o):(--o,p.indexRemoved(r.qInterColumnSortOrder,o))},_=function(e){var t=e.exportFormat,r=e.initialProperties,n=e.hypercubePath,i={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach((function(e){"qLayoutExclude"===e?t.properties[e].quarantine&&(i.qLayoutExclude.quarantine=D()(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&n?o.setValue(i,"".concat(n,".qHyperCubeDef"),t.properties.qHyperCubeDef):r.hasOwnProperty(e)||-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)||function(e,t){return"components"===t&&Array.isArray(e[t])&&e[t].some((function(e){return"general"===e.key}))}(t.properties,e)?i[e]=t.properties[e]:i.qLayoutExclude.disabled[e]=t.properties[e]})),null===(i=D()(!0,{},r,i)).components&&(i.components=[]),i},H=function(e){var t=e.exportFormat,r=e.maxDimensions,n=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=t.data[0];return a.dimensions.length>r&&r>0||a.measures.length>i&&i>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>n||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>o||!i&&a.measures.length>0||!r&&a.dimensions.length>0},V=function(e){var t=e.exportFormat,r=e.maxDimensions,n=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=e.newHyperCubeDef,s=t.data[0];a.qLayoutExclude||(a.qLayoutExclude={}),a.qLayoutExclude.qHyperCubeDef||(a.qLayoutExclude.qHyperCubeDef={}),(s.dimensions.length>r&&r>0||s.excludedDimensions&&s.excludedDimensions.length&&s.dimensions.length+s.excludedDimensions.length>n)&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(s.measures.length>i&&i>0||s.excludedMeasures&&s.excludedMeasures.length&&s.measures.length+s.excludedMeasures.length>o)&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!i&&s.measures.length&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!r&&s.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))},z=function(e){var t,r=e.newProperties,n=e.dataDefinition,i=e.hypercubePath;if(n.dimensions&&"function"==typeof n.dimensions.added){var a=o.getValue(r,i||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return E(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 E(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)?E(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)}))}},j=function(e){var t,r=e.newProperties,n=e.dataDefinition,i=e.hypercubePath;if(n.measures&&"function"==typeof n.measures.added){var a=o.getValue(r,i||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return C(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 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}}(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)}))}},$=function(e){var t=e.measures,r=e.modifierTypes;t&&r&&m().isSupportedModifiers(r)&&t.forEach((function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store}))};function B(e,t){var r=o.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!r&&(Object.keys(r).forEach((function(t){o.setValue(e,t,r[t])})),delete e.qLayoutExclude.quarantine[t],!0)}const W={exportProperties:function(e){var t=e.propertyTree,r=e.hypercubePath,n=e.viewDataMode,i=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t={data:[],properties:{}},r=0;r<e;++r)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}(),a=t.qProperty,s=o.getValue(a,r||""),l=s.qHyperCubeDef;return l.qInterColumnSortOrder||(l.qInterColumnSortOrder=[]),f({exportFormat:i,qHyperCubeDef:l}),h({exportFormat:i,qHyperCubeDef:l}),g({exportFormat:i,qHyperCubeDef:l}),delete l.qLayoutExclude,y({exportFormat:i,properties:a}),r&&(i.properties.qHyperCubeDef=l,delete s.qHyperCubeDef),b({exportFormat:i,properties:a}),n||v(i.properties.qHyperCubeDef.qMeasures),Array.isArray(i.properties.filters)&&(x(i.properties,"filters","storedFilters",!0),delete i.properties.filters),i.properties.qHyperCubeDef.qContextSetExpression&&(x(i.properties,"qHyperCubeDef.qContextSetExpression","storedFilters"),i.properties.qHyperCubeDef.qContextSetExpression=""),i.properties.qHyperCubeDef.qDynamicScript&&i.properties.qHyperCubeDef.qDynamicScript.length&&(x(i.properties,"qHyperCubeDef.qDynamicScript","dynamicScript"),i.properties.qHyperCubeDef.qDynamicScript=[]),i},importProperties:function(e){var t=e.exportFormat,r=e.initialProperties,n=void 0===r?{}:r,i=e.dataDefinition,a=void 0===i?{}:i,s=e.defaultPropertyValues,l=void 0===s?{}:s,u=e.hypercubePath,c=e.extension,p=e.supportedFilters,d=void 0===p||p,m=e.isHCModifierSupported,f=void 0===m||m,h={qChildren:[]},g=_({exportFormat:t,initialProperties:n,hypercubePath:u}),y=o.getValue(n,u||"").qHyperCubeDef,b=o.getValue(g,u||"").qHyperCubeDef,v=F({exportFormat:t,dataDefinition:a}),x=v.maxDimensions,q=v.minDimensions,D=v.maxMeasures,S=v.minMeasures,M=l.defaultDimension,w=void 0===M?L():M,A=l.defaultMeasure,E=void 0===A?T():A;b.qDimensions.length=0,b.qMeasures.length=0,H({exportFormat:t,maxDimensions:x,minDimensions:q,maxMeasures:D,minMeasures:S})&&V({exportFormat:t,maxDimensions:x,minDimensions:q,maxMeasures:D,minMeasures:S,newHyperCubeDef:b}),O({exportFormat:t,maxDimensions:x,minDimensions:q,newHyperCubeDef:b,defaultDimension:w}),R({exportFormat:t,maxMeasures:D,minMeasures:S,newHyperCubeDef:b,defaultMeasure:E}),z({newProperties:g,dataDefinition:a,hypercubePath:u}),j({newProperties:g,dataDefinition:a,hypercubePath:u}),P({exportFormat:t,newHyperCubeDef:b}),N("qMaxStackedCells",y,b),N("qNoOfLeftDims",y,b),I("qInitialDataFetch",y,b,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),I("qMode",y,b,"S"),I("qReductionMode",y,b,"N"),I("qSortbyYValue",y,b),I("qIndentMode",y,b),I("qShowTotalsAbove",y,b),k(g,t,n),h.qProperty=g;var C=o.getValue(c||{},"support.modifiers");return $({measures:b.qMeasures,modifierTypes:C}),d&&B(h.qProperty,"storedFilters"),"S"===b.qMode&&f&&B(h.qProperty,"dynamicScript"),h}};var U={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function K(e,t,r,n){t=t||[];var i=c(e,n,r),o=c(t,n,r);if(-1!==i&&-1===o){var a=e.splice(i,1);t.push(a[0])}return t}function G(e,t){return e.length!==t}const Y={create:function(e,t){if(!e||!U[e])throw new Error("Attribute Expressions Util: ID required");var r={};return t&&Object.keys(t).forEach((function(e){r[e]=t[e]})),r.id=e,r.qAttribute=!0,r},moveByIdFromGroup:function(e,t,r,n,i){r=r||"qAttributeExpressions",i=i||"id";for(var o=0;o<e.length;o++){var a=e[o][r],s=t.length;if(K(a,t,n,i),G(t,s))return t}return t},IDMAP:{CELL_BACKGROUND_COLOR:"cellBackgroundColor",CELL_FOREGROUND_COLOR:"cellForegroundColor",COLOR_BY_ALTERNATIVE:"colorByAlternative",COLOR_BY_EXPRESSION:"colorByExpression",TOOLTIP:"tooltip",CELL_LINK_LABEL:"urlLabel",CELL_LINK_URL:"url"}},X={getNumDimensions:function(e){return o.getValue(e,"qHyperCubeDef.qDimensions.length",0)},getNumMeasures:function(e){return o.getValue(e,"qHyperCubeDef.qMeasures.length",0)},wrapFieldName:function(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e},getItemLabel:function(e){return e.label||e.name}},J={colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>0&&X.getNumMeasures(e)<=1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)>0},expression:function(e){return X.getNumMeasures(e)>=1}}},Q={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 Z={scatterplot:Q,"sn-scatter-plot":Q,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=p.findIndexByPropertyValue(e[t],"id",r);n>=0&&e[t].splice(n,1)}else e[t]=[]}function te(e,t){var r=Y.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach((function(e){ee(e,"qAttributeDimensions",r),ee(e,"qAttributeExpressions",r)})),t.forEach((function(e){ee(e,"qAttributeDimensions",r),ee(e,"qAttributeExpressions",r)}))}function re(e,t){if(t){var r="="===t.charAt(0);e.color.altLabel=r?{qStringExpression:{qExpr:t.substr(1)}}:t}}function ne(e){var t=e.properties,r=e.isDimension,n=e.dimensions,i=e.excludedDimensions,a=e.measures,s=e.label;te(n,i);var l=n[n.length-1];if(l){var u=r?o.getValue(t,"color.byDimDef"):o.getValue(t,"color.byMeasureDef"),c=o.getValue(t,"color.formatting.qNumFormat"),d=o.getValue(t,"color.formatting.isCustomFormatted");if(u){var m=Y.create(Y.IDMAP.COLOR_BY_ALTERNATIVE);switch(u.type){case"expression":!function(e){var t=e.attributeExpression,r=e.label,n=e.item,i=e.isDimension,o=e.qNumFormat,a=e.isCustomFormatted;t.label=r||n.label,i?t.qDef=n.key:(t.qExpression=n.key,o&&(t.qNumFormat=o,t.isCustomFormatted=a)),t.matchMeasure=n.activeMeasureIndex,t.label&&"="===t.label.charAt(0)&&(t.labelExpRef="color.altLabel")}({attributeExpression:m,label:s,item:u,isDimension:r,qNumFormat:c,isCustomFormatted:d});break;case"libraryItem":!function(e){var t=e.attributeExpression,r=e.measures,n=e.item,i=e.qNumFormat,o=e.isCustomFormatted;e.isDimension||(t.matchMeasure=p.findIndexByPropertyValue(r,"qLibraryId",n.key),i&&(t.qNumFormat=i,t.isCustomFormatted=o)),void 0!==n.expression?t.qExpression=n.expression:t.qLibraryId=n.key,t.colorMapRef=n.key}({attributeExpression:m,measures:a,item:u,isDimension:r,qNumFormat:c,isCustomFormatted:d})}r?(m.qSortBy={qSortByAscii:1},l.qAttributeDimensions.push(m)):l.qAttributeExpressions.push(m)}}}function ie(e,t,r,n){var i,o,a,s={};switch(e){case"dimension":r.qLibraryId?(s.type="dimension",s.name=r.qLibraryId,s.id=r.qLibraryId):(s.type="field",t?(s.name=r.label||r.qDef,s.id=r.qDef):(s.name=r.qDef.qFieldDefs[0],s.label=(a=r.qDef).qLabelExpression?a.qLabelExpression:a.qFieldLabels&&a.qFieldLabels[0]?a.qFieldLabels[0]:a.qFieldDefs[0]));break;case"measure":i=function(e,t){return t?e.qLibraryId:m().measureBase.getLibraryId(e)}(r,t),i?(s.type="measure",s.name=i,s.id=i,o=function(e,t){return m().hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}(r,n),o&&(s.expression=o)):(s.type="expression",t?(s.name=r.label||r.qExpression,s.id=r.qExpression):(s.name=r.qDef.qDef,s.label=function(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qLabel?t.qLabel:t.qDef}(r)));break;default:throw new Error('columnType should be "dimension" or "measure"')}return s}const oe={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}};function ae(e,t,r,n){var i=t.type,o=e.color,a=o.mode,s=X.getItemLabel(t);switch(re(e,s||""),i){case"field":a="byDimension",o.byDimDef={label:t.label||X.wrapFieldName(t.name),key:X.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":a="byMeasure",o.byMeasureDef={label:s,key:t.name,type:"expression",activeMeasureIndex:t.activeMeasureIndex};break;case"dimension":a="byDimension",o.byDimDef={label:t.name,key:t.id,type:"libraryItem",activeDimensionIndex:t.activeDimensionIndex};break;case"measure":a="byMeasure",o.byMeasureDef={label:t.name,key:t.id,expression:t.expression,type:"libraryItem",activeMeasureIndex:t.activeMeasureIndex},o.formatting&&oe.useMasterNumberFormat(o.formatting)}o.auto=!1,o.mode=a}function se(e,t){var r=o.getValue(e,"".concat(t,"qDimensions"),[]),n=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byDimDef");if(a&&re(e,a.label),function(e){return!!(e&&e.activeDimensionIndex>-1)}(a))!function(e,t){var r=o.getValue(e,"".concat(t,"qDimensions"),[]),n=o.getValue(e,"color.byDimDef");n.activeDimensionIndex=Math.min(n.activeDimensionIndex,r.length-1);var i=ie("dimension",!1,r[n.activeDimensionIndex]);i.activeDimensionIndex=n.activeDimensionIndex,ae(e,i)}(e,t);else if(function(e){return!e||!e.key}(a)&&function(e,t){var r=o.getValue(e,"".concat(t,"qDimensions"),[]),n=r[function(e,t,r){var n=o.getValue(t,"visualization"),i=r.split("."),a=Number(i[1]),s=o.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===n&&"point"===s}(r,e,t)?0:r.length-1],i=Y.IDMAP.COLOR_BY_ALTERNATIVE,a=p.findItemByPropertyValue(n.qAttributeDimensions,"id",i);return ae(e,ie("dimension",!!a,a||n)),!!a}(e,t))return;ne({properties:e,isDimension:!0,dimensions:r,excludedDimensions:i,measures:n,label:o.getValue(e,"color.byDimDef.label")})}const le=function(e,t,r){o.setValue(e,t,r),o.isAtomicValue(r)&&function(e,t,r){var n=e.qLayoutExclude;n&&(n.changed||(n.changed={}),n.changed[t]={from:o.getValue(e,t),to:r})}(e,t,r)},ue=function(e,t){var r={primary:!0};if(e){var n=(Z[t]||J).colorModeOptions||J.colorModeOptions;r.byDimension=n.dimension(e),r.byMeasure=n.measure(e),r.byMultiple=n.multiColor(e),r.byExpression=n.expression(e)}return r},ce=function(e){var t=e.canColorBy,r=e.autoColor,n=e.colorMode,i=e.dimensions;return!(t[n]&&!r&&("byDimension"!==n&&"byMeasure"!==n||!i.length))},pe=function(e,t){var r,n=o.getValue(e,"color.mode"),i=o.getValue(e,"color.auto"),a=o.getValue(e,"".concat(t,"qDimensions"),[]),s=o.getValue(e,"".concat(t,"qMeasures"),[]),l=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);i?te(a,l):!(r={auto:i,colorMode:n,dimensions:a}).auto&&"byDimension"===r.colorMode&&r.dimensions.length>0?se(e,t):function(e){var t=e.auto,r=e.colorMode,n=e.dimensions,i=e.measures,a=e.properties,s=o.getValue(a,"visualization");return!(t||"byMeasure"!==r||!n.length||"map"!==s&&!i.length)}({auto:i,colorMode:n,dimensions:a,measures:s,properties:e})?function(e,t){var r=o.getValue(e,"".concat(t,"qDimensions"),[]),n=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byMeasureDef");if(a&&re(e,a.label),function(e){return!!(e&&e.activeMeasureIndex>-1)}(a))!function(e,t){var r=o.getValue(e,"".concat(t,"qMeasures"),[]),n=o.getValue(e,"color.byMeasureDef");if(n.activeMeasureIndex=Math.min(n.activeMeasureIndex,r.length-1),n.activeMeasureIndex>-1){var i=ie("measure",!1,r[n.activeMeasureIndex],!0);i.activeMeasureIndex=n.activeMeasureIndex,ae(e,i)}}(e,t);else if(function(e,t){return(!e||!e.key)&&t.length>0}(a,n)&&function(e,t){var r=o.getValue(e,"".concat(t,"qDimensions"),[]),n=o.getValue(e,"".concat(t,"qMeasures"),[]),i=r[r.length-1],a=Y.IDMAP.COLOR_BY_ALTERNATIVE,s=p.findItemByPropertyValue(i.qAttributeExpressions,"id",a);return ae(e,ie("measure",!!s,s||n[0])),!!s}(e,t))return;ne({properties:e,isDimension:!1,dimensions:r,excludedDimensions:i,measures:n,label:o.getValue(e,"color.byMeasureDef.label")})}(e,t):function(e,t){var r=o.getValue(e,"color.mode"),n=o.getValue(e,"".concat(t,"qDimensions"),[]),i=o.getValue(e,"".concat(t,"qMeasures"),[]),a=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===r&&i.length<2&&o.setValue(e,"color.mode","primary"),te(n,a)}(e,t)},de=function(e){e.forEach((function(e){e.qOtherTotalSpec&&"qTotalMode"in e.qOtherTotalSpec&&delete e.qOtherTotalSpec.qTotalMode}))},me=function(e){var t=e.shouldUpdateColorBy,r=e.properties,n=o.getValue(r,"qHyperCubeDef.qMeasures",[]),i=o.getValue(r,"color.mode","");return!t&&"byExpression"===i&&n.length>0},fe=function(e){var t=o.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),r=o.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:r,id:"colorByExpression"}),o.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)},he=function(e){o.setValue(e,"color.mode","primary"),o.setValue(e,"color.auto",!0)},ge=function(e){var t=o.getValue(e,"qHyperCubeDef.qDimensions",[]),r=o.getValue(e,"color.persistent",!1);return t.length>1&&!r},ye={exportProperties:function(e){var t=e.propertyTree,r=e.hypercubePath,n=e.viewDataMode,i=W.exportProperties({propertyTree:t,hypercubePath:r,viewDataMode:n}),o=i.data[0],a=o.dimensions.concat(o.excludedDimensions),s=o.measures.concat(o.excludedMeasures),l=Y.IDMAP,u=l.COLOR_BY_ALTERNATIVE,c=l.COLOR_BY_EXPRESSION;return Y.moveByIdFromGroup(a,[],"qAttributeDimensions",u),Y.moveByIdFromGroup(a,[],"qAttributeExpressions",u),Y.moveByIdFromGroup(s,[],"qAttributeExpressions",c),i},importProperties:function(e){var t=e.exportFormat,r=e.initialProperties,n=e.dataDefinition,i=e.defaultPropertyValues,a=e.hypercubePath,s=e.extension,l=e.supportedFilters,u=e.isHCModifierSupported,c=W.importProperties({exportFormat:t,initialProperties:r,dataDefinition:n,defaultPropertyValues:i,hypercubePath:a,extension:s,supportedFilters:l,isHCModifierSupported:u}),p=c.qProperty,d=o.getValue(p,"visualization"),m=o.getValue(p,"qHyperCubeDef.qDimensions",[]),f=o.getValue(p,"color.mode",""),h=o.getValue(p,"color.auto",""),g=ue(p,d),y=ce({canColorBy:g,autoColor:h,colorMode:f,dimensions:m});return g[f]?me({shouldUpdateColorBy:y,properties:p})&&fe(p):he(p),y&&pe(p,"qHyperCubeDef."),ge(p)&&le(p,"color.persistent",!0),de(m),c}};var be=["bar","marker","line"];const ve=function(e){var t=e.initialProperties,r=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?B(r,"unsupportedAutoMinMax")||D()(r.measureAxis,t.measureAxis):B(r,"supportedAutoMinMax")||D()(r.measureAxis,t.measureAxis)},xe=function(e){var t,r=e.exportFormat,n=e.initialProperties,i=e.properties,o=e.measureType,a=i.qHyperCubeDef,s=i.measureAxis;if(function(e){var t=e.initialProperties;return!(!e.exportFormat.properties.measureAxes||t.measureAxes||!t.measureAxis||void 0===t.measureAxis.autoMinMax)}({exportFormat:r,initialProperties:n})){var l=function(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach((function(e){if(e.qDef.series){var r=e.qDef.series,n=r.type,i=r.axis;t[i]||(t[i]={axis:i,type:{line:0,marker:0,bar:0,total:0}}),be.includes(n)&&t[i].type[n]++,t[i].type.total++}})),t}(a);l.length?(o&&(t=l.filter((function(e){return e.type[o]>0})).sort((function(e,t){return t.type[o]-e.type[o]}))),t&&t.length||(t=l.sort((function(e,t){return t.type.total-e.type.total}))),t&&t[0]&&D()(s,r.properties.measureAxes[t[0].axis])):D()(s,r.properties.measureAxes[0])}},qe=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}}},De={exportProperties:function(e){var t=e.propertyTree,r=e.hypercubePath,n=e.viewDataMode,i=e.supportedAutoMinMax,o=void 0===i||i,a=ye.exportProperties({propertyTree:t,hypercubePath:r,viewDataMode:n}),s=a.properties;return o?(x(s,"measureAxis.min","supportedAutoMinMax"),x(s,"measureAxis.max","supportedAutoMinMax")):(x(s,"measureAxis.min","unsupportedAutoMinMax"),x(s,"measureAxis.max","unsupportedAutoMinMax")),a},importProperties:function(e){var t=e.exportFormat,r=e.initialProperties,n=e.dataDefinition,i=e.defaultPropertyValues,o=e.hypercubePath,a=e.measureType,s=e.extension,l=e.supportedFilters,u=e.isHCModifierSupported,c=ye.importProperties({exportFormat:t,initialProperties:r,dataDefinition:n,defaultPropertyValues:i,hypercubePath:o,extension:s,supportedFilters:l,isHCModifierSupported:u}),p=c.qProperty;return ve({initialProperties:r,properties:p}),xe({exportFormat:t,initialProperties:r,properties:p,measureType:a}),qe(p.qHyperCubeDef),p.qHyperCubeDef.qColumnOrder=[],p.qHyperCubeDef.columnOrder=[],c}};function Se(e,t,r){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(r)}function Me(e){var t=e.properties,r=e.arrayPath,n=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,r,[]).forEach((function(e){return function(e){var t=e.properties,r=e.quarantineName,n=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,a);if(void 0!==s){var l=o.getValue(i,"qDef.cId");l||(l=o.generateId(),o.setValue(i,"qDef.cId",l));var u=Se(r,n,l);o.setValue(t,u,s),o.setValue(i,a,void 0)}}({properties:t,quarantineName:n,arrayName:i,item:e,itemPath:a})}))}function we(e){var t=e.properties,r=e.arrayPath,n=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,r,[]).forEach((function(e){return function(e){var t=e.properties,r=e.quarantineName,n=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,"qDef.cId");if(s){var l=Se(r,n,s),u=o.getValue(t,l);void 0!==u&&(o.setValue(i,a,u),o.setValue(t,l,void 0))}}({properties:t,quarantineName:n,arrayName:i,item:e,itemPath:a})}))}var Ae="qHyperCubeDef.qMeasures",Ee="conditionalColoring",Ce="measures",ke="qDef.conditionalColoring";const Ne={quarantine:function(e){Me({properties:e,arrayPath:Ae,quarantineName:Ee,arrayName:Ce,itemPath:ke})},unquarantine:function(e){we({properties:e,arrayPath:Ae,itemPath:ke,arrayName:Ce,quarantineName:Ee})}};var Ie="qHyperCubeDef.qMeasures",Le="measures",Te="qHyperCubeDef.qDimensions",Oe="dimensions",Re="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",Fe="alternativeMeasures",Pe="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",_e="alternativeDimensions",He="qCalcCondition",Ve="conditionalShowHide";const ze={quarantine:function(e){Me({properties:e,arrayPath:Ie,quarantineName:Ve,arrayName:Le,itemPath:He}),Me({properties:e,arrayPath:Te,quarantineName:Ve,arrayName:Oe,itemPath:He})},unquarantine:function(e){we({properties:e,arrayPath:Ie,quarantineName:Ve,arrayName:Le,itemPath:He}),we({properties:e,arrayPath:Te,quarantineName:Ve,arrayName:Oe,itemPath:He})},quarantineAlternative:function(e){Me({properties:e,arrayPath:Re,quarantineName:Ve,arrayName:Fe,itemPath:He}),Me({properties:e,arrayPath:Pe,quarantineName:Ve,arrayName:_e,itemPath:He})},unquarantineAlternative:function(e){we({properties:e,arrayPath:Re,quarantineName:Ve,arrayName:Fe,itemPath:He}),we({properties:e,arrayPath:Pe,quarantineName:Ve,arrayName:_e,itemPath:He})}},je={hypercube:W,colorChart:ye,axisChart:De,quarantineProperty:x,unquarantineProperty:B,quarantineArrayProp:Me,unquarantineArrayProp:we,conditionalColoring:Ne,conditionalShow:ze}})(),n.default})()),k.exports),I=E(N);function L({dataDefinition:e,defaultPropertyValues:t,exportFormat:r,initialProperties:n}){const i=I.hypercube.importProperties({exportFormat:r,initialProperties:n,dataDefinition:e,defaultPropertyValues:t}),o=i.qProperty;return"all"===o.dimensionAxis.show?o.dimensionAxis.show="labels":"title"===o.dimensionAxis.show&&(o.dimensionAxis.show="none"),"all"===o.measureAxis.show?o.measureAxis.show="labels":"title"===o.measureAxis.show&&(o.measureAxis.show="none"),o.qHyperCubeDef.qMeasures.length>0&&(o.qDef.numFormatFromTemplate=o.qHyperCubeDef.qMeasures[0].qDef.numFormatFromTemplate,o.qDef.qNumFormat=o.qHyperCubeDef.qMeasures[0].qDef.qNumFormat,o.qHyperCubeDef.qMeasures.forEach((e=>{e.qDef.numFormatFromTemplate=o.qDef.numFormatFromTemplate,e.qDef.qNumFormat=q(!0,{},o.qDef.qNumFormat)}))),o.qHyperCubeDef.qSuppressZero=!1,i}function T({propertyTree:e,viewDataMode:t}){return I.hypercube.exportProperties({propertyTree:e,viewDataMode:t})}var O=e=>{const t=A(e);return{properties:w,data:{targets:[t]},importProperties:({exportFormat:e,initialProperties:r})=>L({dataDefinition:t,exportFormat:e,initialProperties:r}),exportProperties:T}};function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function F(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,i,o,a,s=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(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 P(e){return function(e){if(Array.isArray(e))return R(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||_(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 _(e,t){if(e){if("string"==typeof e)return R(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?R(e,t):void 0}}var H=["American Typewriter, serif","Andalé Mono, monospace","Arial Black, sans-serif","Arial, sans-serif","Bradley Hand, cursive","Brush Script MT, cursive","Comic Sans MS, cursive","Courier, monospace","Didot, serif","Georgia, serif","Impact, sans-serif","Lucida Console, monospace","Luminari, fantasy","Monaco, monospace","QlikView Sans, sans-serif","Source Sans Pro, sans-serif","Tahoma, sans-serif","Times New Roman, serif","Trebuchet MS, sans-serif","Verdana, sans-serif"],V=["Abril Fatface, serif","Bangers, fantasy","Bebas Neue, sans serif","EB Garamond, serif","Fredoka One, fantasy","Graduate, fantasy","Gravitas One, serif","Indie Flower, fantasy","Inter, sans-serif","Lobster, fantasy","Montserrat, sans-serif","Nixie One, sans-serif","Noto Sans, sans-serif","Open Sans, sans-serif","PT Serif, serif","Pacifico, cursive","Permanent Marker, fantasy","QlikView Sans, sans-serif","Raleway, sans-serif","Rammetto One, fantasy","Roboto, sans-serif","Source Sans Pro, sans-serif","Titan One, fantasy","Yanone Kaffeesatz, sans-serif"];var z=function(e){return{value:e,label:e.charAt(0).toUpperCase()+e.slice(1),groupHeader:!1,disabled:!1,styles:{fontFamily:e}}};function j(e){var t=e.theme,r=e.translator,n=e.defaultValue,i=e.flags,o=[],a=t.getStyle("","","fontFamilies");return Array.isArray(a)&&a.length?o.push.apply(o,P(new Set([n].concat(P(a.map((function(e){return e.split(",").map((function(e){return e.trim()})).map((function(e){return e.replace(/\s+/g," ").trim()})).filter(Boolean).join(", ")}))))))):o.push(n),[{value:"ThemeHeader",label:r.get("properties.themeFonts"),metaText:r.get("properties.theme"),groupHeader:!0}].concat(P(o.map((function(e){return z(e)}))),[{value:"DefaultHeader",label:r.get("properties.allFonts"),metaText:r.get("properties.default"),groupHeader:!0}],P(function(e){return null!=e&&e.isEnabled("PS_20852_WYSIWYG_FONT_SUPPORT")?V:H}(i).map((function(e){return z(e)}))))}function $(e){var t=e.theme,r=e.translator,n=e.id,i=e.path,o=e.flags,a=function(){return t.getStyle(n,i,"fontFamily")};return{getDefaultValue:function(){return a()},getOptions:function(){return j({theme:t,translator:r,defaultValue:a(),flags:o})}}}var B,W,U=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],K=function(e){return{value:e,label:e,groupHeader:!1,disabled:!1}};function G(e){var t=e.theme,r=e.translator,n=e.id,i=e.path,o=function(){return t.getStyle(n,i,"fontSize")};return{getDefaultValue:function(){return o()},getOptions:function(){return function(e){var t=e.translator,r=e.defaultValue,n=[],i=e.theme.getStyle("","","fontSizes");return Array.isArray(i)&&i.length?n.push.apply(n,P(new Set([r].concat(P(i))))):n.push(r),[{value:"ThemeHeader",label:t.get("properties.themeFontSizes"),metaText:t.get("properties.theme"),groupHeader:!0}].concat(P(n.map((function(e){return K(e)}))),[{value:"DefaultHeader",label:t.get("properties.allFontSizes"),metaText:t.get("properties.default"),groupHeader:!0}],P(U.map((function(e){return K(e)}))))}({theme:t,translator:r,defaultValue:o()})}}}function Y(e){var t=e.theme,r=e.translator,n=e.id,i=e.path;return{fontFamily:$({theme:t,translator:r,id:n,path:i,flags:e.flags}),fontSize:G({theme:t,translator:r,id:n,path:i})}}function X(e){var t=e.theme,r=e.translator,n=e.config,i=void 0===n?{}:n,o=e.flags,a=function(e){var t=e.config,r=void 0===t?{}:t,n=r.id,i=r.paths;return{id:void 0===n?"object":"".concat("object",".").concat(n),paths:Array.isArray(i)?i:[]}}({config:i}),s=a.id,l=a.paths,u={};l.forEach((function(e){for(var n=e.split("."),i=u,a=0;a<n.length;a++){var l=n[a];a===n.length-1?i[l]=Y({theme:t,translator:r,id:s,path:e,flags:o}):void 0===i[l]&&(i[l]={}),i=i[l]}}));var c=function(e){for(var t=e.split("."),r=u,n=0;n<t.length;n++){var i=t[n];if(void 0===r[i])throw new Error("font-resolver: Path '".concat(e,"' could not be resolved."));r=r[i]}return r};return u.getDefaultValue=function(e){return c(e).getDefaultValue()},u.getOptions=function(e){return c(e).getOptions()},u}var J,Q=function(){if(W)return B;W=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},o=function(r){if(!r||"[object Object]"!==t.call(r))return!1;var n,i=e.call(r,"constructor"),o=r.constructor&&r.constructor.prototype&&e.call(r.constructor.prototype,"isPrototypeOf");if(r.constructor&&!i&&!o)return!1;for(n in r);return void 0===n||e.call(r,n)},a=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,r){if("__proto__"===r){if(!e.call(t,r))return;if(n)return n(t,r).value}return t[r]};return B=function e(){var t,r,n,l,u,c,p=arguments[0],d=1,m=arguments.length,f=!1;for("boolean"==typeof p&&(f=p,p=arguments[1]||{},d=2),(null==p||"object"!=typeof p&&"function"!=typeof p)&&(p={});d<m;++d)if(null!=(t=arguments[d]))for(r in t)n=s(p,r),p!==(l=s(t,r))&&(f&&l&&(o(l)||(u=i(l)))?(u?(u=!1,c=n&&i(n)?n:[]):c=n&&o(n)?n:{},a(p,{name:r,newValue:e(f,c,l)})):void 0!==l&&a(p,{name:r,newValue:l}));return p},B}();function Z(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function ee(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function te(){}(J=Q)&&J.__esModule&&Object.prototype.hasOwnProperty.call(J,"default")&&J.default;var re=1/.7,ne="\\s*([+-]?\\d+)\\s*",ie="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",oe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ae=/^#([0-9a-f]{3,8})$/,se=new RegExp(`^rgb\\(${ne},${ne},${ne}\\)$`),le=new RegExp(`^rgb\\(${oe},${oe},${oe}\\)$`),ue=new RegExp(`^rgba\\(${ne},${ne},${ne},${ie}\\)$`),ce=new RegExp(`^rgba\\(${oe},${oe},${oe},${ie}\\)$`),pe=new RegExp(`^hsl\\(${ie},${oe},${oe}\\)$`),de=new RegExp(`^hsla\\(${ie},${oe},${oe},${ie}\\)$`),me={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 fe(){return this.rgb().formatHex()}function he(){return this.rgb().formatRgb()}function ge(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=ae.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?ye(t):3===r?new qe(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?be(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?be(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=se.exec(e))?new qe(t[1],t[2],t[3],1):(t=le.exec(e))?new qe(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=ue.exec(e))?be(t[1],t[2],t[3],t[4]):(t=ce.exec(e))?be(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=pe.exec(e))?Ee(t[1],t[2]/100,t[3]/100,1):(t=de.exec(e))?Ee(t[1],t[2]/100,t[3]/100,t[4]):me.hasOwnProperty(e)?ye(me[e]):"transparent"===e?new qe(NaN,NaN,NaN,0):null}function ye(e){return new qe(e>>16&255,e>>8&255,255&e,1)}function be(e,t,r,n){return n<=0&&(e=t=r=NaN),new qe(e,t,r,n)}function ve(e){return e instanceof te||(e=ge(e)),e?new qe((e=e.rgb()).r,e.g,e.b,e.opacity):new qe}function xe(e,t,r,n){return 1===arguments.length?ve(e):new qe(e,t,r,null==n?1:n)}function qe(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function De(){return`#${Ae(this.r)}${Ae(this.g)}${Ae(this.b)}`}function Se(){const e=Me(this.opacity);return`${1===e?"rgb(":"rgba("}${we(this.r)}, ${we(this.g)}, ${we(this.b)}${1===e?")":`, ${e})`}`}function Me(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function we(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ae(e){return((e=we(e))<16?"0":"")+e.toString(16)}function Ee(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new ke(e,t,r,n)}function Ce(e){if(e instanceof ke)return new ke(e.h,e.s,e.l,e.opacity);if(e instanceof te||(e=ge(e)),!e)return new ke;if(e instanceof ke)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(r-n)/s+6*(r<n):r===o?(n-t)/s+2:(t-r)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new ke(a,s,l,e.opacity)}function ke(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function Ne(e){return(e=(e||0)%360)<0?e+360:e}function Ie(e){return Math.max(0,Math.min(1,e||0))}function Le(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}Z(te,ge,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:fe,formatHex:fe,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Ce(this).formatHsl()},formatRgb:he,toString:he}),Z(qe,xe,ee(te,{brighter(e){return e=null==e?re:Math.pow(re,e),new qe(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new qe(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new qe(we(this.r),we(this.g),we(this.b),Me(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:De,formatHex:De,formatHex8:function(){return`#${Ae(this.r)}${Ae(this.g)}${Ae(this.b)}${Ae(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Se,toString:Se})),Z(ke,(function(e,t,r,n){return 1===arguments.length?Ce(e):new ke(e,t,r,null==n?1:n)}),ee(te,{brighter(e){return e=null==e?re:Math.pow(re,e),new ke(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new ke(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new qe(Le(e>=240?e-240:e+120,i,n),Le(e,i,n),Le(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new ke(Ne(this.h),Ie(this.s),Ie(this.l),Me(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=Me(this.opacity);return`${1===e?"hsl(":"hsla("}${Ne(this.h)}, ${100*Ie(this.s)}%, ${100*Ie(this.l)}%${1===e?")":`, ${e})`}`}}));const Te=Math.PI/180,Oe=180/Math.PI,Re=4/29,Fe=6/29,Pe=3*Fe*Fe;function _e(e){if(e instanceof He)return new He(e.l,e.a,e.b,e.opacity);if(e instanceof Be)return We(e);e instanceof qe||(e=ve(e));var t,r,n=$e(e.r),i=$e(e.g),o=$e(e.b),a=Ve((.2225045*n+.7168786*i+.0606169*o)/1);return n===i&&i===o?t=r=a:(t=Ve((.4360747*n+.3850649*i+.1430804*o)/.96422),r=Ve((.0139322*n+.0971045*i+.7141733*o)/.82521)),new He(116*a-16,500*(t-a),200*(a-r),e.opacity)}function He(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function Ve(e){return e>.008856451679035631?Math.pow(e,1/3):e/Pe+Re}function ze(e){return e>Fe?e*e*e:Pe*(e-Re)}function je(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function $e(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Be(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}function We(e){if(isNaN(e.h))return new He(e.l,0,0,e.opacity);var t=e.h*Te;return new He(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Z(He,(function(e,t,r,n){return 1===arguments.length?_e(e):new He(e,t,r,null==n?1:n)}),ee(te,{brighter(e){return new He(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new He(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 qe(je(3.1338561*(t=.96422*ze(t))-1.6168667*(e=1*ze(e))-.4906146*(r=.82521*ze(r))),je(-.9787684*t+1.9161415*e+.033454*r),je(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}})),Z(Be,(function(e,t,r,n){return 1===arguments.length?function(e){if(e instanceof Be)return new Be(e.h,e.c,e.l,e.opacity);if(e instanceof He||(e=_e(e)),0===e.a&&0===e.b)return new Be(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Oe;return new Be(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new Be(e,t,r,null==n?1:n)}),ee(te,{brighter(e){return new Be(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new Be(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return We(this).rgb()}}));var Ue=e=>()=>e;function Ke(e,t){var r=t-e;return r?function(e,t){return function(r){return e+r*t}}(e,r):Ue(isNaN(e)?t:e)}!function e(t){var r=function(e){return 1==(e=+e)?Ke: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):Ue(isNaN(t)?r:t)}}(t);function n(e,t){var n=r((e=xe(e)).r,(t=xe(t)).r),i=r(e.g,t.g),o=r(e.b,t.b),a=Ke(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return n.gamma=e,n}(1);var Ge="center",Ye="bottom";function Xe(e,t,r){if(void 0===e||void 0===t)return r;for(var n=t.split("."),i=e,o=0;o<n.length;++o){var a=n[o];if(void 0===i[a])return r;i=i[a]}return i}[{key:"NoDataExist",alignment:Ge,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:Ge,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:Ge,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:Ge},{key:"DataRangeIncludingZero",alignment:Ye},{key:"LimitedData",alignment:Ye},{key:"NegativeOrZeroValues",alignment:Ye}].reduce((function(e,t){return e[t.key]=t,e}),{});var Je,Qe=["__proto__","constructor"];function Ze(e,t,r){if(void 0!==e&&void 0!==t){var n=t.split("."),i=n[n.length-1];if(!Qe.some((function(e){return n.includes(e)}))){for(var o=e,a=0;a<n.length-1;++a){var s=n[a];void 0===o[s]&&(o[s]=Number.isNaN(+n[a+1])?{}:[]),o=o[s]}void 0!==r?o[i]=r:delete o[i]}}}function et(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 tt(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=nt)):void 0===t&&(t=rt);for(var r,n,i,o,a,s=new at(e),l=[s];r=l.pop();)if((i=t(r.data))&&(a=(i=Array.from(i)).length))for(r.children=i,o=a-1;o>=0;--o)l.push(n=i[o]=new at(i[o])),n.parent=r,n.depth=r.depth+1;return s.eachBefore(ot)}function rt(e){return e.children}function nt(e){return Array.isArray(e)?e[1]:null}function it(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function ot(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function at(e){this.data=e,this.depth=this.height=0,this.parent=null}at.prototype=tt.prototype={constructor:at,count:function(){return this.eachAfter(et)},each:function(e,t){let r=-1;for(const n of this)e.call(t,n,++r,this);return this},eachAfter:function(e,t){for(var r,n,i,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),r=o.children)for(n=0,i=r.length;n<i;++n)a.push(r[n]);for(;o=s.pop();)e.call(t,o,++l,this);return this},eachBefore:function(e,t){for(var r,n,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),r=i.children)for(n=r.length-1;n>=0;--n)o.push(r[n]);return this},find:function(e,t){let r=-1;for(const n of this)if(e.call(t,n,++r,this))return n},sum:function(e){return this.eachAfter((function(t){for(var r=+e(t.data)||0,n=t.children,i=n&&n.length;--i>=0;)r+=n[i].value;t.value=r}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,r=function(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),i=null;for(e=r.pop(),t=n.pop();e===t;)i=e,e=r.pop(),t=n.pop();return i}(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var i=n.length;e!==r;)n.splice(i,0,e),e=e.parent;return n},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(r){r!==e&&t.push({source:r.parent,target:r})})),t},copy:function(){return tt(this).eachBefore(it)},[Symbol.iterator]:function*(){var e,t,r,n,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(r=0,n=t.length;r<n;++r)o.push(t[r])}while(o.length)}},Je=function(e){
|
|
8
8
|
/*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
|
|
9
|
-
e.exports=function(e,t){if(!e||isNaN(+t))return t;var r,n,i,o,a,s,l,u,c,p,d=e.length,f=e.search(/[0-9\-\+#]/),m=f>0?e.substring(0,f):"",h=e.split("").reverse().join(""),g=h.search(/[0-9\-\+#]/),y=d-g,b=e.substring(y,y+1),v=y+("."===b||","===b?1:0),x=g>0?e.substring(v,d):"";if(r=(t="-"===(e=e.substring(f,v)).charAt(0)?-t:+t)<0?t=-t:0,i=(n=e.match(/[^\d\-\+#]/g))&&n[n.length-1]||".",o=n&&n[1]&&n[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(u=t.split("."))[1]||u[1]&&u[1].length<=s)&&(t=(+t).toFixed(s+1)),c=e[0].split(o),e[0]=c.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;u[0].length<e[0].length-a;)u[0]="0"+u[0];else 0==+u[0]&&(u[0]="");if((t=t.split("."))[0]=u[0],l=c[1]&&c[c.length-1].length){for(h="",y=(p=t[0]).length%l,d=p.length,v=0;v<d;v++)h+=p.charAt(v),!((v-y+1)%l)&&v<d-l&&(h+=o);t[0]=h}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(n=t.join(""))&&""!==n||(r=!1),m+(r?"-":"")+n+x}},Xe({exports:{}});var at="'Source Sans Pro', 'Arial', 'sans-serif'",st="#333333",lt="#595959",ut="#737373",ct="#cccccc",pt="#e6e6e6";function dt(e){var t={};return[].concat(F(e),F([["","","color"],["object","","fontFamily"],["object","axis.label.name","color",lt],["object","axis.label.name","fontFamily",at],["object","axis.label.name","fontSize","12px"],["object","axis.line.major","color",ct],["object","axis.line.minor","color",pt],["object","axis.title","color"],["object","axis.title","fontFamily",at],["object","axis.title","fontSize","13px"],["object","grid.line.highContrast","color",pt],["object","grid.line.major","color",ct],["object","grid.line.minor","color",pt],["object","label.value","color",lt],["object","label.value","fontFamily",at],["object","label.value","fontSize","12px"],[!1,"label.value","darkColor",lt],[!1,"label.value","lightColor",pt],["object","outOfRange","color","#999"],["object","legend.title","color",st],["object","legend.title","fontFamily",at],["object","legend.title","fontSize","15px"],["object","legend.label","color",lt],["object","legend.label","fontFamily",at],["object","legend.label","fontSize","13px"],["object","referenceLine.label.name","color",st],["object","referenceLine.label.name","fontFamily",at],["object","referenceLine.label.name","fontSize","12px"],["object","referenceLine.outOfBounds","color",pt],["object","referenceLine.outOfBounds","fontFamily",at],["object","referenceLine.outOfBounds","fontSize","12px"],["object","referenceLine.outOfBounds","backgroundColor",ut,function(e){return"transparent"===e?ut:e}]])).reduce((function(e,r){var n="".concat(r[0],"-").concat(r[1],"-").concat(r[2],"}");return t[n]||(t[n]=!0,e.push(r)),e}),[]).sort((function(e,t){return(e[0].split?e[0].split(".").length:0)-(t[0].split?t[0].split(".").length:0)}))}var ft=function(e){return e};function mt(e){var t=e.theme,r=e.id,n=e.transform,i=e.extend,o=e.matrix,a={},s=n.reduce((function(e,t){var r=P(t,2),n=r[0],i=r[1];return e[n]=i,e}),{});return o.forEach((function(e){var n=P(e,5),i=n[0],o=n[1],l=n[2],u=n[3],c=n[4],p=void 0===c?function(e){return e}:c,d=function(e){var t=e.theme,r=e.base,n=e.path,i=e.attribute,o=e.defaultValue,a=void 0===o?void 0:o;if(!t||!1===r)return a;var s=t.getStyle(r,n,i);return void 0===s?a:s}({theme:t,base:"object"===i&&r?"".concat("object",".").concat(r):i,path:o,attribute:l,defaultValue:u}),f=(s["".concat(o,".").concat(l)]||ft)(p(d));Qe(a,[o,l].filter(Boolean).join("."),f)})),i.forEach((function(e){var t=P(e,2),r=t[0],n=t[1];Qe(a,r,n)})),a}const ht=(e,t)=>(t.components||[]).find((t=>t.key===e)),gt=(e,t,r)=>{var n,i,o,a;const s=null===(n=ht("axis",r))||void 0===n?void 0:n.axis;return{labels:{fontFamily:(null==s||null===(i=s.label)||void 0===i||null===(i=i.name)||void 0===i?void 0:i.fontFamily)||t.getStyle(e,"axis.label.name","fontFamily"),fontSize:(null==s||null===(o=s.label)||void 0===o||null===(o=o.name)||void 0===o?void 0:o.fontSize)||t.getStyle(e,"axis.label.name","fontSize"),fill:(null==s||null===(a=s.label)||void 0===a||null===(a=a.name)||void 0===a||null===(a=a.fontColor)||void 0===a?void 0:a.color)||t.getStyle(e,"axis.label.name","color")}}},yt="object.waterfallChart";function bt(e,t,r,n,i){const o=e.color||e.qDef.color;if(!o||o.auto||!o[r]){return{index:i,color:t.getStyle(yt,`shape.${r}`,"fill")||n}}return o[r].paletteColor}const vt={valueTypes:{NORMAL:"NORMAL",INVERSE:"INVERSE",SUBTOTAL:"SUBTOTAL"},chartID:yt,getColorForPositiveValue:function(e,t){return t.getColorPickerColor(bt(e,t,"positiveValue",null,6))},getColorForNegativeValue:function(e,t){return t.getColorPickerColor(bt(e,t,"negativeValue","#cc6677",-1))},getColorForSubtotal:function(e,t){return t.getColorPickerColor(bt(e,t,"subtotal","#c3c3c3",-1))}};Object.freeze(vt.valueTypes),Object.freeze(vt);const xt=(e,t)=>{const r={axisLabelSection:{translation:"properties.axis.label",component:"panel-section",items:t.getOptions("axis","axis.label.name")},valueLabelSection:{translation:"properties.value.label",component:"panel-section",items:t.getOptions("value","label.value")}};return null!=e&&e.isEnabled("CLIENT_IM_3051")&&(r.legendLabelSection={translation:"properties.legend.label",component:"panel-section",items:t.getOptions("legend","legend.label")}),Object.keys(r).length>0?r:void 0},qt=(e,t,r)=>({component:"styling-panel",chartTitle:"Object.WaterfallChart",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",ref:"components",useGeneral:!0,useBackground:e,items:xt(r,t)});function Dt(e){return!e.color.auto}function St(e){const{flags:t,translator:r}=e,n=e.flags.isEnabled("SENSECLIENT_IM_2020_STYLINGPANEL_WATERFALLCHART"),i=e.flags.isEnabled("SENSECLIENT_IM_2020_WATERFALLCHART_BG"),o={uses:"data",addTranslation:"Properties.AddData",items:{measures:{disabledRef:"",items:{numberFormatting:{show:!1},valueType:{type:"string",component:"dropdown",ref:"qDef.valueType",translation:"properties.waterfall.measureOperation",options:[{value:vt.valueTypes.NORMAL,translation:"properties.waterfall.measureOperation.add"},{value:vt.valueTypes.INVERSE,translation:"properties.waterfall.measureOperation.subtract"},{value:vt.valueTypes.SUBTOTAL,translation:"properties.waterfall.measureOperation.subtotal"}],defaultValue:vt.valueTypes.NORMAL},subTotal:{ref:"qDef.subtotal.enable",type:"boolean",defaultValue:!1,translation:"properties.waterfall.measureOperation.subtotal",show:e=>e.qDef.valueType!==vt.valueTypes.SUBTOTAL},subTotalLabel:{translation:"properties.waterfall.subtotalLabel",component:"string",expression:"optional",ref:"qDef.subtotal.label",defaultValue:()=>r.get("properties.waterfall.measureOperation.subtotal"),show:e=>e.qDef.valueType!==vt.valueTypes.SUBTOTAL&&e.qDef.subtotal&&e.qDef.subtotal.enable}}}}},a=e.anything.sense.theme,s=((e,t,r,n,i)=>n({theme:e,translator:t,flags:i,config:{id:r,paths:["axis.title","axis.label.name","label.value","legend.title","legend.label"]}}))(a,r,vt.chartID,X,t),l=((e,t,r)=>{const n={getOptions:(n,i)=>{const o=(e,t)=>({ref:`${i}.fontColor`,component:"color-picker",width:!1,defaultValue:()=>{const r=e.getStyle(t,`${i}.color`,"color");return{color:r,index:e.getDataColorPickerPalettes()[0].colors.indexOf(r)}}});return{labelSection:{component:"items",ref:"components",key:n,items:{fontFamily:{ref:`${i}.fontFamily`,component:"dropdown",options:()=>e.getOptions(`${i}.fontFamily`),defaultValue:()=>e.getDefaultValue(`${i}.fontFamily`)},...((t,r)=>({fontWrapper:{component:"inline-wrapper",items:{fontSize:{ref:`${i}.fontSize`,component:"dropdown",width:!0,options:()=>e.getOptions(`${i}.fontSize`),defaultValue:()=>e.getDefaultValue(`${i}.fontSize`)},fontColor:{...o(t,r)}}}}))(t,r)}}}}};return n})(s,a,vt.chartID),u={type:"items",translation:"properties.presentation",grouped:!0,items:{stylingPanel:n&&qt(i,l,t),gridLines:{type:"items",snapshot:{tid:"property-gridLines"},items:{showGridLines:{ref:"gridlines.auto",type:"boolean",translation:"properties.gridLine.spacing",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},gridSpacing:{ref:"gridlines.spacing",type:"number",component:"dropdown",defaultValue:2,options:[{value:0,translation:"properties.gridLine.noLines"},{value:2,translation:"properties.gridLine.medium"},{value:3,translation:"properties.gridLine.narrow"}],show:e=>e.gridlines&&!e.gridlines.auto}}},showLabels:{ref:"dataPoint.showLabels",type:"boolean",translation:"properties.dataPoints.labelmode",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],snapshot:{tid:"property-dataPoints"}}}},c={ref:"color.auto",type:"boolean",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},p={ref:"color.positiveValue.paletteColor",translation:"properties.waterfall.color.positiveValueColor",type:"object",component:"color-picker",dualOutput:!0,defaultValue:{index:6,color:null},show:Dt},d={ref:"color.negativeValue.paletteColor",translation:"properties.waterfall.color.negativeValueColor",type:"object",component:"color-picker",dualOutput:!0,defaultValue:{index:-1,color:"#cc6677"},show:Dt},f={ref:"color.subtotal.paletteColor",translation:"properties.waterfall.color.subtotalColor",type:"object",component:"color-picker",dualOutput:!0,defaultValue:{index:-1,color:"#c3c3c3"},show:Dt},m={classification:{section:"color",tags:["simple"],exclusive:!0},type:"items",items:{simpleItems:{items:{autoColor:{...c,label:e=>{var t;return r.get(null!==(t=e.color)&&void 0!==t&&t.auto?"Common.Auto":"Common.Custom")}},positiveValueColor:p,negativeValueColor:d,subtotalColor:f}}}},h={translation:"properties.colorsAndLegend",type:"items",grouped:!0,items:{colors:{type:"items",items:{autoColor:{...c,translation:"properties.colors"},positiveValueColor:p,negativeValueColor:d,subtotalColor:f}},simpleColors:m,legend:{type:"items",items:{show:{ref:"legend.show",type:"boolean",translation:"properties.legend.show",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]},dock:{type:"string",component:"dropdown",ref:"legend.dock",translation:"properties.legend.position",options:[{value:"auto",translation:"Common.Auto"},{value:"right",translation:"properties.dock.right"},{value:"bottom",translation:"Common.Bottom"},{value:"left",translation:"properties.dock.left"},{value:"top",translation:"Common.Top"}],defaultValue:"auto",show:e=>function(e,t,r){if(void 0===e||void 0===t)return r;for(var n=t.split("."),i=e,o=0;o<n.length;++o){var a=n[o];if(void 0===i[a])return r;i=i[a]}return i}(e,"legend.show",!0)}}}}},g={uses:"axis.picasso.measureAxis",label:r.get("properties.yAxis"),items:{axis:{items:{measureAxisTitle:{component:"header",type:"string",label:r.get("properties.yAxis"),classification:{section:"axis",tags:["simple"],exclusive:!0}},show:{translation:"properties.labels",defaultValue:"labels",options:[{value:"labels",translation:"properties.labels"},{value:"none",translation:"Common.None"},null,null]}}}}},y={uses:"axis.picasso.dimensionAxis",items:{othersGroup:{items:{show:{translation:"properties.labels",defaultValue:"labels",options:[{value:"labels",translation:"properties.labels"},{value:"none",translation:"Common.None"},null,null]},label:{options:t.isEnabled("SENSECLIENT_LAYERED_LABELS")?[{value:"auto",translation:"Common.Auto"},{value:"horizontal",translation:"Common.Horizontal"},{value:"tilted",translation:"properties.labels.tilted"},{value:"layered",translation:"properties.labels.layered"}]:void 0}}}}},b={uses:"settings",items:{simpleLabels:{items:{labels:{items:{header:{show(e){var t;return null===(t=e.qHyperCubeDef.qMeasures)||void 0===t?void 0:t.length}},pointLabels:{component:"checkbox",ref:"dataPoint.showLabels",type:"boolean",defaultValue:!0,translation:"Simple.Label.Value",show(e){var t;return null===(t=e.qHyperCubeDef.qMeasures)||void 0===t?void 0:t.length}}}}}},presentation:u,colors:h,measureAxis:g,dimensionAxis:y}},v={translation:"properties.numberFormatting",type:"items",globalChange(e){e.qHyperCubeDef.qMeasures.forEach((t=>{t.qDef.numFormatFromTemplate=e.qDef.numFormatFromTemplate,t.qDef.qNumFormat=q(!0,{},e.qDef.qNumFormat)}))},items:{numberFormatting:{uses:"measures.items.numberFormatting",items:{numberFormattingType:void 0}}}};return{type:"items",component:"accordion",items:{data:o,numberFormatting:v,addons:{type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{suppressZero:null,calcCond:{uses:"calcCond"}}},refLines:{uses:"reflines",items:{colorBackground:{show:!1}}}}},settings:b}}}function wt(e){var t;if(null!==(t=e.anything)&&void 0!==t&&t.sense)return{definition:St(e),support:{cssScaling:!1,snapshot:!0,export:!0,exportData:!0,sharing:!0,viewData:!0},importProperties(t,r,n){n.mapProperties();const i={defaultDimension:n.getDefaultDimensionProperties(),defaultMeasure:n.getDefaultMeasureProperties()};return L({dataDefinition:A(e),defaultPropertyValues:i,exportFormat:t,initialProperties:r})},exportProperties:(e,t,r)=>T({propertyTree:e,viewDataMode:r})}}var Mt=Object.prototype.hasOwnProperty,At=Object.prototype.toString,Et=Object.defineProperty,kt=Object.getOwnPropertyDescriptor,Ct=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===At.call(e)},Nt=function(e){if(!e||"[object Object]"!==At.call(e))return!1;var t,r=Mt.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&Mt.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;for(t in e);return void 0===t||Mt.call(e,t)},It=function(e,t){Et&&"__proto__"===t.name?Et(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Lt=function(e,t){if("__proto__"===t){if(!Mt.call(e,t))return;if(kt)return kt(e,t).value}return e[t]};function Tt(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Ot(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Rt(){}!function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")&&e.default}((function e(){var t,r,n,i,o,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=Lt(s,r),s!==(i=Lt(t,r))&&(c&&i&&(Nt(i)||(o=Ct(i)))?(o?(o=!1,a=n&&Ct(n)?n:[]):a=n&&Nt(n)?n:{},It(s,{name:r,newValue:e(c,a,i)})):void 0!==i&&It(s,{name:r,newValue:i}));return s}));var Pt=1/.7,Ft="\\s*([+-]?\\d+)\\s*",_t="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ht="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Vt=/^#([0-9a-f]{3,8})$/,jt=new RegExp(`^rgb\\(${Ft},${Ft},${Ft}\\)$`),zt=new RegExp(`^rgb\\(${Ht},${Ht},${Ht}\\)$`),$t=new RegExp(`^rgba\\(${Ft},${Ft},${Ft},${_t}\\)$`),Bt=new RegExp(`^rgba\\(${Ht},${Ht},${Ht},${_t}\\)$`),Wt=new RegExp(`^hsl\\(${_t},${Ht},${Ht}\\)$`),Ut=new RegExp(`^hsla\\(${_t},${Ht},${Ht},${_t}\\)$`),Kt={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 Gt(){return this.rgb().formatHex()}function Yt(){return this.rgb().formatRgb()}function Xt(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Vt.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?Jt(t):3===r?new tr(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?Qt(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?Qt(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=jt.exec(e))?new tr(t[1],t[2],t[3],1):(t=zt.exec(e))?new tr(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=$t.exec(e))?Qt(t[1],t[2],t[3],t[4]):(t=Bt.exec(e))?Qt(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Wt.exec(e))?sr(t[1],t[2]/100,t[3]/100,1):(t=Ut.exec(e))?sr(t[1],t[2]/100,t[3]/100,t[4]):Kt.hasOwnProperty(e)?Jt(Kt[e]):"transparent"===e?new tr(NaN,NaN,NaN,0):null}function Jt(e){return new tr(e>>16&255,e>>8&255,255&e,1)}function Qt(e,t,r,n){return n<=0&&(e=t=r=NaN),new tr(e,t,r,n)}function Zt(e){return e instanceof Rt||(e=Xt(e)),e?new tr((e=e.rgb()).r,e.g,e.b,e.opacity):new tr}function er(e,t,r,n){return 1===arguments.length?Zt(e):new tr(e,t,r,null==n?1:n)}function tr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function rr(){return`#${ar(this.r)}${ar(this.g)}${ar(this.b)}`}function nr(){const e=ir(this.opacity);return`${1===e?"rgb(":"rgba("}${or(this.r)}, ${or(this.g)}, ${or(this.b)}${1===e?")":`, ${e})`}`}function ir(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function or(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ar(e){return((e=or(e))<16?"0":"")+e.toString(16)}function sr(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new ur(e,t,r,n)}function lr(e){if(e instanceof ur)return new ur(e.h,e.s,e.l,e.opacity);if(e instanceof Rt||(e=Xt(e)),!e)return new ur;if(e instanceof ur)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(r-n)/s+6*(r<n):r===o?(n-t)/s+2:(t-r)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new ur(a,s,l,e.opacity)}function ur(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function cr(e){return(e=(e||0)%360)<0?e+360:e}function pr(e){return Math.max(0,Math.min(1,e||0))}function dr(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}Tt(Rt,Xt,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Gt,formatHex:Gt,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return lr(this).formatHsl()},formatRgb:Yt,toString:Yt}),Tt(tr,er,Ot(Rt,{brighter(e){return e=null==e?Pt:Math.pow(Pt,e),new tr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new tr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new tr(or(this.r),or(this.g),or(this.b),ir(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:rr,formatHex:rr,formatHex8:function(){return`#${ar(this.r)}${ar(this.g)}${ar(this.b)}${ar(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:nr,toString:nr})),Tt(ur,(function(e,t,r,n){return 1===arguments.length?lr(e):new ur(e,t,r,null==n?1:n)}),Ot(Rt,{brighter(e){return e=null==e?Pt:Math.pow(Pt,e),new ur(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new ur(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new tr(dr(e>=240?e-240:e+120,i,n),dr(e,i,n),dr(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new ur(cr(this.h),pr(this.s),pr(this.l),ir(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=ir(this.opacity);return`${1===e?"hsl(":"hsla("}${cr(this.h)}, ${100*pr(this.s)}%, ${100*pr(this.l)}%${1===e?")":`, ${e})`}`}}));const fr=Math.PI/180,mr=180/Math.PI,hr=4/29,gr=6/29,yr=3*gr*gr;function br(e){if(e instanceof vr)return new vr(e.l,e.a,e.b,e.opacity);if(e instanceof wr)return Mr(e);e instanceof tr||(e=Zt(e));var t,r,n=Sr(e.r),i=Sr(e.g),o=Sr(e.b),a=xr((.2225045*n+.7168786*i+.0606169*o)/1);return n===i&&i===o?t=r=a:(t=xr((.4360747*n+.3850649*i+.1430804*o)/.96422),r=xr((.0139322*n+.0971045*i+.7141733*o)/.82521)),new vr(116*a-16,500*(t-a),200*(a-r),e.opacity)}function vr(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function xr(e){return e>.008856451679035631?Math.pow(e,1/3):e/yr+hr}function qr(e){return e>gr?e*e*e:yr*(e-hr)}function Dr(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Sr(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function wr(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}function Mr(e){if(isNaN(e.h))return new vr(e.l,0,0,e.opacity);var t=e.h*fr;return new vr(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Tt(vr,(function(e,t,r,n){return 1===arguments.length?br(e):new vr(e,t,r,null==n?1:n)}),Ot(Rt,{brighter(e){return new vr(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new vr(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 tr(Dr(3.1338561*(t=.96422*qr(t))-1.6168667*(e=1*qr(e))-.4906146*(r=.82521*qr(r))),Dr(-.9787684*t+1.9161415*e+.033454*r),Dr(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}})),Tt(wr,(function(e,t,r,n){return 1===arguments.length?function(e){if(e instanceof wr)return new wr(e.h,e.c,e.l,e.opacity);if(e instanceof vr||(e=br(e)),0===e.a&&0===e.b)return new wr(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*mr;return new wr(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new wr(e,t,r,null==n?1:n)}),Ot(Rt,{brighter(e){return new wr(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new wr(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return Mr(this).rgb()}}));var Ar,Er=e=>()=>e;function kr(e,t){var r=t-e;return r?function(e,t){return function(r){return e+r*t}}(e,r):Er(isNaN(e)?t:e)}function Cr(e,t,r){if(void 0===e||void 0===t)return r;for(var n=t.split("."),i=e,o=0;o<n.length;++o){var a=n[o];if(void 0===i[a])return r;i=i[a]}return i}function Nr(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 Ir(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=Tr)):void 0===t&&(t=Lr);for(var r,n,i,o,a,s=new Pr(e),l=[s];r=l.pop();)if((i=t(r.data))&&(a=(i=Array.from(i)).length))for(r.children=i,o=a-1;o>=0;--o)l.push(n=i[o]=new Pr(i[o])),n.parent=r,n.depth=r.depth+1;return s.eachBefore(Rr)}function Lr(e){return e.children}function Tr(e){return Array.isArray(e)?e[1]:null}function Or(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function Rr(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function Pr(e){this.data=e,this.depth=this.height=0,this.parent=null}!function e(t){var r=function(e){return 1==(e=+e)?kr: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):Er(isNaN(t)?r:t)}}(t);function n(e,t){var n=r((e=er(e)).r,(t=er(t)).r),i=r(e.g,t.g),o=r(e.b,t.b),a=kr(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return n.gamma=e,n}(1),Pr.prototype=Ir.prototype={constructor:Pr,count:function(){return this.eachAfter(Nr)},each:function(e,t){let r=-1;for(const n of this)e.call(t,n,++r,this);return this},eachAfter:function(e,t){for(var r,n,i,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),r=o.children)for(n=0,i=r.length;n<i;++n)a.push(r[n]);for(;o=s.pop();)e.call(t,o,++l,this);return this},eachBefore:function(e,t){for(var r,n,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),r=i.children)for(n=r.length-1;n>=0;--n)o.push(r[n]);return this},find:function(e,t){let r=-1;for(const n of this)if(e.call(t,n,++r,this))return n},sum:function(e){return this.eachAfter((function(t){for(var r=+e(t.data)||0,n=t.children,i=n&&n.length;--i>=0;)r+=n[i].value;t.value=r}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,r=function(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),i=null;for(e=r.pop(),t=n.pop();e===t;)i=e,e=r.pop(),t=n.pop();return i}(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var i=n.length;e!==r;)n.splice(i,0,e),e=e.parent;return n},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(r){r!==e&&t.push({source:r.parent,target:r})})),t},copy:function(){return Ir(this).eachBefore(Or)},[Symbol.iterator]:function*(){var e,t,r,n,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(r=0,n=t.length;r<n;++r)o.push(t[r])}while(o.length)}},Ar=function(e){
|
|
10
|
-
/*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
|
|
11
|
-
e.exports=function(e,t){if(!e||isNaN(+t))return t;var r,n,i,o,a,s,l,u,c,p,d=e.length,f=e.search(/[0-9\-\+#]/),m=f>0?e.substring(0,f):"",h=e.split("").reverse().join(""),g=h.search(/[0-9\-\+#]/),y=d-g,b=e.substring(y,y+1),v=y+("."===b||","===b?1:0),x=g>0?e.substring(v,d):"";if(r=(t="-"===(e=e.substring(f,v)).charAt(0)?-t:+t)<0?t=-t:0,i=(n=e.match(/[^\d\-\+#]/g))&&n[n.length-1]||".",o=n&&n[1]&&n[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(u=t.split("."))[1]||u[1]&&u[1].length<=s)&&(t=(+t).toFixed(s+1)),c=e[0].split(o),e[0]=c.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;u[0].length<e[0].length-a;)u[0]="0"+u[0];else 0==+u[0]&&(u[0]="");if((t=t.split("."))[0]=u[0],l=c[1]&&c[c.length-1].length){for(h="",y=(p=t[0]).length%l,d=p.length,v=0;v<d;v++)h+=p.charAt(v),!((v-y+1)%l)&&v<d-l&&(h+=o);t[0]=h}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(n=t.join(""))&&""!==n||(r=!1),m+(r?"-":"")+n+x}},Ar({exports:{}});const Fr=/xyz/.test((()=>{}))?/\b_super\b/:/.*/,_r=function(){};_r.extend=function e(t,r){const n=this.prototype;"string"!=typeof t&&(r=t,t="Class");const i=Object.create(this.prototype);for(const e in r)i[e]="function"==typeof r[e]&&"function"==typeof n[e]&&Fr.test(r[e])?function(e,t){return function(){const r=this._super;this._super=n[e];const i=t.apply(this,arguments);return this._super=r,i}}(e,r[e]):r[e];if(!/^[_a-z][_a-z\d]*$/i.test(t))throw new Error("Invalid subclass name. Alphanumericals only.");const o=new Function(`return (function ${t}(){ typeof this.init === 'function' && this.init.apply(this, [].slice.call(arguments)) });`)();return o.prototype=i,o.prototype.constructor=o,o.extend=e,o};const Hr={getChar(e){let t,r=e;return r>9?(t=65+r-10,t>90&&(t+=6)):r=`${r}`.charCodeAt(0),[48,111,79,105,73,108].indexOf(t)>-1?this.getChar(r+1):String.fromCharCode(t)},base62(e){const t=this.getChar(e%62),r=Math.floor(e/62);return r>0?this.base62(r)+t:t},id(){return this.base62(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function Vr(){return Hr.id()}const jr="scrollbar";function zr(e,t,r){return"y"===e?$r(t,r):function(e){return"far"===e?"top":"bottom"}(t)}function $r(e,t){const r=e||"near";return t&&"near"===r||!t&&"far"===r?"right":"left"}var Br={getAxisDock:zr,getOppositeAxisDock:function(e,t,r){return zr(e,"far"===t?"near":"far",r)},getYAxisDock:$r};const Wr=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),Ur=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞יִײַ-ﬨשׁ-ﭏ]"),Kr=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]");function Gr(e){return Wr.test(e)}function Yr(e){return Ur.test(e)||Kr.test(e)}var Xr={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),detectTextDirection:function(e){const t=e?e.length:0;let r,n;for(r=0;r<t;r++){if(n=e[r],Gr(n))return"ltr";if(Yr(n))return"rtl"}return"ltr"}};var Jr={lineSettings:function(e,t){var r;const n={value:0,line:{stroke:void 0!==t.paletteColor?t.theme.getColorPickerColor(t.paletteColor):"transparent",strokeDasharray:null==t||null===(r=t.style)||void 0===r?void 0:r.lineType}};return q(!0,n,e||{})},lineLabelSettings:function(e,t){const r=t&&t.chartID;let n=t.theme.getStyle(r,"referenceLine.label.name","color");const i=t.theme.getStyle(r,"referenceLine.label.name","fontSize"),o=t.theme.getStyle(r,"referenceLine.label.name","fontFamily");return t.paletteColor?n=t.theme.getColorPickerColor(t.paletteColor):n||(n="transparent"),q(!0,{value:0,line:{stroke:"transparent"},label:{align:"center",vAlign:"middle",text:"",fill:n,fontFamily:o,fontSize:i,maxWidthPx:135}},e||{})},isVisible:e=>e&&!1!==e.show&&0!==e.show&&"0"!==e.show&&void 0!==e.refLineExpr,getRefLineTitle:function({refLine:e,label:t,valueString:r}){return!1!==e.showValue?!1!==e.showLabel?`${t} ${Xr.lrm}(${r})${Xr.lrm}`:`${Xr.lrm}(${r})${Xr.lrm}`:!1!==e.showLabel?t:""}};const Qr={SHOW_AXIS_LABELS_OPTIONS:["all","labels"],SHOW_TITLE_OPTIONS:["all","title"],HORIZONTAL:"horizontal",VERTICAL:"vertical",LAYOUTSETTINGS:{lasso:{displayOrder:1e4},rangeDim:{displayOrder:1e4},rangeMeasure:{displayOrder:1e4},rangeMinor:{displayOrder:1e4},scrollBar:{minimumLayoutMode:"SPARK",prioOrder:-1,displayOrder:100},refLines:{layout:{minimumLayoutMode:"SPARK",prioOrder:60,displayOrder:1110}},measureAxisTitle:{minimumLayoutMode:"XSMALL",prioOrder:30,displayOrder:90},dimensionAxisTitle:{minimumLayoutMode:"XSMALL",prioOrder:30,displayOrder:90},measureAxis:{minimumLayoutMode:"XSMALL",prioOrder:10,displayOrder:80},dimensionAxis:{minimumLayoutMode:"XSMALL",prioOrder:10,displayOrder:80},gridLines:{minimumLayoutMode:"XSMALL",displayOrder:-100},refLinesLabels:{minimumLayoutMode:"SMALL",prioOrder:60,displayOrder:0}}};Qr.DEFAULT_CHART_ORIENTATION=Qr.HORIZONTAL;function Zr(e,t){const r=t||{},n=r.measureAxisProperties||{},i=r.dimensionAxisProperties||{},o=r.orientation||Qr.DEFAULT_CHART_ORIENTATION,a=o===Qr.HORIZONTAL,s=a?"x":"y",l=a?"y":"x",u=Qr.SHOW_AXIS_LABELS_OPTIONS,c=Qr.SHOW_TITLE_OPTIONS,p=u.includes(n.show),d=!!r.measureTitleText&&c.includes(n.show),f=r.includeDimensionAxis&&u.includes(i.show),m=r.includeDimensionAxis&&!!r.dimensionTitleText&&c.includes(i.show),h=r.gridlines&&!(!r.gridlines.auto&&0===r.gridlines.spacing),g=r.refLines&&r.refLines.some((e=>e.show)),y=[];if(p&&function(e,t,r,n){let i={scale:"measure",settings:t.axisLabelStyle||{},forceBounds:n&&!n.autoMinMax&&n.showBounds};i=q(i,Qr.LAYOUTSETTINGS.measureAxis);const o=tn(t,r);e.addComponent(`${r}-axis`,i,o)}(e,r,s,n),d&&function(e,t,r){let n={text:t.measureTitleText,style:t.axisTitleStyle||{}};n=q(n,Qr.LAYOUTSETTINGS.measureAxisTitle);const i=function(e,t){return tn(e,t)}(t,r);e.addComponent(`${r}-axis-title`,n,i)}(e,r,s),function(e,t,r,n){let i=t.measureScaleSettings;const o={isRtl:t.isRtl,source:t.measureSource,orientation:r,measureAxisProperties:n};n&&n.spacing>0&&(i=q(!0,i||{},{component:{ticks:{distance:100*n.spacing}}}));e.addScale("measure-scale",i,o)}(e,r,o,n),f&&function(e,t,r){let n={scale:"dimension",settings:t.axisLabelStyle||{}};n=q(n,Qr.LAYOUTSETTINGS.dimensionAxis);const i=rn(t,r);q(!0,n,t.dimensionAxisSettings||{}),e.addComponent(`${r}-axis`,n,i)}(e,r,l),m&&function(e,t,r){let n={text:t.dimensionTitleText,style:t.axisTitleStyle||{}};n=q(n,Qr.LAYOUTSETTINGS.dimensionAxisTitle);const i=function(e,t){return rn(e,t)}(t,r);e.addComponent(`${r}-axis-title`,n,i)}(e,r,l),r.includeDimensionAxis&&function(e,t,r){const n={isRtl:t.isRtl,source:t.dimensionSource,orientation:r===Qr.HORIZONTAL?Qr.VERTICAL:Qr.HORIZONTAL};e.addScale("dimension-scale",t.dimensionScaleSettings,n)}(e,r,o),h&&function(e,t,r){let n={ticks:{show:!0},minorTicks:{show:!t.auto&&!t.auto&&3===t.spacing}};n=q(n,Qr.LAYOUTSETTINGS.gridLines),n[r]={scale:"measure"},e.addComponent("grid-line",n)}(e,r.gridlines,s),r.hasNavigation&&function(e,t,r,n){const i=e.getSettings();i.scroll={dimension:{viewSize:r.scrollSettings&&r.scrollSettings.viewSize||0,max:r.scrollSettings&&r.scrollSettings.max||0}};const o={isRtl:r.isRtl,chartID:r.chartID,isHorizontal:!n},a=q({},Qr.LAYOUTSETTINGS.scrollBar);e.addComponent("scrollbar",a,o),en(t,function(e){function t(t,r){if(!r||!e())return!1;const n={x:r.center.x-r.deltaX,y:r.center.y-r.deltaY};return this.chart.componentsFromPoint(n).some((e=>e.settings.key===jr))}const r={type:"Tap",options:{enable:t},events:{tap(e){this.chart.component(jr).emit("tap",e)}}},n={type:"Pan",options:{enable:t},events:{panstart(e){this.chart.component(jr).emit("panStart",e)},pan(e){this.chart.component(jr).emit("panMove",e)},panend(e){this.chart.component(jr).emit("panEnd",e)},pancancel(e){this.chart.component(jr).emit("panCancel",e)}}};return[r,n]}(r.isNavigationEnabledFn))}(e,y,r,a),g&&function(e,t,r,n){const i=Br.getAxisDock(r,n.dock,t.isRtl);let o={key:"ref-line",style:{oob:{show:!1}},lines:{x:[],y:[]}};o=q(o,Qr.LAYOUTSETTINGS.refLines);let a={key:`ref-line-labels-${Vr()}`,require:["renderer","chart"],dock:Br.getOppositeAxisDock(r,n.dock,t.isRtl),preferredSize(){if("x"===r)return 26;const t=this.renderer.measureText,n=this.chart.formatter({data:e.settings.scales.measure.data}),i=a.lines.y.map((e=>{const r=!1!==e.label.showValue?`(${n(e.value)})`:"",i=`${e.label.text} ${r}`,o=e.label.text&&r?` ${r}`:r;return{wanted:t({text:i,fontSize:e.fontSize,fontFamily:e.fontFamily}).width,required:t({text:o,fontSize:e.fontSize,fontFamily:e.fontFamily}).width}})),o=i[0];for(let e=1;e<i.length;e++)i[e].wanted>o.wanted&&(o.wanted=i[e].wanted),i[e].required>o.required&&(o.required=i[e].required);const s=12;return o.required+s>100?o.required+s:Math.min(o.wanted+s,100)},lines:{x:[],y:[]}};a=q(a,Qr.LAYOUTSETTINGS.refLinesLabels),t.refLines.forEach((n=>{if(!n.show)return;const s=n.refLineExpr&&n.refLineExpr.value,l=q(!0,{},t,{paletteColor:n.paletteColor,style:n.style,chartID:e.options.chartID}),u=Jr.lineSettings({scale:"measure",dir:r,value:s},l);o.lines[r].push(u);const c=Jr.lineLabelSettings({scale:"measure",value:s,label:{text:!1!==n.showLabel?n.label:"",showValue:!1!==n.showValue}},l);"x"===r?c.label.vAlign="near"===i?1:0:c.label.align="near"===i?0:1,a.lines[r].push(c)})),e.addComponent("ref-line",o,{}),e.addComponent("ref-line",a,{})}(e,r,s,n),r.enableLasso&&r.selectionsEnabled){!function(e,t){const r={brushKey:t.brushKey,brushComponents:t.brushComponents,brushData:t.brushData};e.addComponent("lasso",Qr.LAYOUTSETTINGS.lasso,r)}(e,r.lasso||{})}if(r.enableDimRange&&r.includeDimensionAxis&&r.selectionsEnabled){!function(e,t,r,n,i){let o={key:"rangeDim"};o=q(o,Qr.LAYOUTSETTINGS.rangeDim);const a={brushKey:t.brushKey,brushAxis:t.brushAxis,brushArea:t.brushArea,brushScale:t.brushScale,isHorizontal:!r,dock:n,isRtl:i};e.addComponent("range",o,a)}(e,r.dimRange||{},a,rn(r,l).dock,r.isRtl)}if(r.enableMeasureRange&&r.selectionsEnabled){!function(e,t,r,n,i){let o={key:"rangeMeasure"};o=q(o,Qr.LAYOUTSETTINGS.rangeMeasure);const a={brushKey:t.brushKey,brushAxis:t.brushAxis,brushArea:t.brushArea,brushScale:t.brushScale,multiple:t.multiple,isHorizontal:r,dock:n,isRtl:i};e.addComponent("range",o,a)}(e,r.measureRange||{},a,tn(r,s).dock,r.isRtl)}if(r.enableAreaRange&&r.selectionsEnabled){!function(e,t,r,n,i){let o={key:"rangeMinor"};o=q(o,Qr.LAYOUTSETTINGS.rangeMinor);const a={brushKey:t.brushKey,brushAxis:t.brushAxis,brushData:t.brushData,brushArea:t.brushArea,brushComponents:t.brushComponents,brushScale:t.brushScale,multiple:t.multiple,isHorizontal:"measure"===t.brushScale?r:!r,dock:n,isRtl:i,chartInstance:t.chartInstance};e.addComponent("range-area",o,a)}(e,r.areaRange||{},a,rn(r,l).dock,r.isRtl)}r.brushActions&&en(y,r.brushActions),y.length&&function(e,t){e.addInteraction({},{gestures:t})}(e,y)}function en(e,t){t.forEach((t=>{e.push(t)}))}function tn(e,t){return{dock:e.measureAxisProperties&&e.measureAxisProperties.dock,direction:t,isRtl:e.isRtl}}function rn(e,t){return{dock:e.dimensionAxisProperties&&e.dimensionAxisProperties.dock,direction:t,isRtl:e.isRtl}}function nn(e,t){const r=t||{},n=!r.orientation||"horizontal"===r.orientation,i=!!r.isRtl,o={name:r.name||"scale",component:{invert:n&&i,minorTicks:{count:1},range:r.range||void 0,domain:r.domain||void 0,trackBy:r.trackBy||"id"}};return q(!0,{},o,e||{})}function on(e){var t;if(null!=e&&null!==(t=e.isEnabled)&&void 0!==t&&t.call(e,"IM_5791_SVG_LABEL_RENDERING"))return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?void 0:"svg"}function an(e,t){const r=t&&t.chartID,n=t&&t.dock,i=t&&t.direction,o=t&&t.isRtl,a=t.theme.getStyle(r,"axis.line.major","color"),s=t.theme.getStyle(r,"axis.title","fontSize"),l=t.theme.getStyle(r,"axis.title","color"),u=t.theme.getStyle(r,"axis.label.name","color"),c=t.theme.getStyle(r,"axis.label.name","fontSize"),p=t.theme.getStyle(r,"axis.title","fontFamily"),d=t.theme.getStyle(r,"axis.label.name","fontFamily"),f={key:"axis",type:"axis",renderer:on(t.flags),dock:Br.getAxisDock(i,n,o),brush:{trigger:[],consume:[]},settings:{title:{fontSize:s,fontFamily:p,fill:l},line:{show:!0,strokeWidth:1,stroke:a},labels:{fill:u,fontSize:c,fontFamily:d,tiltAngle:o?-40:40,maxEdgeBleed:75,maxSize:150,mode:"auto"},ticks:{stroke:a},minorTicks:{stroke:a}}},m=q(!0,{},f,e||{});return m.brush.consume.forEach((e=>{e.style.active.strokeWidth=0})),m}function sn(e,t){const r=t&&t.chartID,n=t&&t.dock,i=t&&t.direction,o=t&&t.isRtl,a=t.theme.getStyle(r,"axis.title","fontSize"),s=t.theme.getStyle(r,"axis.title","color"),l=t.theme.getStyle(r,"axis.title","fontFamily"),u={key:"text",type:"text",dock:Br.getAxisDock(i,n,o)||"bottom",displayOrder:0,style:{text:{fontSize:a,fontFamily:l,fill:s}}};return q(!0,{},u,e||{})}nn.measureScale=function(e,t){let r=(t||{}).source||[];"string"==typeof r&&(r=[r]);const n={name:"measure",component:{expand:.1,data:{fields:r.map((e=>({field:e})))}}},i=t&&t.measureAxisProperties;i&&!i.autoMinMax&&(["min","minMax"].includes(i.minMax)&&(n.component.min=i.min),["max","minMax"].includes(i.minMax)&&(n.component.max=i.max));const o=nn(q(!0,n,e||{}),t);return!(e&&e.component&&void 0!==e.component.invert)&&t&&"vertical"===t.orientation&&(o.component.invert=!o.component.invert),o},nn.dimensionScale=function(e,t){const r={name:"dimension",component:{trackBy:"id",type:"band",data:{extract:{field:t&&t.source||"",props:{label:e=>e.qText||""}}},label:e=>e.datum.label.value}};return nn(q(!0,r,e||{}),t)},an.xAxis=function(e,t){return an(q(!0,{key:"x-axis",scale:"x"},e||{}),t)},an.yAxis=function(e,t){const r=t&&t.dock,n=t&&t.isRtl,i={key:"y-axis",scale:"y",dock:Br.getYAxisDock(r,n)};return an(q(!0,i,e||{}),t)},sn.xAxisTitle=function(e,t){return sn(q(!0,{key:"x-axis-title"},e||{}),t)},sn.yAxisTitle=function(e,t){const r=t&&t.dock,n=t&&t.isRtl,i={key:"y-axis-title",dock:Br.getYAxisDock(r,n)||"left"};return sn(q(!0,i,e||{}),t)};var ln={getBublesAlign:function(e,t,r){let n=e&&"far"!==t||!e&&"far"===t;return!e&&r&&(n=!n),n?"start":"end"},getDock:function(e,t){const r=[];let n;return e&&r.push(`@${e}`),t&&r.push(`@${t}`),r.length&&(n=r.join(",")),n}};const un={SPARK:{width:0,height:0},XSMALL:{width:150,height:75},SMALL:{width:300,height:150},MEDIUM:{width:400,height:220},FULL:{width:550,height:450}};function cn(){return un}function pn(e){const t=e.data.end;return e.dataset(t.source.key).field(t.source.field).formatter()(t.value)}cn.getLayoutModeKeys=function(){const e=[];let t;for(t in un)e.push(t);return e};const dn={left:"left",right:"right",up:"top",down:"bottom"};function fn(e,t,r){switch(e){case"scale":return nn(t,r);case"measure-scale":return nn.measureScale(t,r);case"dimension-scale":return nn.dimensionScale(t,r);case"axis":return an(t,r);case"box-marker":return function(e){return q(!0,{},{key:"box-marker",type:"box-marker",settings:{minor:{scale:"x"},orientation:"horizontal"},brush:{trigger:[],consume:[]}},e||{})}(t);case"point-marker":return function(e){return q(!0,{},{key:"point-marker",type:"point-marker",settings:{},brush:{trigger:[],consume:[]}},e||{})}(t);case"scrollbar":return function(e,t){const r=t&&t.isRtl,n=t&&t.chartID,i=t&&t.isHorizontal,o={key:"scrollbar",type:"scrollbar",scroll:"dimension",dock:i?"bottom":r?"left":"right",settings:{backgroundColor:t.theme.getStyle(n,"","backgroundColor"),invert:r&&i}};return q(!0,{},o,e||{})}(t,r);case"text":return sn(t,r);case"lasso":return function(e,t){const r=t&&t.brushKey,n=t&&t.brushComponents?t.brushComponents:[],i=t&&t.brushData?t.brushData:["elemNo"],o={type:"brush-lasso",key:"lasso",displayOrder:99,settings:{brush:{components:[]},lasso:{fill:"rgba(0, 0, 0, 0)",stroke:"rgba(102,102,102,1)",strokeWidth:2,opacity:1,strokeDasharray:null},startPoint:{r:10,fill:"rgba(0, 152, 69, 1)",strokeWidth:0,opacity:1}}};return n.forEach((e=>{o.settings.brush.components.push({contexts:r?[r]:void 0,key:e,data:i})})),q(!0,{},o,e||{})}(t,r);case"range":return function(e,t){const r=t&&t.brushKey,n=t&&t.brushAxis,i=t&&t.brushArea,o=t&&t.brushScale,a=t&&t.isHorizontal,s=t&&t.dock,l=t&&t.isRtl,u={type:"brush-range",key:"range",displayOrder:99,dock:ln.getDock(n,i),settings:{brush:r,fill:"rgba(0, 0, 0, 0)",scale:o,multiple:!t||!1!==t.multiple||t.multiple,direction:a?"horizontal":"vertical",target:{component:n,fill:"rgba( 82, 204, 82, 0.2 )",fillActive:"rgba(82, 204, 82, 0.4)"},bubbles:{align:ln.getBublesAlign(a,s,l)}}};return q(!0,{},u,e||{})}(t,r);case"range-area":return function(e,t){const r=t&&t.brushKey,n=t&&t.brushAxis,i=t&&t.brushComponents?t.brushComponents:[],o=t&&t.brushData?t.brushData:["elemNo"],a=t&&t.brushArea,s=t&&t.isHorizontal,l=t&&t.dock,u=t&&t.isRtl,c=t&&t.chartInstance;let p=!0;const d={type:"brush-area-dir",key:"area",displayOrder:99,dock:ln.getDock(n,a),settings:{brush:{components:[]},direction:s?"horizontal":"vertical",target:{component:n,fill:"rgba( 82, 204, 82, 0.2 )",fillActive:"rgba(82, 204, 82, 0.4)"},bubbles:{align:ln.getBublesAlign(s,l,u),label:e=>p?(p=!1,c.dataset(e.binStart.source.key).field(e.binStart.source.field).formatter()(e.binStart.value)):(p=!0,c.dataset(e.binEnd.source.key).field(e.binEnd.source.field).formatter()(e.binEnd.value))},multiple:!t||!1!==t.multiple||t.multiple}};return i.forEach((e=>{d.settings.brush.components.push({contexts:r?[r]:void 0,key:e,data:o,action:"add"})})),q(!0,{},d,e||{})}(t,r);case"categorical-legend":return function(e,t){const r=t&&t.chartID,n=t&&t.isRtl;let i=t&&t.dock||"auto";const o=t&&t.show;"auto"===i&&(i=t.chartHeight/t.chartWidth<1?n?"left":"right":"bottom");const a=t.theme.getStyle(r,"legend.title","color"),s=t.theme.getStyle(r,"legend.title","fontSize"),l=t.theme.getStyle(r,"legend.label","color"),u=t.theme.getStyle(r,"legend.label","fontSize"),c=t.theme.getStyle(r,"legend.title","fontFamily"),p=t.theme.getStyle(r,"legend.label","fontFamily"),d={key:"legend",type:"legend-cat",renderer:on(t.flags),dock:i,show:o,scale:{type:"color"},settings:{title:{anchor:"middle"},layout:{direction:n?"rtl":"ltr",size:"top"===i||"bottom"===i?2:1,vertical:"top"===i||"bottom"===i?16:8},navigation:{button:{class:{"lui-fade-button":!0},content:(e,t)=>e("span",{style:{pointerEvents:"none"},class:["lui-button__icon","lui-icon",`lui-icon--triangle-${dn[t.direction]}`].join(" ")})}}},style:{item:{label:{fontSize:u,fontFamily:p,fill:l,lineHeight:1,wordBreak:"break-word"},margin:{top:5,left:10,right:10,bottom:10},shape:{type:t.type?t.type:"square",size:3*parseInt(u,10)/4}},title:{show:t.showTitle,fontSize:s,fontFamily:c,fill:a}}};return q(!0,{},d,e)}(t,r);case"sequential-legend":return function(e,t){const r=t&&t.chartID,n=t&&t.isRtl;let i=t.dock||"auto";"auto"===i&&(i=t.chartHeight<t.chartWidth?n?"left":"right":"bottom");const o=t.theme.getStyle(r,"legend.title","color"),a=t.theme.getStyle(r,"legend.title","fontSize"),s=t.theme.getStyle(r,"legend.title","fontFamily"),l=t.theme.getStyle(r,"legend.label","color"),u=t.theme.getStyle(r,"legend.label","fontSize"),c=t.theme.getStyle(r,"legend.label","fontFamily");function p(e){switch(e){case"left":return 0;case"right":return 1;default:return.5}}const d={key:"seqlegend",type:"legend-seq",dock:i,displayOrder:200,minimumLayoutMode:"MEDIUM",prioOrder:0,settings:{align:p(n?"right":"left"),major:{invert:"left"===i||"right"===i||n},title:{show:t.showTitle,fontSize:a,fontFamily:s,fill:o},tick:{fill:l,fontSize:u,fontFamily:c}}};return q(!0,{},d,e)}(t,r);case"x-axis":return an.xAxis(t,r);case"y-axis":return an.yAxis(t,r);case"x-axis-title":return sn.xAxisTitle(t,r);case"y-axis-title":return sn.yAxisTitle(t,r);case"grid-line":return function(e,t){const r=t&&t.chartID,n=t.theme.getStyle(r,"grid.line.major","color");return q(!0,{},{displayOrder:-1,key:"grid-line",type:"grid-line",x:null,y:null,ticks:{stroke:n},minorTicks:{stroke:n}},e||{})}(t,r);case"interaction":return function(e,t){const r=t&&t.gestures||[];return q(!0,{},{type:"hammer",key:"hammered",gestures:r},e||{})}(t,r);case"ref-line":return function(e,t){const r=t&&t.chartID,n=t.theme.getStyle(r,"referenceLine.outOfBounds","color"),i=t.theme.getStyle(r,"referenceLine.outOfBounds","backgroundColor");return q(!0,{},{key:"ref-line",type:"ref-line",dock:"center",prioOrder:-1,lines:{x:[],y:[]},style:{oob:{width:7,fill:i,text:{fill:n},padding:{x:7,y:5}}}},e||{})}(t,r);case"event-area":return function(e){return q(!0,{},{type:"event-area",key:"event-area"},e||{})}(t);case"labels":return function(e,t){const r=t&&t.chartID,n=t.theme.getStyle(r,"label.value","color"),i=t.theme.getStyle(r,"label.value","fontSize"),o=t.theme.getStyle(r,"label.value","fontFamily"),a={key:"labels",type:"labels",renderer:on(t.flags),displayOrder:1,settings:{sources:[{component:"box-marker",selector:"rect",strategy:{type:"bar",settings:{direction:"up",fontFamily:o,fontSize:parseFloat(i),align:.5,labels:[{placements:[{position:"outside",fill:n,justify:0},{position:"inside",fill:e&&e.settings.sources[0].strategy.settings.labels[0].placements[1].fill,justify:1}],label:pn}]}}}]}};return q(!0,{},a,e||{})}(t,r);default:return}}function mn(e){this.options=e||{},this.settings={dockLayout:{layoutModes:cn()},components:[],scales:{}}}mn.prototype.addComponent=function(e,t,r){const n=fn(e,t,q(!0,{},this.options,r||{}));return this.settings.components.push(n),n},mn.prototype.addInteraction=function(e,t){const r=fn("interaction",e,q(!0,{},this.options,t||{}));return this.settings.interactions||(this.settings.interactions=[]),this.settings.interactions.push(r),r},mn.prototype.addScale=function(e,t,r){const n=fn(e,t,q(!0,{},this.options,r||{}));this.settings.scales[n.name]=n.component},mn.prototype.getSettings=function(){return this.settings},mn.prototype.getComponent=function(e){return this.settings.components.filter((t=>t.key===e))[0]},mn.prototype.addPreset=function(e,t){!function(e,t,r){if("dimension-measure-chart"!==e)throw Error("There is no chart preset with that type");Zr(t,r)}(e,this,t)},mn.validateComponentKeys=function(e){const t={};return e.map((e=>{const r=e.key;return r?t[r]?`Duplicate key for component ${e.type}`:(t[r]=!0,null):`Missing key for component ${e.type}`})).filter((e=>!!e))},mn.create=function(e){return new mn(e)},mn.createComponent=fn;const hn={CENTER:0,BOTTOM:1};var gn={DISCLAIMERS:[{label:"NoDataExist",alignment:hn.CENTER,default:!0},{label:"RequireNumericDimension",alignment:hn.CENTER,default:!1},{label:"OnlyNanData",alignment:hn.CENTER,default:!0},{label:"OnlyNegativeOrZeroValues",alignment:hn.CENTER,default:!1},{label:"LimitedData",alignment:hn.BOTTOM,default:!1},{label:"OnlyNanColor",alignment:hn.BOTTOM,default:!1},{label:"NegativeOrZeroValues",alignment:hn.BOTTOM,default:!1},{label:"DataRangeIncludingZero",alignment:hn.BOTTOM,default:!1}],ALIGNMENT:hn};const yn={getNoDataExistAttribute:e=>e.qSize.qcy*e.qSize.qcx==0,getLimitedDataAttribute(e,t){let r,n=!1;var i;return e?void 0!==t.explicitLimitedData?n=!0===t.explicitLimitedData:e.qDataPages&&e.qDataPages[0]?n=!t.paging&&e.qSize.qcy>e.qDataPages[0].qMatrix.length:(i=e.qStackedDataPages)&&i[0]&&i[0].qData[0]&&i[0].qData[0].qSubNodes&&(r=t.maxNbrOfDimensions?t.maxNbrOfDimensions:2,n=e.qDimensionInfo.length>=r?e.qStackedDataPages[0].qData[0].qSubNodes.some((e=>e.qDown>0)):e.qStackedDataPages[0].qData[0].qSubNodes.length<e.qStackedDataPages[0].qArea.qHeight):n=!0===t.explicitLimitedData,n},getNegativeOrZeroValuesAttribute:(e,t)=>!t.supportNegative&&e.qMeasureInfo.some((e=>e.qMin<=0)),getOnlyNegativeOrZeroValuesAttribute:(e,t)=>!t.supportNegative&&e.qMeasureInfo.every((e=>e.qMax<=0&&e.qMax>=e.qMin))||0===e.qSize.qcy,getOnlyNanDataAttribute:(e,t)=>void 0!==t.explicitOnlyNanData?t.explicitOnlyNanData:e.qMeasureInfo.every((e=>e.qMax<e.qMin||"NaN"===e.qMax)),getDataRangeIncludingZeroAttribute:(e,t)=>!t.supportRangeOverZero&&function(e,t){const r=t.length;let n,i,o,a,s;for(e&&(i=!(e.autoMinMax||"min"!==e.minMax&&"minMax"!==e.minMax||null===e.min||Number.isNaN(+e.min)),o=!(e.autoMinMax||"max"!==e.minMax&&"minMax"!==e.minMax||null===e.max||Number.isNaN(+e.max))),a=Number.MAX_VALUE,s=-Number.MAX_VALUE,n=0;n<r;n++)if(a=Math.min(a,t[n].qMin),s=Math.max(s,t[n].qMax),a<=0&&s>=0)return!0;return a=i?e.min:a,s=o?e.max:s,a<=0&&s>=0}(e.measureAxis,e.qHyperCube.qMeasureInfo),applyAttributes(e,t){const r=e||{},n={};return r.supportNegative=void 0===r.supportNegative||r.supportNegative,r.supportRangeOverZero=void 0===r.supportRangeOverZero||r.supportRangeOverZero,gn.DISCLAIMERS.forEach((e=>{n[e.label]=!1})),t&&t.qHyperCube?(n.NoDataExist=this.getNoDataExistAttribute(t.qHyperCube),n.NoDataExist?n:(n.RequireNumericDimension=r.explicitRequireNumericDimension,n.RequireNumericDimension||(n.LimitedData=this.getLimitedDataAttribute(t.qHyperCube,r),n.NegativeOrZeroValues=this.getNegativeOrZeroValuesAttribute(t.qHyperCube,r),n.OnlyNegativeOrZeroValues=this.getOnlyNegativeOrZeroValuesAttribute(t.qHyperCube,r),n.OnlyNanData=this.getOnlyNanDataAttribute(t.qHyperCube,r),n.DataRangeIncludingZero=this.getDataRangeIncludingZeroAttribute(t,r)),n)):n}};function bn(e,t,r){this.disclaimersConfig=e,this.dataAttributes=t,this.supportedDisclaimers=r}function vn(e,t){return e&&t&&t[e]}function xn(e){this.environment=e,this.clear()}bn.prototype.isValidAndSupported=function(e,t){return vn(e.label,this.dataAttributes)&&(e.default||vn(e.label,this.supportedDisclaimers))&&void 0!==t&&e.alignment===t},bn.prototype.isAnyValidDisclaimer=function(e){let t=!1;const r=this;return this.disclaimersConfig.forEach((n=>{r.isValidAndSupported(n,e)&&(t=!0)})),t},bn.prototype.getMessage=function(e,t){let r="";const n=this;return t&&this.disclaimersConfig.forEach((i=>{n.isValidAndSupported(i,e)&&(r+=`${t.get(`Object.Disclaimer.${i.label}`)} `)})),r},xn.ERRORS={SET:"Calling Disclaimer.set() without attributes",DISPLAY:"Calling Disclaimer.display() before attributes are applied"},xn._applyDefaultSupport=function(e,t){let r=e;return r||(r={}),t.forEach((e=>{void 0===r[e.label]&&(r[e.label]=e.default)})),r},xn.prototype.getComponentSettings=function(){var e;const{translator:t}=this.environment,r=q(!0,{},this.vizAttributes.supportedDisclaimers),n=new bn(gn.DISCLAIMERS,this.dataAttributes,r);let i,o;if(n.isAnyValidDisclaimer(gn.ALIGNMENT.CENTER))i=n.getMessage(gn.ALIGNMENT.CENTER,t),o="center";else{if(!n.isAnyValidDisclaimer(gn.ALIGNMENT.BOTTOM))return;i=n.getMessage(gn.ALIGNMENT.BOTTOM,t),o="bottom"}return{key:"disclaimer",type:"disclaimer",layout:{displayOrder:1e3,dock:o},settings:{label:i,rtl:"rtl"===(null===(e=this.environment)||void 0===e||null===(e=e.options)||void 0===e?void 0:e.direction)}}},xn.prototype.set=function(e){if(this.clear(),!e)throw new Error(xn.ERRORS.SET);this.vizAttributes=e,this.dataAttributes=yn.applyAttributes(this.vizAttributes.options,this.vizAttributes.data)},xn.prototype.clear=function(){this.vizAttributes=null,this.dataAttributes=null};const qn=_r.extend({init(e,t,r,n,i){this.$element=t,this.environment=r,this.backendApi=n,this._selectionsApi=i,this._on=!1,this._disclaimer=new xn(r),this._dataPaths=["qHyperCube"];const o=this;this.picassoElement=t[0],this.picassoElement.className+=" picasso-chart",this.chartInstance=e.chart({element:this.picassoElement,settings:{components:[mn.createComponent("event-area",{mounted(e){o.dataAreaElem=e}})]}})},updateEnvironment(e){this.environment=e},isRtl(){var e;return"rtl"===(null===(e=this.environment.options)||void 0===e?void 0:e.direction)},setDataPaths(e){this._dataPaths=e},getData:(e,t,r)=>function(e,t,r){let n,i={qTop:0,qLeft:0,qWidth:t.qSize.qcx,qHeight:1e4/t.qSize.qcx};if(r){const e=r.width||t.qSize.qcx,n=Math.floor(1e4/e);i={qTop:r.top||0,qLeft:r.left||0,qWidth:e,qHeight:r.height?Math.min(r.height,n):n}}else i={qTop:0,qLeft:0,qWidth:t.qSize.qcx,qHeight:1e4/t.qSize.qcx};n="K"===t.qMode?"qStackedDataPages":"qDataPages";return e.getData([i],null,t).then((e=>{t[n]=e}))}(e,t,r),hasValidData:()=>!0,paint(){if(this.hasValidData()){var e;this._disclaimer.set(this.getDisclaimerAttributes(this.layout));const t=this._disclaimer.getComponentSettings(),r="center"===(null==t||null===(e=t.layout)||void 0===e?void 0:e.dock),n=this.createChartSettings(this.layout);r?n.components=[t]:t&&n.components.push(t),mn.validateComponentKeys(n.components).forEach((e=>{console.error(e)})),this.updateChart(this.layout,n),this._painted=!0}return Promise.resolve()},resize(){if(this.layout)return this.paint()},createChartSettings(){throw new Error('Subclass must implement "createChartSettings" function')},addSnapshotChartSettings(e,t){const{freeResize:r}=this.environment.options;!r&&t.snapshotData&&(e.dockLayout.logicalSize={width:t.snapshotData.content.size.w,height:t.snapshotData.content.size.h,preserveAspectRatio:!0})},updateData(e){return this._destroyed?Promise.reject():(this.layout=q(!0,{},e),this.layout.permissions=e.permissions,Promise.resolve())},updateChart(e,t,r){var n,i;const o=null!==(n=null===(i=this.environment.appLayout)||void 0===i?void 0:i.qLocaleInfo)&&void 0!==n?n:{},a=this._dataPaths.map((t=>({type:"q",key:t,config:{localeInfo:o},data:Cr(e,t.replace(/\//g,"."))})));this.colorService&&a.push(...this.colorService.getData()),this.chartInstance.update({data:a,settings:t,partialData:r});this.picassoElement.setAttribute("data-state",2)},destroy(){this._destroyed=!0,this.off(),this.chartInstance.destroy()},getViewState:()=>({}),isLassoDisabled:()=>!0,setSnapshotData(e){e.snapshotData||(e.snapshotData={}),e.snapshotData.content={chartData:{},size:{w:this.$element.width(),h:this.$element.height()}}},getDisclaimerAttributes:e=>({data:e})}),Dn={aliceblue:{r:240,g:248,b:255},antiquewhite:{r:250,g:235,b:215},aqua:{r:0,g:255,b:255},aquamarine:{r:127,g:255,b:212},azure:{r:240,g:255,b:255},beige:{r:245,g:245,b:220},bisque:{r:255,g:228,b:196},black:{r:0,g:0,b:0},blanchedalmond:{r:255,g:235,b:205},blue:{r:0,g:0,b:255},blueviolet:{r:138,g:43,b:226},brown:{r:165,g:42,b:42},burlywood:{r:222,g:184,b:135},cadetblue:{r:95,g:158,b:160},chartreuse:{r:127,g:255,b:0},chocolate:{r:210,g:105,b:30},coral:{r:255,g:127,b:80},cornflowerblue:{r:100,g:149,b:237},cornsilk:{r:255,g:248,b:220},crimson:{r:220,g:20,b:60},cyan:{r:0,g:255,b:255},darkblue:{r:0,g:0,b:139},darkcyan:{r:0,g:139,b:139},darkgoldenrod:{r:184,g:134,b:11},darkgray:{r:169,g:169,b:169},darkgreen:{r:0,g:100,b:0},darkgrey:{r:169,g:169,b:169},darkkhaki:{r:189,g:183,b:107},darkmagenta:{r:139,g:0,b:139},darkolivegreen:{r:85,g:107,b:47},darkorange:{r:255,g:140,b:0},darkorchid:{r:153,g:50,b:204},darkred:{r:139,g:0,b:0},darksalmon:{r:233,g:150,b:122},darkseagreen:{r:143,g:188,b:143},darkslateblue:{r:72,g:61,b:139},darkslategray:{r:47,g:79,b:79},darkslategrey:{r:47,g:79,b:79},darkturquoise:{r:0,g:206,b:209},darkviolet:{r:148,g:0,b:211},deeppink:{r:255,g:20,b:147},deepskyblue:{r:0,g:191,b:255},dimgray:{r:105,g:105,b:105},dimgrey:{r:105,g:105,b:105},dodgerblue:{r:30,g:144,b:255},firebrick:{r:178,g:34,b:34},floralwhite:{r:255,g:250,b:240},forestgreen:{r:34,g:139,b:34},fuchsia:{r:255,g:0,b:255},gainsboro:{r:220,g:220,b:220},ghostwhite:{r:248,g:248,b:255},gold:{r:255,g:215,b:0},goldenrod:{r:218,g:165,b:32},gray:{r:128,g:128,b:128},green:{r:0,g:128,b:0},greenyellow:{r:173,g:255,b:47},grey:{r:128,g:128,b:128},honeydew:{r:240,g:255,b:240},hotpink:{r:255,g:105,b:180},indianred:{r:205,g:92,b:92},indigo:{r:75,g:0,b:130},ivory:{r:255,g:255,b:240},khaki:{r:240,g:230,b:140},lavender:{r:230,g:230,b:250},lavenderblush:{r:255,g:240,b:245},lawngreen:{r:124,g:252,b:0},lemonchiffon:{r:255,g:250,b:205},lightblue:{r:173,g:216,b:230},lightcoral:{r:240,g:128,b:128},lightcyan:{r:224,g:255,b:255},lightgoldenrodyellow:{r:250,g:250,b:210},lightgray:{r:211,g:211,b:211},lightgreen:{r:144,g:238,b:144},lightgrey:{r:211,g:211,b:211},lightpink:{r:255,g:182,b:193},lightsalmon:{r:255,g:160,b:122},lightseagreen:{r:32,g:178,b:170},lightskyblue:{r:135,g:206,b:250},lightslategray:{r:119,g:136,b:153},lightslategrey:{r:119,g:136,b:153},lightsteelblue:{r:176,g:196,b:222},lightyellow:{r:255,g:255,b:224},lime:{r:0,g:255,b:0},limegreen:{r:50,g:205,b:50},linen:{r:250,g:240,b:230},magenta:{r:255,g:0,b:255},maroon:{r:128,g:0,b:0},mediumaquamarine:{r:102,g:205,b:170},mediumblue:{r:0,g:0,b:205},mediumorchid:{r:186,g:85,b:211},mediumpurple:{r:147,g:112,b:219},mediumseagreen:{r:60,g:179,b:113},mediumslateblue:{r:123,g:104,b:238},mediumspringgreen:{r:0,g:250,b:154},mediumturquoise:{r:72,g:209,b:204},mediumvioletred:{r:199,g:21,b:133},midnightblue:{r:25,g:25,b:112},mintcream:{r:245,g:255,b:250},mistyrose:{r:255,g:228,b:225},moccasin:{r:255,g:228,b:181},navajowhite:{r:255,g:222,b:173},navy:{r:0,g:0,b:128},oldlace:{r:253,g:245,b:230},olive:{r:128,g:128,b:0},olivedrab:{r:107,g:142,b:35},orange:{r:255,g:165,b:0},orangered:{r:255,g:69,b:0},orchid:{r:218,g:112,b:214},palegoldenrod:{r:238,g:232,b:170},palegreen:{r:152,g:251,b:152},paleturquoise:{r:175,g:238,b:238},palevioletred:{r:219,g:112,b:147},papayawhip:{r:255,g:239,b:213},peachpuff:{r:255,g:218,b:185},peru:{r:205,g:133,b:63},pink:{r:255,g:192,b:203},plum:{r:221,g:160,b:221},powderblue:{r:176,g:224,b:230},purple:{r:128,g:0,b:128},red:{r:255,g:0,b:0},rosybrown:{r:188,g:143,b:143},royalblue:{r:65,g:105,b:225},saddlebrown:{r:139,g:69,b:19},salmon:{r:250,g:128,b:114},sandybrown:{r:244,g:164,b:96},seagreen:{r:46,g:139,b:87},seashell:{r:255,g:245,b:238},sienna:{r:160,g:82,b:45},silver:{r:192,g:192,b:192},skyblue:{r:135,g:206,b:235},slateblue:{r:106,g:90,b:205},slategray:{r:112,g:128,b:144},slategrey:{r:112,g:128,b:144},snow:{r:255,g:250,b:250},springgreen:{r:0,g:255,b:127},steelblue:{r:70,g:130,b:180},tan:{r:210,g:180,b:140},teal:{r:0,g:128,b:128},thistle:{r:216,g:191,b:216},tomato:{r:255,g:99,b:71},transparent:{r:255,g:255,b:255,a:0},turquoise:{r:64,g:224,b:208},violet:{r:238,g:130,b:238},wheat:{r:245,g:222,b:179},white:{r:255,g:255,b:255},whitesmoke:{r:245,g:245,b:245},yellow:{r:255,g:255,b:0},yellowgreen:{r:154,g:205,b:50}},Sn=/^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/i,wn=/^rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),(\d(\.\d+)?)\)$/i,Mn=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i,An=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i,En=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i,kn=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i,Cn=Math.floor,Nn=Math.round,In=_r.extend({init(){let e,t,r,n,i,o,a,s,l,u,c,p,d=0,f=0,m=0,h=1;if(this._invalid=!1,arguments[0]instanceof In)d=arguments[0]._r,f=arguments[0]._g,m=arguments[0]._b,h=arguments[0]._a,this._invalid=arguments[0]._invalid;else if(arguments.length<3)if("string"==typeof arguments[0])if(p=arguments[0],c=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(p))d=parseInt(c[1],10),f=parseInt(c[2],10),m=parseInt(c[3],10);else if(c=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(p))d=parseInt(c[1],10),f=parseInt(c[2],10),m=parseInt(c[3],10),h=parseFloat(c[4]);else if(c=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i.exec(p))d=parseInt(c[1],16),f=parseInt(c[2],16),m=parseInt(c[3],16),h=1;else if(c=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i.exec(p))d=parseInt(c[1]+c[1],16),f=parseInt(c[2]+c[2],16),m=parseInt(c[3]+c[3],16),h=1;else if(c=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(p)){switch(e=parseFloat(c[1]),t=parseFloat(c[3]),n=parseFloat(c[5]),e%=360,t/=100,n/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,n=n<0?0:n>1?1:n,o=n<=.5?2*n*t:(2-2*n)*t,a=e/60,s=o*(1-Math.abs(a%2-1)),l=[],a=Math.floor(a),a){case 0:l=[o,s,0];break;case 1:l=[s,o,0];break;case 2:l=[0,o,s];break;case 3:l=[0,s,o];break;case 4:l=[s,0,o];break;case 5:l=[o,0,s];break;default:l=[0,0,0]}u=n-.5*o,d=l[0]+u,f=l[1]+u,m=l[2]+u,d=Nn(255*d),f=Nn(255*f),m=Nn(255*m),h=1}else if(c=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i.exec(p)){switch(e=parseFloat(c[1]),t=parseFloat(c[3]),n=parseFloat(c[5]),h=parseFloat(c[7]),e%=360,t/=100,n/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,n=n<0?0:n>1?1:n,o=n<=.5?2*n*t:(2-2*n)*t,a=e/60,s=o*(1-Math.abs(a%2-1)),l=[],a=Math.floor(a),a){case 0:l=[o,s,0];break;case 1:l=[s,o,0];break;case 2:l=[0,o,s];break;case 3:l=[0,s,o];break;case 4:l=[s,0,o];break;case 5:l=[o,0,s];break;default:l=[0,0,0]}u=n-.5*o,d=l[0]+u,f=l[1]+u,m=l[2]+u,d=Nn(255*d),f=Nn(255*f),m=Nn(255*m)}else if(c=/^hsv\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(p)){switch(e=parseFloat(c[1]),t=parseFloat(c[3]),i=parseFloat(c[5]),e%=360,t/=100,i/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,i=i<0?0:i>1?1:i,o=i*t,a=e/60,s=o*(1-Math.abs(a%2-1)),l=[],a=Math.floor(a),a){case 0:l=[o,s,0];break;case 1:l=[s,o,0];break;case 2:l=[0,o,s];break;case 3:l=[0,s,o];break;case 4:l=[s,0,o];break;case 5:l=[o,0,s];break;default:l=[0,0,0]}u=i-o,d=l[0]+u,f=l[1]+u,m=l[2]+u,d=Nn(255*d),f=Nn(255*f),m=Nn(255*m),h=1}else Dn[p.toLowerCase()]?(r=p.toLowerCase(),d=Dn[r].r,f=Dn[r].g,m=Dn[r].b,h="number"==typeof Dn[r].a?Dn[r].a:1):this._invalid=!0;else"number"==typeof arguments[0]&&arguments[0]>=0&&"argb"===arguments[1]?(h=(4278190080&arguments[0])>>>24,h/=255,d=(16711680&arguments[0])>>16,f=(65280&arguments[0])>>8,m=255&arguments[0]):"number"==typeof arguments[0]&&arguments[0]>=0?(d=(16711680&arguments[0])>>16,f=(65280&arguments[0])>>8,m=255&arguments[0]):this._invalid=!0;else arguments.length>=3?(d=arguments[0],f=arguments[1],m=arguments[2],h=arguments.length>=4?arguments[3]:1):this._invalid=!0;Number.isNaN(+d+f+m+h)&&(this._invalid=!0),this._r=Cn(d),this._g=Cn(f),this._b=Cn(m),this._a=h,this._spaces={}},isInvalid(){return this._invalid},setAlpha(e){this._a=e,this._spaces={}},getAlpha(){return this._a},toRGB:function(){return this._spaces.rgb||(this._spaces.rgb=In.toRGB(this)),this._spaces.rgb},toRGBA:function(){return this._spaces.rgba||(this._spaces.rgba=In.toRGBA(this)),this._spaces.rgba},toString(){return this._spaces.rgb||(this._spaces.rgb=In.toRGB(this)),this._spaces.rgb},toHex:function(){return this._spaces.hex||(this._spaces.hex=In.toHex(this)),this._spaces.hex},toHSL:function(e){return this._spaces.hsl||(this._spaces.hsl=In.toHSL(this,e)),this._spaces.hsl},toHSLA:function(e){return this._spaces.hsla||(this._spaces.hsla=In.toHSLA(this,e)),this._spaces.hsla},toHSV(){const e=this.toHSVComponents();return`hsv(${e.h},${e.s},${e.v})`},toHSVComponents:function(){return this._spaces.hsvComp||(this._spaces.hsvComp=In.toHSVComponents(this)),this._spaces.hsvComp},toNumber:function(){return this._spaces.num||(this._spaces.num=In.toNumber(this)),this._spaces.num},isDark(){return this.isInvalid()||this.getLuminance()<125},getLuminance(){return void 0===this._lumi&&(this._lumi=.299*this._r+.587*this._g+.114*this._b),this._lumi},shiftLuminance(e){const t=this.toHSLA(),r=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i.exec(t),n=parseFloat(r[1]),i=parseFloat(r[3]);let o=parseFloat(r[5]);const a=parseFloat(r[7]);return o+=e,o=Math.max(0,Math.min(o,100)),`hsla(${n},${i},${o},${a})`},isEqual(e){return e instanceof In||(e=new In(e)),this._r===e._r&&this._g===e._g&&this._b===e._b},blend(e,t){return`rgba(${[Cn(this._r+(e._r-this._r)*t),Cn(this._g+(e._g-this._g)*t),Cn(this._b+(e._b-this._b)*t),Cn(this._a+(e._a-this._a)*t)].join(",")})`},createShiftedColor(e){(void 0===e||Number.isNaN(+e))&&(e=1);const t=this.getLuminance(),r=this._g<126?1:1+this._g/512,n=this.shiftLuminance(20*(t*r<220?.8+1/(t+1)*4:-(.8+t/255*1))*e);return new In(n)}});In.toRGB=function(e){if(e instanceof In)return`rgb(${[e._r,e._g,e._b].join(",")})`;"string"==typeof e&&(e=In.toNumber(e));return`rgb(${(16711680&e)>>16},${(65280&e)>>8},${255&e})`},In.toRGBA=function(e,t){if(e instanceof In)return`rgba(${[e._r,e._g,e._b,void 0!==t?t:e._a].join(",")})`;"string"==typeof e&&(e=In.toNumber(e));return`rgba(${(16711680&e)>>16},${(65280&e)>>8},${255&e},${void 0!==t?t:e._a})`},In.toHex=function(e){let t,r,n;return e instanceof In?(t=e._r.toString(16),r=e._g.toString(16),n=e._b.toString(16),1===t.length&&(t=`0${t}`),1===r.length&&(r=`0${r}`),1===n.length&&(n=`0${n}`),`#${[t,r,n].join("")}`):("string"==typeof e&&(e=In.toNumber(e)),t=((16711680&e)>>16).toString(16),r=((65280&e)>>8).toString(16),n=(255&e).toString(16),1===t.length&&(t=`0${t}`),1===r.length&&(r=`0${r}`),1===n.length&&(n=`0${n}`),`#${t}${r}${n}`)},In.toHSL=function(e,t){let r,n,i,o=0;"string"==typeof e&&(e=new In(e));const a=e._r/255,s=e._g/255,l=e._b/255,u=Math.max(a,s,l),c=Math.min(a,s,l);if(n=t?.21*a+.72*s+.07*l:(u+c)/2,u===c)r=0,o=0;else{switch(i=u-c,r=n>.5?i/(2-u-c):i/(u+c),u){case a:o=(s-l)/i+(s<l?6:0);break;case s:o=(l-a)/i+2;break;case l:o=(a-s)/i+4}o/=6}return`hsl(${360*o},${100*r},${100*n})`},In.toHSLA=function(e,t){let r,n,i,o=0;"string"==typeof e&&(e=new In(e));const a=e._r/255,s=e._g/255,l=e._b/255,u=e._a,c=Math.max(a,s,l),p=Math.min(a,s,l);if(n=t?.21*a+.72*s+.07*l:(c+p)/2,c===p)r=0,o=0;else{switch(i=c-p,r=n>.5?i/(2-c-p):i/(c+p),c){case a:o=(s-l)/i+(s<l?6:0);break;case s:o=(l-a)/i+2;break;case l:o=(a-s)/i+4}o/=6}return`hsla(${360*o},${100*r},${100*n},${u})`},In.toHSVComponents=function(e){let t,r,n=0;"string"==typeof e&&(e=new In(e));const i=e._r/255,o=e._g/255,a=e._b/255,s=Math.max(i,o,a),l=Math.min(i,o,a),u=s;if(s===l)t=0,n=0;else{switch(r=s-l,t=0===r?0:r/u,s){case i:n=(o-a)/r+(o<a?6:0);break;case o:n=(a-i)/r+2;break;case a:n=(i-o)/r+4}n/=6}return{h:360*n%360,s:100*t,v:100*u}},In.toNumber=function(){if(1===arguments.length&&arguments[0]instanceof In)return(arguments[0]._r<<16)+(arguments[0]._g<<8)+arguments[0]._b;let e,t,r=0,n=0,i=0;return 1===arguments.length&&"string"==typeof arguments[0]&&(t=arguments[0],(e=/^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/i.exec(t))?(r=parseInt(e[1],10),n=parseInt(e[2],10),i=parseInt(e[3],10)):(e=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i.exec(t))?(r=parseInt(e[1],16),n=parseInt(e[2],16),i=parseInt(e[3],16)):(e=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i.exec(t))&&(r=parseInt(e[1]+e[1],16),n=parseInt(e[2]+e[2],16),i=parseInt(e[3]+e[3],16))),(r<<16)+(n<<8)+i},In.blend=function(e,t,r){const n=(16711680&(e=In.toNumber(e)))>>16,i=(65280&e)>>8,o=255&e;return(n+(((16711680&(t=In.toNumber(t)))>>16)-n)*r<<16)+(i+(((65280&t)>>8)-i)*r<<8)+(o+((255&t)-o)*r)},In.getBlend=function(e,t,r){const n=e._r+(t._r-e._r)*r,i=e._g+(t._g-e._g)*r,o=e._b+(t._b-e._b)*r,a=e._a+(t._a-e._a)*r;return new In(n,i,o,a)},In.isCSSColor=function(e){return!(arguments.length>1||"string"!=typeof e)&&(Sn.test(e)||wn.test(e)||Mn.test(e)||An.test(e)||En.test(e)||kn.test(e)||Dn[e.toLowerCase()])},In.getBestContrast=function(e,t,r){const n=e.getLuminance();return Math.abs(n-t.getLuminance())>Math.abs(n-r.getLuminance())?t:r},In.getContrast=function(e,t){if(!e||!t)return;const r=e.getLuminance()/100,n=t.getLuminance()/100;return r>n?(r+.05)/(n+.05):(n+.05)/(r+.05)},In.isDark=function(){const e={getLuminance:In.prototype.getLuminance,isInvalid:In.prototype.isInvalid};return In.prototype.init.apply(e,[].slice.call(arguments)),In.prototype.isDark.call(e)},In.useDarkLabel=function(e,t){return e._a>.5?!e.isDark():!t};const Ln=".scrollHandler";function Tn(e,t,r,n,i){if(!e||!t||!r)throw Error("Scroll-handler: Missing input");this._chartInstance=e,this._$chartElement=t,this._getSlicedDataFn=r,this._on=!1,this._itemSize=30,this.options={direction:"vertical"},this._onScrollCallback=n,this._legendKey=i}function On(){const e=("horizontal"===this.options.direction?this._$chartElement.width():this._$chartElement.height())||0,t=Math.floor(e/this.getItemSize());this._scrollViewSizeInItem=Math.max(t,1)}function Rn(e){const t=function(e){let t=0,r=0,n=0;return e.wheelDelta&&(t=e.wheelDelta/60),e.detail&&(t=-e.detail/3),n=t,void 0!==e.axis&&e.axis===e.HORIZONTAL_AXIS&&(n=0,r=-1*t),void 0!==e.wheelDeltaY&&(n=e.wheelDeltaY/60),void 0!==e.wheelDeltaX&&(r=-1*e.wheelDeltaX/60),{delta:t,deltaX:r,deltaY:n,x:e.pageX,y:e.pageY}}(e.originalEvent);if(function(e,t,r,n){if(n&&r.componentsFromPoint(t).some((e=>e.settings.key===n)))return r.component(n).emit(t.delta>0?"prev":"next"),e.preventDefault(),!0;return!1}(e,t,this._chartInstance,this._legendKey)||this._disabled||!this.getScrollApi())return;if(e.preventDefault(),!t.delta)return;const r=t.delta<0?3:-3;this._scrollApi.move(r)}function Pn(){if(this._disabled||this._sizeChanged)return void(this._sizeChanged=!1);const e=this;this.getViewData().then((t=>{e._on&&!e._disabled&&e._onScrollCallback&&e._onScrollCallback(t,void 0,!0)})).catch((e=>{}))}Tn.prototype.getScrollApi=function(){this._scrollApi||(this._scrollApi=this._chartInstance.scroll("dimension"));return this._scrollApi},Tn.prototype.setDisabled=function(e){this._disabled=e},Tn.prototype.getDisabled=function(){return this._disabled},Tn.prototype.setItemSize=function(e){this._itemSize!==e&&(this._itemSize=e,On.call(this))},Tn.prototype.getItemSize=function(){return this._itemSize},Tn.prototype.getScrollViewSizeInItem=function(){this._scrollViewSizeInItem||On.call(this);return this._scrollViewSizeInItem},Tn.prototype.on=function(){if(this._on)return;this.getScrollApi()&&(this._scrollApi.removeAllListeners(),this._scrollApi.on("update",Pn.bind(this)));this._$chartElement.on(`mousewheel${Ln} DOMMouseScroll${Ln}`,Rn.bind(this)),this._$chartElement.on(`touchstart${Ln}`,(e=>{e.preventDefault()})),this._on=!0},Tn.prototype.isOn=function(){return this._on},Tn.prototype.off=function(){if(!this._on)return;this.getScrollApi()&&this._scrollApi.removeAllListeners();this._$chartElement.off(Ln),this._on=!1},Tn.prototype.updateViewState=function(e){On.call(this),this.getScrollApi()&&this._scrollApi.update({viewSize:this._scrollViewSizeInItem,max:e})},Tn.prototype.onResize=function(){this._sizeChanged=!0,On.call(this),this.getScrollApi()&&this._scrollApi.update({viewSize:this._scrollViewSizeInItem})},Tn.prototype.isDataSizeChanged=function(e,t){return Math.min(this.getScrollViewSizeInItem(),t)!==e},Tn.prototype.resetScroll=function(){this.getScrollApi()&&this._scrollApi.moveTo(0)},Tn.prototype.getViewData=function(){let e=0,t=0;if(this.getScrollApi()){const r=this._scrollApi.getState();e=Math.round(r.start),t=r.viewSize}return this._getSlicedDataFn(e,t)},Tn.prototype.setOptions=function(e){this.options.direction!==e.direction&&(this._scrollViewSizeInItem=void 0);this.options=e},Tn.prototype.getScrollState=function(){return this.getScrollApi().getState().start},Tn.prototype.setScrollState=function(e){this.getScrollApi().moveTo(e)};var Fn={isOnComponentForRange:function(e,t,r){return!!e&&!!r.chart.componentsFromPoint({x:e.center.x,y:e.center.y}).filter((e=>-1!==t.indexOf(e.settings.key)))[0]},isOnComponentForLasso:function(e,t,r){return e&&r.chart.componentsFromPoint({x:e.center.x,y:e.center.y}).filter((e=>e.settings.key===t.keys.componentKey))[0]},isOnComponentForNavBtn:function(e,t,r){return r.chart.componentsFromPoint(e.center).some((e=>e.settings.key===t))}};var _n={callLassoGesture:function(e,t,r){return{type:"Pan",options:{direction:x.DIRECTION_ALL,threshold:1,enable(n,i){if(e.lassoing)return t.isSelectionEnabled();const o=Fn.isOnComponentForLasso(i,r,this);return t.isSelectionEnabled()&&i&&((a=r.handlers).selectionHandler.lassoState()&&!a.selectionHandler.allFieldsLocked()||e.lassoing)&&o;var a},event:"lasso"},recognizeWith:r.handlers.scrollHandler?"drag":null,events:{lassostart(n){Fn.isOnComponentForLasso(n,r,this)&&(t.switchTo("lasso",this.chart,n),e.lassoing=!0,r.handlers.selectionHandler.pauseEngineCalls(r.keys.lassoBrushKey),n.clientX=n.pointers[0].clientX,n.clientY=n.pointers[0].clientY,t.doEmit(this.chart,"lasso","lassoStart",n))},lassomove(r){e.lassoing&&(r.clientX=r.pointers[0].clientX,r.clientY=r.pointers[0].clientY,t.doEmit(this.chart,"lasso","lassoMove",r))},lassoend(n){e.lassoing&&(n.clientX=n.pointers[0].clientX,n.clientY=n.pointers[0].clientY,t.doEmit(this.chart,"lasso","lassoEnd",n),r.handlers.selectionHandler.resumeEngineCalls(r.keys.lassoBrushKey,!0),e.lassoing=!1)},lassocancel(n){e.lassoing=!1,t.doEmit(this.chart,"lasso","lassoCancel",n),r.handlers.selectionHandler.resumeEngineCalls(r.keys.lassoBrushKey,!1)}}}}};var Hn={callMeasureRangeGesture:function(e,t,r,n){const i=r.keys.dimRangeBrushKey?"majorrange":"arearange";return{type:"Pan",options:{direction:r.isHorizontal?x.DIRECTION_HORIZONTAL:x.DIRECTION_VERTICAL,event:"measurerange",enable(i,o){if(!r.rangeSelStatus.isOpenMea)return!1;if(e.measureSelecting)return t.isSelectionEnabled();const a="measurerange"===r.active.gesture?[n,r.keys.componentKey]:[n],s=Fn.isOnComponentForRange(o,a,this);return e.measureSelecting=t.isSelectionEnabled()&&!!o&&!!s,e.measureSelecting&&!!r.keys.measureRangeBrushKey}},requireFailure:`lasso ${i}`,recognizeWith:r.handlers.scrollHandler?"drag":null,events:{measurerangestart(i){const o="measurerange"===r.active.gesture?[n,r.keys.componentKey]:[n];Fn.isOnComponentForRange(i,o,this)&&(e.measureSelecting=!0,t.switchTo("measurerange",this.chart,i),t.doEmit(this.chart,"rangeMeasure","rangeStart",i),r.handlers.selectionHandler.pauseEngineCalls(r.keys.measureRangeBrushKey))},measurerangemove(r){e.measureSelecting&&t.doEmit(this.chart,"rangeMeasure","rangeMove",r)},measurerangeend(n){e.measureSelecting&&(r.handlers.selectionHandler.resumeEngineCalls(r.keys.measureRangeBrushKey,!0),t.doEmit(this.chart,"rangeMeasure","rangeEnd",n),e.measureSelecting=!1)},measurerangecancel(){r.handlers.selectionHandler.resumeEngineCalls(r.keys.measureRangeBrushKey,!1),e.measureSelecting=!1}}}}};function Vn(e,t){let r;return r="x-axis"===e?"horizontal"===t?x.DIRECTION_VERTICAL:x.DIRECTION_HORIZONTAL:"horizontal"===t?x.DIRECTION_HORIZONTAL:x.DIRECTION_VERTICAL,r}var jn={callAreaRangeGesture:function(e,t,r,n){const i=r.keys.dimRangeBrushKey?"majorrange":"measurerange";return{type:"Pan",options:{direction:Vn(n,r.isHorizontal),event:"arearange",enable(i,o){if(!r.rangeSelStatus.isOpenDim)return!1;if(e.minoring)return t.isSelectionEnabled();const a="arearange"===r.active.gesture?[n,r.keys.componentKey]:[n],s=Fn.isOnComponentForRange(o,a,this);return e.minoring=t.isSelectionEnabled()&&!!o&&!!s,e.minoring}},requireFailure:`lasso ${i}`,recognizeWith:r.handlers.scrollHandler?"drag":null,events:{arearangestart(i){const o="arearange"===r.active.gesture?[n,r.keys.componentKey]:[n];Fn.isOnComponentForRange(i,o,this)&&(e.minoring=!0,t.switchTo("arearange",this.chart,i),t.doEmit(this.chart,"rangeMinor","areaStart",i),r.handlers.selectionHandler.pauseEngineCalls(r.keys.areaBrushKey))},arearangemove(n){e.minoring&&(this.chart.brush(r.keys.areaBrushKey).clear(),t.doEmit(this.chart,"rangeMinor","areaMove",n))},arearangeend(n){e.minoring&&(r.handlers.selectionHandler.resumeEngineCalls(r.keys.areaBrushKey,!0),t.doEmit(this.chart,"rangeMinor","areaEnd",n),e.minoring=!1)},arearangecancel(){r.handlers.selectionHandler.resumeEngineCalls(r.keys.areaBrushKey,!1),e.minoring=!1}}}}};var zn={callDimensionRangeGesture:function(e,t,r,n){const i=r.keys.measureRangeBrushKey?"measurerange":"arearange";return{type:"Pan",options:{direction:r.isHorizontal?x.DIRECTION_VERTICAL:x.DIRECTION_HORIZONTAL,event:"majorrange",enable(i,o){if(!r.rangeSelStatus.isOpenDim)return!1;if(e.majoring)return t.isSelectionEnabled();const a="majorrange"===r.active.gesture?[n,r.keys.componentKey]:[n],s=Fn.isOnComponentForRange(o,a,this);return e.majoring=t.isSelectionEnabled()&&!!o&&!!s,e.majoring&&!!r.keys.dimRangeBrushKey}},requireFailure:`lasso ${i}`,recognizeWith:r.handlers.scrollHandler?"drag":null,events:{majorrangestart(i){const o="majorrange"===r.active.gesture?[n,r.keys.componentKey]:[n];Fn.isOnComponentForRange(i,o,this)&&(e.majoring=!0,t.switchTo("majorrange",this.chart,i),t.doEmit(this.chart,"rangeDim","rangeStart",i),r.handlers.selectionHandler.pauseEngineCalls(r.keys.dimRangeBrushKey))},majorrangemove(r){e.majoring&&t.doEmit(this.chart,"rangeDim","rangeMove",r)},majorrangeend(n){e.majoring&&(r.handlers.selectionHandler.resumeEngineCalls(r.keys.dimRangeBrushKey,!0),t.doEmit(this.chart,"rangeDim","rangeEnd",n),e.majoring=!1)},majorrangecancel(){r.handlers.selectionHandler.resumeEngineCalls(r.keys.dimRangeBrushKey,!1),e.majoring=!1}}}}};var $n={callDragGesture:function(e,t,r,n,i){let o={};return{type:"Pan",options:{direction:r.isHorizontal?x.DIRECTION_VERTICAL:x.DIRECTION_HORIZONTAL,event:"drag",enable(n,i){return e.dragging?t.isNavigationEnabled():(e.dragging=t.isNavigationEnabled()&&!!i&&!!this.chart.componentsFromPoint({x:i.center.x,y:i.center.y}).filter((e=>e.settings.key===r.keys.componentKey))[0],e.dragging)}},requireFailure:n?`lasso ${t.getBrushConfig()}`:"",events:{dragstart(e){o={x:e.deltaX,y:e.deltaY};let t=-(r.isHorizontal?e.deltaY:e.deltaX)/r.handlers.scrollHandler.getItemSize();!r.isHorizontal&&i&&(t=-t),r.handlers.scrollHandler.getScrollApi().move(t)},dragmove(t){if(!e.dragging)return;let n=-(r.isHorizontal?t.deltaY-o.y:t.deltaX-o.x)/r.handlers.scrollHandler.getItemSize();!r.isHorizontal&&i&&(n=-n),r.handlers.scrollHandler.getScrollApi().move(n),o={x:t.deltaX,y:t.deltaY}},dragend(){e.dragging&&(e.dragging=!1)},dragcancel(){e.dragging=!1}}}}};var Bn={callNavBtnGesture:function(e,t){return{type:"Tap",options:{event:"navBtnTap",enable(r,n){return!(!n||!e())&&Fn.isOnComponentForNavBtn(n,t,this)}},events:{navBtnTap(e){this.chart.componentsFromPoint(e.center).forEach((t=>{const r=e.target,n=r?r.getAttribute("data-action"):"";if(n)return t.emit(n)}))}}}}};var Wn={create:function(e,t,r,n,i){const o={};t=t||"vertical";const a=n.lassoBrushKey||"select",s=n.dimRangeBrushKey||null,l=n.measureRangeBrushKey||null,u=n.areaBrushKey||null,c=n.legendBrushKey||null,p=!!e.selectionHandler&&e.selectionHandler.isOn(),d={dragging:!1,lassoing:!1,majoring:!1,minoring:!1,measureSelecting:!1},f={gesture:"",type:""},m="horizontal"===t,h=m?"y-axis":"x-axis",g=m?"x-axis":"y-axis";function y(e,t,r){if(f.gesture===e)return;let n=a;const i=t||f.chart;switch(f.gesture){case"majorrange":b(i,"rangeDim","rangeClear",r),n=s;break;case"measurerange":b(i,"rangeMeasure","rangeClear",r),n=l;break;case"arearange":b(i,"rangeMinor","areaClear",r),n=u}f.gesture=e;const o="range"===e?"range":"item";f.type&&f.type!==o&&i.brush(n).clear(),f.chart=t,f.type=o}function b(e,t,r,n){if(e){const i=e.component(t);i&&i.emit(r,n)}}let v=[];const x={isSelectionEnabled:()=>e.selectionHandler&&e.selectionHandler.isOn(),isNavigationEnabled:()=>e.scrollHandler&&e.scrollHandler.isOn(),doEmit:b,switchTo:y,getBrushConfig:function(){return s?l?"majorrange measurerange":"majorrange arearange":"measurerange arearange"}},q={handlers:e,keys:n,isHorizontal:m,active:f,rangeSelStatus:i};function D(){y("none"),d.majoring=!1,d.measureSelecting=!1,d.minoring=!1}return p&&(v=[{type:"Tap",options:{event:"rangeClearTap"},events:{rangeClearTap(e){y("none",this.chart,e),d.majoring=!1,d.measureSelecting=!1,d.minoring=!1}}}],v.unshift(Bn.callNavBtnGesture(x.isNavigationEnabled,c)),v.push(_n.callLassoGesture(d,x,q)),s?l?(v.push(zn.callDimensionRangeGesture(d,x,q,h)),e.selectionHandler.addComponent(s,{id:"rangeDim",clear:"rangeClear"}),v.push(Hn.callMeasureRangeGesture(d,x,q,g)),e.selectionHandler.addComponent(l,{id:"rangeMeasure",clear:"rangeClear"})):(v.push(zn.callDimensionRangeGesture(d,x,q,h)),e.selectionHandler.addComponent(s,{id:"rangeDim",clear:"rangeClear"}),v.push(jn.callAreaRangeGesture(d,x,q,g)),e.selectionHandler.addComponent(u,{id:"rangeMinor",clear:"areaClear"})):(v.push(Hn.callMeasureRangeGesture(d,x,q,g)),e.selectionHandler.addComponent(l,{id:"rangeMeasure",clear:"rangeClear"}),v.push(jn.callAreaRangeGesture(d,x,q,h)),e.selectionHandler.addComponent(u,{id:"rangeMinor",clear:"areaClear"}))),e.scrollHandler&&(v.push($n.callDragGesture(d,x,q,p,r)),e.scrollHandler.getScrollApi().on("update",D)),o.gestures=v,o.destroy=function(){e.scrollHandler&&e.scrollHandler.getScrollApi().removeListener("update",D)},o}};function Un(e,t,r,n,i){let o=!1;n=n||"tooltip",r=r||["self"];const a=e.brush(n),s={};function l(){if(o){e.component(i).emit("hide")}o=!1}return s.isOpen=function(){return o},s.closeTooltip=l,s.update=function(){const s=a.brushes(),u=e.getAffectedShapes(n,"and",r,t);s.length>=1?(o=!0,function(t){o=!0;const r={nodes:t};e.component(i).emit("show",{},r)}(u)):l()},s.toggleInterceptor=function(e){if(r.length>1){const t={},r=[];return e.forEach((e=>{t[e.key]||(t[e.key]={}),t[e.key][e.value]||(t[e.key][e.value]=!0,r.push(e))})),r}return e},s}var Kn={create:(...e)=>Un(...e)},Gn={formatMeasureValue:function(e,t){if(e.raw().isCustomFormatted)return e.formatter()(t.value.qText);const r=void 0!==t.value.qNum?t.value.qNum:t.value.qValue;return e.formatter()(r)}};const Yn=e=>({h:t,data:r,style:n})=>{const i=function(e,t){const r=e.chartInstance.dataset(e.dataPath),n=[],i=t.length-5,o=Math.min(5,t.length);for(let i=0;i<o;i++){const o=t[i],a={rows:[]};if(e.labelData){const t=[],i=e.labelData;let s=!1;for(let e=0;e<i.length;e++){const r=o.data[i[e]].value;if(-2===r.qElemNo||-2===r.qElemNumber){s=!0;break}t.push(o.data[i[e]].value.qText)}if(s)return;a.header=e.headerResolver(t),a.rows=e.measureRows.map((t=>{const n=o.data;return e.rowResolver(r.field(n[t].source.field),n[t],n)})).filter((e=>!!e));const l=Xn(e,o);l&&a.rows.unshift(l),n.push(a)}}i>0&&(n.numberInExcess=i);return n.rowCount=n[0]?n.length*n[0].rows.length:0,n}(e,r),o={h:t,style:n,rtl:"rtl"===e.direction,translator:e.translator};return e.renderer(o,i)};function Xn(e,t){var r,n,i;const o=t.data.color,a=null===(r=e.colorService)||void 0===r||null===(n=r.getSettings)||void 0===n?void 0:n.call(r);if(!a||"color"===a.type||!o||!a.fieldType)return;const s=[];e.data.forEach((e=>{const r=t.data[e];r&&s.push(r.value)}));const l=function(e){let t=-1;for(let r=0;r<e.length;r++)-3===e[r]&&(t=r);return t}(s),{translator:u}=e,c=a.label;return{color:null===(i=t.attrs)||void 0===i?void 0:i.fill,label:c,value:-1!==l?u.get("properties.dimensionLimits.others"):o.label}}const Jn="dist-flow-tooltip",Qn=`#${Jn}`;function Zn(){if(!document.querySelector(Qn)){const e=document.createElement("div");e.id=Jn,e.style.overflow="hidden",e.style.position="fixed",e.style.pointerEvents="none",e.style.left="0px",e.style.top="0px",e.style.width="100%",e.style.height="100%",e.style.zIndex=1020,document.body.appendChild(e)}}function ei({key:e="tooltip",rtl:t,fontFamily:r,filter:n,content:i}){return{show:!0,key:e,type:"tooltip",layout:{displayOrder:3},beforeMount(){Zn()},beforeUpdate(){Zn()},destroyed(){!function(){const e=document.querySelector(Qn);e&&e.parentElement&&e.childElementCount<1&&e.parentElement.removeChild(e)}()},settings:{appendTo:()=>document.querySelector(Qn),content:i,filter:n,extract:e=>e.node,direction:t?"rtl":"ltr",placement:"bounds"},style:{arrow:{color:"#404040"},content:{display:"table","border-spacing":"4px",background:"rgba(64, 64, 64, 0.9)",opacity:"1",fontSize:"13px",fontFamily:r,"empty-cells":"show"},cell:{"max-width":"180px","word-break":"break-word","word-wrap":"break-word","overflow-wrap":"break-word",hyphens:"auto"}}}}const{detectTextDirection:ti}=Xr;const ri={tooltipKey:"tooltip",data:[""],contexts:["tooltip"],headerResolver:e=>e.join(", "),rowResolver:(e,t)=>({value:Gn.formatMeasureValue(e,t),label:e.title()}),direction:"ltr",renderer:function(e,t){const{h:r,style:n,translator:i,rtl:o}=e,a=[],s=o?"right":"left";if(t.forEach((e=>{if(e.header){const t={...n.cell,textAlign:s,fontWeight:"bold",direction:ti(e.header)};a.push(r("tr",null,r("td",{style:t,colSpan:2},e.header)))}e.rows.forEach((e=>{let t=e.value;if(e.color){const n={display:"inline-block",width:10,height:10,"background-color":e.color,margin:"0 8px"},i=r("div",{style:n});t=o?[e.value,i]:[i,e.value]}const i=o?[":",e.label]:[e.label,":"],l={...n.cell,textAlign:s,direction:ti(e.label)},u={...n.cell,textAlign:o?"left":"right",direction:ti(e.value)};a.push(r("tr",null,r("td",{style:l},i),r("td",{style:u},t)))}))})),t.numberInExcess){const e=i.get("Object.ChartTooltip.NMore",t.numberInExcess),o={...n.cell,textAlign:s,direction:ti(e)};a.push(r("tr",null,r("td",{style:o,colSpan:2},e)))}return a}};function ni(e,t,r){if(!e)throw Error("Tooltips-handler: Missing input");let n={},i=!1;const o={};function a(e){e.listeners.update=function(t,r){e.action.update(t,r,e)},e.listeners.end=function(){e.action.closeTooltip()},e.brush.on(e.treatAsDesktop?"update":"set-values",e.listeners.update),e.brush.on("end",e.listeners.end),e.brush.intercept("set-values",e.action.toggleInterceptor)}function s(){Object.keys(n).forEach((e=>{l(n[e])}))}function l(e){e.brush.removeListener(e.treatAsDesktop?"update":"set-values",e.listeners.update),e.brush.removeListener("end",e.listeners.end),e.brush.removeInterceptor("set-values",e.action.toggleInterceptor)}function u(){Object.keys(n).forEach((e=>{n[e].action.closeTooltip()}))}function c(){u();for(const e in n)n[e].brush.clear()}return o.setUp=function(t){const o=q(!0,{},ri,t);if(!o.componentKey)throw Error("Tooltips-handler.setUp: Missing required input");n[o.contexts[0]]&&i&&l(n[o.contexts[0]]);const s=function(e,t){return{brush:t.brush(e.contexts[0]),action:Kn.create(t,e.componentKey,e.data,e.contexts[0],e.tooltipKey),listeners:{},chartInstance:t,dataPath:e.dataPath,renderer:e.renderer,data:e.data,headerResolver:e.headerResolver,rowResolver:e.rowResolver,colorService:e.colorService,attrDimPath:e.attrDimPath,measureRows:e.measureRows,labelData:e.labelData,filterShapes:e.filterShapes,direction:e.environment.options.direction,theme:e.environment.theme,translator:e.environment.translator,treatAsDesktop:"touch"!==e.environment.deviceType}}(o,e);n[o.contexts[0]]=s,i&&a(s);const u=ei({key:o.tooltipKey,rtl:"rtl"===s.direction,fontFamily:s.theme.getStyle(r,"tooltip","fontFamily"),filter:(c=s.filterShapes,e=>c?c(e):function(e){const t=[];return e.forEach((e=>{-1===t.indexOf(e)&&"container"!==e.type&&t.push(e)})),t}(e)),content:Yn(s,o.dataPath)});var c;return o.chartBuilder.getSettings().components.push(u),{trigger:{on:s.treatAsDesktop?"over":"tap",action:"set",contexts:o.contexts,data:o.data,globalPropagation:"stop"},consume:o.contexts.map((e=>({context:e}))),component:u}},o.tearDown=function(){i&&s(),n=[]},o.closeTooltip=u,o.isOn=()=>i,o.on=function(){i||(i=!0,Object.keys(n).forEach((e=>{a(n[e])})),t&&t.on("mouseleave",c))},o.off=function(){i&&(i=!1,s(),t&&t.off("mouseleave",c),u())},o}var ii={create:(e,t,r)=>ni(e,t,r)};const oi=166/26,ai=12/11;function si(e){return(12*Math.min(e,3)+Math.max(e-3,0)*oi)/11}function li(e){if(!e)return{latin:0,cjk:0};let t=e.match(/[\u4E00-\u9FFF]/g),r=e.match(/[\u3040-\u309F]/g),n=e.match(/[\u30A0-\u30FF]/g);t=t?t.length:0,r=r?r.length:0,n=n?n.length:0;const i=t+r+n;return{latin:e.length-i,cjk:i}}function ui(e,t){const r={latin:0,cjk:0};void 0===t?e.forEach((e=>{const t=li(e.qText);r.latin+=t.latin,r.cjk+=t.cjk})):e.forEach((e=>{const n=li(e[t].qText);r.latin+=n.latin,r.cjk+=n.cjk}));const n=Math.max(1,r.latin+r.cjk);return r.latinRatio=r.latin/n,r.cjkRatio=r.cjk/n,r}function ci(e,t,r){return e*(e<=24?t:r)}var pi={endsWith:function(e,t){return-1!==e.indexOf(t,e.length-t.length)},startsWith:function(e,t){return 0===e.indexOf(t)},contains:function(e,t){if(!e)throw new Error("Haystack is undefined.");if(!t)throw new Error("Needle is undefined.");return-1!==e.indexOf(t)},stringWidthOverMWidth:si,getCharacterRatios:li,getTotalCharacterRatios:ui,getAdjustedMaxGlyphCount:function(e,t,r){const n=ui(t,r),i=n.latinRatio*e,o=n.cjkRatio*e;return Math.ceil(si(i)+o*ai)},estimateLatinLabelWidth:ci,estimateLabelWidth:function(e,t,r,n,i){return e*r+ci(t,n,i)}};var di={generateHyperCube:function(e,t){const r=e.qHyperCube.qMeasureInfo,n=e.qHyperCube.qDataPages[0].qMatrix,i=r.length;if(!i)return;const o=vt.getColorForPositiveValue(e,t),a=vt.getColorForNegativeValue(e,t),s=vt.getColorForSubtotal(e,t),l=e=>`${e}`,u=[];let c,p,d=0,f=0,m=-Number.MAX_VALUE,h=Number.MAX_VALUE,g=-Number.MAX_VALUE,y=Number.MAX_VALUE,b=0;for(let e=0;e<i;e++)p=Number.isNaN(+n[0][e].qNum)?0:n[0][e].qNum,r[e].valueType!==vt.valueTypes.SUBTOTAL?(d=f,f+=p*(r[e].valueType===vt.valueTypes.INVERSE?-1:1),c=d<f?o:a,u.push([{qText:r[e].qFallbackTitle,qElemNumber:b++},{qText:c},{qNum:d},{qNum:f},{qNum:f-d,qText:n[0][e].qText}]),r[e].subtotal&&r[e].subtotal.enable&&u.push([{qText:r[e].subtotal.label||"",qElemNumber:b++},{qText:s},{qNum:0},{qNum:f},{qNum:f,qText:l(f)}])):(d=0,f=p,u.push([{qText:r[e].qFallbackTitle,qElemNumber:b++},{qText:s},{qNum:d},{qNum:f},{qNum:f-d,qText:n[0][e].qText}])),m=Math.max(m,d),h=Math.min(h,d),g=Math.max(g,f),y=Math.min(y,f);const v=function(e){return e.qHyperCube.qMeasureInfo[0].qNumFormat}(e),x=e.qHyperCube.qMeasureInfo[0].qIsAutoFormat,q=e.qDef.isCustomFormatted,D={qHyperCube:{qMode:"S",qDataPages:[{qArea:{qTop:0,qLeft:0,qWidth:5,qHeight:u.length},qMatrix:u}],qDimensionInfo:[{qStateCounts:{}},{qStateCounts:{}}],qMeasureInfo:[{qMin:h,qMax:m,qNumFormat:v,qIsAutoFormat:x,isCustomFormatted:q},{qMin:y,qMax:g,qNumFormat:v,qIsAutoFormat:x,isCustomFormatted:q},{qMin:y,qMax:g,qNumFormat:v,qIsAutoFormat:x,isCustomFormatted:q}]}};e.generatedMatrix=u,e.generated=D},generateSlicedHyperCube:function(e,t,r){e.generated.qHyperCube.qDataPages=[{qArea:{qTop:t,qLeft:0,qWidth:5,qHeight:r},qMatrix:e.generatedMatrix.slice(t,t+r)}]},getGeneratedDimensionPath:function(e){return`qDimensionInfo/${e}`},getGeneratedMeasurePath:function(e){return`qMeasureInfo/${e}`}};function fi(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function mi(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function hi(e){let t,r,n;function i(e,n,i=0,o=e.length){if(i<o){if(0!==t(n,n))return o;do{const t=i+o>>>1;r(e[t],n)<0?i=t+1:o=t}while(i<o)}return i}return 2!==e.length?(t=fi,r=(t,r)=>fi(e(t),r),n=(t,r)=>e(t)-r):(t=e===fi||e===mi?e:gi,r=e,n=e),{left:i,center:function(e,t,r=0,o=e.length){const a=i(e,t,r,o-1);return a>r&&n(e[a-1],t)>-n(e[a],t)?a-1:a},right:function(e,n,i=0,o=e.length){if(i<o){if(0!==t(n,n))return o;do{const t=i+o>>>1;r(e[t],n)<=0?i=t+1:o=t}while(i<o)}return i}}}function gi(){return 0}const yi=hi(fi).right;hi((function(e){return null===e?NaN:+e})).center;const bi=Math.sqrt(50),vi=Math.sqrt(10),xi=Math.sqrt(2);function qi(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),o=n/Math.pow(10,i),a=o>=bi?10:o>=vi?5:o>=xi?2:1;let s,l,u;return i<0?(u=Math.pow(10,-i)/a,s=Math.round(e*u),l=Math.round(t*u),s/u<e&&++s,l/u>t&&--l,u=-u):(u=Math.pow(10,i)*a,s=Math.round(e/u),l=Math.round(t/u),s*u<e&&++s,l*u>t&&--l),l<s&&.5<=r&&r<2?qi(e,t,2*r):[s,l,u]}function Di(e,t,r){return qi(e=+e,t=+t,r=+r)[2]}function Si(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function wi(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Mi(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Ai(){}var Ei=.7,ki=1/Ei,Ci="\\s*([+-]?\\d+)\\s*",Ni="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ii="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Li=/^#([0-9a-f]{3,8})$/,Ti=new RegExp(`^rgb\\(${Ci},${Ci},${Ci}\\)$`),Oi=new RegExp(`^rgb\\(${Ii},${Ii},${Ii}\\)$`),Ri=new RegExp(`^rgba\\(${Ci},${Ci},${Ci},${Ni}\\)$`),Pi=new RegExp(`^rgba\\(${Ii},${Ii},${Ii},${Ni}\\)$`),Fi=new RegExp(`^hsl\\(${Ni},${Ii},${Ii}\\)$`),_i=new RegExp(`^hsla\\(${Ni},${Ii},${Ii},${Ni}\\)$`),Hi={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 Vi(){return this.rgb().formatHex()}function ji(){return this.rgb().formatRgb()}function zi(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Li.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?$i(t):3===r?new Ui(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?Bi(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?Bi(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=Ti.exec(e))?new Ui(t[1],t[2],t[3],1):(t=Oi.exec(e))?new Ui(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Ri.exec(e))?Bi(t[1],t[2],t[3],t[4]):(t=Pi.exec(e))?Bi(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Fi.exec(e))?Qi(t[1],t[2]/100,t[3]/100,1):(t=_i.exec(e))?Qi(t[1],t[2]/100,t[3]/100,t[4]):Hi.hasOwnProperty(e)?$i(Hi[e]):"transparent"===e?new Ui(NaN,NaN,NaN,0):null}function $i(e){return new Ui(e>>16&255,e>>8&255,255&e,1)}function Bi(e,t,r,n){return n<=0&&(e=t=r=NaN),new Ui(e,t,r,n)}function Wi(e,t,r,n){return 1===arguments.length?((i=e)instanceof Ai||(i=zi(i)),i?new Ui((i=i.rgb()).r,i.g,i.b,i.opacity):new Ui):new Ui(e,t,r,null==n?1:n);var i}function Ui(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function Ki(){return`#${Ji(this.r)}${Ji(this.g)}${Ji(this.b)}`}function Gi(){const e=Yi(this.opacity);return`${1===e?"rgb(":"rgba("}${Xi(this.r)}, ${Xi(this.g)}, ${Xi(this.b)}${1===e?")":`, ${e})`}`}function Yi(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Xi(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ji(e){return((e=Xi(e))<16?"0":"")+e.toString(16)}function Qi(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new eo(e,t,r,n)}function Zi(e){if(e instanceof eo)return new eo(e.h,e.s,e.l,e.opacity);if(e instanceof Ai||(e=zi(e)),!e)return new eo;if(e instanceof eo)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(r-n)/s+6*(r<n):r===o?(n-t)/s+2:(t-r)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new eo(a,s,l,e.opacity)}function eo(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function to(e){return(e=(e||0)%360)<0?e+360:e}function ro(e){return Math.max(0,Math.min(1,e||0))}function no(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}wi(Ai,zi,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Vi,formatHex:Vi,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Zi(this).formatHsl()},formatRgb:ji,toString:ji}),wi(Ui,Wi,Mi(Ai,{brighter(e){return e=null==e?ki:Math.pow(ki,e),new Ui(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Ei:Math.pow(Ei,e),new Ui(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ui(Xi(this.r),Xi(this.g),Xi(this.b),Yi(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:Ki,formatHex:Ki,formatHex8:function(){return`#${Ji(this.r)}${Ji(this.g)}${Ji(this.b)}${Ji(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Gi,toString:Gi})),wi(eo,(function(e,t,r,n){return 1===arguments.length?Zi(e):new eo(e,t,r,null==n?1:n)}),Mi(Ai,{brighter(e){return e=null==e?ki:Math.pow(ki,e),new eo(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Ei:Math.pow(Ei,e),new eo(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Ui(no(e>=240?e-240:e+120,i,n),no(e,i,n),no(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new eo(to(this.h),ro(this.s),ro(this.l),Yi(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=Yi(this.opacity);return`${1===e?"hsl(":"hsla("}${to(this.h)}, ${100*ro(this.s)}%, ${100*ro(this.l)}%${1===e?")":`, ${e})`}`}}));var io=e=>()=>e;function oo(e){return 1==(e=+e)?ao: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):io(isNaN(t)?r:t)}}function ao(e,t){var r=t-e;return r?function(e,t){return function(r){return e+r*t}}(e,r):io(isNaN(e)?t:e)}var so=function e(t){var r=oo(t);function n(e,t){var n=r((e=Wi(e)).r,(t=Wi(t)).r),i=r(e.g,t.g),o=r(e.b,t.b),a=ao(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return n.gamma=e,n}(1);function lo(e,t){t||(t=[]);var r,n=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(r=0;r<n;++r)i[r]=e[r]*(1-o)+t[r]*o;return i}}function uo(e,t){var r,n=t?t.length:0,i=e?Math.min(n,e.length):0,o=new Array(i),a=new Array(n);for(r=0;r<i;++r)o[r]=yo(e[r],t[r]);for(;r<n;++r)a[r]=t[r];return function(e){for(r=0;r<i;++r)a[r]=o[r](e);return a}}function co(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function po(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function fo(e,t){var r,n={},i={};for(r in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)r in e?n[r]=yo(e[r],t[r]):i[r]=t[r];return function(e){for(r in n)i[r]=n[r](e);return i}}var mo=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ho=new RegExp(mo.source,"g");function go(e,t){var r,n,i,o=mo.lastIndex=ho.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(r=mo.exec(e))&&(n=ho.exec(t));)(i=n.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(r=r[0])===(n=n[0])?s[a]?s[a]+=n:s[++a]=n:(s[++a]=null,l.push({i:a,x:po(r,n)})),o=ho.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var r,n=0;n<t;++n)s[(r=l[n]).i]=r.x(e);return s.join("")})}function yo(e,t){var r,n,i=typeof t;return null==t||"boolean"===i?io(t):("number"===i?po:"string"===i?(r=zi(t))?(t=r,so):go:t instanceof zi?so:t instanceof Date?co:(n=t,!ArrayBuffer.isView(n)||n instanceof DataView?Array.isArray(t)?uo:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?fo:po:lo))(e,t)}function bo(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function vo(e){return+e}var xo=[0,1];function qo(e){return e}function Do(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:(r=isNaN(t)?NaN:.5,function(){return r});var r}function So(e,t,r){var n=e[0],i=e[1],o=t[0],a=t[1];return i<n?(n=Do(i,n),o=r(a,o)):(n=Do(n,i),o=r(o,a)),function(e){return o(n(e))}}function wo(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),o=new Array(n),a=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<n;)i[a]=Do(e[a],e[a+1]),o[a]=r(t[a],t[a+1]);return function(t){var r=yi(e,t,1,n)-1;return o[r](i[r](t))}}function Mo(){var e,t,r,n,i,o,a=xo,s=xo,l=yo,u=qo;function c(){var e,t,r,l=Math.min(a.length,s.length);return u!==qo&&(e=a[0],t=a[l-1],e>t&&(r=e,e=t,t=r),u=function(r){return Math.max(e,Math.min(t,r))}),n=l>2?wo:So,i=o=null,p}function p(t){return null==t||isNaN(t=+t)?r:(i||(i=n(a.map(e),s,l)))(e(u(t)))}return p.invert=function(r){return u(t((o||(o=n(s,a.map(e),po)))(r)))},p.domain=function(e){return arguments.length?(a=Array.from(e,vo),c()):a.slice()},p.range=function(e){return arguments.length?(s=Array.from(e),c()):s.slice()},p.rangeRound=function(e){return s=Array.from(e),l=bo,c()},p.clamp=function(e){return arguments.length?(u=!!e||qo,c()):u!==qo},p.interpolate=function(e){return arguments.length?(l=e,c()):l},p.unknown=function(e){return arguments.length?(r=e,p):r},function(r,n){return e=r,t=n,c()}}function Ao(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function Eo(e){return(e=Ao(Math.abs(e)))?e[1]:NaN}var ko,Co=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function No(e){if(!(t=Co.exec(e)))throw new Error("invalid format: "+e);var t;return new Io({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Io(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function Lo(e,t){var r=Ao(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}No.prototype=Io.prototype,Io.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var To={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Lo(100*e,t),r:Lo,s:function(e,t){var r=Ao(e,t);if(!r)return e+"";var n=r[0],i=r[1],o=i-(ko=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=n.length;return o===a?n:o>a?n+new Array(o-a+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+Ao(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Oo(e){return e}var Ro,Po,Fo,_o=Array.prototype.map,Ho=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Vo(e){var t,r,n=void 0===e.grouping||void 0===e.thousands?Oo:(t=_o.call(e.grouping,Number),r=e.thousands+"",function(e,n){for(var i=e.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>n));)s=t[a=(a+1)%t.length];return o.reverse().join(r)}),i=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",a=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?Oo:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(_o.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",u=void 0===e.minus?"−":e.minus+"",c=void 0===e.nan?"NaN":e.nan+"";function p(e){var t=(e=No(e)).fill,r=e.align,p=e.sign,d=e.symbol,f=e.zero,m=e.width,h=e.comma,g=e.precision,y=e.trim,b=e.type;"n"===b?(h=!0,b="g"):To[b]||(void 0===g&&(g=12),y=!0,b="g"),(f||"0"===t&&"="===r)&&(f=!0,t="0",r="=");var v="$"===d?i:"#"===d&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",x="$"===d?o:/[%p]/.test(b)?l:"",q=To[b],D=/[defgprs%]/.test(b);function S(e){var i,o,l,d=v,S=x;if("c"===b)S=q(e)+S,e="";else{var w=(e=+e)<0||1/e<0;if(e=isNaN(e)?c:q(Math.abs(e),g),y&&(e=function(e){e:for(var t,r=e.length,n=1,i=-1;n<r;++n)switch(e[n]){case".":i=t=n;break;case"0":0===i&&(i=n),t=n;break;default:if(!+e[n])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),w&&0==+e&&"+"!==p&&(w=!1),d=(w?"("===p?p:u:"-"===p||"("===p?"":p)+d,S=("s"===b?Ho[8+ko/3]:"")+S+(w&&"("===p?")":""),D)for(i=-1,o=e.length;++i<o;)if(48>(l=e.charCodeAt(i))||l>57){S=(46===l?a+e.slice(i+1):e.slice(i))+S,e=e.slice(0,i);break}}h&&!f&&(e=n(e,1/0));var M=d.length+e.length+S.length,A=M<m?new Array(m-M+1).join(t):"";switch(h&&f&&(e=n(A+e,A.length?m-S.length:1/0),A=""),r){case"<":e=d+e+S+A;break;case"=":e=d+A+e+S;break;case"^":e=A.slice(0,M=A.length>>1)+d+e+S+A.slice(M);break;default:e=A+d+e+S}return s(e)}return g=void 0===g?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),S.toString=function(){return e+""},S}return{format:p,formatPrefix:function(e,t){var r=p(((e=No(e)).type="f",e)),n=3*Math.max(-8,Math.min(8,Math.floor(Eo(t)/3))),i=Math.pow(10,-n),o=Ho[8+n/3];return function(e){return r(i*e)+o}}}}function jo(e,t,r,n){var i,o=function(e,t,r){r=+r;const n=(t=+t)<(e=+e),i=n?Di(t,e,r):Di(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}(e,t,r);switch((n=No(null==n?",f":n)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=n.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Eo(t)/3)))-Eo(Math.abs(e)))}(o,a))||(n.precision=i),Fo(n,a);case"":case"e":case"g":case"p":case"r":null!=n.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Eo(t)-Eo(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(n.precision=i-("e"===n.type));break;case"f":case"%":null!=n.precision||isNaN(i=function(e){return Math.max(0,-Eo(Math.abs(e)))}(o))||(n.precision=i-2*("%"===n.type))}return Po(n)}function zo(e){var t=e.domain;return e.ticks=function(e){var r=t();return function(e,t,r){if(!((r=+r)>0))return[];if((e=+e)==(t=+t))return[e];const n=t<e,[i,o,a]=n?qi(t,e,r):qi(e,t,r);if(!(o>=i))return[];const s=o-i+1,l=new Array(s);if(n)if(a<0)for(let e=0;e<s;++e)l[e]=(o-e)/-a;else for(let e=0;e<s;++e)l[e]=(o-e)*a;else if(a<0)for(let e=0;e<s;++e)l[e]=(i+e)/-a;else for(let e=0;e<s;++e)l[e]=(i+e)*a;return l}(r[0],r[r.length-1],null==e?10:e)},e.tickFormat=function(e,r){var n=t();return jo(n[0],n[n.length-1],null==e?10:e,r)},e.nice=function(r){null==r&&(r=10);var n,i,o=t(),a=0,s=o.length-1,l=o[a],u=o[s],c=10;for(u<l&&(i=l,l=u,u=i,i=a,a=s,s=i);c-- >0;){if((i=Di(l,u,r))===n)return o[a]=l,o[s]=u,t(o);if(i>0)l=Math.floor(l/i)*i,u=Math.ceil(u/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,u=Math.floor(u*i)/i}n=i}return e},e}function $o(){var e=Mo()(qo,qo);return e.copy=function(){return t=e,$o().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},Si.apply(e,arguments),zo(e)}Ro=Vo({thousands:",",grouping:[3],currency:["$",""]}),Po=Ro.format,Fo=Ro.formatPrefix;const Bo={getMinorTicks({majorTicks:e,minorTickCount:t}){const r=[];for(let n=0;n<e.length-1;n++){const i=e[n],o=(e[n+1]-i)/(t+1);for(let e=1;e<=t;e++)r.push(i+o*e)}return r},adjustTicks({ticks:e,majorTicks:t,minorTicks:r,autoMinMax:n,minMax:i,min:o,max:a}){const s=r[0]-t[0],l=t[0]-o;l>s&&e.unshift({value:t[0]-s,isMinor:!0});const u=a-t[t.length-1];return u>s&&e.push({value:t[t.length-1]+s,isMinor:!0}),n||(("min"===i||"minMax"===i)&&l>0&&e.unshift({value:o,isMinor:!1}),("max"===i||"minMax"===i)&&u>0&&e.push({value:a,isMinor:!1})),e},getTicks({layout:e,height:t}){const{autoMinMax:r,minMax:n,spacing:i}=e.measureAxis;let o=Math.min(...e.generated.qHyperCube.qMeasureInfo.map((e=>e.qMin))),a=Math.max(...e.generated.qHyperCube.qMeasureInfo.map((e=>e.qMax)));if(!r)switch(n){case"min":o=e.measureAxis.min;break;case"max":a=e.measureAxis.max;break;case"minMax":({min:o,max:a}=e.measureAxis)}const s=100*i,l=Math.max(1,Math.round(t/s)),u=$o().domain([o,a]).ticks(l),c=Bo.getMinorTicks({majorTicks:u,minorTickCount:1}),p=[...u.map((e=>({value:e,isMinor:!1}))),...c.map((e=>({value:e,isMinor:!0})))].sort(((e,t)=>e.value-t.value));return Bo.adjustTicks({ticks:p,majorTicks:u,minorTicks:c,autoMinMax:r,minMax:n,min:o,max:a})}},Wo=vt.chartID;function Uo(e){this._scrollHandler.setDisabled(!!e)}function Ko(e){let t=-Number.MAX_VALUE;return e.qHyperCube.qMeasureInfo.forEach((e=>{t=Math.max(t,e.qFallbackTitle.length),e.valueType!==vt.valueTypes.SUBTOTAL&&e.subtotal&&e.subtotal.enable&&(t=Math.max(t,e.subtotal.label?e.subtotal.label.length:0))})),Math.min(20,Math.max(0,t))}function Go(e){return{settings:{labels:{mode:e.dimensionAxis.label,maxGlyphCount:Math.ceil(pi.stringWidthOverMWidth(Ko(e))),maxLengthPx:this.picassoElement.getBoundingClientRect().height/4}}}}function Yo(e){const t=e.data.measure,r=e.dataset(t.source.key).field(t.source.field);return Gn.formatMeasureValue(r,t)}function Xo(e,t){const r=e.getStyles(),n=((e,t,r)=>{var n,i,o,a;const s=null===(n=ht("value",r))||void 0===n?void 0:n.label,l=(null==s||null===(i=s.value)||void 0===i?void 0:i.fontFamily)||t.label.value.fontFamily;let u=(null==s||null===(o=s.value)||void 0===o?void 0:o.fontSize)||t.label.value.fontSize;return u=parseFloat(u),{fontFamily:l,fontSize:u,fill:null==s||null===(a=s.value)||void 0===a||null===(a=a.fontColor)||void 0===a?void 0:a.color}})(0,r,t),i=(null==n?void 0:n.fill)||r.label.value.color,o=r.label.value.darkColor,a=r.label.value.lightColor;return{settings:{sources:[{strategy:{settings:{...n,direction:e=>e.data&&e.data.end.value>e.data.start.value?"up":"down",labels:[{placements:[{fill:i},{fill:null!=n&&n.fill?i:e=>In.isDark(e.node.attrs.fill)?a:o},{position:"opposite",fill:i,justify:0}],label:Yo}]}}}]}}}function Jo(e,t){return{viewSize:t,max:e.generatedMatrix.length}}function Qo(e,t,r){const{theme:n,translator:i}=e,o=vt.getColorForPositiveValue(t,n),a=vt.getColorForNegativeValue(t,n),s=vt.getColorForSubtotal(t,n),l=i.get("waterfall.legend.positiveValue.label"),u=i.get("waterfall.legend.negativeValue.label"),c=i.get("waterfall.legend.subtotal.label"),p=((e,t,r,n)=>{var i,o,a,s;const l=n.isEnabled("CLIENT_IM_3051")?null===(i=ht("legend",r))||void 0===i?void 0:i.legend:{};return{fontFamily:(null==l||null===(o=l.label)||void 0===o?void 0:o.fontFamily)||t.getStyle(e,"legend.label","fontFamily"),fontSize:(null==l||null===(a=l.label)||void 0===a?void 0:a.fontSize)||t.getStyle(e,"legend.label","fontSize"),color:(null==l||null===(s=l.label)||void 0===s||null===(s=s.fontColor)||void 0===s?void 0:s.color)||t.getStyle(e,"legend.label","color")}})(Wo,n,t,r);return{displayOrder:200,minimumLayoutMode:"MEDIUM",prioOrder:0,scale:{type:"categorical-color",data:[l,u,c],range:[o,a,s]},style:{item:{label:{fontSize:p.fontSize,fontFamily:p.fontFamily,fill:p.color}},title:{show:!1}}}}const Zo=qn.extend("WaterfallChart",{namespace:".waterfallchart",chartID:Wo,init:function({picasso:e,environment:t,$element:r,flags:n}){this._super(e,r,t,null,null),this._tooltipHandler=ii.create(this.chartInstance,r,Wo),this._scrollHandler=new Tn(this.chartInstance,r,this.getSlicedData.bind(this),this.updateChart.bind(this)),this._scrollHandler.setOptions({direction:"horizontal"}),this.setDataPaths(["generated/qHyperCube"]),this.flags=n},updateConstraints:function(e){const t=!e.active,r=!e.passive;this._scrollHandler[t?"on":"off"](),this._tooltipHandler[r?"on":"off"]()},off:function(){this._scrollHandler.off(),this._tooltipHandler.off()},createChartSettings:function(e){const t=this.isRtl(),{theme:r}=this.environment,n=!!e.snapshotData,i=mn.create({chartID:Wo,theme:r,isRtl:t,flags:this.flags}),o=this.picassoElement.clientWidth,a=this.picassoElement.clientHeight,s={};s.box=this._tooltipHandler.setUp({chartBuilder:i,environment:this.environment,data:[""],contexts:["boxTip"],componentKey:"box-marker",headerResolver(){},rowResolver(e,t,r){const n=r.boxColor.value;return{value:Gn.formatMeasureValue(e,t),label:r.tooltip.value.qText,color:n}},labelData:["tooltip"],measureRows:["measure"]});const l={scrollHandler:this._scrollHandler,selectionHandler:null};this._dependentActions&&this._dependentActions.destroy(),this._dependentActions=Wn.create(l,"vertical",t,{componentKey:"box-marker"}),i.addPreset("dimension-measure-chart",{isRtl:t,orientation:"vertical",theme:r,gridlines:e.gridlines,includeDimensionAxis:!0,dimensionAxisProperties:e.dimensionAxis,dimensionAxisSettings:Go.call(this,e),dimensionSource:di.getGeneratedDimensionPath(0),dimensionScaleSettings:{component:{maxPxStep:()=>a/4}},includeMeasureAxis:!0,measureAxisProperties:e.measureAxis,measureSource:[di.getGeneratedMeasurePath(0),di.getGeneratedMeasurePath(1)],measureScaleSettings:{component:{expand:0,include:[0],ticks:{values:()=>Bo.getTicks({layout:e,height:a})}}},hasNavigation:!n,isNavigationEnabledFn:()=>this._scrollHandler.isOn(),scrollSettings:Jo(e,this._scrollHandler.getScrollViewSizeInItem()),refLines:e.refLine&&e.refLine.refLines,brushActions:this._dependentActions.gestures,axisLabelStyle:gt(Wo,r,e)}),i.addComponent("box-marker",function(e,t){const r=e?[e.box.trigger]:[],n=e?e.box.consume:[];return{data:{extract:{key:"qHyperCube",field:di.getGeneratedDimensionPath(0),props:{start:{field:di.getGeneratedMeasurePath(0)},end:{field:di.getGeneratedMeasurePath(1)},measure:{field:di.getGeneratedMeasurePath(2),reduce:"first",value:e=>e},boxColor:{field:di.getGeneratedDimensionPath(1),value:e=>e.qText},isCustomFormatted:!!t.qDef.isCustomFormatted,tooltip:{value:e=>e}}}},settings:{major:{scale:"dimension"},minor:{scale:"measure"},orientation:"",box:{width:.7,maxWidthPx:4e3,fill:e=>e.datum.boxColor.value,strokeWidth:0}},brush:{trigger:r,consume:n}}}(s,e)),i.addComponent("point-marker",function(e,t){const r=t.getStyle(Wo,"shape.bridge","stroke");return{data:{extract:{key:"qHyperCube",field:di.getGeneratedDimensionPath(0),props:{x:{},y:{field:di.getGeneratedMeasurePath(1)}}}},settings:{x:{scale:"dimension",ref:"x",fn:t=>e?t.scale(t.datum.value):t.scale(t.datum.value)+t.scale.bandwidth()},y:{scale:"measure"},sizeLimits:{maxPx:2e4,maxRelExtent:1e4,minRelDiscrete:0,maxRelDiscrete:1},shape:"line",stroke:r,size:1-.7,strokeDasharray:"4 4",fill:"none",strokeWidth:(e,t)=>t===e.data.items.length-1?0:2}}}(t,r)),e.legend&&!e.legend.show||i.addComponent("categorical-legend",Qo(this.environment,e,this.flags),{dock:e.legend?e.legend.dock:"auto",isRtl:t,chartWidth:o,chartHeight:a});const u=function(e){var t=e.theme,r=e.config,n=void 0===r?{}:r,i=n.id,o=n.resolve,a=void 0===o?[]:o,s=n.transform,l=void 0===s?[]:s,u=n.extend,c=void 0===u?[]:u,p={theme:t,matrix:dt(a),styles:void 0};return p.styles=mt({theme:t,id:i,transform:l,extend:c,matrix:p.matrix}),{getStyles:function(){return p.styles},getTheme:function(){return p.theme},setTheme:function(e){p.theme=e,p.styles=mt({theme:e,id:i,transform:l,extend:c,matrix:p.matrix})}}}({theme:r,config:{id:"waterfallChart"}});e.dataPoint.showLabels&&i.addComponent("labels",Xo(u,e));const c=i.getSettings();return this.addSnapshotChartSettings(c,e),c},updateData:function(e){const{theme:t,options:r}=this.environment,n=this;return this._super(e).then((()=>{if(n._destroyed)return Promise.reject();let i,o;if(!!e.snapshotData){const e=n.layout.generated.qHyperCube.qDataPages[0].qArea;i=e.qTop,o=e.qHeight,di.generateHyperCube(n.layout,t)}else{di.generateHyperCube(n.layout,t),Uo.call(n,!0);const{viewState:e}=r;e?(n._scrollHandler.updateViewState(n.layout.generatedMatrix.length),n._scrollHandler.setScrollState(e.scroll),i=e.scroll):(n._scrollHandler.resetScroll(),i=0),o=n._scrollHandler.getScrollViewSizeInItem()}di.generateSlicedHyperCube(n.layout,i,o)}))},resize:function(){this._scrollHandler.onResize(),this._super()},paint:function(){const e=!!this.layout.snapshotData;e||this.environment.options.viewState||Uo.call(this,!1),this._tooltipHandler.closeTooltip();const t=this.layout.generated.qHyperCube.qDataPages[0].qMatrix.length,r=this.layout.generatedMatrix.length;if(!e&&this._scrollHandler.isDataSizeChanged(t,r)){const e=this._super,t=this;return this._scrollHandler.getViewData().finally((()=>e.call(t)))}return this._super()},getSlicedData:function(e,t){return di.generateSlicedHyperCube(this.layout,e,t),Promise.resolve(this.layout)},setSnapshotData:function(e){this._super(e),e.generated=this.layout.generated,e.generatedMatrix=this.layout.generatedMatrix},getViewState:function(){return{scroll:this._scrollHandler.getScrollState()}}});function ea(q){return function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(D).forEach((t=>{e.add(D[t])}))}}(q.translator),{qae:O(q),ext:wt(q),component(){const D=d(),M=function(){const e=i(),r=o(),n=a(),c=t(),p=s(),d=l();return u((()=>({app:e,appLayout:r,deviceType:n,options:c,theme:p,translator:d})),[e,r,c.direction,c.freeResize,d.language(),p.name(),n])}(),A=M.options.renderer,E=u((()=>function(e){const t=y();return t.renderer.prio([e||"canvas"]),t.use(b),t.use(v(x)),t.use(S),t.component("disclaimer",w),t}(A)),[A]),k=f(),C=r(),[N,I]=m();var L;h((()=>{const e=g(D),t=new Zo({picasso:E,environment:M,$element:e,flags:q.flags});return I(t),()=>{t.destroy()}}),[]),function(...e){const[,t]=n(...e);if(t)throw t}((async()=>{N&&(N.updateEnvironment(M),N.updateConstraints(C),await N.updateData(k),await N.paint())}),[k,N,M]),function(i){const o=e(),a=t(),s=r(),[,l]=n((async()=>{i&&(i.updateConstraints(s),i.options=a,await i.resize())}),[o.width,o.height]);if(l)throw l}(N),L=N,c((e=>{if(L)return L.setSnapshotData(e)})),p((()=>({getViewState(){if(L)return L.getViewState()}})),[L])}}}export{ea as default};
|
|
9
|
+
e.exports=function(e,t){if(!e||isNaN(+t))return t;var r,n,i,o,a,s,l,u,c,p,d=e.length,m=e.search(/[0-9\-\+#]/),f=m>0?e.substring(0,m):"",h=e.split("").reverse().join(""),g=h.search(/[0-9\-\+#]/),y=d-g,b=e.substring(y,y+1),v=y+("."===b||","===b?1:0),x=g>0?e.substring(v,d):"";if(r=(t="-"===(e=e.substring(m,v)).charAt(0)?-t:+t)<0?t=-t:0,i=(n=e.match(/[^\d\-\+#]/g))&&n[n.length-1]||".",o=n&&n[1]&&n[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(u=t.split("."))[1]||u[1]&&u[1].length<=s)&&(t=(+t).toFixed(s+1)),c=e[0].split(o),e[0]=c.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;u[0].length<e[0].length-a;)u[0]="0"+u[0];else 0==+u[0]&&(u[0]="");if((t=t.split("."))[0]=u[0],l=c[1]&&c[c.length-1].length){for(h="",y=(p=t[0]).length%l,d=p.length,v=0;v<d;v++)h+=p.charAt(v),!((v-y+1)%l)&&v<d-l&&(h+=o);t[0]=h}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(n=t.join(""))&&""!==n||(r=!1),f+(r?"-":"")+n+x}},Je({exports:{}});var st="'Source Sans Pro', 'Arial', 'sans-serif'",lt="#333333",ut="#595959",ct="#737373",pt="#cccccc",dt="#e6e6e6";function mt(e){var t={};return[].concat(P(e),P([["","","color"],["object","","fontFamily"],["object","axis.label.name","color",ut],["object","axis.label.name","fontFamily",st],["object","axis.label.name","fontSize","12px"],["object","axis.line.major","color",pt],["object","axis.line.minor","color",dt],["object","axis.title","color"],["object","axis.title","fontFamily",st],["object","axis.title","fontSize","13px"],["object","grid.line.highContrast","color",dt],["object","grid.line.major","color",pt],["object","grid.line.minor","color",dt],["object","label.value","color",ut],["object","label.value","fontFamily",st],["object","label.value","fontSize","12px"],[!1,"label.value","darkColor",ut],[!1,"label.value","lightColor",dt],["object","outOfRange","color","#999"],["object","legend.title","color",lt],["object","legend.title","fontFamily",st],["object","legend.title","fontSize","15px"],["object","legend.label","color",ut],["object","legend.label","fontFamily",st],["object","legend.label","fontSize","13px"],["object","referenceLine.label.name","color",lt],["object","referenceLine.label.name","fontFamily",st],["object","referenceLine.label.name","fontSize","12px"],["object","referenceLine.outOfBounds","color",dt],["object","referenceLine.outOfBounds","fontFamily",st],["object","referenceLine.outOfBounds","fontSize","12px"],["object","referenceLine.outOfBounds","backgroundColor",ct,function(e){return"transparent"===e?ct:e}]])).reduce((function(e,r){var n="".concat(r[0],"-").concat(r[1],"-").concat(r[2],"}");return t[n]||(t[n]=!0,e.push(r)),e}),[]).sort((function(e,t){return(e[0].split?e[0].split(".").length:0)-(t[0].split?t[0].split(".").length:0)}))}var ft=function(e){return e};function ht(e){var t=e.theme,r=e.id,n=e.transform,i=e.extend,o=e.matrix,a={},s=n.reduce((function(e,t){var r=F(t,2),n=r[0],i=r[1];return e[n]=i,e}),{});return o.forEach((function(e){var n=F(e,5),i=n[0],o=n[1],l=n[2],u=n[3],c=n[4],p=void 0===c?function(e){return e}:c,d=function(e){var t=e.theme,r=e.base,n=e.path,i=e.attribute,o=e.defaultValue,a=void 0===o?void 0:o;if(!t||!1===r)return a;var s=t.getStyle(r,n,i);return void 0===s?a:s}({theme:t,base:"object"===i&&r?"".concat("object",".").concat(r):i,path:o,attribute:l,defaultValue:u}),m=(s["".concat(o,".").concat(l)]||ft)(p(d));Ze(a,[o,l].filter(Boolean).join("."),m)})),i.forEach((function(e){var t=F(e,2),r=t[0],n=t[1];Ze(a,r,n)})),a}const gt=(e,t)=>(t.components||[]).find((t=>t.key===e)),yt=(e,t,r)=>{var n,i,o,a;const s=null===(n=gt("axis",r))||void 0===n?void 0:n.axis;return{labels:{fontFamily:(null==s||null===(i=s.label)||void 0===i||null===(i=i.name)||void 0===i?void 0:i.fontFamily)||t.getStyle(e,"axis.label.name","fontFamily"),fontSize:(null==s||null===(o=s.label)||void 0===o||null===(o=o.name)||void 0===o?void 0:o.fontSize)||t.getStyle(e,"axis.label.name","fontSize"),fill:(null==s||null===(a=s.label)||void 0===a||null===(a=a.name)||void 0===a||null===(a=a.fontColor)||void 0===a?void 0:a.color)||t.getStyle(e,"axis.label.name","color")}}},bt="object.waterfallChart";function vt(e,t,r,n,i){const o=e.color||e.qDef.color;if(!o||o.auto||!o[r]){return{index:i,color:t.getStyle(bt,`shape.${r}`,"fill")||n}}return o[r].paletteColor}const xt={valueTypes:{NORMAL:"NORMAL",INVERSE:"INVERSE",SUBTOTAL:"SUBTOTAL"},chartID:bt,getColorForPositiveValue:function(e,t){return t.getColorPickerColor(vt(e,t,"positiveValue",null,6))},getColorForNegativeValue:function(e,t){return t.getColorPickerColor(vt(e,t,"negativeValue","#cc6677",-1))},getColorForSubtotal:function(e,t){return t.getColorPickerColor(vt(e,t,"subtotal","#c3c3c3",-1))}};Object.freeze(xt.valueTypes),Object.freeze(xt);const qt=(e,t)=>{const r={axisLabelSection:{translation:"properties.axis.label",component:"panel-section",items:t.getOptions("axis","axis.label.name")},valueLabelSection:{translation:"properties.value.label",component:"panel-section",items:t.getOptions("value","label.value")}};return null!=e&&e.isEnabled("CLIENT_IM_3051")&&(r.legendLabelSection={translation:"properties.legend.label",component:"panel-section",items:t.getOptions("legend","legend.label")}),Object.keys(r).length>0?r:void 0},Dt=(e,t,r)=>({component:"styling-panel",chartTitle:"Object.WaterfallChart",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",ref:"components",useGeneral:!0,useBackground:e,items:qt(r,t)});function St(e){return!e.color.auto}function Mt(e){const{flags:t,translator:r}=e,n=e.flags.isEnabled("SENSECLIENT_IM_2020_STYLINGPANEL_WATERFALLCHART"),i=e.flags.isEnabled("SENSECLIENT_IM_2020_WATERFALLCHART_BG"),o={uses:"data",addTranslation:"Properties.AddData",items:{measures:{disabledRef:"",items:{numberFormatting:{show:!1},valueType:{type:"string",component:"dropdown",ref:"qDef.valueType",translation:"properties.waterfall.measureOperation",options:[{value:xt.valueTypes.NORMAL,translation:"properties.waterfall.measureOperation.add"},{value:xt.valueTypes.INVERSE,translation:"properties.waterfall.measureOperation.subtract"},{value:xt.valueTypes.SUBTOTAL,translation:"properties.waterfall.measureOperation.subtotal"}],defaultValue:xt.valueTypes.NORMAL},subTotal:{ref:"qDef.subtotal.enable",type:"boolean",defaultValue:!1,translation:"properties.waterfall.measureOperation.subtotal",show:e=>e.qDef.valueType!==xt.valueTypes.SUBTOTAL},subTotalLabel:{translation:"properties.waterfall.subtotalLabel",component:"string",expression:"optional",ref:"qDef.subtotal.label",defaultValue:()=>r.get("properties.waterfall.measureOperation.subtotal"),show:e=>e.qDef.valueType!==xt.valueTypes.SUBTOTAL&&e.qDef.subtotal&&e.qDef.subtotal.enable}}}}},a=e.theme,s=((e,t,r,n,i)=>n({theme:e,translator:t,flags:i,config:{id:r,paths:["axis.title","axis.label.name","label.value","legend.title","legend.label"]}}))(a,r,xt.chartID,X,t),l=((e,t,r)=>{const n={getOptions:(n,i)=>{const o=(e,t)=>({ref:`${i}.fontColor`,component:"color-picker",width:!1,defaultValue:()=>{const r=e.getStyle(t,`${i}.color`,"color");return{color:r,index:e.getDataColorPickerPalettes()[0].colors.indexOf(r)}}});return{labelSection:{component:"items",ref:"components",key:n,items:{fontFamily:{ref:`${i}.fontFamily`,component:"dropdown",options:()=>e.getOptions(`${i}.fontFamily`),defaultValue:()=>e.getDefaultValue(`${i}.fontFamily`)},...((t,r)=>({fontWrapper:{component:"inline-wrapper",items:{fontSize:{ref:`${i}.fontSize`,component:"dropdown",width:!0,options:()=>e.getOptions(`${i}.fontSize`),defaultValue:()=>e.getDefaultValue(`${i}.fontSize`)},fontColor:{...o(t,r)}}}}))(t,r)}}}}};return n})(s,a,xt.chartID),u={type:"items",translation:"properties.presentation",grouped:!0,items:{stylingPanel:n&&Dt(i,l,t),gridLines:{type:"items",snapshot:{tid:"property-gridLines"},items:{showGridLines:{ref:"gridlines.auto",type:"boolean",translation:"properties.gridLine.spacing",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},gridSpacing:{ref:"gridlines.spacing",type:"number",component:"dropdown",defaultValue:2,options:[{value:0,translation:"properties.gridLine.noLines"},{value:2,translation:"properties.gridLine.medium"},{value:3,translation:"properties.gridLine.narrow"}],show:e=>e.gridlines&&!e.gridlines.auto}}},showLabels:{ref:"dataPoint.showLabels",type:"boolean",translation:"properties.dataPoints.labelmode",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],snapshot:{tid:"property-dataPoints"}}}},c={ref:"color.auto",type:"boolean",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},p={ref:"color.positiveValue.paletteColor",translation:"properties.waterfall.color.positiveValueColor",type:"object",component:"color-picker",dualOutput:!0,defaultValue:{index:6,color:null},show:St},d={ref:"color.negativeValue.paletteColor",translation:"properties.waterfall.color.negativeValueColor",type:"object",component:"color-picker",dualOutput:!0,defaultValue:{index:-1,color:"#cc6677"},show:St},m={ref:"color.subtotal.paletteColor",translation:"properties.waterfall.color.subtotalColor",type:"object",component:"color-picker",dualOutput:!0,defaultValue:{index:-1,color:"#c3c3c3"},show:St},f={classification:{section:"color",tags:["simple"],exclusive:!0},type:"items",items:{simpleItems:{items:{autoColor:{...c,label:e=>{var t;return r.get(null!==(t=e.color)&&void 0!==t&&t.auto?"Common.Auto":"Common.Custom")}},positiveValueColor:p,negativeValueColor:d,subtotalColor:m}}}},h={translation:"properties.colorsAndLegend",type:"items",grouped:!0,items:{colors:{type:"items",items:{autoColor:{...c,translation:"properties.colors"},positiveValueColor:p,negativeValueColor:d,subtotalColor:m}},simpleColors:f,legend:{type:"items",items:{show:{ref:"legend.show",type:"boolean",translation:"properties.legend.show",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]},dock:{type:"string",component:"dropdown",ref:"legend.dock",translation:"properties.legend.position",options:[{value:"auto",translation:"Common.Auto"},{value:"right",translation:"properties.dock.right"},{value:"bottom",translation:"Common.Bottom"},{value:"left",translation:"properties.dock.left"},{value:"top",translation:"Common.Top"}],defaultValue:"auto",show:e=>Xe(e,"legend.show",!0)}}}}},g={uses:"axis.picasso.measureAxis",label:r.get("properties.yAxis"),items:{axis:{items:{measureAxisTitle:{component:"header",type:"string",label:r.get("properties.yAxis"),classification:{section:"axis",tags:["simple"],exclusive:!0}},show:{translation:"properties.labels",defaultValue:"labels",options:[{value:"labels",translation:"properties.labels"},{value:"none",translation:"Common.None"},null,null]}}}}},y={uses:"axis.picasso.dimensionAxis",items:{othersGroup:{items:{show:{translation:"properties.labels",defaultValue:"labels",options:[{value:"labels",translation:"properties.labels"},{value:"none",translation:"Common.None"},null,null]},label:{options:t.isEnabled("SENSECLIENT_LAYERED_LABELS")?[{value:"auto",translation:"Common.Auto"},{value:"horizontal",translation:"Common.Horizontal"},{value:"tilted",translation:"properties.labels.tilted"},{value:"layered",translation:"properties.labels.layered"}]:void 0}}}}},b={uses:"settings",items:{simpleLabels:{items:{labels:{items:{header:{show(e){var t;return null===(t=e.qHyperCubeDef.qMeasures)||void 0===t?void 0:t.length}},pointLabels:{component:"checkbox",ref:"dataPoint.showLabels",type:"boolean",defaultValue:!0,translation:"Simple.Label.Value",show(e){var t;return null===(t=e.qHyperCubeDef.qMeasures)||void 0===t?void 0:t.length}}}}}},presentation:u,colors:h,measureAxis:g,dimensionAxis:y}},v={translation:"properties.numberFormatting",type:"items",globalChange(e){e.qHyperCubeDef.qMeasures.forEach((t=>{t.qDef.numFormatFromTemplate=e.qDef.numFormatFromTemplate,t.qDef.qNumFormat=q(!0,{},e.qDef.qNumFormat)}))},items:{numberFormatting:{uses:"measures.items.numberFormatting",items:{numberFormattingType:void 0}}}};return{type:"items",component:"accordion",items:{data:o,numberFormatting:v,addons:{type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{suppressZero:null,calcCond:{uses:"calcCond"}}},refLines:{uses:"reflines",items:{colorBackground:{show:!1}}}}},settings:b}}}function wt(e){return{definition:Mt(e),support:{cssScaling:!1,snapshot:!0,export:!0,exportData:!0,sharing:!0,viewData:!0},importProperties(t,r,n){n.mapProperties();const i={defaultDimension:n.getDefaultDimensionProperties(),defaultMeasure:n.getDefaultMeasureProperties()};return L({dataDefinition:A(e),defaultPropertyValues:i,exportFormat:t,initialProperties:r})},exportProperties:(e,t,r)=>T({propertyTree:e,viewDataMode:r})}}const At=/xyz/.test((()=>{}))?/\b_super\b/:/.*/,Et=function(){};Et.extend=function e(t,r){const n=this.prototype;"string"!=typeof t&&(r=t,t="Class");const i=Object.create(this.prototype);for(const e in r)i[e]="function"==typeof r[e]&&"function"==typeof n[e]&&At.test(r[e])?function(e,t){return function(){const r=this._super;this._super=n[e];const i=t.apply(this,arguments);return this._super=r,i}}(e,r[e]):r[e];if(!/^[_a-z][_a-z\d]*$/i.test(t))throw new Error("Invalid subclass name. Alphanumericals only.");const o=new Function(`return (function ${t}(){ typeof this.init === 'function' && this.init.apply(this, [].slice.call(arguments)) });`)();return o.prototype=i,o.prototype.constructor=o,o.extend=e,o};const Ct={getChar(e){let t,r=e;return r>9?(t=65+r-10,t>90&&(t+=6)):r=`${r}`.charCodeAt(0),[48,111,79,105,73,108].indexOf(t)>-1?this.getChar(r+1):String.fromCharCode(t)},base62(e){const t=this.getChar(e%62),r=Math.floor(e/62);return r>0?this.base62(r)+t:t},id(){return this.base62(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function kt(){return Ct.id()}const Nt="scrollbar";function It(e,t,r){return"y"===e?Lt(t,r):function(e){return"far"===e?"top":"bottom"}(t)}function Lt(e,t){const r=e||"near";return t&&"near"===r||!t&&"far"===r?"right":"left"}var Tt={getAxisDock:It,getOppositeAxisDock:function(e,t,r){return It(e,"far"===t?"near":"far",r)},getYAxisDock:Lt};const Ot=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),Rt=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞יִײַ-ﬨשׁ-ﭏ]"),Ft=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]");function Pt(e){return Ot.test(e)}function _t(e){return Rt.test(e)||Ft.test(e)}var Ht={lrm:String.fromCharCode(8206),detectTextDirection:function(e){const t=e?e.length:0;let r,n;for(r=0;r<t;r++){if(n=e[r],Pt(n))return"ltr";if(_t(n))return"rtl"}return"ltr"}};var Vt={lineSettings:function(e,t){var r;const n={value:0,line:{stroke:void 0!==t.paletteColor?t.theme.getColorPickerColor(t.paletteColor):"transparent",strokeDasharray:null==t||null===(r=t.style)||void 0===r?void 0:r.lineType}};return q(!0,n,e||{})},lineLabelSettings:function(e,t){const r=t&&t.chartID;let n=t.theme.getStyle(r,"referenceLine.label.name","color");const i=t.theme.getStyle(r,"referenceLine.label.name","fontSize"),o=t.theme.getStyle(r,"referenceLine.label.name","fontFamily");return t.paletteColor?n=t.theme.getColorPickerColor(t.paletteColor):n||(n="transparent"),q(!0,{value:0,line:{stroke:"transparent"},label:{align:"center",vAlign:"middle",text:"",fill:n,fontFamily:o,fontSize:i,maxWidthPx:135}},e||{})},isVisible:e=>e&&!1!==e.show&&0!==e.show&&"0"!==e.show&&void 0!==e.refLineExpr,getRefLineTitle:function({refLine:e,label:t,valueString:r}){return!1!==e.showValue?!1!==e.showLabel?`${t} ${Ht.lrm}(${r})${Ht.lrm}`:`${Ht.lrm}(${r})${Ht.lrm}`:!1!==e.showLabel?t:""}};const zt={SHOW_AXIS_LABELS_OPTIONS:["all","labels"],SHOW_TITLE_OPTIONS:["all","title"],HORIZONTAL:"horizontal",VERTICAL:"vertical",LAYOUTSETTINGS:{lasso:{displayOrder:1e4},rangeDim:{displayOrder:1e4},rangeMeasure:{displayOrder:1e4},rangeMinor:{displayOrder:1e4},scrollBar:{minimumLayoutMode:"SPARK",prioOrder:-1,displayOrder:100},refLines:{layout:{minimumLayoutMode:"SPARK",prioOrder:60,displayOrder:1110}},measureAxisTitle:{minimumLayoutMode:"XSMALL",prioOrder:30,displayOrder:90},dimensionAxisTitle:{minimumLayoutMode:"XSMALL",prioOrder:30,displayOrder:90},measureAxis:{minimumLayoutMode:"XSMALL",prioOrder:10,displayOrder:80},dimensionAxis:{minimumLayoutMode:"XSMALL",prioOrder:10,displayOrder:80},gridLines:{minimumLayoutMode:"XSMALL",displayOrder:-100},refLinesLabels:{minimumLayoutMode:"SMALL",prioOrder:60,displayOrder:0}}};zt.DEFAULT_CHART_ORIENTATION=zt.HORIZONTAL;function jt(e,t){const r=t||{},n=r.measureAxisProperties||{},i=r.dimensionAxisProperties||{},o=r.orientation||zt.DEFAULT_CHART_ORIENTATION,a=o===zt.HORIZONTAL,s=a?"x":"y",l=a?"y":"x",u=zt.SHOW_AXIS_LABELS_OPTIONS,c=zt.SHOW_TITLE_OPTIONS,p=u.includes(n.show),d=!!r.measureTitleText&&c.includes(n.show),m=r.includeDimensionAxis&&u.includes(i.show),f=r.includeDimensionAxis&&!!r.dimensionTitleText&&c.includes(i.show),h=r.gridlines&&!(!r.gridlines.auto&&0===r.gridlines.spacing),g=r.refLines&&r.refLines.some((e=>e.show)),y=[];if(p&&function(e,t,r,n){let i={scale:"measure",settings:t.axisLabelStyle||{},forceBounds:n&&!n.autoMinMax&&n.showBounds};i=q(i,zt.LAYOUTSETTINGS.measureAxis);const o=Bt(t,r);e.addComponent(`${r}-axis`,i,o)}(e,r,s,n),d&&function(e,t,r){let n={text:t.measureTitleText,style:t.axisTitleStyle||{}};n=q(n,zt.LAYOUTSETTINGS.measureAxisTitle);const i=function(e,t){return Bt(e,t)}(t,r);e.addComponent(`${r}-axis-title`,n,i)}(e,r,s),function(e,t,r,n){let i=t.measureScaleSettings;const o={isRtl:t.isRtl,source:t.measureSource,orientation:r,measureAxisProperties:n};n&&n.spacing>0&&(i=q(!0,i||{},{component:{ticks:{distance:100*n.spacing}}}));e.addScale("measure-scale",i,o)}(e,r,o,n),m&&function(e,t,r){let n={scale:"dimension",settings:t.axisLabelStyle||{}};n=q(n,zt.LAYOUTSETTINGS.dimensionAxis);const i=Wt(t,r);q(!0,n,t.dimensionAxisSettings||{}),e.addComponent(`${r}-axis`,n,i)}(e,r,l),f&&function(e,t,r){let n={text:t.dimensionTitleText,style:t.axisTitleStyle||{}};n=q(n,zt.LAYOUTSETTINGS.dimensionAxisTitle);const i=function(e,t){return Wt(e,t)}(t,r);e.addComponent(`${r}-axis-title`,n,i)}(e,r,l),r.includeDimensionAxis&&function(e,t,r){const n={isRtl:t.isRtl,source:t.dimensionSource,orientation:r===zt.HORIZONTAL?zt.VERTICAL:zt.HORIZONTAL};e.addScale("dimension-scale",t.dimensionScaleSettings,n)}(e,r,o),h&&function(e,t,r){let n={ticks:{show:!0},minorTicks:{show:!t.auto&&!t.auto&&3===t.spacing}};n=q(n,zt.LAYOUTSETTINGS.gridLines),n[r]={scale:"measure"},e.addComponent("grid-line",n)}(e,r.gridlines,s),r.hasNavigation&&function(e,t,r,n){const i=e.getSettings();i.scroll={dimension:{viewSize:r.scrollSettings&&r.scrollSettings.viewSize||0,max:r.scrollSettings&&r.scrollSettings.max||0}};const o={isRtl:r.isRtl,chartID:r.chartID,isHorizontal:!n},a=q({},zt.LAYOUTSETTINGS.scrollBar);e.addComponent("scrollbar",a,o),$t(t,function(e){function t(t,r){if(!r||!e())return!1;const n={x:r.center.x-r.deltaX,y:r.center.y-r.deltaY};return this.chart.componentsFromPoint(n).some((e=>e.settings.key===Nt))}const r={type:"Tap",options:{enable:t},events:{tap(e){this.chart.component(Nt).emit("tap",e)}}},n={type:"Pan",options:{enable:t},events:{panstart(e){this.chart.component(Nt).emit("panStart",e)},pan(e){this.chart.component(Nt).emit("panMove",e)},panend(e){this.chart.component(Nt).emit("panEnd",e)},pancancel(e){this.chart.component(Nt).emit("panCancel",e)}}};return[r,n]}(r.isNavigationEnabledFn))}(e,y,r,a),g&&function(e,t,r,n){const i=Tt.getAxisDock(r,n.dock,t.isRtl);let o={key:"ref-line",style:{oob:{show:!1}},lines:{x:[],y:[]}};o=q(o,zt.LAYOUTSETTINGS.refLines);let a={key:`ref-line-labels-${kt()}`,require:["renderer","chart"],dock:Tt.getOppositeAxisDock(r,n.dock,t.isRtl),preferredSize(){if("x"===r)return 26;const t=this.renderer.measureText,n=this.chart.formatter({data:e.settings.scales.measure.data}),i=a.lines.y.map((e=>{const r=!1!==e.label.showValue?`(${n(e.value)})`:"",i=`${e.label.text} ${r}`,o=e.label.text&&r?` ${r}`:r;return{wanted:t({text:i,fontSize:e.fontSize,fontFamily:e.fontFamily}).width,required:t({text:o,fontSize:e.fontSize,fontFamily:e.fontFamily}).width}})),o=i[0];for(let e=1;e<i.length;e++)i[e].wanted>o.wanted&&(o.wanted=i[e].wanted),i[e].required>o.required&&(o.required=i[e].required);const s=12;return o.required+s>100?o.required+s:Math.min(o.wanted+s,100)},lines:{x:[],y:[]}};a=q(a,zt.LAYOUTSETTINGS.refLinesLabels),t.refLines.forEach((n=>{if(!n.show)return;const s=n.refLineExpr&&n.refLineExpr.value,l=q(!0,{},t,{paletteColor:n.paletteColor,style:n.style,chartID:e.options.chartID}),u=Vt.lineSettings({scale:"measure",dir:r,value:s},l);o.lines[r].push(u);const c=Vt.lineLabelSettings({scale:"measure",value:s,label:{text:!1!==n.showLabel?n.label:"",showValue:!1!==n.showValue}},l);"x"===r?c.label.vAlign="near"===i?1:0:c.label.align="near"===i?0:1,a.lines[r].push(c)})),e.addComponent("ref-line",o,{}),e.addComponent("ref-line",a,{})}(e,r,s,n),r.enableLasso&&r.selectionsEnabled){!function(e,t){const r={brushKey:t.brushKey,brushComponents:t.brushComponents,brushData:t.brushData};e.addComponent("lasso",zt.LAYOUTSETTINGS.lasso,r)}(e,r.lasso||{})}if(r.enableDimRange&&r.includeDimensionAxis&&r.selectionsEnabled){!function(e,t,r,n,i){let o={key:"rangeDim"};o=q(o,zt.LAYOUTSETTINGS.rangeDim);const a={brushKey:t.brushKey,brushAxis:t.brushAxis,brushArea:t.brushArea,brushScale:t.brushScale,isHorizontal:!r,dock:n,isRtl:i};e.addComponent("range",o,a)}(e,r.dimRange||{},a,Wt(r,l).dock,r.isRtl)}if(r.enableMeasureRange&&r.selectionsEnabled){!function(e,t,r,n,i){let o={key:"rangeMeasure"};o=q(o,zt.LAYOUTSETTINGS.rangeMeasure);const a={brushKey:t.brushKey,brushAxis:t.brushAxis,brushArea:t.brushArea,brushScale:t.brushScale,multiple:t.multiple,isHorizontal:r,dock:n,isRtl:i};e.addComponent("range",o,a)}(e,r.measureRange||{},a,Bt(r,s).dock,r.isRtl)}if(r.enableAreaRange&&r.selectionsEnabled){!function(e,t,r,n,i){let o={key:"rangeMinor"};o=q(o,zt.LAYOUTSETTINGS.rangeMinor);const a={brushKey:t.brushKey,brushAxis:t.brushAxis,brushData:t.brushData,brushArea:t.brushArea,brushComponents:t.brushComponents,brushScale:t.brushScale,multiple:t.multiple,isHorizontal:"measure"===t.brushScale?r:!r,dock:n,isRtl:i,chartInstance:t.chartInstance};e.addComponent("range-area",o,a)}(e,r.areaRange||{},a,Wt(r,l).dock,r.isRtl)}r.brushActions&&$t(y,r.brushActions),y.length&&function(e,t){e.addInteraction({},{gestures:t})}(e,y)}function $t(e,t){t.forEach((t=>{e.push(t)}))}function Bt(e,t){return{dock:e.measureAxisProperties&&e.measureAxisProperties.dock,direction:t,isRtl:e.isRtl}}function Wt(e,t){return{dock:e.dimensionAxisProperties&&e.dimensionAxisProperties.dock,direction:t,isRtl:e.isRtl}}function Ut(e,t){const r=t||{},n=!r.orientation||"horizontal"===r.orientation,i=!!r.isRtl,o={name:r.name||"scale",component:{invert:n&&i,minorTicks:{count:1},range:r.range||void 0,domain:r.domain||void 0,trackBy:r.trackBy||"id"}};return q(!0,{},o,e||{})}function Kt(e){var t;if(null!=e&&null!==(t=e.isEnabled)&&void 0!==t&&t.call(e,"IM_5791_SVG_LABEL_RENDERING"))return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?void 0:"svg"}function Gt(e,t){const r=t&&t.chartID,n=t&&t.dock,i=t&&t.direction,o=t&&t.isRtl,a=t.theme.getStyle(r,"axis.line.major","color"),s=t.theme.getStyle(r,"axis.title","fontSize"),l=t.theme.getStyle(r,"axis.title","color"),u=t.theme.getStyle(r,"axis.label.name","color"),c=t.theme.getStyle(r,"axis.label.name","fontSize"),p=t.theme.getStyle(r,"axis.title","fontFamily"),d=t.theme.getStyle(r,"axis.label.name","fontFamily"),m={key:"axis",type:"axis",renderer:Kt(t.flags),dock:Tt.getAxisDock(i,n,o),brush:{trigger:[],consume:[]},settings:{title:{fontSize:s,fontFamily:p,fill:l},line:{show:!0,strokeWidth:1,stroke:a},labels:{fill:u,fontSize:c,fontFamily:d,tiltAngle:o?-40:40,maxEdgeBleed:75,maxSize:150,mode:"auto"},ticks:{stroke:a},minorTicks:{stroke:a}}},f=q(!0,{},m,e||{});return f.brush.consume.forEach((e=>{e.style.active.strokeWidth=0})),f}function Yt(e,t){const r=t&&t.chartID,n=t&&t.dock,i=t&&t.direction,o=t&&t.isRtl,a=t.theme.getStyle(r,"axis.title","fontSize"),s=t.theme.getStyle(r,"axis.title","color"),l=t.theme.getStyle(r,"axis.title","fontFamily"),u={key:"text",type:"text",dock:Tt.getAxisDock(i,n,o)||"bottom",displayOrder:0,style:{text:{fontSize:a,fontFamily:l,fill:s}}};return q(!0,{},u,e||{})}Ut.measureScale=function(e,t){let r=(t||{}).source||[];"string"==typeof r&&(r=[r]);const n={name:"measure",component:{expand:.1,data:{fields:r.map((e=>({field:e})))}}},i=t&&t.measureAxisProperties;i&&!i.autoMinMax&&(["min","minMax"].includes(i.minMax)&&(n.component.min=i.min),["max","minMax"].includes(i.minMax)&&(n.component.max=i.max));const o=Ut(q(!0,n,e||{}),t);return!(e&&e.component&&void 0!==e.component.invert)&&t&&"vertical"===t.orientation&&(o.component.invert=!o.component.invert),o},Ut.dimensionScale=function(e,t){const r={name:"dimension",component:{trackBy:"id",type:"band",data:{extract:{field:t&&t.source||"",props:{label:e=>e.qText||""}}},label:e=>e.datum.label.value}};return Ut(q(!0,r,e||{}),t)},Gt.xAxis=function(e,t){return Gt(q(!0,{key:"x-axis",scale:"x"},e||{}),t)},Gt.yAxis=function(e,t){const r=t&&t.dock,n=t&&t.isRtl,i={key:"y-axis",scale:"y",dock:Tt.getYAxisDock(r,n)};return Gt(q(!0,i,e||{}),t)},Yt.xAxisTitle=function(e,t){return Yt(q(!0,{key:"x-axis-title"},e||{}),t)},Yt.yAxisTitle=function(e,t){const r=t&&t.dock,n=t&&t.isRtl,i={key:"y-axis-title",dock:Tt.getYAxisDock(r,n)||"left"};return Yt(q(!0,i,e||{}),t)};var Xt={getBublesAlign:function(e,t,r){let n=e&&"far"!==t||!e&&"far"===t;return!e&&r&&(n=!n),n?"start":"end"},getDock:function(e,t){const r=[];let n;return e&&r.push(`@${e}`),t&&r.push(`@${t}`),r.length&&(n=r.join(",")),n}};const Jt={SPARK:{width:0,height:0},XSMALL:{width:150,height:75},SMALL:{width:300,height:150},MEDIUM:{width:400,height:220},FULL:{width:550,height:450}};function Qt(){return Jt}function Zt(e){const t=e.data.end;return e.dataset(t.source.key).field(t.source.field).formatter()(t.value)}Qt.getLayoutModeKeys=function(){const e=[];let t;for(t in Jt)e.push(t);return e};const er={left:"left",right:"right",up:"top",down:"bottom"};function tr(e,t,r){switch(e){case"scale":return Ut(t,r);case"measure-scale":return Ut.measureScale(t,r);case"dimension-scale":return Ut.dimensionScale(t,r);case"axis":return Gt(t,r);case"box-marker":return function(e){return q(!0,{},{key:"box-marker",type:"box-marker",settings:{minor:{scale:"x"},orientation:"horizontal"},brush:{trigger:[],consume:[]}},e||{})}(t);case"point-marker":return function(e){return q(!0,{},{key:"point-marker",type:"point-marker",settings:{},brush:{trigger:[],consume:[]}},e||{})}(t);case"scrollbar":return function(e,t){const r=t&&t.isRtl,n=t&&t.chartID,i=t&&t.isHorizontal,o={key:"scrollbar",type:"scrollbar",scroll:"dimension",dock:i?"bottom":r?"left":"right",settings:{backgroundColor:t.theme.getStyle(n,"","backgroundColor"),invert:r&&i}};return q(!0,{},o,e||{})}(t,r);case"text":return Yt(t,r);case"lasso":return function(e,t){const r=t&&t.brushKey,n=t&&t.brushComponents?t.brushComponents:[],i=t&&t.brushData?t.brushData:["elemNo"],o={type:"brush-lasso",key:"lasso",displayOrder:99,settings:{brush:{components:[]},lasso:{fill:"rgba(0, 0, 0, 0)",stroke:"rgba(102,102,102,1)",strokeWidth:2,opacity:1,strokeDasharray:null},startPoint:{r:10,fill:"rgba(0, 152, 69, 1)",strokeWidth:0,opacity:1}}};return n.forEach((e=>{o.settings.brush.components.push({contexts:r?[r]:void 0,key:e,data:i})})),q(!0,{},o,e||{})}(t,r);case"range":return function(e,t){const r=t&&t.brushKey,n=t&&t.brushAxis,i=t&&t.brushArea,o=t&&t.brushScale,a=t&&t.isHorizontal,s=t&&t.dock,l=t&&t.isRtl,u={type:"brush-range",key:"range",displayOrder:99,dock:Xt.getDock(n,i),settings:{brush:r,fill:"rgba(0, 0, 0, 0)",scale:o,multiple:!t||!1!==t.multiple||t.multiple,direction:a?"horizontal":"vertical",target:{component:n,fill:"rgba( 82, 204, 82, 0.2 )",fillActive:"rgba(82, 204, 82, 0.4)"},bubbles:{align:Xt.getBublesAlign(a,s,l)}}};return q(!0,{},u,e||{})}(t,r);case"range-area":return function(e,t){const r=t&&t.brushKey,n=t&&t.brushAxis,i=t&&t.brushComponents?t.brushComponents:[],o=t&&t.brushData?t.brushData:["elemNo"],a=t&&t.brushArea,s=t&&t.isHorizontal,l=t&&t.dock,u=t&&t.isRtl,c=t&&t.chartInstance;let p=!0;const d={type:"brush-area-dir",key:"area",displayOrder:99,dock:Xt.getDock(n,a),settings:{brush:{components:[]},direction:s?"horizontal":"vertical",target:{component:n,fill:"rgba( 82, 204, 82, 0.2 )",fillActive:"rgba(82, 204, 82, 0.4)"},bubbles:{align:Xt.getBublesAlign(s,l,u),label:e=>p?(p=!1,c.dataset(e.binStart.source.key).field(e.binStart.source.field).formatter()(e.binStart.value)):(p=!0,c.dataset(e.binEnd.source.key).field(e.binEnd.source.field).formatter()(e.binEnd.value))},multiple:!t||!1!==t.multiple||t.multiple}};return i.forEach((e=>{d.settings.brush.components.push({contexts:r?[r]:void 0,key:e,data:o,action:"add"})})),q(!0,{},d,e||{})}(t,r);case"categorical-legend":return function(e,t){const r=t&&t.chartID,n=t&&t.isRtl;let i=t&&t.dock||"auto";const o=t&&t.show;"auto"===i&&(i=t.chartHeight/t.chartWidth<1?n?"left":"right":"bottom");const a=t.theme.getStyle(r,"legend.title","color"),s=t.theme.getStyle(r,"legend.title","fontSize"),l=t.theme.getStyle(r,"legend.label","color"),u=t.theme.getStyle(r,"legend.label","fontSize"),c=t.theme.getStyle(r,"legend.title","fontFamily"),p=t.theme.getStyle(r,"legend.label","fontFamily"),d={key:"legend",type:"legend-cat",renderer:Kt(t.flags),dock:i,show:o,scale:{type:"color"},settings:{title:{anchor:"middle"},layout:{direction:n?"rtl":"ltr",size:"top"===i||"bottom"===i?2:1,vertical:"top"===i||"bottom"===i?16:8},navigation:{button:{class:{"lui-fade-button":!0},content:(e,t)=>e("span",{style:{pointerEvents:"none"},class:["lui-button__icon","lui-icon",`lui-icon--triangle-${er[t.direction]}`].join(" ")})}}},style:{item:{label:{fontSize:u,fontFamily:p,fill:l,lineHeight:1,wordBreak:"break-word"},margin:{top:5,left:10,right:10,bottom:10},shape:{type:t.type?t.type:"square",size:3*parseInt(u,10)/4}},title:{show:t.showTitle,fontSize:s,fontFamily:c,fill:a}}};return q(!0,{},d,e)}(t,r);case"sequential-legend":return function(e,t){const r=t&&t.chartID,n=t&&t.isRtl;let i=t.dock||"auto";"auto"===i&&(i=t.chartHeight<t.chartWidth?n?"left":"right":"bottom");const o=t.theme.getStyle(r,"legend.title","color"),a=t.theme.getStyle(r,"legend.title","fontSize"),s=t.theme.getStyle(r,"legend.title","fontFamily"),l=t.theme.getStyle(r,"legend.label","color"),u=t.theme.getStyle(r,"legend.label","fontSize"),c=t.theme.getStyle(r,"legend.label","fontFamily");function p(e){switch(e){case"left":return 0;case"right":return 1;default:return.5}}const d={key:"seqlegend",type:"legend-seq",dock:i,displayOrder:200,minimumLayoutMode:"MEDIUM",prioOrder:0,settings:{align:p(n?"right":"left"),major:{invert:"left"===i||"right"===i||n},title:{show:t.showTitle,fontSize:a,fontFamily:s,fill:o},tick:{fill:l,fontSize:u,fontFamily:c}}};return q(!0,{},d,e)}(t,r);case"x-axis":return Gt.xAxis(t,r);case"y-axis":return Gt.yAxis(t,r);case"x-axis-title":return Yt.xAxisTitle(t,r);case"y-axis-title":return Yt.yAxisTitle(t,r);case"grid-line":return function(e,t){const r=t&&t.chartID,n=t.theme.getStyle(r,"grid.line.major","color");return q(!0,{},{displayOrder:-1,key:"grid-line",type:"grid-line",x:null,y:null,ticks:{stroke:n},minorTicks:{stroke:n}},e||{})}(t,r);case"interaction":return function(e,t){const r=t&&t.gestures||[];return q(!0,{},{type:"hammer",key:"hammered",gestures:r},e||{})}(t,r);case"ref-line":return function(e,t){const r=t&&t.chartID,n=t.theme.getStyle(r,"referenceLine.outOfBounds","color"),i=t.theme.getStyle(r,"referenceLine.outOfBounds","backgroundColor");return q(!0,{},{key:"ref-line",type:"ref-line",dock:"center",prioOrder:-1,lines:{x:[],y:[]},style:{oob:{width:7,fill:i,text:{fill:n},padding:{x:7,y:5}}}},e||{})}(t,r);case"event-area":return function(e){return q(!0,{},{type:"event-area",key:"event-area"},e||{})}(t);case"labels":return function(e,t){const r=t&&t.chartID,n=t.theme.getStyle(r,"label.value","color"),i=t.theme.getStyle(r,"label.value","fontSize"),o=t.theme.getStyle(r,"label.value","fontFamily"),a={key:"labels",type:"labels",renderer:Kt(t.flags),displayOrder:1,settings:{sources:[{component:"box-marker",selector:"rect",strategy:{type:"bar",settings:{direction:"up",fontFamily:o,fontSize:parseFloat(i),align:.5,labels:[{placements:[{position:"outside",fill:n,justify:0},{position:"inside",fill:e&&e.settings.sources[0].strategy.settings.labels[0].placements[1].fill,justify:1}],label:Zt}]}}}]}};return q(!0,{},a,e||{})}(t,r);default:return}}function rr(e){this.options=e||{},this.settings={dockLayout:{layoutModes:Qt()},components:[],scales:{}}}rr.prototype.addComponent=function(e,t,r){const n=tr(e,t,q(!0,{},this.options,r||{}));return this.settings.components.push(n),n},rr.prototype.addInteraction=function(e,t){const r=tr("interaction",e,q(!0,{},this.options,t||{}));return this.settings.interactions||(this.settings.interactions=[]),this.settings.interactions.push(r),r},rr.prototype.addScale=function(e,t,r){const n=tr(e,t,q(!0,{},this.options,r||{}));this.settings.scales[n.name]=n.component},rr.prototype.getSettings=function(){return this.settings},rr.prototype.getComponent=function(e){return this.settings.components.filter((t=>t.key===e))[0]},rr.prototype.addPreset=function(e,t){!function(e,t,r){if("dimension-measure-chart"!==e)throw Error("There is no chart preset with that type");jt(t,r)}(e,this,t)},rr.validateComponentKeys=function(e){const t={};return e.map((e=>{const r=e.key;return r?t[r]?`Duplicate key for component ${e.type}`:(t[r]=!0,null):`Missing key for component ${e.type}`})).filter((e=>!!e))},rr.create=function(e){return new rr(e)},rr.createComponent=tr;const nr={CENTER:0,BOTTOM:1};var ir={DISCLAIMERS:[{label:"NoDataExist",alignment:nr.CENTER,default:!0},{label:"RequireNumericDimension",alignment:nr.CENTER,default:!1},{label:"OnlyNanData",alignment:nr.CENTER,default:!0},{label:"OnlyNegativeOrZeroValues",alignment:nr.CENTER,default:!1},{label:"LimitedData",alignment:nr.BOTTOM,default:!1},{label:"OnlyNanColor",alignment:nr.BOTTOM,default:!1},{label:"NegativeOrZeroValues",alignment:nr.BOTTOM,default:!1},{label:"DataRangeIncludingZero",alignment:nr.BOTTOM,default:!1}],ALIGNMENT:nr};const or={getNoDataExistAttribute:e=>e.qSize.qcy*e.qSize.qcx===0,getLimitedDataAttribute(e,t){let r,n=!1;var i;return e?void 0!==t.explicitLimitedData?n=!0===t.explicitLimitedData:e.qDataPages&&e.qDataPages[0]?n=!t.paging&&e.qSize.qcy>e.qDataPages[0].qMatrix.length:(i=e.qStackedDataPages)&&i[0]&&i[0].qData[0]&&i[0].qData[0].qSubNodes&&(r=t.maxNbrOfDimensions?t.maxNbrOfDimensions:2,n=e.qDimensionInfo.length>=r?e.qStackedDataPages[0].qData[0].qSubNodes.some((e=>e.qDown>0)):e.qStackedDataPages[0].qData[0].qSubNodes.length<e.qStackedDataPages[0].qArea.qHeight):n=!0===t.explicitLimitedData,n},getNegativeOrZeroValuesAttribute:(e,t)=>!t.supportNegative&&e.qMeasureInfo.some((e=>e.qMin<=0)),getOnlyNegativeOrZeroValuesAttribute:(e,t)=>!t.supportNegative&&e.qMeasureInfo.every((e=>e.qMax<=0&&e.qMax>=e.qMin))||0===e.qSize.qcy,getOnlyNanDataAttribute:(e,t)=>void 0!==t.explicitOnlyNanData?t.explicitOnlyNanData:e.qMeasureInfo.every((e=>e.qMax<e.qMin||"NaN"===e.qMax)),getDataRangeIncludingZeroAttribute:(e,t)=>!t.supportRangeOverZero&&function(e,t){const r=t.length;let n,i,o,a,s;for(e&&(i=!(e.autoMinMax||"min"!==e.minMax&&"minMax"!==e.minMax||null===e.min||Number.isNaN(+e.min)),o=!(e.autoMinMax||"max"!==e.minMax&&"minMax"!==e.minMax||null===e.max||Number.isNaN(+e.max))),a=Number.MAX_VALUE,s=-Number.MAX_VALUE,n=0;n<r;n++)if(a=Math.min(a,t[n].qMin),s=Math.max(s,t[n].qMax),a<=0&&s>=0)return!0;return a=i?e.min:a,s=o?e.max:s,a<=0&&s>=0}(e.measureAxis,e.qHyperCube.qMeasureInfo),applyAttributes(e,t){const r=e||{},n={};return r.supportNegative=void 0===r.supportNegative||r.supportNegative,r.supportRangeOverZero=void 0===r.supportRangeOverZero||r.supportRangeOverZero,ir.DISCLAIMERS.forEach((e=>{n[e.label]=!1})),t&&t.qHyperCube?(n.NoDataExist=this.getNoDataExistAttribute(t.qHyperCube),n.NoDataExist?n:(n.RequireNumericDimension=r.explicitRequireNumericDimension,n.RequireNumericDimension||(n.LimitedData=this.getLimitedDataAttribute(t.qHyperCube,r),n.NegativeOrZeroValues=this.getNegativeOrZeroValuesAttribute(t.qHyperCube,r),n.OnlyNegativeOrZeroValues=this.getOnlyNegativeOrZeroValuesAttribute(t.qHyperCube,r),n.OnlyNanData=this.getOnlyNanDataAttribute(t.qHyperCube,r),n.DataRangeIncludingZero=this.getDataRangeIncludingZeroAttribute(t,r)),n)):n}};function ar(e,t,r){this.disclaimersConfig=e,this.dataAttributes=t,this.supportedDisclaimers=r}function sr(e,t){return e&&t&&t[e]}function lr(e){this.environment=e,this.clear()}ar.prototype.isValidAndSupported=function(e,t){return sr(e.label,this.dataAttributes)&&(e.default||sr(e.label,this.supportedDisclaimers))&&void 0!==t&&e.alignment===t},ar.prototype.isAnyValidDisclaimer=function(e){let t=!1;const r=this;return this.disclaimersConfig.forEach((n=>{r.isValidAndSupported(n,e)&&(t=!0)})),t},ar.prototype.getMessage=function(e,t){let r="";const n=this;return t&&this.disclaimersConfig.forEach((i=>{n.isValidAndSupported(i,e)&&(r+=`${t.get(`Object.Disclaimer.${i.label}`)} `)})),r},lr.ERRORS={SET:"Calling Disclaimer.set() without attributes",DISPLAY:"Calling Disclaimer.display() before attributes are applied"},lr._applyDefaultSupport=function(e,t){let r=e;return r||(r={}),t.forEach((e=>{void 0===r[e.label]&&(r[e.label]=e.default)})),r},lr.prototype.getComponentSettings=function(){var e;const{translator:t}=this.environment,r=q(!0,{},this.vizAttributes.supportedDisclaimers),n=new ar(ir.DISCLAIMERS,this.dataAttributes,r);let i,o;if(n.isAnyValidDisclaimer(ir.ALIGNMENT.CENTER))i=n.getMessage(ir.ALIGNMENT.CENTER,t),o="center";else{if(!n.isAnyValidDisclaimer(ir.ALIGNMENT.BOTTOM))return;i=n.getMessage(ir.ALIGNMENT.BOTTOM,t),o="bottom"}return{key:"disclaimer",type:"disclaimer",layout:{displayOrder:1e3,dock:o},settings:{label:i,rtl:"rtl"===(null===(e=this.environment)||void 0===e||null===(e=e.options)||void 0===e?void 0:e.direction)}}},lr.prototype.set=function(e){if(this.clear(),!e)throw new Error(lr.ERRORS.SET);this.vizAttributes=e,this.dataAttributes=or.applyAttributes(this.vizAttributes.options,this.vizAttributes.data)},lr.prototype.clear=function(){this.vizAttributes=null,this.dataAttributes=null};const ur=Et.extend({init(e,t,r,n,i){this.$element=t,this.environment=r,this.backendApi=n,this._selectionsApi=i,this._on=!1,this._disclaimer=new lr(r),this._dataPaths=["qHyperCube"];const o=this;this.picassoElement=t[0],this.picassoElement.className+=" picasso-chart",this.chartInstance=e.chart({element:this.picassoElement,settings:{components:[rr.createComponent("event-area",{mounted(e){o.dataAreaElem=e}})]}})},updateEnvironment(e){this.environment=e},isRtl(){var e;return"rtl"===(null===(e=this.environment.options)||void 0===e?void 0:e.direction)},setDataPaths(e){this._dataPaths=e},getData:(e,t,r)=>function(e,t,r){let n,i={qTop:0,qLeft:0,qWidth:t.qSize.qcx,qHeight:1e4/t.qSize.qcx};if(r){const e=r.width||t.qSize.qcx,n=Math.floor(1e4/e);i={qTop:r.top||0,qLeft:r.left||0,qWidth:e,qHeight:r.height?Math.min(r.height,n):n}}else i={qTop:0,qLeft:0,qWidth:t.qSize.qcx,qHeight:1e4/t.qSize.qcx};n="K"===t.qMode?"qStackedDataPages":"qDataPages";return e.getData([i],null,t).then((e=>{t[n]=e}))}(e,t,r),hasValidData:()=>!0,paint(){if(this.hasValidData()){var e;this._disclaimer.set(this.getDisclaimerAttributes(this.layout));const t=this._disclaimer.getComponentSettings(),r="center"===(null==t||null===(e=t.layout)||void 0===e?void 0:e.dock),n=this.createChartSettings(this.layout);r?n.components=[t]:t&&n.components.push(t),rr.validateComponentKeys(n.components).forEach((e=>{console.error(e)})),this.updateChart(this.layout,n),this._painted=!0}return Promise.resolve()},resize(){if(this.layout)return this.paint()},createChartSettings(){throw new Error('Subclass must implement "createChartSettings" function')},addSnapshotChartSettings(e,t){const{freeResize:r}=this.environment.options;!r&&t.snapshotData&&(e.dockLayout.logicalSize={width:t.snapshotData.content.size.w,height:t.snapshotData.content.size.h,preserveAspectRatio:!0})},updateData(e){return this._destroyed?Promise.reject():(this.layout=q(!0,{},e),this.layout.permissions=e.permissions,Promise.resolve())},updateChart(e,t,r){var n,i;const o=null!==(n=null===(i=this.environment.appLayout)||void 0===i?void 0:i.qLocaleInfo)&&void 0!==n?n:{},a=this._dataPaths.map((t=>({type:"q",key:t,config:{localeInfo:o},data:Xe(e,t.replace(/\//g,"."))})));this.colorService&&a.push(...this.colorService.getData()),this.chartInstance.update({data:a,settings:t,partialData:r});this.picassoElement.setAttribute("data-state",2)},destroy(){this._destroyed=!0,this.off(),this.chartInstance.destroy()},getViewState:()=>({}),isLassoDisabled:()=>!0,setSnapshotData(e){e.snapshotData||(e.snapshotData={}),e.snapshotData.content={chartData:{},size:{w:this.$element.width(),h:this.$element.height()}}},getDisclaimerAttributes:e=>({data:e})}),cr={aliceblue:{r:240,g:248,b:255},antiquewhite:{r:250,g:235,b:215},aqua:{r:0,g:255,b:255},aquamarine:{r:127,g:255,b:212},azure:{r:240,g:255,b:255},beige:{r:245,g:245,b:220},bisque:{r:255,g:228,b:196},black:{r:0,g:0,b:0},blanchedalmond:{r:255,g:235,b:205},blue:{r:0,g:0,b:255},blueviolet:{r:138,g:43,b:226},brown:{r:165,g:42,b:42},burlywood:{r:222,g:184,b:135},cadetblue:{r:95,g:158,b:160},chartreuse:{r:127,g:255,b:0},chocolate:{r:210,g:105,b:30},coral:{r:255,g:127,b:80},cornflowerblue:{r:100,g:149,b:237},cornsilk:{r:255,g:248,b:220},crimson:{r:220,g:20,b:60},cyan:{r:0,g:255,b:255},darkblue:{r:0,g:0,b:139},darkcyan:{r:0,g:139,b:139},darkgoldenrod:{r:184,g:134,b:11},darkgray:{r:169,g:169,b:169},darkgreen:{r:0,g:100,b:0},darkgrey:{r:169,g:169,b:169},darkkhaki:{r:189,g:183,b:107},darkmagenta:{r:139,g:0,b:139},darkolivegreen:{r:85,g:107,b:47},darkorange:{r:255,g:140,b:0},darkorchid:{r:153,g:50,b:204},darkred:{r:139,g:0,b:0},darksalmon:{r:233,g:150,b:122},darkseagreen:{r:143,g:188,b:143},darkslateblue:{r:72,g:61,b:139},darkslategray:{r:47,g:79,b:79},darkslategrey:{r:47,g:79,b:79},darkturquoise:{r:0,g:206,b:209},darkviolet:{r:148,g:0,b:211},deeppink:{r:255,g:20,b:147},deepskyblue:{r:0,g:191,b:255},dimgray:{r:105,g:105,b:105},dimgrey:{r:105,g:105,b:105},dodgerblue:{r:30,g:144,b:255},firebrick:{r:178,g:34,b:34},floralwhite:{r:255,g:250,b:240},forestgreen:{r:34,g:139,b:34},fuchsia:{r:255,g:0,b:255},gainsboro:{r:220,g:220,b:220},ghostwhite:{r:248,g:248,b:255},gold:{r:255,g:215,b:0},goldenrod:{r:218,g:165,b:32},gray:{r:128,g:128,b:128},green:{r:0,g:128,b:0},greenyellow:{r:173,g:255,b:47},grey:{r:128,g:128,b:128},honeydew:{r:240,g:255,b:240},hotpink:{r:255,g:105,b:180},indianred:{r:205,g:92,b:92},indigo:{r:75,g:0,b:130},ivory:{r:255,g:255,b:240},khaki:{r:240,g:230,b:140},lavender:{r:230,g:230,b:250},lavenderblush:{r:255,g:240,b:245},lawngreen:{r:124,g:252,b:0},lemonchiffon:{r:255,g:250,b:205},lightblue:{r:173,g:216,b:230},lightcoral:{r:240,g:128,b:128},lightcyan:{r:224,g:255,b:255},lightgoldenrodyellow:{r:250,g:250,b:210},lightgray:{r:211,g:211,b:211},lightgreen:{r:144,g:238,b:144},lightgrey:{r:211,g:211,b:211},lightpink:{r:255,g:182,b:193},lightsalmon:{r:255,g:160,b:122},lightseagreen:{r:32,g:178,b:170},lightskyblue:{r:135,g:206,b:250},lightslategray:{r:119,g:136,b:153},lightslategrey:{r:119,g:136,b:153},lightsteelblue:{r:176,g:196,b:222},lightyellow:{r:255,g:255,b:224},lime:{r:0,g:255,b:0},limegreen:{r:50,g:205,b:50},linen:{r:250,g:240,b:230},magenta:{r:255,g:0,b:255},maroon:{r:128,g:0,b:0},mediumaquamarine:{r:102,g:205,b:170},mediumblue:{r:0,g:0,b:205},mediumorchid:{r:186,g:85,b:211},mediumpurple:{r:147,g:112,b:219},mediumseagreen:{r:60,g:179,b:113},mediumslateblue:{r:123,g:104,b:238},mediumspringgreen:{r:0,g:250,b:154},mediumturquoise:{r:72,g:209,b:204},mediumvioletred:{r:199,g:21,b:133},midnightblue:{r:25,g:25,b:112},mintcream:{r:245,g:255,b:250},mistyrose:{r:255,g:228,b:225},moccasin:{r:255,g:228,b:181},navajowhite:{r:255,g:222,b:173},navy:{r:0,g:0,b:128},oldlace:{r:253,g:245,b:230},olive:{r:128,g:128,b:0},olivedrab:{r:107,g:142,b:35},orange:{r:255,g:165,b:0},orangered:{r:255,g:69,b:0},orchid:{r:218,g:112,b:214},palegoldenrod:{r:238,g:232,b:170},palegreen:{r:152,g:251,b:152},paleturquoise:{r:175,g:238,b:238},palevioletred:{r:219,g:112,b:147},papayawhip:{r:255,g:239,b:213},peachpuff:{r:255,g:218,b:185},peru:{r:205,g:133,b:63},pink:{r:255,g:192,b:203},plum:{r:221,g:160,b:221},powderblue:{r:176,g:224,b:230},purple:{r:128,g:0,b:128},red:{r:255,g:0,b:0},rosybrown:{r:188,g:143,b:143},royalblue:{r:65,g:105,b:225},saddlebrown:{r:139,g:69,b:19},salmon:{r:250,g:128,b:114},sandybrown:{r:244,g:164,b:96},seagreen:{r:46,g:139,b:87},seashell:{r:255,g:245,b:238},sienna:{r:160,g:82,b:45},silver:{r:192,g:192,b:192},skyblue:{r:135,g:206,b:235},slateblue:{r:106,g:90,b:205},slategray:{r:112,g:128,b:144},slategrey:{r:112,g:128,b:144},snow:{r:255,g:250,b:250},springgreen:{r:0,g:255,b:127},steelblue:{r:70,g:130,b:180},tan:{r:210,g:180,b:140},teal:{r:0,g:128,b:128},thistle:{r:216,g:191,b:216},tomato:{r:255,g:99,b:71},transparent:{r:255,g:255,b:255,a:0},turquoise:{r:64,g:224,b:208},violet:{r:238,g:130,b:238},wheat:{r:245,g:222,b:179},white:{r:255,g:255,b:255},whitesmoke:{r:245,g:245,b:245},yellow:{r:255,g:255,b:0},yellowgreen:{r:154,g:205,b:50}},pr=/^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/i,dr=/^rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),(\d(\.\d+)?)\)$/i,mr=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i,fr=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i,hr=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i,gr=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i,yr=Math.floor,br=Math.round,vr=Et.extend({init(){let e,t,r,n,i,o,a,s,l,u,c,p,d=0,m=0,f=0,h=1;if(this._invalid=!1,arguments[0]instanceof vr)d=arguments[0]._r,m=arguments[0]._g,f=arguments[0]._b,h=arguments[0]._a,this._invalid=arguments[0]._invalid;else if(arguments.length<3)if("string"==typeof arguments[0])if(p=arguments[0],c=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(p))d=parseInt(c[1],10),m=parseInt(c[2],10),f=parseInt(c[3],10);else if(c=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(p))d=parseInt(c[1],10),m=parseInt(c[2],10),f=parseInt(c[3],10),h=parseFloat(c[4]);else if(c=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i.exec(p))d=parseInt(c[1],16),m=parseInt(c[2],16),f=parseInt(c[3],16),h=1;else if(c=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i.exec(p))d=parseInt(c[1]+c[1],16),m=parseInt(c[2]+c[2],16),f=parseInt(c[3]+c[3],16),h=1;else if(c=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(p)){switch(e=parseFloat(c[1]),t=parseFloat(c[3]),n=parseFloat(c[5]),e%=360,t/=100,n/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,n=n<0?0:n>1?1:n,o=n<=.5?2*n*t:(2-2*n)*t,a=e/60,s=o*(1-Math.abs(a%2-1)),l=[],a=Math.floor(a),a){case 0:l=[o,s,0];break;case 1:l=[s,o,0];break;case 2:l=[0,o,s];break;case 3:l=[0,s,o];break;case 4:l=[s,0,o];break;case 5:l=[o,0,s];break;default:l=[0,0,0]}u=n-.5*o,d=l[0]+u,m=l[1]+u,f=l[2]+u,d=br(255*d),m=br(255*m),f=br(255*f),h=1}else if(c=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i.exec(p)){switch(e=parseFloat(c[1]),t=parseFloat(c[3]),n=parseFloat(c[5]),h=parseFloat(c[7]),e%=360,t/=100,n/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,n=n<0?0:n>1?1:n,o=n<=.5?2*n*t:(2-2*n)*t,a=e/60,s=o*(1-Math.abs(a%2-1)),l=[],a=Math.floor(a),a){case 0:l=[o,s,0];break;case 1:l=[s,o,0];break;case 2:l=[0,o,s];break;case 3:l=[0,s,o];break;case 4:l=[s,0,o];break;case 5:l=[o,0,s];break;default:l=[0,0,0]}u=n-.5*o,d=l[0]+u,m=l[1]+u,f=l[2]+u,d=br(255*d),m=br(255*m),f=br(255*f)}else if(c=/^hsv\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(p)){switch(e=parseFloat(c[1]),t=parseFloat(c[3]),i=parseFloat(c[5]),e%=360,t/=100,i/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,i=i<0?0:i>1?1:i,o=i*t,a=e/60,s=o*(1-Math.abs(a%2-1)),l=[],a=Math.floor(a),a){case 0:l=[o,s,0];break;case 1:l=[s,o,0];break;case 2:l=[0,o,s];break;case 3:l=[0,s,o];break;case 4:l=[s,0,o];break;case 5:l=[o,0,s];break;default:l=[0,0,0]}u=i-o,d=l[0]+u,m=l[1]+u,f=l[2]+u,d=br(255*d),m=br(255*m),f=br(255*f),h=1}else cr[p.toLowerCase()]?(r=p.toLowerCase(),d=cr[r].r,m=cr[r].g,f=cr[r].b,h="number"==typeof cr[r].a?cr[r].a:1):this._invalid=!0;else"number"==typeof arguments[0]&&arguments[0]>=0&&"argb"===arguments[1]?(h=(4278190080&arguments[0])>>>24,h/=255,d=(16711680&arguments[0])>>16,m=(65280&arguments[0])>>8,f=255&arguments[0]):"number"==typeof arguments[0]&&arguments[0]>=0?(d=(16711680&arguments[0])>>16,m=(65280&arguments[0])>>8,f=255&arguments[0]):this._invalid=!0;else arguments.length>=3?(d=arguments[0],m=arguments[1],f=arguments[2],h=arguments.length>=4?arguments[3]:1):this._invalid=!0;Number.isNaN(+d+m+f+h)&&(this._invalid=!0),this._r=yr(d),this._g=yr(m),this._b=yr(f),this._a=h,this._spaces={}},isInvalid(){return this._invalid},setAlpha(e){this._a=e,this._spaces={}},getAlpha(){return this._a},toRGB:function(){return this._spaces.rgb||(this._spaces.rgb=vr.toRGB(this)),this._spaces.rgb},toRGBA:function(){return this._spaces.rgba||(this._spaces.rgba=vr.toRGBA(this)),this._spaces.rgba},toString(){return this._spaces.rgb||(this._spaces.rgb=vr.toRGB(this)),this._spaces.rgb},toHex:function(){return this._spaces.hex||(this._spaces.hex=vr.toHex(this)),this._spaces.hex},toHSL:function(e){return this._spaces.hsl||(this._spaces.hsl=vr.toHSL(this,e)),this._spaces.hsl},toHSLA:function(e){return this._spaces.hsla||(this._spaces.hsla=vr.toHSLA(this,e)),this._spaces.hsla},toHSV(){const e=this.toHSVComponents();return`hsv(${e.h},${e.s},${e.v})`},toHSVComponents:function(){return this._spaces.hsvComp||(this._spaces.hsvComp=vr.toHSVComponents(this)),this._spaces.hsvComp},toNumber:function(){return this._spaces.num||(this._spaces.num=vr.toNumber(this)),this._spaces.num},isDark(){return this.isInvalid()||this.getLuminance()<125},getLuminance(){return void 0===this._lumi&&(this._lumi=.299*this._r+.587*this._g+.114*this._b),this._lumi},shiftLuminance(e){const t=this.toHSLA(),r=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i.exec(t),n=parseFloat(r[1]),i=parseFloat(r[3]);let o=parseFloat(r[5]);const a=parseFloat(r[7]);return o+=e,o=Math.max(0,Math.min(o,100)),`hsla(${n},${i},${o},${a})`},isEqual(e){return e instanceof vr||(e=new vr(e)),this._r===e._r&&this._g===e._g&&this._b===e._b},blend(e,t){return`rgba(${[yr(this._r+(e._r-this._r)*t),yr(this._g+(e._g-this._g)*t),yr(this._b+(e._b-this._b)*t),yr(this._a+(e._a-this._a)*t)].join(",")})`},createShiftedColor(e){(void 0===e||Number.isNaN(+e))&&(e=1);const t=this.getLuminance(),r=this._g<126?1:1+this._g/512,n=this.shiftLuminance(20*(t*r<220?.8+1/(t+1)*4:-(.8+t/255*1))*e);return new vr(n)}});vr.toRGB=function(e){if(e instanceof vr)return`rgb(${[e._r,e._g,e._b].join(",")})`;"string"==typeof e&&(e=vr.toNumber(e));return`rgb(${(16711680&e)>>16},${(65280&e)>>8},${255&e})`},vr.toRGBA=function(e,t){if(e instanceof vr)return`rgba(${[e._r,e._g,e._b,void 0!==t?t:e._a].join(",")})`;"string"==typeof e&&(e=vr.toNumber(e));return`rgba(${(16711680&e)>>16},${(65280&e)>>8},${255&e},${void 0!==t?t:e._a})`},vr.toHex=function(e){let t,r,n;return e instanceof vr?(t=e._r.toString(16),r=e._g.toString(16),n=e._b.toString(16),1===t.length&&(t=`0${t}`),1===r.length&&(r=`0${r}`),1===n.length&&(n=`0${n}`),`#${[t,r,n].join("")}`):("string"==typeof e&&(e=vr.toNumber(e)),t=((16711680&e)>>16).toString(16),r=((65280&e)>>8).toString(16),n=(255&e).toString(16),1===t.length&&(t=`0${t}`),1===r.length&&(r=`0${r}`),1===n.length&&(n=`0${n}`),`#${t}${r}${n}`)},vr.toHSL=function(e,t){let r,n,i,o=0;"string"==typeof e&&(e=new vr(e));const a=e._r/255,s=e._g/255,l=e._b/255,u=Math.max(a,s,l),c=Math.min(a,s,l);if(n=t?.21*a+.72*s+.07*l:(u+c)/2,u===c)r=0,o=0;else{switch(i=u-c,r=n>.5?i/(2-u-c):i/(u+c),u){case a:o=(s-l)/i+(s<l?6:0);break;case s:o=(l-a)/i+2;break;case l:o=(a-s)/i+4}o/=6}return`hsl(${360*o},${100*r},${100*n})`},vr.toHSLA=function(e,t){let r,n,i,o=0;"string"==typeof e&&(e=new vr(e));const a=e._r/255,s=e._g/255,l=e._b/255,u=e._a,c=Math.max(a,s,l),p=Math.min(a,s,l);if(n=t?.21*a+.72*s+.07*l:(c+p)/2,c===p)r=0,o=0;else{switch(i=c-p,r=n>.5?i/(2-c-p):i/(c+p),c){case a:o=(s-l)/i+(s<l?6:0);break;case s:o=(l-a)/i+2;break;case l:o=(a-s)/i+4}o/=6}return`hsla(${360*o},${100*r},${100*n},${u})`},vr.toHSVComponents=function(e){let t,r,n=0;"string"==typeof e&&(e=new vr(e));const i=e._r/255,o=e._g/255,a=e._b/255,s=Math.max(i,o,a),l=Math.min(i,o,a),u=s;if(s===l)t=0,n=0;else{switch(r=s-l,t=0===r?0:r/u,s){case i:n=(o-a)/r+(o<a?6:0);break;case o:n=(a-i)/r+2;break;case a:n=(i-o)/r+4}n/=6}return{h:360*n%360,s:100*t,v:100*u}},vr.toNumber=function(){if(1===arguments.length&&arguments[0]instanceof vr)return(arguments[0]._r<<16)+(arguments[0]._g<<8)+arguments[0]._b;let e,t,r=0,n=0,i=0;return 1===arguments.length&&"string"==typeof arguments[0]&&(t=arguments[0],(e=/^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/i.exec(t))?(r=parseInt(e[1],10),n=parseInt(e[2],10),i=parseInt(e[3],10)):(e=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i.exec(t))?(r=parseInt(e[1],16),n=parseInt(e[2],16),i=parseInt(e[3],16)):(e=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i.exec(t))&&(r=parseInt(e[1]+e[1],16),n=parseInt(e[2]+e[2],16),i=parseInt(e[3]+e[3],16))),(r<<16)+(n<<8)+i},vr.blend=function(e,t,r){const n=(16711680&(e=vr.toNumber(e)))>>16,i=(65280&e)>>8,o=255&e;return(n+(((16711680&(t=vr.toNumber(t)))>>16)-n)*r<<16)+(i+(((65280&t)>>8)-i)*r<<8)+(o+((255&t)-o)*r)},vr.getBlend=function(e,t,r){const n=e._r+(t._r-e._r)*r,i=e._g+(t._g-e._g)*r,o=e._b+(t._b-e._b)*r,a=e._a+(t._a-e._a)*r;return new vr(n,i,o,a)},vr.isCSSColor=function(e){return!(arguments.length>1||"string"!=typeof e)&&(pr.test(e)||dr.test(e)||mr.test(e)||fr.test(e)||hr.test(e)||gr.test(e)||cr[e.toLowerCase()])},vr.getBestContrast=function(e,t,r){const n=e.getLuminance();return Math.abs(n-t.getLuminance())>Math.abs(n-r.getLuminance())?t:r},vr.getContrast=function(e,t){if(!e||!t)return;const r=e.getLuminance()/100,n=t.getLuminance()/100;return r>n?(r+.05)/(n+.05):(n+.05)/(r+.05)},vr.isDark=function(){const e={getLuminance:vr.prototype.getLuminance,isInvalid:vr.prototype.isInvalid};return vr.prototype.init.apply(e,[].slice.call(arguments)),vr.prototype.isDark.call(e)},vr.useDarkLabel=function(e,t){return e._a>.5?!e.isDark():!t};const xr=".scrollHandler";function qr(e,t,r,n,i){if(!e||!t||!r)throw Error("Scroll-handler: Missing input");this._chartInstance=e,this._$chartElement=t,this._getSlicedDataFn=r,this._on=!1,this._itemSize=30,this.options={direction:"vertical"},this._onScrollCallback=n,this._legendKey=i}function Dr(){const e=("horizontal"===this.options.direction?this._$chartElement.width():this._$chartElement.height())||0,t=Math.floor(e/this.getItemSize());this._scrollViewSizeInItem=Math.max(t,1)}function Sr(e){const t=function(e){let t=0,r=0,n=0;return e.wheelDelta&&(t=e.wheelDelta/60),e.detail&&(t=-e.detail/3),n=t,void 0!==e.axis&&e.axis===e.HORIZONTAL_AXIS&&(n=0,r=-1*t),void 0!==e.wheelDeltaY&&(n=e.wheelDeltaY/60),void 0!==e.wheelDeltaX&&(r=-1*e.wheelDeltaX/60),{delta:t,deltaX:r,deltaY:n,x:e.pageX,y:e.pageY}}(e.originalEvent);if(function(e,t,r,n){if(n&&r.componentsFromPoint(t).some((e=>e.settings.key===n)))return r.component(n).emit(t.delta>0?"prev":"next"),e.preventDefault(),!0;return!1}(e,t,this._chartInstance,this._legendKey)||this._disabled||!this.getScrollApi())return;if(e.preventDefault(),!t.delta)return;const r=t.delta<0?3:-3;this._scrollApi.move(r)}function Mr(){if(this._disabled||this._sizeChanged)return void(this._sizeChanged=!1);const e=this;this.getViewData().then((t=>{e._on&&!e._disabled&&e._onScrollCallback&&e._onScrollCallback(t,void 0,!0)})).catch((e=>{}))}qr.prototype.getScrollApi=function(){this._scrollApi||(this._scrollApi=this._chartInstance.scroll("dimension"));return this._scrollApi},qr.prototype.setDisabled=function(e){this._disabled=e},qr.prototype.getDisabled=function(){return this._disabled},qr.prototype.setItemSize=function(e){this._itemSize!==e&&(this._itemSize=e,Dr.call(this))},qr.prototype.getItemSize=function(){return this._itemSize},qr.prototype.getScrollViewSizeInItem=function(){this._scrollViewSizeInItem||Dr.call(this);return this._scrollViewSizeInItem},qr.prototype.on=function(){if(this._on)return;this.getScrollApi()&&(this._scrollApi.removeAllListeners(),this._scrollApi.on("update",Mr.bind(this)));this._$chartElement.on(`mousewheel${xr} DOMMouseScroll${xr}`,Sr.bind(this)),this._$chartElement.on(`touchstart${xr}`,(e=>{e.preventDefault()})),this._on=!0},qr.prototype.isOn=function(){return this._on},qr.prototype.off=function(){if(!this._on)return;this.getScrollApi()&&this._scrollApi.removeAllListeners();this._$chartElement.off(xr),this._on=!1},qr.prototype.updateViewState=function(e){Dr.call(this),this.getScrollApi()&&this._scrollApi.update({viewSize:this._scrollViewSizeInItem,max:e})},qr.prototype.onResize=function(){this._sizeChanged=!0,Dr.call(this),this.getScrollApi()&&this._scrollApi.update({viewSize:this._scrollViewSizeInItem})},qr.prototype.isDataSizeChanged=function(e,t){return Math.min(this.getScrollViewSizeInItem(),t)!==e},qr.prototype.resetScroll=function(){this.getScrollApi()&&this._scrollApi.moveTo(0)},qr.prototype.getViewData=function(){let e=0,t=0;if(this.getScrollApi()){const r=this._scrollApi.getState();e=Math.round(r.start),t=r.viewSize}return this._getSlicedDataFn(e,t)},qr.prototype.setOptions=function(e){this.options.direction!==e.direction&&(this._scrollViewSizeInItem=void 0);this.options=e},qr.prototype.getScrollState=function(){return this.getScrollApi().getState().start},qr.prototype.setScrollState=function(e){this.getScrollApi().moveTo(e)};var wr={isOnComponentForRange:function(e,t,r){return!!e&&!!r.chart.componentsFromPoint({x:e.center.x,y:e.center.y}).filter((e=>-1!==t.indexOf(e.settings.key)))[0]},isOnComponentForLasso:function(e,t,r){return e&&r.chart.componentsFromPoint({x:e.center.x,y:e.center.y}).filter((e=>e.settings.key===t.keys.componentKey))[0]},isOnComponentForNavBtn:function(e,t,r){return r.chart.componentsFromPoint(e.center).some((e=>e.settings.key===t))}};var Ar={callLassoGesture:function(e,t,r){return{type:"Pan",options:{direction:x.DIRECTION_ALL,threshold:1,enable(n,i){if(e.lassoing)return t.isSelectionEnabled();const o=wr.isOnComponentForLasso(i,r,this);return t.isSelectionEnabled()&&i&&((a=r.handlers).selectionHandler.lassoState()&&!a.selectionHandler.allFieldsLocked()||e.lassoing)&&o;var a},event:"lasso"},recognizeWith:r.handlers.scrollHandler?"drag":null,events:{lassostart(n){wr.isOnComponentForLasso(n,r,this)&&(t.switchTo("lasso",this.chart,n),e.lassoing=!0,r.handlers.selectionHandler.pauseEngineCalls(r.keys.lassoBrushKey),n.clientX=n.pointers[0].clientX,n.clientY=n.pointers[0].clientY,t.doEmit(this.chart,"lasso","lassoStart",n))},lassomove(r){e.lassoing&&(r.clientX=r.pointers[0].clientX,r.clientY=r.pointers[0].clientY,t.doEmit(this.chart,"lasso","lassoMove",r))},lassoend(n){e.lassoing&&(n.clientX=n.pointers[0].clientX,n.clientY=n.pointers[0].clientY,t.doEmit(this.chart,"lasso","lassoEnd",n),r.handlers.selectionHandler.resumeEngineCalls(r.keys.lassoBrushKey,!0),e.lassoing=!1)},lassocancel(n){e.lassoing=!1,t.doEmit(this.chart,"lasso","lassoCancel",n),r.handlers.selectionHandler.resumeEngineCalls(r.keys.lassoBrushKey,!1)}}}}};var Er={callMeasureRangeGesture:function(e,t,r,n){const i=r.keys.dimRangeBrushKey?"majorrange":"arearange";return{type:"Pan",options:{direction:r.isHorizontal?x.DIRECTION_HORIZONTAL:x.DIRECTION_VERTICAL,event:"measurerange",enable(i,o){if(!r.rangeSelStatus.isOpenMea)return!1;if(e.measureSelecting)return t.isSelectionEnabled();const a="measurerange"===r.active.gesture?[n,r.keys.componentKey]:[n],s=wr.isOnComponentForRange(o,a,this);return e.measureSelecting=t.isSelectionEnabled()&&!!o&&!!s,e.measureSelecting&&!!r.keys.measureRangeBrushKey}},requireFailure:`lasso ${i}`,recognizeWith:r.handlers.scrollHandler?"drag":null,events:{measurerangestart(i){const o="measurerange"===r.active.gesture?[n,r.keys.componentKey]:[n];wr.isOnComponentForRange(i,o,this)&&(e.measureSelecting=!0,t.switchTo("measurerange",this.chart,i),t.doEmit(this.chart,"rangeMeasure","rangeStart",i),r.handlers.selectionHandler.pauseEngineCalls(r.keys.measureRangeBrushKey))},measurerangemove(r){e.measureSelecting&&t.doEmit(this.chart,"rangeMeasure","rangeMove",r)},measurerangeend(n){e.measureSelecting&&(r.handlers.selectionHandler.resumeEngineCalls(r.keys.measureRangeBrushKey,!0),t.doEmit(this.chart,"rangeMeasure","rangeEnd",n),e.measureSelecting=!1)},measurerangecancel(){r.handlers.selectionHandler.resumeEngineCalls(r.keys.measureRangeBrushKey,!1),e.measureSelecting=!1}}}}};function Cr(e,t){let r;return r="x-axis"===e?"horizontal"===t?x.DIRECTION_VERTICAL:x.DIRECTION_HORIZONTAL:"horizontal"===t?x.DIRECTION_HORIZONTAL:x.DIRECTION_VERTICAL,r}var kr={callAreaRangeGesture:function(e,t,r,n){const i=r.keys.dimRangeBrushKey?"majorrange":"measurerange";return{type:"Pan",options:{direction:Cr(n,r.isHorizontal),event:"arearange",enable(i,o){if(!r.rangeSelStatus.isOpenDim)return!1;if(e.minoring)return t.isSelectionEnabled();const a="arearange"===r.active.gesture?[n,r.keys.componentKey]:[n],s=wr.isOnComponentForRange(o,a,this);return e.minoring=t.isSelectionEnabled()&&!!o&&!!s,e.minoring}},requireFailure:`lasso ${i}`,recognizeWith:r.handlers.scrollHandler?"drag":null,events:{arearangestart(i){const o="arearange"===r.active.gesture?[n,r.keys.componentKey]:[n];wr.isOnComponentForRange(i,o,this)&&(e.minoring=!0,t.switchTo("arearange",this.chart,i),t.doEmit(this.chart,"rangeMinor","areaStart",i),r.handlers.selectionHandler.pauseEngineCalls(r.keys.areaBrushKey))},arearangemove(n){e.minoring&&(this.chart.brush(r.keys.areaBrushKey).clear(),t.doEmit(this.chart,"rangeMinor","areaMove",n))},arearangeend(n){e.minoring&&(r.handlers.selectionHandler.resumeEngineCalls(r.keys.areaBrushKey,!0),t.doEmit(this.chart,"rangeMinor","areaEnd",n),e.minoring=!1)},arearangecancel(){r.handlers.selectionHandler.resumeEngineCalls(r.keys.areaBrushKey,!1),e.minoring=!1}}}}};var Nr={callDimensionRangeGesture:function(e,t,r,n){const i=r.keys.measureRangeBrushKey?"measurerange":"arearange";return{type:"Pan",options:{direction:r.isHorizontal?x.DIRECTION_VERTICAL:x.DIRECTION_HORIZONTAL,event:"majorrange",enable(i,o){if(!r.rangeSelStatus.isOpenDim)return!1;if(e.majoring)return t.isSelectionEnabled();const a="majorrange"===r.active.gesture?[n,r.keys.componentKey]:[n],s=wr.isOnComponentForRange(o,a,this);return e.majoring=t.isSelectionEnabled()&&!!o&&!!s,e.majoring&&!!r.keys.dimRangeBrushKey}},requireFailure:`lasso ${i}`,recognizeWith:r.handlers.scrollHandler?"drag":null,events:{majorrangestart(i){const o="majorrange"===r.active.gesture?[n,r.keys.componentKey]:[n];wr.isOnComponentForRange(i,o,this)&&(e.majoring=!0,t.switchTo("majorrange",this.chart,i),t.doEmit(this.chart,"rangeDim","rangeStart",i),r.handlers.selectionHandler.pauseEngineCalls(r.keys.dimRangeBrushKey))},majorrangemove(r){e.majoring&&t.doEmit(this.chart,"rangeDim","rangeMove",r)},majorrangeend(n){e.majoring&&(r.handlers.selectionHandler.resumeEngineCalls(r.keys.dimRangeBrushKey,!0),t.doEmit(this.chart,"rangeDim","rangeEnd",n),e.majoring=!1)},majorrangecancel(){r.handlers.selectionHandler.resumeEngineCalls(r.keys.dimRangeBrushKey,!1),e.majoring=!1}}}}};var Ir={callDragGesture:function(e,t,r,n,i){let o={};return{type:"Pan",options:{direction:r.isHorizontal?x.DIRECTION_VERTICAL:x.DIRECTION_HORIZONTAL,event:"drag",enable(n,i){return e.dragging?t.isNavigationEnabled():(e.dragging=t.isNavigationEnabled()&&!!i&&!!this.chart.componentsFromPoint({x:i.center.x,y:i.center.y}).filter((e=>e.settings.key===r.keys.componentKey))[0],e.dragging)}},requireFailure:n?`lasso ${t.getBrushConfig()}`:"",events:{dragstart(e){o={x:e.deltaX,y:e.deltaY};let t=-(r.isHorizontal?e.deltaY:e.deltaX)/r.handlers.scrollHandler.getItemSize();!r.isHorizontal&&i&&(t=-t),r.handlers.scrollHandler.getScrollApi().move(t)},dragmove(t){if(!e.dragging)return;let n=-(r.isHorizontal?t.deltaY-o.y:t.deltaX-o.x)/r.handlers.scrollHandler.getItemSize();!r.isHorizontal&&i&&(n=-n),r.handlers.scrollHandler.getScrollApi().move(n),o={x:t.deltaX,y:t.deltaY}},dragend(){e.dragging&&(e.dragging=!1)},dragcancel(){e.dragging=!1}}}}};var Lr={callNavBtnGesture:function(e,t){return{type:"Tap",options:{event:"navBtnTap",enable(r,n){return!(!n||!e())&&wr.isOnComponentForNavBtn(n,t,this)}},events:{navBtnTap(e){this.chart.componentsFromPoint(e.center).forEach((t=>{const r=e.target,n=r?r.getAttribute("data-action"):"";if(n)return t.emit(n)}))}}}}};var Tr={create:function(e,t,r,n,i){const o={};t=t||"vertical";const a=n.lassoBrushKey||"select",s=n.dimRangeBrushKey||null,l=n.measureRangeBrushKey||null,u=n.areaBrushKey||null,c=n.legendBrushKey||null,p=!!e.selectionHandler&&e.selectionHandler.isOn(),d={dragging:!1,lassoing:!1,majoring:!1,minoring:!1,measureSelecting:!1},m={gesture:"",type:""},f="horizontal"===t,h=f?"y-axis":"x-axis",g=f?"x-axis":"y-axis";function y(e,t,r){if(m.gesture===e)return;let n=a;const i=t||m.chart;switch(m.gesture){case"majorrange":b(i,"rangeDim","rangeClear",r),n=s;break;case"measurerange":b(i,"rangeMeasure","rangeClear",r),n=l;break;case"arearange":b(i,"rangeMinor","areaClear",r),n=u}m.gesture=e;const o="range"===e?"range":"item";m.type&&m.type!==o&&i.brush(n).clear(),m.chart=t,m.type=o}function b(e,t,r,n){if(e){const i=e.component(t);i&&i.emit(r,n)}}let v=[];const x={isSelectionEnabled:()=>e.selectionHandler&&e.selectionHandler.isOn(),isNavigationEnabled:()=>e.scrollHandler&&e.scrollHandler.isOn(),doEmit:b,switchTo:y,getBrushConfig:function(){return s?l?"majorrange measurerange":"majorrange arearange":"measurerange arearange"}},q={handlers:e,keys:n,isHorizontal:f,active:m,rangeSelStatus:i};function D(){y("none"),d.majoring=!1,d.measureSelecting=!1,d.minoring=!1}return p&&(v=[{type:"Tap",options:{event:"rangeClearTap"},events:{rangeClearTap(e){y("none",this.chart,e),d.majoring=!1,d.measureSelecting=!1,d.minoring=!1}}}],v.unshift(Lr.callNavBtnGesture(x.isNavigationEnabled,c)),v.push(Ar.callLassoGesture(d,x,q)),s?l?(v.push(Nr.callDimensionRangeGesture(d,x,q,h)),e.selectionHandler.addComponent(s,{id:"rangeDim",clear:"rangeClear"}),v.push(Er.callMeasureRangeGesture(d,x,q,g)),e.selectionHandler.addComponent(l,{id:"rangeMeasure",clear:"rangeClear"})):(v.push(Nr.callDimensionRangeGesture(d,x,q,h)),e.selectionHandler.addComponent(s,{id:"rangeDim",clear:"rangeClear"}),v.push(kr.callAreaRangeGesture(d,x,q,g)),e.selectionHandler.addComponent(u,{id:"rangeMinor",clear:"areaClear"})):(v.push(Er.callMeasureRangeGesture(d,x,q,g)),e.selectionHandler.addComponent(l,{id:"rangeMeasure",clear:"rangeClear"}),v.push(kr.callAreaRangeGesture(d,x,q,h)),e.selectionHandler.addComponent(u,{id:"rangeMinor",clear:"areaClear"}))),e.scrollHandler&&(v.push(Ir.callDragGesture(d,x,q,p,r)),e.scrollHandler.getScrollApi().on("update",D)),o.gestures=v,o.destroy=function(){e.scrollHandler&&e.scrollHandler.getScrollApi().removeListener("update",D)},o}};function Or(e,t,r,n,i){let o=!1;n=n||"tooltip",r=r||["self"];const a=e.brush(n),s={};function l(){if(o){e.component(i).emit("hide")}o=!1}return s.isOpen=function(){return o},s.closeTooltip=l,s.update=function(){const s=a.brushes(),u=e.getAffectedShapes(n,"and",r,t);s.length>=1?(o=!0,function(t){o=!0;const r={nodes:t};e.component(i).emit("show",{},r)}(u)):l()},s.toggleInterceptor=function(e){if(r.length>1){const t={},r=[];return e.forEach((e=>{t[e.key]||(t[e.key]={}),t[e.key][e.value]||(t[e.key][e.value]=!0,r.push(e))})),r}return e},s}var Rr={create:(...e)=>Or(...e)},Fr={formatMeasureValue:function(e,t){if(e.raw().isCustomFormatted)return e.formatter()(t.value.qText);const r=void 0!==t.value.qNum?t.value.qNum:t.value.qValue;return e.formatter()(r)}};const Pr=e=>({h:t,data:r,style:n})=>{const i=function(e,t){const r=e.chartInstance.dataset(e.dataPath),n=[],i=t.length-5,o=Math.min(5,t.length);for(let i=0;i<o;i++){const o=t[i],a={rows:[]};if(e.labelData){const t=[],i=e.labelData;let s=!1;for(let e=0;e<i.length;e++){const r=o.data[i[e]].value;if(-2===r.qElemNo||-2===r.qElemNumber){s=!0;break}t.push(o.data[i[e]].value.qText)}if(s)return;a.header=e.headerResolver(t),a.rows=e.measureRows.map((t=>{const n=o.data;return e.rowResolver(r.field(n[t].source.field),n[t],n)})).filter((e=>!!e));const l=_r(e,o);l&&a.rows.unshift(l),n.push(a)}}i>0&&(n.numberInExcess=i);return n.rowCount=n[0]?n.length*n[0].rows.length:0,n}(e,r),o={h:t,style:n,rtl:"rtl"===e.direction,translator:e.translator};return e.renderer(o,i)};function _r(e,t){var r,n,i;const o=t.data.color,a=null===(r=e.colorService)||void 0===r||null===(n=r.getSettings)||void 0===n?void 0:n.call(r);if(!a||"color"===a.type||!o||!a.fieldType)return;const s=[];e.data.forEach((e=>{const r=t.data[e];r&&s.push(r.value)}));const l=function(e){let t=-1;for(let r=0;r<e.length;r++)-3===e[r]&&(t=r);return t}(s),{translator:u}=e,c=a.label;return{color:null===(i=t.attrs)||void 0===i?void 0:i.fill,label:c,value:-1!==l?u.get("properties.dimensionLimits.others"):o.label}}const Hr="dist-flow-tooltip",Vr=`#${Hr}`;function zr(){if(!document.querySelector(Vr)){const e=document.createElement("div");e.id=Hr,e.style.overflow="hidden",e.style.position="fixed",e.style.pointerEvents="none",e.style.left="0px",e.style.top="0px",e.style.width="100%",e.style.height="100%",e.style.zIndex=1020,document.body.appendChild(e)}}function jr({key:e="tooltip",rtl:t,fontFamily:r,filter:n,content:i}){return{show:!0,key:e,type:"tooltip",layout:{displayOrder:3},beforeMount(){zr()},beforeUpdate(){zr()},destroyed(){!function(){const e=document.querySelector(Vr);e&&e.parentElement&&e.childElementCount<1&&e.parentElement.removeChild(e)}()},settings:{appendTo:()=>document.querySelector(Vr),content:i,filter:n,extract:e=>e.node,direction:t?"rtl":"ltr",placement:"bounds"},style:{arrow:{color:"#404040"},content:{display:"table","border-spacing":"4px",background:"rgba(64, 64, 64, 0.9)",opacity:"1",fontSize:"13px",fontFamily:r,"empty-cells":"show"},cell:{"max-width":"180px","word-break":"break-word","word-wrap":"break-word","overflow-wrap":"break-word",hyphens:"auto"}}}}const{detectTextDirection:$r}=Ht;const Br={tooltipKey:"tooltip",data:[""],contexts:["tooltip"],headerResolver:e=>e.join(", "),rowResolver:(e,t)=>({value:Fr.formatMeasureValue(e,t),label:e.title()}),direction:"ltr",renderer:function(e,t){const{h:r,style:n,translator:i,rtl:o}=e,a=[],s=o?"right":"left";if(t.forEach((e=>{if(e.header){const t={...n.cell,textAlign:s,fontWeight:"bold",direction:$r(e.header)};a.push(r("tr",null,r("td",{style:t,colSpan:2},e.header)))}e.rows.forEach((e=>{let t=e.value;if(e.color){const n={display:"inline-block",width:10,height:10,"background-color":e.color,margin:"0 8px"},i=r("div",{style:n});t=o?[e.value,i]:[i,e.value]}const i=o?[":",e.label]:[e.label,":"],l={...n.cell,textAlign:s,direction:$r(e.label)},u={...n.cell,textAlign:o?"left":"right",direction:$r(e.value)};a.push(r("tr",null,r("td",{style:l},i),r("td",{style:u},t)))}))})),t.numberInExcess){const e=i.get("Object.ChartTooltip.NMore",t.numberInExcess),o={...n.cell,textAlign:s,direction:$r(e)};a.push(r("tr",null,r("td",{style:o,colSpan:2},e)))}return a}};function Wr(e,t,r){if(!e)throw Error("Tooltips-handler: Missing input");let n={},i=!1;const o={};function a(e){e.listeners.update=function(t,r){e.action.update(t,r,e)},e.listeners.end=function(){e.action.closeTooltip()},e.brush.on(e.treatAsDesktop?"update":"set-values",e.listeners.update),e.brush.on("end",e.listeners.end),e.brush.intercept("set-values",e.action.toggleInterceptor)}function s(){Object.keys(n).forEach((e=>{l(n[e])}))}function l(e){e.brush.removeListener(e.treatAsDesktop?"update":"set-values",e.listeners.update),e.brush.removeListener("end",e.listeners.end),e.brush.removeInterceptor("set-values",e.action.toggleInterceptor)}function u(){Object.keys(n).forEach((e=>{n[e].action.closeTooltip()}))}function c(){u();for(const e in n)n[e].brush.clear()}return o.setUp=function(t){const o=q(!0,{},Br,t);if(!o.componentKey)throw Error("Tooltips-handler.setUp: Missing required input");n[o.contexts[0]]&&i&&l(n[o.contexts[0]]);const s=function(e,t){return{brush:t.brush(e.contexts[0]),action:Rr.create(t,e.componentKey,e.data,e.contexts[0],e.tooltipKey),listeners:{},chartInstance:t,dataPath:e.dataPath,renderer:e.renderer,data:e.data,headerResolver:e.headerResolver,rowResolver:e.rowResolver,colorService:e.colorService,attrDimPath:e.attrDimPath,measureRows:e.measureRows,labelData:e.labelData,filterShapes:e.filterShapes,direction:e.environment.options.direction,theme:e.environment.theme,translator:e.environment.translator,treatAsDesktop:"touch"!==e.environment.deviceType}}(o,e);n[o.contexts[0]]=s,i&&a(s);const u=jr({key:o.tooltipKey,rtl:"rtl"===s.direction,fontFamily:s.theme.getStyle(r,"tooltip","fontFamily"),filter:(c=s.filterShapes,e=>c?c(e):function(e){const t=[];return e.forEach((e=>{-1===t.indexOf(e)&&"container"!==e.type&&t.push(e)})),t}(e)),content:Pr(s,o.dataPath)});var c;return o.chartBuilder.getSettings().components.push(u),{trigger:{on:s.treatAsDesktop?"over":"tap",action:"set",contexts:o.contexts,data:o.data,globalPropagation:"stop"},consume:o.contexts.map((e=>({context:e}))),component:u}},o.tearDown=function(){i&&s(),n=[]},o.closeTooltip=u,o.isOn=()=>i,o.on=function(){i||(i=!0,Object.keys(n).forEach((e=>{a(n[e])})),t&&t.on("mouseleave",c))},o.off=function(){i&&(i=!1,s(),t&&t.off("mouseleave",c),u())},o}var Ur={create:(e,t,r)=>Wr(e,t,r)};const Kr=166/26,Gr=12/11;function Yr(e){return(12*Math.min(e,3)+Math.max(e-3,0)*Kr)/11}function Xr(e){if(!e)return{latin:0,cjk:0};let t=e.match(/[\u4E00-\u9FFF]/g),r=e.match(/[\u3040-\u309F]/g),n=e.match(/[\u30A0-\u30FF]/g);t=t?t.length:0,r=r?r.length:0,n=n?n.length:0;const i=t+r+n;return{latin:e.length-i,cjk:i}}function Jr(e,t){const r={latin:0,cjk:0};void 0===t?e.forEach((e=>{const t=Xr(e.qText);r.latin+=t.latin,r.cjk+=t.cjk})):e.forEach((e=>{const n=Xr(e[t].qText);r.latin+=n.latin,r.cjk+=n.cjk}));const n=Math.max(1,r.latin+r.cjk);return r.latinRatio=r.latin/n,r.cjkRatio=r.cjk/n,r}function Qr(e,t,r){return e*(e<=24?t:r)}var Zr={endsWith:function(e,t){return-1!==e.indexOf(t,e.length-t.length)},startsWith:function(e,t){return 0===e.indexOf(t)},contains:function(e,t){if(!e)throw new Error("Haystack is undefined.");if(!t)throw new Error("Needle is undefined.");return-1!==e.indexOf(t)},stringWidthOverMWidth:Yr,getCharacterRatios:Xr,getTotalCharacterRatios:Jr,getAdjustedMaxGlyphCount:function(e,t,r){const n=Jr(t,r),i=n.latinRatio*e,o=n.cjkRatio*e;return Math.ceil(Yr(i)+o*Gr)},estimateLatinLabelWidth:Qr,estimateLabelWidth:function(e,t,r,n,i){return e*r+Qr(t,n,i)}};var en={generateHyperCube:function(e,t){const r=e.qHyperCube.qMeasureInfo,n=e.qHyperCube.qDataPages[0].qMatrix,i=r.length;if(!i)return;const o=xt.getColorForPositiveValue(e,t),a=xt.getColorForNegativeValue(e,t),s=xt.getColorForSubtotal(e,t),l=e=>`${e}`,u=[];let c,p,d=0,m=0,f=-Number.MAX_VALUE,h=Number.MAX_VALUE,g=-Number.MAX_VALUE,y=Number.MAX_VALUE,b=0;for(let e=0;e<i;e++)p=Number.isNaN(+n[0][e].qNum)?0:n[0][e].qNum,r[e].valueType!==xt.valueTypes.SUBTOTAL?(d=m,m+=p*(r[e].valueType===xt.valueTypes.INVERSE?-1:1),c=d<m?o:a,u.push([{qText:r[e].qFallbackTitle,qElemNumber:b++},{qText:c},{qNum:d},{qNum:m},{qNum:m-d,qText:n[0][e].qText}]),r[e].subtotal&&r[e].subtotal.enable&&u.push([{qText:r[e].subtotal.label||"",qElemNumber:b++},{qText:s},{qNum:0},{qNum:m},{qNum:m,qText:l(m)}])):(d=0,m=p,u.push([{qText:r[e].qFallbackTitle,qElemNumber:b++},{qText:s},{qNum:d},{qNum:m},{qNum:m-d,qText:n[0][e].qText}])),f=Math.max(f,d),h=Math.min(h,d),g=Math.max(g,m),y=Math.min(y,m);const v=function(e){return e.qHyperCube.qMeasureInfo[0].qNumFormat}(e),x=e.qHyperCube.qMeasureInfo[0].qIsAutoFormat,q=e.qDef.isCustomFormatted,D={qHyperCube:{qMode:"S",qDataPages:[{qArea:{qTop:0,qLeft:0,qWidth:5,qHeight:u.length},qMatrix:u}],qDimensionInfo:[{qStateCounts:{}},{qStateCounts:{}}],qMeasureInfo:[{qMin:h,qMax:f,qNumFormat:v,qIsAutoFormat:x,isCustomFormatted:q},{qMin:y,qMax:g,qNumFormat:v,qIsAutoFormat:x,isCustomFormatted:q},{qMin:y,qMax:g,qNumFormat:v,qIsAutoFormat:x,isCustomFormatted:q}]}};e.generatedMatrix=u,e.generated=D},generateSlicedHyperCube:function(e,t,r){e.generated.qHyperCube.qDataPages=[{qArea:{qTop:t,qLeft:0,qWidth:5,qHeight:r},qMatrix:e.generatedMatrix.slice(t,t+r)}]},getGeneratedDimensionPath:function(e){return`qDimensionInfo/${e}`},getGeneratedMeasurePath:function(e){return`qMeasureInfo/${e}`}};function tn(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function rn(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function nn(e){let t,r,n;function i(e,n,i=0,o=e.length){if(i<o){if(0!==t(n,n))return o;do{const t=i+o>>>1;r(e[t],n)<0?i=t+1:o=t}while(i<o)}return i}return 2!==e.length?(t=tn,r=(t,r)=>tn(e(t),r),n=(t,r)=>e(t)-r):(t=e===tn||e===rn?e:on,r=e,n=e),{left:i,center:function(e,t,r=0,o=e.length){const a=i(e,t,r,o-1);return a>r&&n(e[a-1],t)>-n(e[a],t)?a-1:a},right:function(e,n,i=0,o=e.length){if(i<o){if(0!==t(n,n))return o;do{const t=i+o>>>1;r(e[t],n)<=0?i=t+1:o=t}while(i<o)}return i}}}function on(){return 0}const an=nn(tn).right;nn((function(e){return null===e?NaN:+e})).center;const sn=Math.sqrt(50),ln=Math.sqrt(10),un=Math.sqrt(2);function cn(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),o=n/Math.pow(10,i),a=o>=sn?10:o>=ln?5:o>=un?2:1;let s,l,u;return i<0?(u=Math.pow(10,-i)/a,s=Math.round(e*u),l=Math.round(t*u),s/u<e&&++s,l/u>t&&--l,u=-u):(u=Math.pow(10,i)*a,s=Math.round(e/u),l=Math.round(t/u),s*u<e&&++s,l*u>t&&--l),l<s&&.5<=r&&r<2?cn(e,t,2*r):[s,l,u]}function pn(e,t,r){return cn(e=+e,t=+t,r=+r)[2]}function dn(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function mn(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function fn(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function hn(){}var gn=.7,yn=1/gn,bn="\\s*([+-]?\\d+)\\s*",vn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",xn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",qn=/^#([0-9a-f]{3,8})$/,Dn=new RegExp(`^rgb\\(${bn},${bn},${bn}\\)$`),Sn=new RegExp(`^rgb\\(${xn},${xn},${xn}\\)$`),Mn=new RegExp(`^rgba\\(${bn},${bn},${bn},${vn}\\)$`),wn=new RegExp(`^rgba\\(${xn},${xn},${xn},${vn}\\)$`),An=new RegExp(`^hsl\\(${vn},${xn},${xn}\\)$`),En=new RegExp(`^hsla\\(${vn},${xn},${xn},${vn}\\)$`),Cn={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 kn(){return this.rgb().formatHex()}function Nn(){return this.rgb().formatRgb()}function In(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=qn.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?Ln(t):3===r?new Rn(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?Tn(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?Tn(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=Dn.exec(e))?new Rn(t[1],t[2],t[3],1):(t=Sn.exec(e))?new Rn(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Mn.exec(e))?Tn(t[1],t[2],t[3],t[4]):(t=wn.exec(e))?Tn(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=An.exec(e))?zn(t[1],t[2]/100,t[3]/100,1):(t=En.exec(e))?zn(t[1],t[2]/100,t[3]/100,t[4]):Cn.hasOwnProperty(e)?Ln(Cn[e]):"transparent"===e?new Rn(NaN,NaN,NaN,0):null}function Ln(e){return new Rn(e>>16&255,e>>8&255,255&e,1)}function Tn(e,t,r,n){return n<=0&&(e=t=r=NaN),new Rn(e,t,r,n)}function On(e,t,r,n){return 1===arguments.length?((i=e)instanceof hn||(i=In(i)),i?new Rn((i=i.rgb()).r,i.g,i.b,i.opacity):new Rn):new Rn(e,t,r,null==n?1:n);var i}function Rn(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function Fn(){return`#${Vn(this.r)}${Vn(this.g)}${Vn(this.b)}`}function Pn(){const e=_n(this.opacity);return`${1===e?"rgb(":"rgba("}${Hn(this.r)}, ${Hn(this.g)}, ${Hn(this.b)}${1===e?")":`, ${e})`}`}function _n(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Hn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Vn(e){return((e=Hn(e))<16?"0":"")+e.toString(16)}function zn(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new $n(e,t,r,n)}function jn(e){if(e instanceof $n)return new $n(e.h,e.s,e.l,e.opacity);if(e instanceof hn||(e=In(e)),!e)return new $n;if(e instanceof $n)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(r-n)/s+6*(r<n):r===o?(n-t)/s+2:(t-r)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new $n(a,s,l,e.opacity)}function $n(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function Bn(e){return(e=(e||0)%360)<0?e+360:e}function Wn(e){return Math.max(0,Math.min(1,e||0))}function Un(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}mn(hn,In,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:kn,formatHex:kn,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return jn(this).formatHsl()},formatRgb:Nn,toString:Nn}),mn(Rn,On,fn(hn,{brighter(e){return e=null==e?yn:Math.pow(yn,e),new Rn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?gn:Math.pow(gn,e),new Rn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Rn(Hn(this.r),Hn(this.g),Hn(this.b),_n(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:Fn,formatHex:Fn,formatHex8:function(){return`#${Vn(this.r)}${Vn(this.g)}${Vn(this.b)}${Vn(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Pn,toString:Pn})),mn($n,(function(e,t,r,n){return 1===arguments.length?jn(e):new $n(e,t,r,null==n?1:n)}),fn(hn,{brighter(e){return e=null==e?yn:Math.pow(yn,e),new $n(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?gn:Math.pow(gn,e),new $n(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Rn(Un(e>=240?e-240:e+120,i,n),Un(e,i,n),Un(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new $n(Bn(this.h),Wn(this.s),Wn(this.l),_n(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=_n(this.opacity);return`${1===e?"hsl(":"hsla("}${Bn(this.h)}, ${100*Wn(this.s)}%, ${100*Wn(this.l)}%${1===e?")":`, ${e})`}`}}));var Kn=e=>()=>e;function Gn(e){return 1===(e=+e)?Yn: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):Kn(isNaN(t)?r:t)}}function Yn(e,t){var r=t-e;return r?function(e,t){return function(r){return e+r*t}}(e,r):Kn(isNaN(e)?t:e)}var Xn=function e(t){var r=Gn(t);function n(e,t){var n=r((e=On(e)).r,(t=On(t)).r),i=r(e.g,t.g),o=r(e.b,t.b),a=Yn(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return n.gamma=e,n}(1);function Jn(e,t){t||(t=[]);var r,n=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(r=0;r<n;++r)i[r]=e[r]*(1-o)+t[r]*o;return i}}function Qn(e,t){var r,n=t?t.length:0,i=e?Math.min(n,e.length):0,o=new Array(i),a=new Array(n);for(r=0;r<i;++r)o[r]=oi(e[r],t[r]);for(;r<n;++r)a[r]=t[r];return function(e){for(r=0;r<i;++r)a[r]=o[r](e);return a}}function Zn(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function ei(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function ti(e,t){var r,n={},i={};for(r in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)r in e?n[r]=oi(e[r],t[r]):i[r]=t[r];return function(e){for(r in n)i[r]=n[r](e);return i}}var ri=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ni=new RegExp(ri.source,"g");function ii(e,t){var r,n,i,o=ri.lastIndex=ni.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(r=ri.exec(e))&&(n=ni.exec(t));)(i=n.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(r=r[0])===(n=n[0])?s[a]?s[a]+=n:s[++a]=n:(s[++a]=null,l.push({i:a,x:ei(r,n)})),o=ni.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var r,n=0;n<t;++n)s[(r=l[n]).i]=r.x(e);return s.join("")})}function oi(e,t){var r,n,i=typeof t;return null==t||"boolean"===i?Kn(t):("number"===i?ei:"string"===i?(r=In(t))?(t=r,Xn):ii:t instanceof In?Xn:t instanceof Date?Zn:(n=t,!ArrayBuffer.isView(n)||n instanceof DataView?Array.isArray(t)?Qn:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?ti:ei:Jn))(e,t)}function ai(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function si(e){return+e}var li=[0,1];function ui(e){return e}function ci(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:(r=isNaN(t)?NaN:.5,function(){return r});var r}function pi(e,t,r){var n=e[0],i=e[1],o=t[0],a=t[1];return i<n?(n=ci(i,n),o=r(a,o)):(n=ci(n,i),o=r(o,a)),function(e){return o(n(e))}}function di(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),o=new Array(n),a=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<n;)i[a]=ci(e[a],e[a+1]),o[a]=r(t[a],t[a+1]);return function(t){var r=an(e,t,1,n)-1;return o[r](i[r](t))}}function mi(){var e,t,r,n,i,o,a=li,s=li,l=oi,u=ui;function c(){var e,t,r,l=Math.min(a.length,s.length);return u!==ui&&(e=a[0],t=a[l-1],e>t&&(r=e,e=t,t=r),u=function(r){return Math.max(e,Math.min(t,r))}),n=l>2?di:pi,i=o=null,p}function p(t){return null==t||isNaN(t=+t)?r:(i||(i=n(a.map(e),s,l)))(e(u(t)))}return p.invert=function(r){return u(t((o||(o=n(s,a.map(e),ei)))(r)))},p.domain=function(e){return arguments.length?(a=Array.from(e,si),c()):a.slice()},p.range=function(e){return arguments.length?(s=Array.from(e),c()):s.slice()},p.rangeRound=function(e){return s=Array.from(e),l=ai,c()},p.clamp=function(e){return arguments.length?(u=!!e||ui,c()):u!==ui},p.interpolate=function(e){return arguments.length?(l=e,c()):l},p.unknown=function(e){return arguments.length?(r=e,p):r},function(r,n){return e=r,t=n,c()}}function fi(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function hi(e){return(e=fi(Math.abs(e)))?e[1]:NaN}var gi,yi=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function bi(e){if(!(t=yi.exec(e)))throw new Error("invalid format: "+e);var t;return new vi({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function vi(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function xi(e,t){var r=fi(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}bi.prototype=vi.prototype,vi.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var qi={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>xi(100*e,t),r:xi,s:function(e,t){var r=fi(e,t);if(!r)return e+"";var n=r[0],i=r[1],o=i-(gi=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=n.length;return o===a?n:o>a?n+new Array(o-a+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+fi(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Di(e){return e}var Si,Mi,wi,Ai=Array.prototype.map,Ei=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Ci(e){var t,r,n=void 0===e.grouping||void 0===e.thousands?Di:(t=Ai.call(e.grouping,Number),r=e.thousands+"",function(e,n){for(var i=e.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>n));)s=t[a=(a+1)%t.length];return o.reverse().join(r)}),i=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",a=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?Di:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(Ai.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",u=void 0===e.minus?"−":e.minus+"",c=void 0===e.nan?"NaN":e.nan+"";function p(e){var t=(e=bi(e)).fill,r=e.align,p=e.sign,d=e.symbol,m=e.zero,f=e.width,h=e.comma,g=e.precision,y=e.trim,b=e.type;"n"===b?(h=!0,b="g"):qi[b]||(void 0===g&&(g=12),y=!0,b="g"),(m||"0"===t&&"="===r)&&(m=!0,t="0",r="=");var v="$"===d?i:"#"===d&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",x="$"===d?o:/[%p]/.test(b)?l:"",q=qi[b],D=/[defgprs%]/.test(b);function S(e){var i,o,l,d=v,S=x;if("c"===b)S=q(e)+S,e="";else{var M=(e=+e)<0||1/e<0;if(e=isNaN(e)?c:q(Math.abs(e),g),y&&(e=function(e){e:for(var t,r=e.length,n=1,i=-1;n<r;++n)switch(e[n]){case".":i=t=n;break;case"0":0===i&&(i=n),t=n;break;default:if(!+e[n])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),M&&0===+e&&"+"!==p&&(M=!1),d=(M?"("===p?p:u:"-"===p||"("===p?"":p)+d,S=("s"===b?Ei[8+gi/3]:"")+S+(M&&"("===p?")":""),D)for(i=-1,o=e.length;++i<o;)if(48>(l=e.charCodeAt(i))||l>57){S=(46===l?a+e.slice(i+1):e.slice(i))+S,e=e.slice(0,i);break}}h&&!m&&(e=n(e,1/0));var w=d.length+e.length+S.length,A=w<f?new Array(f-w+1).join(t):"";switch(h&&m&&(e=n(A+e,A.length?f-S.length:1/0),A=""),r){case"<":e=d+e+S+A;break;case"=":e=d+A+e+S;break;case"^":e=A.slice(0,w=A.length>>1)+d+e+S+A.slice(w);break;default:e=A+d+e+S}return s(e)}return g=void 0===g?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),S.toString=function(){return e+""},S}return{format:p,formatPrefix:function(e,t){var r=p(((e=bi(e)).type="f",e)),n=3*Math.max(-8,Math.min(8,Math.floor(hi(t)/3))),i=Math.pow(10,-n),o=Ei[8+n/3];return function(e){return r(i*e)+o}}}}function ki(e,t,r,n){var i,o=function(e,t,r){r=+r;const n=(t=+t)<(e=+e),i=n?pn(t,e,r):pn(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}(e,t,r);switch((n=bi(null==n?",f":n)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=n.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(hi(t)/3)))-hi(Math.abs(e)))}(o,a))||(n.precision=i),wi(n,a);case"":case"e":case"g":case"p":case"r":null!=n.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,hi(t)-hi(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(n.precision=i-("e"===n.type));break;case"f":case"%":null!=n.precision||isNaN(i=function(e){return Math.max(0,-hi(Math.abs(e)))}(o))||(n.precision=i-2*("%"===n.type))}return Mi(n)}function Ni(e){var t=e.domain;return e.ticks=function(e){var r=t();return function(e,t,r){if(!((r=+r)>0))return[];if((e=+e)===(t=+t))return[e];const n=t<e,[i,o,a]=n?cn(t,e,r):cn(e,t,r);if(!(o>=i))return[];const s=o-i+1,l=new Array(s);if(n)if(a<0)for(let e=0;e<s;++e)l[e]=(o-e)/-a;else for(let e=0;e<s;++e)l[e]=(o-e)*a;else if(a<0)for(let e=0;e<s;++e)l[e]=(i+e)/-a;else for(let e=0;e<s;++e)l[e]=(i+e)*a;return l}(r[0],r[r.length-1],null==e?10:e)},e.tickFormat=function(e,r){var n=t();return ki(n[0],n[n.length-1],null==e?10:e,r)},e.nice=function(r){null==r&&(r=10);var n,i,o=t(),a=0,s=o.length-1,l=o[a],u=o[s],c=10;for(u<l&&(i=l,l=u,u=i,i=a,a=s,s=i);c-- >0;){if((i=pn(l,u,r))===n)return o[a]=l,o[s]=u,t(o);if(i>0)l=Math.floor(l/i)*i,u=Math.ceil(u/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,u=Math.floor(u*i)/i}n=i}return e},e}function Ii(){var e=mi()(ui,ui);return e.copy=function(){return t=e,Ii().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},dn.apply(e,arguments),Ni(e)}Si=Ci({thousands:",",grouping:[3],currency:["$",""]}),Mi=Si.format,wi=Si.formatPrefix;const Li={getMinorTicks({majorTicks:e,minorTickCount:t}){const r=[];for(let n=0;n<e.length-1;n++){const i=e[n],o=(e[n+1]-i)/(t+1);for(let e=1;e<=t;e++)r.push(i+o*e)}return r},adjustTicks({ticks:e,majorTicks:t,minorTicks:r,autoMinMax:n,minMax:i,min:o,max:a}){const s=r[0]-t[0],l=t[0]-o;l>s&&e.unshift({value:t[0]-s,isMinor:!0});const u=a-t[t.length-1];return u>s&&e.push({value:t[t.length-1]+s,isMinor:!0}),n||(("min"===i||"minMax"===i)&&l>0&&e.unshift({value:o,isMinor:!1}),("max"===i||"minMax"===i)&&u>0&&e.push({value:a,isMinor:!1})),e},getTicks({layout:e,height:t}){const{autoMinMax:r,minMax:n,spacing:i}=e.measureAxis;let o=Math.min(...e.generated.qHyperCube.qMeasureInfo.map((e=>e.qMin))),a=Math.max(...e.generated.qHyperCube.qMeasureInfo.map((e=>e.qMax)));if(!r)switch(n){case"min":o=e.measureAxis.min;break;case"max":a=e.measureAxis.max;break;case"minMax":({min:o,max:a}=e.measureAxis)}const s=100*i,l=Math.max(1,Math.round(t/s)),u=Ii().domain([o,a]).ticks(l),c=Li.getMinorTicks({majorTicks:u,minorTickCount:1}),p=[...u.map((e=>({value:e,isMinor:!1}))),...c.map((e=>({value:e,isMinor:!0})))].sort(((e,t)=>e.value-t.value));return Li.adjustTicks({ticks:p,majorTicks:u,minorTicks:c,autoMinMax:r,minMax:n,min:o,max:a})}},Ti=xt.chartID;function Oi(e){this._scrollHandler.setDisabled(!!e)}function Ri(e){let t=-Number.MAX_VALUE;return e.qHyperCube.qMeasureInfo.forEach((e=>{t=Math.max(t,e.qFallbackTitle.length),e.valueType!==xt.valueTypes.SUBTOTAL&&e.subtotal&&e.subtotal.enable&&(t=Math.max(t,e.subtotal.label?e.subtotal.label.length:0))})),Math.min(20,Math.max(0,t))}function Fi(e){return{settings:{labels:{mode:e.dimensionAxis.label,maxGlyphCount:Math.ceil(Zr.stringWidthOverMWidth(Ri(e))),maxLengthPx:this.picassoElement.getBoundingClientRect().height/4}}}}function Pi(e){const t=e.data.measure,r=e.dataset(t.source.key).field(t.source.field);return Fr.formatMeasureValue(r,t)}function _i(e,t){const r=e.getStyles(),n=((e,t,r)=>{var n,i,o,a;const s=null===(n=gt("value",r))||void 0===n?void 0:n.label,l=(null==s||null===(i=s.value)||void 0===i?void 0:i.fontFamily)||t.label.value.fontFamily;let u=(null==s||null===(o=s.value)||void 0===o?void 0:o.fontSize)||t.label.value.fontSize;return u=parseFloat(u),{fontFamily:l,fontSize:u,fill:null==s||null===(a=s.value)||void 0===a||null===(a=a.fontColor)||void 0===a?void 0:a.color}})(0,r,t),i=(null==n?void 0:n.fill)||r.label.value.color,o=r.label.value.darkColor,a=r.label.value.lightColor;return{settings:{sources:[{strategy:{settings:{...n,direction:e=>e.data&&e.data.end.value>e.data.start.value?"up":"down",labels:[{placements:[{fill:i},{fill:null!=n&&n.fill?i:e=>vr.isDark(e.node.attrs.fill)?a:o},{position:"opposite",fill:i,justify:0}],label:Pi}]}}}]}}}function Hi(e,t){return{viewSize:t,max:e.generatedMatrix.length}}function Vi(e,t,r){const{theme:n,translator:i}=e,o=xt.getColorForPositiveValue(t,n),a=xt.getColorForNegativeValue(t,n),s=xt.getColorForSubtotal(t,n),l=i.get("waterfall.legend.positiveValue.label"),u=i.get("waterfall.legend.negativeValue.label"),c=i.get("waterfall.legend.subtotal.label"),p=((e,t,r,n)=>{var i,o,a,s;const l=n.isEnabled("CLIENT_IM_3051")?null===(i=gt("legend",r))||void 0===i?void 0:i.legend:{};return{fontFamily:(null==l||null===(o=l.label)||void 0===o?void 0:o.fontFamily)||t.getStyle(e,"legend.label","fontFamily"),fontSize:(null==l||null===(a=l.label)||void 0===a?void 0:a.fontSize)||t.getStyle(e,"legend.label","fontSize"),color:(null==l||null===(s=l.label)||void 0===s||null===(s=s.fontColor)||void 0===s?void 0:s.color)||t.getStyle(e,"legend.label","color")}})(Ti,n,t,r);return{displayOrder:200,minimumLayoutMode:"MEDIUM",prioOrder:0,scale:{type:"categorical-color",data:[l,u,c],range:[o,a,s]},style:{item:{label:{fontSize:p.fontSize,fontFamily:p.fontFamily,fill:p.color}},title:{show:!1}}}}const zi=ur.extend("WaterfallChart",{namespace:".waterfallchart",chartID:Ti,init:function({picasso:e,environment:t,$element:r,flags:n}){this._super(e,r,t,null,null),this._tooltipHandler=Ur.create(this.chartInstance,r,Ti),this._scrollHandler=new qr(this.chartInstance,r,this.getSlicedData.bind(this),this.updateChart.bind(this)),this._scrollHandler.setOptions({direction:"horizontal"}),this.setDataPaths(["generated/qHyperCube"]),this.flags=n},updateConstraints:function(e){const t=!e.active,r=!e.passive;this._scrollHandler[t?"on":"off"](),this._tooltipHandler[r?"on":"off"]()},off:function(){this._scrollHandler.off(),this._tooltipHandler.off()},createChartSettings:function(e){const t=this.isRtl(),{theme:r}=this.environment,n=!!e.snapshotData,i=rr.create({chartID:Ti,theme:r,isRtl:t,flags:this.flags}),o=this.picassoElement.clientWidth,a=this.picassoElement.clientHeight,s={};s.box=this._tooltipHandler.setUp({chartBuilder:i,environment:this.environment,data:[""],contexts:["boxTip"],componentKey:"box-marker",headerResolver(){},rowResolver(e,t,r){const n=r.boxColor.value;return{value:Fr.formatMeasureValue(e,t),label:r.tooltip.value.qText,color:n}},labelData:["tooltip"],measureRows:["measure"]});const l={scrollHandler:this._scrollHandler,selectionHandler:null};this._dependentActions&&this._dependentActions.destroy(),this._dependentActions=Tr.create(l,"vertical",t,{componentKey:"box-marker"}),i.addPreset("dimension-measure-chart",{isRtl:t,orientation:"vertical",theme:r,gridlines:e.gridlines,includeDimensionAxis:!0,dimensionAxisProperties:e.dimensionAxis,dimensionAxisSettings:Fi.call(this,e),dimensionSource:en.getGeneratedDimensionPath(0),dimensionScaleSettings:{component:{maxPxStep:()=>a/4}},includeMeasureAxis:!0,measureAxisProperties:e.measureAxis,measureSource:[en.getGeneratedMeasurePath(0),en.getGeneratedMeasurePath(1)],measureScaleSettings:{component:{expand:0,include:[0],ticks:{values:()=>Li.getTicks({layout:e,height:a})}}},hasNavigation:!n,isNavigationEnabledFn:()=>this._scrollHandler.isOn(),scrollSettings:Hi(e,this._scrollHandler.getScrollViewSizeInItem()),refLines:e.refLine&&e.refLine.refLines,brushActions:this._dependentActions.gestures,axisLabelStyle:yt(Ti,r,e)}),i.addComponent("box-marker",function(e,t){const r=e?[e.box.trigger]:[],n=e?e.box.consume:[];return{data:{extract:{key:"qHyperCube",field:en.getGeneratedDimensionPath(0),props:{start:{field:en.getGeneratedMeasurePath(0)},end:{field:en.getGeneratedMeasurePath(1)},measure:{field:en.getGeneratedMeasurePath(2),reduce:"first",value:e=>e},boxColor:{field:en.getGeneratedDimensionPath(1),value:e=>e.qText},isCustomFormatted:!!t.qDef.isCustomFormatted,tooltip:{value:e=>e}}}},settings:{major:{scale:"dimension"},minor:{scale:"measure"},orientation:"",box:{width:.7,maxWidthPx:4e3,fill:e=>e.datum.boxColor.value,strokeWidth:0}},brush:{trigger:r,consume:n}}}(s,e)),i.addComponent("point-marker",function(e,t){const r=t.getStyle(Ti,"shape.bridge","stroke");return{data:{extract:{key:"qHyperCube",field:en.getGeneratedDimensionPath(0),props:{x:{},y:{field:en.getGeneratedMeasurePath(1)}}}},settings:{x:{scale:"dimension",ref:"x",fn:t=>e?t.scale(t.datum.value):t.scale(t.datum.value)+t.scale.bandwidth()},y:{scale:"measure"},sizeLimits:{maxPx:2e4,maxRelExtent:1e4,minRelDiscrete:0,maxRelDiscrete:1},shape:"line",stroke:r,size:1-.7,strokeDasharray:"4 4",fill:"none",strokeWidth:(e,t)=>t===e.data.items.length-1?0:2}}}(t,r)),e.legend&&!e.legend.show||i.addComponent("categorical-legend",Vi(this.environment,e,this.flags),{dock:e.legend?e.legend.dock:"auto",isRtl:t,chartWidth:o,chartHeight:a});const u=function(e){var t=e.theme,r=e.config,n=void 0===r?{}:r,i=n.id,o=n.resolve,a=void 0===o?[]:o,s=n.transform,l=void 0===s?[]:s,u=n.extend,c=void 0===u?[]:u,p={theme:t,matrix:mt(a),styles:void 0};return p.styles=ht({theme:t,id:i,transform:l,extend:c,matrix:p.matrix}),{getStyles:function(){return p.styles},getTheme:function(){return p.theme},setTheme:function(e){p.theme=e,p.styles=ht({theme:e,id:i,transform:l,extend:c,matrix:p.matrix})}}}({theme:r,config:{id:"waterfallChart"}});e.dataPoint.showLabels&&i.addComponent("labels",_i(u,e));const c=i.getSettings();return this.addSnapshotChartSettings(c,e),c},updateData:function(e){const{theme:t,options:r}=this.environment,n=this;return this._super(e).then((()=>{if(n._destroyed)return Promise.reject();let i,o;if(!!e.snapshotData){const e=n.layout.generated.qHyperCube.qDataPages[0].qArea;i=e.qTop,o=e.qHeight,en.generateHyperCube(n.layout,t)}else{en.generateHyperCube(n.layout,t),Oi.call(n,!0);const{viewState:e}=r;e?(n._scrollHandler.updateViewState(n.layout.generatedMatrix.length),n._scrollHandler.setScrollState(e.scroll),i=e.scroll):(n._scrollHandler.resetScroll(),i=0),o=n._scrollHandler.getScrollViewSizeInItem()}en.generateSlicedHyperCube(n.layout,i,o)}))},resize:function(){this._scrollHandler.onResize(),this._super()},paint:function(){const e=!!this.layout.snapshotData;e||this.environment.options.viewState||Oi.call(this,!1),this._tooltipHandler.closeTooltip();const t=this.layout.generated.qHyperCube.qDataPages[0].qMatrix.length,r=this.layout.generatedMatrix.length;if(!e&&this._scrollHandler.isDataSizeChanged(t,r)){const e=this._super,t=this;return this._scrollHandler.getViewData().finally((()=>e.call(t)))}return this._super()},getSlicedData:function(e,t){return en.generateSlicedHyperCube(this.layout,e,t),Promise.resolve(this.layout)},setSnapshotData:function(e){this._super(e),e.generated=this.layout.generated,e.generatedMatrix=this.layout.generatedMatrix},getViewState:function(){return{scroll:this._scrollHandler.getScrollState()}}});function ji(q){return function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(D).forEach((t=>{e.add(D[t])}))}}(q.translator),{qae:O(q),ext:wt(q),component(){const D=d(),w=function(){const e=i(),r=o(),n=a(),c=t(),p=s(),d=l();return u((()=>({app:e,appLayout:r,deviceType:n,options:c,theme:p,translator:d})),[e,r,c.direction,c.freeResize,d.language(),p.name(),n])}(),A=w.options.renderer,E=u((()=>function(e){const t=y();return t.renderer.prio([e||"canvas"]),t.use(b),t.use(v(x)),t.use(S),t.component("disclaimer",M),t}(A)),[A]),C=m(),k=r(),[N,I]=f();var L;h((()=>{const e=g(D),t=new zi({picasso:E,environment:w,$element:e,flags:q.flags});return I(t),()=>{t.destroy()}}),[]),function(...e){const[,t]=n(...e);if(t)throw t}((async()=>{N&&(N.updateEnvironment(w),N.updateConstraints(k),await N.updateData(C),await N.paint())}),[C,N,w]),function(i){const o=e(),a=t(),s=r(),[,l]=n((async()=>{i&&(i.updateConstraints(s),i.options=a,await i.resize())}),[o.width,o.height]);if(l)throw l}(N),L=N,c((e=>{if(L)return L.setSnapshotData(e)})),p((()=>({getViewState(){if(L)return L.getViewState()}})),[L])}}}export{ji as default};
|
|
12
10
|
//# sourceMappingURL=index.js.map
|