@nebula.js/sn-waterfall 0.34.1 → 0.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/core/esm/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  /*
2
- * @nebula.js/sn-waterfall v0.34.1
2
+ * @nebula.js/sn-waterfall v0.36.0
3
3
  * Copyright (c) 2023 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 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:"0.34.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 E(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 A(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var C={};window,{get exports(){return C},set exports(e){C=e}}.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/conversion/",r(r.s=2)}([function(e,t,r){var n=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===i.call(e)},l=function(e){if(!e||"[object Object]"!==i.call(e))return!1;var t,r=n.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!o)return!1;for(t in e);return void 0===t||n.call(e,t)},u=function(e,t){o&&"__proto__"===t.name?o(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},c=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};e.exports=function e(){var t,r,n,i,o,a,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=c(p,r),p!==(i=c(t,r))&&(f&&i&&(l(i)||(o=s(i)))?(o?(o=!1,a=n&&s(n)?n:[]):a=n&&l(n)?n:{},u(p,{name:r,newValue:e(f,a,i)})):void 0!==i&&u(p,{name:r,newValue:i}));return p}},function(e,t,r){e.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/qlik-modifiers/",r(r.s=1)}([function(e,t,r){var n=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===i.call(e)},l=function(e){if(!e||"[object Object]"!==i.call(e))return!1;var t,r=n.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!o)return!1;for(t in e);return void 0===t||n.call(e,t)},u=function(e,t){o&&"__proto__"===t.name?o(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},c=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};e.exports=function e(){var t,r,n,i,o,a,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=c(p,r),p!==(i=c(t,r))&&(f&&i&&(l(i)||(o=s(i)))?(o?(o=!1,a=n&&s(n)?n:[]):a=n&&l(n)?n:{},u(p,{name:r,newValue:e(f,a,i)})):void 0!==i&&u(p,{name:r,newValue:i}));return p}},function(e,t,r){r.r(t);var n=r(0),i=r.n(n),o=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},a=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},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).trim();return"="===t.substring(0,1)?t.substring(1).trim():t}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,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=MinString(").concat(t,"))' and Only({1}").concat(t,")<='$(=MaxString(").concat(t,"))'\"}")}function b(e){var t=e.modifier,r=void 0===t?{}:t,n=e.dimensions,i=e.dimensionAndFieldList,o=e.funcComp,a=void 0===o?"Sum":o,s=e.valueComp,l=void 0===s?"0":s;if(!r.showExcludedValues)return"";if(n&&1===n.length){var u=y(c(n[0],i),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=y(p,m),b=y(d,h);return"".concat(a,"({1<").concat(g,",").concat(b,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function v(e){return"".concat(e,"(")}function x(e){var t=e.properties,r=e.layout;return a(t,"qHyperCubeDef.qDimensions",a(r,"qHyperCube.qDimensionInfo",[])).length}var q={isFullRange:p,getNumDimensions:x,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=b({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:v,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return v(e)+t+")"},getAggrComp:function(e,t,r){return"Aggr(".concat(e,", ").concat(t,", ").concat(r,")")},getExcludedComp:b,needDimension:function(e){var t=e.modifier,r=e.properties,n=e.layout;return 0===function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t)&&2===x({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=x({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,"]")}};function D(e){return(D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var S=i.a.bind(null,!0),M={},w=Array.isArray;function E(e){return null!=e&&!Array.isArray(e)&&"object"===D(e)}function A(e){return void 0===e}function C(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function k(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]=A(e[r||t])?o:e[t],e=e[r||t]}})),e}function N(e,t){var r=!0;if(E(e)&&E(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((function(n){N(e[n],t[n])||(r=!1)})),r);if(w(e)&&w(t)){if(e.length!==t.length)return!1;for(var n=0,i=e.length;n<i;n+=1)if(!N(e[n],t[n]))return!1;return!0}return e===t}M.generate=function(e,t,r){r=r||"";var n=[];return Object.keys(t).forEach((function(i){var o=function(e){return e?S({},{val:e}).val:e}(t[i]),a=e[i],s="".concat(r,"/").concat(i);N(o,a)||C(t,i)||(A(a)?n.push({op:"add",path:s,value:o}):E(o)&&E(a)?n=n.concat(M.generate(a,o,s)):w(o)&&w(a)?n=n.concat(function(e,t,r){var n=[],i=e.slice(),o=-1;function a(e,t,r){if(e[r]&&A(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(N(t,i))return n;if(!A(t[0])&&A(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(M.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){A(t[i])&&!C(e,i)&&n.push({op:"remove",path:"".concat(r,"/").concat(i)})})),n},M.apply=function(e,t){t.forEach((function(t){var r,n=k(e,t.path),i=t.path.split("/").splice(-1)[0],o=i&&Number.isNaN(+i)?n[i]:n[+i]||n,a=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(n=null,o=e),"add"===t.op||"replace"===t.op)if(w(n))"-"===i&&(i=n.length),n.splice(+i,"add"===t.op?0:1,t.value);else if(w(o)&&w(t.value)){var s,l=t.value.slice();o.length=0,(s=o).push.apply(s,function(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}(l))}else if(E(o)&&E(t.value))r=o,Object.keys(r).forEach((function(e){Object.getOwnPropertyDescriptor(r,e).configurable&&!C(r,e)&&delete r[e]})),S(o,t.value);else{if(!n)throw new Error("Patchee is not an object we can patch");n[i]=t.value}else if("move"===t.op){var u=k(e,t.from);w(n)?n.splice(+i,0,u.splice(+a,1)[0]):(n[i]=u[a],delete u[a])}else"remove"===t.op&&(w(n)?n.splice(+i,1):delete n[i])}))},M.clone=function(e){return S({},e)},M.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},M.updateObject=function(e,t){Object.keys(e).length?M.apply(e,M.generate(e,t)):S(e,t)};var I=M,L=function(e,t,r){if(!e)return Promise.resolve();var n=I.generate(t,r);return i()(!0,t,r),n&&n.length?(n=n.map((function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}})),e.applyPatches(n,!0)):Promise.resolve()},T="accumulation";function R(e,t){var r=a(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===T)return r[n]}function O(e,t){var r=function(e,t){var r=a(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===T)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var P={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""},F={translationKey:"properties.modifier.accumulation",needDimension:q.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return q.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,o=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=o;void 0===l&&(l=q.getNumDimensions({properties:n,layout:i}));var u=a(n,"qHyperCubeDef.qDimensions",[]),c=q.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),p=q.getNumStepComp(r,l),d=q.getAboveComp(r,l,c,p),m=q.getRangeComp("RangeSum",d);if(q.needDimension({modifier:r,properties:n,layout:i})){var f=q.getDimComp(u,1),h=q.getDimComp(u,0),g=q.getAggrComp(m,f,h);m=r.showExcludedValues?q.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:s,valueComp:g}):g}return m},extractInputExpression:q.extractInputExpression,initModifier:function(e){q.initModifier(e,P)},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!q.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(O(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(O(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(O(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(O(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var r=R(t,e);if(r){var n=r.steps;r.steps="number"!=typeof n||Number.isNaN(n)?6:Math.abs(n)}},show:function(t){var r=R(t,e);return r&&!r.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(O(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return q.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(T))return!1;var o=R(t,e);return o&&!o.disabled}};return r}},_="movingAverage";function H(e,t){var r=a(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===_)return r[n]}function V(e,t){var r=function(e,t){var r=a(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===_)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var z={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1},j={translationKey:"properties.modifier.movingAverage",needDimension:q.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return q.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,r=e.expression,n=e.modifier,i=e.properties,o=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!n)return r;var u=s;void 0===u&&(u=q.getNumDimensions({properties:i,layout:o}));var c=a(i,"qHyperCubeDef.qDimensions",[]),p=n.showExcludedValues&&n.nullSuppression,d=q.getExpressionWithExcludedComp({expression:r,modifier:n,dimensions:c,dimensionAndFieldList:l,treatMissingAsNull:p}),m=q.getNumStepComp(n,u),f=q.getAboveComp(n,u,d,m);if(n.nullSuppression)t=q.getRangeComp("RangeAvg",f);else{var h=q.getRangeComp("RangeSum",f),g=function(e,t){var r=q.getRowNoComp(e,t);if(!q.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(q.needDimension({modifier:n,properties:i,layout:o})){var b=q.getDimComp(c,1),v=q.getDimComp(c,0),x=q.getAggrComp(y,b,v);y=n.showExcludedValues?q.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return y},extractInputExpression:q.extractInputExpression,initModifier:function(e){q.initModifier(e,z)},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!q.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(V(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(V(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(V(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(V(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var r=H(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=H(t,e);return r&&!r.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(V(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(V(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return q.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(_))return!1;var o=H(t,e);return o&&!o.disabled}};return r}},B="difference";function $(e,t){var r=a(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===B)return r[n]}function U(e,t){var r=function(e,t){var r=a(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===B)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var W={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""},K={translationKey:"properties.modifier.difference",needDimension:q.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return q.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:q.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,i=e.layout,o=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=o;void 0===l&&(l=q.getNumDimensions({properties:n,layout:i}));var u=a(n,"qHyperCubeDef.qDimensions",[]),c=q.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),p=q.getAboveComp(r,l,c),d="".concat(c," - ").concat(p);if(q.needDimension({modifier:r,properties:n,layout:i})){var m=q.getDimComp(u,1),f=q.getDimComp(u,0),h=q.getAggrComp(d,m,f);d=r.showExcludedValues?q.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:s,funcComp:"Only",valueComp:h}):h}return d},initModifier:function(e){Object.keys(W).forEach((function(t){void 0===e[t]&&(e[t]=W[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!q.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(U(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(U(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(U(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return q.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(B))return!1;var o=$(t,e);return o&&!o.disabled}};return r}},G={CURRENT_SELECTION:0,SELECT_FIELD_VALUE:1,DISREGARD_SELECTION:2},Y={ONE_DIMENSION:0,ALL_DIMENSIOANS:1,DISREGARD_ALL_DIMENSIONS:2},J="normalization";function X(e,t){var r=a(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===J)return r[n]}function Q(e,t){var r=function(e,t){var r=a(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===J)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}function Z(e,t){for(var r=0;r<e.length;r++)if(e[r].value===t)return r;return-1}function ee(e,t,r,n){var i=t.layout.qHyperCube.qDimensionInfo.length,o=[{value:Y.ONE_DIMENSION,translation:r.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:r.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:Y.ALL_DIMENSIOANS,translation:r.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension"),tooltipTranslation:r.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension",".tooltip")},{value:Y.DISREGARD_ALL_DIMENSIONS,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,r){if(e<2){var n=Z(t,0);t.splice(n,1)}return t}(i,o),function(e,t,r){if(0===e){var n=Z(t,1);t.splice(n,1)}return t}(X(e,n).selectionScope,o)}function te(e,t,r){var n=[{value:G.CURRENT_SELECTION,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:G.SELECT_FIELD_VALUE,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:G.DISREGARD_SELECTION,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return function(e,t,r){if(1===e){var n=Z(t,0);t.splice(n,1)}return t}(X(e,r).dimensionalScope,n)}var re={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:Y.DISREGARD_ALL_DIMENSIONS,selectionScope:G.DISREGARD_SELECTION};function ne(e){return 2===e?"{1}":""}function ie(e,t,r){return 1===e?"{$<".concat(q.getFieldWithWrapper(t),"={'").concat(r,"'}>}"):""}function oe(e,t){return 0===e&&t>1||2===e?"Total":""}function ae(e,t,r){return 0===e&&t>1?"<".concat(q.getDimDefWithWrapper(r),">"):""}var se={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,r=e.layout;return q.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:q.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,i=e.layout,o=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=o;void 0===l&&(l=q.getNumDimensions({properties:n,layout:i}));var u=a(n,"qHyperCubeDef.qDimensions",[]),c=q.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=ne(t),l=ie(t,r,n),u=""===s&&""===l?"":s||l,c=oe(i,o),p=ae(i,o,a),d=function(e){for(var t=[],r=0;r<e;r++)t[r]=q.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(re).forEach((function(t){void 0===e[t]&&(e[t]=re[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!q.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(Q(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:G.DISREGARD_SELECTION,options:function(r){return te(r,t,e)}},field:{refFn:function(t){return"".concat(Q(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 X(t,e).selectionScope===G.SELECT_FIELD_VALUE}},value:{refFn:function(t){return"".concat(Q(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return X(t,e).selectionScope===G.SELECT_FIELD_VALUE}},dimensionalScope:{refFn:function(t){return"".concat(Q(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:Y.DISREGARD_ALL_DIMENSIONS,supportTooltip:!0,options:function(r,n){return ee(r,n,t,e)}},primaryDimension:{refFn:function(t){return"".concat(Q(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(X(t,e).dimensionalScope||0)===Y.ONE_DIMENSION&&r.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return q.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(J))return!1;var o=X(t,e);return o&&!o.disabled}};return r},getDisregardSelectionComp:ne,getFieldSelectionComp:ie,getTotalComp:oe,getSelectedDimComp:ae},le={getExpression:function(e){return a(e,"qDef.base.qDef")||a(e,"qDef.qDef")},getExpressionRef:function(e){return a(e,"qDef.base.qDef")?"qDef.base.qDef":"qDef.qDef"},getLibraryIdRef:function(e){return a(e,"qDef.base.qLibraryId")?"qDef.base.qLibraryId":"qLibraryId"},getLibraryId:function(e){return a(e,"qDef.base.qLibraryId")||a(e,"qLibraryId")},getLabelRef:function(e){return a(e,"qDef.base")?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return a(e,"qDef.base")?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}},ue={initBase:function(e,t){(t||ue.isValid(e))&&(o(e,"qDef.base.qDef",a(e,"qDef.qDef")),o(e,"qDef.base.qLibraryId",a(e,"qLibraryId")),o(e,"qDef.base.qLabel",a(e,"qDef.qLabel")),o(e,"qDef.base.qLabelExpression",a(e,"qDef.qLabelExpression")))},restoreBase:function(e){ue.isValid(e)&&(o(e,"qDef.qDef",a(e,"qDef.base.qDef")),o(e,"qLibraryId",a(e,"qDef.base.qLibraryId")),o(e,"qDef.qLabel",a(e,"qDef.base.qLabel")),o(e,"qDef.qLabelExpression",a(e,"qDef.base.qLabelExpression")),a(e,"qDef.qAggrFunc")&&a(e,"qDef.base.qAggrFunc")&&o(e,"qDef.qAggrFunc",a(e,"qDef.base.qAggrFunc")),delete e.qDef.base)},isValid:function(e){var t=a(e,"qDef.base.qDef"),r=a(e,"qDef.base.qLibraryId");return void 0!==t||void 0!==r}},ce=ue;function pe(e){return(pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var de={accumulation:F,movingAverage:j,difference:K,normalization:se},me=(t.default={modifiers:de,apply:fe,applyModifiers:he,cleanUpMeasure:ge,destroy:function(e){e&&me[e.id]&&me[e.id].masterItemSubscriber&&(me[e.id].masterItemSubscriber&&me[e.id].masterItemSubscriber.unsubscribe(),delete me[e.id])},hasActiveModifiers:ye,getActiveModifier:be,initBase:ce.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some((function(e){return de[e]}))},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some((function(e){return de[e]&&de[e].isApplicable({properties:r,layout:n})}))},measureBase:le,limitedSorting:function(e){var t=e.measures,r=e.properties,n=e.layout,i=!1,o=!1;return t.forEach((function(e){var t=qe(e);Ce({modifiers:t,properties:r,layout:n})&&(i=!0,o=o||Te({modifiers:t,properties:r,layout:n}))})),i&&!o},ifEnableTotalsFunction:ve},{});function fe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.model,r=e.properties,n=e.isSnapshot,o=void 0!==n&&n,s=e.masterItem;me[t.id]=me[t.id]||{isFirstTime:!0};var l=me[t.id].isFirstTime;if(me[t.id].isFirstTime=!1,r&&"object"===pe(r))return he({model:t,properties:r});var u=t?t.layout:void 0,c=a(u,"qSelectionInfo.qInSelections");if(o||c)return Promise.resolve(!1);var p=a(u,"qHyperCube.qMeasureInfo"),d=me[t.id].lastReloadTime;if(me[t.id].lastReloadTime=a(t,"app.layout.qLastReloadTime"),ye({measures:p,layout:u})){var m=function(e){var t=e.measures,r=e.layout,n=e.lastReloadTime;return a(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 Ae({measure:e,properties:r,layout:n})}))}({measures:t,layout:r})}({measures:p,layout:u,model:t,lastReloadTime:d});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 Ce({modifiers:qe(t),layout:r})?!t.base:!!t.base}({measure:e,layout:r})})))}({measures:p,layout:u,masterItem:s,isFirstTime:l})?t.getEffectiveProperties().then((function(e){var r=i()(!0,{},e);Se(r);var n=Re(r);return ke({model:t}).then((function(i){return Ne({libraryIds:n,model:t}).then((function(n){return m&&function(e){var t=e.properties;xe(t).forEach((function(e){return function(e){var t=e.measure;if(Ae({measure:t,properties:e.properties})){var r=0,n=t.qDef.modifiers;Array.isArray(n)&&n.forEach((function(e){if("object"===pe(e)&&!e.disabled){if(r++,"object"!==pe(de[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=de[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==n&&we(t)&&q.simplifyExpression(t.qDef.base.qDef)!==q.simplifyExpression(n)&&(t.qDef.base.qDef=n)}}))}}({measure:e,properties:t})}))}({properties:r}),he({model:t,oldProperties:e,properties:r,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:n,dimensionAndFieldList:i})}))}))})):Promise.resolve(!1)}return function(e){return!!Array.isArray(e)&&e.some((function(e){return"object"===pe(e.base)}))}(p)?t.getEffectiveProperties().then((function(e){return function(e){var t=e.model,r=e.properties,n=Re(r);return Oe({model:t,libraryIds:n}).then((function(){var e=i()(!0,{},r);return xe(r).forEach((function(e){return ge(e)})),Le({oldProperties:e,newProperties:r,model:t})}))}({model:t,properties:e})})):Promise.resolve(!1)}function he(e){var t=e.model,r=e.oldProperties,n=e.properties,o=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,u=e.masterItem,c=e.libraryItemsProps,p=e.dimensionAndFieldList;void 0===r&&(r=l?i()(!0,{},n):n),Se(n);var d=Re(n);return Oe({model:t,libraryIds:d,masterItem:u}).then((function(){return function(e){var t=e.measures,r=e.properties,n=e.model,o=e.libraryItemsProps,s=e.dimensionAndFieldList;if(t||(t=xe(r)),!t.length)return Promise.resolve();if(!ye({measures:t,properties:r}))return t.forEach((function(e){return ge(e)})),Promise.resolve();var l=o?void 0:Re(r);return ke({model:n,dimensionAndFieldList:s}).then((function(e){return Ne({libraryIds:l,model:n,libraryItemsProps:o}).then((function(n){t.forEach((function(t){Ce({modifiers:t.qDef.modifiers,properties:r})?(function(e){var t=e.measure,r=e.properties,n=e.libraryItemsProps,o=e.dimensionAndFieldList,s=0;ce.isValid(t)||ce.initBase(t,!0);var l=t.qDef,u=l.modifiers,c=l.base;Array.isArray(u)&&u.forEach((function(e){if("object"===pe(e)&&!e.disabled){if(s++,"object"!==pe(de[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)");de[e.type].initModifier(e);var l=t.qLibraryId||c&&c.qLibraryId;l?function(e){var t=e.measure,r=e.modifier,n=e.properties,o=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=de[r.type].generateExpression({expression:s,modifier:r,properties:n,dimensionAndFieldList:o});r.outputExpression=l,t.qDef.qDef=r.outputExpression,(t.qDef.qLabel||a.qMeasure.qLabel)&&(t.qDef.qLabel=a.qMeasure.qLabel),(t.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(t.qDef.qLabelExpression=a.qMeasure.qLabelExpression),t.qDef.quarantine&&t.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(t.qDef.qNumFormat=a.qMeasure.qNumFormat,t.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete t.qLibraryId,t.qDef.coloring=a.qMeasure.coloring,r.base=i()(!0,{},t.qDef.base)}({measure:t,modifier:e,libraryId:l,properties:r,libraryItemsProps:n,dimensionAndFieldList:o}):function(e){var t=e.measure,r=e.modifier,n=e.properties,o=e.dimensionAndFieldList;"function"==typeof de[r.type].updateModifier&&de[r.type].updateModifier(r,n.qHyperCubeDef);var a=le.getExpression(t),s=de[r.type].generateExpression({expression:a,modifier:r,properties:n,dimensionAndFieldList:o});r.outputExpression=s,t.qDef.qDef=r.outputExpression,t.qDef.base.qLabelExpression?t.qDef.qLabelExpression=t.qDef.base.qLabelExpression:t.qDef.qLabel=t.qDef.base.qLabel||a,r.base=i()(!0,{},t.qDef.base)}({measure:t,modifier:e,properties:r,dimensionAndFieldList:o}),function(e){var t=a(e,"qDef.qAggrFunc");"Expr"!==t||ve(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&ve(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(t)}}))}({measure:t,properties:r,libraryItemsProps:n,dimensionAndFieldList:e}),Me(t)):ge(t)}))}))}))}({measures:o,properties:n,model:t,libraryItemsProps:c,dimensionAndFieldList:p}).then((function(){return l?Le({oldProperties:r,newProperties:n,model:t}):Promise.resolve(!1)}))}))}function ge(e){!function(e){var t=qe(e);return Array.isArray(t)&&t.some((function(e){return"object"===pe(e)&&!e.disabled&&!de[e.type]}))}(e)?ce.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,Me(e)}function ye(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ce({modifiers:qe(e),properties:r,layout:n})}))}function be(e){var t=qe(e);if(Array.isArray(t))for(var r=0;r<t.length;r++){var n=t[r];if(de[n.type]&&!n.disabled)return n}}function ve(e){var t=be(e);return!t||de[t.type].enableTotalsFunction(e)}function xe(e){return a(e,"qHyperCubeDef.qMeasures",[]).concat(a(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function qe(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function De(e){return a(e,"outputExpression.qValueExpression.qExpr")||a(e,"outputExpression")}function Se(e){xe(e).forEach((function(e){return function(e){var t=be(e);t&&(void 0!==t.outputExpression&&De(t)!==e.qDef.qDef?delete e.qDef.base:!ce.isValid(e)&&t.base&&(e.qDef.base=i()(!0,{},t.base)))}(e)}))}function Me(e){var t=qe(e);Array.isArray(t)&&t.forEach((function(t){"object"===pe(t)&&(t.disabled||!de[t.type]&&De(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)}))}function we(e){return e.base||e.qDef&&e.qDef.base}function Ee(e){var t=we(e);return e.qLibraryId||t&&t.qLibraryId}function Ae(e){var t=e.measure,r=e.properties,n=e.layout;return!Ee(t)&&Ce({modifiers:qe(t),properties:r,layout:n})}function Ce(e){var t=e.modifiers,r=e.properties,n=e.layout,i={};return Array.isArray(t)&&t.some((function(e){return!("object"!==pe(e)||e.disabled||!de[e.type])&&(void 0===i[e.type]&&(i[e.type]=de[e.type].isApplicable({properties:r,layout:n})),i[e.type])}))}function ke(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 Ne(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 Ie(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Le(e){var t=e.oldProperties,r=e.newProperties,n=e.model,i=JSON.stringify(a(t,"qHyperCubeDef.qMeasures"),Ie)!==JSON.stringify(a(r,"qHyperCubeDef.qMeasures"),Ie)||JSON.stringify(a(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ie)!==JSON.stringify(a(r,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ie);return i?function(e){var t=e.model,r=e.oldProperties,n=e.newProperties,i=t.layout;return i&&!i.qHasSoftPatches&&!i.qExtendsId&&a(i,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(n):L(t,r,n)}({model:n,oldProperties:t,newProperties:r}).then((function(){return i})):Promise.resolve(i)}function Te(e){var t=e.modifiers,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some((function(e){return"object"===pe(e)&&!e.disabled&&de[e.type]&&de[e.type].needDimension({modifier:e,properties:r,layout:n})}))}function Re(e){var t=xe(e),r=[],n=[],i=!1;return t.forEach((function(t){var n=qe(t);if(Ce({modifiers:n,properties:e})){var o=Ee(t);o&&r.push(o),i=i||Te({modifiers:n,properties:e})}})),a(e,"qHyperCubeDef.qDimensions",[]).forEach((function(e){var t=e.qLibraryId;t&&n.push(t)})),{measureLibraryIds:r,dimensionLibraryIds:n}}function Oe(e){var t=e.model,r=e.libraryIds;return!e.masterItem&&r&&(r.measureLibraryIds.length||r.dimensionLibraryIds.length)?(me[t.id].masterItemSubscriber=me[t.id].masterItemSubscriber||function(e){var t=e.model,r=e.callback,n={},i={},o={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},r=a(e,"qInfo.qType");return r&&s[r]&&s[r].forEach((function(r){t[r]=a(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,a=e.dimensionLibraryIds,s=[];return function(e){var t=e.dimensionLibraryIds;i={},e.measureLibraryIds.forEach((function(e){i[e]=!0})),o={},t.forEach((function(e){o[e]=!0}))}({measureLibraryIds:r,dimensionLibraryIds:a}),Object.keys(n).forEach((function(e){i[e]||o[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(o).forEach((function(e){o[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 fe({model:t,masterItem:e}).then((function(){return t.app.clearUndoBuffer()}))}}),me[t.id].masterItemSubscriber.subscribe(r)):Promise.resolve()}}])},function(e,t,r){function n(e){var t=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)}(e%62),r=Math.floor(e/62);return r>0?n(r)+t:t}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})(e)}r.r(t);var 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 n(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}var 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},d=r(1),m=r.n(d),f={addDimensions: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))},addMeasures: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))},setInterColumnSortOrder: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())},copyProperties:function(e){var t=e.exportFormat,r=e.properties;Object.keys(r).forEach((function(e){t.properties[e]=r[e]}))},updateLayoutExclude: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},storeMeasuresModifiers:function(e){e.forEach((function(e){m.a.cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)}))}};function h(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 g=r(0),y=r.n(g);function b(e,t){var r=y()(!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 v(e,t){return y()(!0,{},t,e)}function x(e,t,r){return"function"==typeof e?e(t):Number.isNaN(+e)?r:e}var q=Math.pow(2,53)-1;function D(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 M(e){return function(e){if(Array.isArray(e))return w(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 w(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)?w(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 w(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var E={importCommonProperties: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},copyPropertyIfExist:function(e,t,r){t.hasOwnProperty(e)&&(r[e]=t[e])},copyPropertyOrSetDefault:function(e,t,r,n){t.hasOwnProperty(e)?r[e]=t[e]:r[e]=n},getDefaultDimension: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}}},getDefaultMeasure:function(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}},addDimensions: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=b(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=b(s.excludedDimensions[t],a);o.qDimensions.length<i?o.qDimensions.push(u):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(u)}},addMeasures: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=v(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=v(s.excludedMeasures[t],a);o.qMeasures.length<i?o.qMeasures.push(u):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(u)}},getMaxMinDimensionMeasure: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=x(a.max,i.dimensions.length,q),l=x(a.min,i.dimensions.length,0);return{maxDimensions:x(o.max,s,q),minDimensions:x(o.min,l,0),maxMeasures:s,minMeasures:l}},setInterColumnSortOrder: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))},createNewProperties: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=y()(!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=y()(!0,{},r,i)).components&&(i.components=[]),i},shouldInitLayoutExclude: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},initLayoutExclude: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=[]))},updateDimensionsOnAdded:function(e){var t=e.newProperties,r=e.dataDefinition,n=e.hypercubePath;if(r.dimensions&&"function"==typeof r.dimensions.added){var i=o.getValue(t,n||"").qHyperCubeDef,a=D(i.qDimensions);i.qDimensions=[],a.forEach((function(e){i.qDimensions.push(e),r.dimensions.added(e,t)}))}},updateMeasuresOnAdded:function(e){var t=e.newProperties,r=e.dataDefinition,n=e.hypercubePath;if(r.measures&&"function"==typeof r.measures.added){var i=o.getValue(t,n||"").qHyperCubeDef,a=M(i.qMeasures);i.qMeasures=[],a.forEach((function(e){i.qMeasures.push(e),r.measures.added(e,t)}))}},restoreMeasuresModifiers:function(e){var t=e.measures,r=e.modifierTypes;t&&r&&m.a.isSupportedModifiers(r)&&t.forEach((function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store}))}};function A(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)}var C={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.addDimensions({exportFormat:i,qHyperCubeDef:l}),f.addMeasures({exportFormat:i,qHyperCubeDef:l}),f.setInterColumnSortOrder({exportFormat:i,qHyperCubeDef:l}),delete l.qLayoutExclude,f.copyProperties({exportFormat:i,properties:a}),r&&(i.properties.qHyperCubeDef=l,delete s.qHyperCubeDef),f.updateLayoutExclude({exportFormat:i,properties:a}),n||f.storeMeasuresModifiers(i.properties.qHyperCubeDef.qMeasures),Array.isArray(i.properties.filters)&&(h(i.properties,"filters","storedFilters"),delete i.properties.filters),i.properties.qHyperCubeDef.qContextSetExpression&&(h(i.properties,"qHyperCubeDef.qContextSetExpression","storedFilters"),i.properties.qHyperCubeDef.qContextSetExpression=""),i.properties.qHyperCubeDef.qDynamicScript&&i.properties.qHyperCubeDef.qDynamicScript.length&&(h(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=E.createNewProperties({exportFormat:t,initialProperties:n,hypercubePath:u}),y=o.getValue(n,u||"").qHyperCubeDef,b=o.getValue(g,u||"").qHyperCubeDef,v=E.getMaxMinDimensionMeasure({exportFormat:t,dataDefinition:a}),x=v.maxDimensions,q=v.minDimensions,D=v.maxMeasures,S=v.minMeasures,M=l.defaultDimension,w=void 0===M?E.getDefaultDimension():M,C=l.defaultMeasure,k=void 0===C?E.getDefaultMeasure():C;b.qDimensions.length=0,b.qMeasures.length=0,E.shouldInitLayoutExclude({exportFormat:t,maxDimensions:x,minDimensions:q,maxMeasures:D,minMeasures:S})&&E.initLayoutExclude({exportFormat:t,maxDimensions:x,minDimensions:q,maxMeasures:D,minMeasures:S,newHyperCubeDef:b}),E.addDimensions({exportFormat:t,maxDimensions:x,minDimensions:q,newHyperCubeDef:b,defaultDimension:w}),E.addMeasures({exportFormat:t,maxMeasures:D,minMeasures:S,newHyperCubeDef:b,defaultMeasure:k}),E.updateDimensionsOnAdded({newProperties:g,dataDefinition:a,hypercubePath:u}),E.updateMeasuresOnAdded({newProperties:g,dataDefinition:a,hypercubePath:u}),E.setInterColumnSortOrder({exportFormat:t,newHyperCubeDef:b}),E.copyPropertyIfExist("qMaxStackedCells",y,b),E.copyPropertyIfExist("qNoOfLeftDims",y,b),E.copyPropertyOrSetDefault("qInitialDataFetch",y,b,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),E.copyPropertyOrSetDefault("qMode",y,b,"S"),E.copyPropertyOrSetDefault("qReductionMode",y,b,"N"),E.copyPropertyOrSetDefault("qSortbyYValue",y,b),E.copyPropertyOrSetDefault("qIndentMode",y,b),E.copyPropertyOrSetDefault("qShowTotalsAbove",y,b),E.importCommonProperties(g,t,n),h.qProperty=g;var N=o.getValue(c||{},"support.modifiers");return E.restoreMeasuresModifiers({measures:b.qMeasures,modifierTypes:N}),d&&A(h.qProperty,"storedFilters"),"S"===b.qMode&&f&&A(h.qProperty,"dynamicScript"),h}},k={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function N(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 I(e,t){return e.length!==t}var L={create:function(e,t){if(!e||!k[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(N(a,t,n,i),I(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"}},T={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}},R={colorModeOptions:{primary:function(){return!0},dimension:function(e){return T.getNumDimensions(e)>0&&T.getNumMeasures(e)<=1},multiColor:function(e){return T.getNumMeasures(e)>1},measure:function(e){return T.getNumDimensions(e)>0},expression:function(e){return T.getNumMeasures(e)>=1}}},O={colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return T.getNumMeasures(e)>=1}}},P={scatterplot:O,"sn-scatter-plot":O,piechart:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return T.getNumMeasures(e)>=1}}},linechart:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return T.getNumDimensions(e)>1},multiColor:function(e){return T.getNumMeasures(e)>1},measure:function(e){return T.getNumDimensions(e)<=1},expression:function(e){return T.getNumMeasures(e)>=1}}},map:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return T.getNumDimensions(e)>=1},multiColor:function(e){return T.getNumMeasures(e)>1},measure:function(e){return T.getNumDimensions(e)>=1},expression:function(e){return T.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 T.getNumDimensions(e)>=1}}}};function F(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 _(e,t){var r=L.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach((function(e){F(e,"qAttributeDimensions",r),F(e,"qAttributeExpressions",r)})),t.forEach((function(e){F(e,"qAttributeDimensions",r),F(e,"qAttributeExpressions",r)}))}function H(e,t){if(t){var r="="===t.charAt(0);e.color.altLabel=r?{qStringExpression:{qExpr:t.substr(1)}}:t}}function V(e){var t=e.properties,r=e.isDimension,n=e.dimensions,i=e.excludedDimensions,a=e.measures,s=e.label;_(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=L.create(L.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.isDimension,o=e.qNumFormat,a=e.isCustomFormatted;i||(t.matchMeasure=p.findIndexByPropertyValue(r,"qLibraryId",n.key),o&&(t.qNumFormat=o,t.isCustomFormatted=a)),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 z(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.a.measureBase.getLibraryId(e)}(r,t))?(s.type="measure",s.name=i,s.id=i,(o=function(e,t){return m.a.hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}(r,n))&&(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}var j={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}};function B(e,t,r,n){var i=r?"expression":t.type,o=e.color,a=o.mode,s=T.getItemLabel(t);switch(H(e,s||""),i){case"field":a="byDimension",o.byDimDef={label:t.label||T.wrapFieldName(t.name),key:T.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":a="byMeasure",o.byMeasureDef={label:r||s,key:r||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&&j.useMasterNumberFormat(o.formatting)}n||(o.auto=!1,o.mode=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=L.IDMAP.COLOR_BY_ALTERNATIVE,a=p.findItemByPropertyValue(n.qAttributeDimensions,"id",i);return B(e,z("dimension",!!a,a||n)),!!a}function U(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&&H(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=z("dimension",!1,r[n.activeDimensionIndex]);i.activeDimensionIndex=n.activeDimensionIndex,B(e,i)}(e,t);else if(function(e){return!e||!e.key}(a)&&$(e,t))return;V({properties:e,isDimension:!0,dimensions:r,excludedDimensions:i,measures:n,label:o.getValue(e,"color.byDimDef.label")})}function W(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&&H(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=z("measure",!1,r[n.activeMeasureIndex],!0);i.activeMeasureIndex=n.activeMeasureIndex,B(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=L.IDMAP.COLOR_BY_ALTERNATIVE,s=p.findItemByPropertyValue(i.qAttributeExpressions,"id",a);return B(e,z("measure",!!s,s||n[0])),!!s}(e,t))return;V({properties:e,isDimension:!1,dimensions:r,excludedDimensions:i,measures:n,label:o.getValue(e,"color.byMeasureDef.label")})}var K={changeProperty: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)},getCanColorBy:function(e,t){var r={primary:!0};if(e){var n=(P[t]||R).colorModeOptions||R.colorModeOptions;r.byDimension=n.dimension(e),r.byMeasure=n.measure(e),r.byMultiple=n.multiColor(e),r.byExpression=n.expression(e)}return r},shouldUpdateColorBy: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))},updateColorBy:function(e,t){var r=o.getValue(e,"color.mode"),n=o.getValue(e,"color.auto"),i=o.getValue(e,"".concat(t,"qDimensions"),[]),a=o.getValue(e,"".concat(t,"qMeasures"),[]),s=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);n?_(i,s):function(e){var t=e.auto,r=e.colorMode,n=e.dimensions;return!t&&"byDimension"===r&&n.length>0}({auto:n,colorMode:r,dimensions:i})?U(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:n,colorMode:r,dimensions:i,measures:a,properties:e})?W(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"),_(n,a)}(e,t)},deleteTotalMode:function(e){e.forEach((function(e){e.qOtherTotalSpec&&"qTotalMode"in e.qOtherTotalSpec&&delete e.qOtherTotalSpec.qTotalMode}))},shouldAddColorByExpression: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},addColorByExpression: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)},switchToAutoColor:function(e){o.setValue(e,"color.mode","primary"),o.setValue(e,"color.auto",!0)},shouldSwitchToColorPersistent:function(e){var t=o.getValue(e,"qHyperCubeDef.qDimensions",[]),r=o.getValue(e,"color.persistent",!1);return t.length>1&&!r}},G={exportProperties:function(e){var t=e.propertyTree,r=e.hypercubePath,n=e.viewDataMode,i=C.exportProperties({propertyTree:t,hypercubePath:r,viewDataMode:n}),o=i.data[0],a=o.dimensions.concat(o.excludedDimensions),s=o.measures.concat(o.excludedMeasures),l=L.IDMAP,u=l.COLOR_BY_ALTERNATIVE,c=l.COLOR_BY_EXPRESSION;return L.moveByIdFromGroup(a,[],"qAttributeDimensions",u),L.moveByIdFromGroup(a,[],"qAttributeExpressions",u),L.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=C.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=K.getCanColorBy(p,d),y=K.shouldUpdateColorBy({canColorBy:g,autoColor:h,colorMode:f,dimensions:m});return g[f]?K.shouldAddColorByExpression({shouldUpdateColorBy:y,properties:p})&&K.addColorByExpression(p):K.switchToAutoColor(p),y&&K.updateColorBy(p,"qHyperCubeDef."),K.shouldSwitchToColorPersistent(p)&&K.changeProperty(p,"color.persistent",!0),K.deleteTotalMode(m),c}},Y=["bar","marker","line"],J={handleAutoMinMax:function(e){var t=e.initialProperties,r=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?A(r,"unsupportedAutoMinMax")||y()(r.measureAxis,t.measureAxis):A(r,"supportedAutoMinMax")||y()(r.measureAxis,t.measureAxis)},handleMeasuresAxis: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.exportFormat,r=e.initialProperties;return!(!t.properties.measureAxes||r.measureAxes||!r.measureAxis||void 0===r.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}}),Y.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]&&y()(s,r.properties.measureAxes[t[0].axis])):y()(s,r.properties.measureAxes[0])}},setInterColumnSortOrder: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}}}},X={exportProperties:function(e){var t=e.propertyTree,r=e.hypercubePath,n=e.viewDataMode,i=e.supportedAutoMinMax,o=void 0===i||i,a=G.exportProperties({propertyTree:t,hypercubePath:r,viewDataMode:n}),s=a.properties;return o?(h(s,"measureAxis.min","supportedAutoMinMax"),h(s,"measureAxis.max","supportedAutoMinMax")):(h(s,"measureAxis.min","unsupportedAutoMinMax"),h(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=G.importProperties({exportFormat:t,initialProperties:r,dataDefinition:n,defaultPropertyValues:i,hypercubePath:o,extension:s,supportedFilters:l,isHCModifierSupported:u}),p=c.qProperty;return J.handleAutoMinMax({initialProperties:r,properties:p}),J.handleMeasuresAxis({exportFormat:t,initialProperties:r,properties:p,measureType:a}),J.setInterColumnSortOrder(p.qHyperCubeDef),c}};function Q(e,t,r){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(r)}function Z(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=Q(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 ee(e){var t=e.properties,r=e.arrayPath,n=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,r,[]).forEach((function(e){return function(e){var t=e.properties,r=e.quarantineName,n=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,"qDef.cId");if(s){var l=Q(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 te={quarantine:function(e){Z({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalColoring",arrayName:"measures",itemPath:"qDef.conditionalColoring"})},unquarantine:function(e){ee({properties:e,arrayPath:"qHyperCubeDef.qMeasures",itemPath:"qDef.conditionalColoring",arrayName:"measures",quarantineName:"conditionalColoring"})}},re={quarantine:function(e){Z({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"measures",itemPath:"qCalcCondition"}),Z({properties:e,arrayPath:"qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"dimensions",itemPath:"qCalcCondition"})},unquarantine:function(e){ee({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"measures",itemPath:"qCalcCondition"}),ee({properties:e,arrayPath:"qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"dimensions",itemPath:"qCalcCondition"})},quarantineAlternative:function(e){Z({properties:e,arrayPath:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"alternativeMeasures",itemPath:"qCalcCondition"}),Z({properties:e,arrayPath:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"alternativeDimensions",itemPath:"qCalcCondition"})},unquarantineAlternative:function(e){ee({properties:e,arrayPath:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"alternativeMeasures",itemPath:"qCalcCondition"}),ee({properties:e,arrayPath:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"alternativeDimensions",itemPath:"qCalcCondition"})}};t.default={hypercube:C,colorChart:G,axisChart:X,quarantineProperty:h,unquarantineProperty:A,quarantineArrayProp:Z,unquarantineArrayProp:ee,conditionalColoring:te,conditionalShow:re}}]);var k=A(C);function N({dataDefinition:e,defaultPropertyValues:t,exportFormat:r,initialProperties:n}){const i=k.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 I({propertyTree:e,viewDataMode:t}){return k.hypercube.exportProperties({propertyTree:e,viewDataMode:t})}var L=e=>{const t=E(e);return{properties:w,data:{targets:[t]},importProperties:({exportFormat:e,initialProperties:r})=>N({dataDefinition:t,exportFormat:e,initialProperties:r}),exportProperties:I}};function T(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)||function(e,t){if(e){if("string"==typeof e)return R(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?R(e,t):void 0}}(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 R(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function O(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function P(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function F(){}var _=1/.7,H="\\s*([+-]?\\d+)\\s*",V="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",z="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",j=/^#([0-9a-f]{3,8})$/,B=new RegExp("^rgb\\("+[H,H,H]+"\\)$"),$=new RegExp("^rgb\\("+[z,z,z]+"\\)$"),U=new RegExp("^rgba\\("+[H,H,H,V]+"\\)$"),W=new RegExp("^rgba\\("+[z,z,z,V]+"\\)$"),K=new RegExp("^hsl\\("+[V,z,z]+"\\)$"),G=new RegExp("^hsla\\("+[V,z,z,V]+"\\)$"),Y={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 J(){return this.rgb().formatHex()}function X(){return this.rgb().formatRgb()}function Q(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=j.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?Z(t):3===r?new ne(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?ee(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?ee(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=B.exec(e))?new ne(t[1],t[2],t[3],1):(t=$.exec(e))?new ne(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=U.exec(e))?ee(t[1],t[2],t[3],t[4]):(t=W.exec(e))?ee(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=K.exec(e))?se(t[1],t[2]/100,t[3]/100,1):(t=G.exec(e))?se(t[1],t[2]/100,t[3]/100,t[4]):Y.hasOwnProperty(e)?Z(Y[e]):"transparent"===e?new ne(NaN,NaN,NaN,0):null}function Z(e){return new ne(e>>16&255,e>>8&255,255&e,1)}function ee(e,t,r,n){return n<=0&&(e=t=r=NaN),new ne(e,t,r,n)}function te(e){return e instanceof F||(e=Q(e)),e?new ne((e=e.rgb()).r,e.g,e.b,e.opacity):new ne}function re(e,t,r,n){return 1===arguments.length?te(e):new ne(e,t,r,null==n?1:n)}function ne(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function ie(){return"#"+ae(this.r)+ae(this.g)+ae(this.b)}function oe(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function ae(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function se(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new ue(e,t,r,n)}function le(e){if(e instanceof ue)return new ue(e.h,e.s,e.l,e.opacity);if(e instanceof F||(e=Q(e)),!e)return new ue;if(e instanceof ue)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 ue(a,s,l,e.opacity)}function ue(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function ce(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}function pe(e){return function(){return e}}function de(e,t){var r=t-e;return r?function(e,t){return function(r){return e+r*t}}(e,r):pe(isNaN(e)?t:e)}function me(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function fe(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function he(){}O(F,Q,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:J,formatHex:J,formatHsl:function(){return le(this).formatHsl()},formatRgb:X,toString:X}),O(ne,re,P(F,{brighter:function(e){return e=null==e?_:Math.pow(_,e),new ne(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new ne(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){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:ie,formatHex:ie,formatRgb:oe,toString:oe})),O(ue,(function(e,t,r,n){return 1===arguments.length?le(e):new ue(e,t,r,null==n?1:n)}),P(F,{brighter:function(e){return e=null==e?_:Math.pow(_,e),new ue(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new ue(this.h,this.s,this.l*e,this.opacity)},rgb:function(){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 ne(ce(e>=240?e-240:e+120,i,n),ce(e,i,n),ce(e<120?e+240:e-120,i,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}})),function e(t){var r=function(e){return 1==(e=+e)?de: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):pe(isNaN(t)?r:t)}}(t);function n(e,t){var n=r((e=re(e)).r,(t=re(t)).r),i=r(e.g,t.g),o=r(e.b,t.b),a=de(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=1/.7,ye="\\s*([+-]?\\d+)\\s*",be="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ve="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",xe=/^#([0-9a-f]{3,8})$/,qe=new RegExp(`^rgb\\(${ye},${ye},${ye}\\)$`),De=new RegExp(`^rgb\\(${ve},${ve},${ve}\\)$`),Se=new RegExp(`^rgba\\(${ye},${ye},${ye},${be}\\)$`),Me=new RegExp(`^rgba\\(${ve},${ve},${ve},${be}\\)$`),we=new RegExp(`^hsl\\(${be},${ve},${ve}\\)$`),Ee=new RegExp(`^hsla\\(${be},${ve},${ve},${be}\\)$`),Ae={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 Ce(){return this.rgb().formatHex()}function ke(){return this.rgb().formatRgb()}function Ne(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=xe.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?Ie(t):3===r?new Re(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?Le(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?Le(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=qe.exec(e))?new Re(t[1],t[2],t[3],1):(t=De.exec(e))?new Re(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Se.exec(e))?Le(t[1],t[2],t[3],t[4]):(t=Me.exec(e))?Le(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=we.exec(e))?Ve(t[1],t[2]/100,t[3]/100,1):(t=Ee.exec(e))?Ve(t[1],t[2]/100,t[3]/100,t[4]):Ae.hasOwnProperty(e)?Ie(Ae[e]):"transparent"===e?new Re(NaN,NaN,NaN,0):null}function Ie(e){return new Re(e>>16&255,e>>8&255,255&e,1)}function Le(e,t,r,n){return n<=0&&(e=t=r=NaN),new Re(e,t,r,n)}function Te(e){return e instanceof he||(e=Ne(e)),e?new Re((e=e.rgb()).r,e.g,e.b,e.opacity):new Re}function Re(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function Oe(){return`#${He(this.r)}${He(this.g)}${He(this.b)}`}function Pe(){const e=Fe(this.opacity);return`${1===e?"rgb(":"rgba("}${_e(this.r)}, ${_e(this.g)}, ${_e(this.b)}${1===e?")":`, ${e})`}`}function Fe(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function _e(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function He(e){return((e=_e(e))<16?"0":"")+e.toString(16)}function Ve(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new je(e,t,r,n)}function ze(e){if(e instanceof je)return new je(e.h,e.s,e.l,e.opacity);if(e instanceof he||(e=Ne(e)),!e)return new je;if(e instanceof je)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 je(a,s,l,e.opacity)}function je(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function Be(e){return(e=(e||0)%360)<0?e+360:e}function $e(e){return Math.max(0,Math.min(1,e||0))}function Ue(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}me(he,Ne,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Ce,formatHex:Ce,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ze(this).formatHsl()},formatRgb:ke,toString:ke}),me(Re,(function(e,t,r,n){return 1===arguments.length?Te(e):new Re(e,t,r,null==n?1:n)}),fe(he,{brighter(e){return e=null==e?ge:Math.pow(ge,e),new Re(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new Re(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Re(_e(this.r),_e(this.g),_e(this.b),Fe(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:Oe,formatHex:Oe,formatHex8:function(){return`#${He(this.r)}${He(this.g)}${He(this.b)}${He(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Pe,toString:Pe})),me(je,(function(e,t,r,n){return 1===arguments.length?ze(e):new je(e,t,r,null==n?1:n)}),fe(he,{brighter(e){return e=null==e?ge:Math.pow(ge,e),new je(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new je(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 Re(Ue(e>=240?e-240:e+120,i,n),Ue(e,i,n),Ue(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new je(Be(this.h),$e(this.s),$e(this.l),Fe(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=Fe(this.opacity);return`${1===e?"hsl(":"hsla("}${Be(this.h)}, ${100*$e(this.s)}%, ${100*$e(this.l)}%${1===e?")":`, ${e})`}`}}));const We=Math.PI/180,Ke=180/Math.PI,Ge=4/29,Ye=6/29,Je=3*Ye*Ye;function Xe(e){if(e instanceof Qe)return new Qe(e.l,e.a,e.b,e.opacity);if(e instanceof it)return ot(e);e instanceof Re||(e=Te(e));var t,r,n=rt(e.r),i=rt(e.g),o=rt(e.b),a=Ze((.2225045*n+.7168786*i+.0606169*o)/1);return n===i&&i===o?t=r=a:(t=Ze((.4360747*n+.3850649*i+.1430804*o)/.96422),r=Ze((.0139322*n+.0971045*i+.7141733*o)/.82521)),new Qe(116*a-16,500*(t-a),200*(a-r),e.opacity)}function Qe(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function Ze(e){return e>.008856451679035631?Math.pow(e,1/3):e/Je+Ge}function et(e){return e>Ye?e*e*e:Je*(e-Ge)}function tt(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function rt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function nt(e){if(e instanceof it)return new it(e.h,e.c,e.l,e.opacity);if(e instanceof Qe||(e=Xe(e)),0===e.a&&0===e.b)return new it(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Ke;return new it(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function it(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}function ot(e){if(isNaN(e.h))return new Qe(e.l,0,0,e.opacity);var t=e.h*We;return new Qe(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}function at(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 st(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ut(e,t,r){return t&&lt(e.prototype,t),r&&lt(e,r),e}function ct(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pt(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 dt(e,t){var r,n,i,o,a,s=new gt(e),l=+e.value&&(s.value=e.value),u=[s];for(null==t&&(t=mt);r=u.pop();)if(l&&(r.value=+r.data.value),(i=t(r.data))&&(a=i.length))for(r.children=new Array(a),o=a-1;o>=0;--o)u.push(n=r.children[o]=new gt(i[o])),n.parent=r,n.depth=r.depth+1;return s.eachBefore(ht)}function mt(e){return e.children}function ft(e){e.data=e.data.data}function ht(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function gt(e){this.data=e,this.depth=this.height=0,this.parent=null}me(Qe,(function(e,t,r,n){return 1===arguments.length?Xe(e):new Qe(e,t,r,null==n?1:n)}),fe(he,{brighter(e){return new Qe(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new Qe(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 Re(tt(3.1338561*(t=.96422*et(t))-1.6168667*(e=1*et(e))-.4906146*(r=.82521*et(r))),tt(-.9787684*t+1.9161415*e+.033454*r),tt(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}})),me(it,(function(e,t,r,n){return 1===arguments.length?nt(e):new it(e,t,r,null==n?1:n)}),fe(he,{brighter(e){return new it(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new it(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return ot(this).rgb()}})),gt.prototype=dt.prototype={constructor:gt,count:function(){return this.eachAfter(pt)},each:function(e){var t,r,n,i,o=this,a=[o];do{for(t=a.reverse(),a=[];o=t.pop();)if(e(o),r=o.children)for(n=0,i=r.length;n<i;++n)a.push(r[n])}while(a.length);return this},eachAfter:function(e){for(var t,r,n,i=this,o=[i],a=[];i=o.pop();)if(a.push(i),t=i.children)for(r=0,n=t.length;r<n;++r)o.push(t[r]);for(;i=a.pop();)e(i);return this},eachBefore:function(e){for(var t,r,n=this,i=[n];n=i.pop();)if(e(n),t=n.children)for(r=t.length-1;r>=0;--r)i.push(t[r]);return this},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(){var e=[];return this.each((function(t){e.push(t)})),e},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 dt(this).eachBefore(ft)}};var yt,bt,vt=(yt=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 E={version:"0.36.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 w(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var C={exports:{}};window,C.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/conversion/",r(r.s=2)}([function(e,t,r){var n=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===i.call(e)},l=function(e){if(!e||"[object Object]"!==i.call(e))return!1;var t,r=n.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!o)return!1;for(t in e);return void 0===t||n.call(e,t)},u=function(e,t){o&&"__proto__"===t.name?o(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},c=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};e.exports=function e(){var t,r,n,i,o,a,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=c(p,r),p!==(i=c(t,r))&&(f&&i&&(l(i)||(o=s(i)))?(o?(o=!1,a=n&&s(n)?n:[]):a=n&&l(n)?n:{},u(p,{name:r,newValue:e(f,a,i)})):void 0!==i&&u(p,{name:r,newValue:i}));return p}},function(e,t,r){e.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/qlik-modifiers/",r(r.s=1)}([function(e,t,r){var n=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===i.call(e)},l=function(e){if(!e||"[object Object]"!==i.call(e))return!1;var t,r=n.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!o)return!1;for(t in e);return void 0===t||n.call(e,t)},u=function(e,t){o&&"__proto__"===t.name?o(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},c=function(e,t){if("__proto__"===t){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};e.exports=function e(){var t,r,n,i,o,a,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=c(p,r),p!==(i=c(t,r))&&(f&&i&&(l(i)||(o=s(i)))?(o?(o=!1,a=n&&s(n)?n:[]):a=n&&l(n)?n:{},u(p,{name:r,newValue:e(f,a,i)})):void 0!==i&&u(p,{name:r,newValue:i}));return p}},function(e,t,r){r.r(t);var n=r(0),i=r.n(n),o=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},a=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},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).trim();return"="===t.substring(0,1)?t.substring(1).trim():t}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,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=MinString(").concat(t,"))' and Only({1}").concat(t,")<='$(=MaxString(").concat(t,"))'\"}")}function b(e){var t=e.modifier,r=void 0===t?{}:t,n=e.dimensions,i=e.dimensionAndFieldList,o=e.funcComp,a=void 0===o?"Sum":o,s=e.valueComp,l=void 0===s?"0":s;if(!r.showExcludedValues)return"";if(n&&1===n.length){var u=y(c(n[0],i),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=y(p,m),b=y(d,h);return"".concat(a,"({1<").concat(g,",").concat(b,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function v(e){return"".concat(e,"(")}function x(e){var t=e.properties,r=e.layout;return a(t,"qHyperCubeDef.qDimensions",a(r,"qHyperCube.qDimensionInfo",[])).length}var q={isFullRange:p,getNumDimensions:x,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=b({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:v,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return v(e)+t+")"},getAggrComp:function(e,t,r){return"Aggr(".concat(e,", ").concat(t,", ").concat(r,")")},getExcludedComp:b,needDimension:function(e){var t=e.modifier,r=e.properties,n=e.layout;return 0===function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t)&&2===x({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=x({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,"]")}};function D(e){return(D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var S=i.a.bind(null,!0),M={},E=Array.isArray;function A(e){return null!=e&&!Array.isArray(e)&&"object"===D(e)}function w(e){return void 0===e}function C(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function k(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]=w(e[r||t])?o:e[t],e=e[r||t]}})),e}function I(e,t){var r=!0;if(A(e)&&A(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((function(n){I(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(!I(e[n],t[n]))return!1;return!0}return e===t}M.generate=function(e,t,r){r=r||"";var n=[];return Object.keys(t).forEach((function(i){var o=function(e){return e?S({},{val:e}).val:e}(t[i]),a=e[i],s="".concat(r,"/").concat(i);I(o,a)||C(t,i)||(w(a)?n.push({op:"add",path:s,value:o}):A(o)&&A(a)?n=n.concat(M.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]&&w(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(I(t,i))return n;if(!w(t[0])&&w(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(M.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){w(t[i])&&!C(e,i)&&n.push({op:"remove",path:"".concat(r,"/").concat(i)})})),n},M.apply=function(e,t){t.forEach((function(t){var r,n=k(e,t.path),i=t.path.split("/").splice(-1)[0],o=i&&Number.isNaN(+i)?n[i]:n[+i]||n,a=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(n=null,o=e),"add"===t.op||"replace"===t.op)if(E(n))"-"===i&&(i=n.length),n.splice(+i,"add"===t.op?0:1,t.value);else if(E(o)&&E(t.value)){var s,l=t.value.slice();o.length=0,(s=o).push.apply(s,function(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}(l))}else if(A(o)&&A(t.value))r=o,Object.keys(r).forEach((function(e){Object.getOwnPropertyDescriptor(r,e).configurable&&!C(r,e)&&delete r[e]})),S(o,t.value);else{if(!n)throw new Error("Patchee is not an object we can patch");n[i]=t.value}else if("move"===t.op){var u=k(e,t.from);E(n)?n.splice(+i,0,u.splice(+a,1)[0]):(n[i]=u[a],delete u[a])}else"remove"===t.op&&(E(n)?n.splice(+i,1):delete n[i])}))},M.clone=function(e){return S({},e)},M.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},M.updateObject=function(e,t){Object.keys(e).length?M.apply(e,M.generate(e,t)):S(e,t)};var L=M,N=function(e,t,r){if(!e)return Promise.resolve();var n=L.generate(t,r);return i()(!0,t,r),n&&n.length?(n=n.map((function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}})),e.applyPatches(n,!0)):Promise.resolve()},T="accumulation";function O(e,t){var r=a(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===T)return r[n]}function R(e,t){var r=function(e,t){var r=a(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===T)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var P={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""},F={translationKey:"properties.modifier.accumulation",needDimension:q.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return q.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,o=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=o;void 0===l&&(l=q.getNumDimensions({properties:n,layout:i}));var u=a(n,"qHyperCubeDef.qDimensions",[]),c=q.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),p=q.getNumStepComp(r,l),d=q.getAboveComp(r,l,c,p),m=q.getRangeComp("RangeSum",d);if(q.needDimension({modifier:r,properties:n,layout:i})){var f=q.getDimComp(u,1),h=q.getDimComp(u,0),g=q.getAggrComp(m,f,h);m=r.showExcludedValues?q.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:s,valueComp:g}):g}return m},extractInputExpression:q.extractInputExpression,initModifier:function(e){q.initModifier(e,P)},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!q.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(R(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(R(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(R(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(R(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var r=O(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=O(t,e);return r&&!r.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(R(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return q.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(T))return!1;var o=O(t,e);return o&&!o.disabled}};return r}},_="movingAverage";function H(e,t){var r=a(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===_)return r[n]}function V(e,t){var r=function(e,t){var r=a(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===_)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var z={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1},j={translationKey:"properties.modifier.movingAverage",needDimension:q.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return q.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,r=e.expression,n=e.modifier,i=e.properties,o=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!n)return r;var u=s;void 0===u&&(u=q.getNumDimensions({properties:i,layout:o}));var c=a(i,"qHyperCubeDef.qDimensions",[]),p=n.showExcludedValues&&n.nullSuppression,d=q.getExpressionWithExcludedComp({expression:r,modifier:n,dimensions:c,dimensionAndFieldList:l,treatMissingAsNull:p}),m=q.getNumStepComp(n,u),f=q.getAboveComp(n,u,d,m);if(n.nullSuppression)t=q.getRangeComp("RangeAvg",f);else{var h=q.getRangeComp("RangeSum",f),g=function(e,t){var r=q.getRowNoComp(e,t);if(!q.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(q.needDimension({modifier:n,properties:i,layout:o})){var b=q.getDimComp(c,1),v=q.getDimComp(c,0),x=q.getAggrComp(y,b,v);y=n.showExcludedValues?q.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return y},extractInputExpression:q.extractInputExpression,initModifier:function(e){q.initModifier(e,z)},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!q.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(V(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(V(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(V(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(V(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var r=H(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=H(t,e);return r&&!r.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(V(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(V(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return q.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(_))return!1;var o=H(t,e);return o&&!o.disabled}};return r}},$="difference";function B(e,t){var r=a(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===$)return r[n]}function U(e,t){var r=function(e,t){var r=a(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===$)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}var W={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""},K={translationKey:"properties.modifier.difference",needDimension:q.needDimension,isApplicable:function(e){var t=e.properties,r=e.layout;return q.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:q.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,i=e.layout,o=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=o;void 0===l&&(l=q.getNumDimensions({properties:n,layout:i}));var u=a(n,"qHyperCubeDef.qDimensions",[]),c=q.getExpressionWithExcludedComp({expression:t,modifier:r,dimensions:u,dimensionAndFieldList:s}),p=q.getAboveComp(r,l,c),d="".concat(c," - ").concat(p);if(q.needDimension({modifier:r,properties:n,layout:i})){var m=q.getDimComp(u,1),f=q.getDimComp(u,0),h=q.getAggrComp(d,m,f);d=r.showExcludedValues?q.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:s,funcComp:"Only",valueComp:h}):h}return d},initModifier:function(e){Object.keys(W).forEach((function(t){void 0===e[t]&&(e[t]=W[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!q.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(U(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(U(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(U(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return q.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf($))return!1;var o=B(t,e);return o&&!o.disabled}};return r}},G={CURRENT_SELECTION:0,SELECT_FIELD_VALUE:1,DISREGARD_SELECTION:2},Y={ONE_DIMENSION:0,ALL_DIMENSIOANS:1,DISREGARD_ALL_DIMENSIONS:2},J="normalization";function Q(e,t){var r=a(e,t);if(r)for(var n=0;n<r.length;n++)if(r[n].type===J)return r[n]}function X(e,t){var r=function(e,t){var r=a(e,t);if(!r)return-1;for(var n=0;n<r.length;n++)if(r[n].type===J)return n;return-1}(e,t);return r>-1?"".concat(t,".").concat(r):t}function Z(e,t){for(var r=0;r<e.length;r++)if(e[r].value===t)return r;return-1}function ee(e,t,r,n){var i=t.layout.qHyperCube.qDimensionInfo.length,o=[{value:Y.ONE_DIMENSION,translation:r.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:r.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:Y.ALL_DIMENSIOANS,translation:r.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension"),tooltipTranslation:r.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension",".tooltip")},{value:Y.DISREGARD_ALL_DIMENSIONS,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,r){if(e<2){var n=Z(t,0);t.splice(n,1)}return t}(i,o),function(e,t,r){if(0===e){var n=Z(t,1);t.splice(n,1)}return t}(Q(e,n).selectionScope,o)}function te(e,t,r){var n=[{value:G.CURRENT_SELECTION,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:G.SELECT_FIELD_VALUE,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:G.DISREGARD_SELECTION,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return function(e,t,r){if(1===e){var n=Z(t,0);t.splice(n,1)}return t}(Q(e,r).dimensionalScope,n)}var re={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:Y.DISREGARD_ALL_DIMENSIONS,selectionScope:G.DISREGARD_SELECTION};function ne(e){return 2===e?"{1}":""}function ie(e,t,r){return 1===e?"{$<".concat(q.getFieldWithWrapper(t),"={'").concat(r,"'}>}"):""}function oe(e,t){return 0===e&&t>1||2===e?"Total":""}function ae(e,t,r){return 0===e&&t>1?"<".concat(q.getDimDefWithWrapper(r),">"):""}var se={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,r=e.layout;return q.isApplicable({properties:t,layout:r,minDimensions:1,maxDimensions:2})},extractInputExpression:q.extractInputExpression,generateExpression:function(e){var t=e.expression,r=e.modifier,n=e.properties,i=e.layout,o=e.numDimensions,s=e.dimensionAndFieldList;if(!r)return t;var l=o;void 0===l&&(l=q.getNumDimensions({properties:n,layout:i}));var u=a(n,"qHyperCubeDef.qDimensions",[]),c=q.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=ne(t),l=ie(t,r,n),u=""===s&&""===l?"":s||l,c=oe(i,o),p=ae(i,o,a),d=function(e){for(var t=[],r=0;r<e;r++)t[r]=q.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(re).forEach((function(t){void 0===e[t]&&(e[t]=re[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!q.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(X(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:G.DISREGARD_SELECTION,options:function(r){return te(r,t,e)}},field:{refFn:function(t){return"".concat(X(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 Q(t,e).selectionScope===G.SELECT_FIELD_VALUE}},value:{refFn:function(t){return"".concat(X(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return Q(t,e).selectionScope===G.SELECT_FIELD_VALUE}},dimensionalScope:{refFn:function(t){return"".concat(X(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:Y.DISREGARD_ALL_DIMENSIONS,supportTooltip:!0,options:function(r,n){return ee(r,n,t,e)}},primaryDimension:{refFn:function(t){return"".concat(X(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(Q(t,e).dimensionalScope||0)===Y.ONE_DIMENSION&&r.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return q.isApplicable({properties:t.properties})}}},show:function(t,r,n){var i=n.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(J))return!1;var o=Q(t,e);return o&&!o.disabled}};return r},getDisregardSelectionComp:ne,getFieldSelectionComp:ie,getTotalComp:oe,getSelectedDimComp:ae},le={getExpression:function(e){return a(e,"qDef.base.qDef")||a(e,"qDef.qDef")},getExpressionRef:function(e){return a(e,"qDef.base.qDef")?"qDef.base.qDef":"qDef.qDef"},getLibraryIdRef:function(e){return a(e,"qDef.base.qLibraryId")?"qDef.base.qLibraryId":"qLibraryId"},getLibraryId:function(e){return a(e,"qDef.base.qLibraryId")||a(e,"qLibraryId")},getLabelRef:function(e){return a(e,"qDef.base")?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return a(e,"qDef.base")?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}},ue={initBase:function(e,t){(t||ue.isValid(e))&&(o(e,"qDef.base.qDef",a(e,"qDef.qDef")),o(e,"qDef.base.qLibraryId",a(e,"qLibraryId")),o(e,"qDef.base.qLabel",a(e,"qDef.qLabel")),o(e,"qDef.base.qLabelExpression",a(e,"qDef.qLabelExpression")))},restoreBase:function(e){ue.isValid(e)&&(o(e,"qDef.qDef",a(e,"qDef.base.qDef")),o(e,"qLibraryId",a(e,"qDef.base.qLibraryId")),o(e,"qDef.qLabel",a(e,"qDef.base.qLabel")),o(e,"qDef.qLabelExpression",a(e,"qDef.base.qLabelExpression")),a(e,"qDef.qAggrFunc")&&a(e,"qDef.base.qAggrFunc")&&o(e,"qDef.qAggrFunc",a(e,"qDef.base.qAggrFunc")),delete e.qDef.base)},isValid:function(e){var t=a(e,"qDef.base.qDef"),r=a(e,"qDef.base.qLibraryId");return void 0!==t||void 0!==r}},ce=ue;function pe(e){return(pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var de={accumulation:F,movingAverage:j,difference:K,normalization:se},me=(t.default={modifiers:de,apply:fe,applyModifiers:he,cleanUpMeasure:ge,destroy:function(e){e&&me[e.id]&&me[e.id].masterItemSubscriber&&(me[e.id].masterItemSubscriber&&me[e.id].masterItemSubscriber.unsubscribe(),delete me[e.id])},hasActiveModifiers:ye,getActiveModifier:be,initBase:ce.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some((function(e){return de[e]}))},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some((function(e){return de[e]&&de[e].isApplicable({properties:r,layout:n})}))},measureBase:le,limitedSorting:function(e){var t=e.measures,r=e.properties,n=e.layout,i=!1,o=!1;return t.forEach((function(e){var t=qe(e);Ce({modifiers:t,properties:r,layout:n})&&(i=!0,o=o||Te({modifiers:t,properties:r,layout:n}))})),i&&!o},ifEnableTotalsFunction:ve},{});function fe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.model,r=e.properties,n=e.isSnapshot,o=void 0!==n&&n,s=e.masterItem;me[t.id]=me[t.id]||{isFirstTime:!0};var l=me[t.id].isFirstTime;if(me[t.id].isFirstTime=!1,r&&"object"===pe(r))return he({model:t,properties:r});var u=t?t.layout:void 0,c=a(u,"qSelectionInfo.qInSelections");if(o||c)return Promise.resolve(!1);var p=a(u,"qHyperCube.qMeasureInfo"),d=me[t.id].lastReloadTime;if(me[t.id].lastReloadTime=a(t,"app.layout.qLastReloadTime"),ye({measures:p,layout:u})){var m=function(e){var t=e.measures,r=e.layout,n=e.lastReloadTime;return a(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 we({measure:e,properties:r,layout:n})}))}({measures:t,layout:r})}({measures:p,layout:u,model:t,lastReloadTime:d});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 Ce({modifiers:qe(t),layout:r})?!t.base:!!t.base}({measure:e,layout:r})})))}({measures:p,layout:u,masterItem:s,isFirstTime:l})?t.getEffectiveProperties().then((function(e){var r=i()(!0,{},e);Se(r);var n=Oe(r);return ke({model:t}).then((function(i){return Ie({libraryIds:n,model:t}).then((function(n){return m&&function(e){var t=e.properties;xe(t).forEach((function(e){return function(e){var t=e.measure;if(we({measure:t,properties:e.properties})){var r=0,n=t.qDef.modifiers;Array.isArray(n)&&n.forEach((function(e){if("object"===pe(e)&&!e.disabled){if(r++,"object"!==pe(de[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=de[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==n&&Ee(t)&&q.simplifyExpression(t.qDef.base.qDef)!==q.simplifyExpression(n)&&(t.qDef.base.qDef=n)}}))}}({measure:e,properties:t})}))}({properties:r}),he({model:t,oldProperties:e,properties:r,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:n,dimensionAndFieldList:i})}))}))})):Promise.resolve(!1)}return function(e){return!!Array.isArray(e)&&e.some((function(e){return"object"===pe(e.base)}))}(p)?t.getEffectiveProperties().then((function(e){return function(e){var t=e.model,r=e.properties,n=Oe(r);return Re({model:t,libraryIds:n}).then((function(){var e=i()(!0,{},r);return xe(r).forEach((function(e){return ge(e)})),Ne({oldProperties:e,newProperties:r,model:t})}))}({model:t,properties:e})})):Promise.resolve(!1)}function he(e){var t=e.model,r=e.oldProperties,n=e.properties,o=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,u=e.masterItem,c=e.libraryItemsProps,p=e.dimensionAndFieldList;void 0===r&&(r=l?i()(!0,{},n):n),Se(n);var d=Oe(n);return Re({model:t,libraryIds:d,masterItem:u}).then((function(){return function(e){var t=e.measures,r=e.properties,n=e.model,o=e.libraryItemsProps,s=e.dimensionAndFieldList;if(t||(t=xe(r)),!t.length)return Promise.resolve();if(!ye({measures:t,properties:r}))return t.forEach((function(e){return ge(e)})),Promise.resolve();var l=o?void 0:Oe(r);return ke({model:n,dimensionAndFieldList:s}).then((function(e){return Ie({libraryIds:l,model:n,libraryItemsProps:o}).then((function(n){t.forEach((function(t){Ce({modifiers:t.qDef.modifiers,properties:r})?(function(e){var t=e.measure,r=e.properties,n=e.libraryItemsProps,o=e.dimensionAndFieldList,s=0;ce.isValid(t)||ce.initBase(t,!0);var l=t.qDef,u=l.modifiers,c=l.base;Array.isArray(u)&&u.forEach((function(e){if("object"===pe(e)&&!e.disabled){if(s++,"object"!==pe(de[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)");de[e.type].initModifier(e);var l=t.qLibraryId||c&&c.qLibraryId;l?function(e){var t=e.measure,r=e.modifier,n=e.properties,o=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=de[r.type].generateExpression({expression:s,modifier:r,properties:n,dimensionAndFieldList:o});r.outputExpression=l,t.qDef.qDef=r.outputExpression,(t.qDef.qLabel||a.qMeasure.qLabel)&&(t.qDef.qLabel=a.qMeasure.qLabel),(t.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(t.qDef.qLabelExpression=a.qMeasure.qLabelExpression),t.qDef.quarantine&&t.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(t.qDef.qNumFormat=a.qMeasure.qNumFormat,t.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete t.qLibraryId,t.qDef.coloring=a.qMeasure.coloring,r.base=i()(!0,{},t.qDef.base)}({measure:t,modifier:e,libraryId:l,properties:r,libraryItemsProps:n,dimensionAndFieldList:o}):function(e){var t=e.measure,r=e.modifier,n=e.properties,o=e.dimensionAndFieldList;"function"==typeof de[r.type].updateModifier&&de[r.type].updateModifier(r,n.qHyperCubeDef);var a=le.getExpression(t),s=de[r.type].generateExpression({expression:a,modifier:r,properties:n,dimensionAndFieldList:o});r.outputExpression=s,t.qDef.qDef=r.outputExpression,t.qDef.base.qLabelExpression?t.qDef.qLabelExpression=t.qDef.base.qLabelExpression:t.qDef.qLabel=t.qDef.base.qLabel||a,r.base=i()(!0,{},t.qDef.base)}({measure:t,modifier:e,properties:r,dimensionAndFieldList:o}),function(e){var t=a(e,"qDef.qAggrFunc");"Expr"!==t||ve(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&ve(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(t)}}))}({measure:t,properties:r,libraryItemsProps:n,dimensionAndFieldList:e}),Me(t)):ge(t)}))}))}))}({measures:o,properties:n,model:t,libraryItemsProps:c,dimensionAndFieldList:p}).then((function(){return l?Ne({oldProperties:r,newProperties:n,model:t}):Promise.resolve(!1)}))}))}function ge(e){!function(e){var t=qe(e);return Array.isArray(t)&&t.some((function(e){return"object"===pe(e)&&!e.disabled&&!de[e.type]}))}(e)?ce.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,Me(e)}function ye(e){var t=e.measures,r=e.properties,n=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ce({modifiers:qe(e),properties:r,layout:n})}))}function be(e){var t=qe(e);if(Array.isArray(t))for(var r=0;r<t.length;r++){var n=t[r];if(de[n.type]&&!n.disabled)return n}}function ve(e){var t=be(e);return!t||de[t.type].enableTotalsFunction(e)}function xe(e){return a(e,"qHyperCubeDef.qMeasures",[]).concat(a(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function qe(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function De(e){return a(e,"outputExpression.qValueExpression.qExpr")||a(e,"outputExpression")}function Se(e){xe(e).forEach((function(e){return function(e){var t=be(e);t&&(void 0!==t.outputExpression&&De(t)!==e.qDef.qDef?delete e.qDef.base:!ce.isValid(e)&&t.base&&(e.qDef.base=i()(!0,{},t.base)))}(e)}))}function Me(e){var t=qe(e);Array.isArray(t)&&t.forEach((function(t){"object"===pe(t)&&(t.disabled||!de[t.type]&&De(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)}))}function Ee(e){return e.base||e.qDef&&e.qDef.base}function Ae(e){var t=Ee(e);return e.qLibraryId||t&&t.qLibraryId}function we(e){var t=e.measure,r=e.properties,n=e.layout;return!Ae(t)&&Ce({modifiers:qe(t),properties:r,layout:n})}function Ce(e){var t=e.modifiers,r=e.properties,n=e.layout,i={};return Array.isArray(t)&&t.some((function(e){return!("object"!==pe(e)||e.disabled||!de[e.type])&&(void 0===i[e.type]&&(i[e.type]=de[e.type].isApplicable({properties:r,layout:n})),i[e.type])}))}function ke(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 Ie(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 Le(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Ne(e){var t=e.oldProperties,r=e.newProperties,n=e.model,i=JSON.stringify(a(t,"qHyperCubeDef.qMeasures"),Le)!==JSON.stringify(a(r,"qHyperCubeDef.qMeasures"),Le)||JSON.stringify(a(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Le)!==JSON.stringify(a(r,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Le);return i?function(e){var t=e.model,r=e.oldProperties,n=e.newProperties,i=t.layout;return i&&!i.qHasSoftPatches&&!i.qExtendsId&&a(i,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(n):N(t,r,n)}({model:n,oldProperties:t,newProperties:r}).then((function(){return i})):Promise.resolve(i)}function Te(e){var t=e.modifiers,r=e.properties,n=e.layout;return Array.isArray(t)&&t.some((function(e){return"object"===pe(e)&&!e.disabled&&de[e.type]&&de[e.type].needDimension({modifier:e,properties:r,layout:n})}))}function Oe(e){var t=xe(e),r=[],n=[],i=!1;return t.forEach((function(t){var n=qe(t);if(Ce({modifiers:n,properties:e})){var o=Ae(t);o&&r.push(o),i=i||Te({modifiers:n,properties:e})}})),a(e,"qHyperCubeDef.qDimensions",[]).forEach((function(e){var t=e.qLibraryId;t&&n.push(t)})),{measureLibraryIds:r,dimensionLibraryIds:n}}function Re(e){var t=e.model,r=e.libraryIds;return!e.masterItem&&r&&(r.measureLibraryIds.length||r.dimensionLibraryIds.length)?(me[t.id].masterItemSubscriber=me[t.id].masterItemSubscriber||function(e){var t=e.model,r=e.callback,n={},i={},o={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},r=a(e,"qInfo.qType");return r&&s[r]&&s[r].forEach((function(r){t[r]=a(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,a=e.dimensionLibraryIds,s=[];return function(e){var t=e.dimensionLibraryIds;i={},e.measureLibraryIds.forEach((function(e){i[e]=!0})),o={},t.forEach((function(e){o[e]=!0}))}({measureLibraryIds:r,dimensionLibraryIds:a}),Object.keys(n).forEach((function(e){i[e]||o[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(o).forEach((function(e){o[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 fe({model:t,masterItem:e}).then((function(){return t.app.clearUndoBuffer()}))}}),me[t.id].masterItemSubscriber.subscribe(r)):Promise.resolve()}}])},function(e,t,r){function n(e){var t=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)}(e%62),r=Math.floor(e/62);return r>0?n(r)+t:t}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})(e)}r.r(t);var 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 n(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}var 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},d=r(1),m=r.n(d),f={addDimensions: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))},addMeasures: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))},setInterColumnSortOrder: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())},copyProperties:function(e){var t=e.exportFormat,r=e.properties;Object.keys(r).forEach((function(e){t.properties[e]=r[e]}))},updateLayoutExclude: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},storeMeasuresModifiers:function(e){e.forEach((function(e){m.a.cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)}))}};function h(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 g=r(0),y=r.n(g);function b(e,t){var r=y()(!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 v(e,t){return y()(!0,{},t,e)}function x(e,t,r){return"function"==typeof e?e(t):Number.isNaN(+e)?r:e}var q=Math.pow(2,53)-1;function D(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 M(e){return function(e){if(Array.isArray(e))return E(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 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}}(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(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var A={importCommonProperties: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},copyPropertyIfExist:function(e,t,r){t.hasOwnProperty(e)&&(r[e]=t[e])},copyPropertyOrSetDefault:function(e,t,r,n){t.hasOwnProperty(e)?r[e]=t[e]:r[e]=n},getDefaultDimension: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}}},getDefaultMeasure:function(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}},addDimensions: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=b(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=b(s.excludedDimensions[t],a);o.qDimensions.length<i?o.qDimensions.push(u):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(u)}},addMeasures: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=v(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=v(s.excludedMeasures[t],a);o.qMeasures.length<i?o.qMeasures.push(u):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(u)}},getMaxMinDimensionMeasure: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=x(a.max,i.dimensions.length,q),l=x(a.min,i.dimensions.length,0);return{maxDimensions:x(o.max,s,q),minDimensions:x(o.min,l,0),maxMeasures:s,minMeasures:l}},setInterColumnSortOrder: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))},createNewProperties: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=y()(!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=y()(!0,{},r,i)).components&&(i.components=[]),i},shouldInitLayoutExclude: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},initLayoutExclude: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=[]))},updateDimensionsOnAdded:function(e){var t=e.newProperties,r=e.dataDefinition,n=e.hypercubePath;if(r.dimensions&&"function"==typeof r.dimensions.added){var i=o.getValue(t,n||"").qHyperCubeDef,a=D(i.qDimensions);i.qDimensions=[],a.forEach((function(e){i.qDimensions.push(e),r.dimensions.added(e,t)}))}},updateMeasuresOnAdded:function(e){var t=e.newProperties,r=e.dataDefinition,n=e.hypercubePath;if(r.measures&&"function"==typeof r.measures.added){var i=o.getValue(t,n||"").qHyperCubeDef,a=M(i.qMeasures);i.qMeasures=[],a.forEach((function(e){i.qMeasures.push(e),r.measures.added(e,t)}))}},restoreMeasuresModifiers:function(e){var t=e.measures,r=e.modifierTypes;t&&r&&m.a.isSupportedModifiers(r)&&t.forEach((function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store}))}};function w(e,t){var r=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)}var C={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.addDimensions({exportFormat:i,qHyperCubeDef:l}),f.addMeasures({exportFormat:i,qHyperCubeDef:l}),f.setInterColumnSortOrder({exportFormat:i,qHyperCubeDef:l}),delete l.qLayoutExclude,f.copyProperties({exportFormat:i,properties:a}),r&&(i.properties.qHyperCubeDef=l,delete s.qHyperCubeDef),f.updateLayoutExclude({exportFormat:i,properties:a}),n||f.storeMeasuresModifiers(i.properties.qHyperCubeDef.qMeasures),Array.isArray(i.properties.filters)&&(h(i.properties,"filters","storedFilters"),delete i.properties.filters),i.properties.qHyperCubeDef.qContextSetExpression&&(h(i.properties,"qHyperCubeDef.qContextSetExpression","storedFilters"),i.properties.qHyperCubeDef.qContextSetExpression=""),i.properties.qHyperCubeDef.qDynamicScript&&i.properties.qHyperCubeDef.qDynamicScript.length&&(h(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=A.createNewProperties({exportFormat:t,initialProperties:n,hypercubePath:u}),y=o.getValue(n,u||"").qHyperCubeDef,b=o.getValue(g,u||"").qHyperCubeDef,v=A.getMaxMinDimensionMeasure({exportFormat:t,dataDefinition:a}),x=v.maxDimensions,q=v.minDimensions,D=v.maxMeasures,S=v.minMeasures,M=l.defaultDimension,E=void 0===M?A.getDefaultDimension():M,C=l.defaultMeasure,k=void 0===C?A.getDefaultMeasure():C;b.qDimensions.length=0,b.qMeasures.length=0,A.shouldInitLayoutExclude({exportFormat:t,maxDimensions:x,minDimensions:q,maxMeasures:D,minMeasures:S})&&A.initLayoutExclude({exportFormat:t,maxDimensions:x,minDimensions:q,maxMeasures:D,minMeasures:S,newHyperCubeDef:b}),A.addDimensions({exportFormat:t,maxDimensions:x,minDimensions:q,newHyperCubeDef:b,defaultDimension:E}),A.addMeasures({exportFormat:t,maxMeasures:D,minMeasures:S,newHyperCubeDef:b,defaultMeasure:k}),A.updateDimensionsOnAdded({newProperties:g,dataDefinition:a,hypercubePath:u}),A.updateMeasuresOnAdded({newProperties:g,dataDefinition:a,hypercubePath:u}),A.setInterColumnSortOrder({exportFormat:t,newHyperCubeDef:b}),A.copyPropertyIfExist("qMaxStackedCells",y,b),A.copyPropertyIfExist("qNoOfLeftDims",y,b),A.copyPropertyOrSetDefault("qInitialDataFetch",y,b,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),A.copyPropertyOrSetDefault("qMode",y,b,"S"),A.copyPropertyOrSetDefault("qReductionMode",y,b,"N"),A.copyPropertyOrSetDefault("qSortbyYValue",y,b),A.copyPropertyOrSetDefault("qIndentMode",y,b),A.copyPropertyOrSetDefault("qShowTotalsAbove",y,b),A.importCommonProperties(g,t,n),h.qProperty=g;var I=o.getValue(c||{},"support.modifiers");return A.restoreMeasuresModifiers({measures:b.qMeasures,modifierTypes:I}),d&&w(h.qProperty,"storedFilters"),"S"===b.qMode&&f&&w(h.qProperty,"dynamicScript"),h}},k={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function I(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 L(e,t){return e.length!==t}var N={create:function(e,t){if(!e||!k[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(I(a,t,n,i),L(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"}},T={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}},O={colorModeOptions:{primary:function(){return!0},dimension:function(e){return T.getNumDimensions(e)>0&&T.getNumMeasures(e)<=1},multiColor:function(e){return T.getNumMeasures(e)>1},measure:function(e){return T.getNumDimensions(e)>0},expression:function(e){return T.getNumMeasures(e)>=1}}},R={colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return T.getNumMeasures(e)>=1}}},P={scatterplot:R,"sn-scatter-plot":R,piechart:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return T.getNumMeasures(e)>=1}}},linechart:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return T.getNumDimensions(e)>1},multiColor:function(e){return T.getNumMeasures(e)>1},measure:function(e){return T.getNumDimensions(e)<=1},expression:function(e){return T.getNumMeasures(e)>=1}}},map:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return T.getNumDimensions(e)>=1},multiColor:function(e){return T.getNumMeasures(e)>1},measure:function(e){return T.getNumDimensions(e)>=1},expression:function(e){return T.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 T.getNumDimensions(e)>=1}}}};function F(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 _(e,t){var r=N.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach((function(e){F(e,"qAttributeDimensions",r),F(e,"qAttributeExpressions",r)})),t.forEach((function(e){F(e,"qAttributeDimensions",r),F(e,"qAttributeExpressions",r)}))}function H(e,t){if(t){var r="="===t.charAt(0);e.color.altLabel=r?{qStringExpression:{qExpr:t.substr(1)}}:t}}function V(e){var t=e.properties,r=e.isDimension,n=e.dimensions,i=e.excludedDimensions,a=e.measures,s=e.label;_(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=N.create(N.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.isDimension,o=e.qNumFormat,a=e.isCustomFormatted;i||(t.matchMeasure=p.findIndexByPropertyValue(r,"qLibraryId",n.key),o&&(t.qNumFormat=o,t.isCustomFormatted=a)),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 z(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.a.measureBase.getLibraryId(e)}(r,t))?(s.type="measure",s.name=i,s.id=i,(o=function(e,t){return m.a.hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}(r,n))&&(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}var j={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}};function $(e,t,r,n){var i=r?"expression":t.type,o=e.color,a=o.mode,s=T.getItemLabel(t);switch(H(e,s||""),i){case"field":a="byDimension",o.byDimDef={label:t.label||T.wrapFieldName(t.name),key:T.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":a="byMeasure",o.byMeasureDef={label:r||s,key:r||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&&j.useMasterNumberFormat(o.formatting)}n||(o.auto=!1,o.mode=a)}function B(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=N.IDMAP.COLOR_BY_ALTERNATIVE,a=p.findItemByPropertyValue(n.qAttributeDimensions,"id",i);return $(e,z("dimension",!!a,a||n)),!!a}function U(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&&H(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=z("dimension",!1,r[n.activeDimensionIndex]);i.activeDimensionIndex=n.activeDimensionIndex,$(e,i)}(e,t);else if(function(e){return!e||!e.key}(a)&&B(e,t))return;V({properties:e,isDimension:!0,dimensions:r,excludedDimensions:i,measures:n,label:o.getValue(e,"color.byDimDef.label")})}function W(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&&H(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=z("measure",!1,r[n.activeMeasureIndex],!0);i.activeMeasureIndex=n.activeMeasureIndex,$(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=N.IDMAP.COLOR_BY_ALTERNATIVE,s=p.findItemByPropertyValue(i.qAttributeExpressions,"id",a);return $(e,z("measure",!!s,s||n[0])),!!s}(e,t))return;V({properties:e,isDimension:!1,dimensions:r,excludedDimensions:i,measures:n,label:o.getValue(e,"color.byMeasureDef.label")})}var K={changeProperty: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)},getCanColorBy:function(e,t){var r={primary:!0};if(e){var n=(P[t]||O).colorModeOptions||O.colorModeOptions;r.byDimension=n.dimension(e),r.byMeasure=n.measure(e),r.byMultiple=n.multiColor(e),r.byExpression=n.expression(e)}return r},shouldUpdateColorBy: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))},updateColorBy:function(e,t){var r=o.getValue(e,"color.mode"),n=o.getValue(e,"color.auto"),i=o.getValue(e,"".concat(t,"qDimensions"),[]),a=o.getValue(e,"".concat(t,"qMeasures"),[]),s=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);n?_(i,s):function(e){var t=e.auto,r=e.colorMode,n=e.dimensions;return!t&&"byDimension"===r&&n.length>0}({auto:n,colorMode:r,dimensions:i})?U(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:n,colorMode:r,dimensions:i,measures:a,properties:e})?W(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"),_(n,a)}(e,t)},deleteTotalMode:function(e){e.forEach((function(e){e.qOtherTotalSpec&&"qTotalMode"in e.qOtherTotalSpec&&delete e.qOtherTotalSpec.qTotalMode}))},shouldAddColorByExpression: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},addColorByExpression: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)},switchToAutoColor:function(e){o.setValue(e,"color.mode","primary"),o.setValue(e,"color.auto",!0)},shouldSwitchToColorPersistent:function(e){var t=o.getValue(e,"qHyperCubeDef.qDimensions",[]),r=o.getValue(e,"color.persistent",!1);return t.length>1&&!r}},G={exportProperties:function(e){var t=e.propertyTree,r=e.hypercubePath,n=e.viewDataMode,i=C.exportProperties({propertyTree:t,hypercubePath:r,viewDataMode:n}),o=i.data[0],a=o.dimensions.concat(o.excludedDimensions),s=o.measures.concat(o.excludedMeasures),l=N.IDMAP,u=l.COLOR_BY_ALTERNATIVE,c=l.COLOR_BY_EXPRESSION;return N.moveByIdFromGroup(a,[],"qAttributeDimensions",u),N.moveByIdFromGroup(a,[],"qAttributeExpressions",u),N.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=C.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=K.getCanColorBy(p,d),y=K.shouldUpdateColorBy({canColorBy:g,autoColor:h,colorMode:f,dimensions:m});return g[f]?K.shouldAddColorByExpression({shouldUpdateColorBy:y,properties:p})&&K.addColorByExpression(p):K.switchToAutoColor(p),y&&K.updateColorBy(p,"qHyperCubeDef."),K.shouldSwitchToColorPersistent(p)&&K.changeProperty(p,"color.persistent",!0),K.deleteTotalMode(m),c}},Y=["bar","marker","line"],J={handleAutoMinMax:function(e){var t=e.initialProperties,r=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?w(r,"unsupportedAutoMinMax")||y()(r.measureAxis,t.measureAxis):w(r,"supportedAutoMinMax")||y()(r.measureAxis,t.measureAxis)},handleMeasuresAxis: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.exportFormat,r=e.initialProperties;return!(!t.properties.measureAxes||r.measureAxes||!r.measureAxis||void 0===r.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}}),Y.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]&&y()(s,r.properties.measureAxes[t[0].axis])):y()(s,r.properties.measureAxes[0])}},setInterColumnSortOrder: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}}}},Q={exportProperties:function(e){var t=e.propertyTree,r=e.hypercubePath,n=e.viewDataMode,i=e.supportedAutoMinMax,o=void 0===i||i,a=G.exportProperties({propertyTree:t,hypercubePath:r,viewDataMode:n}),s=a.properties;return o?(h(s,"measureAxis.min","supportedAutoMinMax"),h(s,"measureAxis.max","supportedAutoMinMax")):(h(s,"measureAxis.min","unsupportedAutoMinMax"),h(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=G.importProperties({exportFormat:t,initialProperties:r,dataDefinition:n,defaultPropertyValues:i,hypercubePath:o,extension:s,supportedFilters:l,isHCModifierSupported:u}),p=c.qProperty;return J.handleAutoMinMax({initialProperties:r,properties:p}),J.handleMeasuresAxis({exportFormat:t,initialProperties:r,properties:p,measureType:a}),J.setInterColumnSortOrder(p.qHyperCubeDef),p.qHyperCubeDef.qColumnOrder=[],p.qHyperCubeDef.columnOrder=[],c}};function X(e,t,r){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(r)}function Z(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=X(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 ee(e){var t=e.properties,r=e.arrayPath,n=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,r,[]).forEach((function(e){return function(e){var t=e.properties,r=e.quarantineName,n=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,"qDef.cId");if(s){var l=X(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 te={quarantine:function(e){Z({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalColoring",arrayName:"measures",itemPath:"qDef.conditionalColoring"})},unquarantine:function(e){ee({properties:e,arrayPath:"qHyperCubeDef.qMeasures",itemPath:"qDef.conditionalColoring",arrayName:"measures",quarantineName:"conditionalColoring"})}},re={quarantine:function(e){Z({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"measures",itemPath:"qCalcCondition"}),Z({properties:e,arrayPath:"qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"dimensions",itemPath:"qCalcCondition"})},unquarantine:function(e){ee({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"measures",itemPath:"qCalcCondition"}),ee({properties:e,arrayPath:"qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"dimensions",itemPath:"qCalcCondition"})},quarantineAlternative:function(e){Z({properties:e,arrayPath:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"alternativeMeasures",itemPath:"qCalcCondition"}),Z({properties:e,arrayPath:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"alternativeDimensions",itemPath:"qCalcCondition"})},unquarantineAlternative:function(e){ee({properties:e,arrayPath:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"alternativeMeasures",itemPath:"qCalcCondition"}),ee({properties:e,arrayPath:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"alternativeDimensions",itemPath:"qCalcCondition"})}};t.default={hypercube:C,colorChart:G,axisChart:Q,quarantineProperty:h,unquarantineProperty:w,quarantineArrayProp:Z,unquarantineArrayProp:ee,conditionalColoring:te,conditionalShow:re}}]);var k=w(C.exports);function I({dataDefinition:e,defaultPropertyValues:t,exportFormat:r,initialProperties:n}){const i=k.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 L({propertyTree:e,viewDataMode:t}){return k.hypercube.exportProperties({propertyTree:e,viewDataMode:t})}var N=e=>{const t=A(e);return{properties:E,data:{targets:[t]},importProperties:({exportFormat:e,initialProperties:r})=>I({dataDefinition:t,exportFormat:e,initialProperties:r}),exportProperties:L}};function T(e){return function(e){if(Array.isArray(e))return O(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 O(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)?O(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 O(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var R,P=Object.prototype.hasOwnProperty,F=Object.prototype.toString,_=Object.defineProperty,H=Object.getOwnPropertyDescriptor,V=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===F.call(e)},z=function(e){if(!e||"[object Object]"!==F.call(e))return!1;var t,r=P.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&P.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;for(t in e);return void 0===t||P.call(e,t)},j=function(e,t){_&&"__proto__"===t.name?_(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},$=function(e,t){if("__proto__"===t){if(!P.call(e,t))return;if(H)return H(e,t).value}return e[t]};function B(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function U(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function W(){}R=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=$(s,r),s!==(i=$(t,r))&&(c&&i&&(z(i)||(o=V(i)))?(o?(o=!1,a=n&&V(n)?n:[]):a=n&&z(n)?n:{},j(s,{name:r,newValue:e(c,a,i)})):void 0!==i&&j(s,{name:r,newValue:i}));return s},R&&R.__esModule&&Object.prototype.hasOwnProperty.call(R,"default")&&R.default;var K=1/.7,G="\\s*([+-]?\\d+)\\s*",Y="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",J="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Q=/^#([0-9a-f]{3,8})$/,X=new RegExp(`^rgb\\(${G},${G},${G}\\)$`),Z=new RegExp(`^rgb\\(${J},${J},${J}\\)$`),ee=new RegExp(`^rgba\\(${G},${G},${G},${Y}\\)$`),te=new RegExp(`^rgba\\(${J},${J},${J},${Y}\\)$`),re=new RegExp(`^hsl\\(${Y},${J},${J}\\)$`),ne=new RegExp(`^hsla\\(${Y},${J},${J},${Y}\\)$`),ie={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 oe(){return this.rgb().formatHex()}function ae(){return this.rgb().formatRgb()}function se(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Q.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?le(t):3===r?new de(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?ue(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?ue(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=X.exec(e))?new de(t[1],t[2],t[3],1):(t=Z.exec(e))?new de(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=ee.exec(e))?ue(t[1],t[2],t[3],t[4]):(t=te.exec(e))?ue(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=re.exec(e))?be(t[1],t[2]/100,t[3]/100,1):(t=ne.exec(e))?be(t[1],t[2]/100,t[3]/100,t[4]):ie.hasOwnProperty(e)?le(ie[e]):"transparent"===e?new de(NaN,NaN,NaN,0):null}function le(e){return new de(e>>16&255,e>>8&255,255&e,1)}function ue(e,t,r,n){return n<=0&&(e=t=r=NaN),new de(e,t,r,n)}function ce(e){return e instanceof W||(e=se(e)),e?new de((e=e.rgb()).r,e.g,e.b,e.opacity):new de}function pe(e,t,r,n){return 1===arguments.length?ce(e):new de(e,t,r,null==n?1:n)}function de(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function me(){return`#${ye(this.r)}${ye(this.g)}${ye(this.b)}`}function fe(){const e=he(this.opacity);return`${1===e?"rgb(":"rgba("}${ge(this.r)}, ${ge(this.g)}, ${ge(this.b)}${1===e?")":`, ${e})`}`}function he(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ge(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ye(e){return((e=ge(e))<16?"0":"")+e.toString(16)}function be(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new xe(e,t,r,n)}function ve(e){if(e instanceof xe)return new xe(e.h,e.s,e.l,e.opacity);if(e instanceof W||(e=se(e)),!e)return new xe;if(e instanceof xe)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 xe(a,s,l,e.opacity)}function xe(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function qe(e){return(e=(e||0)%360)<0?e+360:e}function De(e){return Math.max(0,Math.min(1,e||0))}function Se(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}B(W,se,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:oe,formatHex:oe,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ve(this).formatHsl()},formatRgb:ae,toString:ae}),B(de,pe,U(W,{brighter(e){return e=null==e?K:Math.pow(K,e),new de(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new de(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new de(ge(this.r),ge(this.g),ge(this.b),he(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:me,formatHex:me,formatHex8:function(){return`#${ye(this.r)}${ye(this.g)}${ye(this.b)}${ye(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:fe,toString:fe})),B(xe,(function(e,t,r,n){return 1===arguments.length?ve(e):new xe(e,t,r,null==n?1:n)}),U(W,{brighter(e){return e=null==e?K:Math.pow(K,e),new xe(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new xe(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 de(Se(e>=240?e-240:e+120,i,n),Se(e,i,n),Se(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new xe(qe(this.h),De(this.s),De(this.l),he(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=he(this.opacity);return`${1===e?"hsl(":"hsla("}${qe(this.h)}, ${100*De(this.s)}%, ${100*De(this.l)}%${1===e?")":`, ${e})`}`}}));const Me=Math.PI/180,Ee=180/Math.PI,Ae=4/29,we=6/29,Ce=3*we*we;function ke(e){if(e instanceof Ie)return new Ie(e.l,e.a,e.b,e.opacity);if(e instanceof Re)return Pe(e);e instanceof de||(e=ce(e));var t,r,n=Oe(e.r),i=Oe(e.g),o=Oe(e.b),a=Le((.2225045*n+.7168786*i+.0606169*o)/1);return n===i&&i===o?t=r=a:(t=Le((.4360747*n+.3850649*i+.1430804*o)/.96422),r=Le((.0139322*n+.0971045*i+.7141733*o)/.82521)),new Ie(116*a-16,500*(t-a),200*(a-r),e.opacity)}function Ie(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function Le(e){return e>.008856451679035631?Math.pow(e,1/3):e/Ce+Ae}function Ne(e){return e>we?e*e*e:Ce*(e-Ae)}function Te(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Oe(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Re(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}function Pe(e){if(isNaN(e.h))return new Ie(e.l,0,0,e.opacity);var t=e.h*Me;return new Ie(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}B(Ie,(function(e,t,r,n){return 1===arguments.length?ke(e):new Ie(e,t,r,null==n?1:n)}),U(W,{brighter(e){return new Ie(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new Ie(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 de(Te(3.1338561*(t=.96422*Ne(t))-1.6168667*(e=1*Ne(e))-.4906146*(r=.82521*Ne(r))),Te(-.9787684*t+1.9161415*e+.033454*r),Te(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}})),B(Re,(function(e,t,r,n){return 1===arguments.length?function(e){if(e instanceof Re)return new Re(e.h,e.c,e.l,e.opacity);if(e instanceof Ie||(e=ke(e)),0===e.a&&0===e.b)return new Re(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Ee;return new Re(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new Re(e,t,r,null==n?1:n)}),U(W,{brighter(e){return new Re(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new Re(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return Pe(this).rgb()}}));var Fe,_e=e=>()=>e;function He(e,t){var r=t-e;return r?function(e,t){return function(r){return e+r*t}}(e,r):_e(isNaN(e)?t:e)}function Ve(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 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 je(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=Be)):void 0===t&&(t=$e);for(var r,n,i,o,a,s=new Ke(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 Ke(i[o])),n.parent=r,n.depth=r.depth+1;return s.eachBefore(We)}function $e(e){return e.children}function Be(e){return Array.isArray(e)?e[1]:null}function Ue(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function We(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function Ke(e){this.data=e,this.depth=this.height=0,this.parent=null}!function e(t){var r=function(e){return 1==(e=+e)?He: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):_e(isNaN(t)?r:t)}}(t);function n(e,t){var n=r((e=pe(e)).r,(t=pe(t)).r),i=r(e.g,t.g),o=r(e.b,t.b),a=He(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),Ke.prototype=je.prototype={constructor:Ke,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 je(this).eachBefore(Ue)},[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)}},Fe=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,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}},yt(bt={exports:{}}),bt.exports);function xt(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}var qt={3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",24:"Y","-3":"m","-6":"μ","-9":"n","-12":"p","-15":"f","-18":"a","-21":"z","-24":"y"},Dt=/%$/,St=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,Mt=/^\(oct\)/i,wt=/^\(dec\)/i,Et=/^\(hex\)/i,At=/^\(bin\)/i,Ct=/^\(rom\)/i,kt=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,Nt=/#|0/g;function It(e,t,r,n){return e=e.toString(t),r[1]===r[1].toUpperCase()&&(e=e.toUpperCase()),e.length-e.indexOf(".")>10&&(e=e.slice(0,e.indexOf(".")+11)),e.replace(".",n||".")}function Lt(e,t,r){var n=xt(e);return r?n:new RegExp(n||"",t)}function Tt(e,t,r){var n,i,o,a,s,l,u,c,p,d,m,f=e.pattern;f.indexOf("A")>=0&&(f=f.replace("A",""),e.abbreviate=!0),d=t,(m=r)&&(m=xt(m)),d&&(d=xt(d)),p=new RegExp("(?:[#0]+".concat(d,")?[#0]+(?:").concat(m,"[#0]+)?")),a=(o=(o=f.match(p))?o[0]:"")?f.substr(0,f.indexOf(o)):f,s=o?f.substring(f.indexOf(o)+o.length):"",o||(o=f?"#":"##########"),t&&t===r&&(i=(n=o.split(r)).pop(),o=n.join("")+r+i,t=""),l=t,t=/,/.test(r)?"¤":",",l&&(o=o.replace(Lt(l,"g"),t)),u=r,r=".",u&&(o=o.replace(Lt(u,"g"),r)),c=(c=o.match(/#/g))?c.length:0;var h,g=f.split(u);g[1]&&(h=g[1].match(Nt)),e.prefix=a||"",e.postfix=s||"",e.pattern=f,e.maxPrecision=h?h.length:2,e.percentage=Dt.test(f),e.numericPattern=o||"",e.numericRegex=new RegExp("".concat(Lt(t,null,!0),"|").concat(Lt(r,null,!0)),"g"),e.groupTemp=l,e.decTemp=u,e.t=t,e.d=r,e.temp=c}!function(){function e(t,r,n,i,o){st(this,e),this.localeInfo=t,this.pattern=r,this.thousandDelimiter=n||",",this.decimalDelimiter=i||".",this.type=o||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return qt;var r={};return e.qNumericalAbbreviation.split(t).forEach((function(e){var t=e.split(":");2===t.length&&(r[t[0]]=t[1])})),r}(t,this.patternSeparator),this.prepare()}ut(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t,r,n){return this.prepare(t,r,n),this.formatValue(e)}},{key:"prepare",value:function(e,t,r){var n;void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===r&&(r=this.decimalDelimiter),e?(this._prepared={positive:{d:r,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:r,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:r,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},n=this._prepared,e=e.split(this.patternSeparator),n.positive.pattern=e[0],n.negative.pattern=e[1],n.zero.pattern=e[2],kt.test(e[0])&&(n.positive.isFunctional=!0),e[1]?kt.test(e[1])&&(n.negative.isFunctional=!0):n.negative=!1,e[2]?kt.test(e[2])&&(n.zero.isFunctional=!0):n.zero=!1,n.positive.isFunctional||Tt(n.positive,t,r),n.negative&&!n.negative.isFunctional&&Tt(n.negative,t,r),n.zero&&!n.zero.isFunctional&&Tt(n.zero,t,r)):this._prepared={pattern:!1}}},{key:"formatValue",value:function(e){var t,r,n,i,o,a,s,l,u,c=this._prepared,p="",d="",m=e;if(isNaN(e))return"".concat(m);if(e=+e,!1===c.pattern)return e.toString();if(0===e&&c.zero)return(c=c.zero).pattern;if(e<0&&c.negative?(c=c.negative,e=-e):c=c.positive,o=c.d,a=c.t,c.isFunctional)e=function(e,t,r){var n;return St.test(t)?e=It(e,Number(/\d{2}/.exec(t)[0]),t,r):Mt.test(t)?e=It(e,8,t,r):wt.test(t)?e=It(e,10,t,r):Et.test(t)?e=It(e,16,t,r):At.test(t)?e=It(e,2,t,r):Ct.test(t)&&(n="",e<0&&(n="-",e=-e),0===(e=Math.floor(e))?e="0":e<=5e5?(e=function(e,t){for(var r,n="",i=Number(String(e).slice(-3)),o=(e-i)/1e3,a=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),s=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();i>0;)for(r=0;r<a.length;r++)if(a[r]<=i){n+=s[r],i-=a[r];break}for(r=0;r<o;r++)n="M".concat(n);return t[1]!==t[1].toUpperCase()&&(n=n.toLowerCase()),n}(e,t),e=n+e):e=t+n+e.toExponential(0)),e}(e,c.pattern,o);else{if(c.percentage&&(e*=100),c.abbreviate){var f,h,g=Object.keys(this.abbreviations).map((function(e){return parseInt(e,10)})).sort((function(e,t){return e-t})),y=g[0];for(s=0,r=Number(Number(e).toExponential().split("e")[1]);y<=r&&s<g.length;)y=g[++s];s>0&&(f=g[s-1]),f&&r>0&&f>0?h=f:(r<0&&f<0||!f)&&(y<0&&y-r<=c.maxPrecision?h=y:f<=r&&!(y>0&&-r<=c.maxPrecision)&&(h=f)),h&&(p=this.abbreviations[h],e/=Math.pow(10,h))}if(n=Math.abs(e),t=c.temp,u=(l=c.numericPattern).split(o)[1],"I"===this.type&&(e=Math.round(e)),i=e,u||"#"!==l.slice(-1)[0])if(n>=1e15||n>0&&n<=1e-14)e=n?n.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{var b=Number(e.toFixed(Math.min(20,u?u.length:0)).split(".")[0]),v=l.split(o)[0];if(e=vt(v+=o,b)||"0",u){var x=Math.max(0,Math.min(14,u.length)),q=u.replace(/#+$/,"").length,D=("I"===this.type?0:n%1).toFixed(x).slice(2).replace(/0+$/,"");for(s=D.length;s<q;s++)D+="0";D&&(e+=o+D)}else 0===b&&(i=0)}else if(n>=Math.pow(10,t)||n<1||n<1e-4)0===e?e="0":n<1e-4||n>=1e20?(e=(e=i.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),d=""):(e=e.toPrecision(Math.max(1,Math.min(14,t)))).indexOf(".")>=0&&(e=(e=e.replace(e.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",o));else{for(l+=o,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(n)/Math.log(10)))),s=0;s<t;s++)l+="#";e=vt(l,e)}e=e.replace(c.numericRegex,(function(e){return e===a?c.groupTemp:e===o?c.decTemp:""})),i<0&&!/^-/.test(e)&&(e="-".concat(e))}return c.prefix+e+d+p+c.postfix}}],[{key:"getStaticFormatter",value:function(){return{prepare:function(){},formatValue:function(e){return"".concat(e)}}}}])}();var Rt=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Ot=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Pt=["January","February","March","April","May","June","July","August","September","October","November","December"],Ft=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function _t(e,t){for(var r=e.length;r<t;r++)e="0".concat(e);return e}function Ht(e){var t=e.toString().split(".");return t[1]?t=Number("0.".concat(t[1])):0}!function(){function e(t,r,n){st(this,e);var i,o=t||{};o.qCalendarStrings||(o.qCalendarStrings={qLongDayNames:Rt,qDayNames:Ot,qLongMonthNames:Pt,qMonthNames:Ft}),this.localeInfo=o,this.locale_days=o.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=o.qCalendarStrings.qDayNames.slice(),this.locale_months=o.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=o.qCalendarStrings.qMonthNames.slice(),r||(r=(ct(i={},"T",o.qTimeFmt||"hh:mm:ss"),ct(i,"D",o.qDateFmt||"YYYY-MM-DD"),ct(i,"TS",o.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"),i)[n]),this.pattern=r}ut(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");var r,n,i,o,a,s=/t+/gi.test(t);e instanceof Date?(i=s,o=(n=e).getUTCHours(),i&&((o%=12)||(o=12)),(a=n.getUTCDay()-1)<0&&(a=6),r={year:n.getUTCFullYear(),month:n.getUTCMonth(),day:a,date:n.getUTCDate(),h:o,m:n.getUTCMinutes(),s:n.getUTCSeconds(),f:n.getUTCMilliseconds(),t:n.getUTCHours()>=12?"pm":"am"}):(e<0&&(e=-e,t="-".concat(t)),r=function(e,t){var r,n=function(e){var t=e,r=24*Ht(t),n=60*Ht(r),i=60*Ht(n),o=1e3*Ht(i);return{d:Math.floor(t),h:Math.floor(r),m:Math.floor(n),s:Math.floor(i),f:Math.round(o)}}(e),i=n.d,o=n.h,a=n.m,s=n.s,l=n.f,u=0;/w+|t+/gi.test(t)&&(r=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(86400*(e-Math.floor(e))))),isNaN(r.getTime())&&(r=null)),/D+/gi.test(t)||(o+=24*i),/h+/gi.test(t)||(a+=60*o),/m+/gi.test(t)||(s+=60*a),/w+/gi.test(t)&&(u=r?r.getDay()-1:0)<0&&(u=6);var c="";return r&&(c=r.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:u,date:i,h:o,m:a,s:s,f:l,t:c}}(e,t));var l=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:_t("".concat(t.year).slice(-2),2),YYY:_t("".concat(t.year).slice(-3),3),def:function(e){return _t("".concat(t.year),e.length)}},"M+":{M:t.month+1,MM:_t("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:_t("".concat(t.day),2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:function(e){return _t("".concat(t.date),e.length)}},"h+|H+":{h:t.h,def:function(e){return _t("".concat(t.h),e.length)}},"m+":{m:t.m,def:function(e){return _t("".concat(t.m),e.length)}},"s+|S+":{s:t.s,def:function(e){return _t("".concat(t.s),e.length)}},"f+|F+":{def:function(e){var r="".concat(t.f),n=e.length-r.length;if(n>0)for(var i=0;i<n;i++)r+="0";else n<0&&(r=r.slice(0,e.length));return r}},"t{1,2}|T{1,2}":{def:function(e){var r=t.t;return e[0].toUpperCase()===e[0]&&(r=r.toUpperCase()),r.slice(0,e.length)}}}}(this,r),u=[];for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&u.push(c);var p=new RegExp(u.join("|"),"g"),d=t.replace(p,(function(e){var t,r,n;for(r in l)if(Object.prototype.hasOwnProperty.call(l,r)&&(t=new RegExp(r)).test(e))break;if(!t)return"";for(var i in l[r])if(i===e||i.toLowerCase()===e){void 0===(n=l[r][i])&&(n=l[r][i.toLowerCase()]);break}return void 0===n&&(n=l[r].def),"function"==typeof n&&(n=n(e)),n}));return d}}])}();var Vt=["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"],zt=function(e){return{value:e,label:e.charAt(0).toUpperCase()+e.slice(1),groupHeader:!1,disabled:!1}};function jt(e){var t=e.theme,r=e.translator,n=e.id,i=e.path,o=function(){return t.getStyle(n,i,"fontFamily")};return{getDefaultValue:function(){return o()},getOptions:function(){return function(e){var t=e.theme,r=e.translator,n=e.defaultValue,i=[],o=t.getStyle("","","fontFamilies");return Array.isArray(o)&&o.length?i.push.apply(i,T(new Set([n].concat(T(o.map((function(e){return e.split(",").map((function(e){return e.trim()})).map((function(e){return e.replace(/\s+/g," ").trim()})).filter(Boolean).join(", ")}))))))):i.push(n),[{value:"ThemeHeader",label:r.get("properties.themeFonts"),metaText:r.get("properties.theme"),groupHeader:!0}].concat(T(i.map((function(e){return zt(e)}))),[{value:"DefaultHeader",label:r.get("properties.allFonts"),metaText:r.get("properties.default"),groupHeader:!0}],T(Vt.map((function(e){return zt(e)}))))}({theme:t,translator:r,defaultValue:o()})}}}var Bt=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],$t=function(e){return{value:e,label:e,groupHeader:!1,disabled:!1}};function Ut(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,T(new Set([r].concat(T(i))))):n.push(r),[{value:"ThemeHeader",label:t.get("properties.themeFontSizes"),metaText:t.get("properties.theme"),groupHeader:!0}].concat(T(n.map((function(e){return $t(e)}))),[{value:"DefaultHeader",label:t.get("properties.allFontSizes"),metaText:t.get("properties.default"),groupHeader:!0}],T(Bt.map((function(e){return $t(e)}))))}({theme:t,translator:r,defaultValue:o()})}}}function Wt(e){var t=e.theme,r=e.translator,n=e.id,i=e.path;return{fontFamily:jt({theme:t,translator:r,id:n,path:i}),fontSize:Ut({theme:t,translator:r,id:n,path:i})}}function Kt(e){var t=e.theme,r=e.translator,n=e.config,i=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:void 0===n?{}:n}),o=i.id,a=i.paths,s={};a.forEach((function(e){for(var n=e.split("."),i=s,a=0;a<n.length;a++){var l=n[a];a===n.length-1?i[l]=Wt({theme:t,translator:r,id:o,path:e}):void 0===i[l]&&(i[l]={}),i=i[l]}}));var l=function(e){for(var t=e.split("."),r=s,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 s.getDefaultValue=function(e){return l(e).getDefaultValue()},s.getOptions=function(e){return l(e).getOptions()},s}const Gt=(e,t)=>(t.components||[]).find((t=>t.key===e)),Yt=(e,t,r,n)=>{var i,o,a,s,l,u,c,p;const d=n.isEnabled("CLIENT_IM_3364")?null===(i=Gt("axis",r))||void 0===i?void 0:i.axis:{};return{labels:{fontFamily:(null==d||null===(o=d.label)||void 0===o||null===(a=o.name)||void 0===a?void 0:a.fontFamily)||t.getStyle(e,"axis.label.name","fontFamily"),fontSize:(null==d||null===(s=d.label)||void 0===s||null===(l=s.name)||void 0===l?void 0:l.fontSize)||t.getStyle(e,"axis.label.name","fontSize"),fill:(null==d||null===(u=d.label)||void 0===u||null===(c=u.name)||void 0===c||null===(p=c.fontColor)||void 0===p?void 0:p.color)||t.getStyle(e,"axis.label.name","color")}}},Jt="object.waterfallChart";function Xt(e,t,r,n,i){const o=e.color||e.qDef.color;if(!o||o.auto||!o[r]){return{index:i,color:t.getStyle(Jt,`shape.${r}`,"fill")||n}}return o[r].paletteColor}const Qt={valueTypes:{NORMAL:"NORMAL",INVERSE:"INVERSE",SUBTOTAL:"SUBTOTAL"},chartID:Jt,getColorForPositiveValue:function(e,t){return t.getColorPickerColor(Xt(e,t,"positiveValue",null,6))},getColorForNegativeValue:function(e,t){return t.getColorPickerColor(Xt(e,t,"negativeValue","#cc6677",-1))},getColorForSubtotal:function(e,t){return t.getColorPickerColor(Xt(e,t,"subtotal","#c3c3c3",-1))}};Object.freeze(Qt.valueTypes),Object.freeze(Qt);const Zt=(e,t,r)=>({component:"styling-panel",chartTitle:"Object.WaterfallChart",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",ref:"components",useGeneral:!0,useBackground:e,items:r&&null!=r&&r.isEnabled("CLIENT_IM_3364")?{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")}}:void 0});function er(e){return!e.color.auto}function tr(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:Qt.valueTypes.NORMAL,translation:"properties.waterfall.measureOperation.add"},{value:Qt.valueTypes.INVERSE,translation:"properties.waterfall.measureOperation.subtract"},{value:Qt.valueTypes.SUBTOTAL,translation:"properties.waterfall.measureOperation.subtotal"}],defaultValue:Qt.valueTypes.NORMAL},subTotal:{ref:"qDef.subtotal.enable",type:"boolean",defaultValue:!1,translation:"properties.waterfall.measureOperation.subtotal",show:e=>e.qDef.valueType!==Qt.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!==Qt.valueTypes.SUBTOTAL&&e.qDef.subtotal&&e.qDef.subtotal.enable}}}}},a=e.anything.sense.theme,s=((e,t,r,n)=>n({theme:e,translator:t,config:{id:r,paths:["axis.title","axis.label.name","label.value"]}}))(a,r,Qt.chartID,Kt),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,Qt.chartID),u={type:"items",translation:"properties.presentation",grouped:!0,items:{styleEditor:n&&Zt(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:er},d={ref:"color.negativeValue.paletteColor",translation:"properties.waterfall.color.negativeValueColor",type:"object",component:"color-picker",dualOutput:!0,defaultValue:{index:-1,color:"#cc6677"},show:er},m={ref:"color.subtotal.paletteColor",translation:"properties.waterfall.color.subtotalColor",type:"object",component:"color-picker",dualOutput:!0,defaultValue:{index:-1,color:"#c3c3c3"},show:er},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=>at(e,"legend.show",!0)}}}}},g={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:g,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:{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:{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]}}}}},dimensionAxis:{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}}}}}}}}}}function rr(e){var t;if(null!==(t=e.anything)&&void 0!==t&&t.sense)return{definition:tr(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 N({dataDefinition:E(e),defaultPropertyValues:i,exportFormat:t,initialProperties:r})},exportProperties:(e,t,r)=>I({propertyTree:e,viewDataMode:r})}}const nr=/xyz/.test((()=>{}))?/\b_super\b/:/.*/,ir=function(){};ir.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]&&nr.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 or={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 ar(){return or.id()}const sr="scrollbar";function lr(e,t,r){return"y"===e?ur(t,r):function(e){return"far"===e?"top":"bottom"}(t)}function ur(e,t){const r=e||"near";return t&&"near"===r||!t&&"far"===r?"right":"left"}var cr={getAxisDock:lr,getOppositeAxisDock:function(e,t,r){return lr(e,"far"===t?"near":"far",r)},getYAxisDock:ur};const pr=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),dr=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),mr=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]");function fr(e){return pr.test(e)}function hr(e){return dr.test(e)||mr.test(e)}var gr={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],fr(n))return"ltr";if(hr(n))return"rtl"}return"ltr"}};var yr={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} ${gr.lrm}(${r})${gr.lrm}`:`${gr.lrm}(${r})${gr.lrm}`:!1!==e.showLabel?t:""}};const br={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:{minimumLayoutMode:"SPARK",prioOrder:60,displayOrder:-10},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}}};br.DEFAULT_CHART_ORIENTATION=br.HORIZONTAL;function vr(e,t){const r=t||{},n=r.measureAxisProperties||{},i=r.dimensionAxisProperties||{},o=r.orientation||br.DEFAULT_CHART_ORIENTATION,a=o===br.HORIZONTAL,s=a?"x":"y",l=a?"y":"x",u=br.SHOW_AXIS_LABELS_OPTIONS,c=br.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,br.LAYOUTSETTINGS.measureAxis);const o=qr(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,br.LAYOUTSETTINGS.measureAxisTitle);const i=function(e,t){return qr(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,br.LAYOUTSETTINGS.dimensionAxis);const i=Dr(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,br.LAYOUTSETTINGS.dimensionAxisTitle);const i=function(e,t){return Dr(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===br.HORIZONTAL?br.VERTICAL:br.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,br.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({},br.LAYOUTSETTINGS.scrollBar);e.addComponent("scrollbar",a,o),xr(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===sr))}return[{type:"Tap",options:{enable:t},events:{tap(e){this.chart.component(sr).emit("tap",e)}}},{type:"Pan",options:{enable:t},events:{panstart(e){this.chart.component(sr).emit("panStart",e)},pan(e){this.chart.component(sr).emit("panMove",e)},panend(e){this.chart.component(sr).emit("panEnd",e)},pancancel(e){this.chart.component(sr).emit("panCancel",e)}}}]}(r.isNavigationEnabledFn))}(e,y,r,a),g&&function(e,t,r,n){const i=cr.getAxisDock(r,n.dock,t.isRtl);let o={key:"ref-line",style:{oob:{show:!1}},lines:{x:[],y:[]}};o=q(o,br.LAYOUTSETTINGS.refLines);let a={key:`ref-line-labels-${ar()}`,require:["renderer","chart"],dock:cr.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,br.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=yr.lineSettings({scale:"measure",dir:r,value:s},l);o.lines[r].push(u);const c=yr.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",br.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,br.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,Dr(r,l).dock,r.isRtl)}if(r.enableMeasureRange&&r.selectionsEnabled){!function(e,t,r,n,i){let o={key:"rangeMeasure"};o=q(o,br.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,qr(r,s).dock,r.isRtl)}if(r.enableAreaRange&&r.selectionsEnabled){!function(e,t,r,n,i){let o={key:"rangeMinor"};o=q(o,br.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,Dr(r,l).dock,r.isRtl)}r.brushActions&&xr(y,r.brushActions),y.length&&function(e,t){e.addInteraction({},{gestures:t})}(e,y)}function xr(e,t){t.forEach((t=>{e.push(t)}))}function qr(e,t){return{dock:e.measureAxisProperties&&e.measureAxisProperties.dock,direction:t,isRtl:e.isRtl}}function Dr(e,t){return{dock:e.dimensionAxisProperties&&e.dimensionAxisProperties.dock,direction:t,isRtl:e.isRtl}}function Sr(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 Mr(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",dock:cr.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 wr(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:cr.getAxisDock(i,n,o)||"bottom",displayOrder:0,style:{text:{fontSize:a,fontFamily:l,fill:s}}};return q(!0,{},u,e||{})}Sr.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=Sr(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},Sr.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 Sr(q(!0,r,e||{}),t)},Mr.xAxis=function(e,t){return Mr(q(!0,{key:"x-axis",scale:"x"},e||{}),t)},Mr.yAxis=function(e,t){const r=t&&t.dock,n=t&&t.isRtl,i={key:"y-axis",scale:"y",dock:cr.getYAxisDock(r,n)};return Mr(q(!0,i,e||{}),t)},wr.xAxisTitle=function(e,t){return wr(q(!0,{key:"x-axis-title"},e||{}),t)},wr.yAxisTitle=function(e,t){const r=t&&t.dock,n=t&&t.isRtl,i={key:"y-axis-title",dock:cr.getYAxisDock(r,n)||"left"};return wr(q(!0,i,e||{}),t)};var Er={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 Ar={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 Cr(){return Ar}function kr(e){const t=e.data.end;return e.dataset(t.source.key).field(t.source.field).formatter()(t.value)}Cr.getLayoutModeKeys=function(){const e=[];let t;for(t in Ar)e.push(t);return e};const Nr={left:"left",right:"right",up:"top",down:"bottom"};function Ir(e,t,r){switch(e){case"scale":return Sr(t,r);case"measure-scale":return Sr.measureScale(t,r);case"dimension-scale":return Sr.dimensionScale(t,r);case"axis":return Mr(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 wr(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:Er.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:Er.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:Er.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:Er.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={key:"legend",type:"legend-cat",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-${Nr[t.direction]}`].join(" ")})}}},style:{item:{label:{fontSize:u,fontFamily:t.theme.getStyle(r,"legend.label","fontFamily"),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,{},p,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 Mr.xAxis(t,r);case"y-axis":return Mr.yAxis(t,r);case"x-axis-title":return wr.xAxisTitle(t,r);case"y-axis-title":return wr.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={key:"labels",type:"labels",displayOrder:1,settings:{sources:[{component:"box-marker",selector:"rect",strategy:{type:"bar",settings:{direction:"up",fontFamily:t.theme.getStyle(r,"label.value","fontFamily"),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:kr}]}}}]}};return q(!0,{},o,e||{})}(t,r);default:return}}function Lr(e){this.options=e||{},this.settings={dockLayout:{layoutModes:Cr()},components:[],scales:{}}}Lr.prototype.addComponent=function(e,t,r){const n=Ir(e,t,q(!0,{},this.options,r||{}));return this.settings.components.push(n),n},Lr.prototype.addInteraction=function(e,t){const r=Ir("interaction",e,q(!0,{},this.options,t||{}));return this.settings.interactions||(this.settings.interactions=[]),this.settings.interactions.push(r),r},Lr.prototype.addScale=function(e,t,r){const n=Ir(e,t,q(!0,{},this.options,r||{}));this.settings.scales[n.name]=n.component},Lr.prototype.getSettings=function(){return this.settings},Lr.prototype.getComponent=function(e){return this.settings.components.filter((t=>t.key===e))[0]},Lr.prototype.addPreset=function(e,t){!function(e,t,r){if("dimension-measure-chart"!==e)throw Error("There is no chart preset with that type");vr(t,r)}(e,this,t)},Lr.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))},Lr.create=function(e){return new Lr(e)},Lr.createComponent=Ir;const Tr={CENTER:0,BOTTOM:1};var Rr={DISCLAIMERS:[{label:"NoDataExist",alignment:Tr.CENTER,default:!0},{label:"RequireNumericDimension",alignment:Tr.CENTER,default:!1},{label:"OnlyNanData",alignment:Tr.CENTER,default:!0},{label:"OnlyNegativeOrZeroValues",alignment:Tr.CENTER,default:!1},{label:"LimitedData",alignment:Tr.BOTTOM,default:!1},{label:"OnlyNanColor",alignment:Tr.BOTTOM,default:!1},{label:"NegativeOrZeroValues",alignment:Tr.BOTTOM,default:!1},{label:"DataRangeIncludingZero",alignment:Tr.BOTTOM,default:!1}],ALIGNMENT:Tr};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,Rr.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 Pr(e,t,r){this.disclaimersConfig=e,this.dataAttributes=t,this.supportedDisclaimers=r}function Fr(e,t){return e&&t&&t[e]}function _r(e){this.environment=e,this.clear()}Pr.prototype.isValidAndSupported=function(e,t){return Fr(e.label,this.dataAttributes)&&(e.default||Fr(e.label,this.supportedDisclaimers))&&void 0!==t&&e.alignment===t},Pr.prototype.isAnyValidDisclaimer=function(e){let t=!1;const r=this;return this.disclaimersConfig.forEach((n=>{r.isValidAndSupported(n,e)&&(t=!0)})),t},Pr.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},_r.ERRORS={SET:"Calling Disclaimer.set() without attributes",DISPLAY:"Calling Disclaimer.display() before attributes are applied"},_r._applyDefaultSupport=function(e,t){let r=e;return r||(r={}),t.forEach((e=>{void 0===r[e.label]&&(r[e.label]=e.default)})),r},_r.prototype.getComponentSettings=function(){var e,t;const{translator:r}=this.environment,n=q(!0,{},this.vizAttributes.supportedDisclaimers),i=new Pr(Rr.DISCLAIMERS,this.dataAttributes,n);let o,a;if(i.isAnyValidDisclaimer(Rr.ALIGNMENT.CENTER))o=i.getMessage(Rr.ALIGNMENT.CENTER,r),a="center";else{if(!i.isAnyValidDisclaimer(Rr.ALIGNMENT.BOTTOM))return;o=i.getMessage(Rr.ALIGNMENT.BOTTOM,r),a="bottom"}return{key:"disclaimer",type:"disclaimer",layout:{displayOrder:1e3,dock:a},settings:{label:o,rtl:"rtl"===(null===(e=this.environment)||void 0===e||null===(t=e.options)||void 0===t?void 0:t.direction)}}},_r.prototype.set=function(e){if(this.clear(),!e)throw new Error(_r.ERRORS.SET);this.vizAttributes=e,this.dataAttributes=Or.applyAttributes(this.vizAttributes.options,this.vizAttributes.data)},_r.prototype.clear=function(){this.vizAttributes=null,this.dataAttributes=null};const Hr=ir.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 _r(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:[Lr.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),Lr.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:at(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})}),Vr={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}},zr=/^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/i,jr=/^rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),(\d(\.\d+)?)\)$/i,Br=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i,$r=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i,Ur=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i,Wr=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i,Kr=Math.floor,Gr=Math.round,Yr=ir.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 Yr)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=Gr(255*d),m=Gr(255*m),f=Gr(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=Gr(255*d),m=Gr(255*m),f=Gr(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=Gr(255*d),m=Gr(255*m),f=Gr(255*f),h=1}else Vr[p.toLowerCase()]?(r=p.toLowerCase(),d=Vr[r].r,m=Vr[r].g,f=Vr[r].b,h="number"==typeof Vr[r].a?Vr[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=Kr(d),this._g=Kr(m),this._b=Kr(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=Yr.toRGB(this)),this._spaces.rgb},toRGBA:function(){return this._spaces.rgba||(this._spaces.rgba=Yr.toRGBA(this)),this._spaces.rgba},toString(){return this._spaces.rgb||(this._spaces.rgb=Yr.toRGB(this)),this._spaces.rgb},toHex:function(){return this._spaces.hex||(this._spaces.hex=Yr.toHex(this)),this._spaces.hex},toHSL:function(e){return this._spaces.hsl||(this._spaces.hsl=Yr.toHSL(this,e)),this._spaces.hsl},toHSLA:function(e){return this._spaces.hsla||(this._spaces.hsla=Yr.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=Yr.toHSVComponents(this)),this._spaces.hsvComp},toNumber:function(){return this._spaces.num||(this._spaces.num=Yr.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 Yr||(e=new Yr(e)),this._r===e._r&&this._g===e._g&&this._b===e._b},blend(e,t){return`rgba(${[Kr(this._r+(e._r-this._r)*t),Kr(this._g+(e._g-this._g)*t),Kr(this._b+(e._b-this._b)*t),Kr(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 Yr(n)}});Yr.toRGB=function(e){if(e instanceof Yr)return`rgb(${[e._r,e._g,e._b].join(",")})`;"string"==typeof e&&(e=Yr.toNumber(e));return`rgb(${(16711680&e)>>16},${(65280&e)>>8},${255&e})`},Yr.toRGBA=function(e,t){if(e instanceof Yr)return`rgba(${[e._r,e._g,e._b,void 0!==t?t:e._a].join(",")})`;"string"==typeof e&&(e=Yr.toNumber(e));return`rgba(${(16711680&e)>>16},${(65280&e)>>8},${255&e},${void 0!==t?t:e._a})`},Yr.toHex=function(e){let t,r,n;return e instanceof Yr?(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=Yr.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}`)},Yr.toHSL=function(e,t){let r,n,i,o=0;"string"==typeof e&&(e=new Yr(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})`},Yr.toHSLA=function(e,t){let r,n,i,o=0;"string"==typeof e&&(e=new Yr(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})`},Yr.toHSVComponents=function(e){let t,r,n=0;"string"==typeof e&&(e=new Yr(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}},Yr.toNumber=function(){if(1===arguments.length&&arguments[0]instanceof Yr)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},Yr.blend=function(e,t,r){const n=(16711680&(e=Yr.toNumber(e)))>>16,i=(65280&e)>>8,o=255&e;return(n+(((16711680&(t=Yr.toNumber(t)))>>16)-n)*r<<16)+(i+(((65280&t)>>8)-i)*r<<8)+(o+((255&t)-o)*r)},Yr.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 Yr(n,i,o,a)},Yr.isCSSColor=function(e){return!(arguments.length>1||"string"!=typeof e)&&(zr.test(e)||jr.test(e)||Br.test(e)||$r.test(e)||Ur.test(e)||Wr.test(e)||Vr[e.toLowerCase()])},Yr.getBestContrast=function(e,t,r){const n=e.getLuminance();return Math.abs(n-t.getLuminance())>Math.abs(n-r.getLuminance())?t:r},Yr.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)},Yr.isDark=function(){const e={getLuminance:Yr.prototype.getLuminance,isInvalid:Yr.prototype.isInvalid};return Yr.prototype.init.apply(e,[].slice.call(arguments)),Yr.prototype.isDark.call(e)},Yr.useDarkLabel=function(e,t){return e._a>.5?!e.isDark():!t};const Jr={TRANSPARENT_BLACK:"rgba( 0,0,0,0.2 )",TRANSPARENT_WHITE:"rgba( 255,255,255,0.7 )",LIGHT_GREY:"#ccc",DARK_GREY:"#666",BLACK:"#000",WHITE:"#fff",getInverse(e){const t=new Yr(e);return 0===t.getAlpha()?this.BLACK:t.isDark()?this.WHITE:this.BLACK},getContrastingGrey(e){const t=new Yr(e);return 0===t.getAlpha()?this.DARK_GREY:Yr.getBestContrast(t,new Yr(Jr.LIGHT_GREY),new Yr(Jr.DARK_GREY))},getBestContrast:(e,t,r)=>Yr.getBestContrast(new Yr(e),new Yr(t),new Yr(r)),getContrastingTransparent(e){const t=new Yr(e);return 0===t.getAlpha()||"none"===e?this.TRANSPARENT_BLACK:t.isDark()?this.TRANSPARENT_WHITE:this.TRANSPARENT_BLACK}},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 Zr(){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 en(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 tn(){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,Zr.call(this))},Qr.prototype.getItemSize=function(){return this._itemSize},Qr.prototype.getScrollViewSizeInItem=function(){this._scrollViewSizeInItem||Zr.call(this);return this._scrollViewSizeInItem},Qr.prototype.on=function(){if(this._on)return;this.getScrollApi()&&(this._scrollApi.removeAllListeners(),this._scrollApi.on("update",tn.bind(this)));this._$chartElement.on(`mousewheel${Xr} DOMMouseScroll${Xr}`,en.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){Zr.call(this),this.getScrollApi()&&this._scrollApi.update({viewSize:this._scrollViewSizeInItem,max:e})},Qr.prototype.onResize=function(){this._sizeChanged=!0,Zr.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 rn={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 nn={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=rn.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){rn.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 on={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=rn.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];rn.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 an(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 sn={callAreaRangeGesture:function(e,t,r,n){const i=r.keys.dimRangeBrushKey?"majorrange":"measurerange";return{type:"Pan",options:{direction:an(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=rn.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];rn.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 ln={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=rn.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];rn.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 un={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 cn={callNavBtnGesture:function(e,t){return{type:"Tap",options:{event:"navBtnTap",enable(r,n){return!(!n||!e())&&rn.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 pn={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(cn.callNavBtnGesture(x.isNavigationEnabled,c)),v.push(nn.callLassoGesture(d,x,q)),s?l?(v.push(ln.callDimensionRangeGesture(d,x,q,h)),e.selectionHandler.addComponent(s,{id:"rangeDim",clear:"rangeClear"}),v.push(on.callMeasureRangeGesture(d,x,q,g)),e.selectionHandler.addComponent(l,{id:"rangeMeasure",clear:"rangeClear"})):(v.push(ln.callDimensionRangeGesture(d,x,q,h)),e.selectionHandler.addComponent(s,{id:"rangeDim",clear:"rangeClear"}),v.push(sn.callAreaRangeGesture(d,x,q,g)),e.selectionHandler.addComponent(u,{id:"rangeMinor",clear:"areaClear"})):(v.push(on.callMeasureRangeGesture(d,x,q,g)),e.selectionHandler.addComponent(l,{id:"rangeMeasure",clear:"rangeClear"}),v.push(sn.callAreaRangeGesture(d,x,q,h)),e.selectionHandler.addComponent(u,{id:"rangeMinor",clear:"areaClear"}))),e.scrollHandler&&(v.push(un.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 dn(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 mn={create:(...e)=>dn(...e)},fn={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 hn=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=gn(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 gn(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 yn="dist-flow-tooltip",bn=`#${yn}`;function vn(){if(!document.querySelector(bn)){const e=document.createElement("div");e.id=yn,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 xn({key:e="tooltip",rtl:t,fontFamily:r,filter:n,content:i}){return{show:!0,key:e,type:"tooltip",layout:{displayOrder:3},beforeMount(){vn()},beforeUpdate(){vn()},destroyed(){!function(){const e=document.querySelector(bn);e&&e.parentElement&&e.childElementCount<1&&e.parentElement.removeChild(e)}()},settings:{appendTo:()=>document.querySelector(bn),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:qn}=gr;const Dn={tooltipKey:"tooltip",data:[""],contexts:["tooltip"],headerResolver:e=>e.join(", "),rowResolver:(e,t)=>({value:fn.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:qn(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:qn(e.label)},u={...n.cell,textAlign:o?"left":"right",direction:qn(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:qn(e)};a.push(r("tr",null,r("td",{style:o,colSpan:2},e)))}return a}};function Sn(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,{},Dn,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:mn.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=xn({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:hn(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 Mn={create:(e,t,r)=>Sn(e,t,r)};function wn(e){return(12*Math.min(e,3)+6.384615384615385*Math.max(e-3,0))/11}function En(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 An(e,t){const r={latin:0,cjk:0};void 0===t?e.forEach((e=>{const t=En(e.qText);r.latin+=t.latin,r.cjk+=t.cjk})):e.forEach((e=>{const n=En(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 Cn(e,t,r){return e*(e<=24?t:r)}var kn={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:wn,getCharacterRatios:En,getTotalCharacterRatios:An,getAdjustedMaxGlyphCount:function(e,t,r){const n=An(t,r),i=n.latinRatio*e,o=n.cjkRatio*e;return Math.ceil(wn(i)+1.0909090909090908*o)},estimateLatinLabelWidth:Cn,estimateLabelWidth:function(e,t,r,n,i){return e*r+Cn(t,n,i)}};var Nn={generateHyperCube:function(e,t){const r=e.qHyperCube.qMeasureInfo,n=e.qHyperCube.qDataPages[0].qMatrix,i=r.length;if(!i)return;const o=Qt.getColorForPositiveValue(e,t),a=Qt.getColorForNegativeValue(e,t),s=Qt.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!==Qt.valueTypes.SUBTOTAL?(d=m,m+=p*(r[e].valueType===Qt.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 In(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}var Ln,Tn=(1===(Ln=In).length&&(Ln=function(e){return function(t,r){return In(e(t),r)}}(Ln)),{left:function(e,t,r,n){for(null==r&&(r=0),null==n&&(n=e.length);r<n;){var i=r+n>>>1;Ln(e[i],t)<0?r=i+1:n=i}return r},right:function(e,t,r,n){for(null==r&&(r=0),null==n&&(n=e.length);r<n;){var i=r+n>>>1;Ln(e[i],t)>0?n=i:r=i+1}return r}}),Rn=Tn.right,On=Math.sqrt(50),Pn=Math.sqrt(10),Fn=Math.sqrt(2);function _n(e,t,r){var n=(t-e)/Math.max(0,r),i=Math.floor(Math.log(n)/Math.LN10),o=n/Math.pow(10,i);return i>=0?(o>=On?10:o>=Pn?5:o>=Fn?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=On?10:o>=Pn?5:o>=Fn?2:1)}function Hn(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var Vn="$";function zn(){}function jn(e,t){var r=new zn;if(e instanceof zn)e.each((function(e,t){r.set(t,e)}));else if(Array.isArray(e)){var n,i=-1,o=e.length;if(null==t)for(;++i<o;)r.set(i,e[i]);else for(;++i<o;)r.set(t(n=e[i],i,e),n)}else if(e)for(var a in e)r.set(a,e[a]);return r}function Bn(){}zn.prototype=jn.prototype={constructor:zn,has:function(e){return Vn+e in this},get:function(e){return this[Vn+e]},set:function(e,t){return this[Vn+e]=t,this},remove:function(e){var t=Vn+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===Vn&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===Vn&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===Vn&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===Vn&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===Vn&&++e;return e},empty:function(){for(var e in this)if(e[0]===Vn)return!1;return!0},each:function(e){for(var t in this)t[0]===Vn&&e(this[t],t.slice(1),this)}};var $n=jn.prototype;Bn.prototype={constructor:Bn,has:$n.has,add:function(e){return this[Vn+(e+="")]=e,this},remove:$n.remove,clear:$n.clear,values:$n.keys,size:$n.size,empty:$n.empty,each:$n.each};var Un=Array.prototype,Wn=Un.map,Kn=Un.slice;function Gn(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Yn(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Jn(){}var Xn=.7,Qn=1/Xn,Zn="\\s*([+-]?\\d+)\\s*",ei="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",ti="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ri=/^#([0-9a-f]{3,8})$/,ni=new RegExp("^rgb\\("+[Zn,Zn,Zn]+"\\)$"),ii=new RegExp("^rgb\\("+[ti,ti,ti]+"\\)$"),oi=new RegExp("^rgba\\("+[Zn,Zn,Zn,ei]+"\\)$"),ai=new RegExp("^rgba\\("+[ti,ti,ti,ei]+"\\)$"),si=new RegExp("^hsl\\("+[ei,ti,ti]+"\\)$"),li=new RegExp("^hsla\\("+[ei,ti,ti,ei]+"\\)$"),ui={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 ci(){return this.rgb().formatHex()}function pi(){return this.rgb().formatRgb()}function di(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=ri.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?mi(t):3===r?new yi(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?fi(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?fi(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=ni.exec(e))?new yi(t[1],t[2],t[3],1):(t=ii.exec(e))?new yi(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=oi.exec(e))?fi(t[1],t[2],t[3],t[4]):(t=ai.exec(e))?fi(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=si.exec(e))?qi(t[1],t[2]/100,t[3]/100,1):(t=li.exec(e))?qi(t[1],t[2]/100,t[3]/100,t[4]):ui.hasOwnProperty(e)?mi(ui[e]):"transparent"===e?new yi(NaN,NaN,NaN,0):null}function mi(e){return new yi(e>>16&255,e>>8&255,255&e,1)}function fi(e,t,r,n){return n<=0&&(e=t=r=NaN),new yi(e,t,r,n)}function hi(e){return e instanceof Jn||(e=di(e)),e?new yi((e=e.rgb()).r,e.g,e.b,e.opacity):new yi}function gi(e,t,r,n){return 1===arguments.length?hi(e):new yi(e,t,r,null==n?1:n)}function yi(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function bi(){return"#"+xi(this.r)+xi(this.g)+xi(this.b)}function vi(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function xi(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<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 Si(e,t,r,n)}function Di(e){if(e instanceof Si)return new Si(e.h,e.s,e.l,e.opacity);if(e instanceof Jn||(e=di(e)),!e)return new Si;if(e instanceof Si)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 Si(a,s,l,e.opacity)}function Si(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function Mi(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}function wi(e){return function(){return e}}function Ei(e){return 1==(e=+e)?Ai: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):wi(isNaN(t)?r:t)}}function Ai(e,t){var r=t-e;return r?function(e,t){return function(r){return e+r*t}}(e,r):wi(isNaN(e)?t:e)}Gn(Jn,di,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:ci,formatHex:ci,formatHsl:function(){return Di(this).formatHsl()},formatRgb:pi,toString:pi}),Gn(yi,gi,Yn(Jn,{brighter:function(e){return e=null==e?Qn:Math.pow(Qn,e),new yi(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?Xn:Math.pow(Xn,e),new yi(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){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:bi,formatHex:bi,formatRgb:vi,toString:vi})),Gn(Si,(function(e,t,r,n){return 1===arguments.length?Di(e):new Si(e,t,r,null==n?1:n)}),Yn(Jn,{brighter:function(e){return e=null==e?Qn:Math.pow(Qn,e),new Si(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?Xn:Math.pow(Xn,e),new Si(this.h,this.s,this.l*e,this.opacity)},rgb:function(){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 yi(Mi(e>=240?e-240:e+120,i,n),Mi(e,i,n),Mi(e<120?e+240:e-120,i,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var Ci=function e(t){var r=Ei(t);function n(e,t){var n=r((e=gi(e)).r,(t=gi(t)).r),i=r(e.g,t.g),o=r(e.b,t.b),a=Ai(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 ki(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 Ni(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]=Fi(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 Ii(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function Li(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]=Fi(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,Oi=new RegExp(Ri.source,"g");function Pi(e,t){var r,n,i,o=Ri.lastIndex=Oi.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(r=Ri.exec(e))&&(n=Oi.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:Li(r,n)})),o=Oi.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 Fi(e,t){var r,n,i=typeof t;return null==t||"boolean"===i?wi(t):("number"===i?Li:"string"===i?(r=di(t))?(t=r,Ci):Pi:t instanceof di?Ci:t instanceof Date?Ii:(n=t,!ArrayBuffer.isView(n)||n instanceof DataView?Array.isArray(t)?Ni:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?Ti:Li:ki))(e,t)}function _i(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function Hi(e){return+e}var Vi=[0,1];function zi(e){return e}function ji(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:(r=isNaN(t)?NaN:.5,function(){return r});var r}function Bi(e){var t,r=e[0],n=e[e.length-1];return r>n&&(t=r,r=n,n=t),function(e){return Math.max(r,Math.min(n,e))}}function $i(e,t,r){var n=e[0],i=e[1],o=t[0],a=t[1];return i<n?(n=ji(i,n),o=r(a,o)):(n=ji(n,i),o=r(o,a)),function(e){return o(n(e))}}function Ui(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]=ji(e[a],e[a+1]),o[a]=r(t[a],t[a+1]);return function(t){var r=Rn(e,t,1,n)-1;return o[r](i[r](t))}}function Wi(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Ki(e,t){return function(){var e,t,r,n,i,o,a=Vi,s=Vi,l=Fi,u=zi;function c(){return n=Math.min(a.length,s.length)>2?Ui:$i,i=o=null,p}function p(t){return 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),Li)))(r)))},p.domain=function(e){return arguments.length?(a=Wn.call(e,Hi),u===zi||(u=Bi(a)),c()):a.slice()},p.range=function(e){return arguments.length?(s=Kn.call(e),c()):s.slice()},p.rangeRound=function(e){return s=Kn.call(e),l=_i,c()},p.clamp=function(e){return arguments.length?(u=e?Bi(a):zi,p):u!==zi},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()}}()(e,t)}function Gi(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 Yi(e){return(e=Gi(Math.abs(e)))?e[1]:NaN}var Ji,Xi=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Qi(e){if(!(t=Xi.exec(e)))throw new Error("invalid format: "+e);var t;return new Zi({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 Zi(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 eo(e,t){var r=Gi(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")}Qi.prototype=Zi.prototype,Zi.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={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return eo(100*e,t)},r:eo,s:function(e,t){var r=Gi(e,t);if(!r)return e+"";var n=r[0],i=r[1],o=i-(Ji=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")+Gi(e,Math.max(0,t+o-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function ro(e){return e}var no,io,oo,ao=Array.prototype.map,so=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function lo(e){var t,r,n=void 0===e.grouping||void 0===e.thousands?ro:(t=ao.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?ro:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(ao.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=Qi(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"):to[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=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 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?so[8+Ji/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,E=w<f?new Array(f-w+1).join(t):"";switch(h&&m&&(e=n(E+e,E.length?f-S.length:1/0),E=""),r){case"<":e=d+e+S+E;break;case"=":e=d+E+e+S;break;case"^":e=E.slice(0,w=E.length>>1)+d+e+S+E.slice(w);break;default:e=E+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=Qi(e)).type="f",e)),n=3*Math.max(-8,Math.min(8,Math.floor(Yi(t)/3))),i=Math.pow(10,-n),o=so[8+n/3];return function(e){return r(i*e)+o}}}}function uo(e,t,r,n){var i,o=function(e,t,r){var n=Math.abs(t-e)/Math.max(0,r),i=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),o=n/i;return o>=On?i*=10:o>=Pn?i*=5:o>=Fn&&(i*=2),t<e?-i:i}(e,t,r);switch((n=Qi(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(Yi(t)/3)))-Yi(Math.abs(e)))}(o,a))||(n.precision=i),oo(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,Yi(t)-Yi(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,-Yi(Math.abs(e)))}(o))||(n.precision=i-2*("%"===n.type))}return io(n)}function co(e){var t=e.domain;return e.ticks=function(e){var r=t();return function(e,t,r){var n,i,o,a,s=-1;if(r=+r,(e=+e)==(t=+t)&&r>0)return[e];if((n=t<e)&&(i=e,e=t,t=i),0===(a=_n(e,t,r))||!isFinite(a))return[];if(a>0)for(e=Math.ceil(e/a),t=Math.floor(t/a),o=new Array(i=Math.ceil(t-e+1));++s<i;)o[s]=(e+s)*a;else for(e=Math.floor(e*a),t=Math.ceil(t*a),o=new Array(i=Math.ceil(e-t+1));++s<i;)o[s]=(e-s)/a;return n&&o.reverse(),o}(r[0],r[r.length-1],null==e?10:e)},e.tickFormat=function(e,r){var n=t();return uo(n[0],n[n.length-1],null==e?10:e,r)},e.nice=function(r){null==r&&(r=10);var n,i=t(),o=0,a=i.length-1,s=i[o],l=i[a];return l<s&&(n=s,s=l,l=n,n=o,o=a,a=n),(n=_n(s,l,r))>0?n=_n(s=Math.floor(s/n)*n,l=Math.ceil(l/n)*n,r):n<0&&(n=_n(s=Math.ceil(s*n)/n,l=Math.floor(l*n)/n,r)),n>0?(i[o]=Math.floor(s/n)*n,i[a]=Math.ceil(l/n)*n,t(i)):n<0&&(i[o]=Math.ceil(s*n)/n,i[a]=Math.floor(l*n)/n,t(i)),e},e}function po(){var e=Ki(zi,zi);return e.copy=function(){return Wi(e,po())},Hn.apply(e,arguments),co(e)}no=lo({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),io=no.format,oo=no.formatPrefix;const mo={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=po().domain([o,a]).ticks(l),c=mo.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 mo.adjustTicks({ticks:p,majorTicks:u,minorTicks:c,autoMinMax:r,minMax:n,min:o,max:a})}},fo=Qt.chartID;function ho(e){this._scrollHandler.setDisabled(!!e)}function go(e){let t=-Number.MAX_VALUE;return e.qHyperCube.qMeasureInfo.forEach((e=>{t=Math.max(t,e.qFallbackTitle.length),e.valueType!==Qt.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 yo(e){return{settings:{labels:{mode:e.dimensionAxis.label,maxGlyphCount:Math.ceil(kn.stringWidthOverMWidth(go(e))),maxLengthPx:this.picassoElement.getBoundingClientRect().height/4}}}}function bo(e){const t=e.data.measure,r=e.dataset(t.source.key).field(t.source.field);return fn.formatMeasureValue(r,t)}function vo(e,t,r){const n=((e,t,r,n)=>{var i,o,a,s,l;const u=n.isEnabled("CLIENT_IM_3364")?null===(i=Gt("value",r))||void 0===i?void 0:i.label:{},c=(null==u||null===(o=u.value)||void 0===o?void 0:o.fontFamily)||t.getStyle(e,"label.value.name","fontFamily");let p=(null==u||null===(a=u.value)||void 0===a?void 0:a.fontSize)||t.getStyle(e,"label.value.size","fontSize");return p=parseFloat(p),{fontFamily:c,fontSize:p,fill:(null==u||null===(s=u.value)||void 0===s||null===(l=s.fontColor)||void 0===l?void 0:l.color)||t.getStyle(e,"label.value.color","color")}})(fo,e,t,r),i=(null==n?void 0:n.fill)||e.getStyle(fo,"value.color","default"),o=e.getStyle(fo,"value.color","dark"),a=e.getStyle(fo,"value.color","light");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:e=>r.isEnabled("CLIENT_IM_3364")?i:function(e,t,r){return Jr.getBestContrast(e,t,r)}(e.data.boxColor.value,o,a)},{position:"opposite",fill:i,justify:0}],label:bo}]}}}]}}}function xo(e,t){return{viewSize:t,max:e.generatedMatrix.length}}const qo=Hr.extend("WaterfallChart",{namespace:".waterfallchart",chartID:fo,init:function({picasso:e,environment:t,$element:r,flags:n}){this._super(e,r,t,null,null),this._tooltipHandler=Mn.create(this.chartInstance,r,fo),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=Lr.create({chartID:fo,theme:r,isRtl:t}),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:fn.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=pn.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:yo.call(this,e),dimensionSource:Nn.getGeneratedDimensionPath(0),dimensionScaleSettings:{component:{maxPxStep:()=>a/4}},includeMeasureAxis:!0,measureAxisProperties:e.measureAxis,measureSource:[Nn.getGeneratedMeasurePath(0),Nn.getGeneratedMeasurePath(1)],measureScaleSettings:{component:{expand:0,include:[0],ticks:{values:()=>mo.getTicks({layout:e,height:a})}}},hasNavigation:!n,isNavigationEnabledFn:()=>this._scrollHandler.isOn(),scrollSettings:xo(e,this._scrollHandler.getScrollViewSizeInItem()),refLines:e.refLine&&e.refLine.refLines,brushActions:this._dependentActions.gestures,axisLabelStyle:Yt(fo,r,e,this.flags)}),i.addComponent("box-marker",function(e,t){const r=e?[e.box.trigger]:[],n=e?e.box.consume:[];return{data:{extract:{key:"qHyperCube",field:Nn.getGeneratedDimensionPath(0),props:{start:{field:Nn.getGeneratedMeasurePath(0)},end:{field:Nn.getGeneratedMeasurePath(1)},measure:{field:Nn.getGeneratedMeasurePath(2),reduce:"first",value:e=>e},boxColor:{field:Nn.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(fo,"shape.bridge","stroke");return{data:{extract:{key:"qHyperCube",field:Nn.getGeneratedDimensionPath(0),props:{x:{},y:{field:Nn.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",function(e,t){const{theme:r,translator:n}=e,i=Qt.getColorForPositiveValue(t,r),o=Qt.getColorForNegativeValue(t,r),a=Qt.getColorForSubtotal(t,r);return{displayOrder:200,minimumLayoutMode:"MEDIUM",prioOrder:0,scale:{type:"categorical-color",data:[n.get("waterfall.legend.positiveValue.label"),n.get("waterfall.legend.negativeValue.label"),n.get("waterfall.legend.subtotal.label")],range:[i,o,a]},style:{title:{show:!1}}}}(this.environment,e),{dock:e.legend?e.legend.dock:"auto",isRtl:t,chartWidth:o,chartHeight:a}),e.dataPoint.showLabels&&i.addComponent("labels",vo(r,e,this.flags));const u=i.getSettings();return this.addSnapshotChartSettings(u,e),u},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,Nn.generateHyperCube(n.layout,t)}else{Nn.generateHyperCube(n.layout,t),ho.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()}Nn.generateSlicedHyperCube(n.layout,i,o)}))},resize:function(){this._scrollHandler.onResize(),this._super()},paint:function(){const e=!!this.layout.snapshotData;e||this.environment.options.viewState||ho.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 Nn.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 Do(q){!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);const w=function(){const e=y();return e.renderer.prio(["canvas"]),e.use(b),e.use(v(x)),e.use(S),e.component("disclaimer",M),e}();return{qae:L(q),ext:rr(q),component(){const y=d(),b=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])}(),v=m(),x=r(),[D,S]=f();var M;h((()=>{const e=g(y),t=new qo({picasso:w,environment:b,$element:e,flags:q.flags});return S(t),()=>{t.destroy()}}),[]),function(...e){const[,t]=n(...e);if(t)throw t}((async()=>{D&&(D.updateEnvironment(b),D.updateConstraints(x),await D.updateData(v),await D.paint())}),[v,D,b]),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}(D),M=D,c((e=>{if(M)return M.setSnapshotData(e)})),p((()=>({getViewState(){if(M)return M.getViewState()}})),[M])}}}export{Do 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}},Fe({exports:{}});var Ge=["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"],Ye=["Abril Fatface, serif","Bangers, fantasy","EB Garamond, serif","Fredoka One, fantasy","Graduate, fantasy","Gravitas One, serif","Nixie One, sans-serif","Noto Sans, sans-serif","PT Serif, serif","Permanent Marker, fantasy","Rammetto One, fantasy","Roboto, sans-serif","QlikView Sans, sans-serif","Source Sans Pro, sans-serif","Titan One, fantasy","Open Sans, sans-serif","Montserrat, sans-serif","Raleway, sans-serif","Bebas Neue, sans serif","Lobster, fantasy","Pacifico, cursive","Inter, sans-serif","Indie Flower, fantasy","Yanone Kaffeesatz, sans-serif"],Je=function(e){return{value:e,label:e.charAt(0).toUpperCase()+e.slice(1),groupHeader:!1,disabled:!1}};function Qe(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 function(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,T(new Set([n].concat(T(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(T(o.map((function(e){return Je(e)}))),[{value:"DefaultHeader",label:r.get("properties.allFonts"),metaText:r.get("properties.default"),groupHeader:!0}],T(function(e){return null!=e&&e.isEnabled("PS_20852_WYSIWYG_FONT_SUPPORT")?Ye:Ge}(i).map((function(e){return Je(e)}))))}({theme:t,translator:r,defaultValue:a(),flags:o})}}}var Xe=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],Ze=function(e){return{value:e,label:e,groupHeader:!1,disabled:!1}};function et(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,T(new Set([r].concat(T(i))))):n.push(r),[{value:"ThemeHeader",label:t.get("properties.themeFontSizes"),metaText:t.get("properties.theme"),groupHeader:!0}].concat(T(n.map((function(e){return Ze(e)}))),[{value:"DefaultHeader",label:t.get("properties.allFontSizes"),metaText:t.get("properties.default"),groupHeader:!0}],T(Xe.map((function(e){return Ze(e)}))))}({theme:t,translator:r,defaultValue:o()})}}}function tt(e){var t=e.theme,r=e.translator,n=e.id,i=e.path;return{fontFamily:Qe({theme:t,translator:r,id:n,path:i,flags:e.flags}),fontSize:et({theme:t,translator:r,id:n,path:i})}}function rt(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]=tt({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}const nt=(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},it=(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"]}}),ot=(e,t)=>(t.components||[]).find((t=>t.key===e)),at=(e,t,r,n)=>{var i,o,a,s,l,u,c,p;const d=n.isEnabled("CLIENT_IM_3364")?null===(i=ot("axis",r))||void 0===i?void 0:i.axis:{};return{labels:{fontFamily:(null==d||null===(o=d.label)||void 0===o||null===(a=o.name)||void 0===a?void 0:a.fontFamily)||t.getStyle(e,"axis.label.name","fontFamily"),fontSize:(null==d||null===(s=d.label)||void 0===s||null===(l=s.name)||void 0===l?void 0:l.fontSize)||t.getStyle(e,"axis.label.name","fontSize"),fill:(null==d||null===(u=d.label)||void 0===u||null===(c=u.name)||void 0===c||null===(p=c.fontColor)||void 0===p?void 0:p.color)||t.getStyle(e,"axis.label.name","color")}}},st=(e,t,r,n)=>{var i,o,a,s,l;const u=n.isEnabled("CLIENT_IM_3364")?null===(i=ot("value",r))||void 0===i?void 0:i.label:{},c=(null==u||null===(o=u.value)||void 0===o?void 0:o.fontFamily)||t.getStyle(e,"label.value.name","fontFamily");let p=(null==u||null===(a=u.value)||void 0===a?void 0:a.fontSize)||t.getStyle(e,"label.value.size","fontSize");p=parseFloat(p);return{fontFamily:c,fontSize:p,fill:(null==u||null===(s=u.value)||void 0===s||null===(l=s.fontColor)||void 0===l?void 0:l.color)||t.getStyle(e,"label.value.color","color")}},lt=(e,t,r,n)=>{var i,o,a,s,l;const u=n.isEnabled("CLIENT_IM_3051")?null===(i=ot("legend",r))||void 0===i?void 0:i.legend:{};return{fontFamily:(null==u||null===(o=u.label)||void 0===o?void 0:o.fontFamily)||t.getStyle(e,"legend.label","fontFamily"),fontSize:(null==u||null===(a=u.label)||void 0===a?void 0:a.fontSize)||t.getStyle(e,"legend.label","fontSize"),color:(null==u||null===(s=u.label)||void 0===s||null===(l=s.fontColor)||void 0===l?void 0:l.color)||t.getStyle(e,"legend.label","color")}},ut="object.waterfallChart";function ct(e,t,r,n,i){const o=e.color||e.qDef.color;if(!o||o.auto||!o[r]){return{index:i,color:t.getStyle(ut,`shape.${r}`,"fill")||n}}return o[r].paletteColor}const pt={valueTypes:{NORMAL:"NORMAL",INVERSE:"INVERSE",SUBTOTAL:"SUBTOTAL"},chartID:ut,getColorForPositiveValue:function(e,t){return t.getColorPickerColor(ct(e,t,"positiveValue",null,6))},getColorForNegativeValue:function(e,t){return t.getColorPickerColor(ct(e,t,"negativeValue","#cc6677",-1))},getColorForSubtotal:function(e,t){return t.getColorPickerColor(ct(e,t,"subtotal","#c3c3c3",-1))}};Object.freeze(pt.valueTypes),Object.freeze(pt);const dt=(e,t)=>{const r={};return null!=e&&e.isEnabled("CLIENT_IM_3364")&&(r.axisLabelSection={translation:"properties.axis.label",component:"panel-section",items:t.getOptions("axis","axis.label.name")},r.valueLabelSection={translation:"properties.value.label",component:"panel-section",items:t.getOptions("value","label.value")}),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},mt=(e,t,r)=>({component:"styling-panel",chartTitle:"Object.WaterfallChart",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",ref:"components",useGeneral:!0,useBackground:e,items:dt(r,t)});function ft(e){return!e.color.auto}function ht(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:pt.valueTypes.NORMAL,translation:"properties.waterfall.measureOperation.add"},{value:pt.valueTypes.INVERSE,translation:"properties.waterfall.measureOperation.subtract"},{value:pt.valueTypes.SUBTOTAL,translation:"properties.waterfall.measureOperation.subtotal"}],defaultValue:pt.valueTypes.NORMAL},subTotal:{ref:"qDef.subtotal.enable",type:"boolean",defaultValue:!1,translation:"properties.waterfall.measureOperation.subtotal",show:e=>e.qDef.valueType!==pt.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!==pt.valueTypes.SUBTOTAL&&e.qDef.subtotal&&e.qDef.subtotal.enable}}}}},a=e.anything.sense.theme,s=it(a,r,pt.chartID,rt,t),l=nt(s,a,pt.chartID),u={type:"items",translation:"properties.presentation",grouped:!0,items:{styleEditor:n&&mt(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:ft},d={ref:"color.negativeValue.paletteColor",translation:"properties.waterfall.color.negativeValueColor",type:"object",component:"color-picker",dualOutput:!0,defaultValue:{index:-1,color:"#cc6677"},show:ft},m={ref:"color.subtotal.paletteColor",translation:"properties.waterfall.color.subtotalColor",type:"object",component:"color-picker",dualOutput:!0,defaultValue:{index:-1,color:"#c3c3c3"},show:ft},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=>Ve(e,"legend.show",!0)}}}}},g={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:g,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:{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:{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]}}}}},dimensionAxis:{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}}}}}}}}}}function gt(e){var t;if(null!==(t=e.anything)&&void 0!==t&&t.sense)return{definition:ht(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 I({dataDefinition:A(e),defaultPropertyValues:i,exportFormat:t,initialProperties:r})},exportProperties:(e,t,r)=>L({propertyTree:e,viewDataMode:r})}}const yt=/xyz/.test((()=>{}))?/\b_super\b/:/.*/,bt=function(){};bt.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]&&yt.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 vt={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 xt(){return vt.id()}const qt="scrollbar";function Dt(e,t,r){return"y"===e?St(t,r):function(e){return"far"===e?"top":"bottom"}(t)}function St(e,t){const r=e||"near";return t&&"near"===r||!t&&"far"===r?"right":"left"}var Mt={getAxisDock:Dt,getOppositeAxisDock:function(e,t,r){return Dt(e,"far"===t?"near":"far",r)},getYAxisDock:St};const Et=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),At=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),wt=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]");function Ct(e){return Et.test(e)}function kt(e){return At.test(e)||wt.test(e)}var It={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],Ct(n))return"ltr";if(kt(n))return"rtl"}return"ltr"}};var Lt={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} ${It.lrm}(${r})${It.lrm}`:`${It.lrm}(${r})${It.lrm}`:!1!==e.showLabel?t:""}};const Nt={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}}};Nt.DEFAULT_CHART_ORIENTATION=Nt.HORIZONTAL;const Tt=100;function Ot(e,t){const r=t||{},n=r.measureAxisProperties||{},i=r.dimensionAxisProperties||{},o=r.orientation||Nt.DEFAULT_CHART_ORIENTATION,a=o===Nt.HORIZONTAL,s=a?"x":"y",l=a?"y":"x",u=Nt.SHOW_AXIS_LABELS_OPTIONS,c=Nt.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,Nt.LAYOUTSETTINGS.measureAxis);const o=Pt(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,Nt.LAYOUTSETTINGS.measureAxisTitle);const i=function(e,t){return Pt(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:n.spacing*Tt}}}));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,Nt.LAYOUTSETTINGS.dimensionAxis);const i=Ft(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,Nt.LAYOUTSETTINGS.dimensionAxisTitle);const i=function(e,t){return Ft(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===Nt.HORIZONTAL?Nt.VERTICAL:Nt.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,Nt.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({},Nt.LAYOUTSETTINGS.scrollBar);e.addComponent("scrollbar",a,o),Rt(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===qt))}const r={type:"Tap",options:{enable:t},events:{tap(e){this.chart.component(qt).emit("tap",e)}}},n={type:"Pan",options:{enable:t},events:{panstart(e){this.chart.component(qt).emit("panStart",e)},pan(e){this.chart.component(qt).emit("panMove",e)},panend(e){this.chart.component(qt).emit("panEnd",e)},pancancel(e){this.chart.component(qt).emit("panCancel",e)}}};return[r,n]}(r.isNavigationEnabledFn))}(e,y,r,a),g&&function(e,t,r,n){const i=Mt.getAxisDock(r,n.dock,t.isRtl);let o={key:"ref-line",style:{oob:{show:!1}},lines:{x:[],y:[]}};o=q(o,Nt.LAYOUTSETTINGS.refLines);let a={key:`ref-line-labels-${xt()}`,require:["renderer","chart"],dock:Mt.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,Nt.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=Lt.lineSettings({scale:"measure",dir:r,value:s},l);o.lines[r].push(u);const c=Lt.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",Nt.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,Nt.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,Ft(r,l).dock,r.isRtl)}if(r.enableMeasureRange&&r.selectionsEnabled){!function(e,t,r,n,i){let o={key:"rangeMeasure"};o=q(o,Nt.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,Pt(r,s).dock,r.isRtl)}if(r.enableAreaRange&&r.selectionsEnabled){!function(e,t,r,n,i){let o={key:"rangeMinor"};o=q(o,Nt.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,Ft(r,l).dock,r.isRtl)}r.brushActions&&Rt(y,r.brushActions),y.length&&function(e,t){e.addInteraction({},{gestures:t})}(e,y)}function Rt(e,t){t.forEach((t=>{e.push(t)}))}function Pt(e,t){return{dock:e.measureAxisProperties&&e.measureAxisProperties.dock,direction:t,isRtl:e.isRtl}}function Ft(e,t){return{dock:e.dimensionAxisProperties&&e.dimensionAxisProperties.dock,direction:t,isRtl:e.isRtl}}function _t(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 Ht(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",dock:Mt.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 Vt(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:Mt.getAxisDock(i,n,o)||"bottom",displayOrder:0,style:{text:{fontSize:a,fontFamily:l,fill:s}}};return q(!0,{},u,e||{})}_t.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=_t(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},_t.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 _t(q(!0,r,e||{}),t)},Ht.xAxis=function(e,t){return Ht(q(!0,{key:"x-axis",scale:"x"},e||{}),t)},Ht.yAxis=function(e,t){const r=t&&t.dock,n=t&&t.isRtl,i={key:"y-axis",scale:"y",dock:Mt.getYAxisDock(r,n)};return Ht(q(!0,i,e||{}),t)},Vt.xAxisTitle=function(e,t){return Vt(q(!0,{key:"x-axis-title"},e||{}),t)},Vt.yAxisTitle=function(e,t){const r=t&&t.dock,n=t&&t.isRtl,i={key:"y-axis-title",dock:Mt.getYAxisDock(r,n)||"left"};return Vt(q(!0,i,e||{}),t)};var zt={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 $t(){return jt}function Bt(e){const t=e.data.end;return e.dataset(t.source.key).field(t.source.field).formatter()(t.value)}$t.getLayoutModeKeys=function(){const e=[];let t;for(t in jt)e.push(t);return e};const Ut={left:"left",right:"right",up:"top",down:"bottom"};function Wt(e,t,r){switch(e){case"scale":return _t(t,r);case"measure-scale":return _t.measureScale(t,r);case"dimension-scale":return _t.dimensionScale(t,r);case"axis":return Ht(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 Vt(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:zt.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:zt.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:zt.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:zt.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={key:"legend",type:"legend-cat",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-${Ut[t.direction]}`].join(" ")})}}},style:{item:{label:{fontSize:u,fontFamily:t.theme.getStyle(r,"legend.label","fontFamily"),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,{},p,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 Ht.xAxis(t,r);case"y-axis":return Ht.yAxis(t,r);case"x-axis-title":return Vt.xAxisTitle(t,r);case"y-axis-title":return Vt.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={key:"labels",type:"labels",displayOrder:1,settings:{sources:[{component:"box-marker",selector:"rect",strategy:{type:"bar",settings:{direction:"up",fontFamily:t.theme.getStyle(r,"label.value","fontFamily"),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:Bt}]}}}]}};return q(!0,{},o,e||{})}(t,r);default:return}}function Kt(e){this.options=e||{},this.settings={dockLayout:{layoutModes:$t()},components:[],scales:{}}}Kt.prototype.addComponent=function(e,t,r){const n=Wt(e,t,q(!0,{},this.options,r||{}));return this.settings.components.push(n),n},Kt.prototype.addInteraction=function(e,t){const r=Wt("interaction",e,q(!0,{},this.options,t||{}));return this.settings.interactions||(this.settings.interactions=[]),this.settings.interactions.push(r),r},Kt.prototype.addScale=function(e,t,r){const n=Wt(e,t,q(!0,{},this.options,r||{}));this.settings.scales[n.name]=n.component},Kt.prototype.getSettings=function(){return this.settings},Kt.prototype.getComponent=function(e){return this.settings.components.filter((t=>t.key===e))[0]},Kt.prototype.addPreset=function(e,t){!function(e,t,r){if("dimension-measure-chart"!==e)throw Error("There is no chart preset with that type");Ot(t,r)}(e,this,t)},Kt.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))},Kt.create=function(e){return new Kt(e)},Kt.createComponent=Wt;const Gt={CENTER:0,BOTTOM:1};var Yt={DISCLAIMERS:[{label:"NoDataExist",alignment:Gt.CENTER,default:!0},{label:"RequireNumericDimension",alignment:Gt.CENTER,default:!1},{label:"OnlyNanData",alignment:Gt.CENTER,default:!0},{label:"OnlyNegativeOrZeroValues",alignment:Gt.CENTER,default:!1},{label:"LimitedData",alignment:Gt.BOTTOM,default:!1},{label:"OnlyNanColor",alignment:Gt.BOTTOM,default:!1},{label:"NegativeOrZeroValues",alignment:Gt.BOTTOM,default:!1},{label:"DataRangeIncludingZero",alignment:Gt.BOTTOM,default:!1}],ALIGNMENT:Gt};const Jt={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,Yt.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 Qt(e,t,r){this.disclaimersConfig=e,this.dataAttributes=t,this.supportedDisclaimers=r}function Xt(e,t){return e&&t&&t[e]}function Zt(e){this.environment=e,this.clear()}Qt.prototype.isValidAndSupported=function(e,t){return Xt(e.label,this.dataAttributes)&&(e.default||Xt(e.label,this.supportedDisclaimers))&&void 0!==t&&e.alignment===t},Qt.prototype.isAnyValidDisclaimer=function(e){let t=!1;const r=this;return this.disclaimersConfig.forEach((n=>{r.isValidAndSupported(n,e)&&(t=!0)})),t},Qt.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},Zt.ERRORS={SET:"Calling Disclaimer.set() without attributes",DISPLAY:"Calling Disclaimer.display() before attributes are applied"},Zt._applyDefaultSupport=function(e,t){let r=e;return r||(r={}),t.forEach((e=>{void 0===r[e.label]&&(r[e.label]=e.default)})),r},Zt.prototype.getComponentSettings=function(){var e,t;const{translator:r}=this.environment,n=q(!0,{},this.vizAttributes.supportedDisclaimers),i=new Qt(Yt.DISCLAIMERS,this.dataAttributes,n);let o,a;if(i.isAnyValidDisclaimer(Yt.ALIGNMENT.CENTER))o=i.getMessage(Yt.ALIGNMENT.CENTER,r),a="center";else{if(!i.isAnyValidDisclaimer(Yt.ALIGNMENT.BOTTOM))return;o=i.getMessage(Yt.ALIGNMENT.BOTTOM,r),a="bottom"}return{key:"disclaimer",type:"disclaimer",layout:{displayOrder:1e3,dock:a},settings:{label:o,rtl:"rtl"===(null===(e=this.environment)||void 0===e||null===(t=e.options)||void 0===t?void 0:t.direction)}}},Zt.prototype.set=function(e){if(this.clear(),!e)throw new Error(Zt.ERRORS.SET);this.vizAttributes=e,this.dataAttributes=Jt.applyAttributes(this.vizAttributes.options,this.vizAttributes.data)},Zt.prototype.clear=function(){this.vizAttributes=null,this.dataAttributes=null};const er=bt.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 Zt(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:[Kt.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),Kt.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:Ve(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})}),tr={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}},rr=/^rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)$/i,nr=/^rgba\((\d{1,3}),(\d{1,3}),(\d{1,3}),(\d(\.\d+)?)\)$/i,ir=/^#([A-f0-9]{2})([A-f0-9]{2})([A-f0-9]{2})$/i,or=/^#([A-f0-9])([A-f0-9])([A-f0-9])$/i,ar=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i,sr=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i,lr=Math.floor,ur=Math.round,cr=bt.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 cr)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=ur(255*d),m=ur(255*m),f=ur(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=ur(255*d),m=ur(255*m),f=ur(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=ur(255*d),m=ur(255*m),f=ur(255*f),h=1}else tr[p.toLowerCase()]?(r=p.toLowerCase(),d=tr[r].r,m=tr[r].g,f=tr[r].b,h="number"==typeof tr[r].a?tr[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=lr(d),this._g=lr(m),this._b=lr(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=cr.toRGB(this)),this._spaces.rgb},toRGBA:function(){return this._spaces.rgba||(this._spaces.rgba=cr.toRGBA(this)),this._spaces.rgba},toString(){return this._spaces.rgb||(this._spaces.rgb=cr.toRGB(this)),this._spaces.rgb},toHex:function(){return this._spaces.hex||(this._spaces.hex=cr.toHex(this)),this._spaces.hex},toHSL:function(e){return this._spaces.hsl||(this._spaces.hsl=cr.toHSL(this,e)),this._spaces.hsl},toHSLA:function(e){return this._spaces.hsla||(this._spaces.hsla=cr.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=cr.toHSVComponents(this)),this._spaces.hsvComp},toNumber:function(){return this._spaces.num||(this._spaces.num=cr.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 cr||(e=new cr(e)),this._r===e._r&&this._g===e._g&&this._b===e._b},blend(e,t){return`rgba(${[lr(this._r+(e._r-this._r)*t),lr(this._g+(e._g-this._g)*t),lr(this._b+(e._b-this._b)*t),lr(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 cr(n)}});cr.toRGB=function(e){if(e instanceof cr)return`rgb(${[e._r,e._g,e._b].join(",")})`;"string"==typeof e&&(e=cr.toNumber(e));return`rgb(${(16711680&e)>>16},${(65280&e)>>8},${255&e})`},cr.toRGBA=function(e,t){if(e instanceof cr)return`rgba(${[e._r,e._g,e._b,void 0!==t?t:e._a].join(",")})`;"string"==typeof e&&(e=cr.toNumber(e));return`rgba(${(16711680&e)>>16},${(65280&e)>>8},${255&e},${void 0!==t?t:e._a})`},cr.toHex=function(e){let t,r,n;return e instanceof cr?(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=cr.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}`)},cr.toHSL=function(e,t){let r,n,i,o=0;"string"==typeof e&&(e=new cr(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})`},cr.toHSLA=function(e,t){let r,n,i,o=0;"string"==typeof e&&(e=new cr(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})`},cr.toHSVComponents=function(e){let t,r,n=0;"string"==typeof e&&(e=new cr(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}},cr.toNumber=function(){if(1===arguments.length&&arguments[0]instanceof cr)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},cr.blend=function(e,t,r){const n=(16711680&(e=cr.toNumber(e)))>>16,i=(65280&e)>>8,o=255&e;return(n+(((16711680&(t=cr.toNumber(t)))>>16)-n)*r<<16)+(i+(((65280&t)>>8)-i)*r<<8)+(o+((255&t)-o)*r)},cr.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 cr(n,i,o,a)},cr.isCSSColor=function(e){return!(arguments.length>1||"string"!=typeof e)&&(rr.test(e)||nr.test(e)||ir.test(e)||or.test(e)||ar.test(e)||sr.test(e)||tr[e.toLowerCase()])},cr.getBestContrast=function(e,t,r){const n=e.getLuminance();return Math.abs(n-t.getLuminance())>Math.abs(n-r.getLuminance())?t:r},cr.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)},cr.isDark=function(){const e={getLuminance:cr.prototype.getLuminance,isInvalid:cr.prototype.isInvalid};return cr.prototype.init.apply(e,[].slice.call(arguments)),cr.prototype.isDark.call(e)},cr.useDarkLabel=function(e,t){return e._a>.5?!e.isDark():!t};const pr={TRANSPARENT_BLACK:"rgba( 0,0,0,0.2 )",TRANSPARENT_WHITE:"rgba( 255,255,255,0.7 )",LIGHT_GREY:"#ccc",DARK_GREY:"#666",BLACK:"#000",WHITE:"#fff",getInverse(e){const t=new cr(e);return 0===t.getAlpha()?this.BLACK:t.isDark()?this.WHITE:this.BLACK},getContrastingGrey(e){const t=new cr(e);return 0===t.getAlpha()?this.DARK_GREY:cr.getBestContrast(t,new cr(pr.LIGHT_GREY),new cr(pr.DARK_GREY))},getBestContrast:(e,t,r)=>cr.getBestContrast(new cr(e),new cr(t),new cr(r)),getContrastingTransparent(e){const t=new cr(e);return 0===t.getAlpha()||"none"===e?this.TRANSPARENT_BLACK:t.isDark()?this.TRANSPARENT_WHITE:this.TRANSPARENT_BLACK}},dr=".scrollHandler";function mr(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 fr(){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 hr(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 gr(){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=>{}))}mr.prototype.getScrollApi=function(){this._scrollApi||(this._scrollApi=this._chartInstance.scroll("dimension"));return this._scrollApi},mr.prototype.setDisabled=function(e){this._disabled=e},mr.prototype.getDisabled=function(){return this._disabled},mr.prototype.setItemSize=function(e){this._itemSize!==e&&(this._itemSize=e,fr.call(this))},mr.prototype.getItemSize=function(){return this._itemSize},mr.prototype.getScrollViewSizeInItem=function(){this._scrollViewSizeInItem||fr.call(this);return this._scrollViewSizeInItem},mr.prototype.on=function(){if(this._on)return;this.getScrollApi()&&(this._scrollApi.removeAllListeners(),this._scrollApi.on("update",gr.bind(this)));this._$chartElement.on(`mousewheel${dr} DOMMouseScroll${dr}`,hr.bind(this)),this._$chartElement.on(`touchstart${dr}`,(e=>{e.preventDefault()})),this._on=!0},mr.prototype.isOn=function(){return this._on},mr.prototype.off=function(){if(!this._on)return;this.getScrollApi()&&this._scrollApi.removeAllListeners();this._$chartElement.off(dr),this._on=!1},mr.prototype.updateViewState=function(e){fr.call(this),this.getScrollApi()&&this._scrollApi.update({viewSize:this._scrollViewSizeInItem,max:e})},mr.prototype.onResize=function(){this._sizeChanged=!0,fr.call(this),this.getScrollApi()&&this._scrollApi.update({viewSize:this._scrollViewSizeInItem})},mr.prototype.isDataSizeChanged=function(e,t){return Math.min(this.getScrollViewSizeInItem(),t)!==e},mr.prototype.resetScroll=function(){this.getScrollApi()&&this._scrollApi.moveTo(0)},mr.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)},mr.prototype.setOptions=function(e){this.options.direction!==e.direction&&(this._scrollViewSizeInItem=void 0);this.options=e},mr.prototype.getScrollState=function(){return this.getScrollApi().getState().start},mr.prototype.setScrollState=function(e){this.getScrollApi().moveTo(e)};var yr={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 br={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=yr.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){yr.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 vr={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=yr.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];yr.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 xr(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 qr={callAreaRangeGesture:function(e,t,r,n){const i=r.keys.dimRangeBrushKey?"majorrange":"measurerange";return{type:"Pan",options:{direction:xr(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=yr.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];yr.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 Dr={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=yr.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];yr.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 Sr={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 Mr={callNavBtnGesture:function(e,t){return{type:"Tap",options:{event:"navBtnTap",enable(r,n){return!(!n||!e())&&yr.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 Er={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(Mr.callNavBtnGesture(x.isNavigationEnabled,c)),v.push(br.callLassoGesture(d,x,q)),s?l?(v.push(Dr.callDimensionRangeGesture(d,x,q,h)),e.selectionHandler.addComponent(s,{id:"rangeDim",clear:"rangeClear"}),v.push(vr.callMeasureRangeGesture(d,x,q,g)),e.selectionHandler.addComponent(l,{id:"rangeMeasure",clear:"rangeClear"})):(v.push(Dr.callDimensionRangeGesture(d,x,q,h)),e.selectionHandler.addComponent(s,{id:"rangeDim",clear:"rangeClear"}),v.push(qr.callAreaRangeGesture(d,x,q,g)),e.selectionHandler.addComponent(u,{id:"rangeMinor",clear:"areaClear"})):(v.push(vr.callMeasureRangeGesture(d,x,q,g)),e.selectionHandler.addComponent(l,{id:"rangeMeasure",clear:"rangeClear"}),v.push(qr.callAreaRangeGesture(d,x,q,h)),e.selectionHandler.addComponent(u,{id:"rangeMinor",clear:"areaClear"}))),e.scrollHandler&&(v.push(Sr.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 Ar(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 wr={create:(...e)=>Ar(...e)},Cr={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 kr=-3;const Ir=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=Lr(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 Lr(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++)e[r]===kr&&(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 Nr="dist-flow-tooltip",Tr=`#${Nr}`;function Or(){if(!document.querySelector(Tr)){const e=document.createElement("div");e.id=Nr,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 Rr({key:e="tooltip",rtl:t,fontFamily:r,filter:n,content:i}){return{show:!0,key:e,type:"tooltip",layout:{displayOrder:3},beforeMount(){Or()},beforeUpdate(){Or()},destroyed(){!function(){const e=document.querySelector(Tr);e&&e.parentElement&&e.childElementCount<1&&e.parentElement.removeChild(e)}()},settings:{appendTo:()=>document.querySelector(Tr),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:Pr}=It;const Fr={tooltipKey:"tooltip",data:[""],contexts:["tooltip"],headerResolver:e=>e.join(", "),rowResolver:(e,t)=>({value:Cr.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:Pr(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:Pr(e.label)},u={...n.cell,textAlign:o?"left":"right",direction:Pr(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:Pr(e)};a.push(r("tr",null,r("td",{style:o,colSpan:2},e)))}return a}};function _r(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,{},Fr,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:wr.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=Rr({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:Ir(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 Hr={create:(e,t,r)=>_r(e,t,r)};const Vr=166/26,zr=12,jr=11,$r=12/jr;function Br(e){return(Math.min(e,3)*zr+Math.max(e-3,0)*Vr)/jr}function Ur(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 Wr(e,t){const r={latin:0,cjk:0};void 0===t?e.forEach((e=>{const t=Ur(e.qText);r.latin+=t.latin,r.cjk+=t.cjk})):e.forEach((e=>{const n=Ur(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 Kr(e,t,r){return e*(e<=24?t:r)}var Gr={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:Br,getCharacterRatios:Ur,getTotalCharacterRatios:Wr,getAdjustedMaxGlyphCount:function(e,t,r){const n=Wr(t,r),i=n.latinRatio*e,o=n.cjkRatio*e;return Math.ceil(Br(i)+o*$r)},estimateLatinLabelWidth:Kr,estimateLabelWidth:function(e,t,r,n,i){return e*r+Kr(t,n,i)}};var Yr={generateHyperCube:function(e,t){const r=e.qHyperCube.qMeasureInfo,n=e.qHyperCube.qDataPages[0].qMatrix,i=r.length;if(!i)return;const o=pt.getColorForPositiveValue(e,t),a=pt.getColorForNegativeValue(e,t),s=pt.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!==pt.valueTypes.SUBTOTAL?(d=m,m+=p*(r[e].valueType===pt.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 Jr(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Qr(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Xr(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=Jr,r=(t,r)=>Jr(e(t),r),n=(t,r)=>e(t)-r):(t=e===Jr||e===Qr?e:Zr,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 Zr(){return 0}const en=Xr(Jr).right;Xr((function(e){return null===e?NaN:+e})).center;var tn=en;const rn=Math.sqrt(50),nn=Math.sqrt(10),on=Math.sqrt(2);function an(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>=rn?10:o>=nn?5:o>=on?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?an(e,t,2*r):[s,l,u]}function sn(e,t,r){return an(e=+e,t=+t,r=+r)[2]}function ln(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function un(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function cn(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function pn(){}var dn=.7,mn=1/dn,fn="\\s*([+-]?\\d+)\\s*",hn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",gn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",yn=/^#([0-9a-f]{3,8})$/,bn=new RegExp(`^rgb\\(${fn},${fn},${fn}\\)$`),vn=new RegExp(`^rgb\\(${gn},${gn},${gn}\\)$`),xn=new RegExp(`^rgba\\(${fn},${fn},${fn},${hn}\\)$`),qn=new RegExp(`^rgba\\(${gn},${gn},${gn},${hn}\\)$`),Dn=new RegExp(`^hsl\\(${hn},${gn},${gn}\\)$`),Sn=new RegExp(`^hsla\\(${hn},${gn},${gn},${hn}\\)$`),Mn={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 En(){return this.rgb().formatHex()}function An(){return this.rgb().formatRgb()}function wn(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=yn.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?Cn(t):3===r?new Ln(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?kn(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?kn(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=bn.exec(e))?new Ln(t[1],t[2],t[3],1):(t=vn.exec(e))?new Ln(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=xn.exec(e))?kn(t[1],t[2],t[3],t[4]):(t=qn.exec(e))?kn(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Dn.exec(e))?Fn(t[1],t[2]/100,t[3]/100,1):(t=Sn.exec(e))?Fn(t[1],t[2]/100,t[3]/100,t[4]):Mn.hasOwnProperty(e)?Cn(Mn[e]):"transparent"===e?new Ln(NaN,NaN,NaN,0):null}function Cn(e){return new Ln(e>>16&255,e>>8&255,255&e,1)}function kn(e,t,r,n){return n<=0&&(e=t=r=NaN),new Ln(e,t,r,n)}function In(e,t,r,n){return 1===arguments.length?((i=e)instanceof pn||(i=wn(i)),i?new Ln((i=i.rgb()).r,i.g,i.b,i.opacity):new Ln):new Ln(e,t,r,null==n?1:n);var i}function Ln(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function Nn(){return`#${Pn(this.r)}${Pn(this.g)}${Pn(this.b)}`}function Tn(){const e=On(this.opacity);return`${1===e?"rgb(":"rgba("}${Rn(this.r)}, ${Rn(this.g)}, ${Rn(this.b)}${1===e?")":`, ${e})`}`}function On(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Rn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Pn(e){return((e=Rn(e))<16?"0":"")+e.toString(16)}function Fn(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Hn(e,t,r,n)}function _n(e){if(e instanceof Hn)return new Hn(e.h,e.s,e.l,e.opacity);if(e instanceof pn||(e=wn(e)),!e)return new Hn;if(e instanceof Hn)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 Hn(a,s,l,e.opacity)}function Hn(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function Vn(e){return(e=(e||0)%360)<0?e+360:e}function zn(e){return Math.max(0,Math.min(1,e||0))}function jn(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}un(pn,wn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:En,formatHex:En,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return _n(this).formatHsl()},formatRgb:An,toString:An}),un(Ln,In,cn(pn,{brighter(e){return e=null==e?mn:Math.pow(mn,e),new Ln(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?dn:Math.pow(dn,e),new Ln(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ln(Rn(this.r),Rn(this.g),Rn(this.b),On(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:Nn,formatHex:Nn,formatHex8:function(){return`#${Pn(this.r)}${Pn(this.g)}${Pn(this.b)}${Pn(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Tn,toString:Tn})),un(Hn,(function(e,t,r,n){return 1===arguments.length?_n(e):new Hn(e,t,r,null==n?1:n)}),cn(pn,{brighter(e){return e=null==e?mn:Math.pow(mn,e),new Hn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?dn:Math.pow(dn,e),new Hn(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 Ln(jn(e>=240?e-240:e+120,i,n),jn(e,i,n),jn(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Hn(Vn(this.h),zn(this.s),zn(this.l),On(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=On(this.opacity);return`${1===e?"hsl(":"hsla("}${Vn(this.h)}, ${100*zn(this.s)}%, ${100*zn(this.l)}%${1===e?")":`, ${e})`}`}}));var $n=e=>()=>e;function Bn(e){return 1==(e=+e)?Un:function(t,r){return r-t?function(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}(t,r,e):$n(isNaN(t)?r:t)}}function Un(e,t){var r=t-e;return r?function(e,t){return function(r){return e+r*t}}(e,r):$n(isNaN(e)?t:e)}var Wn=function e(t){var r=Bn(t);function n(e,t){var n=r((e=In(e)).r,(t=In(t)).r),i=r(e.g,t.g),o=r(e.b,t.b),a=Un(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 Kn(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 Gn(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]=ti(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 Yn(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function Jn(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function Qn(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]=ti(e[r],t[r]):i[r]=t[r];return function(e){for(r in n)i[r]=n[r](e);return i}}var Xn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Zn=new RegExp(Xn.source,"g");function ei(e,t){var r,n,i,o=Xn.lastIndex=Zn.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(r=Xn.exec(e))&&(n=Zn.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:Jn(r,n)})),o=Zn.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 ti(e,t){var r,n=typeof t;return null==t||"boolean"===n?$n(t):("number"===n?Jn:"string"===n?(r=wn(t))?(t=r,Wn):ei:t instanceof wn?Wn:t instanceof Date?Yn:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?Kn:Array.isArray(t)?Gn:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?Qn:Jn)(e,t)}function ri(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function ni(e){return+e}var ii=[0,1];function oi(e){return e}function ai(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function si(e,t,r){var n=e[0],i=e[1],o=t[0],a=t[1];return i<n?(n=ai(i,n),o=r(a,o)):(n=ai(n,i),o=r(o,a)),function(e){return o(n(e))}}function li(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]=ai(e[a],e[a+1]),o[a]=r(t[a],t[a+1]);return function(t){var r=tn(e,t,1,n)-1;return o[r](i[r](t))}}function ui(){var e,t,r,n,i,o,a=ii,s=ii,l=ti,u=oi;function c(){var e=Math.min(a.length,s.length);return u!==oi&&(u=function(e,t){var r;return e>t&&(r=e,e=t,t=r),function(r){return Math.max(e,Math.min(t,r))}}(a[0],a[e-1])),n=e>2?li:si,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),Jn)))(r)))},p.domain=function(e){return arguments.length?(a=Array.from(e,ni),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=ri,c()},p.clamp=function(e){return arguments.length?(u=!!e||oi,c()):u!==oi},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 ci(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 pi(e){return(e=ci(Math.abs(e)))?e[1]:NaN}var di,mi=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function fi(e){if(!(t=mi.exec(e)))throw new Error("invalid format: "+e);var t;return new hi({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 hi(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 gi(e,t){var r=ci(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")}fi.prototype=hi.prototype,hi.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 yi={"%":(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)=>gi(100*e,t),r:gi,s:function(e,t){var r=ci(e,t);if(!r)return e+"";var n=r[0],i=r[1],o=i-(di=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")+ci(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function bi(e){return e}var vi,xi,qi,Di=Array.prototype.map,Si=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Mi(e){var t,r,n=void 0===e.grouping||void 0===e.thousands?bi:(t=Di.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?bi:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(Di.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=fi(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"):yi[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=yi[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?Si[8+di/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 E=d.length+e.length+S.length,A=E<f?new Array(f-E+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,E=A.length>>1)+d+e+S+A.slice(E);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=fi(e)).type="f",e)),n=3*Math.max(-8,Math.min(8,Math.floor(pi(t)/3))),i=Math.pow(10,-n),o=Si[8+n/3];return function(e){return r(i*e)+o}}}}function Ei(e,t,r,n){var i,o=function(e,t,r){r=+r;const n=(t=+t)<(e=+e),i=n?sn(t,e,r):sn(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}(e,t,r);switch((n=fi(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(pi(t)/3)))-pi(Math.abs(e)))}(o,a))||(n.precision=i),qi(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,pi(t)-pi(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,-pi(Math.abs(e)))}(o))||(n.precision=i-2*("%"===n.type))}return xi(n)}function Ai(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?an(t,e,r):an(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 Ei(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=sn(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 wi(){var e=ui()(oi,oi);return e.copy=function(){return t=e,wi().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},ln.apply(e,arguments),Ai(e)}vi=Mi({thousands:",",grouping:[3],currency:["$",""]}),xi=vi.format,qi=vi.formatPrefix;const Ci={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=wi().domain([o,a]).ticks(l),c=Ci.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 Ci.adjustTicks({ticks:p,majorTicks:u,minorTicks:c,autoMinMax:r,minMax:n,min:o,max:a})}},ki=pt.chartID,Ii=20,Li=.7;function Ni(e){this._scrollHandler.setDisabled(!!e)}function Ti(e){let t=-Number.MAX_VALUE;return e.qHyperCube.qMeasureInfo.forEach((e=>{t=Math.max(t,e.qFallbackTitle.length),e.valueType!==pt.valueTypes.SUBTOTAL&&e.subtotal&&e.subtotal.enable&&(t=Math.max(t,e.subtotal.label?e.subtotal.label.length:0))})),Math.min(Ii,Math.max(0,t))}function Oi(e){return{settings:{labels:{mode:e.dimensionAxis.label,maxGlyphCount:Math.ceil(Gr.stringWidthOverMWidth(Ti(e))),maxLengthPx:this.picassoElement.getBoundingClientRect().height/4}}}}function Ri(e){const t=e.data.measure,r=e.dataset(t.source.key).field(t.source.field);return Cr.formatMeasureValue(r,t)}function Pi(e,t,r){const n=st(ki,e,t,r),i=(null==n?void 0:n.fill)||e.getStyle(ki,"value.color","default"),o=e.getStyle(ki,"value.color","dark"),a=e.getStyle(ki,"value.color","light");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:e=>r.isEnabled("CLIENT_IM_3364")?i:function(e,t,r){return pr.getBestContrast(e,t,r)}(e.data.boxColor.value,o,a)},{position:"opposite",fill:i,justify:0}],label:Ri}]}}}]}}}function Fi(e,t){return{viewSize:t,max:e.generatedMatrix.length}}const _i=er.extend("WaterfallChart",{namespace:".waterfallchart",chartID:ki,init:function({picasso:e,environment:t,$element:r,flags:n}){this._super(e,r,t,null,null),this._tooltipHandler=Hr.create(this.chartInstance,r,ki),this._scrollHandler=new mr(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=Kt.create({chartID:ki,theme:r,isRtl:t}),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:Cr.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=Er.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:Oi.call(this,e),dimensionSource:Yr.getGeneratedDimensionPath(0),dimensionScaleSettings:{component:{maxPxStep:()=>a/4}},includeMeasureAxis:!0,measureAxisProperties:e.measureAxis,measureSource:[Yr.getGeneratedMeasurePath(0),Yr.getGeneratedMeasurePath(1)],measureScaleSettings:{component:{expand:0,include:[0],ticks:{values:()=>Ci.getTicks({layout:e,height:a})}}},hasNavigation:!n,isNavigationEnabledFn:()=>this._scrollHandler.isOn(),scrollSettings:Fi(e,this._scrollHandler.getScrollViewSizeInItem()),refLines:e.refLine&&e.refLine.refLines,brushActions:this._dependentActions.gestures,axisLabelStyle:at(ki,r,e,this.flags)}),i.addComponent("box-marker",function(e,t){const r=e?[e.box.trigger]:[],n=e?e.box.consume:[];return{data:{extract:{key:"qHyperCube",field:Yr.getGeneratedDimensionPath(0),props:{start:{field:Yr.getGeneratedMeasurePath(0)},end:{field:Yr.getGeneratedMeasurePath(1)},measure:{field:Yr.getGeneratedMeasurePath(2),reduce:"first",value:e=>e},boxColor:{field:Yr.getGeneratedDimensionPath(1),value:e=>e.qText},isCustomFormatted:!!t.qDef.isCustomFormatted,tooltip:{value:e=>e}}}},settings:{major:{scale:"dimension"},minor:{scale:"measure"},orientation:"",box:{width:Li,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(ki,"shape.bridge","stroke");return{data:{extract:{key:"qHyperCube",field:Yr.getGeneratedDimensionPath(0),props:{x:{},y:{field:Yr.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-Li,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",function(e,t,r){const{theme:n,translator:i}=e,o=pt.getColorForPositiveValue(t,n),a=pt.getColorForNegativeValue(t,n),s=pt.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=lt(ki,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}}}}(this.environment,e,this.flags),{dock:e.legend?e.legend.dock:"auto",isRtl:t,chartWidth:o,chartHeight:a}),e.dataPoint.showLabels&&i.addComponent("labels",Pi(r,e,this.flags));const u=i.getSettings();return this.addSnapshotChartSettings(u,e),u},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,Yr.generateHyperCube(n.layout,t)}else{Yr.generateHyperCube(n.layout,t),Ni.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()}Yr.generateSlicedHyperCube(n.layout,i,o)}))},resize:function(){this._scrollHandler.onResize(),this._super()},paint:function(){const e=!!this.layout.snapshotData;e||this.environment.options.viewState||Ni.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 Yr.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 Hi(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:N(q),ext:gt(q),component(){const D=d(),E=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=E.options.renderer,w=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(),[I,L]=f();var N;h((()=>{const e=g(D),t=new _i({picasso:w,environment:E,$element:e,flags:q.flags});return L(t),()=>{t.destroy()}}),[]),function(...e){const[,t]=n(...e);if(t)throw t}((async()=>{I&&(I.updateEnvironment(E),I.updateConstraints(k),await I.updateData(C),await I.paint())}),[C,I,E]),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}(I),N=I,c((e=>{if(N)return N.setSnapshotData(e)})),p((()=>({getViewState(){if(N)return N.getViewState()}})),[N])}}}export{Hi as default};
10
10
  //# sourceMappingURL=index.js.map