@nebula.js/sn-funnel-chart 1.9.26 → 1.9.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api-specifications/plugins.json +1 -1
- package/api-specifications/properties.json +1 -1
- package/core/esm/index.js +3 -3
- package/dist/sn-funnel-chart.js +4 -4
- package/dist/sn-funnel-chart.systemjs.js +2 -2
- package/package.json +1 -1
- package/sn-funnel-chart-ext/dist/sn-funnel-chart.js +4 -4
- package/sn-funnel-chart-ext/sn-funnel-chart.qext +1 -1
package/core/esm/index.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
/*
|
2
|
-
* @nebula.js/sn-funnel-chart v1.9.
|
2
|
+
* @nebula.js/sn-funnel-chart v1.9.27
|
3
3
|
* Copyright (c) 2025 QlikTech International AB
|
4
4
|
* Released under the MIT license.
|
5
5
|
*/
|
6
6
|
|
7
|
-
import e from"picasso.js";import t from"picasso-plugin-q";import{useElement as n,useSelections as r,useModel as i,useApp as o,useTranslator as a,useOptions as l,useState as s,useEffect as u,useStaleLayout as c,useTheme as f,useConstraints as d,useRect as h,usePlugins as p,useAppLayout as m,usePromise as g,onTakeSnapshot as v}from"@nebula.js/stardust";var y={properties_dataPoints_labelmode_share:{id:"properties.dataPoints.labelmode.share",locale:{"en-US":"Share","zh-TW":"佔有率","zh-CN":"份额","tr-TR":"Pay","sv-SE":"Andel","it-IT":"Percentuale","es-ES":"Cuota","de-DE":"Anteil","pl-PL":"Udział","nl-NL":"Aandeel","ko-KR":"공유","pt-BR":"Percentual","fr-FR":"Part","ja-JP":"割合","ru-RU":"Доля"}},Tooltip_selections_locked:{id:"Tooltip.selections.locked",locale:{"en-US":"Selections on this dimension are locked","zh-TW":"已鎖定此維度上的選項","zh-CN":"相关维度的选择已锁定","tr-TR":"Bu boyuttaki seçimler kilitli","sv-SE":"Urval i den här dimensionen är låsta","it-IT":"Le selezioni in questa dimensione sono bloccate","es-ES":"Las selecciones de esta dimensión están bloqueadas.","de-DE":"Auswahlen sind für diese Dimension gesperrt","pl-PL":"Selekcje dotyczące tego wymiaru są zablokowane","nl-NL":"Selecties voor deze dimensie zijn vergrendeld","ko-KR":"이 차원의 선택은 잠겨 있습니다.","pt-BR":"Seleções estão bloqueadas nesta dimensão","fr-FR":"Sélections verrouillées pour cette dimension","ja-JP":"この軸での選択はロックされています","ru-RU":"Выборки для данного измерения заблокированы"}},Tooltip_dimensions_drilldown:{id:"Tooltip.dimensions.drilldown",locale:{"en-US":"Drill-down dimension","zh-TW":"向下探查維度","zh-CN":"下钻维度","tr-TR":"Detaya inme boyutu","sv-SE":"Hierarkisk dimension","it-IT":"Dimensione di drill-down","es-ES":"Dimensión jerárquica","de-DE":"Drilldown-Dimension:","pl-PL":"Wymiar hierarchiczny","nl-NL":"Drill-downdimensie","ko-KR":"드릴다운 차원","pt-BR":"Dimensão da hierarquia","fr-FR":"Descendre dans la hiérarchie de la dimension","ja-JP":"軸のドリルダウン","ru-RU":"Измерение с детализацией"}},Object_ErrorMessage_MissingDimension:{id:"Object.ErrorMessage.MissingDimension",locale:{"en-US":"Dimension not found","zh-TW":"找不到維度","zh-CN":"未找到维度","tr-TR":"Boyut bulunamadı","sv-SE":"Dimensionen hittades inte","it-IT":"Dimensione non trovata","es-ES":"No se ha encontrado la dimensión","de-DE":"Dimension nicht gefunden","pl-PL":"Wymiar nie został znaleziony","nl-NL":"Dimensie niet gevonden","ko-KR":"차원을 찾지 못했습니다.","pt-BR":"Dimensão não encontrada","fr-FR":"Dimension introuvable","ja-JP":"軸が見つかりません","ru-RU":"Измерение не найдено"}},Object_ErrorMessage_MissingMeasure:{id:"Object.ErrorMessage.MissingMeasure",locale:{"en-US":"Measure not found","zh-TW":"找不到量值","zh-CN":"未找到度量","tr-TR":"Hesaplama bulunamadı","sv-SE":"Måttet hittades inte","it-IT":"Misura non trovata","es-ES":"No se ha encontrado la medida","de-DE":"Kennzahl nicht gefunden","pl-PL":"Miara nie została znaleziona","nl-NL":"Meting niet gevonden","ko-KR":"측정값을 찾지 못했습니다.","pt-BR":"Medida não encontrada","fr-FR":"Mesure introuvable","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_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_NegativeOrZeroValues:{id:"Object.Disclaimer.NegativeOrZeroValues",locale:{"en-US":"The data set contains negative or zero values that cannot be shown in this chart.","zh-TW":"資料集包含無法在此圖表中顯示的負值或零值。","zh-CN":"数据集中包含无法在此图表中显示的负值或零值。","tr-TR":"Veri kümesi, bu grafikte gösterilemeyen negatif veya sıfır değerlerini içeriyor.","sv-SE":"Datauppsättningen innehåller negativa värden eller nollvärden som inte kan visas i detta diagram.","it-IT":"La serie di dati contiene valori negativi o uguali a zero che non possono essere visualizzati in questo grafico.","es-ES":"El conjunto de datos contiene valores negativos o cero que no se pueden mostrar en este gráfico.","de-DE":"Die in den Datensätzen enthaltenen negativen oder 0-Werte können nicht in diesem Diagramm dargestellt werden.","pl-PL":"Zestaw danych zawiera wartości ujemne lub zerowe, których nie można przedstawić w tym wykresie.","nl-NL":"De gegevensverzameling bevat negatieve waarden of nulwaarden die niet kunnen worden weergegeven in deze grafiek.","ko-KR":"데이터 집합에 해당 차트에 표시할 수 없는 음수 값 또는 zero 값이 포함되어 있습니다.","pt-BR":"O conjunto de dados contém valores negativos ou iguais a zero que não podem ser mostrados neste gráfico.","fr-FR":"L'ensemble de données contient des valeurs négatives ou égales à zéro impossibles à afficher dans ce graphique.","ja-JP":"データ セットには、本チャートに表示できない負の値またはゼロ値が含まれています。","ru-RU":"Набор данных содержит отрицательные или нулевые значения, которые невозможно показать в этой диаграмме."}},Object_Disclaimer_DataRangeIncludingZero:{id:"Object.Disclaimer.DataRangeIncludingZero",locale:{"en-US":"The logarithmic scale has been replaced by a linear scale because the data range includes zero.","zh-TW":"對數刻度已遭線性刻度取代,因為資料範圍包含零。","zh-CN":"对数刻度已替换为线性刻度,因为该数据范围包括零。","tr-TR":"Veri aralığı sıfır değerini içerdiğinden, logaritmik ölçek yerine doğrusal ölçek kullanıldı.","sv-SE":"Den logaritmiska skalan har ersatts av en linjär skala eftersom dataintervallet innehåller värdet noll.","it-IT":"La scala logaritmica è stata sostituita da una scala lineare perché l'intervallo di dati include zero.","es-ES":"La escala logarítmica ha sido reemplazada por una escala lineal porque el rango de datos incluye cero.","de-DE":"Die logarithmische Skala wurde durch die lineare Skala ersetzt, weil der Datenbereich NULL enthält.","pl-PL":"Skala logarytmiczna została zastąpiona liniową, ponieważ zakres danych zawiera zero.","nl-NL":"De logaritmische schaal is vervangen door een lineaire schaal omdat het gegevensbereik nullen bevat.","ko-KR":"데이터 범위에 0이 포함되어 있으므로 로그 눈금이 선형 눈금으로 바뀌었습니다.","pt-BR":"A escala logarítmica foi substituída por uma escala linear, pois o intervalo de dados inclui zero.","fr-FR":"L'échelle logarithmique a été remplacée par une échelle linéaire, car la plage de données comprend la valeur zéro.","ja-JP":"データ範囲にゼロが含まれるため、Log スケールは Linear スケールで置換されています。","ru-RU":"Логарифмический масштаб заменен линейным масштабом, поскольку диапазон данных включает ноль."}},Object_Disclaimer_NoDataExist:{id:"Object.Disclaimer.NoDataExist",locale:{"en-US":"The selections generated no data for this chart.","zh-TW":"此選項無法產生任何適用於此圖表的資料。","zh-CN":"选择未生成此图表的数据。","tr-TR":"Seçimler bu grafik için hiç veri oluşturmadı.","sv-SE":"Urvalen genererade inga data för detta diagram.","it-IT":"Le selezioni non hanno generato dati per questo grafico.","es-ES":"Las selecciones no han generado datos para este gráfico.","de-DE":"Die Auswahlen haben für dieses Diagramm keine Daten generiert.","pl-PL":"Selekcje nie spowodowały wygenerowania danych dla tego wykresu.","nl-NL":"De selecties hebben geen gegevens voor de grafiek gegenereerd.","ko-KR":"선택 내용으로 해당 차트에 대한 데이터가 생성되지 않았습니다.","pt-BR":"As seleções não geraram dados para este gráfico.","fr-FR":"Les sélections n'ont pas généré de données pour ce graphique.","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_OnlyNegativeValues:{id:"Object.Disclaimer.OnlyNegativeValues",locale:{"en-US":"The chart is not displayed because it contains only negative values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含負值。","zh-CN":"未显示图表,因为它仅包含负值。","tr-TR":"Yalnızca negatif değerleri içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det endast innehåller negativa värden.","it-IT":"Il grafico non viene visualizzato poiché contiene solo valori negativi.","es-ES":"El gráfico no se muestra porque solo contiene valores negativos.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur negative oder Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wyłącznie wartości ujemne.","nl-NL":"Het diagram wordt niet weergegeven omdat deze alleen negatieve waarden bevat.","ko-KR":"음수 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não é exibido porque contém apenas valores negativos.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs négatives.","ja-JP":"負の値しか含まれていないため、チャートは表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только отрицательные значения."}},Object_Disclaimer_NegativeValues:{id:"Object.Disclaimer.NegativeValues",locale:{"en-US":"The data set contains negative values that cannot be shown in this chart.","zh-TW":"資料集包含無法在此圖表中顯示的負值。","zh-CN":"数据集包含无法在此图表中显示的负值。","tr-TR":"Veri kümesi, bu grafikte gösterilemeyen negatif değerleri içeriyor.","sv-SE":"Datauppsättningen innehåller negativa värden som inte kan visas i det här diagrammet.","it-IT":"Il set di dati contiene valori negativi che non possono essere visualizzati in questo grafico.","es-ES":"El conjunto de datos contiene valores negativos que no se pueden mostrar en este gráfico.","de-DE":"Die in den Datensätzen enthaltenen negativen Werte können nicht in diesem Diagramm dargestellt werden.","pl-PL":"Zestaw danych zawiera wartości ujemne, których nie można przedstawić na tym wykresie.","nl-NL":"De gegevensverzameling bevat negatieve waarden die niet kunnen worden weergegeven in dit diagram.","ko-KR":"데이터 집합에 해당 차트에 표시할 수 없는 음수 값이 포함되어 있습니다.","pt-BR":"O conjunto de dados contém valores negativos que não podem ser mostrados neste gráfico.","fr-FR":"Le jeu de données contient des valeurs négatives impossibles à afficher dans ce graphique.","ja-JP":"このチャートには表示できない負の値がデータ セットに含まれています。","ru-RU":"Набор данных содержит отрицательные значения, которые нельзя отобразить на этой диаграмме."}},Object_ChartTooltip_NMore:{id:"Object.ChartTooltip.NMore",locale:{"en-US":"+{0} more","zh-TW":"再加 {0} 個","zh-CN":"+{0} 个","tr-TR":"+{0} öğe daha","sv-SE":"+{0} till","it-IT":"Altre +{0}","es-ES":"+{0} más","de-DE":"+{0} mehr","pl-PL":"+ {0} więcej","nl-NL":"+ {0} meer","ko-KR":"+추가 {0}개","pt-BR":"+{0} mais","fr-FR":"+ {0} de plus","ja-JP":"さらに {0}","ru-RU":"+ дополнительно: {0}"}},Object_ChartTooltip_sumOfPositives:{id:"Object.ChartTooltip.sumOfPositives",locale:{"en-US":"Sum of positives","zh-TW":"正數總和","zh-CN":"正值总和","tr-TR":"Pozitif değerlerin toplamı","sv-SE":"Summan av positiva","it-IT":"Somma valori positivi","es-ES":"Suma de positivos","de-DE":"Summe positiver Werte","pl-PL":"Suma dodatnich","nl-NL":"Som positieven","ko-KR":"양수 합계","pt-BR":"Soma de positivos","fr-FR":"Sommes des valeurs positives","ja-JP":"正の合計","ru-RU":"Сумма положительных значений"}},Object_ChartTooltip_sumOfNegatives:{id:"Object.ChartTooltip.sumOfNegatives",locale:{"en-US":"Sum of negatives","zh-TW":"負數總和","zh-CN":"负值总和","tr-TR":"Negatif değerlerin toplamı","sv-SE":"Summan av negativa","it-IT":"Somma valori negativi","es-ES":"Suma de negativos","de-DE":"Summe negativer Werte","pl-PL":"Suma ujemnych","nl-NL":"Som negatieven","ko-KR":"음수 합계","pt-BR":"Soma de negativos","fr-FR":"Somme des valeurs négatives","ja-JP":"負の合計","ru-RU":"Сумма отрицательных значений"}},Object_ChartTooltip_ColorExpression:{id:"Object.ChartTooltip.ColorExpression",locale:{"en-US":"Color expression","zh-TW":"色彩運算式","zh-CN":"颜色表达式","tr-TR":"Renk ifadesi","sv-SE":"Färguttryck","it-IT":"Espressione colore","es-ES":"Expresión de color","de-DE":"Farbformel","pl-PL":"Wyrażenie koloru","nl-NL":"Kleuruitdrukking","ko-KR":"색상 표현식","pt-BR":"Expressão de cor","fr-FR":"Expression de couleur","ja-JP":"カラー表現","ru-RU":"Выражение для цвета"}},Object_Disclaimer_OnlyNanColor:{id:"Object.Disclaimer.OnlyNanColor",locale:{"en-US":"The data used to color this visualization only contains undefined values.","zh-TW":"用以定義此視覺化的色彩的資料只包含未定義的值。","zh-CN":"用于将该可视化着色的数据仅包含未定义的值。","tr-TR":"Bu görselleştirmeyi renklendirmek için kullanılan veriler yalnızca tanımlanmamış değerler içeriyor.","sv-SE":"Data som används för att färgsätta denna visualisering innehåller enbart odefinierade värden.","it-IT":"I dati utilizzati per colorare questa visualizzazione contengono solo valori non definiti.","es-ES":"Los datos utilizados para colorear esta visualización solo contienen valores indefinidos.","de-DE":"Die verwendeten Daten für die Farbgebung dieser Visualisierung enthalten undefinierte Werte.","pl-PL":"Dane używane do kolorowania tej wizualizacji zawierają wyłącznie niezdefiniowane wartości.","nl-NL":"De gegevens die worden gebruikt om deze visualisatie kleur te geven bevatten uitsluitend ongedefinieerde waarden.","ko-KR":"이 시각화에 색을 지정하는 데 사용된 데이터에는 정의되지 않은 값만 포함되어 있습니다.","pt-BR":"Os dados usados para colorir esse visualização contém somente valores indefinidos.","fr-FR":"Les données utilisées pour colorer cette visualisation ne comportent que des valeurs non définies.","ja-JP":"このビジュアライゼーションの色の割り当てに使用したデータには、未定義の値が含まれています。","ru-RU":"Данные, используемые для выбора цвета визуализации, содержат только неопределенные значения."}},properties_trendlines_types_average:{id:"properties.trendlines.types.average",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_trendlines_types_linear:{id:"properties.trendlines.types.linear",locale:{"en-US":"Linear","zh-TW":"線性","zh-CN":"线性","tr-TR":"Doğrusal","sv-SE":"Linjär","it-IT":"Lineare","es-ES":"Lineal","de-DE":"Linear","pl-PL":"Liniowa","nl-NL":"Lineair","ko-KR":"선형","pt-BR":"Linear","fr-FR":"Linéaire","ja-JP":"線形","ru-RU":"Линейный"}},properties_trendlines_types_polynomial2:{id:"properties.trendlines.types.polynomial2",locale:{"en-US":"Second degree polynomial","zh-TW":"第二度多項式","zh-CN":"二次多项式","tr-TR":"İkinci derece polinom","sv-SE":"Polynomial, andra graden","it-IT":"Polinomio di secondo grado","es-ES":"Polinómica de segundo grado","de-DE":"Polynom zweiten Grades","pl-PL":"Wielomianowa drugiego stopnia","nl-NL":"Tweedegraadspolynoom","ko-KR":"2차 다항식","pt-BR":"Polinômio de segundo grau","fr-FR":"Polynomial du 2ème degré","ja-JP":"2 番目の角度の多項式近似","ru-RU":"Полиномиальный второй степени"}},properties_trendlines_types_polynomial3:{id:"properties.trendlines.types.polynomial3",locale:{"en-US":"Third degree polynomial","zh-TW":"第三度多項式","zh-CN":"三次多项式","tr-TR":"Üçüncü derece polinom","sv-SE":"Polynomial, tredje graden","it-IT":"Polinomio di terzo grado","es-ES":"Polinómica de tercer grado","de-DE":"Polynom dritten Grades","pl-PL":"Wielomianowa trzeciego stopnia","nl-NL":"Derdegraadspolynoom","ko-KR":"3차 다항식","pt-BR":"Polinômio de terceiro grau","fr-FR":"Polynomial du 3ème degré","ja-JP":"3 番目の角度の多項式近似","ru-RU":"Полиномиальный третьей степени"}},properties_trendlines_types_polynomial4:{id:"properties.trendlines.types.polynomial4",locale:{"en-US":"Fourth degree polynomial","zh-TW":"第四度多項式","zh-CN":"四次多项式","tr-TR":"Dördüncü derece polinom","sv-SE":"Polynomial, fjärde graden","it-IT":"Polinomio di quarto grado","es-ES":"Polinómica de cuarto grado","de-DE":"Polynom vierten Grades","pl-PL":"Wielomianowa czwartego stopnia","nl-NL":"Vierdegraadspolynoom","ko-KR":"4차 다항식","pt-BR":"Polinômio de quarto grau","fr-FR":"Polynomial du 4ème degré","ja-JP":"4 番目の角度の多項式近似","ru-RU":"Полиномиальный четвертой степени"}},properties_trendlines_types_exponential:{id:"properties.trendlines.types.exponential",locale:{"en-US":"Exponential","zh-TW":"指數","zh-CN":"指数","tr-TR":"Üstel","sv-SE":"Exponentiell","it-IT":"Esponenziale","es-ES":"Exponencial","de-DE":"Exponentiell","pl-PL":"Wykładnicze","nl-NL":"Exponentieel","ko-KR":"지수","pt-BR":"Exponencial","fr-FR":"Exponentiel","ja-JP":"指数","ru-RU":"Экспоненциальный"}},properties_trendlines_types_logarithmic:{id:"properties.trendlines.types.logarithmic",locale:{"en-US":"Logarithmic","zh-TW":"對數","zh-CN":"对数","tr-TR":"Logaritmik","sv-SE":"Logaritmisk","it-IT":"Logaritmica","es-ES":"Logarítmica","de-DE":"Logarithmisch","pl-PL":"Logarytmiczna","nl-NL":"Logaritmisch","ko-KR":"로그","pt-BR":"Logarítmico","fr-FR":"Logarithmique","ja-JP":"対数","ru-RU":"Логарифмический"}},properties_trendlines_types_power:{id:"properties.trendlines.types.power",locale:{"en-US":"Power","zh-TW":"乘冪","zh-CN":"幂","tr-TR":"Üs","sv-SE":"Potens","it-IT":"Potenza","es-ES":"Potencia","de-DE":"Potenz","pl-PL":"Potęgowa","nl-NL":"Macht","ko-KR":"거듭제곱","pt-BR":"Potência","fr-FR":"Puissance","ja-JP":"累乗","ru-RU":"Силовой"}},Common_Measures:{id:"Common.Measures",locale:{"en-US":"Measures","de-DE":"Kennzahlen","fr-FR":"Mesures","it-IT":"Misure","ja-JP":"メジャー","ko-KR":"측정값","es-ES":"Medidas","nl-NL":"Metingen","pl-PL":"Miary","pt-BR":"Medidas","sv-SE":"Mått","tr-TR":"Hesaplamalar","zh-CN":"度量","zh-TW":"量值","ru-RU":"Меры"}},Tooltip_ToggleOnLassoSelection:{id:"Tooltip.ToggleOnLassoSelection",locale:{"en-US":"Turn on lasso selection","de-DE":"Lasso-Auswahl aktivieren","fr-FR":"Activer la sélection au lasso","it-IT":"Attiva selezione lazo","ja-JP":"囲み選択をオンにする","ko-KR":"올가미 선택 켜기","es-ES":"Activar la selección de contorno","nl-NL":"Lassoselectie inschakelen","pl-PL":"Włącz zaznaczenie lasso","pt-BR":"Ativar seleção de laço","sv-SE":"Slå på lassourval","tr-TR":"Serbest seçimi aç","zh-CN":"开启套索选择方法","zh-TW":"開啟套索選取","ru-RU":"Включить выбор лассо"}},Tooltip_ToggleOffLassoSelection:{id:"Tooltip.ToggleOffLassoSelection",locale:{"en-US":"Turn off lasso selection","de-DE":"Lasso-Auswahl deaktivieren","fr-FR":"Désactiver la sélection au lasso","it-IT":"Disattiva selezione lazo","ja-JP":"囲み選択をオフにする","ko-KR":"올가미 선택 끄기","es-ES":"Desactivar la selección de contorno","nl-NL":"Lassoselectie uitschakelen","pl-PL":"Wyłącz zaznaczenie lasso","pt-BR":"Desativar seleção de laço","sv-SE":"Stäng av lassourval","tr-TR":"Serbest seçimi kapat","zh-CN":"关闭套索选择方法","zh-TW":"關閉套索選取","ru-RU":"Выключить выбор лассо"}}};const b={fill:"steelblue",num:1},x=.9,w=150,D=(e,t,n)=>{let r=0,i=0,o=0,a={},l=0;if("labelCenter"===e)r=t.bottomLeft.x,i=t.topRight.y,o=t.bottomRight.x-t.bottomLeft.x,l=t.bottomRight.y-t.topRight.y,a={share:n.share,fill:n.fill};else{const e=180/Math.PI*Math.atan((t.bottomRight.y-t.topRight.y)/(t.topRight.x-t.bottomRight.x));r=e<15&&e>=0?t.topRight.x:e>-15&&e<0?t.bottomRight.x:e<-15?(t.bottomRight.x-t.topRight.x)/2+t.topRight.x+15:(t.topRight.x-t.bottomRight.x)/2+t.bottomRight.x+15,i=t.topRight.y,o=t.width-r,l=t.bottomRight.y-t.topRight.y,a={fill:n.fill}}return{tag:e,type:"rect",x:r,y:i,width:o,height:l,data:n.data,desc:a,fill:"none"}},M=(e,t)=>{const n=(e=>{const t=(e=>{let t=0;return e.forEach((e=>{e.num>t&&(t=e.num)})),t})(e);let n=0;const r=e.slice().reverse().map((e=>{const r={datum:e,s:n/t,e:e.num/t};return n=e.num,r}));return r.reverse()})(e),r=t.width*x,i=t.height*x,o=(t.width-r)/2,a=(t.height-i)/2,l=r-(r>w&&i>w?100:0),s=(i-1*(n.length-1))/n.length,u=[];return n.forEach(((e,r)=>{const i=(c=e.e,f=r<n.length-1?e.s:e.e,[.5-.5*c,.5+.5*c,.5+.5*f,.5-.5*f]).map((e=>Math.round(e*l+o)));var c,f;const d=s*r+1*r+a,h={bottomRight:{x:i[2],y:Math.round(d+s)},bottomLeft:{x:i[3],y:Math.round(d+s)},topRight:{x:i[1],y:Math.round(d)},topLeft:{x:i[0],y:Math.round(d)},width:t.width},p=`M${h.topLeft.x},${h.topLeft.y} L${h.topRight.x},${h.topRight.y} ${h.bottomRight.x},${h.bottomRight.y} ${h.bottomLeft.x},${h.bottomLeft.y}Z`;u.push({tag:"section",type:"path",d:p,data:e.datum.data,fill:e.datum.fill});const m={share:e.e,fill:e.datum.fill,data:e.datum.data};s>12&&(h.bottomRight.x-h.bottomLeft.x>32&&u.push(D("labelCenter",h,m)),u.push(D("labelLeft",h,m)))})),u},q=(e,t,n,r)=>(r-e)/r*(t-n)+n,k=(e,t,n)=>{const r=e.filter((e=>"NaN"!==e.num&&e.num>0)),i=r.length,o=n.width*x,a=n.height*x,l=Math.round((n.width-o)/2),s=Math.round((n.height-a)/2),u=o-(o>w&&a>w?100:0),c=a-1*(i-1),f=[],d=r[0].data.num.value;let h=s;return r.forEach(((e,r)=>{const i=t[r]*c,o=Math.round(q(h-s,u,.2*u,a)/2),p=Math.round(q(h-s+i,u,.2*u,a)/2),m=l+Math.round(u/2),g={bottomRight:{x:m+p,y:Math.round(h+i)},bottomLeft:{x:m-p,y:Math.round(h+i)},topRight:{x:m+o,y:h},topLeft:{x:m-o,y:h},width:n.width},v=`M${g.topLeft.x},${g.topLeft.y} L${g.topRight.x},${g.topRight.y} ${g.bottomRight.x},${g.bottomRight.y} ${g.bottomLeft.x},${g.bottomLeft.y}Z`;f.push({tag:"section",type:"path",d:v,data:e.data,fill:e.fill});const y={share:e.data.num.value/d,fill:e.fill,data:e.data};i>2&&(g.bottomRight.x-g.bottomLeft.x>32&&f.push(D("labelCenter",g,y)),f.push(D("labelLeft",g,y))),h+=i+1})),f},S=(e,t,n)=>{const r=e.filter((e=>"NaN"!==e.num&&e.num>0));if(r&&r.length>0)switch(t){case"WIDTH":default:return M(r,n);case"ORDER":return k(r,r.map((()=>1/r.length)),n);case"HEIGHT":return k(r,(e=>{const t=e.reduce(((e,t)=>e+t.data.num.value),0);return e.map((e=>e.data.num.value/t))})(r),n);case"AREA":return k(r,((e,t,n)=>{const r=e.reduce(((e,t)=>e+t.data.num.value),0),i=t.width*x,o=t.height*x,a=i*n,l=o*(i+a)/2,s=(i-a)/2/o,u=[];let c=0;for(let t=e.length-1;t>=0;t--){const n=e[t].data.num.value/r,i=2*s*c+a,f=-i/(2*s)+Math.sqrt(i*i/(4*s*s)+n*l/s);u[t]=f/o,c+=f}return u})(r,n,.2),n)}return[]};var C={require:["resolver"],defaultSettings:{settings:{},data:{},style:{item:"$shape"}},render({data:e}){const t=this.resolver.resolve({data:e,defaults:{...b,...this.style.item},settings:this.settings.settings});return S(t.items,this.settings.settings.mode,this.rect)}};const T={version:"1.9.26",color:{auto:!0,autoMinMax:!0,byDimDef:void 0,byMeasureDef:void 0,colorExpression:void 0,dimensionScheme:"12",expressionIsColor:!0,expressionLabel:"",measureMin:void 0,measureMax:void 0,measureScheme:"sg",mode:"primary",paletteColor:{index:6},persistent:!1,reverseScheme:!1,singleColor:void 0,useBaseColors:"off",useDimColVal:!0,useMeasureGradient:!0},dataPoint:{auto:!0,labelMode:"share"},footnote:"",funnel:{mode:"WIDTH"},qHyperCubeDef:{qDimensions:[],qMeasures:[],qInterColumnSortOrder:[],qInitialDataFetch:[{qWidth:2,qHeight:5e3}],qSuppressMissing:!0,qSuppressZero:!1},showDimensionTitle:!0,showTitles:!0,subtitle:"",title:""};function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function I(e,t,n,r,i,o,a){try{var l=e[o](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,i)}function E(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){I(o,r,i,a,l,"next",e)}function l(e){I(o,r,i,a,l,"throw",e)}a(void 0)}))}}function O(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function L(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?L(Object(n),!0).forEach((function(t){O(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function R(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function j(){j=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",l=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var o=t&&t.prototype instanceof g?t:g,a=Object.create(o.prototype),l=new N(r||[]);return i(a,"_invoke",{value:k(e,n,l)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=c;var d="suspendedStart",h="executing",p="completed",m={};function g(){}function v(){}function y(){}var b={};u(b,a,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(I([])));w&&w!==n&&r.call(w,a)&&(b=w);var D=y.prototype=g.prototype=Object.create(b);function M(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function q(e,t){function n(i,o,a,l){var s=f(e[i],e,o);if("throw"!==s.type){var u=s.arg,c=u.value;return c&&"object"==typeof c&&r.call(c,"__await")?t.resolve(c.__await).then((function(e){n("next",e,a,l)}),(function(e){n("throw",e,a,l)})):t.resolve(c).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,l)}))}l(s.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function k(t,n,r){var i=d;return function(o,a){if(i===h)throw Error("Generator is already running");if(i===p){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var l=r.delegate;if(l){var s=S(l,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===d)throw i=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=h;var u=f(t,n,r);if("normal"===u.type){if(i=r.done?p:"suspendedYield",u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=p,r.method="throw",r.arg=u.arg)}}}function S(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,S(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=f(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return v.prototype=y,i(D,"constructor",{value:y,configurable:!0}),i(y,"constructor",{value:v,configurable:!0}),v.displayName=u(y,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,u(e,s,"GeneratorFunction")),e.prototype=Object.create(D),e},t.awrap=function(e){return{__await:e}},M(q.prototype),u(q.prototype,l,(function(){return this})),t.AsyncIterator=q,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new q(c(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},M(D),u(D,s,"Generator"),u(D,a,(function(){return this})),u(D,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,N.prototype={constructor:N,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return l.type="throw",l.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],l=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function z(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}(e,t)||$(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e){return function(e){if(Array.isArray(e))return N(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||$(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function F(e){return F="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},F(e)}function $(e,t){if(e){if("string"==typeof e)return N(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?N(e,t):void 0}}var H=["American Typewriter, serif","Andalé Mono, monospace","Arial Black, sans-serif","Arial, sans-serif","Bradley Hand, cursive","Brush Script MT, cursive","Comic Sans MS, cursive","Courier, monospace","Didot, serif","Georgia, serif","Impact, sans-serif","Lucida Console, monospace","Luminari, fantasy","Monaco, monospace","QlikView Sans, sans-serif","Source Sans Pro, sans-serif","Tahoma, sans-serif","Times New Roman, serif","Trebuchet MS, sans-serif","Verdana, sans-serif"],U=["Abril Fatface, serif","Bangers, fantasy","Bebas Neue, sans serif","EB Garamond, serif","Fredoka One, fantasy","Graduate, fantasy","Gravitas One, serif","Indie Flower, fantasy","Inter, sans-serif","Lobster, fantasy","Montserrat, sans-serif","Nixie One, sans-serif","Noto Sans, sans-serif","Open Sans, sans-serif","PT Serif, serif","Pacifico, cursive","Permanent Marker, fantasy","QlikView Sans, sans-serif","Raleway, sans-serif","Rammetto One, fantasy","Roboto, sans-serif","Source Sans Pro, sans-serif","Titan One, fantasy","Yanone Kaffeesatz, sans-serif"];var _=function(e){return{value:e,label:e.charAt(0).toUpperCase()+e.slice(1),groupHeader:!1,disabled:!1,styles:{fontFamily:e}}};function B(e){var t=e.theme,n=e.translator,r=e.defaultValue,i=e.flags,o=[],a=t.getStyle("","","fontFamilies");return Array.isArray(a)&&a.length?o.push.apply(o,A(new Set([r].concat(A(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(r),[{value:"ThemeHeader",label:n.get("properties.themeFonts"),metaText:n.get("properties.theme"),groupHeader:!0}].concat(A(o.map((function(e){return _(e)}))),[{value:"DefaultHeader",label:n.get("properties.allFonts"),metaText:n.get("properties.default"),groupHeader:!0}],A(function(e){return null!=e&&e.isEnabled("PS_20852_WYSIWYG_FONT_SUPPORT")?U:H}(i).map((function(e){return _(e)}))))}function V(e){var t=e.theme,n=e.translator,r=e.id,i=e.path,o=e.flags,a=function(){return t.getStyle(r,i,"fontFamily")};return{getDefaultValue:function(){return a()},getOptions:function(){return B({theme:t,translator:n,defaultValue:a(),flags:o})}}}var W,Y,K=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],J=function(e){return{value:e,label:e,groupHeader:!1,disabled:!1}};function Z(e){var t=e.theme,n=e.translator,r=e.id,i=e.path,o=function(){return t.getStyle(r,i,"fontSize")};return{getDefaultValue:function(){return o()},getOptions:function(){return function(e){var t=e.translator,n=e.defaultValue,r=[],i=e.theme.getStyle("","","fontSizes");return Array.isArray(i)&&i.length?r.push.apply(r,A(new Set([n].concat(A(i))))):r.push(n),[{value:"ThemeHeader",label:t.get("properties.themeFontSizes"),metaText:t.get("properties.theme"),groupHeader:!0}].concat(A(r.map((function(e){return J(e)}))),[{value:"DefaultHeader",label:t.get("properties.allFontSizes"),metaText:t.get("properties.default"),groupHeader:!0}],A(K.map((function(e){return J(e)}))))}({theme:t,translator:n,defaultValue:o()})}}}function G(e){var t=e.theme,n=e.translator,r=e.id,i=e.path;return{fontFamily:V({theme:t,translator:n,id:r,path:i,flags:e.flags}),fontSize:Z({theme:t,translator:n,id:r,path:i})}}var X,Q=function(){if(Y)return W;Y=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},o=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,i=e.call(n,"constructor"),o=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!i&&!o)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return W=function e(){var t,n,r,s,u,c,f=arguments[0],d=1,h=arguments.length,p=!1;for("boolean"==typeof f&&(p=f,f=arguments[1]||{},d=2),(null==f||"object"!=typeof f&&"function"!=typeof f)&&(f={});d<h;++d)if(null!=(t=arguments[d]))for(n in t)r=l(f,n),f!==(s=l(t,n))&&(p&&s&&(o(s)||(u=i(s)))?(u?(u=!1,c=r&&i(r)?r:[]):c=r&&o(r)?r:{},a(f,{name:n,newValue:e(p,c,s)})):void 0!==s&&a(f,{name:n,newValue:s}));return f},W}(),ee=(X=Q)&&X.__esModule&&Object.prototype.hasOwnProperty.call(X,"default")?X.default:X;function te(e,t){return{range:function(e){var n=e.resources,r=e.data,i=n.theme.palette("categorical",0===t?r.items.length:t);return r.items.map((function(e){return i[e.value%i.length]}))},valueAccessor:e.value}}function ne(e,t){return{range:function(e){var n=e.resources,r=e.data,i=n.theme.palette("categorical",0===t?r.items.length:t);return r.items.map((function(e){return i[e.row.value%i.length]}))},valueAccessor:e.value}}function re(e,t,n,r,i){var o,a,l=i.byRow,s=i.byElemNo;if(r&&(t.input.persistent||e.hc.qDimensionInfo.length>1||void 0===n.activeDimensionIndex&&e.hc.qSize.qcy>((null===(a=(o=e.hc).qDataPages[0]||o.qStackedDataPages[0])||void 0===a?void 0:a.qArea.qHeight)||0)))return s(r,r.raw().qCardinal);if(r){var u=t.pic.extract({field:r.key(),trackBy:r.value}).length;return l(r,u)}return{}}function ie(e,t){var n=e.hc.qDimensionInfo,r=t.input.byDimDef||{activeDimensionIndex:n.length-1};if(r.activeDimensionIndex>=0){var i=n[r.activeDimensionIndex];r=i.coloring&&i.coloring.colorMapRef?{type:"libraryItem",key:i.coloring.colorMapRef,activeDimensionIndex:r.activeDimensionIndex}:{activeDimensionIndex:r.activeDimensionIndex}}return r}function oe(e,t){var n;return t.activeDimensionIndex>=0?n=e.pic.fields().filter((function(e){return"dimension"===e.type()}))[t.activeDimensionIndex]:"libraryItem"===t.type?!1===(n=t.key?e.pic.field((function(e){return e.raw().colorMapRef===t.key})):void 0)&&(n=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))):"expression"===t.type&&(n=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))),n}function ae(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function le(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function se(){}var ue=1/.7,ce="\\s*([+-]?\\d+)\\s*",fe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",de="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",he=/^#([0-9a-f]{3,8})$/,pe=new RegExp(`^rgb\\(${ce},${ce},${ce}\\)$`),me=new RegExp(`^rgb\\(${de},${de},${de}\\)$`),ge=new RegExp(`^rgba\\(${ce},${ce},${ce},${fe}\\)$`),ve=new RegExp(`^rgba\\(${de},${de},${de},${fe}\\)$`),ye=new RegExp(`^hsl\\(${fe},${de},${de}\\)$`),be=new RegExp(`^hsla\\(${fe},${de},${de},${fe}\\)$`),xe={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 we(){return this.rgb().formatHex()}function De(){return this.rgb().formatRgb()}function Me(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=he.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?qe(t):3===n?new Te(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?ke(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?ke(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=pe.exec(e))?new Te(t[1],t[2],t[3],1):(t=me.exec(e))?new Te(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=ge.exec(e))?ke(t[1],t[2],t[3],t[4]):(t=ve.exec(e))?ke(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=ye.exec(e))?Pe(t[1],t[2]/100,t[3]/100,1):(t=be.exec(e))?Pe(t[1],t[2]/100,t[3]/100,t[4]):xe.hasOwnProperty(e)?qe(xe[e]):"transparent"===e?new Te(NaN,NaN,NaN,0):null}function qe(e){return new Te(e>>16&255,e>>8&255,255&e,1)}function ke(e,t,n,r){return r<=0&&(e=t=n=NaN),new Te(e,t,n,r)}function Se(e){return e instanceof se||(e=Me(e)),e?new Te((e=e.rgb()).r,e.g,e.b,e.opacity):new Te}function Ce(e,t,n,r){return 1===arguments.length?Se(e):new Te(e,t,n,null==r?1:r)}function Te(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Ne(){return`#${Le(this.r)}${Le(this.g)}${Le(this.b)}`}function Ie(){const e=Ee(this.opacity);return`${1===e?"rgb(":"rgba("}${Oe(this.r)}, ${Oe(this.g)}, ${Oe(this.b)}${1===e?")":`, ${e})`}`}function Ee(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Oe(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Le(e){return((e=Oe(e))<16?"0":"")+e.toString(16)}function Pe(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new je(e,t,n,r)}function Re(e){if(e instanceof je)return new je(e.h,e.s,e.l,e.opacity);if(e instanceof se||(e=Me(e)),!e)return new je;if(e instanceof je)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,l=o-i,s=(o+i)/2;return l?(a=t===o?(n-r)/l+6*(n<r):n===o?(r-t)/l+2:(t-n)/l+4,l/=s<.5?o+i:2-o-i,a*=60):l=s>0&&s<1?0:a,new je(a,l,s,e.opacity)}function je(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function ze(e){return(e=(e||0)%360)<0?e+360:e}function Ae(e){return Math.max(0,Math.min(1,e||0))}function Fe(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}ae(se,Me,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:we,formatHex:we,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Re(this).formatHsl()},formatRgb:De,toString:De}),ae(Te,Ce,le(se,{brighter(e){return e=null==e?ue:Math.pow(ue,e),new Te(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new Te(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Te(Oe(this.r),Oe(this.g),Oe(this.b),Ee(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:Ne,formatHex:Ne,formatHex8:function(){return`#${Le(this.r)}${Le(this.g)}${Le(this.b)}${Le(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Ie,toString:Ie})),ae(je,(function(e,t,n,r){return 1===arguments.length?Re(e):new je(e,t,n,null==r?1:r)}),le(se,{brighter(e){return e=null==e?ue:Math.pow(ue,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,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Te(Fe(e>=240?e-240:e+120,i,r),Fe(e,i,r),Fe(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new je(ze(this.h),Ae(this.s),Ae(this.l),Ee(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=Ee(this.opacity);return`${1===e?"hsl(":"hsla("}${ze(this.h)}, ${100*Ae(this.s)}%, ${100*Ae(this.l)}%${1===e?")":`, ${e})`}`}}));const $e=Math.PI/180,He=180/Math.PI,Ue=4/29,_e=6/29,Be=3*_e*_e;function Ve(e){if(e instanceof We)return new We(e.l,e.a,e.b,e.opacity);if(e instanceof Ge)return Xe(e);e instanceof Te||(e=Se(e));var t,n,r=Ze(e.r),i=Ze(e.g),o=Ze(e.b),a=Ye((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?t=n=a:(t=Ye((.4360747*r+.3850649*i+.1430804*o)/.96422),n=Ye((.0139322*r+.0971045*i+.7141733*o)/.82521)),new We(116*a-16,500*(t-a),200*(a-n),e.opacity)}function We(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function Ye(e){return e>.008856451679035631?Math.pow(e,1/3):e/Be+Ue}function Ke(e){return e>_e?e*e*e:Be*(e-Ue)}function Je(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Ze(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Ge(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Xe(e){if(isNaN(e.h))return new We(e.l,0,0,e.opacity);var t=e.h*$e;return new We(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}ae(We,(function(e,t,n,r){return 1===arguments.length?Ve(e):new We(e,t,n,null==r?1:r)}),le(se,{brighter(e){return new We(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new We(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new Te(Je(3.1338561*(t=.96422*Ke(t))-1.6168667*(e=1*Ke(e))-.4906146*(n=.82521*Ke(n))),Je(-.9787684*t+1.9161415*e+.033454*n),Je(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),ae(Ge,(function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof Ge)return new Ge(e.h,e.c,e.l,e.opacity);if(e instanceof We||(e=Ve(e)),0===e.a&&0===e.b)return new Ge(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*He;return new Ge(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new Ge(e,t,n,null==r?1:r)}),le(se,{brighter(e){return new Ge(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new Ge(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return Xe(this).rgb()}}));var Qe=e=>()=>e;function et(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Qe(isNaN(e)?t:e)}var tt=function e(t){var n=function(e){return 1==(e=+e)?et:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):Qe(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=Ce(e)).r,(t=Ce(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=et(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1),nt=/^class(-pyramid)?/,rt=function(e,t,n,r){var i=void 0!==n.min?n.min:r.min(),o=void 0!==n.max?n.max:r.max(),a=i,l=o,s=t.limits,u={},c="percent"===t.limitType?s.map((function(e){return i+(o-i)*e})):s,f=t.colors.map((function(t){return e.resolveUIColor(t)}));if(i=Math.min.apply(Math,[i].concat(A(c))),o=Math.max.apply(Math,[o].concat(A(c))),u.min=i,u.max=o,t.breakTypes&&-1===t.breakTypes.indexOf(!0))u.type="categorical",Object.assign(u,function(e){var t=e.min,n=e.max,r=e.limits,i=e.range,o=[],a=[];if(r.length)if(r[r.length-1]<t)a.push(t,n),o.push(i[i.length-1],i[i.length-1],i[i.length-1]);else if(r[0]>n)a.push(t,n),o.push(i[0],i[0],i[0]);else{if(r[0]>t)a.push(t),o.push(i[0]);else{a.push(t);for(var l=0;l<r.length;l++)if(t<r[l]){o.push(i[l]);break}}for(var s=0;s<r.length;s++)t<r[s]&&r[s]<n&&(a.push(r[s]),o.push(i[s]));if(r[r.length-1]<n)a.push(n),o.push(i[r.length]),o.push(i[r.length]);else{a.push(n);for(var u=0;u<r.length;u++)if(r[u]>n){o.push(i[u]),o.push(i[u]);break}}}else o.push(i[0]);return{min:t,max:n,range:o,domain:a}}({min:"percent"===t.limitType?i:a,max:"percent"===t.limitType?o:l,range:f,limits:"percent"===t.limitType?c:s}));else if(t.breakTypes){var d=t.breakTypes;u.type="continuous",u.domain=[i],u.range=[f[0]];for(var h=0;h<c.length;h+=1)if(d[h]){var p=f[h],m=f[h+1],g=tt(p,m)(.5);u.range.push(g),u.domain.push(c[h]),h<c.length-1&&d[h+1]&&(u.range.push(f[h+1]),u.domain.push((c[h]+c[h+1])/2))}else u.range.push(f[h]),u.range.push(f[h+1]),u.domain.push(c[h]),u.domain.push(c[h]+Math.min(1e-6,(o-i)/1e6));u.range.push(f[f.length-1]),u.domain.push(o)}else u.domain=c,u.range=f;return u};function it(e,t,n,r,i){var o,a,l,s=0,u=[],c=(e-t)/(r+1);if(0===c)return 1;for(o=0;o<n.length;o+=1)a=.99*(n[o]-t),l=n[o]>e?Math.floor(e/c):n[o]<t?0:Math.floor(a/c),Number.isNaN(l)||(u[l]?u[l]+=1:u[l]=1);for(o=0;o<u.length;o+=1)u[o]&&(s+=1);return s<=r||s>=i?Math.max(s,r):it(e,t,n,r+1,i)}var ot=function(e,t,n,r){var i,o,a=t.theme,l=t.hc,s=r.f,u={mode:"field",fieldType:"measure",field:s?s.key():void 0,reverse:n.input.reverseScheme||!1,type:"continuous",range:function(e){return e.resources.theme.palette("quant")}},c=[],f=!0;if(s){if(Number.isNaN(+s.min())||Number.isNaN(+s.max()))return{invalid:!0};(f=!("S"===(i=n.pic.raw()).qMode&&(i.qDataPages[0]&&i.qSize.qcy>i.qDataPages[0].qArea.qHeight||!i.qDataPages.length&&i.qSize.qcy>0)||"K"===i.qMode&&i.qStackedDataPages[0]&&i.qSize.qcy>i.qStackedDataPages[0].qArea.qHeight||"T"===i.qMode&&i.qSize.qcy>i.qTreeDataPages[0].qGroupSize))&&(c=n.pic.extract({field:0,props:{num:{field:s.key()},exclude:{fields:l.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return Math.min.apply(Math,A(e))<0}}}}).filter((function(e){return e.value>=0&&!e.exclude.value})).map((function(e){return e.num.value})).filter((function(e){return"number"==typeof e})))}if(!1===n.input.autoMinMax){if(u.min=n.input.measureMin,u.max=n.input.measureMax,u.max<u.min)return{invalid:!0}}else if(s&&!f)u.min=s.min(),u.max=s.max();else if(s){if(!c.length)return{invalid:!0};u.min=Math.min.apply(Math,A(c)),u.max=Math.max.apply(Math,A(c))}if(n.input.measureScheme&&(u.palettes={quant:n.input.measureScheme}),a){var d=a.getDataColorScales().filter((function(e){return e.key===n.input.measureScheme}))[0];u.type=d&&nt.test(d.type)?"categorical":"continuous","categorical"===u.type&&(o=d.colors.some((function(e){return Array.isArray(e)}))?Math.max.apply(Math,A(d.colors.map((function(e){return e?e.length:0})))):d.colors.length)}if("categorical"===u.type){for(var h=f?it(u.max,u.min,c,1,o):o,p=(u.max-u.min)/h,m=[],g=0;g<h+1;g+=1)m.push(u.min+p*g);u.domain=m,u.range=function(e){for(var t=e.resources.theme.palette("quant",h),n=Math.max(1,Math.floor(t.length/h)),r=[],i=0;i<h;i+=1)r.push(t[i*n]);return[r[0]].concat(r,[r[r.length-1]])}}return u};function at(e,t){var n;return t.activeMeasureIndex>=0?n=e.pic.fields().filter((function(e){return"measure"===e.type()}))[t.activeMeasureIndex]:"libraryItem"===t.type?n=e.pic.field((function(e){return e.raw().colorMapRef===t.key&&void 0!==t.key})):"expression"===t.type&&(n=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))),n||(n=e.pic.field((function(e){return void 0!==e.raw().matchMeasure})))&&(n=e.pic.fields().filter((function(e){return"measure"===e.type()}))[n.raw().matchMeasure]),n}function lt(e){e.measureOverrides.every((function(e){return!e}))&&(e.measureOverrides=null)}function st(e,t){for(var n=(null==t?void 0:t.domain)||[],r=(null==t?void 0:t.range)||[],i=[],o=0;o<e.length;++o){var a=e[o];if("constant"===(null==a?void 0:a.mode)){var l=n.indexOf(o);-1===l?(n.push(o),r.push(a.primary)):r[l]=a.primary,e[o]=null}else if(a){i.push(o);var s=n.indexOf(o);-1!==s&&(n.splice(s,1),r.splice(s,1))}}return{domain:n,range:r,exclude:i}}function ut(e,t,n,r){var i,o=function(e,t,n,r){if(t.input&&!t.input.auto){if("byMeasure"===t.input.mode)return function(e,t,n){var r=t.theme,i=t.hc,o=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).getCField,a=void 0===o?at:o,l=n.input.byMeasureDef||{activeMeasureIndex:0},s=a(n,l),u=ot(0,{theme:r,hc:i},n,{f:s});if(u.invalid)return u;"expression"===l.type&&(l.activeMeasureIndex<0||void 0===l.activeMeasureIndex)&&(u.label=l.label,s&&"color.altLabel"===s.raw().labelExpRef&&(u.label=n.input.altLabel)),!u.label&&s&&(u.label=s.title());var c=l.activeMeasureIndex>=0?s:null;if(!c&&s&&void 0!==s.raw().matchMeasure&&s.raw().matchMeasure>-1&&(c=n.pic.fields().filter((function(e){return"measure"===e.type()}))[s.raw().matchMeasure]),n.input.useMeasureGradient&&"libraryItem"===l.type)if(c){var f=c.raw().coloring;f&&f.gradient&&ee(u,rt(e,f.gradient,u,c))}else u.auxiliary=l;return u}(e,n,t);if("byDimension"===t.input.mode)return function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.getCDef,o=void 0===i?ie:i,a=r.getCByField,l=void 0===a?oe:a,s=r.getPersistence,u=void 0===s?re:s,c=o(t,n),f=l(n,c),d=f?f.raw():{},h=n&&n.pic?n.pic.raw():{};if(d.qError||d.qSize&&0===d.qSize.qcy&&!h.qHasOtherValues)return{invalid:!0};var p={mode:"field",fieldType:"dimension",type:"categorical",field:f?f.key():void 0,isFieldLocked:d.qLocked};return("expression"===c.type||c.activeDimensionIndex<0)&&(p.label=c.label,"color.altLabel"===d.labelExpRef&&(p.label=n.input.altLabel)),!p.label&&f&&(p.label=f.title()),n.input.dimensionScheme&&(p.palettes={categorical:n.input.dimensionScheme}),n.input.useDimColVal&&"libraryItem"===c.type&&(p.auxiliary=c),ee(p,u(t,n,c,f,{byRow:ne,byElemNo:te})),p}(e,n,t);if("byExpression"===t.input.mode)return function(e,t,n,r){var i=t.hc,o=t.theme,a=t.translator,l=n.pic.field((function(e){return"colorByExpression"===e.raw().id}));if(!l||!l.raw().qFallbackTitle&&!n.input.colorExpression||!(Number.isFinite(l.raw().qMin)&&Number.isFinite(l.raw().qMax)||n.input.expressionIsColor))return{mode:"constant",type:"constant",primary:r.nil};if(n.input.expressionIsColor)return{mode:"field",fieldType:"expression",field:l?l.key():void 0,type:"color"};var s=ot(0,{hc:i,theme:o},n,{f:l});return s.invalid||(s.label=n.input.expressionLabel||a.get("Object.ChartTooltip.ColorExpression")),s}(0,n,t,r);if("byMultiple"===t.input.mode||"primary"===t.input.mode)return function(e,t,n,r){var i=t.hc,o=t.theme,a=t.translator,l=n.input.useBaseColors;if(("byMultiple"===n.input.mode||"primary"===n.input.mode&&"measure"===n.input.useBaseColors)&&i.qMeasureInfo.length>1&&(l="measure"),"measure"===l){var s=[],u=[];"measure"===n.input.useBaseColors&&i.qMeasureInfo.forEach((function(t,n){if(t.baseColor||t.coloring&&t.coloring.baseColor){s.push(n);var i=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===i?u.push(r.primary):u.push(i)}}));var c=n.input.dimensionScheme?{categorical:n.input.dimensionScheme}:void 0,f=o?o.getDataColorPalettes()[0]:void 0;return"measure"===n.input.useBaseColors&&f&&(c={categorical:f.key}),{mode:"measure",type:"categorical",palettes:c,label:a?a.get("Common.Measures"):void 0,explicit:s.length?{domain:s,range:u}:void 0}}if("dimension"===l){var d=[],h=[];return i.qDimensionInfo.forEach((function(t,n){if(t.baseColor||t.coloring&&t.coloring.baseColor){d.push(n);var i=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===i?h.push(r.primary):h.push(i)}})),{mode:"dimension",type:"categorical",field:d.length?d[0]:void 0,explicit:d.length?{domain:d,range:h}:void 0}}var p=r.primary;if(void 0!==n.input.paletteColor)n.input.paletteColor&&(p=e.resolveUIColor(n.input.paletteColor));else{var m=n.input.singleColor;"number"!=typeof m||Number.isNaN(m)||(p=["#b0afae","#7b7a78","#545352","#4477aa","#7db8da","#b6d7ea","#46c646","#f93f17","#ffcf02","#276e27","#ffffff","#000000"][m])}return{mode:"constant",type:"constant",primary:p}}(e,n,t,r)}return{}}(e,t,n,r);return null!==(i=t.input)&&void 0!==i&&i.measureOverrides?(o.measureOverrides=t.input.measureOverrides.map((function(n,i){return function(e){var t,n=e.cm,r=e.defaults,i=e.index,o=e.input,a=e.pic;if(!o||!o.on)return null;var l=null!==(t=o.mode)&&void 0!==t?t:"primary";return"primary"===l?function(e,t,n){var r=n.primary;return void 0!==t.paletteColor&&t.paletteColor&&(r=e.resolveUIColor(t.paletteColor)),P(P({},n),{},{mode:"constant",type:"constant",primary:r})}(n,o,r):"byExpression"===l?function(e,t,n){var r="qMeasureInfo/".concat(e,"/"),i=t.field((function(e){return e.id().startsWith(r)&&"colorByMeasureExpression"===e.raw().id})),o=i;return P(P({},n),{},o?{mode:"field",fieldType:"expression",field:i?i.key():void 0,type:"color"}:{mode:"constant",type:"constant",primary:n.nil})}(i,a,r):null}({cm:e,input:n,defaults:r,index:i,pic:t.pic})})),function(e,t){var n,r,i,o=t.translator;if(lt(e),1===(null===(n=e.measureOverrides)||void 0===n?void 0:n.length))return e.measureOverrides[0];if("measure"===e.mode&&e.measureOverrides&&(e.explicit=st(e.measureOverrides,e.explicit),lt(e)),null!==(r=e.measureOverrides)&&void 0!==r&&r.every((function(e){return"constant"===(null==e?void 0:e.mode)}))){var a={mode:"measure",type:"categorical",label:null==o?void 0:o.get("Common.Measures")};return a.explicit=st(e.measureOverrides),a}return null!==(i=e.measureOverrides)&&void 0!==i&&i.every((function(e){return e}))?{invalid:!0,measureOverrides:e.measureOverrides}:e}(o,n)):o}var ct=function(e,t){var n=e.fieldType,r={};if(t)if("measure"===n){var i=t.coloring;i&&(r.measureGradient=i.gradient)}else if("dimension"===n){var o=t[0],a=t[1];o&&(r.legendDataPage=o),a&&(r.dimValsData=a.colorMap)}return r},ft=function(e){throw e.isHandled=!0,e},dt=function(e,t){var n=t.layout,r=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.dimValsData?Promise.resolve({colorMap:n.snapshotData.content.chartData.dimValsData}):Promise.reject():r&&r.getObject?r.getObject("ColorMapModel_".concat(e)).then((function(e){return e.getLayout()})):Promise.reject()},ht=function(e,t){var n=t.layout,r=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.measureGradient?Promise.resolve({coloring:{gradient:n.snapshotData.content.chartData.measureGradient}}):Promise.reject():r&&r.getMeasure?r.getMeasure(e).then((function(e){return e.getMeasure()})):Promise.reject()},pt=function(e,t){var n=t.layout,r=t.model,i=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.legendDataPage?Promise.resolve(n.snapshotData.content.chartData.legendDataPage):Promise.reject():r&&r.session&&i?r.getHyperCubeData(e,[{qHeight:100,qLeft:0,qTop:0,qWidth:2}]).catch(ft):Promise.reject()};function mt(e){return function(t){return"object"===F(t.datum[e])?t.datum[e].value:void 0}}function gt(e){return"object"===F(e.datum.isNull)?e.datum.isNull.value:-2===e.datum.value}function vt(e){return-3===e.datum.value}var yt={TITLE:{COLOR:void 0,FONT_SIZE:"16px",FONT_FAMILY:"'Source Sans Pro', 'Arial', 'sans-serif'"},LABEL:{COLOR:void 0,FONT_SIZE:void 0,FONT_FAMILY:"'Source Sans Pro', 'Arial', 'sans-serif'"}};function bt(e){var t=e.theme,n=e.key,r=e.styleOverrides,i={title:{color:yt.TITLE.COLOR,fontSize:yt.TITLE.FONT_SIZE,fontFamily:yt.TITLE.FONT_FAMILY},label:{color:yt.LABEL.COLOR,fontSize:yt.LABEL.FONT_SIZE,fontFamily:yt.LABEL.FONT_FAMILY}};if(!t&&!r)return i;var o=r||{},a=o.title,l=o.label,s=function(e){var t=e.theme,n=e.key;return function(e,r,i,o){return void 0!==e?e:t?t.getStyle(n,r,i):o}}({theme:t,key:n});return i.title.color=s(null==a?void 0:a.color,"legend.title","color",yt.TITLE.COLOR),i.title.fontSize=s(null==a?void 0:a.fontSize,"legend.title","fontSize",yt.TITLE.FONT_SIZE),i.title.fontFamily=s(null==a?void 0:a.fontFamily,"legend.title","fontFamily",yt.TITLE.FONT_FAMILY),i.label.color=s(null==l?void 0:l.color,"legend.label","color",yt.LABEL.COLOR),i.label.fontSize=s(null==l?void 0:l.fontSize,"legend.label","fontSize",yt.LABEL.FONT_SIZE),i.label.fontFamily=s(null==l?void 0:l.fontFamily,"legend.label","fontFamily",yt.LABEL.FONT_FAMILY),i}var xt=function(e,t,n){var r=e&&e.dock||void 0;if("auto"!==r)return r||"right";if(t){var i=t.element.getBoundingClientRect();if(i.height>i.width)return"bottom"}return n?"left":"right"},wt=function(e,t,n){return!(n.invalid||"color"===n.type||"measure"===n.mode&&t.qMeasureInfo.length<=1||"dimension"===n.mode)&&("function"==typeof e.show?e.show():!1!==e.show)};function Dt(e,t){var n=e.styleReference,r=e.styleOverrides,i=e.chart,o=e.rtl,a=t.legendProps,l=t.coloring,s=t.theme,u=t.hc,c=bt({theme:s,key:n,styleOverrides:r});return{layout:{minimumLayoutMode:"MEDIUM",dock:xt(a,i,o)},show:"function"==typeof a.show?function(){return wt(a,u,l)}:wt(a,u,l),renderer:"svg",mounted:function(e){e.childNodes[0].style.pointerEvents="none",e.style.overflow="hidden"},settings:{title:{show:!1!==a.showTitle,wordBreak:"break-word",maxLines:2,lineHeight:1.2,text:l.label||"",fill:c.title.color,fontSize:c.title.fontSize,fontFamily:c.title.fontFamily}}}}function Mt(e,t,n){var r=[],i=[],o=function(e,t,n){return"categorical"===t.coloring.type?function(e,t,n){var r=Dt(e,t);if(!r.show)return!1;var i,o=e.key,a=e.styleReference,l=e.styleOverrides,s=e.viewState,u=e.rtl,c=e.settings,f=e.style,d=t.scaleKey,h=t.theme,p=t.scales,m=bt({theme:h,key:a,styleOverrides:l}),g=r.layout.dock,v="left"===g||"right"===g?{maxLines:2,wordBreak:"break-word"}:{},y={up:"M13.6,11 L2.4,11 C2.28954305,11 2.2,10.9104569 2.2,10.8 C2.2,10.756726 2.21403557,10.7146192 2.24,10.68 L7.84,3.21333333 C7.90627417,3.12496777 8.03163444,3.10705916 8.12,3.17333333 C8.13516113,3.18470418 8.14862915,3.1981722 8.16,3.21333333 L13.76,10.68 C13.8262742,10.7683656 13.8083656,10.8937258 13.72,10.96 C13.6853808,10.9859644 13.643274,11 13.6,11 Z",down:"M2.4,4 L13.6,4 C13.7104569,4 13.8,4.08954305 13.8,4.2 C13.8,4.24327404 13.7859644,4.28538077 13.76,4.32 L8.16,11.7866667 C8.09372583,11.8750322 7.96836556,11.8929408 7.88,11.8266667 C7.86483887,11.8152958 7.85137085,11.8018278 7.84,11.7866667 L2.24,4.32 C2.17372583,4.23163444 2.19163444,4.10627417 2.28,4.04 C2.31461923,4.01403557 2.35672596,4 2.4,4 Z",left:"M11,2.4 L11,13.6 C11,13.7104569 10.9104569,13.8 10.8,13.8 C10.756726,13.8 10.7146192,13.7859644 10.68,13.76 L3.21333333,8.16 C3.12496777,8.09372583 3.10705916,7.96836556 3.17333333,7.88 C3.18470418,7.86483887 3.1981722,7.85137085 3.21333333,7.84 L10.68,2.24 C10.7683656,2.17372583 10.8937258,2.19163444 10.96,2.28 C10.9859644,2.31461923 11,2.35672596 11,2.4 Z",right:"M4,13.6 L4,2.4 C4,2.28954305 4.08954305,2.2 4.2,2.2 C4.24327404,2.2 4.28538077,2.21403557 4.32,2.24 L11.7866667,7.84 C11.8750322,7.90627417 11.8929408,8.03163444 11.8266667,8.12 C11.8152958,8.13516113 11.8018278,8.14862915 11.7866667,8.16 L4.32,13.76 C4.23163444,13.8262742 4.10627417,13.8083656 4.04,13.72 C4.01403557,13.6853808 4,13.643274 4,13.6 Z"};"dimension"===t.coloring.fieldType&&(i=function(e){return e.datum.value>=0||-3===e.datum.value});var b="".concat(d,"Legend");return ee(!0,r,{type:"legend-cat",key:"".concat(o,"-cat"),scale:b in p?b:d,settings:{layout:{scrollOffset:function(){return s?s.get("legendScrollOffset"):void 0},size:-1!==["top","bottom"].indexOf(r.layout.dock)?2:1,direction:u?"rtl":"ltr",horizontal:20},item:{show:i,label:P({fill:m.label.color,fontSize:m.label.fontSize,fontFamily:m.label.fontFamily},v)},navigation:{disabled:n,button:{content:function(e,t){var n=t.direction;return e("i",{style:{"pointer-events":"none",fontSize:"12px",display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizelegibility",margin:"0px"}},[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor"},[e("path",{d:y[n]})])])}}}},brush:{consume:[{context:"selection",data:["",o],style:{inactive:{opacity:.3}}}]}},{settings:c,style:f})}(e,t,n):"continuous"===t.coloring.type&&function(e,t){var n,r=e.key,i=e.styleReference,o=e.styleOverrides,a=e.rtl,l=e.settings,s=e.style,u=t.scaleKey,c=t.theme,f="".concat(u,"Range"),d=Dt(e,t);if(!d.show)return!1;var h=bt({theme:c,key:i,styleOverrides:o}),p=d.layout.dock,m="right"===p||"left"===p,g=null===(n=t.scales)||void 0===n?void 0:n[f];return m&&g&&(g.invert=!0),ee(!0,d,{type:"legend-seq",key:"".concat(r,"-seq"),settings:{fill:u,major:f,length:1,tick:{fill:h.label.color,fontSize:h.label.fontSize,fontFamily:h.label.fontFamily},title:{anchor:!a||"top"!==d.layout.dock&&"bottom"!==d.layout.dock?void 0:"right",padding:parseFloat(d.settings.title.fontSize)||16}}},{settings:l,style:s})}(e,t)}(e,t,n&&n.navigationDisabled);return r.push(o),o&&"legend-cat"===o.type&&(i.push(function(e){var t=e.key,n=e.requireFailure,r=e.recognizeWith,i=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:tap-".concat(t),type:"Tap",requireFailure:n,recognizeWith:r,options:{event:"legendtap",interval:10,pointers:1,enable:function(e,n){var r;if(!n)return!0;if(null!=i&&null!==(r=i.interact)&&void 0!==r&&r.enabled&&!i.interact.enabled())return!1;if(!this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((function(e){return e.key==="".concat(t,"-cat")})))return!1;var o=n.srcEvent.target;return!!(o&&o.hasAttribute("data-action")&&o.hasAttribute("data-component-key"))||!(!o||!o.childNodes[0]||"BUTTON"!==o.childNodes[0].nodeName)}},events:{legendtap:function(e){e.preventDefault();var t=e.srcEvent.target;t&&t.hasAttribute("data-action")&&t.hasAttribute("data-component-key")&&this.chart.component(t.getAttribute("data-component-key")).emit(t.getAttribute("data-action"))}}}}(e,n)),i.push(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.eventName,n=e.key,r=e.requireFailure,i=e.recognizeWith,o=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:pan-".concat(n),type:"Pan",requireFailure:r,recognizeWith:i,options:{event:t,pointers:1,threshold:10,enable:function(e,r){var i;return this.started===t||!r||!(null!=o&&null!==(i=o.interact)&&void 0!==i&&i.enabled&&!o.interact.enabled())&&this.chart.componentsFromPoint({x:r.center.x,y:r.center.y}).some((function(e){return e.key==="".concat(n,"-cat")}))}},events:O(O(O({},"".concat(t,"start"),(function(e){e.preventDefault(),this.started!==t&&(this.started=t,this.chart.component("".concat(n,"-cat")).emit("panstart",e))})),"".concat(t,"move"),(function(e){e.preventDefault(),this.chart.component("".concat(n,"-cat")).emit("panmove",e)})),"".concat(t,"end"),(function(e){e.preventDefault(),this.chart.component("".concat(n,"-cat")).emit("panend",e),this.started=!1}))}}(e,n))),{interactions:i,components:r}}var qt=function(e){return"rgba(".concat([(16711680&e)>>16,(65280&e)>>8,255&e,((4278190080&e)>>>24)/255].join(","),")")};function kt(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.auto,n=function(e){var t=P({hc:null,colorProps:null,layout:null,theme:null},e),n={},r={auto:function(){return{mode:"primary"}},getDimensionColorMap:function(){return Promise.reject()},getMeasure:function(){return Promise.reject()},getAttributeDimension:function(){return Promise.reject()}},i={auto:function(e){return e?(r.auto=e,i):r.auto},getDimensionColorMap:function(e){return e?(r.getDimensionColorMap=e,i):r.getDimensionColorMap},getAttributeDimension:function(e){return e?(r.getAttributeDimension=e,i):r.getAttributeDimension},getMeasure:function(e){return e?(r.getMeasure=e,i):r.getMeasure},set:function(e){var i;if(!e.colorProps)throw new Error('Missing "colorProps"');if(ee(t,e),(n={pic:t.picasso.data("q")({data:t.hc,config:{localeInfo:t.localeInfo}}),input:t.colorProps}).input.auto){var o=r.auto(e.layout);n.input=ee(!0,{},n.input,o,{auto:!1});var a=t.theme?t.theme.getDataColorPalettes():[];a[0]&&(n.input.dimensionScheme=a[0].key);var l=0;n.input.byDimDef&&+n.input.byDimDef.activeDimensionIndex>=0&&(l=+n.input.byDimDef.activeDimensionIndex),t.hc&&t.hc.qDimensionInfo[l]&&t.hc.qDimensionInfo[l].coloring&&t.hc.qDimensionInfo[l].coloring.colorMapRef&&n.input.byDimDef&&(n.input.byDimDef.type="libraryItem",n.input.byDimDef.key=t.hc.qDimensionInfo[l].coloring.colorMapRef)}null!==(i=n.input.measureOverrides)&&void 0!==i&&i.every((function(e){return!e||!e.on}))&&(n.input=ee(!1,{},n.input,{measureOverrides:null}))},palettes:function(){if(!n.palettes){var e=t.theme,r=[];(e&&e.getDataColorPickerPalettes()||[]).forEach((function(e){r.push({key:"ui",colors:e.colors})})),n.palettes=r}return n.palettes},getAuxiliaryData:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/qHyperCubeDef";if(!e.auxiliary&&!/qAttrDimInfo/.test(e.field))return Promise.resolve();var i=(e.auxiliary||{}).key;if("measure"===e.fieldType)return r.getMeasure(i,t).catch((function(){}));if("dimension"===e.fieldType){var o="".concat(n,"/").concat(e.field).replace("qDimensionInfo","qDimensions").replace("qAttrDimInfo","qAttributeDimensions");return Promise.all([/qAttrDimInfo/.test(e.field)?r.getAttributeDimension(o,t).catch((function(){})):Promise.resolve(),i?r.getDimensionColorMap(i,t).catch((function(){})):Promise.resolve()])}return Promise.resolve()},getAuxiliarySettings:function(e,r){var i=this;return e.auxiliary||/qAttrDimInfo/.test(e.field)?(this.palettes(),this.getAuxiliaryData(e,r).then((function(r){if(!r)return{};if("measure"===e.fieldType){if(r.coloring&&r.coloring.gradient){var o=n.pic.field(e.field);return rt(i,r.coloring.gradient,e,o)}return{}}if("dimension"===e.fieldType){var a={nil:e.nil,others:e.others},l=r[0],s=r[1]?r[1].colorMap:null;if(l){var u=t.picasso.data("q")({data:{qDimensionInfo:[n.pic.field(e.field).raw(),n.pic.field(e.field).raw()],qMeasureInfo:[],qDataPages:l,qInterColumnSortOrder:[0,1],qMode:"S"}});a.legendDataset=u}return s?function(e,t,n,r){var i=r.external,o=r.field,a=P({},e);ee(a,te(o,o.raw().qCardinal));var l=i.theme?i.theme.getDataColorPalettes()[0]:null;return t.nul&&(a.nil=n.resolveUIColor(t.nul)),t.oth&&(a.others=n.resolveUIColor(t.oth)),t.usePal?(a.palettes={categorical:t.pal},l&&!t.pal&&(a.palettes.categorical=l.key,ee(a,te(o)))):!1===t.autoFill&&t.single?a.range=[n.resolveUIColor(t.single)]:t.autoFill&&(l&&(a.palettes={categorical:l.key}),ee(a,te(o))),t.colors&&t.colors.length&&(a.explicit=function(e,t,n){for(var r={},i=0;i<e.length;i+=1)r[e[i].value]=e[i].baseColor;var o=[];return{domain:function(e){var i=e.data,a=[];o=[];for(var l=0;l<i.items.length;l++){var s=i.items[l],u=(s.text||s).label;r[u]&&-1===a.indexOf(s.value)&&(a.push(s.value),o.push(t.resolveUIColor(r[u])))}return a.push(-3,-2),o.push(n.others),o.push(n.nil),a},range:function(){return o}}}(t.colors,n,a)),a}(a,s,i,{external:t,field:n.pic.field(e.field)}):a}return{}}))):Promise.resolve()},resolveUIColor:function(e){if(e.index<0||void 0===e.index)return e.color;if(void 0===n.uiPalette&&(n.uiPalette=this.palettes().filter((function(e){return"ui"===e.key}))[0]||!1),!n.uiPalette)return e.color;var t="none"===n.uiPalette.colors[0]?e.index:e.index-1;return void 0===n.uiPalette.colors[t]?e.color:n.uiPalette.colors[t]},settings:function(){if(this.palettes(),!n.settings){var e={primary:"steelblue",others:"#aaa",nil:"#ddd"},r=t.theme;r&&(e=P(P({},e),r.getDataColorSpecials())),n.settings=ee(e,ut(this,n,t,e))}return n.settings}};return i}(e.resources).auto(t||function(){return{mode:"byDimension",persistent:!1,useDimColVal:!0,byDimDef:{activeDimensionIndex:0,type:"expression",label:""}}}).getDimensionColorMap((function(e,t){var n=t.layout,r=t.app;return dt(e,{layout:n,app:r})})).getMeasure((function(e,t){var n=t.layout,r=t.app;return ht(e,{layout:n,app:r})})).getAttributeDimension((function(e,t){var n=t.layout,r=t.model,i=t.app;return pt(e,{layout:n,model:r,app:i})}));return n.getSnapshotData=ct,n}({resources:e}),n={},r={},i=function(e){return r.settings||(e||console.warn("settings() called before auxiliarySettings()"),r.settings=t.settings()),r.settings},o={config:function(i){if(n=P({},i),r={},!n.key)throw new Error("Missing key");t.set(P(P({},e),n))},auto:function(e){return e?(t.auto(e),o):t.auto()},getAuxiliarySettings:function(e){return r.auxiliarySettings?Promise.resolve(r.auxiliarySettings):t.getAuxiliarySettings(i(!0),e).then((function(e){return r.auxiliarySettings=e||{},r.settings=P(P({},r.settings),r.auxiliarySettings),r.scales=void 0,r.color=void 0,r.auxiliarySettings}))},getAuxiliaryData:function(){return t.getAuxiliaryData(i())},getSnapshotData:function(e){var n=i();return t.getAuxiliaryData(n,e).then((function(e){return t.getSnapshotData(n,e)}))},resolveUIColor:function(e){return t.resolveUIColor(e)},settings:function(){var e=i();return{mode:e.mode,type:e.type,label:e.label,field:e.field,fieldType:e.fieldType,nil:e.nil,others:e.others,primary:e.primary}},settingsForMeasure:function(e){var t;return(null===(t=i().measureOverrides)||void 0===t?void 0:t[e])||this.settings()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return function(e,t){var n=t.isMeasureSelectionLocked;return"field"!==e.mode||("dimension"===e.fieldType?e.isFieldLocked:"measure"!==e.fieldType||n)}(i(),{isMeasureSelectionLocked:t})},palettes:function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.colorProps,n=e.coloring,r=e.theme,i=[];if(n&&n.palettes&&r){var o=n.palettes.categorical||t.dimensionScheme,a=r.getDataColorPalettes().filter((function(e){return e.key===o}))[0]||r.getDataColorPalettes()[0];o&&a&&i.push({key:"categorical",colors:a.colors});var l=n.palettes.metric||t.measureScheme,s=r.getDataColorScales().filter((function(e){return e.key===l}))[0]||r.getDataColorScales()[0];if(s){var u=s.colors[0]?s.colors:[[]].concat(A(s.colors.slice(1)));u=Array.isArray(u[0])?u.map((function(e){return e.slice().reverse()})):u.slice().reverse(),i.push({key:"quant",colors:u})}}return i}({coloring:i(),colorProps:n.colorProps,theme:n.theme})},scales:function(){return r.scales=r.scales||function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.hc,n=e.coloring,r=e.rtl,i=e.key,o=e.source,a=e.picasso,l={},s=i;if(n){var u={override:!0,domain:n.explicit&&"function"==typeof n.explicit.domain?n.explicit.domain:[].concat(A((n.explicit||{}).domain||[]),[-3,-2]),range:n.explicit&&"function"==typeof n.explicit.range?n.explicit.range:[].concat(A((n.explicit||{}).range||[]),[n.others,n.nil])};if("field"===n.mode){if("dimension"===n.fieldType){var c,f=function(e){var t=e.hc,n=e.source,r=e.coloring,i={data:{extract:[{source:"dummy",field:0,filter:function(){return i.expando=t.qDataPages[0]?t.qDataPages[0].qArea.qTop:0,!1}},{source:n,field:r.field,trackBy:r.valueAccessor,reduce:"first",props:{row:{reduce:function(){return i.expando++}},text:{value:function(e){return e.qText},reduce:"first"}}}]},expando:0};return i}({hc:t,source:o,coloring:n}).data;if(n.legendDataset){var d=0,h={};a.data("q")({data:t}).extract({field:n.field,trackBy:n.valueAccessor,reduce:function(e){var t=e[0];return h[t]=d++,e[0]}}),c={source:"attrDim",extract:{field:"qDimensionInfo/0",filter:function(e){return e.qElemNumber>=0},props:{row:{value:function(e){return h[e.qElemNumber]}}}}}}var p={data:f,range:n.range,domain:n.domain,explicit:u,type:"categorical-color",label:function(e){return e.datum.text&&e.datum.text.value?e.datum.text.value:e.datum.label}};l[s]=p,c&&(l["".concat(s,"Legend")]=P(P({},p),{},{data:c})),t&&t.qHasOtherValues&&c&&((c||p.data).amend=[{label:t.qDimensionInfo[0].othersLabel,source:{key:"qHyperCube",field:"qDimensionInfo/0"},row:{value:-3},value:-3}])}else if("measure"===n.fieldType){var m={data:{field:n.field},min:n.min,max:n.max};l[s]=ee({},m,{type:"categorical"===n.type?"threshold-color":"sequential-color",range:n.range,domain:n.domain,invert:n.reverse}),"sequential-color"===l[s].type&&(l["".concat(s,"Range")]=ee({},m,{invert:!!r}))}else if("color"!==n.type)throw new Error("UNUSED FIELD")}else if("dimension"===n.mode){var g={data:t.qDimensionInfo.map((function(e,t){return t})),label:function(e){return t.qDimensionInfo[e.datum.value].qFallbackTitle},explicit:u,type:"categorical-color"};l[s]=g}else if("measure"===n.mode){var v={data:t.qMeasureInfo.map((function(e,t){return t})).filter((function(e){var t;return!(null!==(t=n.explicit)&&void 0!==t&&null!==(t=t.exclude)&&void 0!==t&&t.includes(e))})),label:function(e){return t.qMeasureInfo[e.datum.value].qFallbackTitle},explicit:u,type:"categorical-color"};l[s]=v}}return l}({hc:n.hc,coloring:i(),key:n.key,source:n.source,picasso:e.picasso}),r.scales},color:function(){return r.color=r.color||function(e){var t=e.coloring,n=e.scales,r=e.key,i=mt(r),o=mt("".concat(r,"IsAnOther")),a=function(e,t){var r=e.fieldType,a=e.invalid,l=e.mode,s=e.nil,u=e.others,c=e.primary,f=e.type;return a?function(e){return vt(e)||o(e)?u:s}:n[t]?function(e){return vt(e)?u:gt(e)||-2===i(e)&&"dimension"===r||"NaN"===i(e)?s:o(e)?u:e.resources.scale(t)(i(e))||u}:"constant"===l?function(e){return vt(e)||o(e)?u:gt(e)?s:c}:"color"===f?function(e){return vt(e)||o(e)?u:gt(e)?s:i(e)||u}:null},l=a(t,r);if(t.measureOverrides){var s=mt("".concat(r,"MeasureIdx")),u=t.measureOverrides.map((function(e){return e&&a(e)}));return function(e){var t=s(e);return u[t]?u[t](e):l(e)}}return l}({coloring:i(),scales:this.scales(),key:n.key}),r.color},datumProps:function(e){return function(e){var t,n,r=e.hc,i=e.coloring,o=e.scales,a=e.key,l=e.addMeasureIx,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,u=a,c=i.nil;"field"===i.mode&&i.field?t=i.field:o[a]&&"field"===i.mode&&(t=o[a].data.field||i.field),t?(n={field:t,reduce:"first"},"color"===i.type&&(n.value=function(e){return"NaN"!==e.qNum?qt(e.qNum):e.qText&&Me(e.qText)?e.qText:c})):"dimension"===i.mode?n=void 0!==i.field?i.field:r.qDimensionInfo.length-1:"measure"===i.mode&&(n=s);var f=O({},u,n);return r.qDimensionInfo.length>1&&(f["".concat(u,"IsAnOther")]={fields:r.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return-1!==e.indexOf(-3)}}),l&&(f["".concat(u,"MeasureIdx")]=s),f}({coloring:this.settingsForMeasure(e),scales:this.scales(),key:n.key,hc:n.hc,addMeasureIx:i().measureOverrides},e)},data:function(){var e=i(),t={key:"dummy",data:[["field"],["a"]]};return e.legendDataset?[t,{type:"q",key:"attrDim",data:e.legendDataset.raw(),config:{localeInfo:n.localeInfo}}]:[t]},legend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.eventName,r=e.key,o=e.viewState,a=e.chart,l=e.rtl,s=e.styleReference,u=void 0===s?"object.legend":s,c=e.styleOverrides,f=e.settings,d=void 0===f?{}:f,h=e.style,p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Mt({eventName:t,key:r,rtl:l,viewState:o,chart:a,styleReference:u,styleOverrides:c,settings:d,style:void 0===h?{}:h},{legendProps:n.legendProps,scaleKey:n.key,coloring:i(),theme:n.theme,hc:n.hc,scales:this.scales()},p)}};return o}var St=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function Ct(e){var t=e.qHyperCube,n=t.qDimensionInfo,r=t.qMeasureInfo,i=n.some(St),o=r.some(St),a=e.color.useBaseColors;return"measure"===a&&!o||"dimension"===a&&!i?"off":a}var Tt=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function Nt(e){var t,n=e.qHyperCube.qDimensionInfo.some(Tt),r=e.qHyperCube.qMeasureInfo.some(Tt),i=n?"dimension":void 0;return{mode:"primary",useBaseColors:null!==(t=null!=i?i:r?"measure":void 0)&&void 0!==t?t:"off",paletteColor:null}}var It=function(){};function Et(e){var t,n,r,i,o=e.picasso,a=e.model,l=e.app,s=e.translator,u=e.layoutService,c=void 0===u?void 0:u,f=e.createConfig,d=void 0===f?It:f,h=e.config,p=void 0===h?{}:h,m=e.custom,g=void 0===m?{}:m,v=p.localeInfo,y=p.key,b=p.theme,x=void 0===b?void 0:b,w=p.auto,D=void 0===w?void 0:w,M=p.definitionPath,q=null==c||null===(t=c.getLayout)||void 0===t?void 0:t.call(c),k={theme:x,key:y,localeInfo:v,layout:q,hc:null==c||null===(n=c.getHyperCube)||void 0===n?void 0:n.call(c),legendProps:null==c||null===(r=c.getLayoutValue)||void 0===r?void 0:r.call(c,"legend"),colorProps:P(P({},null==c||null===(i=c.getLayoutValue)||void 0===i?void 0:i.call(c,"color")),{},{useBaseColors:q?Ct(q):void 0})},S=kt({picasso:o,model:a,app:l,translator:s,auto:D});!1!==D&&S.auto((function(e){return D?D({layout:e,defaultAuto:Nt}):Nt(e)}));var C=!1,T={getColor:function(){return S.color()},getPaletteColor:function(e){var t=e.index,n=e.color;return S.resolveUIColor({index:t,color:n})},getData:function(){return S.data()},getDatumProps:function(e){return S.datumProps(e)},getSnapshotData:function(){return S.getSnapshotData(M)},getSettingsForMeasure:function(e){return S.settingsForMeasure(e)},getSettings:function(){return S.settings()},getLegend:function(e,t){return S.legend(e,t)},getScales:function(){return S.scales()},getPalettes:function(){return S.palettes()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return S.isSelectionLocked({isMeasureSelectionLocked:t})},isInitialized:function(){return C},custom:P({},g),initialize:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).createConfig,t=(void 0===e?d:e)({getUseBaseColors:Ct}),n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return P(P(P({},e),t),{},{colorProps:P(P({},e.colorProps),t.colorProps||{})})}(k,t);return S.config(n),S.getAuxiliarySettings(M).then((function(){C=!0}))}};return T}var Ot="center",Lt="bottom";function Pt(e,t,n){if(void 0===e||void 0===t)return n;for(var r=t.split("."),i=e,o=0;o<r.length;++o){var a=r[o];if(void 0===i[a])return n;i=i[a]}return i}[{key:"NoDataExist",alignment:Ot,condition:function(e){var t=e.layoutService;if(!t)return!1;var n=t.meta.size;return n.x*n.y==0}},{key:"OnlyNanDataMeasure",translationKey:"OnlyNanData",alignment:Ot,condition:function(e){var t=e.layoutService;return!!t&&t.getHyperCubeValue("qMeasureInfo").every((function(e){return"NaN"===e.qMin&&"NaN"===e.qMax}))}},{key:"OnlyNanDataDimensionContinuous",translationKey:"OnlyNanData",alignment:Ot,condition:function(e){var t=e.layoutService;if(!t)return!1;if(!t.meta.isContinuous)return!1;var n=t.getHyperCubeValue("qDimensionInfo.0");return n&&(n.qMax<n.qMin||"NaN"===n.qMax)}},{key:"OnlyNegativeOrZeroValues",alignment:Ot},{key:"DataRangeIncludingZero",alignment:Lt},{key:"LimitedData",alignment:Lt},{key:"NegativeOrZeroValues",alignment:Lt}].reduce((function(e,t){return e[t.key]=t,e}),{});var Rt=["__proto__","constructor"];function jt(e,t,n){if(void 0!==e&&void 0!==t){var r=t.split("."),i=r[r.length-1];if(!Rt.some((function(e){return r.includes(e)}))){for(var o=e,a=0;a<r.length-1;++a){var l=r[a];void 0===o[l]&&(o[l]=Number.isNaN(+r[a+1])?{}:[]),o=o[l]}void 0!==n?o[i]=n:delete o[i]}}}function zt(e){var t=e.originalArray,n=e.newArray,r=e.matchKey;return Array.isArray(t)&&t.length?(n.forEach((function(e){var n=-1;t.some((function(t,i){return t[r]&&t[r]===e[r]&&(n=i),n})),n>-1?t[n]=e:t.push(e)})),t):n}function At(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ft(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $t(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ft(Object(n),!0).forEach((function(t){At(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ft(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ht=Object.prototype.hasOwnProperty,Ut=Object.prototype.toString,_t=Object.defineProperty,Bt=Object.getOwnPropertyDescriptor,Vt=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Ut.call(e)},Wt=function(e){if(!e||"[object Object]"!==Ut.call(e))return!1;var t,n=Ht.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Ht.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||Ht.call(e,t)},Yt=function(e,t){_t&&"__proto__"===t.name?_t(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Kt=function(e,t){if("__proto__"===t){if(!Ht.call(e,t))return;if(Bt)return Bt(e,t).value}return e[t]},Jt=function e(){var t,n,r,i,o,a,l=arguments[0],s=1,u=arguments.length,c=!1;for("boolean"==typeof l&&(c=l,l=arguments[1]||{},s=2),(null==l||"object"!=typeof l&&"function"!=typeof l)&&(l={});s<u;++s)if(null!=(t=arguments[s]))for(n in t)r=Kt(l,n),l!==(i=Kt(t,n))&&(c&&i&&(Wt(i)||(o=Vt(i)))?(o?(o=!1,a=r&&Vt(r)?r:[]):a=r&&Wt(r)?r:{},Yt(l,{name:n,newValue:e(c,a,i)})):void 0!==i&&Yt(l,{name:n,newValue:i}));return l};function Zt(e,t,n,r){if(!e)return-1;const i=n.cache,o=e.origin?e.origin():null;o&&(e=o);let a=i.fields.indexOf(e),l=-1,s=-1;if(-1===a)for(let t=0;t<i.wrappedFields.length;t++)if(s=i.wrappedFields[t].attrDims.map((e=>e.instance)).indexOf(e),l=i.wrappedFields[t].attrExps.map((e=>e.instance)).indexOf(e),-1!==s||-1!==l){a=t;break}if(Array.isArray(r)&&r.some(((e,t)=>e!==t))){const e=r.indexOf(a);-1!==e&&(a=e)}return a-=t.qArea.qLeft,a<0||a>=t.qArea.qWidth?-1:s>=0?e=>e[a].qAttrDims.qValues[s]:l>=0?e=>e[a].qAttrExps.qValues[l]:e=>e[a]}function Gt(e,t,n){let{key:r}=n;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function Xt(e){let{cache:t,f:n,mainCell:r,p:i,prop:o,page:a,rowIdx:l,row:s,sourceKey:u,target:c,targetProp:f,columnOrder:d}=e,h=r;if(i.field&&i.field!==n){const e=Zt(i.field,a,{cache:t},d);if(-1===e)return;h=Jt({qRow:l},e(s))}c[f]=Gt(i,h,{key:u})}function Qt(e,t,n,r){const i=Array.isArray(e)?e:[e];let o=[];for(let e=0;e<i.length;e++)if(void 0!==i[e].field){const a=t.raw(),l=t.key(),s="object"==typeof i[e].field?i[e].field:t.field(i[e].field),{props:u,main:c}=r.normalizeConfig(i[e],t),f=Object.keys(u),d=!!i[e].trackBy,h=typeof i[e].trackBy,p={},m=[],g=[];for(let t=0;t<a.qDataPages.length;t++){const o=Zt(s,a.qDataPages[t],{cache:n},a.qColumnOrder);if(-1!==o)for(let v=0;v<a.qDataPages[t].qMatrix.length;v++){const y=a.qDataPages[t].qArea.qTop+v,b=Jt({qRow:y},o(a.qDataPages[t].qMatrix[v])),x=Gt(c,b,{key:l});if(!c.filter||c.filter(b)){for(let e=0;e<f.length;e++){const r=u[f[e]];let i=r.fields||[r];r.fields&&(x[f[e]]=[]);for(let o=0;o<i.length;o++)Xt({cache:n,f:s,mainCell:b,p:i[o],prop:f[e],props:u,page:a.qDataPages[t],rowIdx:y,row:a.qDataPages[t].qMatrix[v],sourceKey:l,target:r.fields?x[f[e]]:x,targetProp:r.fields?o:f[e],columnOrder:a.qColumnOrder});if(r.fields){const t=x[f[e]].map((e=>e.value)),n=x[f[e]].map((e=>e.label));x[f[e]]={value:"function"==typeof r.value?r.value(t):void 0!==r.value?r.value:t,label:"function"==typeof r.label?r.label(n):void 0!==r.label?String(r.label):String(x[f[e]].value)}}}d&&r.track({cfg:i[e],itemData:b,obj:x,target:m,tracker:p,trackType:h}),g.push(x)}}}const v=d?r.collect(m,{main:c,propsArr:f,props:u}):g;o=[...o,...v]}return o}function en(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function tn(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=rn)):void 0===t&&(t=nn);for(var n,r,i,o,a,l=new ln(e),s=[l];n=s.pop();)if((i=t(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)s.push(r=i[o]=new ln(i[o])),r.parent=n,r.depth=n.depth+1;return l.eachBefore(an)}function nn(e){return e.children}function rn(e){return Array.isArray(e)?e[1]:null}function on(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function an(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function ln(e){this.data=e,this.depth=this.height=0,this.parent=null}function sn(e){return null==e?null:function(e){if("function"!=typeof e)throw new Error;return e}(e)}ln.prototype=tn.prototype={constructor:ln,count:function(){return this.eachAfter(en)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,i,o=this,a=[o],l=[],s=-1;o=a.pop();)if(l.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=l.pop();)e.call(t,o,++s,this);return this},eachBefore:function(e,t){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return tn(this).eachBefore(on)},[Symbol.iterator]:function*(){var e,t,n,r,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n])}while(o.length)}};var un={depth:-1},cn={},fn={};function dn(e){return e.id}function hn(e){return e.parentId}function pn(e){let t=e.length;if(t<2)return"";for(;--t>1&&!mn(e,t););return e.slice(0,t)}function mn(e,t){if("/"===e[t]){let n=0;for(;t>0&&"\\"===e[--t];)++n;if(0==(1&n))return!0}return!1}function gn(e,t){"/"===e.charAt(0)&&(e=e.substring(1));const n=e.split("/");let r,i=t;for(let e=0;e<n.length;e++){if("*"===n[e]&&Array.isArray(i)){const t=[];r=n.slice(e+1).join("/");for(let e=0;e<i.length;e++){let n=gn(r,i[e]);Array.isArray(n)?t.push(...n):t.push(n)}return t}if(!n[e]&&Array.isArray(i)){const t=new Array(i.length);r=n.slice(e+1).join("/");for(let e=0;e<i.length;e++)t[e]=gn(r,i[e]);return t}n[e]in i&&(i=i[n[e]])}return i}function vn(e,t,n){let r=[];if(!e||!e.length)return r;if(t<=0){const t=n>=0?[e[n]]:e;r=[...r,...t]}else for(let i=0;i<e.length;i++)e[i].children&&e[i].children.length&&(r=[...r,...vn(e[i].children,t-1,n)]);return r}function yn(e,t,n){if(e===t)return e=>e;if(e>t){const n=Math.max(0,Math.min(100,e-t));return e=>{let t=e;for(let e=0;e<n;++e)t=t.parent;return t}}if(t>e){const r=Math.max(0,Math.min(100,t-e));return e=>vn(e.children,r-1,n)}return!1}const bn=/^qDimensionInfo(?:\/(\d+))?/,xn=/^\/?qMeasureInfo\/(\d+)/,wn=/\/qAttrExprInfo\/(\d+)/,Dn=/\/qAttrDimInfo\/(\d+)/;function Mn(e){return(e.qColumnOrder&&e.qColumnOrder.length?e.qColumnOrder:e.qDimensionInfo.map(((e,t)=>t))).filter((t=>t<e.qDimensionInfo.length))}function qn(e,t){let{cube:n}=t;if(!e)return-1;let r=e.origin&&e.origin()?e.origin().key():e.key(),i=!1,o=-1,a=-1,l=-1,s=-1,u=-1,c=-1,f=r;const d=n.qEffectiveInterColumnSortOrder,h=Mn(n);return bn.test(f)&&(i=!0,o=+bn.exec(f)[1],f=r.replace(bn,"")),xn.test(f)&&("K"===n.qMode?u=+xn.exec(f)[1]:d&&-1!==d.indexOf(-1)?(u=+xn.exec(f)[1],c=0):c=+xn.exec(f)[1],f=f.replace(xn,"")),f&&(Dn.exec(f)?l=+Dn.exec(f)[1]:wn.exec(f)&&(a=+wn.exec(f)[1])),s=i?"S"===n.qMode?h[o]:d?d.indexOf(o):o:d&&-1!==d.indexOf(-1)?d.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1),{fieldDepth:s+1,pseudoMeasureIndex:u,measureIdx:c,attrDimIdx:l,attrIdx:a}}function kn(e,t){let n,r,i=yn(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return n=t.measureIdx>=0?e=>e.data.qValues[t.measureIdx]:e=>e.data,t.attrDimIdx>=0?r=e=>{var n;return null==e||null===(n=e.qAttrDims)||void 0===n?void 0:n.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(r=e=>{var n;return null==e||null===(n=e.qAttrExps)||void 0===n?void 0:n.qValues[t.attrIdx]}),{nodeFn:i,attrFn:r,valueFn:n}}function Sn(e,t,n){let{key:r}=n;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function Cn(e){let{propsArr:t,props:n,item:r,itemData:i,ret:o,sourceKey:a}=e;for(let e=0;e<t.length;e++){const l=n[t[e]],s=l.fields||[l];let u,c;l.fields&&(u=[],c=[]);for(let n=0;n<s.length;n++){const f=s[n];let d,h,p,m,g,v;if("primitive"===f.type?(p=f.value,v=String(f.value)):("function"==typeof f.value&&(d=e=>f.value(e,r)),"function"==typeof f.label&&(h=e=>f.label(e,r)),f.accessor?(m=f.accessor(r),Array.isArray(m)?(g=m.map(f.valueAccessor),f.attrAccessor&&(g=g.map(f.attrAccessor)),d&&(p=g.map(d),d=null),h&&(v=g.map(h),h=null),p=f.reduce?f.reduce(p):p,v=f.reduceLabel?f.reduceLabel(v,p):String(p)):(p=f.attrAccessor?f.attrAccessor(f.valueAccessor(m)):f.valueAccessor(m),v=p)):(p=i,v=i)),l.fields){const e=d?d(p):p;u.push(e),c.push(h&&null!=v?h(v):null!=v?v:String(e))}else{const n=d?d(p):p;o[t[e]]={value:n,label:h?h(v):null!=v?v:String(n)},f.field&&(o[t[e]].source={field:f.field.key(),key:a})}}u&&(o[t[e]]={value:"function"==typeof l.value?l.value(u,r):u,label:"function"==typeof l.label?l.label(c,r):c})}}const Tn=(e,t,n)=>{const r="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",i="K"===e.qMode?"qSubNodes":"qNodes",o=gn(r,e);return o&&o[0]?(t.tree=tn(o[0],n.children||(e=>e[i])),t.tree):null};function Nn(e){const t=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],n=function(e){const t=e.raw().qColumnOrder,n=e.fields();return t&&t.length===n.length?t:n.map(((e,t)=>t))}(e),r=e.fields(),i=e.fields().filter((e=>"dimension"===e.type())).map((e=>n.indexOf(r.indexOf(e)))),o=e.fields().filter((e=>"measure"===e.type())).map((e=>n.indexOf(r.indexOf(e)))),a={__root:{__id:"__root",qValues:[]}};for(let e=0;e<t.length;e++){const n=t[e];let r="__root",s=!1;for(let e=0;e<i.length;e++){var l;const t=n[i[e]],o="".concat(r,"__").concat(null!==(l=t.qElemNumber)&&void 0!==l?l:t.qElemNo);a[o]||(a[o]=$t({__id:o,__parent:r,qValues:[]},t),s=!0),r=o}if(s)for(let e=0;e<o.length;e++){const t=n[o[e]];a[r].qValues.push(t)}}const s=Object.keys(a).map((e=>a[e]));return function(){var e,t=dn,n=hn;function r(r){var i,o,a,l,s,u,c,f,d=Array.from(r),h=t,p=n,m=new Map;if(null!=e){const t=d.map(((t,n)=>function(e){let t=(e=`${e}`).length;return mn(e,t-1)&&!mn(e,t-2)&&(e=e.slice(0,-1)),"/"===e[0]?e:`/${e}`}(e(t,n,r)))),n=t.map(pn),i=new Set(t).add("");for(const e of n)i.has(e)||(i.add(e),t.push(e),n.push(pn(e)),d.push(fn));h=(e,n)=>t[n],p=(e,t)=>n[t]}for(a=0,i=d.length;a<i;++a)o=d[a],u=d[a]=new ln(o),null!=(c=h(o,a,r))&&(c+="")&&(f=u.id=c,m.set(f,m.has(f)?cn:u)),null!=(c=p(o,a,r))&&(c+="")&&(u.parent=c);for(a=0;a<i;++a)if(c=(u=d[a]).parent){if(!(s=m.get(c)))throw new Error("missing: "+c);if(s===cn)throw new Error("ambiguous: "+c);s.children?s.children.push(u):s.children=[u],u.parent=s}else{if(l)throw new Error("multiple roots");l=u}if(!l)throw new Error("no root");if(null!=e){for(;l.data===fn&&1===l.children.length;)l=l.children[0],--i;for(let e=d.length-1;e>=0&&(u=d[e]).data===fn;--e)u.data=null}if(l.parent=un,l.eachBefore((function(e){e.depth=e.parent.depth+1,--i})).eachBefore(an),l.parent=null,i>0)throw new Error("cycle");return l}return r.id=function(e){return arguments.length?(t=sn(e),r):t},r.parentId=function(e){return arguments.length?(n=sn(e),r):n},r.path=function(t){return arguments.length?(e=sn(t),r):e},r}().id((e=>e.__id)).parentId((e=>e.__parent))(s)}const In=e=>{let{propsArr:t,props:n,cube:r,cache:i,itemDepthObject:o,f:a}=e;for(let e=0;e<t.length;e++){const l=n[t[e]],s=l.fields?l.fields:[l];for(let e=0;e<s.length;e++){const t=s[e];if(t.field!==a){const e=kn(o,qn(t.field,{cube:r,cache:i}));t.accessor=e.nodeFn,t.valueAccessor=e.valueFn,t.attrAccessor=e.attrFn}}}};function En(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;const i=t.raw(),o=t.key(),a="S"===i.qMode?Nn(t):Tn(i,n,e);if(!a)return null;const l=a.height,s=[];for(let o=0;o<=l;o++){let a=null;if(o>0)if("S"===i.qMode){let e=Mn(i)[o-1];a=n.fields[e]}else{let e=i.qEffectiveInterColumnSortOrder[o-1];o>i.qEffectiveInterColumnSortOrder.length&&(e=i.qDimensionInfo.length),a=n.fields[e]}const{props:l,main:u}=r.normalizeConfig($t($t({},e),{},{field:a?a.key():void 0}),t),c=Object.keys(l);s[o]={propsArr:c,props:l,main:u};const f=a?qn(a,{cube:i,cache:n}):{fieldDepth:0};In({propsArr:c,props:l,cube:i,cache:n,itemDepthObject:f,f:a})}const u=a.copy().descendants(),c=a.descendants();for(let e=0;e<c.length;e++){const t=s[c[e].depth].propsArr,n=s[c[e].depth].props,r=s[c[e].depth].main,i=u[e],a=i.data,l=Sn(r,a,{key:o});Cn({propsArr:t,props:n,item:i,itemData:a,ret:l,sourceKey:o,isTree:!0}),c[e].data=l}return a}function On(e,t,n,r){const i=Array.isArray(e)?e:[e];let o=[];for(let a=0;a<i.length;a++)if(void 0!==i[a].field){const l=t.raw(),s=t.key();if(!Tn(l,n,e))continue;const u="object"==typeof i[a].field?i[a].field:t.field(i[a].field),{props:c,main:f}=r.normalizeConfig(i[a],t),d=Object.keys(c),h=qn(u,{cube:l,cache:n}),{nodeFn:p,attrFn:m,valueFn:g}=kn({fieldDepth:0},h);In({propsArr:d,props:c,cube:l,cache:n,itemDepthObject:h,f:u});const v=!!i[a].trackBy,y=typeof i[a].trackBy,b={},x=[],w=p(n.tree),D=[];for(let e=0;e<w.length;e++){const t=w[e],n=m?m(g(t)):g(t);if(f.filter&&!f.filter(n))continue;const o=Sn(f,n,{key:s});Cn({propsArr:d,props:c,item:t,itemData:n,ret:o,sourceKey:s}),v&&r.track({cfg:i[a],itemData:n,obj:o,target:x,tracker:b,trackType:y}),D.push(o)}const M=v?r.collect(x,{main:f,propsArr:d,props:c}):D;o=[...o,...M]}return o}var Ln,Pn,Rn=(Ln=function(e){
|
7
|
+
import e from"picasso.js";import t from"picasso-plugin-q";import{useElement as n,useSelections as r,useModel as i,useApp as o,useTranslator as a,useOptions as l,useState as s,useEffect as u,useStaleLayout as c,useTheme as d,useConstraints as f,useRect as p,usePlugins as h,useAppLayout as m,usePromise as g,onTakeSnapshot as v}from"@nebula.js/stardust";var y={properties_dataPoints_labelmode_share:{id:"properties.dataPoints.labelmode.share",locale:{"en-US":"Share","zh-TW":"佔有率","zh-CN":"份额","tr-TR":"Pay","sv-SE":"Andel","it-IT":"Percentuale","es-ES":"Cuota","de-DE":"Anteil","pl-PL":"Udział","nl-NL":"Aandeel","ko-KR":"공유","pt-BR":"Percentual","fr-FR":"Part","ja-JP":"割合","ru-RU":"Доля"}},Tooltip_selections_locked:{id:"Tooltip.selections.locked",locale:{"en-US":"Selections on this dimension are locked","zh-TW":"已鎖定此維度上的選項","zh-CN":"相关维度的选择已锁定","tr-TR":"Bu boyuttaki seçimler kilitli","sv-SE":"Urval i den här dimensionen är låsta","it-IT":"Le selezioni in questa dimensione sono bloccate","es-ES":"Las selecciones de esta dimensión están bloqueadas.","de-DE":"Auswahlen sind für diese Dimension gesperrt","pl-PL":"Selekcje dotyczące tego wymiaru są zablokowane","nl-NL":"Selecties voor deze dimensie zijn vergrendeld","ko-KR":"이 차원의 선택은 잠겨 있습니다.","pt-BR":"Seleções estão bloqueadas nesta dimensão","fr-FR":"Sélections verrouillées pour cette dimension","ja-JP":"この軸での選択はロックされています","ru-RU":"Выборки для данного измерения заблокированы"}},Tooltip_dimensions_drilldown:{id:"Tooltip.dimensions.drilldown",locale:{"en-US":"Drill-down dimension","zh-TW":"向下探查維度","zh-CN":"下钻维度","tr-TR":"Detaya inme boyutu","sv-SE":"Hierarkisk dimension","it-IT":"Dimensione di drill-down","es-ES":"Dimensión jerárquica","de-DE":"Drilldown-Dimension:","pl-PL":"Wymiar hierarchiczny","nl-NL":"Drill-downdimensie","ko-KR":"드릴다운 차원","pt-BR":"Dimensão da hierarquia","fr-FR":"Descendre dans la hiérarchie de la dimension","ja-JP":"軸のドリルダウン","ru-RU":"Измерение с детализацией"}},Object_ErrorMessage_MissingDimension:{id:"Object.ErrorMessage.MissingDimension",locale:{"en-US":"Dimension not found","zh-TW":"找不到維度","zh-CN":"未找到维度","tr-TR":"Boyut bulunamadı","sv-SE":"Dimensionen hittades inte","it-IT":"Dimensione non trovata","es-ES":"No se ha encontrado la dimensión","de-DE":"Dimension nicht gefunden","pl-PL":"Wymiar nie został znaleziony","nl-NL":"Dimensie niet gevonden","ko-KR":"차원을 찾지 못했습니다.","pt-BR":"Dimensão não encontrada","fr-FR":"Dimension introuvable","ja-JP":"軸が見つかりません","ru-RU":"Измерение не найдено"}},Object_ErrorMessage_MissingMeasure:{id:"Object.ErrorMessage.MissingMeasure",locale:{"en-US":"Measure not found","zh-TW":"找不到量值","zh-CN":"未找到度量","tr-TR":"Hesaplama bulunamadı","sv-SE":"Måttet hittades inte","it-IT":"Misura non trovata","es-ES":"No se ha encontrado la medida","de-DE":"Kennzahl nicht gefunden","pl-PL":"Miara nie została znaleziona","nl-NL":"Meting niet gevonden","ko-KR":"측정값을 찾지 못했습니다.","pt-BR":"Medida não encontrada","fr-FR":"Mesure introuvable","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_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_NegativeOrZeroValues:{id:"Object.Disclaimer.NegativeOrZeroValues",locale:{"en-US":"The data set contains negative or zero values that cannot be shown in this chart.","zh-TW":"資料集包含無法在此圖表中顯示的負值或零值。","zh-CN":"数据集中包含无法在此图表中显示的负值或零值。","tr-TR":"Veri kümesi, bu grafikte gösterilemeyen negatif veya sıfır değerlerini içeriyor.","sv-SE":"Datauppsättningen innehåller negativa värden eller nollvärden som inte kan visas i detta diagram.","it-IT":"La serie di dati contiene valori negativi o uguali a zero che non possono essere visualizzati in questo grafico.","es-ES":"El conjunto de datos contiene valores negativos o cero que no se pueden mostrar en este gráfico.","de-DE":"Die in den Datensätzen enthaltenen negativen oder 0-Werte können nicht in diesem Diagramm dargestellt werden.","pl-PL":"Zestaw danych zawiera wartości ujemne lub zerowe, których nie można przedstawić w tym wykresie.","nl-NL":"De gegevensverzameling bevat negatieve waarden of nulwaarden die niet kunnen worden weergegeven in deze grafiek.","ko-KR":"데이터 집합에 해당 차트에 표시할 수 없는 음수 값 또는 zero 값이 포함되어 있습니다.","pt-BR":"O conjunto de dados contém valores negativos ou iguais a zero que não podem ser mostrados neste gráfico.","fr-FR":"L'ensemble de données contient des valeurs négatives ou égales à zéro impossibles à afficher dans ce graphique.","ja-JP":"データ セットには、本チャートに表示できない負の値またはゼロ値が含まれています。","ru-RU":"Набор данных содержит отрицательные или нулевые значения, которые невозможно показать в этой диаграмме."}},Object_Disclaimer_DataRangeIncludingZero:{id:"Object.Disclaimer.DataRangeIncludingZero",locale:{"en-US":"The logarithmic scale has been replaced by a linear scale because the data range includes zero.","zh-TW":"對數刻度已遭線性刻度取代,因為資料範圍包含零。","zh-CN":"对数刻度已替换为线性刻度,因为该数据范围包括零。","tr-TR":"Veri aralığı sıfır değerini içerdiğinden, logaritmik ölçek yerine doğrusal ölçek kullanıldı.","sv-SE":"Den logaritmiska skalan har ersatts av en linjär skala eftersom dataintervallet innehåller värdet noll.","it-IT":"La scala logaritmica è stata sostituita da una scala lineare perché l'intervallo di dati include zero.","es-ES":"La escala logarítmica ha sido reemplazada por una escala lineal porque el rango de datos incluye cero.","de-DE":"Die logarithmische Skala wurde durch die lineare Skala ersetzt, weil der Datenbereich NULL enthält.","pl-PL":"Skala logarytmiczna została zastąpiona liniową, ponieważ zakres danych zawiera zero.","nl-NL":"De logaritmische schaal is vervangen door een lineaire schaal omdat het gegevensbereik nullen bevat.","ko-KR":"데이터 범위에 0이 포함되어 있으므로 로그 눈금이 선형 눈금으로 바뀌었습니다.","pt-BR":"A escala logarítmica foi substituída por uma escala linear, pois o intervalo de dados inclui zero.","fr-FR":"L'échelle logarithmique a été remplacée par une échelle linéaire, car la plage de données comprend la valeur zéro.","ja-JP":"データ範囲にゼロが含まれるため、Log スケールは Linear スケールで置換されています。","ru-RU":"Логарифмический масштаб заменен линейным масштабом, поскольку диапазон данных включает ноль."}},Object_Disclaimer_NoDataExist:{id:"Object.Disclaimer.NoDataExist",locale:{"en-US":"The selections generated no data for this chart.","zh-TW":"此選項無法產生任何適用於此圖表的資料。","zh-CN":"选择未生成此图表的数据。","tr-TR":"Seçimler bu grafik için hiç veri oluşturmadı.","sv-SE":"Urvalen genererade inga data för detta diagram.","it-IT":"Le selezioni non hanno generato dati per questo grafico.","es-ES":"Las selecciones no han generado datos para este gráfico.","de-DE":"Die Auswahlen haben für dieses Diagramm keine Daten generiert.","pl-PL":"Selekcje nie spowodowały wygenerowania danych dla tego wykresu.","nl-NL":"De selecties hebben geen gegevens voor de grafiek gegenereerd.","ko-KR":"선택 내용으로 해당 차트에 대한 데이터가 생성되지 않았습니다.","pt-BR":"As seleções não geraram dados para este gráfico.","fr-FR":"Les sélections n'ont pas généré de données pour ce graphique.","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_OnlyNegativeValues:{id:"Object.Disclaimer.OnlyNegativeValues",locale:{"en-US":"The chart is not displayed because it contains only negative values.","zh-TW":"系統不會顯示圖表,因為該圖表僅包含負值。","zh-CN":"未显示图表,因为它仅包含负值。","tr-TR":"Yalnızca negatif değerleri içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det endast innehåller negativa värden.","it-IT":"Il grafico non viene visualizzato poiché contiene solo valori negativi.","es-ES":"El gráfico no se muestra porque solo contiene valores negativos.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur negative oder Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wyłącznie wartości ujemne.","nl-NL":"Het diagram wordt niet weergegeven omdat deze alleen negatieve waarden bevat.","ko-KR":"음수 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não é exibido porque contém apenas valores negativos.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs négatives.","ja-JP":"負の値しか含まれていないため、チャートは表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только отрицательные значения."}},Object_Disclaimer_NegativeValues:{id:"Object.Disclaimer.NegativeValues",locale:{"en-US":"The data set contains negative values that cannot be shown in this chart.","zh-TW":"資料集包含無法在此圖表中顯示的負值。","zh-CN":"数据集包含无法在此图表中显示的负值。","tr-TR":"Veri kümesi, bu grafikte gösterilemeyen negatif değerleri içeriyor.","sv-SE":"Datauppsättningen innehåller negativa värden som inte kan visas i det här diagrammet.","it-IT":"Il set di dati contiene valori negativi che non possono essere visualizzati in questo grafico.","es-ES":"El conjunto de datos contiene valores negativos que no se pueden mostrar en este gráfico.","de-DE":"Die in den Datensätzen enthaltenen negativen Werte können nicht in diesem Diagramm dargestellt werden.","pl-PL":"Zestaw danych zawiera wartości ujemne, których nie można przedstawić na tym wykresie.","nl-NL":"De gegevensverzameling bevat negatieve waarden die niet kunnen worden weergegeven in dit diagram.","ko-KR":"데이터 집합에 해당 차트에 표시할 수 없는 음수 값이 포함되어 있습니다.","pt-BR":"O conjunto de dados contém valores negativos que não podem ser mostrados neste gráfico.","fr-FR":"Le jeu de données contient des valeurs négatives impossibles à afficher dans ce graphique.","ja-JP":"このチャートには表示できない負の値がデータ セットに含まれています。","ru-RU":"Набор данных содержит отрицательные значения, которые нельзя отобразить на этой диаграмме."}},Object_ChartTooltip_NMore:{id:"Object.ChartTooltip.NMore",locale:{"en-US":"+{0} more","zh-TW":"再加 {0} 個","zh-CN":"+{0} 个","tr-TR":"+{0} öğe daha","sv-SE":"+{0} till","it-IT":"Altre +{0}","es-ES":"+{0} más","de-DE":"+{0} mehr","pl-PL":"+ {0} więcej","nl-NL":"+ {0} meer","ko-KR":"+추가 {0}개","pt-BR":"+{0} mais","fr-FR":"+ {0} de plus","ja-JP":"さらに {0}","ru-RU":"+ дополнительно: {0}"}},Object_ChartTooltip_sumOfPositives:{id:"Object.ChartTooltip.sumOfPositives",locale:{"en-US":"Sum of positives","zh-TW":"正數總和","zh-CN":"正值总和","tr-TR":"Pozitif değerlerin toplamı","sv-SE":"Summan av positiva","it-IT":"Somma valori positivi","es-ES":"Suma de positivos","de-DE":"Summe positiver Werte","pl-PL":"Suma dodatnich","nl-NL":"Som positieven","ko-KR":"양수 합계","pt-BR":"Soma de positivos","fr-FR":"Sommes des valeurs positives","ja-JP":"正の合計","ru-RU":"Сумма положительных значений"}},Object_ChartTooltip_sumOfNegatives:{id:"Object.ChartTooltip.sumOfNegatives",locale:{"en-US":"Sum of negatives","zh-TW":"負數總和","zh-CN":"负值总和","tr-TR":"Negatif değerlerin toplamı","sv-SE":"Summan av negativa","it-IT":"Somma valori negativi","es-ES":"Suma de negativos","de-DE":"Summe negativer Werte","pl-PL":"Suma ujemnych","nl-NL":"Som negatieven","ko-KR":"음수 합계","pt-BR":"Soma de negativos","fr-FR":"Somme des valeurs négatives","ja-JP":"負の合計","ru-RU":"Сумма отрицательных значений"}},Object_ChartTooltip_ColorExpression:{id:"Object.ChartTooltip.ColorExpression",locale:{"en-US":"Color expression","zh-TW":"色彩運算式","zh-CN":"颜色表达式","tr-TR":"Renk ifadesi","sv-SE":"Färguttryck","it-IT":"Espressione colore","es-ES":"Expresión de color","de-DE":"Farbformel","pl-PL":"Wyrażenie koloru","nl-NL":"Kleuruitdrukking","ko-KR":"색상 표현식","pt-BR":"Expressão de cor","fr-FR":"Expression de couleur","ja-JP":"カラー表現","ru-RU":"Выражение для цвета"}},Object_Disclaimer_OnlyNanColor:{id:"Object.Disclaimer.OnlyNanColor",locale:{"en-US":"The data used to color this visualization only contains undefined values.","zh-TW":"用以定義此視覺化的色彩的資料只包含未定義的值。","zh-CN":"用于将该可视化着色的数据仅包含未定义的值。","tr-TR":"Bu görselleştirmeyi renklendirmek için kullanılan veriler yalnızca tanımlanmamış değerler içeriyor.","sv-SE":"Data som används för att färgsätta denna visualisering innehåller enbart odefinierade värden.","it-IT":"I dati utilizzati per colorare questa visualizzazione contengono solo valori non definiti.","es-ES":"Los datos utilizados para colorear esta visualización solo contienen valores indefinidos.","de-DE":"Die verwendeten Daten für die Farbgebung dieser Visualisierung enthalten undefinierte Werte.","pl-PL":"Dane używane do kolorowania tej wizualizacji zawierają wyłącznie niezdefiniowane wartości.","nl-NL":"De gegevens die worden gebruikt om deze visualisatie kleur te geven bevatten uitsluitend ongedefinieerde waarden.","ko-KR":"이 시각화에 색을 지정하는 데 사용된 데이터에는 정의되지 않은 값만 포함되어 있습니다.","pt-BR":"Os dados usados para colorir esse visualização contém somente valores indefinidos.","fr-FR":"Les données utilisées pour colorer cette visualisation ne comportent que des valeurs non définies.","ja-JP":"このビジュアライゼーションの色の割り当てに使用したデータには、未定義の値が含まれています。","ru-RU":"Данные, используемые для выбора цвета визуализации, содержат только неопределенные значения."}},properties_trendlines_types_average:{id:"properties.trendlines.types.average",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_trendlines_types_linear:{id:"properties.trendlines.types.linear",locale:{"en-US":"Linear","zh-TW":"線性","zh-CN":"线性","tr-TR":"Doğrusal","sv-SE":"Linjär","it-IT":"Lineare","es-ES":"Lineal","de-DE":"Linear","pl-PL":"Liniowa","nl-NL":"Lineair","ko-KR":"선형","pt-BR":"Linear","fr-FR":"Linéaire","ja-JP":"線形","ru-RU":"Линейный"}},properties_trendlines_types_polynomial2:{id:"properties.trendlines.types.polynomial2",locale:{"en-US":"Second degree polynomial","zh-TW":"第二度多項式","zh-CN":"二次多项式","tr-TR":"İkinci derece polinom","sv-SE":"Polynomial, andra graden","it-IT":"Polinomio di secondo grado","es-ES":"Polinómica de segundo grado","de-DE":"Polynom zweiten Grades","pl-PL":"Wielomianowa drugiego stopnia","nl-NL":"Tweedegraadspolynoom","ko-KR":"2차 다항식","pt-BR":"Polinômio de segundo grau","fr-FR":"Polynomial du 2ème degré","ja-JP":"2 番目の角度の多項式近似","ru-RU":"Полиномиальный второй степени"}},properties_trendlines_types_polynomial3:{id:"properties.trendlines.types.polynomial3",locale:{"en-US":"Third degree polynomial","zh-TW":"第三度多項式","zh-CN":"三次多项式","tr-TR":"Üçüncü derece polinom","sv-SE":"Polynomial, tredje graden","it-IT":"Polinomio di terzo grado","es-ES":"Polinómica de tercer grado","de-DE":"Polynom dritten Grades","pl-PL":"Wielomianowa trzeciego stopnia","nl-NL":"Derdegraadspolynoom","ko-KR":"3차 다항식","pt-BR":"Polinômio de terceiro grau","fr-FR":"Polynomial du 3ème degré","ja-JP":"3 番目の角度の多項式近似","ru-RU":"Полиномиальный третьей степени"}},properties_trendlines_types_polynomial4:{id:"properties.trendlines.types.polynomial4",locale:{"en-US":"Fourth degree polynomial","zh-TW":"第四度多項式","zh-CN":"四次多项式","tr-TR":"Dördüncü derece polinom","sv-SE":"Polynomial, fjärde graden","it-IT":"Polinomio di quarto grado","es-ES":"Polinómica de cuarto grado","de-DE":"Polynom vierten Grades","pl-PL":"Wielomianowa czwartego stopnia","nl-NL":"Vierdegraadspolynoom","ko-KR":"4차 다항식","pt-BR":"Polinômio de quarto grau","fr-FR":"Polynomial du 4ème degré","ja-JP":"4 番目の角度の多項式近似","ru-RU":"Полиномиальный четвертой степени"}},properties_trendlines_types_exponential:{id:"properties.trendlines.types.exponential",locale:{"en-US":"Exponential","zh-TW":"指數","zh-CN":"指数","tr-TR":"Üstel","sv-SE":"Exponentiell","it-IT":"Esponenziale","es-ES":"Exponencial","de-DE":"Exponentiell","pl-PL":"Wykładnicze","nl-NL":"Exponentieel","ko-KR":"지수","pt-BR":"Exponencial","fr-FR":"Exponentiel","ja-JP":"指数","ru-RU":"Экспоненциальный"}},properties_trendlines_types_logarithmic:{id:"properties.trendlines.types.logarithmic",locale:{"en-US":"Logarithmic","zh-TW":"對數","zh-CN":"对数","tr-TR":"Logaritmik","sv-SE":"Logaritmisk","it-IT":"Logaritmica","es-ES":"Logarítmica","de-DE":"Logarithmisch","pl-PL":"Logarytmiczna","nl-NL":"Logaritmisch","ko-KR":"로그","pt-BR":"Logarítmico","fr-FR":"Logarithmique","ja-JP":"対数","ru-RU":"Логарифмический"}},properties_trendlines_types_power:{id:"properties.trendlines.types.power",locale:{"en-US":"Power","zh-TW":"乘冪","zh-CN":"幂","tr-TR":"Üs","sv-SE":"Potens","it-IT":"Potenza","es-ES":"Potencia","de-DE":"Potenz","pl-PL":"Potęgowa","nl-NL":"Macht","ko-KR":"거듭제곱","pt-BR":"Potência","fr-FR":"Puissance","ja-JP":"累乗","ru-RU":"Силовой"}},Common_Measures:{id:"Common.Measures",locale:{"en-US":"Measures","de-DE":"Kennzahlen","fr-FR":"Mesures","it-IT":"Misure","ja-JP":"メジャー","ko-KR":"측정값","es-ES":"Medidas","nl-NL":"Metingen","pl-PL":"Miary","pt-BR":"Medidas","sv-SE":"Mått","tr-TR":"Hesaplamalar","zh-CN":"度量","zh-TW":"量值","ru-RU":"Меры"}},Tooltip_ToggleOnLassoSelection:{id:"Tooltip.ToggleOnLassoSelection",locale:{"en-US":"Turn on lasso selection","de-DE":"Lasso-Auswahl aktivieren","fr-FR":"Activer la sélection au lasso","it-IT":"Attiva selezione lazo","ja-JP":"囲み選択をオンにする","ko-KR":"올가미 선택 켜기","es-ES":"Activar la selección de contorno","nl-NL":"Lassoselectie inschakelen","pl-PL":"Włącz zaznaczenie lasso","pt-BR":"Ativar seleção de laço","sv-SE":"Slå på lassourval","tr-TR":"Serbest seçimi aç","zh-CN":"开启套索选择方法","zh-TW":"開啟套索選取","ru-RU":"Включить выбор лассо"}},Tooltip_ToggleOffLassoSelection:{id:"Tooltip.ToggleOffLassoSelection",locale:{"en-US":"Turn off lasso selection","de-DE":"Lasso-Auswahl deaktivieren","fr-FR":"Désactiver la sélection au lasso","it-IT":"Disattiva selezione lazo","ja-JP":"囲み選択をオフにする","ko-KR":"올가미 선택 끄기","es-ES":"Desactivar la selección de contorno","nl-NL":"Lassoselectie uitschakelen","pl-PL":"Wyłącz zaznaczenie lasso","pt-BR":"Desativar seleção de laço","sv-SE":"Stäng av lassourval","tr-TR":"Serbest seçimi kapat","zh-CN":"关闭套索选择方法","zh-TW":"關閉套索選取","ru-RU":"Выключить выбор лассо"}}};const b={fill:"steelblue",num:1},x=.9,w=150,q=(e,t,n)=>{let r=0,i=0,o=0,a={},l=0;if("labelCenter"===e)r=t.bottomLeft.x,i=t.topRight.y,o=t.bottomRight.x-t.bottomLeft.x,l=t.bottomRight.y-t.topRight.y,a={share:n.share,fill:n.fill};else{const e=180/Math.PI*Math.atan((t.bottomRight.y-t.topRight.y)/(t.topRight.x-t.bottomRight.x));r=e<15&&e>=0?t.topRight.x:e>-15&&e<0?t.bottomRight.x:e<-15?(t.bottomRight.x-t.topRight.x)/2+t.topRight.x+15:(t.topRight.x-t.bottomRight.x)/2+t.bottomRight.x+15,i=t.topRight.y,o=t.width-r,l=t.bottomRight.y-t.topRight.y,a={fill:n.fill}}return{tag:e,type:"rect",x:r,y:i,width:o,height:l,data:n.data,desc:a,fill:"none"}},D=(e,t)=>{const n=(e=>{const t=(e=>{let t=0;return e.forEach((e=>{e.num>t&&(t=e.num)})),t})(e);let n=0;return e.slice().reverse().map((e=>{const r={datum:e,s:n/t,e:e.num/t};return n=e.num,r})).reverse()})(e),r=t.width*x,i=t.height*x,o=(t.width-r)/2,a=(t.height-i)/2,l=r-(r>w&&i>w?100:0),s=(i-1*(n.length-1))/n.length,u=[];return n.forEach(((e,r)=>{const i=(c=e.e,d=r<n.length-1?e.s:e.e,[.5-.5*c,.5+.5*c,.5+.5*d,.5-.5*d]).map((e=>Math.round(e*l+o)));var c,d;const f=s*r+1*r+a,p={bottomRight:{x:i[2],y:Math.round(f+s)},bottomLeft:{x:i[3],y:Math.round(f+s)},topRight:{x:i[1],y:Math.round(f)},topLeft:{x:i[0],y:Math.round(f)},width:t.width},h=`M${p.topLeft.x},${p.topLeft.y} L${p.topRight.x},${p.topRight.y} ${p.bottomRight.x},${p.bottomRight.y} ${p.bottomLeft.x},${p.bottomLeft.y}Z`;u.push({tag:"section",type:"path",d:h,data:e.datum.data,fill:e.datum.fill});const m={share:e.e,fill:e.datum.fill,data:e.datum.data};s>12&&(p.bottomRight.x-p.bottomLeft.x>32&&u.push(q("labelCenter",p,m)),u.push(q("labelLeft",p,m)))})),u},S=(e,t,n,r)=>(r-e)/r*(t-n)+n,k=(e,t,n)=>{const r=e.filter((e=>"NaN"!==e.num&&e.num>0)),i=r.length,o=n.width*x,a=n.height*x,l=Math.round((n.width-o)/2),s=Math.round((n.height-a)/2),u=o-(o>w&&a>w?100:0),c=a-1*(i-1),d=[],f=r[0].data.num.value;let p=s;return r.forEach(((e,r)=>{const i=t[r]*c,o=Math.round(S(p-s,u,.2*u,a)/2),h=Math.round(S(p-s+i,u,.2*u,a)/2),m=l+Math.round(u/2),g={bottomRight:{x:m+h,y:Math.round(p+i)},bottomLeft:{x:m-h,y:Math.round(p+i)},topRight:{x:m+o,y:p},topLeft:{x:m-o,y:p},width:n.width},v=`M${g.topLeft.x},${g.topLeft.y} L${g.topRight.x},${g.topRight.y} ${g.bottomRight.x},${g.bottomRight.y} ${g.bottomLeft.x},${g.bottomLeft.y}Z`;d.push({tag:"section",type:"path",d:v,data:e.data,fill:e.fill});const y={share:e.data.num.value/f,fill:e.fill,data:e.data};i>2&&(g.bottomRight.x-g.bottomLeft.x>32&&d.push(q("labelCenter",g,y)),d.push(q("labelLeft",g,y))),p+=i+1})),d},M=(e,t,n)=>{const r=e.filter((e=>"NaN"!==e.num&&e.num>0));if(r&&r.length>0)switch(t){case"WIDTH":default:return D(r,n);case"ORDER":return k(r,r.map((()=>1/r.length)),n);case"HEIGHT":return k(r,(e=>{const t=e.reduce(((e,t)=>e+t.data.num.value),0);return e.map((e=>e.data.num.value/t))})(r),n);case"AREA":return k(r,((e,t,n)=>{const r=e.reduce(((e,t)=>e+t.data.num.value),0),i=t.width*x,o=t.height*x,a=i*n,l=o*(i+a)/2,s=(i-a)/2/o,u=[];let c=0;for(let t=e.length-1;t>=0;t--){const n=e[t].data.num.value/r,i=2*s*c+a,d=-i/(2*s)+Math.sqrt(i*i/(4*s*s)+n*l/s);u[t]=d/o,c+=d}return u})(r,n,.2),n)}return[]};var C={require:["resolver"],defaultSettings:{settings:{},data:{},style:{item:"$shape"}},render({data:e}){const t=this.resolver.resolve({data:e,defaults:{...b,...this.style.item},settings:this.settings.settings});return M(t.items,this.settings.settings.mode,this.rect)}};const I={version:"1.9.27",color:{auto:!0,autoMinMax:!0,byDimDef:void 0,byMeasureDef:void 0,colorExpression:void 0,dimensionScheme:"12",expressionIsColor:!0,expressionLabel:"",measureMin:void 0,measureMax:void 0,measureScheme:"sg",mode:"primary",paletteColor:{index:6},persistent:!1,reverseScheme:!1,singleColor:void 0,useBaseColors:"off",useDimColVal:!0,useMeasureGradient:!0},dataPoint:{auto:!0,labelMode:"share"},footnote:"",funnel:{mode:"WIDTH"},qHyperCubeDef:{qDimensions:[],qMeasures:[],qInterColumnSortOrder:[],qInitialDataFetch:[{qWidth:2,qHeight:5e3}],qSuppressMissing:!0,qSuppressZero:!1},showDimensionTitle:!0,showTitles:!0,subtitle:"",title:""};function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function N(e,t,n,r,i,o,a){try{var l=e[o](a),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,i)}function O(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){N(o,r,i,a,l,"next",e)}function l(e){N(o,r,i,a,l,"throw",e)}a(void 0)}))}}function L(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?R(Object(n),!0).forEach((function(t){L(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function T(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function j(){j=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",l=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var o=t&&t.prototype instanceof g?t:g,a=Object.create(o.prototype),l=new E(r||[]);return i(a,"_invoke",{value:k(e,n,l)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=c;var f="suspendedStart",p="executing",h="completed",m={};function g(){}function v(){}function y(){}var b={};u(b,a,(function(){return this}));var x=Object.getPrototypeOf,w=x&&x(x(N([])));w&&w!==n&&r.call(w,a)&&(b=w);var q=y.prototype=g.prototype=Object.create(b);function D(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(i,o,a,l){var s=d(e[i],e,o);if("throw"!==s.type){var u=s.arg,c=u.value;return c&&"object"==typeof c&&r.call(c,"__await")?t.resolve(c.__await).then((function(e){n("next",e,a,l)}),(function(e){n("throw",e,a,l)})):t.resolve(c).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,l)}))}l(s.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function k(t,n,r){var i=f;return function(o,a){if(i===p)throw Error("Generator is already running");if(i===h){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var l=r.delegate;if(l){var s=M(l,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===f)throw i=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var u=d(t,n,r);if("normal"===u.type){if(i=r.done?h:"suspendedYield",u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=h,r.method="throw",r.arg=u.arg)}}}function M(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,M(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=d(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function N(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return v.prototype=y,i(q,"constructor",{value:y,configurable:!0}),i(y,"constructor",{value:v,configurable:!0}),v.displayName=u(y,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,u(e,s,"GeneratorFunction")),e.prototype=Object.create(q),e},t.awrap=function(e){return{__await:e}},D(S.prototype),u(S.prototype,l,(function(){return this})),t.AsyncIterator=S,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new S(c(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},D(q),u(q,s,"Generator"),u(q,a,(function(){return this})),u(q,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=N,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(I),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return l.type="throw",l.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],l=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),I(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;I(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:N(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function z(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}(e,t)||$(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(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)||$(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 F(e){return F="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},F(e)}function $(e,t){if(e){if("string"==typeof e)return E(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?E(e,t):void 0}}var _=["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"],H=["Abril Fatface, serif","Bangers, fantasy","Bebas Neue, sans serif","EB Garamond, serif","Fredoka One, fantasy","Graduate, fantasy","Gravitas One, serif","Indie Flower, fantasy","Inter, sans-serif","Lobster, fantasy","Montserrat, sans-serif","Nixie One, sans-serif","Noto Sans, sans-serif","Open Sans, sans-serif","PT Serif, serif","Pacifico, cursive","Permanent Marker, fantasy","QlikView Sans, sans-serif","Raleway, sans-serif","Rammetto One, fantasy","Roboto, sans-serif","Source Sans Pro, sans-serif","Titan One, fantasy","Yanone Kaffeesatz, sans-serif"];var U=function(e){return{value:e,label:e.charAt(0).toUpperCase()+e.slice(1),groupHeader:!1,disabled:!1,styles:{fontFamily:e}}};function V(e){var t=e.theme,n=e.translator,r=e.defaultValue,i=e.flags,o=[],a=t.getStyle("","","fontFamilies");return Array.isArray(a)&&a.length?o.push.apply(o,A(new Set([r].concat(A(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(r),[{value:"ThemeHeader",label:n.get("properties.themeFonts"),metaText:n.get("properties.theme"),groupHeader:!0}].concat(A(o.map((function(e){return U(e)}))),[{value:"DefaultHeader",label:n.get("properties.allFonts"),metaText:n.get("properties.default"),groupHeader:!0}],A(function(e){return null!=e&&e.isEnabled("PS_20852_WYSIWYG_FONT_SUPPORT")?H:_}(i).map((function(e){return U(e)}))))}function B(e){var t=e.theme,n=e.translator,r=e.id,i=e.path,o=e.flags,a=function(){return t.getStyle(r,i,"fontFamily")};return{getDefaultValue:function(){return a()},getOptions:function(){return V({theme:t,translator:n,defaultValue:a(),flags:o})}}}var W,K,J=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],Y=function(e){return{value:e,label:e,groupHeader:!1,disabled:!1}};function G(e){var t=e.theme,n=e.translator,r=e.id,i=e.path,o=function(){return t.getStyle(r,i,"fontSize")};return{getDefaultValue:function(){return o()},getOptions:function(){return function(e){var t=e.translator,n=e.defaultValue,r=[],i=e.theme.getStyle("","","fontSizes");return Array.isArray(i)&&i.length?r.push.apply(r,A(new Set([n].concat(A(i))))):r.push(n),[{value:"ThemeHeader",label:t.get("properties.themeFontSizes"),metaText:t.get("properties.theme"),groupHeader:!0}].concat(A(r.map((function(e){return Y(e)}))),[{value:"DefaultHeader",label:t.get("properties.allFontSizes"),metaText:t.get("properties.default"),groupHeader:!0}],A(J.map((function(e){return Y(e)}))))}({theme:t,translator:n,defaultValue:o()})}}}function Z(e){var t=e.theme,n=e.translator,r=e.id,i=e.path;return{fontFamily:B({theme:t,translator:n,id:r,path:i,flags:e.flags}),fontSize:G({theme:t,translator:n,id:r,path:i})}}var X,Q=function(){if(K)return W;K=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},o=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,i=e.call(n,"constructor"),o=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!i&&!o)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return W=function e(){var t,n,r,s,u,c,d=arguments[0],f=1,p=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<p;++f)if(null!=(t=arguments[f]))for(n in t)r=l(d,n),d!==(s=l(t,n))&&(h&&s&&(o(s)||(u=i(s)))?(u?(u=!1,c=r&&i(r)?r:[]):c=r&&o(r)?r:{},a(d,{name:n,newValue:e(h,c,s)})):void 0!==s&&a(d,{name:n,newValue:s}));return d},W}(),ee=(X=Q)&&X.__esModule&&Object.prototype.hasOwnProperty.call(X,"default")?X.default:X;function te(e,t){return{range:function(e){var n=e.resources,r=e.data,i=n.theme.palette("categorical",0===t?r.items.length:t);return r.items.map((function(e){return i[e.value%i.length]}))},valueAccessor:e.value}}function ne(e,t){return{range:function(e){var n=e.resources,r=e.data,i=n.theme.palette("categorical",0===t?r.items.length:t);return r.items.map((function(e){return i[e.row.value%i.length]}))},valueAccessor:e.value}}function re(e,t,n,r,i){var o,a,l=i.byRow,s=i.byElemNo;if(r&&(t.input.persistent||e.hc.qDimensionInfo.length>1||void 0===n.activeDimensionIndex&&e.hc.qSize.qcy>((null===(a=(o=e.hc).qDataPages[0]||o.qStackedDataPages[0])||void 0===a?void 0:a.qArea.qHeight)||0)))return s(r,r.raw().qCardinal);if(r){var u=t.pic.extract({field:r.key(),trackBy:r.value}).length;return l(r,u)}return{}}function ie(e,t){var n=e.hc.qDimensionInfo,r=t.input.byDimDef||{activeDimensionIndex:n.length-1};if(r.activeDimensionIndex>=0){var i=n[r.activeDimensionIndex];r=i.coloring&&i.coloring.colorMapRef?{type:"libraryItem",key:i.coloring.colorMapRef,activeDimensionIndex:r.activeDimensionIndex}:{activeDimensionIndex:r.activeDimensionIndex}}return r}function oe(e,t){var n;return t.activeDimensionIndex>=0?n=e.pic.fields().filter((function(e){return"dimension"===e.type()}))[t.activeDimensionIndex]:"libraryItem"===t.type?!1===(n=t.key?e.pic.field((function(e){return e.raw().colorMapRef===t.key})):void 0)&&(n=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))):"expression"===t.type&&(n=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))),n}function ae(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function le(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function se(){}var ue=1/.7,ce="\\s*([+-]?\\d+)\\s*",de="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",fe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",pe=/^#([0-9a-f]{3,8})$/,he=new RegExp(`^rgb\\(${ce},${ce},${ce}\\)$`),me=new RegExp(`^rgb\\(${fe},${fe},${fe}\\)$`),ge=new RegExp(`^rgba\\(${ce},${ce},${ce},${de}\\)$`),ve=new RegExp(`^rgba\\(${fe},${fe},${fe},${de}\\)$`),ye=new RegExp(`^hsl\\(${de},${fe},${fe}\\)$`),be=new RegExp(`^hsla\\(${de},${fe},${fe},${de}\\)$`),xe={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 we(){return this.rgb().formatHex()}function qe(){return this.rgb().formatRgb()}function De(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=pe.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Se(t):3===n?new Ie(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?ke(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?ke(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=he.exec(e))?new Ie(t[1],t[2],t[3],1):(t=me.exec(e))?new Ie(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=ge.exec(e))?ke(t[1],t[2],t[3],t[4]):(t=ve.exec(e))?ke(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=ye.exec(e))?Pe(t[1],t[2]/100,t[3]/100,1):(t=be.exec(e))?Pe(t[1],t[2]/100,t[3]/100,t[4]):xe.hasOwnProperty(e)?Se(xe[e]):"transparent"===e?new Ie(NaN,NaN,NaN,0):null}function Se(e){return new Ie(e>>16&255,e>>8&255,255&e,1)}function ke(e,t,n,r){return r<=0&&(e=t=n=NaN),new Ie(e,t,n,r)}function Me(e){return e instanceof se||(e=De(e)),e?new Ie((e=e.rgb()).r,e.g,e.b,e.opacity):new Ie}function Ce(e,t,n,r){return 1===arguments.length?Me(e):new Ie(e,t,n,null==r?1:r)}function Ie(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Ee(){return`#${Re(this.r)}${Re(this.g)}${Re(this.b)}`}function Ne(){const e=Oe(this.opacity);return`${1===e?"rgb(":"rgba("}${Le(this.r)}, ${Le(this.g)}, ${Le(this.b)}${1===e?")":`, ${e})`}`}function Oe(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Le(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Re(e){return((e=Le(e))<16?"0":"")+e.toString(16)}function Pe(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new je(e,t,n,r)}function Te(e){if(e instanceof je)return new je(e.h,e.s,e.l,e.opacity);if(e instanceof se||(e=De(e)),!e)return new je;if(e instanceof je)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,l=o-i,s=(o+i)/2;return l?(a=t===o?(n-r)/l+6*(n<r):n===o?(r-t)/l+2:(t-n)/l+4,l/=s<.5?o+i:2-o-i,a*=60):l=s>0&&s<1?0:a,new je(a,l,s,e.opacity)}function je(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function ze(e){return(e=(e||0)%360)<0?e+360:e}function Ae(e){return Math.max(0,Math.min(1,e||0))}function Fe(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}ae(se,De,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:we,formatHex:we,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Te(this).formatHsl()},formatRgb:qe,toString:qe}),ae(Ie,Ce,le(se,{brighter(e){return e=null==e?ue:Math.pow(ue,e),new Ie(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new Ie(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ie(Le(this.r),Le(this.g),Le(this.b),Oe(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:Ee,formatHex:Ee,formatHex8:function(){return`#${Re(this.r)}${Re(this.g)}${Re(this.b)}${Re(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Ne,toString:Ne})),ae(je,(function(e,t,n,r){return 1===arguments.length?Te(e):new je(e,t,n,null==r?1:r)}),le(se,{brighter(e){return e=null==e?ue:Math.pow(ue,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,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Ie(Fe(e>=240?e-240:e+120,i,r),Fe(e,i,r),Fe(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new je(ze(this.h),Ae(this.s),Ae(this.l),Oe(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=Oe(this.opacity);return`${1===e?"hsl(":"hsla("}${ze(this.h)}, ${100*Ae(this.s)}%, ${100*Ae(this.l)}%${1===e?")":`, ${e})`}`}}));const $e=Math.PI/180,_e=180/Math.PI,He=4/29,Ue=6/29,Ve=3*Ue*Ue;function Be(e){if(e instanceof We)return new We(e.l,e.a,e.b,e.opacity);if(e instanceof Ze)return Xe(e);e instanceof Ie||(e=Me(e));var t,n,r=Ge(e.r),i=Ge(e.g),o=Ge(e.b),a=Ke((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?t=n=a:(t=Ke((.4360747*r+.3850649*i+.1430804*o)/.96422),n=Ke((.0139322*r+.0971045*i+.7141733*o)/.82521)),new We(116*a-16,500*(t-a),200*(a-n),e.opacity)}function We(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function Ke(e){return e>.008856451679035631?Math.pow(e,1/3):e/Ve+He}function Je(e){return e>Ue?e*e*e:Ve*(e-He)}function Ye(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Ge(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Ze(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Xe(e){if(isNaN(e.h))return new We(e.l,0,0,e.opacity);var t=e.h*$e;return new We(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}ae(We,(function(e,t,n,r){return 1===arguments.length?Be(e):new We(e,t,n,null==r?1:r)}),le(se,{brighter(e){return new We(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new We(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new Ie(Ye(3.1338561*(t=.96422*Je(t))-1.6168667*(e=1*Je(e))-.4906146*(n=.82521*Je(n))),Ye(-.9787684*t+1.9161415*e+.033454*n),Ye(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),ae(Ze,(function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof Ze)return new Ze(e.h,e.c,e.l,e.opacity);if(e instanceof We||(e=Be(e)),0===e.a&&0===e.b)return new Ze(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*_e;return new Ze(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new Ze(e,t,n,null==r?1:r)}),le(se,{brighter(e){return new Ze(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new Ze(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return Xe(this).rgb()}}));var Qe=e=>()=>e;function et(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Qe(isNaN(e)?t:e)}var tt=function e(t){var n=function(e){return 1==(e=+e)?et:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):Qe(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=Ce(e)).r,(t=Ce(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=et(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1),nt=/^class(-pyramid)?/,rt=function(e,t,n,r){var i=void 0!==n.min?n.min:r.min(),o=void 0!==n.max?n.max:r.max(),a=i,l=o,s=t.limits,u={},c="percent"===t.limitType?s.map((function(e){return i+(o-i)*e})):s,d=t.colors.map((function(t){return e.resolveUIColor(t)}));if(i=Math.min.apply(Math,[i].concat(A(c))),o=Math.max.apply(Math,[o].concat(A(c))),u.min=i,u.max=o,t.breakTypes&&-1===t.breakTypes.indexOf(!0))u.type="categorical",Object.assign(u,function(e){var t=e.min,n=e.max,r=e.limits,i=e.range,o=[],a=[];if(r.length)if(r[r.length-1]<t)a.push(t,n),o.push(i[i.length-1],i[i.length-1],i[i.length-1]);else if(r[0]>n)a.push(t,n),o.push(i[0],i[0],i[0]);else{if(r[0]>t)a.push(t),o.push(i[0]);else{a.push(t);for(var l=0;l<r.length;l++)if(t<r[l]){o.push(i[l]);break}}for(var s=0;s<r.length;s++)t<r[s]&&r[s]<n&&(a.push(r[s]),o.push(i[s]));if(r[r.length-1]<n)a.push(n),o.push(i[r.length]),o.push(i[r.length]);else{a.push(n);for(var u=0;u<r.length;u++)if(r[u]>n){o.push(i[u]),o.push(i[u]);break}}}else o.push(i[0]);return{min:t,max:n,range:o,domain:a}}({min:"percent"===t.limitType?i:a,max:"percent"===t.limitType?o:l,range:d,limits:"percent"===t.limitType?c:s}));else if(t.breakTypes){var f=t.breakTypes;u.type="continuous",u.domain=[i],u.range=[d[0]];for(var p=0;p<c.length;p+=1)if(f[p]){var h=d[p],m=d[p+1],g=tt(h,m)(.5);u.range.push(g),u.domain.push(c[p]),p<c.length-1&&f[p+1]&&(u.range.push(d[p+1]),u.domain.push((c[p]+c[p+1])/2))}else u.range.push(d[p]),u.range.push(d[p+1]),u.domain.push(c[p]),u.domain.push(c[p]+Math.min(1e-6,(o-i)/1e6));u.range.push(d[d.length-1]),u.domain.push(o)}else u.domain=c,u.range=d;return u};function it(e,t,n,r,i){var o,a,l,s=0,u=[],c=(e-t)/(r+1);if(0===c)return 1;for(o=0;o<n.length;o+=1)a=.99*(n[o]-t),l=n[o]>e?Math.floor(e/c):n[o]<t?0:Math.floor(a/c),Number.isNaN(l)||(u[l]?u[l]+=1:u[l]=1);for(o=0;o<u.length;o+=1)u[o]&&(s+=1);return s<=r||s>=i?Math.max(s,r):it(e,t,n,r+1,i)}var ot=function(e,t,n,r){var i,o,a=t.theme,l=t.hc,s=r.f,u={mode:"field",fieldType:"measure",field:s?s.key():void 0,reverse:n.input.reverseScheme||!1,type:"continuous",range:function(e){return e.resources.theme.palette("quant")}},c=[],d=!0;if(s){if(Number.isNaN(+s.min())||Number.isNaN(+s.max()))return{invalid:!0};(d=!("S"===(i=n.pic.raw()).qMode&&(i.qDataPages[0]&&i.qSize.qcy>i.qDataPages[0].qArea.qHeight||!i.qDataPages.length&&i.qSize.qcy>0)||"K"===i.qMode&&i.qStackedDataPages[0]&&i.qSize.qcy>i.qStackedDataPages[0].qArea.qHeight||"T"===i.qMode&&i.qSize.qcy>i.qTreeDataPages[0].qGroupSize))&&(c=n.pic.extract({field:0,props:{num:{field:s.key()},exclude:{fields:l.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return Math.min.apply(Math,A(e))<0}}}}).filter((function(e){return e.value>=0&&!e.exclude.value})).map((function(e){return e.num.value})).filter((function(e){return"number"==typeof e})))}if(!1===n.input.autoMinMax){if(u.min=n.input.measureMin,u.max=n.input.measureMax,u.max<u.min)return{invalid:!0}}else if(s&&!d)u.min=s.min(),u.max=s.max();else if(s){if(!c.length)return{invalid:!0};u.min=Math.min.apply(Math,A(c)),u.max=Math.max.apply(Math,A(c))}if(n.input.measureScheme&&(u.palettes={quant:n.input.measureScheme}),a){var f=a.getDataColorScales().filter((function(e){return e.key===n.input.measureScheme}))[0];u.type=f&&nt.test(f.type)?"categorical":"continuous","categorical"===u.type&&(o=f.colors.some((function(e){return Array.isArray(e)}))?Math.max.apply(Math,A(f.colors.map((function(e){return e?e.length:0})))):f.colors.length)}if("categorical"===u.type){for(var p=d?it(u.max,u.min,c,1,o):o,h=(u.max-u.min)/p,m=[],g=0;g<p+1;g+=1)m.push(u.min+h*g);u.domain=m,u.range=function(e){for(var t=e.resources.theme.palette("quant",p),n=Math.max(1,Math.floor(t.length/p)),r=[],i=0;i<p;i+=1)r.push(t[i*n]);return[r[0]].concat(r,[r[r.length-1]])}}return u};function at(e,t){var n;return t.activeMeasureIndex>=0?n=e.pic.fields().filter((function(e){return"measure"===e.type()}))[t.activeMeasureIndex]:"libraryItem"===t.type?n=e.pic.field((function(e){return e.raw().colorMapRef===t.key&&void 0!==t.key})):"expression"===t.type&&(n=e.pic.field((function(e){return"colorByAlternative"===e.raw().id}))),n||(n=e.pic.field((function(e){return void 0!==e.raw().matchMeasure})))&&(n=e.pic.fields().filter((function(e){return"measure"===e.type()}))[n.raw().matchMeasure]),n}function lt(e){e.measureOverrides.every((function(e){return!e}))&&(e.measureOverrides=null)}function st(e,t){for(var n=(null==t?void 0:t.domain)||[],r=(null==t?void 0:t.range)||[],i=[],o=0;o<e.length;++o){var a=e[o];if("constant"===(null==a?void 0:a.mode)){var l=n.indexOf(o);-1===l?(n.push(o),r.push(a.primary)):r[l]=a.primary,e[o]=null}else if(a){i.push(o);var s=n.indexOf(o);-1!==s&&(n.splice(s,1),r.splice(s,1))}}return{domain:n,range:r,exclude:i}}function ut(e,t,n,r){var i,o=function(e,t,n,r){if(t.input&&!t.input.auto){if("byMeasure"===t.input.mode)return function(e,t,n){var r=t.theme,i=t.hc,o=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).getCField,a=void 0===o?at:o,l=n.input.byMeasureDef||{activeMeasureIndex:0},s=a(n,l),u=ot(0,{theme:r,hc:i},n,{f:s});if(u.invalid)return u;"expression"===l.type&&(l.activeMeasureIndex<0||void 0===l.activeMeasureIndex)&&(u.label=l.label,s&&"color.altLabel"===s.raw().labelExpRef&&(u.label=n.input.altLabel)),!u.label&&s&&(u.label=s.title());var c=l.activeMeasureIndex>=0?s:null;if(!c&&s&&void 0!==s.raw().matchMeasure&&s.raw().matchMeasure>-1&&(c=n.pic.fields().filter((function(e){return"measure"===e.type()}))[s.raw().matchMeasure]),n.input.useMeasureGradient&&"libraryItem"===l.type)if(c){var d=c.raw().coloring;d&&d.gradient&&ee(u,rt(e,d.gradient,u,c))}else u.auxiliary=l;return u}(e,n,t);if("byDimension"===t.input.mode)return function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.getCDef,o=void 0===i?ie:i,a=r.getCByField,l=void 0===a?oe:a,s=r.getPersistence,u=void 0===s?re:s,c=o(t,n),d=l(n,c),f=d?d.raw():{},p=n&&n.pic?n.pic.raw():{};if(f.qError||f.qSize&&0===f.qSize.qcy&&!p.qHasOtherValues)return{invalid:!0};var h={mode:"field",fieldType:"dimension",type:"categorical",field:d?d.key():void 0,isFieldLocked:f.qLocked};return("expression"===c.type||c.activeDimensionIndex<0)&&(h.label=c.label,"color.altLabel"===f.labelExpRef&&(h.label=n.input.altLabel)),!h.label&&d&&(h.label=d.title()),n.input.dimensionScheme&&(h.palettes={categorical:n.input.dimensionScheme}),n.input.useDimColVal&&"libraryItem"===c.type&&(h.auxiliary=c),ee(h,u(t,n,c,d,{byRow:ne,byElemNo:te})),h}(e,n,t);if("byExpression"===t.input.mode)return function(e,t,n,r){var i=t.hc,o=t.theme,a=t.translator,l=n.pic.field((function(e){return"colorByExpression"===e.raw().id}));if(!l||!l.raw().qFallbackTitle&&!n.input.colorExpression||!(Number.isFinite(l.raw().qMin)&&Number.isFinite(l.raw().qMax)||n.input.expressionIsColor))return{mode:"constant",type:"constant",primary:r.nil};if(n.input.expressionIsColor)return{mode:"field",fieldType:"expression",field:l?l.key():void 0,type:"color"};var s=ot(0,{hc:i,theme:o},n,{f:l});return s.invalid||(s.label=n.input.expressionLabel||a.get("Object.ChartTooltip.ColorExpression")),s}(0,n,t,r);if("byMultiple"===t.input.mode||"primary"===t.input.mode)return function(e,t,n,r){var i=t.hc,o=t.theme,a=t.translator,l=n.input.useBaseColors;if(("byMultiple"===n.input.mode||"primary"===n.input.mode&&"measure"===n.input.useBaseColors)&&i.qMeasureInfo.length>1&&(l="measure"),"measure"===l){var s=[],u=[];"measure"===n.input.useBaseColors&&i.qMeasureInfo.forEach((function(t,n){if(t.baseColor||t.coloring&&t.coloring.baseColor){s.push(n);var i=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===i?u.push(r.primary):u.push(i)}}));var c=n.input.dimensionScheme?{categorical:n.input.dimensionScheme}:void 0,d=o?o.getDataColorPalettes()[0]:void 0;return"measure"===n.input.useBaseColors&&d&&(c={categorical:d.key}),{mode:"measure",type:"categorical",palettes:c,label:a?a.get("Common.Measures"):void 0,explicit:s.length?{domain:s,range:u}:void 0}}if("dimension"===l){var f=[],p=[];return i.qDimensionInfo.forEach((function(t,n){if(t.baseColor||t.coloring&&t.coloring.baseColor){f.push(n);var i=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===i?p.push(r.primary):p.push(i)}})),{mode:"dimension",type:"categorical",field:f.length?f[0]:void 0,explicit:f.length?{domain:f,range:p}:void 0}}var h=r.primary;if(void 0!==n.input.paletteColor)n.input.paletteColor&&(h=e.resolveUIColor(n.input.paletteColor));else{var m=n.input.singleColor;"number"!=typeof m||Number.isNaN(m)||(h=["#b0afae","#7b7a78","#545352","#4477aa","#7db8da","#b6d7ea","#46c646","#f93f17","#ffcf02","#276e27","#ffffff","#000000"][m])}return{mode:"constant",type:"constant",primary:h}}(e,n,t,r)}return{}}(e,t,n,r);return null!==(i=t.input)&&void 0!==i&&i.measureOverrides?(o.measureOverrides=t.input.measureOverrides.map((function(n,i){return function(e){var t,n=e.cm,r=e.defaults,i=e.index,o=e.input,a=e.pic;if(!o||!o.on)return null;var l=null!==(t=o.mode)&&void 0!==t?t:"primary";return"primary"===l?function(e,t,n){var r=n.primary;return void 0!==t.paletteColor&&t.paletteColor&&(r=e.resolveUIColor(t.paletteColor)),P(P({},n),{},{mode:"constant",type:"constant",primary:r})}(n,o,r):"byExpression"===l?function(e,t,n){var r="qMeasureInfo/".concat(e,"/"),i=t.field((function(e){return e.id().startsWith(r)&&"colorByMeasureExpression"===e.raw().id})),o=i;return P(P({},n),{},o?{mode:"field",fieldType:"expression",field:i?i.key():void 0,type:"color"}:{mode:"constant",type:"constant",primary:n.nil})}(i,a,r):null}({cm:e,input:n,defaults:r,index:i,pic:t.pic})})),function(e,t){var n,r,i,o=t.translator;if(lt(e),1===(null===(n=e.measureOverrides)||void 0===n?void 0:n.length))return e.measureOverrides[0];if("measure"===e.mode&&e.measureOverrides&&(e.explicit=st(e.measureOverrides,e.explicit),lt(e)),null!==(r=e.measureOverrides)&&void 0!==r&&r.every((function(e){return"constant"===(null==e?void 0:e.mode)}))){var a={mode:"measure",type:"categorical",label:null==o?void 0:o.get("Common.Measures")};return a.explicit=st(e.measureOverrides),a}return null!==(i=e.measureOverrides)&&void 0!==i&&i.every((function(e){return e}))?{invalid:!0,measureOverrides:e.measureOverrides}:e}(o,n)):o}var ct=function(e,t){var n=e.fieldType,r={};if(t)if("measure"===n){var i=t.coloring;i&&(r.measureGradient=i.gradient)}else if("dimension"===n){var o=t[0],a=t[1];o&&(r.legendDataPage=o),a&&(r.dimValsData=a.colorMap)}return r},dt=function(e){throw e.isHandled=!0,e};function ft(e){return function(t){return"object"===F(t.datum[e])?t.datum[e].value:void 0}}function pt(e){return"object"===F(e.datum.isNull)?e.datum.isNull.value:-2===e.datum.value}function ht(e){return-3===e.datum.value}var mt={COLOR:void 0,FONT_SIZE:"16px",FONT_FAMILY:"'Source Sans Pro', 'Arial', 'sans-serif'"},gt={COLOR:void 0,FONT_SIZE:void 0,FONT_FAMILY:"'Source Sans Pro', 'Arial', 'sans-serif'"};function vt(e){var t=e.theme,n=e.key,r=e.styleOverrides,i={title:{color:mt.COLOR,fontSize:mt.FONT_SIZE,fontFamily:mt.FONT_FAMILY},label:{color:gt.COLOR,fontSize:gt.FONT_SIZE,fontFamily:gt.FONT_FAMILY}};if(!t&&!r)return i;var o=r||{},a=o.title,l=o.label,s=function(e){var t=e.theme,n=e.key;return function(e,r,i,o){return void 0!==e?e:t?t.getStyle(n,r,i):o}}({theme:t,key:n});return i.title.color=s(null==a?void 0:a.color,"legend.title","color",mt.COLOR),i.title.fontSize=s(null==a?void 0:a.fontSize,"legend.title","fontSize",mt.FONT_SIZE),i.title.fontFamily=s(null==a?void 0:a.fontFamily,"legend.title","fontFamily",mt.FONT_FAMILY),i.label.color=s(null==l?void 0:l.color,"legend.label","color",gt.COLOR),i.label.fontSize=s(null==l?void 0:l.fontSize,"legend.label","fontSize",gt.FONT_SIZE),i.label.fontFamily=s(null==l?void 0:l.fontFamily,"legend.label","fontFamily",gt.FONT_FAMILY),i}var yt=function(e,t,n){var r=e&&e.dock||void 0;if("auto"!==r)return r||"right";if(t){var i=t.element.getBoundingClientRect();if(i.height>i.width)return"bottom"}return n?"left":"right"},bt=function(e,t,n){return!(n.invalid||"color"===n.type||"measure"===n.mode&&t.qMeasureInfo.length<=1||"dimension"===n.mode)&&("function"==typeof e.show?e.show():!1!==e.show)};function xt(e,t){var n=e.styleReference,r=e.styleOverrides,i=e.chart,o=e.rtl,a=t.legendProps,l=t.coloring,s=t.theme,u=t.hc,c=vt({theme:s,key:n,styleOverrides:r});return{layout:{minimumLayoutMode:"MEDIUM",dock:yt(a,i,o)},show:"function"==typeof a.show?function(){return bt(a,u,l)}:bt(a,u,l),renderer:"svg",mounted:function(e){e.childNodes[0].style.pointerEvents="none",e.style.overflow="hidden"},settings:{title:{show:!1!==a.showTitle,wordBreak:"break-word",maxLines:2,lineHeight:1.2,text:l.label||"",fill:c.title.color,fontSize:c.title.fontSize,fontFamily:c.title.fontFamily}}}}function wt(e,t,n){var r=[],i=[],o=function(e,t,n){return"categorical"===t.coloring.type?function(e,t,n){var r=xt(e,t);if(!r.show)return!1;var i,o=e.key,a=e.styleReference,l=e.styleOverrides,s=e.viewState,u=e.rtl,c=e.settings,d=e.style,f=t.scaleKey,p=t.theme,h=t.scales,m=vt({theme:p,key:a,styleOverrides:l}),g=r.layout.dock,v="left"===g||"right"===g?{maxLines:2,wordBreak:"break-word"}:{},y={up:"M13.6,11 L2.4,11 C2.28954305,11 2.2,10.9104569 2.2,10.8 C2.2,10.756726 2.21403557,10.7146192 2.24,10.68 L7.84,3.21333333 C7.90627417,3.12496777 8.03163444,3.10705916 8.12,3.17333333 C8.13516113,3.18470418 8.14862915,3.1981722 8.16,3.21333333 L13.76,10.68 C13.8262742,10.7683656 13.8083656,10.8937258 13.72,10.96 C13.6853808,10.9859644 13.643274,11 13.6,11 Z",down:"M2.4,4 L13.6,4 C13.7104569,4 13.8,4.08954305 13.8,4.2 C13.8,4.24327404 13.7859644,4.28538077 13.76,4.32 L8.16,11.7866667 C8.09372583,11.8750322 7.96836556,11.8929408 7.88,11.8266667 C7.86483887,11.8152958 7.85137085,11.8018278 7.84,11.7866667 L2.24,4.32 C2.17372583,4.23163444 2.19163444,4.10627417 2.28,4.04 C2.31461923,4.01403557 2.35672596,4 2.4,4 Z",left:"M11,2.4 L11,13.6 C11,13.7104569 10.9104569,13.8 10.8,13.8 C10.756726,13.8 10.7146192,13.7859644 10.68,13.76 L3.21333333,8.16 C3.12496777,8.09372583 3.10705916,7.96836556 3.17333333,7.88 C3.18470418,7.86483887 3.1981722,7.85137085 3.21333333,7.84 L10.68,2.24 C10.7683656,2.17372583 10.8937258,2.19163444 10.96,2.28 C10.9859644,2.31461923 11,2.35672596 11,2.4 Z",right:"M4,13.6 L4,2.4 C4,2.28954305 4.08954305,2.2 4.2,2.2 C4.24327404,2.2 4.28538077,2.21403557 4.32,2.24 L11.7866667,7.84 C11.8750322,7.90627417 11.8929408,8.03163444 11.8266667,8.12 C11.8152958,8.13516113 11.8018278,8.14862915 11.7866667,8.16 L4.32,13.76 C4.23163444,13.8262742 4.10627417,13.8083656 4.04,13.72 C4.01403557,13.6853808 4,13.643274 4,13.6 Z"};"dimension"===t.coloring.fieldType&&(i=function(e){return e.datum.value>=0||-3===e.datum.value});var b="".concat(f,"Legend");return ee(!0,r,{type:"legend-cat",key:"".concat(o,"-cat"),scale:b in h?b:f,settings:{layout:{scrollOffset:function(){return s?s.get("legendScrollOffset"):void 0},size:-1!==["top","bottom"].indexOf(r.layout.dock)?2:1,direction:u?"rtl":"ltr",horizontal:20},item:{show:i,label:P({fill:m.label.color,fontSize:m.label.fontSize,fontFamily:m.label.fontFamily},v)},navigation:{disabled:n,button:{content:function(e,t){var n=t.direction;return e("i",{style:{"pointer-events":"none",fontSize:"12px",display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizelegibility",margin:"0px"}},[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor"},[e("path",{d:y[n]})])])}}}},brush:{consume:[{context:"selection",data:["",o],style:{inactive:{opacity:.3}}}]}},{settings:c,style:d})}(e,t,n):"continuous"===t.coloring.type&&function(e,t){var n,r=e.key,i=e.styleReference,o=e.styleOverrides,a=e.rtl,l=e.settings,s=e.style,u=t.scaleKey,c=t.theme,d="".concat(u,"Range"),f=xt(e,t);if(!f.show)return!1;var p=vt({theme:c,key:i,styleOverrides:o}),h=f.layout.dock,m="right"===h||"left"===h,g=null===(n=t.scales)||void 0===n?void 0:n[d];return m&&g&&(g.invert=!0),ee(!0,f,{type:"legend-seq",key:"".concat(r,"-seq"),settings:{fill:u,major:d,length:1,tick:{fill:p.label.color,fontSize:p.label.fontSize,fontFamily:p.label.fontFamily},title:{anchor:!a||"top"!==f.layout.dock&&"bottom"!==f.layout.dock?void 0:"right",padding:parseFloat(f.settings.title.fontSize)||16}}},{settings:l,style:s})}(e,t)}(e,t,n&&n.navigationDisabled);return r.push(o),o&&"legend-cat"===o.type&&(i.push(function(e){var t=e.key,n=e.requireFailure,r=e.recognizeWith,i=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:tap-".concat(t),type:"Tap",requireFailure:n,recognizeWith:r,options:{event:"legendtap",interval:10,pointers:1,enable:function(e,n){var r;if(!n)return!0;if(null!=i&&null!==(r=i.interact)&&void 0!==r&&r.enabled&&!i.interact.enabled())return!1;if(!this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((function(e){return e.key==="".concat(t,"-cat")})))return!1;var o=n.srcEvent.target;return!!(o&&o.hasAttribute("data-action")&&o.hasAttribute("data-component-key"))||!(!o||!o.childNodes[0]||"BUTTON"!==o.childNodes[0].nodeName)}},events:{legendtap:function(e){e.preventDefault();var t=e.srcEvent.target;t&&t.hasAttribute("data-action")&&t.hasAttribute("data-component-key")&&this.chart.component(t.getAttribute("data-component-key")).emit(t.getAttribute("data-action"))}}}}(e,n)),i.push(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.eventName,n=e.key,r=e.requireFailure,i=e.recognizeWith,o=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:pan-".concat(n),type:"Pan",requireFailure:r,recognizeWith:i,options:{event:t,pointers:1,threshold:10,enable:function(e,r){var i;return this.started===t||!r||!(null!=o&&null!==(i=o.interact)&&void 0!==i&&i.enabled&&!o.interact.enabled())&&this.chart.componentsFromPoint({x:r.center.x,y:r.center.y}).some((function(e){return e.key==="".concat(n,"-cat")}))}},events:L(L(L({},"".concat(t,"start"),(function(e){e.preventDefault(),this.started!==t&&(this.started=t,this.chart.component("".concat(n,"-cat")).emit("panstart",e))})),"".concat(t,"move"),(function(e){e.preventDefault(),this.chart.component("".concat(n,"-cat")).emit("panmove",e)})),"".concat(t,"end"),(function(e){e.preventDefault(),this.chart.component("".concat(n,"-cat")).emit("panend",e),this.started=!1}))}}(e,n))),{interactions:i,components:r}}function qt(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.auto,n=function(e){var t=P({hc:null,colorProps:null,layout:null,theme:null},e),n={},r={auto:function(){return{mode:"primary"}},getDimensionColorMap:function(){return Promise.reject()},getMeasure:function(){return Promise.reject()},getAttributeDimension:function(){return Promise.reject()}},i={auto:function(e){return e?(r.auto=e,i):r.auto},getDimensionColorMap:function(e){return e?(r.getDimensionColorMap=e,i):r.getDimensionColorMap},getAttributeDimension:function(e){return e?(r.getAttributeDimension=e,i):r.getAttributeDimension},getMeasure:function(e){return e?(r.getMeasure=e,i):r.getMeasure},set:function(e){var i;if(!e.colorProps)throw new Error('Missing "colorProps"');if(ee(t,e),(n={pic:t.picasso.data("q")({data:t.hc,config:{localeInfo:t.localeInfo}}),input:t.colorProps}).input.auto){var o=r.auto(e.layout);n.input=ee(!0,{},n.input,o,{auto:!1});var a=t.theme?t.theme.getDataColorPalettes():[];a[0]&&(n.input.dimensionScheme=a[0].key);var l=0;n.input.byDimDef&&+n.input.byDimDef.activeDimensionIndex>=0&&(l=+n.input.byDimDef.activeDimensionIndex),t.hc&&t.hc.qDimensionInfo[l]&&t.hc.qDimensionInfo[l].coloring&&t.hc.qDimensionInfo[l].coloring.colorMapRef&&n.input.byDimDef&&(n.input.byDimDef.type="libraryItem",n.input.byDimDef.key=t.hc.qDimensionInfo[l].coloring.colorMapRef)}null!==(i=n.input.measureOverrides)&&void 0!==i&&i.every((function(e){return!e||!e.on}))&&(n.input=ee(!1,{},n.input,{measureOverrides:null}))},palettes:function(){if(!n.palettes){var e=t.theme,r=[];(e&&e.getDataColorPickerPalettes()||[]).forEach((function(e){r.push({key:"ui",colors:e.colors})})),n.palettes=r}return n.palettes},getAuxiliaryData:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/qHyperCubeDef";if(!e.auxiliary&&!/qAttrDimInfo/.test(e.field))return Promise.resolve();var i=(e.auxiliary||{}).key;if("measure"===e.fieldType)return r.getMeasure(i,t).catch((function(){}));if("dimension"===e.fieldType){var o="".concat(n,"/").concat(e.field).replace("qDimensionInfo","qDimensions").replace("qAttrDimInfo","qAttributeDimensions");return Promise.all([/qAttrDimInfo/.test(e.field)?r.getAttributeDimension(o,t).catch((function(){})):Promise.resolve(),i?r.getDimensionColorMap(i,t).catch((function(){})):Promise.resolve()])}return Promise.resolve()},getAuxiliarySettings:function(e,r){var i=this;return e.auxiliary||/qAttrDimInfo/.test(e.field)?(this.palettes(),this.getAuxiliaryData(e,r).then((function(r){if(!r)return{};if("measure"===e.fieldType){if(r.coloring&&r.coloring.gradient){var o=n.pic.field(e.field);return rt(i,r.coloring.gradient,e,o)}return{}}if("dimension"===e.fieldType){var a={nil:e.nil,others:e.others},l=r[0],s=r[1]?r[1].colorMap:null;if(l){var u=t.picasso.data("q")({data:{qDimensionInfo:[n.pic.field(e.field).raw(),n.pic.field(e.field).raw()],qMeasureInfo:[],qDataPages:l,qInterColumnSortOrder:[0,1],qMode:"S"}});a.legendDataset=u}return s?function(e,t,n,r){var i=r.external,o=r.field,a=P({},e);ee(a,te(o,o.raw().qCardinal));var l=i.theme?i.theme.getDataColorPalettes()[0]:null;return t.nul&&(a.nil=n.resolveUIColor(t.nul)),t.oth&&(a.others=n.resolveUIColor(t.oth)),t.usePal?(a.palettes={categorical:t.pal},l&&!t.pal&&(a.palettes.categorical=l.key,ee(a,te(o)))):!1===t.autoFill&&t.single?a.range=[n.resolveUIColor(t.single)]:t.autoFill&&(l&&(a.palettes={categorical:l.key}),ee(a,te(o))),t.colors&&t.colors.length&&(a.explicit=function(e,t,n){for(var r={},i=0;i<e.length;i+=1)r[e[i].value]=e[i].baseColor;var o=[];return{domain:function(e){var i=e.data,a=[];o=[];for(var l=0;l<i.items.length;l++){var s=i.items[l],u=(s.text||s).label;r[u]&&-1===a.indexOf(s.value)&&(a.push(s.value),o.push(t.resolveUIColor(r[u])))}return a.push(-3,-2),o.push(n.others),o.push(n.nil),a},range:function(){return o}}}(t.colors,n,a)),a}(a,s,i,{external:t,field:n.pic.field(e.field)}):a}return{}}))):Promise.resolve()},resolveUIColor:function(e){if(e.index<0||void 0===e.index)return e.color;if(void 0===n.uiPalette&&(n.uiPalette=this.palettes().filter((function(e){return"ui"===e.key}))[0]||!1),!n.uiPalette)return e.color;var t="none"===n.uiPalette.colors[0]?e.index:e.index-1;return void 0===n.uiPalette.colors[t]?e.color:n.uiPalette.colors[t]},settings:function(){if(this.palettes(),!n.settings){var e={primary:"steelblue",others:"#aaa",nil:"#ddd"},r=t.theme;r&&(e=P(P({},e),r.getDataColorSpecials())),n.settings=ee(e,ut(this,n,t,e))}return n.settings}};return i}(e.resources).auto(t||function(){return{mode:"byDimension",persistent:!1,useDimColVal:!0,byDimDef:{activeDimensionIndex:0,type:"expression",label:""}}}).getDimensionColorMap((function(e,t){return function(e,t){var n=t.layout,r=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.dimValsData?Promise.resolve({colorMap:n.snapshotData.content.chartData.dimValsData}):Promise.reject():r&&r.getObject?r.getObject("ColorMapModel_".concat(e)).then((function(e){return e.getLayout()})):Promise.reject()}(e,{layout:t.layout,app:t.app})})).getMeasure((function(e,t){return function(e,t){var n=t.layout,r=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.measureGradient?Promise.resolve({coloring:{gradient:n.snapshotData.content.chartData.measureGradient}}):Promise.reject():r&&r.getMeasure?r.getMeasure(e).then((function(e){return e.getMeasure()})):Promise.reject()}(e,{layout:t.layout,app:t.app})})).getAttributeDimension((function(e,t){return function(e,t){var n=t.layout,r=t.model,i=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.legendDataPage?Promise.resolve(n.snapshotData.content.chartData.legendDataPage):Promise.reject():r&&r.session&&i?r.getHyperCubeData(e,[{qHeight:100,qLeft:0,qTop:0,qWidth:2}]).catch(dt):Promise.reject()}(e,{layout:t.layout,model:t.model,app:t.app})}));return n.getSnapshotData=ct,n}({resources:e}),n={},r={},i=function(e){return r.settings||(e||console.warn("settings() called before auxiliarySettings()"),r.settings=t.settings()),r.settings},o={config:function(i){if(n=P({},i),r={},!n.key)throw new Error("Missing key");t.set(P(P({},e),n))},auto:function(e){return e?(t.auto(e),o):t.auto()},getAuxiliarySettings:function(e){return r.auxiliarySettings?Promise.resolve(r.auxiliarySettings):t.getAuxiliarySettings(i(!0),e).then((function(e){return r.auxiliarySettings=e||{},r.settings=P(P({},r.settings),r.auxiliarySettings),r.scales=void 0,r.color=void 0,r.auxiliarySettings}))},getAuxiliaryData:function(){return t.getAuxiliaryData(i())},getSnapshotData:function(e){var n=i();return t.getAuxiliaryData(n,e).then((function(e){return t.getSnapshotData(n,e)}))},resolveUIColor:function(e){return t.resolveUIColor(e)},settings:function(){var e=i();return{mode:e.mode,type:e.type,label:e.label,field:e.field,fieldType:e.fieldType,nil:e.nil,others:e.others,primary:e.primary}},settingsForMeasure:function(e){var t;return(null===(t=i().measureOverrides)||void 0===t?void 0:t[e])||this.settings()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return function(e,t){var n=t.isMeasureSelectionLocked;return"field"!==e.mode||("dimension"===e.fieldType?e.isFieldLocked:"measure"!==e.fieldType||n)}(i(),{isMeasureSelectionLocked:t})},palettes:function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.colorProps,n=e.coloring,r=e.theme,i=[];if(n&&n.palettes&&r){var o=n.palettes.categorical||t.dimensionScheme,a=r.getDataColorPalettes().filter((function(e){return e.key===o}))[0]||r.getDataColorPalettes()[0];o&&a&&i.push({key:"categorical",colors:a.colors});var l=n.palettes.metric||t.measureScheme,s=r.getDataColorScales().filter((function(e){return e.key===l}))[0]||r.getDataColorScales()[0];if(s){var u=s.colors[0]?s.colors:[[]].concat(A(s.colors.slice(1)));u=Array.isArray(u[0])?u.map((function(e){return e.slice().reverse()})):u.slice().reverse(),i.push({key:"quant",colors:u})}}return i}({coloring:i(),colorProps:n.colorProps,theme:n.theme})},scales:function(){return r.scales=r.scales||function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.hc,n=e.coloring,r=e.rtl,i=e.key,o=e.source,a=e.picasso,l={},s=i;if(n){var u={override:!0,domain:n.explicit&&"function"==typeof n.explicit.domain?n.explicit.domain:[].concat(A((n.explicit||{}).domain||[]),[-3,-2]),range:n.explicit&&"function"==typeof n.explicit.range?n.explicit.range:[].concat(A((n.explicit||{}).range||[]),[n.others,n.nil])};if("field"===n.mode){if("dimension"===n.fieldType){var c,d=function(e){var t=e.hc,n=e.source,r=e.coloring,i={data:{extract:[{source:"dummy",field:0,filter:function(){return i.expando=t.qDataPages[0]?t.qDataPages[0].qArea.qTop:0,!1}},{source:n,field:r.field,trackBy:r.valueAccessor,reduce:"first",props:{row:{reduce:function(){return i.expando++}},text:{value:function(e){return e.qText},reduce:"first"}}}]},expando:0};return i}({hc:t,source:o,coloring:n}).data;if(n.legendDataset){var f=0,p={};a.data("q")({data:t}).extract({field:n.field,trackBy:n.valueAccessor,reduce:function(e){var t=e[0];return p[t]=f++,e[0]}}),c={source:"attrDim",extract:{field:"qDimensionInfo/0",filter:function(e){return e.qElemNumber>=0},props:{row:{value:function(e){return p[e.qElemNumber]}}}}}}var h={data:d,range:n.range,domain:n.domain,explicit:u,type:"categorical-color",label:function(e){return e.datum.text&&e.datum.text.value?e.datum.text.value:e.datum.label}};l[s]=h,c&&(l["".concat(s,"Legend")]=P(P({},h),{},{data:c})),t&&t.qHasOtherValues&&c&&((c||h.data).amend=[{label:t.qDimensionInfo[0].othersLabel,source:{key:"qHyperCube",field:"qDimensionInfo/0"},row:{value:-3},value:-3}])}else if("measure"===n.fieldType){var m={data:{field:n.field},min:n.min,max:n.max};l[s]=ee({},m,{type:"categorical"===n.type?"threshold-color":"sequential-color",range:n.range,domain:n.domain,invert:n.reverse}),"sequential-color"===l[s].type&&(l["".concat(s,"Range")]=ee({},m,{invert:!!r}))}else if("color"!==n.type)throw new Error("UNUSED FIELD")}else if("dimension"===n.mode){var g={data:t.qDimensionInfo.map((function(e,t){return t})),label:function(e){return t.qDimensionInfo[e.datum.value].qFallbackTitle},explicit:u,type:"categorical-color"};l[s]=g}else if("measure"===n.mode){var v={data:t.qMeasureInfo.map((function(e,t){return t})).filter((function(e){var t;return!(null!==(t=n.explicit)&&void 0!==t&&null!==(t=t.exclude)&&void 0!==t&&t.includes(e))})),label:function(e){return t.qMeasureInfo[e.datum.value].qFallbackTitle},explicit:u,type:"categorical-color"};l[s]=v}}return l}({hc:n.hc,coloring:i(),key:n.key,source:n.source,picasso:e.picasso}),r.scales},color:function(){return r.color=r.color||function(e){var t=e.coloring,n=e.scales,r=e.key,i=ft(r),o=ft("".concat(r,"IsAnOther")),a=function(e,t){var r=e.fieldType,a=e.invalid,l=e.mode,s=e.nil,u=e.others,c=e.primary,d=e.type;return a?function(e){return ht(e)||o(e)?u:s}:n[t]?function(e){return ht(e)?u:pt(e)||-2===i(e)&&"dimension"===r||"NaN"===i(e)?s:o(e)?u:e.resources.scale(t)(i(e))||u}:"constant"===l?function(e){return ht(e)||o(e)?u:pt(e)?s:c}:"color"===d?function(e){return ht(e)||o(e)?u:pt(e)?s:i(e)||u}:null},l=a(t,r);if(t.measureOverrides){var s=ft("".concat(r,"MeasureIdx")),u=t.measureOverrides.map((function(e){return e&&a(e)}));return function(e){var t=s(e);return u[t]?u[t](e):l(e)}}return l}({coloring:i(),scales:this.scales(),key:n.key}),r.color},datumProps:function(e){return function(e){var t,n,r=e.hc,i=e.coloring,o=e.scales,a=e.key,l=e.addMeasureIx,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,u=a,c=i.nil;"field"===i.mode&&i.field?t=i.field:o[a]&&"field"===i.mode&&(t=o[a].data.field||i.field),t?(n={field:t,reduce:"first"},"color"===i.type&&(n.value=function(e){return"NaN"!==e.qNum?function(e){return"rgba(".concat([(16711680&e)>>16,(65280&e)>>8,255&e,((4278190080&e)>>>24)/255].join(","),")")}(e.qNum):e.qText&&De(e.qText)?e.qText:c})):"dimension"===i.mode?n=void 0!==i.field?i.field:r.qDimensionInfo.length-1:"measure"===i.mode&&(n=s);var d=L({},u,n);return r.qDimensionInfo.length>1&&(d["".concat(u,"IsAnOther")]={fields:r.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return-1!==e.indexOf(-3)}}),l&&(d["".concat(u,"MeasureIdx")]=s),d}({coloring:this.settingsForMeasure(e),scales:this.scales(),key:n.key,hc:n.hc,addMeasureIx:i().measureOverrides},e)},data:function(){var e=i(),t={key:"dummy",data:[["field"],["a"]]};return e.legendDataset?[t,{type:"q",key:"attrDim",data:e.legendDataset.raw(),config:{localeInfo:n.localeInfo}}]:[t]},legend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.eventName,r=e.key,o=e.viewState,a=e.chart,l=e.rtl,s=e.styleReference,u=void 0===s?"object.legend":s,c=e.styleOverrides,d=e.settings,f=void 0===d?{}:d,p=e.style,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return wt({eventName:t,key:r,rtl:l,viewState:o,chart:a,styleReference:u,styleOverrides:c,settings:f,style:void 0===p?{}:p},{legendProps:n.legendProps,scaleKey:n.key,coloring:i(),theme:n.theme,hc:n.hc,scales:this.scales()},h)}};return o}var Dt=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function St(e){var t=e.qHyperCube,n=t.qDimensionInfo,r=t.qMeasureInfo,i=n.some(Dt),o=r.some(Dt),a=e.color.useBaseColors;return"measure"===a&&!o||"dimension"===a&&!i?"off":a}var kt=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function Mt(e){var t,n=e.qHyperCube.qDimensionInfo.some(kt),r=e.qHyperCube.qMeasureInfo.some(kt),i=n?"dimension":void 0;return{mode:"primary",useBaseColors:null!==(t=null!=i?i:r?"measure":void 0)&&void 0!==t?t:"off",paletteColor:null}}var Ct=function(){};function It(e){var t,n,r,i,o=e.picasso,a=e.model,l=e.app,s=e.translator,u=e.layoutService,c=void 0===u?void 0:u,d=e.createConfig,f=void 0===d?Ct:d,p=e.config,h=void 0===p?{}:p,m=e.custom,g=void 0===m?{}:m,v=h.localeInfo,y=h.key,b=h.theme,x=void 0===b?void 0:b,w=h.auto,q=void 0===w?void 0:w,D=h.definitionPath,S=null==c||null===(t=c.getLayout)||void 0===t?void 0:t.call(c),k={theme:x,key:y,localeInfo:v,layout:S,hc:null==c||null===(n=c.getHyperCube)||void 0===n?void 0:n.call(c),legendProps:null==c||null===(r=c.getLayoutValue)||void 0===r?void 0:r.call(c,"legend"),colorProps:P(P({},null==c||null===(i=c.getLayoutValue)||void 0===i?void 0:i.call(c,"color")),{},{useBaseColors:S?St(S):void 0})},M=qt({picasso:o,model:a,app:l,translator:s,auto:q});!1!==q&&M.auto((function(e){return q?q({layout:e,defaultAuto:Mt}):Mt(e)}));var C=!1,I={getColor:function(){return M.color()},getPaletteColor:function(e){var t=e.index,n=e.color;return M.resolveUIColor({index:t,color:n})},getData:function(){return M.data()},getDatumProps:function(e){return M.datumProps(e)},getSnapshotData:function(){return M.getSnapshotData(D)},getSettingsForMeasure:function(e){return M.settingsForMeasure(e)},getSettings:function(){return M.settings()},getLegend:function(e,t){return M.legend(e,t)},getScales:function(){return M.scales()},getPalettes:function(){return M.palettes()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return M.isSelectionLocked({isMeasureSelectionLocked:t})},isInitialized:function(){return C},custom:P({},g),initialize:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).createConfig,t=(void 0===e?f:e)({getUseBaseColors:St}),n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return P(P(P({},e),t),{},{colorProps:P(P({},e.colorProps),t.colorProps||{})})}(k,t);return M.config(n),M.getAuxiliarySettings(D).then((function(){C=!0}))}};return I}var Et="center",Nt="bottom";function Ot(e,t,n){if(void 0===e||void 0===t)return n;for(var r=t.split("."),i=e,o=0;o<r.length;++o){var a=r[o];if(void 0===i[a])return n;i=i[a]}return i}[{key:"NoDataExist",alignment:Et,condition:function(e){var t=e.layoutService;if(!t)return!1;var n=t.meta.size;return n.x*n.y==0}},{key:"OnlyNanDataMeasure",translationKey:"OnlyNanData",alignment:Et,condition:function(e){var t=e.layoutService;return!!t&&t.getHyperCubeValue("qMeasureInfo").every((function(e){return"NaN"===e.qMin&&"NaN"===e.qMax}))}},{key:"OnlyNanDataDimensionContinuous",translationKey:"OnlyNanData",alignment:Et,condition:function(e){var t=e.layoutService;if(!t)return!1;if(!t.meta.isContinuous)return!1;var n=t.getHyperCubeValue("qDimensionInfo.0");return n&&(n.qMax<n.qMin||"NaN"===n.qMax)}},{key:"OnlyNegativeOrZeroValues",alignment:Et},{key:"DataRangeIncludingZero",alignment:Nt},{key:"LimitedData",alignment:Nt},{key:"NegativeOrZeroValues",alignment:Nt}].reduce((function(e,t){return e[t.key]=t,e}),{});var Lt=["__proto__","constructor"];function Rt(e,t,n){if(void 0!==e&&void 0!==t){var r=t.split("."),i=r[r.length-1];if(!Lt.some((function(e){return r.includes(e)}))){for(var o=e,a=0;a<r.length-1;++a){var l=r[a];void 0===o[l]&&(o[l]=Number.isNaN(+r[a+1])?{}:[]),o=o[l]}void 0!==n?o[i]=n:delete o[i]}}}function Pt(e){var t=e.originalArray,n=e.newArray,r=e.matchKey;return Array.isArray(t)&&t.length?(n.forEach((function(e){var n=-1;t.some((function(t,i){return t[r]&&t[r]===e[r]&&(n=i),n})),n>-1?t[n]=e:t.push(e)})),t):n}function Tt(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function zt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jt(Object(n),!0).forEach((function(t){Tt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var At=Object.prototype.hasOwnProperty,Ft=Object.prototype.toString,$t=Object.defineProperty,_t=Object.getOwnPropertyDescriptor,Ht=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Ft.call(e)},Ut=function(e){if(!e||"[object Object]"!==Ft.call(e))return!1;var t,n=At.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&At.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||At.call(e,t)},Vt=function(e,t){$t&&"__proto__"===t.name?$t(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Bt=function(e,t){if("__proto__"===t){if(!At.call(e,t))return;if(_t)return _t(e,t).value}return e[t]},Wt=function e(){var t,n,r,i,o,a,l=arguments[0],s=1,u=arguments.length,c=!1;for("boolean"==typeof l&&(c=l,l=arguments[1]||{},s=2),(null==l||"object"!=typeof l&&"function"!=typeof l)&&(l={});s<u;++s)if(null!=(t=arguments[s]))for(n in t)r=Bt(l,n),l!==(i=Bt(t,n))&&(c&&i&&(Ut(i)||(o=Ht(i)))?(o?(o=!1,a=r&&Ht(r)?r:[]):a=r&&Ut(r)?r:{},Vt(l,{name:n,newValue:e(c,a,i)})):void 0!==i&&Vt(l,{name:n,newValue:i}));return l};function Kt(e,t,n,r){if(!e)return-1;const i=n.cache,o=e.origin?e.origin():null;o&&(e=o);let a=i.fields.indexOf(e),l=-1,s=-1;if(-1===a)for(let t=0;t<i.wrappedFields.length;t++)if(s=i.wrappedFields[t].attrDims.map((e=>e.instance)).indexOf(e),l=i.wrappedFields[t].attrExps.map((e=>e.instance)).indexOf(e),-1!==s||-1!==l){a=t;break}if(Array.isArray(r)&&r.some(((e,t)=>e!==t))){const e=r.indexOf(a);-1!==e&&(a=e)}return a-=t.qArea.qLeft,a<0||a>=t.qArea.qWidth?-1:s>=0?e=>e[a].qAttrDims.qValues[s]:l>=0?e=>e[a].qAttrExps.qValues[l]:e=>e[a]}function Jt(e,t,n){let{key:r}=n;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function Yt(e){let{cache:t,f:n,mainCell:r,p:i,page:o,rowIdx:a,row:l,sourceKey:s,target:u,targetProp:c,columnOrder:d}=e,f=r;if(i.field&&i.field!==n){const e=Kt(i.field,o,{cache:t},d);if(-1===e)return;f=Wt({qRow:a},e(l))}u[c]=Jt(i,f,{key:s})}function Gt(e,t,n,r){const i=Array.isArray(e)?e:[e];let o=[];for(let e=0;e<i.length;e++)if(void 0!==i[e].field){const a=t.raw(),l=t.key(),s="object"==typeof i[e].field?i[e].field:t.field(i[e].field),{props:u,main:c}=r.normalizeConfig(i[e],t),d=Object.keys(u),f=!!i[e].trackBy,p=typeof i[e].trackBy,h={},m=[],g=[];for(let t=0;t<a.qDataPages.length;t++){const o=Kt(s,a.qDataPages[t],{cache:n},a.qColumnOrder);if(-1!==o)for(let v=0;v<a.qDataPages[t].qMatrix.length;v++){const y=a.qDataPages[t].qArea.qTop+v,b=Wt({qRow:y},o(a.qDataPages[t].qMatrix[v])),x=Jt(c,b,{key:l});if(!c.filter||c.filter(b)){for(let e=0;e<d.length;e++){const r=u[d[e]];let i=r.fields||[r];r.fields&&(x[d[e]]=[]);for(let o=0;o<i.length;o++)Yt({cache:n,f:s,mainCell:b,p:i[o],prop:d[e],page:a.qDataPages[t],rowIdx:y,row:a.qDataPages[t].qMatrix[v],sourceKey:l,target:r.fields?x[d[e]]:x,targetProp:r.fields?o:d[e],columnOrder:a.qColumnOrder});if(r.fields){const t=x[d[e]].map((e=>e.value)),n=x[d[e]].map((e=>e.label));x[d[e]]={value:"function"==typeof r.value?r.value(t):void 0!==r.value?r.value:t,label:"function"==typeof r.label?r.label(n):void 0!==r.label?String(r.label):String(x[d[e]].value)}}}f&&r.track({cfg:i[e],itemData:b,obj:x,target:m,tracker:h,trackType:p}),g.push(x)}}}const v=f?r.collect(m,{main:c,propsArr:d,props:u}):g;o=[...o,...v]}return o}function Zt(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function Xt(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=en)):void 0===t&&(t=Qt);for(var n,r,i,o,a,l=new rn(e),s=[l];n=s.pop();)if((i=t(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)s.push(r=i[o]=new rn(i[o])),r.parent=n,r.depth=n.depth+1;return l.eachBefore(nn)}function Qt(e){return e.children}function en(e){return Array.isArray(e)?e[1]:null}function tn(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function nn(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function rn(e){this.data=e,this.depth=this.height=0,this.parent=null}function on(e){return null==e?null:function(e){if("function"!=typeof e)throw new Error;return e}(e)}rn.prototype=Xt.prototype={constructor:rn,count:function(){return this.eachAfter(Zt)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,i,o=this,a=[o],l=[],s=-1;o=a.pop();)if(l.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=l.pop();)e.call(t,o,++s,this);return this},eachBefore:function(e,t){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return Xt(this).eachBefore(tn)},[Symbol.iterator]:function*(){var e,t,n,r,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n])}while(o.length)}};var an={depth:-1},ln={},sn={};function un(e){return e.id}function cn(e){return e.parentId}function dn(e){let t=e.length;if(t<2)return"";for(;--t>1&&!fn(e,t););return e.slice(0,t)}function fn(e,t){if("/"===e[t]){let n=0;for(;t>0&&"\\"===e[--t];)++n;if(!(1&n))return!0}return!1}function pn(e,t){"/"===e.charAt(0)&&(e=e.substring(1));const n=e.split("/");let r,i=t;for(let e=0;e<n.length;e++){if("*"===n[e]&&Array.isArray(i)){const t=[];r=n.slice(e+1).join("/");for(let e=0;e<i.length;e++){let n=pn(r,i[e]);Array.isArray(n)?t.push(...n):t.push(n)}return t}if(!n[e]&&Array.isArray(i)){const t=new Array(i.length);r=n.slice(e+1).join("/");for(let e=0;e<i.length;e++)t[e]=pn(r,i[e]);return t}n[e]in i&&(i=i[n[e]])}return i}function hn(e,t,n){let r=[];if(!e||!e.length)return r;if(t<=0){const t=n>=0?[e[n]]:e;r=[...r,...t]}else for(let i=0;i<e.length;i++)e[i].children&&e[i].children.length&&(r=[...r,...hn(e[i].children,t-1,n)]);return r}function mn(e,t,n){if(e===t)return e=>e;if(e>t){const n=Math.max(0,Math.min(100,e-t));return e=>{let t=e;for(let e=0;e<n;++e)t=t.parent;return t}}if(t>e){const r=Math.max(0,Math.min(100,t-e));return e=>hn(e.children,r-1,n)}return!1}const gn=/^qDimensionInfo(?:\/(\d+))?/,vn=/^\/?qMeasureInfo\/(\d+)/,yn=/\/qAttrExprInfo\/(\d+)/,bn=/\/qAttrDimInfo\/(\d+)/;function xn(e){return(e.qColumnOrder&&e.qColumnOrder.length?e.qColumnOrder:e.qDimensionInfo.map(((e,t)=>t))).filter((t=>t<e.qDimensionInfo.length))}function wn(e,t){let{cube:n}=t;if(!e)return-1;let r=e.origin&&e.origin()?e.origin().key():e.key(),i=!1,o=-1,a=-1,l=-1,s=-1,u=-1,c=-1,d=r;const f=n.qEffectiveInterColumnSortOrder,p=xn(n);return gn.test(d)&&(i=!0,o=+gn.exec(d)[1],d=r.replace(gn,"")),vn.test(d)&&("K"===n.qMode?u=+vn.exec(d)[1]:f&&-1!==f.indexOf(-1)?(u=+vn.exec(d)[1],c=0):c=+vn.exec(d)[1],d=d.replace(vn,"")),d&&(bn.exec(d)?l=+bn.exec(d)[1]:yn.exec(d)&&(a=+yn.exec(d)[1])),s=i?"S"===n.qMode?p[o]:f?f.indexOf(o):o:f&&-1!==f.indexOf(-1)?f.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1),{fieldDepth:s+1,pseudoMeasureIndex:u,measureIdx:c,attrDimIdx:l,attrIdx:a}}function qn(e,t){let n,r,i=mn(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return n=t.measureIdx>=0?e=>e.data.qValues[t.measureIdx]:e=>e.data,t.attrDimIdx>=0?r=e=>{var n;return null==e||null===(n=e.qAttrDims)||void 0===n?void 0:n.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(r=e=>{var n;return null==e||null===(n=e.qAttrExps)||void 0===n?void 0:n.qValues[t.attrIdx]}),{nodeFn:i,attrFn:r,valueFn:n}}function Dn(e,t,n){let{key:r}=n;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function Sn(e){let{propsArr:t,props:n,item:r,itemData:i,ret:o,sourceKey:a}=e;for(let e=0;e<t.length;e++){const l=n[t[e]],s=l.fields||[l];let u,c;l.fields&&(u=[],c=[]);for(let n=0;n<s.length;n++){const d=s[n];let f,p,h,m,g,v;if("primitive"===d.type?(h=d.value,v=String(d.value)):("function"==typeof d.value&&(f=e=>d.value(e,r)),"function"==typeof d.label&&(p=e=>d.label(e,r)),d.accessor?(m=d.accessor(r),Array.isArray(m)?(g=m.map(d.valueAccessor),d.attrAccessor&&(g=g.map(d.attrAccessor)),f&&(h=g.map(f),f=null),p&&(v=g.map(p),p=null),h=d.reduce?d.reduce(h):h,v=d.reduceLabel?d.reduceLabel(v,h):String(h)):(h=d.attrAccessor?d.attrAccessor(d.valueAccessor(m)):d.valueAccessor(m),v=h)):(h=i,v=i)),l.fields){const e=f?f(h):h;u.push(e),c.push(p&&null!=v?p(v):null!=v?v:String(e))}else{const n=f?f(h):h;o[t[e]]={value:n,label:p?p(v):null!=v?v:String(n)},d.field&&(o[t[e]].source={field:d.field.key(),key:a})}}u&&(o[t[e]]={value:"function"==typeof l.value?l.value(u,r):u,label:"function"==typeof l.label?l.label(c,r):c})}}const kn=(e,t,n)=>{const r="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",i="K"===e.qMode?"qSubNodes":"qNodes",o=pn(r,e);return o&&o[0]?(t.tree=Xt(o[0],n.children||(e=>e[i])),t.tree):null};function Mn(e){const t=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],n=function(e){const t=e.raw().qColumnOrder,n=e.fields();return t&&t.length===n.length?t:n.map(((e,t)=>t))}(e),r=e.fields(),i=e.fields().filter((e=>"dimension"===e.type())).map((e=>n.indexOf(r.indexOf(e)))),o=e.fields().filter((e=>"measure"===e.type())).map((e=>n.indexOf(r.indexOf(e)))),a={__root:{__id:"__root",qValues:[]}};for(let e=0;e<t.length;e++){const n=t[e];let r="__root",s=!1;for(let e=0;e<i.length;e++){var l;const t=n[i[e]],o="".concat(r,"__").concat(null!==(l=t.qElemNumber)&&void 0!==l?l:t.qElemNo);a[o]||(a[o]=zt({__id:o,__parent:r,qValues:[]},t),s=!0),r=o}if(s)for(let e=0;e<o.length;e++){const t=n[o[e]];a[r].qValues.push(t)}}const s=Object.keys(a).map((e=>a[e]));return function(){var e,t=un,n=cn;function r(r){var i,o,a,l,s,u,c,d,f=Array.from(r),p=t,h=n,m=new Map;if(null!=e){const t=f.map(((t,n)=>function(e){let t=(e=`${e}`).length;return fn(e,t-1)&&!fn(e,t-2)&&(e=e.slice(0,-1)),"/"===e[0]?e:`/${e}`}(e(t,n,r)))),n=t.map(dn),i=new Set(t).add("");for(const e of n)i.has(e)||(i.add(e),t.push(e),n.push(dn(e)),f.push(sn));p=(e,n)=>t[n],h=(e,t)=>n[t]}for(a=0,i=f.length;a<i;++a)o=f[a],u=f[a]=new rn(o),null!=(c=p(o,a,r))&&(c+="")&&(d=u.id=c,m.set(d,m.has(d)?ln:u)),null!=(c=h(o,a,r))&&(c+="")&&(u.parent=c);for(a=0;a<i;++a)if(c=(u=f[a]).parent){if(!(s=m.get(c)))throw new Error("missing: "+c);if(s===ln)throw new Error("ambiguous: "+c);s.children?s.children.push(u):s.children=[u],u.parent=s}else{if(l)throw new Error("multiple roots");l=u}if(!l)throw new Error("no root");if(null!=e){for(;l.data===sn&&1===l.children.length;)l=l.children[0],--i;for(let e=f.length-1;e>=0&&(u=f[e]).data===sn;--e)u.data=null}if(l.parent=an,l.eachBefore((function(e){e.depth=e.parent.depth+1,--i})).eachBefore(nn),l.parent=null,i>0)throw new Error("cycle");return l}return r.id=function(e){return arguments.length?(t=on(e),r):t},r.parentId=function(e){return arguments.length?(n=on(e),r):n},r.path=function(t){return arguments.length?(e=on(t),r):e},r}().id((e=>e.__id)).parentId((e=>e.__parent))(s)}const Cn=e=>{let{propsArr:t,props:n,cube:r,cache:i,itemDepthObject:o,f:a}=e;for(let e=0;e<t.length;e++){const i=n[t[e]],l=i.fields?i.fields:[i];for(let e=0;e<l.length;e++){const t=l[e];if(t.field!==a){const e=qn(o,wn(t.field,{cube:r}));t.accessor=e.nodeFn,t.valueAccessor=e.valueFn,t.attrAccessor=e.attrFn}}}};function In(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;const i=t.raw(),o=t.key(),a="S"===i.qMode?Mn(t):kn(i,n,e);if(!a)return null;const l=a.height,s=[];for(let o=0;o<=l;o++){let a=null;if(o>0)if("S"===i.qMode){let e=xn(i)[o-1];a=n.fields[e]}else{let e=i.qEffectiveInterColumnSortOrder[o-1];o>i.qEffectiveInterColumnSortOrder.length&&(e=i.qDimensionInfo.length),a=n.fields[e]}const{props:l,main:u}=r.normalizeConfig(zt(zt({},e),{},{field:a?a.key():void 0}),t),c=Object.keys(l);s[o]={propsArr:c,props:l,main:u};const d=a?wn(a,{cube:i}):{fieldDepth:0};Cn({propsArr:c,props:l,cube:i,cache:n,itemDepthObject:d,f:a})}const u=a.copy().descendants(),c=a.descendants();for(let e=0;e<c.length;e++){const t=s[c[e].depth].propsArr,n=s[c[e].depth].props,r=s[c[e].depth].main,i=u[e],a=i.data,l=Dn(r,a,{key:o});Sn({propsArr:t,props:n,item:i,itemData:a,ret:l,sourceKey:o}),c[e].data=l}return a}function En(e,t,n,r){const i=Array.isArray(e)?e:[e];let o=[];for(let a=0;a<i.length;a++)if(void 0!==i[a].field){const l=t.raw(),s=t.key();if(!kn(l,n,e))continue;const u="object"==typeof i[a].field?i[a].field:t.field(i[a].field),{props:c,main:d}=r.normalizeConfig(i[a],t),f=Object.keys(c),p=wn(u,{cube:l}),{nodeFn:h,attrFn:m,valueFn:g}=qn({fieldDepth:0},p);Cn({propsArr:f,props:c,cube:l,cache:n,itemDepthObject:p,f:u});const v=!!i[a].trackBy,y=typeof i[a].trackBy,b={},x=[],w=h(n.tree),q=[];for(let e=0;e<w.length;e++){const t=w[e],n=m?m(g(t)):g(t);if(d.filter&&!d.filter(n))continue;const o=Dn(d,n,{key:s});Sn({propsArr:f,props:c,item:t,itemData:n,ret:o,sourceKey:s}),v&&r.track({cfg:i[a],itemData:n,obj:o,target:x,tracker:b,trackType:y}),q.push(o)}const D=v?r.collect(x,{main:d,propsArr:f,props:c}):q;o=[...o,...D]}return o}var Nn,On,Ln=(Nn=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 n,r,i,o,a,l,s,u,c,f,d=e.length,h=e.search(/[0-9\-\+#]/),p=h>0?e.substring(0,h):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),v=d-g,y=e.substring(v,v+1),b=v+("."===y||","===y?1:0),x=g>0?e.substring(b,d):"";if(n=(t="-"===(e=e.substring(h,b)).charAt(0)?-t:+t)<0?t=-t:0,i=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",o=r&&r[1]&&r[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",l=e[1]&&e[1].lastIndexOf("0"),(!(u=t.split("."))[1]||u[1]&&u[1].length<=l)&&(t=(+t).toFixed(l+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],s=c[1]&&c[c.length-1].length){for(m="",v=(f=t[0]).length%s,d=f.length,b=0;b<d;b++)m+=f.charAt(b),!((b-v+1)%s)&&b<d-s&&(m+=o);t[0]=m}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),p+(n?"-":"")+r+x}},Ln(Pn={exports:{}}),Pn.exports);function jn(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}const zn={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"},An=/%\)?$/,Fn=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,$n=/^\(oct\)/i,Hn=/^\(dec\)/i,Un=/^\(hex\)/i,_n=/^\(bin\)/i,Bn=/^\(rom\)/i,Vn=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,Wn=/#|0/g;function Yn(e,t,n,r){return e=e.toString(t),n[1]===n[1].toUpperCase()&&(e=e.toUpperCase()),e.length-e.indexOf(".")>10&&(e=e.slice(0,e.indexOf(".")+11)),e.replace(".",r||".")}function Kn(e,t,n){const r=jn(e);return n?r:new RegExp(r||"",t)}function Jn(e,t,n,r){let i,o,a,l,s,u,c,f,d,h=e.pattern;var p,m;r&&(e.abbreviate=!0),p=t,(m=n)&&(m=jn(m)),p&&(p=jn(p)),d=new RegExp("(?:[#0]+".concat(p,")?[#0]+(?:").concat(m,"[#0]+)?")),a=h.match(d),a=a?a[0]:"",l=a?h.substr(0,h.indexOf(a)):h,s=a?h.substring(h.indexOf(a)+a.length):"",a||(a=h?"#":"##########"),t&&t===n&&(i=a.split(n),o=i.pop(),a=i.join("")+n+o,t=""),u=t,t=/,/.test(n)?"¤":",",u&&(a=a.replace(Kn(u,"g"),t)),c=n,n=".",c&&(a=a.replace(Kn(c,"g"),n)),f=a.match(/#/g),f=f?f.length:0;const g=h.split(c);let v;g[1]&&(v=g[1].match(Wn)),e.prefix=l||"",e.postfix=s||"",e.pattern=h,e.maxPrecision=v?v.length:2,e.percentage=An.test(h),e.numericPattern=a||"",e.numericRegex=new RegExp("".concat(Kn(t,null,!0),"|").concat(Kn(n,null,!0)),"g"),e.groupTemp=u,e.decTemp=c,e.t=t,e.d=n,e.temp=f}class Zn{constructor(e,t,n,r,i){this.localeInfo=e,this.pattern=t,this.thousandDelimiter=n||",",this.decimalDelimiter=r||".",this.type=i||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return zn;const n={};return e.qNumericalAbbreviation.split(t).forEach((e=>{let t=e.split(":");2===t.length&&(n[t[0]]=t[1])})),n}(e,this.patternSeparator),this.prepare()}clone(){const e=new Zn(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return e.subtype=this.subtype,e}format(e,t,n,r){return this.prepare(t,n,r),this.formatValue(e)}prepare(e,t,n){let r;if(void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),!e)return void(this._prepared={pattern:!1});this._prepared={positive:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},r=this._prepared,e=e.split(this.patternSeparator),r.positive.pattern=e[0],r.negative.pattern=e[1],r.zero.pattern=e[2],Vn.test(e[0])&&(r.positive.isFunctional=!0),e[1]?Vn.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?Vn.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1;const i="U"===this.type;r.positive.isFunctional||Jn(r.positive,t,n,i),r.negative&&!r.negative.isFunctional&&Jn(r.negative,t,n,i),r.zero&&!r.zero.isFunctional&&Jn(r.zero,t,n,i)}formatValue(e){let t,n,r,i,o,a,l,s,u,c=this._prepared,f="",d="",h=e;if(isNaN(e))return"".concat(h);if(e=+e,!1===c.pattern)return e.toString();if(0===e&&c.zero)return c=c.zero,c.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,n){let r;return Fn.test(t)?e=Yn(e,Number(/\d{2}/.exec(t)[0]),t,n):$n.test(t)?e=Yn(e,8,t,n):Hn.test(t)?e=Yn(e,10,t,n):Un.test(t)?e=Yn(e,16,t,n):_n.test(t)?e=Yn(e,2,t,n):Bn.test(t)&&(r="",e<0&&(r="-",e=-e),0===(e=Math.floor(e))?e="0":e<=5e5?(e=function(e,t){let n,r="",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(),l=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();for(;i>0;)for(n=0;n<a.length;n++)if(a[n]<=i){r+=l[n],i-=a[n];break}for(n=0;n<o;n++)r="M".concat(r);return t[1]!==t[1].toUpperCase()&&(r=r.toLowerCase()),r}(e,t),e=r+e):e=t+r+e.toExponential(0)),e}(e,c.pattern,o);else{if(c.percentage&&(e*=100),c.abbreviate){const t=Object.keys(this.abbreviations).map((e=>parseInt(e,10))).sort(((e,t)=>e-t));let r,i,o=t[0];for(l=0,n=Number(Number(e).toExponential().split("e")[1]);o<=n&&l<t.length;)l++,o=t[l];l>0&&(r=t[l-1]),r&&n>0&&r>0?i=r:(n<0&&r<0||!r)&&(o<0&&o-n<=c.maxPrecision?i=o:r<=n&&!(o>0&&-n<=c.maxPrecision)&&(i=r)),i&&(f=this.abbreviations[i],e/=10**i)}if(r=Math.abs(e),t=c.temp,s=c.numericPattern,u=s.split(o)[1],"I"===this.type&&(e=Math.round(e)),i=e,u||"#"!==s.slice(-1)[0])if(r>=1e15||r>0&&r<=1e-14)e=r?r.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{const t=Number((e+1e-15*(e<0?-1:1)).toFixed(Math.min(20,u?u.length:0)).split(".")[0]);let n=s.split(o)[0];if(n+=o,e=Rn(n,t)||"0",u){const t=Math.max(0,Math.min(14,u.length)),n=u.replace(/#+$/,"").length;let i=("I"===this.type?0:r%1+1e-15).toFixed(t).slice(2).replace(/0+$/,"");for(l=i.length;l<n;l++)i+="0";i&&(e+=o+i)}else 0===t&&(i=0)}else if(r>=10**t||r<1||r<1e-4)0===e?e="0":r<1e-4||r>=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(s+=o,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(r)/Math.log(10)))),l=0;l<t;l++)s+="#";e=Rn(s,e)}e=e.replace(c.numericRegex,(e=>e===a?c.groupTemp:e===o?c.decTemp:"")),i<0&&!/^-/.test(e)&&(e="-".concat(e))}return c.prefix+e+d+f+c.postfix}static getStaticFormatter(){return{prepare(){},formatValue:e=>"".concat(e)}}}function Gn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{size:n=5e3,multipleArguments:r=!1,toKey:i=(e=>e)}=t;let o,a,l=Object.create(null),s=Object.create(null),u=0,c=0;return o=r?function(){return a=i(...arguments),o.has(a)?o.get(a):o.set(a,e(...arguments))}:t=>(a=i(t),o.has(a)?o.get(a):o.set(a,e(t))),o.set=(e,t)=>(u>=n&&(delete l[s[c]],delete s[c],u--,c++),l[e]=t,s[u]=e,u++,t),o.get=e=>l[e],o.has=e=>e in l,o.clear=()=>{l=Object.create(null),s=Object.create(null),u=0,c=0},o.size=()=>u,o}function Xn(e,t,n,r,i){const o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Zn(...t)}(i,e,t,n,r),a=Gn(o.formatValue.bind(o),{toKey:e=>isNaN(e)?e:+e});function l(e){return a(e)}return l.format=function(e,t,n,r){return a.clear(),o.format(t,e,n,r)},l.pattern=function(e){return e&&(a.clear(),o.pattern=e,o.prepare()),o.pattern},l}const Qn="IV",er=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],tr=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],nr=["January","February","March","April","May","June","July","August","September","October","November","December"],rr=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ir(e,t){for(let n=e.length;n<t;n++)e="0".concat(e);return e}function or(e){let t=e.toString().split(".");return t[1]?(t=Number("0.".concat(t[1])),t):0}class ar{constructor(e,t,n){const r=e||{};r.qCalendarStrings||(r.qCalendarStrings={qLongDayNames:er,qDayNames:tr,qLongMonthNames:nr,qMonthNames:rr}),this.localeInfo=r,this.locale_days=r.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=r.qCalendarStrings.qDayNames.slice(),this.locale_months=r.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=r.qCalendarStrings.qMonthNames.slice(),t||(t={T:r.qTimeFmt||"hh:mm:ss",D:r.qDateFmt||"YYYY-MM-DD",TS:r.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"}[n]),this.pattern=t}clone(){const e=new ar(this.localeInfo,this.pattern);return e.subtype=this.subtype,e}format(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");const n=/t+/gi.test(t);let r;e instanceof Date?r=function(e,t){let n=e.getUTCHours(),r=e.getUTCDay()-1;return t&&(n%=12,n||(n=12)),r<0&&(r=6),{year:e.getUTCFullYear(),month:e.getUTCMonth(),day:r,date:e.getUTCDate(),h:n,m:e.getUTCMinutes(),s:e.getUTCSeconds(),f:e.getUTCMilliseconds(),t:e.getUTCHours()>=12?"pm":"am"}}(e,n):(e<0&&(e=-e,t="-".concat(t)),r=function(e,t){let n,r=function(e){const t=e,n=24*or(t),r=60*or(n),i=60*or(r),o=1e3*or(i);return{d:Math.floor(t),h:Math.floor(n),m:Math.floor(r),s:Math.floor(i),f:Math.round(o)}}(e),i=r.d,o=r.h,a=r.m,l=r.s,s=r.f,u=0;/w+|t+/gi.test(t)&&(n=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(86400*(e-Math.floor(e))))),isNaN(n.getTime())&&(n=null)),/D+/gi.test(t)||(o+=24*i),/h+/gi.test(t)||(a+=60*o),/m+/gi.test(t)||(l+=60*a),/w+/gi.test(t)&&(u=n?n.getDay()-1:0,u<0&&(u=6));let c="";return n&&(c=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:u,date:i,h:o,m:a,s:l,f:s,t:c}}(e,t));const i=(o=this,a=r,{"Y+|y+":{Y:"".concat(Number("".concat(a.year).slice(-2))),YY:ir("".concat(a.year).slice(-2),2),YYY:ir("".concat(a.year).slice(-3),3),def:e=>ir("".concat(a.year),e.length)},"M+":{M:a.month+1,MM:ir("".concat(a.month+1),2),MMM:o.locale_months_abbr[a.month],def:o.locale_months[a.month]},"W+|w+":{W:a.day,WW:ir("".concat(a.day),2),WWW:o.locale_days_abbr[a.day],def:o.locale_days[a.day]},"D+|d+":{D:a.date,def:e=>ir("".concat(a.date),e.length)},"h+|H+":{h:a.h,def:e=>ir("".concat(a.h),e.length)},"m+":{m:a.m,def:e=>ir("".concat(a.m),e.length)},"s+|S+":{s:a.s,def:e=>ir("".concat(a.s),e.length)},"f+|F+":{def(e){let t="".concat(a.f),n=e.length-t.length;if(n>0)for(let e=0;e<n;e++)t+="0";else n<0&&(t=t.slice(0,e.length));return t}},"t{1,2}|T{1,2}":{def(e){let t=a.t;return e[0].toUpperCase()===e[0]&&(t=t.toUpperCase()),t=t.slice(0,e.length),t}}});var o,a;const l=[];for(const e in i)Object.prototype.hasOwnProperty.call(i,e)&&l.push(e);const s=new RegExp(l.join("|"),"g");return t.replace(s,(e=>{let t,n,r;for(n in i)if(Object.prototype.hasOwnProperty.call(i,n)&&(t=new RegExp(n),t.test(e)))break;if(!t)return"";for(const t in i[n])if(t===e||t.toLowerCase()===e){r=i[n][t],void 0===r&&(r=i[n][t.toLowerCase()]);break}return void 0===r&&(r=i[n].def),"function"==typeof r&&(r=r(e)),r}))}}function lr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new ar(...t)}function sr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=lr(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,e,t),r=Gn(n.format.bind(n),{toKey:e=>"object"==typeof e&&"function"==typeof e.getTime?e.getTime():e});function i(e){return t!==Qn?function(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}(e):e}function o(e){return e=i(e),r(e)}return o.format=function(e,t){return r.clear(),t=i(t),n.format(t,e)},o.locale=function(i){return n=lr(i,e,t),r=Gn(n.format.bind(n),{toKey:e=>"object"==typeof e?e.getTime():e}),this},o.qtype=function(e){return void 0!==e&&(t=e,r.clear()),t},o}function ur(){let e,{meta:t,id:n,key:r,localeInfo:i,fieldExtractor:o,value:a,type:l,sourceField:s}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const u=a||("dimension"===l?e=>null==e?void 0:e.qElemNo:e=>null==e?void 0:e.qValue),c="dimension"===l?"first":"avg",f=function(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return sr(e.qNumFormat.qFmt,e.qNumFormat.qType,t);let n="#",r=t&&void 0!==t.qThousandSep?t.qThousandSep:",",i=t&&void 0!==t.qDecimalSep?t.qDecimalSep:".",o="U",a=e&&!!e.qIsAutoFormat;return e&&e.qNumFormat?(n=e.qNumFormat.qFmt||n,r=e.qNumFormat.qThou||r,i=e.qNumFormat.qDec||i,o=e.qNumFormat.qType||o,a=a&&-1===["M"].indexOf(e.qNumFormat.qType)):a=!0,(a||"U"===o)&&(n="#".concat(i,"##"),o="U"),Xn(n,r,i,o,t)}(t,i),d="dimension"===l?"first":(e,t)=>f(t),h={id:()=>n,key:()=>r,raw:()=>t,title:()=>t.qFallbackTitle||t.label,type:()=>l,origin:()=>s,items:()=>(e||(e=o(h)),e),min:()=>t.qMin,max:()=>t.qMax,value:u,label:e=>(null==e?void 0:e.qText)||"",reduce:c,reduceLabel:d,formatter:()=>f,tags:()=>t.qTags};return h}function cr(e,t,n,r,i){return(t[e]||[]).map(((t,o)=>{const a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(o),l={instance:ur(Jt({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},i))};return l.attrDims=cr("qAttrDimInfo",t,n,a,Jt({},i,{value:e=>null==e?void 0:e.qElemNo,type:"dimension"})),l.attrExps=cr("qAttrExprInfo",t,n,a,Jt({},i,{value:e=>null==e?void 0:e.qNum,type:"measure"})),l.measures=cr("qMeasureInfo",t,n,a,Jt({},i,{value:e=>null==e?void 0:e.qValue,type:"measure"})),l}))}function fr(){let{key:e,data:t,config:n={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},i=t;if(!i)throw new Error('Missing "data" input');if(!i.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');const o=fr.util,a={cache:r,cube:i,localeInfo:n.localeInfo,fieldExtractor:null,pages:null,hierarchy:()=>null,virtualFields:n.virtualFields},l={key:()=>e,raw:()=>i,field:e=>function(e,t){let{cache:n}=t;if("number"==typeof e)return n.fields[e];const r=n.allFields;if("function"==typeof e){for(let t=0;t<r.length;t++)if(e(r[t]))return r[t];return!1}if("string"==typeof e){for(let t=0;t<r.length;t++)if(r[t].key()===e||r[t].title()===e)return r[t]}else if(e&&-1!==r.indexOf(e))return e;throw Error("Field not found: ".concat(e))}(e,a),fields:()=>r.fields.slice(),extract:e=>a.extractor(e,l,r,o),hierarchy:e=>a.hierarchy(e,l,r,o),_cache:()=>r};"K"===i.qMode||"T"===i.qMode||!i.qMode&&i.qNodesOnDim?(a.extractor=On,a.hierarchy=En,a.pages="K"===i.qMode?i.qStackedDataPages:i.qTreeDataPages):"S"===i.qMode?(a.extractor=Qt,a.pages=i.qDataPages,a.hierarchy=En):a.extractor=()=>[],a.fieldExtractor=e=>a.extractor({field:e},l,r,o);const s="S"===i.qMode?e=>e.qElemNumber:void 0,u="S"===i.qMode?e=>e.qNum:void 0;r.wrappedFields.push(...cr("qDimensionInfo",i,e,"",Jt({},a,{value:s,type:"dimension"}))),r.wrappedFields.push(...cr("qMeasureInfo",i,e,"",Jt({},a,{value:u,type:"measure"}))),r.fields=r.wrappedFields.map((e=>e.instance));const c=e=>{e.forEach((e=>{r.allFields.push(e.instance),c(e.measures),c(e.attrDims),c(e.attrExps)}))};return c(r.wrappedFields),(n.virtualFields||[]).forEach((t=>{const n=l.field(t.from),i=ur($t({meta:n.raw(),id:"".concat(e,"/").concat(t.key),sourceField:n,fieldExtractor:e=>a.extractor({field:e},l,r,o),key:t.key,type:n.type(),localeInfo:a.localeInfo,value:n.value},t.override||{}));r.virtualFields.push(i)})),r.allFields.push(...r.virtualFields),l}const dr=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],hr=/\/qDimensionInfo(?:\/(\d+))?/,pr=/\/qMeasureInfo\/(\d+)/,mr=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,gr=/\/qAttrExprInfo\/(\d+)/,vr=/\/?qHyperCube/,yr=/\/?qTreeData/,br=e=>"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14)),xr=e=>"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13));function wr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r=t.byCells,i=t.primarySource,o=[],a={},l=e.isActive();let s=!1;return e.brushes().forEach((e=>{const t=function(e,t){let n=e,r=-1,i=-1,o="",a=e=>e;vr.test(e)?(o="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=br):yr.test(e)&&(o="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=xr);let l=!0;if(hr.test(e)&&(r=+hr.exec(e)[1]),pr.test(e)&&(i=+pr.exec(e)[1]),mr.test(e)){i=-1,r=0;const e=+mr.exec(n)[2];isNaN(e)||(r=e,n=n.replace(/\/\d+$/,"")),l=!1}if(gr.test(e)){const e=i;if(t){i=0;const a=gn(o,t);i+=(a.qMeasureInfo||[]).length,r>-1?(i=a.qDimensionInfo.slice(0,r).reduce(((e,t)=>e+t.qAttrExprInfo.length),i),r=-1):(i=a.qDimensionInfo.reduce(((e,t)=>e+t.qAttrExprInfo.length),i),i=a.qMeasureInfo.slice(0,e).reduce(((e,t)=>e+t.qAttrExprInfo.length),i)),i+=+gr.exec(n)[1]}else r>-1?(r=-1,i=+gr.exec(n)[1]):i+=+gr.exec(n)[1]+1}return dr.forEach((e=>{let[t,r]=e;n=n.replace(t,r)})),l&&(n=a(n)),n&&"/"!==n[0]&&(n="/".concat(n)),{measureIdx:i,dimensionIdx:r,path:n}}(e.id,n);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(s=!0,a.multiRangeSelectTreeDataValues||(a.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),n.forEach((e=>a.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:t.measureIdx,qDimensionIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}}))))}else{if("range"===e.type&&t.measureIdx>-1){const n=e.brush.ranges();n.length&&(s=!0,a.rangeSelectHyperCubeValues||(a.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),n.forEach((e=>a.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}}))))}if("range"===e.type&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(s=!0,a.selectHyperCubeContinuousRange||(a.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),n.forEach((e=>a.selectHyperCubeContinuousRange.ranges.push({qDimIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!1}}))))}if("value"===e.type&&t.dimensionIdx>-1)if(r)if(n&&n.qHyperCube&&("P"===n.qHyperCube.qMode||"T"===n.qHyperCube.qMode||"K"===n.qHyperCube.qMode)){const r=n.qHyperCube,o=r.qNoOfLeftDims,l=r.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(a.selectPivotCells||(a.selectPivotCells={path:t.path,cells:[]}),e.id===i||!i){const n=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e)));(0===o||l>=o)&&o>-1?n.forEach((e=>{a.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:l-o})})):n.forEach((e=>{a.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})})),s=!!a.selectPivotCells.cells.length}}else a.selectHyperCubeCells||(a.selectHyperCubeCells={path:t.path,cols:[]}),a.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==i&&(i||a.selectHyperCubeCells.values)||(a.selectHyperCubeCells.values=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e))),s=!!a.selectHyperCubeCells.values.length);else{const n=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e)));s=!!n.length,o.push({params:[t.path,t.dimensionIdx,n,!1],method:"selectHyperCubeValues"})}}})),!s&&l?[{method:"resetMadeSelections",params:[]}]:(a.rangeSelectHyperCubeValues&&o.push({method:"rangeSelectHyperCubeValues",params:[a.rangeSelectHyperCubeValues.path,a.rangeSelectHyperCubeValues.ranges,[],null===(u=t.orMode)||void 0===u||u]}),a.selectHyperCubeContinuousRange&&o.push({method:"selectHyperCubeContinuousRange",params:[a.selectHyperCubeContinuousRange.path,a.selectHyperCubeContinuousRange.ranges]}),a.selectHyperCubeCells&&o.push({method:"selectHyperCubeCells",params:[a.selectHyperCubeCells.path,a.selectHyperCubeCells.values,a.selectHyperCubeCells.cols]}),a.selectPivotCells&&o.push({method:"selectPivotCells",params:[a.selectPivotCells.path,a.selectPivotCells.cells]}),a.multiRangeSelectTreeDataValues&&o.push({method:"multiRangeSelectTreeDataValues",params:[a.multiRangeSelectTreeDataValues.path,a.multiRangeSelectTreeDataValues.ranges]}),o);var u}function Dr(e){fr.util=e.data("matrix").util,e.data("q",fr),e.formatter("q-number",Xn),e.formatter("q-time",sr)}function Mr(e){var t=Pt(e.layout||{},e.path.split("/").join("."));if(!t)return!1;var n=t.qIsOneAndOnlyOne;return void 0!==n&&n}function qr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(null==e||!e.length)return!1;var t=e.filter((function(e){return"object"===F(e.data)&&Array.isArray(e.data.fields)})).every((function(e){return e.data.fields.every((function(e){var t=e.raw();return!(!t.qLocked&&t.qCardinal)}))}));return t}function kr(e){var t=e.brush,n=e.colorField,r=e.legendAlias,i=e.useLegendCube,o=void 0!==i&&i;!n||/qAttrDimInfo/.test(n)?(t.removeKeyAlias("attrDim/qDimensionInfo/0"),r&&t.removeKeyAlias(r),t.addKeyAlias("attrDim/qDimensionInfo/0","qHyperCube/".concat(n))):o&&t.addKeyAlias(r,"qHyperCube/".concat(n))}Dr.qBrushHelper=wr,Dr.selections=wr;var Sr="Shift";function Cr(e){var t=e.brush,n=e.getConfig;return{interceptor:function(e){var r=t.brushes(),i=n(),o=i.allowSimultaneous,a=i.layout,l=void 0===a?{}:a;r.forEach((function(n){var r,i,a;("range"===n.type||null!==(r=e[0])&&void 0!==r&&r.key&&(null===(i=e[0])||void 0===i?void 0:i.key)!==n.id&&0!==o.indexOf(null===(a=e[0])||void 0===a?void 0:a.key))&&t.clear([])}));var s=e.filter((function(e){return-2!==e.value}));if(s.length>1){var u=function(e){var t=e.layout,n=void 0===t?{}:t,r=e.values,i=void 0===r?[]:r;if(null==i||!i.length)return[];var o=Array.from(new Set(i.map((function(e){return e.key})))),a=[];return o.forEach((function(e){var t=Mr({layout:n,path:e}),r=i.filter((function(t){return t.key===e})),o=t?[r.pop()]:r;a.push.apply(a,A(o))})),a.filter(Boolean)}({layout:l,values:s});return u}return s},rangeInterceptor:function(e){var r=t.brushes(),i=n().allowSimultaneous;return r.filter((function(e){return"value"===e.type})).length?(t.clear([]),e):(r.forEach((function(n){var r=n.id===e[0].key||i.includes(n.id)&&i.includes(e[0].key);"range"!==n.type||r||t.clear([])})),e)}}}var Tr=function(e,t){return t[e]?Tr(e+1,t):e},Nr=function(e,t){var n=t.reduce((function(e,t){return e[t]=!0,e}),{});return e.reduce((function(e,t,r){var i=Tr(r,n);return n[i]=!0,e[r]=i,e}),{})};function Ir(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.layout,n=e.filtered,r=void 0===n?{}:n,i=(null==t?void 0:t.qHyperCube)||{},o=i.qDimensionInfo,a=void 0===o?[]:o,l=i.qMeasureInfo,s=void 0===l?[]:l;return{dimensions:Nr(a,r.dimensions||[]),measures:Nr(s,r.measures||[])}}var Er="selectHyperCubeValues",Or="selectHyperCubeContinuousRange";function Lr(e){var t=e.selection,n=e.fieldMap,r=t.method,i=t.params;if(r===Er){var o=n.dimensions[i[1]];void 0!==o&&(i[1]=o)}return r===Or&&i[1].forEach((function(e){var t=n.dimensions[e.qDimIx];void 0!==t&&(e.qDimIx=t)})),t}var Pr=[],Rr=0,jr=function(e){var t=Pr.filter((function(e){var t;return null===(t=e.selections)||void 0===t?void 0:t.isActive()}));t.length&&("Enter"===e.key?t.forEach((function(e){return e.selections.confirm()})):"Escape"!==e.key&&"Esc"!==e.key||t.forEach((function(e){return e.selections.cancel()})))},zr=function(){document.addEventListener("keyup",jr)},Ar=function(){document.removeEventListener("keyup",jr)},Fr=function(e,t){Object.keys(t).forEach((function(n){e.on(n,t[n])}))},$r=function(e,t){Object.keys(t).forEach((function(n){e.removeListener(n,t[n])}))};function Hr(e){var t=e.chart,n=e.document,r=e.selectionInfo,i=e.eventName,o=e.componentName,a=e.brushName,l=void 0===a?"selection":a,s=e.emit,u=void 0===s?"rangeClear":s,c=r.event===i,f=n.querySelector("[data-key='".concat(o,"-edge-0']"));if(c||!f)return!1;var d=t.component(o);return!!d&&(d.emit(u),"string"==typeof l&&t.brush(l).clear(),d)}var Ur=["chart","document","selections","selectionInfo"],_r=function(e){e.chart,e.document,e.selections,e.selectionInfo;var t=R(e,Ur);t.clearDiscrete(),t.clearContinuous(),t.clearMinor(),t.clearRange(),t.clearTap(),t.clearLegend()};function Br(e){var t,n=e.lasso;null!=n&&null!==(t=n.active)&&void 0!==t&&t.call(n)&&(null==n||n.action(!1))}function Vr(e){var t,n=e.chart,r=e.selectionInfo,i=e.selectionActions,o=e.actions,a=void 0===o?{}:o,l=e.selections,s=e.selectionEvents;if(!1===i||!1===s)return function(){};var u=i.reset,c=void 0===u?Br:u,f=i.clear,d=!1!==f&&function(e){var t=e.clear,n=void 0===t?_r:t,r=e.selections,i=e.selectionInfo,o=e.chart;return function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).cleared,t={selections:r,selectionInfo:i,chart:o,document:document,cleared:e};return n(P({clearDiscrete:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.eventName,o=void 0===i?"discreteRange":i,a=e.componentName,l=void 0===a?"discrete-range-brush":a,s=e.cleared;return Hr({selectionInfo:t,chart:n,document:r,eventName:void 0!==s&&s?void 0:o,componentName:l,emit:"areaClear",brushName:e.brushName})}(P(P({},t),e))},clearContinuous:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.eventName,o=void 0===i?"continuousRange":i,a=e.componentName,l=void 0===a?"continuous-range-brush":a,s=e.cleared;return Hr({selectionInfo:t,chart:n,document:r,eventName:void 0!==s&&s?void 0:o,componentName:l,brushName:e.brushName})}(P(P({},t),e))},clearMinor:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.componentName,o=void 0===i?"minor-range-brush":i,a=e.eventName,l=void 0===a?"minorRange":a,s=e.cleared,u=void 0!==s&&s,c=e.brushName,f=Hr({selectionInfo:t,chart:n,document:r,eventName:u?void 0:l,componentName:o,brushName:void 0!==c&&c});if(f){var d=f.settings.settings,h=d.scale,p=d.brush,m=n.scale(h).data().fields.map((function(e){return e.id()})),g=n.brush(p),v=g.brushes().filter((function(e){return"range"===e.type&&m.some((function(t){return t===e.id}))}));g&&v.length&&v.forEach((function(e){g.removeRanges(e.brush.ranges().map((function(t){return{key:e.id,range:t}})))}))}}(P(P({},t),e))},clearRange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.selections,o=e.eventName,a=void 0===o?"xAxis":o,l=e.cleared;Hr({selectionInfo:t,chart:n,document:r,eventName:void 0!==l&&l?void 0:a,componentName:"".concat(a,"-range-brush"),emit:"areaClear",brushName:!1})&&i.clear()}(P(P({},t),e))},clearTap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.chart,n=e.selectionInfo,r=e.selections,i=e.events,o=void 0===i?["tap"]:i,a=e.brushNames,l=void 0===a?[]:a;if(n&&o.includes(n.event)){var s=n.currentComponent;n.previousComponent!==s&&(r.clear(),l.forEach((function(e){return t.brush(e).end()})))}}(P(P({},t),e))},clearLegend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.selections,o=e.eventName,a=void 0===o?"legendRange":o,l=e.componentName,s=void 0===l?"legend-range-brush":l,u=e.cleared,c=void 0!==u&&u,f=e.brushName;Hr({selectionInfo:t,chart:n,document:r,eventName:c?void 0:a,componentName:s,brushName:void 0!==f&&f})&&i.clear()}(P(P({},t),e))}},t))}}({clear:f,selections:l,selectionInfo:r,chart:n}),h=function(e){var t=e.chart,n=e.actions,r=e.reset,i=e.clear,o=!1,a={deactivated:function(e){var t=(n||{}).lasso;r({e:e,lasso:void 0!==t&&t})},canceled:function(e){var o=(n||{}).lasso;r({e:e,lasso:void 0!==o&&o}),i({e:e,chart:t,document:document})},cleared:function(e){o||(o=!0,i({e:e,chart:t,document:document,cleared:!0}),o=!1)}};return!1===r&&delete a.deactivated,!1===i&&delete a.cleared,!1===r&&!1===i&&delete a.canceled,a}({chart:n,clear:d,reset:c,actions:a}),p={};Object.entries(h).forEach((function(e){var t=z(e,2),n=t[0],r=t[1];p[n]=function(e,t){return t?function(n){return t({event:n,defaultFunc:e})}:e}(r,s[n])}));var m=function(e){var t=e.selectionEvents,n=e.selections,r=e.selectionInfo,i=e.clear,o=e.chart,a=e.document,l=t.start,s={selections:n,selectionInfo:r,chart:o,document:a},u=function(e){return Object.assign(r,e||{})},c=function(e){var t=e.event,n=e.components;return function(){return function(e){var t=e.selectionInfo,n=e.clear,r=e.event,i=e.components,o=void 0===i?[]:i;(0,e.setSelectionInfo)(P(P({},void 0===t?{}:t),{},{event:r,components:o.map((function(e){return e.key})).filter(Boolean)})),n()}({event:t,components:n,clear:i,chart:o,selectionInfo:r,setSelectionInfo:u})}};return"function"==typeof l?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];l(P(P({defaultFunc:c({event:e,components:t}),setSelectionInfo:u,clear:i},s),{},{event:e,components:t}))}:function(e){c({event:e,components:arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]})()}}({selectionEvents:s,selections:l,selectionInfo:r,clear:d,chart:n,document:document});return null==a||null===(t=a.select)||void 0===t||t.on("start",m),Object.entries(p).forEach((function(e){var t=z(e,2),n=t[0],r=t[1];null==l||l.on(n,r)})),function(){var e;null==a||null===(e=a.select)||void 0===e||e.removeListener("start",m),Object.entries(p).forEach((function(e){var t=z(e,2),n=t[0],r=t[1];null==l||l.removeListener(n,r)}))}}var Wr=[{key:"qHyperCube/qDimensionInfo/0:numeric",includeMax:!1}];function Yr(e){var t=e.chart,n=e.actions,r=e.selections,i=e.picassoQ,o=e.config,a=o.allowSimultaneous,l=void 0!==a&&a,s=o.majorScale,u=void 0===s?void 0:s,c=o.selectionActions,f=void 0===c?{}:c,d=f.clear,h=f.reset,p=o.selectionEvents,m=void 0===p?{deactivated:void 0,canceled:void 0,cleared:void 0,start:void 0}:p,g=o.brushEvents,v=void 0===g?{}:g,y=o.brushName,b=void 0===y?"selection":y,x=o.brushMaxListeners,w=void 0===x?20:x,D=o.brushRanges,M=void 0!==D&&D,q=o.interceptors,k=void 0===q?{}:q,S=o.selectionsFn,C=void 0===S?i.selections:S,T=t.brush(b);if("number"==typeof w&&T.setMaxListeners(w),M){var N=!0===M?Wr:M;T.configure({ranges:N})}var I={canSelect:!0,getIsSelectionLocked:!1,isInnerDimensionLocked:!1,lockedDimensions:[],singleSelectIndex:0,selectionInfo:{colorField:void 0,components:[],event:void 0,currentComponent:void 0,previousComponent:void 0}},E=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.selections,r=t.brush,i=t.majorScale,o=t.actions,a=t.selectionsFn,l=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).path,s=void 0===l?"/qHyperCubeDef":l;if(!n)return{layout:function(){},filteredFields:function(){},allowSimultaneous:function(){},release:function(){}};var u=++Rr,c=null,f={dimensions:[],measures:[]},d=[],h={};n.on=n.on.bind(n),n.isActive=n.isActive.bind(n),n.addListener=n.addListener.bind(n),n.removeListener=n.removeListener.bind(n);var p=Cr({brush:r,getConfig:function(){return{layout:c,allowSimultaneous:d}}}),m=p.rangeInterceptor,g=p.interceptor;r.intercept("set-ranges",m),r.intercept("toggle-ranges",m),r.intercept("toggle-values",g),r.intercept("set-values",g),r.intercept("add-values",g),r.on("start",(function(){return n.begin(s)}));var v={activate:function(){},deactivated:function(){return r.end()},cleared:function(){return r.clear()},canceled:function(){return r.end()}};Fr(n,v);var y=null==i||null===(e=i.max)||void 0===e?void 0:e.call(i);return null!=o&&o.select?(o.select.on("start",(function(){var e;r.start(),"function"==typeof o.select.getBrushOptions&&(h=(e=o.select).getBrushOptions.apply(e,arguments))})),o.select.on("end",(function(){var e=a(r,h,c),t=Ir({layout:c,filtered:f});e.forEach((function(e){var r=Lr({selection:e,fieldMap:t});(function(e,t,n){if(t&&void 0!==n&&"selectHyperCubeContinuousRange"===e.method){var r=e.params;if(r&&r[1]&&r[1][0]){var i=r[1][0],o=i.qDimIx,a=i.qRange;"undefined"!==o&&a&&!1===a.qMaxInclEq&&a.qMax>=n&&(a.qMaxInclEq=!0)}}})(r,o.select.brushSelectionIncludeMax,y),n.select(r)}))}))):r.on("update",(function(){var e=a(r,h,c),t=Ir({layout:c,filtered:f});e.forEach((function(e){n.select(Lr({selection:e,fieldMap:t}))}))})),0===Pr.length&&zr(),Pr.push({key:u,selections:n}),{layout:function(e){c=e},filteredFields:function(e){f=e},allowSimultaneous:function(e){d=e},release:function(){c=null;var e=Pr.indexOf(Pr.filter((function(e){return e.key===u}))[0]);-1!==e&&Pr.splice(e,1),Pr.length||Ar(),$r(n,v)}}}({brush:T,majorScale:u,actions:n,selections:r,picassoQ:i,selectionsFn:C});!function(e){var t=e.brush,n=e.interceptors,r=void 0===n?{}:n;Object.entries(r).forEach((function(e){var n=z(e,2),r=n[0],i=n[1];(Array.isArray(i)?i:[i]).forEach((function(e){t.intercept(r,e)}))}))}({brush:T,interceptors:k});var O=function(e){var t=e.chart,n=e.selectionActions,r=e.brush,i=e.actions,o=e.selectionInfo,a=e.selections,l=e.selectionEvents,s=function(e){var t=e.brush,n=e.chart,r=e.selectionInfo,i=e.brushEvents,o=void 0===i?{}:i,a=Object.entries(o).map((function(e){var i=z(e,2),o=i[0],a=i[1],l=function(){return a({chart:n,selectionInfo:r})};return t.on(o,l),[o,l]}));return function(){a.forEach((function(e){var n=z(e,2),r=n[0],i=n[1];t.removeListener(r,i)}))}}({brush:r,chart:t,selectionInfo:o,brushEvents:e.brushEvents}),u=Vr({chart:t,selectionInfo:o,selectionActions:n,actions:i,selections:a,selectionEvents:l}),c=function(e){var t=e.actions;if(null==t||!t.lasso)return function(){};var n=!1,r=function(e){n||e.key!==Sr||(t.lasso.action(!0),n=!0)},i=function(e){e.key===Sr&&(t.lasso.action(!1),n=!1)};return document.addEventListener("keydown",r),document.addEventListener("keyup",i),function(){document.removeEventListener("keydown",r),document.removeEventListener("keyup",i)}}({actions:i});return function(){s(),u(),c()}}({chart:t,brush:T,actions:n,selections:r,selectionInfo:I.selectionInfo,selectionActions:{clear:d,reset:h},selectionEvents:m,brushEvents:v});if(l){var L=!0===l?A(Array(15)).map((function(e,t){return"qHyperCube/qMeasureInfo/".concat(t)})):l;E.allowSimultaneous(L)}return{unbindEvents:O,state:I,picassoSelections:E,brush:T}}var Kr=["colorField","useLegendCube"];function Jr(e){var t=e.chart,n=e.selections,r=e.actions,i=void 0!==r&&r,o=e.config,a=void 0===o?{}:o,l=Yr({chart:t,actions:i,selections:n,picassoQ:Dr,config:a}),s=l.unbindEvents,u=l.state,c=l.picassoSelections,f=l.brush,d=a.custom,h=void 0===d?{}:d,p=a.legendAlias,m=void 0===p?void 0:p,g=a.setBrushAliases,v=void 0===g?kr:g;return{getIsDimensionLocked:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return u.lockedDimensions[e]},getIsSelectionLocked:function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return null!==(e=null==n||null===(t=n.isLocked)||void 0===t?void 0:t.call(n))&&void 0!==e?e:qr(r)},getIsSingleSelect:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.singleSelectIndex;return u.singleSelectDimensions[e]},getCanSelect:function(){return u.canSelect},getSelectionsObject:function(){return n},getSelectionInfo:function(){return u.selectionInfo},setLayout:function(e){var t=function(e){var t,n,r,i=e.selections,o=e.picassoSelections,a=e.layout,l={lockedDimensions:[],singleSelectDimensions:[]};null!=i&&null!==(t=i.isModal)&&void 0!==t&&t.call(i)&&i.confirm(),o.layout(a);var s=(null!==(n=null==a?void 0:a.qHyperCube)&&void 0!==n?n:{}).qDimensionInfo,u=void 0===s?[]:s;return l.lockedDimensions=u.map((function(e){return!!e.qLocked})),l.singleSelectDimensions=u.map((function(e,t){return Mr({layout:a,path:"qHyperCube/qDimensionInfo/".concat(t)})})),l.singleSelectIndex=function(e){var t,n=((null==e?void 0:e.qHyperCube)||{}).qDimensionInfo,r=void 0===n?[]:n;return null!==(t=r.map((function(e,t){var n;return!(e.qLocked||(null===(n=e.qCardinalities)||void 0===n?void 0:n.qHypercubeCardinal)<=1)&&t})).filter((function(e){return"number"==typeof e}))[0])&&void 0!==t?t:Math.max(r.length-1,0)}(a),l.canSelect=0===u.length||u.some((function(e){return!e.qLocked})),l.dimensionLocked=!(null===(r=u[0])||void 0===r||!r.qLocked),l}({selections:n,picassoSelections:c,layout:e});Object.assign(u,t)},setFilteredFields:function(e){c.filteredFields(e)},setBrushAliases:function(e){var t=e.colorField,n=e.useLegendCube,r=void 0!==n&&n,i=R(e,Kr),o=P({useLegendCube:r,colorField:t,brush:f,legendAlias:m},i);v(P(P({},o),{},{defaultFunc:function(){return kr(o)}}))},destroy:function(){s(),c.release()},custom:P({},h)}}var Zr="'Source Sans Pro', 'Arial', 'sans-serif'",Gr="#333333",Xr="#595959",Qr="#737373",ei="#cccccc",ti="#e6e6e6";function ni(e){var t={};return[].concat(A(e),A([["","","color"],["object","","fontFamily"],["object","axis.label.name","color",Xr],["object","axis.label.name","fontFamily",Zr],["object","axis.label.name","fontSize","12px"],["object","axis.line.major","color",ei],["object","axis.line.minor","color",ti],["object","axis.title","color"],["object","axis.title","fontFamily",Zr],["object","axis.title","fontSize","13px"],["object","grid.line.highContrast","color",ti],["object","grid.line.major","color",ei],["object","grid.line.minor","color",ti],["object","label.value","color",Xr],["object","label.value","fontFamily",Zr],["object","label.value","fontSize","12px"],[!1,"label.value","darkColor",Xr],[!1,"label.value","lightColor",ti],["object","outOfRange","color","#999"],["object","legend.title","color",Gr],["object","legend.title","fontFamily",Zr],["object","legend.title","fontSize","15px"],["object","legend.label","color",Xr],["object","legend.label","fontFamily",Zr],["object","legend.label","fontSize","13px"],["object","referenceLine.label.name","color",Gr],["object","referenceLine.label.name","fontFamily",Zr],["object","referenceLine.label.name","fontSize","12px"],["object","referenceLine.outOfBounds","color",ti],["object","referenceLine.outOfBounds","fontFamily",Zr],["object","referenceLine.outOfBounds","fontSize","12px"],["object","referenceLine.outOfBounds","backgroundColor",Qr,function(e){return"transparent"===e?Qr:e}]])).reduce((function(e,n){var r="".concat(n[0],"-").concat(n[1],"-").concat(n[2],"}");return t[r]||(t[r]=!0,e.push(n)),e}),[]).sort((function(e,t){return(e[0].split?e[0].split(".").length:0)-(t[0].split?t[0].split(".").length:0)}))}var ri=function(e){return e};function ii(e){var t=e.theme,n=e.id,r=e.transform,i=e.extend,o=e.matrix,a={},l=r.reduce((function(e,t){var n=z(t,2),r=n[0],i=n[1];return e[r]=i,e}),{});return o.forEach((function(e){var r=z(e,5),i=r[0],o=r[1],s=r[2],u=r[3],c=r[4],f=void 0===c?function(e){return e}:c,d=function(e){var t=e.theme,n=e.base,r=e.path,i=e.attribute,o=e.defaultValue,a=void 0===o?void 0:o;if(!t||!1===n)return a;var l=t.getStyle(n,r,i);return void 0===l?a:l}({theme:t,base:"object"===i&&n?"".concat("object",".").concat(n):i,path:o,attribute:s,defaultValue:u}),h=(l["".concat(o,".").concat(s)]||ri)(f(d));jt(a,[o,s].filter(Boolean).join("."),h)})),i.forEach((function(e){var t=z(e,2),n=t[0],r=t[1];jt(a,n,r)})),a}function oi(e,t,n){const r=`${e}.fontFamily`,i=`${e}.fontSize`;return{fontFamilyItem:{component:"dropdown",ref:r,options:()=>t.getOptions(r),defaultValue:()=>t.getDefaultValue(r)},fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:i,options:()=>t.getOptions(i),defaultValue:()=>t.getDefaultValue(i)},fontColorItem:{component:"color-picker",width:!1,ref:`${e}.color`,defaultValue:()=>({color:n.getStyle("object.funnelChart",e,"color")})}}}}}function ai(e,t,n){const r=function(e){var t=e.theme,n=e.translator,r=e.config,i=void 0===r?{}:r,o=e.flags,a=function(e){var t=e.config,n=void 0===t?{}:t,r=n.id,i=n.paths;return{id:void 0===r?"object":"".concat("object",".").concat(r),paths:Array.isArray(i)?i:[]}}({config:i}),l=a.id,s=a.paths,u={};s.forEach((function(e){for(var r=e.split("."),i=u,a=0;a<r.length;a++){var s=r[a];a===r.length-1?i[s]=G({theme:t,translator:n,id:l,path:e,flags:o}):void 0===i[s]&&(i[s]={}),i=i[s]}}));var c=function(e){for(var t=e.split("."),n=u,r=0;r<t.length;r++){var i=t[r];if(void 0===n[i])throw new Error("font-resolver: Path '".concat(e,"' could not be resolved."));n=n[i]}return n};return u.getDefaultValue=function(e){return c(e).getDefaultValue()},u.getOptions=function(e){return c(e).getOptions()},u}({theme:e,translator:n,flags:t,config:{id:"funnelChart",paths:["axis.title","axis.label.name","label.value"]}});return{component:"styling-panel",show:!0,chartType:"funnelchart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.FunnelChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,useBackground:!0,items:{axisTitleSection:{component:"panel-section",label:"Dimension title",items:{dimensionTitleItems:{component:"items",ref:"components",key:"axis",items:oi("axis.title",r,e)}}},labelNameSection:{component:"panel-section",label:"Dimension value label",items:{dimensionTitleItems:{component:"items",ref:"components",key:"axis",items:oi("axis.label.name",r,e)}}},labelValueSection:{component:"panel-section",label:"Value Label",items:{labelItems:{component:"items",ref:"components",key:"label",items:{...oi("label.value",r,e),contrastColor:{component:"checkbox",type:"boolean",ref:"label.value.useContrastColor",translation:"properties.dataPoints.valuelabel.contrast",defaultValue:!0}}}}}}}}const li={uses:"sorting"},si=(e,t,n)=>{var r;const i=null==n||null===(r=n.sense)||void 0===r?void 0:r.theme;return{uses:"settings",items:{presentation:{type:"items",label:"Presentation",grouped:!0,items:{...(null==t?void 0:t.isEnabled("SENSECLIENT_IM_4897_VIZBUNDLE_STYLING"))&&{funnelStyling:ai(i,t,e)},funnelmode:{ref:"funnel.mode",label:"Funnel Mode",type:"string",component:"dropdown",options:[{value:"AREA",label:"Area"},{value:"HEIGHT",label:"Height"},{value:"WIDTH",label:"Width"},{value:"ORDER",label:"Ordering"}],defaultValue:"WIDTH"},dimensionTitle:{ref:"showDimensionTitle",type:"boolean",component:"switch",label:"Dimension title",defaultValue:!0,options:[{value:!0,label:"Auto"},{value:!1,label:"Off"}]},valuesAuto:{ref:"dataPoint.auto",type:"boolean",label:"Value labels",component:"switch",defaultValue:!0,options:[{value:!0,label:"Auto"},{value:!1,label:"Custom"}]},labelMode:{ref:"dataPoint.labelMode",type:"string",component:"dropdown",options:[{value:"none",label:"None"},{value:"share",label:"Share"},{value:"value",label:"Values"}],defaultValue:"share",show:e=>!e.dataPoint.auto}}},colorsAndLegend:{uses:"colorsAndLegend",translation:"Colors",items:{colors:{items:{colorByLabel:{show:!1},expressionLabel:{show:!1}}},legend:{show:!1}}}}}},ui={uses:"data",items:{dimensions:{uses:"dimensions",items:{others:{items:{suppressOther:{defaultValue:!0,show:!1}}}},disabledRef:""},measures:{uses:"measures",disabledRef:""}}};function ci({translator:e,flags:t,anything:n}){return{type:"items",component:"accordion",items:{data:ui,sorting:li,settings:si(e,t,n)}}}function fi(e){return{definition:ci(e),support:{export:!0,exportData:!0,snapshot:!0,viewData:!1},importProperties:null,exportProperties:null}}const di=[{path:"/qHyperCubeDef",dimensions:{min:1,max:1,description:()=>"Segments"},measures:{min:1,max:1,description(e){switch(e.funnel.mode){case"WIDTH":return"Width";case"AREA":return"Area";case"HEIGHT":return"Height";case"ORDER":return"Order";default:return""}},added(e,t){2===t.qHyperCubeDef.qInterColumnSortOrder.length&&1!==t.qHyperCubeDef.qInterColumnSortOrder[0]&&(t.qHyperCubeDef.qInterColumnSortOrder=[1,0])}}}];function hi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var pi,mi;var gi=function(){if(mi)return pi;mi=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},o=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,i=e.call(n,"constructor"),o=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!i&&!o)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return pi=function e(){var t,n,r,s,u,c,f=arguments[0],d=1,h=arguments.length,p=!1;for("boolean"==typeof f&&(p=f,f=arguments[1]||{},d=2),(null==f||"object"!=typeof f&&"function"!=typeof f)&&(f={});d<h;++d)if(null!=(t=arguments[d]))for(n in t)r=l(f,n),f!==(s=l(t,n))&&(p&&s&&(o(s)||(u=i(s)))?(u?(u=!1,c=r&&i(r)?r:[]):c=r&&o(r)?r:{},a(f,{name:n,newValue:e(p,c,s)})):void 0!==s&&a(f,{name:n,newValue:s}));return f},pi}(),vi=hi(gi),yi={dataRelatedPropertiesPaths:["qHyperCube.qGrandTotalRow","qHyperCube.qHasOtherValues","qHyperCube.qSize","qHyperCube.qDimensionInfo[].qAttrDimInfo","qHyperCube.qDimensionInfo[].qCardinalities","qHyperCube.qDimensionInfo[].qMax","qHyperCube.qDimensionInfo[].qMin","qHyperCube.qDimensionInfo[].qStateCounts","qHyperCube.qMeasureInfo[].qApprMaxGlyphCount","qHyperCube.qMeasureInfo[].qAttrExprInfo","qHyperCube.qMeasureInfo[].qMax","qHyperCube.qMeasureInfo[].qMin","qHyperCube.qMeasureInfo[].qTrendLines","qHyperCube.qTreeNodesOnDim","qSelectionInfo"]};function bi(e){const{qHyperCube:t,...n}=e,{qAxisData:r,qDataPages:i,qStackedDataPages:o,qTreeDataPages:a,...l}=t,s=vi(!0,{},{...n,qHyperCube:{...l,qAxisData:null,qDataPages:null,qStackedDataPages:null,qTreeDataPages:null}}),{dataRelatedPropertiesPaths:u}=yi;return u.forEach((e=>{const t=e.split("[");if(1===t.length)void 0!==Pt(s,e)&&jt(s,e,null);else{const e=t[0],n=t[1].split("].")[1];Pt(s,e,[]).forEach((e=>{void 0!==Pt(e,n)&&jt(e,n,null)}))}})),s}var xi={axes:{trackBy:function({isTime:e,isContinuous:t,isMeasure:n,isMajor:r}){return i=>{if(e||t||n){var o;if("line"===i.type)return null!==(o=i.tickValue)&&void 0!==o?o:"axis";if("text"===i.type)return`${i.tickValue} ${i.text}`;if("container"===i.type){const e=i.children.filter((e=>"text"===e.type)).map((e=>e.text));return`${i.data.value} ${e.join("")}`}return Math.random()}if(r){if("line"===i.type&&void 0===i.tickValue)return"axis";const e=i.transform&&i.transform.match(/rotate/gi)?"rotated":"horizontal";return`${i.data.group?`${i.data.group.value} `:""}${i.data.value} ${i.text} ${e}`}return Math.random()}},compensateForLayoutChanges:function({isMeasure:e,isTime:t,isContinuous:n,isHorizontal:r,dock:i}){return({currentNodes:o,currentRect:a,previousRect:l})=>{const s=a.x-l.x,u=a.y-l.y,c=a.width-l.width,f=a.height-l.height;e?("left"===i&&o.forEach((e=>{"line"===e.type?(e.x1+=c,e.x2+=c):"text"===e.type&&(e.x+=c)})),"left"!==i&&"right"!==i||o.forEach((e=>{var t;("line"===e.type&&(e.x1===e.x2?(e.y1=a.y,e.y2=e.y1+a.height):(Math.round(e.y1)<a.y||e.y1>a.y+a.height)&&(e.strokeWidth=0)),"text"===e.type)&&((e.y<a.y||e.y>a.y+a.height)&&(e.fontSize="1px","#"===(null===(t=e.fill)||void 0===t?void 0:t[0])&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`)))})),"top"!==i&&"bottom"!==i||o.forEach((e=>{var t;("line"===e.type&&(e.y1===e.y2?(e.x1=a.x,e.x2=e.x1+a.width):(Math.round(e.x1)<a.x||e.x1>a.x+a.width)&&(e.strokeWidth=0)),"text"===e.type)&&((e.x<a.x||e.x>a.x+a.width)&&(e.fontSize="1px","#"===(null===(t=e.fill)||void 0===t?void 0:t[0])&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`)))}))):t?o.forEach((e=>{"line"===e.type?e.y1===e.y2?e.x2+=c:e.x1===e.x2&&(e.x1-=s,e.x2-=s):"text"===e.type&&(e.x-=s)})):n||r?o.forEach((e=>{"line"===e.type&&e.y1===e.y2&&(e.x1+=s,e.x2+=s+c)})):o.forEach((e=>{"line"===e.type&&e.x1===e.x2&&(e.y1+=u,e.y2+=u+f)}))}}},bars:{trackBy:function(e){return e.data.typeIndex?`${e.data.value} ${e.data.typeIndex.value}`:e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:`${e.data.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach((e=>{e.children&&e.children.length>0&&e.children.forEach((e=>{void 0!==e.x&&void 0!==e.y?(e.x-=r,e.y-=i):e.transform=`translate(${-r}, ${-i})`}))}))}},barOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach((e=>{e.children&&e.children.length>0&&e.children.forEach((e=>{e.opacity=0}))}))}},labels:{trackBy:function(e){if("rect"===e.type)return"-3"===e.data?Math.random():`${e.type} ${e.data} ${e.rotation}`;const t=e.transform&&e.transform.match(/rotate/gi)?"rotated":"horizontal";return`${e.type} ${e.data} ${e.text} ${t}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach((e=>{e.transform&&e.transform.match(/rotate\(-90/gi)?(e.x+=i,e.y-=r):(e.x-=r,e.y-=i)}))},linkData:function(e){return e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:`${e.data.value}`}},lines:{trackBy:function(e){var t;return"line"===e.type?null!==(t=e.value)&&void 0!==t?t:Math.random():"path"===e.type?`${e.generatorType} ${e.layerObj.id} ${e.data.source.key}`:Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;e.forEach((e=>{if(void 0!==e.x1&&void 0!==e.y1)e.y1===e.y2?(e.x2=e.x1+t.width,e.y1-=i,e.y2-=i):e.x1===e.x2&&(e.y2=e.y1+t.height,e.x1-=r,e.x2-=r);else{const t="x"===e.major.p?r/e.major.size:i/e.major.size,n="y"===e.minor.p?i/e.minor.size:r/e.minor.size;e.points.forEach((e=>{e.modified||(e.major-=t,e.minor-=n,e.minor0-=n,e.modified=!0)}))}}))}},lineOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach((e=>{e.opacity=0}))}},markers:{trackBy:function(e){return e.data.line?`${e.data.line.value} ${e.data.major.value}`:`${e.data.major.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach((e=>{switch(e.type){case"circle":e.cx-=r,e.cy-=i;break;case"rect":e.x-=r,e.y-=i;break;case"path":e.transform=`translate(${-r}, ${-i})`}}))}},points:{trackBy:function(e){return e.data.line?`${e.data.line.value} ${e.data.major.value}`:`${e.data.major.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach((e=>{e.cx-=r,e.cy-=i}))}},refLineLabels:{trackBy:function(e){if(void 0!==e.value){if("rect"===e.type)return`${e.value}`;if("text"===e.type)return`${e.value} ${e.text}`}return Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y,o=t.width-n.width,a=t.height-n.height;let l=-r,s=-i;e.forEach((e=>{switch(e.dock){case"right":r>0&&(l=t.width);break;case"left":o<0&&(l=-n.width);break;case"top":a<0&&(s=-n.height);break;case"bottom":i>0&&(s=t.height)}switch(e.type){case"text":case"rect":e.x+=l,e.y+=s;break;case"circle":e.cx+=l,e.cy+=s;break;case"path":e.transform=`translate(${l}, ${s})`}}))}},shadowBars:{trackBy:function(){return Math.random()}},cacheProperties:function({viewCache:e,layout:t}){const n=bi(t);e.set("dataIndependentProperties",JSON.stringify(n))},propertiesHaveChanged:function({viewCache:e,layout:t}){const n=bi(t);return e.get("dataIndependentProperties")!==JSON.stringify(n)},nonUpdatingNode:{trackBy:function(){return Math.random()}}};function wi(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Di(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Mi(){}var qi=.7,ki=1/qi,Si="\\s*([+-]?\\d+)\\s*",Ci="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ti="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ni=/^#([0-9a-f]{3,8})$/,Ii=new RegExp(`^rgb\\(${Si},${Si},${Si}\\)$`),Ei=new RegExp(`^rgb\\(${Ti},${Ti},${Ti}\\)$`),Oi=new RegExp(`^rgba\\(${Si},${Si},${Si},${Ci}\\)$`),Li=new RegExp(`^rgba\\(${Ti},${Ti},${Ti},${Ci}\\)$`),Pi=new RegExp(`^hsl\\(${Ci},${Ti},${Ti}\\)$`),Ri=new RegExp(`^hsla\\(${Ci},${Ti},${Ti},${Ci}\\)$`),ji={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 zi(){return this.rgb().formatHex()}function Ai(){return this.rgb().formatRgb()}function Fi(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Ni.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?$i(t):3===n?new _i(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Hi(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Hi(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=Ii.exec(e))?new _i(t[1],t[2],t[3],1):(t=Ei.exec(e))?new _i(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Oi.exec(e))?Hi(t[1],t[2],t[3],t[4]):(t=Li.exec(e))?Hi(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Pi.exec(e))?Ji(t[1],t[2]/100,t[3]/100,1):(t=Ri.exec(e))?Ji(t[1],t[2]/100,t[3]/100,t[4]):ji.hasOwnProperty(e)?$i(ji[e]):"transparent"===e?new _i(NaN,NaN,NaN,0):null}function $i(e){return new _i(e>>16&255,e>>8&255,255&e,1)}function Hi(e,t,n,r){return r<=0&&(e=t=n=NaN),new _i(e,t,n,r)}function Ui(e){return e instanceof Mi||(e=Fi(e)),e?new _i((e=e.rgb()).r,e.g,e.b,e.opacity):new _i}function _i(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Bi(){return`#${Ki(this.r)}${Ki(this.g)}${Ki(this.b)}`}function Vi(){const e=Wi(this.opacity);return`${1===e?"rgb(":"rgba("}${Yi(this.r)}, ${Yi(this.g)}, ${Yi(this.b)}${1===e?")":`, ${e})`}`}function Wi(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Yi(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ki(e){return((e=Yi(e))<16?"0":"")+e.toString(16)}function Ji(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Gi(e,t,n,r)}function Zi(e){if(e instanceof Gi)return new Gi(e.h,e.s,e.l,e.opacity);if(e instanceof Mi||(e=Fi(e)),!e)return new Gi;if(e instanceof Gi)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,l=o-i,s=(o+i)/2;return l?(a=t===o?(n-r)/l+6*(n<r):n===o?(r-t)/l+2:(t-n)/l+4,l/=s<.5?o+i:2-o-i,a*=60):l=s>0&&s<1?0:a,new Gi(a,l,s,e.opacity)}function Gi(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Xi(e){return(e=(e||0)%360)<0?e+360:e}function Qi(e){return Math.max(0,Math.min(1,e||0))}function eo(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}wi(Mi,Fi,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:zi,formatHex:zi,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Zi(this).formatHsl()},formatRgb:Ai,toString:Ai}),wi(_i,(function(e,t,n,r){return 1===arguments.length?Ui(e):new _i(e,t,n,null==r?1:r)}),Di(Mi,{brighter(e){return e=null==e?ki:Math.pow(ki,e),new _i(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?qi:Math.pow(qi,e),new _i(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new _i(Yi(this.r),Yi(this.g),Yi(this.b),Wi(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:Bi,formatHex:Bi,formatHex8:function(){return`#${Ki(this.r)}${Ki(this.g)}${Ki(this.b)}${Ki(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Vi,toString:Vi})),wi(Gi,(function(e,t,n,r){return 1===arguments.length?Zi(e):new Gi(e,t,n,null==r?1:r)}),Di(Mi,{brighter(e){return e=null==e?ki:Math.pow(ki,e),new Gi(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?qi:Math.pow(qi,e),new Gi(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new _i(eo(e>=240?e-240:e+120,i,r),eo(e,i,r),eo(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Gi(Xi(this.h),Qi(this.s),Qi(this.l),Wi(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=Wi(this.opacity);return`${1===e?"hsl(":"hsla("}${Xi(this.h)}, ${100*Qi(this.s)}%, ${100*Qi(this.l)}%${1===e?")":`, ${e})`}`}}));const to=Math.PI/180,no=180/Math.PI,ro=.96422,io=1,oo=.82521,ao=4/29,lo=6/29,so=3*lo*lo,uo=lo*lo*lo;function co(e){if(e instanceof fo)return new fo(e.l,e.a,e.b,e.opacity);if(e instanceof yo)return bo(e);e instanceof _i||(e=Ui(e));var t,n,r=go(e.r),i=go(e.g),o=go(e.b),a=ho((.2225045*r+.7168786*i+.0606169*o)/io);return r===i&&i===o?t=n=a:(t=ho((.4360747*r+.3850649*i+.1430804*o)/ro),n=ho((.0139322*r+.0971045*i+.7141733*o)/oo)),new fo(116*a-16,500*(t-a),200*(a-n),e.opacity)}function fo(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function ho(e){return e>uo?Math.pow(e,1/3):e/so+ao}function po(e){return e>lo?e*e*e:so*(e-ao)}function mo(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function go(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function vo(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof yo)return new yo(e.h,e.c,e.l,e.opacity);if(e instanceof fo||(e=co(e)),0===e.a&&0===e.b)return new yo(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*no;return new yo(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new yo(e,t,n,null==r?1:r)}function yo(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function bo(e){if(isNaN(e.h))return new fo(e.l,0,0,e.opacity);var t=e.h*to;return new fo(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}wi(fo,(function(e,t,n,r){return 1===arguments.length?co(e):new fo(e,t,n,null==r?1:r)}),Di(Mi,{brighter(e){return new fo(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new fo(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new _i(mo(3.1338561*(t=ro*po(t))-1.6168667*(e=io*po(e))-.4906146*(n=oo*po(n))),mo(-.9787684*t+1.9161415*e+.033454*n),mo(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),wi(yo,vo,Di(Mi,{brighter(e){return new yo(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new yo(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return bo(this).rgb()}}));var xo,wo={isDark:function(e){return vo(e).l<70}};function Do(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}1===(xo=Do).length&&(xo=function(e){return function(t,n){return Do(e(t),n)}}(xo));var Mo="$";function qo(){}function ko(e,t){var n=new qo;if(e instanceof qo)e.each((function(e,t){n.set(t,e)}));else if(Array.isArray(e)){var r,i=-1,o=e.length;if(null==t)for(;++i<o;)n.set(i,e[i]);else for(;++i<o;)n.set(t(r=e[i],i,e),r)}else if(e)for(var a in e)n.set(a,e[a]);return n}function So(){}qo.prototype=ko.prototype={constructor:qo,has:function(e){return Mo+e in this},get:function(e){return this[Mo+e]},set:function(e,t){return this[Mo+e]=t,this},remove:function(e){var t=Mo+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===Mo&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===Mo&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===Mo&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===Mo&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===Mo&&++e;return e},empty:function(){for(var e in this)if(e[0]===Mo)return!1;return!0},each:function(e){for(var t in this)t[0]===Mo&&e(this[t],t.slice(1),this)}};var Co=ko.prototype;function To(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function No(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Io(){}So.prototype={constructor:So,has:Co.has,add:function(e){return this[Mo+(e+="")]=e,this},remove:Co.remove,clear:Co.clear,values:Co.keys,size:Co.size,empty:Co.empty,each:Co.each};var Eo=.7,Oo=1/Eo,Lo="\\s*([+-]?\\d+)\\s*",Po="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ro="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",jo=/^#([0-9a-f]{3})$/,zo=/^#([0-9a-f]{6})$/,Ao=new RegExp("^rgb\\("+[Lo,Lo,Lo]+"\\)$"),Fo=new RegExp("^rgb\\("+[Ro,Ro,Ro]+"\\)$"),$o=new RegExp("^rgba\\("+[Lo,Lo,Lo,Po]+"\\)$"),Ho=new RegExp("^rgba\\("+[Ro,Ro,Ro,Po]+"\\)$"),Uo=new RegExp("^hsl\\("+[Po,Ro,Ro]+"\\)$"),_o=new RegExp("^hsla\\("+[Po,Ro,Ro,Po]+"\\)$"),Bo={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 Vo(e){var t;return e=(e+"").trim().toLowerCase(),(t=jo.exec(e))?new Zo((t=parseInt(t[1],16))>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):(t=zo.exec(e))?Wo(parseInt(t[1],16)):(t=Ao.exec(e))?new Zo(t[1],t[2],t[3],1):(t=Fo.exec(e))?new Zo(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=$o.exec(e))?Yo(t[1],t[2],t[3],t[4]):(t=Ho.exec(e))?Yo(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Uo.exec(e))?Xo(t[1],t[2]/100,t[3]/100,1):(t=_o.exec(e))?Xo(t[1],t[2]/100,t[3]/100,t[4]):Bo.hasOwnProperty(e)?Wo(Bo[e]):"transparent"===e?new Zo(NaN,NaN,NaN,0):null}function Wo(e){return new Zo(e>>16&255,e>>8&255,255&e,1)}function Yo(e,t,n,r){return r<=0&&(e=t=n=NaN),new Zo(e,t,n,r)}function Ko(e){return e instanceof Io||(e=Vo(e)),e?new Zo((e=e.rgb()).r,e.g,e.b,e.opacity):new Zo}function Jo(e,t,n,r){return 1===arguments.length?Ko(e):new Zo(e,t,n,null==r?1:r)}function Zo(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Go(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Xo(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Qo(e,t,n,r)}function Qo(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function ea(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}To(Io,Vo,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),To(Zo,Jo,No(Io,{brighter:function(e){return e=null==e?Oo:Math.pow(Oo,e),new Zo(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?Eo:Math.pow(Eo,e),new Zo(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+Go(this.r)+Go(this.g)+Go(this.b)},toString:function(){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+")")}})),To(Qo,(function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof Qo)return new Qo(e.h,e.s,e.l,e.opacity);if(e instanceof Io||(e=Vo(e)),!e)return new Qo;if(e instanceof Qo)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,l=o-i,s=(o+i)/2;return l?(a=t===o?(n-r)/l+6*(n<r):n===o?(r-t)/l+2:(t-n)/l+4,l/=s<.5?o+i:2-o-i,a*=60):l=s>0&&s<1?0:a,new Qo(a,l,s,e.opacity)}(e):new Qo(e,t,n,null==r?1:r)}),No(Io,{brighter:function(e){return e=null==e?Oo:Math.pow(Oo,e),new Qo(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?Eo:Math.pow(Eo,e),new Qo(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,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Zo(ea(e>=240?e-240:e+120,i,r),ea(e,i,r),ea(e<120?e+240:e-120,i,r),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}}));var ta=Math.PI/180,na=180/Math.PI,ra=.96422,ia=1,oa=.82521,aa=4/29,la=6/29,sa=3*la*la,ua=la*la*la;function ca(e){if(e instanceof fa)return new fa(e.l,e.a,e.b,e.opacity);if(e instanceof ga){if(isNaN(e.h))return new fa(e.l,0,0,e.opacity);var t=e.h*ta;return new fa(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}e instanceof Zo||(e=Ko(e));var n,r,i=ma(e.r),o=ma(e.g),a=ma(e.b),l=da((.2225045*i+.7168786*o+.0606169*a)/ia);return i===o&&o===a?n=r=l:(n=da((.4360747*i+.3850649*o+.1430804*a)/ra),r=da((.0139322*i+.0971045*o+.7141733*a)/oa)),new fa(116*l-16,500*(n-l),200*(l-r),e.opacity)}function fa(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function da(e){return e>ua?Math.pow(e,1/3):e/sa+aa}function ha(e){return e>la?e*e*e:sa*(e-aa)}function pa(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function ma(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function ga(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}To(fa,(function(e,t,n,r){return 1===arguments.length?ca(e):new fa(e,t,n,null==r?1:r)}),No(Io,{brighter:function(e){return new fa(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new fa(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new Zo(pa(3.1338561*(t=ra*ha(t))-1.6168667*(e=ia*ha(e))-.4906146*(n=oa*ha(n))),pa(-.9787684*t+1.9161415*e+.033454*n),pa(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),To(ga,(function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof ga)return new ga(e.h,e.c,e.l,e.opacity);if(e instanceof fa||(e=ca(e)),0===e.a&&0===e.b)return new ga(NaN,0,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*na;return new ga(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new ga(e,t,n,null==r?1:r)}),No(Io,{brighter:function(e){return new ga(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new ga(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return ca(this).rgb()}}));var va=-.14861,ya=1.78277,ba=-.29227,xa=-.90649,wa=1.97294,Da=wa*xa,Ma=wa*ya,qa=ya*ba-xa*va;function ka(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof Sa)return new Sa(e.h,e.s,e.l,e.opacity);e instanceof Zo||(e=Ko(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(qa*r+Da*t-Ma*n)/(qa+Da-Ma),o=r-i,a=(wa*(n-i)-ba*o)/xa,l=Math.sqrt(a*a+o*o)/(wa*i*(1-i)),s=l?Math.atan2(a,o)*na-120:NaN;return new Sa(s<0?s+360:s,l,i,e.opacity)}(e):new Sa(e,t,n,null==r?1:r)}function Sa(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Ca(e){return function(){return e}}function Ta(e,t){return function(n){return e+n*t}}function Na(e){return 1==(e=+e)?Ia:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):Ca(isNaN(t)?n:t)}}function Ia(e,t){var n=t-e;return n?Ta(e,n):Ca(isNaN(e)?t:e)}function Ea(e){return function t(n){function r(t,r){var i=e((t=ka(t)).h,(r=ka(r)).h),o=Ia(t.s,r.s),a=Ia(t.l,r.l),l=Ia(t.opacity,r.opacity);return function(e){return t.h=i(e),t.s=o(e),t.l=a(Math.pow(e,n)),t.opacity=l(e),t+""}}return n=+n,r.gamma=t,r}(1)}function Oa(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}To(Sa,ka,No(Io,{brighter:function(e){return e=null==e?Oo:Math.pow(Oo,e),new Sa(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?Eo:Math.pow(Eo,e),new Sa(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*ta,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new Zo(255*(t+n*(va*r+ya*i)),255*(t+n*(ba*r+xa*i)),255*(t+n*(wa*r)),this.opacity)}})),function e(t){var n=Na(t);function r(e,t){var r=n((e=Jo(e)).r,(t=Jo(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=Ia(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1),Ea((function(e,t){var n=t-e;return n?Ta(e,n>180||n<-180?n-360*Math.round(n/360):n):Ca(isNaN(e)?t:e)})),Ea(Ia);var La,Pa=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ra(e){return new ja(e)}function ja(e){if(!(t=Pa.exec(e)))throw new Error("invalid format: "+e);var t;this.fill=t[1]||" ",this.align=t[2]||">",this.sign=t[3]||"-",this.symbol=t[4]||"",this.zero=!!t[5],this.width=t[6]&&+t[6],this.comma=!!t[7],this.precision=t[8]&&+t[8].slice(1),this.trim=!!t[9],this.type=t[10]||""}function za(e,t){var n=Oa(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Ra.prototype=ja.prototype,ja.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Aa={"%":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.round(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 za(100*e,t)},r:za,s:function(e,t){var n=Oa(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(La=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Oa(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 Fa(e){return e}var $a,Ha=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Ua(e){var t,n,r=e.grouping&&e.thousands?(t=e.grouping,n=e.thousands,function(e,r){for(var i=e.length,o=[],a=0,l=t[0],s=0;i>0&&l>0&&(s+l+1>r&&(l=Math.max(1,r-s)),o.push(e.substring(i-=l,i+l)),!((s+=l+1)>r));)l=t[a=(a+1)%t.length];return o.reverse().join(n)}):Fa,i=e.currency,o=e.decimal,a=e.numerals?function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(e.numerals):Fa,l=e.percent||"%";function s(e){var t=(e=Ra(e)).fill,n=e.align,s=e.sign,u=e.symbol,c=e.zero,f=e.width,d=e.comma,h=e.precision,p=e.trim,m=e.type;"n"===m?(d=!0,m="g"):Aa[m]||(null==h&&(h=12),p=!0,m="g"),(c||"0"===t&&"="===n)&&(c=!0,t="0",n="=");var g="$"===u?i[0]:"#"===u&&/[boxX]/.test(m)?"0"+m.toLowerCase():"",v="$"===u?i[1]:/[%p]/.test(m)?l:"",y=Aa[m],b=/[defgprs%]/.test(m);function x(e){var i,l,u,x=g,w=v;if("c"===m)w=y(e)+w,e="";else{var D=(e=+e)<0;if(e=y(Math.abs(e),h),p&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(i>0){if(!+e[r])break e;i=0}}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),D&&0==+e&&(D=!1),x=(D?"("===s?s:"-":"-"===s||"("===s?"":s)+x,w=("s"===m?Ha[8+La/3]:"")+w+(D&&"("===s?")":""),b)for(i=-1,l=e.length;++i<l;)if(48>(u=e.charCodeAt(i))||u>57){w=(46===u?o+e.slice(i+1):e.slice(i))+w,e=e.slice(0,i);break}}d&&!c&&(e=r(e,1/0));var M=x.length+e.length+w.length,q=M<f?new Array(f-M+1).join(t):"";switch(d&&c&&(e=r(q+e,q.length?f-w.length:1/0),q=""),n){case"<":e=x+e+w+q;break;case"=":e=x+q+e+w;break;case"^":e=q.slice(0,M=q.length>>1)+x+e+w+q.slice(M);break;default:e=q+x+e+w}return a(e)}return h=null==h?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,h)):Math.max(0,Math.min(20,h)),x.toString=function(){return e+""},x}return{format:s,formatPrefix:function(e,t){var n,r=s(((e=Ra(e)).type="f",e)),i=3*Math.max(-8,Math.min(8,Math.floor((n=t,((n=Oa(Math.abs(n)))?n[1]:NaN)/3)))),o=Math.pow(10,-i),a=Ha[8+i/3];return function(e){return r(o*e)+a}}}}($a=Ua({decimal:".",thousands:",",grouping:[3],currency:["$",""]})).format,$a.formatPrefix;var _a=new Date,Ba=new Date;function Va(e,t,n,r){function i(t){return e(t=new Date(+t)),t}return i.floor=i,i.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},i.round=function(e){var t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},i.range=function(n,r,o){var a,l=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return l;do{l.push(a=new Date(+n)),t(n,o),e(n)}while(a<n&&n<r);return l},i.filter=function(n){return Va((function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}))},n&&(i.count=function(t,r){return _a.setTime(+t),Ba.setTime(+r),e(_a),e(Ba),Math.floor(n(_a,Ba))},i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?function(t){return r(t)%e==0}:function(t){return i.count(0,t)%e==0}):i:null}),i}var Wa=Va((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));Wa.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?Va((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):Wa:null},Wa.range;var Ya=1e3,Ka=6e4,Ja=36e5,Za=864e5,Ga=6048e5;Va((function(e){e.setTime(Math.floor(e/Ya)*Ya)}),(function(e,t){e.setTime(+e+t*Ya)}),(function(e,t){return(t-e)/Ya}),(function(e){return e.getUTCSeconds()})).range,Va((function(e){e.setTime(Math.floor(e/Ka)*Ka)}),(function(e,t){e.setTime(+e+t*Ka)}),(function(e,t){return(t-e)/Ka}),(function(e){return e.getMinutes()})).range,Va((function(e){var t=e.getTimezoneOffset()*Ka%Ja;t<0&&(t+=Ja),e.setTime(Math.floor((+e-t)/Ja)*Ja+t)}),(function(e,t){e.setTime(+e+t*Ja)}),(function(e,t){return(t-e)/Ja}),(function(e){return e.getHours()})).range;var Xa=Va((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ka)/Za}),(function(e){return e.getDate()-1}));function Qa(e){return Va((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ka)/Ga}))}Xa.range;var el=Qa(0),tl=Qa(1),nl=Qa(2),rl=Qa(3),il=Qa(4),ol=Qa(5),al=Qa(6);el.range,tl.range,nl.range,rl.range,il.range,ol.range,al.range,Va((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()})).range;var ll=Va((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));ll.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Va((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n*e)})):null},ll.range,Va((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+t*Ka)}),(function(e,t){return(t-e)/Ka}),(function(e){return e.getUTCMinutes()})).range,Va((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*Ja)}),(function(e,t){return(t-e)/Ja}),(function(e){return e.getUTCHours()})).range;var sl=Va((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/Za}),(function(e){return e.getUTCDate()-1}));function ul(e){return Va((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/Ga}))}sl.range;var cl=ul(0),fl=ul(1),dl=ul(2),hl=ul(3),pl=ul(4),ml=ul(5),gl=ul(6);cl.range,fl.range,dl.range,hl.range,pl.range,ml.range,gl.range,Va((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()})).range;var vl=Va((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));function yl(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function bl(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function xl(e){return{y:e,m:0,d:1,H:0,M:0,S:0,L:0}}vl.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Va((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null},vl.range;var wl,Dl,Ml,ql={"-":"",_:" ",0:"0"},kl=/^\s*\d+/,Sl=/^%/,Cl=/[\\^$*+?|[\]().{}]/g;function Tl(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function Nl(e){return e.replace(Cl,"\\$&")}function Il(e){return new RegExp("^(?:"+e.map(Nl).join("|")+")","i")}function El(e){for(var t={},n=-1,r=e.length;++n<r;)t[e[n].toLowerCase()]=n;return t}function Ol(e,t,n){var r=kl.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Ll(e,t,n){var r=kl.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Pl(e,t,n){var r=kl.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Rl(e,t,n){var r=kl.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function jl(e,t,n){var r=kl.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function zl(e,t,n){var r=kl.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Al(e,t,n){var r=kl.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Fl(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function $l(e,t,n){var r=kl.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Hl(e,t,n){var r=kl.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Ul(e,t,n){var r=kl.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function _l(e,t,n){var r=kl.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Bl(e,t,n){var r=kl.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Vl(e,t,n){var r=kl.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Wl(e,t,n){var r=kl.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Yl(e,t,n){var r=kl.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Kl(e,t,n){var r=Sl.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Jl(e,t,n){var r=kl.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Zl(e,t,n){var r=kl.exec(t.slice(n));return r?(e.Q=1e3*+r[0],n+r[0].length):-1}function Gl(e,t){return Tl(e.getDate(),t,2)}function Xl(e,t){return Tl(e.getHours(),t,2)}function Ql(e,t){return Tl(e.getHours()%12||12,t,2)}function es(e,t){return Tl(1+Xa.count(ll(e),e),t,3)}function ts(e,t){return Tl(e.getMilliseconds(),t,3)}function ns(e,t){return ts(e,t)+"000"}function rs(e,t){return Tl(e.getMonth()+1,t,2)}function is(e,t){return Tl(e.getMinutes(),t,2)}function os(e,t){return Tl(e.getSeconds(),t,2)}function as(e){var t=e.getDay();return 0===t?7:t}function ls(e,t){return Tl(el.count(ll(e),e),t,2)}function ss(e,t){var n=e.getDay();return e=n>=4||0===n?il(e):il.ceil(e),Tl(il.count(ll(e),e)+(4===ll(e).getDay()),t,2)}function us(e){return e.getDay()}function cs(e,t){return Tl(tl.count(ll(e),e),t,2)}function fs(e,t){return Tl(e.getFullYear()%100,t,2)}function ds(e,t){return Tl(e.getFullYear()%1e4,t,4)}function hs(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Tl(t/60|0,"0",2)+Tl(t%60,"0",2)}function ps(e,t){return Tl(e.getUTCDate(),t,2)}function ms(e,t){return Tl(e.getUTCHours(),t,2)}function gs(e,t){return Tl(e.getUTCHours()%12||12,t,2)}function vs(e,t){return Tl(1+sl.count(vl(e),e),t,3)}function ys(e,t){return Tl(e.getUTCMilliseconds(),t,3)}function bs(e,t){return ys(e,t)+"000"}function xs(e,t){return Tl(e.getUTCMonth()+1,t,2)}function ws(e,t){return Tl(e.getUTCMinutes(),t,2)}function Ds(e,t){return Tl(e.getUTCSeconds(),t,2)}function Ms(e){var t=e.getUTCDay();return 0===t?7:t}function qs(e,t){return Tl(cl.count(vl(e),e),t,2)}function ks(e,t){var n=e.getUTCDay();return e=n>=4||0===n?pl(e):pl.ceil(e),Tl(pl.count(vl(e),e)+(4===vl(e).getUTCDay()),t,2)}function Ss(e){return e.getUTCDay()}function Cs(e,t){return Tl(fl.count(vl(e),e),t,2)}function Ts(e,t){return Tl(e.getUTCFullYear()%100,t,2)}function Ns(e,t){return Tl(e.getUTCFullYear()%1e4,t,4)}function Is(){return"+0000"}function Es(){return"%"}function Os(e){return+e}function Ls(e){return Math.floor(+e/1e3)}!function(e){wl=function(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,l=e.months,s=e.shortMonths,u=Il(i),c=El(i),f=Il(o),d=El(o),h=Il(a),p=El(a),m=Il(l),g=El(l),v=Il(s),y=El(s),b={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return s[e.getMonth()]},B:function(e){return l[e.getMonth()]},c:null,d:Gl,e:Gl,f:ns,H:Xl,I:Ql,j:es,L:ts,m:rs,M:is,p:function(e){return i[+(e.getHours()>=12)]},Q:Os,s:Ls,S:os,u:as,U:ls,V:ss,w:us,W:cs,x:null,X:null,y:fs,Y:ds,Z:hs,"%":Es},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return s[e.getUTCMonth()]},B:function(e){return l[e.getUTCMonth()]},c:null,d:ps,e:ps,f:bs,H:ms,I:gs,j:vs,L:ys,m:xs,M:ws,p:function(e){return i[+(e.getUTCHours()>=12)]},Q:Os,s:Ls,S:Ds,u:Ms,U:qs,V:ks,w:Ss,W:Cs,x:null,X:null,y:Ts,Y:Ns,Z:Is,"%":Es},w={a:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.w=p[r[0].toLowerCase()],n+r[0].length):-1},A:function(e,t,n){var r=f.exec(t.slice(n));return r?(e.w=d[r[0].toLowerCase()],n+r[0].length):-1},b:function(e,t,n){var r=v.exec(t.slice(n));return r?(e.m=y[r[0].toLowerCase()],n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=g[r[0].toLowerCase()],n+r[0].length):-1},c:function(e,n,r){return q(e,t,n,r)},d:Hl,e:Hl,f:Yl,H:_l,I:_l,j:Ul,L:Wl,m:$l,M:Bl,p:function(e,t,n){var r=u.exec(t.slice(n));return r?(e.p=c[r[0].toLowerCase()],n+r[0].length):-1},Q:Jl,s:Zl,S:Vl,u:Ll,U:Pl,V:Rl,w:Ol,W:jl,x:function(e,t,r){return q(e,n,t,r)},X:function(e,t,n){return q(e,r,t,n)},y:Al,Y:zl,Z:Fl,"%":Kl};function D(e,t){return function(n){var r,i,o,a=[],l=-1,s=0,u=e.length;for(n instanceof Date||(n=new Date(+n));++l<u;)37===e.charCodeAt(l)&&(a.push(e.slice(s,l)),null!=(i=ql[r=e.charAt(++l)])?r=e.charAt(++l):i="e"===r?" ":"0",(o=t[r])&&(r=o(n,i)),a.push(r),s=l+1);return a.push(e.slice(s,l)),a.join("")}}function M(e,t){return function(n){var r,i,o=xl(1900);if(q(o,e,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("p"in o&&(o.H=o.H%12+12*o.p),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=bl(xl(o.y))).getUTCDay(),r=i>4||0===i?fl.ceil(r):fl(r),r=sl.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=t(xl(o.y))).getDay(),r=i>4||0===i?tl.ceil(r):tl(r),r=Xa.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?bl(xl(o.y)).getUTCDay():t(xl(o.y)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,bl(o)):t(o)}}function q(e,t,n,r){for(var i,o,a=0,l=t.length,s=n.length;a<l;){if(r>=s)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=w[i in ql?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=D(n,b),b.X=D(r,b),b.c=D(t,b),x.x=D(n,x),x.X=D(r,x),x.c=D(t,x),{format:function(e){var t=D(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=M(e+="",yl);return t.toString=function(){return e},t},utcFormat:function(e){var t=D(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=M(e,bl);return t.toString=function(){return e},t}}}(e),wl.format,wl.parse,Dl=wl.utcFormat,Ml=wl.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var Ps="%Y-%m-%dT%H:%M:%S.%LZ";Date.prototype.toISOString||Dl(Ps),+new Date("2000-01-01T00:00:00.000Z")||Ml(Ps),vi.bind(null,!0);const Rs=[[2,4,6],[2,4],[3]],js=[,[,,[[1,2]],[[1,2,3],[1,3]],[[1,2,4],[1,4]],[[1,2,4],[1,5]],[[1,2,4,6],[2,4,6],[1,3,6],[1,6]],[[1,2,4,6],[2,4,6],[1,3,6],[1,7]],[[1,2,4,8],[2,4,8],[1,8]],[[1,2,4,8],[2,4,8],[1,3,9],[1,9]],[[1,2,4,6,10],[1,2,4,10],[1,3,10],[3,10],[1,10]]],[,,,[[2,3]],[[2,3,4],[2,4]],[[2,3,4],[2,4],[2,5]],[[2,4,6],[2,6]],[[2,4,6],[2,6],[2,7]],[[2,4,8],[2,8]],[[2,4,8],[2,8],[2,9]],[[2,4,6,10],[2,4,10],[5,10],[3,10]]],[,,,,[[3,4]],[[3,4,5],[3,5]],[[3,4,5,6],[3,6]],[[3,4,5,6],[3,5,7],[3,7]],[[3,4,5,6,8],[3,5,7],[4,8],[3,8]],[[3,4,5,6,8],[3,4,6,9],[3,4,6,8],[3,6,9],[4,8],[3,9]],[[4,6,10],[5,10],[3,10]]],[,,,,,[[4,5]],[[4,5,6],[4,6]],[[4,5,6,7],[4,5,6],[4,6]],[[4,5,6,7,8],[4,5,6,7],[4,6,8],[4,8]],[[4,5,6,7,8],[4,6,9],[4,6,8],[4,8]],[[4,6,10],[5,7,9],[5,10],[4,10]]],[,,,,,,[[5,6]],[[5,6,7],[5,7]],[[5,6,7,8],[5,6,7],[6,8]],[[5,6,7,8,9],[5,6,7,8],[5,7,9],[5,9]],[[6,8,10],[5,10]]],[,,,,,,,[[6,7]],[[6,7,8],[6,8]],[[6,7,8,9],[6,7,8],[6,9]],[[6,7,8,9,10],[6,8,10],[6,10]]],[,,,,,,,,[[7,8]],[[7,8,9],[7,9]],[[7,8,9,10],[8,10],[7,10],[7,9]]],[,,,,,,,,,[[8,9]],[[8,9,10],[8,10]]],[,,,,,,,,,,[[9,10]]]];function zs(e,t,n){const r=e?e.length:0;let i,o=void 0===t?Number.MAX_VALUE:e[0]/t;for(i=1;i<r;i++)o=Math.min(o,e[i]/e[i-1]);void 0!==n&&(o=Math.min(o,n/e[r-1])),e.splice(0,0,o)}function As(e,t,n){let r;const i=e?e.length:0;for(r=0;r<i;r++)zs(e[r],t,n)}function Fs(e,t=!1){const n=t?"IM_5791_SVG_LABEL_RENDERING":"IM_4962_SVG_CHART_LABELS";if(null!=e&&e.isEnabled(n))return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?void 0:"svg"}function $s(e){const t=e.node.desc&&e.node.desc.share;return t?e.formatter("share")(t):""}function Hs(e){return e.formatter("num")(e.node.data.num.value)}function Us({data:e}){return e?e.label:""}function _s(e){if(e.dataPoint.auto)return $s;switch(e.dataPoint.labelMode){case"share":default:return $s;case"value":return Hs;case"none":return null}}function Bs(e,t,n,r,i){const o=i.axis.label.getStyle(),a=i.label.value.getStyle(),l=n.getStyles().label.value;return{type:"labels",key:"funnel-labels",renderer:Fs(e,!0),layout:{displayOrder:2},settings:{sources:[{component:"fun",selector:".labelLeft",strategy:{type:"rows",settings:{align:0,fill:o.fill,fontSize:parseInt(o.fontSize,10),fontFamily:o.fontFamily,labels:[{label:Us}],linkData:e=>`${e.data.value} ${Us(e)}`}}},{component:"fun",selector:".labelCenter",strategy:{type:"rows",settings:{align:.5,fill:a.useContrastColor?({node:e})=>(e=>wo.isDark(e.desc.fill)?l.lightColor:l.darkColor)(e):a.fill,fontSize:parseInt(a.fontSize,10),fontFamily:a.fontFamily,labels:[{label:_s(t)}],linkData:e=>"none"===t.dataPoint.labelMode?Math.random():`${e.data.value} ${_s(t)(e)}`}}}]},animations:{enabled:r,trackBy:e=>e.data}}}function Vs(e,t,n){if(!t.showDimensionTitle||!t.qHyperCube.qDimensionInfo[0].qFallbackTitle)return!1;const r=t.qHyperCube.qDimensionInfo[0].qFallbackTitle,i=n.axis.title.getStyle();return{type:"text",key:"dimension-title",renderer:Fs(e,!0),text:r,layout:{dock:"top"},style:{text:{fill:i.fill,fontSize:i.fontSize,fontFamily:i.fontFamily}}}}function Ws({picasso:e,flags:t}){const y=c(),b=f(),x=d(),w=h(),D=p(),M=m().qLocaleInfo,[q,k,S,C]=function({picasso:e}){const t=n(),c=r(),f=i(),d=o(),h=a(),p=l(),[m,g]=s(),[v,y]=s(),[b,x]=s(),[w,D]=s();return u((()=>{const n=Et({picasso:e,model:f,app:d,translator:h,config:{auto:!1,key:"fill"}});t.style.overflow="hidden";const r=e({renderer:{prio:[p.renderer||"svg"]}}).chart({element:t,data:[],settings:{}}),i=Jr({chart:r,selections:c,config:{selectionActions:!1}});return x(i),y(n),g(r),D(function(){var e={};return{get:function(t){return e[t]},set:function(t,n){return e[t]=n,n},has:function(t){return t in e},remove:function(t){delete e[t]},empty:function(){e={}}}}()),()=>{i.destroy(),r.destroy()}}),[]),[m,v,b,w]}({picasso:e,layout:y}),T=l(),N=()=>{const e=q.element.clientWidth!==C.get("width")||q.element.clientHeight!==C.get("height");return!1!==T.chartAnimations&&!e&&!xi.propertiesHaveChanged({viewCache:C,layout:y})},[I]=g((()=>{if(!k)return Promise.resolve();const t=function(e){return{layout:e,keys:{SCALE:{FILL:"fill"},COMPONENT:{FUNNEL:"fun",FUNNEL_LABELS:"funnel-labels",DIMENSION_TITLE:"dimension-title"}}}}(y),n=function(e){var t=e.picassoInstance,n=e.plugins,r=e.pluginArgs,i=void 0===r?{}:r,o={initialized:!1,definitions:[]};return{initialize:function(){return E(j().mark((function e(){var r,a,l,s;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!o.initialized){e.next=2;break}return e.abrupt("return");case 2:return a=Promise.all(n.filter((function(e){return"custom-component"===e.info.type})).map(function(){var e=E(j().mark((function e(n){var r;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.info.componentName){e.next=2;break}throw new Error("plugin-service: Custom component is missing componentName");case 2:return e.next=4,n.fn(P({},i));case 4:if("object"===F(r=e.sent)){e.next=7;break}throw new Error("plugin-service: Custom component needs to be an object");case 7:t.component(n.info.componentName,r);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())),l=Promise.all(n.filter((function(e){return"component-definition"===e.info.type})).map((function(e){return e.fn(P({},i))}))),e.next=6,Promise.all([a,l]);case 6:s=e.sent,o.initialized=!0,(r=o.definitions).push.apply(r,A(s[1]));case 9:case"end":return e.stop()}}),e)})))()},extendComponents:function(e){return o.initialized?(o.definitions.filter(Boolean).forEach((function(t){var n=z(e.filter((function(e){return e.key&&e.key===t.key})),1)[0];if(n){var r=ee(!0,{},n.brush);ee(!0,n,t),t.brush&&(n.brush=function(e,t){return"object"===F(e)&&Object.keys(e).length?(Array.isArray(t.consume)&&(e.consume=zt({originalArray:e.consume,newArray:t.consume,matchKey:"context"})),Array.isArray(t.trigger)&&(e.trigger=zt({originalArray:e.trigger,newArray:t.trigger,matchKey:"on"})),e):t}(r,t.brush))}else e.push(t)})),e):e}}}({picassoInstance:e,plugins:D,pluginArgs:t});return Promise.all([k.initialize({createConfig:({getUseBaseColors:e})=>({theme:b,colorProps:{...y.color,useBaseColors:e(y)},layout:y,hc:y.qHyperCube})}),n.initialize()]).then((()=>n))}),[y,k]);u((()=>{if(!q||!k||!I)return;const e=[{type:"q",key:"qHyperCube",data:y.qHyperCube,config:{localeInfo:M}},...k.getData()],n=function(e){var t=e.theme,n=e.config,r=void 0===n?{}:n,i=r.id,o=r.resolve,a=void 0===o?[]:o,l=r.transform,s=void 0===l?[]:l,u=r.extend,c=void 0===u?[]:u,f={theme:t,matrix:ni(a),styles:void 0};return f.styles=ii({theme:t,id:i,transform:s,extend:c,matrix:f.matrix}),{getStyles:function(){return f.styles},getTheme:function(){return f.theme},setTheme:function(e){f.theme=e,f.styles=ii({theme:e,id:i,transform:s,extend:c,matrix:f.matrix})}}}({theme:b,config:{id:"funnelChart"}}),r=function({layout:e,themeService:t}){const n=t.getStyles(),r=t=>{var n,r;return null!==(n=null===(r=e.components)||void 0===r?void 0:r.find((e=>e.key===t)))&&void 0!==n?n:void 0};return{axis:{title:{getStyle:()=>{var e,t,i,o,a,l;return{fontFamily:null!==(e=null===(t=r("axis"))||void 0===t||null===(t=t.axis)||void 0===t||null===(t=t.title)||void 0===t?void 0:t.fontFamily)&&void 0!==e?e:n.axis.title.fontFamily,fontSize:null!==(i=null===(o=r("axis"))||void 0===o||null===(o=o.axis)||void 0===o||null===(o=o.title)||void 0===o?void 0:o.fontSize)&&void 0!==i?i:n.axis.title.fontSize,fill:null!==(a=null===(l=r("axis"))||void 0===l||null===(l=l.axis)||void 0===l||null===(l=l.title)||void 0===l||null===(l=l.color)||void 0===l?void 0:l.color)&&void 0!==a?a:n.axis.title.color}}},label:{getStyle:()=>{var e,t,i,o,a,l;return{fontSize:null!==(e=null===(t=r("axis"))||void 0===t||null===(t=t.axis)||void 0===t||null===(t=t.label)||void 0===t||null===(t=t.name)||void 0===t?void 0:t.fontSize)&&void 0!==e?e:n.axis.label.name.fontSize,fontFamily:null!==(i=null===(o=r("axis"))||void 0===o||null===(o=o.axis)||void 0===o||null===(o=o.label)||void 0===o||null===(o=o.name)||void 0===o?void 0:o.fontFamily)&&void 0!==i?i:n.axis.label.name.fontFamily,fill:null!==(a=null===(l=r("axis"))||void 0===l||null===(l=l.axis)||void 0===l||null===(l=l.label)||void 0===l||null===(l=l.name)||void 0===l||null===(l=l.color)||void 0===l?void 0:l.color)&&void 0!==a?a:n.axis.label.name.color}}}},label:{value:{getStyle:()=>{var e,t,i,o,a,l,s,u;return{fontSize:null!==(e=null===(t=r("label"))||void 0===t||null===(t=t.label)||void 0===t||null===(t=t.value)||void 0===t?void 0:t.fontSize)&&void 0!==e?e:n.label.value.fontSize,fontFamily:null!==(i=null===(o=r("label"))||void 0===o||null===(o=o.label)||void 0===o||null===(o=o.value)||void 0===o?void 0:o.fontFamily)&&void 0!==i?i:n.label.value.fontFamily,fill:null!==(a=null===(l=r("label"))||void 0===l||null===(l=l.label)||void 0===l||null===(l=l.value)||void 0===l||null===(l=l.color)||void 0===l?void 0:l.color)&&void 0!==a?a:n.label.value.color,useContrastColor:null===(s=null===(u=r("label"))||void 0===u||null===(u=u.label)||void 0===u||null===(u=u.value)||void 0===u?void 0:u.useContrastColor)||void 0===s||s}}}}}}({layout:y,themeService:n}),i=function({flags:e,layout:t,constraints:n,colorService:r,themeService:i,styleModel:o,pluginService:a,animationsEnabled:l}){const s=function(e){return{...e.getScales()}}(r),u=r.getPalettes(),c=function({layout:e,constraints:t,colorService:n,animationsEnabled:r}){const i=n.getDatumProps(),o=n.getColor(),a={type:"funnel",key:"fun",data:{extract:{field:"qDimensionInfo/0",props:{num:{field:"qMeasureInfo/0"},...i}}},brush:t.select||t.active?{}:{trigger:[{contexts:["selection"],data:[""]}],consume:[{context:"selection",filter:e=>"section"===e.tag,style:{inactive:{opacity:.3}}}]},settings:{num:{ref:"num"},fill:o,mode:e.funnel.mode},animations:{enabled:r,isMainComponent:!0,trackBy:e=>`${e.tag}: ${e.data.value}`}};return a}({layout:t,constraints:n,colorService:r,animationsEnabled:l}),f=[c,Bs(e,t,i,l,o),Vs(e,t,o)];return{palettes:u,scales:s,components:a.extendComponents(f),formatters:{share:{type:"d3-number",format:".1%"},num:{data:{field:"qMeasureInfo/0"}}}}}({flags:t,layout:y,constraints:x,colorService:k,themeService:n,styleModel:r,pluginService:I,animationsEnabled:N});q.update({data:e,settings:i}),C.set("width",q.element.clientWidth),C.set("height",q.element.clientHeight),xi.cacheProperties({viewCache:C,layout:y})}),[q,k,b.name(),I,x]),u((()=>{q&&(q.update(),C.set("width",q.element.clientWidth),C.set("height",q.element.clientHeight))}),[w.width,w.height]),u((()=>{S&&S.setLayout(y)}),[y]),v((e=>k.getSnapshotData().then((t=>(e.snapshotData=e.snapshotData||{},e.snapshotData.content=e.snapshotData.content||{},e.snapshotData.content.chartData=t,e))).catch((()=>e))))}function Ys(n){!function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(y).forEach((t=>{e.add(y[t])}))}}(n.translator);const r=e();r.use(t),r.component("funnel",C);const{flags:i}=n;return{ext:fi(n),qae:{properties:{initial:T},data:{targets:di}},component(){Ws({picasso:r,flags:i})}}}!function(){let e,t;for(As(Rs,1,10),e=0;e<js.length;e++)if(js[e])for(t=0;t<js[e].length;t++)Array.isArray(js[e][t])&&As(js[e][t])}();export{Ys as default};
|
9
|
+
e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,l,s,u,c,d,f=e.length,p=e.search(/[0-9\-\+#]/),h=p>0?e.substring(0,p):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),v=f-g,y=e.substring(v,v+1),b=v+("."===y||","===y?1:0),x=g>0?e.substring(b,f):"";if(n=(t="-"===(e=e.substring(p,b)).charAt(0)?-t:+t)<0?t=-t:0,i=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",o=r&&r[1]&&r[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",l=e[1]&&e[1].lastIndexOf("0"),(!(u=t.split("."))[1]||u[1]&&u[1].length<=l)&&(t=(+t).toFixed(l+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],s=c[1]&&c[c.length-1].length){for(m="",v=(d=t[0]).length%s,f=d.length,b=0;b<f;b++)m+=d.charAt(b),!((b-v+1)%s)&&b<f-s&&(m+=o);t[0]=m}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),h+(n?"-":"")+r+x}},Nn(On={exports:{}}),On.exports);function Rn(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}const Pn={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"},Tn=/%\)?$/,jn=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,zn=/^\(oct\)/i,An=/^\(dec\)/i,Fn=/^\(hex\)/i,$n=/^\(bin\)/i,_n=/^\(rom\)/i,Hn=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,Un=/#|0/g;function Vn(e,t,n,r){return e=e.toString(t),n[1]===n[1].toUpperCase()&&(e=e.toUpperCase()),e.length-e.indexOf(".")>10&&(e=e.slice(0,e.indexOf(".")+11)),e.replace(".",r||".")}function Bn(e,t,n){const r=Rn(e);return n?r:new RegExp(r||"",t)}function Wn(e,t,n,r){let i,o,a,l,s,u,c,d,f,p=e.pattern;var h,m;r&&(e.abbreviate=!0),h=t,(m=n)&&(m=Rn(m)),h&&(h=Rn(h)),f=new RegExp("(?:[#0]+".concat(h,")?[#0]+(?:").concat(m,"[#0]+)?")),a=p.match(f),a=a?a[0]:"",l=a?p.substr(0,p.indexOf(a)):p,s=a?p.substring(p.indexOf(a)+a.length):"",a||(a=p?"#":"##########"),t&&t===n&&(i=a.split(n),o=i.pop(),a=i.join("")+n+o,t=""),u=t,t=/,/.test(n)?"¤":",",u&&(a=a.replace(Bn(u,"g"),t)),c=n,n=".",c&&(a=a.replace(Bn(c,"g"),n)),d=a.match(/#/g),d=d?d.length:0;const g=p.split(c);let v;g[1]&&(v=g[1].match(Un)),e.prefix=l||"",e.postfix=s||"",e.pattern=p,e.maxPrecision=v?v.length:2,e.percentage=Tn.test(p),e.numericPattern=a||"",e.numericRegex=new RegExp("".concat(Bn(t,null,!0),"|").concat(Bn(n,null,!0)),"g"),e.groupTemp=u,e.decTemp=c,e.t=t,e.d=n,e.temp=d}class Kn{constructor(e,t,n,r,i){this.localeInfo=e,this.pattern=t,this.thousandDelimiter=n||",",this.decimalDelimiter=r||".",this.type=i||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return Pn;const n={};return e.qNumericalAbbreviation.split(t).forEach((e=>{let t=e.split(":");2===t.length&&(n[t[0]]=t[1])})),n}(e,this.patternSeparator),this.prepare()}clone(){const e=new Kn(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return e.subtype=this.subtype,e}format(e,t,n,r){return this.prepare(t,n,r),this.formatValue(e)}prepare(e,t,n){let r;if(void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),!e)return void(this._prepared={pattern:!1});this._prepared={positive:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},r=this._prepared,e=e.split(this.patternSeparator),r.positive.pattern=e[0],r.negative.pattern=e[1],r.zero.pattern=e[2],Hn.test(e[0])&&(r.positive.isFunctional=!0),e[1]?Hn.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?Hn.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1;const i="U"===this.type;r.positive.isFunctional||Wn(r.positive,t,n,i),r.negative&&!r.negative.isFunctional&&Wn(r.negative,t,n,i),r.zero&&!r.zero.isFunctional&&Wn(r.zero,t,n,i)}formatValue(e){let t,n,r,i,o,a,l,s,u,c=this._prepared,d="",f="",p=e;if(isNaN(e))return"".concat(p);if(e=+e,!1===c.pattern)return e.toString();if(0===e&&c.zero)return c=c.zero,c.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,n){let r;return jn.test(t)?e=Vn(e,Number(/\d{2}/.exec(t)[0]),t,n):zn.test(t)?e=Vn(e,8,t,n):An.test(t)?e=Vn(e,10,t,n):Fn.test(t)?e=Vn(e,16,t,n):$n.test(t)?e=Vn(e,2,t,n):_n.test(t)&&(r="",e<0&&(r="-",e=-e),0===(e=Math.floor(e))?e="0":e<=5e5?(e=function(e,t){let n,r="",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(),l=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();for(;i>0;)for(n=0;n<a.length;n++)if(a[n]<=i){r+=l[n],i-=a[n];break}for(n=0;n<o;n++)r="M".concat(r);return t[1]!==t[1].toUpperCase()&&(r=r.toLowerCase()),r}(e,t),e=r+e):e=t+r+e.toExponential(0)),e}(e,c.pattern,o);else{if(c.percentage&&(e*=100),c.abbreviate){const t=Object.keys(this.abbreviations).map((e=>parseInt(e,10))).sort(((e,t)=>e-t));let r,i,o=t[0];for(l=0,n=Number(Number(e).toExponential().split("e")[1]);o<=n&&l<t.length;)l++,o=t[l];l>0&&(r=t[l-1]),r&&n>0&&r>0?i=r:(n<0&&r<0||!r)&&(o<0&&o-n<=c.maxPrecision?i=o:r<=n&&!(o>0&&-n<=c.maxPrecision)&&(i=r)),i&&(d=this.abbreviations[i],e/=10**i)}if(r=Math.abs(e),t=c.temp,s=c.numericPattern,u=s.split(o)[1],"I"===this.type&&(e=Math.round(e)),i=e,u||"#"!==s.slice(-1)[0])if(r>=1e15||r>0&&r<=1e-14)e=r?r.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{const t=Number((e+1e-15*(e<0?-1:1)).toFixed(Math.min(20,u?u.length:0)).split(".")[0]);let n=s.split(o)[0];if(n+=o,e=Ln(n,t)||"0",u){const t=Math.max(0,Math.min(14,u.length)),n=u.replace(/#+$/,"").length;let i=("I"===this.type?0:r%1+1e-15).toFixed(t).slice(2).replace(/0+$/,"");for(l=i.length;l<n;l++)i+="0";i&&(e+=o+i)}else 0===t&&(i=0)}else if(r>=10**t||r<1||r<1e-4)0===e?e="0":r<1e-4||r>=1e20?(e=(e=i.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),f=""):(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(s+=o,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(r)/Math.log(10)))),l=0;l<t;l++)s+="#";e=Ln(s,e)}e=e.replace(c.numericRegex,(e=>e===a?c.groupTemp:e===o?c.decTemp:"")),i<0&&!/^-/.test(e)&&(e="-".concat(e))}return c.prefix+e+f+d+c.postfix}static getStaticFormatter(){return{prepare(){},formatValue:e=>"".concat(e)}}}function Jn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{size:n=5e3,multipleArguments:r=!1,toKey:i=e=>e}=t;let o,a,l=Object.create(null),s=Object.create(null),u=0,c=0;return o=r?function(){return a=i(...arguments),o.has(a)?o.get(a):o.set(a,e(...arguments))}:t=>(a=i(t),o.has(a)?o.get(a):o.set(a,e(t))),o.set=(e,t)=>(u>=n&&(delete l[s[c]],delete s[c],u--,c++),l[e]=t,s[u]=e,u++,t),o.get=e=>l[e],o.has=e=>e in l,o.clear=()=>{l=Object.create(null),s=Object.create(null),u=0,c=0},o.size=()=>u,o}function Yn(e,t,n,r,i){const o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Kn(...t)}(i,e,t,n,r),a=Jn(o.formatValue.bind(o),{toKey:e=>isNaN(e)?e:+e});function l(e){return a(e)}return l.format=function(e,t,n,r){return a.clear(),o.format(t,e,n,r)},l.pattern=function(e){return e&&(a.clear(),o.pattern=e,o.prepare()),o.pattern},l}const Gn="D",Zn="T",Xn="TS",Qn=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],er=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],tr=["January","February","March","April","May","June","July","August","September","October","November","December"],nr=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function rr(e,t){for(let n=e.length;n<t;n++)e="0".concat(e);return e}function ir(e){let t=e.toString().split(".");return t[1]?(t=Number("0.".concat(t[1])),t):0}class or{constructor(e,t,n){const r=e||{};r.qCalendarStrings||(r.qCalendarStrings={qLongDayNames:Qn,qDayNames:er,qLongMonthNames:tr,qMonthNames:nr}),this.localeInfo=r,this.locale_days=r.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=r.qCalendarStrings.qDayNames.slice(),this.locale_months=r.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=r.qCalendarStrings.qMonthNames.slice(),t||(t={[Zn]:r.qTimeFmt||"hh:mm:ss",[Gn]:r.qDateFmt||"YYYY-MM-DD",[Xn]:r.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"}[n]),this.pattern=t}clone(){const e=new or(this.localeInfo,this.pattern);return e.subtype=this.subtype,e}format(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");const n=/t+/gi.test(t);let r;e instanceof Date?r=function(e,t){let n=e.getUTCHours(),r=e.getUTCDay()-1;return t&&(n%=12,n||(n=12)),r<0&&(r=6),{year:e.getUTCFullYear(),month:e.getUTCMonth(),day:r,date:e.getUTCDate(),h:n,m:e.getUTCMinutes(),s:e.getUTCSeconds(),f:e.getUTCMilliseconds(),t:e.getUTCHours()>=12?"pm":"am"}}(e,n):(e<0&&(e=-e,t="-".concat(t)),r=function(e,t){let n,r=function(e){const t=e,n=24*ir(t),r=60*ir(n),i=60*ir(r),o=1e3*ir(i);return{d:Math.floor(t),h:Math.floor(n),m:Math.floor(r),s:Math.floor(i),f:Math.round(o)}}(e),i=r.d,o=r.h,a=r.m,l=r.s,s=r.f,u=0;/w+|t+/gi.test(t)&&(n=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(86400*(e-Math.floor(e))))),isNaN(n.getTime())&&(n=null)),/D+/gi.test(t)||(o+=24*i),/h+/gi.test(t)||(a+=60*o),/m+/gi.test(t)||(l+=60*a),/w+/gi.test(t)&&(u=n?n.getDay()-1:0,u<0&&(u=6));let c="";return n&&(c=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:u,date:i,h:o,m:a,s:l,f:s,t:c}}(e,t));const i=(o=this,a=r,{"Y+|y+":{Y:"".concat(Number("".concat(a.year).slice(-2))),YY:rr("".concat(a.year).slice(-2),2),YYY:rr("".concat(a.year).slice(-3),3),def:e=>rr("".concat(a.year),e.length)},"M+":{M:a.month+1,MM:rr("".concat(a.month+1),2),MMM:o.locale_months_abbr[a.month],def:o.locale_months[a.month]},"W+|w+":{W:a.day,WW:rr("".concat(a.day),2),WWW:o.locale_days_abbr[a.day],def:o.locale_days[a.day]},"D+|d+":{D:a.date,def:e=>rr("".concat(a.date),e.length)},"h+|H+":{h:a.h,def:e=>rr("".concat(a.h),e.length)},"m+":{m:a.m,def:e=>rr("".concat(a.m),e.length)},"s+|S+":{s:a.s,def:e=>rr("".concat(a.s),e.length)},"f+|F+":{def(e){let t="".concat(a.f),n=e.length-t.length;if(n>0)for(let e=0;e<n;e++)t+="0";else n<0&&(t=t.slice(0,e.length));return t}},"t{1,2}|T{1,2}":{def(e){let t=a.t;return e[0].toUpperCase()===e[0]&&(t=t.toUpperCase()),t=t.slice(0,e.length),t}}});var o,a;const l=[];for(const e in i)Object.prototype.hasOwnProperty.call(i,e)&&l.push(e);const s=new RegExp(l.join("|"),"g");return t.replace(s,(e=>{let t,n,r;for(n in i)if(Object.prototype.hasOwnProperty.call(i,n)&&(t=new RegExp(n),t.test(e)))break;if(!t)return"";for(const t in i[n])if(t===e||t.toLowerCase()===e){r=i[n][t],void 0===r&&(r=i[n][t.toLowerCase()]);break}return void 0===r&&(r=i[n].def),"function"==typeof r&&(r=r(e)),r}))}}function ar(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new or(...t)}function lr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=ar(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,e,t),r=Jn(n.format.bind(n),{toKey:e=>"object"==typeof e&&"function"==typeof e.getTime?e.getTime():e});function i(e){return"IV"!==t?function(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}(e):e}function o(e){return e=i(e),r(e)}return o.format=function(e,t){return r.clear(),t=i(t),n.format(t,e)},o.locale=function(i){return n=ar(i,e,t),r=Jn(n.format.bind(n),{toKey:e=>"object"==typeof e?e.getTime():e}),this},o.qtype=function(e){return void 0!==e&&(t=e,r.clear()),t},o}function sr(){let e,{meta:t,id:n,key:r,localeInfo:i,fieldExtractor:o,value:a,type:l,sourceField:s}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const u=a||("dimension"===l?e=>null==e?void 0:e.qElemNo:e=>null==e?void 0:e.qValue),c="dimension"===l?"first":"avg",d=function(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return lr(e.qNumFormat.qFmt,e.qNumFormat.qType,t);let n="#",r=t&&void 0!==t.qThousandSep?t.qThousandSep:",",i=t&&void 0!==t.qDecimalSep?t.qDecimalSep:".",o="U",a=e&&!!e.qIsAutoFormat;return e&&e.qNumFormat?(n=e.qNumFormat.qFmt||n,r=e.qNumFormat.qThou||r,i=e.qNumFormat.qDec||i,o=e.qNumFormat.qType||o,a=a&&-1===["M"].indexOf(e.qNumFormat.qType)):a=!0,(a||"U"===o)&&(n="#".concat(i,"##"),o="U"),Yn(n,r,i,o,t)}(t,i),f="dimension"===l?"first":(e,t)=>d(t),p={id:()=>n,key:()=>r,raw:()=>t,title:()=>t.qFallbackTitle||t.label,type:()=>l,origin:()=>s,items:()=>(e||(e=o(p)),e),min:()=>t.qMin,max:()=>t.qMax,value:u,label:e=>(null==e?void 0:e.qText)||"",reduce:c,reduceLabel:f,formatter:()=>d,tags:()=>t.qTags};return p}function ur(e,t,n,r,i){return(t[e]||[]).map(((t,o)=>{const a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(o),l={instance:sr(Wt({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},i))};return l.attrDims=ur("qAttrDimInfo",t,n,a,Wt({},i,{value:e=>null==e?void 0:e.qElemNo,type:"dimension"})),l.attrExps=ur("qAttrExprInfo",t,n,a,Wt({},i,{value:e=>null==e?void 0:e.qNum,type:"measure"})),l.measures=ur("qMeasureInfo",t,n,a,Wt({},i,{value:e=>null==e?void 0:e.qValue,type:"measure"})),l}))}function cr(){let{key:e,data:t,config:n={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},i=t;if(!i)throw new Error('Missing "data" input');if(!i.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');const o=cr.util,a={cache:r,cube:i,localeInfo:n.localeInfo,fieldExtractor:null,pages:null,hierarchy:()=>null,virtualFields:n.virtualFields},l={key:()=>e,raw:()=>i,field:e=>function(e,t){let{cache:n}=t;if("number"==typeof e)return n.fields[e];const r=n.allFields;if("function"==typeof e){for(let t=0;t<r.length;t++)if(e(r[t]))return r[t];return!1}if("string"==typeof e){for(let t=0;t<r.length;t++)if(r[t].key()===e||r[t].title()===e)return r[t]}else if(e&&-1!==r.indexOf(e))return e;throw Error("Field not found: ".concat(e))}(e,a),fields:()=>r.fields.slice(),extract:e=>a.extractor(e,l,r,o),hierarchy:e=>a.hierarchy(e,l,r,o),_cache:()=>r};"K"===i.qMode||"T"===i.qMode||!i.qMode&&i.qNodesOnDim?(a.extractor=En,a.hierarchy=In,a.pages="K"===i.qMode?i.qStackedDataPages:i.qTreeDataPages):"S"===i.qMode?(a.extractor=Gt,a.pages=i.qDataPages,a.hierarchy=In):a.extractor=()=>[],a.fieldExtractor=e=>a.extractor({field:e},l,r,o);const s="S"===i.qMode?e=>e.qElemNumber:void 0,u="S"===i.qMode?e=>e.qNum:void 0;r.wrappedFields.push(...ur("qDimensionInfo",i,e,"",Wt({},a,{value:s,type:"dimension"}))),r.wrappedFields.push(...ur("qMeasureInfo",i,e,"",Wt({},a,{value:u,type:"measure"}))),r.fields=r.wrappedFields.map((e=>e.instance));const c=e=>{e.forEach((e=>{r.allFields.push(e.instance),c(e.measures),c(e.attrDims),c(e.attrExps)}))};return c(r.wrappedFields),(n.virtualFields||[]).forEach((t=>{const n=l.field(t.from),i=sr(zt({meta:n.raw(),id:"".concat(e,"/").concat(t.key),sourceField:n,fieldExtractor:e=>a.extractor({field:e},l,r,o),key:t.key,type:n.type(),localeInfo:a.localeInfo,value:n.value},t.override||{}));r.virtualFields.push(i)})),r.allFields.push(...r.virtualFields),l}const dr=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],fr=/\/qDimensionInfo(?:\/(\d+))?/,pr=/\/qMeasureInfo\/(\d+)/,hr=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,mr=/\/qAttrExprInfo\/(\d+)/,gr=/\/?qHyperCube/,vr=/\/?qTreeData/,yr=e=>"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14)),br=e=>"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13));function xr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r=t.byCells,i=t.primarySource,o=[],a={},l=e.isActive();let s=!1;return e.brushes().forEach((e=>{const t=function(e,t){let n=e,r=-1,i=-1,o="",a=e=>e;gr.test(e)?(o="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=yr):vr.test(e)&&(o="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=br);let l=!0;if(fr.test(e)&&(r=+fr.exec(e)[1]),pr.test(e)&&(i=+pr.exec(e)[1]),hr.test(e)){i=-1,r=0;const e=+hr.exec(n)[2];isNaN(e)||(r=e,n=n.replace(/\/\d+$/,"")),l=!1}if(mr.test(e)){const e=i;if(t){i=0;const a=pn(o,t);i+=(a.qMeasureInfo||[]).length,r>-1?(i=a.qDimensionInfo.slice(0,r).reduce(((e,t)=>e+t.qAttrExprInfo.length),i),r=-1):(i=a.qDimensionInfo.reduce(((e,t)=>e+t.qAttrExprInfo.length),i),i=a.qMeasureInfo.slice(0,e).reduce(((e,t)=>e+t.qAttrExprInfo.length),i)),i+=+mr.exec(n)[1]}else r>-1?(r=-1,i=+mr.exec(n)[1]):i+=+mr.exec(n)[1]+1}return dr.forEach((e=>{let[t,r]=e;n=n.replace(t,r)})),l&&(n=a(n)),n&&"/"!==n[0]&&(n="/".concat(n)),{measureIdx:i,dimensionIdx:r,path:n}}(e.id,n);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(s=!0,a.multiRangeSelectTreeDataValues||(a.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),n.forEach((e=>a.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:t.measureIdx,qDimensionIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}}))))}else{if("range"===e.type&&t.measureIdx>-1){const n=e.brush.ranges();n.length&&(s=!0,a.rangeSelectHyperCubeValues||(a.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),n.forEach((e=>a.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}}))))}if("range"===e.type&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(s=!0,a.selectHyperCubeContinuousRange||(a.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),n.forEach((e=>a.selectHyperCubeContinuousRange.ranges.push({qDimIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!1}}))))}if("value"===e.type&&t.dimensionIdx>-1)if(r)if(n&&n.qHyperCube&&("P"===n.qHyperCube.qMode||"T"===n.qHyperCube.qMode||"K"===n.qHyperCube.qMode)){const r=n.qHyperCube,o=r.qNoOfLeftDims,l=r.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(a.selectPivotCells||(a.selectPivotCells={path:t.path,cells:[]}),e.id===i||!i){const n=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e)));(0===o||l>=o)&&o>-1?n.forEach((e=>{a.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:l-o})})):n.forEach((e=>{a.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})})),s=!!a.selectPivotCells.cells.length}}else a.selectHyperCubeCells||(a.selectHyperCubeCells={path:t.path,cols:[]}),a.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==i&&(i||a.selectHyperCubeCells.values)||(a.selectHyperCubeCells.values=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e))),s=!!a.selectHyperCubeCells.values.length);else{const n=e.brush.values().map((e=>+e)).filter((e=>!isNaN(e)));s=!!n.length,o.push({params:[t.path,t.dimensionIdx,n,!1],method:"selectHyperCubeValues"})}}})),!s&&l?[{method:"resetMadeSelections",params:[]}]:(a.rangeSelectHyperCubeValues&&o.push({method:"rangeSelectHyperCubeValues",params:[a.rangeSelectHyperCubeValues.path,a.rangeSelectHyperCubeValues.ranges,[],null===(u=t.orMode)||void 0===u||u]}),a.selectHyperCubeContinuousRange&&o.push({method:"selectHyperCubeContinuousRange",params:[a.selectHyperCubeContinuousRange.path,a.selectHyperCubeContinuousRange.ranges]}),a.selectHyperCubeCells&&o.push({method:"selectHyperCubeCells",params:[a.selectHyperCubeCells.path,a.selectHyperCubeCells.values,a.selectHyperCubeCells.cols]}),a.selectPivotCells&&o.push({method:"selectPivotCells",params:[a.selectPivotCells.path,a.selectPivotCells.cells]}),a.multiRangeSelectTreeDataValues&&o.push({method:"multiRangeSelectTreeDataValues",params:[a.multiRangeSelectTreeDataValues.path,a.multiRangeSelectTreeDataValues.ranges]}),o);var u}function wr(e){cr.util=e.data("matrix").util,e.data("q",cr),e.formatter("q-number",Yn),e.formatter("q-time",lr)}function qr(e){var t=Ot(e.layout||{},e.path.split("/").join("."));if(!t)return!1;var n=t.qIsOneAndOnlyOne;return void 0!==n&&n}function Dr(e){var t=e.brush,n=e.colorField,r=e.legendAlias,i=e.useLegendCube,o=void 0!==i&&i;!n||/qAttrDimInfo/.test(n)?(t.removeKeyAlias("attrDim/qDimensionInfo/0"),r&&t.removeKeyAlias(r),t.addKeyAlias("attrDim/qDimensionInfo/0","qHyperCube/".concat(n))):o&&t.addKeyAlias(r,"qHyperCube/".concat(n))}wr.qBrushHelper=xr,wr.selections=xr;var Sr="Shift";var kr=function(e,t){return t[e]?kr(e+1,t):e},Mr=function(e,t){var n=t.reduce((function(e,t){return e[t]=!0,e}),{});return e.reduce((function(e,t,r){var i=kr(r,n);return n[i]=!0,e[r]=i,e}),{})};function Cr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.layout,n=e.filtered,r=void 0===n?{}:n,i=(null==t?void 0:t.qHyperCube)||{},o=i.qDimensionInfo,a=void 0===o?[]:o,l=i.qMeasureInfo,s=void 0===l?[]:l;return{dimensions:Mr(a,r.dimensions||[]),measures:Mr(s,r.measures||[])}}function Ir(e){var t=e.selection,n=e.fieldMap,r=t.method,i=t.params;if("selectHyperCubeValues"===r){var o=n.dimensions[i[1]];void 0!==o&&(i[1]=o)}return"selectHyperCubeContinuousRange"===r&&i[1].forEach((function(e){var t=n.dimensions[e.qDimIx];void 0!==t&&(e.qDimIx=t)})),t}var Er=[],Nr=0,Or=function(e){var t=Er.filter((function(e){var t;return null===(t=e.selections)||void 0===t?void 0:t.isActive()}));t.length&&("Enter"===e.key?t.forEach((function(e){return e.selections.confirm()})):"Escape"!==e.key&&"Esc"!==e.key||t.forEach((function(e){return e.selections.cancel()})))};function Lr(e){var t=e.chart,n=e.document,r=e.selectionInfo,i=e.eventName,o=e.componentName,a=e.brushName,l=void 0===a?"selection":a,s=e.emit,u=void 0===s?"rangeClear":s,c=r.event===i,d=n.querySelector("[data-key='".concat(o,"-edge-0']"));if(c||!d)return!1;var f=t.component(o);return!!f&&(f.emit(u),"string"==typeof l&&t.brush(l).clear(),f)}var Rr=["chart","document","selections","selectionInfo"],Pr=function(e){e.chart,e.document,e.selections,e.selectionInfo;var t=T(e,Rr);t.clearDiscrete(),t.clearContinuous(),t.clearMinor(),t.clearRange(),t.clearTap(),t.clearLegend()};function Tr(e){var t,n=e.lasso;null!=n&&null!==(t=n.active)&&void 0!==t&&t.call(n)&&(null==n||n.action(!1))}function jr(e){var t,n=e.chart,r=e.selectionInfo,i=e.selectionActions,o=e.actions,a=void 0===o?{}:o,l=e.selections,s=e.selectionEvents;if(!1===i||!1===s)return function(){};var u=i.reset,c=void 0===u?Tr:u,d=i.clear,f=!1!==d&&function(e){var t=e.clear,n=void 0===t?Pr:t,r=e.selections,i=e.selectionInfo,o=e.chart;return function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).cleared,t={selections:r,selectionInfo:i,chart:o,document:document,cleared:e};return n(P({clearDiscrete:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.eventName,o=void 0===i?"discreteRange":i,a=e.componentName,l=void 0===a?"discrete-range-brush":a,s=e.cleared;return Lr({selectionInfo:t,chart:n,document:r,eventName:void 0!==s&&s?void 0:o,componentName:l,emit:"areaClear",brushName:e.brushName})}(P(P({},t),e))},clearContinuous:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.eventName,o=void 0===i?"continuousRange":i,a=e.componentName,l=void 0===a?"continuous-range-brush":a,s=e.cleared;return Lr({selectionInfo:t,chart:n,document:r,eventName:void 0!==s&&s?void 0:o,componentName:l,brushName:e.brushName})}(P(P({},t),e))},clearMinor:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.componentName,o=void 0===i?"minor-range-brush":i,a=e.eventName,l=void 0===a?"minorRange":a,s=e.cleared,u=void 0!==s&&s,c=e.brushName,d=Lr({selectionInfo:t,chart:n,document:r,eventName:u?void 0:l,componentName:o,brushName:void 0!==c&&c});if(d){var f=d.settings.settings,p=f.scale,h=f.brush,m=n.scale(p).data().fields.map((function(e){return e.id()})),g=n.brush(h),v=g.brushes().filter((function(e){return"range"===e.type&&m.some((function(t){return t===e.id}))}));g&&v.length&&v.forEach((function(e){g.removeRanges(e.brush.ranges().map((function(t){return{key:e.id,range:t}})))}))}}(P(P({},t),e))},clearRange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.selections,o=e.eventName,a=void 0===o?"xAxis":o,l=e.cleared;Lr({selectionInfo:t,chart:n,document:r,eventName:void 0!==l&&l?void 0:a,componentName:"".concat(a,"-range-brush"),emit:"areaClear",brushName:!1})&&i.clear()}(P(P({},t),e))},clearTap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.chart,n=e.selectionInfo,r=e.selections,i=e.events,o=void 0===i?["tap"]:i,a=e.brushNames,l=void 0===a?[]:a;if(n&&o.includes(n.event)){var s=n.currentComponent;n.previousComponent!==s&&(r.clear(),l.forEach((function(e){return t.brush(e).end()})))}}(P(P({},t),e))},clearLegend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.selections,o=e.eventName,a=void 0===o?"legendRange":o,l=e.componentName,s=void 0===l?"legend-range-brush":l,u=e.cleared,c=void 0!==u&&u,d=e.brushName;Lr({selectionInfo:t,chart:n,document:r,eventName:c?void 0:a,componentName:s,brushName:void 0!==d&&d})&&i.clear()}(P(P({},t),e))}},t))}}({clear:d,selections:l,selectionInfo:r,chart:n}),p=function(e){var t=e.chart,n=e.actions,r=e.reset,i=e.clear,o=!1,a={deactivated:function(e){var t=(n||{}).lasso;r({e:e,lasso:void 0!==t&&t})},canceled:function(e){var o=(n||{}).lasso;r({e:e,lasso:void 0!==o&&o}),i({e:e,chart:t,document:document})},cleared:function(e){o||(o=!0,i({e:e,chart:t,document:document,cleared:!0}),o=!1)}};return!1===r&&delete a.deactivated,!1===i&&delete a.cleared,!1===r&&!1===i&&delete a.canceled,a}({chart:n,clear:f,reset:c,actions:a}),h={};Object.entries(p).forEach((function(e){var t=z(e,2),n=t[0],r=t[1];h[n]=function(e,t){return t?function(n){return t({event:n,defaultFunc:e})}:e}(r,s[n])}));var m=function(e){var t=e.selectionEvents,n=e.selections,r=e.selectionInfo,i=e.clear,o=e.chart,a=e.document,l=t.start,s={selections:n,selectionInfo:r,chart:o,document:a},u=function(e){return Object.assign(r,e||{})},c=function(e){var t=e.event,n=e.components;return function(){return function(e){var t=e.selectionInfo,n=e.clear,r=e.event,i=e.components,o=void 0===i?[]:i;(0,e.setSelectionInfo)(P(P({},void 0===t?{}:t),{},{event:r,components:o.map((function(e){return e.key})).filter(Boolean)})),n()}({event:t,components:n,clear:i,selectionInfo:r,setSelectionInfo:u})}};return"function"==typeof l?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];l(P(P({defaultFunc:c({event:e,components:t}),setSelectionInfo:u,clear:i},s),{},{event:e,components:t}))}:function(e){c({event:e,components:arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]})()}}({selectionEvents:s,selections:l,selectionInfo:r,clear:f,chart:n,document:document});return null==a||null===(t=a.select)||void 0===t||t.on("start",m),Object.entries(h).forEach((function(e){var t=z(e,2),n=t[0],r=t[1];null==l||l.on(n,r)})),function(){var e;null==a||null===(e=a.select)||void 0===e||e.removeListener("start",m),Object.entries(h).forEach((function(e){var t=z(e,2),n=t[0],r=t[1];null==l||l.removeListener(n,r)}))}}var zr=[{key:"qHyperCube/qDimensionInfo/0:numeric",includeMax:!1}];function Ar(e){var t=e.chart,n=e.actions,r=e.selections,i=e.picassoQ,o=e.config,a=o.allowSimultaneous,l=void 0!==a&&a,s=o.majorScale,u=void 0===s?void 0:s,c=o.selectionActions,d=void 0===c?{}:c,f=d.clear,p=d.reset,h=o.selectionEvents,m=void 0===h?{deactivated:void 0,canceled:void 0,cleared:void 0,start:void 0}:h,g=o.brushEvents,v=void 0===g?{}:g,y=o.brushName,b=void 0===y?"selection":y,x=o.brushMaxListeners,w=void 0===x?20:x,q=o.brushRanges,D=void 0!==q&&q,S=o.interceptors,k=void 0===S?{}:S,M=o.selectionsFn,C=void 0===M?i.selections:M,I=t.brush(b);if("number"==typeof w&&I.setMaxListeners(w),D){var E=!0===D?zr:D;I.configure({ranges:E})}var N={canSelect:!0,getIsSelectionLocked:!1,isInnerDimensionLocked:!1,lockedDimensions:[],singleSelectIndex:0,selectionInfo:{colorField:void 0,components:[],event:void 0,currentComponent:void 0,previousComponent:void 0}},O=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.selections,r=t.brush,i=t.majorScale,o=t.actions,a=t.selectionsFn,l=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).path,s=void 0===l?"/qHyperCubeDef":l;if(!n)return{layout:function(){},filteredFields:function(){},allowSimultaneous:function(){},release:function(){}};var u=++Nr,c=null,d={dimensions:[],measures:[]},f=[],p={};n.on=n.on.bind(n),n.isActive=n.isActive.bind(n),n.addListener=n.addListener.bind(n),n.removeListener=n.removeListener.bind(n);var h=function(e){var t=e.brush,n=e.getConfig;return{interceptor:function(e){var r=t.brushes(),i=n(),o=i.allowSimultaneous,a=i.layout,l=void 0===a?{}:a;r.forEach((function(n){var r,i,a;("range"===n.type||null!==(r=e[0])&&void 0!==r&&r.key&&(null===(i=e[0])||void 0===i?void 0:i.key)!==n.id&&0!==o.indexOf(null===(a=e[0])||void 0===a?void 0:a.key))&&t.clear([])}));var s=e.filter((function(e){return-2!==e.value}));if(s.length>1){var u=function(e){var t=e.layout,n=void 0===t?{}:t,r=e.values,i=void 0===r?[]:r;if(null==i||!i.length)return[];var o=Array.from(new Set(i.map((function(e){return e.key})))),a=[];return o.forEach((function(e){var t=qr({layout:n,path:e}),r=i.filter((function(t){return t.key===e})),o=t?[r.pop()]:r;a.push.apply(a,A(o))})),a.filter(Boolean)}({layout:l,values:s});return u}return s},rangeInterceptor:function(e){var r=t.brushes(),i=n().allowSimultaneous;return r.filter((function(e){return"value"===e.type})).length?(t.clear([]),e):(r.forEach((function(n){var r=n.id===e[0].key||i.includes(n.id)&&i.includes(e[0].key);"range"!==n.type||r||t.clear([])})),e)}}}({brush:r,getConfig:function(){return{layout:c,allowSimultaneous:f}}}),m=h.rangeInterceptor,g=h.interceptor;r.intercept("set-ranges",m),r.intercept("toggle-ranges",m),r.intercept("toggle-values",g),r.intercept("set-values",g),r.intercept("add-values",g),r.on("start",(function(){return n.begin(s)}));var v={activate:function(){},deactivated:function(){return r.end()},cleared:function(){return r.clear()},canceled:function(){return r.end()}};!function(e,t){Object.keys(t).forEach((function(n){e.on(n,t[n])}))}(n,v);var y=null==i||null===(e=i.max)||void 0===e?void 0:e.call(i);return null!=o&&o.select?(o.select.on("start",(function(){var e;r.start(),"function"==typeof o.select.getBrushOptions&&(p=(e=o.select).getBrushOptions.apply(e,arguments))})),o.select.on("end",(function(){var e=a(r,p,c),t=Cr({layout:c,filtered:d});e.forEach((function(e){var r=Ir({selection:e,fieldMap:t});(function(e,t,n){if(t&&void 0!==n&&"selectHyperCubeContinuousRange"===e.method){var r=e.params;if(r&&r[1]&&r[1][0]){var i=r[1][0],o=i.qDimIx,a=i.qRange;"undefined"!==o&&a&&!1===a.qMaxInclEq&&a.qMax>=n&&(a.qMaxInclEq=!0)}}})(r,o.select.brushSelectionIncludeMax,y),n.select(r)}))}))):r.on("update",(function(){var e=a(r,p,c),t=Cr({layout:c,filtered:d});e.forEach((function(e){n.select(Ir({selection:e,fieldMap:t}))}))})),0===Er.length&&document.addEventListener("keyup",Or),Er.push({key:u,selections:n}),{layout:function(e){c=e},filteredFields:function(e){d=e},allowSimultaneous:function(e){f=e},release:function(){c=null;var e=Er.indexOf(Er.filter((function(e){return e.key===u}))[0]);-1!==e&&Er.splice(e,1),Er.length||document.removeEventListener("keyup",Or),function(e,t){Object.keys(t).forEach((function(n){e.removeListener(n,t[n])}))}(n,v)}}}({brush:I,majorScale:u,actions:n,selections:r,picassoQ:i,selectionsFn:C});!function(e){var t=e.brush,n=e.interceptors,r=void 0===n?{}:n;Object.entries(r).forEach((function(e){var n=z(e,2),r=n[0],i=n[1];(Array.isArray(i)?i:[i]).forEach((function(e){t.intercept(r,e)}))}))}({brush:I,interceptors:k});var L=function(e){var t=e.chart,n=e.selectionActions,r=e.brush,i=e.actions,o=e.selectionInfo,a=e.selections,l=e.selectionEvents,s=function(e){var t=e.brush,n=e.chart,r=e.selectionInfo,i=e.brushEvents,o=void 0===i?{}:i,a=Object.entries(o).map((function(e){var i=z(e,2),o=i[0],a=i[1],l=function(){return a({chart:n,selectionInfo:r})};return t.on(o,l),[o,l]}));return function(){a.forEach((function(e){var n=z(e,2),r=n[0],i=n[1];t.removeListener(r,i)}))}}({brush:r,chart:t,selectionInfo:o,brushEvents:e.brushEvents}),u=jr({chart:t,selectionInfo:o,selectionActions:n,actions:i,selections:a,selectionEvents:l}),c=function(e){var t=e.actions;if(null==t||!t.lasso)return function(){};var n=!1,r=function(e){n||e.key!==Sr||(t.lasso.action(!0),n=!0)},i=function(e){e.key===Sr&&(t.lasso.action(!1),n=!1)};return document.addEventListener("keydown",r),document.addEventListener("keyup",i),function(){document.removeEventListener("keydown",r),document.removeEventListener("keyup",i)}}({actions:i});return function(){s(),u(),c()}}({chart:t,brush:I,actions:n,selections:r,selectionInfo:N.selectionInfo,selectionActions:{clear:f,reset:p},selectionEvents:m,brushEvents:v});if(l){var R=!0===l?A(Array(15)).map((function(e,t){return"qHyperCube/qMeasureInfo/".concat(t)})):l;O.allowSimultaneous(R)}return{unbindEvents:L,state:N,picassoSelections:O,brush:I}}var Fr=["colorField","useLegendCube"];function $r(e){var t=e.chart,n=e.selections,r=e.actions,i=void 0!==r&&r,o=e.config,a=void 0===o?{}:o,l=Ar({chart:t,actions:i,selections:n,picassoQ:wr,config:a}),s=l.unbindEvents,u=l.state,c=l.picassoSelections,d=l.brush,f=a.custom,p=void 0===f?{}:f,h=a.legendAlias,m=void 0===h?void 0:h,g=a.setBrushAliases,v=void 0===g?Dr:g;return{getIsDimensionLocked:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return u.lockedDimensions[e]},getIsSelectionLocked:function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return null!==(e=null==n||null===(t=n.isLocked)||void 0===t?void 0:t.call(n))&&void 0!==e?e:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(null==e||!e.length)return!1;var t=e.filter((function(e){return"object"===F(e.data)&&Array.isArray(e.data.fields)})).every((function(e){return e.data.fields.every((function(e){var t=e.raw();return!(!t.qLocked&&t.qCardinal)}))}));return t}(r)},getIsSingleSelect:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.singleSelectIndex;return u.singleSelectDimensions[e]},getCanSelect:function(){return u.canSelect},getSelectionsObject:function(){return n},getSelectionInfo:function(){return u.selectionInfo},setLayout:function(e){var t=function(e){var t,n,r,i=e.selections,o=e.picassoSelections,a=e.layout,l={lockedDimensions:[],singleSelectDimensions:[]};null!=i&&null!==(t=i.isModal)&&void 0!==t&&t.call(i)&&i.confirm(),o.layout(a);var s=(null!==(n=null==a?void 0:a.qHyperCube)&&void 0!==n?n:{}).qDimensionInfo,u=void 0===s?[]:s;return l.lockedDimensions=u.map((function(e){return!!e.qLocked})),l.singleSelectDimensions=u.map((function(e,t){return qr({layout:a,path:"qHyperCube/qDimensionInfo/".concat(t)})})),l.singleSelectIndex=function(e){var t,n=((null==e?void 0:e.qHyperCube)||{}).qDimensionInfo,r=void 0===n?[]:n;return null!==(t=r.map((function(e,t){var n;return!(e.qLocked||(null===(n=e.qCardinalities)||void 0===n?void 0:n.qHypercubeCardinal)<=1)&&t})).filter((function(e){return"number"==typeof e}))[0])&&void 0!==t?t:Math.max(r.length-1,0)}(a),l.canSelect=0===u.length||u.some((function(e){return!e.qLocked})),l.dimensionLocked=!(null===(r=u[0])||void 0===r||!r.qLocked),l}({selections:n,picassoSelections:c,layout:e});Object.assign(u,t)},setFilteredFields:function(e){c.filteredFields(e)},setBrushAliases:function(e){var t=e.colorField,n=e.useLegendCube,r=void 0!==n&&n,i=T(e,Fr),o=P({useLegendCube:r,colorField:t,brush:d,legendAlias:m},i);v(P(P({},o),{},{defaultFunc:function(){return Dr(o)}}))},destroy:function(){s(),c.release()},custom:P({},p)}}var _r="'Source Sans Pro', 'Arial', 'sans-serif'",Hr="#333333",Ur="#595959",Vr="#737373",Br="#cccccc",Wr="#e6e6e6";function Kr(e){var t={};return[].concat(A(e),A([["","","color"],["object","","fontFamily"],["object","axis.label.name","color",Ur],["object","axis.label.name","fontFamily",_r],["object","axis.label.name","fontSize","12px"],["object","axis.line.major","color",Br],["object","axis.line.minor","color",Wr],["object","axis.title","color"],["object","axis.title","fontFamily",_r],["object","axis.title","fontSize","13px"],["object","grid.line.highContrast","color",Wr],["object","grid.line.major","color",Br],["object","grid.line.minor","color",Wr],["object","label.value","color",Ur],["object","label.value","fontFamily",_r],["object","label.value","fontSize","12px"],[!1,"label.value","darkColor",Ur],[!1,"label.value","lightColor",Wr],["object","outOfRange","color","#999"],["object","legend.title","color",Hr],["object","legend.title","fontFamily",_r],["object","legend.title","fontSize","15px"],["object","legend.label","color",Ur],["object","legend.label","fontFamily",_r],["object","legend.label","fontSize","13px"],["object","referenceLine.label.name","color",Hr],["object","referenceLine.label.name","fontFamily",_r],["object","referenceLine.label.name","fontSize","12px"],["object","referenceLine.outOfBounds","color",Wr],["object","referenceLine.outOfBounds","fontFamily",_r],["object","referenceLine.outOfBounds","fontSize","12px"],["object","referenceLine.outOfBounds","backgroundColor",Vr,function(e){return"transparent"===e?Vr:e}]])).reduce((function(e,n){var r="".concat(n[0],"-").concat(n[1],"-").concat(n[2],"}");return t[r]||(t[r]=!0,e.push(n)),e}),[]).sort((function(e,t){return(e[0].split?e[0].split(".").length:0)-(t[0].split?t[0].split(".").length:0)}))}var Jr=function(e){return e};function Yr(e){var t=e.theme,n=e.id,r=e.transform,i=e.extend,o=e.matrix,a={},l=r.reduce((function(e,t){var n=z(t,2),r=n[0],i=n[1];return e[r]=i,e}),{});return o.forEach((function(e){var r=z(e,5),i=r[0],o=r[1],s=r[2],u=r[3],c=r[4],d=void 0===c?function(e){return e}:c,f=function(e){var t=e.theme,n=e.base,r=e.path,i=e.attribute,o=e.defaultValue,a=void 0===o?void 0:o;if(!t||!1===n)return a;var l=t.getStyle(n,r,i);return void 0===l?a:l}({theme:t,base:"object"===i&&n?"".concat("object",".").concat(n):i,path:o,attribute:s,defaultValue:u}),p=(l["".concat(o,".").concat(s)]||Jr)(d(f));Rt(a,[o,s].filter(Boolean).join("."),p)})),i.forEach((function(e){var t=z(e,2),n=t[0],r=t[1];Rt(a,n,r)})),a}function Gr(e,t,n){const r=`${e}.fontFamily`,i=`${e}.fontSize`;return{fontFamilyItem:{component:"dropdown",ref:r,options:()=>t.getOptions(r),defaultValue:()=>t.getDefaultValue(r)},fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:i,options:()=>t.getOptions(i),defaultValue:()=>t.getDefaultValue(i)},fontColorItem:{component:"color-picker",width:!1,ref:`${e}.color`,defaultValue:()=>({color:n.getStyle("object.funnelChart",e,"color")})}}}}}function Zr(e,t,n){const r=function(e){var t=e.theme,n=e.translator,r=e.config,i=void 0===r?{}:r,o=e.flags,a=function(e){var t=e.config,n=void 0===t?{}:t,r=n.id,i=n.paths;return{id:void 0===r?"object":"".concat("object",".").concat(r),paths:Array.isArray(i)?i:[]}}({config:i}),l=a.id,s=a.paths,u={};s.forEach((function(e){for(var r=e.split("."),i=u,a=0;a<r.length;a++){var s=r[a];a===r.length-1?i[s]=Z({theme:t,translator:n,id:l,path:e,flags:o}):void 0===i[s]&&(i[s]={}),i=i[s]}}));var c=function(e){for(var t=e.split("."),n=u,r=0;r<t.length;r++){var i=t[r];if(void 0===n[i])throw new Error("font-resolver: Path '".concat(e,"' could not be resolved."));n=n[i]}return n};return u.getDefaultValue=function(e){return c(e).getDefaultValue()},u.getOptions=function(e){return c(e).getOptions()},u}({theme:e,translator:n,flags:t,config:{id:"funnelChart",paths:["axis.title","axis.label.name","label.value"]}});return{component:"styling-panel",show:!0,chartType:"funnelchart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.FunnelChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,useBackground:!0,items:{axisTitleSection:{component:"panel-section",label:"Dimension title",items:{dimensionTitleItems:{component:"items",ref:"components",key:"axis",items:Gr("axis.title",r,e)}}},labelNameSection:{component:"panel-section",label:"Dimension value label",items:{dimensionTitleItems:{component:"items",ref:"components",key:"axis",items:Gr("axis.label.name",r,e)}}},labelValueSection:{component:"panel-section",label:"Value Label",items:{labelItems:{component:"items",ref:"components",key:"label",items:{...Gr("label.value",r,e),contrastColor:{component:"checkbox",type:"boolean",ref:"label.value.useContrastColor",translation:"properties.dataPoints.valuelabel.contrast",defaultValue:!0}}}}}}}}const Xr={uses:"sorting"},Qr=(e,t,n)=>{var r;const i=null==n||null===(r=n.sense)||void 0===r?void 0:r.theme;return{uses:"settings",items:{presentation:{type:"items",label:"Presentation",grouped:!0,items:{...(null==t?void 0:t.isEnabled("SENSECLIENT_IM_4897_VIZBUNDLE_STYLING"))&&{funnelStyling:Zr(i,t,e)},funnelmode:{ref:"funnel.mode",label:"Funnel Mode",type:"string",component:"dropdown",options:[{value:"AREA",label:"Area"},{value:"HEIGHT",label:"Height"},{value:"WIDTH",label:"Width"},{value:"ORDER",label:"Ordering"}],defaultValue:"WIDTH"},dimensionTitle:{ref:"showDimensionTitle",type:"boolean",component:"switch",label:"Dimension title",defaultValue:!0,options:[{value:!0,label:"Auto"},{value:!1,label:"Off"}]},valuesAuto:{ref:"dataPoint.auto",type:"boolean",label:"Value labels",component:"switch",defaultValue:!0,options:[{value:!0,label:"Auto"},{value:!1,label:"Custom"}]},labelMode:{ref:"dataPoint.labelMode",type:"string",component:"dropdown",options:[{value:"none",label:"None"},{value:"share",label:"Share"},{value:"value",label:"Values"}],defaultValue:"share",show:e=>!e.dataPoint.auto}}},colorsAndLegend:{uses:"colorsAndLegend",translation:"Colors",items:{colors:{items:{colorByLabel:{show:!1},expressionLabel:{show:!1}}},legend:{show:!1}}}}}},ei={uses:"data",items:{dimensions:{uses:"dimensions",items:{others:{items:{suppressOther:{defaultValue:!0,show:!1}}}},disabledRef:""},measures:{uses:"measures",disabledRef:""}}};function ti({translator:e,flags:t,anything:n}){return{type:"items",component:"accordion",items:{data:ei,sorting:Xr,settings:Qr(e,t,n)}}}function ni(e){return{definition:ti(e),support:{export:!0,exportData:!0,snapshot:!0,viewData:!1},importProperties:null,exportProperties:null}}const ri=[{path:"/qHyperCubeDef",dimensions:{min:1,max:1,description:()=>"Segments"},measures:{min:1,max:1,description(e){switch(e.funnel.mode){case"WIDTH":return"Width";case"AREA":return"Area";case"HEIGHT":return"Height";case"ORDER":return"Order";default:return""}},added(e,t){2===t.qHyperCubeDef.qInterColumnSortOrder.length&&1!==t.qHyperCubeDef.qInterColumnSortOrder[0]&&(t.qHyperCubeDef.qInterColumnSortOrder=[1,0])}}}];function ii(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var oi=Object.prototype.hasOwnProperty,ai=Object.prototype.toString,li=Object.defineProperty,si=Object.getOwnPropertyDescriptor,ui=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===ai.call(e)},ci=function(e){if(!e||"[object Object]"!==ai.call(e))return!1;var t,n=oi.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&oi.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||oi.call(e,t)},di=function(e,t){li&&"__proto__"===t.name?li(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},fi=function(e,t){if("__proto__"===t){if(!oi.call(e,t))return;if(si)return si(e,t).value}return e[t]},pi=function e(){var t,n,r,i,o,a,l=arguments[0],s=1,u=arguments.length,c=!1;for("boolean"==typeof l&&(c=l,l=arguments[1]||{},s=2),(null==l||"object"!=typeof l&&"function"!=typeof l)&&(l={});s<u;++s)if(null!=(t=arguments[s]))for(n in t)r=fi(l,n),l!==(i=fi(t,n))&&(c&&i&&(ci(i)||(o=ui(i)))?(o?(o=!1,a=r&&ui(r)?r:[]):a=r&&ci(r)?r:{},di(l,{name:n,newValue:e(c,a,i)})):void 0!==i&&di(l,{name:n,newValue:i}));return l},hi=ii(pi),mi={dataRelatedPropertiesPaths:["qHyperCube.qGrandTotalRow","qHyperCube.qHasOtherValues","qHyperCube.qSize","qHyperCube.qDimensionInfo[].qAttrDimInfo","qHyperCube.qDimensionInfo[].qCardinalities","qHyperCube.qDimensionInfo[].qMax","qHyperCube.qDimensionInfo[].qMin","qHyperCube.qDimensionInfo[].qStateCounts","qHyperCube.qMeasureInfo[].qApprMaxGlyphCount","qHyperCube.qMeasureInfo[].qAttrExprInfo","qHyperCube.qMeasureInfo[].qMax","qHyperCube.qMeasureInfo[].qMin","qHyperCube.qMeasureInfo[].qTrendLines","qHyperCube.qTreeNodesOnDim","qSelectionInfo"]};function gi(e){const{qHyperCube:t,...n}=e,{qAxisData:r,qDataPages:i,qStackedDataPages:o,qTreeDataPages:a,...l}=t,s=hi(!0,{},{...n,qHyperCube:{...l,qAxisData:null,qDataPages:null,qStackedDataPages:null,qTreeDataPages:null}}),{dataRelatedPropertiesPaths:u}=mi;return u.forEach((e=>{const t=e.split("[");if(1===t.length)void 0!==Ot(s,e)&&Rt(s,e,null);else{const e=t[0],n=t[1].split("].")[1];Ot(s,e,[]).forEach((e=>{void 0!==Ot(e,n)&&Rt(e,n,null)}))}})),s}var vi={axes:{trackBy:function({isTime:e,isContinuous:t,isMeasure:n,isMajor:r}){return i=>{if(e||t||n){var o;if("line"===i.type)return null!==(o=i.tickValue)&&void 0!==o?o:"axis";if("text"===i.type)return`${i.tickValue} ${i.text}`;if("container"===i.type){const e=i.children.filter((e=>"text"===e.type)).map((e=>e.text));return`${i.data.value} ${e.join("")}`}return Math.random()}if(r){if("line"===i.type&&void 0===i.tickValue)return"axis";const e=i.transform&&i.transform.match(/rotate/gi)?"rotated":"horizontal";return`${i.data.group?`${i.data.group.value} `:""}${i.data.value} ${i.text} ${e}`}return Math.random()}},compensateForLayoutChanges:function({isMeasure:e,isTime:t,isContinuous:n,isHorizontal:r,dock:i}){return({currentNodes:o,currentRect:a,previousRect:l})=>{const s=a.x-l.x,u=a.y-l.y,c=a.width-l.width,d=a.height-l.height;e?("left"===i&&o.forEach((e=>{"line"===e.type?(e.x1+=c,e.x2+=c):"text"===e.type&&(e.x+=c)})),"left"!==i&&"right"!==i||o.forEach((e=>{var t;("line"===e.type&&(e.x1===e.x2?(e.y1=a.y,e.y2=e.y1+a.height):(Math.round(e.y1)<a.y||e.y1>a.y+a.height)&&(e.strokeWidth=0)),"text"===e.type)&&((e.y<a.y||e.y>a.y+a.height)&&(e.fontSize="1px","#"===(null===(t=e.fill)||void 0===t?void 0:t[0])&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`)))})),"top"!==i&&"bottom"!==i||o.forEach((e=>{var t;("line"===e.type&&(e.y1===e.y2?(e.x1=a.x,e.x2=e.x1+a.width):(Math.round(e.x1)<a.x||e.x1>a.x+a.width)&&(e.strokeWidth=0)),"text"===e.type)&&((e.x<a.x||e.x>a.x+a.width)&&(e.fontSize="1px","#"===(null===(t=e.fill)||void 0===t?void 0:t[0])&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`)))}))):t?o.forEach((e=>{"line"===e.type?e.y1===e.y2?e.x2+=c:e.x1===e.x2&&(e.x1-=s,e.x2-=s):"text"===e.type&&(e.x-=s)})):n||r?o.forEach((e=>{"line"===e.type&&e.y1===e.y2&&(e.x1+=s,e.x2+=s+c)})):o.forEach((e=>{"line"===e.type&&e.x1===e.x2&&(e.y1+=u,e.y2+=u+d)}))}}},bars:{trackBy:function(e){return e.data.typeIndex?`${e.data.value} ${e.data.typeIndex.value}`:e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:`${e.data.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach((e=>{e.children&&e.children.length>0&&e.children.forEach((e=>{void 0!==e.x&&void 0!==e.y?(e.x-=r,e.y-=i):e.transform=`translate(${-r}, ${-i})`}))}))}},barOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach((e=>{e.children&&e.children.length>0&&e.children.forEach((e=>{e.opacity=0}))}))}},labels:{trackBy:function(e){if("rect"===e.type)return"-3"===e.data?Math.random():`${e.type} ${e.data} ${e.rotation}`;const t=e.transform&&e.transform.match(/rotate/gi)?"rotated":"horizontal";return`${e.type} ${e.data} ${e.text} ${t}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach((e=>{e.transform&&e.transform.match(/rotate\(-90/gi)?(e.x+=i,e.y-=r):(e.x-=r,e.y-=i)}))},linkData:function(e){return e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:`${e.data.value}`}},lines:{trackBy:function(e){var t;return"line"===e.type?null!==(t=e.value)&&void 0!==t?t:Math.random():"path"===e.type?`${e.generatorType} ${e.layerObj.id} ${e.data.source.key}`:Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;e.forEach((e=>{if(void 0!==e.x1&&void 0!==e.y1)e.y1===e.y2?(e.x2=e.x1+t.width,e.y1-=i,e.y2-=i):e.x1===e.x2&&(e.y2=e.y1+t.height,e.x1-=r,e.x2-=r);else{const t="x"===e.major.p?r/e.major.size:i/e.major.size,n="y"===e.minor.p?i/e.minor.size:r/e.minor.size;e.points.forEach((e=>{e.modified||(e.major-=t,e.minor-=n,e.minor0-=n,e.modified=!0)}))}}))}},lineOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach((e=>{e.opacity=0}))}},markers:{trackBy:function(e){return e.data.line?`${e.data.line.value} ${e.data.major.value}`:`${e.data.major.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach((e=>{switch(e.type){case"circle":e.cx-=r,e.cy-=i;break;case"rect":e.x-=r,e.y-=i;break;case"path":e.transform=`translate(${-r}, ${-i})`}}))}},points:{trackBy:function(e){return e.data.line?`${e.data.line.value} ${e.data.major.value}`:`${e.data.major.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach((e=>{e.cx-=r,e.cy-=i}))}},refLineLabels:{trackBy:function(e){if(void 0!==e.value){if("rect"===e.type)return`${e.value}`;if("text"===e.type)return`${e.value} ${e.text}`}return Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y,o=t.width-n.width,a=t.height-n.height;let l=-r,s=-i;e.forEach((e=>{switch(e.dock){case"right":r>0&&(l=t.width);break;case"left":o<0&&(l=-n.width);break;case"top":a<0&&(s=-n.height);break;case"bottom":i>0&&(s=t.height)}switch(e.type){case"text":case"rect":e.x+=l,e.y+=s;break;case"circle":e.cx+=l,e.cy+=s;break;case"path":e.transform=`translate(${l}, ${s})`}}))}},shadowBars:{trackBy:function(){return Math.random()}},cacheProperties:function({viewCache:e,layout:t}){const n=gi(t);e.set("dataIndependentProperties",JSON.stringify(n))},propertiesHaveChanged:function({viewCache:e,layout:t}){const n=gi(t);return e.get("dataIndependentProperties")!==JSON.stringify(n)},nonUpdatingNode:{trackBy:function(){return Math.random()}}};function yi(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function bi(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function xi(){}[["FULL",{width:550,height:450}],["MEDIUM",{width:400,height:220}],["SMALL",{width:300,height:150}],["XSMALL",{width:150,height:75}],["SPARK",{width:0,height:0}]].forEach((([e,{width:t,height:n}])=>{}));var wi=.7,qi=1/wi,Di="\\s*([+-]?\\d+)\\s*",Si="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ki="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Mi=/^#([0-9a-f]{3,8})$/,Ci=new RegExp(`^rgb\\(${Di},${Di},${Di}\\)$`),Ii=new RegExp(`^rgb\\(${ki},${ki},${ki}\\)$`),Ei=new RegExp(`^rgba\\(${Di},${Di},${Di},${Si}\\)$`),Ni=new RegExp(`^rgba\\(${ki},${ki},${ki},${Si}\\)$`),Oi=new RegExp(`^hsl\\(${Si},${ki},${ki}\\)$`),Li=new RegExp(`^hsla\\(${Si},${ki},${ki},${Si}\\)$`),Ri={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 Pi(){return this.rgb().formatHex()}function Ti(){return this.rgb().formatRgb()}function ji(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Mi.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?zi(t):3===n?new $i(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Ai(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Ai(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=Ci.exec(e))?new $i(t[1],t[2],t[3],1):(t=Ii.exec(e))?new $i(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Ei.exec(e))?Ai(t[1],t[2],t[3],t[4]):(t=Ni.exec(e))?Ai(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Oi.exec(e))?Wi(t[1],t[2]/100,t[3]/100,1):(t=Li.exec(e))?Wi(t[1],t[2]/100,t[3]/100,t[4]):Ri.hasOwnProperty(e)?zi(Ri[e]):"transparent"===e?new $i(NaN,NaN,NaN,0):null}function zi(e){return new $i(e>>16&255,e>>8&255,255&e,1)}function Ai(e,t,n,r){return r<=0&&(e=t=n=NaN),new $i(e,t,n,r)}function Fi(e){return e instanceof xi||(e=ji(e)),e?new $i((e=e.rgb()).r,e.g,e.b,e.opacity):new $i}function $i(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function _i(){return`#${Bi(this.r)}${Bi(this.g)}${Bi(this.b)}`}function Hi(){const e=Ui(this.opacity);return`${1===e?"rgb(":"rgba("}${Vi(this.r)}, ${Vi(this.g)}, ${Vi(this.b)}${1===e?")":`, ${e})`}`}function Ui(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Vi(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Bi(e){return((e=Vi(e))<16?"0":"")+e.toString(16)}function Wi(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ji(e,t,n,r)}function Ki(e){if(e instanceof Ji)return new Ji(e.h,e.s,e.l,e.opacity);if(e instanceof xi||(e=ji(e)),!e)return new Ji;if(e instanceof Ji)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,l=o-i,s=(o+i)/2;return l?(a=t===o?(n-r)/l+6*(n<r):n===o?(r-t)/l+2:(t-n)/l+4,l/=s<.5?o+i:2-o-i,a*=60):l=s>0&&s<1?0:a,new Ji(a,l,s,e.opacity)}function Ji(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Yi(e){return(e=(e||0)%360)<0?e+360:e}function Gi(e){return Math.max(0,Math.min(1,e||0))}function Zi(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}yi(xi,ji,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Pi,formatHex:Pi,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Ki(this).formatHsl()},formatRgb:Ti,toString:Ti}),yi($i,(function(e,t,n,r){return 1===arguments.length?Fi(e):new $i(e,t,n,null==r?1:r)}),bi(xi,{brighter(e){return e=null==e?qi:Math.pow(qi,e),new $i(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?wi:Math.pow(wi,e),new $i(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new $i(Vi(this.r),Vi(this.g),Vi(this.b),Ui(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:_i,formatHex:_i,formatHex8:function(){return`#${Bi(this.r)}${Bi(this.g)}${Bi(this.b)}${Bi(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Hi,toString:Hi})),yi(Ji,(function(e,t,n,r){return 1===arguments.length?Ki(e):new Ji(e,t,n,null==r?1:r)}),bi(xi,{brighter(e){return e=null==e?qi:Math.pow(qi,e),new Ji(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?wi:Math.pow(wi,e),new Ji(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new $i(Zi(e>=240?e-240:e+120,i,r),Zi(e,i,r),Zi(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Ji(Yi(this.h),Gi(this.s),Gi(this.l),Ui(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=Ui(this.opacity);return`${1===e?"hsl(":"hsla("}${Yi(this.h)}, ${100*Gi(this.s)}%, ${100*Gi(this.l)}%${1===e?")":`, ${e})`}`}}));const Xi=Math.PI/180,Qi=180/Math.PI,eo=.96422,to=.82521,no=4/29,ro=6/29,io=3*ro*ro,oo=ro*ro*ro;function ao(e){if(e instanceof lo)return new lo(e.l,e.a,e.b,e.opacity);if(e instanceof ho)return mo(e);e instanceof $i||(e=Fi(e));var t,n,r=fo(e.r),i=fo(e.g),o=fo(e.b),a=so((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?t=n=a:(t=so((.4360747*r+.3850649*i+.1430804*o)/eo),n=so((.0139322*r+.0971045*i+.7141733*o)/to)),new lo(116*a-16,500*(t-a),200*(a-n),e.opacity)}function lo(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function so(e){return e>oo?Math.pow(e,1/3):e/io+no}function uo(e){return e>ro?e*e*e:io*(e-no)}function co(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function fo(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function po(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof ho)return new ho(e.h,e.c,e.l,e.opacity);if(e instanceof lo||(e=ao(e)),0===e.a&&0===e.b)return new ho(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Qi;return new ho(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new ho(e,t,n,null==r?1:r)}function ho(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function mo(e){if(isNaN(e.h))return new lo(e.l,0,0,e.opacity);var t=e.h*Xi;return new lo(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}yi(lo,(function(e,t,n,r){return 1===arguments.length?ao(e):new lo(e,t,n,null==r?1:r)}),bi(xi,{brighter(e){return new lo(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new lo(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new $i(co(3.1338561*(t=eo*uo(t))-1.6168667*(e=1*uo(e))-.4906146*(n=to*uo(n))),co(-.9787684*t+1.9161415*e+.033454*n),co(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),yi(ho,po,bi(xi,{brighter(e){return new ho(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new ho(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return mo(this).rgb()}}));var go,vo,yo={isDark:function(e){return po(e).l<70}};function bo(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}1===(go=bo).length&&(vo=go,go=function(e,t){return bo(vo(e),t)});var xo="$";function wo(){}function qo(e,t){var n=new wo;if(e instanceof wo)e.each((function(e,t){n.set(t,e)}));else if(Array.isArray(e)){var r,i=-1,o=e.length;if(null==t)for(;++i<o;)n.set(i,e[i]);else for(;++i<o;)n.set(t(r=e[i],i,e),r)}else if(e)for(var a in e)n.set(a,e[a]);return n}function Do(){}wo.prototype=qo.prototype={constructor:wo,has:function(e){return xo+e in this},get:function(e){return this[xo+e]},set:function(e,t){return this[xo+e]=t,this},remove:function(e){var t=xo+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===xo&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===xo&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===xo&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===xo&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===xo&&++e;return e},empty:function(){for(var e in this)if(e[0]===xo)return!1;return!0},each:function(e){for(var t in this)t[0]===xo&&e(this[t],t.slice(1),this)}};var So=qo.prototype;Do.prototype={constructor:Do,has:So.has,add:function(e){return this[xo+(e+="")]=e,this},remove:So.remove,clear:So.clear,values:So.keys,size:So.size,empty:So.empty,each:So.each},hi.bind(null,!0);const ko=[[2,4,6],[2,4],[3]],Mo=[,[,,[[1,2]],[[1,2,3],[1,3]],[[1,2,4],[1,4]],[[1,2,4],[1,5]],[[1,2,4,6],[2,4,6],[1,3,6],[1,6]],[[1,2,4,6],[2,4,6],[1,3,6],[1,7]],[[1,2,4,8],[2,4,8],[1,8]],[[1,2,4,8],[2,4,8],[1,3,9],[1,9]],[[1,2,4,6,10],[1,2,4,10],[1,3,10],[3,10],[1,10]]],[,,,[[2,3]],[[2,3,4],[2,4]],[[2,3,4],[2,4],[2,5]],[[2,4,6],[2,6]],[[2,4,6],[2,6],[2,7]],[[2,4,8],[2,8]],[[2,4,8],[2,8],[2,9]],[[2,4,6,10],[2,4,10],[5,10],[3,10]]],[,,,,[[3,4]],[[3,4,5],[3,5]],[[3,4,5,6],[3,6]],[[3,4,5,6],[3,5,7],[3,7]],[[3,4,5,6,8],[3,5,7],[4,8],[3,8]],[[3,4,5,6,8],[3,4,6,9],[3,4,6,8],[3,6,9],[4,8],[3,9]],[[4,6,10],[5,10],[3,10]]],[,,,,,[[4,5]],[[4,5,6],[4,6]],[[4,5,6,7],[4,5,6],[4,6]],[[4,5,6,7,8],[4,5,6,7],[4,6,8],[4,8]],[[4,5,6,7,8],[4,6,9],[4,6,8],[4,8]],[[4,6,10],[5,7,9],[5,10],[4,10]]],[,,,,,,[[5,6]],[[5,6,7],[5,7]],[[5,6,7,8],[5,6,7],[6,8]],[[5,6,7,8,9],[5,6,7,8],[5,7,9],[5,9]],[[6,8,10],[5,10]]],[,,,,,,,[[6,7]],[[6,7,8],[6,8]],[[6,7,8,9],[6,7,8],[6,9]],[[6,7,8,9,10],[6,8,10],[6,10]]],[,,,,,,,,[[7,8]],[[7,8,9],[7,9]],[[7,8,9,10],[8,10],[7,10],[7,9]]],[,,,,,,,,,[[8,9]],[[8,9,10],[8,10]]],[,,,,,,,,,,[[9,10]]]];function Co(e,t,n){const r=e?e.length:0;let i,o=void 0===t?Number.MAX_VALUE:e[0]/t;for(i=1;i<r;i++)o=Math.min(o,e[i]/e[i-1]);void 0!==n&&(o=Math.min(o,n/e[r-1])),e.splice(0,0,o)}function Io(e,t,n){let r;const i=e?e.length:0;for(r=0;r<i;r++)Co(e[r],t,n)}function Eo(e,t=!1){const n=t?"IM_5791_SVG_LABEL_RENDERING":"IM_4962_SVG_CHART_LABELS";if(null!=e&&e.isEnabled(n))return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?void 0:"svg"}function No(e){const t=e.node.desc&&e.node.desc.share;return t?e.formatter("share")(t):""}function Oo(e){return e.formatter("num")(e.node.data.num.value)}function Lo({data:e}){return e?e.label:""}function Ro(e){if(e.dataPoint.auto)return No;switch(e.dataPoint.labelMode){case"share":default:return No;case"value":return Oo;case"none":return null}}function Po(e,t,n,r,i){const o=i.axis.label.getStyle(),a=i.label.value.getStyle(),l=n.getStyles().label.value;return{type:"labels",key:"funnel-labels",renderer:Eo(e,!0),layout:{displayOrder:2},settings:{sources:[{component:"fun",selector:".labelLeft",strategy:{type:"rows",settings:{align:0,fill:o.fill,fontSize:parseInt(o.fontSize,10),fontFamily:o.fontFamily,labels:[{label:Lo}],linkData:e=>`${e.data.value} ${Lo(e)}`}}},{component:"fun",selector:".labelCenter",strategy:{type:"rows",settings:{align:.5,fill:a.useContrastColor?({node:e})=>(e=>yo.isDark(e.desc.fill)?l.lightColor:l.darkColor)(e):a.fill,fontSize:parseInt(a.fontSize,10),fontFamily:a.fontFamily,labels:[{label:Ro(t)}],linkData:e=>"none"===t.dataPoint.labelMode?Math.random():`${e.data.value} ${Ro(t)(e)}`}}}]},animations:{enabled:r,trackBy:e=>e.data}}}function To(e,t,n){if(!t.showDimensionTitle||!t.qHyperCube.qDimensionInfo[0].qFallbackTitle)return!1;const r=t.qHyperCube.qDimensionInfo[0].qFallbackTitle,i=n.axis.title.getStyle();return{type:"text",key:"dimension-title",renderer:Eo(e,!0),text:r,layout:{dock:"top"},style:{text:{fill:i.fill,fontSize:i.fontSize,fontFamily:i.fontFamily}}}}function jo({picasso:e,flags:t}){const y=c(),b=d(),x=f(),w=p(),q=h(),D=m().qLocaleInfo,[S,k,M,C]=function({picasso:e}){const t=n(),c=r(),d=i(),f=o(),p=a(),h=l(),[m,g]=s(),[v,y]=s(),[b,x]=s(),[w,q]=s();return u((()=>{const n=It({picasso:e,model:d,app:f,translator:p,config:{auto:!1,key:"fill"}});t.style.overflow="hidden";const r=e({renderer:{prio:[h.renderer||"svg"]}}).chart({element:t,data:[],settings:{}}),i=$r({chart:r,selections:c,config:{selectionActions:!1}});return x(i),y(n),g(r),q(function(){var e={};return{get:function(t){return e[t]},set:function(t,n){return e[t]=n,n},has:function(t){return t in e},remove:function(t){delete e[t]},empty:function(){e={}}}}()),()=>{i.destroy(),r.destroy()}}),[]),[m,v,b,w]}({picasso:e}),I=l(),E=()=>{const e=S.element.clientWidth!==C.get("width")||S.element.clientHeight!==C.get("height");return!1!==I.chartAnimations&&!e&&!vi.propertiesHaveChanged({viewCache:C,layout:y})},[N]=g((()=>{if(!k)return Promise.resolve();const t=function(e){return{layout:e,keys:{SCALE:{FILL:"fill"},COMPONENT:{FUNNEL:"fun",FUNNEL_LABELS:"funnel-labels",DIMENSION_TITLE:"dimension-title"}}}}(y),n=function(e){var t=e.picassoInstance,n=e.plugins,r=e.pluginArgs,i=void 0===r?{}:r,o={initialized:!1,definitions:[]};return{initialize:function(){return O(j().mark((function e(){var r,a,l,s;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!o.initialized){e.next=2;break}return e.abrupt("return");case 2:return a=Promise.all(n.filter((function(e){return"custom-component"===e.info.type})).map(function(){var e=O(j().mark((function e(n){var r;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.info.componentName){e.next=2;break}throw new Error("plugin-service: Custom component is missing componentName");case 2:return e.next=4,n.fn(P({},i));case 4:if("object"===F(r=e.sent)){e.next=7;break}throw new Error("plugin-service: Custom component needs to be an object");case 7:t.component(n.info.componentName,r);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())),l=Promise.all(n.filter((function(e){return"component-definition"===e.info.type})).map((function(e){return e.fn(P({},i))}))),e.next=6,Promise.all([a,l]);case 6:s=e.sent,o.initialized=!0,(r=o.definitions).push.apply(r,A(s[1]));case 9:case"end":return e.stop()}}),e)})))()},extendComponents:function(e){return o.initialized?(o.definitions.filter(Boolean).forEach((function(t){var n=z(e.filter((function(e){return e.key&&e.key===t.key})),1)[0];if(n){var r=ee(!0,{},n.brush);ee(!0,n,t),t.brush&&(n.brush=function(e,t){return"object"===F(e)&&Object.keys(e).length?(Array.isArray(t.consume)&&(e.consume=Pt({originalArray:e.consume,newArray:t.consume,matchKey:"context"})),Array.isArray(t.trigger)&&(e.trigger=Pt({originalArray:e.trigger,newArray:t.trigger,matchKey:"on"})),e):t}(r,t.brush))}else e.push(t)})),e):e}}}({picassoInstance:e,plugins:q,pluginArgs:t});return Promise.all([k.initialize({createConfig:({getUseBaseColors:e})=>({theme:b,colorProps:{...y.color,useBaseColors:e(y)},layout:y,hc:y.qHyperCube})}),n.initialize()]).then((()=>n))}),[y,k]);u((()=>{if(!S||!k||!N)return;const e=[{type:"q",key:"qHyperCube",data:y.qHyperCube,config:{localeInfo:D}},...k.getData()],n=function(e){var t=e.theme,n=e.config,r=void 0===n?{}:n,i=r.id,o=r.resolve,a=void 0===o?[]:o,l=r.transform,s=void 0===l?[]:l,u=r.extend,c=void 0===u?[]:u,d={theme:t,matrix:Kr(a),styles:void 0};return d.styles=Yr({theme:t,id:i,transform:s,extend:c,matrix:d.matrix}),{getStyles:function(){return d.styles},getTheme:function(){return d.theme},setTheme:function(e){d.theme=e,d.styles=Yr({theme:e,id:i,transform:s,extend:c,matrix:d.matrix})}}}({theme:b,config:{id:"funnelChart"}}),r=function({layout:e,themeService:t}){const n=t.getStyles(),r=t=>{var n,r;return null!==(n=null===(r=e.components)||void 0===r?void 0:r.find((e=>e.key===t)))&&void 0!==n?n:void 0};return{axis:{title:{getStyle:()=>{var e,t,i,o,a,l;return{fontFamily:null!==(e=null===(t=r("axis"))||void 0===t||null===(t=t.axis)||void 0===t||null===(t=t.title)||void 0===t?void 0:t.fontFamily)&&void 0!==e?e:n.axis.title.fontFamily,fontSize:null!==(i=null===(o=r("axis"))||void 0===o||null===(o=o.axis)||void 0===o||null===(o=o.title)||void 0===o?void 0:o.fontSize)&&void 0!==i?i:n.axis.title.fontSize,fill:null!==(a=null===(l=r("axis"))||void 0===l||null===(l=l.axis)||void 0===l||null===(l=l.title)||void 0===l||null===(l=l.color)||void 0===l?void 0:l.color)&&void 0!==a?a:n.axis.title.color}}},label:{getStyle:()=>{var e,t,i,o,a,l;return{fontSize:null!==(e=null===(t=r("axis"))||void 0===t||null===(t=t.axis)||void 0===t||null===(t=t.label)||void 0===t||null===(t=t.name)||void 0===t?void 0:t.fontSize)&&void 0!==e?e:n.axis.label.name.fontSize,fontFamily:null!==(i=null===(o=r("axis"))||void 0===o||null===(o=o.axis)||void 0===o||null===(o=o.label)||void 0===o||null===(o=o.name)||void 0===o?void 0:o.fontFamily)&&void 0!==i?i:n.axis.label.name.fontFamily,fill:null!==(a=null===(l=r("axis"))||void 0===l||null===(l=l.axis)||void 0===l||null===(l=l.label)||void 0===l||null===(l=l.name)||void 0===l||null===(l=l.color)||void 0===l?void 0:l.color)&&void 0!==a?a:n.axis.label.name.color}}}},label:{value:{getStyle:()=>{var e,t,i,o,a,l,s,u;return{fontSize:null!==(e=null===(t=r("label"))||void 0===t||null===(t=t.label)||void 0===t||null===(t=t.value)||void 0===t?void 0:t.fontSize)&&void 0!==e?e:n.label.value.fontSize,fontFamily:null!==(i=null===(o=r("label"))||void 0===o||null===(o=o.label)||void 0===o||null===(o=o.value)||void 0===o?void 0:o.fontFamily)&&void 0!==i?i:n.label.value.fontFamily,fill:null!==(a=null===(l=r("label"))||void 0===l||null===(l=l.label)||void 0===l||null===(l=l.value)||void 0===l||null===(l=l.color)||void 0===l?void 0:l.color)&&void 0!==a?a:n.label.value.color,useContrastColor:null===(s=null===(u=r("label"))||void 0===u||null===(u=u.label)||void 0===u||null===(u=u.value)||void 0===u?void 0:u.useContrastColor)||void 0===s||s}}}}}}({layout:y,themeService:n}),i=function({flags:e,layout:t,constraints:n,colorService:r,themeService:i,styleModel:o,pluginService:a,animationsEnabled:l}){const s=function(e){return{...e.getScales()}}(r),u=r.getPalettes(),c=function({layout:e,constraints:t,colorService:n,animationsEnabled:r}){const i=n.getDatumProps(),o=n.getColor();return{type:"funnel",key:"fun",data:{extract:{field:"qDimensionInfo/0",props:{num:{field:"qMeasureInfo/0"},...i}}},brush:t.select||t.active?{}:{trigger:[{contexts:["selection"],data:[""]}],consume:[{context:"selection",filter:e=>"section"===e.tag,style:{inactive:{opacity:.3}}}]},settings:{num:{ref:"num"},fill:o,mode:e.funnel.mode},animations:{enabled:r,isMainComponent:!0,trackBy:e=>`${e.tag}: ${e.data.value}`}}}({layout:t,constraints:n,colorService:r,animationsEnabled:l}),d=[c,Po(e,t,i,l,o),To(e,t,o)];return{palettes:u,scales:s,components:a.extendComponents(d),formatters:{share:{type:"d3-number",format:".1%"},num:{data:{field:"qMeasureInfo/0"}}}}}({flags:t,layout:y,constraints:x,colorService:k,themeService:n,styleModel:r,pluginService:N,animationsEnabled:E});S.update({data:e,settings:i}),C.set("width",S.element.clientWidth),C.set("height",S.element.clientHeight),vi.cacheProperties({viewCache:C,layout:y})}),[S,k,b.name(),N,x]),u((()=>{S&&(S.update(),C.set("width",S.element.clientWidth),C.set("height",S.element.clientHeight))}),[w.width,w.height]),u((()=>{M&&M.setLayout(y)}),[y]),v((e=>k.getSnapshotData().then((t=>(e.snapshotData=e.snapshotData||{},e.snapshotData.content=e.snapshotData.content||{},e.snapshotData.content.chartData=t,e))).catch((()=>e))))}function zo(n){!function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(y).forEach((t=>{e.add(y[t])}))}}(n.translator);const r=e();r.use(t),r.component("funnel",C);const{flags:i}=n;return{ext:ni(n),qae:{properties:{initial:I},data:{targets:ri}},component(){jo({picasso:r,flags:i})}}}!function(){let e,t;for(Io(ko,1,10),e=0;e<Mo.length;e++)if(Mo[e])for(t=0;t<Mo[e].length;t++)Array.isArray(Mo[e][t])&&Io(Mo[e][t])}();export{zo as default};
|