@nebula.js/sn-pie-chart 1.20.2 → 1.20.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/core/esm/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  /*
2
- * @nebula.js/sn-pie-chart v1.20.2
2
+ * @nebula.js/sn-pie-chart v1.20.4
3
3
  * Copyright (c) 2022 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
6
6
 
7
- import e from"hammerjs";import t from"picasso.js";import n from"picasso-plugin-q";import r from"picasso-plugin-hammer";import o from"react";import{Button as i,Popover as a,List as s,ListItem as l,ListItemIcon as u,ListItemText as c}from"@material-ui/core";import p from"react-dom";import{withThemeCreator as d,createGenerateClassName as f,StylesProvider as m,ThemeProvider as h}from"@material-ui/styles";import{useOptions as g,useElement as y,useSelections as v,useState as b,useLayout as x,useTranslator as q,useAction as D,useEffect as C,useModel as w,useApp as S,useStaleLayout as M,usePlugins as E,useConstraints as I,useTheme as A,useAppLayout as k,useEmbed as T,usePromise as L,useRect as O,onTakeSnapshot as P,useImperativeHandle as N}from"@nebula.js/stardust";var R={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_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":"Выключить выбор лассо"}}};function F(){return(F=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}const j=(e,t,n,r,o)=>e?e.getStyle(t,n,r):o;var H=Object.freeze({__proto__:null,getThemeStyle:j});function _(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var z=Object.prototype.hasOwnProperty,V=Object.prototype.toString,U=Object.defineProperty,B=Object.getOwnPropertyDescriptor,W=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===V.call(e)},$=function(e){if(!e||"[object Object]"!==V.call(e))return!1;var t,n=z.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&z.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||z.call(e,t)},Y=function(e,t){U&&"__proto__"===t.name?U(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},K=function(e,t){if("__proto__"===t){if(!z.call(e,t))return;if(B)return B(e,t).value}return e[t]},J=function e(){var t,n,r,o,i,a,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(n in t)r=K(s,n),s!==(o=K(t,n))&&(c&&o&&($(o)||(i=W(o)))?(i?(i=!1,a=r&&W(r)?r:[]):a=r&&$(r)?r:{},Y(s,{name:n,newValue:e(c,a,o)})):void 0!==o&&Y(s,{name:n,newValue:o}));return s};const G="center",Z="bottom";var X={NoDataExist:{label:"NoDataExist",alignment:G,default:!0},OnlyNanData:{label:"OnlyNanData",alignment:G,default:!0},OnlyNegativeOrZeroValues:{label:"OnlyNegativeOrZeroValues",alignment:G,default:!1},LimitedData:{label:"LimitedData",alignment:Z,default:!1},OnlyNanColor:{label:"OnlyNanColor",alignment:Z,default:!1},NegativeOrZeroValues:{label:"NegativeOrZeroValues",alignment:Z,default:!1},DataRangeIncludingZero:{label:"DataRangeIncludingZero",alignment:Z,default:!1}};const Q=[["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}]],ee={};Q.forEach((([e,{width:t,height:n}])=>{ee[e]={width:t,height:n}}));const te={getLayoutModes:()=>ee,getLayoutMode(e,t){let n;for(n=0;n<Q.length;++n)if(e>=Q[n][1].width&&t>=Q[n][1].height)return Q[n][0];return"SPARK"}};function ne(e,t){return{layoutModes:te.getLayoutModes(),center:void 0!==t.minCenterRatio?{minWidthRatio:t.minCenterRatio,minHeightRatio:t.minCenterRatio}:void 0,logicalSize:t.logicalSize?{align:.5,preserveAspectRatio:!0,...t.logicalSize}:void 0}}const re=(e,t,n)=>{const r=t.split(".");let o,i=e;if(void 0===i)return n;for(o=0;o<r.length;++o){if(void 0===i[r[o]])return n;i=i[r[o]]}return i};function oe(e,t){const n=e.component(t);return n&&n._DO_NOT_USE_getInfo&&n._DO_NOT_USE_getInfo().offset}const ie=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),ae=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),se=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),le={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),isLtrChar:e=>ie.test(e),isRtlChar:e=>ae.test(e)||se.test(e),detectTextDirection(e){const t=e?e.length:0;let n,r;for(n=0;n<t;n++){if(r=e[n],le.isLtrChar(r))return"ltr";if(le.isRtlChar(r))return"rtl"}return"ltr"}},ue={getColorSymbol:(e,t)=>e.h("div",{style:{display:"inline-block",width:"10px",height:"10px","background-color":t.color.fill,margin:"0 8px"}}),getNodeFillColor:e=>e.attrs&&void 0!==e.attrs.fill?e.attrs.fill:e.children&&e.children[0]&&e.children[0].attrs&&void 0!==e.children[0].attrs.fill?e.children[0].attrs.fill:void 0,getColor(e,t,n){const r=t.data,o=e.resources.formatter,i=e.resources.dataset,a={};if(n.coloring.label&&(a.label=""+n.coloring.label),"color"!==n.coloring.type&&r.fillTooltip){const e=o("fill"),t="measure"===n.coloring.fieldType;if(a.value=t&&e?e(r.fillTooltip.value):r.fillTooltip.label?r.fillTooltip.label:r.fillTooltip.value,!n.coloring.label){const e=i(r.fillTooltip.source.key).field(r.fillTooltip.source.field).title();a.label=""+e}}return a.fill=void 0===r._fillColor?ue.getNodeFillColor(t):r._fillColor,a},getMeasure:(e,t)=>({label:""+e(t.source.key).field(t.source.field).title(),value:""===t.label||"NaN"===t.label?"-":t.label,field:t.source.field}),hideColorRow:(e,t)=>void 0===e.color.value||e.measures.some((e=>e.field===t.coloring.field)),getTitleRow(e,t){const n=le.detectTextDirection(e.title);return[{content:e.title,style:{"font-weight":"bold","text-align":t?"right":"left",direction:n},colspan:2},{}]},getDescriptionRow(e,t){const n=le.detectTextDirection(e.value);return[{content:e.value,style:{"text-align":t?"right":"left",direction:n},colspan:2},{}]},getNMoreRow(e,t,n){const r=t?t.get("Object.ChartTooltip.NMore",e):`+${e} more`;return[{content:r,style:{"font-weight":"bold","text-align":n?"right":"left",direction:le.detectTextDirection(r)},colspan:2},{}]},getSeparatorRow:()=>[{content:"",style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:2},{}],getColorRow(e,t,n){const r=le.detectTextDirection(t.color.label),o=n?[":",t.color.label]:[t.color.label,":"],i=le.detectTextDirection(t.color.value);return[{content:o,style:{"text-align":n?"right":"left",direction:r}},{content:n?[t.color.value,ue.getColorSymbol(e,t)]:[ue.getColorSymbol(e,t),t.color.value],style:{"text-align":n?"left":"right",direction:i,"vertical-align":"middle"}}]},getMeasureRow(e,t,n,r,o=!1){const i=le.detectTextDirection(e.label),a=r?[":",e.label]:[e.label,":"],s=le.detectTextDirection(e.value);let l;return l=o?r?[e.value,ue.getColorSymbol(t,n)]:[ue.getColorSymbol(t,n),e.value]:[e.value],[{content:a,style:{"text-align":r?"right":"left",direction:i}},{content:l,style:{"text-align":r?"left":"right",direction:s,"vertical-align":"middle"}}]}};function ce(e,t,n,r){const o=parseInt(j(e,t,n,r),10);if(!isNaN(o))return o}const pe=e=>t=>e.getContrastingColorTo(t.node.attrs.fill);function de(e,t){return{padding:10,placements:e.simplifiedPlacements.map((n=>function(e,t,n){return{position:e.position,justify:e.justify,fill:e.onBackground?j(t,n,"label.value","color"):pe(t),overflow:e.overflow,padding:e.padding}}(n,t,e.themeId))),fontSize:ce(t,e.themeId,"label.value","fontSize"),fontFamily:j(t,e.themeId,"label.value","fontFamily"),label:e.label}}function fe(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function me(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function he(){}var ge=1/.7,ye="\\s*([+-]?\\d+)\\s*",ve="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",be="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",xe=/^#([0-9a-f]{3,8})$/,qe=new RegExp("^rgb\\("+[ye,ye,ye]+"\\)$"),De=new RegExp("^rgb\\("+[be,be,be]+"\\)$"),Ce=new RegExp("^rgba\\("+[ye,ye,ye,ve]+"\\)$"),we=new RegExp("^rgba\\("+[be,be,be,ve]+"\\)$"),Se=new RegExp("^hsl\\("+[ve,be,be]+"\\)$"),Me=new RegExp("^hsla\\("+[ve,be,be,ve]+"\\)$"),Ee={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 Ie(){return this.rgb().formatHex()}function Ae(){return this.rgb().formatRgb()}function ke(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=xe.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Te(t):3===n?new Pe(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Le(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Le(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=qe.exec(e))?new Pe(t[1],t[2],t[3],1):(t=De.exec(e))?new Pe(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Ce.exec(e))?Le(t[1],t[2],t[3],t[4]):(t=we.exec(e))?Le(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Se.exec(e))?je(t[1],t[2]/100,t[3]/100,1):(t=Me.exec(e))?je(t[1],t[2]/100,t[3]/100,t[4]):Ee.hasOwnProperty(e)?Te(Ee[e]):"transparent"===e?new Pe(NaN,NaN,NaN,0):null}function Te(e){return new Pe(e>>16&255,e>>8&255,255&e,1)}function Le(e,t,n,r){return r<=0&&(e=t=n=NaN),new Pe(e,t,n,r)}function Oe(e){return e instanceof he||(e=ke(e)),e?new Pe((e=e.rgb()).r,e.g,e.b,e.opacity):new Pe}function Pe(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Ne(){return"#"+Fe(this.r)+Fe(this.g)+Fe(this.b)}function Re(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function Fe(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function je(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new _e(e,t,n,r)}function He(e){if(e instanceof _e)return new _e(e.h,e.s,e.l,e.opacity);if(e instanceof he||(e=ke(e)),!e)return new _e;if(e instanceof _e)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new _e(a,s,l,e.opacity)}function _e(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function ze(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}fe(he,ke,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:Ie,formatHex:Ie,formatHsl:function(){return He(this).formatHsl()},formatRgb:Ae,toString:Ae}),fe(Pe,(function(e,t,n,r){return 1===arguments.length?Oe(e):new Pe(e,t,n,null==r?1:r)}),me(he,{brighter:function(e){return e=null==e?ge:Math.pow(ge,e),new Pe(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Pe(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ne,formatHex:Ne,formatRgb:Re,toString:Re})),fe(_e,(function(e,t,n,r){return 1===arguments.length?He(e):new _e(e,t,n,null==r?1:r)}),me(he,{brighter:function(e){return e=null==e?ge:Math.pow(ge,e),new _e(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new _e(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,o=2*n-r;return new Pe(ze(e>=240?e-240:e+120,o,r),ze(e,o,r),ze(e<120?e+240:e-120,o,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},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var Ve=Math.PI/180,Ue=180/Math.PI,Be=4/29,We=6/29,$e=3*We*We;function Ye(e){if(e instanceof Ke)return new Ke(e.l,e.a,e.b,e.opacity);if(e instanceof tt)return nt(e);e instanceof Pe||(e=Oe(e));var t,n,r=Xe(e.r),o=Xe(e.g),i=Xe(e.b),a=Je((.2225045*r+.7168786*o+.0606169*i)/1);return r===o&&o===i?t=n=a:(t=Je((.4360747*r+.3850649*o+.1430804*i)/.96422),n=Je((.0139322*r+.0971045*o+.7141733*i)/.82521)),new Ke(116*a-16,500*(t-a),200*(a-n),e.opacity)}function Ke(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function Je(e){return e>.008856451679035631?Math.pow(e,1/3):e/$e+Be}function Ge(e){return e>We?e*e*e:$e*(e-Be)}function Ze(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Xe(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Qe(e){if(e instanceof tt)return new tt(e.h,e.c,e.l,e.opacity);if(e instanceof Ke||(e=Ye(e)),0===e.a&&0===e.b)return new tt(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Ue;return new tt(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function et(e,t,n,r){return 1===arguments.length?Qe(e):new tt(e,t,n,null==r?1:r)}function tt(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function nt(e){if(isNaN(e.h))return new Ke(e.l,0,0,e.opacity);var t=e.h*Ve;return new Ke(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}fe(Ke,(function(e,t,n,r){return 1===arguments.length?Ye(e):new Ke(e,t,n,null==r?1:r)}),me(he,{brighter:function(e){return new Ke(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new Ke(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 Pe(Ze(3.1338561*(t=.96422*Ge(t))-1.6168667*(e=1*Ge(e))-.4906146*(n=.82521*Ge(n))),Ze(-.9787684*t+1.9161415*e+.033454*n),Ze(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),fe(tt,et,me(he,{brighter:function(e){return new tt(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new tt(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return nt(this).rgb()}}));var rt=-.29227,ot=-.90649,it=1.97294;function at(e){if(e instanceof st)return new st(e.h,e.s,e.l,e.opacity);e instanceof Pe||(e=Oe(e));var t=e.r/255,n=e.g/255,r=e.b/255,o=(-.6557636667999999*r+-1.7884503806*t-3.5172982438*n)/-5.9615122912,i=r-o,a=(it*(n-o)-rt*i)/ot,s=Math.sqrt(a*a+i*i)/(it*o*(1-o)),l=s?Math.atan2(a,i)*Ue-120:NaN;return new st(l<0?l+360:l,s,o,e.opacity)}function st(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function lt(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}fe(st,(function(e,t,n,r){return 1===arguments.length?at(e):new st(e,t,n,null==r?1:r)}),me(he,{brighter:function(e){return e=null==e?ge:Math.pow(ge,e),new st(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new st(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*Ve,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),o=Math.sin(e);return new Pe(255*(t+n*(-.14861*r+1.78277*o)),255*(t+n*(rt*r+ot*o)),255*(t+n*(it*r)),this.opacity)}})),function(e){1===e.length&&(e=function(e){return function(t,n){return lt(e(t),n)}}(e))}(lt);function ut(){}function ct(e,t){var n=new ut;if(e instanceof ut)e.each((function(e,t){n.set(t,e)}));else if(Array.isArray(e)){var r,o=-1,i=e.length;if(null==t)for(;++o<i;)n.set(o,e[o]);else for(;++o<i;)n.set(t(r=e[o],o,e),r)}else if(e)for(var a in e)n.set(a,e[a]);return n}function pt(){}ut.prototype=ct.prototype={constructor:ut,has:function(e){return"$"+e in this},get:function(e){return this["$"+e]},set:function(e,t){return this["$"+e]=t,this},remove:function(e){var t="$"+e;return t in this&&delete this[t]},clear:function(){for(var e in this)"$"===e[0]&&delete this[e]},keys:function(){var e=[];for(var t in this)"$"===t[0]&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)"$"===t[0]&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)"$"===t[0]&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)"$"===t[0]&&++e;return e},empty:function(){for(var e in this)if("$"===e[0])return!1;return!0},each:function(e){for(var t in this)"$"===t[0]&&e(this[t],t.slice(1),this)}};var dt=ct.prototype;function ft(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function mt(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function ht(){}pt.prototype={constructor:pt,has:dt.has,add:function(e){return this["$"+(e+="")]=e,this},remove:dt.remove,clear:dt.clear,values:dt.keys,size:dt.size,empty:dt.empty,each:dt.each};var gt=1/.7,yt="\\s*([+-]?\\d+)\\s*",vt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",bt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",xt=/^#([0-9a-f]{3})$/,qt=/^#([0-9a-f]{6})$/,Dt=new RegExp("^rgb\\("+[yt,yt,yt]+"\\)$"),Ct=new RegExp("^rgb\\("+[bt,bt,bt]+"\\)$"),wt=new RegExp("^rgba\\("+[yt,yt,yt,vt]+"\\)$"),St=new RegExp("^rgba\\("+[bt,bt,bt,vt]+"\\)$"),Mt=new RegExp("^hsl\\("+[vt,bt,bt]+"\\)$"),Et=new RegExp("^hsla\\("+[vt,bt,bt,vt]+"\\)$"),It={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 At(e){var t;return e=(e+"").trim().toLowerCase(),(t=xt.exec(e))?new Pt((t=parseInt(t[1],16))>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):(t=qt.exec(e))?kt(parseInt(t[1],16)):(t=Dt.exec(e))?new Pt(t[1],t[2],t[3],1):(t=Ct.exec(e))?new Pt(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=wt.exec(e))?Tt(t[1],t[2],t[3],t[4]):(t=St.exec(e))?Tt(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Mt.exec(e))?Rt(t[1],t[2]/100,t[3]/100,1):(t=Et.exec(e))?Rt(t[1],t[2]/100,t[3]/100,t[4]):It.hasOwnProperty(e)?kt(It[e]):"transparent"===e?new Pt(NaN,NaN,NaN,0):null}function kt(e){return new Pt(e>>16&255,e>>8&255,255&e,1)}function Tt(e,t,n,r){return r<=0&&(e=t=n=NaN),new Pt(e,t,n,r)}function Lt(e){return e instanceof ht||(e=At(e)),e?new Pt((e=e.rgb()).r,e.g,e.b,e.opacity):new Pt}function Ot(e,t,n,r){return 1===arguments.length?Lt(e):new Pt(e,t,n,null==r?1:r)}function Pt(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Nt(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Rt(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new jt(e,t,n,r)}function Ft(e){if(e instanceof jt)return new jt(e.h,e.s,e.l,e.opacity);if(e instanceof ht||(e=At(e)),!e)return new jt;if(e instanceof jt)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new jt(a,s,l,e.opacity)}function jt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Ht(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}ft(ht,At,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),ft(Pt,Ot,mt(ht,{brighter:function(e){return e=null==e?gt:Math.pow(gt,e),new Pt(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Pt(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"#"+Nt(this.r)+Nt(this.g)+Nt(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+")")}})),ft(jt,(function(e,t,n,r){return 1===arguments.length?Ft(e):new jt(e,t,n,null==r?1:r)}),mt(ht,{brighter:function(e){return e=null==e?gt:Math.pow(gt,e),new jt(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new jt(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,o=2*n-r;return new Pt(Ht(e>=240?e-240:e+120,o,r),Ht(e,o,r),Ht(e<120?e+240:e-120,o,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 _t=Math.PI/180,zt=180/Math.PI,Vt=4/29,Ut=6/29,Bt=3*Ut*Ut;function Wt(e){if(e instanceof $t)return new $t(e.l,e.a,e.b,e.opacity);if(e instanceof Xt){if(isNaN(e.h))return new $t(e.l,0,0,e.opacity);var t=e.h*_t;return new $t(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}e instanceof Pt||(e=Lt(e));var n,r,o=Gt(e.r),i=Gt(e.g),a=Gt(e.b),s=Yt((.2225045*o+.7168786*i+.0606169*a)/1);return o===i&&i===a?n=r=s:(n=Yt((.4360747*o+.3850649*i+.1430804*a)/.96422),r=Yt((.0139322*o+.0971045*i+.7141733*a)/.82521)),new $t(116*s-16,500*(n-s),200*(s-r),e.opacity)}function $t(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function Yt(e){return e>.008856451679035631?Math.pow(e,1/3):e/Bt+Vt}function Kt(e){return e>Ut?e*e*e:Bt*(e-Vt)}function Jt(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Gt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Zt(e){if(e instanceof Xt)return new Xt(e.h,e.c,e.l,e.opacity);if(e instanceof $t||(e=Wt(e)),0===e.a&&0===e.b)return new Xt(NaN,0,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*zt;return new Xt(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function Xt(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}ft($t,(function(e,t,n,r){return 1===arguments.length?Wt(e):new $t(e,t,n,null==r?1:r)}),mt(ht,{brighter:function(e){return new $t(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new $t(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 Pt(Jt(3.1338561*(t=.96422*Kt(t))-1.6168667*(e=1*Kt(e))-.4906146*(n=.82521*Kt(n))),Jt(-.9787684*t+1.9161415*e+.033454*n),Jt(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),ft(Xt,(function(e,t,n,r){return 1===arguments.length?Zt(e):new Xt(e,t,n,null==r?1:r)}),mt(ht,{brighter:function(e){return new Xt(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new Xt(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return Wt(this).rgb()}}));var Qt=-.29227,en=-.90649,tn=1.97294,nn=tn*en,rn=1.78277*tn,on=-.6557636667999999;function an(e){if(e instanceof ln)return new ln(e.h,e.s,e.l,e.opacity);e instanceof Pt||(e=Lt(e));var t=e.r/255,n=e.g/255,r=e.b/255,o=(on*r+nn*t-rn*n)/(on+nn-rn),i=r-o,a=(tn*(n-o)-Qt*i)/en,s=Math.sqrt(a*a+i*i)/(tn*o*(1-o)),l=s?Math.atan2(a,i)*zt-120:NaN;return new ln(l<0?l+360:l,s,o,e.opacity)}function sn(e,t,n,r){return 1===arguments.length?an(e):new ln(e,t,n,null==r?1:r)}function ln(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function un(e){return function(){return e}}function cn(e,t){return function(n){return e+n*t}}function pn(e){return 1==(e=+e)?dn: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):un(isNaN(t)?n:t)}}function dn(e,t){var n=t-e;return n?cn(e,n):un(isNaN(e)?t:e)}function fn(e){return function t(n){function r(t,r){var o=e((t=sn(t)).h,(r=sn(r)).h),i=dn(t.s,r.s),a=dn(t.l,r.l),s=dn(t.opacity,r.opacity);return function(e){return t.h=o(e),t.s=i(e),t.l=a(Math.pow(e,n)),t.opacity=s(e),t+""}}return n=+n,r.gamma=t,r}(1)}function mn(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)]}ft(ln,sn,mt(ht,{brighter:function(e){return e=null==e?gt:Math.pow(gt,e),new ln(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new ln(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*_t,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),o=Math.sin(e);return new Pt(255*(t+n*(-.14861*r+1.78277*o)),255*(t+n*(Qt*r+en*o)),255*(t+n*(tn*r)),this.opacity)}})),function e(t){var n=pn(t);function r(e,t){var r=n((e=Ot(e)).r,(t=Ot(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=dn(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1),fn((function(e,t){var n=t-e;return n?cn(e,n>180||n<-180?n-360*Math.round(n/360):n):un(isNaN(e)?t:e)})),fn(dn);var hn,gn=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function yn(e){return new vn(e)}function vn(e){if(!(t=gn.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 bn(e,t){var n=mn(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}yn.prototype=vn.prototype,vn.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 xn={"%":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 bn(100*e,t)},r:bn,s:function(e,t){var n=mn(e,t);if(!n)return e+"";var r=n[0],o=n[1],i=o-(hn=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+mn(e,Math.max(0,t+i-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function qn(e){return e}var Dn,Cn=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function wn(e){var t,n,r=e.grouping&&e.thousands?(t=e.grouping,n=e.thousands,function(e,r){for(var o=e.length,i=[],a=0,s=t[0],l=0;o>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),i.push(e.substring(o-=s,o+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return i.reverse().join(n)}):qn,o=e.currency,i=e.decimal,a=e.numerals?function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(e.numerals):qn,s=e.percent||"%";function l(e){var t=(e=yn(e)).fill,n=e.align,l=e.sign,u=e.symbol,c=e.zero,p=e.width,d=e.comma,f=e.precision,m=e.trim,h=e.type;"n"===h?(d=!0,h="g"):xn[h]||(null==f&&(f=12),m=!0,h="g"),(c||"0"===t&&"="===n)&&(c=!0,t="0",n="=");var g="$"===u?o[0]:"#"===u&&/[boxX]/.test(h)?"0"+h.toLowerCase():"",y="$"===u?o[1]:/[%p]/.test(h)?s:"",v=xn[h],b=/[defgprs%]/.test(h);function x(e){var o,s,u,x=g,q=y;if("c"===h)q=v(e)+q,e="";else{var D=(e=+e)<0;if(e=v(Math.abs(e),f),m&&(e=function(e){e:for(var t,n=e.length,r=1,o=-1;r<n;++r)switch(e[r]){case".":o=t=r;break;case"0":0===o&&(o=r),t=r;break;default:if(o>0){if(!+e[r])break e;o=0}}return o>0?e.slice(0,o)+e.slice(t+1):e}(e)),D&&0==+e&&(D=!1),x=(D?"("===l?l:"-":"-"===l||"("===l?"":l)+x,q=("s"===h?Cn[8+hn/3]:"")+q+(D&&"("===l?")":""),b)for(o=-1,s=e.length;++o<s;)if(48>(u=e.charCodeAt(o))||u>57){q=(46===u?i+e.slice(o+1):e.slice(o))+q,e=e.slice(0,o);break}}d&&!c&&(e=r(e,1/0));var C=x.length+e.length+q.length,w=C<p?new Array(p-C+1).join(t):"";switch(d&&c&&(e=r(w+e,w.length?p-q.length:1/0),w=""),n){case"<":e=x+e+q+w;break;case"=":e=x+w+e+q;break;case"^":e=w.slice(0,C=w.length>>1)+x+e+q+w.slice(C);break;default:e=w+x+e+q}return a(e)}return f=null==f?6:/[gprs]/.test(h)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),x.toString=function(){return e+""},x}return{format:l,formatPrefix:function(e,t){var n=l(((e=yn(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(function(e){return(e=mn(Math.abs(e)))?e[1]:NaN}(t)/3))),o=Math.pow(10,-r),i=Cn[8+r/3];return function(e){return n(o*e)+i}}}}!function(e){(Dn=wn(e)).format,Dn.formatPrefix}({decimal:".",thousands:",",grouping:[3],currency:["$",""]});var Sn=new Date,Mn=new Date;function En(e,t,n,r){function o(t){return e(t=new Date(+t)),t}return o.floor=o,o.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},o.round=function(e){var t=o(e),n=o.ceil(e);return e-t<n-e?t:n},o.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},o.range=function(n,r,i){var a,s=[];if(n=o.ceil(n),i=null==i?1:Math.floor(i),!(n<r&&i>0))return s;do{s.push(a=new Date(+n)),t(n,i),e(n)}while(a<n&&n<r);return s},o.filter=function(n){return En((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&&(o.count=function(t,r){return Sn.setTime(+t),Mn.setTime(+r),e(Sn),e(Mn),Math.floor(n(Sn,Mn))},o.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?o.filter(r?function(t){return r(t)%e==0}:function(t){return o.count(0,t)%e==0}):o:null}),o}var In=En((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));In.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?En((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):In:null},In.range;En((function(e){e.setTime(1e3*Math.floor(e/1e3))}),(function(e,t){e.setTime(+e+1e3*t)}),(function(e,t){return(t-e)/1e3}),(function(e){return e.getUTCSeconds()})).range,En((function(e){e.setTime(6e4*Math.floor(e/6e4))}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getMinutes()})).range,En((function(e){var t=6e4*e.getTimezoneOffset()%36e5;t<0&&(t+=36e5),e.setTime(36e5*Math.floor((+e-t)/36e5)+t)}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getHours()})).range;var An=En((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5}),(function(e){return e.getDate()-1}));function kn(e){return En((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-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/6048e5}))}An.range;var Tn=kn(0),Ln=kn(1),On=kn(2),Pn=kn(3),Nn=kn(4),Rn=kn(5),Fn=kn(6);Tn.range,Ln.range,On.range,Pn.range,Nn.range,Rn.range,Fn.range,En((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 jn=En((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()}));jn.every=function(e){return isFinite(e=Math.floor(e))&&e>0?En((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},jn.range,En((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getUTCMinutes()})).range,En((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getUTCHours()})).range;var Hn=En((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/864e5}),(function(e){return e.getUTCDate()-1}));function _n(e){return En((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)/6048e5}))}Hn.range;var zn=_n(0),Vn=_n(1),Un=_n(2),Bn=_n(3),Wn=_n(4),$n=_n(5),Yn=_n(6);zn.range,Vn.range,Un.range,Bn.range,Wn.range,$n.range,Yn.range,En((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 Kn=En((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 Jn(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 Gn(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 Zn(e){return{y:e,m:0,d:1,H:0,M:0,S:0,L:0}}Kn.every=function(e){return isFinite(e=Math.floor(e))&&e>0?En((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},Kn.range;var Xn,Qn,er,tr={"-":"",_:" ",0:"0"},nr=/^\s*\d+/,rr=/^%/,or=/[\\^$*+?|[\]().{}]/g;function ir(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",i=o.length;return r+(i<n?new Array(n-i+1).join(t)+o:o)}function ar(e){return e.replace(or,"\\$&")}function sr(e){return new RegExp("^(?:"+e.map(ar).join("|")+")","i")}function lr(e){for(var t={},n=-1,r=e.length;++n<r;)t[e[n].toLowerCase()]=n;return t}function ur(e,t,n){var r=nr.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function cr(e,t,n){var r=nr.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function pr(e,t,n){var r=nr.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function dr(e,t,n){var r=nr.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function fr(e,t,n){var r=nr.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function mr(e,t,n){var r=nr.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function hr(e,t,n){var r=nr.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function gr(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 yr(e,t,n){var r=nr.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function vr(e,t,n){var r=nr.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function br(e,t,n){var r=nr.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function xr(e,t,n){var r=nr.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function qr(e,t,n){var r=nr.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Dr(e,t,n){var r=nr.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Cr(e,t,n){var r=nr.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function wr(e,t,n){var r=nr.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Sr(e,t,n){var r=rr.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Mr(e,t,n){var r=nr.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Er(e,t,n){var r=nr.exec(t.slice(n));return r?(e.Q=1e3*+r[0],n+r[0].length):-1}function Ir(e,t){return ir(e.getDate(),t,2)}function Ar(e,t){return ir(e.getHours(),t,2)}function kr(e,t){return ir(e.getHours()%12||12,t,2)}function Tr(e,t){return ir(1+An.count(jn(e),e),t,3)}function Lr(e,t){return ir(e.getMilliseconds(),t,3)}function Or(e,t){return Lr(e,t)+"000"}function Pr(e,t){return ir(e.getMonth()+1,t,2)}function Nr(e,t){return ir(e.getMinutes(),t,2)}function Rr(e,t){return ir(e.getSeconds(),t,2)}function Fr(e){var t=e.getDay();return 0===t?7:t}function jr(e,t){return ir(Tn.count(jn(e),e),t,2)}function Hr(e,t){var n=e.getDay();return e=n>=4||0===n?Nn(e):Nn.ceil(e),ir(Nn.count(jn(e),e)+(4===jn(e).getDay()),t,2)}function _r(e){return e.getDay()}function zr(e,t){return ir(Ln.count(jn(e),e),t,2)}function Vr(e,t){return ir(e.getFullYear()%100,t,2)}function Ur(e,t){return ir(e.getFullYear()%1e4,t,4)}function Br(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ir(t/60|0,"0",2)+ir(t%60,"0",2)}function Wr(e,t){return ir(e.getUTCDate(),t,2)}function $r(e,t){return ir(e.getUTCHours(),t,2)}function Yr(e,t){return ir(e.getUTCHours()%12||12,t,2)}function Kr(e,t){return ir(1+Hn.count(Kn(e),e),t,3)}function Jr(e,t){return ir(e.getUTCMilliseconds(),t,3)}function Gr(e,t){return Jr(e,t)+"000"}function Zr(e,t){return ir(e.getUTCMonth()+1,t,2)}function Xr(e,t){return ir(e.getUTCMinutes(),t,2)}function Qr(e,t){return ir(e.getUTCSeconds(),t,2)}function eo(e){var t=e.getUTCDay();return 0===t?7:t}function to(e,t){return ir(zn.count(Kn(e),e),t,2)}function no(e,t){var n=e.getUTCDay();return e=n>=4||0===n?Wn(e):Wn.ceil(e),ir(Wn.count(Kn(e),e)+(4===Kn(e).getUTCDay()),t,2)}function ro(e){return e.getUTCDay()}function oo(e,t){return ir(Vn.count(Kn(e),e),t,2)}function io(e,t){return ir(e.getUTCFullYear()%100,t,2)}function ao(e,t){return ir(e.getUTCFullYear()%1e4,t,4)}function so(){return"+0000"}function lo(){return"%"}function uo(e){return+e}function co(e){return Math.floor(+e/1e3)}!function(e){(Xn=function(e){var t=e.dateTime,n=e.date,r=e.time,o=e.periods,i=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,u=sr(o),c=lr(o),p=sr(i),d=lr(i),f=sr(a),m=lr(a),h=sr(s),g=lr(s),y=sr(l),v=lr(l),b={a:function(e){return a[e.getDay()]},A:function(e){return i[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:Ir,e:Ir,f:Or,H:Ar,I:kr,j:Tr,L:Lr,m:Pr,M:Nr,p:function(e){return o[+(e.getHours()>=12)]},Q:uo,s:co,S:Rr,u:Fr,U:jr,V:Hr,w:_r,W:zr,x:null,X:null,y:Vr,Y:Ur,Z:Br,"%":lo},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return i[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:Wr,e:Wr,f:Gr,H:$r,I:Yr,j:Kr,L:Jr,m:Zr,M:Xr,p:function(e){return o[+(e.getUTCHours()>=12)]},Q:uo,s:co,S:Qr,u:eo,U:to,V:no,w:ro,W:oo,x:null,X:null,y:io,Y:ao,Z:so,"%":lo},q={a:function(e,t,n){var r=f.exec(t.slice(n));return r?(e.w=m[r[0].toLowerCase()],n+r[0].length):-1},A:function(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=d[r[0].toLowerCase()],n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=v[r[0].toLowerCase()],n+r[0].length):-1},B:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g[r[0].toLowerCase()],n+r[0].length):-1},c:function(e,n,r){return w(e,t,n,r)},d:vr,e:vr,f:wr,H:xr,I:xr,j:br,L:Cr,m:yr,M:qr,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:Mr,s:Er,S:Dr,u:cr,U:pr,V:dr,w:ur,W:fr,x:function(e,t,r){return w(e,n,t,r)},X:function(e,t,n){return w(e,r,t,n)},y:hr,Y:mr,Z:gr,"%":Sr};function D(e,t){return function(n){var r,o,i,a=[],s=-1,l=0,u=e.length;for(n instanceof Date||(n=new Date(+n));++s<u;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(o=tr[r=e.charAt(++s)])?r=e.charAt(++s):o="e"===r?" ":"0",(i=t[r])&&(r=i(n,o)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function C(e,t){return function(n){var r,o,i=Zn(1900);if(w(i,e,n+="",0)!=n.length)return null;if("Q"in i)return new Date(i.Q);if("p"in i&&(i.H=i.H%12+12*i.p),"V"in i){if(i.V<1||i.V>53)return null;"w"in i||(i.w=1),"Z"in i?(o=(r=Gn(Zn(i.y))).getUTCDay(),r=o>4||0===o?Vn.ceil(r):Vn(r),r=Hn.offset(r,7*(i.V-1)),i.y=r.getUTCFullYear(),i.m=r.getUTCMonth(),i.d=r.getUTCDate()+(i.w+6)%7):(o=(r=t(Zn(i.y))).getDay(),r=o>4||0===o?Ln.ceil(r):Ln(r),r=An.offset(r,7*(i.V-1)),i.y=r.getFullYear(),i.m=r.getMonth(),i.d=r.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),o="Z"in i?Gn(Zn(i.y)).getUTCDay():t(Zn(i.y)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(o+5)%7:i.w+7*i.U-(o+6)%7);return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,Gn(i)):t(i)}}function w(e,t,n,r){for(var o,i,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(o=t.charCodeAt(a++))){if(o=t.charAt(a++),!(i=q[o in tr?t.charAt(a++):o])||(r=i(e,n,r))<0)return-1}else if(o!=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=C(e+="",Jn);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=C(e,Gn);return t.toString=function(){return e},t}}}(e)).format,Xn.parse,Qn=Xn.utcFormat,er=Xn.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"]});Date.prototype.toISOString||Qn("%Y-%m-%dT%H:%M:%S.%LZ"),+new Date("2000-01-01T00:00:00.000Z")||er("%Y-%m-%dT%H:%M:%S.%LZ");const po=J.bind(null,!0),fo={},{isArray:mo}=Array;function ho(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function go(e){return void 0===e}function yo(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function vo(e,t){const n=t.substring(1).split("/").slice(0,-1);let r;return n.forEach(((t,o)=>{if(o===n.length)return;r=+t;const i=isNaN(r)?{}:[];e[r||t]=go(e[r||t])?i:e[t],e=e[r||t]})),e}function bo(e,t){let n=!0;if(ho(e)&&ho(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((r=>{bo(e[r],t[r])||(n=!1)})),n);if(mo(e)&&mo(t)){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n+=1)if(!bo(e[n],t[n]))return!1;return!0}return e===t}fo.generate=function(e,t,n){n=n||"";let r=[];return Object.keys(t).forEach((o=>{const i=function(e){return e?po({},{val:e}).val:e}(t[o]),a=e[o],s=`${n}/${o}`;bo(i,a)||yo(t,o)||(go(a)?r.push({op:"add",path:s,value:i}):ho(i)&&ho(a)?r=r.concat(fo.generate(a,i,s)):mo(i)&&mo(a)?r=r.concat(function(e,t,n){let r=[];const o=e.slice();let i=-1;function a(e,t,n){if(e[n]&&go(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(let n=0,r=e.length;n<r;n+=1)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(bo(t,o))return r;if(!go(t[0])&&go(t[0].qInfo)||0===t.length)return r.push({op:"replace",path:n,value:t}),r;for(let e=o.length-1;e>=0;e-=1)i=a(t,o[e].qInfo&&o[e].qInfo.qId,e),-1===i?(r.push({op:"remove",path:`${n}/${e}`}),o.splice(e,1)):r=r.concat(fo.generate(o[e],t[i],`${n}/${e}`));for(let e=0,s=t.length;e<s;e+=1)i=a(o,t[e].qInfo&&t[e].qInfo.qId),-1===i?(r.push({op:"add",path:`${n}/${e}`,value:t[e]}),o.splice(e,0,t[e])):i!==e&&(r.push({op:"move",path:`${n}/${e}`,from:`${n}/${i}`}),o.splice(e,0,o.splice(i,1)[0]));return r}(a,i,s)):r.push({op:"replace",path:`${n}/${o}`,value:i}))})),Object.keys(e).forEach((o=>{go(t[o])&&!yo(e,o)&&r.push({op:"remove",path:`${n}/${o}`})})),r},fo.apply=function(e,t){t.forEach((t=>{let n=vo(e,t.path),r=t.path.split("/").splice(-1)[0],o=r&&isNaN(+r)?n[r]:n[+r]||n;const i=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(n=null,o=e),"add"===t.op||"replace"===t.op)if(mo(n))"-"===r&&(r=n.length),n.splice(+r,"add"===t.op?0:1,t.value);else if(mo(o)&&mo(t.value)){const e=t.value.slice();o.length=0,o.push(...e)}else if(ho(o)&&ho(t.value))a=o,Object.keys(a).forEach((e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!yo(a,e)&&delete a[e]})),po(o,t.value);else{if(!n)throw new Error("Patchee is not an object we can patch");n[r]=t.value}else if("move"===t.op){const o=vo(e,t.from);mo(n)?n.splice(+r,0,o.splice(+i,1)[0]):(n[r]=o[i],delete o[i])}else"remove"===t.op&&(mo(n)?n.splice(+r,1):delete n[r]);var a}))},fo.clone=function(e){return po({},e)},fo.createPatch=function(e,t,n){const r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},fo.updateObject=function(e,t){Object.keys(e).length?fo.apply(e,fo.generate(e,t)):po(e,t)};const xo=[[2,4,6],[2,4],[3]],qo=[,[,,[[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 Do(e,t,n){const r=e?e.length:0;let o,i=void 0===t?Number.MAX_VALUE:e[0]/t;for(o=1;o<r;o++)i=Math.min(i,e[o]/e[o-1]);void 0!==n&&(i=Math.min(i,n/e[r-1])),e.splice(0,0,i)}function Co(e,t,n){let r;const o=e?e.length:0;for(r=0;r<o;r++)Do(e[r],t,n)}!function(){let e,t;for(Co(xo,1,10),e=0;e<qo.length;e++)if(qo[e])for(t=0;t<qo[e].length;t++)Array.isArray(qo[e][t])&&Co(qo[e][t])}();var wo={exports:{}};function So(){}function Mo(){}Mo.resetWarningCache=So;function Eo(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function Io({d:e,size:t,style:n={},viewBox:r="0 0 16 16"}){const i={fontSize:Eo(t),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",...n};return o.createElement("i",{style:i},o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:r,fill:"currentColor"},o.createElement("path",{d:e})))}wo.exports=function(){function e(e,t,n,r,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Mo,resetWarningCache:So};return n.PropTypes=n,n}();const Ao={d:"M15.9993744,3 L15.9993744,5 L4.99937445,5 L4.99937445,3 L15.9993744,3 Z M8.99937445,7 L15.9993744,7 L15.9993744,9 L8.99937445,9 L8.99937445,7 Z M11.9993744,11 L15.9993744,11 L15.9993744,13 L11.9993744,13 L11.9993744,11 Z M2.2,11 L7,11 L7,9.00369263 C7,8.89323568 7.08954305,8.80369263 7.2,8.80369263 C7.2549016,8.80369263 7.30738916,8.82626165 7.34515712,8.86610844 L10.1852182,11.8624926 C10.2583124,11.93961 10.258346,12.0604218 10.1852948,12.13758 L7.34523376,15.1373102 C7.2692928,15.2175206 7.14270711,15.2209817 7.06249671,15.1450407 C7.02260076,15.1072683 7,15.0547472 7,14.9998069 L7,12.9043747 C4.79351111,12.9043747 2.8018683,12.9266213 1.02507156,12.9711145 L1.02507252,12.9711526 C0.472939773,12.9849787 0.014139487,12.5485949 0.000313396522,11.9964622 C0.000104473692,11.988119 -1.32268838e-12,11.9797736 -1.3231638e-12,11.9714278 L-1.83320026e-12,3 L2,3 L2,10.8 C2,10.9104569 2.08954305,11 2.2,11 Z"},ko={d:"M13,7 L8,7 L13,7 L13,4.98151367 C13,2.23029964 10.7614237,0 8,0 C5.23857625,0 3,2.23029964 3,4.98151367 L3,7 L3.75,7 L3,7 L4.5,7 L4.5,5.33193359 C4.5,3.21561511 5.54860291,1.5 8,1.5 C10.4513971,1.5 11.5,3.21561511 11.5,5.33193359 L11.5,7 L12.25,7 L3,7 C2.44771525,7 2,7.44771525 2,8 L2,15 C2,15.5522847 2.44771525,16 3,16 L13,16 C13.5522847,16 14,15.5522847 14,15 L14,8 C14,7.44771525 13.5522847,7 13,7 L3,7 L13,7 Z"},To="M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z",Lo={d:"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"},Oo={d:"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"};function Po(e,t,n){(function({model:e,properties:t}){return e.modifiers?e.modifiers.apply({model:e,properties:t}):Promise.resolve()})({model:e,properties:n}).then((()=>{e.colorSupport&&e.colorSupport.colorByUpdater(n,"qHyperCubeDef.");let r=fo.generate(t,n);r&&r.length&&(r=r.map((e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}))),e.applyPatches(r,!0))}))}function No(e,t,n,r,o,i){e.getEffectiveProperties().then((a=>{const s=J(!0,{},a),l=s.qHyperCubeDef[r][t],u=s.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][n];u.qAttributeDimensions=l.qAttributeDimensions,l.qAttributeDimensions=[],i||(u.qAttributeExpressions=l.qAttributeExpressions,l.qAttributeExpressions=[]),s.qHyperCubeDef[r][t]=u,s.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][n]=l,o&&o({oldItem:l,newItem:u,oldProperties:a,newProperties:s,model:e}),Po(e,a,s)}))}function Ro({dir:e,dock:t,altList:n,model:r,translator:o,app:i,onChange:a}){return 0===n.length?null:{dir:e,dock:t,getAlternatives(){const e=n.map((e=>function(e,t,n){if(e.qLibraryId)return t.getDimension(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null)).then((e=>e?"H"!==e.qDim.qGrouping&&e.qDim.qLabelExpression?e.qDim.qLabelExpression:e.qDim.title:n.get("Object.ErrorMessage.MissingDimension")));const r=e.qDef.qLabelExpression;if(r)return t.evaluate(r);const o=e.qDef.qFieldLabels[0]||e.qDef.qFieldDefs[0];return Promise.resolve(o)}(e,i,o).then((t=>({id:e.qDef.cId,selected:!1,title:t})))));return Promise.all(e)},changeTo(e,t){No(r,e,t,"qDimensions",a)}}}function Fo(e,t,n,r="/qHyperCubeDef"){return{breadcrumbs:e.qGroupFallbackTitles.slice(0,e.qGroupPos),drilldown:"H"===e.qGrouping,index:t,locked:!!e.qLocked,text:"H"===e.qGrouping?e.qGroupFallbackTitles[e.qGroupPos]:e.qFallbackTitle,popoverText:(o=e,"H"===o.qGrouping?o.title||"":o.qFallbackTitle||""),drillUp(e){n.drillUp(r,t,e)}};var o}function jo({altList:e,app:t,dir:n,dock:r,model:o,onChange:i,skipAttributeExpressions:a,translator:s}){return 0===e.length?null:{dir:n,dock:r,getAlternatives(){const n=e.map((e=>function(e,t,n){if(e.qLibraryId)return t.getMeasure(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null)).then((e=>e?e.qMeasure.qLabelExpression?e.qMeasure.qLabelExpression:e.qMeasure.qLabel||e.qMeasure.qDef:n.get("Object.ErrorMessage.MissingMeasure")));const r=e.qDef.qLabelExpression;if(r)return t.evaluate(r);const o=e.qDef.qLabel||e.qDef.qDef;return Promise.resolve(o)}(e,t,s).then((t=>({id:e.qDef.cId,selected:!1,title:t})))));return Promise.all(n)},changeTo(e,t){No(o,e,t,"qMeasures",i,a)}}}function Ho(e,t){return{breadcrumbs:[],drilldown:!1,index:t,locked:!1,text:e.qFallbackTitle,popoverText:e.qFallbackTitle}}const _o={bottom:{anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},top:{anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}},left:{anchorOrigin:{vertical:"center",horizontal:"left"},transformOrigin:{vertical:"center",horizontal:"right"}},right:{anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"}}},zo=({children:e,...t})=>o.createElement(i,F({size:"small",disableRipple:!0,disableTouchRipple:!0},t),e);function Vo(){function e({title:e,selected:t,onClick:n}){const r=le.detectTextDirection(e);return o.createElement(l,{role:"menuitem",button:!0,onClick:n,style:{textAlign:"start"}},o.createElement(u,{style:{minWidth:32}},o.createElement(Io,{d:t?To:""})),o.createElement(c,{primaryTypographyProps:{dir:r}},e))}function t({alignTo:t,changeTo:n,current:r,dir:i,dock:l,list:u,onClose:c,show:p,instruction:d}){const f=u.map(((t,r)=>o.createElement(e,{key:t.id,title:t.title,onClick:()=>n(r)})));return o.createElement(a,F({anchorEl:t,open:p,onClose:c},_o[l],{PaperProps:{style:{minWidth:"250px",maxHeight:"300px"}}}),o.createElement(s,{dense:!0,dir:i,"aria-label":d,component:"nav"},o.createElement(e,{title:r,selected:!0,onClick:c}),f))}e.propTypes={title:wo.exports.string.isRequired,selected:wo.exports.bool,onClick:wo.exports.func.isRequired},e.defaultProps={selected:!1},t.propTypes={alignTo:wo.exports.any,changeTo:wo.exports.func.isRequired,current:wo.exports.string.isRequired,dir:wo.exports.string.isRequired,dock:wo.exports.string.isRequired,list:wo.exports.array,onClose:wo.exports.func.isRequired,show:wo.exports.bool.isRequired,instruction:wo.exports.string},t.defaultProps={list:[],alignTo:null};class n extends o.Component{constructor(e){super(e),this.state={open:!1,inSelection:e.selections&&e.selections.isActive()},this.openPopover=this.openPopover.bind(this),this.closePopover=this.closePopover.bind(this),this.changeTo=this.changeTo.bind(this),this.alignToRef=o.createRef()}componentDidMount(){const{selections:e}=this.props;e&&(this.onSelectionsActivated=()=>this.setState({inSelection:!0}),this.onSelectionsDeactivated=()=>this.setState({inSelection:!1}),e.addListener("activated",this.onSelectionsActivated),e.addListener("deactivated",this.onSelectionsDeactivated),e.addListener("canceled",this.onSelectionsDeactivated))}componentWillUnmount(){const{selections:e}=this.props;e&&(e.removeListener("activated",this.onSelectionsActivated),e.removeListener("deactivated",this.onSelectionsDeactivated),e.removeListener("canceled",this.onSelectionsDeactivated))}changeTo(e){this.props.popover.changeTo(this.props.titleData.index,e),this.closePopover()}openPopover(){this.state.closeTime&&Date.now()-this.state.closeTime<20||this.props.popover.getAlternatives().then((e=>{this.setState({open:!0,alternatives:e})}))}closePopover(){this.setState({open:!1,closeTime:Date.now()})}render(){const{titleData:e,popover:n,translator:r,disabled:i,isDimension:a,padding:s,minWidth:l,hasAlternative:u}=this.props,c={flex:"1 1 auto",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:"normal",...this.props.style},p=e.breadcrumbs.length,d=i||this.state.inSelection,f=e.breadcrumbs.map(((t,n)=>o.createElement(zo,{style:{display:"flex",alignItems:"center",color:d&&"rgba(89, 89, 89, 0.8)",pointerEvents:d?"none":"auto"},key:n,onClick:()=>d?void 0:e.drillUp(p-n),title:t},o.createElement("span",{style:c},t),o.createElement(Io,F({},Oo,{size:"small",style:{margin:"0 8px"}}))))),m=n&&!this.state.open?this.openPopover:this.closePopover,h=!n||i||this.state.inSelection,g={display:"flex",alignItems:"center",width:"100%",color:h&&"rgba(89, 89, 89, 0.8)",height:!a&&h&&"20px",lineHeight:!a&&h&&"20px",border:!a&&h&&"none"};this.state.open&&(g.background="rgba(0,0,0,0.08)");s&&(g.padding=s),l&&(g.minWidth=l);const y=le.detectTextDirection(e.text),v=o.createElement(zo,{"aria-label":r.get("Accessibility.Alternative.Instructions",[e.text]),style:g,onClick:h?void 0:m,title:e.text,tabIndex:h?-1:0,onFocus:h?void 0:e=>{e.currentTarget.style.boxShadow="0px 0px 0px 2px #177FE6 inset",e.currentTarget.style.borderRadius="2px"},onBlur:h?void 0:e=>{e.currentTarget.style.boxShadow="none",e.currentTarget.style.borderRadius="0px"},onMouseDown:e=>{e.preventDefault()}},e.locked&&o.createElement(Io,F({},ko,{size:"small",title:r.get("Tooltip.selections.locked")})),o.createElement("span",{style:c,dir:y},e.text),n&&o.createElement(Io,F({},Lo,{size:"small",style:{margin:"0 8px"}})));return o.createElement(o.Fragment,null,e.drilldown&&o.createElement(Io,F({},Ao,{size:"small",title:r.get("Tooltip.dimensions.drilldown"),style:{margin:"0 4px 0 0"}})),f,o.createElement("div",{ref:this.alignToRef,style:{overflow:"hidden",pointerEvents:u?"auto":"none"}},v),n&&o.createElement(t,{dock:n.dock,dir:n.dir,current:e.popoverText,alignTo:this.alignToRef.current,show:this.state.open,list:this.state.alternatives,onClose:this.closePopover,changeTo:this.changeTo,instruction:r.get("Accessibility.Popover.Instructions")}))}}function r(e){return{top:"bottom",bottom:"top",left:"right",right:"left"}[e]}function i(e){return!e.isDimension&&re(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures.length")>0}return n.propTypes={disabled:wo.exports.bool.isRequired,padding:wo.exports.string,minWidth:wo.exports.string,titleData:wo.exports.shape({breadcrumbs:wo.exports.arrayOf(wo.exports.string).isRequired,drilldown:wo.exports.bool.isRequired,index:wo.exports.number.isRequired,locked:wo.exports.bool.isRequired,text:wo.exports.string.isRequired,popoverText:wo.exports.string.isRequired,drillUp:wo.exports.func}).isRequired,popover:wo.exports.shape({dir:wo.exports.string.isRequired,dock:wo.exports.string.isRequired,changeTo:wo.exports.func.isRequired,getAlternatives:wo.exports.func.isRequired}),translator:wo.exports.shape({get:wo.exports.func.isRequired}).isRequired,selections:wo.exports.shape({isActive:wo.exports.func,addListener:wo.exports.func,removeListener:wo.exports.func}),style:wo.exports.shape({fontSize:wo.exports.string,color:wo.exports.string,fontFamily:wo.exports.string}).isRequired,isDimension:wo.exports.bool.isRequired,hasAlternative:wo.exports.bool.isRequired},n.defaultProps={popover:null,selections:null,padding:"",minWidth:""},{renderer:"react",disableTriggers:!0,preferredSize:function(){return this.settings.settings.isDimension||i(this.settings.settings)?28:20},render(){const{settings:{app:e,disabled:t,explicitItemInfos:a,hyperCube:s,hyperCubeDef:l,isDimension:u,minWidth:c,model:p,onChangeToAlternative:d,padding:f,rtl:m,selections:h,skipAttributeExpressions:g,translator:y},layout:{dock:v}}=this.settings,b="top"!==v&&"bottom"!==v||!m?"ltr":"rtl",x=function(e,t){const n={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center"};return"left"===e?(n.width=t.height+"px",n.transform=`rotate(-90deg) translate(-${t.height}px, 0)`,n.transformOrigin="top left"):"right"===e&&(n.width=t.height+"px",n.transform=`rotate(90deg) translate(0, -${t.width}px)`,n.transformOrigin="top left"),n}(v,this.rect),q=l&&l.qLayoutExclude&&l.qLayoutExclude.qHyperCubeDef,D=q&&q[u?"qDimensions":"qMeasures"]||[],C=a||s[u?"qDimensionInfo":"qMeasureInfo"],w=u?Ro:jo,S=u?Fo:Ho,M=p&&p.colorSupport&&p.modifiers&&w({altList:D,app:e,dir:m?"rtl":"ltr",dock:r(v),model:p,onChange:d,skipAttributeExpressions:g,translator:y}),E=(I=this.settings.settings).isDimension&&re(I,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.length")>0||i(this.settings.settings);var I;const A=C.map(((e,r)=>{const i="number"==typeof e.explicitColumn?e.explicitColumn:r,a=S(e,i,p),s=r===C.length-1;return o.createElement(o.Fragment,{key:e.cId},o.createElement(n,{popover:M,titleData:a,model:p,translator:y,selections:h,disabled:t(),style:this.style,isDimension:u,padding:f,minWidth:c,hasAlternative:E}),!s&&o.createElement("span",null,", "))}));return o.createElement("div",{style:x,dir:b},A)}}}function Uo(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return e<t?t:e>n?n:e}function Bo(e){if(e.type)return e;if("#"===e.charAt(0))return Bo(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length/3,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb(".concat(n.map((function(e){return parseInt(e,16)})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(["Material-UI: unsupported `".concat(e,"` color."),"We support the following formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()."].join("\n"));var r=e.substring(t+1,e.length-1).split(",");return{type:n,values:r=r.map((function(e){return parseFloat(e)}))}}function Wo(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function $o(e){var t="hsl"===(e=Bo(e)).type?Bo(function(e){var t=(e=Bo(e)).values,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return o-i*Math.max(Math.min(t-3,9-t,1),-1)},s="rgb",l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",l.push(t[3])),Wo({type:s,values:l})}(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Yo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ko(){return(Ko=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Jo(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Go(){return(Go=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Zo(e){return(Zo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Xo(e){return(Xo="function"==typeof Symbol&&"symbol"===Zo(Symbol.iterator)?function(e){return Zo(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":Zo(e)})(e)}function Qo(e){return e&&"object"===Xo(e)&&!Array.isArray(e)}function ei(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},r=n.clone?Go({},e):e;return Qo(e)&&Qo(t)&&Object.keys(t).forEach((function(o){"__proto__"!==o&&(Qo(t[o])&&o in e?r[o]=ei(e[o],t[o],n):r[o]=t[o])})),r}(wo.exports.element,function(){return null}).isRequired=(wo.exports.element.isRequired,function(){return null});var ti={};
7
+ import e from"hammerjs";import t from"picasso.js";import n from"picasso-plugin-q";import r from"picasso-plugin-hammer";import o from"react";import{Button as i,Popover as a,List as s,ListItem as l,ListItemIcon as u,ListItemText as c}from"@material-ui/core";import d from"react-dom";import{withThemeCreator as p,createGenerateClassName as f,StylesProvider as m,ThemeProvider as h}from"@material-ui/styles";import{useOptions as g,useElement as y,useSelections as v,useState as b,useLayout as x,useTranslator as q,useAction as D,useEffect as C,useModel as w,useApp as S,useStaleLayout as M,usePlugins as E,useConstraints as I,useTheme as A,useAppLayout as k,useEmbed as T,usePromise as L,useRect as O,onTakeSnapshot as P,useImperativeHandle as N}from"@nebula.js/stardust";var R={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_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":"Выключить выбор лассо"}}};function F(){return(F=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function j(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var H=Object.prototype.hasOwnProperty,_=Object.prototype.toString,z=Object.defineProperty,V=Object.getOwnPropertyDescriptor,U=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===_.call(e)},B=function(e){if(!e||"[object Object]"!==_.call(e))return!1;var t,n=H.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&H.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||H.call(e,t)},W=function(e,t){z&&"__proto__"===t.name?z(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},$=function(e,t){if("__proto__"===t){if(!H.call(e,t))return;if(V)return V(e,t).value}return e[t]},Y=function e(){var t,n,r,o,i,a,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(n in t)r=$(s,n),s!==(o=$(t,n))&&(c&&o&&(B(o)||(i=U(o)))?(i?(i=!1,a=r&&U(r)?r:[]):a=r&&B(r)?r:{},W(s,{name:n,newValue:e(c,a,o)})):void 0!==o&&W(s,{name:n,newValue:o}));return s};const K="center",J="bottom";var G={NoDataExist:{label:"NoDataExist",alignment:K,default:!0},OnlyNanData:{label:"OnlyNanData",alignment:K,default:!0},OnlyNegativeOrZeroValues:{label:"OnlyNegativeOrZeroValues",alignment:K,default:!1},LimitedData:{label:"LimitedData",alignment:J,default:!1},OnlyNanColor:{label:"OnlyNanColor",alignment:J,default:!1},NegativeOrZeroValues:{label:"NegativeOrZeroValues",alignment:J,default:!1},DataRangeIncludingZero:{label:"DataRangeIncludingZero",alignment:J,default:!1}};const Z=[["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}]],X={};Z.forEach((([e,{width:t,height:n}])=>{X[e]={width:t,height:n}}));const Q={getLayoutModes:()=>X,getLayoutMode(e,t){let n;for(n=0;n<Z.length;++n)if(e>=Z[n][1].width&&t>=Z[n][1].height)return Z[n][0];return"SPARK"}};function ee(e,t){return{layoutModes:Q.getLayoutModes(),center:void 0!==t.minCenterRatio?{minWidthRatio:t.minCenterRatio,minHeightRatio:t.minCenterRatio}:void 0,logicalSize:t.logicalSize?{align:.5,preserveAspectRatio:!0,...t.logicalSize}:void 0}}const te=(e,t,n)=>{const r=t.split(".");let o,i=e;if(void 0===i)return n;for(o=0;o<r.length;++o){if(void 0===i[r[o]])return n;i=i[r[o]]}return i};function ne(e,t){const n=e.component(t);return n&&n._DO_NOT_USE_getInfo&&n._DO_NOT_USE_getInfo().offset}const re=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),oe=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),ie=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),ae={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),isLtrChar:e=>re.test(e),isRtlChar:e=>oe.test(e)||ie.test(e),detectTextDirection(e){const t=e?e.length:0;let n,r;for(n=0;n<t;n++){if(r=e[n],ae.isLtrChar(r))return"ltr";if(ae.isRtlChar(r))return"rtl"}return"ltr"}},se={getColorSymbol:(e,t)=>e.h("div",{style:{display:"inline-block",width:"10px",height:"10px","background-color":t.color.fill,margin:"0 8px"}}),getNodeFillColor:e=>e.attrs&&void 0!==e.attrs.fill?e.attrs.fill:e.children&&e.children[0]&&e.children[0].attrs&&void 0!==e.children[0].attrs.fill?e.children[0].attrs.fill:void 0,getColor(e,t,n){const r=t.data,o=e.resources.formatter,i=e.resources.dataset,a={};if(n.coloring.label&&(a.label=""+n.coloring.label),"color"!==n.coloring.type&&r.fillTooltip){const e=o("fill"),t="measure"===n.coloring.fieldType;if(a.value=t&&e?e(r.fillTooltip.value):r.fillTooltip.label?r.fillTooltip.label:r.fillTooltip.value,!n.coloring.label){const e=i(r.fillTooltip.source.key).field(r.fillTooltip.source.field).title();a.label=""+e}}return a.fill=void 0===r._fillColor?se.getNodeFillColor(t):r._fillColor,a},getMeasure:(e,t)=>({label:""+e(t.source.key).field(t.source.field).title(),value:""===t.label||"NaN"===t.label?"-":t.label,field:t.source.field}),hideColorRow:(e,t)=>void 0===e.color.value||e.measures.some((e=>e.field===t.coloring.field)),getTitleRow(e,t){const n=ae.detectTextDirection(e.title);return[{content:e.title,style:{"font-weight":"bold","text-align":t?"right":"left",direction:n},colspan:2},{}]},getDescriptionRow(e,t){const n=ae.detectTextDirection(e.value);return[{content:e.value,style:{"text-align":t?"right":"left",direction:n},colspan:2},{}]},getNMoreRow(e,t,n){const r=t?t.get("Object.ChartTooltip.NMore",e):`+${e} more`;return[{content:r,style:{"font-weight":"bold","text-align":n?"right":"left",direction:ae.detectTextDirection(r)},colspan:2},{}]},getSeparatorRow:()=>[{content:"",style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:2},{}],getColorRow(e,t,n){const r=ae.detectTextDirection(t.color.label),o=n?[":",t.color.label]:[t.color.label,":"],i=ae.detectTextDirection(t.color.value);return[{content:o,style:{"text-align":n?"right":"left",direction:r}},{content:n?[t.color.value,se.getColorSymbol(e,t)]:[se.getColorSymbol(e,t),t.color.value],style:{"text-align":n?"left":"right",direction:i,"vertical-align":"middle"}}]},getMeasureRow(e,t,n,r,o=!1){const i=ae.detectTextDirection(e.label),a=r?[":",e.label]:[e.label,":"],s=ae.detectTextDirection(e.value);let l;return l=o?r?[e.value,se.getColorSymbol(t,n)]:[se.getColorSymbol(t,n),e.value]:[e.value],[{content:a,style:{"text-align":r?"right":"left",direction:i}},{content:l,style:{"text-align":r?"left":"right",direction:s,"vertical-align":"middle"}}]}};function le(e){const t=parseInt(e,10);if(!isNaN(t))return t}const ue=e=>t=>e.getContrastingColorTo(t.node.attrs.fill);function ce(e,t){const n=e.themeService.getStyles();return{padding:10,placements:e.simplifiedPlacements.map((n=>function(e,t,n){const r=n.themeService.getStyles();return{position:e.position,justify:e.justify,fill:e.onBackground?r.label.value.color:ue(t),overflow:e.overflow,padding:e.padding}}(n,t,e))),fontSize:le(n.label.value.fontSize),fontFamily:n.label.value.fontFamily,label:e.label}}function de(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function pe(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function fe(){}var me=1/.7,he="\\s*([+-]?\\d+)\\s*",ge="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",ye="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ve=/^#([0-9a-f]{3,8})$/,be=new RegExp("^rgb\\("+[he,he,he]+"\\)$"),xe=new RegExp("^rgb\\("+[ye,ye,ye]+"\\)$"),qe=new RegExp("^rgba\\("+[he,he,he,ge]+"\\)$"),De=new RegExp("^rgba\\("+[ye,ye,ye,ge]+"\\)$"),Ce=new RegExp("^hsl\\("+[ge,ye,ye]+"\\)$"),we=new RegExp("^hsla\\("+[ge,ye,ye,ge]+"\\)$"),Se={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Me(){return this.rgb().formatHex()}function Ee(){return this.rgb().formatRgb()}function Ie(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=ve.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Ae(t):3===n?new Le(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=be.exec(e))?new Le(t[1],t[2],t[3],1):(t=xe.exec(e))?new Le(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=qe.exec(e))?ke(t[1],t[2],t[3],t[4]):(t=De.exec(e))?ke(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Ce.exec(e))?Re(t[1],t[2]/100,t[3]/100,1):(t=we.exec(e))?Re(t[1],t[2]/100,t[3]/100,t[4]):Se.hasOwnProperty(e)?Ae(Se[e]):"transparent"===e?new Le(NaN,NaN,NaN,0):null}function Ae(e){return new Le(e>>16&255,e>>8&255,255&e,1)}function ke(e,t,n,r){return r<=0&&(e=t=n=NaN),new Le(e,t,n,r)}function Te(e){return e instanceof fe||(e=Ie(e)),e?new Le((e=e.rgb()).r,e.g,e.b,e.opacity):new Le}function Le(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Oe(){return"#"+Ne(this.r)+Ne(this.g)+Ne(this.b)}function Pe(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function Ne(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Re(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 Fe(e){if(e instanceof je)return new je(e.h,e.s,e.l,e.opacity);if(e instanceof fe||(e=Ie(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,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new je(a,s,l,e.opacity)}function je(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function He(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}de(fe,Ie,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:Me,formatHex:Me,formatHsl:function(){return Fe(this).formatHsl()},formatRgb:Ee,toString:Ee}),de(Le,(function(e,t,n,r){return 1===arguments.length?Te(e):new Le(e,t,n,null==r?1:r)}),pe(fe,{brighter:function(e){return e=null==e?me:Math.pow(me,e),new Le(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Le(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Oe,formatHex:Oe,formatRgb:Pe,toString:Pe})),de(je,(function(e,t,n,r){return 1===arguments.length?Fe(e):new je(e,t,n,null==r?1:r)}),pe(fe,{brighter:function(e){return e=null==e?me:Math.pow(me,e),new je(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new je(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,o=2*n-r;return new Le(He(e>=240?e-240:e+120,o,r),He(e,o,r),He(e<120?e+240:e-120,o,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},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var _e=Math.PI/180,ze=180/Math.PI,Ve=4/29,Ue=6/29,Be=3*Ue*Ue;function We(e){if(e instanceof $e)return new $e(e.l,e.a,e.b,e.opacity);if(e instanceof Qe)return et(e);e instanceof Le||(e=Te(e));var t,n,r=Ge(e.r),o=Ge(e.g),i=Ge(e.b),a=Ye((.2225045*r+.7168786*o+.0606169*i)/1);return r===o&&o===i?t=n=a:(t=Ye((.4360747*r+.3850649*o+.1430804*i)/.96422),n=Ye((.0139322*r+.0971045*o+.7141733*i)/.82521)),new $e(116*a-16,500*(t-a),200*(a-n),e.opacity)}function $e(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+Ve}function Ke(e){return e>Ue?e*e*e:Be*(e-Ve)}function Je(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){if(e instanceof Qe)return new Qe(e.h,e.c,e.l,e.opacity);if(e instanceof $e||(e=We(e)),0===e.a&&0===e.b)return new Qe(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*ze;return new Qe(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function Xe(e,t,n,r){return 1===arguments.length?Ze(e):new Qe(e,t,n,null==r?1:r)}function Qe(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function et(e){if(isNaN(e.h))return new $e(e.l,0,0,e.opacity);var t=e.h*_e;return new $e(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}de($e,(function(e,t,n,r){return 1===arguments.length?We(e):new $e(e,t,n,null==r?1:r)}),pe(fe,{brighter:function(e){return new $e(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new $e(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 Le(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)}})),de(Qe,Xe,pe(fe,{brighter:function(e){return new Qe(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new Qe(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return et(this).rgb()}}));var tt=-.29227,nt=-.90649,rt=1.97294;function ot(e){if(e instanceof it)return new it(e.h,e.s,e.l,e.opacity);e instanceof Le||(e=Te(e));var t=e.r/255,n=e.g/255,r=e.b/255,o=(-.6557636667999999*r+-1.7884503806*t-3.5172982438*n)/-5.9615122912,i=r-o,a=(rt*(n-o)-tt*i)/nt,s=Math.sqrt(a*a+i*i)/(rt*o*(1-o)),l=s?Math.atan2(a,i)*ze-120:NaN;return new it(l<0?l+360:l,s,o,e.opacity)}function it(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function at(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}de(it,(function(e,t,n,r){return 1===arguments.length?ot(e):new it(e,t,n,null==r?1:r)}),pe(fe,{brighter:function(e){return e=null==e?me:Math.pow(me,e),new it(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new it(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*_e,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),o=Math.sin(e);return new Le(255*(t+n*(-.14861*r+1.78277*o)),255*(t+n*(tt*r+nt*o)),255*(t+n*(rt*r)),this.opacity)}})),function(e){1===e.length&&(e=function(e){return function(t,n){return at(e(t),n)}}(e))}(at);function st(){}function lt(e,t){var n=new st;if(e instanceof st)e.each((function(e,t){n.set(t,e)}));else if(Array.isArray(e)){var r,o=-1,i=e.length;if(null==t)for(;++o<i;)n.set(o,e[o]);else for(;++o<i;)n.set(t(r=e[o],o,e),r)}else if(e)for(var a in e)n.set(a,e[a]);return n}function ut(){}st.prototype=lt.prototype={constructor:st,has:function(e){return"$"+e in this},get:function(e){return this["$"+e]},set:function(e,t){return this["$"+e]=t,this},remove:function(e){var t="$"+e;return t in this&&delete this[t]},clear:function(){for(var e in this)"$"===e[0]&&delete this[e]},keys:function(){var e=[];for(var t in this)"$"===t[0]&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)"$"===t[0]&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)"$"===t[0]&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)"$"===t[0]&&++e;return e},empty:function(){for(var e in this)if("$"===e[0])return!1;return!0},each:function(e){for(var t in this)"$"===t[0]&&e(this[t],t.slice(1),this)}};var ct=lt.prototype;function dt(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function pt(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function ft(){}ut.prototype={constructor:ut,has:ct.has,add:function(e){return this["$"+(e+="")]=e,this},remove:ct.remove,clear:ct.clear,values:ct.keys,size:ct.size,empty:ct.empty,each:ct.each};var mt=1/.7,ht="\\s*([+-]?\\d+)\\s*",gt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",yt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",vt=/^#([0-9a-f]{3})$/,bt=/^#([0-9a-f]{6})$/,xt=new RegExp("^rgb\\("+[ht,ht,ht]+"\\)$"),qt=new RegExp("^rgb\\("+[yt,yt,yt]+"\\)$"),Dt=new RegExp("^rgba\\("+[ht,ht,ht,gt]+"\\)$"),Ct=new RegExp("^rgba\\("+[yt,yt,yt,gt]+"\\)$"),wt=new RegExp("^hsl\\("+[gt,yt,yt]+"\\)$"),St=new RegExp("^hsla\\("+[gt,yt,yt,gt]+"\\)$"),Mt={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 Et(e){var t;return e=(e+"").trim().toLowerCase(),(t=vt.exec(e))?new Lt((t=parseInt(t[1],16))>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):(t=bt.exec(e))?It(parseInt(t[1],16)):(t=xt.exec(e))?new Lt(t[1],t[2],t[3],1):(t=qt.exec(e))?new Lt(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Dt.exec(e))?At(t[1],t[2],t[3],t[4]):(t=Ct.exec(e))?At(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=wt.exec(e))?Pt(t[1],t[2]/100,t[3]/100,1):(t=St.exec(e))?Pt(t[1],t[2]/100,t[3]/100,t[4]):Mt.hasOwnProperty(e)?It(Mt[e]):"transparent"===e?new Lt(NaN,NaN,NaN,0):null}function It(e){return new Lt(e>>16&255,e>>8&255,255&e,1)}function At(e,t,n,r){return r<=0&&(e=t=n=NaN),new Lt(e,t,n,r)}function kt(e){return e instanceof ft||(e=Et(e)),e?new Lt((e=e.rgb()).r,e.g,e.b,e.opacity):new Lt}function Tt(e,t,n,r){return 1===arguments.length?kt(e):new Lt(e,t,n,null==r?1:r)}function Lt(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Ot(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Pt(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Rt(e,t,n,r)}function Nt(e){if(e instanceof Rt)return new Rt(e.h,e.s,e.l,e.opacity);if(e instanceof ft||(e=Et(e)),!e)return new Rt;if(e instanceof Rt)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new Rt(a,s,l,e.opacity)}function Rt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Ft(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}dt(ft,Et,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),dt(Lt,Tt,pt(ft,{brighter:function(e){return e=null==e?mt:Math.pow(mt,e),new Lt(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Lt(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"#"+Ot(this.r)+Ot(this.g)+Ot(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+")")}})),dt(Rt,(function(e,t,n,r){return 1===arguments.length?Nt(e):new Rt(e,t,n,null==r?1:r)}),pt(ft,{brighter:function(e){return e=null==e?mt:Math.pow(mt,e),new Rt(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Rt(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,o=2*n-r;return new Lt(Ft(e>=240?e-240:e+120,o,r),Ft(e,o,r),Ft(e<120?e+240:e-120,o,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 jt=Math.PI/180,Ht=180/Math.PI,_t=4/29,zt=6/29,Vt=3*zt*zt;function Ut(e){if(e instanceof Bt)return new Bt(e.l,e.a,e.b,e.opacity);if(e instanceof Gt){if(isNaN(e.h))return new Bt(e.l,0,0,e.opacity);var t=e.h*jt;return new Bt(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}e instanceof Lt||(e=kt(e));var n,r,o=Kt(e.r),i=Kt(e.g),a=Kt(e.b),s=Wt((.2225045*o+.7168786*i+.0606169*a)/1);return o===i&&i===a?n=r=s:(n=Wt((.4360747*o+.3850649*i+.1430804*a)/.96422),r=Wt((.0139322*o+.0971045*i+.7141733*a)/.82521)),new Bt(116*s-16,500*(n-s),200*(s-r),e.opacity)}function Bt(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function Wt(e){return e>.008856451679035631?Math.pow(e,1/3):e/Vt+_t}function $t(e){return e>zt?e*e*e:Vt*(e-_t)}function Yt(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Kt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Jt(e){if(e instanceof Gt)return new Gt(e.h,e.c,e.l,e.opacity);if(e instanceof Bt||(e=Ut(e)),0===e.a&&0===e.b)return new Gt(NaN,0,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Ht;return new Gt(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function Gt(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}dt(Bt,(function(e,t,n,r){return 1===arguments.length?Ut(e):new Bt(e,t,n,null==r?1:r)}),pt(ft,{brighter:function(e){return new Bt(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new Bt(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 Lt(Yt(3.1338561*(t=.96422*$t(t))-1.6168667*(e=1*$t(e))-.4906146*(n=.82521*$t(n))),Yt(-.9787684*t+1.9161415*e+.033454*n),Yt(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),dt(Gt,(function(e,t,n,r){return 1===arguments.length?Jt(e):new Gt(e,t,n,null==r?1:r)}),pt(ft,{brighter:function(e){return new Gt(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new Gt(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return Ut(this).rgb()}}));var Zt=-.29227,Xt=-.90649,Qt=1.97294,en=Qt*Xt,tn=1.78277*Qt,nn=-.6557636667999999;function rn(e){if(e instanceof an)return new an(e.h,e.s,e.l,e.opacity);e instanceof Lt||(e=kt(e));var t=e.r/255,n=e.g/255,r=e.b/255,o=(nn*r+en*t-tn*n)/(nn+en-tn),i=r-o,a=(Qt*(n-o)-Zt*i)/Xt,s=Math.sqrt(a*a+i*i)/(Qt*o*(1-o)),l=s?Math.atan2(a,i)*Ht-120:NaN;return new an(l<0?l+360:l,s,o,e.opacity)}function on(e,t,n,r){return 1===arguments.length?rn(e):new an(e,t,n,null==r?1:r)}function an(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function sn(e){return function(){return e}}function ln(e,t){return function(n){return e+n*t}}function un(e){return 1==(e=+e)?cn: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):sn(isNaN(t)?n:t)}}function cn(e,t){var n=t-e;return n?ln(e,n):sn(isNaN(e)?t:e)}function dn(e){return function t(n){function r(t,r){var o=e((t=on(t)).h,(r=on(r)).h),i=cn(t.s,r.s),a=cn(t.l,r.l),s=cn(t.opacity,r.opacity);return function(e){return t.h=o(e),t.s=i(e),t.l=a(Math.pow(e,n)),t.opacity=s(e),t+""}}return n=+n,r.gamma=t,r}(1)}function pn(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)]}dt(an,on,pt(ft,{brighter:function(e){return e=null==e?mt:Math.pow(mt,e),new an(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new an(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*jt,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),o=Math.sin(e);return new Lt(255*(t+n*(-.14861*r+1.78277*o)),255*(t+n*(Zt*r+Xt*o)),255*(t+n*(Qt*r)),this.opacity)}})),function e(t){var n=un(t);function r(e,t){var r=n((e=Tt(e)).r,(t=Tt(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=cn(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1),dn((function(e,t){var n=t-e;return n?ln(e,n>180||n<-180?n-360*Math.round(n/360):n):sn(isNaN(e)?t:e)})),dn(cn);var fn,mn=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function hn(e){return new gn(e)}function gn(e){if(!(t=mn.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 yn(e,t){var n=pn(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}hn.prototype=gn.prototype,gn.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 vn={"%":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 yn(100*e,t)},r:yn,s:function(e,t){var n=pn(e,t);if(!n)return e+"";var r=n[0],o=n[1],i=o-(fn=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+pn(e,Math.max(0,t+i-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function bn(e){return e}var xn,qn=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Dn(e){var t,n,r=e.grouping&&e.thousands?(t=e.grouping,n=e.thousands,function(e,r){for(var o=e.length,i=[],a=0,s=t[0],l=0;o>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),i.push(e.substring(o-=s,o+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return i.reverse().join(n)}):bn,o=e.currency,i=e.decimal,a=e.numerals?function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(e.numerals):bn,s=e.percent||"%";function l(e){var t=(e=hn(e)).fill,n=e.align,l=e.sign,u=e.symbol,c=e.zero,d=e.width,p=e.comma,f=e.precision,m=e.trim,h=e.type;"n"===h?(p=!0,h="g"):vn[h]||(null==f&&(f=12),m=!0,h="g"),(c||"0"===t&&"="===n)&&(c=!0,t="0",n="=");var g="$"===u?o[0]:"#"===u&&/[boxX]/.test(h)?"0"+h.toLowerCase():"",y="$"===u?o[1]:/[%p]/.test(h)?s:"",v=vn[h],b=/[defgprs%]/.test(h);function x(e){var o,s,u,x=g,q=y;if("c"===h)q=v(e)+q,e="";else{var D=(e=+e)<0;if(e=v(Math.abs(e),f),m&&(e=function(e){e:for(var t,n=e.length,r=1,o=-1;r<n;++r)switch(e[r]){case".":o=t=r;break;case"0":0===o&&(o=r),t=r;break;default:if(o>0){if(!+e[r])break e;o=0}}return o>0?e.slice(0,o)+e.slice(t+1):e}(e)),D&&0==+e&&(D=!1),x=(D?"("===l?l:"-":"-"===l||"("===l?"":l)+x,q=("s"===h?qn[8+fn/3]:"")+q+(D&&"("===l?")":""),b)for(o=-1,s=e.length;++o<s;)if(48>(u=e.charCodeAt(o))||u>57){q=(46===u?i+e.slice(o+1):e.slice(o))+q,e=e.slice(0,o);break}}p&&!c&&(e=r(e,1/0));var C=x.length+e.length+q.length,w=C<d?new Array(d-C+1).join(t):"";switch(p&&c&&(e=r(w+e,w.length?d-q.length:1/0),w=""),n){case"<":e=x+e+q+w;break;case"=":e=x+w+e+q;break;case"^":e=w.slice(0,C=w.length>>1)+x+e+q+w.slice(C);break;default:e=w+x+e+q}return a(e)}return f=null==f?6:/[gprs]/.test(h)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),x.toString=function(){return e+""},x}return{format:l,formatPrefix:function(e,t){var n=l(((e=hn(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(function(e){return(e=pn(Math.abs(e)))?e[1]:NaN}(t)/3))),o=Math.pow(10,-r),i=qn[8+r/3];return function(e){return n(o*e)+i}}}}!function(e){(xn=Dn(e)).format,xn.formatPrefix}({decimal:".",thousands:",",grouping:[3],currency:["$",""]});var Cn=new Date,wn=new Date;function Sn(e,t,n,r){function o(t){return e(t=new Date(+t)),t}return o.floor=o,o.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},o.round=function(e){var t=o(e),n=o.ceil(e);return e-t<n-e?t:n},o.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},o.range=function(n,r,i){var a,s=[];if(n=o.ceil(n),i=null==i?1:Math.floor(i),!(n<r&&i>0))return s;do{s.push(a=new Date(+n)),t(n,i),e(n)}while(a<n&&n<r);return s},o.filter=function(n){return Sn((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&&(o.count=function(t,r){return Cn.setTime(+t),wn.setTime(+r),e(Cn),e(wn),Math.floor(n(Cn,wn))},o.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?o.filter(r?function(t){return r(t)%e==0}:function(t){return o.count(0,t)%e==0}):o:null}),o}var Mn=Sn((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));Mn.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?Sn((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):Mn:null},Mn.range;Sn((function(e){e.setTime(1e3*Math.floor(e/1e3))}),(function(e,t){e.setTime(+e+1e3*t)}),(function(e,t){return(t-e)/1e3}),(function(e){return e.getUTCSeconds()})).range,Sn((function(e){e.setTime(6e4*Math.floor(e/6e4))}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getMinutes()})).range,Sn((function(e){var t=6e4*e.getTimezoneOffset()%36e5;t<0&&(t+=36e5),e.setTime(36e5*Math.floor((+e-t)/36e5)+t)}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getHours()})).range;var En=Sn((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5}),(function(e){return e.getDate()-1}));function In(e){return Sn((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-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/6048e5}))}En.range;var An=In(0),kn=In(1),Tn=In(2),Ln=In(3),On=In(4),Pn=In(5),Nn=In(6);An.range,kn.range,Tn.range,Ln.range,On.range,Pn.range,Nn.range,Sn((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 Rn=Sn((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()}));Rn.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Sn((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},Rn.range,Sn((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getUTCMinutes()})).range,Sn((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getUTCHours()})).range;var Fn=Sn((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/864e5}),(function(e){return e.getUTCDate()-1}));function jn(e){return Sn((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)/6048e5}))}Fn.range;var Hn=jn(0),_n=jn(1),zn=jn(2),Vn=jn(3),Un=jn(4),Bn=jn(5),Wn=jn(6);Hn.range,_n.range,zn.range,Vn.range,Un.range,Bn.range,Wn.range,Sn((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 $n=Sn((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 Yn(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 Kn(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 Jn(e){return{y:e,m:0,d:1,H:0,M:0,S:0,L:0}}$n.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Sn((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},$n.range;var Gn,Zn,Xn,Qn={"-":"",_:" ",0:"0"},er=/^\s*\d+/,tr=/^%/,nr=/[\\^$*+?|[\]().{}]/g;function rr(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",i=o.length;return r+(i<n?new Array(n-i+1).join(t)+o:o)}function or(e){return e.replace(nr,"\\$&")}function ir(e){return new RegExp("^(?:"+e.map(or).join("|")+")","i")}function ar(e){for(var t={},n=-1,r=e.length;++n<r;)t[e[n].toLowerCase()]=n;return t}function sr(e,t,n){var r=er.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function lr(e,t,n){var r=er.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function ur(e,t,n){var r=er.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function cr(e,t,n){var r=er.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function dr(e,t,n){var r=er.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function pr(e,t,n){var r=er.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function fr(e,t,n){var r=er.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function mr(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 hr(e,t,n){var r=er.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function gr(e,t,n){var r=er.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function yr(e,t,n){var r=er.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function vr(e,t,n){var r=er.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function br(e,t,n){var r=er.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function xr(e,t,n){var r=er.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function qr(e,t,n){var r=er.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Dr(e,t,n){var r=er.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Cr(e,t,n){var r=tr.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function wr(e,t,n){var r=er.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Sr(e,t,n){var r=er.exec(t.slice(n));return r?(e.Q=1e3*+r[0],n+r[0].length):-1}function Mr(e,t){return rr(e.getDate(),t,2)}function Er(e,t){return rr(e.getHours(),t,2)}function Ir(e,t){return rr(e.getHours()%12||12,t,2)}function Ar(e,t){return rr(1+En.count(Rn(e),e),t,3)}function kr(e,t){return rr(e.getMilliseconds(),t,3)}function Tr(e,t){return kr(e,t)+"000"}function Lr(e,t){return rr(e.getMonth()+1,t,2)}function Or(e,t){return rr(e.getMinutes(),t,2)}function Pr(e,t){return rr(e.getSeconds(),t,2)}function Nr(e){var t=e.getDay();return 0===t?7:t}function Rr(e,t){return rr(An.count(Rn(e),e),t,2)}function Fr(e,t){var n=e.getDay();return e=n>=4||0===n?On(e):On.ceil(e),rr(On.count(Rn(e),e)+(4===Rn(e).getDay()),t,2)}function jr(e){return e.getDay()}function Hr(e,t){return rr(kn.count(Rn(e),e),t,2)}function _r(e,t){return rr(e.getFullYear()%100,t,2)}function zr(e,t){return rr(e.getFullYear()%1e4,t,4)}function Vr(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+rr(t/60|0,"0",2)+rr(t%60,"0",2)}function Ur(e,t){return rr(e.getUTCDate(),t,2)}function Br(e,t){return rr(e.getUTCHours(),t,2)}function Wr(e,t){return rr(e.getUTCHours()%12||12,t,2)}function $r(e,t){return rr(1+Fn.count($n(e),e),t,3)}function Yr(e,t){return rr(e.getUTCMilliseconds(),t,3)}function Kr(e,t){return Yr(e,t)+"000"}function Jr(e,t){return rr(e.getUTCMonth()+1,t,2)}function Gr(e,t){return rr(e.getUTCMinutes(),t,2)}function Zr(e,t){return rr(e.getUTCSeconds(),t,2)}function Xr(e){var t=e.getUTCDay();return 0===t?7:t}function Qr(e,t){return rr(Hn.count($n(e),e),t,2)}function eo(e,t){var n=e.getUTCDay();return e=n>=4||0===n?Un(e):Un.ceil(e),rr(Un.count($n(e),e)+(4===$n(e).getUTCDay()),t,2)}function to(e){return e.getUTCDay()}function no(e,t){return rr(_n.count($n(e),e),t,2)}function ro(e,t){return rr(e.getUTCFullYear()%100,t,2)}function oo(e,t){return rr(e.getUTCFullYear()%1e4,t,4)}function io(){return"+0000"}function ao(){return"%"}function so(e){return+e}function lo(e){return Math.floor(+e/1e3)}!function(e){(Gn=function(e){var t=e.dateTime,n=e.date,r=e.time,o=e.periods,i=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,u=ir(o),c=ar(o),d=ir(i),p=ar(i),f=ir(a),m=ar(a),h=ir(s),g=ar(s),y=ir(l),v=ar(l),b={a:function(e){return a[e.getDay()]},A:function(e){return i[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:Mr,e:Mr,f:Tr,H:Er,I:Ir,j:Ar,L:kr,m:Lr,M:Or,p:function(e){return o[+(e.getHours()>=12)]},Q:so,s:lo,S:Pr,u:Nr,U:Rr,V:Fr,w:jr,W:Hr,x:null,X:null,y:_r,Y:zr,Z:Vr,"%":ao},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return i[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:Ur,e:Ur,f:Kr,H:Br,I:Wr,j:$r,L:Yr,m:Jr,M:Gr,p:function(e){return o[+(e.getUTCHours()>=12)]},Q:so,s:lo,S:Zr,u:Xr,U:Qr,V:eo,w:to,W:no,x:null,X:null,y:ro,Y:oo,Z:io,"%":ao},q={a:function(e,t,n){var r=f.exec(t.slice(n));return r?(e.w=m[r[0].toLowerCase()],n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=p[r[0].toLowerCase()],n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=v[r[0].toLowerCase()],n+r[0].length):-1},B:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g[r[0].toLowerCase()],n+r[0].length):-1},c:function(e,n,r){return w(e,t,n,r)},d:gr,e:gr,f:Dr,H:vr,I:vr,j:yr,L:qr,m:hr,M:br,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:wr,s:Sr,S:xr,u:lr,U:ur,V:cr,w:sr,W:dr,x:function(e,t,r){return w(e,n,t,r)},X:function(e,t,n){return w(e,r,t,n)},y:fr,Y:pr,Z:mr,"%":Cr};function D(e,t){return function(n){var r,o,i,a=[],s=-1,l=0,u=e.length;for(n instanceof Date||(n=new Date(+n));++s<u;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(o=Qn[r=e.charAt(++s)])?r=e.charAt(++s):o="e"===r?" ":"0",(i=t[r])&&(r=i(n,o)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function C(e,t){return function(n){var r,o,i=Jn(1900);if(w(i,e,n+="",0)!=n.length)return null;if("Q"in i)return new Date(i.Q);if("p"in i&&(i.H=i.H%12+12*i.p),"V"in i){if(i.V<1||i.V>53)return null;"w"in i||(i.w=1),"Z"in i?(o=(r=Kn(Jn(i.y))).getUTCDay(),r=o>4||0===o?_n.ceil(r):_n(r),r=Fn.offset(r,7*(i.V-1)),i.y=r.getUTCFullYear(),i.m=r.getUTCMonth(),i.d=r.getUTCDate()+(i.w+6)%7):(o=(r=t(Jn(i.y))).getDay(),r=o>4||0===o?kn.ceil(r):kn(r),r=En.offset(r,7*(i.V-1)),i.y=r.getFullYear(),i.m=r.getMonth(),i.d=r.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),o="Z"in i?Kn(Jn(i.y)).getUTCDay():t(Jn(i.y)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(o+5)%7:i.w+7*i.U-(o+6)%7);return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,Kn(i)):t(i)}}function w(e,t,n,r){for(var o,i,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(o=t.charCodeAt(a++))){if(o=t.charAt(a++),!(i=q[o in Qn?t.charAt(a++):o])||(r=i(e,n,r))<0)return-1}else if(o!=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=C(e+="",Yn);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=C(e,Kn);return t.toString=function(){return e},t}}}(e)).format,Gn.parse,Zn=Gn.utcFormat,Xn=Gn.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"]});Date.prototype.toISOString||Zn("%Y-%m-%dT%H:%M:%S.%LZ"),+new Date("2000-01-01T00:00:00.000Z")||Xn("%Y-%m-%dT%H:%M:%S.%LZ");const uo=Y.bind(null,!0),co={},{isArray:po}=Array;function fo(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function mo(e){return void 0===e}function ho(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function go(e,t){const n=t.substring(1).split("/").slice(0,-1);let r;return n.forEach(((t,o)=>{if(o===n.length)return;r=+t;const i=isNaN(r)?{}:[];e[r||t]=mo(e[r||t])?i:e[t],e=e[r||t]})),e}function yo(e,t){let n=!0;if(fo(e)&&fo(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((r=>{yo(e[r],t[r])||(n=!1)})),n);if(po(e)&&po(t)){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n+=1)if(!yo(e[n],t[n]))return!1;return!0}return e===t}co.generate=function(e,t,n){n=n||"";let r=[];return Object.keys(t).forEach((o=>{const i=function(e){return e?uo({},{val:e}).val:e}(t[o]),a=e[o],s=`${n}/${o}`;yo(i,a)||ho(t,o)||(mo(a)?r.push({op:"add",path:s,value:i}):fo(i)&&fo(a)?r=r.concat(co.generate(a,i,s)):po(i)&&po(a)?r=r.concat(function(e,t,n){let r=[];const o=e.slice();let i=-1;function a(e,t,n){if(e[n]&&mo(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(let n=0,r=e.length;n<r;n+=1)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(yo(t,o))return r;if(!mo(t[0])&&mo(t[0].qInfo)||0===t.length)return r.push({op:"replace",path:n,value:t}),r;for(let e=o.length-1;e>=0;e-=1)i=a(t,o[e].qInfo&&o[e].qInfo.qId,e),-1===i?(r.push({op:"remove",path:`${n}/${e}`}),o.splice(e,1)):r=r.concat(co.generate(o[e],t[i],`${n}/${e}`));for(let e=0,s=t.length;e<s;e+=1)i=a(o,t[e].qInfo&&t[e].qInfo.qId),-1===i?(r.push({op:"add",path:`${n}/${e}`,value:t[e]}),o.splice(e,0,t[e])):i!==e&&(r.push({op:"move",path:`${n}/${e}`,from:`${n}/${i}`}),o.splice(e,0,o.splice(i,1)[0]));return r}(a,i,s)):r.push({op:"replace",path:`${n}/${o}`,value:i}))})),Object.keys(e).forEach((o=>{mo(t[o])&&!ho(e,o)&&r.push({op:"remove",path:`${n}/${o}`})})),r},co.apply=function(e,t){t.forEach((t=>{let n=go(e,t.path),r=t.path.split("/").splice(-1)[0],o=r&&isNaN(+r)?n[r]:n[+r]||n;const i=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(n=null,o=e),"add"===t.op||"replace"===t.op)if(po(n))"-"===r&&(r=n.length),n.splice(+r,"add"===t.op?0:1,t.value);else if(po(o)&&po(t.value)){const e=t.value.slice();o.length=0,o.push(...e)}else if(fo(o)&&fo(t.value))a=o,Object.keys(a).forEach((e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!ho(a,e)&&delete a[e]})),uo(o,t.value);else{if(!n)throw new Error("Patchee is not an object we can patch");n[r]=t.value}else if("move"===t.op){const o=go(e,t.from);po(n)?n.splice(+r,0,o.splice(+i,1)[0]):(n[r]=o[i],delete o[i])}else"remove"===t.op&&(po(n)?n.splice(+r,1):delete n[r]);var a}))},co.clone=function(e){return uo({},e)},co.createPatch=function(e,t,n){const r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},co.updateObject=function(e,t){Object.keys(e).length?co.apply(e,co.generate(e,t)):uo(e,t)};const vo=[[2,4,6],[2,4],[3]],bo=[,[,,[[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 xo(e,t,n){const r=e?e.length:0;let o,i=void 0===t?Number.MAX_VALUE:e[0]/t;for(o=1;o<r;o++)i=Math.min(i,e[o]/e[o-1]);void 0!==n&&(i=Math.min(i,n/e[r-1])),e.splice(0,0,i)}function qo(e,t,n){let r;const o=e?e.length:0;for(r=0;r<o;r++)xo(e[r],t,n)}!function(){let e,t;for(qo(vo,1,10),e=0;e<bo.length;e++)if(bo[e])for(t=0;t<bo[e].length;t++)Array.isArray(bo[e][t])&&qo(bo[e][t])}();var Do={exports:{}};function Co(){}function wo(){}wo.resetWarningCache=Co;function So(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function Mo({d:e,size:t,style:n={},viewBox:r="0 0 16 16"}){const i={fontSize:So(t),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",...n};return o.createElement("i",{style:i},o.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:r,fill:"currentColor"},o.createElement("path",{d:e})))}Do.exports=function(){function e(e,t,n,r,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:wo,resetWarningCache:Co};return n.PropTypes=n,n}();const Eo={d:"M15.9993744,3 L15.9993744,5 L4.99937445,5 L4.99937445,3 L15.9993744,3 Z M8.99937445,7 L15.9993744,7 L15.9993744,9 L8.99937445,9 L8.99937445,7 Z M11.9993744,11 L15.9993744,11 L15.9993744,13 L11.9993744,13 L11.9993744,11 Z M2.2,11 L7,11 L7,9.00369263 C7,8.89323568 7.08954305,8.80369263 7.2,8.80369263 C7.2549016,8.80369263 7.30738916,8.82626165 7.34515712,8.86610844 L10.1852182,11.8624926 C10.2583124,11.93961 10.258346,12.0604218 10.1852948,12.13758 L7.34523376,15.1373102 C7.2692928,15.2175206 7.14270711,15.2209817 7.06249671,15.1450407 C7.02260076,15.1072683 7,15.0547472 7,14.9998069 L7,12.9043747 C4.79351111,12.9043747 2.8018683,12.9266213 1.02507156,12.9711145 L1.02507252,12.9711526 C0.472939773,12.9849787 0.014139487,12.5485949 0.000313396522,11.9964622 C0.000104473692,11.988119 -1.32268838e-12,11.9797736 -1.3231638e-12,11.9714278 L-1.83320026e-12,3 L2,3 L2,10.8 C2,10.9104569 2.08954305,11 2.2,11 Z"},Io={d:"M13,7 L8,7 L13,7 L13,4.98151367 C13,2.23029964 10.7614237,0 8,0 C5.23857625,0 3,2.23029964 3,4.98151367 L3,7 L3.75,7 L3,7 L4.5,7 L4.5,5.33193359 C4.5,3.21561511 5.54860291,1.5 8,1.5 C10.4513971,1.5 11.5,3.21561511 11.5,5.33193359 L11.5,7 L12.25,7 L3,7 C2.44771525,7 2,7.44771525 2,8 L2,15 C2,15.5522847 2.44771525,16 3,16 L13,16 C13.5522847,16 14,15.5522847 14,15 L14,8 C14,7.44771525 13.5522847,7 13,7 L3,7 L13,7 Z"},Ao="M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z",ko={d:"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"},To={d:"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"};function Lo(e,t,n){(function({model:e,properties:t}){return e.modifiers?e.modifiers.apply({model:e,properties:t}):Promise.resolve()})({model:e,properties:n}).then((()=>{e.colorSupport&&e.colorSupport.colorByUpdater(n,"qHyperCubeDef.");let r=co.generate(t,n);r&&r.length&&(r=r.map((e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}))),e.applyPatches(r,!0))}))}function Oo(e,t,n,r,o,i){e.getEffectiveProperties().then((a=>{const s=Y(!0,{},a),l=s.qHyperCubeDef[r][t],u=s.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][n];u.qAttributeDimensions=l.qAttributeDimensions,l.qAttributeDimensions=[],i||(u.qAttributeExpressions=l.qAttributeExpressions,l.qAttributeExpressions=[]),s.qHyperCubeDef[r][t]=u,s.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][n]=l,o&&o({oldItem:l,newItem:u,oldProperties:a,newProperties:s,model:e}),Lo(e,a,s)}))}function Po({dir:e,dock:t,altList:n,model:r,translator:o,app:i,onChange:a}){return 0===n.length?null:{dir:e,dock:t,getAlternatives(){const e=n.map((e=>function(e,t,n){if(e.qLibraryId)return t.getDimension(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null)).then((e=>e?"H"!==e.qDim.qGrouping&&e.qDim.qLabelExpression?e.qDim.qLabelExpression:e.qDim.title:n.get("Object.ErrorMessage.MissingDimension")));const r=e.qDef.qLabelExpression;if(r)return t.evaluate(r);const o=e.qDef.qFieldLabels[0]||e.qDef.qFieldDefs[0];return Promise.resolve(o)}(e,i,o).then((t=>({id:e.qDef.cId,selected:!1,title:t})))));return Promise.all(e)},changeTo(e,t){Oo(r,e,t,"qDimensions",a)}}}function No(e,t,n,r="/qHyperCubeDef"){return{breadcrumbs:e.qGroupFallbackTitles.slice(0,e.qGroupPos),drilldown:"H"===e.qGrouping,index:t,locked:!!e.qLocked,text:"H"===e.qGrouping?e.qGroupFallbackTitles[e.qGroupPos]:e.qFallbackTitle,popoverText:(o=e,"H"===o.qGrouping?o.title||"":o.qFallbackTitle||""),drillUp(e){n.drillUp(r,t,e)}};var o}function Ro({altList:e,app:t,dir:n,dock:r,model:o,onChange:i,skipAttributeExpressions:a,translator:s}){return 0===e.length?null:{dir:n,dock:r,getAlternatives(){const n=e.map((e=>function(e,t,n){if(e.qLibraryId)return t.getMeasure(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null)).then((e=>e?e.qMeasure.qLabelExpression?e.qMeasure.qLabelExpression:e.qMeasure.qLabel||e.qMeasure.qDef:n.get("Object.ErrorMessage.MissingMeasure")));const r=e.qDef.qLabelExpression;if(r)return t.evaluate(r);const o=e.qDef.qLabel||e.qDef.qDef;return Promise.resolve(o)}(e,t,s).then((t=>({id:e.qDef.cId,selected:!1,title:t})))));return Promise.all(n)},changeTo(e,t){Oo(o,e,t,"qMeasures",i,a)}}}function Fo(e,t){return{breadcrumbs:[],drilldown:!1,index:t,locked:!1,text:e.qFallbackTitle,popoverText:e.qFallbackTitle}}const jo={bottom:{anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},top:{anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}},left:{anchorOrigin:{vertical:"center",horizontal:"left"},transformOrigin:{vertical:"center",horizontal:"right"}},right:{anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"}}},Ho=({children:e,...t})=>o.createElement(i,F({size:"small",disableRipple:!0,disableTouchRipple:!0},t),e);function _o(){function e({title:e,selected:t,onClick:n}){const r=ae.detectTextDirection(e);return o.createElement(l,{role:"menuitem",button:!0,onClick:n,style:{textAlign:"start"}},o.createElement(u,{style:{minWidth:32}},o.createElement(Mo,{d:t?Ao:""})),o.createElement(c,{primaryTypographyProps:{dir:r}},e))}function t({alignTo:t,changeTo:n,current:r,dir:i,dock:l,list:u,onClose:c,show:d,instruction:p}){const f=u.map(((t,r)=>o.createElement(e,{key:t.id,title:t.title,onClick:()=>n(r)})));return o.createElement(a,F({anchorEl:t,open:d,onClose:c},jo[l],{PaperProps:{style:{minWidth:"250px",maxHeight:"300px"}}}),o.createElement(s,{dense:!0,dir:i,"aria-label":p,component:"nav"},o.createElement(e,{title:r,selected:!0,onClick:c}),f))}e.propTypes={title:Do.exports.string.isRequired,selected:Do.exports.bool,onClick:Do.exports.func.isRequired},e.defaultProps={selected:!1},t.propTypes={alignTo:Do.exports.any,changeTo:Do.exports.func.isRequired,current:Do.exports.string.isRequired,dir:Do.exports.string.isRequired,dock:Do.exports.string.isRequired,list:Do.exports.array,onClose:Do.exports.func.isRequired,show:Do.exports.bool.isRequired,instruction:Do.exports.string},t.defaultProps={list:[],alignTo:null};class n extends o.Component{constructor(e){super(e),this.state={open:!1,inSelection:e.selections&&e.selections.isActive()},this.openPopover=this.openPopover.bind(this),this.closePopover=this.closePopover.bind(this),this.changeTo=this.changeTo.bind(this),this.alignToRef=o.createRef()}componentDidMount(){const{selections:e}=this.props;e&&(this.onSelectionsActivated=()=>this.setState({inSelection:!0}),this.onSelectionsDeactivated=()=>this.setState({inSelection:!1}),e.addListener("activated",this.onSelectionsActivated),e.addListener("deactivated",this.onSelectionsDeactivated),e.addListener("canceled",this.onSelectionsDeactivated))}componentWillUnmount(){const{selections:e}=this.props;e&&(e.removeListener("activated",this.onSelectionsActivated),e.removeListener("deactivated",this.onSelectionsDeactivated),e.removeListener("canceled",this.onSelectionsDeactivated))}changeTo(e){this.props.popover.changeTo(this.props.titleData.index,e),this.closePopover()}openPopover(){this.state.closeTime&&Date.now()-this.state.closeTime<20||this.props.popover.getAlternatives().then((e=>{this.setState({open:!0,alternatives:e})}))}closePopover(){this.setState({open:!1,closeTime:Date.now()})}render(){const{titleData:e,popover:n,translator:r,disabled:i,isDimension:a,padding:s,minWidth:l,hasAlternative:u}=this.props,c={flex:"1 1 auto",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:"normal",lineHeight:"normal",...this.props.style},d=e.breadcrumbs.length,p=i||this.state.inSelection,f=e.breadcrumbs.map(((t,n)=>o.createElement(Ho,{style:{display:"flex",alignItems:"center",color:p&&"rgba(89, 89, 89, 0.8)",pointerEvents:p?"none":"auto",paddingTop:0,paddingBottom:0,height:"100%"},key:n,onClick:()=>p?void 0:e.drillUp(d-n),title:t},o.createElement("span",{style:c},t),o.createElement(Mo,F({},To,{size:"small",style:{margin:"0 8px"}}))))),m=n&&!this.state.open?this.openPopover:this.closePopover,h=!n||i||this.state.inSelection,g={display:"flex",alignItems:"center",width:"100%",color:h&&"rgba(89, 89, 89, 0.8)",height:"100%",border:!a&&h&&"none",paddingTop:0,paddingBottom:0};this.state.open&&(g.background="rgba(0,0,0,0.08)");s&&(g.padding=s),l&&(g.minWidth=l);const y=ae.detectTextDirection(e.text),v=o.createElement(Ho,{"aria-label":r.get("Accessibility.Alternative.Instructions",[e.text]),style:g,onClick:h?void 0:m,title:e.text,tabIndex:h?-1:0,onFocus:h?void 0:e=>{e.currentTarget.style.boxShadow="0px 0px 0px 2px #177FE6 inset",e.currentTarget.style.borderRadius="2px"},onBlur:h?void 0:e=>{e.currentTarget.style.boxShadow="none",e.currentTarget.style.borderRadius="0px"},onMouseDown:e=>{e.preventDefault()}},e.locked&&o.createElement(Mo,F({},Io,{size:"small",title:r.get("Tooltip.selections.locked")})),o.createElement("span",{style:c,dir:y},e.text),n&&o.createElement(Mo,F({},ko,{size:"small",style:{margin:"0 8px"}})));return o.createElement(o.Fragment,null,e.drilldown&&o.createElement(Mo,F({},Eo,{size:"small",title:r.get("Tooltip.dimensions.drilldown"),style:{margin:"0 4px 0 0"}})),f,o.createElement("div",{ref:this.alignToRef,style:{overflow:"hidden",pointerEvents:u?"auto":"none",height:"100%"}},v),n&&o.createElement(t,{dock:n.dock,dir:n.dir,current:e.popoverText,alignTo:this.alignToRef.current,show:this.state.open,list:this.state.alternatives,onClose:this.closePopover,changeTo:this.changeTo,instruction:r.get("Accessibility.Popover.Instructions")}))}}function r(e){return{top:"bottom",bottom:"top",left:"right",right:"left"}[e]}function i(e){return!e.isDimension&&te(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures.length")>0}return n.propTypes={disabled:Do.exports.bool.isRequired,padding:Do.exports.string,minWidth:Do.exports.string,titleData:Do.exports.shape({breadcrumbs:Do.exports.arrayOf(Do.exports.string).isRequired,drilldown:Do.exports.bool.isRequired,index:Do.exports.number.isRequired,locked:Do.exports.bool.isRequired,text:Do.exports.string.isRequired,popoverText:Do.exports.string.isRequired,drillUp:Do.exports.func}).isRequired,popover:Do.exports.shape({dir:Do.exports.string.isRequired,dock:Do.exports.string.isRequired,changeTo:Do.exports.func.isRequired,getAlternatives:Do.exports.func.isRequired}),translator:Do.exports.shape({get:Do.exports.func.isRequired}).isRequired,selections:Do.exports.shape({isActive:Do.exports.func,addListener:Do.exports.func,removeListener:Do.exports.func}),style:Do.exports.shape({fontSize:Do.exports.string,color:Do.exports.string,fontFamily:Do.exports.string}).isRequired,isDimension:Do.exports.bool.isRequired,hasAlternative:Do.exports.bool.isRequired},n.defaultProps={popover:null,selections:null,padding:"",minWidth:""},{renderer:"react",disableTriggers:!0,preferredSize:function(){return this.settings.settings.isDimension||i(this.settings.settings)?28:20},render(){const{settings:{app:e,disabled:t,explicitItemInfos:a,hyperCube:s,hyperCubeDef:l,isDimension:u,minWidth:c,model:d,onChangeToAlternative:p,padding:f,rtl:m,selections:h,skipAttributeExpressions:g,translator:y},layout:{dock:v}}=this.settings,b="top"!==v&&"bottom"!==v||!m?"ltr":"rtl",x=function(e,t){const n={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",height:"100%"};return"left"===e?(n.width=t.height+"px",n.height=t.width+"px",n.transform=`rotate(-90deg) translate(-${t.height}px, 0)`,n.transformOrigin="top left"):"right"===e&&(n.width=t.height+"px",n.height=t.width+"px",n.transform=`rotate(90deg) translate(0, -${t.width}px)`,n.transformOrigin="top left"),n}(v,this.rect),q=l&&l.qLayoutExclude&&l.qLayoutExclude.qHyperCubeDef,D=q&&q[u?"qDimensions":"qMeasures"]||[],C=a||s[u?"qDimensionInfo":"qMeasureInfo"],w=u?Po:Ro,S=u?No:Fo,M=d&&d.colorSupport&&d.modifiers&&w({altList:D,app:e,dir:m?"rtl":"ltr",dock:r(v),model:d,onChange:p,skipAttributeExpressions:g,translator:y}),E=(I=this.settings.settings).isDimension&&te(I,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.length")>0||i(this.settings.settings);var I;const A=C.map(((e,r)=>{const i="number"==typeof e.explicitColumn?e.explicitColumn:r,a=S(e,i,d),s=r===C.length-1;return o.createElement(o.Fragment,{key:e.cId},o.createElement(n,{popover:M,titleData:a,model:d,translator:y,selections:h,disabled:t(),style:this.style,isDimension:u,padding:f,minWidth:c,hasAlternative:E}),!s&&o.createElement("span",{style:{lineHeight:"normal",...this.style}},", "))}));return o.createElement("div",{style:x,dir:b},A)}}}function zo(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return e<t?t:e>n?n:e}function Vo(e){if(e.type)return e;if("#"===e.charAt(0))return Vo(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length/3,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb(".concat(n.map((function(e){return parseInt(e,16)})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(["Material-UI: unsupported `".concat(e,"` color."),"We support the following formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()."].join("\n"));var r=e.substring(t+1,e.length-1).split(",");return{type:n,values:r=r.map((function(e){return parseFloat(e)}))}}function Uo(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function Bo(e){var t="hsl"===(e=Vo(e)).type?Vo(function(e){var t=(e=Vo(e)).values,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return o-i*Math.max(Math.min(t-3,9-t,1),-1)},s="rgb",l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",l.push(t[3])),Uo({type:s,values:l})}(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Wo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $o(){return($o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Yo(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Ko(){return(Ko=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Jo(e){return(Jo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Go(e){return(Go="function"==typeof Symbol&&"symbol"===Jo(Symbol.iterator)?function(e){return Jo(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":Jo(e)})(e)}function Zo(e){return e&&"object"===Go(e)&&!Array.isArray(e)}function Xo(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},r=n.clone?Ko({},e):e;return Zo(e)&&Zo(t)&&Object.keys(t).forEach((function(o){"__proto__"!==o&&(Zo(t[o])&&o in e?r[o]=Xo(e[o],t[o],n):r[o]=t[o])})),r}(Do.exports.element,function(){return null}).isRequired=(Do.exports.element.isRequired,function(){return null});var Qo={};
8
8
  /** @license React v16.11.0
9
9
  * react-is.production.min.js
10
10
  *
@@ -13,6 +13,6 @@ import e from"hammerjs";import t from"picasso.js";import n from"picasso-plugin-q
13
13
  * This source code is licensed under the MIT license found in the
14
14
  * LICENSE file in the root directory of this source tree.
15
15
  */
16
- Object.defineProperty(ti,"__esModule",{value:!0});var ni="function"==typeof Symbol&&Symbol.for,ri=ni?Symbol.for("react.element"):60103,oi=ni?Symbol.for("react.portal"):60106,ii=ni?Symbol.for("react.fragment"):60107,ai=ni?Symbol.for("react.strict_mode"):60108,si=ni?Symbol.for("react.profiler"):60114,li=ni?Symbol.for("react.provider"):60109,ui=ni?Symbol.for("react.context"):60110,ci=ni?Symbol.for("react.async_mode"):60111,pi=ni?Symbol.for("react.concurrent_mode"):60111,di=ni?Symbol.for("react.forward_ref"):60112,fi=ni?Symbol.for("react.suspense"):60113,mi=ni?Symbol.for("react.suspense_list"):60120,hi=ni?Symbol.for("react.memo"):60115,gi=ni?Symbol.for("react.lazy"):60116,yi=ni?Symbol.for("react.fundamental"):60117,vi=ni?Symbol.for("react.responder"):60118,bi=ni?Symbol.for("react.scope"):60119;function xi(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case ri:switch(e=e.type){case ci:case pi:case ii:case si:case ai:case fi:return e;default:switch(e=e&&e.$$typeof){case ui:case di:case li:return e;default:return t}}case gi:case hi:case oi:return t}}}function qi(e){return xi(e)===pi}ti.typeOf=xi,ti.AsyncMode=ci,ti.ConcurrentMode=pi,ti.ContextConsumer=ui,ti.ContextProvider=li,ti.Element=ri,ti.ForwardRef=di,ti.Fragment=ii,ti.Lazy=gi,ti.Memo=hi,ti.Portal=oi,ti.Profiler=si,ti.StrictMode=ai,ti.Suspense=fi,ti.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===ii||e===pi||e===si||e===ai||e===fi||e===mi||"object"==typeof e&&null!==e&&(e.$$typeof===gi||e.$$typeof===hi||e.$$typeof===li||e.$$typeof===ui||e.$$typeof===di||e.$$typeof===yi||e.$$typeof===vi||e.$$typeof===bi)},ti.isAsyncMode=function(e){return qi(e)||xi(e)===ci},ti.isConcurrentMode=qi,ti.isContextConsumer=function(e){return xi(e)===ui},ti.isContextProvider=function(e){return xi(e)===li},ti.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===ri},ti.isForwardRef=function(e){return xi(e)===di},ti.isFragment=function(e){return xi(e)===ii},ti.isLazy=function(e){return xi(e)===gi},ti.isMemo=function(e){return xi(e)===hi},ti.isPortal=function(e){return xi(e)===oi},ti.isProfiler=function(e){return xi(e)===si},ti.isStrictMode=function(e){return xi(e)===ai},ti.isSuspense=function(e){return xi(e)===fi},"undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),wo.exports.oneOfType([wo.exports.func,wo.exports.PropTypes.object]);var Di=["xs","sm","md","lg","xl"];function Ci(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,r=e.unit,o=void 0===r?"px":r,i=e.step,a=void 0===i?5:i,s=Jo(e,["values","unit","step"]);function l(e){var t="number"==typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(o,")")}function u(e,t){var r=Di.indexOf(t)+1;return r===Di.length?l(e):"@media (min-width:".concat(n[e]).concat(o,") and ")+"(max-width:".concat(n[Di[r]]-a/100).concat(o,")")}return Ko({keys:Di,values:n,up:l,down:function(e){var t=Di.indexOf(e)+1,r=n[Di[t]];return t===Di.length?l("xs"):"@media (max-width:".concat(("number"==typeof r&&t>0?r:e)-a/100).concat(o,")")},between:u,only:function(e){return u(e,e)},width:function(e){return n[e]}},s)}function wi(e,t,n){var r;return Ko({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Ko({paddingLeft:t(2),paddingRight:t(2)},n,Yo({},e.up("sm"),Ko({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(r={minHeight:56},Yo(r,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),Yo(r,e.up("sm"),{minHeight:64}),r)},n)}var Si="#7986cb",Mi="#3f51b5",Ei="#303f9f",Ii="#ff4081",Ai="#f50057",ki="#c51162",Ti={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"},Li="#e57373",Oi="#f44336",Pi="#d32f2f",Ni={black:"#000",white:"#fff"},Ri={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Ni.white,default:Ti[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.08)",hoverOpacity:.08,selected:"rgba(0, 0, 0, 0.14)",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)"}},Fi={text:{primary:Ni.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:Ti[800],default:"#303030"},action:{active:Ni.white,hover:"rgba(255, 255, 255, 0.1)",hoverOpacity:.1,selected:"rgba(255, 255, 255, 0.2)",disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)"}};function ji(e,t,n,r){e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=function(e,t){if(e=Bo(e),t=Uo(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return Wo(e)}(e.main,r):"dark"===t&&(e.dark=function(e,t){if(e=Bo(e),t=Uo(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return Wo(e)}(e.main,1.5*r)))}function Hi(e){var t=e.primary,n=void 0===t?{light:Si,main:Mi,dark:Ei}:t,r=e.secondary,o=void 0===r?{light:Ii,main:Ai,dark:ki}:r,i=e.error,a=void 0===i?{light:Li,main:Oi,dark:Pi}:i,s=e.type,l=void 0===s?"light":s,u=e.contrastThreshold,c=void 0===u?3:u,p=e.tonalOffset,d=void 0===p?.2:p,f=Jo(e,["primary","secondary","error","type","contrastThreshold","tonalOffset"]);function m(e){return function(e,t){var n=$o(e),r=$o(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}(e,Fi.text.primary)>=c?Fi.text.primary:Ri.text.primary}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;return!(e=Ko({},e)).main&&e[t]&&(e.main=e[t]),ji(e,"light",n,d),ji(e,"dark",r,d),e.contrastText||(e.contrastText=m(e.main)),e}var g={dark:Fi,light:Ri};return ei(Ko({common:Ni,type:l,primary:h(n),secondary:h(o,"A400","A200","A700"),error:h(a),grey:Ti,contrastThreshold:c,getContrastText:m,augmentColor:h,tonalOffset:d},g[l]),f,{clone:!1})}function _i(e){return Math.round(1e5*e)/1e5}var zi={textTransform:"uppercase"};function Vi(e,t){var n="function"==typeof t?t(e):t,r=n.fontFamily,o=void 0===r?'"Roboto", "Helvetica", "Arial", sans-serif':r,i=n.fontSize,a=void 0===i?14:i,s=n.fontWeightLight,l=void 0===s?300:s,u=n.fontWeightRegular,c=void 0===u?400:u,p=n.fontWeightMedium,d=void 0===p?500:p,f=n.fontWeightBold,m=void 0===f?700:f,h=n.htmlFontSize,g=void 0===h?16:h,y=n.allVariants,v=n.pxToRem,b=Jo(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),x=a/14,q=v||function(e){return"".concat(e/g*x,"rem")},D=function(e,t,n,r,i){return Ko({fontFamily:o,fontWeight:e,fontSize:q(t),lineHeight:n},'"Roboto", "Helvetica", "Arial", sans-serif'===o?{letterSpacing:"".concat(_i(r/t),"em")}:{},{},i,{},y)},C={h1:D(l,96,1,-1.5),h2:D(l,60,1,-.5),h3:D(c,48,1.04,0),h4:D(c,34,1.17,.25),h5:D(c,24,1.33,0),h6:D(d,20,1.6,.15),subtitle1:D(c,16,1.75,.15),subtitle2:D(d,14,1.57,.1),body1:D(c,16,1.5,.15),body2:D(c,14,1.43,.15),button:D(d,14,1.75,.4,zi),caption:D(c,12,1.66,.4),overline:D(c,12,2.66,1,zi)};return ei(Ko({htmlFontSize:g,pxToRem:q,round:_i,fontFamily:o,fontSize:a,fontWeightLight:l,fontWeightRegular:c,fontWeightMedium:d,fontWeightBold:m},C),b,{clone:!1})}function Ui(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var Bi=["none",Ui(0,2,1,-1,0,1,1,0,0,1,3,0),Ui(0,3,1,-2,0,2,2,0,0,1,5,0),Ui(0,3,3,-2,0,3,4,0,0,1,8,0),Ui(0,2,4,-1,0,4,5,0,0,1,10,0),Ui(0,3,5,-1,0,5,8,0,0,1,14,0),Ui(0,3,5,-1,0,6,10,0,0,1,18,0),Ui(0,4,5,-2,0,7,10,1,0,2,16,1),Ui(0,5,5,-3,0,8,10,1,0,3,14,2),Ui(0,5,6,-3,0,9,12,1,0,3,16,2),Ui(0,6,6,-3,0,10,14,1,0,4,18,3),Ui(0,6,7,-4,0,11,15,1,0,4,20,3),Ui(0,7,8,-4,0,12,17,2,0,5,22,4),Ui(0,7,8,-4,0,13,19,2,0,5,24,4),Ui(0,7,9,-4,0,14,21,2,0,5,26,4),Ui(0,8,9,-5,0,15,22,2,0,6,28,5),Ui(0,8,10,-5,0,16,24,2,0,6,30,5),Ui(0,8,11,-5,0,17,26,2,0,6,32,5),Ui(0,9,11,-5,0,18,28,2,0,7,34,6),Ui(0,9,12,-6,0,19,29,2,0,7,36,6),Ui(0,10,13,-6,0,20,31,3,0,8,38,7),Ui(0,10,13,-6,0,21,33,3,0,8,40,7),Ui(0,10,14,-6,0,22,35,3,0,8,42,7),Ui(0,11,14,-7,0,23,36,3,0,9,44,8),Ui(0,11,15,-7,0,24,38,3,0,9,46,8)],Wi={borderRadius:4};function $i(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(t.mui)return t;e="function"==typeof t?t:function(e){return t*e};var n=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return 0===n.length?e(1):1===n.length?e(n[0]):n.map((function(t){var n=e(t);return"number"==typeof n?"".concat(n,"px"):n})).join(" ")};return Object.defineProperty(n,"unit",{get:function(){return t}}),n.mui=!0,n}var Yi={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Ki={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195},Ji=function(e){return"".concat(Math.round(e),"ms")},Gi={easing:Yi,duration:Ki,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.duration,r=void 0===n?Ki.standard:n,o=t.easing,i=void 0===o?Yi.easeInOut:o,a=t.delay,s=void 0===a?0:a;return Jo(t,["duration","easing","delay"]),(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"==typeof r?r:Ji(r)," ").concat(i," ").concat("string"==typeof s?s:Ji(s))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}},Zi={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Xi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,o=void 0===r?{}:r,i=e.palette,a=void 0===i?{}:i,s=e.shadows,l=e.spacing,u=e.typography,c=void 0===u?{}:u,p=Jo(e,["breakpoints","mixins","palette","shadows","spacing","typography"]),d=Hi(a),f=Ci(n),m=$i(l),h=Ko({breakpoints:f,direction:"ltr",mixins:wi(f,m,o),overrides:{},palette:d,props:{},shadows:s||Bi,typography:Vi(d,c),spacing:m},ei({shape:Wi,transitions:Gi,zIndex:Zi},p));return h}d({defaultTheme:Xi()});const Qi=Xi({palette:{text:{primary:"rgba(89, 89, 89, 0.8)",secondary:"rgba(0, 0, 0, 0.55)",disabled:"rgba(0, 0, 0, 0.3)"},action:{disabled:"rgba(0, 0, 0, 0.3)"}},typography:{fontFamily:'"QlikView Sans", "Arial", sans-serif',button:{textTransform:"initial",fontWeight:400}},shape:{borderRadius:2},shadows:["none","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)"],props:{MuiButtonBase:{disableRipple:!0}}});const ea=f({productionPrefix:"qa562",disableGlobal:!0,seed:""});function ta(){function e({x:e,y:t,width:n,height:r,scaleRatio:o,margin:i}={}){const a={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0}};return a.x=Number.isNaN(e)?a.x:e,a.y=Number.isNaN(t)?a.y:t,a.width=Number.isNaN(n)?a.width:n,a.height=Number.isNaN(r)?a.height:r,void 0!==o&&(a.scaleRatio.x=Number.isNaN(o.x)?a.scaleRatio.x:o.x,a.scaleRatio.y=Number.isNaN(o.y)?a.scaleRatio.y:o.y),void 0!==i&&(a.margin.left=Number.isNaN(i.left)?0:i.left,a.margin.top=Number.isNaN(i.top)?0:i.top),a}return function(t={}){const{createElement:n=document.createElement.bind(document)}=t;let r,i=e();const a={element:()=>r,root:()=>r,appendTo:e=>(r||(r=n("div"),r.style.position="absolute",r.style["-webkit-font-smoothing"]="antialiased",r.style["-moz-osx-font-smoothing"]="antialiased",r.style.pointerEvents="none"),e.appendChild(r),r),render(e){if(!r)return!1;const t=i.scaleRatio.x,n=i.scaleRatio.y;return r.style.left=Math.round(i.margin.left+i.x*t)+"px",r.style.top=Math.round(i.margin.top+i.y*n)+"px",r.style.width=Math.round(i.width)+"px",r.style.height=Math.round(i.height)+"px",r.style.transform=`scale(${t}, ${n})`,r.style.transformOrigin="top left",p.render(function(e,t){return o.createElement(m,{generateClassName:t},o.createElement(h,{theme:Qi},e))}(e,ea),r),!0},itemsAt:()=>[],findShapes:()=>[],clear:()=>(r&&p.unmountComponentAtNode(r),a),destroy(){r&&r.parentElement&&(p.unmountComponentAtNode(r),r.parentElement.removeChild(r)),r=null},size:t=>(t&&(i=e(t)),i)};return a}}function na(){return function(e){e.renderer("react",ta()),e.component("data-title",Vo()),e.component("disclaimer",function(){class e extends o.Component{render(){const{label:e,spanStyle:t}=this.props;return o.createElement(o.Fragment,null,o.createElement("span",{ref:this.alignToRef,style:t,title:e},e))}}return e.propTypes={label:wo.exports.string.isRequired,spanStyle:wo.exports.shape().isRequired},{renderer:"react",disableTriggers:!0,preferredSize:function(){return 22},render(){const{settings:{label:t,rtl:n},layout:{dock:r},style:i={}}=this.settings,a="top"!==r&&"bottom"!==r||!n?"ltr":"rtl",s=function(e,t,n){const r={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#7b7a78",fontStyle:"italic",fontSize:"13px",fontFamily:e.fontFamily||"'Source Sans Pro', 'Arial', 'sans-serif'"};switch(t){case"left":r.width=n.height+"px",r.transform=`rotate(-90deg) translate(-${n.height}px, 0)`,r.transformOrigin="top left";break;case"right":r.width=n.height+"px",r.transform=`rotate(90deg) translate(0, -${n.width}px)`,r.transformOrigin="top left";break;case"center":r.width=n.width+"px",r.height=n.height+"px",r.color="#595959",r.fontStyle="normal",r.fontSize="1.2em",r.textAlign="center";break;default:case"top":case"bottom":r.justifyContent="flex-start",r.alignItems="flex-start"}return r}(i,r,this.rect),l="center"===r?t:"* "+t,u="center"!==r?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}:{};return o.createElement("div",{style:s,dir:a},o.createElement(o.Fragment,null,o.createElement(e,{label:l,spanStyle:u})))}}}())}}function ra(e){return et(e).l<70}function oa(e,t){const n=et(e).l/100,r=et(t).l/100;return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)}function ia(e,t){return{x:t.x+e.r*Math.sin(e.a),y:t.y-e.r*Math.cos(e.a)}}var aa={require:["chart","settings"],defaultSettings:{settings:{},style:{}},render(){return function({chart:e,settings:t}){const n=e.component(t.component);if(!n)return[];const r=e.findShapes(t.selector).filter((e=>e.key===t.component));if(r.length<2)return[];if(n.settings.settings.slice.cornerRadius>0||n.settings.settings.slice.strokeWidth>0)return[];const o=[];let i=r[r.length-1];for(let e=0;e<r.length;e+=1){const t=r[e],n=i.attrs.fill,a=t.attrs.fill;if(oa(a,n)<=1.2){const{start:e,offset:n}=t.desc.slice;let{innerRadius:r,outerRadius:s}=t.desc.slice;if(r=Math.max(r,i.desc.slice.innerRadius),s=Math.min(s,i.desc.slice.outerRadius),s>r){const t=ia({r:s,a:e},n),i=ia({r:r,a:e},n);o.push({type:"line",x1:t.x,y1:t.y,x2:i.x,y2:i.y,strokeWidth:1,opacity:.4,stroke:ra(a)?"#ccc":"#333"})}}i=t}return o}({chart:this.chart,rect:this.rect,style:this.style,settings:this.settings.settings})}};function sa(e,t=!0){let n="";for(let t=0;t<e.length;t++){const r=e[t];n+=0===t?`M${r.x} ${r.y}`:`L${r.x} ${r.y}`,n+=" "}return t&&(n+="Z"),n}function la(e){const{size:t,angle:n}=e,r={x:e.x,y:e.y},o=t/2,i=e.x-o,a=e.y-o;let s=[{x:i,y:a+t},{x:i+o,y:a},{x:i+t,y:a+t},{x:i,y:a+t}];return s=s.map((e=>function(e,t,n={x:0,y:0}){const r=Math.cos(t),o=Math.sin(t),i=(s=n,{x:(a=e).x-s.x,y:a.y-s.y});var a,s;return function(e,t){return{x:e.x+t.x,y:e.y+t.y}}({x:r*i.x-o*i.y,y:o*i.x+r*i.y},n)}(e,n,r))),{type:"path",fill:e.fill,d:sa(s)}}var ua={require:["chart"],defaultSettings:{settings:{},style:{}},render(){return function({chart:e,settings:t}){if(!e.component(t.component))return[];const n=e.findShapes(t.selector).filter((e=>e.key===t.component));if(n.length<2)return[];const r=[];for(let e=0;e<n.length;e+=1){const a=n[e];if(a.data.radius.value<0){const{start:e,end:n,offset:s}=a.desc.slice,l=(e+n)/2,u=(o={r:t.offset,a:l},{x:(i=s).x+o.r*Math.sin(o.a),y:i.y-o.r*Math.cos(o.a)}),c=la({size:t.size,fill:t.fill,angle:l+Math.PI,...u});c.data={...a.data,_share:a.desc.share,_fillColor:a.attrs.fill},r.push(c)}}var o,i;return r}({chart:this.chart,rect:this.rect,style:this.style,settings:this.settings.settings})}};function ca(e){return(ca="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pa(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}function da(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){pa(i,r,o,a,s,"next",e)}function s(e){pa(i,r,o,a,s,"throw",e)}a(void 0)}))}}function fa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ma(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 ha(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ma(Object(n),!0).forEach((function(t){fa(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ma(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ga(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function ya(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(e,t)||ba(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 va(e){return function(e){if(Array.isArray(e))return xa(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||ba(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 ba(e,t){if(e){if("string"==typeof e)return xa(e,t);var n=Object.prototype.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)?xa(e,t):void 0}}function xa(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var qa=Object.prototype.hasOwnProperty,Da=Object.prototype.toString,Ca=Object.defineProperty,wa=Object.getOwnPropertyDescriptor,Sa=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Da.call(e)},Ma=function(e){if(!e||"[object Object]"!==Da.call(e))return!1;var t,n=qa.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&qa.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||qa.call(e,t)},Ea=function(e,t){Ca&&"__proto__"===t.name?Ca(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Ia=function(e,t){if("__proto__"===t){if(!qa.call(e,t))return;if(wa)return wa(e,t).value}return e[t]},Aa=function e(){var t,n,r,o,i,a,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(n in t)r=Ia(s,n),s!==(o=Ia(t,n))&&(c&&o&&(Ma(o)||(i=Sa(o)))?(i?(i=!1,a=r&&Sa(r)?r:[]):a=r&&Ma(r)?r:{},Ea(s,{name:n,newValue:e(c,a,o)})):void 0!==o&&Ea(s,{name:n,newValue:o}));return s};function ka(e,t){return{range:function(e){var n=e.resources,r=e.data,o=n.theme.palette("categorical",0===t?r.items.length:t);return r.items.map((function(e){return o[e.value%o.length]}))},valueAccessor:e.value}}function Ta(e,t){return{range:function(e){var n=e.resources,r=e.data,o=n.theme.palette("categorical",0===t?r.items.length:t);return r.items.map((function(e){return o[e.row.value%o.length]}))},valueAccessor:e.value}}function La(e,t,n,r,o){var i,a=o.byRow,s=o.byElemNo;if(r&&(t.input.persistent||e.hc.qDimensionInfo.length>1||void 0===n.activeDimensionIndex&&e.hc.qSize.qcy>((null===(i=e.hc.qDataPages[0])||void 0===i?void 0:i.qArea.qHeight)||0)))return s(r,r.raw().qCardinal);if(r){var l=t.pic.extract({field:r.key(),trackBy:r.value}).length;return a(r,l)}return{}}function Oa(e,t){var n=e.hc.qDimensionInfo,r=t.input.byDimDef||{activeDimensionIndex:n.length-1};if(r.activeDimensionIndex>=0){var o=n[r.activeDimensionIndex];r=o.coloring&&o.coloring.colorMapRef?{type:"libraryItem",key:o.coloring.colorMapRef,activeDimensionIndex:r.activeDimensionIndex}:{activeDimensionIndex:r.activeDimensionIndex}}return r}function Pa(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 Na(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Ra(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Fa(){}var ja=1/.7,Ha="\\s*([+-]?\\d+)\\s*",_a="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",za="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Va=/^#([0-9a-f]{3,8})$/,Ua=new RegExp("^rgb\\("+[Ha,Ha,Ha]+"\\)$"),Ba=new RegExp("^rgb\\("+[za,za,za]+"\\)$"),Wa=new RegExp("^rgba\\("+[Ha,Ha,Ha,_a]+"\\)$"),$a=new RegExp("^rgba\\("+[za,za,za,_a]+"\\)$"),Ya=new RegExp("^hsl\\("+[_a,za,za]+"\\)$"),Ka=new RegExp("^hsla\\("+[_a,za,za,_a]+"\\)$"),Ja={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 Ga(){return this.rgb().formatHex()}function Za(){return this.rgb().formatRgb()}function Xa(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Va.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Qa(t):3===n?new rs(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?es(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?es(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=Ua.exec(e))?new rs(t[1],t[2],t[3],1):(t=Ba.exec(e))?new rs(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Wa.exec(e))?es(t[1],t[2],t[3],t[4]):(t=$a.exec(e))?es(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Ya.exec(e))?ss(t[1],t[2]/100,t[3]/100,1):(t=Ka.exec(e))?ss(t[1],t[2]/100,t[3]/100,t[4]):Ja.hasOwnProperty(e)?Qa(Ja[e]):"transparent"===e?new rs(NaN,NaN,NaN,0):null}function Qa(e){return new rs(e>>16&255,e>>8&255,255&e,1)}function es(e,t,n,r){return r<=0&&(e=t=n=NaN),new rs(e,t,n,r)}function ts(e){return e instanceof Fa||(e=Xa(e)),e?new rs((e=e.rgb()).r,e.g,e.b,e.opacity):new rs}function ns(e,t,n,r){return 1===arguments.length?ts(e):new rs(e,t,n,null==r?1:r)}function rs(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function os(){return"#"+as(this.r)+as(this.g)+as(this.b)}function is(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function as(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function ss(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new us(e,t,n,r)}function ls(e){if(e instanceof us)return new us(e.h,e.s,e.l,e.opacity);if(e instanceof Fa||(e=Xa(e)),!e)return new us;if(e instanceof us)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new us(a,s,l,e.opacity)}function us(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function cs(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Na(Fa,Xa,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:Ga,formatHex:Ga,formatHsl:function(){return ls(this).formatHsl()},formatRgb:Za,toString:Za}),Na(rs,ns,Ra(Fa,{brighter:function(e){return e=null==e?ja:Math.pow(ja,e),new rs(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new rs(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:os,formatHex:os,formatRgb:is,toString:is})),Na(us,(function(e,t,n,r){return 1===arguments.length?ls(e):new us(e,t,n,null==r?1:r)}),Ra(Fa,{brighter:function(e){return e=null==e?ja:Math.pow(ja,e),new us(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new us(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,o=2*n-r;return new rs(cs(e>=240?e-240:e+120,o,r),cs(e,o,r),cs(e<120?e+240:e-120,o,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},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var ps=Math.PI/180,ds=180/Math.PI,fs=4/29,ms=6/29,hs=3*ms*ms;function gs(e){if(e instanceof ys)return new ys(e.l,e.a,e.b,e.opacity);if(e instanceof Cs)return ws(e);e instanceof rs||(e=ts(e));var t,n,r=qs(e.r),o=qs(e.g),i=qs(e.b),a=vs((.2225045*r+.7168786*o+.0606169*i)/1);return r===o&&o===i?t=n=a:(t=vs((.4360747*r+.3850649*o+.1430804*i)/.96422),n=vs((.0139322*r+.0971045*o+.7141733*i)/.82521)),new ys(116*a-16,500*(t-a),200*(a-n),e.opacity)}function ys(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function vs(e){return e>.008856451679035631?Math.pow(e,1/3):e/hs+fs}function bs(e){return e>ms?e*e*e:hs*(e-fs)}function xs(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function qs(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Ds(e){if(e instanceof Cs)return new Cs(e.h,e.c,e.l,e.opacity);if(e instanceof ys||(e=gs(e)),0===e.a&&0===e.b)return new Cs(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*ds;return new Cs(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function Cs(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function ws(e){if(isNaN(e.h))return new ys(e.l,0,0,e.opacity);var t=e.h*ps;return new ys(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}function Ss(e){return function(){return e}}function Ms(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Ss(isNaN(e)?t:e)}Na(ys,(function(e,t,n,r){return 1===arguments.length?gs(e):new ys(e,t,n,null==r?1:r)}),Ra(Fa,{brighter:function(e){return new ys(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new ys(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 rs(xs(3.1338561*(t=.96422*bs(t))-1.6168667*(e=1*bs(e))-.4906146*(n=.82521*bs(n))),xs(-.9787684*t+1.9161415*e+.033454*n),xs(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Na(Cs,(function(e,t,n,r){return 1===arguments.length?Ds(e):new Cs(e,t,n,null==r?1:r)}),Ra(Fa,{brighter:function(e){return new Cs(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new Cs(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return ws(this).rgb()}}));var Es=function e(t){var n=function(e){return 1==(e=+e)?Ms: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):Ss(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=ns(e)).r,(t=ns(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=Ms(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1),Is=/^class(-pyramid)?/,As=function(e,t,n,r){var o=void 0!==n.min?n.min:r.min(),i=void 0!==n.max?n.max:r.max(),a=o,s=i,l=t.limits,u={},c="percent"===t.limitType?l.map((function(e){return o+(i-o)*e})):l,p=t.colors.map((function(t){return e.resolveUIColor(t)}));if(o=Math.min.apply(Math,[o].concat(va(c))),i=Math.max.apply(Math,[i].concat(va(c))),u.min=o,u.max=i,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,o=e.range,i=[],a=[];if(r.length)if(r[r.length-1]<t)a.push(t,n),i.push(o[o.length-1],o[o.length-1],o[o.length-1]);else if(r[0]>n)a.push(t,n),i.push(o[0],o[0],o[0]);else{if(r[0]>t)a.push(t),i.push(o[0]);else{a.push(t);for(var s=0;s<r.length;s++)if(t<r[s]){i.push(o[s]);break}}for(var l=0;l<r.length;l++)t<r[l]&&r[l]<n&&(a.push(r[l]),i.push(o[l]));if(r[r.length-1]<n)a.push(n),i.push(o[r.length]),i.push(o[r.length]);else{a.push(n);for(var u=0;u<r.length;u++)if(r[u]>n){i.push(o[u]),i.push(o[u]);break}}}else i.push(o[0]);return{min:t,max:n,range:i,domain:a}}({min:"percent"===t.limitType?o:a,max:"percent"===t.limitType?i:s,range:p,limits:"percent"===t.limitType?c:l}));else if(t.breakTypes){var d=t.breakTypes;u.type="continuous",u.domain=[o],u.range=[p[0]];for(var f=0;f<c.length;f+=1)if(d[f]){var m=p[f],h=p[f+1],g=Es(m,h)(.5);u.range.push(g),u.domain.push(c[f]),f<c.length-1&&d[f+1]&&(u.range.push(p[f+1]),u.domain.push((c[f]+c[f+1])/2))}else u.range.push(p[f]),u.range.push(p[f+1]),u.domain.push(c[f]),u.domain.push(c[f]+Math.min(1e-6,(i-o)/1e6));u.range.push(p[p.length-1]),u.domain.push(i)}else u.domain=c,u.range=p;return u};function ks(e,t,n,r,o){var i,a,s,l=0,u=[],c=(e-t)/(r+1);if(0===c)return 1;for(i=0;i<n.length;i+=1)a=.99*(n[i]-t),s=n[i]>e?Math.floor(e/c):n[i]<t?0:Math.floor(a/c),Number.isNaN(s)||(u[s]?u[s]+=1:u[s]=1);for(i=0;i<u.length;i+=1)u[i]&&(l+=1);return l<=r||l>=o?Math.max(l,r):ks(e,t,n,r+1,o)}var Ts=function(e,t,n,r){var o,i,a=t.theme,s=t.hc,l=r.f,u={mode:"field",fieldType:"measure",field:l?l.key():void 0,reverse:n.input.reverseScheme||!1,type:"continuous",range:function(e){return e.resources.theme.palette("quant")}},c=[],p=!0;if(l){if(Number.isNaN(+l.min())||Number.isNaN(+l.max()))return{invalid:!0};(p=!("S"===(o=n.pic.raw()).qMode&&(o.qDataPages[0]&&o.qSize.qcy>o.qDataPages[0].qArea.qHeight||!o.qDataPages.length&&o.qSize.qcy>0)||"K"===o.qMode&&o.qStackedDataPages[0]&&o.qSize.qcy>o.qStackedDataPages[0].qArea.qHeight||"T"===o.qMode&&o.qSize.qcy>o.qTreeDataPages[0].qGroupSize))&&(c=n.pic.extract({field:0,props:{num:{field:l.key()},exclude:{fields:s.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return Math.min.apply(Math,va(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(l&&!p)u.min=l.min(),u.max=l.max();else if(l){if(!c.length)return{invalid:!0};u.min=Math.min.apply(Math,va(c)),u.max=Math.max.apply(Math,va(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&&Is.test(d.type)?"categorical":"continuous","categorical"===u.type&&(i=d.colors.some((function(e){return Array.isArray(e)}))?Math.max.apply(Math,va(d.colors.map((function(e){return e?e.length:0})))):d.colors.length)}if("categorical"===u.type){for(var f=p?ks(u.max,u.min,c,1,i):i,m=(u.max-u.min)/f,h=[],g=0;g<f+1;g+=1)h.push(u.min+m*g);u.domain=h,u.range=function(e){for(var t=e.resources.theme.palette("quant",f),n=Math.max(1,Math.floor(t.length/f)),r=[],o=0;o<f;o+=1)r.push(t[o*n]);return[r[0]].concat(r,[r[r.length-1]])}}return u};function Ls(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 Os(e){var t,n=e.cm,r=e.defaults,o=e.index,i=e.input,a=e.pic;if(!i||!i.on)return null;var s=null!==(t=i.mode)&&void 0!==t?t:"primary";return"primary"===s?function(e,t,n){var r=n.primary;return void 0!==t.paletteColor&&t.paletteColor&&(r=e.resolveUIColor(t.paletteColor)),ha(ha({},n),{},{mode:"constant",type:"constant",primary:r})}(n,i,r):"byExpression"===s?function(e,t,n){var r="qMeasureInfo/".concat(e,"/"),o=t.field((function(e){return e.id().startsWith(r)&&"colorByMeasureExpression"===e.raw().id})),i=o;return ha(ha({},n),{},i?{mode:"field",fieldType:"expression",field:o?o.key():void 0,type:"color"}:{mode:"constant",type:"constant",primary:n.nil})}(o,a,r):null}function Ps(e){e.measureOverrides.every((function(e){return!e}))&&(e.measureOverrides=null)}function Ns(e,t){for(var n=(null==t?void 0:t.domain)||[],r=(null==t?void 0:t.range)||[],o=[],i=0;i<e.length;++i){var a=e[i];if("constant"===(null==a?void 0:a.mode)){var s=n.indexOf(i);-1===s?(n.push(i),r.push(a.primary)):r[s]=a.primary,e[i]=null}else if(a){o.push(i);var l=n.indexOf(i);-1!==l&&(n.splice(l,1),r.splice(l,1))}}return{domain:n,range:r,exclude:o}}function Rs(e,t,n,r){var o,i=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,o=t.hc,i=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).getCField,a=void 0===i?Ls:i,s=n.input.byMeasureDef||{activeMeasureIndex:0},l=a(n,s),u=Ts(0,{theme:r,hc:o},n,{f:l});if(u.invalid)return u;("expression"===s.type||s.activeMeasureIndex<0)&&(u.label=s.label,l&&"color.altLabel"===l.raw().labelExpRef&&(u.label=n.input.altLabel)),!u.label&&l&&(u.label=l.title());var c=s.activeMeasureIndex>=0?l:null;if(!c&&l&&void 0!==l.raw().matchMeasure&&l.raw().matchMeasure>-1&&(c=n.pic.fields().filter((function(e){return"measure"===e.type()}))[l.raw().matchMeasure]),n.input.useMeasureGradient&&"libraryItem"===s.type)if(c){var p=c.raw().coloring;p&&p.gradient&&Aa(u,As(e,p.gradient,u,c))}else u.auxiliary=s;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]:{},o=r.getCDef,i=void 0===o?Oa:o,a=r.getCByField,s=void 0===a?Pa:a,l=r.getPersistence,u=void 0===l?La:l,c=i(t,n),p=s(n,c),d=p?p.raw():{},f=n&&n.pic?n.pic.raw():{};if(d.qError||d.qSize&&0===d.qSize.qcy&&!f.qHasOtherValues)return{invalid:!0};var m={mode:"field",fieldType:"dimension",type:"categorical",field:p?p.key():void 0,isFieldLocked:d.qLocked};return("expression"===c.type||c.activeDimensionIndex<0)&&(m.label=c.label,"color.altLabel"===d.labelExpRef&&(m.label=n.input.altLabel)),!m.label&&p&&(m.label=p.title()),n.input.dimensionScheme&&(m.palettes={categorical:n.input.dimensionScheme}),n.input.useDimColVal&&"libraryItem"===c.type&&(m.auxiliary=c),Aa(m,u(t,n,c,p,{byRow:Ta,byElemNo:ka})),m}(e,n,t);if("byExpression"===t.input.mode)return function(e,t,n,r){var o=t.hc,i=t.theme,a=t.translator,s=n.pic.field((function(e){return"colorByExpression"===e.raw().id}));if(!s||!s.raw().qFallbackTitle&&!n.input.colorExpression||!(Number.isFinite(s.raw().qMin)&&Number.isFinite(s.raw().qMax)||n.input.expressionIsColor))return{mode:"constant",type:"constant",primary:r.nil};if(n.input.expressionIsColor)return{mode:"field",fieldType:"expression",field:s?s.key():void 0,type:"color"};var l=Ts(0,{hc:o,theme:i},n,{f:s});return l.invalid||(l.label=n.input.expressionLabel||a.get("Object.ChartTooltip.ColorExpression")),l}(0,n,t,r);if("byMultiple"===t.input.mode||"primary"===t.input.mode)return function(e,t,n,r){var o=t.hc,i=t.theme,a=t.translator,s=n.input.useBaseColors;if(("byMultiple"===n.input.mode||"primary"===n.input.mode&&"measure"===n.input.useBaseColors)&&o.qMeasureInfo.length>1&&(s="measure"),"measure"===s){var l=[],u=[];"measure"===n.input.useBaseColors&&o.qMeasureInfo.forEach((function(t,n){if(t.baseColor||t.coloring&&t.coloring.baseColor){l.push(n);var o=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===o?u.push(r.primary):u.push(o)}}));var c=n.input.dimensionScheme?{categorical:n.input.dimensionScheme}:void 0,p=i?i.getDataColorPalettes()[0]:void 0;return"measure"===n.input.useBaseColors&&p&&(c={categorical:p.key}),{mode:"measure",type:"categorical",palettes:c,label:a?a.get("Common.Measures"):void 0,explicit:l.length?{domain:l,range:u}:void 0}}if("dimension"===s){var d=[],f=[];return o.qDimensionInfo.forEach((function(t,n){if(t.baseColor||t.coloring&&t.coloring.baseColor){d.push(n);var o=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===o?f.push(r.primary):f.push(o)}})),{mode:"dimension",type:"categorical",field:d.length?d[0]:void 0,explicit:d.length?{domain:d,range:f}:void 0}}var m=r.primary;if(void 0!==n.input.paletteColor)n.input.paletteColor&&(m=e.resolveUIColor(n.input.paletteColor));else{var h=n.input.singleColor;"number"!=typeof h||Number.isNaN(h)||(m=["#b0afae","#7b7a78","#545352","#4477aa","#7db8da","#b6d7ea","#46c646","#f93f17","#ffcf02","#276e27","#ffffff","#000000"][h])}return{mode:"constant",type:"constant",primary:m}}(e,n,t,r)}return{}}(e,t,n,r);return null!==(o=t.input)&&void 0!==o&&o.measureOverrides?(i.measureOverrides=t.input.measureOverrides.map((function(n,o){return Os({cm:e,input:n,defaults:r,index:o,pic:t.pic})})),function(e,t){var n,r,o,i=t.translator;if(Ps(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=Ns(e.measureOverrides,e.explicit),Ps(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==i?void 0:i.get("Common.Measures")};return a.explicit=Ns(e.measureOverrides),a}return null!==(o=e.measureOverrides)&&void 0!==o&&o.every((function(e){return e}))?{invalid:!0,measureOverrides:e.measureOverrides}:e}(i,n)):i}function Fs(e){var t=ha({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()}},o={auto:function(e){return e?(r.auto=e,o):r.auto},getDimensionColorMap:function(e){return e?(r.getDimensionColorMap=e,o):r.getDimensionColorMap},getAttributeDimension:function(e){return e?(r.getAttributeDimension=e,o):r.getAttributeDimension},getMeasure:function(e){return e?(r.getMeasure=e,o):r.getMeasure},set:function(e){var o;if(!e.colorProps)throw new Error('Missing "colorProps"');if(Aa(t,e),(n={pic:t.picasso.data("q")({data:t.hc,config:{localeInfo:t.localeInfo}}),input:t.colorProps}).input.auto){var i=r.auto(e.layout);n.input=Aa(!0,{},n.input,i,{auto:!1});var a=t.theme?t.theme.getDataColorPalettes():[];a[0]&&(n.input.dimensionScheme=a[0].key);var s=0;n.input.byDimDef&&+n.input.byDimDef.activeDimensionIndex>=0&&(s=+n.input.byDimDef.activeDimensionIndex),t.hc&&t.hc.qDimensionInfo[s]&&t.hc.qDimensionInfo[s].coloring&&t.hc.qDimensionInfo[s].coloring.colorMapRef&&n.input.byDimDef&&(n.input.byDimDef.type="libraryItem",n.input.byDimDef.key=t.hc.qDimensionInfo[s].coloring.colorMapRef)}null!==(o=n.input.measureOverrides)&&void 0!==o&&o.every((function(e){return!e||!e.on}))&&(n.input=Aa(!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 o=e.auxiliary||{},i=o.key;if("measure"===e.fieldType)return r.getMeasure(i,t).catch((function(){}));if("dimension"===e.fieldType){var a="".concat(n,"/").concat(e.field).replace("qDimensionInfo","qDimensions").replace("qAttrDimInfo","qAttributeDimensions");return Promise.all([/qAttrDimInfo/.test(e.field)?r.getAttributeDimension(a,t).catch((function(){})):Promise.resolve(),i?r.getDimensionColorMap(i,t).catch((function(){})):Promise.resolve()])}return Promise.resolve()},getAuxiliarySettings:function(e,r){var o=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 i=n.pic.field(e.field);return As(o,r.coloring.gradient,e,i)}return{}}if("dimension"===e.fieldType){var a={nil:e.nil,others:e.others},s=r[0],l=r[1]?r[1].colorMap:null;if(s){var u=t.picasso.data("q")({data:{qDimensionInfo:[n.pic.field(e.field).raw(),n.pic.field(e.field).raw()],qMeasureInfo:[],qDataPages:s,qInterColumnSortOrder:[0,1],qMode:"S"}});a.legendDataset=u}return l?function(e,t,n,r){var o=r.external,i=r.field,a=ha({},e);Aa(a,ka(i,i.raw().qCardinal));var s=o.theme?o.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},s&&!t.pal&&(a.palettes.categorical=s.key,Aa(a,ka(i)))):!1===t.autoFill&&t.single?a.range=[n.resolveUIColor(t.single)]:t.autoFill&&(s&&(a.palettes={categorical:s.key}),Aa(a,ka(i))),t.colors&&t.colors.length&&(a.explicit=function(e,t,n){for(var r={},o=0;o<e.length;o+=1)r[e[o].value]=e[o].baseColor;var i=[];return{domain:function(e){var o=e.data,a=[];i=[];for(var s=0;s<o.items.length;s++){var l=o.items[s],u=(l.text||l).label;r[u]&&-1===a.indexOf(l.value)&&(a.push(l.value),i.push(t.resolveUIColor(r[u])))}return a.push(-3,-2),i.push(n.others),i.push(n.nil),a},range:function(){return i}}}(t.colors,n,a)),a}(a,l,o,{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=ha(ha({},e),r.getDataColorSpecials())),n.settings=Aa(e,Rs(this,n,t,e))}return n.settings}};return o}var js=function(e,t){var n=e.fieldType,r={};if(t)if("measure"===n){var o=t.coloring;o&&(r.measureGradient=o.gradient)}else if("dimension"===n){var i=t[0],a=t[1];i&&(r.legendDataPage=i),a&&(r.dimValsData=a.colorMap)}return r},Hs=function(e){throw e.isHandled=!0,e},_s=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()},zs=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()},Vs=function(e,t){var n=t.layout,r=t.model,o=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&&o?r.getHyperCubeData(e,[{qHeight:100,qLeft:0,qTop:0,qWidth:2}]).catch(Hs):Promise.reject()};function Us(e){var t=e.hc,n=e.source,r=e.coloring,o={data:{extract:[{source:"dummy",field:0,filter:function(){return o.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 o.expando++}},text:{value:function(e){return e.qText},reduce:"first"}}}]},expando:0};return o}function Bs(e){return function(t){return"object"===ca(t.datum[e])?t.datum[e].value:void 0}}function Ws(e){return"object"===ca(e.datum.isNull)?e.datum.isNull.value:-2===e.datum.value}function $s(e){return-3===e.datum.value}var Ys=function(e,t,n){var r=e&&e.dock||void 0;if("auto"!==r)return r||"right";if(t){var o=t.element.getBoundingClientRect();if(o.height>o.width)return"bottom"}return n?"left":"right"},Ks=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 Js(e,t){var n=e.styleReference,r=e.chart,o=e.rtl,i=t.legendProps,a=t.coloring,s=t.theme,l=t.hc;return{layout:{minimumLayoutMode:"MEDIUM",dock:Ys(i,r,o)},show:"function"==typeof i.show?function(){return Ks(i,l,a)}:Ks(i,l,a),renderer:"svg",mounted:function(e){e.childNodes[0].style.pointerEvents="none",e.style.overflow="hidden"},settings:{title:{show:!1!==i.showTitle,wordBreak:"break-word",maxLines:2,lineHeight:1.2,text:a.label||"",fill:s?s.getStyle(n,"legend.title","color"):void 0,fontSize:s?s.getStyle(n,"legend.title","fontSize"):"16px",fontFamily:s?s.getStyle(n,"legend.title","fontFamily"):"QlikView Sans, sans-serif"}}}}function Gs(e,t,n){return"categorical"===t.coloring.type?function(e,t,n){var r=Js(e,t);if(!r.show)return!1;var o=e.key,i=e.styleReference,a=e.viewState,s=e.rtl,l=e.settings,u=e.style,c=t.scaleKey,p=t.theme,d=t.scales,f=r.layout.dock,m="left"===f||"right"===f?{maxLines:3,wordBreak:"break-word"}:{},h={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"},g="".concat(c,"Legend");return Aa(!0,r,{type:"legend-cat",key:"".concat(o,"-cat"),scale:g in d?g:c,settings:{layout:{scrollOffset:function(){return a?a.get("legendScrollOffset"):void 0},size:-1!==["top","bottom"].indexOf(r.layout.dock)?2:1,direction:s?"rtl":"ltr",horizontal:20},item:{show:function(e){return-2!==e.datum.value},label:ha({fill:p?p.getStyle(i,"legend.label","color"):void 0,fontSize:p?p.getStyle(i,"legend.label","fontSize"):void 0,fontFamily:p?p.getStyle(i,"legend.label","fontFamily"):"QlikView Sans, sans-serif"},m)},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:h[n]})])])}}}},brush:{consume:[{context:"selection",data:["",o],style:{inactive:{opacity:.3}}}]}},{settings:l,style:u})}(e,t,n):"continuous"===t.coloring.type&&function(e,t){var n=e.key,r=e.styleReference,o=e.rtl,i=e.settings,a=e.style,s=t.scaleKey,l=t.theme,u=Js(e,t);return!!u.show&&Aa(!0,u,{type:"legend-seq",key:"".concat(n,"-seq"),settings:{fill:s,major:"".concat(s,"Range"),length:1,tick:{fill:l?l.getStyle(r,"legend.label","color"):void 0,fontSize:l?l.getStyle(r,"legend.label","fontSize"):void 0,fontFamily:l?l.getStyle(r,"legend.label","fontFamily"):"QlikView Sans, sans-serif"},title:{anchor:!o||"top"!==u.layout.dock&&"bottom"!==u.layout.dock?void 0:"right",padding:parseFloat(u.settings.title.fontSize)||16}}},{settings:i,style:a})}(e,t)}function Zs(e,t,n){var r=[],o=[],i=Gs(e,t,n&&n.navigationDisabled);return r.push(i),i&&"legend-cat"===i.type&&(o.push(function(e){var t=e.key,n=e.requireFailure,r=e.recognizeWith,o=(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!=o&&null!==(r=o.interact)&&void 0!==r&&r.enabled&&!o.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 i=n.srcEvent.target;return!!(i&&i.hasAttribute("data-action")&&i.hasAttribute("data-component-key"))||!(!i||!i.childNodes[0]||"BUTTON"!==i.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)),o.push(function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.eventName,r=t.key,o=t.requireFailure,i=t.recognizeWith,a=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:pan-".concat(r),type:"Pan",requireFailure:o,recognizeWith:i,options:{event:n,pointers:1,threshold:10,enable:function(e,t){var o;return this.started===n||!t||!(null!=a&&null!==(o=a.interact)&&void 0!==o&&o.enabled&&!a.interact.enabled())&&this.chart.componentsFromPoint({x:t.center.x,y:t.center.y}).some((function(e){return e.key==="".concat(r,"-cat")}))}},events:(e={},fa(e,"".concat(n,"start"),(function(e){e.preventDefault(),this.started!==n&&(this.started=n,this.chart.component("".concat(r,"-cat")).emit("panstart",e))})),fa(e,"".concat(n,"move"),(function(e){e.preventDefault(),this.chart.component("".concat(r,"-cat")).emit("panmove",e)})),fa(e,"".concat(n,"end"),(function(e){e.preventDefault(),this.chart.component("".concat(r,"-cat")).emit("panend",e),this.started=!1})),e)}}(e,n))),{interactions:o,components:r}}var Xs=function(e){return"rgba(".concat([(16711680&e)>>16,(65280&e)>>8,255&e,((4278190080&e)>>>24)/255].join(","),")")};function Qs(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.auto,n=Fs(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 _s(e,{layout:n,app:r})})).getMeasure((function(e,t){var n=t.layout,r=t.app;return zs(e,{layout:n,app:r})})).getAttributeDimension((function(e,t){var n=t.layout,r=t.model,o=t.app;return Vs(e,{layout:n,model:r,app:o})}));return n.getSnapshotData=js,n}({resources:e}),n={},r={},o=function(e){return r.settings||(e||console.warn("settings() called before auxiliarySettings()"),r.settings=t.settings()),r.settings},i={config:function(o){if(n=ha({},o),r={},!n.key)throw new Error("Missing key");t.set(ha(ha({},e),n))},auto:function(e){return e?(t.auto(e),i):t.auto()},getAuxiliarySettings:function(e){return r.auxiliarySettings?Promise.resolve(r.auxiliarySettings):t.getAuxiliarySettings(o(!0),e).then((function(e){return r.auxiliarySettings=e||{},r.settings=ha(ha({},r.settings),r.auxiliarySettings),r.scales=void 0,r.color=void 0,r.auxiliarySettings}))},getAuxiliaryData:function(){return t.getAuxiliaryData(o())},getSnapshotData:function(e){var n=o();return t.getAuxiliaryData(n,e).then((function(e){return t.getSnapshotData(n,e)}))},resolveUIColor:function(e){return t.resolveUIColor(e)},settings:function(){var e=o();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=o().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)}(o(),{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,o=[];if(n&&n.palettes&&r){var i=n.palettes.categorical||t.dimensionScheme,a=r.getDataColorPalettes().filter((function(e){return e.key===i}))[0]||r.getDataColorPalettes()[0];i&&a&&o.push({key:"categorical",colors:a.colors});var s=n.palettes.metric||t.measureScheme,l=r.getDataColorScales().filter((function(e){return e.key===s}))[0];if(l){var u=l.colors[0]?l.colors:[[]].concat(va(l.colors.slice(1)));u=Array.isArray(u[0])?u.map((function(e){return e.slice().reverse()})):u.slice().reverse(),o.push({key:"quant",colors:u})}}return o}({coloring:o(),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,o=e.key,i=e.source,a=e.picasso,s={},l=o;if(n){var u={override:!0,domain:n.explicit&&"function"==typeof n.explicit.domain?n.explicit.domain:[].concat(va((n.explicit||{}).domain||[]),[-3,-2]),range:n.explicit&&"function"==typeof n.explicit.range?n.explicit.range:[].concat(va((n.explicit||{}).range||[]),[n.others,n.nil])};if("field"===n.mode){if("dimension"===n.fieldType){var c,p=Us({hc:t,source:i,coloring:n}).data;if(n.legendDataset){var d=0,f={};a.data("q")({data:t}).extract({field:n.field,trackBy:n.valueAccessor,reduce:function(e){var t=e[0];return f[t]=d++,e[0]}}),c={source:"attrDim",extract:{field:"qDimensionInfo/0",filter:function(e){return e.qElemNumber>=0},props:{row:{value:function(e){return f[e.qElemNumber]}}}}}}var m={data:p,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}};s[l]=m,c&&(s["".concat(l,"Legend")]=ha(ha({},m),{},{data:c})),t&&t.qHasOtherValues&&c&&((c||m.data).amend=[{label:t.qDimensionInfo[0].othersLabel,source:{key:"qHyperCube",field:"qDimensionInfo/0"},row:{value:-3},value:-3}])}else if("measure"===n.fieldType){var h={data:{field:n.field},min:n.min,max:n.max};s[l]=Aa({},h,{type:"categorical"===n.type?"threshold-color":"sequential-color",range:n.range,domain:n.domain,invert:n.reverse}),"sequential-color"===s[l].type&&(s["".concat(l,"Range")]=Aa({},h,{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"};s[l]=g}else if("measure"===n.mode){var y={data:t.qMeasureInfo.map((function(e,t){return t})).filter((function(e){var t,r;return!(null!==(t=n.explicit)&&void 0!==t&&null!==(r=t.exclude)&&void 0!==r&&r.includes(e))})),label:function(e){return t.qMeasureInfo[e.datum.value].qFallbackTitle},explicit:u,type:"categorical-color"};s[l]=y}}return s}({hc:n.hc,coloring:o(),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,o=Bs(r),i=Bs("".concat(r,"IsAnOther")),a=function(e,t){var r=e.fieldType,a=e.invalid,s=e.mode,l=e.nil,u=e.others,c=e.primary,p=e.type;return a?function(e){return $s(e)||i(e)?u:l}:n[t]?function(e){return $s(e)?u:Ws(e)||-2===o(e)&&"dimension"===r||"NaN"===o(e)?l:i(e)?u:e.resources.scale(t)(o(e))||u}:"constant"===s?function(e){return $s(e)||i(e)?u:Ws(e)?l:c}:"color"===p?function(e){return $s(e)||i(e)?u:Ws(e)?l:o(e)||u}:null},s=a(t,r);if(t.measureOverrides){var l=Bs("".concat(r,"MeasureIdx")),u=t.measureOverrides.map((function(e){return e&&a(e)}));return function(e){var t=l(e);return u[t]?u[t](e):s(e)}}return s}({coloring:o(),scales:this.scales(),key:n.key}),r.color},datumProps:function(e){return function(e){var t,n,r=e.hc,o=e.coloring,i=e.scales,a=e.key,s=e.addMeasureIx,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,u=a,c=o.nil;"field"===o.mode&&o.field?t=o.field:i[a]&&"field"===o.mode&&(t=i[a].data.field||o.field),t?(n={field:t,reduce:"first"},"color"===o.type&&(n.value=function(e){return"NaN"!==e.qNum?Xs(e.qNum):e.qText&&Xa(e.qText)?e.qText:c})):"dimension"===o.mode?n=void 0!==o.field?o.field:r.qDimensionInfo.length-1:"measure"===o.mode&&(n=l);var p=fa({},u,n);return r.qDimensionInfo.length>1&&(p["".concat(u,"IsAnOther")]={fields:r.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return-1!==e.indexOf(-3)}}),s&&(p["".concat(u,"MeasureIdx")]=l),p}({coloring:this.settingsForMeasure(e),scales:this.scales(),key:n.key,hc:n.hc,addMeasureIx:o().measureOverrides},e)},data:function(){var e=o(),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,i=e.viewState,a=e.chart,s=e.rtl,l=e.styleReference,u=void 0===l?"object.legend":l,c=e.settings,p=void 0===c?{}:c,d=e.style,f=void 0===d?{}:d,m=arguments.length>1?arguments[1]:void 0;return Zs({eventName:t,key:r,rtl:s,viewState:i,chart:a,styleReference:u,settings:p,style:f},{legendProps:n.legendProps,scaleKey:n.key,coloring:o(),theme:n.theme,hc:n.hc,scales:this.scales()},m)}};return i}var el=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function tl(e){var t=e.qHyperCube,n=t.qDimensionInfo,r=t.qMeasureInfo,o=n.some(el),i=r.some(el),a=e.color.useBaseColors;return"measure"===a&&!i||"dimension"===a&&!o?"off":a}function nl(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=ha(ha(ha({},e),t),{},{colorProps:ha(ha({},e.colorProps),t.colorProps||{})});return n}var rl=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function ol(e){var t,n=e.qHyperCube.qDimensionInfo.some(rl),r=e.qHyperCube.qMeasureInfo.some(rl),o=n?"dimension":void 0;return{mode:"primary",useBaseColors:null!==(t=null!=o?o:r?"measure":void 0)&&void 0!==t?t:"off",paletteColor:null}}var il=function(){};function al(e,t,n){if(void 0===e||void 0===t)return n;for(var r=t.split("."),o=e,i=0;i<r.length;++i){var a=r[i];if(void 0===o[a])return n;o=o[a]}return o}function sl(e,t,n){if(void 0!==e&&void 0!==t){for(var r=t.split("."),o=r[r.length-1],i=e,a=0;a<r.length-1;++a){var s=r[a];void 0===i[s]&&(i[s]=Number.isNaN(+r[a+1])?{}:[]),i=i[s]}void 0!==n?i[o]=n:delete i[o]}}function ll(){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={}}}}function ul(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return function(){for(var r=this,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var s=function(){return e.apply(r,i)};clearTimeout(t),t=setTimeout(s,n)}}function cl(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,o){return t[r]&&t[r]===e[r]&&(n=o),n})),n>-1?t[n]=e:t.push(e)})),t):n}function pl(e){return(pl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ml(e,t,n){return t&&fl(e.prototype,t),n&&fl(e,n),e}function hl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gl(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 yl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gl(Object(n),!0).forEach((function(t){hl(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function vl(e,t){return(vl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function bl(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function xl(e,t,n){return(xl=bl()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&vl(o,n.prototype),o}).apply(null,arguments)}function ql(e){return function(e){if(Array.isArray(e))return Cl(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Dl(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 Dl(e,t){if(e){if("string"==typeof e)return Cl(e,t);var n=Object.prototype.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)?Cl(e,t):void 0}}function Cl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var wl=Object.prototype.hasOwnProperty,Sl=Object.prototype.toString,Ml=Object.defineProperty,El=Object.getOwnPropertyDescriptor,Il=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Sl.call(e)},Al=function(e){if(!e||"[object Object]"!==Sl.call(e))return!1;var t,n=wl.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&wl.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||wl.call(e,t)},kl=function(e,t){Ml&&"__proto__"===t.name?Ml(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Tl=function(e,t){if("__proto__"===t){if(!wl.call(e,t))return;if(El)return El(e,t).value}return e[t]},Ll=function e(){var t,n,r,o,i,a,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(n in t)r=Tl(s,n),s!==(o=Tl(t,n))&&(c&&o&&(Al(o)||(i=Il(o)))?(i?(i=!1,a=r&&Il(r)?r:[]):a=r&&Al(r)?r:{},kl(s,{name:n,newValue:e(c,a,o)})):void 0!==o&&kl(s,{name:n,newValue:o}));return s};function Ol(e,t,n){if(!e)return-1;var r=n.cache,o=e.origin?e.origin():null;o&&(e=o);var i=r.fields.indexOf(e),a=-1,s=-1;if(-1===i)for(var l=0;l<r.wrappedFields.length;l++)if(s=r.wrappedFields[l].attrDims.map((function(e){return e.instance})).indexOf(e),a=r.wrappedFields[l].attrExps.map((function(e){return e.instance})).indexOf(e),-1!==s||-1!==a){i=l;break}return(i-=t.qArea.qLeft)<0||i>=t.qArea.qWidth?-1:s>=0?function(e){return e[i].qAttrDims.qValues[s]}:a>=0?function(e){return e[i].qAttrExps.qValues[a]}:function(e){return e[i]}}function Pl(e,t,n){var r=n.key,o={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return o.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(o.value),e.field&&(o.source={key:r,field:e.field.key()}),o}function Nl(e){var t=e.cache,n=e.f,r=e.mainCell,o=e.p;e.prop;var i=e.page,a=e.rowIdx,s=e.row,l=e.sourceKey,u=e.target,c=e.targetProp,p=r;if(o.field&&o.field!==n){var d=Ol(o.field,i,{cache:t});if(-1===d)return;p=Ll({qRow:a},d(s))}u[c]=Pl(o,p,{key:l})}function Rl(e,t,n,r){for(var o=Array.isArray(e)?e:[e],i=[],a=0;a<o.length;a++)if(void 0!==o[a].field){for(var s=t.raw(),l=t.key(),u="object"===pl(o[a].field)?o[a].field:t.field(o[a].field),c=r.normalizeConfig(o[a],t),p=c.props,d=c.main,f=Object.keys(p),m=!!o[a].trackBy,h=pl(o[a].trackBy),g={},y=[],v=[],b=0;b<s.qDataPages.length;b++){var x=Ol(u,s.qDataPages[b],{cache:n});if(-1!==x)for(var q=0;q<s.qDataPages[b].qMatrix.length;q++){var D=s.qDataPages[b].qArea.qTop+q,C=Ll({qRow:D},x(s.qDataPages[b].qMatrix[q])),w=Pl(d,C,{key:l});if(!d.filter||d.filter(C)){for(var S=0;S<f.length;S++){var M=p[f[S]],E=M.fields||[M];M.fields&&(w[f[S]]=[]);for(var I=0;I<E.length;I++)Nl({cache:n,f:u,mainCell:C,p:E[I],prop:f[S],props:p,page:s.qDataPages[b],rowIdx:D,row:s.qDataPages[b].qMatrix[q],sourceKey:l,target:M.fields?w[f[S]]:w,targetProp:M.fields?I:f[S]});if(M.fields){var A=w[f[S]].map((function(e){return e.value})),k=w[f[S]].map((function(e){return e.label}));w[f[S]]={value:"function"==typeof M.value?M.value(A):void 0!==M.value?M.value:A,label:"function"==typeof M.label?M.label(k):void 0!==M.label?String(M.label):String(w[f[S]].value)}}}m&&r.track({cfg:o[a],itemData:C,obj:w,target:y,tracker:g,trackType:h}),v.push(w)}}}m?i.push.apply(i,ql(r.collect(y,{main:d,propsArr:f,props:p}))):i.push.apply(i,v)}return i}function Fl(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 jl(e,t){var n,r,o,i,a,s=new Vl(e),l=+e.value&&(s.value=e.value),u=[s];for(null==t&&(t=Hl);n=u.pop();)if(l&&(n.value=+n.data.value),(o=t(n.data))&&(a=o.length))for(n.children=new Array(a),i=a-1;i>=0;--i)u.push(r=n.children[i]=new Vl(o[i])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(zl)}function Hl(e){return e.children}function _l(e){e.data=e.data.data}function zl(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function Vl(e){this.data=e,this.depth=this.height=0,this.parent=null}function Ul(e){if("function"!=typeof e)throw new Error;return e}Vl.prototype=jl.prototype={constructor:Vl,count:function(){return this.eachAfter(Fl)},each:function(e){var t,n,r,o,i=this,a=[i];do{for(t=a.reverse(),a=[];i=t.pop();)if(e(i),n=i.children)for(r=0,o=n.length;r<o;++r)a.push(n[r])}while(a.length);return this},eachAfter:function(e){for(var t,n,r,o=this,i=[o],a=[];o=i.pop();)if(a.push(o),t=o.children)for(n=0,r=t.length;n<r;++n)i.push(t[n]);for(;o=a.pop();)e(o);return this},eachBefore:function(e){for(var t,n,r=this,o=[r];r=o.pop();)if(e(r),t=r.children)for(n=t.length-1;n>=0;--n)o.push(t[n]);return this},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,o=r&&r.length;--o>=0;)n+=r[o].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(),o=null;for(e=n.pop(),t=r.pop();e===t;)o=e,e=n.pop(),t=r.pop();return o}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var o=r.length;e!==n;)r.splice(o,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(){var e=[];return this.each((function(t){e.push(t)})),e},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return jl(this).eachBefore(_l)}};var Bl={depth:-1},Wl={};function $l(e){return e.id}function Yl(e){return e.parentId}function Kl(e,t){"/"===e.charAt(0)&&(e=e.substring(1));for(var n,r=e.split("/"),o=t,i=0;i<r.length;i++){if("*"===r[i]&&Array.isArray(o)){var a=[];n=r.slice(i+1).join("/");for(var s=0;s<o.length;s++){var l=Kl(n,o[s]);Array.isArray(l)?a.push.apply(a,ql(l)):a.push(l)}return a}if(!r[i]&&Array.isArray(o)){var u=new Array(o.length);n=r.slice(i+1).join("/");for(var c=0;c<o.length;c++)u[c]=Kl(n,o[c]);return u}r[i]in o&&(o=o[r[i]])}return o}function Jl(e,t,n){var r=[];if(!e||!e.length)return r;if(t<=0){var o=n>=0?[e[n]]:e;r.push.apply(r,ql(o))}else for(var i=0;i<e.length;i++)e[i].children&&e[i].children.length&&r.push.apply(r,ql(Jl(e[i].children,t-1,n)));return r}function Gl(e,t,n){if(e===t)return function(e){return e};if(e>t){var r=Math.max(0,Math.min(100,e-t)),o=ql(Array(r)).map(String.prototype.valueOf,"parent").join(".");return Function("node","return node.".concat(o,";"))}if(t>e){var i=Math.max(0,Math.min(100,t-e));return function(e){return Jl(e.children,i-1,n)}}return!1}function Zl(e,t){var n=t.cache;if("number"==typeof e)return n.fields[e];var r=n.allFields;if("function"==typeof e){for(var o=0;o<r.length;o++)if(e(r[o]))return r[o];return!1}if("string"==typeof e){for(var i=0;i<r.length;i++)if(r[i].key()===e||r[i].title()===e)return r[i]}else if(e&&-1!==r.indexOf(e))return e;throw Error("Field not found: ".concat(e))}var Xl=/^qDimensionInfo(?:\/(\d+))?/,Ql=/^\/?qMeasureInfo\/(\d+)/,eu=/\/qAttrExprInfo\/(\d+)/,tu=/\/qAttrDimInfo\/(\d+)/;function nu(e){return(e.qColumnOrder&&e.qColumnOrder.length?e.qColumnOrder:e.qDimensionInfo.map((function(e,t){return t}))).filter((function(t){return t<e.qDimensionInfo.length}))}function ru(e,t){var n=t.cube;if(!e)return-1;var r=e.origin&&e.origin()?e.origin().key():e.key(),o=!1,i=-1,a=-1,s=-1,l=-1,u=-1,c=r,p=n.qEffectiveInterColumnSortOrder,d=nu(n);return Xl.test(c)&&(o=!0,i=+Xl.exec(c)[1],c=r.replace(Xl,"")),Ql.test(c)&&("K"===n.qMode?l=+Ql.exec(c)[1]:p&&-1!==p.indexOf(-1)?(l=+Ql.exec(c)[1],u=0):u=+Ql.exec(c)[1],c=c.replace(Ql,"")),c&&(tu.exec(c)?s=+tu.exec(c)[1]:eu.exec(c)&&(a=+eu.exec(c)[1])),{fieldDepth:(o?"S"===n.qMode?d[i]:p?p.indexOf(i):i:p&&-1!==p.indexOf(-1)?p.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1))+1,pseudoMeasureIndex:l,measureIdx:u,attrDimIdx:s,attrIdx:a}}function ou(e,t){var n,r,o=Gl(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return n=t.measureIdx>=0?function(e){return e.data.qValues[t.measureIdx]}:function(e){return e.data},t.attrDimIdx>=0?r=function(e){var n;return null==e||null===(n=e.qAttrDims)||void 0===n?void 0:n.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(r=function(e){var n;return null==e||null===(n=e.qAttrExps)||void 0===n?void 0:n.qValues[t.attrIdx]}),{nodeFn:o,attrFn:r,valueFn:n}}function iu(e,t,n){var r=n.key,o={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return o.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(o.value),e.field&&(o.source={key:r,field:e.field.key()}),o}function au(e){for(var t=e.propsArr,n=e.props,r=e.item,o=e.itemData,i=e.ret,a=e.sourceKey,s=0;s<t.length;s++){var l=n[t[s]],u=l.fields||[l],c=void 0,p=void 0;l.fields&&(c=[],p=[]);for(var d=function(e){var n=u[e],d=void 0,f=void 0,m=void 0,h=void 0,g=void 0,y=void 0;if("primitive"===n.type?(m=n.value,y=String(n.value)):("function"==typeof n.value&&(d=function(e){return n.value(e,r)}),"function"==typeof n.label&&(f=function(e){return n.label(e,r)}),n.accessor?(h=n.accessor(r),Array.isArray(h)?(g=h.map(n.valueAccessor),n.attrAccessor&&(g=g.map(n.attrAccessor)),d&&(m=g.map(d),d=null),f&&(y=g.map(f),f=null),m=n.reduce?n.reduce(m):m,y=n.reduceLabel?n.reduceLabel(y,m):String(m)):y=m=n.attrAccessor?n.attrAccessor(n.valueAccessor(h)):n.valueAccessor(h)):(m=o,y=o)),l.fields){var v=d?d(m):m;c.push(v),p.push(f&&null!=y?f(y):null!=y?y:String(v))}else{var b=d?d(m):m;i[t[s]]={value:b,label:f?f(y):null!=y?y:String(b)},n.field&&(i[t[s]].source={field:n.field.key(),key:a})}},f=0;f<u.length;f++)d(f);c&&(i[t[s]]={value:"function"==typeof l.value?l.value(c,r):c,label:"function"==typeof l.label?l.label(p,r):p})}}var su=function(e,t,n){var r="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",o="K"===e.qMode?"qSubNodes":"qNodes",i=Kl(r,e);return i&&i[0]?(t.tree=jl(i[0],n.children||function(e){return e[o]}),t.tree):null};function lu(e){for(var t=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],n=function(e){var t=e.raw().qColumnOrder,n=e.fields();return t&&t.length===n.length?t:n.map((function(e,t){return t}))}(e),r=e.fields(),o=e.fields().filter((function(e){return"dimension"===e.type()})).map((function(e){return n.indexOf(r.indexOf(e))})),i=e.fields().filter((function(e){return"measure"===e.type()})).map((function(e){return n.indexOf(r.indexOf(e))})),a={__root:{__id:"__root",qValues:[]}},s=0;s<t.length;s++){for(var l=t[s],u="__root",c=!1,p=0;p<o.length;p++){var d=l[o[p]],f="".concat(u,"__").concat(d.qText);a[f]||(a[f]=yl({__id:f,__parent:u,qValues:[]},d),c=!0),u=f}if(c)for(var m=0;m<i.length;m++){var h=l[i[m]];a[u].qValues.push(h)}}var g=Object.keys(a).map((function(e){return a[e]}));return function(){var e=$l,t=Yl;function n(n){var r,o,i,a,s,l,u,c=n.length,p=new Array(c),d={};for(o=0;o<c;++o)r=n[o],s=p[o]=new Vl(r),null!=(l=e(r,o,n))&&(l+="")&&(d[u="$"+(s.id=l)]=u in d?Wl:s);for(o=0;o<c;++o)if(s=p[o],null!=(l=t(n[o],o,n))&&(l+="")){if(!(a=d["$"+l]))throw new Error("missing: "+l);if(a===Wl)throw new Error("ambiguous: "+l);a.children?a.children.push(s):a.children=[s],s.parent=a}else{if(i)throw new Error("multiple roots");i=s}if(!i)throw new Error("no root");if(i.parent=Bl,i.eachBefore((function(e){e.depth=e.parent.depth+1,--c})).eachBefore(zl),i.parent=null,c>0)throw new Error("cycle");return i}return n.id=function(t){return arguments.length?(e=Ul(t),n):e},n.parentId=function(e){return arguments.length?(t=Ul(e),n):t},n}().id((function(e){return e.__id})).parentId((function(e){return e.__parent}))(g)}var uu=function(e){for(var t=e.propsArr,n=e.props,r=e.cube,o=e.cache,i=e.itemDepthObject,a=e.f,s=0;s<t.length;s++)for(var l=n[t[s]],u=l.fields?l.fields:[l],c=0;c<u.length;c++){var p=u[c];if(p.field!==a){var d=ou(i,ru(p.field,{cube:r,cache:o}));p.accessor=d.nodeFn,p.valueAccessor=d.valueFn,p.attrAccessor=d.attrFn}}};function cu(){var 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,o=t.raw(),i=t.key(),a="S"===o.qMode?lu(t):su(o,n,e);if(!a)return null;for(var s=a.height,l=[],u=0;u<=s;u++){var c=null;if(u>0)if("S"===o.qMode){var p=nu(o),d=p[u-1];c=n.fields[d]}else{var f=o.qEffectiveInterColumnSortOrder[u-1];u>o.qEffectiveInterColumnSortOrder.length&&(f=o.qDimensionInfo.length),c=n.fields[f]}var m=r.normalizeConfig(yl(yl({},e),{},{field:c?c.key():void 0}),t),h=m.props,g=m.main,y=Object.keys(h);l[u]={propsArr:y,props:h,main:g};var v=c?ru(c,{cube:o,cache:n}):{fieldDepth:0};uu({propsArr:y,props:h,cube:o,cache:n,itemDepthObject:v,f:c})}for(var b=a.copy(),x=b.descendants(),q=a.descendants(),D=0;D<q.length;D++){var C=l[q[D].depth].propsArr,w=l[q[D].depth].props,S=l[q[D].depth].main,M=x[D],E=M.data,I=iu(S,E,{key:i});au({propsArr:C,props:w,item:M,itemData:E,ret:I,sourceKey:i,isTree:!0}),q[D].data=I}return a}function pu(e,t,n,r){for(var o=Array.isArray(e)?e:[e],i=[],a=0;a<o.length;a++)if(void 0!==o[a].field){var s=t.raw(),l=t.key();if(!su(s,n,e))continue;var u="object"===pl(o[a].field)?o[a].field:t.field(o[a].field),c=r.normalizeConfig(o[a],t),p=c.props,d=c.main,f=Object.keys(p),m=ru(u,{cube:s,cache:n}),h=ou({fieldDepth:0},m),g=h.nodeFn,y=h.attrFn,v=h.valueFn;uu({propsArr:f,props:p,cube:s,cache:n,itemDepthObject:m,f:u});for(var b=!!o[a].trackBy,x=pl(o[a].trackBy),q={},D=[],C=g(n.tree),w=[],S=0;S<C.length;S++){var M=C[S],E=y?y(v(M)):v(M);if(!d.filter||d.filter(E)){var I=iu(d,E,{key:l});au({propsArr:f,props:p,item:M,itemData:E,ret:I,sourceKey:l}),b&&r.track({cfg:o[a],itemData:E,obj:I,target:D,tracker:q,trackType:x}),w.push(I)}}b?i.push.apply(i,ql(r.collect(D,{main:d,propsArr:f,props:p}))):i.push.apply(i,w)}return i}var du,fu=(function(e){
16
+ Object.defineProperty(Qo,"__esModule",{value:!0});var ei="function"==typeof Symbol&&Symbol.for,ti=ei?Symbol.for("react.element"):60103,ni=ei?Symbol.for("react.portal"):60106,ri=ei?Symbol.for("react.fragment"):60107,oi=ei?Symbol.for("react.strict_mode"):60108,ii=ei?Symbol.for("react.profiler"):60114,ai=ei?Symbol.for("react.provider"):60109,si=ei?Symbol.for("react.context"):60110,li=ei?Symbol.for("react.async_mode"):60111,ui=ei?Symbol.for("react.concurrent_mode"):60111,ci=ei?Symbol.for("react.forward_ref"):60112,di=ei?Symbol.for("react.suspense"):60113,pi=ei?Symbol.for("react.suspense_list"):60120,fi=ei?Symbol.for("react.memo"):60115,mi=ei?Symbol.for("react.lazy"):60116,hi=ei?Symbol.for("react.fundamental"):60117,gi=ei?Symbol.for("react.responder"):60118,yi=ei?Symbol.for("react.scope"):60119;function vi(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case ti:switch(e=e.type){case li:case ui:case ri:case ii:case oi:case di:return e;default:switch(e=e&&e.$$typeof){case si:case ci:case ai:return e;default:return t}}case mi:case fi:case ni:return t}}}function bi(e){return vi(e)===ui}Qo.typeOf=vi,Qo.AsyncMode=li,Qo.ConcurrentMode=ui,Qo.ContextConsumer=si,Qo.ContextProvider=ai,Qo.Element=ti,Qo.ForwardRef=ci,Qo.Fragment=ri,Qo.Lazy=mi,Qo.Memo=fi,Qo.Portal=ni,Qo.Profiler=ii,Qo.StrictMode=oi,Qo.Suspense=di,Qo.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===ri||e===ui||e===ii||e===oi||e===di||e===pi||"object"==typeof e&&null!==e&&(e.$$typeof===mi||e.$$typeof===fi||e.$$typeof===ai||e.$$typeof===si||e.$$typeof===ci||e.$$typeof===hi||e.$$typeof===gi||e.$$typeof===yi)},Qo.isAsyncMode=function(e){return bi(e)||vi(e)===li},Qo.isConcurrentMode=bi,Qo.isContextConsumer=function(e){return vi(e)===si},Qo.isContextProvider=function(e){return vi(e)===ai},Qo.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===ti},Qo.isForwardRef=function(e){return vi(e)===ci},Qo.isFragment=function(e){return vi(e)===ri},Qo.isLazy=function(e){return vi(e)===mi},Qo.isMemo=function(e){return vi(e)===fi},Qo.isPortal=function(e){return vi(e)===ni},Qo.isProfiler=function(e){return vi(e)===ii},Qo.isStrictMode=function(e){return vi(e)===oi},Qo.isSuspense=function(e){return vi(e)===di},"undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),Do.exports.oneOfType([Do.exports.func,Do.exports.PropTypes.object]);var xi=["xs","sm","md","lg","xl"];function qi(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,r=e.unit,o=void 0===r?"px":r,i=e.step,a=void 0===i?5:i,s=Yo(e,["values","unit","step"]);function l(e){var t="number"==typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(o,")")}function u(e,t){var r=xi.indexOf(t)+1;return r===xi.length?l(e):"@media (min-width:".concat(n[e]).concat(o,") and ")+"(max-width:".concat(n[xi[r]]-a/100).concat(o,")")}return $o({keys:xi,values:n,up:l,down:function(e){var t=xi.indexOf(e)+1,r=n[xi[t]];return t===xi.length?l("xs"):"@media (max-width:".concat(("number"==typeof r&&t>0?r:e)-a/100).concat(o,")")},between:u,only:function(e){return u(e,e)},width:function(e){return n[e]}},s)}function Di(e,t,n){var r;return $o({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return $o({paddingLeft:t(2),paddingRight:t(2)},n,Wo({},e.up("sm"),$o({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(r={minHeight:56},Wo(r,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),Wo(r,e.up("sm"),{minHeight:64}),r)},n)}var Ci="#7986cb",wi="#3f51b5",Si="#303f9f",Mi="#ff4081",Ei="#f50057",Ii="#c51162",Ai={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"},ki="#e57373",Ti="#f44336",Li="#d32f2f",Oi={black:"#000",white:"#fff"},Pi={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Oi.white,default:Ai[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.08)",hoverOpacity:.08,selected:"rgba(0, 0, 0, 0.14)",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)"}},Ni={text:{primary:Oi.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:Ai[800],default:"#303030"},action:{active:Oi.white,hover:"rgba(255, 255, 255, 0.1)",hoverOpacity:.1,selected:"rgba(255, 255, 255, 0.2)",disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)"}};function Ri(e,t,n,r){e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=function(e,t){if(e=Vo(e),t=zo(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return Uo(e)}(e.main,r):"dark"===t&&(e.dark=function(e,t){if(e=Vo(e),t=zo(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return Uo(e)}(e.main,1.5*r)))}function Fi(e){var t=e.primary,n=void 0===t?{light:Ci,main:wi,dark:Si}:t,r=e.secondary,o=void 0===r?{light:Mi,main:Ei,dark:Ii}:r,i=e.error,a=void 0===i?{light:ki,main:Ti,dark:Li}:i,s=e.type,l=void 0===s?"light":s,u=e.contrastThreshold,c=void 0===u?3:u,d=e.tonalOffset,p=void 0===d?.2:d,f=Yo(e,["primary","secondary","error","type","contrastThreshold","tonalOffset"]);function m(e){return function(e,t){var n=Bo(e),r=Bo(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}(e,Ni.text.primary)>=c?Ni.text.primary:Pi.text.primary}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;return!(e=$o({},e)).main&&e[t]&&(e.main=e[t]),Ri(e,"light",n,p),Ri(e,"dark",r,p),e.contrastText||(e.contrastText=m(e.main)),e}var g={dark:Ni,light:Pi};return Xo($o({common:Oi,type:l,primary:h(n),secondary:h(o,"A400","A200","A700"),error:h(a),grey:Ai,contrastThreshold:c,getContrastText:m,augmentColor:h,tonalOffset:p},g[l]),f,{clone:!1})}function ji(e){return Math.round(1e5*e)/1e5}var Hi={textTransform:"uppercase"};function _i(e,t){var n="function"==typeof t?t(e):t,r=n.fontFamily,o=void 0===r?'"Roboto", "Helvetica", "Arial", sans-serif':r,i=n.fontSize,a=void 0===i?14:i,s=n.fontWeightLight,l=void 0===s?300:s,u=n.fontWeightRegular,c=void 0===u?400:u,d=n.fontWeightMedium,p=void 0===d?500:d,f=n.fontWeightBold,m=void 0===f?700:f,h=n.htmlFontSize,g=void 0===h?16:h,y=n.allVariants,v=n.pxToRem,b=Yo(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),x=a/14,q=v||function(e){return"".concat(e/g*x,"rem")},D=function(e,t,n,r,i){return $o({fontFamily:o,fontWeight:e,fontSize:q(t),lineHeight:n},'"Roboto", "Helvetica", "Arial", sans-serif'===o?{letterSpacing:"".concat(ji(r/t),"em")}:{},{},i,{},y)},C={h1:D(l,96,1,-1.5),h2:D(l,60,1,-.5),h3:D(c,48,1.04,0),h4:D(c,34,1.17,.25),h5:D(c,24,1.33,0),h6:D(p,20,1.6,.15),subtitle1:D(c,16,1.75,.15),subtitle2:D(p,14,1.57,.1),body1:D(c,16,1.5,.15),body2:D(c,14,1.43,.15),button:D(p,14,1.75,.4,Hi),caption:D(c,12,1.66,.4),overline:D(c,12,2.66,1,Hi)};return Xo($o({htmlFontSize:g,pxToRem:q,round:ji,fontFamily:o,fontSize:a,fontWeightLight:l,fontWeightRegular:c,fontWeightMedium:p,fontWeightBold:m},C),b,{clone:!1})}function zi(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var Vi=["none",zi(0,2,1,-1,0,1,1,0,0,1,3,0),zi(0,3,1,-2,0,2,2,0,0,1,5,0),zi(0,3,3,-2,0,3,4,0,0,1,8,0),zi(0,2,4,-1,0,4,5,0,0,1,10,0),zi(0,3,5,-1,0,5,8,0,0,1,14,0),zi(0,3,5,-1,0,6,10,0,0,1,18,0),zi(0,4,5,-2,0,7,10,1,0,2,16,1),zi(0,5,5,-3,0,8,10,1,0,3,14,2),zi(0,5,6,-3,0,9,12,1,0,3,16,2),zi(0,6,6,-3,0,10,14,1,0,4,18,3),zi(0,6,7,-4,0,11,15,1,0,4,20,3),zi(0,7,8,-4,0,12,17,2,0,5,22,4),zi(0,7,8,-4,0,13,19,2,0,5,24,4),zi(0,7,9,-4,0,14,21,2,0,5,26,4),zi(0,8,9,-5,0,15,22,2,0,6,28,5),zi(0,8,10,-5,0,16,24,2,0,6,30,5),zi(0,8,11,-5,0,17,26,2,0,6,32,5),zi(0,9,11,-5,0,18,28,2,0,7,34,6),zi(0,9,12,-6,0,19,29,2,0,7,36,6),zi(0,10,13,-6,0,20,31,3,0,8,38,7),zi(0,10,13,-6,0,21,33,3,0,8,40,7),zi(0,10,14,-6,0,22,35,3,0,8,42,7),zi(0,11,14,-7,0,23,36,3,0,9,44,8),zi(0,11,15,-7,0,24,38,3,0,9,46,8)],Ui={borderRadius:4};function Bi(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(t.mui)return t;e="function"==typeof t?t:function(e){return t*e};var n=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return 0===n.length?e(1):1===n.length?e(n[0]):n.map((function(t){var n=e(t);return"number"==typeof n?"".concat(n,"px"):n})).join(" ")};return Object.defineProperty(n,"unit",{get:function(){return t}}),n.mui=!0,n}var Wi={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},$i={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195},Yi=function(e){return"".concat(Math.round(e),"ms")},Ki={easing:Wi,duration:$i,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.duration,r=void 0===n?$i.standard:n,o=t.easing,i=void 0===o?Wi.easeInOut:o,a=t.delay,s=void 0===a?0:a;return Yo(t,["duration","easing","delay"]),(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"==typeof r?r:Yi(r)," ").concat(i," ").concat("string"==typeof s?s:Yi(s))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}},Ji={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Gi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,o=void 0===r?{}:r,i=e.palette,a=void 0===i?{}:i,s=e.shadows,l=e.spacing,u=e.typography,c=void 0===u?{}:u,d=Yo(e,["breakpoints","mixins","palette","shadows","spacing","typography"]),p=Fi(a),f=qi(n),m=Bi(l),h=$o({breakpoints:f,direction:"ltr",mixins:Di(f,m,o),overrides:{},palette:p,props:{},shadows:s||Vi,typography:_i(p,c),spacing:m},Xo({shape:Ui,transitions:Ki,zIndex:Ji},d));return h}p({defaultTheme:Gi()});const Zi=Gi({palette:{text:{primary:"rgba(89, 89, 89, 0.8)",secondary:"rgba(0, 0, 0, 0.55)",disabled:"rgba(0, 0, 0, 0.3)"},action:{disabled:"rgba(0, 0, 0, 0.3)"}},typography:{fontFamily:'"Source Sans Pro", "Arial", "sans-serif"',button:{textTransform:"initial",fontWeight:400}},shape:{borderRadius:2},shadows:["none","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)"],props:{MuiButtonBase:{disableRipple:!0}}});const Xi=f({productionPrefix:"q5441",disableGlobal:!0,seed:""});function Qi(){function e({x:e,y:t,width:n,height:r,scaleRatio:o,margin:i}={}){const a={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0}};return a.x=Number.isNaN(e)?a.x:e,a.y=Number.isNaN(t)?a.y:t,a.width=Number.isNaN(n)?a.width:n,a.height=Number.isNaN(r)?a.height:r,void 0!==o&&(a.scaleRatio.x=Number.isNaN(o.x)?a.scaleRatio.x:o.x,a.scaleRatio.y=Number.isNaN(o.y)?a.scaleRatio.y:o.y),void 0!==i&&(a.margin.left=Number.isNaN(i.left)?0:i.left,a.margin.top=Number.isNaN(i.top)?0:i.top),a}return function(t={}){const{createElement:n=document.createElement.bind(document)}=t;let r,i=e();const a={element:()=>r,root:()=>r,appendTo:e=>(r||(r=n("div"),r.style.position="absolute",r.style["-webkit-font-smoothing"]="antialiased",r.style["-moz-osx-font-smoothing"]="antialiased",r.style.pointerEvents="none"),e.appendChild(r),r),render(e){if(!r)return!1;const t=i.scaleRatio.x,n=i.scaleRatio.y;return r.style.left=Math.round(i.margin.left+i.x*t)+"px",r.style.top=Math.round(i.margin.top+i.y*n)+"px",r.style.width=Math.round(i.width)+"px",r.style.height=Math.round(i.height)+"px",r.style.transform=`scale(${t}, ${n})`,r.style.transformOrigin="top left",d.render(function(e,t){return o.createElement(m,{generateClassName:t},o.createElement(h,{theme:Zi},e))}(e,Xi),r),!0},itemsAt:()=>[],findShapes:()=>[],clear:()=>(r&&d.unmountComponentAtNode(r),a),destroy(){r&&r.parentElement&&(d.unmountComponentAtNode(r),r.parentElement.removeChild(r)),r=null},size:t=>(t&&(i=e(t)),i)};return a}}function ea(){return function(e){e.renderer("react",Qi()),e.component("data-title",_o()),e.component("disclaimer",function(){class e extends o.Component{render(){const{label:e,spanStyle:t}=this.props;return o.createElement(o.Fragment,null,o.createElement("span",{ref:this.alignToRef,style:t,title:e},e))}}return e.propTypes={label:Do.exports.string.isRequired,spanStyle:Do.exports.shape().isRequired},{renderer:"react",disableTriggers:!0,preferredSize:function(){return 22},render(){const{settings:{label:t,rtl:n},layout:{dock:r},style:i={}}=this.settings,a="top"!==r&&"bottom"!==r||!n?"ltr":"rtl",s=function(e,t,n){const r={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#7b7a78",fontStyle:"italic",fontSize:"13px",fontFamily:e.fontFamily||'"Source Sans Pro", "Arial", "sans-serif"'};switch(t){case"left":r.width=n.height+"px",r.transform=`rotate(-90deg) translate(-${n.height}px, 0)`,r.transformOrigin="top left";break;case"right":r.width=n.height+"px",r.transform=`rotate(90deg) translate(0, -${n.width}px)`,r.transformOrigin="top left";break;case"center":r.width=n.width+"px",r.height=n.height+"px",r.color="#595959",r.fontStyle="normal",r.fontSize="1.2em",r.textAlign="center";break;default:case"top":case"bottom":r.justifyContent="flex-start",r.alignItems="flex-start"}return r}(i,r,this.rect),l="center"===r?t:"* "+t,u="center"!==r?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}:{};return o.createElement("div",{style:s,dir:a},o.createElement(o.Fragment,null,o.createElement(e,{label:l,spanStyle:u})))}}}())}}function ta(e){return Xe(e).l<70}function na(e,t){const n=Xe(e).l/100,r=Xe(t).l/100;return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)}function ra(e,t){return{x:t.x+e.r*Math.sin(e.a),y:t.y-e.r*Math.cos(e.a)}}var oa={require:["chart","settings"],defaultSettings:{settings:{},style:{}},render(){return function({chart:e,settings:t}){const n=e.component(t.component);if(!n)return[];const r=e.findShapes(t.selector).filter((e=>e.key===t.component));if(r.length<2)return[];if(n.settings.settings.slice.cornerRadius>0||n.settings.settings.slice.strokeWidth>0)return[];const o=[];let i=r[r.length-1];for(let e=0;e<r.length;e+=1){const t=r[e],n=i.attrs.fill,a=t.attrs.fill;if(na(a,n)<=1.2){const{start:e,offset:n}=t.desc.slice;let{innerRadius:r,outerRadius:s}=t.desc.slice;if(r=Math.max(r,i.desc.slice.innerRadius),s=Math.min(s,i.desc.slice.outerRadius),s>r){const t=ra({r:s,a:e},n),i=ra({r:r,a:e},n);o.push({type:"line",x1:t.x,y1:t.y,x2:i.x,y2:i.y,strokeWidth:1,opacity:.4,stroke:ta(a)?"#ccc":"#333"})}}i=t}return o}({chart:this.chart,rect:this.rect,style:this.style,settings:this.settings.settings})}};function ia(e,t=!0){let n="";for(let t=0;t<e.length;t++){const r=e[t];n+=0===t?`M${r.x} ${r.y}`:`L${r.x} ${r.y}`,n+=" "}return t&&(n+="Z"),n}function aa(e){const{size:t,angle:n}=e,r={x:e.x,y:e.y},o=t/2,i=e.x-o,a=e.y-o;let s=[{x:i,y:a+t},{x:i+o,y:a},{x:i+t,y:a+t},{x:i,y:a+t}];return s=s.map((e=>function(e,t,n={x:0,y:0}){const r=Math.cos(t),o=Math.sin(t),i=(s=n,{x:(a=e).x-s.x,y:a.y-s.y});var a,s;return function(e,t){return{x:e.x+t.x,y:e.y+t.y}}({x:r*i.x-o*i.y,y:o*i.x+r*i.y},n)}(e,n,r))),{type:"path",fill:e.fill,d:ia(s)}}var sa={require:["chart"],defaultSettings:{settings:{},style:{}},render(){return function({chart:e,settings:t}){if(!e.component(t.component))return[];const n=e.findShapes(t.selector).filter((e=>e.key===t.component));if(n.length<2)return[];const r=[];for(let e=0;e<n.length;e+=1){const a=n[e];if(a.data.radius.value<0){const{start:e,end:n,offset:s}=a.desc.slice,l=(e+n)/2,u=(o={r:t.offset,a:l},{x:(i=s).x+o.r*Math.sin(o.a),y:i.y-o.r*Math.cos(o.a)}),c=aa({size:t.size,fill:t.fill,angle:l+Math.PI,...u});c.data={...a.data,_share:a.desc.share,_fillColor:a.attrs.fill},r.push(c)}}var o,i;return r}({chart:this.chart,rect:this.rect,style:this.style,settings:this.settings.settings})}};function la(e){return(la="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ua(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}function ca(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ua(i,r,o,a,s,"next",e)}function s(e){ua(i,r,o,a,s,"throw",e)}a(void 0)}))}}function da(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pa(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 fa(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pa(Object(n),!0).forEach((function(t){da(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pa(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ma(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function ha(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(e,t)||ya(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 ga(e){return function(e){if(Array.isArray(e))return va(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||ya(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 ya(e,t){if(e){if("string"==typeof e)return va(e,t);var n=Object.prototype.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)?va(e,t):void 0}}function va(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ba=Object.prototype.hasOwnProperty,xa=Object.prototype.toString,qa=Object.defineProperty,Da=Object.getOwnPropertyDescriptor,Ca=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===xa.call(e)},wa=function(e){if(!e||"[object Object]"!==xa.call(e))return!1;var t,n=ba.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&ba.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||ba.call(e,t)},Sa=function(e,t){qa&&"__proto__"===t.name?qa(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Ma=function(e,t){if("__proto__"===t){if(!ba.call(e,t))return;if(Da)return Da(e,t).value}return e[t]},Ea=function e(){var t,n,r,o,i,a,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(n in t)r=Ma(s,n),s!==(o=Ma(t,n))&&(c&&o&&(wa(o)||(i=Ca(o)))?(i?(i=!1,a=r&&Ca(r)?r:[]):a=r&&wa(r)?r:{},Sa(s,{name:n,newValue:e(c,a,o)})):void 0!==o&&Sa(s,{name:n,newValue:o}));return s};function Ia(e,t){return{range:function(e){var n=e.resources,r=e.data,o=n.theme.palette("categorical",0===t?r.items.length:t);return r.items.map((function(e){return o[e.value%o.length]}))},valueAccessor:e.value}}function Aa(e,t){return{range:function(e){var n=e.resources,r=e.data,o=n.theme.palette("categorical",0===t?r.items.length:t);return r.items.map((function(e){return o[e.row.value%o.length]}))},valueAccessor:e.value}}function ka(e,t,n,r,o){var i,a=o.byRow,s=o.byElemNo;if(r&&(t.input.persistent||e.hc.qDimensionInfo.length>1||void 0===n.activeDimensionIndex&&e.hc.qSize.qcy>((null===(i=e.hc.qDataPages[0])||void 0===i?void 0:i.qArea.qHeight)||0)))return s(r,r.raw().qCardinal);if(r){var l=t.pic.extract({field:r.key(),trackBy:r.value}).length;return a(r,l)}return{}}function Ta(e,t){var n=e.hc.qDimensionInfo,r=t.input.byDimDef||{activeDimensionIndex:n.length-1};if(r.activeDimensionIndex>=0){var o=n[r.activeDimensionIndex];r=o.coloring&&o.coloring.colorMapRef?{type:"libraryItem",key:o.coloring.colorMapRef,activeDimensionIndex:r.activeDimensionIndex}:{activeDimensionIndex:r.activeDimensionIndex}}return r}function La(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 Oa(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Pa(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Na(){}var Ra=1/.7,Fa="\\s*([+-]?\\d+)\\s*",ja="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ha="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",_a=/^#([0-9a-f]{3,8})$/,za=new RegExp("^rgb\\("+[Fa,Fa,Fa]+"\\)$"),Va=new RegExp("^rgb\\("+[Ha,Ha,Ha]+"\\)$"),Ua=new RegExp("^rgba\\("+[Fa,Fa,Fa,ja]+"\\)$"),Ba=new RegExp("^rgba\\("+[Ha,Ha,Ha,ja]+"\\)$"),Wa=new RegExp("^hsl\\("+[ja,Ha,Ha]+"\\)$"),$a=new RegExp("^hsla\\("+[ja,Ha,Ha,ja]+"\\)$"),Ya={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 Ka(){return this.rgb().formatHex()}function Ja(){return this.rgb().formatRgb()}function Ga(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=_a.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Za(t):3===n?new ts(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Xa(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Xa(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=za.exec(e))?new ts(t[1],t[2],t[3],1):(t=Va.exec(e))?new ts(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Ua.exec(e))?Xa(t[1],t[2],t[3],t[4]):(t=Ba.exec(e))?Xa(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Wa.exec(e))?is(t[1],t[2]/100,t[3]/100,1):(t=$a.exec(e))?is(t[1],t[2]/100,t[3]/100,t[4]):Ya.hasOwnProperty(e)?Za(Ya[e]):"transparent"===e?new ts(NaN,NaN,NaN,0):null}function Za(e){return new ts(e>>16&255,e>>8&255,255&e,1)}function Xa(e,t,n,r){return r<=0&&(e=t=n=NaN),new ts(e,t,n,r)}function Qa(e){return e instanceof Na||(e=Ga(e)),e?new ts((e=e.rgb()).r,e.g,e.b,e.opacity):new ts}function es(e,t,n,r){return 1===arguments.length?Qa(e):new ts(e,t,n,null==r?1:r)}function ts(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function ns(){return"#"+os(this.r)+os(this.g)+os(this.b)}function rs(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function os(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function is(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ss(e,t,n,r)}function as(e){if(e instanceof ss)return new ss(e.h,e.s,e.l,e.opacity);if(e instanceof Na||(e=Ga(e)),!e)return new ss;if(e instanceof ss)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new ss(a,s,l,e.opacity)}function ss(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function ls(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Oa(Na,Ga,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:Ka,formatHex:Ka,formatHsl:function(){return as(this).formatHsl()},formatRgb:Ja,toString:Ja}),Oa(ts,es,Pa(Na,{brighter:function(e){return e=null==e?Ra:Math.pow(Ra,e),new ts(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new ts(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ns,formatHex:ns,formatRgb:rs,toString:rs})),Oa(ss,(function(e,t,n,r){return 1===arguments.length?as(e):new ss(e,t,n,null==r?1:r)}),Pa(Na,{brighter:function(e){return e=null==e?Ra:Math.pow(Ra,e),new ss(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new ss(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,o=2*n-r;return new ts(ls(e>=240?e-240:e+120,o,r),ls(e,o,r),ls(e<120?e+240:e-120,o,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},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var us=Math.PI/180,cs=180/Math.PI,ds=4/29,ps=6/29,fs=3*ps*ps;function ms(e){if(e instanceof hs)return new hs(e.l,e.a,e.b,e.opacity);if(e instanceof qs)return Ds(e);e instanceof ts||(e=Qa(e));var t,n,r=bs(e.r),o=bs(e.g),i=bs(e.b),a=gs((.2225045*r+.7168786*o+.0606169*i)/1);return r===o&&o===i?t=n=a:(t=gs((.4360747*r+.3850649*o+.1430804*i)/.96422),n=gs((.0139322*r+.0971045*o+.7141733*i)/.82521)),new hs(116*a-16,500*(t-a),200*(a-n),e.opacity)}function hs(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function gs(e){return e>.008856451679035631?Math.pow(e,1/3):e/fs+ds}function ys(e){return e>ps?e*e*e:fs*(e-ds)}function vs(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function bs(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function xs(e){if(e instanceof qs)return new qs(e.h,e.c,e.l,e.opacity);if(e instanceof hs||(e=ms(e)),0===e.a&&0===e.b)return new qs(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*cs;return new qs(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function qs(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Ds(e){if(isNaN(e.h))return new hs(e.l,0,0,e.opacity);var t=e.h*us;return new hs(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}function Cs(e){return function(){return e}}function ws(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Cs(isNaN(e)?t:e)}Oa(hs,(function(e,t,n,r){return 1===arguments.length?ms(e):new hs(e,t,n,null==r?1:r)}),Pa(Na,{brighter:function(e){return new hs(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new hs(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 ts(vs(3.1338561*(t=.96422*ys(t))-1.6168667*(e=1*ys(e))-.4906146*(n=.82521*ys(n))),vs(-.9787684*t+1.9161415*e+.033454*n),vs(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Oa(qs,(function(e,t,n,r){return 1===arguments.length?xs(e):new qs(e,t,n,null==r?1:r)}),Pa(Na,{brighter:function(e){return new qs(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new qs(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return Ds(this).rgb()}}));var Ss=function e(t){var n=function(e){return 1==(e=+e)?ws: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):Cs(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=es(e)).r,(t=es(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=ws(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1),Ms=/^class(-pyramid)?/,Es=function(e,t,n,r){var o=void 0!==n.min?n.min:r.min(),i=void 0!==n.max?n.max:r.max(),a=o,s=i,l=t.limits,u={},c="percent"===t.limitType?l.map((function(e){return o+(i-o)*e})):l,d=t.colors.map((function(t){return e.resolveUIColor(t)}));if(o=Math.min.apply(Math,[o].concat(ga(c))),i=Math.max.apply(Math,[i].concat(ga(c))),u.min=o,u.max=i,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,o=e.range,i=[],a=[];if(r.length)if(r[r.length-1]<t)a.push(t,n),i.push(o[o.length-1],o[o.length-1],o[o.length-1]);else if(r[0]>n)a.push(t,n),i.push(o[0],o[0],o[0]);else{if(r[0]>t)a.push(t),i.push(o[0]);else{a.push(t);for(var s=0;s<r.length;s++)if(t<r[s]){i.push(o[s]);break}}for(var l=0;l<r.length;l++)t<r[l]&&r[l]<n&&(a.push(r[l]),i.push(o[l]));if(r[r.length-1]<n)a.push(n),i.push(o[r.length]),i.push(o[r.length]);else{a.push(n);for(var u=0;u<r.length;u++)if(r[u]>n){i.push(o[u]),i.push(o[u]);break}}}else i.push(o[0]);return{min:t,max:n,range:i,domain:a}}({min:"percent"===t.limitType?o:a,max:"percent"===t.limitType?i:s,range:d,limits:"percent"===t.limitType?c:l}));else if(t.breakTypes){var p=t.breakTypes;u.type="continuous",u.domain=[o],u.range=[d[0]];for(var f=0;f<c.length;f+=1)if(p[f]){var m=d[f],h=d[f+1],g=Ss(m,h)(.5);u.range.push(g),u.domain.push(c[f]),f<c.length-1&&p[f+1]&&(u.range.push(d[f+1]),u.domain.push((c[f]+c[f+1])/2))}else u.range.push(d[f]),u.range.push(d[f+1]),u.domain.push(c[f]),u.domain.push(c[f]+Math.min(1e-6,(i-o)/1e6));u.range.push(d[d.length-1]),u.domain.push(i)}else u.domain=c,u.range=d;return u};function Is(e,t,n,r,o){var i,a,s,l=0,u=[],c=(e-t)/(r+1);if(0===c)return 1;for(i=0;i<n.length;i+=1)a=.99*(n[i]-t),s=n[i]>e?Math.floor(e/c):n[i]<t?0:Math.floor(a/c),Number.isNaN(s)||(u[s]?u[s]+=1:u[s]=1);for(i=0;i<u.length;i+=1)u[i]&&(l+=1);return l<=r||l>=o?Math.max(l,r):Is(e,t,n,r+1,o)}var As=function(e,t,n,r){var o,i,a=t.theme,s=t.hc,l=r.f,u={mode:"field",fieldType:"measure",field:l?l.key():void 0,reverse:n.input.reverseScheme||!1,type:"continuous",range:function(e){return e.resources.theme.palette("quant")}},c=[],d=!0;if(l){if(Number.isNaN(+l.min())||Number.isNaN(+l.max()))return{invalid:!0};(d=!("S"===(o=n.pic.raw()).qMode&&(o.qDataPages[0]&&o.qSize.qcy>o.qDataPages[0].qArea.qHeight||!o.qDataPages.length&&o.qSize.qcy>0)||"K"===o.qMode&&o.qStackedDataPages[0]&&o.qSize.qcy>o.qStackedDataPages[0].qArea.qHeight||"T"===o.qMode&&o.qSize.qcy>o.qTreeDataPages[0].qGroupSize))&&(c=n.pic.extract({field:0,props:{num:{field:l.key()},exclude:{fields:s.qDimensionInfo.map((function(e,t){return{field:"qDimensionInfo/".concat(t)}})),value:function(e){return Math.min.apply(Math,ga(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(l&&!d)u.min=l.min(),u.max=l.max();else if(l){if(!c.length)return{invalid:!0};u.min=Math.min.apply(Math,ga(c)),u.max=Math.max.apply(Math,ga(c))}if(n.input.measureScheme&&(u.palettes={quant:n.input.measureScheme}),a){var p=a.getDataColorScales().filter((function(e){return e.key===n.input.measureScheme}))[0];u.type=p&&Ms.test(p.type)?"categorical":"continuous","categorical"===u.type&&(i=p.colors.some((function(e){return Array.isArray(e)}))?Math.max.apply(Math,ga(p.colors.map((function(e){return e?e.length:0})))):p.colors.length)}if("categorical"===u.type){for(var f=d?Is(u.max,u.min,c,1,i):i,m=(u.max-u.min)/f,h=[],g=0;g<f+1;g+=1)h.push(u.min+m*g);u.domain=h,u.range=function(e){for(var t=e.resources.theme.palette("quant",f),n=Math.max(1,Math.floor(t.length/f)),r=[],o=0;o<f;o+=1)r.push(t[o*n]);return[r[0]].concat(r,[r[r.length-1]])}}return u};function ks(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 Ts(e){var t,n=e.cm,r=e.defaults,o=e.index,i=e.input,a=e.pic;if(!i||!i.on)return null;var s=null!==(t=i.mode)&&void 0!==t?t:"primary";return"primary"===s?function(e,t,n){var r=n.primary;return void 0!==t.paletteColor&&t.paletteColor&&(r=e.resolveUIColor(t.paletteColor)),fa(fa({},n),{},{mode:"constant",type:"constant",primary:r})}(n,i,r):"byExpression"===s?function(e,t,n){var r="qMeasureInfo/".concat(e,"/"),o=t.field((function(e){return e.id().startsWith(r)&&"colorByMeasureExpression"===e.raw().id})),i=o;return fa(fa({},n),{},i?{mode:"field",fieldType:"expression",field:o?o.key():void 0,type:"color"}:{mode:"constant",type:"constant",primary:n.nil})}(o,a,r):null}function Ls(e){e.measureOverrides.every((function(e){return!e}))&&(e.measureOverrides=null)}function Os(e,t){for(var n=(null==t?void 0:t.domain)||[],r=(null==t?void 0:t.range)||[],o=[],i=0;i<e.length;++i){var a=e[i];if("constant"===(null==a?void 0:a.mode)){var s=n.indexOf(i);-1===s?(n.push(i),r.push(a.primary)):r[s]=a.primary,e[i]=null}else if(a){o.push(i);var l=n.indexOf(i);-1!==l&&(n.splice(l,1),r.splice(l,1))}}return{domain:n,range:r,exclude:o}}function Ps(e,t,n,r){var o,i=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,o=t.hc,i=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).getCField,a=void 0===i?ks:i,s=n.input.byMeasureDef||{activeMeasureIndex:0},l=a(n,s),u=As(0,{theme:r,hc:o},n,{f:l});if(u.invalid)return u;("expression"===s.type||s.activeMeasureIndex<0)&&(u.label=s.label,l&&"color.altLabel"===l.raw().labelExpRef&&(u.label=n.input.altLabel)),!u.label&&l&&(u.label=l.title());var c=s.activeMeasureIndex>=0?l:null;if(!c&&l&&void 0!==l.raw().matchMeasure&&l.raw().matchMeasure>-1&&(c=n.pic.fields().filter((function(e){return"measure"===e.type()}))[l.raw().matchMeasure]),n.input.useMeasureGradient&&"libraryItem"===s.type)if(c){var d=c.raw().coloring;d&&d.gradient&&Ea(u,Es(e,d.gradient,u,c))}else u.auxiliary=s;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]:{},o=r.getCDef,i=void 0===o?Ta:o,a=r.getCByField,s=void 0===a?La:a,l=r.getPersistence,u=void 0===l?ka:l,c=i(t,n),d=s(n,c),p=d?d.raw():{},f=n&&n.pic?n.pic.raw():{};if(p.qError||p.qSize&&0===p.qSize.qcy&&!f.qHasOtherValues)return{invalid:!0};var m={mode:"field",fieldType:"dimension",type:"categorical",field:d?d.key():void 0,isFieldLocked:p.qLocked};return("expression"===c.type||c.activeDimensionIndex<0)&&(m.label=c.label,"color.altLabel"===p.labelExpRef&&(m.label=n.input.altLabel)),!m.label&&d&&(m.label=d.title()),n.input.dimensionScheme&&(m.palettes={categorical:n.input.dimensionScheme}),n.input.useDimColVal&&"libraryItem"===c.type&&(m.auxiliary=c),Ea(m,u(t,n,c,d,{byRow:Aa,byElemNo:Ia})),m}(e,n,t);if("byExpression"===t.input.mode)return function(e,t,n,r){var o=t.hc,i=t.theme,a=t.translator,s=n.pic.field((function(e){return"colorByExpression"===e.raw().id}));if(!s||!s.raw().qFallbackTitle&&!n.input.colorExpression||!(Number.isFinite(s.raw().qMin)&&Number.isFinite(s.raw().qMax)||n.input.expressionIsColor))return{mode:"constant",type:"constant",primary:r.nil};if(n.input.expressionIsColor)return{mode:"field",fieldType:"expression",field:s?s.key():void 0,type:"color"};var l=As(0,{hc:o,theme:i},n,{f:s});return l.invalid||(l.label=n.input.expressionLabel||a.get("Object.ChartTooltip.ColorExpression")),l}(0,n,t,r);if("byMultiple"===t.input.mode||"primary"===t.input.mode)return function(e,t,n,r){var o=t.hc,i=t.theme,a=t.translator,s=n.input.useBaseColors;if(("byMultiple"===n.input.mode||"primary"===n.input.mode&&"measure"===n.input.useBaseColors)&&o.qMeasureInfo.length>1&&(s="measure"),"measure"===s){var l=[],u=[];"measure"===n.input.useBaseColors&&o.qMeasureInfo.forEach((function(t,n){if(t.baseColor||t.coloring&&t.coloring.baseColor){l.push(n);var o=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===o?u.push(r.primary):u.push(o)}}));var c=n.input.dimensionScheme?{categorical:n.input.dimensionScheme}:void 0,d=i?i.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:l.length?{domain:l,range:u}:void 0}}if("dimension"===s){var p=[],f=[];return o.qDimensionInfo.forEach((function(t,n){if(t.baseColor||t.coloring&&t.coloring.baseColor){p.push(n);var o=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===o?f.push(r.primary):f.push(o)}})),{mode:"dimension",type:"categorical",field:p.length?p[0]:void 0,explicit:p.length?{domain:p,range:f}:void 0}}var m=r.primary;if(void 0!==n.input.paletteColor)n.input.paletteColor&&(m=e.resolveUIColor(n.input.paletteColor));else{var h=n.input.singleColor;"number"!=typeof h||Number.isNaN(h)||(m=["#b0afae","#7b7a78","#545352","#4477aa","#7db8da","#b6d7ea","#46c646","#f93f17","#ffcf02","#276e27","#ffffff","#000000"][h])}return{mode:"constant",type:"constant",primary:m}}(e,n,t,r)}return{}}(e,t,n,r);return null!==(o=t.input)&&void 0!==o&&o.measureOverrides?(i.measureOverrides=t.input.measureOverrides.map((function(n,o){return Ts({cm:e,input:n,defaults:r,index:o,pic:t.pic})})),function(e,t){var n,r,o,i=t.translator;if(Ls(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=Os(e.measureOverrides,e.explicit),Ls(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==i?void 0:i.get("Common.Measures")};return a.explicit=Os(e.measureOverrides),a}return null!==(o=e.measureOverrides)&&void 0!==o&&o.every((function(e){return e}))?{invalid:!0,measureOverrides:e.measureOverrides}:e}(i,n)):i}function Ns(e){var t=fa({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()}},o={auto:function(e){return e?(r.auto=e,o):r.auto},getDimensionColorMap:function(e){return e?(r.getDimensionColorMap=e,o):r.getDimensionColorMap},getAttributeDimension:function(e){return e?(r.getAttributeDimension=e,o):r.getAttributeDimension},getMeasure:function(e){return e?(r.getMeasure=e,o):r.getMeasure},set:function(e){var o;if(!e.colorProps)throw new Error('Missing "colorProps"');if(Ea(t,e),(n={pic:t.picasso.data("q")({data:t.hc,config:{localeInfo:t.localeInfo}}),input:t.colorProps}).input.auto){var i=r.auto(e.layout);n.input=Ea(!0,{},n.input,i,{auto:!1});var a=t.theme?t.theme.getDataColorPalettes():[];a[0]&&(n.input.dimensionScheme=a[0].key);var s=0;n.input.byDimDef&&+n.input.byDimDef.activeDimensionIndex>=0&&(s=+n.input.byDimDef.activeDimensionIndex),t.hc&&t.hc.qDimensionInfo[s]&&t.hc.qDimensionInfo[s].coloring&&t.hc.qDimensionInfo[s].coloring.colorMapRef&&n.input.byDimDef&&(n.input.byDimDef.type="libraryItem",n.input.byDimDef.key=t.hc.qDimensionInfo[s].coloring.colorMapRef)}null!==(o=n.input.measureOverrides)&&void 0!==o&&o.every((function(e){return!e||!e.on}))&&(n.input=Ea(!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 o=e.auxiliary||{},i=o.key;if("measure"===e.fieldType)return r.getMeasure(i,t).catch((function(){}));if("dimension"===e.fieldType){var a="".concat(n,"/").concat(e.field).replace("qDimensionInfo","qDimensions").replace("qAttrDimInfo","qAttributeDimensions");return Promise.all([/qAttrDimInfo/.test(e.field)?r.getAttributeDimension(a,t).catch((function(){})):Promise.resolve(),i?r.getDimensionColorMap(i,t).catch((function(){})):Promise.resolve()])}return Promise.resolve()},getAuxiliarySettings:function(e,r){var o=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 i=n.pic.field(e.field);return Es(o,r.coloring.gradient,e,i)}return{}}if("dimension"===e.fieldType){var a={nil:e.nil,others:e.others},s=r[0],l=r[1]?r[1].colorMap:null;if(s){var u=t.picasso.data("q")({data:{qDimensionInfo:[n.pic.field(e.field).raw(),n.pic.field(e.field).raw()],qMeasureInfo:[],qDataPages:s,qInterColumnSortOrder:[0,1],qMode:"S"}});a.legendDataset=u}return l?function(e,t,n,r){var o=r.external,i=r.field,a=fa({},e);Ea(a,Ia(i,i.raw().qCardinal));var s=o.theme?o.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},s&&!t.pal&&(a.palettes.categorical=s.key,Ea(a,Ia(i)))):!1===t.autoFill&&t.single?a.range=[n.resolveUIColor(t.single)]:t.autoFill&&(s&&(a.palettes={categorical:s.key}),Ea(a,Ia(i))),t.colors&&t.colors.length&&(a.explicit=function(e,t,n){for(var r={},o=0;o<e.length;o+=1)r[e[o].value]=e[o].baseColor;var i=[];return{domain:function(e){var o=e.data,a=[];i=[];for(var s=0;s<o.items.length;s++){var l=o.items[s],u=(l.text||l).label;r[u]&&-1===a.indexOf(l.value)&&(a.push(l.value),i.push(t.resolveUIColor(r[u])))}return a.push(-3,-2),i.push(n.others),i.push(n.nil),a},range:function(){return i}}}(t.colors,n,a)),a}(a,l,o,{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=fa(fa({},e),r.getDataColorSpecials())),n.settings=Ea(e,Ps(this,n,t,e))}return n.settings}};return o}var Rs=function(e,t){var n=e.fieldType,r={};if(t)if("measure"===n){var o=t.coloring;o&&(r.measureGradient=o.gradient)}else if("dimension"===n){var i=t[0],a=t[1];i&&(r.legendDataPage=i),a&&(r.dimValsData=a.colorMap)}return r},Fs=function(e){throw e.isHandled=!0,e},js=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()},Hs=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()},_s=function(e,t){var n=t.layout,r=t.model,o=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&&o?r.getHyperCubeData(e,[{qHeight:100,qLeft:0,qTop:0,qWidth:2}]).catch(Fs):Promise.reject()};function zs(e){var t=e.hc,n=e.source,r=e.coloring,o={data:{extract:[{source:"dummy",field:0,filter:function(){return o.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 o.expando++}},text:{value:function(e){return e.qText},reduce:"first"}}}]},expando:0};return o}function Vs(e){return function(t){return"object"===la(t.datum[e])?t.datum[e].value:void 0}}function Us(e){return"object"===la(e.datum.isNull)?e.datum.isNull.value:-2===e.datum.value}function Bs(e){return-3===e.datum.value}var Ws=function(e,t,n){var r=e&&e.dock||void 0;if("auto"!==r)return r||"right";if(t){var o=t.element.getBoundingClientRect();if(o.height>o.width)return"bottom"}return n?"left":"right"},$s=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 Ys(e,t){var n=e.styleReference,r=e.chart,o=e.rtl,i=t.legendProps,a=t.coloring,s=t.theme,l=t.hc;return{layout:{minimumLayoutMode:"MEDIUM",dock:Ws(i,r,o)},show:"function"==typeof i.show?function(){return $s(i,l,a)}:$s(i,l,a),renderer:"svg",mounted:function(e){e.childNodes[0].style.pointerEvents="none",e.style.overflow="hidden"},settings:{title:{show:!1!==i.showTitle,wordBreak:"break-word",maxLines:2,lineHeight:1.2,text:a.label||"",fill:s?s.getStyle(n,"legend.title","color"):void 0,fontSize:s?s.getStyle(n,"legend.title","fontSize"):"16px",fontFamily:s?s.getStyle(n,"legend.title","fontFamily"):"'Source Sans Pro', 'Arial', 'sans-serif'"}}}}function Ks(e,t,n){return"categorical"===t.coloring.type?function(e,t,n){var r=Ys(e,t);if(!r.show)return!1;var o=e.key,i=e.styleReference,a=e.viewState,s=e.rtl,l=e.settings,u=e.style,c=t.scaleKey,d=t.theme,p=t.scales,f=r.layout.dock,m="left"===f||"right"===f?{maxLines:3,wordBreak:"break-word"}:{},h={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"},g="".concat(c,"Legend");return Ea(!0,r,{type:"legend-cat",key:"".concat(o,"-cat"),scale:g in p?g:c,settings:{layout:{scrollOffset:function(){return a?a.get("legendScrollOffset"):void 0},size:-1!==["top","bottom"].indexOf(r.layout.dock)?2:1,direction:s?"rtl":"ltr",horizontal:20},item:{show:function(e){return-2!==e.datum.value},label:fa({fill:d?d.getStyle(i,"legend.label","color"):void 0,fontSize:d?d.getStyle(i,"legend.label","fontSize"):void 0,fontFamily:d?d.getStyle(i,"legend.label","fontFamily"):"'Source Sans Pro', 'Arial', 'sans-serif'"},m)},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:h[n]})])])}}}},brush:{consume:[{context:"selection",data:["",o],style:{inactive:{opacity:.3}}}]}},{settings:l,style:u})}(e,t,n):"continuous"===t.coloring.type&&function(e,t){var n=e.key,r=e.styleReference,o=e.rtl,i=e.settings,a=e.style,s=t.scaleKey,l=t.theme,u=Ys(e,t);return!!u.show&&Ea(!0,u,{type:"legend-seq",key:"".concat(n,"-seq"),settings:{fill:s,major:"".concat(s,"Range"),length:1,tick:{fill:l?l.getStyle(r,"legend.label","color"):void 0,fontSize:l?l.getStyle(r,"legend.label","fontSize"):void 0,fontFamily:l?l.getStyle(r,"legend.label","fontFamily"):"'Source Sans Pro', 'Arial', 'sans-serif'"},title:{anchor:!o||"top"!==u.layout.dock&&"bottom"!==u.layout.dock?void 0:"right",padding:parseFloat(u.settings.title.fontSize)||16}}},{settings:i,style:a})}(e,t)}function Js(e,t,n){var r=[],o=[],i=Ks(e,t,n&&n.navigationDisabled);return r.push(i),i&&"legend-cat"===i.type&&(o.push(function(e){var t=e.key,n=e.requireFailure,r=e.recognizeWith,o=(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!=o&&null!==(r=o.interact)&&void 0!==r&&r.enabled&&!o.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 i=n.srcEvent.target;return!!(i&&i.hasAttribute("data-action")&&i.hasAttribute("data-component-key"))||!(!i||!i.childNodes[0]||"BUTTON"!==i.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)),o.push(function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.eventName,r=t.key,o=t.requireFailure,i=t.recognizeWith,a=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:pan-".concat(r),type:"Pan",requireFailure:o,recognizeWith:i,options:{event:n,pointers:1,threshold:10,enable:function(e,t){var o;return this.started===n||!t||!(null!=a&&null!==(o=a.interact)&&void 0!==o&&o.enabled&&!a.interact.enabled())&&this.chart.componentsFromPoint({x:t.center.x,y:t.center.y}).some((function(e){return e.key==="".concat(r,"-cat")}))}},events:(e={},da(e,"".concat(n,"start"),(function(e){e.preventDefault(),this.started!==n&&(this.started=n,this.chart.component("".concat(r,"-cat")).emit("panstart",e))})),da(e,"".concat(n,"move"),(function(e){e.preventDefault(),this.chart.component("".concat(r,"-cat")).emit("panmove",e)})),da(e,"".concat(n,"end"),(function(e){e.preventDefault(),this.chart.component("".concat(r,"-cat")).emit("panend",e),this.started=!1})),e)}}(e,n))),{interactions:o,components:r}}var Gs=function(e){return"rgba(".concat([(16711680&e)>>16,(65280&e)>>8,255&e,((4278190080&e)>>>24)/255].join(","),")")};function Zs(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.auto,n=Ns(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 js(e,{layout:n,app:r})})).getMeasure((function(e,t){var n=t.layout,r=t.app;return Hs(e,{layout:n,app:r})})).getAttributeDimension((function(e,t){var n=t.layout,r=t.model,o=t.app;return _s(e,{layout:n,model:r,app:o})}));return n.getSnapshotData=Rs,n}({resources:e}),n={},r={},o=function(e){return r.settings||(e||console.warn("settings() called before auxiliarySettings()"),r.settings=t.settings()),r.settings},i={config:function(o){if(n=fa({},o),r={},!n.key)throw new Error("Missing key");t.set(fa(fa({},e),n))},auto:function(e){return e?(t.auto(e),i):t.auto()},getAuxiliarySettings:function(e){return r.auxiliarySettings?Promise.resolve(r.auxiliarySettings):t.getAuxiliarySettings(o(!0),e).then((function(e){return r.auxiliarySettings=e||{},r.settings=fa(fa({},r.settings),r.auxiliarySettings),r.scales=void 0,r.color=void 0,r.auxiliarySettings}))},getAuxiliaryData:function(){return t.getAuxiliaryData(o())},getSnapshotData:function(e){var n=o();return t.getAuxiliaryData(n,e).then((function(e){return t.getSnapshotData(n,e)}))},resolveUIColor:function(e){return t.resolveUIColor(e)},settings:function(){var e=o();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=o().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)}(o(),{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,o=[];if(n&&n.palettes&&r){var i=n.palettes.categorical||t.dimensionScheme,a=r.getDataColorPalettes().filter((function(e){return e.key===i}))[0]||r.getDataColorPalettes()[0];i&&a&&o.push({key:"categorical",colors:a.colors});var s=n.palettes.metric||t.measureScheme,l=r.getDataColorScales().filter((function(e){return e.key===s}))[0];if(l){var u=l.colors[0]?l.colors:[[]].concat(ga(l.colors.slice(1)));u=Array.isArray(u[0])?u.map((function(e){return e.slice().reverse()})):u.slice().reverse(),o.push({key:"quant",colors:u})}}return o}({coloring:o(),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,o=e.key,i=e.source,a=e.picasso,s={},l=o;if(n){var u={override:!0,domain:n.explicit&&"function"==typeof n.explicit.domain?n.explicit.domain:[].concat(ga((n.explicit||{}).domain||[]),[-3,-2]),range:n.explicit&&"function"==typeof n.explicit.range?n.explicit.range:[].concat(ga((n.explicit||{}).range||[]),[n.others,n.nil])};if("field"===n.mode){if("dimension"===n.fieldType){var c,d=zs({hc:t,source:i,coloring:n}).data;if(n.legendDataset){var p=0,f={};a.data("q")({data:t}).extract({field:n.field,trackBy:n.valueAccessor,reduce:function(e){var t=e[0];return f[t]=p++,e[0]}}),c={source:"attrDim",extract:{field:"qDimensionInfo/0",filter:function(e){return e.qElemNumber>=0},props:{row:{value:function(e){return f[e.qElemNumber]}}}}}}var m={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}};s[l]=m,c&&(s["".concat(l,"Legend")]=fa(fa({},m),{},{data:c})),t&&t.qHasOtherValues&&c&&((c||m.data).amend=[{label:t.qDimensionInfo[0].othersLabel,source:{key:"qHyperCube",field:"qDimensionInfo/0"},row:{value:-3},value:-3}])}else if("measure"===n.fieldType){var h={data:{field:n.field},min:n.min,max:n.max};s[l]=Ea({},h,{type:"categorical"===n.type?"threshold-color":"sequential-color",range:n.range,domain:n.domain,invert:n.reverse}),"sequential-color"===s[l].type&&(s["".concat(l,"Range")]=Ea({},h,{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"};s[l]=g}else if("measure"===n.mode){var y={data:t.qMeasureInfo.map((function(e,t){return t})).filter((function(e){var t,r;return!(null!==(t=n.explicit)&&void 0!==t&&null!==(r=t.exclude)&&void 0!==r&&r.includes(e))})),label:function(e){return t.qMeasureInfo[e.datum.value].qFallbackTitle},explicit:u,type:"categorical-color"};s[l]=y}}return s}({hc:n.hc,coloring:o(),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,o=Vs(r),i=Vs("".concat(r,"IsAnOther")),a=function(e,t){var r=e.fieldType,a=e.invalid,s=e.mode,l=e.nil,u=e.others,c=e.primary,d=e.type;return a?function(e){return Bs(e)||i(e)?u:l}:n[t]?function(e){return Bs(e)?u:Us(e)||-2===o(e)&&"dimension"===r||"NaN"===o(e)?l:i(e)?u:e.resources.scale(t)(o(e))||u}:"constant"===s?function(e){return Bs(e)||i(e)?u:Us(e)?l:c}:"color"===d?function(e){return Bs(e)||i(e)?u:Us(e)?l:o(e)||u}:null},s=a(t,r);if(t.measureOverrides){var l=Vs("".concat(r,"MeasureIdx")),u=t.measureOverrides.map((function(e){return e&&a(e)}));return function(e){var t=l(e);return u[t]?u[t](e):s(e)}}return s}({coloring:o(),scales:this.scales(),key:n.key}),r.color},datumProps:function(e){return function(e){var t,n,r=e.hc,o=e.coloring,i=e.scales,a=e.key,s=e.addMeasureIx,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,u=a,c=o.nil;"field"===o.mode&&o.field?t=o.field:i[a]&&"field"===o.mode&&(t=i[a].data.field||o.field),t?(n={field:t,reduce:"first"},"color"===o.type&&(n.value=function(e){return"NaN"!==e.qNum?Gs(e.qNum):e.qText&&Ga(e.qText)?e.qText:c})):"dimension"===o.mode?n=void 0!==o.field?o.field:r.qDimensionInfo.length-1:"measure"===o.mode&&(n=l);var d=da({},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)}}),s&&(d["".concat(u,"MeasureIdx")]=l),d}({coloring:this.settingsForMeasure(e),scales:this.scales(),key:n.key,hc:n.hc,addMeasureIx:o().measureOverrides},e)},data:function(){var e=o(),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,i=e.viewState,a=e.chart,s=e.rtl,l=e.styleReference,u=void 0===l?"object.legend":l,c=e.settings,d=void 0===c?{}:c,p=e.style,f=void 0===p?{}:p,m=arguments.length>1?arguments[1]:void 0;return Js({eventName:t,key:r,rtl:s,viewState:i,chart:a,styleReference:u,settings:d,style:f},{legendProps:n.legendProps,scaleKey:n.key,coloring:o(),theme:n.theme,hc:n.hc,scales:this.scales()},m)}};return i}var Xs=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function Qs(e){var t=e.qHyperCube,n=t.qDimensionInfo,r=t.qMeasureInfo,o=n.some(Xs),i=r.some(Xs),a=e.color.useBaseColors;return"measure"===a&&!i||"dimension"===a&&!o?"off":a}function el(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=fa(fa(fa({},e),t),{},{colorProps:fa(fa({},e.colorProps),t.colorProps||{})});return n}var tl=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function nl(e){var t,n=e.qHyperCube.qDimensionInfo.some(tl),r=e.qHyperCube.qMeasureInfo.some(tl),o=n?"dimension":void 0;return{mode:"primary",useBaseColors:null!==(t=null!=o?o:r?"measure":void 0)&&void 0!==t?t:"off",paletteColor:null}}var rl=function(){};function ol(e,t,n){if(void 0===e||void 0===t)return n;for(var r=t.split("."),o=e,i=0;i<r.length;++i){var a=r[i];if(void 0===o[a])return n;o=o[a]}return o}function il(e,t,n){if(void 0!==e&&void 0!==t){for(var r=t.split("."),o=r[r.length-1],i=e,a=0;a<r.length-1;++a){var s=r[a];void 0===i[s]&&(i[s]=Number.isNaN(+r[a+1])?{}:[]),i=i[s]}void 0!==n?i[o]=n:delete i[o]}}function al(){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={}}}}function sl(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return function(){for(var r=this,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var s=function(){return e.apply(r,i)};clearTimeout(t),t=setTimeout(s,n)}}function ll(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,o){return t[r]&&t[r]===e[r]&&(n=o),n})),n>-1?t[n]=e:t.push(e)})),t):n}function ul(e){return(ul="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function cl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pl(e,t,n){return t&&dl(e.prototype,t),n&&dl(e,n),e}function fl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ml(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 hl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ml(Object(n),!0).forEach((function(t){fl(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ml(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function gl(e,t){return(gl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function yl(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function vl(e,t,n){return(vl=yl()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&gl(o,n.prototype),o}).apply(null,arguments)}function bl(e){return function(e){if(Array.isArray(e))return ql(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||xl(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 xl(e,t){if(e){if("string"==typeof e)return ql(e,t);var n=Object.prototype.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)?ql(e,t):void 0}}function ql(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Dl=Object.prototype.hasOwnProperty,Cl=Object.prototype.toString,wl=Object.defineProperty,Sl=Object.getOwnPropertyDescriptor,Ml=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Cl.call(e)},El=function(e){if(!e||"[object Object]"!==Cl.call(e))return!1;var t,n=Dl.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Dl.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||Dl.call(e,t)},Il=function(e,t){wl&&"__proto__"===t.name?wl(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Al=function(e,t){if("__proto__"===t){if(!Dl.call(e,t))return;if(Sl)return Sl(e,t).value}return e[t]},kl=function e(){var t,n,r,o,i,a,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(n in t)r=Al(s,n),s!==(o=Al(t,n))&&(c&&o&&(El(o)||(i=Ml(o)))?(i?(i=!1,a=r&&Ml(r)?r:[]):a=r&&El(r)?r:{},Il(s,{name:n,newValue:e(c,a,o)})):void 0!==o&&Il(s,{name:n,newValue:o}));return s};function Tl(e,t,n){if(!e)return-1;var r=n.cache,o=e.origin?e.origin():null;o&&(e=o);var i=r.fields.indexOf(e),a=-1,s=-1;if(-1===i)for(var l=0;l<r.wrappedFields.length;l++)if(s=r.wrappedFields[l].attrDims.map((function(e){return e.instance})).indexOf(e),a=r.wrappedFields[l].attrExps.map((function(e){return e.instance})).indexOf(e),-1!==s||-1!==a){i=l;break}return(i-=t.qArea.qLeft)<0||i>=t.qArea.qWidth?-1:s>=0?function(e){return e[i].qAttrDims.qValues[s]}:a>=0?function(e){return e[i].qAttrExps.qValues[a]}:function(e){return e[i]}}function Ll(e,t,n){var r=n.key,o={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return o.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(o.value),e.field&&(o.source={key:r,field:e.field.key()}),o}function Ol(e){var t=e.cache,n=e.f,r=e.mainCell,o=e.p;e.prop;var i=e.page,a=e.rowIdx,s=e.row,l=e.sourceKey,u=e.target,c=e.targetProp,d=r;if(o.field&&o.field!==n){var p=Tl(o.field,i,{cache:t});if(-1===p)return;d=kl({qRow:a},p(s))}u[c]=Ll(o,d,{key:l})}function Pl(e,t,n,r){for(var o=Array.isArray(e)?e:[e],i=[],a=0;a<o.length;a++)if(void 0!==o[a].field){for(var s=t.raw(),l=t.key(),u="object"===ul(o[a].field)?o[a].field:t.field(o[a].field),c=r.normalizeConfig(o[a],t),d=c.props,p=c.main,f=Object.keys(d),m=!!o[a].trackBy,h=ul(o[a].trackBy),g={},y=[],v=[],b=0;b<s.qDataPages.length;b++){var x=Tl(u,s.qDataPages[b],{cache:n});if(-1!==x)for(var q=0;q<s.qDataPages[b].qMatrix.length;q++){var D=s.qDataPages[b].qArea.qTop+q,C=kl({qRow:D},x(s.qDataPages[b].qMatrix[q])),w=Ll(p,C,{key:l});if(!p.filter||p.filter(C)){for(var S=0;S<f.length;S++){var M=d[f[S]],E=M.fields||[M];M.fields&&(w[f[S]]=[]);for(var I=0;I<E.length;I++)Ol({cache:n,f:u,mainCell:C,p:E[I],prop:f[S],props:d,page:s.qDataPages[b],rowIdx:D,row:s.qDataPages[b].qMatrix[q],sourceKey:l,target:M.fields?w[f[S]]:w,targetProp:M.fields?I:f[S]});if(M.fields){var A=w[f[S]].map((function(e){return e.value})),k=w[f[S]].map((function(e){return e.label}));w[f[S]]={value:"function"==typeof M.value?M.value(A):void 0!==M.value?M.value:A,label:"function"==typeof M.label?M.label(k):void 0!==M.label?String(M.label):String(w[f[S]].value)}}}m&&r.track({cfg:o[a],itemData:C,obj:w,target:y,tracker:g,trackType:h}),v.push(w)}}}m?i.push.apply(i,bl(r.collect(y,{main:p,propsArr:f,props:d}))):i.push.apply(i,v)}return i}function Nl(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 Rl(e,t){var n,r,o,i,a,s=new _l(e),l=+e.value&&(s.value=e.value),u=[s];for(null==t&&(t=Fl);n=u.pop();)if(l&&(n.value=+n.data.value),(o=t(n.data))&&(a=o.length))for(n.children=new Array(a),i=a-1;i>=0;--i)u.push(r=n.children[i]=new _l(o[i])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Hl)}function Fl(e){return e.children}function jl(e){e.data=e.data.data}function Hl(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function _l(e){this.data=e,this.depth=this.height=0,this.parent=null}function zl(e){if("function"!=typeof e)throw new Error;return e}_l.prototype=Rl.prototype={constructor:_l,count:function(){return this.eachAfter(Nl)},each:function(e){var t,n,r,o,i=this,a=[i];do{for(t=a.reverse(),a=[];i=t.pop();)if(e(i),n=i.children)for(r=0,o=n.length;r<o;++r)a.push(n[r])}while(a.length);return this},eachAfter:function(e){for(var t,n,r,o=this,i=[o],a=[];o=i.pop();)if(a.push(o),t=o.children)for(n=0,r=t.length;n<r;++n)i.push(t[n]);for(;o=a.pop();)e(o);return this},eachBefore:function(e){for(var t,n,r=this,o=[r];r=o.pop();)if(e(r),t=r.children)for(n=t.length-1;n>=0;--n)o.push(t[n]);return this},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,o=r&&r.length;--o>=0;)n+=r[o].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(),o=null;for(e=n.pop(),t=r.pop();e===t;)o=e,e=n.pop(),t=r.pop();return o}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var o=r.length;e!==n;)r.splice(o,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(){var e=[];return this.each((function(t){e.push(t)})),e},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return Rl(this).eachBefore(jl)}};var Vl={depth:-1},Ul={};function Bl(e){return e.id}function Wl(e){return e.parentId}function $l(e,t){"/"===e.charAt(0)&&(e=e.substring(1));for(var n,r=e.split("/"),o=t,i=0;i<r.length;i++){if("*"===r[i]&&Array.isArray(o)){var a=[];n=r.slice(i+1).join("/");for(var s=0;s<o.length;s++){var l=$l(n,o[s]);Array.isArray(l)?a.push.apply(a,bl(l)):a.push(l)}return a}if(!r[i]&&Array.isArray(o)){var u=new Array(o.length);n=r.slice(i+1).join("/");for(var c=0;c<o.length;c++)u[c]=$l(n,o[c]);return u}r[i]in o&&(o=o[r[i]])}return o}function Yl(e,t,n){var r=[];if(!e||!e.length)return r;if(t<=0){var o=n>=0?[e[n]]:e;r.push.apply(r,bl(o))}else for(var i=0;i<e.length;i++)e[i].children&&e[i].children.length&&r.push.apply(r,bl(Yl(e[i].children,t-1,n)));return r}function Kl(e,t,n){if(e===t)return function(e){return e};if(e>t){var r=Math.max(0,Math.min(100,e-t)),o=bl(Array(r)).map(String.prototype.valueOf,"parent").join(".");return Function("node","return node.".concat(o,";"))}if(t>e){var i=Math.max(0,Math.min(100,t-e));return function(e){return Yl(e.children,i-1,n)}}return!1}function Jl(e,t){var n=t.cache;if("number"==typeof e)return n.fields[e];var r=n.allFields;if("function"==typeof e){for(var o=0;o<r.length;o++)if(e(r[o]))return r[o];return!1}if("string"==typeof e){for(var i=0;i<r.length;i++)if(r[i].key()===e||r[i].title()===e)return r[i]}else if(e&&-1!==r.indexOf(e))return e;throw Error("Field not found: ".concat(e))}var Gl=/^qDimensionInfo(?:\/(\d+))?/,Zl=/^\/?qMeasureInfo\/(\d+)/,Xl=/\/qAttrExprInfo\/(\d+)/,Ql=/\/qAttrDimInfo\/(\d+)/;function eu(e){return(e.qColumnOrder&&e.qColumnOrder.length?e.qColumnOrder:e.qDimensionInfo.map((function(e,t){return t}))).filter((function(t){return t<e.qDimensionInfo.length}))}function tu(e,t){var n=t.cube;if(!e)return-1;var r=e.origin&&e.origin()?e.origin().key():e.key(),o=!1,i=-1,a=-1,s=-1,l=-1,u=-1,c=r,d=n.qEffectiveInterColumnSortOrder,p=eu(n);return Gl.test(c)&&(o=!0,i=+Gl.exec(c)[1],c=r.replace(Gl,"")),Zl.test(c)&&("K"===n.qMode?l=+Zl.exec(c)[1]:d&&-1!==d.indexOf(-1)?(l=+Zl.exec(c)[1],u=0):u=+Zl.exec(c)[1],c=c.replace(Zl,"")),c&&(Ql.exec(c)?s=+Ql.exec(c)[1]:Xl.exec(c)&&(a=+Xl.exec(c)[1])),{fieldDepth:(o?"S"===n.qMode?p[i]:d?d.indexOf(i):i:d&&-1!==d.indexOf(-1)?d.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1))+1,pseudoMeasureIndex:l,measureIdx:u,attrDimIdx:s,attrIdx:a}}function nu(e,t){var n,r,o=Kl(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return n=t.measureIdx>=0?function(e){return e.data.qValues[t.measureIdx]}:function(e){return e.data},t.attrDimIdx>=0?r=function(e){var n;return null==e||null===(n=e.qAttrDims)||void 0===n?void 0:n.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(r=function(e){var n;return null==e||null===(n=e.qAttrExps)||void 0===n?void 0:n.qValues[t.attrIdx]}),{nodeFn:o,attrFn:r,valueFn:n}}function ru(e,t,n){var r=n.key,o={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return o.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(o.value),e.field&&(o.source={key:r,field:e.field.key()}),o}function ou(e){for(var t=e.propsArr,n=e.props,r=e.item,o=e.itemData,i=e.ret,a=e.sourceKey,s=0;s<t.length;s++){var l=n[t[s]],u=l.fields||[l],c=void 0,d=void 0;l.fields&&(c=[],d=[]);for(var p=function(e){var n=u[e],p=void 0,f=void 0,m=void 0,h=void 0,g=void 0,y=void 0;if("primitive"===n.type?(m=n.value,y=String(n.value)):("function"==typeof n.value&&(p=function(e){return n.value(e,r)}),"function"==typeof n.label&&(f=function(e){return n.label(e,r)}),n.accessor?(h=n.accessor(r),Array.isArray(h)?(g=h.map(n.valueAccessor),n.attrAccessor&&(g=g.map(n.attrAccessor)),p&&(m=g.map(p),p=null),f&&(y=g.map(f),f=null),m=n.reduce?n.reduce(m):m,y=n.reduceLabel?n.reduceLabel(y,m):String(m)):y=m=n.attrAccessor?n.attrAccessor(n.valueAccessor(h)):n.valueAccessor(h)):(m=o,y=o)),l.fields){var v=p?p(m):m;c.push(v),d.push(f&&null!=y?f(y):null!=y?y:String(v))}else{var b=p?p(m):m;i[t[s]]={value:b,label:f?f(y):null!=y?y:String(b)},n.field&&(i[t[s]].source={field:n.field.key(),key:a})}},f=0;f<u.length;f++)p(f);c&&(i[t[s]]={value:"function"==typeof l.value?l.value(c,r):c,label:"function"==typeof l.label?l.label(d,r):d})}}var iu=function(e,t,n){var r="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",o="K"===e.qMode?"qSubNodes":"qNodes",i=$l(r,e);return i&&i[0]?(t.tree=Rl(i[0],n.children||function(e){return e[o]}),t.tree):null};function au(e){for(var t=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],n=function(e){var t=e.raw().qColumnOrder,n=e.fields();return t&&t.length===n.length?t:n.map((function(e,t){return t}))}(e),r=e.fields(),o=e.fields().filter((function(e){return"dimension"===e.type()})).map((function(e){return n.indexOf(r.indexOf(e))})),i=e.fields().filter((function(e){return"measure"===e.type()})).map((function(e){return n.indexOf(r.indexOf(e))})),a={__root:{__id:"__root",qValues:[]}},s=0;s<t.length;s++){for(var l=t[s],u="__root",c=!1,d=0;d<o.length;d++){var p=l[o[d]],f="".concat(u,"__").concat(p.qText);a[f]||(a[f]=hl({__id:f,__parent:u,qValues:[]},p),c=!0),u=f}if(c)for(var m=0;m<i.length;m++){var h=l[i[m]];a[u].qValues.push(h)}}var g=Object.keys(a).map((function(e){return a[e]}));return function(){var e=Bl,t=Wl;function n(n){var r,o,i,a,s,l,u,c=n.length,d=new Array(c),p={};for(o=0;o<c;++o)r=n[o],s=d[o]=new _l(r),null!=(l=e(r,o,n))&&(l+="")&&(p[u="$"+(s.id=l)]=u in p?Ul:s);for(o=0;o<c;++o)if(s=d[o],null!=(l=t(n[o],o,n))&&(l+="")){if(!(a=p["$"+l]))throw new Error("missing: "+l);if(a===Ul)throw new Error("ambiguous: "+l);a.children?a.children.push(s):a.children=[s],s.parent=a}else{if(i)throw new Error("multiple roots");i=s}if(!i)throw new Error("no root");if(i.parent=Vl,i.eachBefore((function(e){e.depth=e.parent.depth+1,--c})).eachBefore(Hl),i.parent=null,c>0)throw new Error("cycle");return i}return n.id=function(t){return arguments.length?(e=zl(t),n):e},n.parentId=function(e){return arguments.length?(t=zl(e),n):t},n}().id((function(e){return e.__id})).parentId((function(e){return e.__parent}))(g)}var su=function(e){for(var t=e.propsArr,n=e.props,r=e.cube,o=e.cache,i=e.itemDepthObject,a=e.f,s=0;s<t.length;s++)for(var l=n[t[s]],u=l.fields?l.fields:[l],c=0;c<u.length;c++){var d=u[c];if(d.field!==a){var p=nu(i,tu(d.field,{cube:r,cache:o}));d.accessor=p.nodeFn,d.valueAccessor=p.valueFn,d.attrAccessor=p.attrFn}}};function lu(){var 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,o=t.raw(),i=t.key(),a="S"===o.qMode?au(t):iu(o,n,e);if(!a)return null;for(var s=a.height,l=[],u=0;u<=s;u++){var c=null;if(u>0)if("S"===o.qMode){var d=eu(o),p=d[u-1];c=n.fields[p]}else{var f=o.qEffectiveInterColumnSortOrder[u-1];u>o.qEffectiveInterColumnSortOrder.length&&(f=o.qDimensionInfo.length),c=n.fields[f]}var m=r.normalizeConfig(hl(hl({},e),{},{field:c?c.key():void 0}),t),h=m.props,g=m.main,y=Object.keys(h);l[u]={propsArr:y,props:h,main:g};var v=c?tu(c,{cube:o,cache:n}):{fieldDepth:0};su({propsArr:y,props:h,cube:o,cache:n,itemDepthObject:v,f:c})}for(var b=a.copy(),x=b.descendants(),q=a.descendants(),D=0;D<q.length;D++){var C=l[q[D].depth].propsArr,w=l[q[D].depth].props,S=l[q[D].depth].main,M=x[D],E=M.data,I=ru(S,E,{key:i});ou({propsArr:C,props:w,item:M,itemData:E,ret:I,sourceKey:i,isTree:!0}),q[D].data=I}return a}function uu(e,t,n,r){for(var o=Array.isArray(e)?e:[e],i=[],a=0;a<o.length;a++)if(void 0!==o[a].field){var s=t.raw(),l=t.key();if(!iu(s,n,e))continue;var u="object"===ul(o[a].field)?o[a].field:t.field(o[a].field),c=r.normalizeConfig(o[a],t),d=c.props,p=c.main,f=Object.keys(d),m=tu(u,{cube:s,cache:n}),h=nu({fieldDepth:0},m),g=h.nodeFn,y=h.attrFn,v=h.valueFn;su({propsArr:f,props:d,cube:s,cache:n,itemDepthObject:m,f:u});for(var b=!!o[a].trackBy,x=ul(o[a].trackBy),q={},D=[],C=g(n.tree),w=[],S=0;S<C.length;S++){var M=C[S],E=y?y(v(M)):v(M);if(!p.filter||p.filter(E)){var I=ru(p,E,{key:l});ou({propsArr:f,props:d,item:M,itemData:E,ret:I,sourceKey:l}),b&&r.track({cfg:o[a],itemData:E,obj:I,target:D,tracker:q,trackType:x}),w.push(I)}}b?i.push.apply(i,bl(r.collect(D,{main:p,propsArr:f,props:d}))):i.push.apply(i,w)}return i}var cu,du=(function(e){
17
17
  /*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
18
- e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,o,i,a,s,l,u,c,p,d=e.length,f=e.search(/[0-9\-\+#]/),m=f>0?e.substring(0,f):"",h=e.split("").reverse().join(""),g=h.search(/[0-9\-\+#]/),y=d-g,v=e.substring(y,y+1),b=y+("."===v||","===v?1:0),x=g>0?e.substring(b,d):"";if(n=(t="-"===(e=e.substring(f,b)).charAt(0)?-t:+t)<0?t=-t:0,o=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",i=r&&r[1]&&r[0]||",",e=e.split(o),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(u=t.split("."))[1]||u[1]&&u[1].length<=s)&&(t=(+t).toFixed(s+1)),c=e[0].split(i),e[0]=c.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;u[0].length<e[0].length-a;)u[0]="0"+u[0];else 0==+u[0]&&(u[0]="");if((t=t.split("."))[0]=u[0],l=c[1]&&c[c.length-1].length){for(h="",y=(p=t[0]).length%l,d=p.length,b=0;b<d;b++)h+=p.charAt(b),!((b-y+1)%l)&&b<d-l&&(h+=i);t[0]=h}return t[1]=e[1]&&t[1]?o+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),m+(n?"-":"")+r+x}}(du={exports:{}}),du.exports);function mu(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}var hu={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"},gu=/%$/,yu=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,vu=/^\(oct\)/i,bu=/^\(dec\)/i,xu=/^\(hex\)/i,qu=/^\(bin\)/i,Du=/^\(rom\)/i,Cu=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,wu=/#|0/g;function Su(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 Mu(e,t,n){var r=mu(e);return n?r:new RegExp(r||"",t)}function Eu(e,t,n){var r,o,i,a,s,l,u,c,p,d,f,m=e.pattern;m.indexOf("A")>=0&&(m=m.replace("A",""),e.abbreviate=!0),d=t,(f=n)&&(f=mu(f)),d&&(d=mu(d)),p=new RegExp("(?:[#0]+".concat(d,")?[#0]+(?:").concat(f,"[#0]+)?")),a=(i=(i=m.match(p))?i[0]:"")?m.substr(0,m.indexOf(i)):m,s=i?m.substring(m.indexOf(i)+i.length):"",i||(i=m?"#":"##########"),t&&t===n&&(o=(r=i.split(n)).pop(),i=r.join("")+n+o,t=""),l=t,t=/,/.test(n)?"¤":",",l&&(i=i.replace(Mu(l,"g"),t)),u=n,n=".",u&&(i=i.replace(Mu(u,"g"),n)),c=(c=i.match(/#/g))?c.length:0;var h,g=m.split(u);g[1]&&(h=g[1].match(wu)),e.prefix=a||"",e.postfix=s||"",e.pattern=m,e.maxPrecision=h?h.length:2,e.percentage=gu.test(m),e.numericPattern=i||"",e.numericRegex=new RegExp("".concat(Mu(t,null,!0),"|").concat(Mu(n,null,!0)),"g"),e.groupTemp=l,e.decTemp=u,e.t=t,e.d=n,e.temp=c}var Iu=function(){function e(t,n,r,o,i){dl(this,e),this.localeInfo=t,this.pattern=n,this.thousandDelimiter=r||",",this.decimalDelimiter=o||".",this.type=i||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return hu;var n={};return e.qNumericalAbbreviation.split(t).forEach((function(e){var t=e.split(":");2===t.length&&(n[t[0]]=t[1])})),n}(t,this.patternSeparator),this.prepare()}return ml(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t,n,r){return this.prepare(t,n,r),this.formatValue(e)}},{key:"prepare",value:function(e,t,n){var r;void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),e?(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],Cu.test(e[0])&&(r.positive.isFunctional=!0),e[1]?Cu.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?Cu.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1,r.positive.isFunctional||Eu(r.positive,t,n),r.negative&&!r.negative.isFunctional&&Eu(r.negative,t,n),r.zero&&!r.zero.isFunctional&&Eu(r.zero,t,n)):this._prepared={pattern:!1}}},{key:"formatValue",value:function(e){var t,n,r,o,i,a,s,l,u,c=this._prepared,p="",d="",f=e;if(isNaN(e))return"".concat(f);if(e=+e,!1===c.pattern)return e.toString();if(0===e&&c.zero)return(c=c.zero).pattern;if(e<0&&c.negative?(c=c.negative,e=-e):c=c.positive,i=c.d,a=c.t,c.isFunctional)e=function(e,t,n){var r;return yu.test(t)?e=Su(e,Number(/\d{2}/.exec(t)[0]),t,n):vu.test(t)?e=Su(e,8,t,n):bu.test(t)?e=Su(e,10,t,n):xu.test(t)?e=Su(e,16,t,n):qu.test(t)?e=Su(e,2,t,n):Du.test(t)&&(r="",e<0&&(r="-",e=-e),0===(e=Math.floor(e))?e="0":e<=5e5?(e=function(e,t){for(var n,r="",o=Number(String(e).slice(-3)),i=(e-o)/1e3,a=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),s=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();o>0;)for(n=0;n<a.length;n++)if(a[n]<=o){r+=s[n],o-=a[n];break}for(n=0;n<i;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,i);else{if(c.percentage&&(e*=100),c.abbreviate){var m,h,g=Object.keys(this.abbreviations).map((function(e){return parseInt(e,10)})).sort((function(e,t){return e-t})),y=g[0];for(s=0,n=Number(Number(e).toExponential().split("e")[1]);y<=n&&s<g.length;)y=g[++s];s>0&&(m=g[s-1]),m&&n>0&&m>0?h=m:(n<0&&m<0||!m)&&(y<0&&y-n<=c.maxPrecision?h=y:m<=n&&!(y>0&&-n<=c.maxPrecision)&&(h=m)),h&&(p=this.abbreviations[h],e/=Math.pow(10,h))}if(r=Math.abs(e),t=c.temp,u=(l=c.numericPattern).split(i)[1],"I"===this.type&&(e=Math.round(e)),o=e,u||"#"!==l.slice(-1)[0])if(r>=1e15||r>0&&r<=1e-14)e=r?r.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{var v=Number(e.toFixed(Math.min(20,u?u.length:0)).split(".")[0]),b=l.split(i)[0];if(e=fu(b+=i,v)||"0",u){var x=Math.max(0,Math.min(14,u.length)),q=u.replace(/#+$/,"").length,D=("I"===this.type?0:r%1).toFixed(x).slice(2).replace(/0+$/,"");for(s=D.length;s<q;s++)D+="0";D&&(e+=i+D)}else 0===v&&(o=0)}else if(r>=Math.pow(10,t)||r<1||r<1e-4)0===e?e="0":r<1e-4||r>=1e20?(e=(e=o.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(".",i));else{for(l+=i,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(r)/Math.log(10)))),s=0;s<t;s++)l+="#";e=fu(l,e)}e=e.replace(c.numericRegex,(function(e){return e===a?c.groupTemp:e===i?c.decTemp:""})),o<0&&!/^-/.test(e)&&(e="-".concat(e))}return c.prefix+e+d+p+c.postfix}}],[{key:"getStaticFormatter",value:function(){return{prepare:function(){},formatValue:function(e){return"".concat(e)}}}}]),e}();function Au(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.size,i=void 0===o?5e3:o,a=r.multipleArguments,s=void 0!==a&&a,l=r.toKey,u=void 0===l?function(e){return e}:l,c=Object.create(null),p=Object.create(null),d=0,f=0;return(t=s?function(){return n=u.apply(void 0,arguments),t.has(n)?t.get(n):t.set(n,e.apply(void 0,arguments))}:function(r){return n=u(r),t.has(n)?t.get(n):t.set(n,e(r))}).set=function(e,t){return d>=i&&(delete c[p[f]],delete p[f],d--,f++),c[e]=t,p[d]=e,d++,t},t.get=function(e){return c[e]},t.has=function(e){return e in c},t.clear=function(){c=Object.create(null),p=Object.create(null),d=0,f=0},t.size=function(){return d},t}function ku(e,t,n,r,o){var i=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return xl(Iu,t)}(o,e,t,n,r),a=Au(i.formatValue.bind(i),{toKey:function(e){return isNaN(e)?e:+e}});function s(e){return a(e)}return s.format=function(e,t,n,r){return a.clear(),i.format(t,e,n,r)},s.pattern=function(e){return e&&(a.clear(),i.pattern=e,i.prepare()),i.pattern},s}var Tu=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Lu=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Ou=["January","February","March","April","May","June","July","August","September","October","November","December"],Pu=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Nu(e,t){for(var n=e.length;n<t;n++)e="0".concat(e);return e}function Ru(e){var t=e.toString().split(".");return t[1]?t=Number("0.".concat(t[1])):0}var Fu=function(){function e(t,n,r){dl(this,e);var o,i=t||{};i.qCalendarStrings||(i.qCalendarStrings={qLongDayNames:Tu,qDayNames:Lu,qLongMonthNames:Ou,qMonthNames:Pu}),this.localeInfo=i,this.locale_days=i.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=i.qCalendarStrings.qDayNames.slice(),this.locale_months=i.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=i.qCalendarStrings.qMonthNames.slice(),n||(n=(hl(o={},"T",i.qTimeFmt||"hh:mm:ss"),hl(o,"D",i.qDateFmt||"YYYY-MM-DD"),hl(o,"TS",i.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"),o)[r]),this.pattern=n}return ml(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");var n,r,o,i,a,s=/t+/gi.test(t);e instanceof Date?(o=s,i=(r=e).getUTCHours(),o&&((i%=12)||(i=12)),(a=r.getUTCDay()-1)<0&&(a=6),n={year:r.getUTCFullYear(),month:r.getUTCMonth(),day:a,date:r.getUTCDate(),h:i,m:r.getUTCMinutes(),s:r.getUTCSeconds(),f:r.getUTCMilliseconds(),t:r.getUTCHours()>=12?"pm":"am"}):(e<0&&(e=-e,t="-".concat(t)),n=function(e,t){var n,r=function(e){var t=e,n=24*Ru(t),r=60*Ru(n),o=60*Ru(r),i=1e3*Ru(o);return{d:Math.floor(t),h:Math.floor(n),m:Math.floor(r),s:Math.floor(o),f:Math.round(i)}}(e),o=r.d,i=r.h,a=r.m,s=r.s,l=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)||(i+=24*o),/h+/gi.test(t)||(a+=60*i),/m+/gi.test(t)||(s+=60*a),/w+/gi.test(t)&&(u=n?n.getDay()-1:0)<0&&(u=6);var c="";return n&&(c=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:u,date:o,h:i,m:a,s:s,f:l,t:c}}(e,t));var l=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:Nu("".concat(t.year).slice(-2),2),YYY:Nu("".concat(t.year).slice(-3),3),def:function(e){return Nu("".concat(t.year),e.length)}},"M+":{M:t.month+1,MM:Nu("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:Nu("".concat(t.day),2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:function(e){return Nu("".concat(t.date),e.length)}},"h+|H+":{h:t.h,def:function(e){return Nu("".concat(t.h),e.length)}},"m+":{m:t.m,def:function(e){return Nu("".concat(t.m),e.length)}},"s+|S+":{s:t.s,def:function(e){return Nu("".concat(t.s),e.length)}},"f+|F+":{def:function(e){var n="".concat(t.f),r=e.length-n.length;if(r>0)for(var o=0;o<r;o++)n+="0";else r<0&&(n=n.slice(0,e.length));return n}},"t{1,2}|T{1,2}":{def:function(e){var n=t.t;return e[0].toUpperCase()===e[0]&&(n=n.toUpperCase()),n.slice(0,e.length)}}}}(this,n),u=[];for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&u.push(c);var p=new RegExp(u.join("|"),"g");return t.replace(p,(function(e){var t,n,r;for(n in l)if(Object.prototype.hasOwnProperty.call(l,n)&&(t=new RegExp(n)).test(e))break;if(!t)return"";for(var o in l[n])if(o===e||o.toLowerCase()===e){void 0===(r=l[n][o])&&(r=l[n][o.toLowerCase()]);break}return void 0===r&&(r=l[n].def),"function"==typeof r&&(r=r(e)),r}))}}]),e}();function ju(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return xl(Fu,t)}function Hu(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}function _u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=ju(n,e,t),o=Au(r.format.bind(r),{toKey:function(e){return"object"===pl(e)&&"function"==typeof e.getTime?e.getTime():e}});function i(e){return"IV"!==t?Hu(e):e}function a(e){return e=i(e),o(e)}return a.format=function(e,t){return o.clear(),t=i(t),r.format(t,e)},a.locale=function(n){return r=ju(n,e,t),o=Au(r.format.bind(r),{toKey:function(e){return"object"===pl(e)?e.getTime():e}}),this},a.qtype=function(e){return void 0!==e&&(t=e,o.clear()),t},a}function zu(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return _u(e.qNumFormat.qFmt,e.qNumFormat.qType,t);var n="#",r=t&&void 0!==t.qThousandSep?t.qThousandSep:",",o=t&&void 0!==t.qDecimalSep?t.qDecimalSep:".",i="U",a=e&&!!e.qIsAutoFormat;return e&&e.qNumFormat?(n=e.qNumFormat.qFmt||n,r=e.qNumFormat.qThou||r,o=e.qNumFormat.qDec||o,i=e.qNumFormat.qType||i,a=a&&-1===["M"].indexOf(e.qNumFormat.qType)):a=!0,(a||"U"===i)&&(n="#".concat(o,"##A"),i="U"),ku(n,r,o,i,t)}function Vu(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.meta,r=t.id,o=t.key,i=t.localeInfo,a=t.fieldExtractor,s=t.value,l=t.type,u=t.sourceField,c=s||("dimension"===l?function(e){return e.qElemNo}:function(e){return e.qValue}),p=function(e){return e.qText||""},d="dimension"===l?"first":"avg",f=zu(n,i),m="dimension"===l?"first":function(e,t){return f(t)},h={id:function(){return r},key:function(){return o},raw:function(){return n},title:function(){return n.qFallbackTitle||n.label},type:function(){return l},origin:function(){return u},items:function(){return e||(e=a(h)),e},min:function(){return n.qMin},max:function(){return n.qMax},value:c,label:p,reduce:d,reduceLabel:m,formatter:function(){return f},tags:function(){return n.qTags}};return h}function Uu(e,t,n,r,o){return(t[e]||[]).map((function(t,i){var a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(i),s={instance:Vu(Ll({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},o))};return s.attrDims=Uu("qAttrDimInfo",t,n,a,Ll({},o,{value:function(e){return e.qElemNo},type:"dimension"})),s.attrExps=Uu("qAttrExprInfo",t,n,a,Ll({},o,{value:function(e){return e.qNum},type:"measure"})),s.measures=Uu("qMeasureInfo",t,n,a,Ll({},o,{value:function(e){return e.qValue},type:"measure"})),s}))}function Bu(){var e,t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=r.key,i=r.data,a=r.config,s=void 0===a?{}:a,l={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},u=i;if(!u)throw new Error('Missing "data" input');if(!u.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');var c=Bu.util,p={cache:l,cube:u,localeInfo:s.localeInfo,fieldExtractor:null,pages:null,hierarchy:function(){return null},virtualFields:s.virtualFields},d={key:function(){return o},raw:function(){return u},field:function(e){return Zl(e,p)},fields:function(){return l.fields.slice()},extract:function(e){return p.extractor(e,d,l,c)},hierarchy:function(e){return p.hierarchy(e,d,l,c)},_cache:function(){return l}};"K"===u.qMode||"T"===u.qMode||!u.qMode&&u.qNodesOnDim?(p.extractor=pu,p.hierarchy=cu,p.pages="K"===u.qMode?u.qStackedDataPages:u.qTreeDataPages):"S"===u.qMode?(p.extractor=Rl,p.pages=u.qDataPages,p.hierarchy=cu):p.extractor=function(){return[]},p.fieldExtractor=function(e){return p.extractor({field:e},d,l,c)};var f="S"===u.qMode?function(e){return e.qElemNumber}:void 0,m="S"===u.qMode?function(e){return e.qNum}:void 0;(e=l.wrappedFields).push.apply(e,ql(Uu("qDimensionInfo",u,o,"",Ll({},p,{value:f,type:"dimension"})))),(t=l.wrappedFields).push.apply(t,ql(Uu("qMeasureInfo",u,o,"",Ll({},p,{value:m,type:"measure"})))),l.fields=l.wrappedFields.map((function(e){return e.instance}));var h=function e(t){t.forEach((function(t){l.allFields.push(t.instance),e(t.measures),e(t.attrDims),e(t.attrExps)}))};return h(l.wrappedFields),(s.virtualFields||[]).forEach((function(e){var t=d.field(e.from),n=Vu(yl({meta:t.raw(),id:"".concat(o,"/").concat(e.key),sourceField:t,fieldExtractor:function(e){return p.extractor({field:e},d,l,c)},key:e.key,type:t.type(),localeInfo:p.localeInfo,value:t.value},e.override||{}));l.virtualFields.push(n)})),(n=l.allFields).push.apply(n,ql(l.virtualFields)),d}var Wu=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],$u=/\/qDimensionInfo(?:\/(\d+))?/,Yu=/\/qMeasureInfo\/(\d+)/,Ku=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,Ju=/\/qAttrExprInfo\/(\d+)/,Gu=/\/?qHyperCube/,Zu=/\/?qTreeData/,Xu=function(e){return"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14))},Qu=function(e){return"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13))};function ec(e,t){var n=e,r=-1,o=-1,i="",a=function(e){return e};Gu.test(e)?(i="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=Xu):Zu.test(e)&&(i="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=Qu);var s=!0;if($u.test(e)&&(r=+$u.exec(e)[1]),Yu.test(e)&&(o=+Yu.exec(e)[1]),Ku.test(e)){o=-1,r=0;var l=+Ku.exec(n)[2];isNaN(l)||(r=l,n=n.replace(/\/\d+$/,"")),s=!1}if(Ju.test(e)){var u=o;if(t){o=0;var c=Kl(i,t);o+=(c.qMeasureInfo||[]).length,r>-1?(o=c.qDimensionInfo.slice(0,r).reduce((function(e,t){return e+t.qAttrExprInfo.length}),o),r=-1):(o=c.qDimensionInfo.reduce((function(e,t){return e+t.qAttrExprInfo.length}),o),o=c.qMeasureInfo.slice(0,u).reduce((function(e,t){return e+t.qAttrExprInfo.length}),o)),o+=+Ju.exec(n)[1]}else r>-1?(r=-1,o=+Ju.exec(n)[1]):o+=+Ju.exec(n)[1]+1}return Wu.forEach((function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(e,t)||Dl(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.")}()}(e,2),r=t[0],o=t[1];n=n.replace(r,o)})),s&&(n=a(n)),n&&"/"!==n[0]&&(n="/".concat(n)),{measureIdx:o,dimensionIdx:r,path:n}}function tc(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,o=n.byCells,i=n.primarySource,a=[],s={},l=e.isActive(),u=!1;return e.brushes().forEach((function(e){var t=ec(e.id,r);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){var n=e.brush.ranges();n.length&&(u=!0,s.multiRangeSelectTreeDataValues||(s.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),n.forEach((function(e){return s.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){var l=e.brush.ranges();l.length&&(u=!0,s.rangeSelectHyperCubeValues||(s.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),l.forEach((function(e){return s.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}if("range"===e.type&&t.dimensionIdx>-1){var c=e.brush.ranges();c.length&&(u=!0,s.selectHyperCubeContinuousRange||(s.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),c.forEach((function(e){return s.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(o)if(r&&r.qHyperCube&&("P"===r.qHyperCube.qMode||"T"===r.qHyperCube.qMode||"K"===r.qHyperCube.qMode)){var p=r.qHyperCube,d=p.qNoOfLeftDims,f=p.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(s.selectPivotCells||(s.selectPivotCells={path:t.path,cells:[]}),e.id===i||!i){var m=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)}));(0===d||f>=d)&&d>-1?m.forEach((function(e){s.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:f-d})})):m.forEach((function(e){s.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})})),u=!!s.selectPivotCells.cells.length}}else s.selectHyperCubeCells||(s.selectHyperCubeCells={path:t.path,cols:[]}),s.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==i&&(i||s.selectHyperCubeCells.values)||(s.selectHyperCubeCells.values=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)})),u=!!s.selectHyperCubeCells.values.length);else{var h=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)}));u=!!h.length,a.push({params:[t.path,t.dimensionIdx,h,!1],method:"selectHyperCubeValues"})}}})),!u&&l?[{method:"resetMadeSelections",params:[]}]:(s.rangeSelectHyperCubeValues&&a.push({method:"rangeSelectHyperCubeValues",params:[s.rangeSelectHyperCubeValues.path,s.rangeSelectHyperCubeValues.ranges,[],null===(t=n.orMode)||void 0===t||t]}),s.selectHyperCubeContinuousRange&&a.push({method:"selectHyperCubeContinuousRange",params:[s.selectHyperCubeContinuousRange.path,s.selectHyperCubeContinuousRange.ranges]}),s.selectHyperCubeCells&&a.push({method:"selectHyperCubeCells",params:[s.selectHyperCubeCells.path,s.selectHyperCubeCells.values,s.selectHyperCubeCells.cols]}),s.selectPivotCells&&a.push({method:"selectPivotCells",params:[s.selectPivotCells.path,s.selectPivotCells.cells]}),s.multiRangeSelectTreeDataValues&&a.push({method:"multiRangeSelectTreeDataValues",params:[s.multiRangeSelectTreeDataValues.path,s.multiRangeSelectTreeDataValues.ranges]}),a)}function nc(e){Bu.util=e.data("matrix").util,e.data("q",Bu),e.formatter("q-number",ku),e.formatter("q-time",_u)}function rc(e){var t=al(e.layout||{},e.path.split("/").join("."));if(!t)return!1;var n=t.qIsOneAndOnlyOne;return void 0!==n&&n}function oc(){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"===ca(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 ic(e){var t=e.brush,n=e.colorField,r=e.legendAlias,o=e.useLegendCube,i=void 0!==o&&o;!n||/qAttrDimInfo/.test(n)?(t.removeKeyAlias("attrDim/qDimensionInfo/0"),r&&t.removeKeyAlias(r),t.addKeyAlias("attrDim/qDimensionInfo/0","qHyperCube/".concat(n))):i&&t.addKeyAlias(r,"qHyperCube/".concat(n))}nc.qBrushHelper=tc,nc.selections=tc;function ac(e){var t=e.brush,n=e.getConfig;return{interceptor:function(e){var r=t.brushes(),o=n(),i=o.allowSimultaneous,a=o.layout,s=void 0===a?{}:a;r.forEach((function(n){var r,o,a;("range"===n.type||null!==(r=e[0])&&void 0!==r&&r.key&&(null===(o=e[0])||void 0===o?void 0:o.key)!==n.id&&0!==i.indexOf(null===(a=e[0])||void 0===a?void 0:a.key))&&t.clear([])}));var l=e.filter((function(e){return-2!==e.value}));return l.length>1?function(e){var t=e.layout,n=void 0===t?{}:t,r=e.values,o=void 0===r?[]:r;if(null==o||!o.length)return[];var i=Array.from(new Set(o.map((function(e){return e.key})))),a=[];return i.forEach((function(e){var t=rc({layout:n,path:e}),r=o.filter((function(t){return t.key===e})),i=t?[r.pop()]:r;a.push.apply(a,va(i))})),a.filter(Boolean)}({layout:s,values:l}):l},rangeInterceptor:function(e){var r=t.brushes(),o=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||o.includes(n.id)&&o.includes(e[0].key);"range"!==n.type||r||t.clear([])})),e)}}}var sc=[],lc=0,uc=function(e){var t=sc.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()})))},cc=function(){document.addEventListener("keyup",uc)},pc=function(){document.removeEventListener("keyup",uc)},dc=function(e,t){Object.keys(t).forEach((function(n){e.on(n,t[n])}))},fc=function(e,t){Object.keys(t).forEach((function(n){e.removeListener(n,t[n])}))};function mc(e,t,n){if(t&&void 0!==n&&"selectHyperCubeContinuousRange"===e.method){var r=e.params;if(r&&r[1]&&r[1][0]){var o=r[1][0],i=o.qDimIx,a=o.qRange;"undefined"!==i&&a&&!1===a.qMaxInclEq&&a.qMax>=n&&(a.qMaxInclEq=!0)}}}function hc(e){var t=e.chart,n=e.document,r=e.selectionInfo,o=e.eventName,i=e.componentName,a=e.brushName,s=void 0===a?"selection":a,l=e.emit,u=void 0===l?"rangeClear":l,c=r.event===o,p=n.querySelector("[data-key='".concat(i,"-edge-0']"));if(c||!p)return!1;var d=t.component(i);return!!d&&(d.emit(u),"string"==typeof s&&t.brush(s).clear(),d)}function gc(e){var t=e.selectionInfo,n=e.chart,r=e.document,o=e.eventName,i=void 0===o?"discreteRange":o,a=e.componentName,s=void 0===a?"discrete-range-brush":a,l=e.cleared;return hc({selectionInfo:t,chart:n,document:r,eventName:void 0!==l&&l?void 0:i,componentName:s,emit:"areaClear",brushName:e.brushName})}function yc(e){var t=e.selectionInfo,n=e.chart,r=e.document,o=e.eventName,i=void 0===o?"continuousRange":o,a=e.componentName,s=void 0===a?"continuous-range-brush":a,l=e.cleared;return hc({selectionInfo:t,chart:n,document:r,eventName:void 0!==l&&l?void 0:i,componentName:s,brushName:e.brushName})}function vc(e){var t=e.selectionInfo,n=e.chart,r=e.document,o=e.componentName,i=void 0===o?"minor-range-brush":o,a=e.eventName,s=void 0===a?"minorRange":a,l=e.cleared,u=void 0!==l&&l,c=e.brushName,p=hc({selectionInfo:t,chart:n,document:r,eventName:u?void 0:s,componentName:i,brushName:void 0!==c&&c});if(p){var d=p.settings.settings,f=d.scale,m=d.brush,h=n.scale(f).data().fields.map((function(e){return e.id()})),g=n.brush(m),y=g.brushes().filter((function(e){return"range"===e.type&&h.some((function(t){return t===e.id}))}));g&&y.length&&y.forEach((function(e){g.removeRanges(e.brush.ranges().map((function(t){return{key:e.id,range:t}})))}))}}function bc(e){var t=e.selectionInfo,n=e.chart,r=e.document,o=e.selections,i=e.eventName,a=void 0===i?"xAxis":i,s=e.cleared;hc({selectionInfo:t,chart:n,document:r,eventName:void 0!==s&&s?void 0:a,componentName:"".concat(a,"-range-brush"),emit:"areaClear",brushName:!1})&&o.clear()}function xc(e){var t=e.chart,n=e.selectionInfo,r=e.selections,o=e.events,i=void 0===o?["tap"]:o,a=e.brushNames,s=void 0===a?[]:a;if(n&&i.includes(n.event)){var l=n.currentComponent;n.previousComponent!==l&&(r.clear(),s.forEach((function(e){return t.brush(e).end()})))}}function qc(e){var t=e.selectionInfo,n=e.chart,r=e.document,o=e.selections,i=e.eventName,a=void 0===i?"legendRange":i,s=e.componentName,l=void 0===s?"legend-range-brush":s,u=e.cleared,c=void 0!==u&&u,p=e.brushName;hc({selectionInfo:t,chart:n,document:r,eventName:c?void 0:a,componentName:l,brushName:void 0!==p&&p})&&o.clear()}var Dc=function(e){e.chart,e.document,e.selections,e.selectionInfo;var t=ga(e,["chart","document","selections","selectionInfo"]);t.clearDiscrete(),t.clearContinuous(),t.clearMinor(),t.clearRange(),t.clearTap(),t.clearLegend()};function Cc(e){var t,n=e.lasso;null!=n&&null!==(t=n.active)&&void 0!==t&&t.call(n)&&(null==n||n.action(!1))}function wc(e){var t,n=e.chart,r=e.selectionInfo,o=e.selectionActions,i=e.actions,a=void 0===i?{}:i,s=e.selections,l=e.selectionEvents;if(!1===o||!1===l)return function(){};var u=(a||{}).lasso,c=void 0!==u&&u,p=o.reset,d=void 0===p?Cc:p,f=o.clear,m=!1!==f&&function(e){var t=e.clear,n=void 0===t?Dc:t,r=e.selections,o=e.selectionInfo,i=e.chart;return function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).cleared,t={selections:r,selectionInfo:o,chart:i,document:document,cleared:e};return n(ha({clearDiscrete:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return gc(ha(ha({},t),e))},clearContinuous:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return yc(ha(ha({},t),e))},clearMinor:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return vc(ha(ha({},t),e))},clearRange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return bc(ha(ha({},t),e))},clearTap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return xc(ha(ha({},t),e))},clearLegend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return qc(ha(ha({},t),e))}},t))}}({clear:f,selections:s,selectionInfo:r,chart:n}),h=function(e){var t=e.chart,n=e.lasso,r=e.reset,o=e.clear,i=!1,a={deactivated:function(e){r({e:e,lasso:n})},canceled:function(e){r({e:e,lasso:n}),o({e:e,chart:t,document:document})},cleared:function(e){i||(i=!0,o({e:e,chart:t,document:document,cleared:!0}),i=!1)}};return!1===r&&delete a.deactivated,!1===o&&delete a.cleared,!1===r&&!1===o&&delete a.canceled,a}({chart:n,clear:m,reset:d,lasso:c}),g={};Object.entries(h).forEach((function(e){var t=ya(e,2),n=t[0],r=t[1];g[n]=function(e,t){return t?function(n){return t({event:n,defaultFunc:e})}:e}(r,l[n])}));var y=function(e){var t=e.selectionEvents,n=e.selections,r=e.selectionInfo,o=e.clear,i=e.chart,a=e.document,s=t.start,l={selections:n,selectionInfo:r,chart:i,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,o=e.components,i=void 0===o?[]:o;(0,e.setSelectionInfo)(ha(ha({},void 0===t?{}:t),{},{event:r,components:i.map((function(e){return e.key})).filter(Boolean)})),n()}({event:t,components:n,clear:o,chart:i,selectionInfo:r,setSelectionInfo:u})}};return"function"==typeof s?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];s(ha(ha({defaultFunc:c({event:e,components:t}),setSelectionInfo:u,clear:o},l),{},{event:e,components:t}))}:function(e){c({event:e,components:arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]})()}}({selectionEvents:l,selections:s,selectionInfo:r,clear:m,chart:n,document:document});return null==a||null===(t=a.select)||void 0===t||t.on("start",y),Object.entries(g).forEach((function(e){var t=ya(e,2),n=t[0],r=t[1];null==s||s.on(n,r)})),function(){var e;null==a||null===(e=a.select)||void 0===e||e.removeListener("start",y),Object.entries(g).forEach((function(e){var t=ya(e,2),n=t[0],r=t[1];null==s||s.removeListener(n,r)}))}}var Sc=[{key:"qHyperCube/qDimensionInfo/0:numeric",includeMax:!1}];function Mc(e){var t=e.chart,n=e.actions,r=e.selections,o=e.picassoQ,i=e.config,a=i.allowSimultaneous,s=void 0!==a&&a,l=i.majorScale,u=void 0===l?void 0:l,c=i.selectionActions,p=(c=void 0===c?{}:c).clear,d=c.reset,f=i.selectionEvents,m=void 0===f?{deactivated:void 0,canceled:void 0,cleared:void 0,start:void 0}:f,h=i.brushEvents,g=void 0===h?{}:h,y=i.brushName,v=void 0===y?"selection":y,b=i.brushMaxListeners,x=void 0===b?20:b,q=i.brushRanges,D=void 0!==q&&q,C=i.interceptors,w=void 0===C?{}:C,S=i.selectionsFn,M=void 0===S?o.selections:S,E=t.brush(v);if("number"==typeof x&&E.setMaxListeners(x),D){var I=!0===D?Sc:D;E.configure({ranges:I})}var A={canSelect:!0,getIsSelectionLocked:!1,isInnerDimensionLocked:!1,lockedDimensions:[],singleSelectIndex:0,selectionInfo:{colorField:void 0,components:[],event:void 0,currentComponent:void 0,previousComponent:void 0}},k=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.selections,r=t.brush,o=t.majorScale,i=t.actions,a=t.selectionsFn,s=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).path,l=void 0===s?"/qHyperCubeDef":s;if(!n)return{layout:function(){},allowSimultaneous:function(){},release:function(){}};var u=++lc,c=null,p=[],d={};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 f=ac({brush:r,getConfig:function(){return{layout:c,allowSimultaneous:p}}}),m=f.rangeInterceptor,h=f.interceptor;r.intercept("set-ranges",m),r.intercept("toggle-ranges",m),r.intercept("toggle-values",h),r.intercept("set-values",h),r.intercept("add-values",h),r.on("start",(function(){return n.begin(l)}));var g={activate:function(){},deactivated:function(){return r.end()},cleared:function(){return r.clear()},canceled:function(){return r.end()}};dc(n,g);var y=null==o||null===(e=o.max)||void 0===e?void 0:e.call(o);return null!=i&&i.select?(i.select.on("start",(function(){var e;r.start(),"function"==typeof i.select.getBrushOptions&&(d=(e=i.select).getBrushOptions.apply(e,arguments))})),i.select.on("end",(function(){a(r,d,c).forEach((function(e){mc(e,i.select.brushSelectionIncludeMax,y),n.select(e)}))}))):r.on("update",(function(){a(r,d,c).forEach((function(e){return n.select(e)}))})),0===sc.length&&cc(),sc.push({key:u,selections:n}),{layout:function(e){c=e},allowSimultaneous:function(e){p=e},release:function(){c=null;var e=sc.indexOf(sc.filter((function(e){return e.key===u}))[0]);-1!==e&&sc.splice(e,1),sc.length||pc(),fc(n,g)}}}({brush:E,majorScale:u,actions:n,selections:r,picassoQ:o,selectionsFn:M});!function(e){var t=e.brush,n=e.interceptors,r=void 0===n?{}:n;Object.entries(r).forEach((function(e){var n=ya(e,2),r=n[0],o=n[1];(Array.isArray(o)?o:[o]).forEach((function(e){t.intercept(r,e)}))}))}({brush:E,interceptors:w});var T=function(e){var t=e.chart,n=e.selectionActions,r=e.brush,o=e.actions,i=e.selectionInfo,a=e.selections,s=e.selectionEvents,l=function(e){var t=e.brush,n=e.chart,r=e.selectionInfo,o=e.brushEvents,i=void 0===o?{}:o,a=Object.entries(i).map((function(e){var o=ya(e,2),i=o[0],a=o[1],s=function(){return a({chart:n,selectionInfo:r})};return t.on(i,s),[i,s]}));return function(){a.forEach((function(e){var n=ya(e,2),r=n[0],o=n[1];t.removeListener(r,o)}))}}({brush:r,chart:t,selectionInfo:i,brushEvents:e.brushEvents}),u=wc({chart:t,selectionInfo:i,selectionActions:n,actions:o,selections:a,selectionEvents:s}),c=function(e){var t=e.actions;if(null==t||!t.lasso)return function(){};var n=!1,r=function(e){n||"Shift"!==e.key||(t.lasso.action(!0),n=!0)},o=function(e){"Shift"===e.key&&(t.lasso.action(!1),n=!1)};return document.addEventListener("keydown",r),document.addEventListener("keyup",o),function(){document.removeEventListener("keydown",r),document.removeEventListener("keyup",o)}}({actions:o});return function(){l(),u(),c()}}({chart:t,brush:E,actions:n,selections:r,selectionInfo:A.selectionInfo,selectionActions:{clear:p,reset:d},selectionEvents:m,brushEvents:g});if(s){var L=!0===s?va(Array(15)).map((function(e,t){return"qHyperCube/qMeasureInfo/".concat(t)})):s;k.allowSimultaneous(L)}return{unbindEvents:T,state:A,picassoSelections:k,brush:E}}function Ec(e){var t=e.chart,n=e.selections,r=e.actions,o=void 0!==r&&r,i=e.config,a=void 0===i?{}:i,s=Mc({chart:t,actions:o,selections:n,picassoQ:nc,config:a}),l=s.unbindEvents,u=s.state,c=s.picassoSelections,p=s.brush,d=a.custom,f=void 0===d?{}:d,m=a.legendAlias,h=void 0===m?void 0:m,g=a.setBrushAliases,y=void 0===g?ic: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:oc(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},getSelectionInfo:function(){return u.selectionInfo},setLayout:function(e){var t=function(e){var t,n,r,o=e.selections,i=e.picassoSelections,a=e.layout,s={lockedDimensions:[],singleSelectDimensions:[]};null!=o&&null!==(t=o.isModal)&&void 0!==t&&t.call(o)&&o.confirm(),i.layout(a);var l=(null!==(n=null==a?void 0:a.qHyperCube)&&void 0!==n?n:{}).qDimensionInfo,u=void 0===l?[]:l;return s.lockedDimensions=u.map((function(e){return!!e.qLocked})),s.singleSelectDimensions=u.map((function(e,t){return rc({layout:a,path:"qHyperCube/qDimensionInfo/".concat(t)})})),s.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),s.canSelect=0===u.length||u.some((function(e){return!e.qLocked})),s.dimensionLocked=!(null===(r=u[0])||void 0===r||!r.qLocked),s}({selections:n,picassoSelections:c,layout:e});Object.assign(u,t)},setBrushAliases:function(e){var t=e.colorField,n=e.useLegendCube,r=void 0!==n&&n,o=ga(e,["colorField","useLegendCube"]),i=ha({useLegendCube:r,colorField:t,brush:p,legendAlias:h},o);y(ha(ha({},i),{},{defaultFunc:function(){return ic(i)}}))},destroy:function(){l(),c.release()},custom:ha({},f)}}var Ic={NOOP:function(){},FALSE:function(){return!1},ARRAY:function(){return[]},OBJECT:function(){return{}}},Ac="chart-modules-tooltip",kc="#".concat(Ac);function Tc(){if(!document.querySelector(kc)){var e=document.createElement("div");e.id=Ac,e.style.overflow="hidden",e.style.position="fixed",e.style.pointerEvents="none",e.style.left="0px",e.style.top="0px",e.style.width="100%",e.style.height="100%",e.style.zIndex=1020,document.body.appendChild(e)}}function Lc(e){return{show:!0,key:e.key,type:"tooltip",layout:{displayOrder:3},beforeMount:function(){Tc()},beforeUpdate:function(){Tc()},destroyed:function(){var e;null!=(e=document.querySelector(kc))&&e.parentElement&&e.childElementCount<1&&e.parentElement.removeChild(e)},settings:{appendTo:function(){return document.querySelector(kc)},direction:e.rtl?"rtl":"ltr",duration:e.duration},style:{arrow:{color:"#404040"},content:{display:"table","border-spacing":"4px",background:"rgba(64, 64, 64, 0.9)",opacity:"1",fontSize:"13px",fontFamily:"QlikView Sans, sans-serif","empty-cells":"show"},cell:{"max-width":"180px","word-break":"break-word","word-wrap":"break-word","overflow-wrap":"break-word",hyphens:"auto"}}}}var Oc="position",Pc={bar:"rect",diamond:"path",point:"circle",square:"rect",triangle:"path","n-polygon":"path",slice:"path"},Nc=function(e){return e.data.value},Rc=function(e){var t,n=e.data;return null==n||null===(t=n.major)||void 0===t?void 0:t.value};function Fc(e){var t=e.chart,n=e.expando,r=e.nodes,o=e.collectConfig,i=e.collectibles,a=e.meta,s=o.from,l={chart:t,expando:n,nodes:r,collectConfig:o,collectibles:i,meta:a};switch("function"==typeof s?"custom":s){case"single":return function(e){var t=ya(e.nodes,1)[0];return["container"===t.type&&t.children[0]||t]}(l);case"position":return function(e){return e.nodes}(l);case"dimension":return function(e){var t=e.chart,n=e.collectConfig,r=e.collectibles,o=ya(e.nodes,1)[0],i=n.filter,a="function"==typeof i?i:function(){return!0},s=n.by,l=void 0===s?Nc:s;return r.reduce((function(e,n){var r=n.major,i=void 0===r?Rc:r,a=Pc[n.type]||n.type;return e.push.apply(e,va(t.findShapes(a).filter((function(e){return e.key===n.key&&e.data&&i({data:e.data})===l({data:o.data})})))),e}),[]).filter(a)}(l);case"radius":return function(e){var t=e.chart,n=e.collectConfig,r=e.collectibles,o=ya(e.nodes,1)[0].localBounds,i=n.distance,a=n.filter,s="function"==typeof a?a:function(){return!0},l=r.map((function(e){return e.key})),u=ya(l,1)[0],c=t.component(u).rect,p=c.scaleRatio,d=c.computedInner,f=o.width*p.x,m=o.height*p.y,h=o.x*p.x+f/2+d.x,g=o.y*p.y+m/2+d.y,y=i||Math.max(f,m);return t.shapesAt({cx:h,cy:g,r:y},{components:l.map((function(e){return{key:e}}))}).filter(s)}(l);case"custom":return function(e){var t=e.chart,n=e.expando,r=e.nodes,o=e.meta;return e.collectConfig.from({chart:t,expando:n,nodes:r,meta:o})}(l);default:return[]}}var jc=Number.MAX_VALUE;function Hc(e){var t=e.nodes.reduce((function(e,t){var n=t.bounds;return e.xMin=Math.min(e.xMin,n.x,n.x+n.width),e.yMin=Math.min(e.yMin,n.y,n.y+n.height),e.xMax=Math.max(e.xMax,n.x,n.x+n.width),e.yMax=Math.max(e.yMax,n.y,n.y+n.height),e}),{xMin:jc,xMax:-jc,yMin:jc,yMax:-jc}),n=t.xMin,r=t.xMax,o=t.yMin;return{x:n,y:o,width:r-n,height:t.yMax-o}}function _c(e){var t=e.chart,n=e.config,r=e.expando,o=e.internal,i=e.nodes;if(!i.length)return[];var a=ya(i,1)[0].key,s=n.main.collectibles;if(!s.length)return[];var l=n.main.triggers.find((function(e){return-1!==e.keys.indexOf(a)}))||{},u=l.collect,c=l.placement;if(!u||!u.from||!c)return[];var p={triggerer:a,position:o.get(Oc)},d=(Fc({chart:t,expando:r,nodes:i,collectConfig:u,collectibles:s,meta:p})||[]).map((function(e){return e.children.length?e.children[0]:e}));return d.length?function(e){var t=e.chart,n=e.config,r=e.expando,o=e.placementConfig,i=e.hovered,a=e.collected,s=e.meta,l=function(e){for(var t=e.chart,n=e.config,r=e.expando,o=e.placementConfig,i=e.hovered,a=e.collected,s=e.meta,l=ya(i,1)[0],u=Array.isArray(o)?o:[o],c={bounds:l.bounds,key:l.key},p=Hc({nodes:a}),d=0;d<u.length;d++){var f=u[d];if("function"==typeof f){var m=f({chart:t,expando:r,hovered:i,collected:a,meta:s,collectedBounds:p,combineBounds:Hc});if(m)return m}if("trigger"===f)return c;if("collectible"===f){var h=n.main.placements.collectible;return{bounds:"function"==typeof h?h({collected:a}):p,key:a[0].key}}}return c}({chart:t,config:n,expando:r,placementConfig:o,hovered:i,collected:a,meta:s}),u=l.bounds,c=l.key,p=ya(a,1)[0].desc;return[{bounds:u,nodes:a,data:a.map((function(e){return e.data})),key:c,meta:s,desc:p}]}({chart:t,config:n,expando:r,placementConfig:c,hovered:i,collected:d,meta:p}):[]}var zc=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),Vc=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),Uc=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),Bc=function(e){return zc.test(e)},Wc=function(e){return Vc.test(e)||Uc.test(e)};function $c(e){for(var t=e?e.length:0,n=0;n<t;n++){var r=e[n];if(Bc(r))return"ltr";if(Wc(r))return"rtl"}return"ltr"}function Yc(e){var t=e.visibility;return{type:"divider",content:[{content:"",style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:2}],visibility:ha(ha({},{count:!1}),t)}}function Kc(e){var t=e.config,n=e.h,r=e.context,o=e.nodes,i=e.property,a=e.filter,s=e.visibility,l=t.rtl,u={type:"color",label:void 0,value:void 0,content:[],filter:a,visibility:ha(ha({},{count:!0}),s)},c=t.getColorSettings();if("color"===c.type||!c.fieldType)return u;var p=ya(o,1)[0];if(u.value=function(e){var t=e.config,n=e.context,r=e.property,o=e.node,i=o.data[r];if(i){if(-3===o.data.value)return o.data.label;var a=n.resources.dataset(i.source.key).field(i.source.field).formatter(),s=i.value,l=i.label,u=t.getColorSettings();if(a&&"measure"===u.fieldType)return Number.isNaN(+s)?"-":a(i.value);var c=l||s;return void 0===c||Number.isNaN(c)||"NaN"===c?"-":c}}({config:t,context:r,property:i,node:p}),void 0===u.value)return u;u.label=function(e){var t=e.context,n=e.property,r=e.node,o=e.config.getColorSettings();if(o.label)return o.label;var i=r.data[n];if(i&&"color"!==o.type){var a=t.resources.dataset,s=i.source,l=s.key,u=s.field;return a(l).field(u).title()}}({config:t,context:r,property:i,node:p});var d=n("div",{style:{display:"inline-block",width:10,height:10,"background-color":function(e){var t=e.node.attrs;return(null==t?void 0:t.fill)||"#ddd"}({node:p}),margin:"0 8px"}});return u.content.push({content:l?[":",u.label]:[u.label,":"],style:{"text-align":l?"right":"left",direction:$c(u.label)}},{content:l?[u.value,d]:[d,u.value],style:{"text-align":l?"left":"right","vertical-align":"middle",direction:$c(u.value)}}),u}function Jc(e){var t=e.config,n=e.h,r=e.context;return{section:function(e){return function(e){return{type:"section",content:e.content}}({content:e.content})},text:function(e){var n=e.value,r=e.style,o=e.visibility;return function(e){var t=e.config,n=e.value,r=e.style,o=(r=void 0===r?{}:r).bold,i=void 0!==o&&o,a=r.italic,s=e.visibility;return{type:"text",content:[{content:n,style:{"font-weight":i?"bold":"normal","font-style":void 0!==a&&a?"italic":"normal","text-align":t.rtl?"right":"left",direction:$c(n)},colspan:2}],visibility:ha(ha({},{count:!0}),s)}}({config:t,value:n,style:r,visibility:o})},measure:function(e){var r=e.label,o=e.value,i=e.color,a=e.style,s=e.survive,l=e.visibility;return function(e){var t,n,r,o,i=e.h,a=e.label,s=e.value,l=e.color,u=e.style,c=e.survive,p=e.visibility,d=e.config.rtl,f=i("div",{style:{display:"inline-block",width:10,height:10,"background-color":l,margin:"0 8px"}});return{type:"measure",label:a,value:s,content:[{content:d?[":",a]:[a,":"],style:{"text-align":d?"right":"left","font-weight":null!=u&&null!==(t=u.label)&&void 0!==t&&t.bold?"bold":"normal","font-style":null!=u&&null!==(n=u.label)&&void 0!==n&&n.italic?"italic":"normal",direction:$c(a)}},{content:l?d?[s,f]:[f,s]:s,style:{"text-align":d?"left":"right","vertical-align":"middle","font-weight":null!=u&&null!==(r=u.value)&&void 0!==r&&r.bold?"bold":"normal","font-style":null!=u&&null!==(o=u.value)&&void 0!==o&&o.italic?"italic":"normal",direction:$c(s)}}],survive:ha(ha({},{color:!1,duplicate:!1}),c),visibility:ha(ha({},{count:!0}),p)}}({config:t,h:n,label:r,value:o,color:i,style:a,survive:s,visibility:l})},divider:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.visibility;return Yc({visibility:t})},row:function(e){return function(e){var t=e.visibility;return{type:"row",content:[{content:e.content,style:e.style,colspan:e.colspan}],visibility:ha(ha({},{count:!0}),t)}}({content:e.content,style:e.style,colspan:e.colspan,visibility:e.visibility})},raw:function(e){return function(e){var t=e.visibility;return{type:"raw",content:e.value,visibility:ha(ha({},{count:!0}),t)}}({value:e.value,visibility:e.visibility})},color:function(e){var o=e.nodes,i=e.property,a=e.filter,s=void 0===a||a,l=e.visibility;return Kc({config:t,h:n,context:r,nodes:o,property:i,filter:s,visibility:l})}}}function Gc(e){var t=e.chart,n=e.translator,r=e.config,o=e.expando,i=e.h,a=e.data,s=e.style,l=ya(a,1)[0],u=function(e){var t=e.config,n=e.nodes.reduce((function(e,n){var r=t.main.getGroupByValue({data:n.data});return e[r]||(e[r]=[]),e[r].push(n),e}),{});return Object.keys(n).map((function(e){return n[e]}))}({config:r,nodes:l.node.nodes}),c=function(e){var t=e.chart,n=e.config,r=e.expando,o=e.h,i=e.context,a=e.groups,s=i.node.meta,l=i.resources,u=l.dataset,c=l.formatter,p=Jc({config:n,h:o,context:i}),d=function(e){var t=e.dataset;return{dataset:{title:function(e,n){return t(e).field(n).title()}}}}({dataset:u}),f=a.map((function(e){var t=p.section({content:va((n.main.section({expando:r,h:o,nodes:e,dataset:u,formatter:c,meta:s,create:p,util:d})||[]).filter((function(e){var t;return null===(t=e.content)||void 0===t?void 0:t.length}))).filter(Boolean)});return t.content=function(e){var t=e.config,n=e.content,r=n.find((function(e){return"color"===e.type&&e.filter})),o=r?n.filter((function(e){return"measure"!==e.type||e.survive.color||e.label!==r.label||e.value!==r.value})):n;return t.main.showDuplicateMeasures?o:o.reduce((function(e,t){var n=t.type,r=t.survive;if("measure"!==n||r.duplicate)return e.filtered.push(t),e;var o="".concat(t.label,"-").concat(t.value);return e.memory[o]||(e.memory[o]=!0,e.filtered.push(t)),e}),{memory:{},filtered:[]}).filtered}({config:n,content:t.content}),t}));return n.main.sections({chart:t,expando:r,h:o,nodes:i.node.nodes,dataset:u,formatter:c,meta:s,create:p,util:d,sections:f}),f.filter(Boolean)}({chart:t,config:r,expando:o,h:i,context:l,groups:u}),p=function(e){var t=e.translator,n=e.config,r=e.context,o=e.templates,i=n.main.layout,a=i.rows,s=i.grouping,l=i.single,u=function(e){var t=e.limit,n=e.grouping,r=e.single,o={count:0,overflow:0,index:{started:void 0,group:void 0}};return{process:function(e){var i=e.visibility,a=e.index;if(r&&0!==a)return n?(o.index.started!==a&&o.index.group!==a&&(o.overflow++,o.index.group=a),!1):(o.overflow++,!1);if(o.count>=t){if(!n)return o.overflow++,!1;if(o.index.started!==a)return o.index.group!==a&&(o.overflow++,o.index.group=a),!1}return i.count&&o.count++,n&&(o.index.started=a),!0},overflow:function(){return o.overflow}}}({limit:a,grouping:s,single:"function"==typeof l?l({meta:r.node.meta,sections:o}):l}),c=o.reduce((function(e,t,n){var r=t.type,i=t.content;"section"===r&&(void 0===i?[]:i).forEach((function(t){u.process({visibility:t.visibility,index:n})&&e.push(t.content)}));var a=n===o.length-1;return"divider"!==r||a||u.process({visibility:t.visibility,index:n})&&e.push(t.content),e}),[]).filter((function(e){return e.length})),p=u.overflow();return p&&c.push(function(e){var t=e.translator,n=e.config,r=e.count,o=t?t.get("Object.ChartTooltip.NMore",r):"+".concat(r," more"),i=$c(o);return[{content:o,style:{"font-weight":"bold","text-align":n.rtl?"right":"left",direction:i},colspan:2}]}({translator:t,config:n,count:p})),c}({translator:n,config:r,h:i,context:l,templates:c});return p.length?function(e){var t=e.h,n=e.style;return e.rows.map((function(e){return t("tr",{},e.map((function(e){var r={style:ha(ha({},n.cell||{}),e.style||{}),class:e.class};return e.colspan&&(r.colspan=e.colspan),t("td",r,e.content)})))}))}({h:i,style:s,rows:p}):function(e){var t=e.h;return t("tr",{},t("td",{style:{fontStyle:"italic",opacity:.75}},"Empty"))}({h:i})}function Zc(e){var t=e.chart,n=e.translator,r=e.config,o=e.expando,i=e.internal;if(!r.main.key)return!1;var a=ll(),s=Lc({key:r.main.key,rtl:r.rtl,duration:r.duration}),l=r.main.events.tooltip,u=l.afterShow,c=l.afterHide,p=function(){var e=a.get("collected");return{expando:o,nodes:e.nodes,meta:e.meta}};return Aa(!0,s,{settings:{filter:function(e){return _c({chart:t,config:r,expando:o,internal:i,nodes:e})},extract:function(e){return a.set("collected",e.node),e},content:function(e){var i=e.h,a=e.data,s=e.style;return Gc({chart:t,translator:n,config:r,expando:o,h:i,data:a,style:s})},placement:function(e){var t=e.nodes;return r.main.placement({meta:t[0].meta})},afterShow:function(){return u(p())},afterHide:function(){return c(p())}},style:{arrow:{color:r.style.background},content:r.style}})}function Xc(e){var t=e.config,n=t.legend.keys;if(!n.tooltip||!n.component)return!1;if("categorical"!==t.getColorSettings().type)return!1;var r=Lc({key:n.tooltip,rtl:t.rtl,duration:t.duration});return Aa(!0,r,{settings:{filter:function(e){return e.filter((function(e){return e.data&&e.key===n.component}))},extract:function(e){return e},content:function(e){var t=e.h,n=e.data;return[t("tr",{},[t("td",{style:ha(ha({},e.style.cell||{}),{"font-weight":"bold","text-align":"left"}),colspan:2},n[0].node.data.label)])]},placement:"pointer"},style:{arrow:{color:t.style.background},content:t.style}})}function Qc(e){var t=e.config.main.triggers.reduce((function(e,t){return t.keys.forEach((function(n){var r=t.distance||0;e.distance[n]=r,e.distances.includes(r)||e.distances.push(r),e.key[n]=!0,e.keys[r]||(e.keys[r]=[]),e.keys[r].push(n)})),e}),{distance:{},distances:[],key:{},keys:{}});return function(e){return e.components.filter((function(e){return t.key[e.key]})).reduce((function(e,n){e.any=!0,e.components.push(n.key);var r=t.distance[n.key];return 0===r?e.position.push(n.key):(e.distances.includes(r)||(e.distances.push(r),e.distanceKeys[r]=[]),e.distanceKeys[r].push(n.key)),e}),{any:!1,components:[],position:[],distances:[],distanceKeys:{}})}}function ep(e){var t=e.chart,n=e.event,r=e.component,o={absolute:{x:0,y:0},relative:{x:0,y:0}},i=t.element.getBoundingClientRect(),a=i.left,s=i.top;o.absolute.x=(n.center?n.center.x:n.clientX)-a,o.absolute.y=(n.center?n.center.y:n.clientY)-s;var l=t.component(r);if(l){var u=l.rect.computedInner;o.relative.x=o.absolute.x-u.x,o.relative.y=o.absolute.y-u.y}return o}function tp(e){var t=e.chart,n=e.hits,r=e.position,o=[];if(n.position.length&&o.push.apply(o,va(t.shapesAt(r.absolute,{components:n.position.map((function(e){return{key:e}}))}))),!o.length&&n.distances.length){var i=[];n.distances.forEach((function(e){i.push.apply(i,va(t.shapesAt({cx:r.absolute.x,cy:r.absolute.y,r:e},{components:n.distanceKeys[e].map((function(e){return{key:e}}))})))})),i.length&&o.push(function(e){var t=e.nodes,n=e.origin,r=t.find((function(e){return"path"===e.type}));if(r)return r;var o=function(e){var t=Math.abs(n.x-(e.localBounds.x+e.localBounds.width/2)),r=Math.abs(n.y-(e.localBounds.y+e.localBounds.height/2));return Math.sqrt(t*t+r*r)};return t.slice(1).reduce((function(e,t){var n=o(t);return n<e.distance&&(e.distance=n,e.node=t),e}),{node:t[0],distance:o(t[0])}).node}({nodes:i,origin:r.relative}))}return o}function np(e){var t=e.chart,n=e.config,r=e.expando,o=e.internal,i=e.facade,a=n.delay.tap,s=Qc({config:n}),l=n.main.triggers.reduce((function(e,t){return e.push.apply(e,va(t.keys)),e}),[]);return{key:"event:".concat("tooltipTap"),type:"Tap",options:{event:"tooltipTap",enable:function(e,r){return!r||!!n.enable({event:r})&&t.componentsFromPoint({x:r.center.x,y:r.center.y}).filter((function(e){return-1!==l.indexOf(e.key)})).length>0}},recognizeWith:"tap",events:fa({},"tooltipTap",(function(e){if(e.preventDefault(),"mouse"!==e.pointerType&&!n.main.suppress({event:e})){var l=t.component(n.main.key);if(l&&l.show){var u=t.componentsFromPoint({x:e.center.x,y:e.center.y}),c=s({components:u});if(c.any){var p=ya(c.components,1)[0],d=ep({chart:t,event:e,component:p});o.set(Oc,d);var f=tp({chart:t,hits:c,position:d});if(f.length){var m=f[0].key;n.main.events.tooltip.beforeShow({expando:r,event:e,collectNodes:function(){return i.collectNodes({nodes:f})},meta:{triggerer:m,position:d}}).then((function(){l.emit("show",e,{nodes:f,delay:a})}))}else l.emit("hide")}else l.emit("hide")}}}))}}function rp(e){var t=e.chart,n=e.config,r=e.expando,o=e.internal,i=e.facade,a=Qc({config:n}),s=function(e){var t=e.config,n=e.expando,r=e.internal,o=e.facade,i=t.main.events.tooltip.beforeShow,a=t.delay.hover,s={ongoing:{},latest:void 0};return function(e){var t=e.event,l=e.tooltip,u=e.nodes,c=function(e){var t=e.nodes;return JSON.stringify(t.map((function(e){return{key:e.key,bounds:e.bounds,value:e.data.value}})))}({nodes:u});if(!s.ongoing[c]){s.ongoing[c]=!0,s.latest=c;var p=u[0].key;i({expando:n,event:t,collectNodes:function(){return o.collectNodes({nodes:u})},meta:{triggerer:p,position:r.get(Oc)}}).then((function(){c===s.latest&&l.emit("show",t,{nodes:u,delay:a})})).finally((function(){delete s.ongoing[c],c===s.latest&&(s.latest=void 0)}))}}}({config:n,expando:r,internal:o,facade:i}),l=[n.main.key,n.legend.keys.tooltip].filter(Boolean),u=function(){l.forEach((function(e){var n=t.component(e);null!=n&&n.show&&n.emit("hide")}))};return{type:"native",events:{mousemove:function(e){if(n.enable({event:e})&&!n.main.suppress({event:e})){var r=t.componentsFromPoint({x:e.clientX,y:e.clientY}),i=t.component(n.main.key);if(i&&i.show){var l=a({components:r});if(l.any){var u=ya(l.components,1)[0],c=ep({chart:t,event:e,component:u});o.set(Oc,c);var p=tp({chart:t,hits:l,position:c});if(!p.length)return void i.emit("hide");s({event:e,tooltip:i,nodes:p})}else i.emit("hide")}var d=n.legend;if(d.keys.tooltip&&d.keys.component){var f=t.component(d.keys.tooltip);f&&f.show&&(r.some((function(e){return e.key===d.keys.component}))?f.emit("show",e):f.emit("hide"))}}},mouseup:function(e){2===e.button&&u()},mouseleave:function(){n.main.events.interaction.mouseleave({expando:r}),u()},wheel:function(){u()}}}}function op(e){var t=e.chart,n=e.translator,r=function(e){var t=e.config;return Aa(!0,{},{rtl:!1,enable:Ic.FALSE,getColorSettings:Ic.OBJECT,style:{fontSize:void 0,fontFamily:void 0,color:void 0,background:void 0},delay:{hover:500,tap:0},duration:8e3,main:{key:void 0,suppress:Ic.FALSE,getGroupByValue:Ic.NOOP,collectibles:[],triggers:[],placement:function(){return{type:"bounds"}},placements:{collectible:"combine"},showDuplicateMeasures:!1,layout:{rows:7,grouping:!1,single:!1},section:Ic.ARRAY,sections:Ic.NOOP,events:{tooltip:{beforeShow:function(){return Promise.resolve()},afterShow:Ic.NOOP,afterHide:Ic.NOOP},interaction:{mouseleave:Ic.NOOP}}},legend:{keys:{tooltip:void 0,component:void 0}}},void 0===t?{}:t)}({config:e.config}),o=ll(),i=ll(),a={components:void 0,interactions:void 0};return{getComponents:function(){return a.components||(a.components=function(e){var t=e.config;return[Zc({chart:e.chart,translator:e.translator,config:t,expando:e.expando,internal:e.internal}),Xc({config:t})].filter(Boolean)}({chart:t,translator:n,config:r,expando:o,internal:i})),a.components},getInteractions:function(){return a.interactions||(a.interactions=function(e){var t=e.chart,n=e.config,r=e.expando,o=e.internal,i=function(e){var t=e.chart,n=e.config,r=e.expando,o=e.internal;return{collectNodes:function(e){var i=e.nodes,a=ya(_c({chart:t,config:n,expando:r,internal:o,nodes:i}),1)[0];return(a=void 0===a?{nodes:[]}:a).nodes}}}({chart:t,config:n,expando:r,internal:o});return{gestures:[np({chart:t,config:n,expando:r,internal:o,facade:i})],native:rp({chart:t,config:n,expando:r,internal:o,facade:i})}}({chart:t,config:r,expando:o,internal:i})),a.interactions},expando:o}}var ip={};function ap(){ap.init.call(this)}ip.isObject=function(e){return"object"==typeof e&&null!==e},ip.isNumber=function(e){return"number"==typeof e},ip.isUndefined=function(e){return void 0===e},ip.isFunction=function(e){return"function"==typeof e};var sp=ap;ap.EventEmitter=ap,ap.prototype._events=void 0,ap.prototype._maxListeners=void 0,ap.defaultMaxListeners=10,ap.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},ap.prototype.setMaxListeners=function(e){if(!ip.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},ap.prototype.emit=function(e){var t,n,r,o,i,a;if(this._events||(this._events={}),"error"===e&&!this._events.error)throw(t=arguments[1])instanceof Error?t:Error('Uncaught, unspecified "error" event.');if(n=this._events[e],ip.isUndefined(n))return!1;if(ip.isFunction(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,o=new Array(r-1),i=1;i<r;i++)o[i-1]=arguments[i];n.apply(this,o)}else if(ip.isObject(n)){for(r=arguments.length,o=new Array(r-1),i=1;i<r;i++)o[i-1]=arguments[i];for(r=(a=n.slice()).length,i=0;i<r;i++)a[i].apply(this,o)}return!0},ap.prototype.addListener=function(e,t){var n;if(!ip.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,ip.isFunction(t.listener)?t.listener:t),this._events[e]?ip.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,ip.isObject(this._events[e])&&!this._events[e].warned)&&((n=ip.isUndefined(this._maxListeners)?ap.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,ip.isFunction(console.error)&&console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),ip.isFunction(console.trace)&&console.trace()));return this},ap.prototype.on=ap.prototype.addListener,ap.prototype.once=function(e,t){if(!ip.isFunction(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},ap.prototype.removeListener=function(e,t){var n,r,o,i;if(!ip.isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(o=(n=this._events[e]).length,r=-1,n===t||ip.isFunction(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(ip.isObject(n)){for(i=o;i-- >0;)if(n[i]===t||n[i].listener&&n[i].listener===t){r=i;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},ap.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],ip.isFunction(n))this.removeListener(e,n);else if(Array.isArray(n))for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},ap.prototype.listeners=function(e){return this._events&&this._events[e]?ip.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},ap.listenerCount=function(e,t){return e._events&&e._events[t]?ip.isFunction(e._events[t])?1:e._events[t].length:0};function lp(){const e={};var t;return t=e,Object.keys(sp.prototype).forEach((e=>{t[e]=sp.prototype[e]})),sp.init(t),e.lasso={active:()=>!1},e.select={on:e.on,removeListener:e.removeListener},e}function up({picasso:e}){var t;const n=g(),r=y(),o=v(),[i,a]=b(),s=lp(),l=x(),u=q(),c=!(null===(t=l.qSelectionInfo)||void 0===t||!t.qInSelections),[p,d]=b(!1);return s.lasso=function({layout:e,isInSelections:t,isLassoActionActive:n,setIsLassoActionActive:r,translator:o}){var i,a,s;return{active:n,label:o.get(n?"Tooltip.ToggleOffLassoSelection":"Tooltip.ToggleOnLassoSelection"),hidden:!t||!(null===(i=e.qHyperCube)||void 0===i||null===(a=i.qDimensionInfo)||void 0===a||null===(s=a[0])||void 0===s||!s.qIsOneAndOnlyOne),action(e){r("boolean"==typeof e?e:!n)},icon:{shapes:[{type:"path",attrs:{d:"M15.9488039,5.20769129 C16.0487326,6.70662306 15.3492311,8.30548361 14.050157,9.30477145 C12.651154,10.5039169 10.8524359,10.8037032 8.85386017,10.4039881 L7.3549284,10.0042729 L5.75606786,9.70448659 C5.75606786,9.90434416 5.65613907,10.0042729 5.4562815,10.2041305 C5.05656637,10.6038456 4.55692244,10.8037032 4.05727852,10.8037032 C3.75749217,10.8037032 3.45770582,10.7037744 3.15791946,10.6038456 C3.05799068,10.903632 3.15791946,11.2034184 3.45770582,11.7030623 C5.05656637,14.0014243 3.85742095,15.9000712 3.75749217,16 L2.2585604,15.3004985 C2.2585604,15.2005697 2.95806189,14.0014243 1.95877405,12.6024213 C1.6589877,12.0028486 1.15934378,11.0035608 1.55905891,10.0042729 C1.6589877,9.80441537 1.75891648,9.6045578 1.95877405,9.40470024 C1.6589877,8.90505631 1.55905891,8.30548361 1.85884527,7.7059109 C1.55905891,7.40612455 1.25927256,7.1063382 1.15934378,6.70662306 C0.859557424,5.90719279 0.959486209,4.5081898 1.6589877,3.30904439 C1.95877405,2.6095429 2.55834676,2.0099702 3.15791946,1.51032628 C3.95734974,0.91075357 4.95663758,0.610967217 6.15578299,0.311180864 C9.05371774,-0.388320626 11.9516525,0.111323295 13.9502282,1.61025506 C15.1493736,2.50961412 15.8488751,3.80868831 15.9488039,5.20769129 Z M13.0508691,8.10562604 C13.8502994,7.40612455 14.3499433,6.40683671 14.3499433,5.30762008 C14.2500145,4.20840345 13.550513,3.40897318 12.9509403,2.90932926 C12.1515101,2.40968533 11.252151,2.0099702 10.1529344,1.81011263 C8.95378895,1.61025506 7.75464354,1.71018384 6.45556935,1.91004141 C4.75678001,2.30975655 3.65756338,3.00925804 3.05799068,4.10847467 C2.55834676,5.00783373 2.65827554,5.90719279 2.75820433,6.20697914 C2.75820433,6.30690792 2.85813311,6.40683671 3.05799068,6.40683671 C3.15791946,6.40683671 3.25784825,6.40683671 3.35777703,6.40683671 C3.45770582,6.40683671 3.45770582,6.40683671 3.45770582,6.40683671 L3.5576346,6.40683671 L3.65756338,6.40683671 C4.65685123,6.40683671 5.4562815,6.90648063 5.85599664,7.80583969 L5.85599664,8.00569726 C6.35564056,8.10562604 7.05514205,8.30548361 7.75464354,8.50534118 L9.25357531,8.90505631 C10.0530056,9.0049851 10.7525071,9.0049851 11.4520086,8.80512753 C12.0515813,8.70519875 12.5512252,8.40541239 13.0508691,8.10562604 Z"}}]}}}({layout:l,isInSelections:c,isLassoActionActive:p,setIsLassoActionActive:d,translator:u}),D((()=>(i&&(i.interactions.lasso.active=()=>p),{...s.lasso})),[i,p,c,u.language()]),C((()=>{r.style.overflow="hidden";const t=e({renderer:{prio:[n.renderer||"canvas"]}}),i=t.chart({element:r,data:[],settings:{}}),u=Ec({chart:i,actions:s,selections:o,config:{selectionActions:!1}});u.setLayout(l),u.setBrushAliases({colorField:"qDimensionInfo/0/qAttrDimInfo/0"});const c=function(e){var t=ha({},e),n={},r={},o=!1,i={get:function(e){return t[e]},set:function(e,i){var a=t[e];!o&&n[e]?t[e]=n[e](i,a):t[e]=i,!o&&r[e]&&r[e](t[e],a)},preventSet:function(e,t){o=!0,i.set(e,t),o=!1},intercept:function(e,t){n[e]=t},onChanged:function(e,t){r[e]=t}};return i}({legendScrollOffset:0,rotation:0});return c.intercept("rotation",(e=>(c.get("rotation")+e)%(2*Math.PI))),c.onChanged("rotation",(()=>{i.update({partialData:!0})})),s.on("selections-start",(()=>{i.brush("selection").start()})),a({picasso:t,chart:i,selectionService:u,viewState:c,interactions:s}),()=>{u.destroy(),i.destroy(),s.removeAllListeners(),delete s.select,c.intercept("rotation",void 0),c.onChanged("rotation",void 0)}}),[]),i}const cp={CUSTOM:{EXPRESSION:"customTooltipExpression",TITLE:"customTooltipTitle",DESCRIPTION:"customTooltipDescription",QUARANTINE:"customTooltip",IMAGES:"customTooltipImages"},CHART:{CONTAINER_ID:"tooltipContainerId",STATE:"customTooltipSessionState",CHART_OBJECT_ID:"customTooltipSessionObjectId",CHART_PARENT_TYPE:"TooltipChartParent",CHART_CHILD_TYPE:"TooltipChart",STYLE:{small:"140px",medium:"200px",large:"340px"}}};function pp(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const dp={getImageSize(e,t){let n;function r(){n&&(clearTimeout(n),n=null)}function o(e){const t=e;t.onload=null,t.onerror=null,r()}const i={small:50,medium:200,large:340,original:340};return new Promise((a=>{const s=new Image;s.referrerPolicy="no-referrer",s.onload=()=>{let e;const{height:n,width:l}=s,u=i[t]*(n>l?1:n/l),c=i[t]*(l>n?1:l/n);!n||!l||0===n&&0===l?(e={height:20,width:20,imageError:!0},o(s)):"original"===t?(e={height:Math.min(u,n),width:Math.min(c,l)},r()):(e={height:u,width:c},r()),a(e)},s.onerror=()=>{o(s),a({height:20,width:20,imageError:!0})},s.src=e,n=setTimeout((()=>{o(s),a({height:20,width:20,imageError:!0})}),3e3)}))}};async function fp(e,t,n,r){var o,i,a,s,l,u;const{app:c,flags:p}=t,d=null===(o=e.layout)||void 0===o||null===(i=o.tooltip)||void 0===i?void 0:i.imageComponents;if(!d)return[];const[f]=d,m=f.size||"small",h=f.type||"media";let g=-1;for(let e=0;e<n.length;e++)if(n[e].cId===f.cId){g=e;break}const y=(null===(a=r.data)||void 0===a||null===(s=a.customTooltipAttrExps)||void 0===s?void 0:s.value)||[];let v;if(-1!==g&&y[g]&&(v=y[g]),"media"===h&&null!==(l=f.ref)&&void 0!==l&&null!==(u=l.qStaticContentUrl)&&void 0!==u&&u.qUrl)return async function(e,t,n){let r=e.ref.qStaticContentUrl.qUrl;const o=function(e){let t,n,r,o,i,a;return e&&e.session&&e.session.options||e&&e.enigmaModel&&e.enigmaModel.session&&e.enigmaModel.session.sessionConfig?(t=e.session.options||e.enigmaModel.session.sessionConfig,a=void 0!==t.secure?t.secure:t.isSecure,n=a?"https://":"http://",r=t.host||"localhost",o=t.port?":"+t.port:"",i=t.prefix?t.prefix:"/","/"!==i[i.length-1]&&(i+="/"),n+r+o+i):""}(n);o&&(function(e,t){e.replace(t,"").replace(/^\.\.\//i,"/")[0]}(r,o),r=r.replace(/"/g,'\\"'),r=r.replace(/'/g,"\\'"),r=function(e,t){return t+("/"===e[0]?e.substr(1):e)}(r,o));const{height:i,width:a,imageError:s}=await dp.getImageSize(r,t);return{src:r,size:t,height:i,width:a,imageError:s}}(f,m,c);if("url"===h)return async function(e,t,n,r,o){let i,a=n.ref;if(o&&o.label&&(a=o.label),t.isEnabled("IMAGE_BUNDLE_LOAD")&&null!=e&&e.getImage&&pp(a))try{const t="data:image/png;base64, "+await e.getImage(a),{height:n,width:o,imageError:s}=await dp.getImageSize(t,r);i={src:t,size:r,height:n,width:o,imageError:s}}catch(e){}else{const{height:e,width:t,imageError:n}=await dp.getImageSize(a,r);i={src:a,size:r,height:e,width:t,imageError:n}}return i}(c,p,f,m,v);if(p.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===h&&v&&v.label){return async function(e,t,n,r){let o;const i=r.label,a=`qmem://${t.qFallbackTitle}/${i}`;if(pp(a))try{const t=await e.getImage(a);if(t){const e="data:image/png;base64, "+t,{height:r,width:i,imageError:a}=await dp.getImageSize(e,n);o={src:e,size:n,height:r,width:i,imageError:a}}}catch(e){}return o}(c,n[g],m,v)}return[]}const mp={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){const o=t,i=[];for(let t=0;t<o.length;t++)i.push(fp(e,r,n,o[t]));const a=await Promise.all(i);for(let e=0;e<o.length;e++)o[e].data.customTooltipImages=[a[e]];return o},checkIfPromisesExist({customTooltipModel:e}){var t,n;const r=null===(t=e.layout)||void 0===t||null===(n=t.tooltip)||void 0===n?void 0:n.imageComponents;return!!r&&r.length>0}},hp={async handlePromises({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){let o=t;return o=await mp.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}),o},checkIfPromisesExist:({customTooltipModel:e})=>mp.checkIfPromisesExist({customTooltipModel:e})};const gp=(e,t)=>{var n,r,o;const i=null==e||null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qDimensions,a=null==e||null===(r=e.qHyperCubeDef)||void 0===r?void 0:r.qMeasures,s=null==e||null===(o=e.qHyperCubeDef)||void 0===o?void 0:o.qInterColumnSortOrder,l=t;return{qInfo:{qType:cp.CHART.CHART_PARENT_TYPE,qId:cp.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:i,qMeasures:a,qInterColumnSortOrder:s,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:l}},yp=e=>{var t,n,r;const o=null===(t=e.tooltip)||void 0===t||null===(n=t.chart)||void 0===n||null===(r=n.object)||void 0===r?void 0:r.refId;return{qInfo:{qType:cp.CHART.CHART_CHILD_TYPE},qExtendsId:o}};const vp={createContainer:({ctx:e,layout:t})=>{var n,r;if(!((null===(n=t.qHyperCube)||void 0===n||null===(r=n.qDimensionInfo)||void 0===r?void 0:r.length)<=0))return function(e,t){var n,r,o,i;const a=null!==(n=null===(r=t.tooltip)||void 0===r||null===(o=r.chart)||void 0===o||null===(i=o.style)||void 0===i?void 0:i.size)&&void 0!==n?n:"medium",s=cp.CHART.STYLE[a];return[{content:[e.h("div",{style:{display:"flex",width:s,height:s,backgroundColor:"#FFFFFF",borderRadius:"5px",padding:"2px",color:"#595959"},colspan:2,id:cp.CHART.CONTAINER_ID})],colspan:2,style:{"text-align":e.rtl?"right":"left","max-width":s,width:"100%"}},{}]}(e,t)},show:async({app:e,properties:t,selectedNodes:n,dimIndex:r,customTooltipModel:o,rtl:i})=>{var a,s,l;const u=o,c=null==t||null===(a=t.tooltip)||void 0===a||null===(s=a.chart)||void 0===s||null===(l=s.object)||void 0===l?void 0:l.refId;if(null!=u&&u.embed&&e.removeSessionAlternateState&&e.addSessionAlternateState&&c&&!(t.qHyperCubeDef.qDimensions.length<=0)){await vp.hide({app:e,customTooltipModel:o});try{await async function({app:e,properties:t,customTooltipModel:n}){const r=n,o=cp.CHART.STATE,i=t.qStateName;r.miniChartToken.alternateState||(r.miniChartToken.alternateState=o,await e.addSessionAlternateState(o,i),r.miniChartToken.alternateState=o)}({app:e,properties:t,customTooltipModel:o});const a=await async function({app:e,properties:t,customTooltipModel:n}){var r;const o=n;null!==(r=o.miniChartToken.sessionObj)&&void 0!==r&&r.id&&await e.destroySessionObject(o.miniChartToken.sessionObj.id);const i=cp.CHART.STATE,a=gp(t,i),s=await e.createSessionObject(a),l=yp(t);if(s.id!==cp.CHART.CHART_OBJECT_ID)return void e.destroySessionObject(s.id);o.miniChartToken.sessionObj=s;const u=await s.createChild(l);if(o.miniChartToken.sessionObj&&o.miniChartToken.sessionObj.id===s.id)return o.miniChartToken.model=u,u;e.destroySessionObject(s.id)}({app:e,properties:t,customTooltipModel:o});if(u.miniChartToken.alternateState&&u.miniChartToken.sessionObj&&a){var p,d,f,m;const e=n.length>0&&void 0!==(null===(p=n[0].data)||void 0===p?void 0:p.value)?[null===(d=n[0].data)||void 0===d?void 0:d.value]:[],a=void 0!==r?r:t.qHyperCubeDef.qDimensions.length-1;if(2===t.qHyperCubeDef.qDimensions.length&&void 0===r&&n.length>0){var h,g;const e=null!==(h=n[0].data.selectionOuterDimension)&&void 0!==h?h:n[0].data.selectionDimension;if(null!=e&&null!==(g=e.source)&&void 0!==g&&g.field){var y;const t=null==e||null===(y=e.source)||void 0===y?void 0:y.field.split("/"),n=t[t.length-1],r=void 0!==e.value?[e.value]:[];r.length>0&&void 0!==n&&u.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",Number(n),r,!1)}}e.length>0&&u.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",a,e,!1);const s=document.getElementById(cp.CHART.CONTAINER_ID),l={direction:i?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1};u.miniChartToken.vis=await o.embed.render({element:s,model:u.miniChartToken.model,options:l,id:null===(f=u.miniChartToken.model)||void 0===f?void 0:f.id,type:null===(m=u.miniChartToken.model)||void 0===m?void 0:m.genericType})}}catch(t){await vp.hide({app:e,customTooltipModel:o})}}},hide:async({app:e,customTooltipModel:t})=>{const n=t;null!=n&&n.embed&&(vp.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(cp.CHART.CHART_OBJECT_ID),n.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const n=t,r=cp.CHART.STATE;await e.removeSessionAlternateState(r),n.miniChartToken.alternateState=void 0}({app:e,customTooltipModel:t}))},destroyVisualization:({customTooltipModel:e})=>{var t,n;const r=e;"function"==typeof(null===(t=r.miniChartToken)||void 0===t||null===(n=t.vis)||void 0===n?void 0:n.destroy)&&(r.miniChartToken.vis.destroy(),r.miniChartToken.vis=void 0)}};function bp(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function xp(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:n,IMAGES:r}=cp.CUSTOM,o={};return o[e]=!0,o[t]=!0,o[n]=!0,o[r]=!0,o}function qp(e){const t=xp();return e.filter((e=>t[e.id]))}const Dp={getNodes(e,t){const n=function(e,t){let n=0,r=0;e.center?(n+=e.center.x,r+=e.center.y):(n+=e.clientX,r+=e.clientY);const o=t.element.getBoundingClientRect();return{cx:n-o.left,cy:r-o.top}}(e,t);return t.shapesAt({x:n.cx,y:n.cy})},getDataNodes(e,t){let n,r=[];const o={container:{bar:!0,"bullet-axis":!0},circle:{"point-component":!0}};return t.forEach((t=>{var i,a,s,l;const u=null!==(i=null===(a=t.data)||void 0===a?void 0:a.selectionDimension)&&void 0!==i?i:t.data;if(!u||null!==(s=t.data)&&void 0!==s&&s.customTooltipAttrExps||o[t.type]){if(null!==(l=t.data)&&void 0!==l&&l.customTooltipAttrExps&&!t.data.customTooltipImages){const e=t;e.data.customTooltipImages=[],r.push(e)}}else{n||(n=[],Object.keys(o).forEach((t=>{n=n.concat(e.findShapes(t).filter((e=>e.data&&e.data.customTooltipAttrExps&&!e.data.customTooltipImages&&o[t][e.key])))})));const t=n.filter((e=>{var t,n;const r=null!==(t=null!==(n=e.data.stack)&&void 0!==n?n:e.data.selectionOuterDimension)&&void 0!==t?t:e.data.selectionDimension;return r&&r.value===u.value&&r.label===u.label}));t.length>0&&(r=r.concat(t[0]))}})),r},displayTooltip(e,t,{nodes:n,opts:r={},customTooltipModel:o,extractedNodes:i=[],hide:a}){if(o&&!a){const{layout:a,chart:s}=o,{attrExps:l}=Dp.getAttrExprData(a);i.length||n.length?hp.handlePromises({customTooltipModel:o,nodes:Dp.getDataNodes(s,i.length>0?i:n),attrExps:l,opts:r}).then((()=>{t.emit("show",e,n.length?{nodes:n}:void 0)})):t.emit("show",e,n.length?{nodes:n}:void 0)}else{var s;null!=o&&null!==(s=o.miniChartToken)&&void 0!==s&&s.alternateState&&vp.hide({app:r.app,customTooltipModel:o}),t.emit("hide")}},checkIfPromisesExist:({customTooltipModel:e})=>hp.checkIfPromisesExist({customTooltipModel:e}),getAttrExps(e,t){var n;const r=t,o=null!==(n=e.qHyperCubeDef)&&void 0!==n&&n.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return r[o]||(r[o]=[]),r[o]},getAttrExprData(e){var t;let n=[],r="";const o=(null===(t=e.qHyperCube)||void 0===t?void 0:t.qDimensionInfo)||[];if(o.length>0){var i,a,s;const t=o.length-1;n=(null===(i=e.qHyperCube)||void 0===i||null===(a=i.qDimensionInfo)||void 0===a||null===(s=a[t])||void 0===s?void 0:s.qAttrExprInfo)||[],r=`qDimensionInfo/${t}/qAttrExprInfo`}return{attrExps:n,fieldPath:r}},quarantineCustomTooltipAttrs(e,t={}){var n,r;if(!(null===(n=e.qLayoutExclude)||void 0===n||null===(r=n.quarantine)||void 0===r?void 0:r[cp.CUSTOM.QUARANTINE])){!function(e,t){const n=t;let r=n.qLayoutExclude;r||(n.qLayoutExclude={quarantine:{}},r=n.qLayoutExclude),r.quarantine||(r.quarantine={}),r.quarantine[cp.CUSTOM.QUARANTINE]=[],e.forEach((e=>{r.quarantine[cp.CUSTOM.QUARANTINE].push(e)})),n.qLayoutExclude=r}(qp(t.qAttributeExpressions||[]),e)}},unquarantineCustomTooltipAttrs(e){var t,n;const r=e;(null===(t=e.qLayoutExclude)||void 0===t||null===(n=t.quarantine)||void 0===n?void 0:n[cp.CUSTOM.QUARANTINE])&&delete r.qLayoutExclude.quarantine[cp.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const n=bp(e);if(!n)return;const r=void 0!==t?t:n.length-1;if(!n[r])return;const o=this.getAttrExps(e,n[r]);if(0===qp(o).length){var i,a;const t=(null===(i=e.qLayoutExclude)||void 0===i||null===(a=i.quarantine)||void 0===a?void 0:a.customTooltip)||[],n=[...o,...t],s=e;s.qHyperCubeDef?s.qHyperCubeDef.qDimensions[r].qAttributeExpressions=n:s.qHyperCube.qDimensionInfo[r].qAttrExprInfo=n}},moveCustomTooltipAttrs(e,t={},n){let r=[];const o=bp(e)||[];[...o,t].forEach((e=>{const t=qp(e.qAttributeExpressions||[]);t.length>0&&(r=t)}));const i=xp(),a=o.map((e=>{const t=e,n=e.qAttributeExpressions||[];return t.qAttributeExpressions=n.filter((e=>!i[e.id])),t})),s=void 0!==n?n:a.length-1;a.length>0&&(a[s].qAttributeExpressions=a[s].qAttributeExpressions.concat(r));const l=e;e.qHyperCubeDef?l.qHyperCubeDef.qDimensions=a:l.qHyperCube.qDimensionInfo=a},addCallbackCustomTooltip(e){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e):(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},moveCallbackCustomTooltip(e,t){1===e.qHyperCubeDef.qDimensions.length&&(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e)),e.qHyperCubeDef.qDimensions.length>1&&this.moveCustomTooltipAttrs(e,t)},removeCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>0?this.moveCustomTooltipAttrs(e,t):this.quarantineCustomTooltipAttrs(e,t)},replaceCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e,t):(this.quarantineCustomTooltipAttrs(e,t),this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},shouldIgnoreDefaultRows(e){var t;return(null===(t=e.tooltip)||void 0===t?void 0:t.hideBasic)||0},DEBOUNCE_THRESHOLD:50,getFooterRow:(e,t)=>[{content:e,style:{"font-style":"italic","font-size":"12px","line-height":"16px",color:"rgba(255, 255, 255, 0.6)","text-align":t?"right":"left",direction:le.detectTextDirection(e)},colspan:2},{}],getImageRow(e,t){const n=le.detectTextDirection(e.src),r=[],o={style:{display:"block","margin-left":"auto","margin-right":"auto",overflow:"hidden",width:e.width,height:e.height}};if("original"===e.size||e.imageError){r.push(t.h("span",{style:{display:"inline-block",height:"100%","vertical-align":"middle"}}));const n=e.imageError?`${e.src}?${Math.random()}`:e.src;r.push(t.h("img",{style:{"max-width":e.width,"max-height":e.height,"vertical-align":"middle"},src:n,referrerpolicy:"no-referrer"})),o.style["text-align"]="center",o.style["white-space"]="nowrap"}else o.style["background-size"]="contain",o.style["background-repeat"]="no-repeat",o.style["background-position"]="center",o.style["background-image"]=`url('${e.src}')`;return[{content:[t.h("div",o,r),""],style:{"text-align":t.rtl?"right":"left",direction:n,"max-width":e.width},colspan:2},{}]}};function Cp(e,t,n,r){var o,i,a;const s=(null===(o=t.qHyperCube)||void 0===o||null===(i=o[n])||void 0===i||null===(a=i[r])||void 0===a?void 0:a.qAttrExprInfo)||[],l=[],u=e.qSubNodes&&e.qSubNodes[r]?e.qSubNodes[r].qAttrExps:e.qAttrExps;return u?(s.forEach(((e,t)=>{const o=u.qValues&&u.qValues[t]?u.qValues[t]:void 0,i=void 0===o?"NaN":function(e,t){let n;switch(e.id){case cp.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case cp.CUSTOM.TITLE:case cp.CUSTOM.DESCRIPTION:case cp.CUSTOM.IMAGES:n=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:n="NaN"}return n}(e,o);l.push({source:{key:"qHyperCube",field:`${n}/${r}/qAttrExprInfo/${t}`},label:i,value:"value"})})),l):l}const wp={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const n=t-1,r="qDimensionInfo";return{field:`${r}/${n}`,value:t=>Cp(t,e,r,n)}}};const Sp={getCustomAttrExps(e,t,n){var r,o;const i={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},a=(null===(r=t.data)||void 0===r||null===(o=r.customTooltipAttrExps)||void 0===o?void 0:o.value)||[];if(Number.isNaN(a))return i;return function(e,t,n,r){const o={[cp.CUSTOM.TITLE]:!0,[cp.CUSTOM.DESCRIPTION]:!0},{attrExps:i,fieldPath:a}=Dp.getAttrExprData(e);return 0===t.length||0===i.length||""===a||i.forEach(((e,i)=>{const s=t[i];if(e.id===cp.CUSTOM.EXPRESSION&&s){const t=e.qFallbackTitle,o="NaN"===s.value||e.isCustomFormatted?s.value:n("qHyperCube").field(`${a}/${i}`).formatter()(s.value);r.customTooltipAttrExpsArr.push({label:t,value:o})}else if(o[e.id]&&s){const t="-"!==s.value&&"NaN"!==s.value?s.value:s.label;t&&"undefined"!==t&&r.customTooltipInfoAttrExpsArr.push({...e.id===cp.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}})),r}(n,a.map((t=>ue.getMeasure(e,t))),e,i)}};function Mp({nodes:e,layout:t,dataset:n}){return function(e,t,n){const r=[];return e.forEach((e=>{r.push(Sp.getCustomAttrExps(n,e,t))})),r}(e,t,n).reduce(((e,t)=>({customTooltipAttrExpsArr:e.customTooltipAttrExpsArr.concat(t.customTooltipAttrExpsArr),customTooltipInfoAttrExpsArr:e.customTooltipInfoAttrExpsArr.concat(t.customTooltipInfoAttrExpsArr)})),{customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]})}function Ep(e){const t=cp.CUSTOM.EXPRESSION,{qNumFormat:n,qLabel:r,qLabelExpression:o,cId:i}=e.qDef;return e.qLibraryId?{qLibraryId:e.qLibraryId,id:t,qNumFormat:n,qLabel:r,qLabelExpression:o,cId:i}:{qExpression:e.qDef.qDef,id:t,qNumFormat:n,qLabel:r,qLabelExpression:o,cId:i}}function Ip(e){var t;const n=null===(t=e.qHyperCubeDef)||void 0===t?void 0:t.qDimensions;return n[n.length-1].qAttributeExpressions||[]}var Ap={attrExpr:{migrateProperties(e){var t,n,r,o;const i=J(!0,{},e),a=(null===(t=i.tooltip)||void 0===t||null===(n=t.data)||void 0===n||null===(r=n.qHyperCubeDef)||void 0===r?void 0:r.qMeasures)||[];let s=Ip(i);return s=function(e,t){return t.concat(e.map((e=>Ep(e))))}(a,s),function(e,t){var n;const r=null===(n=t.qHyperCubeDef)||void 0===n?void 0:n.qDimensions;r[r.length-1].qAttributeExpressions=e}(s,i),null===(o=i.tooltip)||void 0===o||delete o.data,i},getPatches(e){var t,n,r,o;const i=(null===(t=e.tooltip)||void 0===t||null===(n=t.data)||void 0===n||null===(r=n.qHyperCubeDef)||void 0===r?void 0:r.qMeasures)||[],a=(null===(o=e.qHyperCubeDef)||void 0===o?void 0:o.qDimensions.length)-1;return function(e,t,n){let r=e.length;const o=[];return t.forEach((e=>{const t=Ep(e),i=JSON.stringify(t);o.push({qPath:`/qHyperCubeDef/qDimensions/${n}/qAttributeExpressions/${r}`,qOp:"add",qValue:i}),r++})),o.push({qPath:"/tooltip/data",qOp:"remove"}),o}(Ip(e),i,a)},checkForBackwardCompatibility:(e,t)=>(e.qMeasureInfo||[]).length>0&&t.length>0,updateProperties(e,t){return new Promise((n=>{var r,o,i,a,s;const l=(null===(r=t.qHyperCube)||void 0===r?void 0:r.qDimensionInfo)||[],u=(null===(o=t.tooltip)||void 0===o||null===(i=o.data)||void 0===i?void 0:i.qHyperCube)||{},c=null===(a=t.qMeta)||void 0===a||null===(s=a.privileges)||void 0===s?void 0:s.includes("update");e&&e.getEffectiveProperties&&this.checkForBackwardCompatibility(u,l)&&e.getEffectiveProperties().then((t=>{if(c){const r=this.migrateProperties(t);e.setProperties(r).then((()=>{e.app.clearUndoBuffer(),n(!0)}))}else{const r=this.getPatches(t);e.applyPatches(r,!0).then((()=>{e.app.clearUndoBuffer(),n(!0)}))}})),n(!1)}))}}};const{CUSTOM:kp}=cp;function Tp({flags:e,layout:t,app:n,model:r,picasso:o,chart:i,translator:a,localeInfo:s,embed:l,options:u}){var c,p,d;const f=function({layout:e,app:t,picasso:n,model:r,chart:o,translator:i,localeInfo:a,embed:s}){return{layout:e,app:t,picasso:n,model:r,chart:o,translator:i,localeInfo:a,useCustomTooltip:e.tooltip&&!e.tooltip.auto,utils:Dp,miniChartToken:{},embed:s}}({layout:t,app:n,model:r,picasso:o,chart:i,translator:a,localeInfo:s,embed:l}),m="rtl"===u.direction,h=!(!t.tooltip||t.tooltip.auto),g=h&&al(t,"tooltip.hideBasic",!1),y=!!(h&&null!==(c=t.tooltip)&&void 0!==c&&null!==(p=c.chart)&&void 0!==p&&null!==(d=p.object)&&void 0!==d&&d.refId&&l&&"function"==typeof(null==r?void 0:r.getEffectiveProperties));return{isEnabled:()=>h,hideBasic:()=>g,getAttributes:({dataset:e,nodes:n})=>{var r,o;const i=Mp({dataset:e,nodes:n,layout:t});return{title:null===(r=i.customTooltipInfoAttrExpsArr.find((e=>e.id===kp.TITLE)))||void 0===r?void 0:r.title,description:null===(o=i.customTooltipInfoAttrExpsArr.find((e=>e.id===kp.DESCRIPTION)))||void 0===o?void 0:o.value,measures:i.customTooltipAttrExpsArr}},hasImages:()=>Dp.checkIfPromisesExist({customTooltipModel:f}),createImageRow:({value:e,h:t})=>Dp.getImageRow(e,{h:t,rtl:m}),addImages:({nodes:r})=>{const o=Dp.getDataNodes(i,r),a=Dp.getAttrExprData(t);return hp.handlePromises({customTooltipModel:f,nodes:o,attrExps:a,opts:{flags:e,app:n}})},chart:{isEnabled:()=>y,hasLimitation:()=>{var e;return!(null==n||null===(e=n.isInModalSelection)||void 0===e||!e.call(n))},createContainer:({h:e})=>vp.createContainer({layout:t,ctx:{h:e,rtl:m}}),createLimitationRow:()=>Dp.getFooterRow(a.get("properties.tooltip.notselectedmessage"),m),show:({nodes:e,properties:t})=>vp.show({app:n,properties:t,selectedNodes:e,customTooltipModel:f,rtl:m}),hasAlternateState:()=>{var e;return!(null===(e=f.miniChartToken)||void 0===e||!e.alternateState)},hide:()=>vp.hide({app:n,customTooltipModel:f}),destroy:()=>vp.destroyVisualization({customTooltipModel:f})}}}function Lp(e){return{layout:e,keys:{SCALE:{FILL:"fill"},COMPONENT:{DIMENSION_TITLE:"dimension-title",SLICES:"slices",PIE_LABELS:"pie-labels"}}}}function Op({flags:e,picasso:t,instance:n}){const r=w(),o=S(),i=q(),a=y(),[s,l]=b(),u=M(),c=E(),p=I(),d=g(),f=A(),{qLocaleInfo:m}=k(),h=T();return C((()=>{if(!n)return;a.style.overflow="hidden";const s=function(e){var t,n,r,o,i=e.picasso,a=e.model,s=e.app,l=e.translator,u=e.layoutService,c=void 0===u?void 0:u,p=e.createConfig,d=void 0===p?il:p,f=e.config,m=void 0===f?{}:f,h=e.custom,g=void 0===h?{}:h,y=m.localeInfo,v=m.key,b=m.theme,x=void 0===b?void 0:b,q=m.auto,D=void 0===q?void 0:q,C=m.definitionPath,w=null==c||null===(t=c.getLayout)||void 0===t?void 0:t.call(c),S={theme:x,key:v,localeInfo:y,layout:w,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:ha(ha({},null==c||null===(o=c.getLayoutValue)||void 0===o?void 0:o.call(c,"color")),{},{useBaseColors:w?tl(w):void 0})},M=Qs({picasso:i,model:a,app:s,translator:l,auto:D});!1!==D&&M.auto((function(e){return D?D({layout:e,defaultAuto:ol}):ol(e)}));var E=!1;return{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(C)},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 E},custom:ha({},g),initialize:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).createConfig,t=(void 0===e?d:e)({getUseBaseColors:tl}),n=nl(S,t);return M.config(n),M.getAuxiliarySettings(C).then((function(){E=!0}))}}}({picasso:n.picasso,model:r,app:o,translator:i,config:{auto:!1,key:"fill"}}),g=function(e){var t=e.picassoInstance,n=e.plugins,r=e.pluginArgs,o=void 0===r?{}:r,i={initialized:!1,definitions:[]};return{initialize:function(){return da(regeneratorRuntime.mark((function e(){var r,a,s,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!i.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=da(regeneratorRuntime.mark((function e(n){var r;return regeneratorRuntime.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(ha({},o));case 4:if("object"===ca(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)}}())),s=Promise.all(n.filter((function(e){return"component-definition"===e.info.type})).map((function(e){return e.fn(ha({},o))}))),e.next=6,Promise.all([a,s]);case 6:l=e.sent,i.initialized=!0,(r=i.definitions).push.apply(r,va(l[1]));case 9:case"end":return e.stop()}}),e)})))()},extendComponents:function(e){return i.initialized?(i.definitions.filter(Boolean).forEach((function(t){var n=ya(e.filter((function(e){return e.key&&e.key===t.key})),1)[0];if(n){var r=Aa(!0,{},n.brush);Aa(!0,n,t),t.brush&&(n.brush=function(e,t){return"object"===ca(e)&&Object.keys(e).length?(Array.isArray(t.consume)&&(e.consume=cl({originalArray:e.consume,newArray:t.consume,matchKey:"context"})),Array.isArray(t.trigger)&&(e.trigger=cl({originalArray:e.trigger,newArray:t.trigger,matchKey:"on"})),e):t}(r,t.brush))}else e.push(t)})),e):e}}}({picassoInstance:n.picasso,plugins:c,pluginArgs:Lp(u)}),y=Tp({flags:e,layout:u,app:o,model:r,picasso:t,chart:n.chart,translator:i,localeInfo:m,embed:h,options:d}),v=function({chart:e,translator:t,layout:n,constraints:r,options:o,theme:i,colorService:a,custom:s}){const l=n.qHyperCube.qMeasureInfo.length>1,u="rtl"===o.direction;return op({chart:e,translator:t,config:{rtl:u,enable:()=>!r.passive,getColorSettings:()=>a.getSettings(),style:{fontFamily:i.getStyle("object.pieChart","","fontFamily")},main:{key:"tooltip",getGroupByValue:({data:e})=>e.value,collectibles:[{key:"slices",type:"slice",major:({data:e})=>e.value}],triggers:[{keys:["slices"],collect:{from:"single"},placement:"collectible"},{keys:["pie-labels","negative-indicators"],collect:{from:"dimension",by:({data:e})=>e.value},placement:"trigger"}],placement:({meta:e})=>({type:"slices"===e.triggerer?"slice":"bounds"}),section:({h:e,nodes:n,dataset:r,formatter:o,create:i,util:a})=>{const[u]=n,{title:c,description:p,measures:d}=s.isEnabled()?s.getAttributes({dataset:r,nodes:n}):{},f=[];c&&f.push(i.text({value:c,style:{bold:!0}})),p&&f.push(i.text({value:p}));const m=s.hideBasic();if(m&&!d.length&&(c||p)||f.push(i.text({value:u.data.label,style:{bold:!0}})),!m){f.push(i.color({nodes:n,property:"fill"}));const{num:e}=u.data;if(f.push(i.measure({label:a.dataset.title(e.source.key,e.source.field),value:e.label})),l){const{radius:e}=u.data;f.push(i.measure({label:a.dataset.title(e.source.key,e.source.field),value:e.label}))}f.push(i.measure({label:t?t.get("properties.dataPoints.labelmode.share"):"Share",value:o("share")(u.desc.share)}))}d&&f.push(...d.map((e=>i.measure({label:e.label,value:e.value,survive:{color:!0,duplicate:!0}})))),s.chart.isEnabled()&&(s.chart.hasLimitation()?(s.chart.destroy(),f.push(i.raw({value:s.chart.createLimitationRow()}))):f.push(i.raw({value:s.chart.createContainer({h:e})})));const{customTooltipImages:h}=u.data;return s.isEnabled()&&h&&f.push(...h.map((t=>i.raw({value:s.createImageRow({value:t,h:e})})))),f},layout:{grouping:!0},events:{tooltip:{beforeShow:({collectNodes:e})=>s.isEnabled()&&s.hasImages()?s.addImages({nodes:e()}):Promise.resolve(),afterShow:({expando:e,nodes:t})=>{s.chart.isEnabled()&&!s.chart.hasLimitation()&&s.chart.show({nodes:t,properties:e.get("properties")})}},interaction:{mouseleave:()=>{s.chart.isEnabled()&&s.chart.hasAlternateState()&&s.chart.hide()}}}},legend:{keys:{tooltip:"legend-color-cat",component:"legend-cat"}}}})}({app:o,chart:n.chart,translator:i,layout:u,constraints:p,options:d,theme:f,colorService:s,custom:y});l({colorService:s,pluginService:g,tooltipService:v})}),[r,o,n,u,i.language(),p,d.direction,f.name()]),s}function Pp({scaleKey:e,legend:t,onEdited:n}){const{layout:r}=t,{dock:o}=r||{};return{type:"brush-range",key:"legendRangeBrush",layout:{dock:"@legend-seq"},on:n?{bubbleEnd(){n()}}:{},settings:{brush:"selection",scale:e+"Range",direction:"left"===o||"right"===o?"vertical":"horizontal",bubbles:{align:"left"===o||"top"===o?"end":"start",placement:"outside"},target:{selector:'[id="legend-seq-target"]',fillSelector:'[id="legend-seq-ticks"]',fill:"rgba(82,204,82,0.2)"}}}}const Np={CORNER_RADIUS:0,INNER_RADIUS:.55,STROKE:{COLOR:"#FFFFFF",WIDTH:{NONE:0,SMALL:2,MEDIUM:4,LARGE:6}}},Rp=({layout:e},t,n)=>t.encodings.slice.outerRadius?{scale:"radius",fn:t=>{var r,o;let i=.8,a=0;const s=null!==(r=null==n||null===(o=n.style)||void 0===o?void 0:o.innerRadius)&&void 0!==r?r:.55;e.donut.showAsDonut&&(i=.8-s,a=s);return t.scale(Math.max(0,t.datum.radius.value))*i+a}}:.8,Fp=({layout:e},t,n)=>{var r,o;if(!e.donut.showAsDonut)return 0;const i=null!==(r=null==n||null===(o=n.style)||void 0===o?void 0:o.innerRadius)&&void 0!==r?r:.55;return t.encodings.slice.outerRadius?{scale:"radius",fn:e=>{const t=.8-i,n=i;return e.scale(Math.min(0,e.datum.radius.value))*t+n}}:i},jp=({layout:e},t)=>{var n,r,o,i,a,s;const l=t.colorService.getDatumProps(),u=l[Object.keys(l)[0]],c=u&&u.field?u.field:void 0,p="qDimensionInfo/0"===c,d=c?t.ds.field(c).raw():null,f=d&&(d.label||d.title||d.qFallbackTitle)||"",m=t.encodings.slice.outerRadius,{formatter:h}=t.chart,g=re(e,"qHyperCube.qDimensionInfo",[]).length;function y(e,n){const r=t.ds.field(e).raw();return{field:e,label:!r.isCustomFormatted&&(r.qIsAutoFormat||"U"===r.qNumFormat.qType)?e=>h(n)(e.qNum):e=>e.qText}}const v=(e.components||[]).filter((e=>"slices"===e.key))[0];return{type:"pie",key:"slices",data:{extract:{field:"qDimensionInfo/0",props:{...l,num:y(t.encodings.slice.arc,"arc"),fillTooltip:c?{field:c,label:f,value:e=>p?e.qText||"-":void 0!==e.qNum&&"NaN"!==e.qNum?e.qText?e.qText:e.qNum:e.qText||"-"}:void 0,customTooltipAttrExps:0!==g?wp.getNode(e,{dimensionCount:g}):void 0,radius:m?y(m,"outerRadius"):void 0}}},brush:{consume:[{context:"selection",data:["","fill"],style:{inactive:{opacity:.3},active:{stroke:"rgba(52, 52, 52, 0.7)",strokeWidth:2}}},{context:"highlight",data:[""],style:{inactive:{fill:"#BFDAD9"},active:{fill:"#68B2AF"}}}]},settings:{startAngle:()=>t.viewState.get("rotation"),endAngle:()=>t.viewState.get("rotation")+2*Math.PI,slice:{arc:{ref:"num"},innerRadius:Fp({layout:e},t,v),fill:t.colorService.getColor(),strokeWidth:null!=v&&null!==(n=v.style)&&void 0!==n&&n.strokeWidth?Np.STROKE.WIDTH[v.style.strokeWidth.toUpperCase()]:Np.STROKE.WIDTH.NONE,stroke:null!==(r=null==v||null===(o=v.style)||void 0===o||null===(i=o.strokeColor)||void 0===i?void 0:i.color)&&void 0!==r?r:Np.STROKE.COLOR,outerRadius:Rp({layout:e},t,v),cornerRadius:null!==(a=null==v||null===(s=v.style)||void 0===s?void 0:s.cornerRadius)&&void 0!==a?a:0}},animations:{enabled:t.animations.enabled,transitionPhaseDisabled:t.animations.transitionPhaseDisabled,trackBy:e=>e.data.value}}};function Hp({layout:e},t,n){var r,o;const i=(e.components||[]).filter((e=>"slices"===e.key))[0],a=null!==(r=null==i||null===(o=i.style)||void 0===o?void 0:o.innerRadius)&&void 0!==r?r:.55,s=t.encodings.slice.outerRadius;return!(!e.donut.showAsDonut||!s)&&{type:"pie",key:"zeroLine",data:{items:[1]},settings:{slice:{arc:1,fill:"transparent",innerRadius:0,strokeWidth:1,stroke:j(n.theme,"object.pieChart","label.name","color")||"#333",outerRadius:{scale:"radius",fn:e=>{const t=.8-a,n=a;return e.scale(0)*t+n}}}},animations:{enabled:t.animations.enabled,transitionPhaseDisabled:t.animations.transitionPhaseDisabled}}}function _p(e){return{type:"pie-dividers",key:"pie-dividers",layout:{displayOrder:2},settings:{component:"slices",selector:"path"},brush:{consume:[{context:"selection",style:{inactive:{opacity:.2}}}]},animations:{enabled:e.animations.enabled,transitionPhaseDisabled:e.animations.transitionPhaseDisabled,trackBy:()=>Math.random()}}}function zp({layout:e},t,n){return!(e.donut.showAsDonut||!t.encodings.slice.outerRadius)&&{type:"negative-indicators",key:"negative-indicators",layout:{displayOrder:2},settings:{component:"slices",selector:"path",offset:5,size:4,fill:j(n.theme,"object.pieChart","label.name","color")||"#333"},brush:{consume:[{context:"selection",style:{inactive:{opacity:.2}}}]},animations:{enabled:t.animations.enabled,transitionPhaseDisabled:t.animations.transitionPhaseDisabled,trackBy:e=>e.data.value}}}const{getThemeStyle:Vp}=H;function Up(e){const t=e.node.desc&&e.node.desc.share;return t?e.formatter("share")(t):""}function Bp(e){return e.node.data.num.label}function Wp(e){return e.node.data.radius.label}function $p(e,t,n){if(e.dataPoint.auto)return n?Bp:Up;if("share"===e.dataPoint.labelMode)return Up;if("value"===e.dataPoint.labelMode){return t.encodings.slice.outerRadius&&"radius"===e.dataPoint.labelValueMode?Wp:Bp}return null}function Yp({data:e}){return e?e.label:""}function Kp(e,t,n){const r=parseInt(Vp(e,"object.pieChart",t,n),10);if(!isNaN(r))return r}function Jp(e){const t=((e&&e.components?e.components:void 0)||[]).filter((e=>"slices"===e.key))[0];return!t||t.style.innerRadius>.3}function Gp({node:e,data:t}){return J({_share:e.desc.share,_fillColor:e.attrs.fill},t)}function Zp(e,t,n){const r=[{padding:10,direction:t.encodings.slice.outerRadius?"rotate":"horizontal",placements:[{position:"outside",fill:Vp(n.theme,"object.pieChart","label.name","color"),padding:t.encodings.slice.outerRadius?4:2}],fontSize:Kp(n.theme,"label.name","fontSize"),fontFamily:Vp(n.theme,"object.pieChart","label.name","fontFamily"),label:Yp,linkData:({node:e,data:t})=>J({_share:e.desc.share,_fillColor:e.attrs.fill,_showTooltip:!0},t)}];if($p(e,t,!1)){const o=function(e,t,n){return{label:$p(e,t,!1),simplifiedPlacements:[{position:e.donut.showAsDonut&&Jp(e)?"inside":"into",onBackground:e.donut.showAsDonut&&Jp(e),padding:4}],theme:n.theme,themeId:"object.pieChart"}}(e,t,n),i=de(J(t,o),n.theme);i.linkData=Gp,r.push(i)}return{key:"pie-labels",type:"labels",layout:{displayOrder:2,minimumLayoutMode:"XSMALL"},settings:{sources:[{component:"slices",selector:"path",strategy:{type:"slice",settings:{labels:r}}}]},brush:{consume:[{context:"selection",data:["","fill"],style:{inactive:{opacity:.3}}}]},animations:{enabled:t.animations.enabled,transitionPhaseDisabled:t.animations.transitionPhaseDisabled,trackBy:e=>"text"===e.type?`${e.text} ${e.data.value}`:Math.random()}}}function Xp({layout:e,context:t},n){return!1!==e.dataPoint.show&&(1===n.dataRowCount?function(e,t,n){const r=$p(e,t,!0),o=(e=>t=>e.getContrastingColorTo(t.node.attrs.fill))(n.theme);return{key:"pie-labels",type:"labels",layout:{displayOrder:2,minimumLayoutMode:"XSMALL"},settings:{sources:[{component:"slices",selector:"path",strategy:{type:"rows",settings:{align:.5,justify:.5,padding:10,labels:[{fill:e.donut.showAsDonut?n.theme.getStyle("object.pieChart","label.name","color"):o,fontSize:Kp(n.theme,"label.name","fontSize"),fontFamily:Vp(n.theme,"object.pieChart","label.name","fontFamily"),label:Yp,linkData:({data:e})=>e},{fill:e.donut.showAsDonut?n.theme.getStyle("object.pieChart","label.value","color"):o,fontSize:Kp(n.theme,"label.value","fontSize"),fontFamily:Vp(n.theme,"object.pieChart","label.value","fontFamily"),label:r,linkData:({data:e})=>e}]}}}]}}}(e,n,t):Zp(e,n,t))}const Qp=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Pan",requireFailure:t,recognizeWith:n,options:{event:"legendRange",enable(t,n){if(this.started||!n)return!0;if(e.constraints.select||e.constraints.active)return!1;const r=(this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((e=>"legend-seq"===e.type))||function(e){const{target:t}=e.srcEvent;return!(!t||!(t.hasAttribute("data-other-value")&&t.hasAttribute("data-idx")||"INPUT"===t.nodeName))}(n))&&!e.isLocked([this.chart.component("slices")]);return r||this.chart.component("legendRangeBrush").emit("rangeClear"),r}},events:{legendRangestart(t){t.preventDefault(),e.interactions.emit("selections-start"),this.chart.component("legendRangeBrush").emit("rangeStart",t),this.started=!0},legendRangemove(e){e.preventDefault(),this.chart.component("legendRangeBrush").emit("rangeMove",e)},legendRangeend(t){t.preventDefault(),this.chart.component("legendRangeBrush").emit("rangeEnd",t),e.onSelect(),this.started=!1}}});function ed(e,t){const n=t.element.getBoundingClientRect();let r,o;return e.center?(({x:r}=e.center),({y:o}=e.center)):(r=e.clientX,o=e.clientY),{x:r-n.left,y:o-n.top}}function td(e,t){const n=t.component("slices");if(!n)return!1;const{x:r,y:o}=ed(e,t),i=n.rect.x+n.rect.margin.left+n.rect.width/2,a=n.rect.y+n.rect.margin.top+n.rect.height/2,s=Math.min(n.rect.width,n.rect.height)/2*.8;return(i-r)**2+(a-o)**2<=s**2}const nd=(e,t,{requireFailure:n,recognizeWith:r}={})=>({type:"Tap",requireFailure:n,recognizeWith:r,options:{event:"tap",interval:10,pointers:1,enable(t,n){return!n||!e.constraints.select&&!e.constraints.active&&(this.components=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter((e=>"slices"===e.key||"legend-cat"===e.key||"pie-labels"===e.key)),this.components.length)}},events:{tap(n){n.preventDefault();const{target:r}=n.srcEvent;if(r&&("INPUT"===r.nodeName||r.hasAttribute("data-other-value")))return void this.chart.component("legendRangeBrush").emit("bubbleStart",n);if(r&&r.hasAttribute("data-action")&&r.hasAttribute("data-component-key"))return void this.chart.component(r.getAttribute("data-component-key")).emit(r.getAttribute("data-action"));if(r&&r.children&&r.children[0]&&"legend-cat"===r.children[0].getAttribute("data-component-key"))return;if(e.isLocked(this.components))return;e.interactions.emit("selections-start");let o=ed(n,this.chart);this.components.some((e=>"legend-cat"===e.key))&&(o={cx:o.x,cy:o.y,r:5});const i=this.chart.shapesAt(o,{components:[{key:"slices",propagation:"stop"},{key:"legend-cat",propagation:"stop"},{key:"pie-labels",propagation:"stop"}],propagation:"stop"});i.length&&(this.chart.brushFromShapes(i,{components:[{key:i[0].key,action:n.srcEvent.ctrlKey||t?"set":"toggle",contexts:["selection"]}]}),e.onSelect())}}}),rd=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Pan",requireFailure:t,recognizeWith:n,options:{event:"lasso",enable(t,n){if(this.isStarted||!n)return!0;if(e.constraints.active||e.constraints.select||!e.interactions.lasso.active())return!1;const r=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y});return!e.isLocked(r)&&r.some((e=>"slices"===e.key))}},events:{lassostart(t){t.preventDefault(),e.constraints.select||e.constraints.active||this.isStarted||(e.interactions.emit("selections-start"),this.chart.component("lasso").emit("lassoStart",t),this.isStarted=!0)},lassomove(e){e.preventDefault(),this.chart.component("lasso").emit("lassoMove",e)},lassoend(t){t.preventDefault(),this.isStarted=!1,this.chart.component("lasso").emit("lassoEnd",t),e.onSelect()}}}),od=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Tap",requireFailure:t,recognizeWith:n,options:{event:"areatap",pointers:2,enable(t,n){if(this.started||!n)return!0;if(e.constraints.active||e.constraints.select)return!1;const r=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y});return r.some((e=>"slices"===e.key))&&!e.isLocked(r)}},events:{areatap(t){const n=this.chart.component("area");n&&!this.started&&(e.interactions.emit("selections-start"),n.emit("areaStart",t.pointers[0]),n.emit("areaMove",t.pointers[1]),this.started=!0,setTimeout((()=>{n.emit("areaEnd"),e.onSelect(),this.started=!1}),100)),t.preventDefault()}}});function id(e){return{type:"native",key:"theusual",events:{wheel(t){let n=!1;if(!e.constraints.active&&td(t,this.chart)){const r=Math.sign(-t.deltaY);e.viewState.set("rotation",r*(Math.PI/12)),n=!0}else if(!e.constraints.select&&!e.constraints.active){const e=this.chart.componentsFromPoint(t).filter((e=>"legend-cat"===e.key))[0];e&&(n=!0,function(e,t){const n=(Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY)>=0?"next":"prev";t.emit(n)}(t,e))}n&&t.preventDefault()}}}}const ad=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Pan",requireFailure:t,recognizeWith:n,options:{event:"rotate",pointers:1,threshold:10,enable(t,n){return!(!this.started&&n)||!e.constraints.active&&!e.interactions.lasso.active()&&td(n,this.chart)}},events:{rotatestart(e){e.preventDefault();const t=this.chart.component("slices").rect,n=this.chart.element.getBoundingClientRect();this.pieCenter={x:n.left+t.x+t.width/2,y:n.top+t.y+t.height/2},this.prevAngle=Math.atan2(e.center.y-this.pieCenter.y,e.center.x-this.pieCenter.x),this.started=!0},rotatemove(t){t.preventDefault();const n=Math.atan2(t.center.y-this.pieCenter.y,t.center.x-this.pieCenter.x);e.viewState.set("rotation",n-this.prevAngle),this.prevAngle=n},rotateend(e){e.preventDefault(),this.started=!1},rotatecancel(e){e.preventDefault(),this.started=!1}}}),sd=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Pan",requireFailure:t,recognizeWith:n,options:{event:"legendPan",pointers:1,threshold:10,enable(t,n){return!(!this.isStarted&&n)||!e.constraints.active&&this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((e=>"legend-cat"===e.type))}},events:{legendPanstart(e){if(e.preventDefault(),!this.isStarted){this.components=this.chart.componentsFromPoint({x:e.center.x,y:e.center.y}),this.components.forEach((t=>{t.emit("panstart",e)})),this.isStarted=!0;const t=this.chart.component("tooltip");t&&t.show&&t.emit("hide")}},legendPanmove(e){this.components.forEach((t=>{t.emit("panmove",e)})),e.preventDefault()},legendPanend(e){e.preventDefault(),this.components.forEach((t=>{t.emit("panend",e)})),this.isStarted=!1}}}),ld=(e,t,n)=>({key:"hammered",type:"hammer",enable:!0,gestures:t?[ad(e,{}),nd(e,t,{}),...n]:[Qp(e,{}),od(e,{}),ad(e,{}),rd(e,{}),sd(e,{}),nd(e,t,{}),...n]});function ud(e,t,n){const r=e.getIsSingleSelect(0),{constraints:o}=n;if(o.active&&o.passive)return[];const i=t.tooltipService.getInteractions();return[ld(t,r,i.gestures),id(t),i.native]}function cd({settings:e},t){const n={share:{type:"d3-number",format:".1%"},arc:{data:{field:t.encodings.slice.arc}},fill:e.scales.fill&&e.scales.fill.data&&e.scales.fill.data.field?{data:{field:e.scales.fill.data.field}}:{}};return t.encodings.slice.outerRadius&&(n.outerRadius={data:{field:t.encodings.slice.outerRadius}}),n}function pd({layout:e},t,n){if(!e.dimensionTitle)return!1;const r=t.properties;return{key:"dimension-title",type:"data-title",layout:{minimumLayoutMode:"SMALL",dock:"top"},settings:{hyperCube:e.qHyperCube,hyperCubeDef:r&&r.qHyperCubeDef,isDimension:!0,disabled:()=>n.constraints.active||!n.model,model:t.model,app:t.app,translator:t.translator,rtl:n.rtl,selections:t.selections},style:{fontFamily:n.theme.getStyle("object","axis.title","fontFamily"),fontSize:n.theme.getStyle("object","axis.title","fontSize"),color:n.theme.getStyle("object","axis.title","color")}}}function dd({layout:e},t,n){return function(e,t,n,r={}){if(!e)return!1;const{translator:o}=t,{rtl:i}=n;return{key:"disclaimer",type:"disclaimer",layout:{dock:X[e].alignment},settings:{label:o.get("Object.Disclaimer."+e),rtl:i},style:r}}(function(e,t){const n={field:"qDimensionInfo/0",props:{num:{field:t.encodings.slice.arc}}};t.encodings.slice.outerRadius&&(n.props.radius={field:t.encodings.slice.outerRadius});let r=t.ds.extract(n);if(0===r.length)return"NoDataExist";const o=re(e,"qHyperCube.qSize.qcy");if(re(e,"qHyperCube.qDataPages.0.qArea.qHeight")<o)return"LimitedData";if(r=t.encodings.slice.outerRadius?r.filter((e=>"NaN"!==e.num.value&&"NaN"!==e.radius.value)):r.filter((e=>"NaN"!==e.num.value)),0===r.length)return"OnlyNanData";const i=r;return r=t.encodings.slice.outerRadius&&!e.donut.showAsDonut?r.filter((e=>e.num.value>0&&e.radius.value>0)):r.filter((e=>e.num.value>0)),0===r.length?"OnlyNegativeOrZeroValues":i.length!==r.length&&"NegativeOrZeroValues"}(e,t),t,n,{fontFamily:n.theme.getStyle("","","fontFamily")})}function fd({layout:e,context:t,selectionService:n},r={}){const o=function({layout:e}={},t={}){const n={};return J(n,t.colorService.getScales()),t.encodings.slice.outerRadius&&J(n,function({layout:e},t){const n={radius:{type:"linear",include:[0],data:{extract:{field:t.encodings.slice.outerRadius}}}};return e.donut.showAsDonut||(n.radius.min=0),n}({layout:e},t)),n}({layout:e},r),i={scales:o};let a=[];const s=dd({layout:e},r,t);if(s&&"center"===s.layout.dock)return{components:[s]};const l=t.constraints.select||t.constraints.active,u=r.colorService.getLegend({eventName:"legend",key:"legend",viewState:r.viewState,chart:r.chart,styleReference:"object.pieChart",rtl:t.rtl},{navigationDisabled:l});return o.fillRange&&u.components[0]&&("right"===u.components[0].layout.dock||"left"===u.components[0].layout.dock||t.rtl)&&(o.fillRange.invert=!0),a=[jp({layout:e,settings:i},r),Hp({layout:e},r,t),_p(r),zp({layout:e},r,t),pd({layout:e},r,t),...u.components,Pp({settings:i,scaleKey:"fill",legend:u.components[0]||{},onEdited:r.onSelect}),{key:"lasso",type:"brush-lasso",layout:{displayOrder:99},settings:{brush:{components:[{key:"slices",contexts:["selection"]}]},lasso:{fill:"rgba(0, 0, 0, 0)",stroke:"black",strokeWidth:2,opacity:.7,strokeDasharray:[]},snapIndicator:{threshold:75,strokeDasharray:"5, 5",stroke:"black",strokeWidth:2,opacity:.7},startPoint:{r:10,stroke:"rgba(77, 192, 78, 1)",strokeWidth:0,opacity:1}}},{key:"area",type:"brush-area",settings:{brush:{components:[{key:"slices",contexts:["selection"],action:"add"}]}},style:{area:{fill:"transparent",strokeWidth:2,stroke:"black",strokeDasharray:"5 5",opacity:.7}}},Xp({layout:{components:e.components,dataPoint:J({},e.dataPoint,{show:!(e.effectPath&&e.snapshotData&&!1===e.dataPoint.show)}),donut:e.donut},context:t},r),...r.tooltipService.getComponents(),(!1!==e.showDisclaimer||!r.flags.isEnabled("SHOW_DISCLAIMER"))&&s],a=a.filter((e=>!1!==e)),{interactions:ud(n,r,t),scales:o,components:r.pluginService.extendComponents(a),palettes:r.colorService.getPalettes(),formatters:cd({settings:i},r),strategy:ne(0,r)}}let md,hd=new Set;function gd(e,t){for(const n of t)if(e.has(n))return!1;return!0}function yd({instance:e,services:t}){const n=y(),r=M();P((o=>{if(!(r.snapshotData&&r.snapshotData.content&&r.snapshotData.content.chartData)&&(function(e,t){const n=t.getBoundingClientRect();e.snapshotData=e.snapshotData||{},e.snapshotData.content=e.snapshotData.content||{},e.snapshotData.content.size=e.snapshotData.content.size||{w:n.width,h:n.height}}(o,n),e&&t))return function({layout:e,chart:t,viewState:n,colorService:r}){return e.snapshotData.content=e.snapshotData.content||{},e.snapshotData.content.chartData={legendScrollOffset:oe(t,"legend-cat"),rotation:n.get("rotation")},r.getSnapshotData().then((t=>{e.snapshotData.content.chartData={...e.snapshotData.content.chartData,...t}})).catch((()=>{}))}({layout:o,chart:e.chart,colorService:t.colorService,viewState:e.viewState})})),N((()=>({getViewState:()=>({rotation:e.viewState.get("rotation"),legendScrollOffset:oe(e.chart,"legend-cat")})})),[e])}var vd={exports:{}};window;var bd=_(vd.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/conversion/",n(n.s=2)}([function(e,t,n){var r=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===o.call(e)},l=function(e){if(!e||"[object Object]"!==o.call(e))return!1;var t,n=r.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&r.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!i)return!1;for(t in e);return void 0===t||r.call(e,t)},u=function(e,t){i&&"__proto__"===t.name?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},c=function(e,t){if("__proto__"===t){if(!r.call(e,t))return;if(a)return a(e,t).value}return e[t]};e.exports=function e(){var t,n,r,o,i,a,p=arguments[0],d=1,f=arguments.length,m=!1;for("boolean"==typeof p&&(m=p,p=arguments[1]||{},d=2),(null==p||"object"!=typeof p&&"function"!=typeof p)&&(p={});d<f;++d)if(null!=(t=arguments[d]))for(n in t)r=c(p,n),p!==(o=c(t,n))&&(m&&o&&(l(o)||(i=s(o)))?(i?(i=!1,a=r&&s(r)?r:[]):a=r&&l(r)?r:{},u(p,{name:n,newValue:e(m,a,o)})):void 0!==o&&u(p,{name:n,newValue:o}));return p}},function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/qlik-modifiers/",n(n.s=1)}([function(e,t,n){var r=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===o.call(e)},l=function(e){if(!e||"[object Object]"!==o.call(e))return!1;var t,n=r.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&r.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!i)return!1;for(t in e);return void 0===t||r.call(e,t)},u=function(e,t){i&&"__proto__"===t.name?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},c=function(e,t){if("__proto__"===t){if(!r.call(e,t))return;if(a)return a(e,t).value}return e[t]};e.exports=function e(){var t,n,r,o,i,a,p=arguments[0],d=1,f=arguments.length,m=!1;for("boolean"==typeof p&&(m=p,p=arguments[1]||{},d=2),(null==p||"object"!=typeof p&&"function"!=typeof p)&&(p={});d<f;++d)if(null!=(t=arguments[d]))for(n in t)r=c(p,n),p!==(o=c(t,n))&&(m&&o&&(l(o)||(i=s(o)))?(i?(i=!1,a=r&&s(r)?r:[]):a=r&&l(r)?r:{},u(p,{name:n,newValue:e(m,a,o)})):void 0!==o&&u(p,{name:n,newValue:o}));return p}},function(e,t,n){n.r(t);var r=n(0),o=n.n(r),i=function(e,t,n){if(!t)return!1;var r,o=t.split("."),i=o[o.length-1],a=e;for(r=0;r<o.length-1;++r)void 0===a[o[r]]&&(a[o[r]]=Number.isNaN(+o[r+1])?{}:[]),a=a[o[r]];if(void 0!==n){var s=a[i];return a[i]=n,{updated:n,previous:s}}return delete a[i],!1},a=function(e,t,n){var r,o=t.split("."),i=e;if(void 0===i)return n;for(r=0;r<o.length;++r){if(void 0===i[o[r]])return n;i=i[o[r]]}return i},s="".concat(" ","(").concat(" "),l="".concat(" ",")").concat(" ");function u(e){return s+e+l}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var n=function(e,t){if(!t)return null;var n,r;for(n=0;n<t.length;n++)if((r=t[n]).qInfo.qId===e)return r;return null}(e.qLibraryId,t.dimensionList);return n&&n.qData.info[0].qTags.indexOf("$numeric")>-1}var r=function(e,t){if(!t)return null;var n,r,o=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var n=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(n)&&(t=(t=t.substring(1,n)).trim()),t}(e);for(n=0;n<t.length;n++){if((r=t[n]).qName===o)return r;if(r.qDerivedFieldData)for(var i=0;i<r.qDerivedFieldData.qDerivedFieldLists.length;++i)for(var a=r.qDerivedFieldData.qDerivedFieldLists[i],s=0;s<a.qFieldDefs.length;++s){var l=a.qFieldDefs[s];if(l.qName===o)return l}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return r&&r.qTags.indexOf("$numeric")>-1}function p(e){return!(!e.fullAccumulation&&!e.fullRange)}function d(e,t){var n=e.crossAllDimensions;return 2===t&&n?"RowNo(Total)":"RowNo()"}function f(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e).trim();return"="===t.substring(0,1)?t.substring(1).trim():t}function m(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function h(e,t){var n=e.crossAllDimensions;return 2===t&&n?"Above(Total ":"Above("}function g(e){return void 0===e?")":", 0, ".concat(e,")")}function y(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=MinString(").concat(t,"))' and Only({1}").concat(t,")<='$(=MaxString(").concat(t,"))'\"}")}function v(e){var t=e.modifier,n=void 0===t?{}:t,r=e.dimensions,o=e.dimensionAndFieldList,i=e.funcComp,a=void 0===i?"Sum":i,s=e.valueComp,l=void 0===s?"0":s;if(!n.showExcludedValues)return"";if(r&&1===r.length){var u=y(c(r[0],o),m(0));return"".concat(a,"({1<").concat(u,">}").concat(l,")")}if(r&&2===r.length){var p=c(r[0],o),d=c(r[1],o),f=m(0),h=m(1),g=y(p,f),v=y(d,h);return"".concat(a,"({1<").concat(g,",").concat(v,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function b(e){return"".concat(e,"(")}function x(e){var t=e.properties,n=e.layout;return a(t,"qHyperCubeDef.qDimensions",a(n,"qHyperCube.qDimensionInfo",[])).length}var q={isFullRange:p,getNumDimensions:x,getExpressionWithExcludedComp:function(e){var t=e.expression,n=e.modifier,r=e.dimensions,o=e.dimensionAndFieldList,i=e.treatMissingAsNull,a=u(f(t));if(!n.showExcludedValues)return a;var s=v({modifier:n,dimensions:r,dimensionAndFieldList:o}),l=i?"":", 0";if(r&&1===r.length){var c=m(0);return"If(Count(".concat(c,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(r&&2===r.length){var p=m(0),d=m(1);return"If(Count(".concat(p,") * Count(").concat(d,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:d,getNumStepComp:function(e,t){if(!p(e)){var n=e.steps;return"number"!=typeof n||Number.isNaN(n)?6:n}return d(e,t)},getAboveCompPrefix:h,getAboveCompSuffix:g,getAboveComp:function(e,t,n,r){return h(e,t)+n+g(r)},getFunctionPrefix:b,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return b(e)+t+")"},getAggrComp:function(e,t,n){return"Aggr(".concat(e,", ").concat(t,", ").concat(n,")")},getExcludedComp:v,needDimension:function(e){var t=e.modifier,n=e.properties,r=e.layout;return 0===function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t)&&2===x({properties:n,layout:r})},getDimComp:function(e,t){var n=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),r=m(t);if(!n.qSortByExpression&&!n.qSortByNumeric&&!n.qSortByAscii)return r;var o=["Descending","Ascending"],i=n.qSortByNumeric?"(Numeric, ".concat(o[(n.qSortByNumeric+1)/2],")"):"",a=n.qSortByAscii?"(Text, ".concat(o[(n.qSortByAscii+1)/2],")"):"";return n.qSortByNumeric&&n.qSortByAscii?"(".concat(r,", ").concat(i,", ").concat(a,")"):n.qSortByNumeric?"(".concat(r,", ").concat(i,")"):n.qSortByAscii?"(".concat(r,", ").concat(a,")"):r},simplifyExpression:f,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var n=t.indexOf(s);if(-1!==n){var r=t.indexOf(l);if(-1!==r)return t.substring(n+s.length,r)}}},initModifier:function(e,t){Object.keys(t).forEach((function(n){void 0===e[n]&&(e[n]=t[n])}))},isNumeric:c,isApplicable:function(e){var t=e.properties,n=e.layout,r=e.minDimensions,o=void 0===r?1:r,i=e.maxDimensions,a=void 0===i?2:i;if(!t&&!n)return!0;var s=x({properties:t,layout:n});return s>=o&&s<=a},getExpressionWithMarkers:u,canExtract:function(e){var t=e.indexOf(s),n=e.indexOf(l);return t>-1&&n>-1&&t<n},getDimDefWithWrapper:m,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")}};function D(e){return(D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var C=o.a.bind(null,!0),w={},S=Array.isArray;function M(e){return null!=e&&!Array.isArray(e)&&"object"===D(e)}function E(e){return void 0===e}function I(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function A(e,t){var n,r=t.substring(1).split("/").slice(0,-1);return r.forEach((function(t,o){if(o!==r.length){n=+t;var i=Number.isNaN(n)?{}:[];e[n||t]=E(e[n||t])?i:e[t],e=e[n||t]}})),e}function k(e,t){var n=!0;if(M(e)&&M(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((function(r){k(e[r],t[r])||(n=!1)})),n);if(S(e)&&S(t)){if(e.length!==t.length)return!1;for(var r=0,o=e.length;r<o;r+=1)if(!k(e[r],t[r]))return!1;return!0}return e===t}w.generate=function(e,t,n){n=n||"";var r=[];return Object.keys(t).forEach((function(o){var i=function(e){return e?C({},{val:e}).val:e}(t[o]),a=e[o],s="".concat(n,"/").concat(o);k(i,a)||I(t,o)||(E(a)?r.push({op:"add",path:s,value:i}):M(i)&&M(a)?r=r.concat(w.generate(a,i,s)):S(i)&&S(a)?r=r.concat(function(e,t,n){var r=[],o=e.slice(),i=-1;function a(e,t,n){if(e[n]&&E(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(var r=0,o=e.length;r<o;r+=1)if(e[r]&&e[r].qInfo.qId===t)return r;return-1}if(k(t,o))return r;if(!E(t[0])&&E(t[0].qInfo))return r.push({op:"replace",path:n,value:t}),r;for(var s=o.length-1;s>=0;s-=1)-1===(i=a(t,o[s].qInfo&&o[s].qInfo.qId,s))?(r.push({op:"remove",path:"".concat(n,"/").concat(s)}),o.splice(s,1)):r=r.concat(w.generate(o[s],t[i],"".concat(n,"/").concat(s)));for(var l=0,u=t.length;l<u;l+=1)-1===(i=a(o,t[l].qInfo&&t[l].qInfo.qId))?(r.push({op:"add",path:"".concat(n,"/").concat(l),value:t[l]}),o.splice(l,0,t[l])):i!==l&&(r.push({op:"move",path:"".concat(n,"/").concat(l),from:"".concat(n,"/").concat(i)}),o.splice(l,0,o.splice(i,1)[0]));return r}(a,i,s)):r.push({op:"replace",path:"".concat(n,"/").concat(o),value:i}))})),Object.keys(e).forEach((function(o){E(t[o])&&!I(e,o)&&r.push({op:"remove",path:"".concat(n,"/").concat(o)})})),r},w.apply=function(e,t){t.forEach((function(t){var n,r=A(e,t.path),o=t.path.split("/").splice(-1)[0],i=o&&Number.isNaN(+o)?r[o]:r[+o]||r,a=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(r=null,i=e),"add"===t.op||"replace"===t.op)if(S(r))"-"===o&&(o=r.length),r.splice(+o,"add"===t.op?0:1,t.value);else if(S(i)&&S(t.value)){var s,l=t.value.slice();i.length=0,(s=i).push.apply(s,function(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}(l))}else if(M(i)&&M(t.value))n=i,Object.keys(n).forEach((function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!I(n,e)&&delete n[e]})),C(i,t.value);else{if(!r)throw new Error("Patchee is not an object we can patch");r[o]=t.value}else if("move"===t.op){var u=A(e,t.from);S(r)?r.splice(+o,0,u.splice(+a,1)[0]):(r[o]=u[a],delete u[a])}else"remove"===t.op&&(S(r)?r.splice(+o,1):delete r[o])}))},w.clone=function(e){return C({},e)},w.createPatch=function(e,t,n){var r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},w.updateObject=function(e,t){Object.keys(e).length?w.apply(e,w.generate(e,t)):C(e,t)};var T=w,L=function(e,t,n){if(!e)return Promise.resolve();var r=T.generate(t,n);return o()(!0,t,n),r&&r.length?(r=r.map((function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}})),e.applyPatches(r,!0)):Promise.resolve()},O="accumulation";function P(e,t){var n=a(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===O)return n[r]}function N(e,t){var n=function(e,t){var n=a(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===O)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var R={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""},F={translationKey:"properties.modifier.accumulation",needDimension:q.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return q.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,o=e.layout,i=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=i;void 0===l&&(l=q.getNumDimensions({properties:r,layout:o}));var u=a(r,"qHyperCubeDef.qDimensions",[]),c=q.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:u,dimensionAndFieldList:s}),p=q.getNumStepComp(n,l),d=q.getAboveComp(n,l,c,p),f=q.getRangeComp("RangeSum",d);if(q.needDimension({modifier:n,properties:r,layout:o})){var m=q.getDimComp(u,1),h=q.getDimComp(u,0),g=q.getAggrComp(f,m,h);f=n.showExcludedValues?q.getExcludedComp({modifier:n,dimensions:u,dimensionAndFieldList:s,valueComp:g}):g}return f},extractInputExpression:q.extractInputExpression,initModifier:function(e){q.initModifier(e,R)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!q.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(N(t,e),".accumulationDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.accumulation.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(N(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.accumulation.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(N(t,e),".fullAccumulation")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(N(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=P(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=P(t,e);return n&&!n.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(N(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return q.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(O))return!1;var i=P(t,e);return i&&!i.disabled}}}},j="movingAverage";function H(e,t){var n=a(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===j)return n[r]}function _(e,t){var n=function(e,t){var n=a(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===j)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var z={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1},V={translationKey:"properties.modifier.movingAverage",needDimension:q.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return q.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,n=e.expression,r=e.modifier,o=e.properties,i=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!r)return n;var u=s;void 0===u&&(u=q.getNumDimensions({properties:o,layout:i}));var c=a(o,"qHyperCubeDef.qDimensions",[]),p=r.showExcludedValues&&r.nullSuppression,d=q.getExpressionWithExcludedComp({expression:n,modifier:r,dimensions:c,dimensionAndFieldList:l,treatMissingAsNull:p}),f=q.getNumStepComp(r,u),m=q.getAboveComp(r,u,d,f);if(r.nullSuppression)t=q.getRangeComp("RangeAvg",m);else{var h=q.getRangeComp("RangeSum",m),g=function(e,t){var n=q.getRowNoComp(e,t);if(!q.isFullRange(e)){var r=e.steps,o="number"!=typeof r||Number.isNaN(r)?6:r;return"RangeMin(".concat(o,", ").concat(n,")")}return n}(r,u);t="".concat(h," / ").concat(g)}var y=t;if(q.needDimension({modifier:r,properties:o,layout:i})){var v=q.getDimComp(c,1),b=q.getDimComp(c,0),x=q.getAggrComp(y,v,b);y=r.showExcludedValues?q.getExcludedComp({modifier:r,dimensions:c,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return y},extractInputExpression:q.extractInputExpression,initModifier:function(e){q.initModifier(e,z)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:function(e,t){return!q.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(_(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.movingAverage.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(_(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.movingAverage.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(_(t,e),".fullRange")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(_(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=H(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=H(t,e);return n&&!n.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(_(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(_(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return q.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(j))return!1;var i=H(t,e);return i&&!i.disabled}}}},U="difference";function B(e,t){var n=a(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===U)return n[r]}function W(e,t){var n=function(e,t){var n=a(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===U)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var $={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""},Y={translationKey:"properties.modifier.difference",needDimension:q.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return q.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:q.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,o=e.layout,i=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=i;void 0===l&&(l=q.getNumDimensions({properties:r,layout:o}));var u=a(r,"qHyperCubeDef.qDimensions",[]),c=q.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:u,dimensionAndFieldList:s}),p=q.getAboveComp(n,l,c),d="".concat(c," - ").concat(p);if(q.needDimension({modifier:n,properties:r,layout:o})){var f=q.getDimComp(u,1),m=q.getDimComp(u,0),h=q.getAggrComp(d,f,m);d=n.showExcludedValues?q.getExcludedComp({modifier:n,dimensions:u,dimensionAndFieldList:s,funcComp:"Only",valueComp:h}):h}return d},initModifier:function(e){Object.keys($).forEach((function(t){void 0===e[t]&&(e[t]=$[t])}))},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!q.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(W(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.difference.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(W(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.difference.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},showExcludedValues:{refFn:function(t){return"".concat(W(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return q.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(U))return!1;var i=B(t,e);return i&&!i.disabled}}}},K={CURRENT_SELECTION:0,SELECT_FIELD_VALUE:1,DISREGARD_SELECTION:2},J={ONE_DIMENSION:0,ALL_DIMENSIOANS:1,DISREGARD_ALL_DIMENSIONS:2},G="normalization";function Z(e,t){var n=a(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===G)return n[r]}function X(e,t){var n=function(e,t){var n=a(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===G)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}function Q(e,t){for(var n=0;n<e.length;n++)if(e[n].value===t)return n;return-1}function ee(e,t,n,r){var o=t.layout.qHyperCube.qDimensionInfo.length,i=[{value:J.ONE_DIMENSION,translation:n.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:n.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:J.ALL_DIMENSIOANS,translation:n.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===o?"respectAllDimensions":"respectDimension"),tooltipTranslation:n.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===o?"respectAllDimensions":"respectDimension",".tooltip")},{value:J.DISREGARD_ALL_DIMENSIONS,translation:n.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===o?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:n.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===o?"disregardAllDimensions":"disregardDimension",".tooltip")}];return i=function(e,t,n){if(e<2){var r=Q(t,0);t.splice(r,1)}return t}(o,i),function(e,t,n){if(0===e){var r=Q(t,1);t.splice(r,1)}return t}(Z(e,r).selectionScope,i)}function te(e,t,n){var r=[{value:K.CURRENT_SELECTION,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:K.SELECT_FIELD_VALUE,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:K.DISREGARD_SELECTION,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return function(e,t,n){if(1===e){var r=Q(t,0);t.splice(r,1)}return t}(Z(e,n).dimensionalScope,r)}var ne={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:J.DISREGARD_ALL_DIMENSIONS,selectionScope:K.DISREGARD_SELECTION};function re(e){return 2===e?"{1}":""}function oe(e,t,n){return 1===e?"{$<".concat(q.getFieldWithWrapper(t),"={'").concat(n,"'}>}"):""}function ie(e,t){return 0===e&&t>1||2===e?"Total":""}function ae(e,t,n){return 0===e&&t>1?"<".concat(q.getDimDefWithWrapper(n),">"):""}var se={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,n=e.layout;return q.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:q.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,o=e.layout,i=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=i;void 0===l&&(l=q.getNumDimensions({properties:r,layout:o}));var u=a(r,"qHyperCubeDef.qDimensions",[]),c=q.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:u,dimensionAndFieldList:s}),p=n.selectionScope,d=n.dimensionalScope;return function(e,t,n,r,o,i,a){var s=re(t),l=oe(t,n,r),u=""===s&&""===l?"":s||l,c=ie(o,i),p=ae(o,i,a),d=function(e){for(var t=[],n=0;n<e;n++)t[n]=q.getDimDefWithWrapper(n);return t.join(", ")}(i);return"".concat(e,"/ Sum(").concat(u," ").concat(c).concat(p," Aggr(").concat(u," ").concat(e,", ").concat(d,"))")}(c,p,n.field,n.value,d,l,n.primaryDimension)},initModifier:function(e){Object.keys(ne).forEach((function(t){void 0===e[t]&&(e[t]=ne[t])}))},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!q.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(X(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:K.DISREGARD_SELECTION,options:function(n){return te(n,t,e)}},field:{refFn:function(t){return"".concat(X(t,e),".field")},type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:function(e,t,n){return n.app.getFieldList().then((function(e){return e.map((function(e){return{label:e.qName,value:e.qName}}))}))},show:function(t){return Z(t,e).selectionScope===K.SELECT_FIELD_VALUE}},value:{refFn:function(t){return"".concat(X(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return Z(t,e).selectionScope===K.SELECT_FIELD_VALUE}},dimensionalScope:{refFn:function(t){return"".concat(X(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:J.DISREGARD_ALL_DIMENSIONS,supportTooltip:!0,options:function(n,r){return ee(n,r,t,e)}},primaryDimension:{refFn:function(t){return"".concat(X(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.normalization.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(t,n){return(Z(t,e).dimensionalScope||0)===J.ONE_DIMENSION&&n.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return q.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(G))return!1;var i=Z(t,e);return i&&!i.disabled}}},getDisregardSelectionComp:re,getFieldSelectionComp:oe,getTotalComp:ie,getSelectedDimComp:ae},le={getExpression:function(e){return a(e,"qDef.base.qDef")||a(e,"qDef.qDef")},getExpressionRef:function(e){return a(e,"qDef.base.qDef")?"qDef.base.qDef":"qDef.qDef"},getLibraryIdRef:function(e){return a(e,"qDef.base.qLibraryId")?"qDef.base.qLibraryId":"qLibraryId"},getLibraryId:function(e){return a(e,"qDef.base.qLibraryId")||a(e,"qLibraryId")},getLabelRef:function(e){return a(e,"qDef.base")?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return a(e,"qDef.base")?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}},ue={initBase:function(e,t){(t||ue.isValid(e))&&(i(e,"qDef.base.qDef",a(e,"qDef.qDef")),i(e,"qDef.base.qLibraryId",a(e,"qLibraryId")),i(e,"qDef.base.qLabel",a(e,"qDef.qLabel")),i(e,"qDef.base.qLabelExpression",a(e,"qDef.qLabelExpression")))},restoreBase:function(e){ue.isValid(e)&&(i(e,"qDef.qDef",a(e,"qDef.base.qDef")),i(e,"qLibraryId",a(e,"qDef.base.qLibraryId")),i(e,"qDef.qLabel",a(e,"qDef.base.qLabel")),i(e,"qDef.qLabelExpression",a(e,"qDef.base.qLabelExpression")),a(e,"qDef.qAggrFunc")&&a(e,"qDef.base.qAggrFunc")&&i(e,"qDef.qAggrFunc",a(e,"qDef.base.qAggrFunc")),delete e.qDef.base)},isValid:function(e){var t=a(e,"qDef.base.qDef"),n=a(e,"qDef.base.qLibraryId");return void 0!==t||void 0!==n}},ce=ue;function pe(e){return(pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var de={accumulation:F,movingAverage:V,difference:Y,normalization:se},fe=(t.default={modifiers:de,apply:me,applyModifiers:he,cleanUpMeasure:ge,destroy:function(e){e&&fe[e.id]&&fe[e.id].masterItemSubscriber&&(fe[e.id].masterItemSubscriber&&fe[e.id].masterItemSubscriber.unsubscribe(),delete fe[e.id])},hasActiveModifiers:ye,getActiveModifier:ve,initBase:ce.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some((function(e){return de[e]}))},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some((function(e){return de[e]&&de[e].isApplicable({properties:n,layout:r})}))},measureBase:le,limitedSorting:function(e){var t=e.measures,n=e.properties,r=e.layout,o=!1,i=!1;return t.forEach((function(e){var t=qe(e);Ie({modifiers:t,properties:n,layout:r})&&(o=!0,i=i||Oe({modifiers:t,properties:n,layout:r}))})),o&&!i},ifEnableTotalsFunction:be},{});function me(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.model,n=e.properties,r=e.isSnapshot,i=void 0!==r&&r,s=e.masterItem;fe[t.id]=fe[t.id]||{isFirstTime:!0};var l=fe[t.id].isFirstTime;if(fe[t.id].isFirstTime=!1,n&&"object"===pe(n))return he({model:t,properties:n});var u=t?t.layout:void 0,c=a(u,"qSelectionInfo.qInSelections");if(i||c)return Promise.resolve(!1);var p=a(u,"qHyperCube.qMeasureInfo"),d=fe[t.id].lastReloadTime;if(fe[t.id].lastReloadTime=a(t,"app.layout.qLastReloadTime"),ye({measures:p,layout:u})){var f=function(e){var t=e.measures,n=e.layout,r=e.lastReloadTime;return a(e.model,"app.layout.qLastReloadTime")!==r&&function(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ee({measure:e,properties:n,layout:r})}))}({measures:t,layout:n})}({measures:p,layout:u,model:t,lastReloadTime:d});return f||function(e){var t=e.measures,n=e.layout,r=e.masterItem,o=e.isFirstTime;return!!Array.isArray(t)&&(o||r||t.some((function(e){return function(e){var t=e.measure,n=e.layout;return Ie({modifiers:qe(t),layout:n})?!t.base:!!t.base}({measure:e,layout:n})})))}({measures:p,layout:u,masterItem:s,isFirstTime:l})?t.getEffectiveProperties().then((function(e){var n=o()(!0,{},e);Ce(n);var r=Pe(n);return Ae({model:t}).then((function(o){return ke({libraryIds:r,model:t}).then((function(r){return f&&function(e){var t=e.properties;xe(t).forEach((function(e){return function(e){var t=e.measure;if(Ee({measure:t,properties:e.properties})){var n=0,r=t.qDef.modifiers;Array.isArray(r)&&r.forEach((function(e){if("object"===pe(e)&&!e.disabled){if(n++,"object"!==pe(de[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(n>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var r=de[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==r&&Se(t)&&q.simplifyExpression(t.qDef.base.qDef)!==q.simplifyExpression(r)&&(t.qDef.base.qDef=r)}}))}}({measure:e,properties:t})}))}({properties:n}),he({model:t,oldProperties:e,properties:n,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:r,dimensionAndFieldList:o})}))}))})):Promise.resolve(!1)}return function(e){return!!Array.isArray(e)&&e.some((function(e){return"object"===pe(e.base)}))}(p)?t.getEffectiveProperties().then((function(e){return function(e){var t=e.model,n=e.properties,r=Pe(n);return Ne({model:t,libraryIds:r}).then((function(){var e=o()(!0,{},n);return xe(n).forEach((function(e){return ge(e)})),Le({oldProperties:e,newProperties:n,model:t})}))}({model:t,properties:e})})):Promise.resolve(!1)}function he(e){var t=e.model,n=e.oldProperties,r=e.properties,i=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,u=e.masterItem,c=e.libraryItemsProps,p=e.dimensionAndFieldList;void 0===n&&(n=l?o()(!0,{},r):r),Ce(r);var d=Pe(r);return Ne({model:t,libraryIds:d,masterItem:u}).then((function(){return function(e){var t=e.measures,n=e.properties,r=e.model,i=e.libraryItemsProps,s=e.dimensionAndFieldList;if(t||(t=xe(n)),!t.length)return Promise.resolve();if(!ye({measures:t,properties:n}))return t.forEach((function(e){return ge(e)})),Promise.resolve();var l=i?void 0:Pe(n);return Ae({model:r,dimensionAndFieldList:s}).then((function(e){return ke({libraryIds:l,model:r,libraryItemsProps:i}).then((function(r){t.forEach((function(t){Ie({modifiers:t.qDef.modifiers,properties:n})?(function(e){var t=e.measure,n=e.properties,r=e.libraryItemsProps,i=e.dimensionAndFieldList,s=0;ce.isValid(t)||ce.initBase(t,!0);var l=t.qDef,u=l.modifiers,c=l.base;Array.isArray(u)&&u.forEach((function(e){if("object"===pe(e)&&!e.disabled){if(s++,"object"!==pe(de[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(s>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");de[e.type].initModifier(e);var l=t.qLibraryId||c&&c.qLibraryId;l?function(e){var t=e.measure,n=e.modifier,r=e.properties,i=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=de[n.type].generateExpression({expression:s,modifier:n,properties:r,dimensionAndFieldList:i});n.outputExpression=l,t.qDef.qDef=n.outputExpression,(t.qDef.qLabel||a.qMeasure.qLabel)&&(t.qDef.qLabel=a.qMeasure.qLabel),(t.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(t.qDef.qLabelExpression=a.qMeasure.qLabelExpression),t.qDef.quarantine&&t.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(t.qDef.qNumFormat=a.qMeasure.qNumFormat,t.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete t.qLibraryId,t.qDef.coloring=a.qMeasure.coloring,n.base=o()(!0,{},t.qDef.base)}({measure:t,modifier:e,libraryId:l,properties:n,libraryItemsProps:r,dimensionAndFieldList:i}):function(e){var t=e.measure,n=e.modifier,r=e.properties,i=e.dimensionAndFieldList;"function"==typeof de[n.type].updateModifier&&de[n.type].updateModifier(n,r.qHyperCubeDef);var a=le.getExpression(t),s=de[n.type].generateExpression({expression:a,modifier:n,properties:r,dimensionAndFieldList:i});n.outputExpression=s,t.qDef.qDef=n.outputExpression,t.qDef.base.qLabelExpression?t.qDef.qLabelExpression=t.qDef.base.qLabelExpression:t.qDef.qLabel=t.qDef.base.qLabel||a,n.base=o()(!0,{},t.qDef.base)}({measure:t,modifier:e,properties:n,dimensionAndFieldList:i}),function(e){var t=a(e,"qDef.qAggrFunc");"Expr"!==t||be(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&be(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(t)}}))}({measure:t,properties:n,libraryItemsProps:r,dimensionAndFieldList:e}),we(t)):ge(t)}))}))}))}({measures:i,properties:r,model:t,libraryItemsProps:c,dimensionAndFieldList:p}).then((function(){return l?Le({oldProperties:n,newProperties:r,model:t}):Promise.resolve(!1)}))}))}function ge(e){!function(e){var t=qe(e);return Array.isArray(t)&&t.some((function(e){return"object"===pe(e)&&!e.disabled&&!de[e.type]}))}(e)?ce.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,we(e)}function ye(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ie({modifiers:qe(e),properties:n,layout:r})}))}function ve(e){var t=qe(e);if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];if(de[r.type]&&!r.disabled)return r}}function be(e){var t=ve(e);return!t||de[t.type].enableTotalsFunction(e)}function xe(e){return a(e,"qHyperCubeDef.qMeasures",[]).concat(a(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function qe(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function De(e){return a(e,"outputExpression.qValueExpression.qExpr")||a(e,"outputExpression")}function Ce(e){xe(e).forEach((function(e){return function(e){var t=ve(e);t&&(void 0!==t.outputExpression&&De(t)!==e.qDef.qDef?delete e.qDef.base:!ce.isValid(e)&&t.base&&(e.qDef.base=o()(!0,{},t.base)))}(e)}))}function we(e){var t=qe(e);Array.isArray(t)&&t.forEach((function(t){"object"===pe(t)&&(t.disabled||!de[t.type]&&De(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)}))}function Se(e){return e.base||e.qDef&&e.qDef.base}function Me(e){var t=Se(e);return e.qLibraryId||t&&t.qLibraryId}function Ee(e){var t=e.measure,n=e.properties,r=e.layout;return!Me(t)&&Ie({modifiers:qe(t),properties:n,layout:r})}function Ie(e){var t=e.modifiers,n=e.properties,r=e.layout,o={};return Array.isArray(t)&&t.some((function(e){return!("object"!==pe(e)||e.disabled||!de[e.type])&&(void 0===o[e.type]&&(o[e.type]=de[e.type].isApplicable({properties:n,layout:r})),o[e.type])}))}function Ae(e){var t=e.model,n=e.dimensionAndFieldList;if(n)return Promise.resolve(n);var r=[],o={},i=t.app.getDimensionList().then((function(e){o.dimensionList=e}));r.push(i);var a=t.app.getFieldList().then((function(e){o.fieldList=e}));return r.push(a),Promise.all(r).then((function(){return o}))}function ke(e){var t=e.libraryIds,n=e.model,r=e.libraryItemsProps;if(r)return Promise.resolve(r);var o=t.measureLibraryIds,i=t.dimensionLibraryIds,a={},s=[];return o.forEach((function(e){var t=n.app.getMeasure(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),i.forEach((function(e){var t=n.app.getDimension(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),Promise.all(s).then((function(){return a}))}function Te(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Le(e){var t=e.oldProperties,n=e.newProperties,r=e.model,o=JSON.stringify(a(t,"qHyperCubeDef.qMeasures"),Te)!==JSON.stringify(a(n,"qHyperCubeDef.qMeasures"),Te)||JSON.stringify(a(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Te)!==JSON.stringify(a(n,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Te);return o?function(e){var t=e.model,n=e.oldProperties,r=e.newProperties,o=t.layout;return o&&!o.qHasSoftPatches&&!o.qExtendsId&&a(o,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(r):L(t,n,r)}({model:r,oldProperties:t,newProperties:n}).then((function(){return o})):Promise.resolve(o)}function Oe(e){var t=e.modifiers,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some((function(e){return"object"===pe(e)&&!e.disabled&&de[e.type]&&de[e.type].needDimension({modifier:e,properties:n,layout:r})}))}function Pe(e){var t=xe(e),n=[],r=[],o=!1;return t.forEach((function(t){var r=qe(t);if(Ie({modifiers:r,properties:e})){var i=Me(t);i&&n.push(i),o=o||Oe({modifiers:r,properties:e})}})),a(e,"qHyperCubeDef.qDimensions",[]).forEach((function(e){var t=e.qLibraryId;t&&r.push(t)})),{measureLibraryIds:n,dimensionLibraryIds:r}}function Ne(e){var t=e.model,n=e.libraryIds;return!e.masterItem&&n&&(n.measureLibraryIds.length||n.dimensionLibraryIds.length)?(fe[t.id].masterItemSubscriber=fe[t.id].masterItemSubscriber||function(e){var t=e.model,n=e.callback,r={},o={},i={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},n=a(e,"qInfo.qType");return n&&s[n]&&s[n].forEach((function(n){t[n]=a(e,n)})),JSON.stringify(t)}function u(e){var t=e.qInfo.qId;if(r[t]){var o=l(e);r[t].properties!==o&&(r[t].properties=o,"function"==typeof n&&r[t].enabled&&n(e)),r[t].enabled=!0}}function c(e,n){return t.app[n](e).then((function(t){r[e]={listener:t.layoutSubscribe(u),enabled:!1,properties:l(t.layout)}}))}return{subscribe:function(e){var n=e.measureLibraryIds,a=e.dimensionLibraryIds,s=[];return function(e){var t=e.dimensionLibraryIds;o={},e.measureLibraryIds.forEach((function(e){o[e]=!0})),i={},t.forEach((function(e){i[e]=!0}))}({measureLibraryIds:n,dimensionLibraryIds:a}),Object.keys(r).forEach((function(e){o[e]||i[e]||(r[e].listener.dispose(),delete r[e])})),t.app&&(Object.keys(o).forEach((function(e){o[e]&&!r[e]&&s.push(c(e,"getMeasure"))})),Object.keys(i).forEach((function(e){i[e]&&!r[e]&&s.push(c(e,"getDimension"))}))),Promise.all(s)},unsubscribe:function(){Object.keys(r).forEach((function(e){r[e].listener.dispose()})),r={}}}}({model:t,callback:function(e){return me({model:t,masterItem:e}).then((function(){return t.app.clearUndoBuffer()}))}}),fe[t.id].masterItemSubscriber.subscribe(n)):Promise.resolve()}}])},function(e,t,n){function r(e){var t=function e(t){var n,r=t;return r>9?(n=65+r-10)>90&&(n+=6):r="".concat(r).charCodeAt(0),[48,111,79,105,73,108].indexOf(n)>-1?e(r+1):String.fromCharCode(n)}(e%62),n=Math.floor(e/62);return n>0?r(n)+t:t}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.r(t);var i={getValue:function(e,t,n){if(null==e||null==t)return n;for(var r=t.split("."),o=e,i=0;i<r.length;++i){var a=r[i];if(""!==a){if(void 0===o[a]||null===o[a])return n;o=o[a]}}return o},setValue:function(e,t,n){if(null!=e&&null!=t){for(var r=t.split("."),o=r[r.length-1],i=e,a=0;a<r.length-1;++a){var s=r[a];void 0!==i[s]&&null!==i[s]||(i[s]=Number.isNaN(+r[a+1])?{}:[]),i=i[s]}void 0!==n?i[o]=n:delete i[o]}},isEmpty:function(e){return 0===Object.keys(e).length&&e.constructor===Object},isAtomicValue:function(e){return/boolean|number|string/.test(o(e))},generateId:function(){return r(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function a(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.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)?s(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.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)?u(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return r;return-1}return-1}var p={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;var n=e.indexOf(t[0]);if(-1!==n){for(var r=0;r<t.length;r++){var o=e.indexOf(t[r]);if(n>o)return!1;n=o}return!0}return!1},indexAdded:function(e,t){var n;for(n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)},indexRemoved:function(e,t){var n,r=0;for(n=0;n<e.length;++n)e[n]>t?--e[n]:e[n]===t&&(r=n);return e.splice(r,1),r},findItemByPropertyValue:function(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return e[r];return null}return null},findIndexByPropertyValue:c},d=n(1),f=n.n(d),m={addDimensions:function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,o=n.data[0];(t=o.dimensions).push.apply(t,a(r.qDimensions));var s,l=i.getValue(r,"qLayoutExclude.qHyperCubeDef.qDimensions");l&&(s=o.excludedDimensions).push.apply(s,a(l))},addMeasures:function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,o=n.data[0];(t=o.measures).push.apply(t,l(r.qMeasures));var a,s=i.getValue(r,"qLayoutExclude.qHyperCubeDef.qMeasures");s&&(a=o.excludedMeasures).push.apply(a,l(s))},setInterColumnSortOrder:function(e){var t=e.exportFormat,n=e.qHyperCubeDef,r=t.data[0];n.qInterColumnSortOrder||(n.qInterColumnSortOrder=[]),r.interColumnSortOrder=n.qInterColumnSortOrder.concat();var o=i.getValue(n,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");o&&p.isOrderedSubset(o,r.interColumnSortOrder)&&(r.interColumnSortOrder=o.concat())},copyProperties:function(e){var t=e.exportFormat,n=e.properties;Object.keys(n).forEach((function(e){t.properties[e]=n[e]}))},updateLayoutExclude:function(e){var t=e.exportFormat,n=e.properties;n.qLayoutExclude||(n.qLayoutExclude={}),n.qLayoutExclude.disabled&&(Object.keys(n.qLayoutExclude.disabled).forEach((function(e){t.properties.hasOwnProperty(e)||(t.properties[e]=n.qLayoutExclude.disabled[e])})),delete n.qLayoutExclude.disabled),n.qLayoutExclude.changed&&(function(e){Object.keys(e.qLayoutExclude.changed).forEach((function(t){e.qLayoutExclude.changed[t].to===i.getValue(e,t)&&i.setValue(e,t,e.qLayoutExclude.changed[t].from)}))}(n),delete n.qLayoutExclude.changed),n.qLayoutExclude.quarantine&&!i.isEmpty(n.qLayoutExclude.quarantine)||delete n.qLayoutExclude},storeMeasuresModifiers:function(e){e.forEach((function(e){f.a.cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)}))}};function h(e,t,n){var r,o,a=i.getValue(e,t);if(!i.isAtomicValue(a))try{if((o=(o=(r=JSON.stringify(a)).match(/:\{/g))?o.length:0)>2)return;a=JSON.parse(r)}catch(e){return}i.getValue(e,"qLayoutExclude.quarantine")||i.setValue(e,"qLayoutExclude.quarantine",{});var s=i.getValue(e,"qLayoutExclude.quarantine");s[n]||(s[n]={}),s[n][t]=a}var g=n(0),y=n.n(g);function v(e,t){var n=y()(!0,{},t,e);return i.getValue(n,"qOtherTotalSpec.qOtherCounted")||i.setValue(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),i.getValue(n,"qOtherTotalSpec.qOtherLimit")||i.setValue(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel="Others"),n}function b(e,t){return y()(!0,{},t,e)}function x(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}var q=Math.pow(2,53)-1;function D(e){return function(e){if(Array.isArray(e))return C(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var n=Object.prototype.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)?C(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function w(e){return function(e){if(Array.isArray(e))return S(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return S(e,t);var n=Object.prototype.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)?S(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var M={importCommonProperties:function(e,t,n){var r="masterobject"===i.getValue(t,"properties.qInfo.qType")?"masterobject":i.getValue(n,"qInfo.qType");i.setValue(e,"qInfo.qType",r),e.visualization=n.visualization},copyPropertyIfExist:function(e,t,n){t.hasOwnProperty(e)&&(n[e]=t[e])},copyPropertyOrSetDefault:function(e,t,n,r){t.hasOwnProperty(e)?n[e]=t[e]:n[e]=r},getDefaultDimension:function(){return{qDef:{autoSort:!0,cId:"",othersLabel:"Others"},qLibraryId:"",qNullSuppression:!1,qOtherLabel:"Others",qOtherTotalSpec:{qOtherLimitMode:"OTHER_GE_LIMIT",qOtherMode:"OTHER_OFF",qOtherSortMode:"OTHER_SORT_DESCENDING",qSuppressOther:!1}}},getDefaultMeasure:function(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}},addDimensions:function(e){var t,n=e.exportFormat,r=e.maxDimensions,o=e.minDimensions,i=e.newHyperCubeDef,a=e.defaultDimension,s=n.data[0];for(t=0;t<s.dimensions.length;++t){var l=v(s.dimensions[t],a);i.qDimensions.length<r?i.qDimensions.push(l):i.qLayoutExclude.qHyperCubeDef.qDimensions.push(l)}for(t=0;t<s.excludedDimensions.length;++t){var u=v(s.excludedDimensions[t],a);i.qDimensions.length<o?i.qDimensions.push(u):i.qLayoutExclude.qHyperCubeDef.qDimensions.push(u)}},addMeasures:function(e){var t,n=e.exportFormat,r=e.maxMeasures,o=e.minMeasures,i=e.newHyperCubeDef,a=e.defaultMeasure,s=n.data[0];for(t=0;t<s.measures.length;++t){var l=b(s.measures[t],a);i.qMeasures.length<r?i.qMeasures.push(l):i.qLayoutExclude.qHyperCubeDef.qMeasures.push(l)}for(t=0;t<s.excludedMeasures.length;++t){var u=b(s.excludedMeasures[t],a);i.qMeasures.length<o?i.qMeasures.push(u):i.qLayoutExclude.qHyperCubeDef.qMeasures.push(u)}},getMaxMinDimensionMeasure:function(e){var t=e.exportFormat,n=e.dataDefinition,r=void 0===n?{}:n,o=t.data[0],i=r.dimensions||{max:0},a=r.measures||{max:0},s=x(a.max,o.dimensions.length,q),l=x(a.min,o.dimensions.length,0);return{maxDimensions:x(i.max,s,q),minDimensions:x(i.min,l,0),maxMeasures:s,minMeasures:l}},setInterColumnSortOrder:function(e){var t=e.exportFormat,n=e.newHyperCubeDef,r=t.data[0],o=n.qDimensions.length+n.qMeasures.length;n.qInterColumnSortOrder=r.interColumnSortOrder.concat();var i=n.qInterColumnSortOrder.length;if(i!==o)for(n.qLayoutExclude&&(n.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=r.interColumnSortOrder.concat());i!==o;)i<o?(p.indexAdded(n.qInterColumnSortOrder,i),++i):(--i,p.indexRemoved(n.qInterColumnSortOrder,i))},createNewProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.hypercubePath,o={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach((function(e){"qLayoutExclude"===e?t.properties[e].quarantine&&(o.qLayoutExclude.quarantine=y()(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&r?i.setValue(o,"".concat(r,".qHyperCubeDef"),t.properties.qHyperCubeDef):n.hasOwnProperty(e)||-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)||function(e,t){return"components"===t&&Array.isArray(e[t])&&e[t].some((function(e){return"general"===e.key}))}(t.properties,e)?o[e]=t.properties[e]:o.qLayoutExclude.disabled[e]=t.properties[e]})),null===(o=y()(!0,{},n,o)).components&&(o.components=[]),o},shouldInitLayoutExclude:function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,o=e.maxMeasures,i=e.minMeasures,a=t.data[0];return a.dimensions.length>n&&n>0||a.measures.length>o&&o>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>r||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>i||!o&&a.measures.length>0||!n&&a.dimensions.length>0},initLayoutExclude:function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,o=e.maxMeasures,i=e.minMeasures,a=e.newHyperCubeDef,s=t.data[0];a.qLayoutExclude||(a.qLayoutExclude={}),a.qLayoutExclude.qHyperCubeDef||(a.qLayoutExclude.qHyperCubeDef={}),(s.dimensions.length>n&&n>0||s.excludedDimensions&&s.excludedDimensions.length&&s.dimensions.length+s.excludedDimensions.length>r)&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(s.measures.length>o&&o>0||s.excludedMeasures&&s.excludedMeasures.length&&s.measures.length+s.excludedMeasures.length>i)&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!o&&s.measures.length&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!n&&s.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))},updateDimensionsOnAdded:function(e){var t=e.newProperties,n=e.dataDefinition,r=e.hypercubePath;if(n.dimensions&&"function"==typeof n.dimensions.added){var o=i.getValue(t,r||"").qHyperCubeDef,a=D(o.qDimensions);o.qDimensions=[],a.forEach((function(e){o.qDimensions.push(e),n.dimensions.added(e,t)}))}},updateMeasuresOnAdded:function(e){var t=e.newProperties,n=e.dataDefinition,r=e.hypercubePath;if(n.measures&&"function"==typeof n.measures.added){var o=i.getValue(t,r||"").qHyperCubeDef,a=w(o.qMeasures);o.qMeasures=[],a.forEach((function(e){o.qMeasures.push(e),n.measures.added(e,t)}))}},restoreMeasuresModifiers:function(e){var t=e.measures,n=e.modifierTypes;t&&n&&f.a.isSupportedModifiers(n)&&t.forEach((function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store}))}};function E(e,t){var n=i.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!n&&(Object.keys(n).forEach((function(t){i.setValue(e,t,n[t])})),delete e.qLayoutExclude.quarantine[t],!0)}var I={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,o=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t={data:[],properties:{}},n=0;n<e;++n)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}(),a=t.qProperty,s=i.getValue(a,n||""),l=s.qHyperCubeDef;return l.qInterColumnSortOrder||(l.qInterColumnSortOrder=[]),m.addDimensions({exportFormat:o,qHyperCubeDef:l}),m.addMeasures({exportFormat:o,qHyperCubeDef:l}),m.setInterColumnSortOrder({exportFormat:o,qHyperCubeDef:l}),delete l.qLayoutExclude,m.copyProperties({exportFormat:o,properties:a}),n&&(o.properties.qHyperCubeDef=l,delete s.qHyperCubeDef),m.updateLayoutExclude({exportFormat:o,properties:a}),r||m.storeMeasuresModifiers(o.properties.qHyperCubeDef.qMeasures),Array.isArray(o.properties.filters)&&(h(o.properties,"filters","storedFilters"),delete o.properties.filters),o.properties.qHyperCubeDef.qContextSetExpression&&(h(o.properties,"qHyperCubeDef.qContextSetExpression","storedFilters"),o.properties.qHyperCubeDef.qContextSetExpression=""),o.properties.qHyperCubeDef.qDynamicScript&&o.properties.qHyperCubeDef.qDynamicScript.length&&(h(o.properties,"qHyperCubeDef.qDynamicScript","dynamicScript"),o.properties.qHyperCubeDef.qDynamicScript=[]),o},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=void 0===n?{}:n,o=e.dataDefinition,a=void 0===o?{}:o,s=e.defaultPropertyValues,l=void 0===s?{}:s,u=e.hypercubePath,c=e.extension,p=e.supportedFilters,d=void 0===p||p,f=e.isHCModifierSupported,m=void 0===f||f,h={qChildren:[]},g=M.createNewProperties({exportFormat:t,initialProperties:r,hypercubePath:u}),y=i.getValue(r,u||"").qHyperCubeDef,v=i.getValue(g,u||"").qHyperCubeDef,b=M.getMaxMinDimensionMeasure({exportFormat:t,dataDefinition:a}),x=b.maxDimensions,q=b.minDimensions,D=b.maxMeasures,C=b.minMeasures,w=l.defaultDimension,S=void 0===w?M.getDefaultDimension():w,I=l.defaultMeasure,A=void 0===I?M.getDefaultMeasure():I;v.qDimensions.length=0,v.qMeasures.length=0,M.shouldInitLayoutExclude({exportFormat:t,maxDimensions:x,minDimensions:q,maxMeasures:D,minMeasures:C})&&M.initLayoutExclude({exportFormat:t,maxDimensions:x,minDimensions:q,maxMeasures:D,minMeasures:C,newHyperCubeDef:v}),M.addDimensions({exportFormat:t,maxDimensions:x,minDimensions:q,newHyperCubeDef:v,defaultDimension:S}),M.addMeasures({exportFormat:t,maxMeasures:D,minMeasures:C,newHyperCubeDef:v,defaultMeasure:A}),M.updateDimensionsOnAdded({newProperties:g,dataDefinition:a,hypercubePath:u}),M.updateMeasuresOnAdded({newProperties:g,dataDefinition:a,hypercubePath:u}),M.setInterColumnSortOrder({exportFormat:t,newHyperCubeDef:v}),M.copyPropertyIfExist("qMaxStackedCells",y,v),M.copyPropertyIfExist("qNoOfLeftDims",y,v),M.copyPropertyOrSetDefault("qInitialDataFetch",y,v,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),M.copyPropertyOrSetDefault("qMode",y,v,"S"),M.copyPropertyOrSetDefault("qReductionMode",y,v,"N"),M.copyPropertyOrSetDefault("qSortbyYValue",y,v),M.copyPropertyOrSetDefault("qIndentMode",y,v),M.copyPropertyOrSetDefault("qShowTotalsAbove",y,v),M.importCommonProperties(g,t,r),h.qProperty=g;var k=i.getValue(c||{},"support.modifiers");return M.restoreMeasuresModifiers({measures:v.qMeasures,modifierTypes:k}),d&&E(h.qProperty,"storedFilters"),"S"===v.qMode&&m&&E(h.qProperty,"dynamicScript"),h}},A={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function k(e,t,n,r){t=t||[];var o=c(e,r,n),i=c(t,r,n);if(-1!==o&&-1===i){var a=e.splice(o,1);t.push(a[0])}return t}function T(e,t){return e.length!==t}var L={create:function(e,t){if(!e||!A[e])throw new Error("Attribute Expressions Util: ID required");var n={};return t&&Object.keys(t).forEach((function(e){n[e]=t[e]})),n.id=e,n.qAttribute=!0,n},moveByIdFromGroup:function(e,t,n,r,o){n=n||"qAttributeExpressions",o=o||"id";for(var i=0;i<e.length;i++){var a=e[i][n],s=t.length;if(k(a,t,r,o),T(t,s))return t}return t},IDMAP:{CELL_BACKGROUND_COLOR:"cellBackgroundColor",CELL_FOREGROUND_COLOR:"cellForegroundColor",COLOR_BY_ALTERNATIVE:"colorByAlternative",COLOR_BY_EXPRESSION:"colorByExpression",TOOLTIP:"tooltip",CELL_LINK_LABEL:"urlLabel",CELL_LINK_URL:"url"}},O={getNumDimensions:function(e){return i.getValue(e,"qHyperCubeDef.qDimensions.length",0)},getNumMeasures:function(e){return i.getValue(e,"qHyperCubeDef.qMeasures.length",0)},wrapFieldName:function(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e},getItemLabel:function(e){return e.label||e.name}},P={colorModeOptions:{primary:function(){return!0},dimension:function(e){return O.getNumDimensions(e)>0&&O.getNumMeasures(e)<=1},multiColor:function(e){return O.getNumMeasures(e)>1},measure:function(e){return O.getNumDimensions(e)>0},expression:function(e){return O.getNumMeasures(e)>=1}}},N={colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return O.getNumMeasures(e)>=1}}},R={scatterplot:N,"sn-scatter-plot":N,piechart:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return O.getNumMeasures(e)>=1}}},linechart:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return O.getNumDimensions(e)>1},multiColor:function(e){return O.getNumMeasures(e)>1},measure:function(e){return O.getNumDimensions(e)<=1},expression:function(e){return O.getNumMeasures(e)>=1}}},map:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return O.getNumDimensions(e)>=1},multiColor:function(e){return O.getNumMeasures(e)>1},measure:function(e){return O.getNumDimensions(e)>=1},expression:function(e){return O.getNumDimensions(e)>=1}}},distributionplot:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return O.getNumDimensions(e)>=1}}}};function F(e,t,n){if(Array.isArray(e[t])){var r=p.findIndexByPropertyValue(e[t],"id",n);r>=0&&e[t].splice(r,1)}else e[t]=[]}function j(e,t){var n=L.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach((function(e){F(e,"qAttributeDimensions",n),F(e,"qAttributeExpressions",n)})),t.forEach((function(e){F(e,"qAttributeDimensions",n),F(e,"qAttributeExpressions",n)}))}function H(e,t){if(t){var n="="===t.charAt(0);e.color.altLabel=n?{qStringExpression:{qExpr:t.substr(1)}}:t}}function _(e){var t=e.properties,n=e.isDimension,r=e.dimensions,o=e.excludedDimensions,a=e.measures,s=e.label;j(r,o);var l=r[r.length-1];if(l){var u=n?i.getValue(t,"color.byDimDef"):i.getValue(t,"color.byMeasureDef"),c=i.getValue(t,"color.formatting.qNumFormat"),d=i.getValue(t,"color.formatting.isCustomFormatted");if(u){var f=L.create(L.IDMAP.COLOR_BY_ALTERNATIVE);switch(u.type){case"expression":!function(e){var t=e.attributeExpression,n=e.label,r=e.item,o=e.isDimension,i=e.qNumFormat,a=e.isCustomFormatted;t.label=n||r.label,o?t.qDef=r.key:(t.qExpression=r.key,i&&(t.qNumFormat=i,t.isCustomFormatted=a)),t.matchMeasure=r.activeMeasureIndex,t.label&&"="===t.label.charAt(0)&&(t.labelExpRef="color.altLabel")}({attributeExpression:f,label:s,item:u,isDimension:n,qNumFormat:c,isCustomFormatted:d});break;case"libraryItem":!function(e){var t=e.attributeExpression,n=e.measures,r=e.item,o=e.isDimension,i=e.qNumFormat,a=e.isCustomFormatted;o||(t.matchMeasure=p.findIndexByPropertyValue(n,"qLibraryId",r.key),i&&(t.qNumFormat=i,t.isCustomFormatted=a)),void 0!==r.expression?t.qExpression=r.expression:t.qLibraryId=r.key,t.colorMapRef=r.key}({attributeExpression:f,measures:a,item:u,isDimension:n,qNumFormat:c,isCustomFormatted:d})}n?(f.qSortBy={qSortByAscii:1},l.qAttributeDimensions.push(f)):l.qAttributeExpressions.push(f)}}}function z(e,t,n,r){var o,i,a,s={};switch(e){case"dimension":n.qLibraryId?(s.type="dimension",s.name=n.qLibraryId,s.id=n.qLibraryId):(s.type="field",t?(s.name=n.label||n.qDef,s.id=n.qDef):(s.name=n.qDef.qFieldDefs[0],s.label=(a=n.qDef).qLabelExpression?a.qLabelExpression:a.qFieldLabels&&a.qFieldLabels[0]?a.qFieldLabels[0]:a.qFieldDefs[0]));break;case"measure":(o=function(e,t){return t?e.qLibraryId:f.a.measureBase.getLibraryId(e)}(n,t))?(s.type="measure",s.name=o,s.id=o,(i=function(e,t){return f.a.hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}(n,r))&&(s.expression=i)):(s.type="expression",t?(s.name=n.label||n.qExpression,s.id=n.qExpression):(s.name=n.qDef.qDef,s.label=function(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qLabel?t.qLabel:t.qDef}(n)));break;default:throw new Error('columnType should be "dimension" or "measure"')}return s}var V={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}};function U(e,t,n,r){var o=n?"expression":t.type,i=e.color,a=i.mode,s=O.getItemLabel(t);switch(H(e,s||""),o){case"field":a="byDimension",i.byDimDef={label:t.label||O.wrapFieldName(t.name),key:O.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":a="byMeasure",i.byMeasureDef={label:n||s,key:n||t.name,type:"expression",activeMeasureIndex:t.activeMeasureIndex};break;case"dimension":a="byDimension",i.byDimDef={label:t.name,key:t.id,type:"libraryItem",activeDimensionIndex:t.activeDimensionIndex};break;case"measure":a="byMeasure",i.byMeasureDef={label:t.name,key:t.id,expression:t.expression,type:"libraryItem",activeMeasureIndex:t.activeMeasureIndex},i.formatting&&V.useMasterNumberFormat(i.formatting)}r||(i.auto=!1,i.mode=a)}function B(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=n[function(e,t,n){var r=i.getValue(t,"visualization"),o=n.split("."),a=Number(o[1]),s=i.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===r&&"point"===s}(n,e,t)?0:n.length-1],o=L.IDMAP.COLOR_BY_ALTERNATIVE,a=p.findItemByPropertyValue(r.qAttributeDimensions,"id",o);return U(e,z("dimension",!!a,a||r)),!!a}function W(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=i.getValue(e,"".concat(t,"qMeasures"),[]),o=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=i.getValue(e,"color.byDimDef");if(a&&H(e,a.label),function(e){return!!(e&&e.activeDimensionIndex>-1)}(a))!function(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=i.getValue(e,"color.byDimDef");r.activeDimensionIndex=Math.min(r.activeDimensionIndex,n.length-1);var o=z("dimension",!1,n[r.activeDimensionIndex]);o.activeDimensionIndex=r.activeDimensionIndex,U(e,o)}(e,t);else if(function(e){return!e||!e.key}(a)&&B(e,t))return;_({properties:e,isDimension:!0,dimensions:n,excludedDimensions:o,measures:r,label:i.getValue(e,"color.byDimDef.label")})}function $(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=i.getValue(e,"".concat(t,"qMeasures"),[]),o=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=i.getValue(e,"color.byMeasureDef");if(a&&H(e,a.label),function(e){return!!(e&&e.activeMeasureIndex>-1)}(a))!function(e,t){var n=i.getValue(e,"".concat(t,"qMeasures"),[]),r=i.getValue(e,"color.byMeasureDef");if(r.activeMeasureIndex=Math.min(r.activeMeasureIndex,n.length-1),r.activeMeasureIndex>-1){var o=z("measure",!1,n[r.activeMeasureIndex],!0);o.activeMeasureIndex=r.activeMeasureIndex,U(e,o)}}(e,t);else if(function(e,t){return(!e||!e.key)&&t.length>0}(a,r)&&function(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=i.getValue(e,"".concat(t,"qMeasures"),[]),o=n[n.length-1],a=L.IDMAP.COLOR_BY_ALTERNATIVE,s=p.findItemByPropertyValue(o.qAttributeExpressions,"id",a);return U(e,z("measure",!!s,s||r[0])),!!s}(e,t))return;_({properties:e,isDimension:!1,dimensions:n,excludedDimensions:o,measures:r,label:i.getValue(e,"color.byMeasureDef.label")})}var Y={changeProperty:function(e,t,n){i.setValue(e,t,n),i.isAtomicValue(n)&&function(e,t,n){var r=e.qLayoutExclude;r&&(r.changed||(r.changed={}),r.changed[t]={from:i.getValue(e,t),to:n})}(e,t,n)},getCanColorBy:function(e,t){var n={primary:!0};if(e){var r=(R[t]||P).colorModeOptions||P.colorModeOptions;n.byDimension=r.dimension(e),n.byMeasure=r.measure(e),n.byMultiple=r.multiColor(e),n.byExpression=r.expression(e)}return n},shouldUpdateColorBy:function(e){var t=e.canColorBy,n=e.autoColor,r=e.colorMode,o=e.dimensions;return!(t[r]&&!n&&("byDimension"!==r&&"byMeasure"!==r||!o.length))},updateColorBy:function(e,t){var n=i.getValue(e,"color.mode"),r=i.getValue(e,"color.auto"),o=i.getValue(e,"".concat(t,"qDimensions"),[]),a=i.getValue(e,"".concat(t,"qMeasures"),[]),s=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);r?j(o,s):function(e){var t=e.auto,n=e.colorMode,r=e.dimensions;return!t&&"byDimension"===n&&r.length>0}({auto:r,colorMode:n,dimensions:o})?W(e,t):function(e){var t=e.auto,n=e.colorMode,r=e.dimensions,o=e.measures,a=e.properties,s=i.getValue(a,"visualization");return!(t||"byMeasure"!==n||!r.length||"map"!==s&&!o.length)}({auto:r,colorMode:n,dimensions:o,measures:a,properties:e})?$(e,t):function(e,t){var n=i.getValue(e,"color.mode"),r=i.getValue(e,"".concat(t,"qDimensions"),[]),o=i.getValue(e,"".concat(t,"qMeasures"),[]),a=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===n&&o.length<2&&i.setValue(e,"color.mode","primary"),j(r,a)}(e,t)},deleteTotalMode:function(e){e.forEach((function(e){e.qOtherTotalSpec&&"qTotalMode"in e.qOtherTotalSpec&&delete e.qOtherTotalSpec.qTotalMode}))},shouldAddColorByExpression:function(e){var t=e.shouldUpdateColorBy,n=e.properties,r=i.getValue(n,"qHyperCubeDef.qMeasures",[]),o=i.getValue(n,"color.mode","");return!t&&"byExpression"===o&&r.length>0},addColorByExpression:function(e){var t=i.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),n=i.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:n,id:"colorByExpression"}),i.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)},switchToAutoColor:function(e){i.setValue(e,"color.mode","primary"),i.setValue(e,"color.auto",!0)},shouldSwitchToColorPersistent:function(e){var t=i.getValue(e,"qHyperCubeDef.qDimensions",[]),n=i.getValue(e,"color.persistent",!1);return t.length>1&&!n}},K={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,o=I.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),i=o.data[0],a=i.dimensions.concat(i.excludedDimensions),s=i.measures.concat(i.excludedMeasures),l=L.IDMAP,u=l.COLOR_BY_ALTERNATIVE,c=l.COLOR_BY_EXPRESSION;return L.moveByIdFromGroup(a,[],"qAttributeDimensions",u),L.moveByIdFromGroup(a,[],"qAttributeExpressions",u),L.moveByIdFromGroup(s,[],"qAttributeExpressions",c),o},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,o=e.defaultPropertyValues,a=e.hypercubePath,s=e.extension,l=e.supportedFilters,u=e.isHCModifierSupported,c=I.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:o,hypercubePath:a,extension:s,supportedFilters:l,isHCModifierSupported:u}),p=c.qProperty,d=i.getValue(p,"visualization"),f=i.getValue(p,"qHyperCubeDef.qDimensions",[]),m=i.getValue(p,"color.mode",""),h=i.getValue(p,"color.auto",""),g=Y.getCanColorBy(p,d),y=Y.shouldUpdateColorBy({canColorBy:g,autoColor:h,colorMode:m,dimensions:f});return g[m]?Y.shouldAddColorByExpression({shouldUpdateColorBy:y,properties:p})&&Y.addColorByExpression(p):Y.switchToAutoColor(p),y&&Y.updateColorBy(p,"qHyperCubeDef."),Y.shouldSwitchToColorPersistent(p)&&Y.changeProperty(p,"color.persistent",!0),Y.deleteTotalMode(f),c}},J=["bar","marker","line"],G={handleAutoMinMax:function(e){var t=e.initialProperties,n=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?E(n,"unsupportedAutoMinMax")||y()(n.measureAxis,t.measureAxis):E(n,"supportedAutoMinMax")||y()(n.measureAxis,t.measureAxis)},handleMeasuresAxis:function(e){var t,n=e.exportFormat,r=e.initialProperties,o=e.properties,i=e.measureType,a=o.qHyperCubeDef,s=o.measureAxis;if(function(e){var t=e.exportFormat,n=e.initialProperties;return!(!t.properties.measureAxes||n.measureAxes||!n.measureAxis||void 0===n.measureAxis.autoMinMax)}({exportFormat:n,initialProperties:r})){var l=function(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach((function(e){if(e.qDef.series){var n=e.qDef.series,r=n.type,o=n.axis;t[o]||(t[o]={axis:o,type:{line:0,marker:0,bar:0,total:0}}),J.includes(r)&&t[o].type[r]++,t[o].type.total++}})),t}(a);l.length?(i&&(t=l.filter((function(e){return e.type[i]>0})).sort((function(e,t){return t.type[i]-e.type[i]}))),t&&t.length||(t=l.sort((function(e,t){return t.type.total-e.type.total}))),t&&t[0]&&y()(s,n.properties.measureAxes[t[0].axis])):y()(s,n.properties.measureAxes[0])}},setInterColumnSortOrder:function(e){if(e.qDimensions.length>1){var t=e.qInterColumnSortOrder.indexOf(0);if(0!==t){var n=e.qInterColumnSortOrder[0];e.qInterColumnSortOrder[0]=0,e.qInterColumnSortOrder[t]=n}}}},Z={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,o=e.supportedAutoMinMax,i=void 0===o||o,a=K.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),s=a.properties;return i?(h(s,"measureAxis.min","supportedAutoMinMax"),h(s,"measureAxis.max","supportedAutoMinMax")):(h(s,"measureAxis.min","unsupportedAutoMinMax"),h(s,"measureAxis.max","unsupportedAutoMinMax")),a},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,o=e.defaultPropertyValues,i=e.hypercubePath,a=e.measureType,s=e.extension,l=e.supportedFilters,u=e.isHCModifierSupported,c=K.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:o,hypercubePath:i,extension:s,supportedFilters:l,isHCModifierSupported:u}),p=c.qProperty;return G.handleAutoMinMax({initialProperties:n,properties:p}),G.handleMeasuresAxis({exportFormat:t,initialProperties:n,properties:p,measureType:a}),G.setInterColumnSortOrder(p.qHyperCubeDef),c}};function X(e,t,n){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(n)}function Q(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,o=e.arrayName,a=e.itemPath;i.getValue(t,n,[]).forEach((function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,o=e.item,a=e.itemPath,s=i.getValue(o,a);if(void 0!==s){var l=i.getValue(o,"qDef.cId");l||(l=i.generateId(),i.setValue(o,"qDef.cId",l));var u=X(n,r,l);i.setValue(t,u,s),i.setValue(o,a,void 0)}}({properties:t,quarantineName:r,arrayName:o,item:e,itemPath:a})}))}function ee(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,o=e.arrayName,a=e.itemPath;i.getValue(t,n,[]).forEach((function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,o=e.item,a=e.itemPath,s=i.getValue(o,"qDef.cId");if(s){var l=X(n,r,s),u=i.getValue(t,l);void 0!==u&&(i.setValue(o,a,u),i.setValue(t,l,void 0))}}({properties:t,quarantineName:r,arrayName:o,item:e,itemPath:a})}))}var te={quarantine:function(e){Q({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalColoring",arrayName:"measures",itemPath:"qDef.conditionalColoring"})},unquarantine:function(e){ee({properties:e,arrayPath:"qHyperCubeDef.qMeasures",itemPath:"qDef.conditionalColoring",arrayName:"measures",quarantineName:"conditionalColoring"})}},ne={quarantine:function(e){Q({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"measures",itemPath:"qCalcCondition"}),Q({properties:e,arrayPath:"qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"dimensions",itemPath:"qCalcCondition"})},unquarantine:function(e){ee({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"measures",itemPath:"qCalcCondition"}),ee({properties:e,arrayPath:"qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"dimensions",itemPath:"qCalcCondition"})}};t.default={hypercube:I,colorChart:K,axisChart:Z,quarantineProperty:h,unquarantineProperty:E,quarantineArrayProp:Q,unquarantineArrayProp:ee,conditionalColoring:te,conditionalShow:ne}}]));const xd={setValue(e,t,n){if(!t)return;const r=t.split(".");let o=e;const i=r[r.length-1];let a;for(a=0;a<r.length-1;++a)null==o[r[a]]&&(o[r[a]]=Number.isNaN(+r[a+1])?{}:[]),o=o[r[a]];void 0!==n?o[i]=n:delete o[i]},getValue(e,t,n){const r=t.split(".");let o,i=e;if(void 0===i)return n;for(o=0;o<r.length;++o){if(null==i[r[o]])return n;i=i[r[o]]}return i}},qd={getDimensions:e=>xd.getValue(e,"qHyperCubeDef.qDimensions",[]),getNumDimensions:e=>xd.getValue(e,"qHyperCubeDef.qDimensions.length",0),getMeasures:e=>xd.getValue(e,"qHyperCubeDef.qMeasures",[]),getNumMeasures:e=>xd.getValue(e,"qHyperCubeDef.qMeasures.length",0),getDimensionLayouts(e,t){const n=xd.getValue(e,t?t+".qHyperCube":"qHyperCube",null);return n?n.qDimensionInfo:[]},getDimensionLayout(e,t,n){return this.getDimensionLayouts(t,n).filter((t=>e===t.cId))[0]},getMeasureLayouts(e,t){const n=xd.getValue(e,t?t+".qHyperCube":"qHyperCube",null);return n?n.qMeasureInfo:[]},getMeasureLayout(e,t,n){return this.getMeasureLayouts(t,n).filter((t=>e===t.cId))[0]}};const Dd={colorModeOptions:{primary:()=>!0,dimension:()=>!0,multiColor:()=>!1,measure:()=>!0,expression:e=>qd.getNumMeasures(e)>=1},showLegend:e=>{const t=xd.getValue(e,"color.auto"),n=xd.getValue(e,"color.expressionIsColor"),r=xd.getValue(e,"color.mode");return!(!t&&"primary"===r||!t&&"byExpression"===r&&(n||void 0===n))},persistentColorsShow:e=>!xd.getValue(e,"color.auto")&&"byDimension"===xd.getValue(e,"color.mode"),useDimValColShow:e=>(void 0===xd.getValue(e,"color.useDimColVal")&&xd.setValue(e,"color.useDimColVal",!1),!xd.getValue(e,"color.auto")&&"byDimension"===xd.getValue(e,"color.mode")&&"libraryItem"===xd.getValue(e,"color.byDimDef.type"))},Cd=function(e){const{colorModeOptions:t,persistentColorsShow:n,useDimValColShow:r,showLegend:o}=Dd;this.color={colorMode:{options(n){const r=[];return"explore"===e&&r.push({value:"auto",translation:"Common.Auto"}),t.primary(n)&&r.push({value:"primary",translation:"properties.colorMode.primary"}),t.multiColor(n)&&r.push({value:"byMultiple",translation:"properties.colorMode.multicolored"}),t.dimension(n)&&r.push({value:"byDimension",translation:"properties.colorMode.byDimension"}),t.measure(n)&&r.push({value:"byMeasure",translation:"properties.colorMode.byMeasure"}),t.expression(n)&&"explore"!==e&&r.push({value:"byExpression",translation:"properties.colorMode.byExpression"}),r}},persistentColors:{show:e=>r(e)?n(e)&&!xd.getValue(e,"color.useDimColVal"):n(e)},useDimColVal:{show:r}},this.legend={show:o,showTitle:{show(e){const t=xd.getValue(e,"color.auto");return xd.getValue(e,"legend.show")&&o(e)&&(t||!function(e){return"byExpression"===xd.getValue(e,"color.mode")&&!0===xd.getValue(e,"color.expressionIsColor")}(e))}},dock:{show:e=>xd.getValue(e,"legend.show")&&o(e)}}};function wd(e){return new Cd(e)}const Sd={classification:{section:"styling",tags:["simple"],exclusive:!0},component:"items",show:!0,chartType:"piechart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.PieChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,items:{strokeSection:{translation:"properties.Outline",component:"items",items:{strokeItem:{component:"items",ref:"components",key:"slices",items:{strokeWrapper:{component:"inline-wrapper",items:{strokeWidth:{translation:"LayerStyleEditor.style.strokeWidth",ref:"style.strokeWidth",width:9,show:!0,component:"dropdown",type:"string",options:[{value:"none",translation:"Common.None"},{value:"small",translation:"Common.Small"},{value:"medium",translation:"Common.Medium"},{value:"large",translation:"Common.Large"}],defaultValue:"none",schemaIgnore:!0},strokeColor:{ref:"style.strokeColor",defaultValue:{color:"#FFFFFF"},schemaIgnore:!0,width:3,component:"color-picker"}}}}}}},cornerRadius:{component:"items",translation:"LayerStyleEditor.style.cornerRadius",items:{cornerRadiusItem:{component:"items",ref:"components",key:"slices",items:{cornerRadiusSlider:{ref:"style.cornerRadius",translation:"LayerStyleEditor.style.cornerRadius",component:"slider",min:0,max:40,step:.05,width:12,defaultValue:0,schemaIgnore:!0}}}}},innerRadius:{translation:"LayerStyleEditor.style.innerRadius",component:"items",show:e=>e.donut.showAsDonut,items:{innerRadiusItem:{component:"items",ref:"components",key:"slices",items:{innerRadiusSlider:{ref:"style.innerRadius",translation:"LayerStyleEditor.style.innerRadius",component:"slider",min:.05,max:.75,step:.01,width:12,defaultValue:.55,schemaIgnore:!0}}}}}}},Md={component:"style-editor",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",resetBtnTranslation:"LayerStyleEditor.component.resetAll",key:"slices",ref:"components",defaultValues:{key:"slices",style:{strokeColor:{index:-1,color:"#FFFFFF"},strokeWidth:"none",cornerRadius:0,innerRadius:.55}},items:{slices:{components:"items",type:"items",uses:"styling.slice",items:{strokeWidth:{show:!0,component:"dropdown",type:"string",options:[{value:"none",translation:"LayerStyleEditor.style.strokeWidth.none"},{value:"small",translation:"LayerStyleEditor.style.strokeWidth.small"},{value:"medium",translation:"LayerStyleEditor.style.strokeWidth.medium"},{value:"large",translation:"LayerStyleEditor.style.strokeWidth.large"}],defaultValue:"none"},strokeColor:{show:e=>"none"!==e.style.strokeWidth},cornerRadius:{component:"slider",min:0,max:40,step:.05,defaultValue:0,show:!0},innerRadius:{component:"slider",min:.05,max:.75,step:.01,defaultValue:.55,show:(e,t,n)=>n.layout.donut.showAsDonut}}}}},Ed={component:"styling-panel",chartTitle:"Object.PieChart",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,items:{strokeSection:{translation:"properties.Outline",component:"panel-section",items:{strokeItem:{component:"items",ref:"components",key:"slices",items:{strokeWrapper:{component:"inline-wrapper",items:{strokeWidth:{ref:"style.strokeWidth",width:9,show:!0,component:"dropdown",type:"string",options:[{value:"none",translation:"Common.None"},{value:"small",translation:"Common.Small"},{value:"medium",translation:"Common.Medium"},{value:"large",translation:"Common.Large"}],defaultValue:"none",schemaIgnore:!0},strokeColor:{ref:"style.strokeColor",defaultValue:{color:"#FFFFFF"},schemaIgnore:!0,width:3,component:"color-picker"}}}}}}},cornerRadius:{translation:"LayerStyleEditor.style.cornerRadius",component:"panel-section",items:{cornerRadiusItem:{component:"items",ref:"components",key:"slices",items:{cornerRadiusSlider:{ref:"style.cornerRadius",component:"slider",min:0,max:40,step:.05,width:12,defaultValue:0,schemaIgnore:!0}}}}},innerRadius:{translation:"LayerStyleEditor.style.innerRadius",component:"panel-section",show:e=>e.donut.showAsDonut,items:{innerRadiusItem:{component:"items",ref:"components",key:"slices",items:{innerRadiusSlider:{ref:"style.innerRadius",component:"slider",min:.05,max:.75,step:.01,width:12,defaultValue:.55,schemaIgnore:!0}}}}}}},Id=wd("hard");const Ad=e=>{var t;null!==(t=e.color)&&void 0!==t&&t.auto||(sl(e,"color.mode","byDimension"),sl(e,"color.byDimDef.activeDimensionIndex",0),sl(e,"color.persistent",!1))},kd=e=>{var t;const n=[{value:"primary",translation:"properties.colorMode.primary"},{value:"byDimension",translation:"properties.colorMode.byDimension"}];switch(null===(t=e.color)||void 0===t?void 0:t.mode){case"byMultiple":n.push({value:"byMultiple",translation:"properties.colorMode.multicolored"});break;case"byMeasure":n.push({value:"byMeasure",translation:"properties.colorMode.byMeasure"});break;case"byExpression":n.push({value:"byExpression",translation:"properties.colorMode.byExpression"})}return n},Td=e=>{const{flags:t,translator:n}=e||{},r={items:{simpleItems:{items:{autoColor:{label:e=>{var t;return null!==(t=e.color)&&void 0!==t&&t.auto?n.get("Simple.Color.Auto",n.get("properties.colorMode.byDimension")):n.get("Common.Custom")},change:Ad},colorMode:{options:kd}}}}},o={items:{labels:{items:{header:{show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length},pointLabels:{component:"checkbox",ref:"dataPoint.auto",type:"boolean",defaultValue:!0,translation:"Simple.Label.Value",show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length,change(e){e.dataPoint.auto||sl(e,"dataPoint.labelMode","none")}},dimensionTitle:{component:"checkbox",ref:"dimensionTitle",type:"string",translation:"Simple.Label.Dimension.Hide",defaultValue:"all",show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length,convertFunctions:{get:(e,t,n,r)=>!r.dimensionTitle,set(e,t,n,r,o){o.dimensionTitle=!e}}}}}}};return{uses:"settings",items:{simpleStyling:null!=t&&t.isEnabled("PIECHART_SIMPLE_STYLING")?Sd:void 0,simpleLabels:o,general:{items:{showDisclaimer:null!=t&&t.isEnabled("SHOW_DISCLAIMER")?{translation:"properties.showDisclaimer",type:"boolean",ref:"showDisclaimer",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Show"},{value:!1,translation:"properties.hide"}]}:void 0}},presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{sliceStyling:null!=t&&t.isEnabled("SENSECLIENT_PS_17478_STYLINGPANEL_PIECHART")?Ed:Md,showAsDonut:{ref:"donut.showAsDonut",type:"boolean",component:"item-selection-list",defaultValue:!1,horizontal:!0,items:[{icon:"pie_chart_pie",component:"icon-item",labelPlacement:"bottom",translation:"properties.pie",value:!1},{icon:"pie_chart_donut",component:"icon-item",labelPlacement:"bottom",translation:"properties.donut",value:!0}]},labels:{type:"items",snapshot:{tid:"property-labels"},items:{dimensionTitle:{ref:"dimensionTitle",type:"boolean",component:"switch",translation:"properties.dataPoints.dimensionlabels",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]},valuesAuto:{ref:"dataPoint.auto",type:"boolean",translation:"properties.dataPoints.labelmode",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},labelMode:{ref:"dataPoint.labelMode",type:"string",component:"dropdown",options:[{value:"none",translation:"Common.None"},{value:"share",translation:"properties.dataPoints.labelmode.share"},{value:"value",translation:"properties.dataPoints.labelmode.value"}],defaultValue:"share",show:e=>!e.dataPoint.auto},labelValueMode:{ref:"dataPoint.labelValueMode",type:"string",component:"dropdown",translation:"properties.dataPoints.labelvaluemode",options:[{value:"arc",translation:"Visualizations.Descriptions.Angle"},{value:"radius",translation:"Visualizations.Descriptions.Radius"}],defaultValue:"arc",show:e=>!e.dataPoint.auto&&function(e){return e.qHyperCubeDef&&e.qHyperCubeDef.qMeasures.length>1||e.qHyperCube&&e.qHyperCube.qMeasureInfo.length>1}(e)&&"value"===e.dataPoint.labelMode}}}}},colorsAndLegend:{uses:"colorsAndLegend",items:{colors:{items:{colorMode:{options:Id.color.colorMode.options},persistentColors:{show:Id.color.persistentColors.show}}},simpleColors:r,legend:{show:Id.legend.show,items:{show:{defaultValue:!1,snapshot:{tid:"property-legend"}},showTitle:{show:Id.legend.showTitle.show},dock:{show:Id.legend.dock.show}}}}},tooltip:{uses:"tooltip"}}}},Ld={uses:"data",items:{dimensions:{uses:"dimensions"},measures:{uses:"measures",items:{numberFormatting:{items:{percentOfPieMessage:{component:"text",translation:"properties.numberFormatting.pieMessage",show:(e,t,{properties:n}={})=>n&&(n.dataPoint.auto||"share"!==n.dataPoint.labelMode)}}}}}}},Od={uses:"sorting",items:{interColumnSorting:{reset:e=>{const{qDimensions:t,qMeasures:n,qInterColumnSortOrder:r}=e.qHyperCubeDef;if(1===t.length&&n.length>=1){const t=r.length,n=[...Array(t).keys()];[n[0],n[1]]=[n[1],n[0]],e.qHyperCubeDef.qInterColumnSortOrder=n}}}}},Pd={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{suppressZero:null,calcCond:{uses:"calcCond"}}}}};function Nd(e){return{type:"items",component:"accordion",items:{data:Ld,sorting:Od,addons:Pd,settings:Td(e)}}}const Rd=wd("explore"),Fd=Nd();var jd={type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sort"},presentation:{uses:"presentation",items:{showAsDonut:Fd.items.settings.items.presentation.items.showAsDonut,labelMode:{type:"items",items:{labelMode:{type:"string",component:"radio-list",translation:"properties.dataPoints.labelmode",diffs:["dataPoint.auto:false","dataPoint.labelMode"],options:Fd.items.settings.items.presentation.items.labels.items.labelMode.options,setPropertyValue(e,t){e.dataPoint.auto=!1,e.dataPoint.labelMode=t},getValue:e=>e.dataPoint.auto?"":e.dataPoint.labelMode}}}}},color:{uses:"color",items:{mode:{options:Rd.color.colorMode.options},dimension:{items:{persistentColors:{show:e=>!(e.color&&"byDimension"===e.color.mode&&e.color.useDimColVal&&Rd.color.useDimColVal.show(e))}}}}}}};function Hd(e,t){const n=e&&e.desc&&void 0!==e.desc.share?e.desc.share:void 0;return t("share")(n)}function _d(e){return e.data.num.label}function zd(e){return e.data.radius.label}function Vd(e,t,n,r){return function(e,t){if(e.dataPoint.auto)return 1===e.qHyperCube.qSize.qcy?_d:Hd;if("share"===e.dataPoint.labelMode)return Hd;if("value"===e.dataPoint.labelMode)return t.encodings.slice.outerRadius&&"radius"===e.dataPoint.labelValueMode?zd:_d;return _d}(n,r)(e,t)}function Ud(e){let t;return t=e.data.label?function(e,t){let n=e;return n.length>t&&(n=n.substr(0,t-3)+"..."),n}(e.data.label,20):"",t}class Bd{constructor({element:e,properties:t,effectHelper:n,Flag:r}){this.element=e,this.Flag=r,n.initFade(this.element);const o=e.find(".effectLayer");o.length>0&&o.remove(),e.append('<div class="effectLayer"></div>'),this.effectLayer=e.find(".effectLayer"),this._effectProperties=t,this.selectedIndex=t.selectedIndex,this.hasPropertiesPanel=!1,this.effectApplied=!0,n.fadeIn(this.element)}updateOrigSettings(e){return{dataPoint:e.dataPoint,legend:e.legend,dimensionTitle:e.dimensionTitle}}updateFlags(e,t){const n=this.chart.getAffectedShapes("highlight"),r=this.effectLayer[0].getBoundingClientRect(),o=n.map((n=>{const{start:o,end:i,outerRadius:a,offset:s}=n.desc.slice,{scaleRatio:l}=this.chart.component(n.key).rect,u=n.element.getBoundingClientRect(),c=(o+i)/2,p=u.left-r.left+l.x*(s.x+a*Math.sin(c)),d=u.top-r.top+l.y*(s.y-a*Math.cos(c)),f=Math.cos(c)>0?"top":"bottom",m=Math.sin(c)>0?"right":"left";return{title:Ud(n),label:Vd(n,this.chart.formatter,e,t),orientation:`${f}${m}`,position:{x:p,y:d}}}));this.Flag.show(this.effectLayer,o)}init(e,t,n,r){return t.getProperties().then((e=>{if(!e.originalModelSettings){const t=J(!0,{},e);e.originalModelSettings=this.updateOrigSettings(t)}e.effectProperties=r,e.effectPath=n,e.dataPoint.show=!1,e.legend.show=!1,e.dimensionTitle=!1,t.setProperties(e)}))}remove(e,t,n){return e.options=J(e.options,{effect:null}),n?t.getProperties().then((e=>J(e,{effectPath:null,effectProperties:null,dataPoint:J(!0,{},e.originalModelSettings.dataPoint),legend:J(!0,{},e.originalModelSettings.legend),dimensionTitle:e.originalModelSettings.dimensionTitle}))):Promise.resolve()}}class Wd extends Bd{init(e,t,n,r){return e.options=J(!0,e.options,{effect:this}),t.layout.effectProperties&&t.layout.effectPath===n&&t.layout.effectProperties.max===r.max?Promise.resolve():super.init(e,t,n,r)}update(e,t,n){this.chart=t,this.updateHighlight(e),this.updateFlags(e,n)}updateHighlight(e){const t=this.chart.component("slices").data.items,n=e.effectProperties.min,r=e.effectProperties.max,o=[];let i=[1/0,-1],a=[-1/0,-1];t.forEach(((e,t)=>{const o=e.num.value;n&&o<i[0]&&(i=[o,t]),r&&o>a[0]&&(a=[o,t])})),-1!==i[1]&&o.push(t[i[1]].value),-1!==a[1]&&o.push(t[a[1]].value),o.length&&this.chart.brush("highlight").setValues(o.map((e=>({key:"qHyperCube/qDimensionInfo/0",value:e}))))}}class $d extends Bd{constructor(e){super(e),this.hasPropertiesPanel=!0,this.propsTemplate=e.highlightValuePropsTemplate,this.effectHelper=e.effectHelper}onClick(e){if(!this.chart)return;const t=this.chart.shapesAt(function(e,t){const n=t.element.getBoundingClientRect();return{x:e.clientX-n.left,y:e.clientY-n.top}}(e,this.chart),{propagation:"stop"});if(1!==t.length)return;const n=t[0],r=this.chart.component("slices").data.items.map((e=>e.value)).indexOf(n.data.value);-1!==r&&(this.selectedIndex=r,this.effectHelper.updateSelectedPointIndex(this))}update(e,t,n){this.chart=t,this.updateHighlight(e),this.updateDataPoints(e,n),this.updateFlags(e,n)}updateHighlight(e){const t=this.chart.component("slices").data.items[e.effectProperties.selectedIndex];this.chart.brush("highlight").setValues([{key:"qHyperCube/qDimensionInfo/0",value:t.value}])}updateDataPoints(e,t){this.dataPoints=this.chart.findShapes("path").filter((e=>"slices"===e.key)).map(((n,r)=>{const o=Vd(n,this.chart.formatter,e,t);return{text:`${Ud(n)} (${o})`,value:r}}))}init(e,t,n,r){return e.options=J(!0,e.options,{effect:this}),t.layout.effectProperties&&t.layout.effectPath===n&&t.layout.effectProperties.selectedIndex===r.selectedIndex?Promise.resolve():super.init(e,t,n,r)}}var Yd={isCompatible:({effectPath:e})=>"/effects/maxmin"===e||"/effects/highlight-value"===e,create:e=>"/effects/maxmin"===e.effectPath?new Wd(e):"/effects/highlight-value"===e.effectPath?new $d(e):null};function Kd(e){const t={},{components:n,tooltip:r}=e,o=n?n.filter((e=>"slices"===e.key))[0]:void 0;if(o&&o.style&&Object.keys(o.style).forEach((e=>{t["chart_style_"+e]=o.style[e]})),r){var i,a;t.chart_tooltip_custom=!r.auto;const e=null===(i=r.chart)||void 0===i||null===(a=i.object)||void 0===a?void 0:a.refId;!r.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}function Jd(e){if(!e.qHyperCubeDef)return;const t=e.qHyperCubeDef.qDimensions,n=e.qHyperCubeDef.qMeasures;1===t.length&&1===n.length&&(n[0].qSortBy.qSortByNumeric=-1,e.qHyperCubeDef.qInterColumnSortOrder.splice(0,e.qHyperCubeDef.qInterColumnSortOrder.length,1,0))}function Gd(e){e.qOtherTotalSpec.qOtherMode="OTHER_COUNTED",e.qOtherTotalSpec.qOtherCounted={qv:"10"}}function Zd({translator:e}){return{dimensions:{min:1,max:1,description:()=>e.get("Visualizations.Descriptions.Slice"),add(e,t){Gd(e),Jd(t),Dp.addCallbackCustomTooltip(t)},move(e,t){Gd(e),Jd(t),Dp.moveCallbackCustomTooltip(t,e)},remove(e,t){Dp.removeCallbackCustomTooltip(t,e)},replace(e,t,n,r){Gd(e),Jd(r),Dp.replaceCallbackCustomTooltip(r,t)}},measures:{min:1,max:2,description:(t,n)=>e.get(0===n?"Visualizations.Descriptions.Angle":"Visualizations.Descriptions.Radius"),add(e,t){Jd(t)},remove(e,t){!function(e){if(!e.qHyperCubeDef)return;const t=e.qHyperCubeDef.qMeasures,{mode:n}=e.color;"byExpression"===n&&0===t.length&&(e.color.mode="primary")}(t)}}}}const Xd=e=>e.qMax<=0,Qd=e=>!(!(e&&e.qHyperCube.qSize.qcy>0)||e.qHyperCube.qMeasureInfo.every(Xd));function ef(e){return{definition:Nd(e),softDefinition:jd,support:{snapshot:Qd,export:Qd,exportData:!0,sharing:Qd,viewData:!0,effects:!0},effects:Yd,extendMetrics:Kd,importProperties:(t,n,r,o)=>{const i={layout:{templateId:n.templateId}};r.mapProperties(i);const a={defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()},s=bd.colorChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:Zd(e),defaultPropertyValues:a,hypercubePath:o});return s.qProperty.dataPoint&&!1===s.qProperty.dataPoint.show&&delete s.qProperty.dataPoint.show,s},exportProperties:(e,t,n)=>bd.colorChart.exportProperties({propertyTree:e,hypercubePath:t,viewDataMode:n})}}function tf(e){return{properties:{version:"1.20.2",color:{auto:!0,autoMinMax:!0,byDimDef:void 0,byMeasureDef:void 0,colorExpression:void 0,dimensionScheme:"12",expressionIsColor:!0,expressionLabel:"",formatting:{numFormatFromTemplate:!0,isCustomFormatted:void 0},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},components:[{key:"slices",style:{strokeWidth:"none",strokeColor:{index:-1,color:Np.STROKE.COLOR},cornerRadius:Np.CORNER_RADIUS,innerRadius:Np.INNER_RADIUS}}],dataPoint:{auto:!0,labelMode:"share",labelValueMode:"arc"},dimensionTitle:!0,donut:{showAsDonut:!1},footnote:"",legend:{dock:"auto",show:!0,showTitle:!0},qHyperCubeDef:{qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:10,qHeight:500}],qSuppressMissing:!0,qSuppressZero:!1,qMode:"S"},showDetails:!1,showDisclaimer:!0,showTitles:!0,subtitle:"",title:"",tooltip:{auto:!0,hideBasic:!1,data:{qHyperCubeDef:void 0},chart:void 0,imageComponents:void 0}},data:{targets:[Zd(e)]},importProperties:({exportFormat:t,initialProperties:n,hypercubePath:r})=>{const o=bd.colorChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:Zd(e),hypercubePath:r});return o.qProperty.dataPoint&&!1===o.qProperty.dataPoint.show&&delete o.qProperty.dataPoint.show,o},exportProperties:({propertyTree:e,hypercubePath:t,viewDataMode:n})=>bd.colorChart.exportProperties({propertyTree:e,hypercubePath:t,viewDataMode:n})}}const nf=o=>{const{flags:i}=o;!function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(R).forEach((t=>{e.add(R[t])}))}}(o.translator);const a=function(){const o=t();return o.use(n),o.use(r(e)),o.use(na()),o.component("pie-dividers",aa),o.component("negative-indicators",ua),o}();return{qae:tf(o),ext:ef(o),component(){const e=up({picasso:a}),t=Op({flags:i,picasso:a,instance:e});!function({instance:e,services:t,picasso:r,flags:o}){const i=g(),a=w(),s=S(),l=q(),u=A(),c=M(),p=v(),d=I(),{qLocaleInfo:f}=k(),[m]=L((()=>t?(Ap.attrExpr.updateProperties(a,c),Promise.all([t.colorService.initialize({createConfig:({getUseBaseColors:e})=>({theme:u,legendProps:c.legend,layout:c,localeInfo:f,hc:c.qHyperCube,colorProps:{...c.color,useBaseColors:e(c)}})}),a&&!c.snapshotData?a.getEffectiveProperties():Promise.resolve({}),t.pluginService.initialize()])):Promise.resolve()),[t]);C((()=>{null!=e&&e.selectionService&&e.selectionService.setLayout(c)}),[c]),C((()=>{if(!e||!m)return;const{chart:h,viewState:g,interactions:y}=e,{colorService:v,pluginService:b,tooltipService:x}=t,q=i.viewState||{};c.snapshotData||(g.preventSet("legendScrollOffset",q.legendScrollOffset||0),g.preventSet("rotation",q.rotation||0)),function(e,t){e&&e.snapshotData&&e.snapshotData.content&&e.snapshotData.content.chartData&&(t.preventSet("legendScrollOffset",e.snapshotData.content.chartData.legendScrollOffset),t.preventSet("rotation",e.snapshotData.content.chartData.rotation))}(c,g),x.expando.set("properties",m[1]);const D=r.data("q")({key:"qHyperCube",data:c.qHyperCube,config:{localeInfo:f}}),C=[{type:"q",key:"qHyperCube",data:c.qHyperCube,config:{localeInfo:f}},...v.getData()],w={slice:{arc:"qMeasureInfo/0"}};c.qHyperCube.qMeasureInfo.length>1&&(w.slice.outerRadius="qMeasureInfo/1");const S=r.data("q")({data:c.qHyperCube,config:{localeInfo:f}}),M=md,E=function(e,t){return t.slice.outerRadius?e.extract({field:"qDimensionInfo/0",props:{num:{field:t.slice.arc},radius:{field:t.slice.outerRadius}}}).filter((e=>e.num.value>0&&"NaN"!==e.radius.value)):e.extract({field:"qDimensionInfo/0",props:{num:{field:t.slice.arc}}}).filter((e=>e.num.value>0))}(S,w);md=E.length;const I=new Set(hd);hd=new Set(E.map((e=>e.num.value)));const A=p?()=>{const e=h.brush("selection");n.selections(e,{},c).forEach((e=>{p.select(e)}))}:()=>{},k=c.snapshotData&&!i.freeResize?{width:(c.snapshotData.content.size||c.snapshotData.object.size).w,height:(c.snapshotData.content.size||c.snapshotData.object.size).h}:void 0,T=t=>e.selectionService.getIsSelectionLocked(t),L=()=>fd({layout:c,context:{rtl:"rtl"===i.direction,theme:u,translator:l,constraints:d,model:a},selectionService:e.selectionService},{picasso:r,ds:D,model:a,app:s,chart:h,onSelect:A,isLocked:T,interactions:y,constraints:d,translator:l,viewState:g,dataRowCount:md,encodings:w,colorService:v,pluginService:b,tooltipService:x,debouncer:ul,properties:m[1],logicalSize:k,flags:o,animations:{enabled:()=>function(e,t,n){return 0===n.get("rotation")&&!(e<=1||t<=1)}(M,md,g),transitionPhaseDisabled:gd(I,hd)}});e.generateSettings=L,h.update({data:C,settings:L()}),i.effect&&c.effectProperties?i.effect.update(c,h,{encodings:w}):c.effectPath||h.brush("highlight").end()}),[e,m,i.direction,i.effectProperties,d,u.name(),l.language()])}({instance:e,services:t,picasso:a,flags:i}),function({instance:e}){const t=M(),n=g(),r=O();C((()=>{e&&e.generateSettings&&(e.chart.update({settings:e.generateSettings()}),n.effect&&n.effect.update(t,e.chart))}),[r.width,r.height])}({instance:e}),yd({instance:e,services:t})}}};export{nf as default};
18
+ e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,o,i,a,s,l,u,c,d,p=e.length,f=e.search(/[0-9\-\+#]/),m=f>0?e.substring(0,f):"",h=e.split("").reverse().join(""),g=h.search(/[0-9\-\+#]/),y=p-g,v=e.substring(y,y+1),b=y+("."===v||","===v?1:0),x=g>0?e.substring(b,p):"";if(n=(t="-"===(e=e.substring(f,b)).charAt(0)?-t:+t)<0?t=-t:0,o=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",i=r&&r[1]&&r[0]||",",e=e.split(o),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(u=t.split("."))[1]||u[1]&&u[1].length<=s)&&(t=(+t).toFixed(s+1)),c=e[0].split(i),e[0]=c.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;u[0].length<e[0].length-a;)u[0]="0"+u[0];else 0==+u[0]&&(u[0]="");if((t=t.split("."))[0]=u[0],l=c[1]&&c[c.length-1].length){for(h="",y=(d=t[0]).length%l,p=d.length,b=0;b<p;b++)h+=d.charAt(b),!((b-y+1)%l)&&b<p-l&&(h+=i);t[0]=h}return t[1]=e[1]&&t[1]?o+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),m+(n?"-":"")+r+x}}(cu={exports:{}}),cu.exports);function pu(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}var fu={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"},mu=/%$/,hu=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,gu=/^\(oct\)/i,yu=/^\(dec\)/i,vu=/^\(hex\)/i,bu=/^\(bin\)/i,xu=/^\(rom\)/i,qu=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,Du=/#|0/g;function Cu(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 wu(e,t,n){var r=pu(e);return n?r:new RegExp(r||"",t)}function Su(e,t,n){var r,o,i,a,s,l,u,c,d,p,f,m=e.pattern;m.indexOf("A")>=0&&(m=m.replace("A",""),e.abbreviate=!0),p=t,(f=n)&&(f=pu(f)),p&&(p=pu(p)),d=new RegExp("(?:[#0]+".concat(p,")?[#0]+(?:").concat(f,"[#0]+)?")),a=(i=(i=m.match(d))?i[0]:"")?m.substr(0,m.indexOf(i)):m,s=i?m.substring(m.indexOf(i)+i.length):"",i||(i=m?"#":"##########"),t&&t===n&&(o=(r=i.split(n)).pop(),i=r.join("")+n+o,t=""),l=t,t=/,/.test(n)?"¤":",",l&&(i=i.replace(wu(l,"g"),t)),u=n,n=".",u&&(i=i.replace(wu(u,"g"),n)),c=(c=i.match(/#/g))?c.length:0;var h,g=m.split(u);g[1]&&(h=g[1].match(Du)),e.prefix=a||"",e.postfix=s||"",e.pattern=m,e.maxPrecision=h?h.length:2,e.percentage=mu.test(m),e.numericPattern=i||"",e.numericRegex=new RegExp("".concat(wu(t,null,!0),"|").concat(wu(n,null,!0)),"g"),e.groupTemp=l,e.decTemp=u,e.t=t,e.d=n,e.temp=c}var Mu=function(){function e(t,n,r,o,i){cl(this,e),this.localeInfo=t,this.pattern=n,this.thousandDelimiter=r||",",this.decimalDelimiter=o||".",this.type=i||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return fu;var n={};return e.qNumericalAbbreviation.split(t).forEach((function(e){var t=e.split(":");2===t.length&&(n[t[0]]=t[1])})),n}(t,this.patternSeparator),this.prepare()}return pl(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t,n,r){return this.prepare(t,n,r),this.formatValue(e)}},{key:"prepare",value:function(e,t,n){var r;void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),e?(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],qu.test(e[0])&&(r.positive.isFunctional=!0),e[1]?qu.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?qu.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1,r.positive.isFunctional||Su(r.positive,t,n),r.negative&&!r.negative.isFunctional&&Su(r.negative,t,n),r.zero&&!r.zero.isFunctional&&Su(r.zero,t,n)):this._prepared={pattern:!1}}},{key:"formatValue",value:function(e){var t,n,r,o,i,a,s,l,u,c=this._prepared,d="",p="",f=e;if(isNaN(e))return"".concat(f);if(e=+e,!1===c.pattern)return e.toString();if(0===e&&c.zero)return(c=c.zero).pattern;if(e<0&&c.negative?(c=c.negative,e=-e):c=c.positive,i=c.d,a=c.t,c.isFunctional)e=function(e,t,n){var r;return hu.test(t)?e=Cu(e,Number(/\d{2}/.exec(t)[0]),t,n):gu.test(t)?e=Cu(e,8,t,n):yu.test(t)?e=Cu(e,10,t,n):vu.test(t)?e=Cu(e,16,t,n):bu.test(t)?e=Cu(e,2,t,n):xu.test(t)&&(r="",e<0&&(r="-",e=-e),0===(e=Math.floor(e))?e="0":e<=5e5?(e=function(e,t){for(var n,r="",o=Number(String(e).slice(-3)),i=(e-o)/1e3,a=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),s=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();o>0;)for(n=0;n<a.length;n++)if(a[n]<=o){r+=s[n],o-=a[n];break}for(n=0;n<i;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,i);else{if(c.percentage&&(e*=100),c.abbreviate){var m,h,g=Object.keys(this.abbreviations).map((function(e){return parseInt(e,10)})).sort((function(e,t){return e-t})),y=g[0];for(s=0,n=Number(Number(e).toExponential().split("e")[1]);y<=n&&s<g.length;)y=g[++s];s>0&&(m=g[s-1]),m&&n>0&&m>0?h=m:(n<0&&m<0||!m)&&(y<0&&y-n<=c.maxPrecision?h=y:m<=n&&!(y>0&&-n<=c.maxPrecision)&&(h=m)),h&&(d=this.abbreviations[h],e/=Math.pow(10,h))}if(r=Math.abs(e),t=c.temp,u=(l=c.numericPattern).split(i)[1],"I"===this.type&&(e=Math.round(e)),o=e,u||"#"!==l.slice(-1)[0])if(r>=1e15||r>0&&r<=1e-14)e=r?r.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{var v=Number(e.toFixed(Math.min(20,u?u.length:0)).split(".")[0]),b=l.split(i)[0];if(e=du(b+=i,v)||"0",u){var x=Math.max(0,Math.min(14,u.length)),q=u.replace(/#+$/,"").length,D=("I"===this.type?0:r%1).toFixed(x).slice(2).replace(/0+$/,"");for(s=D.length;s<q;s++)D+="0";D&&(e+=i+D)}else 0===v&&(o=0)}else if(r>=Math.pow(10,t)||r<1||r<1e-4)0===e?e="0":r<1e-4||r>=1e20?(e=(e=o.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),p=""):(e=e.toPrecision(Math.max(1,Math.min(14,t)))).indexOf(".")>=0&&(e=(e=e.replace(e.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",i));else{for(l+=i,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(r)/Math.log(10)))),s=0;s<t;s++)l+="#";e=du(l,e)}e=e.replace(c.numericRegex,(function(e){return e===a?c.groupTemp:e===i?c.decTemp:""})),o<0&&!/^-/.test(e)&&(e="-".concat(e))}return c.prefix+e+p+d+c.postfix}}],[{key:"getStaticFormatter",value:function(){return{prepare:function(){},formatValue:function(e){return"".concat(e)}}}}]),e}();function Eu(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.size,i=void 0===o?5e3:o,a=r.multipleArguments,s=void 0!==a&&a,l=r.toKey,u=void 0===l?function(e){return e}:l,c=Object.create(null),d=Object.create(null),p=0,f=0;return(t=s?function(){return n=u.apply(void 0,arguments),t.has(n)?t.get(n):t.set(n,e.apply(void 0,arguments))}:function(r){return n=u(r),t.has(n)?t.get(n):t.set(n,e(r))}).set=function(e,t){return p>=i&&(delete c[d[f]],delete d[f],p--,f++),c[e]=t,d[p]=e,p++,t},t.get=function(e){return c[e]},t.has=function(e){return e in c},t.clear=function(){c=Object.create(null),d=Object.create(null),p=0,f=0},t.size=function(){return p},t}function Iu(e,t,n,r,o){var i=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return vl(Mu,t)}(o,e,t,n,r),a=Eu(i.formatValue.bind(i),{toKey:function(e){return isNaN(e)?e:+e}});function s(e){return a(e)}return s.format=function(e,t,n,r){return a.clear(),i.format(t,e,n,r)},s.pattern=function(e){return e&&(a.clear(),i.pattern=e,i.prepare()),i.pattern},s}var Au=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],ku=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Tu=["January","February","March","April","May","June","July","August","September","October","November","December"],Lu=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Ou(e,t){for(var n=e.length;n<t;n++)e="0".concat(e);return e}function Pu(e){var t=e.toString().split(".");return t[1]?t=Number("0.".concat(t[1])):0}var Nu=function(){function e(t,n,r){cl(this,e);var o,i=t||{};i.qCalendarStrings||(i.qCalendarStrings={qLongDayNames:Au,qDayNames:ku,qLongMonthNames:Tu,qMonthNames:Lu}),this.localeInfo=i,this.locale_days=i.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=i.qCalendarStrings.qDayNames.slice(),this.locale_months=i.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=i.qCalendarStrings.qMonthNames.slice(),n||(n=(fl(o={},"T",i.qTimeFmt||"hh:mm:ss"),fl(o,"D",i.qDateFmt||"YYYY-MM-DD"),fl(o,"TS",i.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"),o)[r]),this.pattern=n}return pl(e,[{key:"clone",value:function(){var t=new e(this.localeInfo,this.pattern);return t.subtype=this.subtype,t}},{key:"format",value:function(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");var n,r,o,i,a,s=/t+/gi.test(t);e instanceof Date?(o=s,i=(r=e).getUTCHours(),o&&((i%=12)||(i=12)),(a=r.getUTCDay()-1)<0&&(a=6),n={year:r.getUTCFullYear(),month:r.getUTCMonth(),day:a,date:r.getUTCDate(),h:i,m:r.getUTCMinutes(),s:r.getUTCSeconds(),f:r.getUTCMilliseconds(),t:r.getUTCHours()>=12?"pm":"am"}):(e<0&&(e=-e,t="-".concat(t)),n=function(e,t){var n,r=function(e){var t=e,n=24*Pu(t),r=60*Pu(n),o=60*Pu(r),i=1e3*Pu(o);return{d:Math.floor(t),h:Math.floor(n),m:Math.floor(r),s:Math.floor(o),f:Math.round(i)}}(e),o=r.d,i=r.h,a=r.m,s=r.s,l=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)||(i+=24*o),/h+/gi.test(t)||(a+=60*i),/m+/gi.test(t)||(s+=60*a),/w+/gi.test(t)&&(u=n?n.getDay()-1:0)<0&&(u=6);var c="";return n&&(c=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:u,date:o,h:i,m:a,s:s,f:l,t:c}}(e,t));var l=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:Ou("".concat(t.year).slice(-2),2),YYY:Ou("".concat(t.year).slice(-3),3),def:function(e){return Ou("".concat(t.year),e.length)}},"M+":{M:t.month+1,MM:Ou("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:Ou("".concat(t.day),2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:function(e){return Ou("".concat(t.date),e.length)}},"h+|H+":{h:t.h,def:function(e){return Ou("".concat(t.h),e.length)}},"m+":{m:t.m,def:function(e){return Ou("".concat(t.m),e.length)}},"s+|S+":{s:t.s,def:function(e){return Ou("".concat(t.s),e.length)}},"f+|F+":{def:function(e){var n="".concat(t.f),r=e.length-n.length;if(r>0)for(var o=0;o<r;o++)n+="0";else r<0&&(n=n.slice(0,e.length));return n}},"t{1,2}|T{1,2}":{def:function(e){var n=t.t;return e[0].toUpperCase()===e[0]&&(n=n.toUpperCase()),n.slice(0,e.length)}}}}(this,n),u=[];for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&u.push(c);var d=new RegExp(u.join("|"),"g");return t.replace(d,(function(e){var t,n,r;for(n in l)if(Object.prototype.hasOwnProperty.call(l,n)&&(t=new RegExp(n)).test(e))break;if(!t)return"";for(var o in l[n])if(o===e||o.toLowerCase()===e){void 0===(r=l[n][o])&&(r=l[n][o.toLowerCase()]);break}return void 0===r&&(r=l[n].def),"function"==typeof r&&(r=r(e)),r}))}}]),e}();function Ru(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return vl(Nu,t)}function Fu(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}function ju(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=Ru(n,e,t),o=Eu(r.format.bind(r),{toKey:function(e){return"object"===ul(e)&&"function"==typeof e.getTime?e.getTime():e}});function i(e){return"IV"!==t?Fu(e):e}function a(e){return e=i(e),o(e)}return a.format=function(e,t){return o.clear(),t=i(t),r.format(t,e)},a.locale=function(n){return r=Ru(n,e,t),o=Eu(r.format.bind(r),{toKey:function(e){return"object"===ul(e)?e.getTime():e}}),this},a.qtype=function(e){return void 0!==e&&(t=e,o.clear()),t},a}function Hu(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return ju(e.qNumFormat.qFmt,e.qNumFormat.qType,t);var n="#",r=t&&void 0!==t.qThousandSep?t.qThousandSep:",",o=t&&void 0!==t.qDecimalSep?t.qDecimalSep:".",i="U",a=e&&!!e.qIsAutoFormat;return e&&e.qNumFormat?(n=e.qNumFormat.qFmt||n,r=e.qNumFormat.qThou||r,o=e.qNumFormat.qDec||o,i=e.qNumFormat.qType||i,a=a&&-1===["M"].indexOf(e.qNumFormat.qType)):a=!0,(a||"U"===i)&&(n="#".concat(o,"##A"),i="U"),Iu(n,r,o,i,t)}function _u(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.meta,r=t.id,o=t.key,i=t.localeInfo,a=t.fieldExtractor,s=t.value,l=t.type,u=t.sourceField,c=s||("dimension"===l?function(e){return e.qElemNo}:function(e){return e.qValue}),d=function(e){return e.qText||""},p="dimension"===l?"first":"avg",f=Hu(n,i),m="dimension"===l?"first":function(e,t){return f(t)},h={id:function(){return r},key:function(){return o},raw:function(){return n},title:function(){return n.qFallbackTitle||n.label},type:function(){return l},origin:function(){return u},items:function(){return e||(e=a(h)),e},min:function(){return n.qMin},max:function(){return n.qMax},value:c,label:d,reduce:p,reduceLabel:m,formatter:function(){return f},tags:function(){return n.qTags}};return h}function zu(e,t,n,r,o){return(t[e]||[]).map((function(t,i){var a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(i),s={instance:_u(kl({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},o))};return s.attrDims=zu("qAttrDimInfo",t,n,a,kl({},o,{value:function(e){return e.qElemNo},type:"dimension"})),s.attrExps=zu("qAttrExprInfo",t,n,a,kl({},o,{value:function(e){return e.qNum},type:"measure"})),s.measures=zu("qMeasureInfo",t,n,a,kl({},o,{value:function(e){return e.qValue},type:"measure"})),s}))}function Vu(){var e,t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=r.key,i=r.data,a=r.config,s=void 0===a?{}:a,l={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},u=i;if(!u)throw new Error('Missing "data" input');if(!u.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');var c=Vu.util,d={cache:l,cube:u,localeInfo:s.localeInfo,fieldExtractor:null,pages:null,hierarchy:function(){return null},virtualFields:s.virtualFields},p={key:function(){return o},raw:function(){return u},field:function(e){return Jl(e,d)},fields:function(){return l.fields.slice()},extract:function(e){return d.extractor(e,p,l,c)},hierarchy:function(e){return d.hierarchy(e,p,l,c)},_cache:function(){return l}};"K"===u.qMode||"T"===u.qMode||!u.qMode&&u.qNodesOnDim?(d.extractor=uu,d.hierarchy=lu,d.pages="K"===u.qMode?u.qStackedDataPages:u.qTreeDataPages):"S"===u.qMode?(d.extractor=Pl,d.pages=u.qDataPages,d.hierarchy=lu):d.extractor=function(){return[]},d.fieldExtractor=function(e){return d.extractor({field:e},p,l,c)};var f="S"===u.qMode?function(e){return e.qElemNumber}:void 0,m="S"===u.qMode?function(e){return e.qNum}:void 0;(e=l.wrappedFields).push.apply(e,bl(zu("qDimensionInfo",u,o,"",kl({},d,{value:f,type:"dimension"})))),(t=l.wrappedFields).push.apply(t,bl(zu("qMeasureInfo",u,o,"",kl({},d,{value:m,type:"measure"})))),l.fields=l.wrappedFields.map((function(e){return e.instance}));var h=function e(t){t.forEach((function(t){l.allFields.push(t.instance),e(t.measures),e(t.attrDims),e(t.attrExps)}))};return h(l.wrappedFields),(s.virtualFields||[]).forEach((function(e){var t=p.field(e.from),n=_u(hl({meta:t.raw(),id:"".concat(o,"/").concat(e.key),sourceField:t,fieldExtractor:function(e){return d.extractor({field:e},p,l,c)},key:e.key,type:t.type(),localeInfo:d.localeInfo,value:t.value},e.override||{}));l.virtualFields.push(n)})),(n=l.allFields).push.apply(n,bl(l.virtualFields)),p}var Uu=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],Bu=/\/qDimensionInfo(?:\/(\d+))?/,Wu=/\/qMeasureInfo\/(\d+)/,$u=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,Yu=/\/qAttrExprInfo\/(\d+)/,Ku=/\/?qHyperCube/,Ju=/\/?qTreeData/,Gu=function(e){return"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14))},Zu=function(e){return"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13))};function Xu(e,t){var n=e,r=-1,o=-1,i="",a=function(e){return e};Ku.test(e)?(i="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=Gu):Ju.test(e)&&(i="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=Zu);var s=!0;if(Bu.test(e)&&(r=+Bu.exec(e)[1]),Wu.test(e)&&(o=+Wu.exec(e)[1]),$u.test(e)){o=-1,r=0;var l=+$u.exec(n)[2];isNaN(l)||(r=l,n=n.replace(/\/\d+$/,"")),s=!1}if(Yu.test(e)){var u=o;if(t){o=0;var c=$l(i,t);o+=(c.qMeasureInfo||[]).length,r>-1?(o=c.qDimensionInfo.slice(0,r).reduce((function(e,t){return e+t.qAttrExprInfo.length}),o),r=-1):(o=c.qDimensionInfo.reduce((function(e,t){return e+t.qAttrExprInfo.length}),o),o=c.qMeasureInfo.slice(0,u).reduce((function(e,t){return e+t.qAttrExprInfo.length}),o)),o+=+Yu.exec(n)[1]}else r>-1?(r=-1,o=+Yu.exec(n)[1]):o+=+Yu.exec(n)[1]+1}return Uu.forEach((function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(e,t)||xl(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.")}()}(e,2),r=t[0],o=t[1];n=n.replace(r,o)})),s&&(n=a(n)),n&&"/"!==n[0]&&(n="/".concat(n)),{measureIdx:o,dimensionIdx:r,path:n}}function Qu(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,o=n.byCells,i=n.primarySource,a=[],s={},l=e.isActive(),u=!1;return e.brushes().forEach((function(e){var t=Xu(e.id,r);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){var n=e.brush.ranges();n.length&&(u=!0,s.multiRangeSelectTreeDataValues||(s.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),n.forEach((function(e){return s.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){var l=e.brush.ranges();l.length&&(u=!0,s.rangeSelectHyperCubeValues||(s.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),l.forEach((function(e){return s.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})})))}if("range"===e.type&&t.dimensionIdx>-1){var c=e.brush.ranges();c.length&&(u=!0,s.selectHyperCubeContinuousRange||(s.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),c.forEach((function(e){return s.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(o)if(r&&r.qHyperCube&&("P"===r.qHyperCube.qMode||"T"===r.qHyperCube.qMode||"K"===r.qHyperCube.qMode)){var d=r.qHyperCube,p=d.qNoOfLeftDims,f=d.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(s.selectPivotCells||(s.selectPivotCells={path:t.path,cells:[]}),e.id===i||!i){var m=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)}));(0===p||f>=p)&&p>-1?m.forEach((function(e){s.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:f-p})})):m.forEach((function(e){s.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})})),u=!!s.selectPivotCells.cells.length}}else s.selectHyperCubeCells||(s.selectHyperCubeCells={path:t.path,cols:[]}),s.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==i&&(i||s.selectHyperCubeCells.values)||(s.selectHyperCubeCells.values=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)})),u=!!s.selectHyperCubeCells.values.length);else{var h=e.brush.values().map((function(e){return+e})).filter((function(e){return!isNaN(e)}));u=!!h.length,a.push({params:[t.path,t.dimensionIdx,h,!1],method:"selectHyperCubeValues"})}}})),!u&&l?[{method:"resetMadeSelections",params:[]}]:(s.rangeSelectHyperCubeValues&&a.push({method:"rangeSelectHyperCubeValues",params:[s.rangeSelectHyperCubeValues.path,s.rangeSelectHyperCubeValues.ranges,[],null===(t=n.orMode)||void 0===t||t]}),s.selectHyperCubeContinuousRange&&a.push({method:"selectHyperCubeContinuousRange",params:[s.selectHyperCubeContinuousRange.path,s.selectHyperCubeContinuousRange.ranges]}),s.selectHyperCubeCells&&a.push({method:"selectHyperCubeCells",params:[s.selectHyperCubeCells.path,s.selectHyperCubeCells.values,s.selectHyperCubeCells.cols]}),s.selectPivotCells&&a.push({method:"selectPivotCells",params:[s.selectPivotCells.path,s.selectPivotCells.cells]}),s.multiRangeSelectTreeDataValues&&a.push({method:"multiRangeSelectTreeDataValues",params:[s.multiRangeSelectTreeDataValues.path,s.multiRangeSelectTreeDataValues.ranges]}),a)}function ec(e){Vu.util=e.data("matrix").util,e.data("q",Vu),e.formatter("q-number",Iu),e.formatter("q-time",ju)}function tc(e){var t=ol(e.layout||{},e.path.split("/").join("."));if(!t)return!1;var n=t.qIsOneAndOnlyOne;return void 0!==n&&n}function nc(){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"===la(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 rc(e){var t=e.brush,n=e.colorField,r=e.legendAlias,o=e.useLegendCube,i=void 0!==o&&o;!n||/qAttrDimInfo/.test(n)?(t.removeKeyAlias("attrDim/qDimensionInfo/0"),r&&t.removeKeyAlias(r),t.addKeyAlias("attrDim/qDimensionInfo/0","qHyperCube/".concat(n))):i&&t.addKeyAlias(r,"qHyperCube/".concat(n))}ec.qBrushHelper=Qu,ec.selections=Qu;function oc(e){var t=e.brush,n=e.getConfig;return{interceptor:function(e){var r=t.brushes(),o=n(),i=o.allowSimultaneous,a=o.layout,s=void 0===a?{}:a;r.forEach((function(n){var r,o,a;("range"===n.type||null!==(r=e[0])&&void 0!==r&&r.key&&(null===(o=e[0])||void 0===o?void 0:o.key)!==n.id&&0!==i.indexOf(null===(a=e[0])||void 0===a?void 0:a.key))&&t.clear([])}));var l=e.filter((function(e){return-2!==e.value}));return l.length>1?function(e){var t=e.layout,n=void 0===t?{}:t,r=e.values,o=void 0===r?[]:r;if(null==o||!o.length)return[];var i=Array.from(new Set(o.map((function(e){return e.key})))),a=[];return i.forEach((function(e){var t=tc({layout:n,path:e}),r=o.filter((function(t){return t.key===e})),i=t?[r.pop()]:r;a.push.apply(a,ga(i))})),a.filter(Boolean)}({layout:s,values:l}):l},rangeInterceptor:function(e){var r=t.brushes(),o=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||o.includes(n.id)&&o.includes(e[0].key);"range"!==n.type||r||t.clear([])})),e)}}}var ic=function e(t,n){return n[t]?e(t+1,n):t},ac=function(e,t){var n=t.reduce((function(e,t){return e[t]=!0,e}),{});return e.reduce((function(e,t,r){var o=ic(r,n);return n[o]=!0,e[r]=o,e}),{})};function sc(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.layout,n=e.filtered,r=void 0===n?{}:n,o=(null==t?void 0:t.qHyperCube)||{},i=o.qDimensionInfo,a=void 0===i?[]:i,s=o.qMeasureInfo,l=void 0===s?[]:s;return{dimensions:ac(a,r.dimensions||[]),measures:ac(l,r.measures||[])}}function lc(e){var t=e.selection,n=e.fieldMap,r=t.method,o=t.params;if("selectHyperCubeValues"===r){var i=n.dimensions[o[1]];void 0!==i&&(o[1]=i)}return"rangeSelectHyperCubeValues"===r&&o[1].forEach((function(e){var t=n.measures[e.qMeasureIx];void 0!==t&&(e.qMeasureIx=t)})),"selectHyperCubeContinuousRange"===r&&o[1].forEach((function(e){var t=n.dimensions[e.qDimIx];void 0!==t&&(e.qDimIx=t)})),t}var uc=[],cc=0,dc=function(e){var t=uc.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()})))},pc=function(){document.addEventListener("keyup",dc)},fc=function(){document.removeEventListener("keyup",dc)},mc=function(e,t){Object.keys(t).forEach((function(n){e.on(n,t[n])}))},hc=function(e,t){Object.keys(t).forEach((function(n){e.removeListener(n,t[n])}))};function gc(e,t,n){if(t&&void 0!==n&&"selectHyperCubeContinuousRange"===e.method){var r=e.params;if(r&&r[1]&&r[1][0]){var o=r[1][0],i=o.qDimIx,a=o.qRange;"undefined"!==i&&a&&!1===a.qMaxInclEq&&a.qMax>=n&&(a.qMaxInclEq=!0)}}}function yc(e){var t=e.chart,n=e.document,r=e.selectionInfo,o=e.eventName,i=e.componentName,a=e.brushName,s=void 0===a?"selection":a,l=e.emit,u=void 0===l?"rangeClear":l,c=r.event===o,d=n.querySelector("[data-key='".concat(i,"-edge-0']"));if(c||!d)return!1;var p=t.component(i);return!!p&&(p.emit(u),"string"==typeof s&&t.brush(s).clear(),p)}function vc(e){var t=e.selectionInfo,n=e.chart,r=e.document,o=e.eventName,i=void 0===o?"discreteRange":o,a=e.componentName,s=void 0===a?"discrete-range-brush":a,l=e.cleared;return yc({selectionInfo:t,chart:n,document:r,eventName:void 0!==l&&l?void 0:i,componentName:s,emit:"areaClear",brushName:e.brushName})}function bc(e){var t=e.selectionInfo,n=e.chart,r=e.document,o=e.eventName,i=void 0===o?"continuousRange":o,a=e.componentName,s=void 0===a?"continuous-range-brush":a,l=e.cleared;return yc({selectionInfo:t,chart:n,document:r,eventName:void 0!==l&&l?void 0:i,componentName:s,brushName:e.brushName})}function xc(e){var t=e.selectionInfo,n=e.chart,r=e.document,o=e.componentName,i=void 0===o?"minor-range-brush":o,a=e.eventName,s=void 0===a?"minorRange":a,l=e.cleared,u=void 0!==l&&l,c=e.brushName,d=yc({selectionInfo:t,chart:n,document:r,eventName:u?void 0:s,componentName:i,brushName:void 0!==c&&c});if(d){var p=d.settings.settings,f=p.scale,m=p.brush,h=n.scale(f).data().fields.map((function(e){return e.id()})),g=n.brush(m),y=g.brushes().filter((function(e){return"range"===e.type&&h.some((function(t){return t===e.id}))}));g&&y.length&&y.forEach((function(e){g.removeRanges(e.brush.ranges().map((function(t){return{key:e.id,range:t}})))}))}}function qc(e){var t=e.selectionInfo,n=e.chart,r=e.document,o=e.selections,i=e.eventName,a=void 0===i?"xAxis":i,s=e.cleared;yc({selectionInfo:t,chart:n,document:r,eventName:void 0!==s&&s?void 0:a,componentName:"".concat(a,"-range-brush"),emit:"areaClear",brushName:!1})&&o.clear()}function Dc(e){var t=e.chart,n=e.selectionInfo,r=e.selections,o=e.events,i=void 0===o?["tap"]:o,a=e.brushNames,s=void 0===a?[]:a;if(n&&i.includes(n.event)){var l=n.currentComponent;n.previousComponent!==l&&(r.clear(),s.forEach((function(e){return t.brush(e).end()})))}}function Cc(e){var t=e.selectionInfo,n=e.chart,r=e.document,o=e.selections,i=e.eventName,a=void 0===i?"legendRange":i,s=e.componentName,l=void 0===s?"legend-range-brush":s,u=e.cleared,c=void 0!==u&&u,d=e.brushName;yc({selectionInfo:t,chart:n,document:r,eventName:c?void 0:a,componentName:l,brushName:void 0!==d&&d})&&o.clear()}var wc=function(e){e.chart,e.document,e.selections,e.selectionInfo;var t=ma(e,["chart","document","selections","selectionInfo"]);t.clearDiscrete(),t.clearContinuous(),t.clearMinor(),t.clearRange(),t.clearTap(),t.clearLegend()};function Sc(e){var t,n=e.lasso;null!=n&&null!==(t=n.active)&&void 0!==t&&t.call(n)&&(null==n||n.action(!1))}function Mc(e){var t,n=e.chart,r=e.selectionInfo,o=e.selectionActions,i=e.actions,a=void 0===i?{}:i,s=e.selections,l=e.selectionEvents;if(!1===o||!1===l)return function(){};var u=(a||{}).lasso,c=void 0!==u&&u,d=o.reset,p=void 0===d?Sc:d,f=o.clear,m=!1!==f&&function(e){var t=e.clear,n=void 0===t?wc:t,r=e.selections,o=e.selectionInfo,i=e.chart;return function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).cleared,t={selections:r,selectionInfo:o,chart:i,document:document,cleared:e};return n(fa({clearDiscrete:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return vc(fa(fa({},t),e))},clearContinuous:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return bc(fa(fa({},t),e))},clearMinor:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return xc(fa(fa({},t),e))},clearRange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return qc(fa(fa({},t),e))},clearTap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Dc(fa(fa({},t),e))},clearLegend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Cc(fa(fa({},t),e))}},t))}}({clear:f,selections:s,selectionInfo:r,chart:n}),h=function(e){var t=e.chart,n=e.lasso,r=e.reset,o=e.clear,i=!1,a={deactivated:function(e){r({e:e,lasso:n})},canceled:function(e){r({e:e,lasso:n}),o({e:e,chart:t,document:document})},cleared:function(e){i||(i=!0,o({e:e,chart:t,document:document,cleared:!0}),i=!1)}};return!1===r&&delete a.deactivated,!1===o&&delete a.cleared,!1===r&&!1===o&&delete a.canceled,a}({chart:n,clear:m,reset:p,lasso:c}),g={};Object.entries(h).forEach((function(e){var t=ha(e,2),n=t[0],r=t[1];g[n]=function(e,t){return t?function(n){return t({event:n,defaultFunc:e})}:e}(r,l[n])}));var y=function(e){var t=e.selectionEvents,n=e.selections,r=e.selectionInfo,o=e.clear,i=e.chart,a=e.document,s=t.start,l={selections:n,selectionInfo:r,chart:i,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,o=e.components,i=void 0===o?[]:o;(0,e.setSelectionInfo)(fa(fa({},void 0===t?{}:t),{},{event:r,components:i.map((function(e){return e.key})).filter(Boolean)})),n()}({event:t,components:n,clear:o,chart:i,selectionInfo:r,setSelectionInfo:u})}};return"function"==typeof s?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];s(fa(fa({defaultFunc:c({event:e,components:t}),setSelectionInfo:u,clear:o},l),{},{event:e,components:t}))}:function(e){c({event:e,components:arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]})()}}({selectionEvents:l,selections:s,selectionInfo:r,clear:m,chart:n,document:document});return null==a||null===(t=a.select)||void 0===t||t.on("start",y),Object.entries(g).forEach((function(e){var t=ha(e,2),n=t[0],r=t[1];null==s||s.on(n,r)})),function(){var e;null==a||null===(e=a.select)||void 0===e||e.removeListener("start",y),Object.entries(g).forEach((function(e){var t=ha(e,2),n=t[0],r=t[1];null==s||s.removeListener(n,r)}))}}var Ec=[{key:"qHyperCube/qDimensionInfo/0:numeric",includeMax:!1}];function Ic(e){var t=e.chart,n=e.actions,r=e.selections,o=e.picassoQ,i=e.config,a=i.allowSimultaneous,s=void 0!==a&&a,l=i.majorScale,u=void 0===l?void 0:l,c=i.selectionActions,d=(c=void 0===c?{}:c).clear,p=c.reset,f=i.selectionEvents,m=void 0===f?{deactivated:void 0,canceled:void 0,cleared:void 0,start:void 0}:f,h=i.brushEvents,g=void 0===h?{}:h,y=i.brushName,v=void 0===y?"selection":y,b=i.brushMaxListeners,x=void 0===b?20:b,q=i.brushRanges,D=void 0!==q&&q,C=i.interceptors,w=void 0===C?{}:C,S=i.selectionsFn,M=void 0===S?o.selections:S,E=t.brush(v);if("number"==typeof x&&E.setMaxListeners(x),D){var I=!0===D?Ec:D;E.configure({ranges:I})}var A={canSelect:!0,getIsSelectionLocked:!1,isInnerDimensionLocked:!1,lockedDimensions:[],singleSelectIndex:0,selectionInfo:{colorField:void 0,components:[],event:void 0,currentComponent:void 0,previousComponent:void 0}},k=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.selections,r=t.brush,o=t.majorScale,i=t.actions,a=t.selectionsFn,s=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).path,l=void 0===s?"/qHyperCubeDef":s;if(!n)return{layout:function(){},allowSimultaneous:function(){},release:function(){}};var u=++cc,c=null,d={dimensions:[],measures:[]},p=[],f={};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 m=oc({brush:r,getConfig:function(){return{layout:c,allowSimultaneous:p}}}),h=m.rangeInterceptor,g=m.interceptor;r.intercept("set-ranges",h),r.intercept("toggle-ranges",h),r.intercept("toggle-values",g),r.intercept("set-values",g),r.intercept("add-values",g),r.on("start",(function(){return n.begin(l)}));var y={activate:function(){},deactivated:function(){return r.end()},cleared:function(){return r.clear()},canceled:function(){return r.end()}};mc(n,y);var v=null==o||null===(e=o.max)||void 0===e?void 0:e.call(o);return null!=i&&i.select?(i.select.on("start",(function(){var e;r.start(),"function"==typeof i.select.getBrushOptions&&(f=(e=i.select).getBrushOptions.apply(e,arguments))})),i.select.on("end",(function(){var e=a(r,f,c),t=sc({layout:c,filtered:d});e.forEach((function(e){var r=lc({selection:e,fieldMap:t});gc(r,i.select.brushSelectionIncludeMax,v),n.select(r)}))}))):r.on("update",(function(){var e=a(r,f,c),t=sc({layout:c,filtered:d});e.forEach((function(e){n.select(lc({selection:e,fieldMap:t}))}))})),0===uc.length&&pc(),uc.push({key:u,selections:n}),{layout:function(e){c=e},filteredFields:function(e){d=e},allowSimultaneous:function(e){p=e},release:function(){c=null;var e=uc.indexOf(uc.filter((function(e){return e.key===u}))[0]);-1!==e&&uc.splice(e,1),uc.length||fc(),hc(n,y)}}}({brush:E,majorScale:u,actions:n,selections:r,picassoQ:o,selectionsFn:M});!function(e){var t=e.brush,n=e.interceptors,r=void 0===n?{}:n;Object.entries(r).forEach((function(e){var n=ha(e,2),r=n[0],o=n[1];(Array.isArray(o)?o:[o]).forEach((function(e){t.intercept(r,e)}))}))}({brush:E,interceptors:w});var T=function(e){var t=e.chart,n=e.selectionActions,r=e.brush,o=e.actions,i=e.selectionInfo,a=e.selections,s=e.selectionEvents,l=function(e){var t=e.brush,n=e.chart,r=e.selectionInfo,o=e.brushEvents,i=void 0===o?{}:o,a=Object.entries(i).map((function(e){var o=ha(e,2),i=o[0],a=o[1],s=function(){return a({chart:n,selectionInfo:r})};return t.on(i,s),[i,s]}));return function(){a.forEach((function(e){var n=ha(e,2),r=n[0],o=n[1];t.removeListener(r,o)}))}}({brush:r,chart:t,selectionInfo:i,brushEvents:e.brushEvents}),u=Mc({chart:t,selectionInfo:i,selectionActions:n,actions:o,selections:a,selectionEvents:s}),c=function(e){var t=e.actions;if(null==t||!t.lasso)return function(){};var n=!1,r=function(e){n||"Shift"!==e.key||(t.lasso.action(!0),n=!0)},o=function(e){"Shift"===e.key&&(t.lasso.action(!1),n=!1)};return document.addEventListener("keydown",r),document.addEventListener("keyup",o),function(){document.removeEventListener("keydown",r),document.removeEventListener("keyup",o)}}({actions:o});return function(){l(),u(),c()}}({chart:t,brush:E,actions:n,selections:r,selectionInfo:A.selectionInfo,selectionActions:{clear:d,reset:p},selectionEvents:m,brushEvents:g});if(s){var L=!0===s?ga(Array(15)).map((function(e,t){return"qHyperCube/qMeasureInfo/".concat(t)})):s;k.allowSimultaneous(L)}return{unbindEvents:T,state:A,picassoSelections:k,brush:E}}function Ac(e){var t=e.chart,n=e.selections,r=e.actions,o=void 0!==r&&r,i=e.config,a=void 0===i?{}:i,s=Ic({chart:t,actions:o,selections:n,picassoQ:ec,config:a}),l=s.unbindEvents,u=s.state,c=s.picassoSelections,d=s.brush,p=a.custom,f=void 0===p?{}:p,m=a.legendAlias,h=void 0===m?void 0:m,g=a.setBrushAliases,y=void 0===g?rc: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:nc(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},getSelectionInfo:function(){return u.selectionInfo},setLayout:function(e){var t=function(e){var t,n,r,o=e.selections,i=e.picassoSelections,a=e.layout,s={lockedDimensions:[],singleSelectDimensions:[]};null!=o&&null!==(t=o.isModal)&&void 0!==t&&t.call(o)&&o.confirm(),i.layout(a);var l=(null!==(n=null==a?void 0:a.qHyperCube)&&void 0!==n?n:{}).qDimensionInfo,u=void 0===l?[]:l;return s.lockedDimensions=u.map((function(e){return!!e.qLocked})),s.singleSelectDimensions=u.map((function(e,t){return tc({layout:a,path:"qHyperCube/qDimensionInfo/".concat(t)})})),s.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),s.canSelect=0===u.length||u.some((function(e){return!e.qLocked})),s.dimensionLocked=!(null===(r=u[0])||void 0===r||!r.qLocked),s}({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,o=ma(e,["colorField","useLegendCube"]),i=fa({useLegendCube:r,colorField:t,brush:d,legendAlias:h},o);y(fa(fa({},i),{},{defaultFunc:function(){return rc(i)}}))},destroy:function(){l(),c.release()},custom:fa({},f)}}var kc="'Source Sans Pro', 'Arial', 'sans-serif'",Tc="#595959",Lc="#737373",Oc="#cccccc",Pc="#e6e6e6";function Nc(e){var t={};return[].concat(ga(e),ga([["","","color"],["object","","fontFamily"],["object","axis.label.name","color",Tc],["object","axis.label.name","fontFamily",kc],["object","axis.label.name","fontSize","12px"],["object","axis.line.major","color",Oc],["object","axis.line.minor","color",Pc],["object","axis.title","color"],["object","axis.title","fontFamily",kc],["object","axis.title","fontSize","13px"],["object","grid.line.highContrast","color",Pc],["object","grid.line.major","color",Oc],["object","grid.line.minor","color",Pc],["object","label.value","color",Tc],["object","label.value","fontFamily",kc],["object","label.value","fontSize","12px"],[!1,"label.value","darkColor",Tc],[!1,"label.value","lightColor",Pc],["object","outOfRange","color","#999"],["object","referenceLine.label.name","color","#333333"],["object","referenceLine.label.name","fontFamily",kc],["object","referenceLine.label.name","fontSize","12px"],["object","referenceLine.outOfBounds","color",Pc],["object","referenceLine.outOfBounds","fontFamily",kc],["object","referenceLine.outOfBounds","fontSize","12px"],["object","referenceLine.outOfBounds","backgroundColor",Lc,function(e){return"transparent"===e?Lc: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 Rc=function(e){return e};function Fc(e){var t=e.theme,n=e.id,r=e.transform,o=e.extend,i=e.matrix,a={},s=r.reduce((function(e,t){var n=ha(t,2),r=n[0],o=n[1];return e[r]=o,e}),{});return i.forEach((function(e){var r=ha(e,5),o=r[0],i=r[1],l=r[2],u=r[3],c=r[4],d=void 0===c?function(e){return e}:c,p=function(e){var t=e.theme,n=e.base,r=e.path,o=e.attribute,i=e.defaultValue,a=void 0===i?void 0:i;if(!t||!1===n)return a;var s=t.getStyle(n,r,o);return void 0===s?a:s}({theme:t,base:"object"===o&&n?"".concat("object",".").concat(n):o,path:i,attribute:l,defaultValue:u}),f=(s["".concat(i,".").concat(l)]||Rc)(d(p));il(a,[i,l].filter(Boolean).join("."),f)})),o.forEach((function(e){var t=ha(e,2),n=t[0],r=t[1];il(a,n,r)})),a}var jc={NOOP:function(){},FALSE:function(){return!1},ARRAY:function(){return[]},OBJECT:function(){return{}}},Hc="chart-modules-tooltip",_c="#".concat(Hc);function zc(){if(!document.querySelector(_c)){var e=document.createElement("div");e.id=Hc,e.style.overflow="hidden",e.style.position="fixed",e.style.pointerEvents="none",e.style.left="0px",e.style.top="0px",e.style.width="100%",e.style.height="100%",e.style.zIndex=1020,document.body.appendChild(e)}}function Vc(e){return{show:!0,key:e.key,type:"tooltip",layout:{displayOrder:3},beforeMount:function(){zc()},beforeUpdate:function(){zc()},destroyed:function(){var e;null!=(e=document.querySelector(_c))&&e.parentElement&&e.childElementCount<1&&e.parentElement.removeChild(e)},settings:{appendTo:function(){return document.querySelector(_c)},direction:e.rtl?"rtl":"ltr",duration:e.duration},style:{arrow:{color:"#404040"},content:{display:"table","border-spacing":"4px",background:"rgba(64, 64, 64, 0.9)",opacity:"1",fontSize:"13px",fontFamily:"'Source Sans Pro', 'Arial', 'sans-serif'","empty-cells":"show"},cell:{"max-width":"180px","word-break":"break-word","word-wrap":"break-word","overflow-wrap":"break-word",hyphens:"auto"}}}}var Uc="position",Bc={bar:"rect",diamond:"path",point:"circle",square:"rect",triangle:"path","n-polygon":"path",slice:"path"},Wc=function(e){return e.data.value},$c=function(e){var t,n=e.data;return null==n||null===(t=n.major)||void 0===t?void 0:t.value};function Yc(e){var t=e.chart,n=e.expando,r=e.nodes,o=e.collectConfig,i=e.collectibles,a=e.meta,s=o.from,l={chart:t,expando:n,nodes:r,collectConfig:o,collectibles:i,meta:a};switch("function"==typeof s?"custom":s){case"single":return function(e){var t=ha(e.nodes,1)[0];return["container"===t.type&&t.children[0]||t]}(l);case"position":return function(e){return e.nodes}(l);case"dimension":return function(e){var t=e.chart,n=e.collectConfig,r=e.collectibles,o=ha(e.nodes,1)[0],i=n.filter,a="function"==typeof i?i:function(){return!0},s=n.by,l=void 0===s?Wc:s;return r.reduce((function(e,n){var r=n.major,i=void 0===r?$c:r,a=Bc[n.type]||n.type;return e.push.apply(e,ga(t.findShapes(a).filter((function(e){return e.key===n.key&&e.data&&i({data:e.data})===l({data:o.data})})))),e}),[]).filter(a)}(l);case"radius":return function(e){var t=e.chart,n=e.collectConfig,r=e.collectibles,o=ha(e.nodes,1)[0].localBounds,i=n.distance,a=n.filter,s="function"==typeof a?a:function(){return!0},l=r.map((function(e){return e.key})),u=ha(l,1)[0],c=t.component(u).rect,d=c.scaleRatio,p=c.computedInner,f=o.width*d.x,m=o.height*d.y,h=o.x*d.x+f/2+p.x,g=o.y*d.y+m/2+p.y,y=i||Math.max(f,m);return t.shapesAt({cx:h,cy:g,r:y},{components:l.map((function(e){return{key:e}}))}).filter(s)}(l);case"custom":return function(e){var t=e.chart,n=e.expando,r=e.nodes,o=e.meta;return e.collectConfig.from({chart:t,expando:n,nodes:r,meta:o})}(l);default:return[]}}var Kc=Number.MAX_VALUE;function Jc(e){var t=e.nodes.reduce((function(e,t){var n=t.bounds;return e.xMin=Math.min(e.xMin,n.x,n.x+n.width),e.yMin=Math.min(e.yMin,n.y,n.y+n.height),e.xMax=Math.max(e.xMax,n.x,n.x+n.width),e.yMax=Math.max(e.yMax,n.y,n.y+n.height),e}),{xMin:Kc,xMax:-Kc,yMin:Kc,yMax:-Kc}),n=t.xMin,r=t.xMax,o=t.yMin;return{x:n,y:o,width:r-n,height:t.yMax-o}}function Gc(e){var t=e.chart,n=e.config,r=e.expando,o=e.internal,i=e.nodes;if(!i.length)return[];var a=ha(i,1)[0].key,s=n.main.collectibles;if(!s.length)return[];var l=n.main.triggers.find((function(e){return-1!==e.keys.indexOf(a)}))||{},u=l.collect,c=l.placement;if(!u||!u.from||!c)return[];var d={triggerer:a,position:o.get(Uc)},p=(Yc({chart:t,expando:r,nodes:i,collectConfig:u,collectibles:s,meta:d})||[]).map((function(e){return e.children.length?e.children[0]:e}));return p.length?function(e){var t=e.chart,n=e.config,r=e.expando,o=e.placementConfig,i=e.hovered,a=e.collected,s=e.meta,l=function(e){for(var t=e.chart,n=e.config,r=e.expando,o=e.placementConfig,i=e.hovered,a=e.collected,s=e.meta,l=ha(i,1)[0],u=Array.isArray(o)?o:[o],c={bounds:l.bounds,key:l.key},d=Jc({nodes:a}),p=0;p<u.length;p++){var f=u[p];if("function"==typeof f){var m=f({chart:t,expando:r,hovered:i,collected:a,meta:s,collectedBounds:d,combineBounds:Jc});if(m)return m}if("trigger"===f)return c;if("collectible"===f){var h=n.main.placements.collectible;return{bounds:"function"==typeof h?h({collected:a}):d,key:a[0].key}}}return c}({chart:t,config:n,expando:r,placementConfig:o,hovered:i,collected:a,meta:s}),u=l.bounds,c=l.key,d=ha(a,1)[0].desc;return[{bounds:u,nodes:a,data:a.map((function(e){return e.data})),key:c,meta:s,desc:d}]}({chart:t,config:n,expando:r,placementConfig:c,hovered:i,collected:p,meta:d}):[]}var Zc=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),Xc=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),Qc=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),ed=function(e){return Zc.test(e)},td=function(e){return Xc.test(e)||Qc.test(e)};function nd(e){for(var t=e?e.length:0,n=0;n<t;n++){var r=e[n];if(ed(r))return"ltr";if(td(r))return"rtl"}return"ltr"}function rd(e){var t=e.visibility;return{type:"divider",content:[{content:"",style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:2}],visibility:fa(fa({},{count:!1}),t)}}function od(e){var t=e.config,n=e.h,r=e.context,o=e.nodes,i=e.property,a=e.filter,s=e.visibility,l=t.rtl,u={type:"color",label:void 0,value:void 0,content:[],filter:a,visibility:fa(fa({},{count:!0}),s)},c=t.getColorSettings();if("color"===c.type||!c.fieldType)return u;var d=ha(o,1)[0];if(u.value=function(e){var t=e.config,n=e.context,r=e.property,o=e.node,i=o.data[r];if(i){if(-3===o.data.value)return o.data.label;var a=n.resources.dataset(i.source.key).field(i.source.field).formatter(),s=i.value,l=i.label,u=t.getColorSettings();if(a&&"measure"===u.fieldType)return Number.isNaN(+s)?"-":a(i.value);var c=l||s;return void 0===c||Number.isNaN(c)||"NaN"===c?"-":c}}({config:t,context:r,property:i,node:d}),void 0===u.value)return u;u.label=function(e){var t=e.context,n=e.property,r=e.node,o=e.config.getColorSettings();if(o.label)return o.label;var i=r.data[n];if(i&&"color"!==o.type){var a=t.resources.dataset,s=i.source,l=s.key,u=s.field;return a(l).field(u).title()}}({config:t,context:r,property:i,node:d});var p=n("div",{style:{display:"inline-block",width:10,height:10,"background-color":function(e){var t=e.node.attrs;return(null==t?void 0:t.fill)||"#ddd"}({node:d}),margin:"0 8px"}});return u.content.push({content:l?[":",u.label]:[u.label,":"],style:{"text-align":l?"right":"left",direction:nd(u.label)}},{content:l?[u.value,p]:[p,u.value],style:{"text-align":l?"left":"right","vertical-align":"middle",direction:nd(u.value)}}),u}function id(e){var t=e.config,n=e.h,r=e.context;return{section:function(e){return function(e){return{type:"section",content:e.content}}({content:e.content})},text:function(e){var n=e.value,r=e.style,o=e.visibility;return function(e){var t=e.config,n=e.value,r=e.style,o=(r=void 0===r?{}:r).bold,i=void 0!==o&&o,a=r.italic,s=e.visibility;return{type:"text",content:[{content:n,style:{"font-weight":i?"bold":"normal","font-style":void 0!==a&&a?"italic":"normal","text-align":t.rtl?"right":"left",direction:nd(n)},colspan:2}],visibility:fa(fa({},{count:!0}),s)}}({config:t,value:n,style:r,visibility:o})},measure:function(e){var r=e.label,o=e.value,i=e.color,a=e.style,s=e.survive,l=e.visibility;return function(e){var t,n,r,o,i=e.h,a=e.label,s=e.value,l=e.color,u=e.style,c=e.survive,d=e.visibility,p=e.config.rtl,f=i("div",{style:{display:"inline-block",width:10,height:10,"background-color":l,margin:"0 8px"}});return{type:"measure",label:a,value:s,content:[{content:p?[":",a]:[a,":"],style:{"text-align":p?"right":"left","font-weight":null!=u&&null!==(t=u.label)&&void 0!==t&&t.bold?"bold":"normal","font-style":null!=u&&null!==(n=u.label)&&void 0!==n&&n.italic?"italic":"normal",direction:nd(a)}},{content:l?p?[s,f]:[f,s]:s,style:{"text-align":p?"left":"right","vertical-align":"middle","font-weight":null!=u&&null!==(r=u.value)&&void 0!==r&&r.bold?"bold":"normal","font-style":null!=u&&null!==(o=u.value)&&void 0!==o&&o.italic?"italic":"normal",direction:nd(s)}}],survive:fa(fa({},{color:!1,duplicate:!1}),c),visibility:fa(fa({},{count:!0}),d)}}({config:t,h:n,label:r,value:o,color:i,style:a,survive:s,visibility:l})},divider:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.visibility;return rd({visibility:t})},row:function(e){return function(e){var t=e.visibility;return{type:"row",content:[{content:e.content,style:e.style,colspan:e.colspan}],visibility:fa(fa({},{count:!0}),t)}}({content:e.content,style:e.style,colspan:e.colspan,visibility:e.visibility})},raw:function(e){return function(e){var t=e.visibility;return{type:"raw",content:e.value,visibility:fa(fa({},{count:!0}),t)}}({value:e.value,visibility:e.visibility})},color:function(e){var o=e.nodes,i=e.property,a=e.filter,s=void 0===a||a,l=e.visibility;return od({config:t,h:n,context:r,nodes:o,property:i,filter:s,visibility:l})}}}function ad(e){var t=e.chart,n=e.translator,r=e.config,o=e.expando,i=e.h,a=e.data,s=e.style,l=ha(a,1)[0],u=function(e){var t=e.config,n=e.nodes.reduce((function(e,n){var r=t.main.getGroupByValue({data:n.data});return e[r]||(e[r]=[]),e[r].push(n),e}),{});return Object.keys(n).map((function(e){return n[e]}))}({config:r,nodes:l.node.nodes}),c=function(e){var t=e.chart,n=e.config,r=e.expando,o=e.h,i=e.context,a=e.groups,s=i.node.meta,l=i.resources,u=l.dataset,c=l.formatter,d=id({config:n,h:o,context:i}),p=function(e){var t=e.dataset;return{dataset:{title:function(e,n){return t(e).field(n).title()}}}}({dataset:u}),f=a.map((function(e){var t=d.section({content:ga((n.main.section({expando:r,h:o,nodes:e,dataset:u,formatter:c,meta:s,create:d,util:p})||[]).filter((function(e){var t;return null===(t=e.content)||void 0===t?void 0:t.length}))).filter(Boolean)});return t.content=function(e){var t=e.config,n=e.content,r=n.find((function(e){return"color"===e.type&&e.filter})),o=r?n.filter((function(e){return"measure"!==e.type||e.survive.color||e.label!==r.label||e.value!==r.value})):n;return t.main.showDuplicateMeasures?o:o.reduce((function(e,t){var n=t.type,r=t.survive;if("measure"!==n||r.duplicate)return e.filtered.push(t),e;var o="".concat(t.label,"-").concat(t.value);return e.memory[o]||(e.memory[o]=!0,e.filtered.push(t)),e}),{memory:{},filtered:[]}).filtered}({config:n,content:t.content}),t}));return n.main.sections({chart:t,expando:r,h:o,nodes:i.node.nodes,dataset:u,formatter:c,meta:s,create:d,util:p,sections:f}),f.filter(Boolean)}({chart:t,config:r,expando:o,h:i,context:l,groups:u}),d=function(e){var t=e.translator,n=e.config,r=e.context,o=e.templates,i=n.main.layout,a=i.rows,s=i.grouping,l=i.single,u=function(e){var t=e.limit,n=e.grouping,r=e.single,o={count:0,overflow:0,index:{started:void 0,group:void 0}};return{process:function(e){var i=e.visibility,a=e.index;if(r&&0!==a)return n?(o.index.started!==a&&o.index.group!==a&&(o.overflow++,o.index.group=a),!1):(o.overflow++,!1);if(o.count>=t){if(!n)return o.overflow++,!1;if(o.index.started!==a)return o.index.group!==a&&(o.overflow++,o.index.group=a),!1}return i.count&&o.count++,n&&(o.index.started=a),!0},overflow:function(){return o.overflow}}}({limit:a,grouping:s,single:"function"==typeof l?l({meta:r.node.meta,sections:o}):l}),c=o.reduce((function(e,t,n){var r=t.type,i=t.content;"section"===r&&(void 0===i?[]:i).forEach((function(t){u.process({visibility:t.visibility,index:n})&&e.push(t.content)}));var a=n===o.length-1;return"divider"!==r||a||u.process({visibility:t.visibility,index:n})&&e.push(t.content),e}),[]).filter((function(e){return e.length})),d=u.overflow();return d&&c.push(function(e){var t=e.translator,n=e.config,r=e.count,o=t?t.get("Object.ChartTooltip.NMore",r):"+".concat(r," more"),i=nd(o);return[{content:o,style:{"font-weight":"bold","text-align":n.rtl?"right":"left",direction:i},colspan:2}]}({translator:t,config:n,count:d})),c}({translator:n,config:r,h:i,context:l,templates:c});return d.length?function(e){var t=e.h,n=e.style;return e.rows.map((function(e){return t("tr",{},e.map((function(e){var r={style:fa(fa({},n.cell||{}),e.style||{}),class:e.class};return e.colspan&&(r.colspan=e.colspan),t("td",r,e.content)})))}))}({h:i,style:s,rows:d}):function(e){var t=e.h;return t("tr",{},t("td",{style:{fontStyle:"italic",opacity:.75}},"Empty"))}({h:i})}function sd(e){var t=e.chart,n=e.translator,r=e.config,o=e.expando,i=e.internal;if(!r.main.key)return!1;var a=al(),s=Vc({key:r.main.key,rtl:r.rtl,duration:r.duration}),l=r.main.events.tooltip,u=l.afterShow,c=l.afterHide,d=function(){var e=a.get("collected");return{expando:o,nodes:e.nodes,meta:e.meta}};return Ea(!0,s,{settings:{filter:function(e){return Gc({chart:t,config:r,expando:o,internal:i,nodes:e})},extract:function(e){return a.set("collected",e.node),e},content:function(e){var i=e.h,a=e.data,s=e.style;return ad({chart:t,translator:n,config:r,expando:o,h:i,data:a,style:s})},placement:function(e){var t=e.nodes;return r.main.placement({meta:t[0].meta})},afterShow:function(){return u(d())},afterHide:function(){return c(d())}},style:{arrow:{color:r.style.background},content:r.style}})}function ld(e){var t=e.config,n=t.legend.keys;if(!n.tooltip||!n.component)return!1;if("categorical"!==t.getColorSettings().type)return!1;var r=Vc({key:n.tooltip,rtl:t.rtl,duration:t.duration});return Ea(!0,r,{settings:{filter:function(e){return e.filter((function(e){return e.data&&e.key===n.component}))},extract:function(e){return e},content:function(e){var t=e.h,n=e.data;return[t("tr",{},[t("td",{style:fa(fa({},e.style.cell||{}),{"font-weight":"bold","text-align":"left"}),colspan:2},n[0].node.data.label)])]},placement:"pointer"},style:{arrow:{color:t.style.background},content:t.style}})}function ud(e){var t=e.config.main.triggers.reduce((function(e,t){return t.keys.forEach((function(n){var r=t.distance||0;e.distance[n]=r,e.distances.includes(r)||e.distances.push(r),e.key[n]=!0,e.keys[r]||(e.keys[r]=[]),e.keys[r].push(n)})),e}),{distance:{},distances:[],key:{},keys:{}});return function(e){return e.components.filter((function(e){return t.key[e.key]})).reduce((function(e,n){e.any=!0,e.components.push(n.key);var r=t.distance[n.key];return 0===r?e.position.push(n.key):(e.distances.includes(r)||(e.distances.push(r),e.distanceKeys[r]=[]),e.distanceKeys[r].push(n.key)),e}),{any:!1,components:[],position:[],distances:[],distanceKeys:{}})}}function cd(e){var t=e.chart,n=e.event,r=e.component,o={absolute:{x:0,y:0},relative:{x:0,y:0}},i=t.element.getBoundingClientRect(),a=i.left,s=i.top;o.absolute.x=(n.center?n.center.x:n.clientX)-a,o.absolute.y=(n.center?n.center.y:n.clientY)-s;var l=t.component(r);if(l){var u=l.rect.computedInner;o.relative.x=o.absolute.x-u.x,o.relative.y=o.absolute.y-u.y}return o}function dd(e){var t=e.chart,n=e.hits,r=e.position,o=[];if(n.position.length&&o.push.apply(o,ga(t.shapesAt(r.absolute,{components:n.position.map((function(e){return{key:e}}))}))),!o.length&&n.distances.length){var i=[];n.distances.forEach((function(e){i.push.apply(i,ga(t.shapesAt({cx:r.absolute.x,cy:r.absolute.y,r:e},{components:n.distanceKeys[e].map((function(e){return{key:e}}))})))})),i.length&&o.push(function(e){var t=e.nodes,n=e.origin,r=t.find((function(e){return"path"===e.type}));if(r)return r;var o=function(e){var t=Math.abs(n.x-(e.localBounds.x+e.localBounds.width/2)),r=Math.abs(n.y-(e.localBounds.y+e.localBounds.height/2));return Math.sqrt(t*t+r*r)};return t.slice(1).reduce((function(e,t){var n=o(t);return n<e.distance&&(e.distance=n,e.node=t),e}),{node:t[0],distance:o(t[0])}).node}({nodes:i,origin:r.relative}))}return o}function pd(e){var t=e.chart,n=e.config,r=e.expando,o=e.internal,i=e.facade,a=n.delay.tap,s=ud({config:n}),l=n.main.triggers.reduce((function(e,t){return e.push.apply(e,ga(t.keys)),e}),[]);return{key:"event:".concat("tooltipTap"),type:"Tap",options:{event:"tooltipTap",enable:function(e,r){return!r||!!n.enable({event:r})&&t.componentsFromPoint({x:r.center.x,y:r.center.y}).filter((function(e){return-1!==l.indexOf(e.key)})).length>0}},recognizeWith:"tap",events:da({},"tooltipTap",(function(e){if(e.preventDefault(),"mouse"!==e.pointerType&&!n.main.suppress({event:e})){var l=t.component(n.main.key);if(l&&l.show){var u=t.componentsFromPoint({x:e.center.x,y:e.center.y}),c=s({components:u});if(c.any){var d=ha(c.components,1)[0],p=cd({chart:t,event:e,component:d});o.set(Uc,p);var f=dd({chart:t,hits:c,position:p});if(f.length){var m=f[0].key;n.main.events.tooltip.beforeShow({expando:r,event:e,collectNodes:function(){return i.collectNodes({nodes:f})},meta:{triggerer:m,position:p}}).then((function(){l.emit("show",e,{nodes:f,delay:a})}))}else l.emit("hide")}else l.emit("hide")}}}))}}function fd(e){var t=e.chart,n=e.config,r=e.expando,o=e.internal,i=e.facade,a=ud({config:n}),s=function(e){var t=e.config,n=e.expando,r=e.internal,o=e.facade,i=t.main.events.tooltip.beforeShow,a=t.delay.hover,s={ongoing:{},latest:void 0};return function(e){var t=e.event,l=e.tooltip,u=e.nodes,c=function(e){var t=e.nodes;return JSON.stringify(t.map((function(e){return{key:e.key,bounds:e.bounds,value:e.data.value}})))}({nodes:u});if(!s.ongoing[c]){s.ongoing[c]=!0,s.latest=c;var d=u[0].key;i({expando:n,event:t,collectNodes:function(){return o.collectNodes({nodes:u})},meta:{triggerer:d,position:r.get(Uc)}}).then((function(){c===s.latest&&l.emit("show",t,{nodes:u,delay:a})})).finally((function(){delete s.ongoing[c],c===s.latest&&(s.latest=void 0)}))}}}({config:n,expando:r,internal:o,facade:i}),l=[n.main.key,n.legend.keys.tooltip].filter(Boolean),u=function(){l.forEach((function(e){var n=t.component(e);null!=n&&n.show&&n.emit("hide")}))};return{type:"native",events:{mousemove:function(e){if(n.enable({event:e})&&!n.main.suppress({event:e})){var r=t.componentsFromPoint({x:e.clientX,y:e.clientY}),i=t.component(n.main.key);if(i&&i.show){var l=a({components:r});if(l.any){var u=ha(l.components,1)[0],c=cd({chart:t,event:e,component:u});o.set(Uc,c);var d=dd({chart:t,hits:l,position:c});if(!d.length)return void i.emit("hide");s({event:e,tooltip:i,nodes:d})}else i.emit("hide")}var p=n.legend;if(p.keys.tooltip&&p.keys.component){var f=t.component(p.keys.tooltip);f&&f.show&&(r.some((function(e){return e.key===p.keys.component}))?f.emit("show",e):f.emit("hide"))}}},mouseup:function(e){2===e.button&&u()},mouseleave:function(){n.main.events.interaction.mouseleave({expando:r}),u()},wheel:function(){u()}}}}function md(e){var t=e.chart,n=e.translator,r=function(e){var t=e.config;return Ea(!0,{},{rtl:!1,enable:jc.FALSE,getColorSettings:jc.OBJECT,style:{fontSize:void 0,fontFamily:void 0,color:void 0,background:void 0},delay:{hover:500,tap:0},duration:8e3,main:{key:void 0,suppress:jc.FALSE,getGroupByValue:jc.NOOP,collectibles:[],triggers:[],placement:function(){return{type:"bounds"}},placements:{collectible:"combine"},showDuplicateMeasures:!1,layout:{rows:7,grouping:!1,single:!1},section:jc.ARRAY,sections:jc.NOOP,events:{tooltip:{beforeShow:function(){return Promise.resolve()},afterShow:jc.NOOP,afterHide:jc.NOOP},interaction:{mouseleave:jc.NOOP}}},legend:{keys:{tooltip:void 0,component:void 0}}},void 0===t?{}:t)}({config:e.config}),o=al(),i=al(),a={components:void 0,interactions:void 0};return{getComponents:function(){return a.components||(a.components=function(e){var t=e.config;return[sd({chart:e.chart,translator:e.translator,config:t,expando:e.expando,internal:e.internal}),ld({config:t})].filter(Boolean)}({chart:t,translator:n,config:r,expando:o,internal:i})),a.components},getInteractions:function(){return a.interactions||(a.interactions=function(e){var t=e.chart,n=e.config,r=e.expando,o=e.internal,i=function(e){var t=e.chart,n=e.config,r=e.expando,o=e.internal;return{collectNodes:function(e){var i=e.nodes,a=ha(Gc({chart:t,config:n,expando:r,internal:o,nodes:i}),1)[0];return(a=void 0===a?{nodes:[]}:a).nodes}}}({chart:t,config:n,expando:r,internal:o});return{gestures:[pd({chart:t,config:n,expando:r,internal:o,facade:i})],native:fd({chart:t,config:n,expando:r,internal:o,facade:i})}}({chart:t,config:r,expando:o,internal:i})),a.interactions},expando:o}}var hd={};function gd(){gd.init.call(this)}hd.isObject=function(e){return"object"==typeof e&&null!==e},hd.isNumber=function(e){return"number"==typeof e},hd.isUndefined=function(e){return void 0===e},hd.isFunction=function(e){return"function"==typeof e};var yd=gd;gd.EventEmitter=gd,gd.prototype._events=void 0,gd.prototype._maxListeners=void 0,gd.defaultMaxListeners=10,gd.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},gd.prototype.setMaxListeners=function(e){if(!hd.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},gd.prototype.emit=function(e){var t,n,r,o,i,a;if(this._events||(this._events={}),"error"===e&&!this._events.error)throw(t=arguments[1])instanceof Error?t:Error('Uncaught, unspecified "error" event.');if(n=this._events[e],hd.isUndefined(n))return!1;if(hd.isFunction(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,o=new Array(r-1),i=1;i<r;i++)o[i-1]=arguments[i];n.apply(this,o)}else if(hd.isObject(n)){for(r=arguments.length,o=new Array(r-1),i=1;i<r;i++)o[i-1]=arguments[i];for(r=(a=n.slice()).length,i=0;i<r;i++)a[i].apply(this,o)}return!0},gd.prototype.addListener=function(e,t){var n;if(!hd.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,hd.isFunction(t.listener)?t.listener:t),this._events[e]?hd.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,hd.isObject(this._events[e])&&!this._events[e].warned)&&((n=hd.isUndefined(this._maxListeners)?gd.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,hd.isFunction(console.error)&&console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),hd.isFunction(console.trace)&&console.trace()));return this},gd.prototype.on=gd.prototype.addListener,gd.prototype.once=function(e,t){if(!hd.isFunction(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},gd.prototype.removeListener=function(e,t){var n,r,o,i;if(!hd.isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(o=(n=this._events[e]).length,r=-1,n===t||hd.isFunction(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(hd.isObject(n)){for(i=o;i-- >0;)if(n[i]===t||n[i].listener&&n[i].listener===t){r=i;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},gd.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],hd.isFunction(n))this.removeListener(e,n);else if(Array.isArray(n))for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},gd.prototype.listeners=function(e){return this._events&&this._events[e]?hd.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},gd.listenerCount=function(e,t){return e._events&&e._events[t]?hd.isFunction(e._events[t])?1:e._events[t].length:0};function vd(){const e={};var t;return t=e,Object.keys(yd.prototype).forEach((e=>{t[e]=yd.prototype[e]})),yd.init(t),e.lasso={active:()=>!1},e.select={on:e.on,removeListener:e.removeListener},e}function bd({picasso:e}){var t;const n=g(),r=y(),o=v(),[i,a]=b(),s=vd(),l=x(),u=q(),c=!(null===(t=l.qSelectionInfo)||void 0===t||!t.qInSelections),[d,p]=b(!1);return s.lasso=function({layout:e,isInSelections:t,isLassoActionActive:n,setIsLassoActionActive:r,translator:o}){var i,a,s;return{active:n,label:o.get(n?"Tooltip.ToggleOffLassoSelection":"Tooltip.ToggleOnLassoSelection"),hidden:!t||!(null===(i=e.qHyperCube)||void 0===i||null===(a=i.qDimensionInfo)||void 0===a||null===(s=a[0])||void 0===s||!s.qIsOneAndOnlyOne),action(e){r("boolean"==typeof e?e:!n)},icon:{shapes:[{type:"path",attrs:{d:"M15.9488039,5.20769129 C16.0487326,6.70662306 15.3492311,8.30548361 14.050157,9.30477145 C12.651154,10.5039169 10.8524359,10.8037032 8.85386017,10.4039881 L7.3549284,10.0042729 L5.75606786,9.70448659 C5.75606786,9.90434416 5.65613907,10.0042729 5.4562815,10.2041305 C5.05656637,10.6038456 4.55692244,10.8037032 4.05727852,10.8037032 C3.75749217,10.8037032 3.45770582,10.7037744 3.15791946,10.6038456 C3.05799068,10.903632 3.15791946,11.2034184 3.45770582,11.7030623 C5.05656637,14.0014243 3.85742095,15.9000712 3.75749217,16 L2.2585604,15.3004985 C2.2585604,15.2005697 2.95806189,14.0014243 1.95877405,12.6024213 C1.6589877,12.0028486 1.15934378,11.0035608 1.55905891,10.0042729 C1.6589877,9.80441537 1.75891648,9.6045578 1.95877405,9.40470024 C1.6589877,8.90505631 1.55905891,8.30548361 1.85884527,7.7059109 C1.55905891,7.40612455 1.25927256,7.1063382 1.15934378,6.70662306 C0.859557424,5.90719279 0.959486209,4.5081898 1.6589877,3.30904439 C1.95877405,2.6095429 2.55834676,2.0099702 3.15791946,1.51032628 C3.95734974,0.91075357 4.95663758,0.610967217 6.15578299,0.311180864 C9.05371774,-0.388320626 11.9516525,0.111323295 13.9502282,1.61025506 C15.1493736,2.50961412 15.8488751,3.80868831 15.9488039,5.20769129 Z M13.0508691,8.10562604 C13.8502994,7.40612455 14.3499433,6.40683671 14.3499433,5.30762008 C14.2500145,4.20840345 13.550513,3.40897318 12.9509403,2.90932926 C12.1515101,2.40968533 11.252151,2.0099702 10.1529344,1.81011263 C8.95378895,1.61025506 7.75464354,1.71018384 6.45556935,1.91004141 C4.75678001,2.30975655 3.65756338,3.00925804 3.05799068,4.10847467 C2.55834676,5.00783373 2.65827554,5.90719279 2.75820433,6.20697914 C2.75820433,6.30690792 2.85813311,6.40683671 3.05799068,6.40683671 C3.15791946,6.40683671 3.25784825,6.40683671 3.35777703,6.40683671 C3.45770582,6.40683671 3.45770582,6.40683671 3.45770582,6.40683671 L3.5576346,6.40683671 L3.65756338,6.40683671 C4.65685123,6.40683671 5.4562815,6.90648063 5.85599664,7.80583969 L5.85599664,8.00569726 C6.35564056,8.10562604 7.05514205,8.30548361 7.75464354,8.50534118 L9.25357531,8.90505631 C10.0530056,9.0049851 10.7525071,9.0049851 11.4520086,8.80512753 C12.0515813,8.70519875 12.5512252,8.40541239 13.0508691,8.10562604 Z"}}]}}}({layout:l,isInSelections:c,isLassoActionActive:d,setIsLassoActionActive:p,translator:u}),D((()=>(i&&(i.interactions.lasso.active=()=>d),{...s.lasso})),[i,d,c,u.language()]),C((()=>{r.style.overflow="hidden";const t=e({renderer:{prio:[n.renderer||"canvas"]}}),i=t.chart({element:r,data:[],settings:{}}),u=Ac({chart:i,actions:s,selections:o,config:{selectionActions:!1}});u.setLayout(l),u.setBrushAliases({colorField:"qDimensionInfo/0/qAttrDimInfo/0"});const c=function(e){var t=fa({},e),n={},r={},o=!1,i={get:function(e){return t[e]},set:function(e,i){var a=t[e];!o&&n[e]?t[e]=n[e](i,a):t[e]=i,!o&&r[e]&&r[e](t[e],a)},preventSet:function(e,t){o=!0,i.set(e,t),o=!1},intercept:function(e,t){n[e]=t},onChanged:function(e,t){r[e]=t}};return i}({legendScrollOffset:0,rotation:0});return c.intercept("rotation",(e=>(c.get("rotation")+e)%(2*Math.PI))),c.onChanged("rotation",(()=>{i.update({partialData:!0})})),s.on("selections-start",(()=>{i.brush("selection").start()})),a({picasso:t,chart:i,selectionService:u,viewState:c,interactions:s}),()=>{u.destroy(),i.destroy(),s.removeAllListeners(),delete s.select,c.intercept("rotation",void 0),c.onChanged("rotation",void 0)}}),[]),i}const xd={CUSTOM:{EXPRESSION:"customTooltipExpression",TITLE:"customTooltipTitle",DESCRIPTION:"customTooltipDescription",QUARANTINE:"customTooltip",IMAGES:"customTooltipImages"},CHART:{CONTAINER_ID:"tooltipContainerId",STATE:"customTooltipSessionState",CHART_OBJECT_ID:"customTooltipSessionObjectId",CHART_PARENT_TYPE:"TooltipChartParent",CHART_CHILD_TYPE:"TooltipChart",STYLE:{small:"140px",medium:"200px",large:"340px"}}};function qd(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const Dd={getImageSize(e,t){let n;function r(){n&&(clearTimeout(n),n=null)}function o(e){const t=e;t.onload=null,t.onerror=null,r()}const i={small:50,medium:200,large:340,original:340};return new Promise((a=>{const s=new Image;s.referrerPolicy="no-referrer",s.onload=()=>{let e;const{height:n,width:l}=s,u=i[t]*(n>l?1:n/l),c=i[t]*(l>n?1:l/n);!n||!l||0===n&&0===l?(e={height:20,width:20,imageError:!0},o(s)):"original"===t?(e={height:Math.min(u,n),width:Math.min(c,l)},r()):(e={height:u,width:c},r()),a(e)},s.onerror=()=>{o(s),a({height:20,width:20,imageError:!0})},s.src=e,n=setTimeout((()=>{o(s),a({height:20,width:20,imageError:!0})}),3e3)}))}};async function Cd(e,t,n,r){var o,i,a,s,l,u;const{app:c,flags:d}=t,p=null===(o=e.layout)||void 0===o||null===(i=o.tooltip)||void 0===i?void 0:i.imageComponents;if(!p)return[];const[f]=p,m=f.size||"small",h=f.type||"media";let g=-1;for(let e=0;e<n.length;e++)if(n[e].cId===f.cId){g=e;break}const y=(null===(a=r.data)||void 0===a||null===(s=a.customTooltipAttrExps)||void 0===s?void 0:s.value)||[];let v;if(-1!==g&&y[g]&&(v=y[g]),"media"===h&&null!==(l=f.ref)&&void 0!==l&&null!==(u=l.qStaticContentUrl)&&void 0!==u&&u.qUrl)return async function(e,t,n){let r=e.ref.qStaticContentUrl.qUrl;const o=function(e){let t,n,r,o,i,a;return e&&e.session&&e.session.options||e&&e.enigmaModel&&e.enigmaModel.session&&e.enigmaModel.session.sessionConfig?(t=e.session.options||e.enigmaModel.session.sessionConfig,a=void 0!==t.secure?t.secure:t.isSecure,n=a?"https://":"http://",r=t.host||"localhost",o=t.port?":"+t.port:"",i=t.prefix?t.prefix:"/","/"!==i[i.length-1]&&(i+="/"),n+r+o+i):""}(n);o&&(function(e,t){e.replace(t,"").replace(/^\.\.\//i,"/")[0]}(r,o),r=r.replace(/"/g,'\\"'),r=r.replace(/'/g,"\\'"),r=function(e,t){return t+("/"===e[0]?e.substr(1):e)}(r,o));const{height:i,width:a,imageError:s}=await Dd.getImageSize(r,t);return{src:r,size:t,height:i,width:a,imageError:s}}(f,m,c);if("url"===h)return async function(e,t,n,r,o){let i,a=n.ref;if(o&&o.label&&(a=o.label),t.isEnabled("IMAGE_BUNDLE_LOAD")&&null!=e&&e.getImage&&qd(a))try{const t="data:image/png;base64, "+await e.getImage(a),{height:n,width:o,imageError:s}=await Dd.getImageSize(t,r);i={src:t,size:r,height:n,width:o,imageError:s}}catch(e){}else{const{height:e,width:t,imageError:n}=await Dd.getImageSize(a,r);i={src:a,size:r,height:e,width:t,imageError:n}}return i}(c,d,f,m,v);if(d.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===h&&v&&v.label){return async function(e,t,n,r){let o;const i=r.label,a=`qmem://${t.qFallbackTitle}/${i}`;if(qd(a))try{const t=await e.getImage(a);if(t){const e="data:image/png;base64, "+t,{height:r,width:i,imageError:a}=await Dd.getImageSize(e,n);o={src:e,size:n,height:r,width:i,imageError:a}}}catch(e){}return o}(c,n[g],m,v)}return[]}const wd={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){const o=t,i=[];for(let t=0;t<o.length;t++)i.push(Cd(e,r,n,o[t]));const a=await Promise.all(i);for(let e=0;e<o.length;e++)o[e].data.customTooltipImages=[a[e]];return o},checkIfPromisesExist({customTooltipModel:e}){var t,n;const r=null===(t=e.layout)||void 0===t||null===(n=t.tooltip)||void 0===n?void 0:n.imageComponents;return!!r&&r.length>0}},Sd={async handlePromises({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){let o=t;return o=await wd.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}),o},checkIfPromisesExist:({customTooltipModel:e})=>wd.checkIfPromisesExist({customTooltipModel:e})};const Md=(e,t)=>{var n,r,o;const i=null==e||null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qDimensions,a=null==e||null===(r=e.qHyperCubeDef)||void 0===r?void 0:r.qMeasures,s=null==e||null===(o=e.qHyperCubeDef)||void 0===o?void 0:o.qInterColumnSortOrder,l=t;return{qInfo:{qType:xd.CHART.CHART_PARENT_TYPE,qId:xd.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:i,qMeasures:a,qInterColumnSortOrder:s,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:l}},Ed=e=>{var t,n,r;const o=null===(t=e.tooltip)||void 0===t||null===(n=t.chart)||void 0===n||null===(r=n.object)||void 0===r?void 0:r.refId;return{qInfo:{qType:xd.CHART.CHART_CHILD_TYPE},qExtendsId:o}};const Id={createContainer:({ctx:e,layout:t})=>{var n,r;if(!((null===(n=t.qHyperCube)||void 0===n||null===(r=n.qDimensionInfo)||void 0===r?void 0:r.length)<=0))return function(e,t){var n,r,o,i;const a=null!==(n=null===(r=t.tooltip)||void 0===r||null===(o=r.chart)||void 0===o||null===(i=o.style)||void 0===i?void 0:i.size)&&void 0!==n?n:"medium",s=xd.CHART.STYLE[a];return[{content:[e.h("div",{style:{display:"flex",width:s,height:s,backgroundColor:"#FFFFFF",borderRadius:"5px",padding:"2px",color:"#595959"},colspan:2,id:xd.CHART.CONTAINER_ID})],colspan:2,style:{"text-align":e.rtl?"right":"left","max-width":s,width:"100%"}},{}]}(e,t)},show:async({app:e,properties:t,selectedNodes:n,dimIndex:r,customTooltipModel:o,rtl:i})=>{var a,s,l;const u=o,c=null==t||null===(a=t.tooltip)||void 0===a||null===(s=a.chart)||void 0===s||null===(l=s.object)||void 0===l?void 0:l.refId;if(null!=u&&u.embed&&e.removeSessionAlternateState&&e.addSessionAlternateState&&c&&!(t.qHyperCubeDef.qDimensions.length<=0)){await Id.hide({app:e,customTooltipModel:o});try{await async function({app:e,properties:t,customTooltipModel:n}){const r=n,o=xd.CHART.STATE,i=t.qStateName;r.miniChartToken.alternateState||(r.miniChartToken.alternateState=o,await e.addSessionAlternateState(o,i),r.miniChartToken.alternateState=o)}({app:e,properties:t,customTooltipModel:o});const a=await async function({app:e,properties:t,customTooltipModel:n}){var r;const o=n;null!==(r=o.miniChartToken.sessionObj)&&void 0!==r&&r.id&&await e.destroySessionObject(o.miniChartToken.sessionObj.id);const i=xd.CHART.STATE,a=Md(t,i),s=await e.createSessionObject(a),l=Ed(t);if(s.id!==xd.CHART.CHART_OBJECT_ID)return void e.destroySessionObject(s.id);o.miniChartToken.sessionObj=s;const u=await s.createChild(l);if(o.miniChartToken.sessionObj&&o.miniChartToken.sessionObj.id===s.id)return o.miniChartToken.model=u,u;e.destroySessionObject(s.id)}({app:e,properties:t,customTooltipModel:o});if(u.miniChartToken.alternateState&&u.miniChartToken.sessionObj&&a){var d,p,f,m;const e=n.length>0&&void 0!==(null===(d=n[0].data)||void 0===d?void 0:d.value)?[null===(p=n[0].data)||void 0===p?void 0:p.value]:[],a=void 0!==r?r:t.qHyperCubeDef.qDimensions.length-1;if(2===t.qHyperCubeDef.qDimensions.length&&void 0===r&&n.length>0){var h,g;const e=null!==(h=n[0].data.selectionOuterDimension)&&void 0!==h?h:n[0].data.selectionDimension;if(null!=e&&null!==(g=e.source)&&void 0!==g&&g.field){var y;const t=null==e||null===(y=e.source)||void 0===y?void 0:y.field.split("/"),n=t[t.length-1],r=void 0!==e.value?[e.value]:[];r.length>0&&void 0!==n&&u.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",Number(n),r,!1)}}e.length>0&&u.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",a,e,!1);const s=document.getElementById(xd.CHART.CONTAINER_ID),l={direction:i?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1};u.miniChartToken.vis=await o.embed.render({element:s,model:u.miniChartToken.model,options:l,id:null===(f=u.miniChartToken.model)||void 0===f?void 0:f.id,type:null===(m=u.miniChartToken.model)||void 0===m?void 0:m.genericType})}}catch(t){await Id.hide({app:e,customTooltipModel:o})}}},hide:async({app:e,customTooltipModel:t})=>{const n=t;null!=n&&n.embed&&(Id.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(xd.CHART.CHART_OBJECT_ID),n.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const n=t,r=xd.CHART.STATE;await e.removeSessionAlternateState(r),n.miniChartToken.alternateState=void 0}({app:e,customTooltipModel:t}))},destroyVisualization:({customTooltipModel:e})=>{var t,n;const r=e;"function"==typeof(null===(t=r.miniChartToken)||void 0===t||null===(n=t.vis)||void 0===n?void 0:n.destroy)&&(r.miniChartToken.vis.destroy(),r.miniChartToken.vis=void 0)}};function Ad(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function kd(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:n,IMAGES:r}=xd.CUSTOM,o={};return o[e]=!0,o[t]=!0,o[n]=!0,o[r]=!0,o}function Td(e){const t=kd();return e.filter((e=>t[e.id]))}const Ld={getNodes(e,t){const n=function(e,t){let n=0,r=0;e.center?(n+=e.center.x,r+=e.center.y):(n+=e.clientX,r+=e.clientY);const o=t.element.getBoundingClientRect();return{cx:n-o.left,cy:r-o.top}}(e,t);return t.shapesAt({x:n.cx,y:n.cy})},getDataNodes(e,t){let n,r=[];const o={container:{bar:!0,"bullet-axis":!0},circle:{"point-component":!0}};return t.forEach((t=>{var i,a,s,l;const u=null!==(i=null===(a=t.data)||void 0===a?void 0:a.selectionDimension)&&void 0!==i?i:t.data;if(!u||null!==(s=t.data)&&void 0!==s&&s.customTooltipAttrExps||o[t.type]){if(null!==(l=t.data)&&void 0!==l&&l.customTooltipAttrExps&&!t.data.customTooltipImages){const e=t;e.data.customTooltipImages=[],r.push(e)}}else{n||(n=[],Object.keys(o).forEach((t=>{n=n.concat(e.findShapes(t).filter((e=>e.data&&e.data.customTooltipAttrExps&&!e.data.customTooltipImages&&o[t][e.key])))})));const t=n.filter((e=>{var t,n;const r=null!==(t=null!==(n=e.data.stack)&&void 0!==n?n:e.data.selectionOuterDimension)&&void 0!==t?t:e.data.selectionDimension;return r&&r.value===u.value&&r.label===u.label}));t.length>0&&(r=r.concat(t[0]))}})),r},displayTooltip(e,t,{nodes:n,opts:r={},customTooltipModel:o,extractedNodes:i=[],hide:a}){if(o&&!a){const{layout:a,chart:s}=o,{attrExps:l}=Ld.getAttrExprData(a);i.length||n.length?Sd.handlePromises({customTooltipModel:o,nodes:Ld.getDataNodes(s,i.length>0?i:n),attrExps:l,opts:r}).then((()=>{t.emit("show",e,n.length?{nodes:n}:void 0)})):t.emit("show",e,n.length?{nodes:n}:void 0)}else{var s;null!=o&&null!==(s=o.miniChartToken)&&void 0!==s&&s.alternateState&&Id.hide({app:r.app,customTooltipModel:o}),t.emit("hide")}},checkIfPromisesExist:({customTooltipModel:e})=>Sd.checkIfPromisesExist({customTooltipModel:e}),getAttrExps(e,t){var n;const r=t,o=null!==(n=e.qHyperCubeDef)&&void 0!==n&&n.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return r[o]||(r[o]=[]),r[o]},getAttrExprData(e){var t;let n=[],r="";const o=(null===(t=e.qHyperCube)||void 0===t?void 0:t.qDimensionInfo)||[];if(o.length>0){var i,a,s;const t=o.length-1;n=(null===(i=e.qHyperCube)||void 0===i||null===(a=i.qDimensionInfo)||void 0===a||null===(s=a[t])||void 0===s?void 0:s.qAttrExprInfo)||[],r=`qDimensionInfo/${t}/qAttrExprInfo`}return{attrExps:n,fieldPath:r}},quarantineCustomTooltipAttrs(e,t={}){var n,r;if(!(null===(n=e.qLayoutExclude)||void 0===n||null===(r=n.quarantine)||void 0===r?void 0:r[xd.CUSTOM.QUARANTINE])){!function(e,t){const n=t;let r=n.qLayoutExclude;r||(n.qLayoutExclude={quarantine:{}},r=n.qLayoutExclude),r.quarantine||(r.quarantine={}),r.quarantine[xd.CUSTOM.QUARANTINE]=[],e.forEach((e=>{r.quarantine[xd.CUSTOM.QUARANTINE].push(e)})),n.qLayoutExclude=r}(Td(t.qAttributeExpressions||[]),e)}},unquarantineCustomTooltipAttrs(e){var t,n;const r=e;(null===(t=e.qLayoutExclude)||void 0===t||null===(n=t.quarantine)||void 0===n?void 0:n[xd.CUSTOM.QUARANTINE])&&delete r.qLayoutExclude.quarantine[xd.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const n=Ad(e);if(!n)return;const r=void 0!==t?t:n.length-1;if(!n[r])return;const o=this.getAttrExps(e,n[r]);if(0===Td(o).length){var i,a;const t=(null===(i=e.qLayoutExclude)||void 0===i||null===(a=i.quarantine)||void 0===a?void 0:a.customTooltip)||[],n=[...o,...t],s=e;s.qHyperCubeDef?s.qHyperCubeDef.qDimensions[r].qAttributeExpressions=n:s.qHyperCube.qDimensionInfo[r].qAttrExprInfo=n}},moveCustomTooltipAttrs(e,t={},n){let r=[];const o=Ad(e)||[];[...o,t].forEach((e=>{const t=Td(e.qAttributeExpressions||[]);t.length>0&&(r=t)}));const i=kd(),a=o.map((e=>{const t=e,n=e.qAttributeExpressions||[];return t.qAttributeExpressions=n.filter((e=>!i[e.id])),t})),s=void 0!==n?n:a.length-1;a.length>0&&(a[s].qAttributeExpressions=a[s].qAttributeExpressions.concat(r));const l=e;e.qHyperCubeDef?l.qHyperCubeDef.qDimensions=a:l.qHyperCube.qDimensionInfo=a},addCallbackCustomTooltip(e){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e):(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},moveCallbackCustomTooltip(e,t){1===e.qHyperCubeDef.qDimensions.length&&(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e)),e.qHyperCubeDef.qDimensions.length>1&&this.moveCustomTooltipAttrs(e,t)},removeCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>0?this.moveCustomTooltipAttrs(e,t):this.quarantineCustomTooltipAttrs(e,t)},replaceCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e,t):(this.quarantineCustomTooltipAttrs(e,t),this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},shouldIgnoreDefaultRows(e){var t;return(null===(t=e.tooltip)||void 0===t?void 0:t.hideBasic)||0},DEBOUNCE_THRESHOLD:50,getFooterRow:(e,t)=>[{content:e,style:{"font-style":"italic","font-size":"12px","line-height":"16px",color:"rgba(255, 255, 255, 0.6)","text-align":t?"right":"left",direction:ae.detectTextDirection(e)},colspan:2},{}],getImageRow(e,t){const n=ae.detectTextDirection(e.src),r=[],o={style:{display:"block","margin-left":"auto","margin-right":"auto",overflow:"hidden",width:e.width,height:e.height}};if("original"===e.size||e.imageError){r.push(t.h("span",{style:{display:"inline-block",height:"100%","vertical-align":"middle"}}));const n=e.imageError?`${e.src}?${Math.random()}`:e.src;r.push(t.h("img",{style:{"max-width":e.width,"max-height":e.height,"vertical-align":"middle"},src:n,referrerpolicy:"no-referrer"})),o.style["text-align"]="center",o.style["white-space"]="nowrap"}else o.style["background-size"]="contain",o.style["background-repeat"]="no-repeat",o.style["background-position"]="center",o.style["background-image"]=`url('${e.src}')`;return[{content:[t.h("div",o,r),""],style:{"text-align":t.rtl?"right":"left",direction:n,"max-width":e.width},colspan:2},{}]}};function Od(e,t,n,r){var o,i,a;const s=(null===(o=t.qHyperCube)||void 0===o||null===(i=o[n])||void 0===i||null===(a=i[r])||void 0===a?void 0:a.qAttrExprInfo)||[],l=[],u=e.qSubNodes&&e.qSubNodes[r]?e.qSubNodes[r].qAttrExps:e.qAttrExps;return u?(s.forEach(((e,t)=>{const o=u.qValues&&u.qValues[t]?u.qValues[t]:void 0,i=void 0===o?"NaN":function(e,t){let n;switch(e.id){case xd.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case xd.CUSTOM.TITLE:case xd.CUSTOM.DESCRIPTION:case xd.CUSTOM.IMAGES:n=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:n="NaN"}return n}(e,o);l.push({source:{key:"qHyperCube",field:`${n}/${r}/qAttrExprInfo/${t}`},label:i,value:"value"})})),l):l}const Pd={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const n=t-1,r="qDimensionInfo";return{field:`${r}/${n}`,value:t=>Od(t,e,r,n)}}};const Nd={getCustomAttrExps(e,t,n){var r,o;const i={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},a=(null===(r=t.data)||void 0===r||null===(o=r.customTooltipAttrExps)||void 0===o?void 0:o.value)||[];if(Number.isNaN(a))return i;return function(e,t,n,r){const o={[xd.CUSTOM.TITLE]:!0,[xd.CUSTOM.DESCRIPTION]:!0},{attrExps:i,fieldPath:a}=Ld.getAttrExprData(e);return 0===t.length||0===i.length||""===a||i.forEach(((e,i)=>{const s=t[i];if(e.id===xd.CUSTOM.EXPRESSION&&s){const t=e.qFallbackTitle,o="NaN"===s.value||e.isCustomFormatted?s.value:n("qHyperCube").field(`${a}/${i}`).formatter()(s.value);r.customTooltipAttrExpsArr.push({label:t,value:o})}else if(o[e.id]&&s){const t="-"!==s.value&&"NaN"!==s.value?s.value:s.label;t&&"undefined"!==t&&r.customTooltipInfoAttrExpsArr.push({...e.id===xd.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}})),r}(n,a.map((t=>se.getMeasure(e,t))),e,i)}};function Rd({nodes:e,layout:t,dataset:n}){return function(e,t,n){const r=[];return e.forEach((e=>{r.push(Nd.getCustomAttrExps(n,e,t))})),r}(e,t,n).reduce(((e,t)=>({customTooltipAttrExpsArr:e.customTooltipAttrExpsArr.concat(t.customTooltipAttrExpsArr),customTooltipInfoAttrExpsArr:e.customTooltipInfoAttrExpsArr.concat(t.customTooltipInfoAttrExpsArr)})),{customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]})}function Fd(e){const t=xd.CUSTOM.EXPRESSION,{qNumFormat:n,qLabel:r,qLabelExpression:o,cId:i}=e.qDef;return e.qLibraryId?{qLibraryId:e.qLibraryId,id:t,qNumFormat:n,qLabel:r,qLabelExpression:o,cId:i}:{qExpression:e.qDef.qDef,id:t,qNumFormat:n,qLabel:r,qLabelExpression:o,cId:i}}function jd(e){var t;const n=null===(t=e.qHyperCubeDef)||void 0===t?void 0:t.qDimensions;return n[n.length-1].qAttributeExpressions||[]}var Hd={attrExpr:{migrateProperties(e){var t,n,r,o;const i=Y(!0,{},e),a=(null===(t=i.tooltip)||void 0===t||null===(n=t.data)||void 0===n||null===(r=n.qHyperCubeDef)||void 0===r?void 0:r.qMeasures)||[];let s=jd(i);return s=function(e,t){return t.concat(e.map((e=>Fd(e))))}(a,s),function(e,t){var n;const r=null===(n=t.qHyperCubeDef)||void 0===n?void 0:n.qDimensions;r[r.length-1].qAttributeExpressions=e}(s,i),null===(o=i.tooltip)||void 0===o||delete o.data,i},getPatches(e){var t,n,r,o;const i=(null===(t=e.tooltip)||void 0===t||null===(n=t.data)||void 0===n||null===(r=n.qHyperCubeDef)||void 0===r?void 0:r.qMeasures)||[],a=(null===(o=e.qHyperCubeDef)||void 0===o?void 0:o.qDimensions.length)-1;return function(e,t,n){let r=e.length;const o=[];return t.forEach((e=>{const t=Fd(e),i=JSON.stringify(t);o.push({qPath:`/qHyperCubeDef/qDimensions/${n}/qAttributeExpressions/${r}`,qOp:"add",qValue:i}),r++})),o.push({qPath:"/tooltip/data",qOp:"remove"}),o}(jd(e),i,a)},checkForBackwardCompatibility:(e,t)=>(e.qMeasureInfo||[]).length>0&&t.length>0,updateProperties(e,t){return new Promise((n=>{var r,o,i,a,s;const l=(null===(r=t.qHyperCube)||void 0===r?void 0:r.qDimensionInfo)||[],u=(null===(o=t.tooltip)||void 0===o||null===(i=o.data)||void 0===i?void 0:i.qHyperCube)||{},c=null===(a=t.qMeta)||void 0===a||null===(s=a.privileges)||void 0===s?void 0:s.includes("update");e&&e.getEffectiveProperties&&this.checkForBackwardCompatibility(u,l)&&e.getEffectiveProperties().then((t=>{if(c){const r=this.migrateProperties(t);e.setProperties(r).then((()=>{e.app.clearUndoBuffer(),n(!0)}))}else{const r=this.getPatches(t);e.applyPatches(r,!0).then((()=>{e.app.clearUndoBuffer(),n(!0)}))}})),n(!1)}))}}};const{CUSTOM:_d}=xd;function zd({flags:e,layout:t,app:n,model:r,picasso:o,chart:i,translator:a,localeInfo:s,embed:l,options:u}){var c,d,p;const f=function({layout:e,app:t,picasso:n,model:r,chart:o,translator:i,localeInfo:a,embed:s}){return{layout:e,app:t,picasso:n,model:r,chart:o,translator:i,localeInfo:a,useCustomTooltip:e.tooltip&&!e.tooltip.auto,utils:Ld,miniChartToken:{},embed:s}}({layout:t,app:n,model:r,picasso:o,chart:i,translator:a,localeInfo:s,embed:l}),m="rtl"===u.direction,h=!(!t.tooltip||t.tooltip.auto),g=h&&ol(t,"tooltip.hideBasic",!1),y=!!(h&&null!==(c=t.tooltip)&&void 0!==c&&null!==(d=c.chart)&&void 0!==d&&null!==(p=d.object)&&void 0!==p&&p.refId&&l&&"function"==typeof(null==r?void 0:r.getEffectiveProperties));return{isEnabled:()=>h,hideBasic:()=>g,getAttributes:({dataset:e,nodes:n})=>{var r,o;const i=Rd({dataset:e,nodes:n,layout:t});return{title:null===(r=i.customTooltipInfoAttrExpsArr.find((e=>e.id===_d.TITLE)))||void 0===r?void 0:r.title,description:null===(o=i.customTooltipInfoAttrExpsArr.find((e=>e.id===_d.DESCRIPTION)))||void 0===o?void 0:o.value,measures:i.customTooltipAttrExpsArr}},hasImages:()=>Ld.checkIfPromisesExist({customTooltipModel:f}),createImageRow:({value:e,h:t})=>Ld.getImageRow(e,{h:t,rtl:m}),addImages:({nodes:r})=>{const o=Ld.getDataNodes(i,r),a=Ld.getAttrExprData(t);return Sd.handlePromises({customTooltipModel:f,nodes:o,attrExps:a,opts:{flags:e,app:n}})},chart:{isEnabled:()=>y,hasLimitation:()=>{var e;return!(null==n||null===(e=n.isInModalSelection)||void 0===e||!e.call(n))},createContainer:({h:e})=>Id.createContainer({layout:t,ctx:{h:e,rtl:m}}),createLimitationRow:()=>Ld.getFooterRow(a.get("properties.tooltip.notselectedmessage"),m),show:({nodes:e,properties:t})=>Id.show({app:n,properties:t,selectedNodes:e,customTooltipModel:f,rtl:m}),hasAlternateState:()=>{var e;return!(null===(e=f.miniChartToken)||void 0===e||!e.alternateState)},hide:()=>Id.hide({app:n,customTooltipModel:f}),destroy:()=>Id.destroyVisualization({customTooltipModel:f})}}}function Vd(e){return{layout:e,keys:{SCALE:{FILL:"fill"},COMPONENT:{DIMENSION_TITLE:"dimension-title",SLICES:"slices",PIE_LABELS:"pie-labels"}}}}function Ud({flags:e,picasso:t,instance:n}){const r=w(),o=S(),i=q(),a=y(),[s,l]=b(),u=M(),c=E(),d=I(),p=g(),f=A(),{qLocaleInfo:m}=k(),h=T();return C((()=>{if(!n)return;a.style.overflow="hidden";const s=function(e){var t,n,r,o,i=e.picasso,a=e.model,s=e.app,l=e.translator,u=e.layoutService,c=void 0===u?void 0:u,d=e.createConfig,p=void 0===d?rl:d,f=e.config,m=void 0===f?{}:f,h=e.custom,g=void 0===h?{}:h,y=m.localeInfo,v=m.key,b=m.theme,x=void 0===b?void 0:b,q=m.auto,D=void 0===q?void 0:q,C=m.definitionPath,w=null==c||null===(t=c.getLayout)||void 0===t?void 0:t.call(c),S={theme:x,key:v,localeInfo:y,layout:w,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:fa(fa({},null==c||null===(o=c.getLayoutValue)||void 0===o?void 0:o.call(c,"color")),{},{useBaseColors:w?Qs(w):void 0})},M=Zs({picasso:i,model:a,app:s,translator:l,auto:D});!1!==D&&M.auto((function(e){return D?D({layout:e,defaultAuto:nl}):nl(e)}));var E=!1;return{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(C)},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 E},custom:fa({},g),initialize:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).createConfig,t=(void 0===e?p:e)({getUseBaseColors:Qs}),n=el(S,t);return M.config(n),M.getAuxiliarySettings(C).then((function(){E=!0}))}}}({picasso:n.picasso,model:r,app:o,translator:i,config:{auto:!1,key:"fill"}}),g=function(e){var t=e.picassoInstance,n=e.plugins,r=e.pluginArgs,o=void 0===r?{}:r,i={initialized:!1,definitions:[]};return{initialize:function(){return ca(regeneratorRuntime.mark((function e(){var r,a,s,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!i.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=ca(regeneratorRuntime.mark((function e(n){var r;return regeneratorRuntime.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(fa({},o));case 4:if("object"===la(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)}}())),s=Promise.all(n.filter((function(e){return"component-definition"===e.info.type})).map((function(e){return e.fn(fa({},o))}))),e.next=6,Promise.all([a,s]);case 6:l=e.sent,i.initialized=!0,(r=i.definitions).push.apply(r,ga(l[1]));case 9:case"end":return e.stop()}}),e)})))()},extendComponents:function(e){return i.initialized?(i.definitions.filter(Boolean).forEach((function(t){var n=ha(e.filter((function(e){return e.key&&e.key===t.key})),1)[0];if(n){var r=Ea(!0,{},n.brush);Ea(!0,n,t),t.brush&&(n.brush=function(e,t){return"object"===la(e)&&Object.keys(e).length?(Array.isArray(t.consume)&&(e.consume=ll({originalArray:e.consume,newArray:t.consume,matchKey:"context"})),Array.isArray(t.trigger)&&(e.trigger=ll({originalArray:e.trigger,newArray:t.trigger,matchKey:"on"})),e):t}(r,t.brush))}else e.push(t)})),e):e}}}({picassoInstance:n.picasso,plugins:c,pluginArgs:Vd(u)}),y=zd({flags:e,layout:u,app:o,model:r,picasso:t,chart:n.chart,translator:i,localeInfo:m,embed:h,options:p}),v=function(e){var t=e.theme,n=e.config,r=void 0===n?{}:n,o=r.id,i=r.resolve,a=void 0===i?[]:i,s=r.transform,l=void 0===s?[]:s,u=r.extend,c=void 0===u?[]:u,d={theme:t,matrix:Nc(a),styles:void 0};return d.styles=Fc({theme:t,id:o,transform:l,extend:c,matrix:d.matrix}),{getStyles:function(){return d.styles},getTheme:function(){return d.theme},setTheme:function(e){d.theme=e,d.styles=Fc({theme:e,id:o,transform:l,extend:c,matrix:d.matrix})}}}({theme:f,config:{id:"pieChart",resolve:[["object","label.name","color","#595959"],["object","label.name","fontFamily"],["object","label.name","fontSize","12px"]]}}),b=function({chart:e,translator:t,layout:n,constraints:r,options:o,themeService:i,colorService:a,custom:s}){const l=n.qHyperCube.qMeasureInfo.length>1,u="rtl"===o.direction,{fontFamily:c}=i.getStyles();return md({chart:e,translator:t,config:{rtl:u,enable:()=>!r.passive,getColorSettings:()=>a.getSettings(),style:{fontFamily:c},main:{key:"tooltip",getGroupByValue:({data:e})=>e.value,collectibles:[{key:"slices",type:"slice",major:({data:e})=>e.value}],triggers:[{keys:["slices"],collect:{from:"single"},placement:"collectible"},{keys:["pie-labels","negative-indicators"],collect:{from:"dimension",by:({data:e})=>e.value},placement:"trigger"}],placement:({meta:e})=>({type:"slices"===e.triggerer?"slice":"bounds"}),section:({h:e,nodes:n,dataset:r,formatter:o,create:i,util:a})=>{const[u]=n,{title:c,description:d,measures:p}=s.isEnabled()?s.getAttributes({dataset:r,nodes:n}):{},f=[];c&&f.push(i.text({value:c,style:{bold:!0}})),d&&f.push(i.text({value:d}));const m=s.hideBasic();if(m&&!p.length&&(c||d)||f.push(i.text({value:u.data.label,style:{bold:!0}})),!m){f.push(i.color({nodes:n,property:"fill"}));const{num:e}=u.data;if(f.push(i.measure({label:a.dataset.title(e.source.key,e.source.field),value:e.label})),l){const{radius:e}=u.data;f.push(i.measure({label:a.dataset.title(e.source.key,e.source.field),value:e.label}))}f.push(i.measure({label:t?t.get("properties.dataPoints.labelmode.share"):"Share",value:o("share")(u.desc.share)}))}p&&f.push(...p.map((e=>i.measure({label:e.label,value:e.value,survive:{color:!0,duplicate:!0}})))),s.chart.isEnabled()&&(s.chart.hasLimitation()?(s.chart.destroy(),f.push(i.raw({value:s.chart.createLimitationRow()}))):f.push(i.raw({value:s.chart.createContainer({h:e})})));const{customTooltipImages:h}=u.data;return s.isEnabled()&&h&&f.push(...h.map((t=>i.raw({value:s.createImageRow({value:t,h:e})})))),f},layout:{grouping:!0},events:{tooltip:{beforeShow:({collectNodes:e})=>s.isEnabled()&&s.hasImages()?s.addImages({nodes:e()}):Promise.resolve(),afterShow:({expando:e,nodes:t})=>{s.chart.isEnabled()&&!s.chart.hasLimitation()&&s.chart.show({nodes:t,properties:e.get("properties")})}},interaction:{mouseleave:()=>{s.chart.isEnabled()&&s.chart.hasAlternateState()&&s.chart.hide()}}}},legend:{keys:{tooltip:"legend-color-cat",component:"legend-cat"}}}})}({app:o,chart:n.chart,translator:i,layout:u,constraints:d,options:p,themeService:v,colorService:s,custom:y});l({colorService:s,pluginService:g,themeService:v,tooltipService:b})}),[r,o,n,u,i.language(),d,p.direction,f.name()]),s}function Bd({scaleKey:e,legend:t,onEdited:n}){const{layout:r}=t,{dock:o}=r||{};return{type:"brush-range",key:"legendRangeBrush",layout:{dock:"@legend-seq"},on:n?{bubbleEnd(){n()}}:{},settings:{brush:"selection",scale:e+"Range",direction:"left"===o||"right"===o?"vertical":"horizontal",bubbles:{align:"left"===o||"top"===o?"end":"start",placement:"outside"},target:{selector:'[id="legend-seq-target"]',fillSelector:'[id="legend-seq-ticks"]',fill:"rgba(82,204,82,0.2)"}}}}const Wd={CORNER_RADIUS:0,INNER_RADIUS:.55,STROKE:{COLOR:"#FFFFFF",WIDTH:{NONE:0,SMALL:2,MEDIUM:4,LARGE:6}}},$d=({layout:e},t,n)=>t.encodings.slice.outerRadius?{scale:"radius",fn:t=>{var r,o;let i=.8,a=0;const s=null!==(r=null==n||null===(o=n.style)||void 0===o?void 0:o.innerRadius)&&void 0!==r?r:.55;e.donut.showAsDonut&&(i=.8-s,a=s);return t.scale(Math.max(0,t.datum.radius.value))*i+a}}:.8,Yd=({layout:e},t,n)=>{var r,o;if(!e.donut.showAsDonut)return 0;const i=null!==(r=null==n||null===(o=n.style)||void 0===o?void 0:o.innerRadius)&&void 0!==r?r:.55;return t.encodings.slice.outerRadius?{scale:"radius",fn:e=>{const t=.8-i,n=i;return e.scale(Math.min(0,e.datum.radius.value))*t+n}}:i},Kd=({layout:e},t)=>{var n,r,o,i,a,s;const l=t.colorService.getDatumProps(),u=l[Object.keys(l)[0]],c=u&&u.field?u.field:void 0,d="qDimensionInfo/0"===c,p=c?t.ds.field(c).raw():null,f=p&&(p.label||p.title||p.qFallbackTitle)||"",m=t.encodings.slice.outerRadius,{formatter:h}=t.chart,g=te(e,"qHyperCube.qDimensionInfo",[]).length;function y(e,n){const r=t.ds.field(e).raw();return{field:e,label:!r.isCustomFormatted&&(r.qIsAutoFormat||"U"===r.qNumFormat.qType)?e=>h(n)(e.qNum):e=>e.qText}}const v=(e.components||[]).filter((e=>"slices"===e.key))[0];return{type:"pie",key:"slices",data:{extract:{field:"qDimensionInfo/0",props:{...l,num:y(t.encodings.slice.arc,"arc"),fillTooltip:c?{field:c,label:f,value:e=>d?e.qText||"-":void 0!==e.qNum&&"NaN"!==e.qNum?e.qText?e.qText:e.qNum:e.qText||"-"}:void 0,customTooltipAttrExps:0!==g?Pd.getNode(e,{dimensionCount:g}):void 0,radius:m?y(m,"outerRadius"):void 0}}},brush:{consume:[{context:"selection",data:["","fill"],style:{inactive:{opacity:.3},active:{stroke:"rgba(52, 52, 52, 0.7)",strokeWidth:2}}},{context:"highlight",data:[""],style:{inactive:{fill:"#BFDAD9"},active:{fill:"#68B2AF"}}}]},settings:{startAngle:()=>t.viewState.get("rotation"),endAngle:()=>t.viewState.get("rotation")+2*Math.PI,slice:{arc:{ref:"num"},innerRadius:Yd({layout:e},t,v),fill:t.colorService.getColor(),strokeWidth:null!=v&&null!==(n=v.style)&&void 0!==n&&n.strokeWidth?Wd.STROKE.WIDTH[v.style.strokeWidth.toUpperCase()]:Wd.STROKE.WIDTH.NONE,stroke:null!==(r=null==v||null===(o=v.style)||void 0===o||null===(i=o.strokeColor)||void 0===i?void 0:i.color)&&void 0!==r?r:Wd.STROKE.COLOR,outerRadius:$d({layout:e},t,v),cornerRadius:null!==(a=null==v||null===(s=v.style)||void 0===s?void 0:s.cornerRadius)&&void 0!==a?a:0}},animations:{enabled:t.animations.enabled,transitionPhaseDisabled:t.animations.transitionPhaseDisabled,trackBy:e=>e.data.value}}};function Jd({layout:e},t){var n,r;const o=(e.components||[]).filter((e=>"slices"===e.key))[0],i=null!==(n=null==o||null===(r=o.style)||void 0===r?void 0:r.innerRadius)&&void 0!==n?n:.55,a=t.encodings.slice.outerRadius,s=t.themeService.getStyles();return!(!e.donut.showAsDonut||!a)&&{type:"pie",key:"zeroLine",data:{items:[1]},settings:{slice:{arc:1,fill:"transparent",innerRadius:0,strokeWidth:1,stroke:s.label.name.color,outerRadius:{scale:"radius",fn:e=>{const t=.8-i,n=i;return e.scale(0)*t+n}}}},animations:{enabled:t.animations.enabled,transitionPhaseDisabled:t.animations.transitionPhaseDisabled}}}function Gd(e){return{type:"pie-dividers",key:"pie-dividers",layout:{displayOrder:2},settings:{component:"slices",selector:"path"},brush:{consume:[{context:"selection",style:{inactive:{opacity:.2}}}]},animations:{enabled:e.animations.enabled,transitionPhaseDisabled:e.animations.transitionPhaseDisabled,trackBy:()=>Math.random()}}}function Zd({layout:e},t){if(e.donut.showAsDonut||!t.encodings.slice.outerRadius)return!1;return{type:"negative-indicators",key:"negative-indicators",layout:{displayOrder:2},settings:{component:"slices",selector:"path",offset:5,size:4,fill:t.themeService.getStyles().label.name.color},brush:{consume:[{context:"selection",style:{inactive:{opacity:.2}}}]},animations:{enabled:t.animations.enabled,transitionPhaseDisabled:t.animations.transitionPhaseDisabled,trackBy:e=>e.data.value}}}function Xd(e){const t=e.node.desc&&e.node.desc.share;return t?e.formatter("share")(t):""}function Qd(e){return e.node.data.num.label}function ep(e){return e.node.data.radius.label}function tp(e,t,n){if(e.dataPoint.auto)return n?Qd:Xd;if("share"===e.dataPoint.labelMode)return Xd;if("value"===e.dataPoint.labelMode){return t.encodings.slice.outerRadius&&"radius"===e.dataPoint.labelValueMode?ep:Qd}return null}function np({data:e}){return e?e.label:""}function rp(e){const t=parseInt(e,10);if(!isNaN(t))return t}function op(e){const t=((e&&e.components?e.components:void 0)||[]).filter((e=>"slices"===e.key))[0];return!t||t.style.innerRadius>.3}function ip({node:e,data:t}){return Y({_share:e.desc.share,_fillColor:e.attrs.fill},t)}function ap(e,t,n){const r=t.themeService.getStyles(),o=[{padding:10,direction:t.encodings.slice.outerRadius?"rotate":"horizontal",placements:[{position:"outside",fill:r.label.name.color,padding:t.encodings.slice.outerRadius?4:2}],fontSize:rp(r.label.name.fontSize),fontFamily:r.label.name.fontFamily,label:np,linkData:({node:e,data:t})=>Y({_share:e.desc.share,_fillColor:e.attrs.fill,_showTooltip:!0},t)}];if(tp(e,t,!1)){const r=function(e,t,n){return{label:tp(e,t,!1),simplifiedPlacements:[{position:e.donut.showAsDonut&&op(e)?"inside":"into",onBackground:e.donut.showAsDonut&&op(e),padding:4}],theme:n.theme,themeId:"object.pieChart"}}(e,t,n),i=ce(Y(t,r),n.theme);i.linkData=ip,o.push(i)}return{key:"pie-labels",type:"labels",layout:{displayOrder:2,minimumLayoutMode:"XSMALL"},settings:{sources:[{component:"slices",selector:"path",strategy:{type:"slice",settings:{labels:o}}}]},brush:{consume:[{context:"selection",data:["","fill"],style:{inactive:{opacity:.3}}}]},animations:{enabled:t.animations.enabled,transitionPhaseDisabled:t.animations.transitionPhaseDisabled,trackBy:e=>"text"===e.type?`${e.text} ${e.data.value}`:Math.random()}}}function sp({layout:e,context:t},n){return!1!==e.dataPoint.show&&(1===n.dataRowCount?function(e,t,n){const r=tp(e,t,!0),o=(e=>t=>e.getContrastingColorTo(t.node.attrs.fill))(n.theme),i=t.themeService.getStyles();return{key:"pie-labels",type:"labels",layout:{displayOrder:2,minimumLayoutMode:"XSMALL"},settings:{sources:[{component:"slices",selector:"path",strategy:{type:"rows",settings:{align:.5,justify:.5,padding:10,labels:[{fill:e.donut.showAsDonut?i.label.name.color:o,fontSize:rp(i.label.name.fontSize),fontFamily:i.label.name.fontFamily,label:np,linkData:({data:e})=>e},{fill:e.donut.showAsDonut?i.label.value.color:o,fontSize:rp(i.label.value.fontSize),fontFamily:i.label.value.fontFamily,label:r,linkData:({data:e})=>e}]}}}]}}}(e,n,t):ap(e,n,t))}const lp=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Pan",requireFailure:t,recognizeWith:n,options:{event:"legendRange",enable(t,n){if(this.started||!n)return!0;if(e.constraints.select||e.constraints.active)return!1;const r=(this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((e=>"legend-seq"===e.type))||function(e){const{target:t}=e.srcEvent;return!(!t||!(t.hasAttribute("data-other-value")&&t.hasAttribute("data-idx")||"INPUT"===t.nodeName))}(n))&&!e.isLocked([this.chart.component("slices")]);return r||this.chart.component("legendRangeBrush").emit("rangeClear"),r}},events:{legendRangestart(t){t.preventDefault(),e.interactions.emit("selections-start"),this.chart.component("legendRangeBrush").emit("rangeStart",t),this.started=!0},legendRangemove(e){e.preventDefault(),this.chart.component("legendRangeBrush").emit("rangeMove",e)},legendRangeend(t){t.preventDefault(),this.chart.component("legendRangeBrush").emit("rangeEnd",t),e.onSelect(),this.started=!1}}});function up(e,t){const n=t.element.getBoundingClientRect();let r,o;return e.center?(({x:r}=e.center),({y:o}=e.center)):(r=e.clientX,o=e.clientY),{x:r-n.left,y:o-n.top}}function cp(e,t){const n=t.component("slices");if(!n)return!1;const{x:r,y:o}=up(e,t),i=n.rect.x+n.rect.margin.left+n.rect.width/2,a=n.rect.y+n.rect.margin.top+n.rect.height/2,s=Math.min(n.rect.width,n.rect.height)/2*.8;return(i-r)**2+(a-o)**2<=s**2}const dp=(e,t,{requireFailure:n,recognizeWith:r}={})=>({type:"Tap",requireFailure:n,recognizeWith:r,options:{event:"tap",interval:10,pointers:1,enable(t,n){return!n||!e.constraints.select&&!e.constraints.active&&(this.components=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter((e=>"slices"===e.key||"legend-cat"===e.key||"pie-labels"===e.key)),this.components.length)}},events:{tap(n){n.preventDefault();const{target:r}=n.srcEvent;if(r&&("INPUT"===r.nodeName||r.hasAttribute("data-other-value")))return void this.chart.component("legendRangeBrush").emit("bubbleStart",n);if(r&&r.hasAttribute("data-action")&&r.hasAttribute("data-component-key"))return void this.chart.component(r.getAttribute("data-component-key")).emit(r.getAttribute("data-action"));if(r&&r.children&&r.children[0]&&"legend-cat"===r.children[0].getAttribute("data-component-key"))return;if(e.isLocked(this.components))return;e.interactions.emit("selections-start");let o=up(n,this.chart);this.components.some((e=>"legend-cat"===e.key))&&(o={cx:o.x,cy:o.y,r:5});const i=this.chart.shapesAt(o,{components:[{key:"slices",propagation:"stop"},{key:"legend-cat",propagation:"stop"},{key:"pie-labels",propagation:"stop"}],propagation:"stop"});i.length&&(this.chart.brushFromShapes(i,{components:[{key:i[0].key,action:n.srcEvent.ctrlKey||t?"set":"toggle",contexts:["selection"]}]}),e.onSelect())}}}),pp=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Pan",requireFailure:t,recognizeWith:n,options:{event:"lasso",enable(t,n){if(this.isStarted||!n)return!0;if(e.constraints.active||e.constraints.select||!e.interactions.lasso.active())return!1;const r=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y});return!e.isLocked(r)&&r.some((e=>"slices"===e.key))}},events:{lassostart(t){t.preventDefault(),e.constraints.select||e.constraints.active||this.isStarted||(e.interactions.emit("selections-start"),this.chart.component("lasso").emit("lassoStart",t),this.isStarted=!0)},lassomove(e){e.preventDefault(),this.chart.component("lasso").emit("lassoMove",e)},lassoend(t){t.preventDefault(),this.isStarted=!1,this.chart.component("lasso").emit("lassoEnd",t),e.onSelect()}}}),fp=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Tap",requireFailure:t,recognizeWith:n,options:{event:"areatap",pointers:2,enable(t,n){if(this.started||!n)return!0;if(e.constraints.active||e.constraints.select)return!1;const r=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y});return r.some((e=>"slices"===e.key))&&!e.isLocked(r)}},events:{areatap(t){const n=this.chart.component("area");n&&!this.started&&(e.interactions.emit("selections-start"),n.emit("areaStart",t.pointers[0]),n.emit("areaMove",t.pointers[1]),this.started=!0,setTimeout((()=>{n.emit("areaEnd"),e.onSelect(),this.started=!1}),100)),t.preventDefault()}}});function mp(e){return{type:"native",key:"theusual",events:{wheel(t){let n=!1;if(!e.constraints.active&&cp(t,this.chart)){const r=Math.sign(-t.deltaY);e.viewState.set("rotation",r*(Math.PI/12)),n=!0}else if(!e.constraints.select&&!e.constraints.active){const e=this.chart.componentsFromPoint(t).filter((e=>"legend-cat"===e.key))[0];e&&(n=!0,function(e,t){const n=(Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY)>=0?"next":"prev";t.emit(n)}(t,e))}n&&t.preventDefault()}}}}const hp=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Pan",requireFailure:t,recognizeWith:n,options:{event:"rotate",pointers:1,threshold:10,enable(t,n){return!(!this.started&&n)||!e.constraints.active&&!e.interactions.lasso.active()&&cp(n,this.chart)}},events:{rotatestart(e){e.preventDefault();const t=this.chart.component("slices").rect,n=this.chart.element.getBoundingClientRect();this.pieCenter={x:n.left+t.x+t.width/2,y:n.top+t.y+t.height/2},this.prevAngle=Math.atan2(e.center.y-this.pieCenter.y,e.center.x-this.pieCenter.x),this.started=!0},rotatemove(t){t.preventDefault();const n=Math.atan2(t.center.y-this.pieCenter.y,t.center.x-this.pieCenter.x);e.viewState.set("rotation",n-this.prevAngle),this.prevAngle=n},rotateend(e){e.preventDefault(),this.started=!1},rotatecancel(e){e.preventDefault(),this.started=!1}}}),gp=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Pan",requireFailure:t,recognizeWith:n,options:{event:"legendPan",pointers:1,threshold:10,enable(t,n){return!(!this.isStarted&&n)||!e.constraints.active&&this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((e=>"legend-cat"===e.type))}},events:{legendPanstart(e){if(e.preventDefault(),!this.isStarted){this.components=this.chart.componentsFromPoint({x:e.center.x,y:e.center.y}),this.components.forEach((t=>{t.emit("panstart",e)})),this.isStarted=!0;const t=this.chart.component("tooltip");t&&t.show&&t.emit("hide")}},legendPanmove(e){this.components.forEach((t=>{t.emit("panmove",e)})),e.preventDefault()},legendPanend(e){e.preventDefault(),this.components.forEach((t=>{t.emit("panend",e)})),this.isStarted=!1}}}),yp=(e,t,n)=>({key:"hammered",type:"hammer",enable:!0,gestures:t?[hp(e,{}),dp(e,t,{}),...n]:[lp(e,{}),fp(e,{}),hp(e,{}),pp(e,{}),gp(e,{}),dp(e,t,{}),...n]});function vp(e,t,n){const r=e.getIsSingleSelect(0),{constraints:o}=n;if(o.active&&o.passive)return[];const i=t.tooltipService.getInteractions();return[yp(t,r,i.gestures),mp(t),i.native]}function bp({settings:e},t){const n={share:{type:"d3-number",format:".1%"},arc:{data:{field:t.encodings.slice.arc}},fill:e.scales.fill&&e.scales.fill.data&&e.scales.fill.data.field?{data:{field:e.scales.fill.data.field}}:{}};return t.encodings.slice.outerRadius&&(n.outerRadius={data:{field:t.encodings.slice.outerRadius}}),n}function xp({layout:e},t,n){if(!e.dimensionTitle)return!1;const r=t.properties,o=t.themeService.getStyles();return{key:"dimension-title",type:"data-title",layout:{minimumLayoutMode:"SMALL",dock:"top"},settings:{hyperCube:e.qHyperCube,hyperCubeDef:r&&r.qHyperCubeDef,isDimension:!0,disabled:()=>n.constraints.active||!n.model,model:t.model,app:t.app,translator:t.translator,rtl:n.rtl,selections:t.selections},style:{fontFamily:o.axis.title.fontFamily,fontSize:o.axis.title.fontSize,color:o.axis.title.color}}}function qp({layout:e},t,n){const r=function(e,t){const n={field:"qDimensionInfo/0",props:{num:{field:t.encodings.slice.arc}}};t.encodings.slice.outerRadius&&(n.props.radius={field:t.encodings.slice.outerRadius});let r=t.ds.extract(n);if(0===r.length)return"NoDataExist";const o=te(e,"qHyperCube.qSize.qcy");if(te(e,"qHyperCube.qDataPages.0.qArea.qHeight")<o)return"LimitedData";if(r=t.encodings.slice.outerRadius?r.filter((e=>"NaN"!==e.num.value&&"NaN"!==e.radius.value)):r.filter((e=>"NaN"!==e.num.value)),0===r.length)return"OnlyNanData";const i=r;return r=t.encodings.slice.outerRadius&&!e.donut.showAsDonut?r.filter((e=>e.num.value>0&&e.radius.value>0)):r.filter((e=>e.num.value>0)),0===r.length?"OnlyNegativeOrZeroValues":i.length!==r.length&&"NegativeOrZeroValues"}(e,t),{fontFamily:o}=t.themeService.getStyles();return function(e,t,n,r={}){if(!e)return!1;const{translator:o}=t,{rtl:i}=n;return{key:"disclaimer",type:"disclaimer",layout:{dock:G[e].alignment},settings:{label:o.get("Object.Disclaimer."+e),rtl:i},style:r}}(r,t,n,{fontFamily:o})}function Dp({layout:e,context:t,selectionService:n},r={}){const o=function({layout:e}={},t={}){const n={};return Y(n,t.colorService.getScales()),t.encodings.slice.outerRadius&&Y(n,function({layout:e},t){const n={radius:{type:"linear",include:[0],data:{extract:{field:t.encodings.slice.outerRadius}}}};return e.donut.showAsDonut||(n.radius.min=0),n}({layout:e},t)),n}({layout:e},r),i={scales:o};let a=[];const s=qp({layout:e},r,t);if(s&&"center"===s.layout.dock)return{components:[s]};const l=t.constraints.select||t.constraints.active,u=r.colorService.getLegend({eventName:"legend",key:"legend",viewState:r.viewState,chart:r.chart,styleReference:"object.pieChart",rtl:t.rtl},{navigationDisabled:l});return o.fillRange&&u.components[0]&&("right"===u.components[0].layout.dock||"left"===u.components[0].layout.dock||t.rtl)&&(o.fillRange.invert=!0),a=[Kd({layout:e,settings:i},r),Jd({layout:e},r),Gd(r),Zd({layout:e},r),xp({layout:e},r,t),...u.components,Bd({settings:i,scaleKey:"fill",legend:u.components[0]||{},onEdited:r.onSelect}),{key:"lasso",type:"brush-lasso",layout:{displayOrder:99},settings:{brush:{components:[{key:"slices",contexts:["selection"]}]},lasso:{fill:"rgba(0, 0, 0, 0)",stroke:"black",strokeWidth:2,opacity:.7,strokeDasharray:[]},snapIndicator:{threshold:75,strokeDasharray:"5, 5",stroke:"black",strokeWidth:2,opacity:.7},startPoint:{r:10,stroke:"rgba(77, 192, 78, 1)",strokeWidth:0,opacity:1}}},{key:"area",type:"brush-area",settings:{brush:{components:[{key:"slices",contexts:["selection"],action:"add"}]}},style:{area:{fill:"transparent",strokeWidth:2,stroke:"black",strokeDasharray:"5 5",opacity:.7}}},sp({layout:{components:e.components,dataPoint:Y({},e.dataPoint,{show:!(e.effectPath&&e.snapshotData&&!1===e.dataPoint.show)}),donut:e.donut},context:t},r),...r.tooltipService.getComponents(),(!1!==e.showDisclaimer||!r.flags.isEnabled("SHOW_DISCLAIMER"))&&s],a=a.filter((e=>!1!==e)),{interactions:vp(n,r,t),scales:o,components:r.pluginService.extendComponents(a),palettes:r.colorService.getPalettes(),formatters:bp({settings:i},r),strategy:ee(0,r)}}let Cp,wp=new Set;function Sp(e,t){for(const n of t)if(e.has(n))return!1;return!0}function Mp({instance:e,services:t}){const n=y(),r=M();P((o=>{if(!(r.snapshotData&&r.snapshotData.content&&r.snapshotData.content.chartData)&&(function(e,t){const n=t.getBoundingClientRect();e.snapshotData=e.snapshotData||{},e.snapshotData.content=e.snapshotData.content||{},e.snapshotData.content.size=e.snapshotData.content.size||{w:n.width,h:n.height}}(o,n),e&&t))return function({layout:e,chart:t,viewState:n,colorService:r}){return e.snapshotData.content=e.snapshotData.content||{},e.snapshotData.content.chartData={legendScrollOffset:ne(t,"legend-cat"),rotation:n.get("rotation")},r.getSnapshotData().then((t=>{e.snapshotData.content.chartData={...e.snapshotData.content.chartData,...t}})).catch((()=>{}))}({layout:o,chart:e.chart,colorService:t.colorService,viewState:e.viewState})})),N((()=>({getViewState:()=>({rotation:e.viewState.get("rotation"),legendScrollOffset:ne(e.chart,"legend-cat")})})),[e])}var Ep={exports:{}};window;var Ip=j(Ep.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/conversion/",n(n.s=2)}([function(e,t,n){var r=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===o.call(e)},l=function(e){if(!e||"[object Object]"!==o.call(e))return!1;var t,n=r.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&r.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!i)return!1;for(t in e);return void 0===t||r.call(e,t)},u=function(e,t){i&&"__proto__"===t.name?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},c=function(e,t){if("__proto__"===t){if(!r.call(e,t))return;if(a)return a(e,t).value}return e[t]};e.exports=function e(){var t,n,r,o,i,a,d=arguments[0],p=1,f=arguments.length,m=!1;for("boolean"==typeof d&&(m=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=c(d,n),d!==(o=c(t,n))&&(m&&o&&(l(o)||(i=s(o)))?(i?(i=!1,a=r&&s(r)?r:[]):a=r&&l(r)?r:{},u(d,{name:n,newValue:e(m,a,o)})):void 0!==o&&u(d,{name:n,newValue:o}));return d}},function(e,t,n){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/qlik-modifiers/",n(n.s=1)}([function(e,t,n){var r=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===o.call(e)},l=function(e){if(!e||"[object Object]"!==o.call(e))return!1;var t,n=r.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&r.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!i)return!1;for(t in e);return void 0===t||r.call(e,t)},u=function(e,t){i&&"__proto__"===t.name?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},c=function(e,t){if("__proto__"===t){if(!r.call(e,t))return;if(a)return a(e,t).value}return e[t]};e.exports=function e(){var t,n,r,o,i,a,d=arguments[0],p=1,f=arguments.length,m=!1;for("boolean"==typeof d&&(m=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=c(d,n),d!==(o=c(t,n))&&(m&&o&&(l(o)||(i=s(o)))?(i?(i=!1,a=r&&s(r)?r:[]):a=r&&l(r)?r:{},u(d,{name:n,newValue:e(m,a,o)})):void 0!==o&&u(d,{name:n,newValue:o}));return d}},function(e,t,n){n.r(t);var r=n(0),o=n.n(r),i=function(e,t,n){if(!t)return!1;var r,o=t.split("."),i=o[o.length-1],a=e;for(r=0;r<o.length-1;++r)void 0===a[o[r]]&&(a[o[r]]=Number.isNaN(+o[r+1])?{}:[]),a=a[o[r]];if(void 0!==n){var s=a[i];return a[i]=n,{updated:n,previous:s}}return delete a[i],!1},a=function(e,t,n){var r,o=t.split("."),i=e;if(void 0===i)return n;for(r=0;r<o.length;++r){if(void 0===i[o[r]])return n;i=i[o[r]]}return i},s="".concat(" ","(").concat(" "),l="".concat(" ",")").concat(" ");function u(e){return s+e+l}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var n=function(e,t){if(!t)return null;var n,r;for(n=0;n<t.length;n++)if((r=t[n]).qInfo.qId===e)return r;return null}(e.qLibraryId,t.dimensionList);return n&&n.qData.info[0].qTags.indexOf("$numeric")>-1}var r=function(e,t){if(!t)return null;var n,r,o=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var n=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(n)&&(t=(t=t.substring(1,n)).trim()),t}(e);for(n=0;n<t.length;n++){if((r=t[n]).qName===o)return r;if(r.qDerivedFieldData)for(var i=0;i<r.qDerivedFieldData.qDerivedFieldLists.length;++i)for(var a=r.qDerivedFieldData.qDerivedFieldLists[i],s=0;s<a.qFieldDefs.length;++s){var l=a.qFieldDefs[s];if(l.qName===o)return l}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return r&&r.qTags.indexOf("$numeric")>-1}function d(e){return!(!e.fullAccumulation&&!e.fullRange)}function p(e,t){var n=e.crossAllDimensions;return 2===t&&n?"RowNo(Total)":"RowNo()"}function f(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e).trim();return"="===t.substring(0,1)?t.substring(1).trim():t}function m(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function h(e,t){var n=e.crossAllDimensions;return 2===t&&n?"Above(Total ":"Above("}function g(e){return void 0===e?")":", 0, ".concat(e,")")}function y(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=MinString(").concat(t,"))' and Only({1}").concat(t,")<='$(=MaxString(").concat(t,"))'\"}")}function v(e){var t=e.modifier,n=void 0===t?{}:t,r=e.dimensions,o=e.dimensionAndFieldList,i=e.funcComp,a=void 0===i?"Sum":i,s=e.valueComp,l=void 0===s?"0":s;if(!n.showExcludedValues)return"";if(r&&1===r.length){var u=y(c(r[0],o),m(0));return"".concat(a,"({1<").concat(u,">}").concat(l,")")}if(r&&2===r.length){var d=c(r[0],o),p=c(r[1],o),f=m(0),h=m(1),g=y(d,f),v=y(p,h);return"".concat(a,"({1<").concat(g,",").concat(v,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function b(e){return"".concat(e,"(")}function x(e){var t=e.properties,n=e.layout;return a(t,"qHyperCubeDef.qDimensions",a(n,"qHyperCube.qDimensionInfo",[])).length}var q={isFullRange:d,getNumDimensions:x,getExpressionWithExcludedComp:function(e){var t=e.expression,n=e.modifier,r=e.dimensions,o=e.dimensionAndFieldList,i=e.treatMissingAsNull,a=u(f(t));if(!n.showExcludedValues)return a;var s=v({modifier:n,dimensions:r,dimensionAndFieldList:o}),l=i?"":", 0";if(r&&1===r.length){var c=m(0);return"If(Count(".concat(c,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(r&&2===r.length){var d=m(0),p=m(1);return"If(Count(".concat(d,") * Count(").concat(p,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:p,getNumStepComp:function(e,t){if(!d(e)){var n=e.steps;return"number"!=typeof n||Number.isNaN(n)?6:n}return p(e,t)},getAboveCompPrefix:h,getAboveCompSuffix:g,getAboveComp:function(e,t,n,r){return h(e,t)+n+g(r)},getFunctionPrefix:b,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return b(e)+t+")"},getAggrComp:function(e,t,n){return"Aggr(".concat(e,", ").concat(t,", ").concat(n,")")},getExcludedComp:v,needDimension:function(e){var t=e.modifier,n=e.properties,r=e.layout;return 0===function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t)&&2===x({properties:n,layout:r})},getDimComp:function(e,t){var n=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),r=m(t);if(!n.qSortByExpression&&!n.qSortByNumeric&&!n.qSortByAscii)return r;var o=["Descending","Ascending"],i=n.qSortByNumeric?"(Numeric, ".concat(o[(n.qSortByNumeric+1)/2],")"):"",a=n.qSortByAscii?"(Text, ".concat(o[(n.qSortByAscii+1)/2],")"):"";return n.qSortByNumeric&&n.qSortByAscii?"(".concat(r,", ").concat(i,", ").concat(a,")"):n.qSortByNumeric?"(".concat(r,", ").concat(i,")"):n.qSortByAscii?"(".concat(r,", ").concat(a,")"):r},simplifyExpression:f,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var n=t.indexOf(s);if(-1!==n){var r=t.indexOf(l);if(-1!==r)return t.substring(n+s.length,r)}}},initModifier:function(e,t){Object.keys(t).forEach((function(n){void 0===e[n]&&(e[n]=t[n])}))},isNumeric:c,isApplicable:function(e){var t=e.properties,n=e.layout,r=e.minDimensions,o=void 0===r?1:r,i=e.maxDimensions,a=void 0===i?2:i;if(!t&&!n)return!0;var s=x({properties:t,layout:n});return s>=o&&s<=a},getExpressionWithMarkers:u,canExtract:function(e){var t=e.indexOf(s),n=e.indexOf(l);return t>-1&&n>-1&&t<n},getDimDefWithWrapper:m,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")}};function D(e){return(D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var C=o.a.bind(null,!0),w={},S=Array.isArray;function M(e){return null!=e&&!Array.isArray(e)&&"object"===D(e)}function E(e){return void 0===e}function I(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function A(e,t){var n,r=t.substring(1).split("/").slice(0,-1);return r.forEach((function(t,o){if(o!==r.length){n=+t;var i=Number.isNaN(n)?{}:[];e[n||t]=E(e[n||t])?i:e[t],e=e[n||t]}})),e}function k(e,t){var n=!0;if(M(e)&&M(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((function(r){k(e[r],t[r])||(n=!1)})),n);if(S(e)&&S(t)){if(e.length!==t.length)return!1;for(var r=0,o=e.length;r<o;r+=1)if(!k(e[r],t[r]))return!1;return!0}return e===t}w.generate=function(e,t,n){n=n||"";var r=[];return Object.keys(t).forEach((function(o){var i=function(e){return e?C({},{val:e}).val:e}(t[o]),a=e[o],s="".concat(n,"/").concat(o);k(i,a)||I(t,o)||(E(a)?r.push({op:"add",path:s,value:i}):M(i)&&M(a)?r=r.concat(w.generate(a,i,s)):S(i)&&S(a)?r=r.concat(function(e,t,n){var r=[],o=e.slice(),i=-1;function a(e,t,n){if(e[n]&&E(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(var r=0,o=e.length;r<o;r+=1)if(e[r]&&e[r].qInfo.qId===t)return r;return-1}if(k(t,o))return r;if(!E(t[0])&&E(t[0].qInfo))return r.push({op:"replace",path:n,value:t}),r;for(var s=o.length-1;s>=0;s-=1)-1===(i=a(t,o[s].qInfo&&o[s].qInfo.qId,s))?(r.push({op:"remove",path:"".concat(n,"/").concat(s)}),o.splice(s,1)):r=r.concat(w.generate(o[s],t[i],"".concat(n,"/").concat(s)));for(var l=0,u=t.length;l<u;l+=1)-1===(i=a(o,t[l].qInfo&&t[l].qInfo.qId))?(r.push({op:"add",path:"".concat(n,"/").concat(l),value:t[l]}),o.splice(l,0,t[l])):i!==l&&(r.push({op:"move",path:"".concat(n,"/").concat(l),from:"".concat(n,"/").concat(i)}),o.splice(l,0,o.splice(i,1)[0]));return r}(a,i,s)):r.push({op:"replace",path:"".concat(n,"/").concat(o),value:i}))})),Object.keys(e).forEach((function(o){E(t[o])&&!I(e,o)&&r.push({op:"remove",path:"".concat(n,"/").concat(o)})})),r},w.apply=function(e,t){t.forEach((function(t){var n,r=A(e,t.path),o=t.path.split("/").splice(-1)[0],i=o&&Number.isNaN(+o)?r[o]:r[+o]||r,a=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(r=null,i=e),"add"===t.op||"replace"===t.op)if(S(r))"-"===o&&(o=r.length),r.splice(+o,"add"===t.op?0:1,t.value);else if(S(i)&&S(t.value)){var s,l=t.value.slice();i.length=0,(s=i).push.apply(s,function(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}(l))}else if(M(i)&&M(t.value))n=i,Object.keys(n).forEach((function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!I(n,e)&&delete n[e]})),C(i,t.value);else{if(!r)throw new Error("Patchee is not an object we can patch");r[o]=t.value}else if("move"===t.op){var u=A(e,t.from);S(r)?r.splice(+o,0,u.splice(+a,1)[0]):(r[o]=u[a],delete u[a])}else"remove"===t.op&&(S(r)?r.splice(+o,1):delete r[o])}))},w.clone=function(e){return C({},e)},w.createPatch=function(e,t,n){var r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},w.updateObject=function(e,t){Object.keys(e).length?w.apply(e,w.generate(e,t)):C(e,t)};var T=w,L=function(e,t,n){if(!e)return Promise.resolve();var r=T.generate(t,n);return o()(!0,t,n),r&&r.length?(r=r.map((function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}})),e.applyPatches(r,!0)):Promise.resolve()},O="accumulation";function P(e,t){var n=a(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===O)return n[r]}function N(e,t){var n=function(e,t){var n=a(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===O)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var R={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""},F={translationKey:"properties.modifier.accumulation",needDimension:q.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return q.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,o=e.layout,i=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=i;void 0===l&&(l=q.getNumDimensions({properties:r,layout:o}));var u=a(r,"qHyperCubeDef.qDimensions",[]),c=q.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:u,dimensionAndFieldList:s}),d=q.getNumStepComp(n,l),p=q.getAboveComp(n,l,c,d),f=q.getRangeComp("RangeSum",p);if(q.needDimension({modifier:n,properties:r,layout:o})){var m=q.getDimComp(u,1),h=q.getDimComp(u,0),g=q.getAggrComp(f,m,h);f=n.showExcludedValues?q.getExcludedComp({modifier:n,dimensions:u,dimensionAndFieldList:s,valueComp:g}):g}return f},extractInputExpression:q.extractInputExpression,initModifier:function(e){q.initModifier(e,R)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!q.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(N(t,e),".accumulationDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.accumulation.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(N(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.accumulation.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(N(t,e),".fullAccumulation")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(N(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=P(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=P(t,e);return n&&!n.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(N(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return q.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(O))return!1;var i=P(t,e);return i&&!i.disabled}}}},j="movingAverage";function H(e,t){var n=a(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===j)return n[r]}function _(e,t){var n=function(e,t){var n=a(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===j)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var z={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1},V={translationKey:"properties.modifier.movingAverage",needDimension:q.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return q.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,n=e.expression,r=e.modifier,o=e.properties,i=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!r)return n;var u=s;void 0===u&&(u=q.getNumDimensions({properties:o,layout:i}));var c=a(o,"qHyperCubeDef.qDimensions",[]),d=r.showExcludedValues&&r.nullSuppression,p=q.getExpressionWithExcludedComp({expression:n,modifier:r,dimensions:c,dimensionAndFieldList:l,treatMissingAsNull:d}),f=q.getNumStepComp(r,u),m=q.getAboveComp(r,u,p,f);if(r.nullSuppression)t=q.getRangeComp("RangeAvg",m);else{var h=q.getRangeComp("RangeSum",m),g=function(e,t){var n=q.getRowNoComp(e,t);if(!q.isFullRange(e)){var r=e.steps,o="number"!=typeof r||Number.isNaN(r)?6:r;return"RangeMin(".concat(o,", ").concat(n,")")}return n}(r,u);t="".concat(h," / ").concat(g)}var y=t;if(q.needDimension({modifier:r,properties:o,layout:i})){var v=q.getDimComp(c,1),b=q.getDimComp(c,0),x=q.getAggrComp(y,v,b);y=r.showExcludedValues?q.getExcludedComp({modifier:r,dimensions:c,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return y},extractInputExpression:q.extractInputExpression,initModifier:function(e){q.initModifier(e,z)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:function(e,t){return!q.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(_(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.movingAverage.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(_(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.movingAverage.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(_(t,e),".fullRange")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(_(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=H(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=H(t,e);return n&&!n.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(_(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(_(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return q.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(j))return!1;var i=H(t,e);return i&&!i.disabled}}}},U="difference";function B(e,t){var n=a(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===U)return n[r]}function W(e,t){var n=function(e,t){var n=a(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===U)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var $={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""},Y={translationKey:"properties.modifier.difference",needDimension:q.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return q.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:q.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,o=e.layout,i=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=i;void 0===l&&(l=q.getNumDimensions({properties:r,layout:o}));var u=a(r,"qHyperCubeDef.qDimensions",[]),c=q.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:u,dimensionAndFieldList:s}),d=q.getAboveComp(n,l,c),p="".concat(c," - ").concat(d);if(q.needDimension({modifier:n,properties:r,layout:o})){var f=q.getDimComp(u,1),m=q.getDimComp(u,0),h=q.getAggrComp(p,f,m);p=n.showExcludedValues?q.getExcludedComp({modifier:n,dimensions:u,dimensionAndFieldList:s,funcComp:"Only",valueComp:h}):h}return p},initModifier:function(e){Object.keys($).forEach((function(t){void 0===e[t]&&(e[t]=$[t])}))},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!q.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(W(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.difference.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(W(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.difference.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},showExcludedValues:{refFn:function(t){return"".concat(W(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return q.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(U))return!1;var i=B(t,e);return i&&!i.disabled}}}},K={CURRENT_SELECTION:0,SELECT_FIELD_VALUE:1,DISREGARD_SELECTION:2},J={ONE_DIMENSION:0,ALL_DIMENSIOANS:1,DISREGARD_ALL_DIMENSIONS:2},G="normalization";function Z(e,t){var n=a(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===G)return n[r]}function X(e,t){var n=function(e,t){var n=a(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===G)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}function Q(e,t){for(var n=0;n<e.length;n++)if(e[n].value===t)return n;return-1}function ee(e,t,n,r){var o=t.layout.qHyperCube.qDimensionInfo.length,i=[{value:J.ONE_DIMENSION,translation:n.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:n.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:J.ALL_DIMENSIOANS,translation:n.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===o?"respectAllDimensions":"respectDimension"),tooltipTranslation:n.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===o?"respectAllDimensions":"respectDimension",".tooltip")},{value:J.DISREGARD_ALL_DIMENSIONS,translation:n.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===o?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:n.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===o?"disregardAllDimensions":"disregardDimension",".tooltip")}];return i=function(e,t,n){if(e<2){var r=Q(t,0);t.splice(r,1)}return t}(o,i),function(e,t,n){if(0===e){var r=Q(t,1);t.splice(r,1)}return t}(Z(e,r).selectionScope,i)}function te(e,t,n){var r=[{value:K.CURRENT_SELECTION,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:K.SELECT_FIELD_VALUE,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:K.DISREGARD_SELECTION,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return function(e,t,n){if(1===e){var r=Q(t,0);t.splice(r,1)}return t}(Z(e,n).dimensionalScope,r)}var ne={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:J.DISREGARD_ALL_DIMENSIONS,selectionScope:K.DISREGARD_SELECTION};function re(e){return 2===e?"{1}":""}function oe(e,t,n){return 1===e?"{$<".concat(q.getFieldWithWrapper(t),"={'").concat(n,"'}>}"):""}function ie(e,t){return 0===e&&t>1||2===e?"Total":""}function ae(e,t,n){return 0===e&&t>1?"<".concat(q.getDimDefWithWrapper(n),">"):""}var se={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,n=e.layout;return q.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:q.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,o=e.layout,i=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=i;void 0===l&&(l=q.getNumDimensions({properties:r,layout:o}));var u=a(r,"qHyperCubeDef.qDimensions",[]),c=q.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:u,dimensionAndFieldList:s}),d=n.selectionScope,p=n.dimensionalScope;return function(e,t,n,r,o,i,a){var s=re(t),l=oe(t,n,r),u=""===s&&""===l?"":s||l,c=ie(o,i),d=ae(o,i,a),p=function(e){for(var t=[],n=0;n<e;n++)t[n]=q.getDimDefWithWrapper(n);return t.join(", ")}(i);return"".concat(e,"/ Sum(").concat(u," ").concat(c).concat(d," Aggr(").concat(u," ").concat(e,", ").concat(p,"))")}(c,d,n.field,n.value,p,l,n.primaryDimension)},initModifier:function(e){Object.keys(ne).forEach((function(t){void 0===e[t]&&(e[t]=ne[t])}))},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!q.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(X(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:K.DISREGARD_SELECTION,options:function(n){return te(n,t,e)}},field:{refFn:function(t){return"".concat(X(t,e),".field")},type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:function(e,t,n){return n.app.getFieldList().then((function(e){return e.map((function(e){return{label:e.qName,value:e.qName}}))}))},show:function(t){return Z(t,e).selectionScope===K.SELECT_FIELD_VALUE}},value:{refFn:function(t){return"".concat(X(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return Z(t,e).selectionScope===K.SELECT_FIELD_VALUE}},dimensionalScope:{refFn:function(t){return"".concat(X(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:J.DISREGARD_ALL_DIMENSIONS,supportTooltip:!0,options:function(n,r){return ee(n,r,t,e)}},primaryDimension:{refFn:function(t){return"".concat(X(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.normalization.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map((function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}}))},show:function(t,n){return(Z(t,e).dimensionalScope||0)===J.ONE_DIMENSION&&n.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return q.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(G))return!1;var i=Z(t,e);return i&&!i.disabled}}},getDisregardSelectionComp:re,getFieldSelectionComp:oe,getTotalComp:ie,getSelectedDimComp:ae},le={getExpression:function(e){return a(e,"qDef.base.qDef")||a(e,"qDef.qDef")},getExpressionRef:function(e){return a(e,"qDef.base.qDef")?"qDef.base.qDef":"qDef.qDef"},getLibraryIdRef:function(e){return a(e,"qDef.base.qLibraryId")?"qDef.base.qLibraryId":"qLibraryId"},getLibraryId:function(e){return a(e,"qDef.base.qLibraryId")||a(e,"qLibraryId")},getLabelRef:function(e){return a(e,"qDef.base")?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return a(e,"qDef.base")?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}},ue={initBase:function(e,t){(t||ue.isValid(e))&&(i(e,"qDef.base.qDef",a(e,"qDef.qDef")),i(e,"qDef.base.qLibraryId",a(e,"qLibraryId")),i(e,"qDef.base.qLabel",a(e,"qDef.qLabel")),i(e,"qDef.base.qLabelExpression",a(e,"qDef.qLabelExpression")))},restoreBase:function(e){ue.isValid(e)&&(i(e,"qDef.qDef",a(e,"qDef.base.qDef")),i(e,"qLibraryId",a(e,"qDef.base.qLibraryId")),i(e,"qDef.qLabel",a(e,"qDef.base.qLabel")),i(e,"qDef.qLabelExpression",a(e,"qDef.base.qLabelExpression")),a(e,"qDef.qAggrFunc")&&a(e,"qDef.base.qAggrFunc")&&i(e,"qDef.qAggrFunc",a(e,"qDef.base.qAggrFunc")),delete e.qDef.base)},isValid:function(e){var t=a(e,"qDef.base.qDef"),n=a(e,"qDef.base.qLibraryId");return void 0!==t||void 0!==n}},ce=ue;function de(e){return(de="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var pe={accumulation:F,movingAverage:V,difference:Y,normalization:se},fe=(t.default={modifiers:pe,apply:me,applyModifiers:he,cleanUpMeasure:ge,destroy:function(e){e&&fe[e.id]&&fe[e.id].masterItemSubscriber&&(fe[e.id].masterItemSubscriber&&fe[e.id].masterItemSubscriber.unsubscribe(),delete fe[e.id])},hasActiveModifiers:ye,getActiveModifier:ve,initBase:ce.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some((function(e){return pe[e]}))},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some((function(e){return pe[e]&&pe[e].isApplicable({properties:n,layout:r})}))},measureBase:le,limitedSorting:function(e){var t=e.measures,n=e.properties,r=e.layout,o=!1,i=!1;return t.forEach((function(e){var t=qe(e);Ie({modifiers:t,properties:n,layout:r})&&(o=!0,i=i||Oe({modifiers:t,properties:n,layout:r}))})),o&&!i},ifEnableTotalsFunction:be},{});function me(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.model,n=e.properties,r=e.isSnapshot,i=void 0!==r&&r,s=e.masterItem;fe[t.id]=fe[t.id]||{isFirstTime:!0};var l=fe[t.id].isFirstTime;if(fe[t.id].isFirstTime=!1,n&&"object"===de(n))return he({model:t,properties:n});var u=t?t.layout:void 0,c=a(u,"qSelectionInfo.qInSelections");if(i||c)return Promise.resolve(!1);var d=a(u,"qHyperCube.qMeasureInfo"),p=fe[t.id].lastReloadTime;if(fe[t.id].lastReloadTime=a(t,"app.layout.qLastReloadTime"),ye({measures:d,layout:u})){var f=function(e){var t=e.measures,n=e.layout,r=e.lastReloadTime;return a(e.model,"app.layout.qLastReloadTime")!==r&&function(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ee({measure:e,properties:n,layout:r})}))}({measures:t,layout:n})}({measures:d,layout:u,model:t,lastReloadTime:p});return f||function(e){var t=e.measures,n=e.layout,r=e.masterItem,o=e.isFirstTime;return!!Array.isArray(t)&&(o||r||t.some((function(e){return function(e){var t=e.measure,n=e.layout;return Ie({modifiers:qe(t),layout:n})?!t.base:!!t.base}({measure:e,layout:n})})))}({measures:d,layout:u,masterItem:s,isFirstTime:l})?t.getEffectiveProperties().then((function(e){var n=o()(!0,{},e);Ce(n);var r=Pe(n);return Ae({model:t}).then((function(o){return ke({libraryIds:r,model:t}).then((function(r){return f&&function(e){var t=e.properties;xe(t).forEach((function(e){return function(e){var t=e.measure;if(Ee({measure:t,properties:e.properties})){var n=0,r=t.qDef.modifiers;Array.isArray(r)&&r.forEach((function(e){if("object"===de(e)&&!e.disabled){if(n++,"object"!==de(pe[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(n>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var r=pe[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==r&&Se(t)&&q.simplifyExpression(t.qDef.base.qDef)!==q.simplifyExpression(r)&&(t.qDef.base.qDef=r)}}))}}({measure:e,properties:t})}))}({properties:n}),he({model:t,oldProperties:e,properties:n,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:r,dimensionAndFieldList:o})}))}))})):Promise.resolve(!1)}return function(e){return!!Array.isArray(e)&&e.some((function(e){return"object"===de(e.base)}))}(d)?t.getEffectiveProperties().then((function(e){return function(e){var t=e.model,n=e.properties,r=Pe(n);return Ne({model:t,libraryIds:r}).then((function(){var e=o()(!0,{},n);return xe(n).forEach((function(e){return ge(e)})),Le({oldProperties:e,newProperties:n,model:t})}))}({model:t,properties:e})})):Promise.resolve(!1)}function he(e){var t=e.model,n=e.oldProperties,r=e.properties,i=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,u=e.masterItem,c=e.libraryItemsProps,d=e.dimensionAndFieldList;void 0===n&&(n=l?o()(!0,{},r):r),Ce(r);var p=Pe(r);return Ne({model:t,libraryIds:p,masterItem:u}).then((function(){return function(e){var t=e.measures,n=e.properties,r=e.model,i=e.libraryItemsProps,s=e.dimensionAndFieldList;if(t||(t=xe(n)),!t.length)return Promise.resolve();if(!ye({measures:t,properties:n}))return t.forEach((function(e){return ge(e)})),Promise.resolve();var l=i?void 0:Pe(n);return Ae({model:r,dimensionAndFieldList:s}).then((function(e){return ke({libraryIds:l,model:r,libraryItemsProps:i}).then((function(r){t.forEach((function(t){Ie({modifiers:t.qDef.modifiers,properties:n})?(function(e){var t=e.measure,n=e.properties,r=e.libraryItemsProps,i=e.dimensionAndFieldList,s=0;ce.isValid(t)||ce.initBase(t,!0);var l=t.qDef,u=l.modifiers,c=l.base;Array.isArray(u)&&u.forEach((function(e){if("object"===de(e)&&!e.disabled){if(s++,"object"!==de(pe[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(s>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");pe[e.type].initModifier(e);var l=t.qLibraryId||c&&c.qLibraryId;l?function(e){var t=e.measure,n=e.modifier,r=e.properties,i=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=pe[n.type].generateExpression({expression:s,modifier:n,properties:r,dimensionAndFieldList:i});n.outputExpression=l,t.qDef.qDef=n.outputExpression,(t.qDef.qLabel||a.qMeasure.qLabel)&&(t.qDef.qLabel=a.qMeasure.qLabel),(t.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(t.qDef.qLabelExpression=a.qMeasure.qLabelExpression),t.qDef.quarantine&&t.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(t.qDef.qNumFormat=a.qMeasure.qNumFormat,t.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete t.qLibraryId,t.qDef.coloring=a.qMeasure.coloring,n.base=o()(!0,{},t.qDef.base)}({measure:t,modifier:e,libraryId:l,properties:n,libraryItemsProps:r,dimensionAndFieldList:i}):function(e){var t=e.measure,n=e.modifier,r=e.properties,i=e.dimensionAndFieldList;"function"==typeof pe[n.type].updateModifier&&pe[n.type].updateModifier(n,r.qHyperCubeDef);var a=le.getExpression(t),s=pe[n.type].generateExpression({expression:a,modifier:n,properties:r,dimensionAndFieldList:i});n.outputExpression=s,t.qDef.qDef=n.outputExpression,t.qDef.base.qLabelExpression?t.qDef.qLabelExpression=t.qDef.base.qLabelExpression:t.qDef.qLabel=t.qDef.base.qLabel||a,n.base=o()(!0,{},t.qDef.base)}({measure:t,modifier:e,properties:n,dimensionAndFieldList:i}),function(e){var t=a(e,"qDef.qAggrFunc");"Expr"!==t||be(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&be(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(t)}}))}({measure:t,properties:n,libraryItemsProps:r,dimensionAndFieldList:e}),we(t)):ge(t)}))}))}))}({measures:i,properties:r,model:t,libraryItemsProps:c,dimensionAndFieldList:d}).then((function(){return l?Le({oldProperties:n,newProperties:r,model:t}):Promise.resolve(!1)}))}))}function ge(e){!function(e){var t=qe(e);return Array.isArray(t)&&t.some((function(e){return"object"===de(e)&&!e.disabled&&!pe[e.type]}))}(e)?ce.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,we(e)}function ye(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some((function(e){return Ie({modifiers:qe(e),properties:n,layout:r})}))}function ve(e){var t=qe(e);if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];if(pe[r.type]&&!r.disabled)return r}}function be(e){var t=ve(e);return!t||pe[t.type].enableTotalsFunction(e)}function xe(e){return a(e,"qHyperCubeDef.qMeasures",[]).concat(a(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function qe(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function De(e){return a(e,"outputExpression.qValueExpression.qExpr")||a(e,"outputExpression")}function Ce(e){xe(e).forEach((function(e){return function(e){var t=ve(e);t&&(void 0!==t.outputExpression&&De(t)!==e.qDef.qDef?delete e.qDef.base:!ce.isValid(e)&&t.base&&(e.qDef.base=o()(!0,{},t.base)))}(e)}))}function we(e){var t=qe(e);Array.isArray(t)&&t.forEach((function(t){"object"===de(t)&&(t.disabled||!pe[t.type]&&De(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)}))}function Se(e){return e.base||e.qDef&&e.qDef.base}function Me(e){var t=Se(e);return e.qLibraryId||t&&t.qLibraryId}function Ee(e){var t=e.measure,n=e.properties,r=e.layout;return!Me(t)&&Ie({modifiers:qe(t),properties:n,layout:r})}function Ie(e){var t=e.modifiers,n=e.properties,r=e.layout,o={};return Array.isArray(t)&&t.some((function(e){return!("object"!==de(e)||e.disabled||!pe[e.type])&&(void 0===o[e.type]&&(o[e.type]=pe[e.type].isApplicable({properties:n,layout:r})),o[e.type])}))}function Ae(e){var t=e.model,n=e.dimensionAndFieldList;if(n)return Promise.resolve(n);var r=[],o={},i=t.app.getDimensionList().then((function(e){o.dimensionList=e}));r.push(i);var a=t.app.getFieldList().then((function(e){o.fieldList=e}));return r.push(a),Promise.all(r).then((function(){return o}))}function ke(e){var t=e.libraryIds,n=e.model,r=e.libraryItemsProps;if(r)return Promise.resolve(r);var o=t.measureLibraryIds,i=t.dimensionLibraryIds,a={},s=[];return o.forEach((function(e){var t=n.app.getMeasure(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),i.forEach((function(e){var t=n.app.getDimension(e).then((function(t){return t.getProperties().then((function(t){a[e]=t}))}));s.push(t)})),Promise.all(s).then((function(){return a}))}function Te(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Le(e){var t=e.oldProperties,n=e.newProperties,r=e.model,o=JSON.stringify(a(t,"qHyperCubeDef.qMeasures"),Te)!==JSON.stringify(a(n,"qHyperCubeDef.qMeasures"),Te)||JSON.stringify(a(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Te)!==JSON.stringify(a(n,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Te);return o?function(e){var t=e.model,n=e.oldProperties,r=e.newProperties,o=t.layout;return o&&!o.qHasSoftPatches&&!o.qExtendsId&&a(o,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(r):L(t,n,r)}({model:r,oldProperties:t,newProperties:n}).then((function(){return o})):Promise.resolve(o)}function Oe(e){var t=e.modifiers,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some((function(e){return"object"===de(e)&&!e.disabled&&pe[e.type]&&pe[e.type].needDimension({modifier:e,properties:n,layout:r})}))}function Pe(e){var t=xe(e),n=[],r=[],o=!1;return t.forEach((function(t){var r=qe(t);if(Ie({modifiers:r,properties:e})){var i=Me(t);i&&n.push(i),o=o||Oe({modifiers:r,properties:e})}})),a(e,"qHyperCubeDef.qDimensions",[]).forEach((function(e){var t=e.qLibraryId;t&&r.push(t)})),{measureLibraryIds:n,dimensionLibraryIds:r}}function Ne(e){var t=e.model,n=e.libraryIds;return!e.masterItem&&n&&(n.measureLibraryIds.length||n.dimensionLibraryIds.length)?(fe[t.id].masterItemSubscriber=fe[t.id].masterItemSubscriber||function(e){var t=e.model,n=e.callback,r={},o={},i={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},n=a(e,"qInfo.qType");return n&&s[n]&&s[n].forEach((function(n){t[n]=a(e,n)})),JSON.stringify(t)}function u(e){var t=e.qInfo.qId;if(r[t]){var o=l(e);r[t].properties!==o&&(r[t].properties=o,"function"==typeof n&&r[t].enabled&&n(e)),r[t].enabled=!0}}function c(e,n){return t.app[n](e).then((function(t){r[e]={listener:t.layoutSubscribe(u),enabled:!1,properties:l(t.layout)}}))}return{subscribe:function(e){var n=e.measureLibraryIds,a=e.dimensionLibraryIds,s=[];return function(e){var t=e.dimensionLibraryIds;o={},e.measureLibraryIds.forEach((function(e){o[e]=!0})),i={},t.forEach((function(e){i[e]=!0}))}({measureLibraryIds:n,dimensionLibraryIds:a}),Object.keys(r).forEach((function(e){o[e]||i[e]||(r[e].listener.dispose(),delete r[e])})),t.app&&(Object.keys(o).forEach((function(e){o[e]&&!r[e]&&s.push(c(e,"getMeasure"))})),Object.keys(i).forEach((function(e){i[e]&&!r[e]&&s.push(c(e,"getDimension"))}))),Promise.all(s)},unsubscribe:function(){Object.keys(r).forEach((function(e){r[e].listener.dispose()})),r={}}}}({model:t,callback:function(e){return me({model:t,masterItem:e}).then((function(){return t.app.clearUndoBuffer()}))}}),fe[t.id].masterItemSubscriber.subscribe(n)):Promise.resolve()}}])},function(e,t,n){function r(e){var t=function e(t){var n,r=t;return r>9?(n=65+r-10)>90&&(n+=6):r="".concat(r).charCodeAt(0),[48,111,79,105,73,108].indexOf(n)>-1?e(r+1):String.fromCharCode(n)}(e%62),n=Math.floor(e/62);return n>0?r(n)+t:t}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.r(t);var i={getValue:function(e,t,n){if(null==e||null==t)return n;for(var r=t.split("."),o=e,i=0;i<r.length;++i){var a=r[i];if(""!==a){if(void 0===o[a]||null===o[a])return n;o=o[a]}}return o},setValue:function(e,t,n){if(null!=e&&null!=t){for(var r=t.split("."),o=r[r.length-1],i=e,a=0;a<r.length-1;++a){var s=r[a];void 0!==i[s]&&null!==i[s]||(i[s]=Number.isNaN(+r[a+1])?{}:[]),i=i[s]}void 0!==n?i[o]=n:delete i[o]}},isEmpty:function(e){return 0===Object.keys(e).length&&e.constructor===Object},isAtomicValue:function(e){return/boolean|number|string/.test(o(e))},generateId:function(){return r(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function a(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.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)?s(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var n=Object.prototype.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)?u(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return r;return-1}return-1}var d={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;var n=e.indexOf(t[0]);if(-1!==n){for(var r=0;r<t.length;r++){var o=e.indexOf(t[r]);if(n>o)return!1;n=o}return!0}return!1},indexAdded:function(e,t){var n;for(n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)},indexRemoved:function(e,t){var n,r=0;for(n=0;n<e.length;++n)e[n]>t?--e[n]:e[n]===t&&(r=n);return e.splice(r,1),r},findItemByPropertyValue:function(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return e[r];return null}return null},findIndexByPropertyValue:c},p=n(1),f=n.n(p),m={addDimensions:function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,o=n.data[0];(t=o.dimensions).push.apply(t,a(r.qDimensions));var s,l=i.getValue(r,"qLayoutExclude.qHyperCubeDef.qDimensions");l&&(s=o.excludedDimensions).push.apply(s,a(l))},addMeasures:function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,o=n.data[0];(t=o.measures).push.apply(t,l(r.qMeasures));var a,s=i.getValue(r,"qLayoutExclude.qHyperCubeDef.qMeasures");s&&(a=o.excludedMeasures).push.apply(a,l(s))},setInterColumnSortOrder:function(e){var t=e.exportFormat,n=e.qHyperCubeDef,r=t.data[0];n.qInterColumnSortOrder||(n.qInterColumnSortOrder=[]),r.interColumnSortOrder=n.qInterColumnSortOrder.concat();var o=i.getValue(n,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");o&&d.isOrderedSubset(o,r.interColumnSortOrder)&&(r.interColumnSortOrder=o.concat())},copyProperties:function(e){var t=e.exportFormat,n=e.properties;Object.keys(n).forEach((function(e){t.properties[e]=n[e]}))},updateLayoutExclude:function(e){var t=e.exportFormat,n=e.properties;n.qLayoutExclude||(n.qLayoutExclude={}),n.qLayoutExclude.disabled&&(Object.keys(n.qLayoutExclude.disabled).forEach((function(e){t.properties.hasOwnProperty(e)||(t.properties[e]=n.qLayoutExclude.disabled[e])})),delete n.qLayoutExclude.disabled),n.qLayoutExclude.changed&&(function(e){Object.keys(e.qLayoutExclude.changed).forEach((function(t){e.qLayoutExclude.changed[t].to===i.getValue(e,t)&&i.setValue(e,t,e.qLayoutExclude.changed[t].from)}))}(n),delete n.qLayoutExclude.changed),n.qLayoutExclude.quarantine&&!i.isEmpty(n.qLayoutExclude.quarantine)||delete n.qLayoutExclude},storeMeasuresModifiers:function(e){e.forEach((function(e){f.a.cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)}))}};function h(e,t,n){var r,o,a=i.getValue(e,t);if(!i.isAtomicValue(a))try{if((o=(o=(r=JSON.stringify(a)).match(/:\{/g))?o.length:0)>2)return;a=JSON.parse(r)}catch(e){return}i.getValue(e,"qLayoutExclude.quarantine")||i.setValue(e,"qLayoutExclude.quarantine",{});var s=i.getValue(e,"qLayoutExclude.quarantine");s[n]||(s[n]={}),s[n][t]=a}var g=n(0),y=n.n(g);function v(e,t){var n=y()(!0,{},t,e);return i.getValue(n,"qOtherTotalSpec.qOtherCounted")||i.setValue(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),i.getValue(n,"qOtherTotalSpec.qOtherLimit")||i.setValue(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel="Others"),n}function b(e,t){return y()(!0,{},t,e)}function x(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}var q=Math.pow(2,53)-1;function D(e){return function(e){if(Array.isArray(e))return C(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var n=Object.prototype.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)?C(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function w(e){return function(e){if(Array.isArray(e))return S(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return S(e,t);var n=Object.prototype.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)?S(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var M={importCommonProperties:function(e,t,n){var r="masterobject"===i.getValue(t,"properties.qInfo.qType")?"masterobject":i.getValue(n,"qInfo.qType");i.setValue(e,"qInfo.qType",r),e.visualization=n.visualization},copyPropertyIfExist:function(e,t,n){t.hasOwnProperty(e)&&(n[e]=t[e])},copyPropertyOrSetDefault:function(e,t,n,r){t.hasOwnProperty(e)?n[e]=t[e]:n[e]=r},getDefaultDimension:function(){return{qDef:{autoSort:!0,cId:"",othersLabel:"Others"},qLibraryId:"",qNullSuppression:!1,qOtherLabel:"Others",qOtherTotalSpec:{qOtherLimitMode:"OTHER_GE_LIMIT",qOtherMode:"OTHER_OFF",qOtherSortMode:"OTHER_SORT_DESCENDING",qSuppressOther:!1}}},getDefaultMeasure:function(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}},addDimensions:function(e){var t,n=e.exportFormat,r=e.maxDimensions,o=e.minDimensions,i=e.newHyperCubeDef,a=e.defaultDimension,s=n.data[0];for(t=0;t<s.dimensions.length;++t){var l=v(s.dimensions[t],a);i.qDimensions.length<r?i.qDimensions.push(l):i.qLayoutExclude.qHyperCubeDef.qDimensions.push(l)}for(t=0;t<s.excludedDimensions.length;++t){var u=v(s.excludedDimensions[t],a);i.qDimensions.length<o?i.qDimensions.push(u):i.qLayoutExclude.qHyperCubeDef.qDimensions.push(u)}},addMeasures:function(e){var t,n=e.exportFormat,r=e.maxMeasures,o=e.minMeasures,i=e.newHyperCubeDef,a=e.defaultMeasure,s=n.data[0];for(t=0;t<s.measures.length;++t){var l=b(s.measures[t],a);i.qMeasures.length<r?i.qMeasures.push(l):i.qLayoutExclude.qHyperCubeDef.qMeasures.push(l)}for(t=0;t<s.excludedMeasures.length;++t){var u=b(s.excludedMeasures[t],a);i.qMeasures.length<o?i.qMeasures.push(u):i.qLayoutExclude.qHyperCubeDef.qMeasures.push(u)}},getMaxMinDimensionMeasure:function(e){var t=e.exportFormat,n=e.dataDefinition,r=void 0===n?{}:n,o=t.data[0],i=r.dimensions||{max:0},a=r.measures||{max:0},s=x(a.max,o.dimensions.length,q),l=x(a.min,o.dimensions.length,0);return{maxDimensions:x(i.max,s,q),minDimensions:x(i.min,l,0),maxMeasures:s,minMeasures:l}},setInterColumnSortOrder:function(e){var t=e.exportFormat,n=e.newHyperCubeDef,r=t.data[0],o=n.qDimensions.length+n.qMeasures.length;n.qInterColumnSortOrder=r.interColumnSortOrder.concat();var i=n.qInterColumnSortOrder.length;if(i!==o)for(n.qLayoutExclude&&(n.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=r.interColumnSortOrder.concat());i!==o;)i<o?(d.indexAdded(n.qInterColumnSortOrder,i),++i):(--i,d.indexRemoved(n.qInterColumnSortOrder,i))},createNewProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.hypercubePath,o={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach((function(e){"qLayoutExclude"===e?t.properties[e].quarantine&&(o.qLayoutExclude.quarantine=y()(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&r?i.setValue(o,"".concat(r,".qHyperCubeDef"),t.properties.qHyperCubeDef):n.hasOwnProperty(e)||-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)||function(e,t){return"components"===t&&Array.isArray(e[t])&&e[t].some((function(e){return"general"===e.key}))}(t.properties,e)?o[e]=t.properties[e]:o.qLayoutExclude.disabled[e]=t.properties[e]})),null===(o=y()(!0,{},n,o)).components&&(o.components=[]),o},shouldInitLayoutExclude:function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,o=e.maxMeasures,i=e.minMeasures,a=t.data[0];return a.dimensions.length>n&&n>0||a.measures.length>o&&o>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>r||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>i||!o&&a.measures.length>0||!n&&a.dimensions.length>0},initLayoutExclude:function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,o=e.maxMeasures,i=e.minMeasures,a=e.newHyperCubeDef,s=t.data[0];a.qLayoutExclude||(a.qLayoutExclude={}),a.qLayoutExclude.qHyperCubeDef||(a.qLayoutExclude.qHyperCubeDef={}),(s.dimensions.length>n&&n>0||s.excludedDimensions&&s.excludedDimensions.length&&s.dimensions.length+s.excludedDimensions.length>r)&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(s.measures.length>o&&o>0||s.excludedMeasures&&s.excludedMeasures.length&&s.measures.length+s.excludedMeasures.length>i)&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!o&&s.measures.length&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!n&&s.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))},updateDimensionsOnAdded:function(e){var t=e.newProperties,n=e.dataDefinition,r=e.hypercubePath;if(n.dimensions&&"function"==typeof n.dimensions.added){var o=i.getValue(t,r||"").qHyperCubeDef,a=D(o.qDimensions);o.qDimensions=[],a.forEach((function(e){o.qDimensions.push(e),n.dimensions.added(e,t)}))}},updateMeasuresOnAdded:function(e){var t=e.newProperties,n=e.dataDefinition,r=e.hypercubePath;if(n.measures&&"function"==typeof n.measures.added){var o=i.getValue(t,r||"").qHyperCubeDef,a=w(o.qMeasures);o.qMeasures=[],a.forEach((function(e){o.qMeasures.push(e),n.measures.added(e,t)}))}},restoreMeasuresModifiers:function(e){var t=e.measures,n=e.modifierTypes;t&&n&&f.a.isSupportedModifiers(n)&&t.forEach((function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store}))}};function E(e,t){var n=i.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!n&&(Object.keys(n).forEach((function(t){i.setValue(e,t,n[t])})),delete e.qLayoutExclude.quarantine[t],!0)}var I={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,o=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t={data:[],properties:{}},n=0;n<e;++n)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}(),a=t.qProperty,s=i.getValue(a,n||""),l=s.qHyperCubeDef;return l.qInterColumnSortOrder||(l.qInterColumnSortOrder=[]),m.addDimensions({exportFormat:o,qHyperCubeDef:l}),m.addMeasures({exportFormat:o,qHyperCubeDef:l}),m.setInterColumnSortOrder({exportFormat:o,qHyperCubeDef:l}),delete l.qLayoutExclude,m.copyProperties({exportFormat:o,properties:a}),n&&(o.properties.qHyperCubeDef=l,delete s.qHyperCubeDef),m.updateLayoutExclude({exportFormat:o,properties:a}),r||m.storeMeasuresModifiers(o.properties.qHyperCubeDef.qMeasures),Array.isArray(o.properties.filters)&&(h(o.properties,"filters","storedFilters"),delete o.properties.filters),o.properties.qHyperCubeDef.qContextSetExpression&&(h(o.properties,"qHyperCubeDef.qContextSetExpression","storedFilters"),o.properties.qHyperCubeDef.qContextSetExpression=""),o.properties.qHyperCubeDef.qDynamicScript&&o.properties.qHyperCubeDef.qDynamicScript.length&&(h(o.properties,"qHyperCubeDef.qDynamicScript","dynamicScript"),o.properties.qHyperCubeDef.qDynamicScript=[]),o},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=void 0===n?{}:n,o=e.dataDefinition,a=void 0===o?{}:o,s=e.defaultPropertyValues,l=void 0===s?{}:s,u=e.hypercubePath,c=e.extension,d=e.supportedFilters,p=void 0===d||d,f=e.isHCModifierSupported,m=void 0===f||f,h={qChildren:[]},g=M.createNewProperties({exportFormat:t,initialProperties:r,hypercubePath:u}),y=i.getValue(r,u||"").qHyperCubeDef,v=i.getValue(g,u||"").qHyperCubeDef,b=M.getMaxMinDimensionMeasure({exportFormat:t,dataDefinition:a}),x=b.maxDimensions,q=b.minDimensions,D=b.maxMeasures,C=b.minMeasures,w=l.defaultDimension,S=void 0===w?M.getDefaultDimension():w,I=l.defaultMeasure,A=void 0===I?M.getDefaultMeasure():I;v.qDimensions.length=0,v.qMeasures.length=0,M.shouldInitLayoutExclude({exportFormat:t,maxDimensions:x,minDimensions:q,maxMeasures:D,minMeasures:C})&&M.initLayoutExclude({exportFormat:t,maxDimensions:x,minDimensions:q,maxMeasures:D,minMeasures:C,newHyperCubeDef:v}),M.addDimensions({exportFormat:t,maxDimensions:x,minDimensions:q,newHyperCubeDef:v,defaultDimension:S}),M.addMeasures({exportFormat:t,maxMeasures:D,minMeasures:C,newHyperCubeDef:v,defaultMeasure:A}),M.updateDimensionsOnAdded({newProperties:g,dataDefinition:a,hypercubePath:u}),M.updateMeasuresOnAdded({newProperties:g,dataDefinition:a,hypercubePath:u}),M.setInterColumnSortOrder({exportFormat:t,newHyperCubeDef:v}),M.copyPropertyIfExist("qMaxStackedCells",y,v),M.copyPropertyIfExist("qNoOfLeftDims",y,v),M.copyPropertyOrSetDefault("qInitialDataFetch",y,v,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),M.copyPropertyOrSetDefault("qMode",y,v,"S"),M.copyPropertyOrSetDefault("qReductionMode",y,v,"N"),M.copyPropertyOrSetDefault("qSortbyYValue",y,v),M.copyPropertyOrSetDefault("qIndentMode",y,v),M.copyPropertyOrSetDefault("qShowTotalsAbove",y,v),M.importCommonProperties(g,t,r),h.qProperty=g;var k=i.getValue(c||{},"support.modifiers");return M.restoreMeasuresModifiers({measures:v.qMeasures,modifierTypes:k}),p&&E(h.qProperty,"storedFilters"),"S"===v.qMode&&m&&E(h.qProperty,"dynamicScript"),h}},A={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function k(e,t,n,r){t=t||[];var o=c(e,r,n),i=c(t,r,n);if(-1!==o&&-1===i){var a=e.splice(o,1);t.push(a[0])}return t}function T(e,t){return e.length!==t}var L={create:function(e,t){if(!e||!A[e])throw new Error("Attribute Expressions Util: ID required");var n={};return t&&Object.keys(t).forEach((function(e){n[e]=t[e]})),n.id=e,n.qAttribute=!0,n},moveByIdFromGroup:function(e,t,n,r,o){n=n||"qAttributeExpressions",o=o||"id";for(var i=0;i<e.length;i++){var a=e[i][n],s=t.length;if(k(a,t,r,o),T(t,s))return t}return t},IDMAP:{CELL_BACKGROUND_COLOR:"cellBackgroundColor",CELL_FOREGROUND_COLOR:"cellForegroundColor",COLOR_BY_ALTERNATIVE:"colorByAlternative",COLOR_BY_EXPRESSION:"colorByExpression",TOOLTIP:"tooltip",CELL_LINK_LABEL:"urlLabel",CELL_LINK_URL:"url"}},O={getNumDimensions:function(e){return i.getValue(e,"qHyperCubeDef.qDimensions.length",0)},getNumMeasures:function(e){return i.getValue(e,"qHyperCubeDef.qMeasures.length",0)},wrapFieldName:function(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e},getItemLabel:function(e){return e.label||e.name}},P={colorModeOptions:{primary:function(){return!0},dimension:function(e){return O.getNumDimensions(e)>0&&O.getNumMeasures(e)<=1},multiColor:function(e){return O.getNumMeasures(e)>1},measure:function(e){return O.getNumDimensions(e)>0},expression:function(e){return O.getNumMeasures(e)>=1}}},N={colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return O.getNumMeasures(e)>=1}}},R={scatterplot:N,"sn-scatter-plot":N,piechart:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return O.getNumMeasures(e)>=1}}},linechart:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return O.getNumDimensions(e)>1},multiColor:function(e){return O.getNumMeasures(e)>1},measure:function(e){return O.getNumDimensions(e)<=1},expression:function(e){return O.getNumMeasures(e)>=1}}},map:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return O.getNumDimensions(e)>=1},multiColor:function(e){return O.getNumMeasures(e)>1},measure:function(e){return O.getNumDimensions(e)>=1},expression:function(e){return O.getNumDimensions(e)>=1}}},distributionplot:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return O.getNumDimensions(e)>=1}}}};function F(e,t,n){if(Array.isArray(e[t])){var r=d.findIndexByPropertyValue(e[t],"id",n);r>=0&&e[t].splice(r,1)}else e[t]=[]}function j(e,t){var n=L.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach((function(e){F(e,"qAttributeDimensions",n),F(e,"qAttributeExpressions",n)})),t.forEach((function(e){F(e,"qAttributeDimensions",n),F(e,"qAttributeExpressions",n)}))}function H(e,t){if(t){var n="="===t.charAt(0);e.color.altLabel=n?{qStringExpression:{qExpr:t.substr(1)}}:t}}function _(e){var t=e.properties,n=e.isDimension,r=e.dimensions,o=e.excludedDimensions,a=e.measures,s=e.label;j(r,o);var l=r[r.length-1];if(l){var u=n?i.getValue(t,"color.byDimDef"):i.getValue(t,"color.byMeasureDef"),c=i.getValue(t,"color.formatting.qNumFormat"),p=i.getValue(t,"color.formatting.isCustomFormatted");if(u){var f=L.create(L.IDMAP.COLOR_BY_ALTERNATIVE);switch(u.type){case"expression":!function(e){var t=e.attributeExpression,n=e.label,r=e.item,o=e.isDimension,i=e.qNumFormat,a=e.isCustomFormatted;t.label=n||r.label,o?t.qDef=r.key:(t.qExpression=r.key,i&&(t.qNumFormat=i,t.isCustomFormatted=a)),t.matchMeasure=r.activeMeasureIndex,t.label&&"="===t.label.charAt(0)&&(t.labelExpRef="color.altLabel")}({attributeExpression:f,label:s,item:u,isDimension:n,qNumFormat:c,isCustomFormatted:p});break;case"libraryItem":!function(e){var t=e.attributeExpression,n=e.measures,r=e.item,o=e.isDimension,i=e.qNumFormat,a=e.isCustomFormatted;o||(t.matchMeasure=d.findIndexByPropertyValue(n,"qLibraryId",r.key),i&&(t.qNumFormat=i,t.isCustomFormatted=a)),void 0!==r.expression?t.qExpression=r.expression:t.qLibraryId=r.key,t.colorMapRef=r.key}({attributeExpression:f,measures:a,item:u,isDimension:n,qNumFormat:c,isCustomFormatted:p})}n?(f.qSortBy={qSortByAscii:1},l.qAttributeDimensions.push(f)):l.qAttributeExpressions.push(f)}}}function z(e,t,n,r){var o,i,a,s={};switch(e){case"dimension":n.qLibraryId?(s.type="dimension",s.name=n.qLibraryId,s.id=n.qLibraryId):(s.type="field",t?(s.name=n.label||n.qDef,s.id=n.qDef):(s.name=n.qDef.qFieldDefs[0],s.label=(a=n.qDef).qLabelExpression?a.qLabelExpression:a.qFieldLabels&&a.qFieldLabels[0]?a.qFieldLabels[0]:a.qFieldDefs[0]));break;case"measure":(o=function(e,t){return t?e.qLibraryId:f.a.measureBase.getLibraryId(e)}(n,t))?(s.type="measure",s.name=o,s.id=o,(i=function(e,t){return f.a.hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}(n,r))&&(s.expression=i)):(s.type="expression",t?(s.name=n.label||n.qExpression,s.id=n.qExpression):(s.name=n.qDef.qDef,s.label=function(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qLabel?t.qLabel:t.qDef}(n)));break;default:throw new Error('columnType should be "dimension" or "measure"')}return s}var V={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}};function U(e,t,n,r){var o=n?"expression":t.type,i=e.color,a=i.mode,s=O.getItemLabel(t);switch(H(e,s||""),o){case"field":a="byDimension",i.byDimDef={label:t.label||O.wrapFieldName(t.name),key:O.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":a="byMeasure",i.byMeasureDef={label:n||s,key:n||t.name,type:"expression",activeMeasureIndex:t.activeMeasureIndex};break;case"dimension":a="byDimension",i.byDimDef={label:t.name,key:t.id,type:"libraryItem",activeDimensionIndex:t.activeDimensionIndex};break;case"measure":a="byMeasure",i.byMeasureDef={label:t.name,key:t.id,expression:t.expression,type:"libraryItem",activeMeasureIndex:t.activeMeasureIndex},i.formatting&&V.useMasterNumberFormat(i.formatting)}r||(i.auto=!1,i.mode=a)}function B(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=n[function(e,t,n){var r=i.getValue(t,"visualization"),o=n.split("."),a=Number(o[1]),s=i.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===r&&"point"===s}(n,e,t)?0:n.length-1],o=L.IDMAP.COLOR_BY_ALTERNATIVE,a=d.findItemByPropertyValue(r.qAttributeDimensions,"id",o);return U(e,z("dimension",!!a,a||r)),!!a}function W(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=i.getValue(e,"".concat(t,"qMeasures"),[]),o=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=i.getValue(e,"color.byDimDef");if(a&&H(e,a.label),function(e){return!!(e&&e.activeDimensionIndex>-1)}(a))!function(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=i.getValue(e,"color.byDimDef");r.activeDimensionIndex=Math.min(r.activeDimensionIndex,n.length-1);var o=z("dimension",!1,n[r.activeDimensionIndex]);o.activeDimensionIndex=r.activeDimensionIndex,U(e,o)}(e,t);else if(function(e){return!e||!e.key}(a)&&B(e,t))return;_({properties:e,isDimension:!0,dimensions:n,excludedDimensions:o,measures:r,label:i.getValue(e,"color.byDimDef.label")})}function $(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=i.getValue(e,"".concat(t,"qMeasures"),[]),o=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=i.getValue(e,"color.byMeasureDef");if(a&&H(e,a.label),function(e){return!!(e&&e.activeMeasureIndex>-1)}(a))!function(e,t){var n=i.getValue(e,"".concat(t,"qMeasures"),[]),r=i.getValue(e,"color.byMeasureDef");if(r.activeMeasureIndex=Math.min(r.activeMeasureIndex,n.length-1),r.activeMeasureIndex>-1){var o=z("measure",!1,n[r.activeMeasureIndex],!0);o.activeMeasureIndex=r.activeMeasureIndex,U(e,o)}}(e,t);else if(function(e,t){return(!e||!e.key)&&t.length>0}(a,r)&&function(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=i.getValue(e,"".concat(t,"qMeasures"),[]),o=n[n.length-1],a=L.IDMAP.COLOR_BY_ALTERNATIVE,s=d.findItemByPropertyValue(o.qAttributeExpressions,"id",a);return U(e,z("measure",!!s,s||r[0])),!!s}(e,t))return;_({properties:e,isDimension:!1,dimensions:n,excludedDimensions:o,measures:r,label:i.getValue(e,"color.byMeasureDef.label")})}var Y={changeProperty:function(e,t,n){i.setValue(e,t,n),i.isAtomicValue(n)&&function(e,t,n){var r=e.qLayoutExclude;r&&(r.changed||(r.changed={}),r.changed[t]={from:i.getValue(e,t),to:n})}(e,t,n)},getCanColorBy:function(e,t){var n={primary:!0};if(e){var r=(R[t]||P).colorModeOptions||P.colorModeOptions;n.byDimension=r.dimension(e),n.byMeasure=r.measure(e),n.byMultiple=r.multiColor(e),n.byExpression=r.expression(e)}return n},shouldUpdateColorBy:function(e){var t=e.canColorBy,n=e.autoColor,r=e.colorMode,o=e.dimensions;return!(t[r]&&!n&&("byDimension"!==r&&"byMeasure"!==r||!o.length))},updateColorBy:function(e,t){var n=i.getValue(e,"color.mode"),r=i.getValue(e,"color.auto"),o=i.getValue(e,"".concat(t,"qDimensions"),[]),a=i.getValue(e,"".concat(t,"qMeasures"),[]),s=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);r?j(o,s):function(e){var t=e.auto,n=e.colorMode,r=e.dimensions;return!t&&"byDimension"===n&&r.length>0}({auto:r,colorMode:n,dimensions:o})?W(e,t):function(e){var t=e.auto,n=e.colorMode,r=e.dimensions,o=e.measures,a=e.properties,s=i.getValue(a,"visualization");return!(t||"byMeasure"!==n||!r.length||"map"!==s&&!o.length)}({auto:r,colorMode:n,dimensions:o,measures:a,properties:e})?$(e,t):function(e,t){var n=i.getValue(e,"color.mode"),r=i.getValue(e,"".concat(t,"qDimensions"),[]),o=i.getValue(e,"".concat(t,"qMeasures"),[]),a=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===n&&o.length<2&&i.setValue(e,"color.mode","primary"),j(r,a)}(e,t)},deleteTotalMode:function(e){e.forEach((function(e){e.qOtherTotalSpec&&"qTotalMode"in e.qOtherTotalSpec&&delete e.qOtherTotalSpec.qTotalMode}))},shouldAddColorByExpression:function(e){var t=e.shouldUpdateColorBy,n=e.properties,r=i.getValue(n,"qHyperCubeDef.qMeasures",[]),o=i.getValue(n,"color.mode","");return!t&&"byExpression"===o&&r.length>0},addColorByExpression:function(e){var t=i.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),n=i.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:n,id:"colorByExpression"}),i.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)},switchToAutoColor:function(e){i.setValue(e,"color.mode","primary"),i.setValue(e,"color.auto",!0)},shouldSwitchToColorPersistent:function(e){var t=i.getValue(e,"qHyperCubeDef.qDimensions",[]),n=i.getValue(e,"color.persistent",!1);return t.length>1&&!n}},K={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,o=I.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),i=o.data[0],a=i.dimensions.concat(i.excludedDimensions),s=i.measures.concat(i.excludedMeasures),l=L.IDMAP,u=l.COLOR_BY_ALTERNATIVE,c=l.COLOR_BY_EXPRESSION;return L.moveByIdFromGroup(a,[],"qAttributeDimensions",u),L.moveByIdFromGroup(a,[],"qAttributeExpressions",u),L.moveByIdFromGroup(s,[],"qAttributeExpressions",c),o},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,o=e.defaultPropertyValues,a=e.hypercubePath,s=e.extension,l=e.supportedFilters,u=e.isHCModifierSupported,c=I.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:o,hypercubePath:a,extension:s,supportedFilters:l,isHCModifierSupported:u}),d=c.qProperty,p=i.getValue(d,"visualization"),f=i.getValue(d,"qHyperCubeDef.qDimensions",[]),m=i.getValue(d,"color.mode",""),h=i.getValue(d,"color.auto",""),g=Y.getCanColorBy(d,p),y=Y.shouldUpdateColorBy({canColorBy:g,autoColor:h,colorMode:m,dimensions:f});return g[m]?Y.shouldAddColorByExpression({shouldUpdateColorBy:y,properties:d})&&Y.addColorByExpression(d):Y.switchToAutoColor(d),y&&Y.updateColorBy(d,"qHyperCubeDef."),Y.shouldSwitchToColorPersistent(d)&&Y.changeProperty(d,"color.persistent",!0),Y.deleteTotalMode(f),c}},J=["bar","marker","line"],G={handleAutoMinMax:function(e){var t=e.initialProperties,n=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?E(n,"unsupportedAutoMinMax")||y()(n.measureAxis,t.measureAxis):E(n,"supportedAutoMinMax")||y()(n.measureAxis,t.measureAxis)},handleMeasuresAxis:function(e){var t,n=e.exportFormat,r=e.initialProperties,o=e.properties,i=e.measureType,a=o.qHyperCubeDef,s=o.measureAxis;if(function(e){var t=e.exportFormat,n=e.initialProperties;return!(!t.properties.measureAxes||n.measureAxes||!n.measureAxis||void 0===n.measureAxis.autoMinMax)}({exportFormat:n,initialProperties:r})){var l=function(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach((function(e){if(e.qDef.series){var n=e.qDef.series,r=n.type,o=n.axis;t[o]||(t[o]={axis:o,type:{line:0,marker:0,bar:0,total:0}}),J.includes(r)&&t[o].type[r]++,t[o].type.total++}})),t}(a);l.length?(i&&(t=l.filter((function(e){return e.type[i]>0})).sort((function(e,t){return t.type[i]-e.type[i]}))),t&&t.length||(t=l.sort((function(e,t){return t.type.total-e.type.total}))),t&&t[0]&&y()(s,n.properties.measureAxes[t[0].axis])):y()(s,n.properties.measureAxes[0])}},setInterColumnSortOrder:function(e){if(e.qDimensions.length>1){var t=e.qInterColumnSortOrder.indexOf(0);if(0!==t){var n=e.qInterColumnSortOrder[0];e.qInterColumnSortOrder[0]=0,e.qInterColumnSortOrder[t]=n}}}},Z={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,o=e.supportedAutoMinMax,i=void 0===o||o,a=K.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),s=a.properties;return i?(h(s,"measureAxis.min","supportedAutoMinMax"),h(s,"measureAxis.max","supportedAutoMinMax")):(h(s,"measureAxis.min","unsupportedAutoMinMax"),h(s,"measureAxis.max","unsupportedAutoMinMax")),a},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,o=e.defaultPropertyValues,i=e.hypercubePath,a=e.measureType,s=e.extension,l=e.supportedFilters,u=e.isHCModifierSupported,c=K.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:o,hypercubePath:i,extension:s,supportedFilters:l,isHCModifierSupported:u}),d=c.qProperty;return G.handleAutoMinMax({initialProperties:n,properties:d}),G.handleMeasuresAxis({exportFormat:t,initialProperties:n,properties:d,measureType:a}),G.setInterColumnSortOrder(d.qHyperCubeDef),c}};function X(e,t,n){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(n)}function Q(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,o=e.arrayName,a=e.itemPath;i.getValue(t,n,[]).forEach((function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,o=e.item,a=e.itemPath,s=i.getValue(o,a);if(void 0!==s){var l=i.getValue(o,"qDef.cId");l||(l=i.generateId(),i.setValue(o,"qDef.cId",l));var u=X(n,r,l);i.setValue(t,u,s),i.setValue(o,a,void 0)}}({properties:t,quarantineName:r,arrayName:o,item:e,itemPath:a})}))}function ee(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,o=e.arrayName,a=e.itemPath;i.getValue(t,n,[]).forEach((function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,o=e.item,a=e.itemPath,s=i.getValue(o,"qDef.cId");if(s){var l=X(n,r,s),u=i.getValue(t,l);void 0!==u&&(i.setValue(o,a,u),i.setValue(t,l,void 0))}}({properties:t,quarantineName:r,arrayName:o,item:e,itemPath:a})}))}var te={quarantine:function(e){Q({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalColoring",arrayName:"measures",itemPath:"qDef.conditionalColoring"})},unquarantine:function(e){ee({properties:e,arrayPath:"qHyperCubeDef.qMeasures",itemPath:"qDef.conditionalColoring",arrayName:"measures",quarantineName:"conditionalColoring"})}},ne={quarantine:function(e){Q({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"measures",itemPath:"qCalcCondition"}),Q({properties:e,arrayPath:"qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"dimensions",itemPath:"qCalcCondition"})},unquarantine:function(e){ee({properties:e,arrayPath:"qHyperCubeDef.qMeasures",quarantineName:"conditionalShowHide",arrayName:"measures",itemPath:"qCalcCondition"}),ee({properties:e,arrayPath:"qHyperCubeDef.qDimensions",quarantineName:"conditionalShowHide",arrayName:"dimensions",itemPath:"qCalcCondition"})}};t.default={hypercube:I,colorChart:K,axisChart:Z,quarantineProperty:h,unquarantineProperty:E,quarantineArrayProp:Q,unquarantineArrayProp:ee,conditionalColoring:te,conditionalShow:ne}}]));const Ap={setValue(e,t,n){if(!t)return;const r=t.split(".");let o=e;const i=r[r.length-1];let a;for(a=0;a<r.length-1;++a)null==o[r[a]]&&(o[r[a]]=Number.isNaN(+r[a+1])?{}:[]),o=o[r[a]];void 0!==n?o[i]=n:delete o[i]},getValue(e,t,n){const r=t.split(".");let o,i=e;if(void 0===i)return n;for(o=0;o<r.length;++o){if(null==i[r[o]])return n;i=i[r[o]]}return i}},kp={getDimensions:e=>Ap.getValue(e,"qHyperCubeDef.qDimensions",[]),getNumDimensions:e=>Ap.getValue(e,"qHyperCubeDef.qDimensions.length",0),getMeasures:e=>Ap.getValue(e,"qHyperCubeDef.qMeasures",[]),getNumMeasures:e=>Ap.getValue(e,"qHyperCubeDef.qMeasures.length",0),getDimensionLayouts(e,t){const n=Ap.getValue(e,t?t+".qHyperCube":"qHyperCube",null);return n?n.qDimensionInfo:[]},getDimensionLayout(e,t,n){return this.getDimensionLayouts(t,n).filter((t=>e===t.cId))[0]},getMeasureLayouts(e,t){const n=Ap.getValue(e,t?t+".qHyperCube":"qHyperCube",null);return n?n.qMeasureInfo:[]},getMeasureLayout(e,t,n){return this.getMeasureLayouts(t,n).filter((t=>e===t.cId))[0]}};const Tp={colorModeOptions:{primary:()=>!0,dimension:()=>!0,multiColor:()=>!1,measure:()=>!0,expression:e=>kp.getNumMeasures(e)>=1},showLegend:e=>{const t=Ap.getValue(e,"color.auto"),n=Ap.getValue(e,"color.expressionIsColor"),r=Ap.getValue(e,"color.mode");return!(!t&&"primary"===r||!t&&"byExpression"===r&&(n||void 0===n))},persistentColorsShow:e=>!Ap.getValue(e,"color.auto")&&"byDimension"===Ap.getValue(e,"color.mode"),useDimValColShow:e=>(void 0===Ap.getValue(e,"color.useDimColVal")&&Ap.setValue(e,"color.useDimColVal",!1),!Ap.getValue(e,"color.auto")&&"byDimension"===Ap.getValue(e,"color.mode")&&"libraryItem"===Ap.getValue(e,"color.byDimDef.type"))},Lp=function(e){const{colorModeOptions:t,persistentColorsShow:n,useDimValColShow:r,showLegend:o}=Tp;this.color={colorMode:{options(n){const r=[];return"explore"===e&&r.push({value:"auto",translation:"Common.Auto"}),t.primary(n)&&r.push({value:"primary",translation:"properties.colorMode.primary"}),t.multiColor(n)&&r.push({value:"byMultiple",translation:"properties.colorMode.multicolored"}),t.dimension(n)&&r.push({value:"byDimension",translation:"properties.colorMode.byDimension"}),t.measure(n)&&r.push({value:"byMeasure",translation:"properties.colorMode.byMeasure"}),t.expression(n)&&"explore"!==e&&r.push({value:"byExpression",translation:"properties.colorMode.byExpression"}),r}},persistentColors:{show:e=>r(e)?n(e)&&!Ap.getValue(e,"color.useDimColVal"):n(e)},useDimColVal:{show:r}},this.legend={show:o,showTitle:{show(e){const t=Ap.getValue(e,"color.auto");return Ap.getValue(e,"legend.show")&&o(e)&&(t||!function(e){return"byExpression"===Ap.getValue(e,"color.mode")&&!0===Ap.getValue(e,"color.expressionIsColor")}(e))}},dock:{show:e=>Ap.getValue(e,"legend.show")&&o(e)}}};function Op(e){return new Lp(e)}const Pp={classification:{section:"styling",tags:["simple"],exclusive:!0},component:"items",show:!0,chartType:"piechart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.PieChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,items:{strokeSection:{translation:"properties.Outline",component:"items",items:{strokeItem:{component:"items",ref:"components",key:"slices",items:{strokeWrapper:{component:"inline-wrapper",items:{strokeWidth:{translation:"LayerStyleEditor.style.strokeWidth",ref:"style.strokeWidth",width:9,show:!0,component:"dropdown",type:"string",options:[{value:"none",translation:"Common.None"},{value:"small",translation:"Common.Small"},{value:"medium",translation:"Common.Medium"},{value:"large",translation:"Common.Large"}],defaultValue:"none",schemaIgnore:!0},strokeColor:{ref:"style.strokeColor",defaultValue:{color:"#FFFFFF"},schemaIgnore:!0,width:3,component:"color-picker"}}}}}}},cornerRadius:{component:"items",translation:"LayerStyleEditor.style.cornerRadius",items:{cornerRadiusItem:{component:"items",ref:"components",key:"slices",items:{cornerRadiusSlider:{ref:"style.cornerRadius",translation:"LayerStyleEditor.style.cornerRadius",component:"slider",min:0,max:40,step:.05,width:12,defaultValue:0,schemaIgnore:!0}}}}},innerRadius:{translation:"LayerStyleEditor.style.innerRadius",component:"items",show:e=>e.donut.showAsDonut,items:{innerRadiusItem:{component:"items",ref:"components",key:"slices",items:{innerRadiusSlider:{ref:"style.innerRadius",translation:"LayerStyleEditor.style.innerRadius",component:"slider",min:.05,max:.75,step:.01,width:12,defaultValue:.55,schemaIgnore:!0}}}}}}},Np={component:"style-editor",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",resetBtnTranslation:"LayerStyleEditor.component.resetAll",key:"slices",ref:"components",defaultValues:{key:"slices",style:{strokeColor:{index:-1,color:"#FFFFFF"},strokeWidth:"none",cornerRadius:0,innerRadius:.55}},items:{slices:{components:"items",type:"items",uses:"styling.slice",items:{strokeWidth:{show:!0,component:"dropdown",type:"string",options:[{value:"none",translation:"LayerStyleEditor.style.strokeWidth.none"},{value:"small",translation:"LayerStyleEditor.style.strokeWidth.small"},{value:"medium",translation:"LayerStyleEditor.style.strokeWidth.medium"},{value:"large",translation:"LayerStyleEditor.style.strokeWidth.large"}],defaultValue:"none"},strokeColor:{show:e=>"none"!==e.style.strokeWidth},cornerRadius:{component:"slider",min:0,max:40,step:.05,defaultValue:0,show:!0},innerRadius:{component:"slider",min:.05,max:.75,step:.01,defaultValue:.55,show:(e,t,n)=>n.layout.donut.showAsDonut}}}}},Rp={component:"styling-panel",chartTitle:"Object.PieChart",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,items:{strokeSection:{translation:"properties.Outline",component:"panel-section",items:{strokeItem:{component:"items",ref:"components",key:"slices",items:{strokeWrapper:{component:"inline-wrapper",items:{strokeWidth:{ref:"style.strokeWidth",width:9,show:!0,component:"dropdown",type:"string",options:[{value:"none",translation:"Common.None"},{value:"small",translation:"Common.Small"},{value:"medium",translation:"Common.Medium"},{value:"large",translation:"Common.Large"}],defaultValue:"none",schemaIgnore:!0},strokeColor:{ref:"style.strokeColor",defaultValue:{color:"#FFFFFF"},schemaIgnore:!0,width:3,component:"color-picker"}}}}}}},cornerRadius:{translation:"LayerStyleEditor.style.cornerRadius",component:"panel-section",items:{cornerRadiusItem:{component:"items",ref:"components",key:"slices",items:{cornerRadiusSlider:{ref:"style.cornerRadius",component:"slider",min:0,max:40,step:.05,width:12,defaultValue:0,schemaIgnore:!0}}}}},innerRadius:{translation:"LayerStyleEditor.style.innerRadius",component:"panel-section",show:e=>e.donut.showAsDonut,items:{innerRadiusItem:{component:"items",ref:"components",key:"slices",items:{innerRadiusSlider:{ref:"style.innerRadius",component:"slider",min:.05,max:.75,step:.01,width:12,defaultValue:.55,schemaIgnore:!0}}}}}}},Fp=Op("hard");const jp=e=>{var t;null!==(t=e.color)&&void 0!==t&&t.auto||(il(e,"color.mode","byDimension"),il(e,"color.byDimDef.activeDimensionIndex",0),il(e,"color.persistent",!1))},Hp=e=>{var t;const n=[{value:"primary",translation:"properties.colorMode.primary"},{value:"byDimension",translation:"properties.colorMode.byDimension"}];switch(null===(t=e.color)||void 0===t?void 0:t.mode){case"byMultiple":n.push({value:"byMultiple",translation:"properties.colorMode.multicolored"});break;case"byMeasure":n.push({value:"byMeasure",translation:"properties.colorMode.byMeasure"});break;case"byExpression":n.push({value:"byExpression",translation:"properties.colorMode.byExpression"})}return n},_p=e=>{const{flags:t,translator:n}=e||{},r={items:{simpleItems:{items:{autoColor:{label:e=>{var t;return null!==(t=e.color)&&void 0!==t&&t.auto?n.get("Simple.Color.Auto",n.get("properties.colorMode.byDimension")):n.get("Common.Custom")},change:jp},colorMode:{options:Hp}}}}},o={items:{labels:{items:{header:{show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length},pointLabels:{component:"checkbox",ref:"dataPoint.auto",type:"boolean",defaultValue:!0,translation:"Simple.Label.Value",show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length,change(e){e.dataPoint.auto||il(e,"dataPoint.labelMode","none")}},dimensionTitle:{component:"checkbox",ref:"dimensionTitle",type:"string",translation:"Simple.Label.Dimension.Hide",defaultValue:"all",show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length,convertFunctions:{get:(e,t,n,r)=>!r.dimensionTitle,set(e,t,n,r,o){o.dimensionTitle=!e}}}}}}};return{uses:"settings",items:{simpleStyling:null!=t&&t.isEnabled("PIECHART_SIMPLE_STYLING")?Pp:void 0,simpleLabels:o,general:{items:{showDisclaimer:null!=t&&t.isEnabled("SHOW_DISCLAIMER")?{translation:"properties.showDisclaimer",type:"boolean",ref:"showDisclaimer",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Show"},{value:!1,translation:"properties.hide"}]}:void 0}},presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{sliceStyling:null!=t&&t.isEnabled("SENSECLIENT_PS_17478_STYLINGPANEL_PIECHART")?Rp:Np,showAsDonut:{ref:"donut.showAsDonut",type:"boolean",component:"item-selection-list",defaultValue:!1,horizontal:!0,items:[{icon:"pie_chart_pie",component:"icon-item",labelPlacement:"bottom",translation:"properties.pie",value:!1},{icon:"pie_chart_donut",component:"icon-item",labelPlacement:"bottom",translation:"properties.donut",value:!0}]},labels:{type:"items",snapshot:{tid:"property-labels"},items:{dimensionTitle:{ref:"dimensionTitle",type:"boolean",component:"switch",translation:"properties.dataPoints.dimensionlabels",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]},valuesAuto:{ref:"dataPoint.auto",type:"boolean",translation:"properties.dataPoints.labelmode",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},labelMode:{ref:"dataPoint.labelMode",type:"string",component:"dropdown",options:[{value:"none",translation:"Common.None"},{value:"share",translation:"properties.dataPoints.labelmode.share"},{value:"value",translation:"properties.dataPoints.labelmode.value"}],defaultValue:"share",show:e=>!e.dataPoint.auto},labelValueMode:{ref:"dataPoint.labelValueMode",type:"string",component:"dropdown",translation:"properties.dataPoints.labelvaluemode",options:[{value:"arc",translation:"Visualizations.Descriptions.Angle"},{value:"radius",translation:"Visualizations.Descriptions.Radius"}],defaultValue:"arc",show:e=>!e.dataPoint.auto&&function(e){return e.qHyperCubeDef&&e.qHyperCubeDef.qMeasures.length>1||e.qHyperCube&&e.qHyperCube.qMeasureInfo.length>1}(e)&&"value"===e.dataPoint.labelMode}}}}},colorsAndLegend:{uses:"colorsAndLegend",items:{colors:{items:{colorMode:{options:Fp.color.colorMode.options},persistentColors:{show:Fp.color.persistentColors.show}}},simpleColors:r,legend:{show:Fp.legend.show,items:{show:{defaultValue:!1,snapshot:{tid:"property-legend"}},showTitle:{show:Fp.legend.showTitle.show},dock:{show:Fp.legend.dock.show}}}}},tooltip:{uses:"tooltip"}}}},zp={uses:"data",items:{dimensions:{uses:"dimensions"},measures:{uses:"measures",items:{numberFormatting:{items:{percentOfPieMessage:{component:"text",translation:"properties.numberFormatting.pieMessage",show:(e,t,{properties:n}={})=>n&&(n.dataPoint.auto||"share"!==n.dataPoint.labelMode)}}}}}}},Vp={uses:"sorting",items:{interColumnSorting:{reset:e=>{const{qDimensions:t,qMeasures:n,qInterColumnSortOrder:r}=e.qHyperCubeDef;if(1===t.length&&n.length>=1){const t=r.length,n=[...Array(t).keys()];[n[0],n[1]]=[n[1],n[0]],e.qHyperCubeDef.qInterColumnSortOrder=n}}}}},Up={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{suppressZero:null,calcCond:{uses:"calcCond"}}}}};function Bp(e){return{type:"items",component:"accordion",items:{data:zp,sorting:Vp,addons:Up,settings:_p(e)}}}const Wp=Op("explore"),$p=Bp();var Yp={type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sort"},presentation:{uses:"presentation",items:{showAsDonut:$p.items.settings.items.presentation.items.showAsDonut,labelMode:{type:"items",items:{labelMode:{type:"string",component:"radio-list",translation:"properties.dataPoints.labelmode",diffs:["dataPoint.auto:false","dataPoint.labelMode"],options:$p.items.settings.items.presentation.items.labels.items.labelMode.options,setPropertyValue(e,t){e.dataPoint.auto=!1,e.dataPoint.labelMode=t},getValue:e=>e.dataPoint.auto?"":e.dataPoint.labelMode}}}}},color:{uses:"color",items:{mode:{options:Wp.color.colorMode.options},dimension:{items:{persistentColors:{show:e=>!(e.color&&"byDimension"===e.color.mode&&e.color.useDimColVal&&Wp.color.useDimColVal.show(e))}}}}}}};function Kp(e,t){const n=e&&e.desc&&void 0!==e.desc.share?e.desc.share:void 0;return t("share")(n)}function Jp(e){return e.data.num.label}function Gp(e){return e.data.radius.label}function Zp(e,t,n,r){return function(e,t){if(e.dataPoint.auto)return 1===e.qHyperCube.qSize.qcy?Jp:Kp;if("share"===e.dataPoint.labelMode)return Kp;if("value"===e.dataPoint.labelMode)return t.encodings.slice.outerRadius&&"radius"===e.dataPoint.labelValueMode?Gp:Jp;return Jp}(n,r)(e,t)}function Xp(e){let t;return t=e.data.label?function(e,t){let n=e;return n.length>t&&(n=n.substr(0,t-3)+"..."),n}(e.data.label,20):"",t}class Qp{constructor({element:e,properties:t,effectHelper:n,Flag:r}){this.element=e,this.Flag=r,n.initFade(this.element);const o=e.find(".effectLayer");o.length>0&&o.remove(),e.append('<div class="effectLayer"></div>'),this.effectLayer=e.find(".effectLayer"),this._effectProperties=t,this.selectedIndex=t.selectedIndex,this.hasPropertiesPanel=!1,this.effectApplied=!0,n.fadeIn(this.element)}updateOrigSettings(e){return{dataPoint:e.dataPoint,legend:e.legend,dimensionTitle:e.dimensionTitle}}updateFlags(e,t){const n=this.chart.getAffectedShapes("highlight"),r=this.effectLayer[0].getBoundingClientRect(),o=n.map((n=>{const{start:o,end:i,outerRadius:a,offset:s}=n.desc.slice,{scaleRatio:l}=this.chart.component(n.key).rect,u=n.element.getBoundingClientRect(),c=(o+i)/2,d=u.left-r.left+l.x*(s.x+a*Math.sin(c)),p=u.top-r.top+l.y*(s.y-a*Math.cos(c)),f=Math.cos(c)>0?"top":"bottom",m=Math.sin(c)>0?"right":"left";return{title:Xp(n),label:Zp(n,this.chart.formatter,e,t),orientation:`${f}${m}`,position:{x:d,y:p}}}));this.Flag.show(this.effectLayer,o)}init(e,t,n,r){return t.getProperties().then((e=>{if(!e.originalModelSettings){const t=Y(!0,{},e);e.originalModelSettings=this.updateOrigSettings(t)}e.effectProperties=r,e.effectPath=n,e.dataPoint.show=!1,e.legend.show=!1,e.dimensionTitle=!1,t.setProperties(e)}))}remove(e,t,n){return e.options=Y(e.options,{effect:null}),n?t.getProperties().then((e=>Y(e,{effectPath:null,effectProperties:null,dataPoint:Y(!0,{},e.originalModelSettings.dataPoint),legend:Y(!0,{},e.originalModelSettings.legend),dimensionTitle:e.originalModelSettings.dimensionTitle}))):Promise.resolve()}}class ef extends Qp{init(e,t,n,r){return e.options=Y(!0,e.options,{effect:this}),t.layout.effectProperties&&t.layout.effectPath===n&&t.layout.effectProperties.max===r.max?Promise.resolve():super.init(e,t,n,r)}update(e,t,n){this.chart=t,this.updateHighlight(e),this.updateFlags(e,n)}updateHighlight(e){const t=this.chart.component("slices").data.items,n=e.effectProperties.min,r=e.effectProperties.max,o=[];let i=[1/0,-1],a=[-1/0,-1];t.forEach(((e,t)=>{const o=e.num.value;n&&o<i[0]&&(i=[o,t]),r&&o>a[0]&&(a=[o,t])})),-1!==i[1]&&o.push(t[i[1]].value),-1!==a[1]&&o.push(t[a[1]].value),o.length&&this.chart.brush("highlight").setValues(o.map((e=>({key:"qHyperCube/qDimensionInfo/0",value:e}))))}}class tf extends Qp{constructor(e){super(e),this.hasPropertiesPanel=!0,this.propsTemplate=e.highlightValuePropsTemplate,this.effectHelper=e.effectHelper}onClick(e){if(!this.chart)return;const t=this.chart.shapesAt(function(e,t){const n=t.element.getBoundingClientRect();return{x:e.clientX-n.left,y:e.clientY-n.top}}(e,this.chart),{propagation:"stop"});if(1!==t.length)return;const n=t[0],r=this.chart.component("slices").data.items.map((e=>e.value)).indexOf(n.data.value);-1!==r&&(this.selectedIndex=r,this.effectHelper.updateSelectedPointIndex(this))}update(e,t,n){this.chart=t,this.updateHighlight(e),this.updateDataPoints(e,n),this.updateFlags(e,n)}updateHighlight(e){const t=this.chart.component("slices").data.items[e.effectProperties.selectedIndex];this.chart.brush("highlight").setValues([{key:"qHyperCube/qDimensionInfo/0",value:t.value}])}updateDataPoints(e,t){this.dataPoints=this.chart.findShapes("path").filter((e=>"slices"===e.key)).map(((n,r)=>{const o=Zp(n,this.chart.formatter,e,t);return{text:`${Xp(n)} (${o})`,value:r}}))}init(e,t,n,r){return e.options=Y(!0,e.options,{effect:this}),t.layout.effectProperties&&t.layout.effectPath===n&&t.layout.effectProperties.selectedIndex===r.selectedIndex?Promise.resolve():super.init(e,t,n,r)}}var nf={isCompatible:({effectPath:e})=>"/effects/maxmin"===e||"/effects/highlight-value"===e,create:e=>"/effects/maxmin"===e.effectPath?new ef(e):"/effects/highlight-value"===e.effectPath?new tf(e):null};function rf(e){const t={},{components:n,tooltip:r}=e,o=n?n.filter((e=>"slices"===e.key))[0]:void 0;if(o&&o.style&&Object.keys(o.style).forEach((e=>{t["chart_style_"+e]=o.style[e]})),r){var i,a;t.chart_tooltip_custom=!r.auto;const e=null===(i=r.chart)||void 0===i||null===(a=i.object)||void 0===a?void 0:a.refId;!r.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}function of(e){if(!e.qHyperCubeDef)return;const t=e.qHyperCubeDef.qDimensions,n=e.qHyperCubeDef.qMeasures;1===t.length&&1===n.length&&(n[0].qSortBy.qSortByNumeric=-1,e.qHyperCubeDef.qInterColumnSortOrder.splice(0,e.qHyperCubeDef.qInterColumnSortOrder.length,1,0))}function af(e){e.qOtherTotalSpec.qOtherMode="OTHER_COUNTED",e.qOtherTotalSpec.qOtherCounted={qv:"10"}}function sf({translator:e}){return{dimensions:{min:1,max:1,description:()=>e.get("Visualizations.Descriptions.Slice"),add(e,t){af(e),of(t),Ld.addCallbackCustomTooltip(t)},move(e,t){af(e),of(t),Ld.moveCallbackCustomTooltip(t,e)},remove(e,t){Ld.removeCallbackCustomTooltip(t,e)},replace(e,t,n,r){af(e),of(r),Ld.replaceCallbackCustomTooltip(r,t)}},measures:{min:1,max:2,description:(t,n)=>e.get(0===n?"Visualizations.Descriptions.Angle":"Visualizations.Descriptions.Radius"),add(e,t){of(t)},remove(e,t){!function(e){if(!e.qHyperCubeDef)return;const t=e.qHyperCubeDef.qMeasures,{mode:n}=e.color;"byExpression"===n&&0===t.length&&(e.color.mode="primary")}(t)}}}}const lf=e=>e.qMax<=0,uf=e=>!(!(e&&e.qHyperCube.qSize.qcy>0)||e.qHyperCube.qMeasureInfo.every(lf));function cf(e){return{definition:Bp(e),softDefinition:Yp,support:{snapshot:uf,export:uf,exportData:!0,sharing:uf,viewData:!0,effects:!0},effects:nf,extendMetrics:rf,importProperties:(t,n,r,o)=>{const i={layout:{templateId:n.templateId}};r.mapProperties(i);const a={defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()},s=Ip.colorChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:sf(e),defaultPropertyValues:a,hypercubePath:o});return s.qProperty.dataPoint&&!1===s.qProperty.dataPoint.show&&delete s.qProperty.dataPoint.show,s},exportProperties:(e,t,n)=>Ip.colorChart.exportProperties({propertyTree:e,hypercubePath:t,viewDataMode:n})}}function df(e){return{properties:{version:"1.20.4",color:{auto:!0,autoMinMax:!0,byDimDef:void 0,byMeasureDef:void 0,colorExpression:void 0,dimensionScheme:"12",expressionIsColor:!0,expressionLabel:"",formatting:{numFormatFromTemplate:!0,isCustomFormatted:void 0},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},components:[{key:"slices",style:{strokeWidth:"none",strokeColor:{index:-1,color:Wd.STROKE.COLOR},cornerRadius:Wd.CORNER_RADIUS,innerRadius:Wd.INNER_RADIUS}}],dataPoint:{auto:!0,labelMode:"share",labelValueMode:"arc"},dimensionTitle:!0,donut:{showAsDonut:!1},footnote:"",legend:{dock:"auto",show:!0,showTitle:!0},qHyperCubeDef:{qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:10,qHeight:500}],qSuppressMissing:!0,qSuppressZero:!1,qMode:"S"},showDetails:!1,showDisclaimer:!0,showTitles:!0,subtitle:"",title:"",tooltip:{auto:!0,hideBasic:!1,data:{qHyperCubeDef:void 0},chart:void 0,imageComponents:void 0}},data:{targets:[sf(e)]},importProperties:({exportFormat:t,initialProperties:n,hypercubePath:r})=>{const o=Ip.colorChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:sf(e),hypercubePath:r});return o.qProperty.dataPoint&&!1===o.qProperty.dataPoint.show&&delete o.qProperty.dataPoint.show,o},exportProperties:({propertyTree:e,hypercubePath:t,viewDataMode:n})=>Ip.colorChart.exportProperties({propertyTree:e,hypercubePath:t,viewDataMode:n})}}const pf=o=>{const{flags:i}=o;!function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(R).forEach((t=>{e.add(R[t])}))}}(o.translator);const a=function(){const o=t();return o.use(n),o.use(r(e)),o.use(ea()),o.component("pie-dividers",oa),o.component("negative-indicators",sa),o}();return{qae:df(o),ext:cf(o),component(){const e=bd({picasso:a}),t=Ud({flags:i,picasso:a,instance:e});!function({instance:e,services:t,picasso:r,flags:o}){const i=g(),a=w(),s=S(),l=q(),u=A(),c=M(),d=v(),p=I(),{qLocaleInfo:f}=k(),[m]=L((()=>t?(Hd.attrExpr.updateProperties(a,c),Promise.all([t.colorService.initialize({createConfig:({getUseBaseColors:e})=>({theme:u,legendProps:c.legend,layout:c,localeInfo:f,hc:c.qHyperCube,colorProps:{...c.color,useBaseColors:e(c)}})}),a&&!c.snapshotData?a.getEffectiveProperties():Promise.resolve({}),t.pluginService.initialize()])):Promise.resolve()),[t]);C((()=>{null!=e&&e.selectionService&&e.selectionService.setLayout(c)}),[c]),C((()=>{if(!e||!m)return;const{chart:h,viewState:g,interactions:y}=e,{colorService:v,pluginService:b,themeService:x,tooltipService:q}=t,D=i.viewState||{};c.snapshotData||(g.preventSet("legendScrollOffset",D.legendScrollOffset||0),g.preventSet("rotation",D.rotation||0)),function(e,t){e&&e.snapshotData&&e.snapshotData.content&&e.snapshotData.content.chartData&&(t.preventSet("legendScrollOffset",e.snapshotData.content.chartData.legendScrollOffset),t.preventSet("rotation",e.snapshotData.content.chartData.rotation))}(c,g),q.expando.set("properties",m[1]);const C=r.data("q")({key:"qHyperCube",data:c.qHyperCube,config:{localeInfo:f}}),w=[{type:"q",key:"qHyperCube",data:c.qHyperCube,config:{localeInfo:f}},...v.getData()],S={slice:{arc:"qMeasureInfo/0"}};c.qHyperCube.qMeasureInfo.length>1&&(S.slice.outerRadius="qMeasureInfo/1");const M=r.data("q")({data:c.qHyperCube,config:{localeInfo:f}}),E=Cp,I=function(e,t){return t.slice.outerRadius?e.extract({field:"qDimensionInfo/0",props:{num:{field:t.slice.arc},radius:{field:t.slice.outerRadius}}}).filter((e=>e.num.value>0&&"NaN"!==e.radius.value)):e.extract({field:"qDimensionInfo/0",props:{num:{field:t.slice.arc}}}).filter((e=>e.num.value>0))}(M,S);Cp=I.length;const A=new Set(wp);wp=new Set(I.map((e=>e.num.value)));const k=d?()=>{const e=h.brush("selection");n.selections(e,{},c).forEach((e=>{d.select(e)}))}:()=>{},T=c.snapshotData&&!i.freeResize?{width:(c.snapshotData.content.size||c.snapshotData.object.size).w,height:(c.snapshotData.content.size||c.snapshotData.object.size).h}:void 0,L=t=>e.selectionService.getIsSelectionLocked(t),O=()=>Dp({layout:c,context:{rtl:"rtl"===i.direction,theme:u,translator:l,constraints:p,model:a},selectionService:e.selectionService},{picasso:r,ds:C,model:a,app:s,chart:h,onSelect:k,isLocked:L,interactions:y,constraints:p,translator:l,viewState:g,dataRowCount:Cp,encodings:S,colorService:v,pluginService:b,themeService:x,tooltipService:q,debouncer:sl,properties:m[1],logicalSize:T,flags:o,animations:{enabled:()=>function(e,t,n){return 0===n.get("rotation")&&!(e<=1||t<=1)}(E,Cp,g),transitionPhaseDisabled:Sp(A,wp)}});e.generateSettings=O,h.update({data:w,settings:O()}),i.effect&&c.effectProperties?i.effect.update(c,h,{encodings:S}):c.effectPath||h.brush("highlight").end()}),[e,m,i.direction,i.effectProperties,p,u.name(),l.language()])}({instance:e,services:t,picasso:a,flags:i}),function({instance:e}){const t=M(),n=g(),r=O();C((()=>{e&&e.generateSettings&&(e.chart.update({settings:e.generateSettings()}),n.effect&&n.effect.update(t,e.chart))}),[r.width,r.height])}({instance:e}),Mp({instance:e,services:t})}}};export{pf as default};